@univerjs-pro/thread-comment-datasource 0.6.6-experimental.20250321-5cc1a0d → 0.6.6-experimental.20250326-0a2cb0d
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';function _0x3ffd(_0x233844,_0x59f1a1){const _0x3801a4=_0x3801();return _0x3ffd=function(_0x3ffdd6,_0x1582cd){_0x3ffdd6=_0x3ffdd6-0x168;let _0xbd9e11=_0x3801a4[_0x3ffdd6];return _0xbd9e11;},_0x3ffd(_0x233844,_0x59f1a1);}const _0x1c3393=_0x3ffd;(function(_0xc4f96b,_0x30a689){const _0x51694f=_0x3ffd,_0x26c4e8=_0xc4f96b();while(!![]){try{const _0x3e263f=parseInt(_0x51694f(0x1ea))/0x1*(parseInt(_0x51694f(0x191))/0x2)+parseInt(_0x51694f(0x170))/0x3*(parseInt(_0x51694f(0x1b8))/0x4)+-parseInt(_0x51694f(0x1eb))/0x5*(parseInt(_0x51694f(0x179))/0x6)+parseInt(_0x51694f(0x1a0))/0x7*(parseInt(_0x51694f(0x174))/0x8)+parseInt(_0x51694f(0x1b1))/0x9*(-parseInt(_0x51694f(0x1a3))/0xa)+parseInt(_0x51694f(0x198))/0xb+parseInt(_0x51694f(0x1a1))/0xc*(parseInt(_0x51694f(0x18c))/0xd);if(_0x3e263f===_0x30a689)break;else _0x26c4e8['push'](_0x26c4e8['shift']());}catch(_0x145a2e){_0x26c4e8['push'](_0x26c4e8['shift']());}}}(_0x3801,0x75219));Object['defineProperty'](exports,Symbol[_0x1c3393(0x1d7)],{'value':_0x1c3393(0x181)});const b=require(_0x1c3393(0x1cb)),T=require(_0x1c3393(0x17c)),c=require(_0x1c3393(0x1c1)),j=require(_0x1c3393(0x16f)),M=require(_0x1c3393(0x1bf)),w=require(_0x1c3393(0x18e)),P=require(_0x1c3393(0x19e)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x2cfe5e=>(_0x2cfe5e[_0x2cfe5e['OpenOrReOpen']=0x0]=_0x1c3393(0x16d),_0x2cfe5e[_0x2cfe5e[_0x1c3393(0x16e)]=0x1]=_0x1c3393(0x16e),_0x2cfe5e[_0x2cfe5e[_0x1c3393(0x17f)]=-0x1]=_0x1c3393(0x17f),_0x2cfe5e))(I||{}),v=(_0x250341=>(_0x250341[_0x250341['Unknown']=0x0]=_0x1c3393(0x17d),_0x250341[_0x250341[_0x1c3393(0x1ae)]=0x1]=_0x1c3393(0x1ae),_0x250341[_0x250341['Reply']=0x2]=_0x1c3393(0x17e),_0x250341[_0x250341['Edit']=0x3]=_0x1c3393(0x1e3),_0x250341[_0x250341[_0x1c3393(0x1ac)]=0x4]=_0x1c3393(0x1ac),_0x250341[_0x250341[_0x1c3393(0x197)]=0x5]=_0x1c3393(0x197),_0x250341[_0x250341[_0x1c3393(0x17f)]=-0x1]=_0x1c3393(0x17f),_0x250341))(v||{});const f=_0x5e11a3=>c['dayjs'](new Date(+_0x5e11a3))[_0x1c3393(0x1a5)](_0x1c3393(0x188)),R=async(_0x204971,_0x149900)=>{const _0xa38fa7=_0x1c3393,_0x2bcfe3=_0x204971[_0xa38fa7(0x186)](c[_0xa38fa7(0x172)]),_0x2e8798=_0x204971['get'](P[_0xa38fa7(0x182)]);_0x149900['forEach'](_0x3b7b74=>{const _0x9ab63c=_0xa38fa7;_0x2bcfe3[_0x9ab63c(0x1df)](_0x3b7b74)&&_0x149900['delete'](_0x3b7b74);}),_0x149900[_0xa38fa7(0x19f)]&&(await _0x2e8798['get'](_0xa38fa7(0x1ca),{'params':{'userIDs':[..._0x149900]}}))[_0xa38fa7(0x1ce)][_0xa38fa7(0x1c0)]['forEach'](_0x1e8f7f=>{const _0x2b0d30=_0xa38fa7;_0x1e8f7f&&_0x2bcfe3[_0x2b0d30(0x1d5)](_0x1e8f7f);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x13a07a,_0x1c9390,_0x590803,_0x4aab4d)=>{for(var _0x37781d=_0x4aab4d>0x1?void 0x0:_0x4aab4d?$(_0x1c9390,_0x590803):_0x1c9390,_0x53b43e=_0x13a07a['length']-0x1,_0x2d9b43;_0x53b43e>=0x0;_0x53b43e--)(_0x2d9b43=_0x13a07a[_0x53b43e])&&(_0x37781d=_0x2d9b43(_0x37781d)||_0x37781d);return _0x37781d;},S=(_0x2dc7aa,_0x57427f)=>(_0x51ebed,_0x26ed71)=>_0x57427f(_0x51ebed,_0x26ed71,_0x2dc7aa);let p=class extends c[_0x1c3393(0x1af)]{constructor(_0x2372aa,_0x532c2b,_0x1622f2,_0x4ca0be){const _0x3b49ef=_0x1c3393;super(),this['_commentService']=_0x2372aa,this[_0x3b49ef(0x19b)]=_0x532c2b,this[_0x3b49ef(0x1e7)]=_0x1622f2,this[_0x3b49ef(0x192)]=_0x4ca0be,this['_init'](),this[_0x3b49ef(0x1b6)]();}[_0x1c3393(0x1b6)](){const _0x5b9ea2=_0x1c3393;this[_0x5b9ea2(0x18a)](this[_0x5b9ea2(0x19b)][_0x5b9ea2(0x1e2)][_0x5b9ea2(0x199)](w[_0x5b9ea2(0x1d9)](0x10))[_0x5b9ea2(0x1ec)](_0x92d1a1=>{const _0x50d815=_0x5b9ea2,_0x5cccdd=new Set();_0x92d1a1[_0x50d815(0x173)](_0x2e5c07=>{const _0x107a5f=_0x50d815;switch(_0x2e5c07['type']){case _0x107a5f(0x1d3):{const _0x16353c=_0x2e5c07[_0x107a5f(0x196)][_0x107a5f(0x195)];_0x5cccdd[_0x107a5f(0x1d3)](_0x16353c);break;}}}),R(this[_0x50d815(0x192)],_0x5cccdd);}));}[_0x1c3393(0x16b)](){const _0x6c7d8a=_0x1c3393;this['disposeWithMe'](this[_0x6c7d8a(0x16a)][_0x6c7d8a(0x1e2)]['subscribe'](async _0x1ae529=>{const _0x8a368d=_0x6c7d8a;var _0x442377,_0xfe500c,_0x114031,_0xdc6180;const _0x379661=(_0x442377=this[_0x8a368d(0x19b)][_0x8a368d(0x1c4)](_0x1ae529[_0x8a368d(0x190)])[_0x8a368d(0x19a)](_0x4b05dd=>_0x4b05dd[_0x8a368d(0x184)]===_0x1ae529[_0x8a368d(0x184)]))==null?void 0x0:_0x442377[_0x8a368d(0x1c5)];if(!_0x379661)return;const {unitId:_0x11e464,subUnitId:_0x4545f1}=_0x379661;switch(_0x1ae529[_0x8a368d(0x183)]&&this[_0x8a368d(0x1e7)][_0x8a368d(0x1d5)](_0x1ae529['user']),_0x1ae529[_0x8a368d(0x1b5)]){case v[_0x8a368d(0x1ae)]:break;case v[_0x8a368d(0x17e)]:{this[_0x8a368d(0x19b)][_0x8a368d(0x18f)](_0x11e464,_0x4545f1,{'unitId':_0x11e464,'subUnitId':_0x4545f1,'ref':'','id':_0x1ae529[_0x8a368d(0x1be)],'dT':f(+_0x1ae529[_0x8a368d(0x1aa)]),'threadId':_0x1ae529[_0x8a368d(0x184)],'personId':(_0x114031=(_0xfe500c=_0x1ae529[_0x8a368d(0x183)])==null?void 0x0:_0xfe500c[_0x8a368d(0x187)])!=null?_0x114031:_0x1ae529['userId'],'text':JSON[_0x8a368d(0x176)](_0x1ae529[_0x8a368d(0x1ab)]),'parentId':_0x379661['id']});break;}case v[_0x8a368d(0x1ac)]:{const _0xeedff0=this[_0x8a368d(0x19b)][_0x8a368d(0x171)](_0x11e464,_0x4545f1,_0x1ae529[_0x8a368d(0x1be)]);_0xeedff0&&_0xeedff0[_0x8a368d(0x1e6)]&&this['_threadCommentModel'][_0x8a368d(0x168)](_0x11e464,_0x4545f1,_0x1ae529[_0x8a368d(0x1be)]);break;}case v[_0x8a368d(0x1e3)]:{this[_0x8a368d(0x19b)][_0x8a368d(0x1b0)](_0x11e464,_0x4545f1,{'commentId':_0x1ae529[_0x8a368d(0x1be)],'text':JSON[_0x8a368d(0x176)](_0x1ae529[_0x8a368d(0x1ab)])});break;}case v[_0x8a368d(0x197)]:{const _0x432d80=(_0xdc6180=this[_0x8a368d(0x19b)][_0x8a368d(0x1c4)](_0x1ae529[_0x8a368d(0x190)])['find'](_0x3dc818=>_0x3dc818['threadId']===_0x1ae529[_0x8a368d(0x184)]))==null?void 0x0:_0xdc6180[_0x8a368d(0x1c5)];_0x432d80&&this['_threadCommentModel'][_0x8a368d(0x1ad)](_0x11e464,_0x4545f1,_0x432d80['id'],_0x1ae529[_0x8a368d(0x178)]===I[_0x8a368d(0x16e)]);break;}}}));}};p=E([S(0x0,c[_0x1c3393(0x189)](b[_0x1c3393(0x1cc)])),S(0x1,c[_0x1c3393(0x189)](M[_0x1c3393(0x1b7)])),S(0x2,c[_0x1c3393(0x189)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x1c3393(0x19d)]))],p);const q=_0x1c3393(0x1c2),D={};var A=Object[_0x1c3393(0x1b4)],x=(_0x33cd93,_0xbe1644,_0x5ac1e2,_0x59a7a9)=>{const _0x1284bc=_0x1c3393;for(var _0x4a7102=_0x59a7a9>0x1?void 0x0:_0x59a7a9?A(_0xbe1644,_0x5ac1e2):_0xbe1644,_0x4f5b30=_0x33cd93[_0x1284bc(0x193)]-0x1,_0xfe0320;_0x4f5b30>=0x0;_0x4f5b30--)(_0xfe0320=_0x33cd93[_0x4f5b30])&&(_0x4a7102=_0xfe0320(_0x4a7102)||_0x4a7102);return _0x4a7102;},_=(_0x45191c,_0x3e41f1)=>(_0x4d81b3,_0x4db62a)=>_0x3e41f1(_0x4d81b3,_0x4db62a,_0x45191c);function Y(_0x1841d5,_0x43ccc0){const _0xab94a4=_0x1c3393,_0x3badfb=_0x1841d5[_0xab94a4(0x169)][0x0];return{..._0x43ccc0,'id':_0x3badfb['replyId'],'resolved':_0x1841d5['solved']===0x1,'dT':f(_0x3badfb[_0xab94a4(0x1aa)]),'personId':_0x3badfb[_0xab94a4(0x1c6)],'threadId':_0x3badfb[_0xab94a4(0x184)]};}function G(_0x1788c4,_0x3c4a1d,_0x72c727){const _0x1728dc=_0x1c3393;var _0x7a6ca6,_0x5040ce;if(((_0x5040ce=(_0x7a6ca6=_0x1788c4==null?void 0x0:_0x1788c4['replies'])==null?void 0x0:_0x7a6ca6[_0x1728dc(0x193)])!=null?_0x5040ce:0x0)>0x0){const _0x5f43ff=(_0x5e9542,_0x47e6ce)=>({'id':_0x5e9542['replyId'],'threadId':_0x5e9542[_0x1728dc(0x184)],'dT':f(_0x5e9542['createTimestamp']),'personId':_0x5e9542[_0x1728dc(0x1c6)],'resolved':_0x1788c4[_0x1728dc(0x178)]===I[_0x1728dc(0x16e)],'unitId':_0x3c4a1d,'subUnitId':_0x72c727,'text':JSON[_0x1728dc(0x176)](_0x5e9542['content']),'parentId':_0x47e6ce}),_0x10ef8c=_0x5f43ff(_0x1788c4[_0x1728dc(0x169)][0x0]);return{..._0x10ef8c,'children':_0x1788c4[_0x1728dc(0x169)]['slice'](0x1)[_0x1728dc(0x1da)](_0x1fda30=>_0x5f43ff(_0x1fda30,_0x10ef8c['id']))};}return null;}let g=class{constructor(_0x58c631,_0x1db117,_0x493ba5,_0x4586fe){const _0x465271=_0x1c3393;this['_httpService']=_0x58c631,this['_userService']=_0x1db117,this[_0x465271(0x1d6)]=_0x493ba5,this[_0x465271(0x192)]=_0x4586fe;}async[_0x1c3393(0x18f)](_0x147270){const _0x3437bd=_0x1c3393;var _0x51ed9d,_0x19663d;const {parentId:_0x37549b,unitId:_0x5ae728,text:_0x3253c9,threadId:_0x35389d}=_0x147270,_0x3f3d7b=(_0x19663d=(_0x51ed9d=_0x3253c9['customRanges'])==null?void 0x0:_0x51ed9d[_0x3437bd(0x1c9)](_0x34a358=>_0x34a358[_0x3437bd(0x1bb)]===c[_0x3437bd(0x1c8)][_0x3437bd(0x1a6)])['map'](_0x2d9e9c=>_0x2d9e9c[_0x3437bd(0x18d)]))!=null?_0x19663d:[],_0x422480=JSON[_0x3437bd(0x1d2)](_0x3253c9),_0x20b3a6=(await this['_sessionService']['requireSession'](_0x5ae728))[_0x3437bd(0x1a9)]();if(_0x37549b){const _0x356a5b={'memberId':_0x20b3a6,'unitId':_0x5ae728,'content':_0x422480,'mention':_0x3f3d7b,'threadId':_0x35389d},_0x4fb7b1=(await this[_0x3437bd(0x1c7)]['post'](_0x3437bd(0x1a8)+_0x5ae728+_0x3437bd(0x1b3),{'body':_0x356a5b}))[_0x3437bd(0x1ce)][_0x3437bd(0x177)];return{..._0x147270,'id':_0x4fb7b1['replyId'],'dT':c[_0x3437bd(0x1b9)](+_0x4fb7b1['createTimestamp'])['format'](_0x3437bd(0x188)),'personId':_0x4fb7b1['userId']};}else{const _0x7602dc={'memberId':_0x20b3a6,'unitId':_0x5ae728,'content':_0x422480,'mention':_0x3f3d7b},_0x5dd8f0=await this[_0x3437bd(0x1c7)][_0x3437bd(0x1de)](_0x3437bd(0x1a8)+_0x5ae728+_0x3437bd(0x17b),{'body':_0x7602dc});return Y(_0x5dd8f0[_0x3437bd(0x1ce)]['comment'],_0x147270);}}async['updateComment'](_0x541b7c){const _0x2db226=_0x1c3393;var _0x404253,_0x358c68;const {text:_0x75ff4d,unitId:_0x15a334}=_0x541b7c,_0x711ac7=(_0x358c68=(_0x404253=_0x75ff4d[_0x2db226(0x1cd)])==null?void 0x0:_0x404253[_0x2db226(0x1c9)](_0x1f79d8=>_0x1f79d8[_0x2db226(0x1bb)]===c['CustomRangeType']['COMMENT'])[_0x2db226(0x1da)](_0x32d713=>_0x32d713[_0x2db226(0x18d)]))!=null?_0x358c68:[],_0x33fc3a=JSON[_0x2db226(0x1d2)](_0x75ff4d),_0xe2b9b1=_0x541b7c[_0x2db226(0x184)],_0x40b6bd=_0x541b7c['id'],_0x2c0bf4={'memberId':(await this[_0x2db226(0x1d6)][_0x2db226(0x194)](_0x15a334))[_0x2db226(0x1a9)](),'unitId':_0x15a334,'threadId':_0xe2b9b1,'mention':_0x711ac7,'content':_0x33fc3a,'replyId':_0x40b6bd},_0x4e1056=await this['_httpService']['post'](_0x2db226(0x1a8)+_0x15a334+_0x2db226(0x1bc),{'body':_0x2c0bf4});return!_0x4e1056[_0x2db226(0x1ce)][_0x2db226(0x185)]||_0x4e1056[_0x2db226(0x1ce)][_0x2db226(0x185)]['code']===0x1;}async[_0x1c3393(0x1ad)](_0x4f552d){const _0x2ca805=_0x1c3393,{unitId:_0x196038}=_0x4f552d,_0x568bc7=_0x4f552d[_0x2ca805(0x184)],_0x51a46f={'memberId':this[_0x2ca805(0x1e7)][_0x2ca805(0x1bd)]()[_0x2ca805(0x187)],'unitId':_0x196038,'threadId':_0x568bc7,'solved':_0x4f552d['resolved']?I[_0x2ca805(0x16e)]:I['OpenOrReOpen']},_0x46e58f=await this[_0x2ca805(0x1c7)]['post'](_0x2ca805(0x1a8)+_0x196038+'/solved',{'body':_0x51a46f});return!_0x46e58f[_0x2ca805(0x1ce)][_0x2ca805(0x185)]||_0x46e58f['body']['error'][_0x2ca805(0x1cf)]===0x1;}async[_0x1c3393(0x168)](_0x111c50,_0xe340c9,_0x399e98,_0x5313d6){const _0x5b1282=_0x1c3393,_0x18d712={'memberId':(await this[_0x5b1282(0x1d6)]['requireSession'](_0x111c50))['getMemberID'](),'threadId':_0x399e98,'replyId':_0x5313d6,'unitId':_0x111c50},_0x2eda32=await this[_0x5b1282(0x1c7)][_0x5b1282(0x1de)](_0x5b1282(0x1a8)+_0x111c50+_0x5b1282(0x1dd),{'body':_0x18d712});return!_0x2eda32[_0x5b1282(0x1ce)]['error']||_0x2eda32[_0x5b1282(0x1ce)][_0x5b1282(0x185)][_0x5b1282(0x1cf)]===0x1;}async[_0x1c3393(0x1b2)](_0x65401e,_0x745e7f,_0x204800){const _0x1e9cc6=_0x1c3393,_0x569ef2={'unitId':_0x65401e,'threadId':_0x204800},_0x2f69ac=await this[_0x1e9cc6(0x1c7)]['post'](_0x1e9cc6(0x1a8)+_0x65401e+_0x1e9cc6(0x1d4),{'body':_0x569ef2}),_0x5b2cdb=_0x204800['map'](_0x4a203a=>G(_0x2f69ac[_0x1e9cc6(0x1ce)][_0x1e9cc6(0x19c)][_0x4a203a],_0x65401e,_0x745e7f))[_0x1e9cc6(0x1c9)](Boolean);return Object[_0x1e9cc6(0x1d1)](_0x2f69ac['body']['users'])[_0x1e9cc6(0x173)](_0x1df16b=>{const _0x5e8fe6=_0x1e9cc6;this['_userService'][_0x5e8fe6(0x1d5)](_0x1df16b);}),_0x5b2cdb;}[_0x1c3393(0x1a4)](_0x3cc4a9){const _0x2f9e1f=_0x1c3393;return{'id':_0x3cc4a9['id'],'threadId':_0x3cc4a9[_0x2f9e1f(0x184)],'ref':_0x3cc4a9[_0x2f9e1f(0x1e8)]};}};g=x([_(0x0,c[_0x1c3393(0x189)](P[_0x1c3393(0x182)])),_(0x1,c['Inject'](c[_0x1c3393(0x172)])),_(0x2,c[_0x1c3393(0x189)](b[_0x1c3393(0x1e4)])),_(0x3,c[_0x1c3393(0x189)](c[_0x1c3393(0x19d)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x3d0333,_0x5eb433,_0x1e44e8,_0x5acefc)=>{const _0x9d5891=_0x1c3393;for(var _0x45d25d=_0x5acefc>0x1?void 0x0:_0x5acefc?H(_0x5eb433,_0x1e44e8):_0x5eb433,_0x4ced56=_0x3d0333[_0x9d5891(0x193)]-0x1,_0xb7febd;_0x4ced56>=0x0;_0x4ced56--)(_0xb7febd=_0x3d0333[_0x4ced56])&&(_0x45d25d=_0xb7febd(_0x45d25d)||_0x45d25d);return _0x45d25d;},y=(_0x174e39,_0x3ff34e)=>(_0x2adcce,_0x416bc9)=>_0x3ff34e(_0x2adcce,_0x416bc9,_0x174e39);let C=class extends c['Disposable']{constructor(_0x2b9c2f,_0x51816c){const _0x25a6ba=_0x1c3393;super(),this[_0x25a6ba(0x1a7)]=_0x2b9c2f,this[_0x25a6ba(0x1d8)]=_0x51816c,this[_0x25a6ba(0x18b)]();}[_0x1c3393(0x18b)](){const _0x5a68e9=_0x1c3393;this['_threadCommentDataSourceService'][_0x5a68e9(0x1e0)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};function _0x3801(){const _0x99b0f0=['ref','pluginName','1Irebyb','137805opICLk','subscribe','deleteComment','replies','_commentService','_init','UNIVER_UNKNOWN','OpenOrReOpen','Solved','@univerjs/thread-comment-ui','111plKZfM','getComment','UserManagerService','forEach','8nsnqEF','UniverCollaborationClientPlugin','parse','reply','solved','126NtDSmv','merge','/add','@univerjs-pro/license','Unknown','Reply','UNRECOGNIZED','UniverThreadCommentDataSourcePlugin','Module','HTTPService','user','threadId','error','get','userID','YYYY/MM/DD\x20HH:mm','Inject','disposeWithMe','_initDataSource','13bpGKIt','rangeId','rxjs','addComment','unitId','1220914cpYpfH','_injector','length','requireSession','personId','payload','Solve','5711915oZaDsR','pipe','find','_threadCommentModel','comments','Injector','@univerjs/network','size','896574SIbxOA','1063944MvDKLU','symbol','10kdlHHN','saveCommentToSnapshot','format','COMMENT','_threadCommentDataSourceService','/universer-api/comment/unit/','getMemberID','createTimestamp','content','Delete','resolveComment','Add','Disposable','updateComment','7915581cVfEmL','listComments','/reply','getOwnPropertyDescriptor','type','_initUserSync','ThreadCommentModel','63956hGwXvO','dayjs','_config','rangeType','/edit','getCurrentUser','replyId','@univerjs/thread-comment','users','@univerjs/core','thread-comment-data-source.config','DependentOn','getUnit','root','userId','_httpService','CustomRangeType','filter','/universer-api/user/list','@univerjs-pro/collaboration-client','CommentService','customRanges','body','code','onStarting','values','stringify','add','/list','addUser','_sessionService','toStringTag','_threadCommentDataSource','bufferTime','map','_configService','Plugin','/delete','post','getUser','dataSource','UniverInstanceType','commentUpdate$','Edit','CollaborationSessionService','UniverThreadCommentUIPlugin','parentId','_userService'];_0x3801=function(){return _0x99b0f0;};return _0x3801();}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1c3393(0x189)](g))],C);var F=Object['defineProperty'],L=Object[_0x1c3393(0x1b4)],Z=(_0x5decb5,_0x23b069,_0x4a5065)=>_0x23b069 in _0x5decb5?F(_0x5decb5,_0x23b069,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4a5065}):_0x5decb5[_0x23b069]=_0x4a5065,W=(_0x5e2523,_0x215a3c,_0x2970b8,_0x277824)=>{const _0x847eea=_0x1c3393;for(var _0x1c1d60=_0x277824>0x1?void 0x0:_0x277824?L(_0x215a3c,_0x2970b8):_0x215a3c,_0x3a7631=_0x5e2523[_0x847eea(0x193)]-0x1,_0x496be9;_0x3a7631>=0x0;_0x3a7631--)(_0x496be9=_0x5e2523[_0x3a7631])&&(_0x1c1d60=_0x496be9(_0x1c1d60)||_0x1c1d60);return _0x1c1d60;},O=(_0x1f0053,_0x18187d)=>(_0x1fd9b0,_0x3ee6d5)=>_0x18187d(_0x1fd9b0,_0x3ee6d5,_0x1f0053),N=(_0x2cb97c,_0x24d2ab,_0x14ae3a)=>Z(_0x2cb97c,typeof _0x24d2ab!=_0x1c3393(0x1a2)?_0x24d2ab+'':_0x24d2ab,_0x14ae3a);exports[_0x1c3393(0x180)]=class extends c[_0x1c3393(0x1dc)]{constructor(_0x8e016f=D,_0x5630af,_0x25b7c1){const _0x1766a6=_0x1c3393;super(),this[_0x1766a6(0x1ba)]=_0x8e016f,this[_0x1766a6(0x192)]=_0x5630af,this[_0x1766a6(0x1db)]=_0x25b7c1;const {..._0x2e2286}=c[_0x1766a6(0x17a)]({},D,this[_0x1766a6(0x1ba)]);this[_0x1766a6(0x1db)]['setConfig'](q,_0x2e2286);}[_0x1c3393(0x1d0)](){const _0x51de26=_0x1c3393;[[g],[C],[p]][_0x51de26(0x173)](_0x3989f1=>{const _0x2bd6a9=_0x51de26;this[_0x2bd6a9(0x192)][_0x2bd6a9(0x1d3)](_0x3989f1);});}['onReady'](){const _0x5fbfe4=_0x1c3393;this[_0x5fbfe4(0x192)]['get'](C),this['_injector'][_0x5fbfe4(0x186)](p);}},N(exports[_0x1c3393(0x180)],_0x1c3393(0x1e9),U),N(exports[_0x1c3393(0x180)],_0x1c3393(0x1b5),c[_0x1c3393(0x1e1)][_0x1c3393(0x16c)]),exports[_0x1c3393(0x180)]=W([c[_0x1c3393(0x1c3)](j[_0x1c3393(0x1e5)],b[_0x1c3393(0x175)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x1c3393(0x19d)])),O(0x2,c['IConfigService'])],exports[_0x1c3393(0x180)]);
|
|
1
|
+
'use strict';const _0x276b64=_0x2a1c;(function(_0x20075e,_0x4c9768){const _0x4ccaa5=_0x2a1c,_0x46ddfc=_0x20075e();while(!![]){try{const _0x1d3dd8=-parseInt(_0x4ccaa5(0x15c))/0x1+-parseInt(_0x4ccaa5(0x15a))/0x2+parseInt(_0x4ccaa5(0x19b))/0x3+parseInt(_0x4ccaa5(0x170))/0x4+-parseInt(_0x4ccaa5(0x137))/0x5*(-parseInt(_0x4ccaa5(0x166))/0x6)+-parseInt(_0x4ccaa5(0x13b))/0x7+parseInt(_0x4ccaa5(0x179))/0x8;if(_0x1d3dd8===_0x4c9768)break;else _0x46ddfc['push'](_0x46ddfc['shift']());}catch(_0x8b69fb){_0x46ddfc['push'](_0x46ddfc['shift']());}}}(_0x5ec1,0xab531));Object[_0x276b64(0x143)](exports,Symbol[_0x276b64(0x165)],{'value':_0x276b64(0x172)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x276b64(0x12b)),c=require(_0x276b64(0x162)),j=require(_0x276b64(0x17a)),M=require(_0x276b64(0x14e)),w=require(_0x276b64(0x180)),P=require(_0x276b64(0x145)),U=_0x276b64(0x136);var I=(_0x27e6d3=>(_0x27e6d3[_0x27e6d3[_0x276b64(0x148)]=0x0]='OpenOrReOpen',_0x27e6d3[_0x27e6d3[_0x276b64(0x18e)]=0x1]=_0x276b64(0x18e),_0x27e6d3[_0x27e6d3[_0x276b64(0x18a)]=-0x1]='UNRECOGNIZED',_0x27e6d3))(I||{}),v=(_0x337a91=>(_0x337a91[_0x337a91[_0x276b64(0x16a)]=0x0]=_0x276b64(0x16a),_0x337a91[_0x337a91['Add']=0x1]=_0x276b64(0x194),_0x337a91[_0x337a91[_0x276b64(0x155)]=0x2]=_0x276b64(0x155),_0x337a91[_0x337a91[_0x276b64(0x139)]=0x3]='Edit',_0x337a91[_0x337a91['Delete']=0x4]=_0x276b64(0x130),_0x337a91[_0x337a91[_0x276b64(0x176)]=0x5]=_0x276b64(0x176),_0x337a91[_0x337a91[_0x276b64(0x18a)]=-0x1]='UNRECOGNIZED',_0x337a91))(v||{});const f=_0x3f4707=>c[_0x276b64(0x126)](new Date(+_0x3f4707))[_0x276b64(0x19a)](_0x276b64(0x183)),R=async(_0x54db85,_0x12a36e)=>{const _0x37a860=_0x276b64,_0x232ef8=_0x54db85[_0x37a860(0x181)](c[_0x37a860(0x134)]),_0x24e3d1=_0x54db85[_0x37a860(0x181)](P['HTTPService']);_0x12a36e[_0x37a860(0x156)](_0x5decf6=>{const _0x211626=_0x37a860;_0x232ef8[_0x211626(0x135)](_0x5decf6)&&_0x12a36e['delete'](_0x5decf6);}),_0x12a36e['size']&&(await _0x24e3d1[_0x37a860(0x181)](_0x37a860(0x12d),{'params':{'userIDs':[..._0x12a36e]}}))[_0x37a860(0x149)][_0x37a860(0x198)][_0x37a860(0x156)](_0x45e885=>{const _0x3a5be8=_0x37a860;_0x45e885&&_0x232ef8[_0x3a5be8(0x17f)](_0x45e885);});};var $=Object[_0x276b64(0x150)],E=(_0x2d56ff,_0x4f665e,_0x3e522d,_0x5e0c2e)=>{const _0x160954=_0x276b64;for(var _0x4878b5=_0x5e0c2e>0x1?void 0x0:_0x5e0c2e?$(_0x4f665e,_0x3e522d):_0x4f665e,_0x529daa=_0x2d56ff[_0x160954(0x18b)]-0x1,_0x3fab23;_0x529daa>=0x0;_0x529daa--)(_0x3fab23=_0x2d56ff[_0x529daa])&&(_0x4878b5=_0x3fab23(_0x4878b5)||_0x4878b5);return _0x4878b5;},S=(_0x4dc582,_0x281691)=>(_0x53e66f,_0x2c7f1d)=>_0x281691(_0x53e66f,_0x2c7f1d,_0x4dc582);let p=class extends c[_0x276b64(0x13f)]{constructor(_0x4bff54,_0x51f2e7,_0x5375f4,_0x311440){const _0x50a895=_0x276b64;super(),this['_commentService']=_0x4bff54,this[_0x50a895(0x195)]=_0x51f2e7,this['_userService']=_0x5375f4,this['_injector']=_0x311440,this[_0x50a895(0x138)](),this[_0x50a895(0x169)]();}[_0x276b64(0x169)](){const _0x51c2e9=_0x276b64;this[_0x51c2e9(0x13c)](this[_0x51c2e9(0x195)]['commentUpdate$'][_0x51c2e9(0x160)](w[_0x51c2e9(0x12f)](0x10))['subscribe'](_0x2217e5=>{const _0x53e95d=_0x51c2e9,_0x205d4a=new Set();_0x2217e5['forEach'](_0x39af6f=>{const _0x37c440=_0x2a1c;switch(_0x39af6f[_0x37c440(0x161)]){case _0x37c440(0x127):{const _0x6d1a88=_0x39af6f[_0x37c440(0x129)][_0x37c440(0x192)];_0x205d4a[_0x37c440(0x127)](_0x6d1a88);break;}}}),R(this[_0x53e95d(0x146)],_0x205d4a);}));}[_0x276b64(0x138)](){const _0x2970ab=_0x276b64;this['disposeWithMe'](this[_0x2970ab(0x16e)][_0x2970ab(0x184)][_0x2970ab(0x140)](async _0x82ddb9=>{const _0x325415=_0x2970ab;var _0x55c90a,_0x348271,_0x25a3bc,_0x5a32e8;const _0x59a72a=(_0x55c90a=this['_threadCommentModel'][_0x325415(0x16c)](_0x82ddb9[_0x325415(0x131)])[_0x325415(0x16f)](_0x15cdf9=>_0x15cdf9['threadId']===_0x82ddb9[_0x325415(0x15e)]))==null?void 0x0:_0x55c90a['root'];if(!_0x59a72a)return;const {unitId:_0x44efb0,subUnitId:_0x4a9e30}=_0x59a72a;switch(_0x82ddb9['user']&&this['_userService'][_0x325415(0x17f)](_0x82ddb9[_0x325415(0x13d)]),_0x82ddb9[_0x325415(0x161)]){case v[_0x325415(0x194)]:break;case v['Reply']:{this[_0x325415(0x195)][_0x325415(0x168)](_0x44efb0,_0x4a9e30,{'unitId':_0x44efb0,'subUnitId':_0x4a9e30,'ref':'','id':_0x82ddb9[_0x325415(0x178)],'dT':f(+_0x82ddb9['createTimestamp']),'threadId':_0x82ddb9[_0x325415(0x15e)],'personId':(_0x25a3bc=(_0x348271=_0x82ddb9[_0x325415(0x13d)])==null?void 0x0:_0x348271[_0x325415(0x12a)])!=null?_0x25a3bc:_0x82ddb9['userId'],'text':JSON[_0x325415(0x191)](_0x82ddb9[_0x325415(0x175)]),'parentId':_0x59a72a['id']});break;}case v[_0x325415(0x130)]:{const _0xba1101=this[_0x325415(0x195)]['getComment'](_0x44efb0,_0x4a9e30,_0x82ddb9[_0x325415(0x178)]);_0xba1101&&_0xba1101[_0x325415(0x199)]&&this['_threadCommentModel'][_0x325415(0x132)](_0x44efb0,_0x4a9e30,_0x82ddb9[_0x325415(0x178)]);break;}case v[_0x325415(0x139)]:{this[_0x325415(0x195)][_0x325415(0x18c)](_0x44efb0,_0x4a9e30,{'commentId':_0x82ddb9[_0x325415(0x178)],'text':JSON['parse'](_0x82ddb9[_0x325415(0x175)])});break;}case v[_0x325415(0x176)]:{const _0x264e4d=(_0x5a32e8=this['_threadCommentModel'][_0x325415(0x16c)](_0x82ddb9[_0x325415(0x131)])[_0x325415(0x16f)](_0x45920c=>_0x45920c[_0x325415(0x15e)]===_0x82ddb9[_0x325415(0x15e)]))==null?void 0x0:_0x5a32e8[_0x325415(0x182)];_0x264e4d&&this[_0x325415(0x195)][_0x325415(0x15d)](_0x44efb0,_0x4a9e30,_0x264e4d['id'],_0x82ddb9[_0x325415(0x18d)]===I[_0x325415(0x18e)]);break;}}}));}};p=E([S(0x0,c[_0x276b64(0x16b)](b['CommentService'])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x276b64(0x134)])),S(0x3,c[_0x276b64(0x16b)](c[_0x276b64(0x189)]))],p);const q=_0x276b64(0x196),D={};var A=Object[_0x276b64(0x150)],x=(_0x7277db,_0x4b6dc5,_0x51f69a,_0x4b8a1e)=>{const _0x1240a4=_0x276b64;for(var _0x1f94b5=_0x4b8a1e>0x1?void 0x0:_0x4b8a1e?A(_0x4b6dc5,_0x51f69a):_0x4b6dc5,_0x4e72a6=_0x7277db[_0x1240a4(0x18b)]-0x1,_0x3df234;_0x4e72a6>=0x0;_0x4e72a6--)(_0x3df234=_0x7277db[_0x4e72a6])&&(_0x1f94b5=_0x3df234(_0x1f94b5)||_0x1f94b5);return _0x1f94b5;},_=(_0x5130c2,_0xc2a52)=>(_0xb2ec50,_0x41c31f)=>_0xc2a52(_0xb2ec50,_0x41c31f,_0x5130c2);function Y(_0x28d8e2,_0x49c686){const _0x17278b=_0x276b64,_0x45bd64=_0x28d8e2[_0x17278b(0x144)][0x0];return{..._0x49c686,'id':_0x45bd64[_0x17278b(0x178)],'resolved':_0x28d8e2[_0x17278b(0x18d)]===0x1,'dT':f(_0x45bd64[_0x17278b(0x17c)]),'personId':_0x45bd64[_0x17278b(0x16d)],'threadId':_0x45bd64[_0x17278b(0x15e)]};}function _0x5ec1(){const _0x48df48=['payload','userID','@univerjs-pro/license','COMMENT','/universer-api/user/list','IConfigService','bufferTime','Delete','unitId','deleteComment','UNIVER_UNKNOWN','UserManagerService','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1286545MqqOhG','_init','Edit','post','6279784lxvisj','disposeWithMe','user','HTTPService','Disposable','subscribe','onStarting','CustomRangeType','defineProperty','replies','@univerjs/network','_injector','/universer-api/comment/unit/','OpenOrReOpen','body','reply','comments','ref','onReady','@univerjs/thread-comment','stringify','getOwnPropertyDescriptor','map','UniverThreadCommentDataSourcePlugin','error','CollaborationSessionService','Reply','forEach','symbol','/reply','UniverCollaborationClientPlugin','1819052jdjkSD','_sessionService','1055477SAKniD','resolveComment','threadId','getCurrentUser','pipe','type','@univerjs/core','_configService','IThreadCommentDataSourceService','toStringTag','18dgItvJ','requireSession','addComment','_initUserSync','Unknown','Inject','getUnit','userId','_commentService','find','4741600Neuulc','_threadCommentDataSource','Module','code','_threadCommentDataSourceService','content','Solve','filter','replyId','9661336XXalXZ','@univerjs/thread-comment-ui','_userService','createTimestamp','saveCommentToSnapshot','Plugin','addUser','rxjs','get','root','YYYY/MM/DD\x20HH:mm','commentUpdate$','values','_httpService','_config','_initDataSource','Injector','UNRECOGNIZED','length','updateComment','solved','Solved','setConfig','UniverInstanceType','parse','personId','/list','Add','_threadCommentModel','thread-comment-data-source.config','slice','users','parentId','format','1196598ffNBGh','rangeId','getMemberID','customRanges','comment','dayjs','add','merge'];_0x5ec1=function(){return _0x48df48;};return _0x5ec1();}function _0x2a1c(_0x5808c8,_0x22633f){const _0x5ec1ac=_0x5ec1();return _0x2a1c=function(_0x2a1c98,_0x3f47d8){_0x2a1c98=_0x2a1c98-0x123;let _0x3adcd3=_0x5ec1ac[_0x2a1c98];return _0x3adcd3;},_0x2a1c(_0x5808c8,_0x22633f);}function G(_0x7b7693,_0x7943de,_0x329845){const _0x4da10d=_0x276b64;var _0x3f053b,_0x4e05fb;if(((_0x4e05fb=(_0x3f053b=_0x7b7693==null?void 0x0:_0x7b7693[_0x4da10d(0x144)])==null?void 0x0:_0x3f053b[_0x4da10d(0x18b)])!=null?_0x4e05fb:0x0)>0x0){const _0x31573d=(_0x54f16c,_0x31cf68)=>({'id':_0x54f16c['replyId'],'threadId':_0x54f16c[_0x4da10d(0x15e)],'dT':f(_0x54f16c[_0x4da10d(0x17c)]),'personId':_0x54f16c[_0x4da10d(0x16d)],'resolved':_0x7b7693[_0x4da10d(0x18d)]===I[_0x4da10d(0x18e)],'unitId':_0x7943de,'subUnitId':_0x329845,'text':JSON[_0x4da10d(0x191)](_0x54f16c['content']),'parentId':_0x31cf68}),_0x344081=_0x31573d(_0x7b7693[_0x4da10d(0x144)][0x0]);return{..._0x344081,'children':_0x7b7693[_0x4da10d(0x144)][_0x4da10d(0x197)](0x1)[_0x4da10d(0x151)](_0x181de3=>_0x31573d(_0x181de3,_0x344081['id']))};}return null;}let g=class{constructor(_0x262861,_0x5db16f,_0x1fc40c,_0x291f59){const _0x151bdc=_0x276b64;this[_0x151bdc(0x186)]=_0x262861,this[_0x151bdc(0x17b)]=_0x5db16f,this['_sessionService']=_0x1fc40c,this[_0x151bdc(0x146)]=_0x291f59;}async[_0x276b64(0x168)](_0x273f97){const _0x4fee1c=_0x276b64;var _0x8b9ce1,_0x23af75;const {parentId:_0x466afa,unitId:_0xc87320,text:_0x47e2ec,threadId:_0x52513d}=_0x273f97,_0x2a861f=(_0x23af75=(_0x8b9ce1=_0x47e2ec[_0x4fee1c(0x124)])==null?void 0x0:_0x8b9ce1[_0x4fee1c(0x177)](_0xe1b5fc=>_0xe1b5fc['rangeType']===c[_0x4fee1c(0x142)][_0x4fee1c(0x12c)])[_0x4fee1c(0x151)](_0x3f06d0=>_0x3f06d0[_0x4fee1c(0x19c)]))!=null?_0x23af75:[],_0x4ecbcf=JSON[_0x4fee1c(0x14f)](_0x47e2ec),_0x2c4ccf=(await this[_0x4fee1c(0x15b)][_0x4fee1c(0x167)](_0xc87320))['getMemberID']();if(_0x466afa){const _0x35f4bf={'memberId':_0x2c4ccf,'unitId':_0xc87320,'content':_0x4ecbcf,'mention':_0x2a861f,'threadId':_0x52513d},_0x5f1f58=(await this[_0x4fee1c(0x186)]['post']('/universer-api/comment/unit/'+_0xc87320+_0x4fee1c(0x158),{'body':_0x35f4bf}))['body'][_0x4fee1c(0x14a)];return{..._0x273f97,'id':_0x5f1f58[_0x4fee1c(0x178)],'dT':c[_0x4fee1c(0x126)](+_0x5f1f58['createTimestamp'])[_0x4fee1c(0x19a)](_0x4fee1c(0x183)),'personId':_0x5f1f58[_0x4fee1c(0x16d)]};}else{const _0x1cfdf7={'memberId':_0x2c4ccf,'unitId':_0xc87320,'content':_0x4ecbcf,'mention':_0x2a861f},_0x36b8ae=await this[_0x4fee1c(0x186)][_0x4fee1c(0x13a)](_0x4fee1c(0x147)+_0xc87320+'/add',{'body':_0x1cfdf7});return Y(_0x36b8ae['body'][_0x4fee1c(0x125)],_0x273f97);}}async['updateComment'](_0x341b7e){const _0x33cdbf=_0x276b64;var _0x55ce5a,_0x2d0c71;const {text:_0x98af83,unitId:_0x65ef08}=_0x341b7e,_0x14480d=(_0x2d0c71=(_0x55ce5a=_0x98af83['customRanges'])==null?void 0x0:_0x55ce5a[_0x33cdbf(0x177)](_0x1ccd7e=>_0x1ccd7e['rangeType']===c[_0x33cdbf(0x142)][_0x33cdbf(0x12c)])[_0x33cdbf(0x151)](_0x56d63d=>_0x56d63d[_0x33cdbf(0x19c)]))!=null?_0x2d0c71:[],_0x612c5f=JSON[_0x33cdbf(0x14f)](_0x98af83),_0x50c064=_0x341b7e[_0x33cdbf(0x15e)],_0x589579=_0x341b7e['id'],_0x3c6a79={'memberId':(await this[_0x33cdbf(0x15b)][_0x33cdbf(0x167)](_0x65ef08))[_0x33cdbf(0x123)](),'unitId':_0x65ef08,'threadId':_0x50c064,'mention':_0x14480d,'content':_0x612c5f,'replyId':_0x589579},_0x24891d=await this[_0x33cdbf(0x186)][_0x33cdbf(0x13a)]('/universer-api/comment/unit/'+_0x65ef08+'/edit',{'body':_0x3c6a79});return!_0x24891d[_0x33cdbf(0x149)][_0x33cdbf(0x153)]||_0x24891d[_0x33cdbf(0x149)][_0x33cdbf(0x153)][_0x33cdbf(0x173)]===0x1;}async[_0x276b64(0x15d)](_0x1af347){const _0x594ff1=_0x276b64,{unitId:_0x6ed9d}=_0x1af347,_0x38065d=_0x1af347['threadId'],_0x3b9cf4={'memberId':this['_userService'][_0x594ff1(0x15f)]()[_0x594ff1(0x12a)],'unitId':_0x6ed9d,'threadId':_0x38065d,'solved':_0x1af347['resolved']?I[_0x594ff1(0x18e)]:I[_0x594ff1(0x148)]},_0x52a402=await this[_0x594ff1(0x186)][_0x594ff1(0x13a)](_0x594ff1(0x147)+_0x6ed9d+'/solved',{'body':_0x3b9cf4});return!_0x52a402[_0x594ff1(0x149)]['error']||_0x52a402[_0x594ff1(0x149)]['error'][_0x594ff1(0x173)]===0x1;}async[_0x276b64(0x132)](_0x2d3600,_0x2d30e4,_0x2a8302,_0x442ca2){const _0x3e6f36=_0x276b64,_0x283052={'memberId':(await this[_0x3e6f36(0x15b)]['requireSession'](_0x2d3600))[_0x3e6f36(0x123)](),'threadId':_0x2a8302,'replyId':_0x442ca2,'unitId':_0x2d3600},_0x32619a=await this[_0x3e6f36(0x186)][_0x3e6f36(0x13a)]('/universer-api/comment/unit/'+_0x2d3600+'/delete',{'body':_0x283052});return!_0x32619a[_0x3e6f36(0x149)][_0x3e6f36(0x153)]||_0x32619a['body']['error'][_0x3e6f36(0x173)]===0x1;}async['listComments'](_0x252de5,_0x3188b7,_0x4cc4a6){const _0x93f807=_0x276b64,_0x386b2c={'unitId':_0x252de5,'threadId':_0x4cc4a6},_0x425725=await this[_0x93f807(0x186)][_0x93f807(0x13a)](_0x93f807(0x147)+_0x252de5+_0x93f807(0x193),{'body':_0x386b2c}),_0x34ae5a=_0x4cc4a6['map'](_0x298e33=>G(_0x425725[_0x93f807(0x149)][_0x93f807(0x14b)][_0x298e33],_0x252de5,_0x3188b7))[_0x93f807(0x177)](Boolean);return Object[_0x93f807(0x185)](_0x425725[_0x93f807(0x149)][_0x93f807(0x198)])['forEach'](_0x97b6cd=>{const _0x7e5801=_0x93f807;this[_0x7e5801(0x17b)][_0x7e5801(0x17f)](_0x97b6cd);}),_0x34ae5a;}[_0x276b64(0x17d)](_0x464777){const _0x3fb3ac=_0x276b64;return{'id':_0x464777['id'],'threadId':_0x464777[_0x3fb3ac(0x15e)],'ref':_0x464777[_0x3fb3ac(0x14c)]};}};g=x([_(0x0,c[_0x276b64(0x16b)](P[_0x276b64(0x13e)])),_(0x1,c[_0x276b64(0x16b)](c[_0x276b64(0x134)])),_(0x2,c['Inject'](b[_0x276b64(0x154)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x4d1fc7,_0x4f56c6,_0x14361d,_0x12ac72)=>{const _0x589b0d=_0x276b64;for(var _0x43328b=_0x12ac72>0x1?void 0x0:_0x12ac72?H(_0x4f56c6,_0x14361d):_0x4f56c6,_0x511d53=_0x4d1fc7[_0x589b0d(0x18b)]-0x1,_0x5d0104;_0x511d53>=0x0;_0x511d53--)(_0x5d0104=_0x4d1fc7[_0x511d53])&&(_0x43328b=_0x5d0104(_0x43328b)||_0x43328b);return _0x43328b;},y=(_0x2e12eb,_0x264d29)=>(_0x51627b,_0x5e65df)=>_0x264d29(_0x51627b,_0x5e65df,_0x2e12eb);let C=class extends c[_0x276b64(0x13f)]{constructor(_0x498b50,_0x38db6b){const _0x14504c=_0x276b64;super(),this['_threadCommentDataSourceService']=_0x498b50,this[_0x14504c(0x171)]=_0x38db6b,this['_initDataSource']();}[_0x276b64(0x188)](){const _0x196668=_0x276b64;this[_0x196668(0x174)]['dataSource']=this[_0x196668(0x171)],this[_0x196668(0x174)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x276b64(0x164)]),y(0x1,c[_0x276b64(0x16b)](g))],C);var F=Object[_0x276b64(0x143)],L=Object[_0x276b64(0x150)],Z=(_0x446fb1,_0x455b41,_0x46d16a)=>_0x455b41 in _0x446fb1?F(_0x446fb1,_0x455b41,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46d16a}):_0x446fb1[_0x455b41]=_0x46d16a,W=(_0x4e3bea,_0x246bb0,_0x21d70b,_0xde0605)=>{const _0x4a3925=_0x276b64;for(var _0x178c97=_0xde0605>0x1?void 0x0:_0xde0605?L(_0x246bb0,_0x21d70b):_0x246bb0,_0x54ea56=_0x4e3bea[_0x4a3925(0x18b)]-0x1,_0xd88092;_0x54ea56>=0x0;_0x54ea56--)(_0xd88092=_0x4e3bea[_0x54ea56])&&(_0x178c97=_0xd88092(_0x178c97)||_0x178c97);return _0x178c97;},O=(_0x1996b3,_0x4f9ef8)=>(_0x24ade2,_0x13e868)=>_0x4f9ef8(_0x24ade2,_0x13e868,_0x1996b3),N=(_0x47c54e,_0x51b69c,_0x5c60ab)=>Z(_0x47c54e,typeof _0x51b69c!=_0x276b64(0x157)?_0x51b69c+'':_0x51b69c,_0x5c60ab);exports[_0x276b64(0x152)]=class extends c[_0x276b64(0x17e)]{constructor(_0x32a96b=D,_0x3e2e1a,_0xb13c4a){const _0x4ced2d=_0x276b64;super(),this[_0x4ced2d(0x187)]=_0x32a96b,this[_0x4ced2d(0x146)]=_0x3e2e1a,this[_0x4ced2d(0x163)]=_0xb13c4a;const {..._0x393181}=c[_0x4ced2d(0x128)]({},D,this[_0x4ced2d(0x187)]);this[_0x4ced2d(0x163)][_0x4ced2d(0x18f)](q,_0x393181);}[_0x276b64(0x141)](){const _0x4946d9=_0x276b64;[[g],[C],[p]][_0x4946d9(0x156)](_0x2e2cf5=>{const _0x18cc2e=_0x4946d9;this[_0x18cc2e(0x146)][_0x18cc2e(0x127)](_0x2e2cf5);});}[_0x276b64(0x14d)](){const _0x58a386=_0x276b64;this[_0x58a386(0x146)][_0x58a386(0x181)](C),this[_0x58a386(0x146)]['get'](p);}},N(exports[_0x276b64(0x152)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x276b64(0x161),c[_0x276b64(0x190)][_0x276b64(0x133)]),exports[_0x276b64(0x152)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x276b64(0x159)],T['UniverLicensePlugin']),O(0x1,c[_0x276b64(0x16b)](c[_0x276b64(0x189)])),O(0x2,c[_0x276b64(0x12e)])],exports[_0x276b64(0x152)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3e3063=_0x5d05;(function(_0x181d35,_0x38c2c1){const _0x39e4c0=_0x5d05,_0x2fb5a6=_0x181d35();while(!![]){try{const _0x52afaa=-parseInt(_0x39e4c0(0xae))/0x1+-parseInt(_0x39e4c0(0xd9))/0x2+-parseInt(_0x39e4c0(0x9b))/0x3+parseInt(_0x39e4c0(0xaa))/0x4*(-parseInt(_0x39e4c0(0xc6))/0x5)+-parseInt(_0x39e4c0(0xf8))/0x6+parseInt(_0x39e4c0(0xc8))/0x7*(-parseInt(_0x39e4c0(0x9e))/0x8)+parseInt(_0x39e4c0(0xb1))/0x9;if(_0x52afaa===_0x38c2c1)break;else _0x2fb5a6['push'](_0x2fb5a6['shift']());}catch(_0x319fda){_0x2fb5a6['push'](_0x2fb5a6['shift']());}}}(_0x161f,0x8b147));import{CommentService as _0x2ae19a,CollaborationSessionService as _0x546d0e,UniverCollaborationClientPlugin as _0xd81258}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3bfefe}from'@univerjs-pro/license';import{dayjs as _0x233c71,UserManagerService as _0xcbbfc9,Inject as _0x581980,Injector as _0x297177,Disposable as _0x452cc5,CustomRangeType as _0x174fbc,UniverInstanceType as _0x4fb242,DependentOn as _0x24248f,IConfigService as _0x4c482e,Plugin as _0x5b2b83,merge as _0x14f159}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x235652}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xc0f816,IThreadCommentDataSourceService as _0x18421b}from'@univerjs/thread-comment';import{bufferTime as _0x28eb77}from'rxjs';import{HTTPService as _0x10503e}from'@univerjs/network';const W=_0x3e3063(0xad);var I=(_0x2cee57=>(_0x2cee57[_0x2cee57[_0x3e3063(0xe9)]=0x0]=_0x3e3063(0xe9),_0x2cee57[_0x2cee57['Solved']=0x1]=_0x3e3063(0xdb),_0x2cee57[_0x2cee57[_0x3e3063(0xf2)]=-0x1]=_0x3e3063(0xf2),_0x2cee57))(I||{}),v=(_0xa2ba69=>(_0xa2ba69[_0xa2ba69['Unknown']=0x0]='Unknown',_0xa2ba69[_0xa2ba69[_0x3e3063(0xf9)]=0x1]=_0x3e3063(0xf9),_0xa2ba69[_0xa2ba69[_0x3e3063(0xdf)]=0x2]=_0x3e3063(0xdf),_0xa2ba69[_0xa2ba69[_0x3e3063(0xc0)]=0x3]=_0x3e3063(0xc0),_0xa2ba69[_0xa2ba69[_0x3e3063(0xf1)]=0x4]=_0x3e3063(0xf1),_0xa2ba69[_0xa2ba69[_0x3e3063(0xab)]=0x5]='Solve',_0xa2ba69[_0xa2ba69[_0x3e3063(0xf2)]=-0x1]=_0x3e3063(0xf2),_0xa2ba69))(v||{});const D=_0x354ebb=>_0x233c71(new Date(+_0x354ebb))[_0x3e3063(0xe0)](_0x3e3063(0xda)),B=async(_0x3838be,_0x3defd3)=>{const _0x33fcc2=_0x3e3063,_0xa17e26=_0x3838be[_0x33fcc2(0x99)](_0xcbbfc9),_0x3cddb5=_0x3838be['get'](_0x10503e);_0x3defd3['forEach'](_0x23e35f=>{const _0x3ca528=_0x33fcc2;_0xa17e26[_0x3ca528(0xe1)](_0x23e35f)&&_0x3defd3[_0x3ca528(0xe8)](_0x23e35f);}),_0x3defd3[_0x33fcc2(0xe3)]&&(await _0x3cddb5[_0x33fcc2(0x99)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3defd3]}}))[_0x33fcc2(0xb4)][_0x33fcc2(0x9d)][_0x33fcc2(0xc2)](_0x142f3d=>{const _0x99b6df=_0x33fcc2;_0x142f3d&&_0xa17e26[_0x99b6df(0xa6)](_0x142f3d);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x402f09,_0x37468a,_0x19622b,_0x3ecf9f)=>{const _0x3e30d4=_0x3e3063;for(var _0x337f29=_0x3ecf9f>0x1?void 0x0:_0x3ecf9f?K(_0x37468a,_0x19622b):_0x37468a,_0x2135d2=_0x402f09[_0x3e30d4(0xac)]-0x1,_0x5613a7;_0x2135d2>=0x0;_0x2135d2--)(_0x5613a7=_0x402f09[_0x2135d2])&&(_0x337f29=_0x5613a7(_0x337f29)||_0x337f29);return _0x337f29;},p=(_0x24e745,_0x1d7f1a)=>(_0x218dab,_0x3cc6c9)=>_0x1d7f1a(_0x218dab,_0x3cc6c9,_0x24e745);let S=class extends _0x452cc5{constructor(_0x34c569,_0x4d925a,_0x3bfb77,_0x2154b6){const _0x542dc7=_0x3e3063;super(),this[_0x542dc7(0xb3)]=_0x34c569,this[_0x542dc7(0xf5)]=_0x4d925a,this[_0x542dc7(0xce)]=_0x3bfb77,this[_0x542dc7(0xd8)]=_0x2154b6,this[_0x542dc7(0xf7)](),this[_0x542dc7(0xd1)]();}['_initUserSync'](){const _0x4892a0=_0x3e3063;this[_0x4892a0(0xd3)](this[_0x4892a0(0xf5)]['commentUpdate$'][_0x4892a0(0xcc)](_0x28eb77(0x10))['subscribe'](_0x1759a6=>{const _0x23048b=_0x4892a0,_0x3dad59=new Set();_0x1759a6[_0x23048b(0xc2)](_0x1d2ccf=>{const _0x231b4b=_0x23048b;switch(_0x1d2ccf[_0x231b4b(0xdc)]){case _0x231b4b(0xee):{const _0x3d553d=_0x1d2ccf[_0x231b4b(0xbb)][_0x231b4b(0xe2)];_0x3dad59['add'](_0x3d553d);break;}}}),B(this[_0x23048b(0xd8)],_0x3dad59);}));}[_0x3e3063(0xf7)](){const _0x124f23=_0x3e3063;this[_0x124f23(0xd3)](this['_commentService'][_0x124f23(0xa1)]['subscribe'](async _0xb8b3b0=>{const _0x28cc5d=_0x124f23;var _0x4367a4,_0x2bd259,_0x2b9ace,_0x102f4f;const _0x52b3eb=(_0x4367a4=this[_0x28cc5d(0xf5)][_0x28cc5d(0xf6)](_0xb8b3b0[_0x28cc5d(0xb0)])[_0x28cc5d(0xd4)](_0x45d2ab=>_0x45d2ab[_0x28cc5d(0xcb)]===_0xb8b3b0['threadId']))==null?void 0x0:_0x4367a4[_0x28cc5d(0xc9)];if(!_0x52b3eb)return;const {unitId:_0x4b0c81,subUnitId:_0x530327}=_0x52b3eb;switch(_0xb8b3b0[_0x28cc5d(0xb2)]&&this['_userService']['addUser'](_0xb8b3b0['user']),_0xb8b3b0[_0x28cc5d(0xdc)]){case v[_0x28cc5d(0xf9)]:break;case v['Reply']:{this[_0x28cc5d(0xf5)]['addComment'](_0x4b0c81,_0x530327,{'unitId':_0x4b0c81,'subUnitId':_0x530327,'ref':'','id':_0xb8b3b0['replyId'],'dT':D(+_0xb8b3b0[_0x28cc5d(0xb6)]),'threadId':_0xb8b3b0[_0x28cc5d(0xcb)],'personId':(_0x2b9ace=(_0x2bd259=_0xb8b3b0['user'])==null?void 0x0:_0x2bd259[_0x28cc5d(0xfb)])!=null?_0x2b9ace:_0xb8b3b0[_0x28cc5d(0xe6)],'text':JSON[_0x28cc5d(0xbe)](_0xb8b3b0['content']),'parentId':_0x52b3eb['id']});break;}case v['Delete']:{const _0xbd384=this[_0x28cc5d(0xf5)][_0x28cc5d(0xa3)](_0x4b0c81,_0x530327,_0xb8b3b0[_0x28cc5d(0xca)]);_0xbd384&&_0xbd384[_0x28cc5d(0xbd)]&&this[_0x28cc5d(0xf5)]['deleteComment'](_0x4b0c81,_0x530327,_0xb8b3b0[_0x28cc5d(0xca)]);break;}case v[_0x28cc5d(0xc0)]:{this[_0x28cc5d(0xf5)]['updateComment'](_0x4b0c81,_0x530327,{'commentId':_0xb8b3b0[_0x28cc5d(0xca)],'text':JSON['parse'](_0xb8b3b0[_0x28cc5d(0xaf)])});break;}case v[_0x28cc5d(0xab)]:{const _0x1c66fa=(_0x102f4f=this[_0x28cc5d(0xf5)]['getUnit'](_0xb8b3b0[_0x28cc5d(0xb0)])['find'](_0x1dce21=>_0x1dce21['threadId']===_0xb8b3b0['threadId']))==null?void 0x0:_0x102f4f[_0x28cc5d(0xc9)];_0x1c66fa&&this[_0x28cc5d(0xf5)][_0x28cc5d(0xb7)](_0x4b0c81,_0x530327,_0x1c66fa['id'],_0xb8b3b0[_0x28cc5d(0xef)]===I[_0x28cc5d(0xdb)]);break;}}}));}};S=V([p(0x0,_0x581980(_0x2ae19a)),p(0x1,_0x581980(_0xc0f816)),p(0x2,_0x581980(_0xcbbfc9)),p(0x3,_0x581980(_0x297177))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x409203,_0x2572aa,_0x68412d,_0x2557b8)=>{const _0x2f8bb8=_0x3e3063;for(var _0x16b346=_0x2557b8>0x1?void 0x0:_0x2557b8?k(_0x2572aa,_0x68412d):_0x2572aa,_0x13e81f=_0x409203[_0x2f8bb8(0xac)]-0x1,_0x3fed5d;_0x13e81f>=0x0;_0x13e81f--)(_0x3fed5d=_0x409203[_0x13e81f])&&(_0x16b346=_0x3fed5d(_0x16b346)||_0x16b346);return _0x16b346;},_=(_0x1b8523,_0x39d5fe)=>(_0x331c7e,_0x4ae3e3)=>_0x39d5fe(_0x331c7e,_0x4ae3e3,_0x1b8523);function X(_0x596d9f,_0x5a1383){const _0x37434f=_0x3e3063,_0x1ba820=_0x596d9f[_0x37434f(0xec)][0x0];return{..._0x5a1383,'id':_0x1ba820['replyId'],'resolved':_0x596d9f[_0x37434f(0xef)]===0x1,'dT':D(_0x1ba820[_0x37434f(0xb6)]),'personId':_0x1ba820['userId'],'threadId':_0x1ba820[_0x37434f(0xcb)]};}function ee(_0x90e90c,_0x4b99e4,_0x4d234b){const _0x5776ba=_0x3e3063;var _0x1ecda4,_0x1e20e8;if(((_0x1e20e8=(_0x1ecda4=_0x90e90c==null?void 0x0:_0x90e90c[_0x5776ba(0xec)])==null?void 0x0:_0x1ecda4[_0x5776ba(0xac)])!=null?_0x1e20e8:0x0)>0x0){const _0x5b8eab=(_0x3459d8,_0x51d281)=>({'id':_0x3459d8[_0x5776ba(0xca)],'threadId':_0x3459d8[_0x5776ba(0xcb)],'dT':D(_0x3459d8[_0x5776ba(0xb6)]),'personId':_0x3459d8['userId'],'resolved':_0x90e90c[_0x5776ba(0xef)]===I['Solved'],'unitId':_0x4b99e4,'subUnitId':_0x4d234b,'text':JSON[_0x5776ba(0xbe)](_0x3459d8['content']),'parentId':_0x51d281}),_0xd37200=_0x5b8eab(_0x90e90c[_0x5776ba(0xec)][0x0]);return{..._0xd37200,'children':_0x90e90c['replies'][_0x5776ba(0xd0)](0x1)[_0x5776ba(0xb5)](_0x4502f4=>_0x5b8eab(_0x4502f4,_0xd37200['id']))};}return null;}let f=class{constructor(_0x4a10ed,_0x13718a,_0x3adc20,_0x323972){const _0x389e59=_0x3e3063;this[_0x389e59(0xf0)]=_0x4a10ed,this['_userService']=_0x13718a,this[_0x389e59(0xc7)]=_0x3adc20,this[_0x389e59(0xd8)]=_0x323972;}async['addComment'](_0x14f5c5){const _0x1ab8eb=_0x3e3063;var _0x23f1f5,_0x518166;const {parentId:_0xb5d8eb,unitId:_0x3a481e,text:_0x23098a,threadId:_0x152035}=_0x14f5c5,_0x5a228e=(_0x518166=(_0x23f1f5=_0x23098a[_0x1ab8eb(0xa0)])==null?void 0x0:_0x23f1f5[_0x1ab8eb(0xa7)](_0x791eb4=>_0x791eb4['rangeType']===_0x174fbc[_0x1ab8eb(0xf3)])['map'](_0x21bac0=>_0x21bac0['rangeId']))!=null?_0x518166:[],_0x31f663=JSON['stringify'](_0x23098a),_0x360891=(await this[_0x1ab8eb(0xc7)][_0x1ab8eb(0xd5)](_0x3a481e))[_0x1ab8eb(0xed)]();if(_0xb5d8eb){const _0x9701ea={'memberId':_0x360891,'unitId':_0x3a481e,'content':_0x31f663,'mention':_0x5a228e,'threadId':_0x152035},_0x2f7259=(await this[_0x1ab8eb(0xf0)]['post'](_0x1ab8eb(0xe5)+_0x3a481e+_0x1ab8eb(0xf4),{'body':_0x9701ea}))[_0x1ab8eb(0xb4)][_0x1ab8eb(0xd6)];return{..._0x14f5c5,'id':_0x2f7259[_0x1ab8eb(0xca)],'dT':_0x233c71(+_0x2f7259[_0x1ab8eb(0xb6)])['format'](_0x1ab8eb(0xda)),'personId':_0x2f7259['userId']};}else{const _0x1106cc={'memberId':_0x360891,'unitId':_0x3a481e,'content':_0x31f663,'mention':_0x5a228e},_0x1032d8=await this[_0x1ab8eb(0xf0)][_0x1ab8eb(0xbc)](_0x1ab8eb(0xe5)+_0x3a481e+'/add',{'body':_0x1106cc});return X(_0x1032d8[_0x1ab8eb(0xb4)][_0x1ab8eb(0xcd)],_0x14f5c5);}}async[_0x3e3063(0xcf)](_0x367eb2){const _0x29f7d8=_0x3e3063;var _0xff9340,_0x36c874;const {text:_0x1f25bd,unitId:_0x2fa69a}=_0x367eb2,_0x11f7f3=(_0x36c874=(_0xff9340=_0x1f25bd[_0x29f7d8(0xa0)])==null?void 0x0:_0xff9340[_0x29f7d8(0xa7)](_0x208f87=>_0x208f87[_0x29f7d8(0xe4)]===_0x174fbc[_0x29f7d8(0xf3)])[_0x29f7d8(0xb5)](_0x2ddce5=>_0x2ddce5[_0x29f7d8(0xe7)]))!=null?_0x36c874:[],_0x5279f9=JSON[_0x29f7d8(0xa5)](_0x1f25bd),_0x1664b2=_0x367eb2[_0x29f7d8(0xcb)],_0x387218=_0x367eb2['id'],_0x743ae7={'memberId':(await this['_sessionService'][_0x29f7d8(0xd5)](_0x2fa69a))[_0x29f7d8(0xed)](),'unitId':_0x2fa69a,'threadId':_0x1664b2,'mention':_0x11f7f3,'content':_0x5279f9,'replyId':_0x387218},_0x554dcd=await this[_0x29f7d8(0xf0)][_0x29f7d8(0xbc)](_0x29f7d8(0xe5)+_0x2fa69a+_0x29f7d8(0x9a),{'body':_0x743ae7});return!_0x554dcd[_0x29f7d8(0xb4)][_0x29f7d8(0xeb)]||_0x554dcd[_0x29f7d8(0xb4)]['error'][_0x29f7d8(0x9f)]===0x1;}async[_0x3e3063(0xb7)](_0x40178d){const _0x27504b=_0x3e3063,{unitId:_0x6ff787}=_0x40178d,_0x247c34=_0x40178d[_0x27504b(0xcb)],_0x4f20d0={'memberId':this[_0x27504b(0xce)][_0x27504b(0xb8)]()[_0x27504b(0xfb)],'unitId':_0x6ff787,'threadId':_0x247c34,'solved':_0x40178d[_0x27504b(0xa8)]?I[_0x27504b(0xdb)]:I['OpenOrReOpen']},_0x318d25=await this['_httpService'][_0x27504b(0xbc)](_0x27504b(0xe5)+_0x6ff787+'/solved',{'body':_0x4f20d0});return!_0x318d25[_0x27504b(0xb4)]['error']||_0x318d25[_0x27504b(0xb4)][_0x27504b(0xeb)]['code']===0x1;}async['deleteComment'](_0x1c8ba4,_0x18127f,_0x4bbb96,_0x98ac7){const _0x298bc8=_0x3e3063,_0x577425={'memberId':(await this['_sessionService'][_0x298bc8(0xd5)](_0x1c8ba4))[_0x298bc8(0xed)](),'threadId':_0x4bbb96,'replyId':_0x98ac7,'unitId':_0x1c8ba4},_0x50dd7a=await this[_0x298bc8(0xf0)][_0x298bc8(0xbc)]('/universer-api/comment/unit/'+_0x1c8ba4+_0x298bc8(0xc3),{'body':_0x577425});return!_0x50dd7a['body'][_0x298bc8(0xeb)]||_0x50dd7a[_0x298bc8(0xb4)][_0x298bc8(0xeb)][_0x298bc8(0x9f)]===0x1;}async['listComments'](_0xd5126c,_0x2e9f41,_0x472aa3){const _0x349b05=_0x3e3063,_0x194adf={'unitId':_0xd5126c,'threadId':_0x472aa3},_0x247e57=await this[_0x349b05(0xf0)][_0x349b05(0xbc)](_0x349b05(0xe5)+_0xd5126c+_0x349b05(0x98),{'body':_0x194adf}),_0x4b7204=_0x472aa3[_0x349b05(0xb5)](_0x5d583f=>ee(_0x247e57[_0x349b05(0xb4)][_0x349b05(0xbf)][_0x5d583f],_0xd5126c,_0x2e9f41))[_0x349b05(0xa7)](Boolean);return Object[_0x349b05(0xde)](_0x247e57[_0x349b05(0xb4)][_0x349b05(0x9d)])[_0x349b05(0xc2)](_0x15bf68=>{const _0x92e2d4=_0x349b05;this[_0x92e2d4(0xce)][_0x92e2d4(0xa6)](_0x15bf68);}),_0x4b7204;}['saveCommentToSnapshot'](_0x3b666b){const _0x57e205=_0x3e3063;return{'id':_0x3b666b['id'],'threadId':_0x3b666b[_0x57e205(0xcb)],'ref':_0x3b666b[_0x57e205(0xc1)]};}};f=Q([_(0x0,_0x581980(_0x10503e)),_(0x1,_0x581980(_0xcbbfc9)),_(0x2,_0x581980(_0x546d0e)),_(0x3,_0x581980(_0x297177))],f);var re=Object[_0x3e3063(0xc4)],te=(_0x578425,_0x46c6a,_0x1f9daf,_0x522fe7)=>{const _0x1b5f22=_0x3e3063;for(var _0x5ef6b9=_0x522fe7>0x1?void 0x0:_0x522fe7?re(_0x46c6a,_0x1f9daf):_0x46c6a,_0x59f957=_0x578425[_0x1b5f22(0xac)]-0x1,_0x69abe3;_0x59f957>=0x0;_0x59f957--)(_0x69abe3=_0x578425[_0x59f957])&&(_0x5ef6b9=_0x69abe3(_0x5ef6b9)||_0x5ef6b9);return _0x5ef6b9;},N=(_0x231139,_0x5d2f66)=>(_0x3a273e,_0x5b8980)=>_0x5d2f66(_0x3a273e,_0x5b8980,_0x231139);let g=class extends _0x452cc5{constructor(_0x41e980,_0x3218e4){const _0x2e5f83=_0x3e3063;super(),this[_0x2e5f83(0xa2)]=_0x41e980,this[_0x2e5f83(0x9c)]=_0x3218e4,this[_0x2e5f83(0xdd)]();}[_0x3e3063(0xdd)](){const _0x2f3b45=_0x3e3063;this[_0x2f3b45(0xa2)][_0x2f3b45(0xc5)]=this[_0x2f3b45(0x9c)],this['_threadCommentDataSourceService'][_0x2f3b45(0xa4)]=!0x1;}};g=te([N(0x0,_0x18421b),N(0x1,_0x581980(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x27f80e,_0x1265f7,_0x5d4384)=>_0x1265f7 in _0x27f80e?se(_0x27f80e,_0x1265f7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d4384}):_0x27f80e[_0x1265f7]=_0x5d4384,ie=(_0x2f86f4,_0x1dd9c1,_0x18d511,_0x1c7dd3)=>{const _0x1d54a1=_0x3e3063;for(var _0x26a53a=_0x1c7dd3>0x1?void 0x0:_0x1c7dd3?oe(_0x1dd9c1,_0x18d511):_0x1dd9c1,_0x237d90=_0x2f86f4[_0x1d54a1(0xac)]-0x1,_0x24167d;_0x237d90>=0x0;_0x237d90--)(_0x24167d=_0x2f86f4[_0x237d90])&&(_0x26a53a=_0x24167d(_0x26a53a)||_0x26a53a);return _0x26a53a;},w=(_0x1b9416,_0x31fa0a)=>(_0x535252,_0x2c42bc)=>_0x31fa0a(_0x535252,_0x2c42bc,_0x1b9416),$=(_0xe8a59,_0x1ef163,_0x2ec0a0)=>ne(_0xe8a59,typeof _0x1ef163!=_0x3e3063(0xb9)?_0x1ef163+'':_0x1ef163,_0x2ec0a0);function _0x161f(){const _0x5608b6=['addUser','filter','resolved','pluginName','855548tnObcc','Solve','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','740463dtFhWV','content','unitId','38795211hMhRqO','user','_commentService','body','map','createTimestamp','resolveComment','getCurrentUser','symbol','UNIVER_UNKNOWN','payload','post','parentId','parse','comments','Edit','ref','forEach','/delete','getOwnPropertyDescriptor','dataSource','5ufWpJH','_sessionService','60620jEXToI','root','replyId','threadId','pipe','comment','_userService','updateComment','slice','_initUserSync','onStarting','disposeWithMe','find','requireSession','reply','_configService','_injector','1997820dskDVm','YYYY/MM/DD\x20HH:mm','Solved','type','_initDataSource','values','Reply','format','getUser','personId','size','rangeType','/universer-api/comment/unit/','userId','rangeId','delete','OpenOrReOpen','_config','error','replies','getMemberID','add','solved','_httpService','Delete','UNRECOGNIZED','COMMENT','/reply','_threadCommentModel','getUnit','_init','2675250sumqAv','Add','setConfig','userID','/list','get','/edit','1713099AGWZFT','_threadCommentDataSource','users','712DVMhbx','code','customRanges','commentUpdate$','_threadCommentDataSourceService','getComment','syncUpdateMutationToColla','stringify'];_0x161f=function(){return _0x5608b6;};return _0x161f();}let b=class extends _0x5b2b83{constructor(_0x19fdc0=M,_0x1b2c8b,_0x288620){const _0x16a92e=_0x3e3063;super(),this[_0x16a92e(0xea)]=_0x19fdc0,this[_0x16a92e(0xd8)]=_0x1b2c8b,this[_0x16a92e(0xd7)]=_0x288620;const {..._0x25a42a}=_0x14f159({},M,this[_0x16a92e(0xea)]);this[_0x16a92e(0xd7)][_0x16a92e(0xfa)](z,_0x25a42a);}[_0x3e3063(0xd2)](){const _0x2d2497=_0x3e3063;[[f],[g],[S]][_0x2d2497(0xc2)](_0x592ed9=>{const _0x28d813=_0x2d2497;this[_0x28d813(0xd8)][_0x28d813(0xee)](_0x592ed9);});}['onReady'](){const _0x411eb6=_0x3e3063;this[_0x411eb6(0xd8)]['get'](g),this[_0x411eb6(0xd8)]['get'](S);}};$(b,_0x3e3063(0xa9),W),$(b,_0x3e3063(0xdc),_0x4fb242[_0x3e3063(0xba)]),b=ie([_0x24248f(_0x235652,_0xd81258,_0x3bfefe),w(0x1,_0x581980(_0x297177)),w(0x2,_0x4c482e)],b);function _0x5d05(_0x12b74a,_0x29256a){const _0x161f7b=_0x161f();return _0x5d05=function(_0x5d055c,_0x2f8984){_0x5d055c=_0x5d055c-0x98;let _0x594349=_0x161f7b[_0x5d055c];return _0x594349;},_0x5d05(_0x12b74a,_0x29256a);}export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x1a85d3=_0x2d1b;(function(_0x289e89,_0x47eec8){const _0x52a82d=_0x2d1b,_0x46226d=_0x289e89();while(!![]){try{const _0x313526=parseInt(_0x52a82d(0x10f))/0x1+parseInt(_0x52a82d(0xdf))/0x2+-parseInt(_0x52a82d(0x142))/0x3+-parseInt(_0x52a82d(0x136))/0x4+parseInt(_0x52a82d(0x122))/0x5+parseInt(_0x52a82d(0x10b))/0x6*(parseInt(_0x52a82d(0x112))/0x7)+-parseInt(_0x52a82d(0x144))/0x8;if(_0x313526===_0x47eec8)break;else _0x46226d['push'](_0x46226d['shift']());}catch(_0x120b6e){_0x46226d['push'](_0x46226d['shift']());}}}(_0x20de,0xed09e));import{CommentService as _0x3d7d33,CollaborationSessionService as _0x1c9c03,UniverCollaborationClientPlugin as _0x5bc77f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1ee06d}from'@univerjs-pro/license';import{dayjs as _0x3110a3,UserManagerService as _0x19066b,Inject as _0x36880c,Injector as _0x46d240,Disposable as _0x534487,CustomRangeType as _0x27031c,UniverInstanceType as _0x5b317c,DependentOn as _0x7105ba,IConfigService as _0x5be79a,Plugin as _0x24b811,merge as _0x4a61fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x577135}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4207e6,IThreadCommentDataSourceService as _0x13c68c}from'@univerjs/thread-comment';import{bufferTime as _0x4a7e00}from'rxjs';import{HTTPService as _0x11e9ce}from'@univerjs/network';const W=_0x1a85d3(0x101);var I=(_0x534f0e=>(_0x534f0e[_0x534f0e[_0x1a85d3(0xfb)]=0x0]=_0x1a85d3(0xfb),_0x534f0e[_0x534f0e[_0x1a85d3(0x12d)]=0x1]=_0x1a85d3(0x12d),_0x534f0e[_0x534f0e[_0x1a85d3(0x123)]=-0x1]=_0x1a85d3(0x123),_0x534f0e))(I||{}),v=(_0x65e226=>(_0x65e226[_0x65e226[_0x1a85d3(0x115)]=0x0]='Unknown',_0x65e226[_0x65e226['Add']=0x1]=_0x1a85d3(0xfa),_0x65e226[_0x65e226[_0x1a85d3(0xf3)]=0x2]=_0x1a85d3(0xf3),_0x65e226[_0x65e226[_0x1a85d3(0x111)]=0x3]=_0x1a85d3(0x111),_0x65e226[_0x65e226[_0x1a85d3(0x117)]=0x4]=_0x1a85d3(0x117),_0x65e226[_0x65e226['Solve']=0x5]='Solve',_0x65e226[_0x65e226[_0x1a85d3(0x123)]=-0x1]=_0x1a85d3(0x123),_0x65e226))(v||{});const D=_0x80d179=>_0x3110a3(new Date(+_0x80d179))[_0x1a85d3(0x139)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2ebc0a,_0x1d6f24)=>{const _0x3e10ab=_0x1a85d3,_0x39055d=_0x2ebc0a['get'](_0x19066b),_0x7e1cb7=_0x2ebc0a['get'](_0x11e9ce);_0x1d6f24[_0x3e10ab(0xe3)](_0x1e0231=>{const _0x15acd9=_0x3e10ab;_0x39055d[_0x15acd9(0x108)](_0x1e0231)&&_0x1d6f24[_0x15acd9(0x113)](_0x1e0231);}),_0x1d6f24[_0x3e10ab(0x11f)]&&(await _0x7e1cb7[_0x3e10ab(0x11b)](_0x3e10ab(0x132),{'params':{'userIDs':[..._0x1d6f24]}}))[_0x3e10ab(0x147)][_0x3e10ab(0x13c)][_0x3e10ab(0xe3)](_0x542ef1=>{const _0x119d5a=_0x3e10ab;_0x542ef1&&_0x39055d[_0x119d5a(0xf6)](_0x542ef1);});};var K=Object[_0x1a85d3(0x127)],V=(_0x59408f,_0x5c6fdc,_0x13b035,_0x37504c)=>{for(var _0x27429f=_0x37504c>0x1?void 0x0:_0x37504c?K(_0x5c6fdc,_0x13b035):_0x5c6fdc,_0x587469=_0x59408f['length']-0x1,_0x3f369c;_0x587469>=0x0;_0x587469--)(_0x3f369c=_0x59408f[_0x587469])&&(_0x27429f=_0x3f369c(_0x27429f)||_0x27429f);return _0x27429f;},p=(_0x231a0f,_0x5c66ad)=>(_0x4128b3,_0x1d9ee0)=>_0x5c66ad(_0x4128b3,_0x1d9ee0,_0x231a0f);function _0x2d1b(_0xb6167f,_0x39f212){const _0x20de3a=_0x20de();return _0x2d1b=function(_0x2d1b83,_0x3f1c68){_0x2d1b83=_0x2d1b83-0xdf;let _0x297572=_0x20de3a[_0x2d1b83];return _0x297572;},_0x2d1b(_0xb6167f,_0x39f212);}let S=class extends _0x534487{constructor(_0x48c783,_0x214c2d,_0x3a41de,_0x46c212){const _0x237e77=_0x1a85d3;super(),this['_commentService']=_0x48c783,this[_0x237e77(0xec)]=_0x214c2d,this[_0x237e77(0xeb)]=_0x3a41de,this[_0x237e77(0xff)]=_0x46c212,this[_0x237e77(0xe4)](),this['_initUserSync']();}[_0x1a85d3(0x12e)](){const _0x185ba6=_0x1a85d3;this[_0x185ba6(0x13e)](this[_0x185ba6(0xec)][_0x185ba6(0x11e)][_0x185ba6(0x13d)](_0x4a7e00(0x10))[_0x185ba6(0x106)](_0x5175b5=>{const _0x4c69dc=_0x185ba6,_0x52a308=new Set();_0x5175b5[_0x4c69dc(0xe3)](_0x1016ff=>{const _0x24a8c0=_0x4c69dc;switch(_0x1016ff[_0x24a8c0(0x102)]){case _0x24a8c0(0xf5):{const _0x5a66b7=_0x1016ff[_0x24a8c0(0x107)][_0x24a8c0(0x11c)];_0x52a308[_0x24a8c0(0xf5)](_0x5a66b7);break;}}}),B(this['_injector'],_0x52a308);}));}['_init'](){const _0x1d87af=_0x1a85d3;this[_0x1d87af(0x13e)](this[_0x1d87af(0xea)][_0x1d87af(0x11e)][_0x1d87af(0x106)](async _0xd2989d=>{const _0x98aad0=_0x1d87af;var _0x5b4759,_0x51cfb5,_0x28059a,_0x3057f3;const _0x22391c=(_0x5b4759=this['_threadCommentModel'][_0x98aad0(0x13f)](_0xd2989d[_0x98aad0(0x109)])[_0x98aad0(0x121)](_0x3bfbf7=>_0x3bfbf7[_0x98aad0(0x126)]===_0xd2989d[_0x98aad0(0x126)]))==null?void 0x0:_0x5b4759[_0x98aad0(0x124)];if(!_0x22391c)return;const {unitId:_0x15694a,subUnitId:_0x4d6f0a}=_0x22391c;switch(_0xd2989d['user']&&this[_0x98aad0(0xeb)][_0x98aad0(0xf6)](_0xd2989d[_0x98aad0(0x138)]),_0xd2989d[_0x98aad0(0x102)]){case v[_0x98aad0(0xfa)]:break;case v[_0x98aad0(0xf3)]:{this[_0x98aad0(0xec)][_0x98aad0(0x125)](_0x15694a,_0x4d6f0a,{'unitId':_0x15694a,'subUnitId':_0x4d6f0a,'ref':'','id':_0xd2989d['replyId'],'dT':D(+_0xd2989d[_0x98aad0(0x140)]),'threadId':_0xd2989d[_0x98aad0(0x126)],'personId':(_0x28059a=(_0x51cfb5=_0xd2989d[_0x98aad0(0x138)])==null?void 0x0:_0x51cfb5[_0x98aad0(0x10d)])!=null?_0x28059a:_0xd2989d[_0x98aad0(0xe1)],'text':JSON['parse'](_0xd2989d[_0x98aad0(0x133)]),'parentId':_0x22391c['id']});break;}case v[_0x98aad0(0x117)]:{const _0x18c3f6=this[_0x98aad0(0xec)][_0x98aad0(0xf2)](_0x15694a,_0x4d6f0a,_0xd2989d[_0x98aad0(0xe7)]);_0x18c3f6&&_0x18c3f6[_0x98aad0(0x114)]&&this['_threadCommentModel'][_0x98aad0(0xf9)](_0x15694a,_0x4d6f0a,_0xd2989d[_0x98aad0(0xe7)]);break;}case v[_0x98aad0(0x111)]:{this['_threadCommentModel'][_0x98aad0(0x13a)](_0x15694a,_0x4d6f0a,{'commentId':_0xd2989d[_0x98aad0(0xe7)],'text':JSON[_0x98aad0(0xe5)](_0xd2989d['content'])});break;}case v[_0x98aad0(0x12c)]:{const _0x424ae2=(_0x3057f3=this[_0x98aad0(0xec)][_0x98aad0(0x13f)](_0xd2989d[_0x98aad0(0x109)])[_0x98aad0(0x121)](_0x321205=>_0x321205[_0x98aad0(0x126)]===_0xd2989d[_0x98aad0(0x126)]))==null?void 0x0:_0x3057f3[_0x98aad0(0x124)];_0x424ae2&&this[_0x98aad0(0xec)][_0x98aad0(0xfd)](_0x15694a,_0x4d6f0a,_0x424ae2['id'],_0xd2989d[_0x98aad0(0x110)]===I[_0x98aad0(0x12d)]);break;}}}));}};S=V([p(0x0,_0x36880c(_0x3d7d33)),p(0x1,_0x36880c(_0x4207e6)),p(0x2,_0x36880c(_0x19066b)),p(0x3,_0x36880c(_0x46d240))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x1a85d3(0x127)],Q=(_0x23b21b,_0x324fa6,_0x44d7f7,_0x548327)=>{for(var _0x277461=_0x548327>0x1?void 0x0:_0x548327?k(_0x324fa6,_0x44d7f7):_0x324fa6,_0x1237c5=_0x23b21b['length']-0x1,_0x36662b;_0x1237c5>=0x0;_0x1237c5--)(_0x36662b=_0x23b21b[_0x1237c5])&&(_0x277461=_0x36662b(_0x277461)||_0x277461);return _0x277461;},_=(_0x3e5742,_0x55c4ae)=>(_0x472c04,_0x4dae3b)=>_0x55c4ae(_0x472c04,_0x4dae3b,_0x3e5742);function X(_0x43e848,_0x4e6e30){const _0x3e46ea=_0x1a85d3,_0x43d373=_0x43e848['replies'][0x0];return{..._0x4e6e30,'id':_0x43d373[_0x3e46ea(0xe7)],'resolved':_0x43e848[_0x3e46ea(0x110)]===0x1,'dT':D(_0x43d373['createTimestamp']),'personId':_0x43d373['userId'],'threadId':_0x43d373[_0x3e46ea(0x126)]};}function ee(_0x227298,_0xf3b8aa,_0xb01a70){const _0x104545=_0x1a85d3;var _0x49483d,_0x465ba0;if(((_0x465ba0=(_0x49483d=_0x227298==null?void 0x0:_0x227298[_0x104545(0x11d)])==null?void 0x0:_0x49483d[_0x104545(0x104)])!=null?_0x465ba0:0x0)>0x0){const _0xe05321=(_0x5c69c0,_0x5be83c)=>({'id':_0x5c69c0['replyId'],'threadId':_0x5c69c0[_0x104545(0x126)],'dT':D(_0x5c69c0[_0x104545(0x140)]),'personId':_0x5c69c0[_0x104545(0xe1)],'resolved':_0x227298[_0x104545(0x110)]===I[_0x104545(0x12d)],'unitId':_0xf3b8aa,'subUnitId':_0xb01a70,'text':JSON['parse'](_0x5c69c0[_0x104545(0x133)]),'parentId':_0x5be83c}),_0x36c31d=_0xe05321(_0x227298[_0x104545(0x11d)][0x0]);return{..._0x36c31d,'children':_0x227298[_0x104545(0x11d)]['slice'](0x1)['map'](_0x315fdf=>_0xe05321(_0x315fdf,_0x36c31d['id']))};}return null;}let f=class{constructor(_0x2edfac,_0x48e525,_0x24f532,_0x421592){const _0x43efcc=_0x1a85d3;this[_0x43efcc(0x128)]=_0x2edfac,this[_0x43efcc(0xeb)]=_0x48e525,this[_0x43efcc(0x134)]=_0x24f532,this[_0x43efcc(0xff)]=_0x421592;}async[_0x1a85d3(0x125)](_0x2ebdc4){const _0x39b62c=_0x1a85d3;var _0x522b77,_0xbac2ba;const {parentId:_0x28c0ca,unitId:_0xb67edc,text:_0x3989f2,threadId:_0x541324}=_0x2ebdc4,_0x1ab123=(_0xbac2ba=(_0x522b77=_0x3989f2[_0x39b62c(0xe6)])==null?void 0x0:_0x522b77[_0x39b62c(0x13b)](_0x54f014=>_0x54f014['rangeType']===_0x27031c[_0x39b62c(0x103)])[_0x39b62c(0xe2)](_0x25e09e=>_0x25e09e[_0x39b62c(0x11a)]))!=null?_0xbac2ba:[],_0x13ddec=JSON['stringify'](_0x3989f2),_0x5c92bd=(await this[_0x39b62c(0x134)][_0x39b62c(0x12a)](_0xb67edc))[_0x39b62c(0x105)]();if(_0x28c0ca){const _0x47a89f={'memberId':_0x5c92bd,'unitId':_0xb67edc,'content':_0x13ddec,'mention':_0x1ab123,'threadId':_0x541324},_0x356f61=(await this[_0x39b62c(0x128)]['post'](_0x39b62c(0xfe)+_0xb67edc+'/reply',{'body':_0x47a89f}))['body'][_0x39b62c(0x12b)];return{..._0x2ebdc4,'id':_0x356f61[_0x39b62c(0xe7)],'dT':_0x3110a3(+_0x356f61[_0x39b62c(0x140)])[_0x39b62c(0x139)](_0x39b62c(0x130)),'personId':_0x356f61['userId']};}else{const _0x3f01b0={'memberId':_0x5c92bd,'unitId':_0xb67edc,'content':_0x13ddec,'mention':_0x1ab123},_0x3e22ec=await this[_0x39b62c(0x128)]['post'](_0x39b62c(0xfe)+_0xb67edc+_0x39b62c(0xed),{'body':_0x3f01b0});return X(_0x3e22ec[_0x39b62c(0x147)][_0x39b62c(0xf7)],_0x2ebdc4);}}async[_0x1a85d3(0x13a)](_0x2a2815){const _0x347426=_0x1a85d3;var _0x5808cd,_0x2eac58;const {text:_0x174d63,unitId:_0x5360d0}=_0x2a2815,_0x141012=(_0x2eac58=(_0x5808cd=_0x174d63[_0x347426(0xe6)])==null?void 0x0:_0x5808cd[_0x347426(0x13b)](_0x1fbfb8=>_0x1fbfb8[_0x347426(0x118)]===_0x27031c[_0x347426(0x103)])[_0x347426(0xe2)](_0x1a2854=>_0x1a2854[_0x347426(0x11a)]))!=null?_0x2eac58:[],_0x41527d=JSON[_0x347426(0x137)](_0x174d63),_0xc113c1=_0x2a2815[_0x347426(0x126)],_0x4a93f4=_0x2a2815['id'],_0x43f8e2={'memberId':(await this[_0x347426(0x134)][_0x347426(0x12a)](_0x5360d0))[_0x347426(0x105)](),'unitId':_0x5360d0,'threadId':_0xc113c1,'mention':_0x141012,'content':_0x41527d,'replyId':_0x4a93f4},_0x2a20a5=await this[_0x347426(0x128)][_0x347426(0x119)](_0x347426(0xfe)+_0x5360d0+_0x347426(0xe8),{'body':_0x43f8e2});return!_0x2a20a5[_0x347426(0x147)][_0x347426(0xfc)]||_0x2a20a5[_0x347426(0x147)][_0x347426(0xfc)][_0x347426(0x10c)]===0x1;}async[_0x1a85d3(0xfd)](_0x543611){const _0xc29149=_0x1a85d3,{unitId:_0x30c183}=_0x543611,_0x3b9538=_0x543611[_0xc29149(0x126)],_0xbc5058={'memberId':this[_0xc29149(0xeb)]['getCurrentUser']()['userID'],'unitId':_0x30c183,'threadId':_0x3b9538,'solved':_0x543611[_0xc29149(0x12f)]?I[_0xc29149(0x12d)]:I[_0xc29149(0xfb)]},_0x2bc93b=await this[_0xc29149(0x128)][_0xc29149(0x119)](_0xc29149(0xfe)+_0x30c183+_0xc29149(0xf1),{'body':_0xbc5058});return!_0x2bc93b[_0xc29149(0x147)]['error']||_0x2bc93b[_0xc29149(0x147)]['error'][_0xc29149(0x10c)]===0x1;}async[_0x1a85d3(0xf9)](_0x299bab,_0x5171ab,_0x1c9d6e,_0x156c55){const _0x4b191d=_0x1a85d3,_0x24a22e={'memberId':(await this[_0x4b191d(0x134)]['requireSession'](_0x299bab))[_0x4b191d(0x105)](),'threadId':_0x1c9d6e,'replyId':_0x156c55,'unitId':_0x299bab},_0x41bae2=await this[_0x4b191d(0x128)][_0x4b191d(0x119)]('/universer-api/comment/unit/'+_0x299bab+_0x4b191d(0xee),{'body':_0x24a22e});return!_0x41bae2[_0x4b191d(0x147)]['error']||_0x41bae2[_0x4b191d(0x147)]['error'][_0x4b191d(0x10c)]===0x1;}async['listComments'](_0xdc7ee5,_0x30834b,_0x27d8ab){const _0x4845a2=_0x1a85d3,_0x35073f={'unitId':_0xdc7ee5,'threadId':_0x27d8ab},_0x58b4ca=await this[_0x4845a2(0x128)][_0x4845a2(0x119)]('/universer-api/comment/unit/'+_0xdc7ee5+_0x4845a2(0x145),{'body':_0x35073f}),_0x50446a=_0x27d8ab[_0x4845a2(0xe2)](_0x4b3c9d=>ee(_0x58b4ca[_0x4845a2(0x147)][_0x4845a2(0x100)][_0x4b3c9d],_0xdc7ee5,_0x30834b))['filter'](Boolean);return Object[_0x4845a2(0xf8)](_0x58b4ca[_0x4845a2(0x147)]['users'])[_0x4845a2(0xe3)](_0x50d07f=>{const _0x3a094b=_0x4845a2;this[_0x3a094b(0xeb)]['addUser'](_0x50d07f);}),_0x50446a;}[_0x1a85d3(0x10a)](_0x3a84b4){const _0xe98946=_0x1a85d3;return{'id':_0x3a84b4['id'],'threadId':_0x3a84b4[_0xe98946(0x126)],'ref':_0x3a84b4[_0xe98946(0xef)]};}};f=Q([_(0x0,_0x36880c(_0x11e9ce)),_(0x1,_0x36880c(_0x19066b)),_(0x2,_0x36880c(_0x1c9c03)),_(0x3,_0x36880c(_0x46d240))],f);var re=Object[_0x1a85d3(0x127)],te=(_0x4ed896,_0x27388a,_0x4a14b0,_0x4082ec)=>{const _0x1ae47a=_0x1a85d3;for(var _0xb1b420=_0x4082ec>0x1?void 0x0:_0x4082ec?re(_0x27388a,_0x4a14b0):_0x27388a,_0x5d0a70=_0x4ed896[_0x1ae47a(0x104)]-0x1,_0xcff03b;_0x5d0a70>=0x0;_0x5d0a70--)(_0xcff03b=_0x4ed896[_0x5d0a70])&&(_0xb1b420=_0xcff03b(_0xb1b420)||_0xb1b420);return _0xb1b420;},N=(_0x519604,_0x2fe3af)=>(_0x392378,_0x4f7683)=>_0x2fe3af(_0x392378,_0x4f7683,_0x519604);let g=class extends _0x534487{constructor(_0x33855c,_0x907f05){const _0x1ec125=_0x1a85d3;super(),this['_threadCommentDataSourceService']=_0x33855c,this[_0x1ec125(0xe0)]=_0x907f05,this[_0x1ec125(0x135)]();}[_0x1a85d3(0x135)](){const _0x2f500e=_0x1a85d3;this['_threadCommentDataSourceService'][_0x2f500e(0x10e)]=this[_0x2f500e(0xe0)],this[_0x2f500e(0x129)][_0x2f500e(0xf0)]=!0x1;}};g=te([N(0x0,_0x13c68c),N(0x1,_0x36880c(f))],g);var se=Object[_0x1a85d3(0x141)],oe=Object[_0x1a85d3(0x127)],ne=(_0x3d01e1,_0x299ed8,_0x35e490)=>_0x299ed8 in _0x3d01e1?se(_0x3d01e1,_0x299ed8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35e490}):_0x3d01e1[_0x299ed8]=_0x35e490,ie=(_0x4d1a74,_0x4bee53,_0x791324,_0x1b12f5)=>{for(var _0x4310af=_0x1b12f5>0x1?void 0x0:_0x1b12f5?oe(_0x4bee53,_0x791324):_0x4bee53,_0x3c7a97=_0x4d1a74['length']-0x1,_0x95f142;_0x3c7a97>=0x0;_0x3c7a97--)(_0x95f142=_0x4d1a74[_0x3c7a97])&&(_0x4310af=_0x95f142(_0x4310af)||_0x4310af);return _0x4310af;},w=(_0xf851c9,_0x2f2ec8)=>(_0x149187,_0x5353e8)=>_0x2f2ec8(_0x149187,_0x5353e8,_0xf851c9),$=(_0x56b60b,_0x58dada,_0x5765b6)=>ne(_0x56b60b,typeof _0x58dada!=_0x1a85d3(0x116)?_0x58dada+'':_0x58dada,_0x5765b6);let b=class extends _0x24b811{constructor(_0x1ad269=M,_0x3bd138,_0x2f1323){const _0x2f997c=_0x1a85d3;super(),this[_0x2f997c(0x146)]=_0x1ad269,this['_injector']=_0x3bd138,this[_0x2f997c(0xf4)]=_0x2f1323;const {..._0xecd5f8}=_0x4a61fc({},M,this[_0x2f997c(0x146)]);this[_0x2f997c(0xf4)][_0x2f997c(0x148)](z,_0xecd5f8);}[_0x1a85d3(0xe9)](){const _0x52327d=_0x1a85d3;[[f],[g],[S]][_0x52327d(0xe3)](_0xfa948a=>{const _0x577ac6=_0x52327d;this['_injector'][_0x577ac6(0xf5)](_0xfa948a);});}[_0x1a85d3(0x131)](){const _0x446135=_0x1a85d3;this[_0x446135(0xff)][_0x446135(0x11b)](g),this[_0x446135(0xff)][_0x446135(0x11b)](S);}};function _0x20de(){const _0x220762=['/solved','getComment','Reply','_configService','add','addUser','comment','values','deleteComment','Add','OpenOrReOpen','error','resolveComment','/universer-api/comment/unit/','_injector','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','COMMENT','length','getMemberID','subscribe','payload','getUser','unitId','saveCommentToSnapshot','11010MMDcgg','code','userID','dataSource','1064977XmhRFU','solved','Edit','371JHpZQz','delete','parentId','Unknown','symbol','Delete','rangeType','post','rangeId','get','personId','replies','commentUpdate$','size','pluginName','find','6877760GHZfNe','UNRECOGNIZED','root','addComment','threadId','getOwnPropertyDescriptor','_httpService','_threadCommentDataSourceService','requireSession','reply','Solve','Solved','_initUserSync','resolved','YYYY/MM/DD\x20HH:mm','onReady','/universer-api/user/list','content','_sessionService','_initDataSource','4329668MZUEac','stringify','user','format','updateComment','filter','users','pipe','disposeWithMe','getUnit','createTimestamp','defineProperty','669606MZArlT','UNIVER_UNKNOWN','4596848wNBaIy','/list','_config','body','setConfig','626702sToYqd','_threadCommentDataSource','userId','map','forEach','_init','parse','customRanges','replyId','/edit','onStarting','_commentService','_userService','_threadCommentModel','/add','/delete','ref','syncUpdateMutationToColla'];_0x20de=function(){return _0x220762;};return _0x20de();}$(b,_0x1a85d3(0x120),W),$(b,_0x1a85d3(0x102),_0x5b317c[_0x1a85d3(0x143)]),b=ie([_0x7105ba(_0x577135,_0x5bc77f,_0x1ee06d),w(0x1,_0x36880c(_0x46d240)),w(0x2,_0x5be79a)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x33d2ea,_0x33d580){const _0xbe9dc=_0x85dd,_0x9fb67=_0x33d2ea();while(!![]){try{const _0x31b193=-parseInt(_0xbe9dc(0x85))/0x1+-parseInt(_0xbe9dc(0xfa))/0x2*(parseInt(_0xbe9dc(0x9b))/0x3)+-parseInt(_0xbe9dc(0xe2))/0x4+-parseInt(_0xbe9dc(0x101))/0x5+parseInt(_0xbe9dc(0xdf))/0x6+-parseInt(_0xbe9dc(0xae))/0x7*(parseInt(_0xbe9dc(0xd3))/0x8)+-parseInt(_0xbe9dc(0xa1))/0x9*(-parseInt(_0xbe9dc(0xe7))/0xa);if(_0x31b193===_0x33d580)break;else _0x9fb67['push'](_0x9fb67['shift']());}catch(_0x577eeb){_0x9fb67['push'](_0x9fb67['shift']());}}}(_0x205e,0x83a00),function(_0x6b244f,_0x1bb873){const _0x28ecd4=_0x85dd;typeof exports==_0x28ecd4(0xb6)&&typeof module<'u'?_0x1bb873(exports,require(_0x28ecd4(0xbd)),require(_0x28ecd4(0xb3)),require('@univerjs/core'),require(_0x28ecd4(0xf1)),require('@univerjs/thread-comment'),require(_0x28ecd4(0xf3)),require(_0x28ecd4(0xdb))):typeof define=='function'&&define[_0x28ecd4(0xa9)]?define(['exports',_0x28ecd4(0xbd),_0x28ecd4(0xb3),_0x28ecd4(0x100),_0x28ecd4(0xf1),_0x28ecd4(0x105),'rxjs','@univerjs/network'],_0x1bb873):(_0x6b244f=typeof globalThis<'u'?globalThis:_0x6b244f||self,_0x1bb873(_0x6b244f[_0x28ecd4(0xeb)]={},_0x6b244f['UniverProCollaborationClient'],_0x6b244f[_0x28ecd4(0xc0)],_0x6b244f['UniverCore'],_0x6b244f['UniverThreadCommentUi'],_0x6b244f['UniverThreadComment'],_0x6b244f[_0x28ecd4(0xf3)],_0x6b244f[_0x28ecd4(0xde)]));}(this,function(_0x5da505,_0x1413e9,_0x3cd59d,_0x2e6895,_0x2f51f0,_0x53ef5c,_0x10120d,_0x5b5203){'use strict';const _0x5f5102=_0x85dd;const _0x5b2fed=_0x5f5102(0xc9);var _0x63d086=(_0x17df9d=>(_0x17df9d[_0x17df9d[_0x5f5102(0xb4)]=0x0]=_0x5f5102(0xb4),_0x17df9d[_0x17df9d[_0x5f5102(0x8a)]=0x1]=_0x5f5102(0x8a),_0x17df9d[_0x17df9d[_0x5f5102(0xed)]=-0x1]=_0x5f5102(0xed),_0x17df9d))(_0x63d086||{}),_0x4da598=(_0x19474f=>(_0x19474f[_0x19474f[_0x5f5102(0xc2)]=0x0]='Unknown',_0x19474f[_0x19474f[_0x5f5102(0xd8)]=0x1]=_0x5f5102(0xd8),_0x19474f[_0x19474f[_0x5f5102(0x103)]=0x2]='Reply',_0x19474f[_0x19474f[_0x5f5102(0xab)]=0x3]=_0x5f5102(0xab),_0x19474f[_0x19474f[_0x5f5102(0xb7)]=0x4]=_0x5f5102(0xb7),_0x19474f[_0x19474f[_0x5f5102(0xd5)]=0x5]=_0x5f5102(0xd5),_0x19474f[_0x19474f[_0x5f5102(0xed)]=-0x1]='UNRECOGNIZED',_0x19474f))(_0x4da598||{});const _0x511963=_0x1b129f=>_0x2e6895[_0x5f5102(0xc1)](new Date(+_0x1b129f))['format'](_0x5f5102(0xb2)),_0x19ca04=async(_0x325303,_0x304617)=>{const _0x34fcff=_0x5f5102,_0x2e2563=_0x325303['get'](_0x2e6895['UserManagerService']),_0x5d2325=_0x325303[_0x34fcff(0xf5)](_0x5b5203[_0x34fcff(0x8f)]);_0x304617['forEach'](_0x5092a6=>{const _0x20f56b=_0x34fcff;_0x2e2563[_0x20f56b(0xf0)](_0x5092a6)&&_0x304617['delete'](_0x5092a6);}),_0x304617[_0x34fcff(0xfe)]&&(await _0x5d2325[_0x34fcff(0xf5)](_0x34fcff(0xf9),{'params':{'userIDs':[..._0x304617]}}))['body']['users'][_0x34fcff(0xef)](_0xf30412=>{_0xf30412&&_0x2e2563['addUser'](_0xf30412);});};var _0x521bc4=Object[_0x5f5102(0xf4)],_0x59666e=(_0x269ff3,_0x1e3326,_0x4e642a,_0x38ad10)=>{const _0x52dda6=_0x5f5102;for(var _0x1d7457=_0x38ad10>0x1?void 0x0:_0x38ad10?_0x521bc4(_0x1e3326,_0x4e642a):_0x1e3326,_0x2f98cd=_0x269ff3[_0x52dda6(0x88)]-0x1,_0x5d768c;_0x2f98cd>=0x0;_0x2f98cd--)(_0x5d768c=_0x269ff3[_0x2f98cd])&&(_0x1d7457=_0x5d768c(_0x1d7457)||_0x1d7457);return _0x1d7457;},_0x911db4=(_0x41454b,_0x3ff69f)=>(_0x4bf0e1,_0x3dfb63)=>_0x3ff69f(_0x4bf0e1,_0x3dfb63,_0x41454b);let _0xae13ab=class extends _0x2e6895[_0x5f5102(0xe8)]{constructor(_0x2f5f5d,_0x4b2b57,_0x58e1c6,_0x15dc5f){const _0xa5ce9b=_0x5f5102;super(),this[_0xa5ce9b(0xb9)]=_0x2f5f5d,this['_threadCommentModel']=_0x4b2b57,this[_0xa5ce9b(0xc7)]=_0x58e1c6,this['_injector']=_0x15dc5f,this['_init'](),this[_0xa5ce9b(0xa4)]();}[_0x5f5102(0xa4)](){const _0x5e0368=_0x5f5102;this[_0x5e0368(0xee)](this[_0x5e0368(0x9a)][_0x5e0368(0xf6)][_0x5e0368(0xb5)](_0x10120d[_0x5e0368(0xaf)](0x10))[_0x5e0368(0xbb)](_0x99906b=>{const _0x46e483=_0x5e0368,_0x40d480=new Set();_0x99906b[_0x46e483(0xef)](_0x1167c3=>{const _0x21e5bc=_0x46e483;switch(_0x1167c3[_0x21e5bc(0x107)]){case'add':{const _0x1a61a2=_0x1167c3[_0x21e5bc(0xd6)][_0x21e5bc(0xbe)];_0x40d480[_0x21e5bc(0x93)](_0x1a61a2);break;}}}),_0x19ca04(this[_0x46e483(0xa8)],_0x40d480);}));}['_init'](){const _0x5ae45a=_0x5f5102;this[_0x5ae45a(0xee)](this[_0x5ae45a(0xb9)][_0x5ae45a(0xf6)][_0x5ae45a(0xbb)](async _0x2c638d=>{const _0x21dd50=_0x5ae45a;var _0x5e68d1,_0x1d08f3,_0x19cd67,_0x245d0d;const _0x141d46=(_0x5e68d1=this[_0x21dd50(0x9a)]['getUnit'](_0x2c638d['unitId'])[_0x21dd50(0x84)](_0x3de5f3=>_0x3de5f3[_0x21dd50(0xa6)]===_0x2c638d[_0x21dd50(0xa6)]))==null?void 0x0:_0x5e68d1[_0x21dd50(0x9e)];if(!_0x141d46)return;const {unitId:_0x43e1de,subUnitId:_0x256f39}=_0x141d46;switch(_0x2c638d[_0x21dd50(0x87)]&&this[_0x21dd50(0xc7)][_0x21dd50(0xbf)](_0x2c638d[_0x21dd50(0x87)]),_0x2c638d[_0x21dd50(0x107)]){case _0x4da598[_0x21dd50(0xd8)]:break;case _0x4da598['Reply']:{this[_0x21dd50(0x9a)][_0x21dd50(0xba)](_0x43e1de,_0x256f39,{'unitId':_0x43e1de,'subUnitId':_0x256f39,'ref':'','id':_0x2c638d[_0x21dd50(0xb1)],'dT':_0x511963(+_0x2c638d['createTimestamp']),'threadId':_0x2c638d['threadId'],'personId':(_0x19cd67=(_0x1d08f3=_0x2c638d[_0x21dd50(0x87)])==null?void 0x0:_0x1d08f3[_0x21dd50(0x89)])!=null?_0x19cd67:_0x2c638d[_0x21dd50(0xe9)],'text':JSON[_0x21dd50(0x9f)](_0x2c638d[_0x21dd50(0xcc)]),'parentId':_0x141d46['id']});break;}case _0x4da598[_0x21dd50(0xb7)]:{const _0x423de0=this[_0x21dd50(0x9a)][_0x21dd50(0xaa)](_0x43e1de,_0x256f39,_0x2c638d['replyId']);_0x423de0&&_0x423de0[_0x21dd50(0xb8)]&&this[_0x21dd50(0x9a)][_0x21dd50(0xa3)](_0x43e1de,_0x256f39,_0x2c638d[_0x21dd50(0xb1)]);break;}case _0x4da598[_0x21dd50(0xab)]:{this[_0x21dd50(0x9a)][_0x21dd50(0xa2)](_0x43e1de,_0x256f39,{'commentId':_0x2c638d[_0x21dd50(0xb1)],'text':JSON[_0x21dd50(0x9f)](_0x2c638d[_0x21dd50(0xcc)])});break;}case _0x4da598[_0x21dd50(0xd5)]:{const _0x2881e9=(_0x245d0d=this[_0x21dd50(0x9a)]['getUnit'](_0x2c638d[_0x21dd50(0x99)])[_0x21dd50(0x84)](_0x3d59cb=>_0x3d59cb[_0x21dd50(0xa6)]===_0x2c638d[_0x21dd50(0xa6)]))==null?void 0x0:_0x245d0d[_0x21dd50(0x9e)];_0x2881e9&&this[_0x21dd50(0x9a)][_0x21dd50(0x95)](_0x43e1de,_0x256f39,_0x2881e9['id'],_0x2c638d[_0x21dd50(0xa0)]===_0x63d086[_0x21dd50(0x8a)]);break;}}}));}};_0xae13ab=_0x59666e([_0x911db4(0x0,_0x2e6895['Inject'](_0x1413e9[_0x5f5102(0xe4)])),_0x911db4(0x1,_0x2e6895[_0x5f5102(0xd0)](_0x53ef5c[_0x5f5102(0xd2)])),_0x911db4(0x2,_0x2e6895[_0x5f5102(0xd0)](_0x2e6895[_0x5f5102(0x102)])),_0x911db4(0x3,_0x2e6895['Inject'](_0x2e6895[_0x5f5102(0x8e)]))],_0xae13ab);const _0x18ea91=_0x5f5102(0xf2),_0x286515={};var _0xe9f631=Object[_0x5f5102(0xf4)],_0x599685=(_0x386f04,_0x725922,_0x117b64,_0x3e39f7)=>{const _0x136f63=_0x5f5102;for(var _0x42e5c2=_0x3e39f7>0x1?void 0x0:_0x3e39f7?_0xe9f631(_0x725922,_0x117b64):_0x725922,_0x4ad95f=_0x386f04[_0x136f63(0x88)]-0x1,_0xccfcef;_0x4ad95f>=0x0;_0x4ad95f--)(_0xccfcef=_0x386f04[_0x4ad95f])&&(_0x42e5c2=_0xccfcef(_0x42e5c2)||_0x42e5c2);return _0x42e5c2;},_0x3febe2=(_0xd3d001,_0x2e7bcb)=>(_0x50a48b,_0xb770c0)=>_0x2e7bcb(_0x50a48b,_0xb770c0,_0xd3d001);function _0x50aee6(_0x1652b9,_0x301e1d){const _0xfd2bb4=_0x5f5102,_0x4e0d69=_0x1652b9[_0xfd2bb4(0x8b)][0x0];return{..._0x301e1d,'id':_0x4e0d69['replyId'],'resolved':_0x1652b9['solved']===0x1,'dT':_0x511963(_0x4e0d69[_0xfd2bb4(0xd9)]),'personId':_0x4e0d69[_0xfd2bb4(0xe9)],'threadId':_0x4e0d69[_0xfd2bb4(0xa6)]};}function _0x2b3240(_0x4c8e31,_0x431ac6,_0x26f794){const _0x292832=_0x5f5102;var _0x540731,_0x41d910;if(((_0x41d910=(_0x540731=_0x4c8e31==null?void 0x0:_0x4c8e31['replies'])==null?void 0x0:_0x540731['length'])!=null?_0x41d910:0x0)>0x0){const _0x193b53=(_0x24c790,_0x5149c6)=>({'id':_0x24c790[_0x292832(0xb1)],'threadId':_0x24c790[_0x292832(0xa6)],'dT':_0x511963(_0x24c790[_0x292832(0xd9)]),'personId':_0x24c790['userId'],'resolved':_0x4c8e31['solved']===_0x63d086[_0x292832(0x8a)],'unitId':_0x431ac6,'subUnitId':_0x26f794,'text':JSON[_0x292832(0x9f)](_0x24c790[_0x292832(0xcc)]),'parentId':_0x5149c6}),_0x59f767=_0x193b53(_0x4c8e31[_0x292832(0x8b)][0x0]);return{..._0x59f767,'children':_0x4c8e31['replies'][_0x292832(0xc3)](0x1)[_0x292832(0x92)](_0x4919d2=>_0x193b53(_0x4919d2,_0x59f767['id']))};}return null;}let _0x991896=class{constructor(_0x30fcb0,_0x597141,_0x28acd1,_0x33fda1){const _0x84baa1=_0x5f5102;this[_0x84baa1(0xc5)]=_0x30fcb0,this[_0x84baa1(0xc7)]=_0x597141,this['_sessionService']=_0x28acd1,this['_injector']=_0x33fda1;}async['addComment'](_0x4e55b9){const _0x59335f=_0x5f5102;var _0x5a8bc5,_0x340578;const {parentId:_0x4e5aa9,unitId:_0x3dd66d,text:_0x206abe,threadId:_0xf80ee4}=_0x4e55b9,_0x64bf58=(_0x340578=(_0x5a8bc5=_0x206abe['customRanges'])==null?void 0x0:_0x5a8bc5[_0x59335f(0x104)](_0x41882e=>_0x41882e['rangeType']===_0x2e6895['CustomRangeType'][_0x59335f(0xc8)])[_0x59335f(0x92)](_0x20f0cc=>_0x20f0cc[_0x59335f(0xdc)]))!=null?_0x340578:[],_0x199b49=JSON['stringify'](_0x206abe),_0x1241f1=(await this['_sessionService'][_0x59335f(0xe1)](_0x3dd66d))[_0x59335f(0x94)]();if(_0x4e5aa9){const _0x5c667e={'memberId':_0x1241f1,'unitId':_0x3dd66d,'content':_0x199b49,'mention':_0x64bf58,'threadId':_0xf80ee4},_0x1d4ebd=(await this['_httpService']['post'](_0x59335f(0xac)+_0x3dd66d+_0x59335f(0xcd),{'body':_0x5c667e}))[_0x59335f(0x9c)]['reply'];return{..._0x4e55b9,'id':_0x1d4ebd['replyId'],'dT':_0x2e6895[_0x59335f(0xc1)](+_0x1d4ebd['createTimestamp'])[_0x59335f(0xe5)](_0x59335f(0xb2)),'personId':_0x1d4ebd[_0x59335f(0xe9)]};}else{const _0x24f824={'memberId':_0x1241f1,'unitId':_0x3dd66d,'content':_0x199b49,'mention':_0x64bf58},_0x5ba18c=await this[_0x59335f(0xc5)]['post']('/universer-api/comment/unit/'+_0x3dd66d+'/add',{'body':_0x24f824});return _0x50aee6(_0x5ba18c['body'][_0x59335f(0x9d)],_0x4e55b9);}}async[_0x5f5102(0xa2)](_0x53044e){const _0x3be7c3=_0x5f5102;var _0x149f45,_0x2bcadf;const {text:_0x54baf9,unitId:_0x2c8e99}=_0x53044e,_0x577654=(_0x2bcadf=(_0x149f45=_0x54baf9['customRanges'])==null?void 0x0:_0x149f45[_0x3be7c3(0x104)](_0x396853=>_0x396853['rangeType']===_0x2e6895[_0x3be7c3(0xad)][_0x3be7c3(0xc8)])[_0x3be7c3(0x92)](_0x1882cb=>_0x1882cb[_0x3be7c3(0xdc)]))!=null?_0x2bcadf:[],_0xc1d7dd=JSON[_0x3be7c3(0xd1)](_0x54baf9),_0x26c283=_0x53044e['threadId'],_0x431147=_0x53044e['id'],_0x491c04={'memberId':(await this['_sessionService'][_0x3be7c3(0xe1)](_0x2c8e99))[_0x3be7c3(0x94)](),'unitId':_0x2c8e99,'threadId':_0x26c283,'mention':_0x577654,'content':_0xc1d7dd,'replyId':_0x431147},_0x49533a=await this[_0x3be7c3(0xc5)]['post'](_0x3be7c3(0xac)+_0x2c8e99+_0x3be7c3(0x90),{'body':_0x491c04});return!_0x49533a[_0x3be7c3(0x9c)][_0x3be7c3(0x98)]||_0x49533a[_0x3be7c3(0x9c)][_0x3be7c3(0x98)][_0x3be7c3(0xe0)]===0x1;}async['resolveComment'](_0x13fda9){const _0x45b1e2=_0x5f5102,{unitId:_0x4bc708}=_0x13fda9,_0x4e93a9=_0x13fda9[_0x45b1e2(0xa6)],_0x35e556={'memberId':this[_0x45b1e2(0xc7)][_0x45b1e2(0xcf)]()['userID'],'unitId':_0x4bc708,'threadId':_0x4e93a9,'solved':_0x13fda9['resolved']?_0x63d086[_0x45b1e2(0x8a)]:_0x63d086[_0x45b1e2(0xb4)]},_0x239711=await this[_0x45b1e2(0xc5)][_0x45b1e2(0xff)](_0x45b1e2(0xac)+_0x4bc708+_0x45b1e2(0xa5),{'body':_0x35e556});return!_0x239711[_0x45b1e2(0x9c)][_0x45b1e2(0x98)]||_0x239711[_0x45b1e2(0x9c)][_0x45b1e2(0x98)][_0x45b1e2(0xe0)]===0x1;}async['deleteComment'](_0x32f7ab,_0x1e7275,_0x378d11,_0x33bc51){const _0x13bf2d=_0x5f5102,_0x23d1c4={'memberId':(await this[_0x13bf2d(0xfc)][_0x13bf2d(0xe1)](_0x32f7ab))[_0x13bf2d(0x94)](),'threadId':_0x378d11,'replyId':_0x33bc51,'unitId':_0x32f7ab},_0x58e489=await this[_0x13bf2d(0xc5)]['post'](_0x13bf2d(0xac)+_0x32f7ab+_0x13bf2d(0xca),{'body':_0x23d1c4});return!_0x58e489['body'][_0x13bf2d(0x98)]||_0x58e489['body']['error'][_0x13bf2d(0xe0)]===0x1;}async[_0x5f5102(0xc6)](_0x18dfd4,_0x386330,_0xcd52eb){const _0x3a3354=_0x5f5102,_0x2779df={'unitId':_0x18dfd4,'threadId':_0xcd52eb},_0x314c74=await this[_0x3a3354(0xc5)][_0x3a3354(0xff)](_0x3a3354(0xac)+_0x18dfd4+_0x3a3354(0xd7),{'body':_0x2779df}),_0x30c1ff=_0xcd52eb[_0x3a3354(0x92)](_0x5a6094=>_0x2b3240(_0x314c74[_0x3a3354(0x9c)][_0x3a3354(0xcb)][_0x5a6094],_0x18dfd4,_0x386330))[_0x3a3354(0x104)](Boolean);return Object[_0x3a3354(0xbc)](_0x314c74[_0x3a3354(0x9c)]['users'])['forEach'](_0x1a3588=>{const _0x15b522=_0x3a3354;this[_0x15b522(0xc7)]['addUser'](_0x1a3588);}),_0x30c1ff;}[_0x5f5102(0xc4)](_0x4c29c7){const _0x326cb3=_0x5f5102;return{'id':_0x4c29c7['id'],'threadId':_0x4c29c7[_0x326cb3(0xa6)],'ref':_0x4c29c7['ref']};}};_0x991896=_0x599685([_0x3febe2(0x0,_0x2e6895[_0x5f5102(0xd0)](_0x5b5203[_0x5f5102(0x8f)])),_0x3febe2(0x1,_0x2e6895['Inject'](_0x2e6895['UserManagerService'])),_0x3febe2(0x2,_0x2e6895[_0x5f5102(0xd0)](_0x1413e9[_0x5f5102(0x97)])),_0x3febe2(0x3,_0x2e6895['Inject'](_0x2e6895[_0x5f5102(0x8e)]))],_0x991896);var _0x5d5ef2=Object[_0x5f5102(0xf4)],_0x5c62bc=(_0x1a1e1d,_0x5e3b84,_0x5af5a8,_0x5f7c7e)=>{const _0x2736a9=_0x5f5102;for(var _0x28de7c=_0x5f7c7e>0x1?void 0x0:_0x5f7c7e?_0x5d5ef2(_0x5e3b84,_0x5af5a8):_0x5e3b84,_0x3e7b98=_0x1a1e1d[_0x2736a9(0x88)]-0x1,_0x4f1a25;_0x3e7b98>=0x0;_0x3e7b98--)(_0x4f1a25=_0x1a1e1d[_0x3e7b98])&&(_0x28de7c=_0x4f1a25(_0x28de7c)||_0x28de7c);return _0x28de7c;},_0x20107a=(_0x173281,_0x28a20e)=>(_0x51f240,_0x3ced9a)=>_0x28a20e(_0x51f240,_0x3ced9a,_0x173281);let _0x4f6b29=class extends _0x2e6895['Disposable']{constructor(_0x3c6cf3,_0x6b821a){const _0x4c36ea=_0x5f5102;super(),this[_0x4c36ea(0xce)]=_0x3c6cf3,this[_0x4c36ea(0xe3)]=_0x6b821a,this['_initDataSource']();}['_initDataSource'](){const _0x3a99f6=_0x5f5102;this[_0x3a99f6(0xce)]['dataSource']=this[_0x3a99f6(0xe3)],this['_threadCommentDataSourceService'][_0x3a99f6(0x8c)]=!0x1;}};_0x4f6b29=_0x5c62bc([_0x20107a(0x0,_0x53ef5c[_0x5f5102(0xe6)]),_0x20107a(0x1,_0x2e6895[_0x5f5102(0xd0)](_0x991896))],_0x4f6b29);var _0x3a7a97=Object[_0x5f5102(0xfb)],_0x4135eb=Object[_0x5f5102(0xf4)],_0x2da4da=(_0x4fd7a5,_0x46f9cc,_0x30dca0)=>_0x46f9cc in _0x4fd7a5?_0x3a7a97(_0x4fd7a5,_0x46f9cc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x30dca0}):_0x4fd7a5[_0x46f9cc]=_0x30dca0,_0x1903ae=(_0x54256b,_0x507742,_0x6d61bd,_0x1a9611)=>{const _0x267a85=_0x5f5102;for(var _0x427b4b=_0x1a9611>0x1?void 0x0:_0x1a9611?_0x4135eb(_0x507742,_0x6d61bd):_0x507742,_0x14af5c=_0x54256b[_0x267a85(0x88)]-0x1,_0x2bf83e;_0x14af5c>=0x0;_0x14af5c--)(_0x2bf83e=_0x54256b[_0x14af5c])&&(_0x427b4b=_0x2bf83e(_0x427b4b)||_0x427b4b);return _0x427b4b;},_0x2cc29b=(_0x26afad,_0x914dda)=>(_0x5f10a8,_0x389fda)=>_0x914dda(_0x5f10a8,_0x389fda,_0x26afad),_0x5c7682=(_0x207c3d,_0x1e2df9,_0x54c062)=>_0x2da4da(_0x207c3d,typeof _0x1e2df9!='symbol'?_0x1e2df9+'':_0x1e2df9,_0x54c062);_0x5da505[_0x5f5102(0x96)]=class extends _0x2e6895[_0x5f5102(0xec)]{constructor(_0x5832a9=_0x286515,_0x3c9113,_0x12b9cc){const _0x1d03ef=_0x5f5102;super(),this['_config']=_0x5832a9,this[_0x1d03ef(0xa8)]=_0x3c9113,this[_0x1d03ef(0x91)]=_0x12b9cc;const {..._0x31c976}=_0x2e6895[_0x1d03ef(0xf8)]({},_0x286515,this[_0x1d03ef(0xda)]);this[_0x1d03ef(0x91)][_0x1d03ef(0xa7)](_0x18ea91,_0x31c976);}[_0x5f5102(0x8d)](){const _0x5104b1=_0x5f5102;[[_0x991896],[_0x4f6b29],[_0xae13ab]][_0x5104b1(0xef)](_0x5648c7=>{const _0x4b0a55=_0x5104b1;this[_0x4b0a55(0xa8)][_0x4b0a55(0x93)](_0x5648c7);});}['onReady'](){const _0x3b2229=_0x5f5102;this[_0x3b2229(0xa8)][_0x3b2229(0xf5)](_0x4f6b29),this[_0x3b2229(0xa8)][_0x3b2229(0xf5)](_0xae13ab);}},_0x5c7682(_0x5da505[_0x5f5102(0x96)],_0x5f5102(0xfd),_0x5b2fed),_0x5c7682(_0x5da505[_0x5f5102(0x96)],_0x5f5102(0x107),_0x2e6895[_0x5f5102(0x86)][_0x5f5102(0xb0)]),_0x5da505['UniverThreadCommentDataSourcePlugin']=_0x1903ae([_0x2e6895['DependentOn'](_0x2f51f0[_0x5f5102(0x106)],_0x1413e9[_0x5f5102(0xd4)],_0x3cd59d[_0x5f5102(0xdd)]),_0x2cc29b(0x1,_0x2e6895[_0x5f5102(0xd0)](_0x2e6895['Injector'])),_0x2cc29b(0x2,_0x2e6895[_0x5f5102(0xf7)])],_0x5da505[_0x5f5102(0x96)]),Object[_0x5f5102(0xfb)](_0x5da505,Symbol['toStringTag'],{'value':_0x5f5102(0xea)});}));function _0x85dd(_0x10ba06,_0xadd5d){const _0x205e05=_0x205e();return _0x85dd=function(_0x85dd70,_0x90ddec){_0x85dd70=_0x85dd70-0x84;let _0x471334=_0x205e05[_0x85dd70];return _0x471334;},_0x85dd(_0x10ba06,_0xadd5d);}function _0x205e(){const _0x21fd10=['getMemberID','resolveComment','UniverThreadCommentDataSourcePlugin','CollaborationSessionService','error','unitId','_threadCommentModel','69ztDtva','body','comment','root','parse','solved','9pumHUI','updateComment','deleteComment','_initUserSync','/solved','threadId','setConfig','_injector','amd','getComment','Edit','/universer-api/comment/unit/','CustomRangeType','42gFREPM','bufferTime','UNIVER_UNKNOWN','replyId','YYYY/MM/DD\x20HH:mm','@univerjs-pro/license','OpenOrReOpen','pipe','object','Delete','parentId','_commentService','addComment','subscribe','values','@univerjs-pro/collaboration-client','personId','addUser','UniverProLicense','dayjs','Unknown','slice','saveCommentToSnapshot','_httpService','listComments','_userService','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','comments','content','/reply','_threadCommentDataSourceService','getCurrentUser','Inject','stringify','ThreadCommentModel','763792dfwpWA','UniverCollaborationClientPlugin','Solve','payload','/list','Add','createTimestamp','_config','@univerjs/network','rangeId','UniverLicensePlugin','UniverNetwork','4522800PyuiEZ','code','requireSession','304460XMOMxr','_threadCommentDataSource','CommentService','format','IThreadCommentDataSourceService','15572420lKDnrQ','Disposable','userId','Module','UniverProThreadCommentDatasource','Plugin','UNRECOGNIZED','disposeWithMe','forEach','getUser','@univerjs/thread-comment-ui','thread-comment-data-source.config','rxjs','getOwnPropertyDescriptor','get','commentUpdate$','IConfigService','merge','/universer-api/user/list','17966oKfwEc','defineProperty','_sessionService','pluginName','size','post','@univerjs/core','797075zrKLEh','UserManagerService','Reply','filter','@univerjs/thread-comment','UniverThreadCommentUIPlugin','type','find','756923OFyFSI','UniverInstanceType','user','length','userID','Solved','replies','syncUpdateMutationToColla','onStarting','Injector','HTTPService','/edit','_configService','map','add'];_0x205e=function(){return _0x21fd10;};return _0x205e();}
|
|
1
|
+
function _0x1a44(_0x1e0826,_0x4f07c9){const _0x159ec6=_0x159e();return _0x1a44=function(_0x1a4447,_0x18df05){_0x1a4447=_0x1a4447-0x65;let _0x590315=_0x159ec6[_0x1a4447];return _0x590315;},_0x1a44(_0x1e0826,_0x4f07c9);}function _0x159e(){const _0x25ca53=['size','unitId','UniverCollaborationClientPlugin','filter','user','type','@univerjs/thread-comment','find','ThreadCommentModel','Reply','@univerjs/core','map','addUser','slice','UniverInstanceType','post','getOwnPropertyDescriptor','disposeWithMe','bufferTime','userID','IThreadCommentDataSourceService','rangeId','_injector','5GYnijG','users','1460307uzypIX','_commentService','UniverNetwork','symbol','values','CollaborationSessionService','UniverLicensePlugin','exports','/reply','@univerjs-pro/collaboration-client','updateComment','OpenOrReOpen','threadId','DependentOn','resolved','comment','/universer-api/comment/unit/','userId','_threadCommentModel','_initDataSource','_threadCommentDataSourceService','Delete','getUnit','@univerjs-pro/license','COMMENT','4NxFvCZ','get','commentUpdate$','requireSession','format','8RIOOEf','UniverThreadCommentDataSourcePlugin','getMemberID','resolveComment','5089221lyOgZz','dayjs','onReady','1172633iASMoh','UNRECOGNIZED','_initUserSync','Inject','createTimestamp','length','Unknown','/add','10IuIwhA','defineProperty','CommentService','_config','payload','syncUpdateMutationToColla','Module','Injector','@univerjs/thread-comment-ui','163447ijTwDe','@univerjs/network','replies','_httpService','3379176XweGba','content','replyId','ref','stringify','UniverThreadCommentUi','YYYY/MM/DD\x20HH:mm','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4193903CKVuud','UniverThreadComment','_sessionService','UniverProThreadCommentDatasource','/universer-api/user/list','listComments','_userService','IConfigService','add','object','parse','Add','Solved','rangeType','HTTPService','2NZAKIv','amd','deleteComment','forEach','pipe','_init','solved','Edit','2059962wonJVe','function','error','reply','dataSource','saveCommentToSnapshot','Plugin','Disposable','root','toStringTag','addComment','subscribe','body','Solve','_threadCommentDataSource','rxjs','code','merge','UserManagerService','UniverCore'];_0x159e=function(){return _0x25ca53;};return _0x159e();}(function(_0x142732,_0x5d3481){const _0x475589=_0x1a44,_0x42b12c=_0x142732();while(!![]){try{const _0x5ca0e9=-parseInt(_0x475589(0xc3))/0x1*(parseInt(_0x475589(0xde))/0x2)+parseInt(_0x475589(0x8d))/0x3*(parseInt(_0x475589(0xa6))/0x4)+parseInt(_0x475589(0x8b))/0x5*(parseInt(_0x475589(0xe6))/0x6)+parseInt(_0x475589(0xcf))/0x7+-parseInt(_0x475589(0xab))/0x8*(parseInt(_0x475589(0xaf))/0x9)+parseInt(_0x475589(0xba))/0xa*(-parseInt(_0x475589(0xb2))/0xb)+-parseInt(_0x475589(0xc7))/0xc;if(_0x5ca0e9===_0x5d3481)break;else _0x42b12c['push'](_0x42b12c['shift']());}catch(_0xf65b4e){_0x42b12c['push'](_0x42b12c['shift']());}}}(_0x159e,0x4c32c),function(_0x5b4428,_0x200108){const _0x4113a9=_0x1a44;typeof exports==_0x4113a9(0xd8)&&typeof module<'u'?_0x200108(exports,require('@univerjs-pro/collaboration-client'),require(_0x4113a9(0xa4)),require('@univerjs/core'),require(_0x4113a9(0xc2)),require(_0x4113a9(0x7a)),require(_0x4113a9(0x6f)),require(_0x4113a9(0xc4))):typeof define==_0x4113a9(0xe7)&&define[_0x4113a9(0xdf)]?define([_0x4113a9(0x94),_0x4113a9(0x96),_0x4113a9(0xa4),_0x4113a9(0x7e),_0x4113a9(0xc2),'@univerjs/thread-comment',_0x4113a9(0x6f),'@univerjs/network'],_0x200108):(_0x5b4428=typeof globalThis<'u'?globalThis:_0x5b4428||self,_0x200108(_0x5b4428[_0x4113a9(0xd2)]={},_0x5b4428['UniverProCollaborationClient'],_0x5b4428['UniverProLicense'],_0x5b4428[_0x4113a9(0x73)],_0x5b4428[_0x4113a9(0xcc)],_0x5b4428[_0x4113a9(0xd0)],_0x5b4428[_0x4113a9(0x6f)],_0x5b4428[_0x4113a9(0x8f)]));}(this,function(_0x1548f5,_0x1dba22,_0x3ab869,_0x5db8a4,_0x18e4f6,_0x52a6c6,_0x5a5e46,_0x4c1de9){'use strict';const _0x51564f=_0x1a44;const _0x4031a7=_0x51564f(0xce);var _0x34d266=(_0x2f856f=>(_0x2f856f[_0x2f856f[_0x51564f(0x98)]=0x0]=_0x51564f(0x98),_0x2f856f[_0x2f856f['Solved']=0x1]='Solved',_0x2f856f[_0x2f856f['UNRECOGNIZED']=-0x1]=_0x51564f(0xb3),_0x2f856f))(_0x34d266||{}),_0x4cec78=(_0x6317cc=>(_0x6317cc[_0x6317cc[_0x51564f(0xb8)]=0x0]=_0x51564f(0xb8),_0x6317cc[_0x6317cc[_0x51564f(0xda)]=0x1]=_0x51564f(0xda),_0x6317cc[_0x6317cc[_0x51564f(0x7d)]=0x2]=_0x51564f(0x7d),_0x6317cc[_0x6317cc['Edit']=0x3]='Edit',_0x6317cc[_0x6317cc[_0x51564f(0xa2)]=0x4]=_0x51564f(0xa2),_0x6317cc[_0x6317cc[_0x51564f(0x6d)]=0x5]=_0x51564f(0x6d),_0x6317cc[_0x6317cc[_0x51564f(0xb3)]=-0x1]=_0x51564f(0xb3),_0x6317cc))(_0x4cec78||{});const _0x3ae1c7=_0x469571=>_0x5db8a4['dayjs'](new Date(+_0x469571))['format'](_0x51564f(0xcd)),_0x447381=async(_0x2f990c,_0x132a65)=>{const _0x6e703d=_0x51564f,_0x30eae7=_0x2f990c[_0x6e703d(0xa7)](_0x5db8a4[_0x6e703d(0x72)]),_0x26f613=_0x2f990c[_0x6e703d(0xa7)](_0x4c1de9[_0x6e703d(0xdd)]);_0x132a65[_0x6e703d(0xe1)](_0x20fa5c=>{_0x30eae7['getUser'](_0x20fa5c)&&_0x132a65['delete'](_0x20fa5c);}),_0x132a65[_0x6e703d(0x74)]&&(await _0x26f613[_0x6e703d(0xa7)](_0x6e703d(0xd3),{'params':{'userIDs':[..._0x132a65]}}))[_0x6e703d(0x6c)][_0x6e703d(0x8c)][_0x6e703d(0xe1)](_0x2cdc42=>{const _0x29d2c9=_0x6e703d;_0x2cdc42&&_0x30eae7[_0x29d2c9(0x80)](_0x2cdc42);});};var _0x6fb4a1=Object[_0x51564f(0x84)],_0x5e08ab=(_0x3f0c4f,_0x234a21,_0x432a34,_0x24492c)=>{const _0x22b537=_0x51564f;for(var _0x34cbda=_0x24492c>0x1?void 0x0:_0x24492c?_0x6fb4a1(_0x234a21,_0x432a34):_0x234a21,_0x1d151f=_0x3f0c4f[_0x22b537(0xb7)]-0x1,_0x36f3a3;_0x1d151f>=0x0;_0x1d151f--)(_0x36f3a3=_0x3f0c4f[_0x1d151f])&&(_0x34cbda=_0x36f3a3(_0x34cbda)||_0x34cbda);return _0x34cbda;},_0x1732db=(_0x4c5a44,_0x1b92e8)=>(_0x256e0e,_0x9b0c22)=>_0x1b92e8(_0x256e0e,_0x9b0c22,_0x4c5a44);let _0x20ac95=class extends _0x5db8a4[_0x51564f(0x67)]{constructor(_0x2a24a8,_0x154242,_0x5e3cfa,_0x535576){const _0x167000=_0x51564f;super(),this[_0x167000(0x8e)]=_0x2a24a8,this['_threadCommentModel']=_0x154242,this[_0x167000(0xd5)]=_0x5e3cfa,this[_0x167000(0x8a)]=_0x535576,this[_0x167000(0xe3)](),this[_0x167000(0xb4)]();}[_0x51564f(0xb4)](){const _0x11870e=_0x51564f;this[_0x11870e(0x85)](this[_0x11870e(0x9f)][_0x11870e(0xa8)][_0x11870e(0xe2)](_0x5a5e46[_0x11870e(0x86)](0x10))[_0x11870e(0x6b)](_0x4c29ec=>{const _0x5eef6b=_0x11870e,_0x59165e=new Set();_0x4c29ec[_0x5eef6b(0xe1)](_0x400bdc=>{const _0x2eeaa6=_0x5eef6b;switch(_0x400bdc[_0x2eeaa6(0x79)]){case _0x2eeaa6(0xd7):{const _0x32eb31=_0x400bdc[_0x2eeaa6(0xbe)]['personId'];_0x59165e['add'](_0x32eb31);break;}}}),_0x447381(this[_0x5eef6b(0x8a)],_0x59165e);}));}[_0x51564f(0xe3)](){const _0x160527=_0x51564f;this[_0x160527(0x85)](this[_0x160527(0x8e)]['commentUpdate$'][_0x160527(0x6b)](async _0x230a96=>{const _0x57b202=_0x160527;var _0x3213cf,_0x108af3,_0x2851a4,_0x3d9863;const _0x4f601e=(_0x3213cf=this['_threadCommentModel'][_0x57b202(0xa3)](_0x230a96[_0x57b202(0x75)])[_0x57b202(0x7b)](_0x57cb3b=>_0x57cb3b['threadId']===_0x230a96[_0x57b202(0x99)]))==null?void 0x0:_0x3213cf[_0x57b202(0x68)];if(!_0x4f601e)return;const {unitId:_0xccef6e,subUnitId:_0x14eaea}=_0x4f601e;switch(_0x230a96[_0x57b202(0x78)]&&this[_0x57b202(0xd5)][_0x57b202(0x80)](_0x230a96[_0x57b202(0x78)]),_0x230a96[_0x57b202(0x79)]){case _0x4cec78[_0x57b202(0xda)]:break;case _0x4cec78[_0x57b202(0x7d)]:{this[_0x57b202(0x9f)][_0x57b202(0x6a)](_0xccef6e,_0x14eaea,{'unitId':_0xccef6e,'subUnitId':_0x14eaea,'ref':'','id':_0x230a96['replyId'],'dT':_0x3ae1c7(+_0x230a96[_0x57b202(0xb6)]),'threadId':_0x230a96['threadId'],'personId':(_0x2851a4=(_0x108af3=_0x230a96[_0x57b202(0x78)])==null?void 0x0:_0x108af3[_0x57b202(0x87)])!=null?_0x2851a4:_0x230a96[_0x57b202(0x9e)],'text':JSON[_0x57b202(0xd9)](_0x230a96[_0x57b202(0xc8)]),'parentId':_0x4f601e['id']});break;}case _0x4cec78[_0x57b202(0xa2)]:{const _0x5292e9=this['_threadCommentModel']['getComment'](_0xccef6e,_0x14eaea,_0x230a96[_0x57b202(0xc9)]);_0x5292e9&&_0x5292e9['parentId']&&this['_threadCommentModel'][_0x57b202(0xe0)](_0xccef6e,_0x14eaea,_0x230a96[_0x57b202(0xc9)]);break;}case _0x4cec78[_0x57b202(0xe5)]:{this['_threadCommentModel']['updateComment'](_0xccef6e,_0x14eaea,{'commentId':_0x230a96['replyId'],'text':JSON[_0x57b202(0xd9)](_0x230a96['content'])});break;}case _0x4cec78['Solve']:{const _0x8db83e=(_0x3d9863=this['_threadCommentModel'][_0x57b202(0xa3)](_0x230a96[_0x57b202(0x75)])[_0x57b202(0x7b)](_0x3ca771=>_0x3ca771[_0x57b202(0x99)]===_0x230a96[_0x57b202(0x99)]))==null?void 0x0:_0x3d9863[_0x57b202(0x68)];_0x8db83e&&this[_0x57b202(0x9f)][_0x57b202(0xae)](_0xccef6e,_0x14eaea,_0x8db83e['id'],_0x230a96[_0x57b202(0xe4)]===_0x34d266[_0x57b202(0xdb)]);break;}}}));}};_0x20ac95=_0x5e08ab([_0x1732db(0x0,_0x5db8a4[_0x51564f(0xb5)](_0x1dba22[_0x51564f(0xbc)])),_0x1732db(0x1,_0x5db8a4[_0x51564f(0xb5)](_0x52a6c6[_0x51564f(0x7c)])),_0x1732db(0x2,_0x5db8a4[_0x51564f(0xb5)](_0x5db8a4['UserManagerService'])),_0x1732db(0x3,_0x5db8a4['Inject'](_0x5db8a4[_0x51564f(0xc1)]))],_0x20ac95);const _0x4bad09='thread-comment-data-source.config',_0x4d9ae1={};var _0x2f813d=Object[_0x51564f(0x84)],_0x4e901d=(_0x8fca2f,_0x220750,_0x452f2b,_0x327bba)=>{const _0x12d3c9=_0x51564f;for(var _0x475c27=_0x327bba>0x1?void 0x0:_0x327bba?_0x2f813d(_0x220750,_0x452f2b):_0x220750,_0x2d8156=_0x8fca2f[_0x12d3c9(0xb7)]-0x1,_0x552a81;_0x2d8156>=0x0;_0x2d8156--)(_0x552a81=_0x8fca2f[_0x2d8156])&&(_0x475c27=_0x552a81(_0x475c27)||_0x475c27);return _0x475c27;},_0x5db2b6=(_0x2e0320,_0x4a92bb)=>(_0x59aa91,_0x3f8b5b)=>_0x4a92bb(_0x59aa91,_0x3f8b5b,_0x2e0320);function _0x31e68c(_0x1b5848,_0x83653c){const _0x43e5f0=_0x51564f,_0x193cc7=_0x1b5848[_0x43e5f0(0xc5)][0x0];return{..._0x83653c,'id':_0x193cc7[_0x43e5f0(0xc9)],'resolved':_0x1b5848[_0x43e5f0(0xe4)]===0x1,'dT':_0x3ae1c7(_0x193cc7[_0x43e5f0(0xb6)]),'personId':_0x193cc7[_0x43e5f0(0x9e)],'threadId':_0x193cc7[_0x43e5f0(0x99)]};}function _0x22162d(_0x41e4e8,_0x17ab69,_0x3f0f6b){const _0x292e92=_0x51564f;var _0x420d64,_0x853bb2;if(((_0x853bb2=(_0x420d64=_0x41e4e8==null?void 0x0:_0x41e4e8[_0x292e92(0xc5)])==null?void 0x0:_0x420d64[_0x292e92(0xb7)])!=null?_0x853bb2:0x0)>0x0){const _0x349c4d=(_0x27dfa4,_0x3d7b14)=>({'id':_0x27dfa4[_0x292e92(0xc9)],'threadId':_0x27dfa4[_0x292e92(0x99)],'dT':_0x3ae1c7(_0x27dfa4['createTimestamp']),'personId':_0x27dfa4[_0x292e92(0x9e)],'resolved':_0x41e4e8[_0x292e92(0xe4)]===_0x34d266[_0x292e92(0xdb)],'unitId':_0x17ab69,'subUnitId':_0x3f0f6b,'text':JSON[_0x292e92(0xd9)](_0x27dfa4[_0x292e92(0xc8)]),'parentId':_0x3d7b14}),_0x2fade2=_0x349c4d(_0x41e4e8['replies'][0x0]);return{..._0x2fade2,'children':_0x41e4e8[_0x292e92(0xc5)][_0x292e92(0x81)](0x1)[_0x292e92(0x7f)](_0x23af1b=>_0x349c4d(_0x23af1b,_0x2fade2['id']))};}return null;}let _0x569277=class{constructor(_0x28d2e6,_0x1f8919,_0x380484,_0xb21989){const _0x118bab=_0x51564f;this[_0x118bab(0xc6)]=_0x28d2e6,this[_0x118bab(0xd5)]=_0x1f8919,this[_0x118bab(0xd1)]=_0x380484,this[_0x118bab(0x8a)]=_0xb21989;}async['addComment'](_0x420395){const _0xcef1ed=_0x51564f;var _0xa9fcbe,_0x5c101e;const {parentId:_0x4147ed,unitId:_0xb32b59,text:_0x58af4a,threadId:_0x222413}=_0x420395,_0x552f15=(_0x5c101e=(_0xa9fcbe=_0x58af4a['customRanges'])==null?void 0x0:_0xa9fcbe[_0xcef1ed(0x77)](_0x1b920f=>_0x1b920f[_0xcef1ed(0xdc)]===_0x5db8a4['CustomRangeType'][_0xcef1ed(0xa5)])[_0xcef1ed(0x7f)](_0x2ed11c=>_0x2ed11c[_0xcef1ed(0x89)]))!=null?_0x5c101e:[],_0x2c3ec3=JSON[_0xcef1ed(0xcb)](_0x58af4a),_0x307848=(await this['_sessionService'][_0xcef1ed(0xa9)](_0xb32b59))[_0xcef1ed(0xad)]();if(_0x4147ed){const _0x786547={'memberId':_0x307848,'unitId':_0xb32b59,'content':_0x2c3ec3,'mention':_0x552f15,'threadId':_0x222413},_0x27013b=(await this[_0xcef1ed(0xc6)]['post'](_0xcef1ed(0x9d)+_0xb32b59+_0xcef1ed(0x95),{'body':_0x786547}))[_0xcef1ed(0x6c)][_0xcef1ed(0xe9)];return{..._0x420395,'id':_0x27013b[_0xcef1ed(0xc9)],'dT':_0x5db8a4[_0xcef1ed(0xb0)](+_0x27013b['createTimestamp'])[_0xcef1ed(0xaa)](_0xcef1ed(0xcd)),'personId':_0x27013b[_0xcef1ed(0x9e)]};}else{const _0x254060={'memberId':_0x307848,'unitId':_0xb32b59,'content':_0x2c3ec3,'mention':_0x552f15},_0x4e26a5=await this['_httpService'][_0xcef1ed(0x83)](_0xcef1ed(0x9d)+_0xb32b59+_0xcef1ed(0xb9),{'body':_0x254060});return _0x31e68c(_0x4e26a5[_0xcef1ed(0x6c)][_0xcef1ed(0x9c)],_0x420395);}}async[_0x51564f(0x97)](_0x10cf53){const _0x30322c=_0x51564f;var _0x5a20b3,_0x363633;const {text:_0x5b7993,unitId:_0x4faae}=_0x10cf53,_0x4a33c4=(_0x363633=(_0x5a20b3=_0x5b7993['customRanges'])==null?void 0x0:_0x5a20b3[_0x30322c(0x77)](_0x15cf02=>_0x15cf02['rangeType']===_0x5db8a4['CustomRangeType'][_0x30322c(0xa5)])[_0x30322c(0x7f)](_0x2a7c32=>_0x2a7c32[_0x30322c(0x89)]))!=null?_0x363633:[],_0x5d70f3=JSON['stringify'](_0x5b7993),_0xb015de=_0x10cf53[_0x30322c(0x99)],_0x59580b=_0x10cf53['id'],_0x1bf397={'memberId':(await this[_0x30322c(0xd1)][_0x30322c(0xa9)](_0x4faae))[_0x30322c(0xad)](),'unitId':_0x4faae,'threadId':_0xb015de,'mention':_0x4a33c4,'content':_0x5d70f3,'replyId':_0x59580b},_0x42eadb=await this[_0x30322c(0xc6)]['post']('/universer-api/comment/unit/'+_0x4faae+'/edit',{'body':_0x1bf397});return!_0x42eadb[_0x30322c(0x6c)][_0x30322c(0xe8)]||_0x42eadb[_0x30322c(0x6c)]['error']['code']===0x1;}async['resolveComment'](_0x401cd0){const _0x38a945=_0x51564f,{unitId:_0x219b44}=_0x401cd0,_0x57e29b=_0x401cd0[_0x38a945(0x99)],_0xc8c8f0={'memberId':this[_0x38a945(0xd5)]['getCurrentUser']()[_0x38a945(0x87)],'unitId':_0x219b44,'threadId':_0x57e29b,'solved':_0x401cd0[_0x38a945(0x9b)]?_0x34d266[_0x38a945(0xdb)]:_0x34d266[_0x38a945(0x98)]},_0x598880=await this['_httpService'][_0x38a945(0x83)]('/universer-api/comment/unit/'+_0x219b44+'/solved',{'body':_0xc8c8f0});return!_0x598880[_0x38a945(0x6c)][_0x38a945(0xe8)]||_0x598880[_0x38a945(0x6c)]['error'][_0x38a945(0x70)]===0x1;}async['deleteComment'](_0x1e7551,_0x1ce2b3,_0x2e48e9,_0x3dde90){const _0x22af04=_0x51564f,_0x4cec0a={'memberId':(await this[_0x22af04(0xd1)][_0x22af04(0xa9)](_0x1e7551))[_0x22af04(0xad)](),'threadId':_0x2e48e9,'replyId':_0x3dde90,'unitId':_0x1e7551},_0x57804d=await this[_0x22af04(0xc6)][_0x22af04(0x83)]('/universer-api/comment/unit/'+_0x1e7551+'/delete',{'body':_0x4cec0a});return!_0x57804d['body']['error']||_0x57804d[_0x22af04(0x6c)][_0x22af04(0xe8)][_0x22af04(0x70)]===0x1;}async[_0x51564f(0xd4)](_0x3bd266,_0x28d72c,_0x14a82c){const _0x1bb4fa=_0x51564f,_0x4a4f48={'unitId':_0x3bd266,'threadId':_0x14a82c},_0x1f75f9=await this[_0x1bb4fa(0xc6)][_0x1bb4fa(0x83)]('/universer-api/comment/unit/'+_0x3bd266+'/list',{'body':_0x4a4f48}),_0x19a871=_0x14a82c[_0x1bb4fa(0x7f)](_0x16a040=>_0x22162d(_0x1f75f9[_0x1bb4fa(0x6c)]['comments'][_0x16a040],_0x3bd266,_0x28d72c))['filter'](Boolean);return Object[_0x1bb4fa(0x91)](_0x1f75f9['body'][_0x1bb4fa(0x8c)])[_0x1bb4fa(0xe1)](_0x1122cd=>{const _0x4e248f=_0x1bb4fa;this[_0x4e248f(0xd5)][_0x4e248f(0x80)](_0x1122cd);}),_0x19a871;}[_0x51564f(0x65)](_0x2727a5){const _0x1304a9=_0x51564f;return{'id':_0x2727a5['id'],'threadId':_0x2727a5[_0x1304a9(0x99)],'ref':_0x2727a5[_0x1304a9(0xca)]};}};_0x569277=_0x4e901d([_0x5db2b6(0x0,_0x5db8a4[_0x51564f(0xb5)](_0x4c1de9[_0x51564f(0xdd)])),_0x5db2b6(0x1,_0x5db8a4[_0x51564f(0xb5)](_0x5db8a4['UserManagerService'])),_0x5db2b6(0x2,_0x5db8a4[_0x51564f(0xb5)](_0x1dba22[_0x51564f(0x92)])),_0x5db2b6(0x3,_0x5db8a4[_0x51564f(0xb5)](_0x5db8a4[_0x51564f(0xc1)]))],_0x569277);var _0x5154fb=Object[_0x51564f(0x84)],_0x4c757a=(_0x37e267,_0x5d94f3,_0x42d1b3,_0x1c2f6f)=>{for(var _0x232038=_0x1c2f6f>0x1?void 0x0:_0x1c2f6f?_0x5154fb(_0x5d94f3,_0x42d1b3):_0x5d94f3,_0x3e3518=_0x37e267['length']-0x1,_0x30a156;_0x3e3518>=0x0;_0x3e3518--)(_0x30a156=_0x37e267[_0x3e3518])&&(_0x232038=_0x30a156(_0x232038)||_0x232038);return _0x232038;},_0x24c760=(_0x192fc7,_0x5a4ec2)=>(_0x4af4e9,_0x148543)=>_0x5a4ec2(_0x4af4e9,_0x148543,_0x192fc7);let _0x4e9cb6=class extends _0x5db8a4['Disposable']{constructor(_0x367ed1,_0x578d4a){const _0x26075f=_0x51564f;super(),this['_threadCommentDataSourceService']=_0x367ed1,this[_0x26075f(0x6e)]=_0x578d4a,this['_initDataSource']();}[_0x51564f(0xa0)](){const _0x10a19f=_0x51564f;this['_threadCommentDataSourceService'][_0x10a19f(0xea)]=this[_0x10a19f(0x6e)],this[_0x10a19f(0xa1)][_0x10a19f(0xbf)]=!0x1;}};_0x4e9cb6=_0x4c757a([_0x24c760(0x0,_0x52a6c6[_0x51564f(0x88)]),_0x24c760(0x1,_0x5db8a4['Inject'](_0x569277))],_0x4e9cb6);var _0x99a4b7=Object[_0x51564f(0xbb)],_0x535fb4=Object[_0x51564f(0x84)],_0x4a28d2=(_0x5900c8,_0x2c4624,_0x42d5f1)=>_0x2c4624 in _0x5900c8?_0x99a4b7(_0x5900c8,_0x2c4624,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42d5f1}):_0x5900c8[_0x2c4624]=_0x42d5f1,_0x1380b7=(_0x555a22,_0x395c22,_0x2fdb35,_0x11d516)=>{const _0x27882a=_0x51564f;for(var _0x3f43c7=_0x11d516>0x1?void 0x0:_0x11d516?_0x535fb4(_0x395c22,_0x2fdb35):_0x395c22,_0x5c19e5=_0x555a22[_0x27882a(0xb7)]-0x1,_0x4c420a;_0x5c19e5>=0x0;_0x5c19e5--)(_0x4c420a=_0x555a22[_0x5c19e5])&&(_0x3f43c7=_0x4c420a(_0x3f43c7)||_0x3f43c7);return _0x3f43c7;},_0x247602=(_0x2a9395,_0x1571be)=>(_0x72862f,_0x396d35)=>_0x1571be(_0x72862f,_0x396d35,_0x2a9395),_0x276f1c=(_0x2e1027,_0x3acc3a,_0x1846b3)=>_0x4a28d2(_0x2e1027,typeof _0x3acc3a!=_0x51564f(0x90)?_0x3acc3a+'':_0x3acc3a,_0x1846b3);_0x1548f5['UniverThreadCommentDataSourcePlugin']=class extends _0x5db8a4[_0x51564f(0x66)]{constructor(_0x593075=_0x4d9ae1,_0x274d8b,_0x4f4eba){const _0x2933f1=_0x51564f;super(),this[_0x2933f1(0xbd)]=_0x593075,this[_0x2933f1(0x8a)]=_0x274d8b,this['_configService']=_0x4f4eba;const {..._0x35d580}=_0x5db8a4[_0x2933f1(0x71)]({},_0x4d9ae1,this[_0x2933f1(0xbd)]);this['_configService']['setConfig'](_0x4bad09,_0x35d580);}['onStarting'](){[[_0x569277],[_0x4e9cb6],[_0x20ac95]]['forEach'](_0x3d7683=>{const _0x2d84d6=_0x1a44;this[_0x2d84d6(0x8a)][_0x2d84d6(0xd7)](_0x3d7683);});}[_0x51564f(0xb1)](){const _0x4c03ad=_0x51564f;this[_0x4c03ad(0x8a)][_0x4c03ad(0xa7)](_0x4e9cb6),this['_injector']['get'](_0x20ac95);}},_0x276f1c(_0x1548f5[_0x51564f(0xac)],'pluginName',_0x4031a7),_0x276f1c(_0x1548f5[_0x51564f(0xac)],'type',_0x5db8a4[_0x51564f(0x82)]['UNIVER_UNKNOWN']),_0x1548f5['UniverThreadCommentDataSourcePlugin']=_0x1380b7([_0x5db8a4[_0x51564f(0x9a)](_0x18e4f6['UniverThreadCommentUIPlugin'],_0x1dba22[_0x51564f(0x76)],_0x3ab869[_0x51564f(0x93)]),_0x247602(0x1,_0x5db8a4[_0x51564f(0xb5)](_0x5db8a4[_0x51564f(0xc1)])),_0x247602(0x2,_0x5db8a4[_0x51564f(0xd6)])],_0x1548f5[_0x51564f(0xac)]),Object[_0x51564f(0xbb)](_0x1548f5,Symbol[_0x51564f(0x69)],{'value':_0x51564f(0xc0)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.6-experimental.
|
|
3
|
+
"version": "0.6.6-experimental.20250326-0a2cb0d",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.6.6-experimental.
|
|
49
|
-
"@univerjs/core": "0.6.6-experimental.
|
|
50
|
-
"@univerjs-pro/license": "0.6.6-experimental.
|
|
51
|
-
"@univerjs/network": "0.6.6-experimental.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.6-experimental.
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.6-experimental.20250326-0a2cb0d",
|
|
49
|
+
"@univerjs/core": "0.6.6-experimental.20250326-0a2cb0d",
|
|
50
|
+
"@univerjs-pro/license": "0.6.6-experimental.20250326-0a2cb0d",
|
|
51
|
+
"@univerjs/network": "0.6.6-experimental.20250326-0a2cb0d",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.6-experimental.20250326-0a2cb0d",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.6-experimental.20250326-0a2cb0d",
|
|
54
|
+
"@univerjs/protocol": "0.1.44-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
58
|
"typescript": "^5.8.2",
|
|
59
|
-
"vite": "^6.2.
|
|
60
|
-
"vitest": "^3.0.
|
|
59
|
+
"vite": "^6.2.2",
|
|
60
|
+
"vitest": "^3.0.9",
|
|
61
61
|
"@univerjs-infra/shared": "0.6.6"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|