@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251220-0a5ea4d → 0.13.0-insiders.20251223-857805c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x579d36=_0x2c37;(function(_0x70311e,_0x481417){const _0x5c06fd=_0x2c37,_0x92ca55=_0x70311e();while(!![]){try{const _0x427b68=parseInt(_0x5c06fd(0xf2))/0x1+parseInt(_0x5c06fd(0x140))/0x2*(-parseInt(_0x5c06fd(0x139))/0x3)+-parseInt(_0x5c06fd(0x14e))/0x4*(parseInt(_0x5c06fd(0x11c))/0x5)+-parseInt(_0x5c06fd(0x136))/0x6*(parseInt(_0x5c06fd(0x144))/0x7)+parseInt(_0x5c06fd(0xfc))/0x8*(-parseInt(_0x5c06fd(0x129))/0x9)+-parseInt(_0x5c06fd(0x146))/0xa*(-parseInt(_0x5c06fd(0x162))/0xb)+parseInt(_0x5c06fd(0x13d))/0xc*(parseInt(_0x5c06fd(0x138))/0xd);if(_0x427b68===_0x481417)break;else _0x92ca55['push'](_0x92ca55['shift']());}catch(_0x4a74b6){_0x92ca55['push'](_0x92ca55['shift']());}}}(_0x4aa6,0xd160a));function _0x2c37(_0x1f4cb5,_0x5311ee){_0x1f4cb5=_0x1f4cb5-0xea;const _0x4aa675=_0x4aa6();let _0x2c3753=_0x4aa675[_0x1f4cb5];return _0x2c3753;}Object[_0x579d36(0x131)](exports,Symbol[_0x579d36(0x143)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x579d36(0x13c);var I=(_0x2c43fc=>(_0x2c43fc[_0x2c43fc[_0x579d36(0x164)]=0x0]=_0x579d36(0x164),_0x2c43fc[_0x2c43fc[_0x579d36(0x115)]=0x1]=_0x579d36(0x115),_0x2c43fc[_0x2c43fc[_0x579d36(0x159)]=-0x1]=_0x579d36(0x159),_0x2c43fc))(I||{}),v=(_0x316183=>(_0x316183[_0x316183[_0x579d36(0x102)]=0x0]=_0x579d36(0x102),_0x316183[_0x316183['Add']=0x1]=_0x579d36(0x111),_0x316183[_0x316183['Reply']=0x2]=_0x579d36(0x14f),_0x316183[_0x316183[_0x579d36(0xec)]=0x3]=_0x579d36(0xec),_0x316183[_0x316183[_0x579d36(0x126)]=0x4]=_0x579d36(0x126),_0x316183[_0x316183[_0x579d36(0x121)]=0x5]=_0x579d36(0x121),_0x316183[_0x316183[_0x579d36(0x159)]=-0x1]=_0x579d36(0x159),_0x316183))(v||{});const f=_0x31cac4=>c[_0x579d36(0xef)](new Date(+_0x31cac4))[_0x579d36(0x120)](_0x579d36(0xf8)),R=async(_0x119942,_0x9ecdd1)=>{const _0x148fe9=_0x579d36,_0x47d908=_0x119942[_0x148fe9(0x110)](c[_0x148fe9(0x118)]),_0x2b52e2=_0x119942[_0x148fe9(0x110)](P[_0x148fe9(0xfb)]);_0x9ecdd1[_0x148fe9(0x156)](_0x4cde72=>{const _0x214b72=_0x148fe9;_0x47d908['getUser'](_0x4cde72)&&_0x9ecdd1[_0x214b72(0xf5)](_0x4cde72);}),_0x9ecdd1['size']&&(await _0x2b52e2['get'](_0x148fe9(0x10a),{'params':{'userIDs':[..._0x9ecdd1]}}))[_0x148fe9(0xfe)][_0x148fe9(0x11a)]['forEach'](_0x1caba3=>{const _0x4505da=_0x148fe9;_0x1caba3&&_0x47d908[_0x4505da(0xf1)](_0x1caba3);});};var $=Object[_0x579d36(0x124)],E=(_0x14c572,_0x5de675,_0x211fe4,_0x4b1226)=>{const _0x12cb16=_0x579d36;for(var _0x26d32b=_0x4b1226>0x1?void 0x0:_0x4b1226?$(_0x5de675,_0x211fe4):_0x5de675,_0x15a9f5=_0x14c572[_0x12cb16(0x116)]-0x1,_0xa46c3c;_0x15a9f5>=0x0;_0x15a9f5--)(_0xa46c3c=_0x14c572[_0x15a9f5])&&(_0x26d32b=_0xa46c3c(_0x26d32b)||_0x26d32b);return _0x26d32b;},S=(_0x155510,_0x2661fa)=>(_0x26516d,_0x3742b4)=>_0x2661fa(_0x26516d,_0x3742b4,_0x155510);let _=class extends c['Disposable']{constructor(_0x478b1e,_0x54ef11,_0x9eb02,_0x15f325){const _0x2110fa=_0x579d36;super(),this['_commentService']=_0x478b1e,this[_0x2110fa(0x113)]=_0x54ef11,this['_userService']=_0x9eb02,this[_0x2110fa(0xf0)]=_0x15f325,this[_0x2110fa(0xf9)](),this[_0x2110fa(0x12a)]();}[_0x579d36(0x12a)](){const _0x4ad663=_0x579d36;this['disposeWithMe'](this[_0x4ad663(0x113)][_0x4ad663(0x12d)][_0x4ad663(0x114)](j[_0x4ad663(0x13f)](0x10))[_0x4ad663(0x142)](_0x1d894f=>{const _0x49f28b=_0x4ad663,_0x485091=new Set();_0x1d894f['forEach'](_0x24c8c2=>{const _0x1470b1=_0x2c37;switch(_0x24c8c2[_0x1470b1(0x154)]){case _0x1470b1(0x100):{const _0x203025=_0x24c8c2['payload']['personId'];_0x485091[_0x1470b1(0x100)](_0x203025);break;}}}),R(this[_0x49f28b(0xf0)],_0x485091);}));}['_init'](){const _0x35ed19=_0x579d36;this[_0x35ed19(0x141)](this['_commentService'][_0x35ed19(0x12d)][_0x35ed19(0x142)](async _0x268292=>{const _0x168c97=_0x35ed19;var _0x48f1e5,_0x3dd079,_0x1315fc,_0x5dec41;const _0x4dcf5e=(_0x48f1e5=this['_threadCommentModel'][_0x168c97(0xf6)](_0x268292['unitId'])[_0x168c97(0x109)](_0x5b7db5=>_0x5b7db5[_0x168c97(0x133)]===_0x268292[_0x168c97(0x133)]))==null?void 0x0:_0x48f1e5[_0x168c97(0x105)];if(!_0x4dcf5e)return;const {unitId:_0xe56ff3,subUnitId:_0x54c728}=_0x4dcf5e;switch(_0x268292[_0x168c97(0x163)]&&this['_userService'][_0x168c97(0xf1)](_0x268292[_0x168c97(0x163)]),_0x268292[_0x168c97(0x154)]){case v['Add']:break;case v[_0x168c97(0x14f)]:{this[_0x168c97(0x113)][_0x168c97(0x147)](_0xe56ff3,_0x54c728,{'unitId':_0xe56ff3,'subUnitId':_0x54c728,'ref':'','id':_0x268292[_0x168c97(0x13b)],'dT':f(+_0x268292[_0x168c97(0x11d)]),'threadId':_0x268292[_0x168c97(0x133)],'personId':(_0x1315fc=(_0x3dd079=_0x268292[_0x168c97(0x163)])==null?void 0x0:_0x3dd079['userID'])!=null?_0x1315fc:_0x268292['userId'],'text':JSON[_0x168c97(0x149)](_0x268292[_0x168c97(0x12c)]),'parentId':_0x4dcf5e['id']});break;}case v[_0x168c97(0x126)]:{const _0x1853e0=this[_0x168c97(0x113)][_0x168c97(0x15f)](_0xe56ff3,_0x54c728,_0x268292['replyId']);_0x1853e0&&_0x1853e0['parentId']&&this[_0x168c97(0x113)]['deleteComment'](_0xe56ff3,_0x54c728,_0x268292[_0x168c97(0x13b)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x168c97(0x13e)](_0xe56ff3,_0x54c728,{'commentId':_0x268292[_0x168c97(0x13b)],'text':JSON[_0x168c97(0x149)](_0x268292[_0x168c97(0x12c)])});break;}case v[_0x168c97(0x121)]:{const _0x37548e=(_0x5dec41=this[_0x168c97(0x113)]['getUnit'](_0x268292['unitId'])[_0x168c97(0x109)](_0x930446=>_0x930446['threadId']===_0x268292[_0x168c97(0x133)]))==null?void 0x0:_0x5dec41[_0x168c97(0x105)];_0x37548e&&this[_0x168c97(0x113)][_0x168c97(0x13a)](_0xe56ff3,_0x54c728,_0x37548e['id'],_0x268292[_0x168c97(0x132)]===I[_0x168c97(0x115)]);break;}}}));}};_=E([S(0x0,c[_0x579d36(0x12b)](b[_0x579d36(0xf7)])),S(0x1,c[_0x579d36(0x12b)](M[_0x579d36(0x161)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x579d36(0x12b)](c[_0x579d36(0xee)]))],_);const q=_0x579d36(0x160),D={};var A=Object[_0x579d36(0x124)],x=(_0x130124,_0x58fa8b,_0x258828,_0x517956)=>{const _0x48f25a=_0x579d36;for(var _0x54c9ef=_0x517956>0x1?void 0x0:_0x517956?A(_0x58fa8b,_0x258828):_0x58fa8b,_0x430d47=_0x130124[_0x48f25a(0x116)]-0x1,_0x36d640;_0x430d47>=0x0;_0x430d47--)(_0x36d640=_0x130124[_0x430d47])&&(_0x54c9ef=_0x36d640(_0x54c9ef)||_0x54c9ef);return _0x54c9ef;},C=(_0x4e2857,_0x3de859)=>(_0x189736,_0x2d32a3)=>_0x3de859(_0x189736,_0x2d32a3,_0x4e2857);function Y(_0x5a246b,_0x1ddbd7){const _0x5e6954=_0x579d36,_0x5b69ca=_0x5a246b[_0x5e6954(0xfa)][0x0];return{..._0x1ddbd7,'id':_0x5b69ca[_0x5e6954(0x13b)],'resolved':_0x5a246b[_0x5e6954(0x132)]===0x1,'dT':f(_0x5b69ca[_0x5e6954(0x11d)]),'personId':_0x5b69ca[_0x5e6954(0x150)],'threadId':_0x5b69ca[_0x5e6954(0x133)]};}function G(_0x15e7f6,_0x1775e3,_0x349546){const _0x1f4c8e=_0x579d36;var _0x517e64,_0x2cccb2;if(((_0x2cccb2=(_0x517e64=_0x15e7f6==null?void 0x0:_0x15e7f6['replies'])==null?void 0x0:_0x517e64[_0x1f4c8e(0x116)])!=null?_0x2cccb2:0x0)>0x0){const _0x2a0d73=(_0x448027,_0xa0032f)=>({'id':_0x448027[_0x1f4c8e(0x13b)],'threadId':_0x448027[_0x1f4c8e(0x133)],'dT':f(_0x448027['createTimestamp']),'personId':_0x448027[_0x1f4c8e(0x150)],'resolved':_0x15e7f6[_0x1f4c8e(0x132)]===I[_0x1f4c8e(0x115)],'unitId':_0x1775e3,'subUnitId':_0x349546,'text':JSON[_0x1f4c8e(0x149)](_0x448027[_0x1f4c8e(0x12c)]),'parentId':_0xa0032f}),_0x56aae1=_0x2a0d73(_0x15e7f6[_0x1f4c8e(0xfa)][0x0]);return{..._0x56aae1,'children':_0x15e7f6[_0x1f4c8e(0xfa)][_0x1f4c8e(0x14c)](0x1)[_0x1f4c8e(0x10e)](_0x19801a=>_0x2a0d73(_0x19801a,_0x56aae1['id']))};}return null;}let p=class{constructor(_0x23a5f4,_0x36af16,_0x360710){const _0x179fb1=_0x579d36;this['_httpService']=_0x23a5f4,this[_0x179fb1(0x158)]=_0x36af16,this['_sessionService']=_0x360710;}async[_0x579d36(0x147)](_0xd5ddff){const _0x120447=_0x579d36;var _0x2c0585,_0x1818cb;const {parentId:_0x2b8784,unitId:_0x964da6,text:_0x1f6479,threadId:_0x3dfe86}=_0xd5ddff,_0xfab8d=(_0x1818cb=(_0x2c0585=_0x1f6479[_0x120447(0x14d)])==null?void 0x0:_0x2c0585[_0x120447(0x117)](_0x111dd7=>_0x111dd7[_0x120447(0xf3)]===c[_0x120447(0xea)][_0x120447(0x123)])[_0x120447(0x10e)](_0x3c92e5=>_0x3c92e5['rangeId']))!=null?_0x1818cb:[],_0x596832=JSON['stringify'](_0x1f6479),_0x59d07f=(await this[_0x120447(0x119)][_0x120447(0xff)](_0x964da6))[_0x120447(0x15b)]();if(_0x2b8784){const _0x4e9df4={'memberId':_0x59d07f,'unitId':_0x964da6,'content':_0x596832,'mention':_0xfab8d,'threadId':_0x3dfe86},_0x264146=(await this['_httpService'][_0x120447(0x101)](_0x120447(0x127)+_0x964da6+_0x120447(0x137),{'body':_0x4e9df4}))[_0x120447(0xfe)][_0x120447(0x128)];return{..._0xd5ddff,'id':_0x264146[_0x120447(0x13b)],'dT':c[_0x120447(0xef)](+_0x264146['createTimestamp'])[_0x120447(0x120)](_0x120447(0xf8)),'personId':_0x264146[_0x120447(0x150)]};}else{const _0x570ec4={'memberId':_0x59d07f,'unitId':_0x964da6,'content':_0x596832,'mention':_0xfab8d},_0x4c8c8e=await this[_0x120447(0x10c)]['post'](_0x120447(0x127)+_0x964da6+'/add',{'body':_0x570ec4});return Y(_0x4c8c8e[_0x120447(0xfe)]['comment'],_0xd5ddff);}}async['updateComment'](_0x6faaf7){const _0x2d0b0d=_0x579d36;var _0x3d5738,_0xdc934b;const {text:_0x1c3dcb,unitId:_0x5ea334}=_0x6faaf7,_0x5db2f0=(_0xdc934b=(_0x3d5738=_0x1c3dcb['customRanges'])==null?void 0x0:_0x3d5738[_0x2d0b0d(0x117)](_0x325776=>_0x325776[_0x2d0b0d(0xf3)]===c[_0x2d0b0d(0xea)][_0x2d0b0d(0x123)])[_0x2d0b0d(0x10e)](_0x174845=>_0x174845[_0x2d0b0d(0x125)]))!=null?_0xdc934b:[],_0x345717=JSON[_0x2d0b0d(0x14a)](_0x1c3dcb),_0x47f90a=_0x6faaf7[_0x2d0b0d(0x133)],_0x445235=_0x6faaf7['id'],_0x2d1c81={'memberId':(await this[_0x2d0b0d(0x119)]['requireSession'](_0x5ea334))[_0x2d0b0d(0x15b)](),'unitId':_0x5ea334,'threadId':_0x47f90a,'mention':_0x5db2f0,'content':_0x345717,'replyId':_0x445235},_0x9e0abb=await this[_0x2d0b0d(0x10c)]['post']('/universer-api/comment/unit/'+_0x5ea334+_0x2d0b0d(0x10f),{'body':_0x2d1c81});return!_0x9e0abb[_0x2d0b0d(0xfe)][_0x2d0b0d(0x107)]||_0x9e0abb[_0x2d0b0d(0xfe)][_0x2d0b0d(0x107)][_0x2d0b0d(0x106)]===0x1;}async[_0x579d36(0x13a)](_0x48c1a9){const _0x159941=_0x579d36,{unitId:_0x5c97b1}=_0x48c1a9,_0x8c5afb=_0x48c1a9[_0x159941(0x133)],_0x215055={'memberId':this[_0x159941(0x158)][_0x159941(0x122)]()[_0x159941(0x112)],'unitId':_0x5c97b1,'threadId':_0x8c5afb,'solved':_0x48c1a9[_0x159941(0x10d)]?I[_0x159941(0x115)]:I['OpenOrReOpen']},_0x199009=await this[_0x159941(0x10c)][_0x159941(0x101)]('/universer-api/comment/unit/'+_0x5c97b1+_0x159941(0x145),{'body':_0x215055});return!_0x199009[_0x159941(0xfe)][_0x159941(0x107)]||_0x199009[_0x159941(0xfe)]['error']['code']===0x1;}async['deleteComment'](_0x1ae354,_0x52ef47,_0x466947,_0x437135){const _0x1ce337=_0x579d36,_0x4d8c7b={'memberId':(await this['_sessionService'][_0x1ce337(0xff)](_0x1ae354))[_0x1ce337(0x15b)](),'threadId':_0x466947,'replyId':_0x437135,'unitId':_0x1ae354},_0x52c5f2=await this[_0x1ce337(0x10c)][_0x1ce337(0x101)]('/universer-api/comment/unit/'+_0x1ae354+_0x1ce337(0x15c),{'body':_0x4d8c7b});return!_0x52c5f2[_0x1ce337(0xfe)][_0x1ce337(0x107)]||_0x52c5f2['body'][_0x1ce337(0x107)][_0x1ce337(0x106)]===0x1;}async[_0x579d36(0x10b)](_0x3bb621,_0x31ef14,_0xabdd5d){const _0x40736b=_0x579d36,_0x37e54f={'unitId':_0x3bb621,'threadId':_0xabdd5d},_0x5ee48d=await this[_0x40736b(0x10c)][_0x40736b(0x101)](_0x40736b(0x127)+_0x3bb621+_0x40736b(0x15a),{'body':_0x37e54f}),_0x171397=_0xabdd5d[_0x40736b(0x10e)](_0x6da049=>G(_0x5ee48d['body'][_0x40736b(0x14b)][_0x6da049],_0x3bb621,_0x31ef14))['filter'](Boolean);return Object[_0x40736b(0xfd)](_0x5ee48d[_0x40736b(0xfe)][_0x40736b(0x11a)])[_0x40736b(0x156)](_0x48e7db=>{const _0x2d6db1=_0x40736b;this[_0x2d6db1(0x158)][_0x2d6db1(0xf1)](_0x48e7db);}),_0x171397;}[_0x579d36(0xed)](_0x5b032b){const _0xa0ec64=_0x579d36;return{'id':_0x5b032b['id'],'threadId':_0x5b032b[_0xa0ec64(0x133)],'ref':_0x5b032b[_0xa0ec64(0x130)]};}};p=x([C(0x0,c[_0x579d36(0x12b)](P[_0x579d36(0xfb)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x579d36(0x12b)](b[_0x579d36(0x155)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x4553ad,_0x25e457,_0x343005,_0x1d8840)=>{const _0x19a47e=_0x579d36;for(var _0x140a81=_0x1d8840>0x1?void 0x0:_0x1d8840?H(_0x25e457,_0x343005):_0x25e457,_0x5ee7d0=_0x4553ad[_0x19a47e(0x116)]-0x1,_0x65c084;_0x5ee7d0>=0x0;_0x5ee7d0--)(_0x65c084=_0x4553ad[_0x5ee7d0])&&(_0x140a81=_0x65c084(_0x140a81)||_0x140a81);return _0x140a81;},y=(_0x58ec2b,_0x247d69)=>(_0x34d1fa,_0x2a2f39)=>_0x247d69(_0x34d1fa,_0x2a2f39,_0x58ec2b);let g=class extends c['Disposable']{constructor(_0x1b5e3d,_0x533e1d){const _0x1cdc09=_0x579d36;super(),this[_0x1cdc09(0x152)]=_0x1b5e3d,this[_0x1cdc09(0x11b)]=_0x533e1d,this[_0x1cdc09(0x104)]();}[_0x579d36(0x104)](){const _0x1ef151=_0x579d36;this[_0x1ef151(0x152)][_0x1ef151(0xf4)]=this[_0x1ef151(0x11b)],this[_0x1ef151(0x152)][_0x1ef151(0x151)]=!0x1;}};g=J([y(0x0,M[_0x579d36(0x108)]),y(0x1,c[_0x579d36(0x12b)](p))],g);var F=Object['defineProperty'],L=Object[_0x579d36(0x124)],Z=(_0x5089f8,_0x1be0c1,_0x5f45d0)=>_0x1be0c1 in _0x5089f8?F(_0x5089f8,_0x1be0c1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f45d0}):_0x5089f8[_0x1be0c1]=_0x5f45d0,W=(_0x3b0802,_0x11a667,_0x146210,_0x3835dd)=>{const _0x331ca6=_0x579d36;for(var _0x57676a=_0x3835dd>0x1?void 0x0:_0x3835dd?L(_0x11a667,_0x146210):_0x11a667,_0x1fb751=_0x3b0802[_0x331ca6(0x116)]-0x1,_0x4eccec;_0x1fb751>=0x0;_0x1fb751--)(_0x4eccec=_0x3b0802[_0x1fb751])&&(_0x57676a=_0x4eccec(_0x57676a)||_0x57676a);return _0x57676a;},O=(_0x5741d7,_0x27ad9b)=>(_0x18cce0,_0x4a4992)=>_0x27ad9b(_0x18cce0,_0x4a4992,_0x5741d7),N=(_0x1929c7,_0x37e28d,_0x17697b)=>Z(_0x1929c7,typeof _0x37e28d!=_0x579d36(0x11e)?_0x37e28d+'':_0x37e28d,_0x17697b);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x579d36(0x135)]{constructor(_0x135806=D,_0x42a264,_0x5e7e3f){const _0x57a479=_0x579d36;super(),this[_0x57a479(0x11f)]=_0x135806,this[_0x57a479(0xf0)]=_0x42a264,this[_0x57a479(0x12f)]=_0x5e7e3f;const {..._0x3ee6e2}=c[_0x57a479(0x148)]({},D,this['_config']);this['_configService'][_0x57a479(0x134)](q,_0x3ee6e2);}[_0x579d36(0xeb)](){const _0x3e4fe2=_0x579d36;[[p],[g],[_]][_0x3e4fe2(0x156)](_0x37344f=>{const _0x466d64=_0x3e4fe2;this[_0x466d64(0xf0)][_0x466d64(0x100)](_0x37344f);});}['onReady'](){const _0x521309=_0x579d36;this[_0x521309(0xf0)][_0x521309(0x110)](g),this[_0x521309(0xf0)]['get'](_);}},N(exports[_0x579d36(0x12e)],_0x579d36(0x15d),U),N(exports[_0x579d36(0x12e)],_0x579d36(0x154),c[_0x579d36(0x153)][_0x579d36(0x157)]),exports[_0x579d36(0x12e)]=W([c[_0x579d36(0x103)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T['UniverLicensePlugin']),O(0x1,c[_0x579d36(0x12b)](c['Injector'])),O(0x2,c[_0x579d36(0x15e)])],exports[_0x579d36(0x12e)]);function _0x4aa6(){const _0x2d71f0=['get','Add','userID','_threadCommentModel','pipe','Solved','length','filter','UserManagerService','_sessionService','users','_threadCommentDataSource','5NTzrMz','createTimestamp','symbol','_config','format','Solve','getCurrentUser','COMMENT','getOwnPropertyDescriptor','rangeId','Delete','/universer-api/comment/unit/','reply','2974644qLtDnS','_initUserSync','Inject','content','commentUpdate$','UniverThreadCommentDataSourcePlugin','_configService','ref','defineProperty','solved','threadId','setConfig','Plugin','414qZReTx','/reply','50278046vnCATG','16278MeXQto','resolveComment','replyId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','12zJBquM','updateComment','bufferTime','326PdEmJw','disposeWithMe','subscribe','toStringTag','153559FWyKFc','/solved','20dUTUOX','addComment','merge','parse','stringify','comments','slice','customRanges','6717324dxiDHM','Reply','userId','syncUpdateMutationToColla','_threadCommentDataSourceService','UniverInstanceType','type','CollaborationSessionService','forEach','UNIVER_UNKNOWN','_userService','UNRECOGNIZED','/list','getMemberID','/delete','pluginName','IConfigService','getComment','thread-comment-data-source.config','ThreadCommentModel','5956379uvxpFG','user','OpenOrReOpen','CustomRangeType','onStarting','Edit','saveCommentToSnapshot','Injector','dayjs','_injector','addUser','1637092eahgcp','rangeType','dataSource','delete','getUnit','CommentService','YYYY/MM/DD\x20HH:mm','_init','replies','HTTPService','40eusHbF','values','body','requireSession','add','post','Unknown','DependentOn','_initDataSource','root','code','error','IThreadCommentDataSourceService','find','/universer-api/user/list','listComments','_httpService','resolved','map','/edit'];_0x4aa6=function(){return _0x2d71f0;};return _0x4aa6();}
|
|
1
|
+
'use strict';const _0x43ccab=_0x498d;(function(_0x4d633f,_0x46fed0){const _0x875831=_0x498d,_0x45cca3=_0x4d633f();while(!![]){try{const _0x2c0282=-parseInt(_0x875831(0x13e))/0x1*(-parseInt(_0x875831(0x113))/0x2)+parseInt(_0x875831(0xff))/0x3+parseInt(_0x875831(0xf9))/0x4+-parseInt(_0x875831(0x101))/0x5+-parseInt(_0x875831(0xf8))/0x6+-parseInt(_0x875831(0xed))/0x7+-parseInt(_0x875831(0xf0))/0x8;if(_0x2c0282===_0x46fed0)break;else _0x45cca3['push'](_0x45cca3['shift']());}catch(_0x2e5e1a){_0x45cca3['push'](_0x45cca3['shift']());}}}(_0x1b28,0x4ce9d));Object[_0x43ccab(0x14c)](exports,Symbol[_0x43ccab(0x14d)],{'value':_0x43ccab(0x108)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x15a2a2=>(_0x15a2a2[_0x15a2a2['OpenOrReOpen']=0x0]=_0x43ccab(0x131),_0x15a2a2[_0x15a2a2[_0x43ccab(0x10d)]=0x1]='Solved',_0x15a2a2[_0x15a2a2[_0x43ccab(0x136)]=-0x1]=_0x43ccab(0x136),_0x15a2a2))(I||{}),v=(_0xc6acec=>(_0xc6acec[_0xc6acec[_0x43ccab(0x117)]=0x0]=_0x43ccab(0x117),_0xc6acec[_0xc6acec[_0x43ccab(0x122)]=0x1]=_0x43ccab(0x122),_0xc6acec[_0xc6acec[_0x43ccab(0x121)]=0x2]='Reply',_0xc6acec[_0xc6acec['Edit']=0x3]=_0x43ccab(0xe3),_0xc6acec[_0xc6acec[_0x43ccab(0x138)]=0x4]=_0x43ccab(0x138),_0xc6acec[_0xc6acec[_0x43ccab(0xe6)]=0x5]='Solve',_0xc6acec[_0xc6acec[_0x43ccab(0x136)]=-0x1]=_0x43ccab(0x136),_0xc6acec))(v||{});const f=_0x270e07=>c['dayjs'](new Date(+_0x270e07))[_0x43ccab(0xfd)](_0x43ccab(0x137)),R=async(_0x17b671,_0x31b697)=>{const _0x3614a8=_0x43ccab,_0x18f051=_0x17b671[_0x3614a8(0xe4)](c[_0x3614a8(0x114)]),_0x20d5ce=_0x17b671[_0x3614a8(0xe4)](P['HTTPService']);_0x31b697[_0x3614a8(0x14a)](_0x5dff30=>{const _0x3e8059=_0x3614a8;_0x18f051[_0x3e8059(0xf4)](_0x5dff30)&&_0x31b697[_0x3e8059(0x111)](_0x5dff30);}),_0x31b697[_0x3614a8(0xe5)]&&(await _0x20d5ce['get'](_0x3614a8(0xfc),{'params':{'userIDs':[..._0x31b697]}}))['body'][_0x3614a8(0xef)][_0x3614a8(0x14a)](_0x24595c=>{_0x24595c&&_0x18f051['addUser'](_0x24595c);});};var $=Object[_0x43ccab(0xfa)],E=(_0x48bdf1,_0x26c203,_0x1e867d,_0x6eb56d)=>{const _0x185f5d=_0x43ccab;for(var _0x3b78c1=_0x6eb56d>0x1?void 0x0:_0x6eb56d?$(_0x26c203,_0x1e867d):_0x26c203,_0x36c1dd=_0x48bdf1[_0x185f5d(0x144)]-0x1,_0x4c95d5;_0x36c1dd>=0x0;_0x36c1dd--)(_0x4c95d5=_0x48bdf1[_0x36c1dd])&&(_0x3b78c1=_0x4c95d5(_0x3b78c1)||_0x3b78c1);return _0x3b78c1;},S=(_0x1793da,_0x2ee6e0)=>(_0x4cfe32,_0x48a294)=>_0x2ee6e0(_0x4cfe32,_0x48a294,_0x1793da);function _0x1b28(){const _0x1f39aa=['1542162rIajEh','/add','1938295hAtvGu','filter','listComments','/universer-api/comment/unit/','_commentService','_threadCommentDataSource','IConfigService','Module','_threadCommentDataSourceService','_sessionService','payload','addUser','Solved','map','post','personId','delete','code','2wDOSqr','UserManagerService','_initDataSource','addComment','Unknown','resolveComment','subscribe','/edit','_configService','unitId','_httpService','solved','add','UniverThreadCommentDataSourcePlugin','Reply','Add','disposeWithMe','customRanges','Disposable','syncUpdateMutationToColla','getUnit','replies','values','type','Inject','UNIVER_UNKNOWN','_threadCommentModel','pluginName','_init','replyId','OpenOrReOpen','/delete','stringify','pipe','user','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','Delete','IThreadCommentDataSourceService','parse','_config','find','bufferTime','515553pBXqjz','DependentOn','UniverInstanceType','Plugin','/list','content','length','_injector','dayjs','threadId','Injector','rangeId','forEach','CommentService','defineProperty','toStringTag','CustomRangeType','saveCommentToSnapshot','merge','UniverLicensePlugin','error','body','slice','getComment','comments','parentId','onReady','_initUserSync','Edit','get','size','Solve','userId','deleteComment','UniverThreadCommentUIPlugin','onStarting','commentUpdate$','root','2536072XvFOJe','dataSource','users','1511080WTFNUb','updateComment','CollaborationSessionService','getMemberID','getUser','createTimestamp','setConfig','_userService','494796OGXuzk','1226944kCkQYa','getOwnPropertyDescriptor','HTTPService','/universer-api/user/list','format','requireSession'];_0x1b28=function(){return _0x1f39aa;};return _0x1b28();}let _=class extends c[_0x43ccab(0x125)]{constructor(_0x228d4e,_0x282c64,_0xa12896,_0x33a9ce){const _0x5344b9=_0x43ccab;super(),this['_commentService']=_0x228d4e,this[_0x5344b9(0x12d)]=_0x282c64,this[_0x5344b9(0xf7)]=_0xa12896,this[_0x5344b9(0x145)]=_0x33a9ce,this[_0x5344b9(0x12f)](),this['_initUserSync']();}[_0x43ccab(0xe2)](){const _0x5da3f3=_0x43ccab;this[_0x5da3f3(0x123)](this[_0x5da3f3(0x12d)]['commentUpdate$'][_0x5da3f3(0x134)](j[_0x5da3f3(0x13d)](0x10))[_0x5da3f3(0x119)](_0x472ec1=>{const _0x30b34d=_0x5da3f3,_0x22b7fd=new Set();_0x472ec1[_0x30b34d(0x14a)](_0x34e7e6=>{const _0xec517a=_0x30b34d;switch(_0x34e7e6[_0xec517a(0x12a)]){case _0xec517a(0x11f):{const _0x126d60=_0x34e7e6[_0xec517a(0x10b)][_0xec517a(0x110)];_0x22b7fd[_0xec517a(0x11f)](_0x126d60);break;}}}),R(this['_injector'],_0x22b7fd);}));}[_0x43ccab(0x12f)](){const _0x49a759=_0x43ccab;this[_0x49a759(0x123)](this[_0x49a759(0x105)][_0x49a759(0xeb)][_0x49a759(0x119)](async _0x210c3d=>{const _0x931067=_0x49a759;var _0x1c130b,_0x1b7122,_0xa8d3a8,_0xb92b83;const _0x4245b1=(_0x1c130b=this[_0x931067(0x12d)][_0x931067(0x127)](_0x210c3d[_0x931067(0x11c)])[_0x931067(0x13c)](_0x37418e=>_0x37418e[_0x931067(0x147)]===_0x210c3d[_0x931067(0x147)]))==null?void 0x0:_0x1c130b[_0x931067(0xec)];if(!_0x4245b1)return;const {unitId:_0x1810b9,subUnitId:_0x46e62f}=_0x4245b1;switch(_0x210c3d[_0x931067(0x135)]&&this[_0x931067(0xf7)][_0x931067(0x10c)](_0x210c3d['user']),_0x210c3d[_0x931067(0x12a)]){case v[_0x931067(0x122)]:break;case v['Reply']:{this[_0x931067(0x12d)][_0x931067(0x116)](_0x1810b9,_0x46e62f,{'unitId':_0x1810b9,'subUnitId':_0x46e62f,'ref':'','id':_0x210c3d[_0x931067(0x130)],'dT':f(+_0x210c3d['createTimestamp']),'threadId':_0x210c3d['threadId'],'personId':(_0xa8d3a8=(_0x1b7122=_0x210c3d[_0x931067(0x135)])==null?void 0x0:_0x1b7122['userID'])!=null?_0xa8d3a8:_0x210c3d[_0x931067(0xe7)],'text':JSON[_0x931067(0x13a)](_0x210c3d['content']),'parentId':_0x4245b1['id']});break;}case v[_0x931067(0x138)]:{const _0x25a881=this[_0x931067(0x12d)][_0x931067(0xde)](_0x1810b9,_0x46e62f,_0x210c3d[_0x931067(0x130)]);_0x25a881&&_0x25a881[_0x931067(0xe0)]&&this[_0x931067(0x12d)]['deleteComment'](_0x1810b9,_0x46e62f,_0x210c3d['replyId']);break;}case v[_0x931067(0xe3)]:{this['_threadCommentModel'][_0x931067(0xf1)](_0x1810b9,_0x46e62f,{'commentId':_0x210c3d[_0x931067(0x130)],'text':JSON[_0x931067(0x13a)](_0x210c3d[_0x931067(0x143)])});break;}case v[_0x931067(0xe6)]:{const _0x18238c=(_0xb92b83=this[_0x931067(0x12d)][_0x931067(0x127)](_0x210c3d[_0x931067(0x11c)])[_0x931067(0x13c)](_0x2087fd=>_0x2087fd[_0x931067(0x147)]===_0x210c3d[_0x931067(0x147)]))==null?void 0x0:_0xb92b83['root'];_0x18238c&&this[_0x931067(0x12d)][_0x931067(0x118)](_0x1810b9,_0x46e62f,_0x18238c['id'],_0x210c3d[_0x931067(0x11e)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x43ccab(0x12b)](b[_0x43ccab(0x14b)])),S(0x1,c[_0x43ccab(0x12b)](M['ThreadCommentModel'])),S(0x2,c[_0x43ccab(0x12b)](c[_0x43ccab(0x114)])),S(0x3,c[_0x43ccab(0x12b)](c[_0x43ccab(0x148)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x43ccab(0xfa)],x=(_0x3b0c41,_0x37d3ac,_0x375f68,_0x1df15f)=>{const _0x426fb6=_0x43ccab;for(var _0x48b7f8=_0x1df15f>0x1?void 0x0:_0x1df15f?A(_0x37d3ac,_0x375f68):_0x37d3ac,_0x217df2=_0x3b0c41[_0x426fb6(0x144)]-0x1,_0x68d20d;_0x217df2>=0x0;_0x217df2--)(_0x68d20d=_0x3b0c41[_0x217df2])&&(_0x48b7f8=_0x68d20d(_0x48b7f8)||_0x48b7f8);return _0x48b7f8;},C=(_0x4c51fa,_0x6ba5f2)=>(_0x56c334,_0x1c930c)=>_0x6ba5f2(_0x56c334,_0x1c930c,_0x4c51fa);function Y(_0x3091a9,_0x1d6cb2){const _0x20d077=_0x43ccab,_0x42621f=_0x3091a9[_0x20d077(0x128)][0x0];return{..._0x1d6cb2,'id':_0x42621f['replyId'],'resolved':_0x3091a9[_0x20d077(0x11e)]===0x1,'dT':f(_0x42621f[_0x20d077(0xf5)]),'personId':_0x42621f[_0x20d077(0xe7)],'threadId':_0x42621f[_0x20d077(0x147)]};}function G(_0x6d38a2,_0x54dadc,_0x5185b1){const _0x4ca0fb=_0x43ccab;var _0xead5bb,_0x2bde0b;if(((_0x2bde0b=(_0xead5bb=_0x6d38a2==null?void 0x0:_0x6d38a2['replies'])==null?void 0x0:_0xead5bb[_0x4ca0fb(0x144)])!=null?_0x2bde0b:0x0)>0x0){const _0x5094e4=(_0x291f1f,_0x29e1a7)=>({'id':_0x291f1f[_0x4ca0fb(0x130)],'threadId':_0x291f1f[_0x4ca0fb(0x147)],'dT':f(_0x291f1f[_0x4ca0fb(0xf5)]),'personId':_0x291f1f[_0x4ca0fb(0xe7)],'resolved':_0x6d38a2[_0x4ca0fb(0x11e)]===I[_0x4ca0fb(0x10d)],'unitId':_0x54dadc,'subUnitId':_0x5185b1,'text':JSON[_0x4ca0fb(0x13a)](_0x291f1f[_0x4ca0fb(0x143)]),'parentId':_0x29e1a7}),_0x100616=_0x5094e4(_0x6d38a2[_0x4ca0fb(0x128)][0x0]);return{..._0x100616,'children':_0x6d38a2[_0x4ca0fb(0x128)][_0x4ca0fb(0xdd)](0x1)[_0x4ca0fb(0x10e)](_0x203b1c=>_0x5094e4(_0x203b1c,_0x100616['id']))};}return null;}function _0x498d(_0x4b40a0,_0x3f6686){_0x4b40a0=_0x4b40a0-0xdd;const _0x1b2876=_0x1b28();let _0x498db1=_0x1b2876[_0x4b40a0];return _0x498db1;}let p=class{constructor(_0x45b010,_0x1546a6,_0x407de2){const _0x3474aa=_0x43ccab;this[_0x3474aa(0x11d)]=_0x45b010,this[_0x3474aa(0xf7)]=_0x1546a6,this[_0x3474aa(0x10a)]=_0x407de2;}async['addComment'](_0x4a0890){const _0x58f9c8=_0x43ccab;var _0x195c60,_0x547ace;const {parentId:_0x321e49,unitId:_0x2388ae,text:_0x19aee9,threadId:_0x746927}=_0x4a0890,_0x1458a1=(_0x547ace=(_0x195c60=_0x19aee9['customRanges'])==null?void 0x0:_0x195c60['filter'](_0x28a539=>_0x28a539['rangeType']===c[_0x58f9c8(0x14e)]['COMMENT'])[_0x58f9c8(0x10e)](_0x25cb5e=>_0x25cb5e[_0x58f9c8(0x149)]))!=null?_0x547ace:[],_0x974d5e=JSON[_0x58f9c8(0x133)](_0x19aee9),_0x35d5a9=(await this[_0x58f9c8(0x10a)][_0x58f9c8(0xfe)](_0x2388ae))[_0x58f9c8(0xf3)]();if(_0x321e49){const _0x260e51={'memberId':_0x35d5a9,'unitId':_0x2388ae,'content':_0x974d5e,'mention':_0x1458a1,'threadId':_0x746927},_0xefd969=(await this[_0x58f9c8(0x11d)][_0x58f9c8(0x10f)](_0x58f9c8(0x104)+_0x2388ae+'/reply',{'body':_0x260e51}))[_0x58f9c8(0x153)]['reply'];return{..._0x4a0890,'id':_0xefd969['replyId'],'dT':c[_0x58f9c8(0x146)](+_0xefd969[_0x58f9c8(0xf5)])[_0x58f9c8(0xfd)]('YYYY/MM/DD\x20HH:mm'),'personId':_0xefd969[_0x58f9c8(0xe7)]};}else{const _0xd1e06={'memberId':_0x35d5a9,'unitId':_0x2388ae,'content':_0x974d5e,'mention':_0x1458a1},_0x17f2d5=await this[_0x58f9c8(0x11d)][_0x58f9c8(0x10f)](_0x58f9c8(0x104)+_0x2388ae+_0x58f9c8(0x100),{'body':_0xd1e06});return Y(_0x17f2d5[_0x58f9c8(0x153)]['comment'],_0x4a0890);}}async[_0x43ccab(0xf1)](_0x284609){const _0x4c70ce=_0x43ccab;var _0x40792f,_0x20356b;const {text:_0x17d29c,unitId:_0x32c963}=_0x284609,_0x13a4cc=(_0x20356b=(_0x40792f=_0x17d29c[_0x4c70ce(0x124)])==null?void 0x0:_0x40792f[_0x4c70ce(0x102)](_0x1dcd2c=>_0x1dcd2c['rangeType']===c[_0x4c70ce(0x14e)]['COMMENT'])[_0x4c70ce(0x10e)](_0xdab722=>_0xdab722['rangeId']))!=null?_0x20356b:[],_0x2299c7=JSON[_0x4c70ce(0x133)](_0x17d29c),_0x2e0a60=_0x284609[_0x4c70ce(0x147)],_0x240b44=_0x284609['id'],_0x202886={'memberId':(await this[_0x4c70ce(0x10a)][_0x4c70ce(0xfe)](_0x32c963))[_0x4c70ce(0xf3)](),'unitId':_0x32c963,'threadId':_0x2e0a60,'mention':_0x13a4cc,'content':_0x2299c7,'replyId':_0x240b44},_0x1192b8=await this[_0x4c70ce(0x11d)][_0x4c70ce(0x10f)]('/universer-api/comment/unit/'+_0x32c963+_0x4c70ce(0x11a),{'body':_0x202886});return!_0x1192b8[_0x4c70ce(0x153)][_0x4c70ce(0x152)]||_0x1192b8[_0x4c70ce(0x153)]['error']['code']===0x1;}async[_0x43ccab(0x118)](_0x1b7b11){const _0x48da2e=_0x43ccab,{unitId:_0x5b9905}=_0x1b7b11,_0x573727=_0x1b7b11[_0x48da2e(0x147)],_0x24a903={'memberId':this[_0x48da2e(0xf7)]['getCurrentUser']()['userID'],'unitId':_0x5b9905,'threadId':_0x573727,'solved':_0x1b7b11['resolved']?I[_0x48da2e(0x10d)]:I['OpenOrReOpen']},_0x513d17=await this[_0x48da2e(0x11d)]['post'](_0x48da2e(0x104)+_0x5b9905+'/solved',{'body':_0x24a903});return!_0x513d17[_0x48da2e(0x153)]['error']||_0x513d17['body'][_0x48da2e(0x152)][_0x48da2e(0x112)]===0x1;}async[_0x43ccab(0xe8)](_0x33c5fb,_0x150fec,_0x401e5f,_0x6b3dff){const _0x1d2bdc=_0x43ccab,_0x2e59d4={'memberId':(await this[_0x1d2bdc(0x10a)]['requireSession'](_0x33c5fb))['getMemberID'](),'threadId':_0x401e5f,'replyId':_0x6b3dff,'unitId':_0x33c5fb},_0x503c45=await this['_httpService'][_0x1d2bdc(0x10f)](_0x1d2bdc(0x104)+_0x33c5fb+_0x1d2bdc(0x132),{'body':_0x2e59d4});return!_0x503c45[_0x1d2bdc(0x153)][_0x1d2bdc(0x152)]||_0x503c45[_0x1d2bdc(0x153)][_0x1d2bdc(0x152)]['code']===0x1;}async[_0x43ccab(0x103)](_0x1038f4,_0x4951d2,_0x24dd66){const _0xd75d04=_0x43ccab,_0x1a9c6e={'unitId':_0x1038f4,'threadId':_0x24dd66},_0x4838b3=await this[_0xd75d04(0x11d)][_0xd75d04(0x10f)](_0xd75d04(0x104)+_0x1038f4+_0xd75d04(0x142),{'body':_0x1a9c6e}),_0x2e4f60=_0x24dd66[_0xd75d04(0x10e)](_0x5a85c2=>G(_0x4838b3[_0xd75d04(0x153)][_0xd75d04(0xdf)][_0x5a85c2],_0x1038f4,_0x4951d2))[_0xd75d04(0x102)](Boolean);return Object[_0xd75d04(0x129)](_0x4838b3[_0xd75d04(0x153)][_0xd75d04(0xef)])[_0xd75d04(0x14a)](_0x3c9d5e=>{const _0x173d7d=_0xd75d04;this['_userService'][_0x173d7d(0x10c)](_0x3c9d5e);}),_0x2e4f60;}[_0x43ccab(0x14f)](_0x291eb5){return{'id':_0x291eb5['id'],'threadId':_0x291eb5['threadId'],'ref':_0x291eb5['ref']};}};p=x([C(0x0,c['Inject'](P[_0x43ccab(0xfb)])),C(0x1,c[_0x43ccab(0x12b)](c[_0x43ccab(0x114)])),C(0x2,c[_0x43ccab(0x12b)](b[_0x43ccab(0xf2)]))],p);var H=Object[_0x43ccab(0xfa)],J=(_0x5d5690,_0x43de71,_0xf87102,_0x3b63af)=>{for(var _0x22e3d9=_0x3b63af>0x1?void 0x0:_0x3b63af?H(_0x43de71,_0xf87102):_0x43de71,_0x175381=_0x5d5690['length']-0x1,_0x2eb1d5;_0x175381>=0x0;_0x175381--)(_0x2eb1d5=_0x5d5690[_0x175381])&&(_0x22e3d9=_0x2eb1d5(_0x22e3d9)||_0x22e3d9);return _0x22e3d9;},y=(_0x5a7a31,_0x30d09e)=>(_0x49f54f,_0x1b64d3)=>_0x30d09e(_0x49f54f,_0x1b64d3,_0x5a7a31);let g=class extends c['Disposable']{constructor(_0x43716f,_0x19a159){const _0x9c856a=_0x43ccab;super(),this[_0x9c856a(0x109)]=_0x43716f,this[_0x9c856a(0x106)]=_0x19a159,this[_0x9c856a(0x115)]();}['_initDataSource'](){const _0x5d21aa=_0x43ccab;this[_0x5d21aa(0x109)][_0x5d21aa(0xee)]=this[_0x5d21aa(0x106)],this['_threadCommentDataSourceService'][_0x5d21aa(0x126)]=!0x1;}};g=J([y(0x0,M[_0x43ccab(0x139)]),y(0x1,c[_0x43ccab(0x12b)](p))],g);var F=Object[_0x43ccab(0x14c)],L=Object[_0x43ccab(0xfa)],Z=(_0x241ab3,_0x131cac,_0xa9a35e)=>_0x131cac in _0x241ab3?F(_0x241ab3,_0x131cac,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xa9a35e}):_0x241ab3[_0x131cac]=_0xa9a35e,W=(_0x2cd0a0,_0x3e43c4,_0x44f326,_0x5632b3)=>{const _0x20c85b=_0x43ccab;for(var _0x49cf67=_0x5632b3>0x1?void 0x0:_0x5632b3?L(_0x3e43c4,_0x44f326):_0x3e43c4,_0x26dc9e=_0x2cd0a0[_0x20c85b(0x144)]-0x1,_0x45c06c;_0x26dc9e>=0x0;_0x26dc9e--)(_0x45c06c=_0x2cd0a0[_0x26dc9e])&&(_0x49cf67=_0x45c06c(_0x49cf67)||_0x49cf67);return _0x49cf67;},O=(_0x505917,_0x21cb7a)=>(_0x4285c4,_0x51a238)=>_0x21cb7a(_0x4285c4,_0x51a238,_0x505917),N=(_0x240320,_0x472aa6,_0x519416)=>Z(_0x240320,typeof _0x472aa6!='symbol'?_0x472aa6+'':_0x472aa6,_0x519416);exports[_0x43ccab(0x120)]=class extends c[_0x43ccab(0x141)]{constructor(_0x5aee77=D,_0x2667d9,_0x19ccb9){const _0x24cb98=_0x43ccab;super(),this[_0x24cb98(0x13b)]=_0x5aee77,this[_0x24cb98(0x145)]=_0x2667d9,this[_0x24cb98(0x11b)]=_0x19ccb9;const {..._0x4adb80}=c[_0x24cb98(0x150)]({},D,this['_config']);this['_configService'][_0x24cb98(0xf6)](q,_0x4adb80);}[_0x43ccab(0xea)](){[[p],[g],[_]]['forEach'](_0x43a23a=>{const _0x55b046=_0x498d;this[_0x55b046(0x145)][_0x55b046(0x11f)](_0x43a23a);});}[_0x43ccab(0xe1)](){const _0x5f3b8a=_0x43ccab;this[_0x5f3b8a(0x145)][_0x5f3b8a(0xe4)](g),this[_0x5f3b8a(0x145)]['get'](_);}},N(exports[_0x43ccab(0x120)],_0x43ccab(0x12e),U),N(exports[_0x43ccab(0x120)],_0x43ccab(0x12a),c[_0x43ccab(0x140)][_0x43ccab(0x12c)]),exports[_0x43ccab(0x120)]=W([c[_0x43ccab(0x13f)](w[_0x43ccab(0xe9)],b['UniverCollaborationClientPlugin'],T[_0x43ccab(0x151)]),O(0x1,c[_0x43ccab(0x12b)](c[_0x43ccab(0x148)])),O(0x2,c[_0x43ccab(0x107)])],exports[_0x43ccab(0x120)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3cd8c3=_0x5246;(function(_0x303c41,_0x5ab185){const _0x3c7fba=_0x5246,_0x4c0178=_0x303c41();while(!![]){try{const _0x53092c=-parseInt(_0x3c7fba(0xec))/0x1*(parseInt(_0x3c7fba(0x128))/0x2)+parseInt(_0x3c7fba(0x113))/0x3+-parseInt(_0x3c7fba(0xfb))/0x4*(-parseInt(_0x3c7fba(0x115))/0x5)+-parseInt(_0x3c7fba(0x10b))/0x6*(-parseInt(_0x3c7fba(0xe3))/0x7)+parseInt(_0x3c7fba(0x102))/0x8+parseInt(_0x3c7fba(0x11c))/0x9*(parseInt(_0x3c7fba(0x13e))/0xa)+-parseInt(_0x3c7fba(0xee))/0xb;if(_0x53092c===_0x5ab185)break;else _0x4c0178['push'](_0x4c0178['shift']());}catch(_0x49af91){_0x4c0178['push'](_0x4c0178['shift']());}}}(_0xd3eb,0x6e342));import{CommentService as _0x12372b,CollaborationSessionService as _0x13af67,UniverCollaborationClientPlugin as _0xebf8a9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x27609b}from'@univerjs-pro/license';import{dayjs as _0x1bdee6,UserManagerService as _0x948e73,Inject as _0x25eae3,Injector as _0x245dbf,Disposable as _0x2250bd,CustomRangeType as _0x438108,UniverInstanceType as _0x3622ec,DependentOn as _0x4a67e7,IConfigService as _0x3d1f60,Plugin as _0x11527a,merge as _0xfb99a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x167a39}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25573b,IThreadCommentDataSourceService as _0x2d1481}from'@univerjs/thread-comment';import{bufferTime as _0x5b44d5}from'rxjs';import{HTTPService as _0x290f9b}from'@univerjs/network';const W=_0x3cd8c3(0x11f);var I=(_0x4343d7=>(_0x4343d7[_0x4343d7['OpenOrReOpen']=0x0]=_0x3cd8c3(0x140),_0x4343d7[_0x4343d7['Solved']=0x1]=_0x3cd8c3(0x122),_0x4343d7[_0x4343d7['UNRECOGNIZED']=-0x1]=_0x3cd8c3(0x10c),_0x4343d7))(I||{}),v=(_0x57c5df=>(_0x57c5df[_0x57c5df[_0x3cd8c3(0xe9)]=0x0]=_0x3cd8c3(0xe9),_0x57c5df[_0x57c5df[_0x3cd8c3(0x11a)]=0x1]=_0x3cd8c3(0x11a),_0x57c5df[_0x57c5df['Reply']=0x2]=_0x3cd8c3(0xf6),_0x57c5df[_0x57c5df[_0x3cd8c3(0xf1)]=0x3]=_0x3cd8c3(0xf1),_0x57c5df[_0x57c5df[_0x3cd8c3(0xeb)]=0x4]=_0x3cd8c3(0xeb),_0x57c5df[_0x57c5df['Solve']=0x5]=_0x3cd8c3(0xe6),_0x57c5df[_0x57c5df[_0x3cd8c3(0x10c)]=-0x1]=_0x3cd8c3(0x10c),_0x57c5df))(v||{});const y=_0xbaf0a7=>_0x1bdee6(new Date(+_0xbaf0a7))[_0x3cd8c3(0x144)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bf735,_0x268c59)=>{const _0x2d1f71=_0x3cd8c3,_0x32c3f0=_0x3bf735['get'](_0x948e73),_0x5207ca=_0x3bf735[_0x2d1f71(0x11d)](_0x290f9b);_0x268c59[_0x2d1f71(0x145)](_0x31cd7b=>{const _0x469caa=_0x2d1f71;_0x32c3f0[_0x469caa(0x126)](_0x31cd7b)&&_0x268c59[_0x469caa(0x134)](_0x31cd7b);}),_0x268c59['size']&&(await _0x5207ca[_0x2d1f71(0x11d)](_0x2d1f71(0x124),{'params':{'userIDs':[..._0x268c59]}}))[_0x2d1f71(0x106)]['users'][_0x2d1f71(0x145)](_0x265ec3=>{const _0x346896=_0x2d1f71;_0x265ec3&&_0x32c3f0[_0x346896(0x137)](_0x265ec3);});};var K=Object[_0x3cd8c3(0x121)],V=(_0x8001a2,_0x42a89b,_0x3525f8,_0x4714e4)=>{const _0x4d6f24=_0x3cd8c3;for(var _0x1620bb=_0x4714e4>0x1?void 0x0:_0x4714e4?K(_0x42a89b,_0x3525f8):_0x42a89b,_0x4ff418=_0x8001a2[_0x4d6f24(0x10a)]-0x1,_0xaff0fb;_0x4ff418>=0x0;_0x4ff418--)(_0xaff0fb=_0x8001a2[_0x4ff418])&&(_0x1620bb=_0xaff0fb(_0x1620bb)||_0x1620bb);return _0x1620bb;},p=(_0x2cf1db,_0x394f2d)=>(_0x1dfb0e,_0xc385c6)=>_0x394f2d(_0x1dfb0e,_0xc385c6,_0x2cf1db);let _=class extends _0x2250bd{constructor(_0x664652,_0x1eba39,_0x364cc6,_0x5a46e6){const _0x3af1b2=_0x3cd8c3;super(),this[_0x3af1b2(0x111)]=_0x664652,this[_0x3af1b2(0xe7)]=_0x1eba39,this[_0x3af1b2(0x112)]=_0x364cc6,this['_injector']=_0x5a46e6,this[_0x3af1b2(0xea)](),this[_0x3af1b2(0x109)]();}[_0x3cd8c3(0x109)](){const _0xf568b1=_0x3cd8c3;this['disposeWithMe'](this[_0xf568b1(0xe7)][_0xf568b1(0x133)][_0xf568b1(0x103)](_0x5b44d5(0x10))[_0xf568b1(0x13d)](_0x1f84c9=>{const _0x1c7740=_0xf568b1,_0x548c18=new Set();_0x1f84c9[_0x1c7740(0x145)](_0xce5b0d=>{const _0x3eb078=_0x1c7740;switch(_0xce5b0d[_0x3eb078(0x138)]){case _0x3eb078(0x132):{const _0x3cbbd5=_0xce5b0d[_0x3eb078(0x116)][_0x3eb078(0x149)];_0x548c18[_0x3eb078(0x132)](_0x3cbbd5);break;}}}),B(this[_0x1c7740(0x139)],_0x548c18);}));}[_0x3cd8c3(0xea)](){const _0x3d9c45=_0x3cd8c3;this[_0x3d9c45(0xfa)](this[_0x3d9c45(0x111)][_0x3d9c45(0x133)][_0x3d9c45(0x13d)](async _0x49c116=>{const _0xd97adc=_0x3d9c45;var _0x1a6c15,_0x19e6f9,_0x7f824c,_0x3301c1;const _0x2889a3=(_0x1a6c15=this[_0xd97adc(0xe7)]['getUnit'](_0x49c116[_0xd97adc(0x117)])['find'](_0x36866c=>_0x36866c['threadId']===_0x49c116[_0xd97adc(0x119)]))==null?void 0x0:_0x1a6c15[_0xd97adc(0xf7)];if(!_0x2889a3)return;const {unitId:_0x870ed,subUnitId:_0x3b12ee}=_0x2889a3;switch(_0x49c116[_0xd97adc(0x10d)]&&this[_0xd97adc(0x112)][_0xd97adc(0x137)](_0x49c116[_0xd97adc(0x10d)]),_0x49c116[_0xd97adc(0x138)]){case v[_0xd97adc(0x11a)]:break;case v[_0xd97adc(0xf6)]:{this['_threadCommentModel'][_0xd97adc(0x10f)](_0x870ed,_0x3b12ee,{'unitId':_0x870ed,'subUnitId':_0x3b12ee,'ref':'','id':_0x49c116[_0xd97adc(0x13f)],'dT':y(+_0x49c116[_0xd97adc(0x13a)]),'threadId':_0x49c116[_0xd97adc(0x119)],'personId':(_0x7f824c=(_0x19e6f9=_0x49c116[_0xd97adc(0x10d)])==null?void 0x0:_0x19e6f9['userID'])!=null?_0x7f824c:_0x49c116['userId'],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)]),'parentId':_0x2889a3['id']});break;}case v[_0xd97adc(0xeb)]:{const _0x4e455e=this[_0xd97adc(0xe7)][_0xd97adc(0x108)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);_0x4e455e&&_0x4e455e[_0xd97adc(0x100)]&&this[_0xd97adc(0xe7)][_0xd97adc(0x110)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);break;}case v[_0xd97adc(0xf1)]:{this[_0xd97adc(0xe7)]['updateComment'](_0x870ed,_0x3b12ee,{'commentId':_0x49c116[_0xd97adc(0x13f)],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)])});break;}case v[_0xd97adc(0xe6)]:{const _0x20112e=(_0x3301c1=this[_0xd97adc(0xe7)][_0xd97adc(0x129)](_0x49c116['unitId'])['find'](_0x4d40c3=>_0x4d40c3[_0xd97adc(0x119)]===_0x49c116['threadId']))==null?void 0x0:_0x3301c1[_0xd97adc(0xf7)];_0x20112e&&this[_0xd97adc(0xe7)]['resolveComment'](_0x870ed,_0x3b12ee,_0x20112e['id'],_0x49c116[_0xd97adc(0x11b)]===I[_0xd97adc(0x122)]);break;}}}));}};_=V([p(0x0,_0x25eae3(_0x12372b)),p(0x1,_0x25eae3(_0x25573b)),p(0x2,_0x25eae3(_0x948e73)),p(0x3,_0x25eae3(_0x245dbf))],_);function _0x5246(_0x329e47,_0x18a5bb){_0x329e47=_0x329e47-0xe2;const _0xd3eba=_0xd3eb();let _0x52460b=_0xd3eba[_0x329e47];return _0x52460b;}const z=_0x3cd8c3(0x141),O={};var k=Object[_0x3cd8c3(0x121)],Q=(_0x546993,_0x3b008f,_0x5d2cd9,_0x3b0c37)=>{const _0x5edb3f=_0x3cd8c3;for(var _0x79483b=_0x3b0c37>0x1?void 0x0:_0x3b0c37?k(_0x3b008f,_0x5d2cd9):_0x3b008f,_0x58fad3=_0x546993[_0x5edb3f(0x10a)]-0x1,_0x534c47;_0x58fad3>=0x0;_0x58fad3--)(_0x534c47=_0x546993[_0x58fad3])&&(_0x79483b=_0x534c47(_0x79483b)||_0x79483b);return _0x79483b;},b=(_0xa55114,_0x19c916)=>(_0x2bb6d7,_0x4a650d)=>_0x19c916(_0x2bb6d7,_0x4a650d,_0xa55114);function X(_0x1dd8c2,_0x41b9c6){const _0xd7b116=_0x3cd8c3,_0x4d703c=_0x1dd8c2[_0xd7b116(0xfe)][0x0];return{..._0x41b9c6,'id':_0x4d703c[_0xd7b116(0x13f)],'resolved':_0x1dd8c2[_0xd7b116(0x11b)]===0x1,'dT':y(_0x4d703c[_0xd7b116(0x13a)]),'personId':_0x4d703c[_0xd7b116(0xf5)],'threadId':_0x4d703c[_0xd7b116(0x119)]};}function ee(_0x2c613b,_0x46cb6d,_0x3546e4){const _0x4b4906=_0x3cd8c3;var _0x491973,_0x2b84de;if(((_0x2b84de=(_0x491973=_0x2c613b==null?void 0x0:_0x2c613b[_0x4b4906(0xfe)])==null?void 0x0:_0x491973[_0x4b4906(0x10a)])!=null?_0x2b84de:0x0)>0x0){const _0x531dce=(_0x34a178,_0x40ba87)=>({'id':_0x34a178[_0x4b4906(0x13f)],'threadId':_0x34a178[_0x4b4906(0x119)],'dT':y(_0x34a178[_0x4b4906(0x13a)]),'personId':_0x34a178['userId'],'resolved':_0x2c613b[_0x4b4906(0x11b)]===I[_0x4b4906(0x122)],'unitId':_0x46cb6d,'subUnitId':_0x3546e4,'text':JSON[_0x4b4906(0x148)](_0x34a178[_0x4b4906(0x125)]),'parentId':_0x40ba87}),_0x4d8f36=_0x531dce(_0x2c613b[_0x4b4906(0xfe)][0x0]);return{..._0x4d8f36,'children':_0x2c613b['replies'][_0x4b4906(0x142)](0x1)[_0x4b4906(0xff)](_0x5a5063=>_0x531dce(_0x5a5063,_0x4d8f36['id']))};}return null;}let S=class{constructor(_0x435483,_0x551482,_0x45502d){const _0x1ef87e=_0x3cd8c3;this[_0x1ef87e(0xf3)]=_0x435483,this['_userService']=_0x551482,this[_0x1ef87e(0x11e)]=_0x45502d;}async['addComment'](_0x4c6bc6){const _0x405b9c=_0x3cd8c3;var _0x23a6e3,_0xf3bcee;const {parentId:_0x8c6f0b,unitId:_0x254788,text:_0x2e842c,threadId:_0x3981aa}=_0x4c6bc6,_0x838d6=(_0xf3bcee=(_0x23a6e3=_0x2e842c['customRanges'])==null?void 0x0:_0x23a6e3['filter'](_0x59f64b=>_0x59f64b[_0x405b9c(0x118)]===_0x438108[_0x405b9c(0x131)])[_0x405b9c(0xff)](_0x16df6c=>_0x16df6c[_0x405b9c(0xf9)]))!=null?_0xf3bcee:[],_0x4cc774=JSON['stringify'](_0x2e842c),_0xa5c1be=(await this[_0x405b9c(0x11e)][_0x405b9c(0x13b)](_0x254788))[_0x405b9c(0x10e)]();if(_0x8c6f0b){const _0x2cab31={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6,'threadId':_0x3981aa},_0xb13c66=(await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x130),{'body':_0x2cab31}))[_0x405b9c(0x106)][_0x405b9c(0x12b)];return{..._0x4c6bc6,'id':_0xb13c66['replyId'],'dT':_0x1bdee6(+_0xb13c66[_0x405b9c(0x13a)])[_0x405b9c(0x144)](_0x405b9c(0x146)),'personId':_0xb13c66[_0x405b9c(0xf5)]};}else{const _0x46c38b={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6},_0x6f9736=await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x114),{'body':_0x46c38b});return X(_0x6f9736['body']['comment'],_0x4c6bc6);}}async[_0x3cd8c3(0xf2)](_0x570f80){const _0x4aac2f=_0x3cd8c3;var _0x3f0bdd,_0x5cb2c7;const {text:_0x188382,unitId:_0x2132d0}=_0x570f80,_0x177849=(_0x5cb2c7=(_0x3f0bdd=_0x188382[_0x4aac2f(0x120)])==null?void 0x0:_0x3f0bdd[_0x4aac2f(0xfd)](_0x51a59d=>_0x51a59d[_0x4aac2f(0x118)]===_0x438108['COMMENT'])[_0x4aac2f(0xff)](_0x599114=>_0x599114['rangeId']))!=null?_0x5cb2c7:[],_0x469ce6=JSON[_0x4aac2f(0x123)](_0x188382),_0x272a73=_0x570f80['threadId'],_0x6b428b=_0x570f80['id'],_0x3a9c89={'memberId':(await this[_0x4aac2f(0x11e)][_0x4aac2f(0x13b)](_0x2132d0))[_0x4aac2f(0x10e)](),'unitId':_0x2132d0,'threadId':_0x272a73,'mention':_0x177849,'content':_0x469ce6,'replyId':_0x6b428b},_0x738c07=await this[_0x4aac2f(0xf3)][_0x4aac2f(0xef)](_0x4aac2f(0xed)+_0x2132d0+'/edit',{'body':_0x3a9c89});return!_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)]||_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)][_0x4aac2f(0xfc)]===0x1;}async[_0x3cd8c3(0x101)](_0xbc399d){const _0x391083=_0x3cd8c3,{unitId:_0x3a39c8}=_0xbc399d,_0x532295=_0xbc399d['threadId'],_0x222aa5={'memberId':this[_0x391083(0x112)][_0x391083(0x136)]()[_0x391083(0xe8)],'unitId':_0x3a39c8,'threadId':_0x532295,'solved':_0xbc399d['resolved']?I[_0x391083(0x122)]:I['OpenOrReOpen']},_0x262844=await this[_0x391083(0xf3)][_0x391083(0xef)](_0x391083(0xed)+_0x3a39c8+_0x391083(0x12e),{'body':_0x222aa5});return!_0x262844['body'][_0x391083(0x12c)]||_0x262844[_0x391083(0x106)]['error']['code']===0x1;}async[_0x3cd8c3(0x110)](_0x3ded6d,_0x89f6b6,_0x10231c,_0x1f5ee0){const _0x1e3340=_0x3cd8c3,_0x5c2ca8={'memberId':(await this[_0x1e3340(0x11e)]['requireSession'](_0x3ded6d))[_0x1e3340(0x10e)](),'threadId':_0x10231c,'replyId':_0x1f5ee0,'unitId':_0x3ded6d},_0x29f922=await this['_httpService'][_0x1e3340(0xef)]('/universer-api/comment/unit/'+_0x3ded6d+_0x1e3340(0x12f),{'body':_0x5c2ca8});return!_0x29f922['body'][_0x1e3340(0x12c)]||_0x29f922[_0x1e3340(0x106)]['error'][_0x1e3340(0xfc)]===0x1;}async[_0x3cd8c3(0x107)](_0x3f6d3b,_0x586d2c,_0x5de6ca){const _0x2745a4=_0x3cd8c3,_0x318762={'unitId':_0x3f6d3b,'threadId':_0x5de6ca},_0x124747=await this['_httpService'][_0x2745a4(0xef)](_0x2745a4(0xed)+_0x3f6d3b+_0x2745a4(0xf0),{'body':_0x318762}),_0x565892=_0x5de6ca['map'](_0x11d7cd=>ee(_0x124747['body'][_0x2745a4(0x12d)][_0x11d7cd],_0x3f6d3b,_0x586d2c))[_0x2745a4(0xfd)](Boolean);return Object[_0x2745a4(0xe5)](_0x124747[_0x2745a4(0x106)]['users'])[_0x2745a4(0x145)](_0x668c04=>{const _0x123a2f=_0x2745a4;this[_0x123a2f(0x112)][_0x123a2f(0x137)](_0x668c04);}),_0x565892;}[_0x3cd8c3(0x135)](_0x4f1e54){const _0xebaec5=_0x3cd8c3;return{'id':_0x4f1e54['id'],'threadId':_0x4f1e54['threadId'],'ref':_0x4f1e54[_0xebaec5(0x12a)]};}};S=Q([b(0x0,_0x25eae3(_0x290f9b)),b(0x1,_0x25eae3(_0x948e73)),b(0x2,_0x25eae3(_0x13af67))],S);var re=Object[_0x3cd8c3(0x121)],te=(_0x2e49b8,_0x22cc17,_0x21ff40,_0x4e8be2)=>{const _0x469c92=_0x3cd8c3;for(var _0x5b659f=_0x4e8be2>0x1?void 0x0:_0x4e8be2?re(_0x22cc17,_0x21ff40):_0x22cc17,_0x2f87d4=_0x2e49b8[_0x469c92(0x10a)]-0x1,_0x37c24f;_0x2f87d4>=0x0;_0x2f87d4--)(_0x37c24f=_0x2e49b8[_0x2f87d4])&&(_0x5b659f=_0x37c24f(_0x5b659f)||_0x5b659f);return _0x5b659f;},M=(_0x86d5f,_0x4edead)=>(_0x47073b,_0x3bbe96)=>_0x4edead(_0x47073b,_0x3bbe96,_0x86d5f);let f=class extends _0x2250bd{constructor(_0x1c7893,_0x4c7bb5){const _0xd2d9e8=_0x3cd8c3;super(),this[_0xd2d9e8(0xf8)]=_0x1c7893,this[_0xd2d9e8(0x105)]=_0x4c7bb5,this[_0xd2d9e8(0xe4)]();}['_initDataSource'](){const _0xd6b21a=_0x3cd8c3;this[_0xd6b21a(0xf8)]['dataSource']=this[_0xd6b21a(0x105)],this['_threadCommentDataSourceService'][_0xd6b21a(0x127)]=!0x1;}};f=te([M(0x0,_0x2d1481),M(0x1,_0x25eae3(S))],f);function _0xd3eb(){const _0x52cab1=['subscribe','244300ewILnb','replyId','OpenOrReOpen','thread-comment-data-source.config','slice','onReady','format','forEach','YYYY/MM/DD\x20HH:mm','defineProperty','parse','personId','UNIVER_UNKNOWN','_config','onStarting','91SWajyh','_initDataSource','values','Solve','_threadCommentModel','userID','Unknown','_init','Delete','97IDVpED','/universer-api/comment/unit/','16767102EuaCYq','post','/list','Edit','updateComment','_httpService','_configService','userId','Reply','root','_threadCommentDataSourceService','rangeId','disposeWithMe','5532lGRfIj','code','filter','replies','map','parentId','resolveComment','1919384qMOqnD','pipe','pluginName','_threadCommentDataSource','body','listComments','getComment','_initUserSync','length','17670OGMWpP','UNRECOGNIZED','user','getMemberID','addComment','deleteComment','_commentService','_userService','2036673tARMGN','/add','1510UHdoqN','payload','unitId','rangeType','threadId','Add','solved','252eRLTxr','get','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','getOwnPropertyDescriptor','Solved','stringify','/universer-api/user/list','content','getUser','syncUpdateMutationToColla','1714uNUbsM','getUnit','ref','reply','error','comments','/solved','/delete','/reply','COMMENT','add','commentUpdate$','delete','saveCommentToSnapshot','getCurrentUser','addUser','type','_injector','createTimestamp','requireSession','setConfig'];_0xd3eb=function(){return _0x52cab1;};return _0xd3eb();}var se=Object[_0x3cd8c3(0x147)],oe=Object[_0x3cd8c3(0x121)],ne=(_0x21232c,_0x2eb2ea,_0x3a12ba)=>_0x2eb2ea in _0x21232c?se(_0x21232c,_0x2eb2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a12ba}):_0x21232c[_0x2eb2ea]=_0x3a12ba,ie=(_0x51797e,_0x2ea2bb,_0x3cd3a0,_0x425d8d)=>{const _0x3b4a94=_0x3cd8c3;for(var _0x5e97b7=_0x425d8d>0x1?void 0x0:_0x425d8d?oe(_0x2ea2bb,_0x3cd3a0):_0x2ea2bb,_0x25ca92=_0x51797e[_0x3b4a94(0x10a)]-0x1,_0x327cb5;_0x25ca92>=0x0;_0x25ca92--)(_0x327cb5=_0x51797e[_0x25ca92])&&(_0x5e97b7=_0x327cb5(_0x5e97b7)||_0x5e97b7);return _0x5e97b7;},N=(_0x1f42f0,_0x22cda6)=>(_0x1d375b,_0x5258d2)=>_0x22cda6(_0x1d375b,_0x5258d2,_0x1f42f0),$=(_0x5567c1,_0x180cf1,_0xd130e9)=>ne(_0x5567c1,typeof _0x180cf1!='symbol'?_0x180cf1+'':_0x180cf1,_0xd130e9);let g=class extends _0x11527a{constructor(_0x1b9e80=O,_0x766dd9,_0x3561c1){const _0x12294b=_0x3cd8c3;super(),this['_config']=_0x1b9e80,this[_0x12294b(0x139)]=_0x766dd9,this[_0x12294b(0xf4)]=_0x3561c1;const {..._0x25b780}=_0xfb99a3({},O,this[_0x12294b(0x14b)]);this[_0x12294b(0xf4)][_0x12294b(0x13c)](z,_0x25b780);}[_0x3cd8c3(0xe2)](){const _0x4e82fe=_0x3cd8c3;[[S],[f],[_]][_0x4e82fe(0x145)](_0x43197d=>{const _0x3ce87a=_0x4e82fe;this[_0x3ce87a(0x139)][_0x3ce87a(0x132)](_0x43197d);});}[_0x3cd8c3(0x143)](){const _0x2cd861=_0x3cd8c3;this['_injector'][_0x2cd861(0x11d)](f),this['_injector']['get'](_);}};$(g,_0x3cd8c3(0x104),W),$(g,_0x3cd8c3(0x138),_0x3622ec[_0x3cd8c3(0x14a)]),g=ie([_0x4a67e7(_0x167a39,_0xebf8a9,_0x27609b),N(0x1,_0x25eae3(_0x245dbf)),N(0x2,_0x3d1f60)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x34024c=_0x5be3;(function(_0x5c622f,_0x52bf93){const _0x5c70d0=_0x5be3,_0x3249d4=_0x5c622f();while(!![]){try{const _0x52e758=-parseInt(_0x5c70d0(0x1d0))/0x1+parseInt(_0x5c70d0(0x1cb))/0x2*(-parseInt(_0x5c70d0(0x1d6))/0x3)+-parseInt(_0x5c70d0(0x1b8))/0x4+-parseInt(_0x5c70d0(0x1b3))/0x5+parseInt(_0x5c70d0(0x1dd))/0x6+-parseInt(_0x5c70d0(0x1cf))/0x7+parseInt(_0x5c70d0(0x19b))/0x8;if(_0x52e758===_0x52bf93)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x1bb696){_0x3249d4['push'](_0x3249d4['shift']());}}}(_0x2c5a,0xb8804));import{CommentService as _0x1b5be1,CollaborationSessionService as _0x17f016,UniverCollaborationClientPlugin as _0x46d5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf589bd}from'@univerjs-pro/license';import{dayjs as _0x57f149,UserManagerService as _0x1feaec,Inject as _0x1641e7,Injector as _0x5130d8,Disposable as _0x577d5c,CustomRangeType as _0x48489b,UniverInstanceType as _0x1cfbda,DependentOn as _0x114dff,IConfigService as _0x10c05b,Plugin as _0x5ad258,merge as _0x239049}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59bd5d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa45dbf,IThreadCommentDataSourceService as _0x18ef7c}from'@univerjs/thread-comment';import{bufferTime as _0x2d9430}from'rxjs';import{HTTPService as _0x55367e}from'@univerjs/network';const W=_0x34024c(0x1d5);var I=(_0x3390e7=>(_0x3390e7[_0x3390e7[_0x34024c(0x1e5)]=0x0]=_0x34024c(0x1e5),_0x3390e7[_0x3390e7[_0x34024c(0x1ba)]=0x1]=_0x34024c(0x1ba),_0x3390e7[_0x3390e7[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x3390e7))(I||{}),v=(_0x45831e=>(_0x45831e[_0x45831e[_0x34024c(0x1de)]=0x0]='Unknown',_0x45831e[_0x45831e[_0x34024c(0x19c)]=0x1]='Add',_0x45831e[_0x45831e['Reply']=0x2]=_0x34024c(0x1f8),_0x45831e[_0x45831e[_0x34024c(0x1c1)]=0x3]=_0x34024c(0x1c1),_0x45831e[_0x45831e['Delete']=0x4]='Delete',_0x45831e[_0x45831e[_0x34024c(0x1a2)]=0x5]=_0x34024c(0x1a2),_0x45831e[_0x45831e[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x45831e))(v||{});const y=_0x5b355d=>_0x57f149(new Date(+_0x5b355d))['format'](_0x34024c(0x1a6)),B=async(_0x17c5a2,_0x16a130)=>{const _0x41c8aa=_0x34024c,_0x3f72e9=_0x17c5a2[_0x41c8aa(0x1d9)](_0x1feaec),_0xad84a0=_0x17c5a2[_0x41c8aa(0x1d9)](_0x55367e);_0x16a130[_0x41c8aa(0x1f6)](_0x4f5a43=>{const _0x4976e8=_0x41c8aa;_0x3f72e9[_0x4976e8(0x1f3)](_0x4f5a43)&&_0x16a130[_0x4976e8(0x200)](_0x4f5a43);}),_0x16a130[_0x41c8aa(0x1ec)]&&(await _0xad84a0[_0x41c8aa(0x1d9)](_0x41c8aa(0x1db),{'params':{'userIDs':[..._0x16a130]}}))[_0x41c8aa(0x1b9)][_0x41c8aa(0x1d4)][_0x41c8aa(0x1f6)](_0x842289=>{const _0x5e289f=_0x41c8aa;_0x842289&&_0x3f72e9[_0x5e289f(0x1b6)](_0x842289);});};var K=Object[_0x34024c(0x1cc)],V=(_0x5f3d30,_0x1c2704,_0x55bb9d,_0x5315d7)=>{const _0xf0b0c2=_0x34024c;for(var _0x275314=_0x5315d7>0x1?void 0x0:_0x5315d7?K(_0x1c2704,_0x55bb9d):_0x1c2704,_0x2dee09=_0x5f3d30[_0xf0b0c2(0x1aa)]-0x1,_0x56e849;_0x2dee09>=0x0;_0x2dee09--)(_0x56e849=_0x5f3d30[_0x2dee09])&&(_0x275314=_0x56e849(_0x275314)||_0x275314);return _0x275314;},p=(_0x57b42d,_0x31ecf3)=>(_0x24c347,_0x3cd345)=>_0x31ecf3(_0x24c347,_0x3cd345,_0x57b42d);let _=class extends _0x577d5c{constructor(_0x5ae4a0,_0x47ab27,_0x35fb7d,_0x4ceb57){const _0x17c7ed=_0x34024c;super(),this['_commentService']=_0x5ae4a0,this['_threadCommentModel']=_0x47ab27,this[_0x17c7ed(0x1c4)]=_0x35fb7d,this['_injector']=_0x4ceb57,this[_0x17c7ed(0x1f7)](),this[_0x17c7ed(0x1b0)]();}[_0x34024c(0x1b0)](){const _0x33b2bc=_0x34024c;this[_0x33b2bc(0x1fb)](this[_0x33b2bc(0x1dc)][_0x33b2bc(0x1e1)][_0x33b2bc(0x1fd)](_0x2d9430(0x10))['subscribe'](_0x3059da=>{const _0x185ce8=_0x33b2bc,_0x12c00a=new Set();_0x3059da[_0x185ce8(0x1f6)](_0x1cdf69=>{const _0x1a20fc=_0x185ce8;switch(_0x1cdf69['type']){case _0x1a20fc(0x1e8):{const _0x29690f=_0x1cdf69[_0x1a20fc(0x1ae)][_0x1a20fc(0x1bf)];_0x12c00a['add'](_0x29690f);break;}}}),B(this[_0x185ce8(0x1bd)],_0x12c00a);}));}['_init'](){const _0x493807=_0x34024c;this[_0x493807(0x1fb)](this['_commentService'][_0x493807(0x1e1)]['subscribe'](async _0x50ec9a=>{const _0x521f6a=_0x493807;var _0x3d1775,_0xfd8eac,_0x2c265f,_0x42e616;const _0x51f1a3=(_0x3d1775=this['_threadCommentModel']['getUnit'](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x4e49a0=>_0x4e49a0[_0x521f6a(0x1f9)]===_0x50ec9a['threadId']))==null?void 0x0:_0x3d1775[_0x521f6a(0x1df)];if(!_0x51f1a3)return;const {unitId:_0x2e9807,subUnitId:_0x5da9ae}=_0x51f1a3;switch(_0x50ec9a[_0x521f6a(0x1f1)]&&this[_0x521f6a(0x1c4)][_0x521f6a(0x1b6)](_0x50ec9a[_0x521f6a(0x1f1)]),_0x50ec9a[_0x521f6a(0x1ea)]){case v[_0x521f6a(0x19c)]:break;case v[_0x521f6a(0x1f8)]:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1e7)](_0x2e9807,_0x5da9ae,{'unitId':_0x2e9807,'subUnitId':_0x5da9ae,'ref':'','id':_0x50ec9a[_0x521f6a(0x1b1)],'dT':y(+_0x50ec9a['createTimestamp']),'threadId':_0x50ec9a[_0x521f6a(0x1f9)],'personId':(_0x2c265f=(_0xfd8eac=_0x50ec9a[_0x521f6a(0x1f1)])==null?void 0x0:_0xfd8eac[_0x521f6a(0x1d7)])!=null?_0x2c265f:_0x50ec9a[_0x521f6a(0x19d)],'text':JSON['parse'](_0x50ec9a['content']),'parentId':_0x51f1a3['id']});break;}case v[_0x521f6a(0x1ef)]:{const _0x28dc6e=this['_threadCommentModel'][_0x521f6a(0x1a0)](_0x2e9807,_0x5da9ae,_0x50ec9a['replyId']);_0x28dc6e&&_0x28dc6e[_0x521f6a(0x1b2)]&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1fe)](_0x2e9807,_0x5da9ae,_0x50ec9a[_0x521f6a(0x1b1)]);break;}case v['Edit']:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1c0)](_0x2e9807,_0x5da9ae,{'commentId':_0x50ec9a['replyId'],'text':JSON[_0x521f6a(0x1b5)](_0x50ec9a[_0x521f6a(0x1eb)])});break;}case v['Solve']:{const _0x525ad2=(_0x42e616=this['_threadCommentModel'][_0x521f6a(0x202)](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x300f7e=>_0x300f7e[_0x521f6a(0x1f9)]===_0x50ec9a[_0x521f6a(0x1f9)]))==null?void 0x0:_0x42e616[_0x521f6a(0x1df)];_0x525ad2&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1d1)](_0x2e9807,_0x5da9ae,_0x525ad2['id'],_0x50ec9a[_0x521f6a(0x1fa)]===I[_0x521f6a(0x1ba)]);break;}}}));}};function _0x5be3(_0x49aadc,_0x1175b0){_0x49aadc=_0x49aadc-0x19a;const _0x2c5a1f=_0x2c5a();let _0x5be38c=_0x2c5a1f[_0x49aadc];return _0x5be38c;}function _0x2c5a(){const _0x185e46=['_sessionService','pipe','deleteComment','rangeType','delete','_httpService','getUnit','values','29070976lzuoVY','Add','userId','setConfig','_threadCommentDataSource','getComment','pluginName','Solve','/add','unitId','getMemberID','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','/solved','comment','length','/universer-api/comment/unit/','COMMENT','reply','payload','ref','_initUserSync','replyId','parentId','7023835WjPdcU','_threadCommentDataSourceService','parse','addUser','filter','1804348yOPkrL','body','Solved','_config','_configService','_injector','/edit','personId','updateComment','Edit','UNIVER_UNKNOWN','rangeId','_userService','listComments','replies','saveCommentToSnapshot','map','UNRECOGNIZED','stringify','51886vfHlRC','getOwnPropertyDescriptor','format','post','127785yQLyfq','205305ogzASL','resolveComment','createTimestamp','/delete','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','93hSZgMM','userID','requireSession','get','/list','/universer-api/user/list','_threadCommentModel','32946ZGHgJB','Unknown','root','symbol','commentUpdate$','syncUpdateMutationToColla','code','getCurrentUser','OpenOrReOpen','/reply','addComment','add','find','type','content','size','comments','error','Delete','_initDataSource','user','customRanges','getUser','resolved','onStarting','forEach','_init','Reply','threadId','solved','disposeWithMe'];_0x2c5a=function(){return _0x185e46;};return _0x2c5a();}_=V([p(0x0,_0x1641e7(_0x1b5be1)),p(0x1,_0x1641e7(_0xa45dbf)),p(0x2,_0x1641e7(_0x1feaec)),p(0x3,_0x1641e7(_0x5130d8))],_);const z=_0x34024c(0x1a7),O={};var k=Object[_0x34024c(0x1cc)],Q=(_0x359413,_0x5dc9a8,_0x23fd4a,_0x4cab43)=>{const _0x1d3788=_0x34024c;for(var _0x4ab8cc=_0x4cab43>0x1?void 0x0:_0x4cab43?k(_0x5dc9a8,_0x23fd4a):_0x5dc9a8,_0x47e372=_0x359413[_0x1d3788(0x1aa)]-0x1,_0x46e32c;_0x47e372>=0x0;_0x47e372--)(_0x46e32c=_0x359413[_0x47e372])&&(_0x4ab8cc=_0x46e32c(_0x4ab8cc)||_0x4ab8cc);return _0x4ab8cc;},b=(_0x1ce649,_0x3388af)=>(_0xf78e80,_0x465caa)=>_0x3388af(_0xf78e80,_0x465caa,_0x1ce649);function X(_0x3a1cd0,_0x13f02d){const _0x5c26bd=_0x34024c,_0x1b690d=_0x3a1cd0[_0x5c26bd(0x1c6)][0x0];return{..._0x13f02d,'id':_0x1b690d[_0x5c26bd(0x1b1)],'resolved':_0x3a1cd0[_0x5c26bd(0x1fa)]===0x1,'dT':y(_0x1b690d[_0x5c26bd(0x1d2)]),'personId':_0x1b690d['userId'],'threadId':_0x1b690d['threadId']};}function ee(_0x1856fa,_0x465b27,_0x264b51){const _0x334cee=_0x34024c;var _0xbb920e,_0x421e1b;if(((_0x421e1b=(_0xbb920e=_0x1856fa==null?void 0x0:_0x1856fa[_0x334cee(0x1c6)])==null?void 0x0:_0xbb920e['length'])!=null?_0x421e1b:0x0)>0x0){const _0x305c46=(_0xcf0558,_0x50c12f)=>({'id':_0xcf0558['replyId'],'threadId':_0xcf0558[_0x334cee(0x1f9)],'dT':y(_0xcf0558[_0x334cee(0x1d2)]),'personId':_0xcf0558['userId'],'resolved':_0x1856fa[_0x334cee(0x1fa)]===I[_0x334cee(0x1ba)],'unitId':_0x465b27,'subUnitId':_0x264b51,'text':JSON[_0x334cee(0x1b5)](_0xcf0558[_0x334cee(0x1eb)]),'parentId':_0x50c12f}),_0x583def=_0x305c46(_0x1856fa[_0x334cee(0x1c6)][0x0]);return{..._0x583def,'children':_0x1856fa[_0x334cee(0x1c6)]['slice'](0x1)[_0x334cee(0x1c8)](_0x55d94c=>_0x305c46(_0x55d94c,_0x583def['id']))};}return null;}let S=class{constructor(_0x1e804f,_0x356f43,_0x1bcccc){const _0x2adbc2=_0x34024c;this[_0x2adbc2(0x201)]=_0x1e804f,this['_userService']=_0x356f43,this[_0x2adbc2(0x1fc)]=_0x1bcccc;}async[_0x34024c(0x1e7)](_0x2088cc){const _0x2a1cb5=_0x34024c;var _0x2f1687,_0x1aee98;const {parentId:_0x3ef606,unitId:_0xdccd3e,text:_0x241f43,threadId:_0x539130}=_0x2088cc,_0x10b8e8=(_0x1aee98=(_0x2f1687=_0x241f43[_0x2a1cb5(0x1f2)])==null?void 0x0:_0x2f1687[_0x2a1cb5(0x1b7)](_0x588708=>_0x588708[_0x2a1cb5(0x1ff)]===_0x48489b[_0x2a1cb5(0x1ac)])[_0x2a1cb5(0x1c8)](_0x3f6654=>_0x3f6654[_0x2a1cb5(0x1c3)]))!=null?_0x1aee98:[],_0x5367b7=JSON[_0x2a1cb5(0x1ca)](_0x241f43),_0x5246c7=(await this[_0x2a1cb5(0x1fc)][_0x2a1cb5(0x1d8)](_0xdccd3e))[_0x2a1cb5(0x1a5)]();if(_0x3ef606){const _0x37e11b={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8,'threadId':_0x539130},_0x1b57ab=(await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1e6),{'body':_0x37e11b}))[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1ad)];return{..._0x2088cc,'id':_0x1b57ab[_0x2a1cb5(0x1b1)],'dT':_0x57f149(+_0x1b57ab[_0x2a1cb5(0x1d2)])[_0x2a1cb5(0x1cd)](_0x2a1cb5(0x1a6)),'personId':_0x1b57ab[_0x2a1cb5(0x19d)]};}else{const _0x398d98={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8},_0x3ee03e=await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1a3),{'body':_0x398d98});return X(_0x3ee03e[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1a9)],_0x2088cc);}}async['updateComment'](_0x5ea9b0){const _0x309747=_0x34024c;var _0x5a7bb0,_0x549720;const {text:_0x550b5c,unitId:_0x8ebd09}=_0x5ea9b0,_0xc3b6df=(_0x549720=(_0x5a7bb0=_0x550b5c['customRanges'])==null?void 0x0:_0x5a7bb0['filter'](_0x10880e=>_0x10880e[_0x309747(0x1ff)]===_0x48489b[_0x309747(0x1ac)])['map'](_0xfaffb7=>_0xfaffb7[_0x309747(0x1c3)]))!=null?_0x549720:[],_0x2df98d=JSON['stringify'](_0x550b5c),_0x5b5b47=_0x5ea9b0[_0x309747(0x1f9)],_0x223063=_0x5ea9b0['id'],_0x255e5f={'memberId':(await this[_0x309747(0x1fc)]['requireSession'](_0x8ebd09))[_0x309747(0x1a5)](),'unitId':_0x8ebd09,'threadId':_0x5b5b47,'mention':_0xc3b6df,'content':_0x2df98d,'replyId':_0x223063},_0x2a07e3=await this['_httpService'][_0x309747(0x1ce)]('/universer-api/comment/unit/'+_0x8ebd09+_0x309747(0x1be),{'body':_0x255e5f});return!_0x2a07e3['body'][_0x309747(0x1ee)]||_0x2a07e3[_0x309747(0x1b9)][_0x309747(0x1ee)][_0x309747(0x1e3)]===0x1;}async[_0x34024c(0x1d1)](_0x10a7ea){const _0x48a59c=_0x34024c,{unitId:_0x3ebd04}=_0x10a7ea,_0x353576=_0x10a7ea[_0x48a59c(0x1f9)],_0x3d54de={'memberId':this[_0x48a59c(0x1c4)][_0x48a59c(0x1e4)]()['userID'],'unitId':_0x3ebd04,'threadId':_0x353576,'solved':_0x10a7ea[_0x48a59c(0x1f4)]?I[_0x48a59c(0x1ba)]:I[_0x48a59c(0x1e5)]},_0x10164b=await this[_0x48a59c(0x201)]['post'](_0x48a59c(0x1ab)+_0x3ebd04+_0x48a59c(0x1a8),{'body':_0x3d54de});return!_0x10164b['body'][_0x48a59c(0x1ee)]||_0x10164b[_0x48a59c(0x1b9)][_0x48a59c(0x1ee)]['code']===0x1;}async['deleteComment'](_0x539f6e,_0x4f9213,_0x52b5a3,_0x36a12f){const _0x1e7a30=_0x34024c,_0x26732b={'memberId':(await this[_0x1e7a30(0x1fc)][_0x1e7a30(0x1d8)](_0x539f6e))[_0x1e7a30(0x1a5)](),'threadId':_0x52b5a3,'replyId':_0x36a12f,'unitId':_0x539f6e},_0x43d90f=await this[_0x1e7a30(0x201)][_0x1e7a30(0x1ce)](_0x1e7a30(0x1ab)+_0x539f6e+_0x1e7a30(0x1d3),{'body':_0x26732b});return!_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)]||_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)][_0x1e7a30(0x1e3)]===0x1;}async[_0x34024c(0x1c5)](_0x115913,_0x483dc1,_0x522ecf){const _0x4413d0=_0x34024c,_0x323056={'unitId':_0x115913,'threadId':_0x522ecf},_0x102b59=await this[_0x4413d0(0x201)][_0x4413d0(0x1ce)](_0x4413d0(0x1ab)+_0x115913+_0x4413d0(0x1da),{'body':_0x323056}),_0x3c6f47=_0x522ecf['map'](_0x2ed0e9=>ee(_0x102b59[_0x4413d0(0x1b9)][_0x4413d0(0x1ed)][_0x2ed0e9],_0x115913,_0x483dc1))[_0x4413d0(0x1b7)](Boolean);return Object[_0x4413d0(0x19a)](_0x102b59[_0x4413d0(0x1b9)]['users'])[_0x4413d0(0x1f6)](_0x2ce036=>{const _0x41efa9=_0x4413d0;this[_0x41efa9(0x1c4)][_0x41efa9(0x1b6)](_0x2ce036);}),_0x3c6f47;}[_0x34024c(0x1c7)](_0x459c2e){const _0x501831=_0x34024c;return{'id':_0x459c2e['id'],'threadId':_0x459c2e[_0x501831(0x1f9)],'ref':_0x459c2e[_0x501831(0x1af)]};}};S=Q([b(0x0,_0x1641e7(_0x55367e)),b(0x1,_0x1641e7(_0x1feaec)),b(0x2,_0x1641e7(_0x17f016))],S);var re=Object[_0x34024c(0x1cc)],te=(_0x3e4e4f,_0x99c6cf,_0x362df6,_0xb328f4)=>{const _0x2bdfeb=_0x34024c;for(var _0x40f84c=_0xb328f4>0x1?void 0x0:_0xb328f4?re(_0x99c6cf,_0x362df6):_0x99c6cf,_0x400bf7=_0x3e4e4f[_0x2bdfeb(0x1aa)]-0x1,_0x50e93b;_0x400bf7>=0x0;_0x400bf7--)(_0x50e93b=_0x3e4e4f[_0x400bf7])&&(_0x40f84c=_0x50e93b(_0x40f84c)||_0x40f84c);return _0x40f84c;},M=(_0x1f6019,_0x27e34f)=>(_0x5f2b6c,_0x4377d3)=>_0x27e34f(_0x5f2b6c,_0x4377d3,_0x1f6019);let f=class extends _0x577d5c{constructor(_0x3d56b7,_0x4b8689){const _0xea98e3=_0x34024c;super(),this['_threadCommentDataSourceService']=_0x3d56b7,this[_0xea98e3(0x19f)]=_0x4b8689,this['_initDataSource']();}[_0x34024c(0x1f0)](){const _0x528918=_0x34024c;this[_0x528918(0x1b4)]['dataSource']=this[_0x528918(0x19f)],this['_threadCommentDataSourceService'][_0x528918(0x1e2)]=!0x1;}};f=te([M(0x0,_0x18ef7c),M(0x1,_0x1641e7(S))],f);var se=Object['defineProperty'],oe=Object[_0x34024c(0x1cc)],ne=(_0xf90f18,_0x5c2e80,_0x419594)=>_0x5c2e80 in _0xf90f18?se(_0xf90f18,_0x5c2e80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x419594}):_0xf90f18[_0x5c2e80]=_0x419594,ie=(_0x2e92bc,_0x36598e,_0x59db40,_0x11915c)=>{for(var _0x4d65f7=_0x11915c>0x1?void 0x0:_0x11915c?oe(_0x36598e,_0x59db40):_0x36598e,_0x76265b=_0x2e92bc['length']-0x1,_0x33d925;_0x76265b>=0x0;_0x76265b--)(_0x33d925=_0x2e92bc[_0x76265b])&&(_0x4d65f7=_0x33d925(_0x4d65f7)||_0x4d65f7);return _0x4d65f7;},N=(_0x2970a4,_0x49b1f0)=>(_0xc86579,_0x2b6f40)=>_0x49b1f0(_0xc86579,_0x2b6f40,_0x2970a4),$=(_0x5eb057,_0x4254f3,_0x4fd376)=>ne(_0x5eb057,typeof _0x4254f3!=_0x34024c(0x1e0)?_0x4254f3+'':_0x4254f3,_0x4fd376);let g=class extends _0x5ad258{constructor(_0x1692ad=O,_0x1058e8,_0x33ea62){const _0x9aa18d=_0x34024c;super(),this['_config']=_0x1692ad,this[_0x9aa18d(0x1bd)]=_0x1058e8,this[_0x9aa18d(0x1bc)]=_0x33ea62;const {..._0x4da21d}=_0x239049({},O,this[_0x9aa18d(0x1bb)]);this[_0x9aa18d(0x1bc)][_0x9aa18d(0x19e)](z,_0x4da21d);}[_0x34024c(0x1f5)](){const _0x354bb4=_0x34024c;[[S],[f],[_]][_0x354bb4(0x1f6)](_0x3322a9=>{const _0x557c5a=_0x354bb4;this[_0x557c5a(0x1bd)][_0x557c5a(0x1e8)](_0x3322a9);});}['onReady'](){const _0x58d2b8=_0x34024c;this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](f),this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](_);}};$(g,_0x34024c(0x1a1),W),$(g,_0x34024c(0x1ea),_0x1cfbda[_0x34024c(0x1c2)]),g=ie([_0x114dff(_0x59bd5d,_0x46d5fb,_0xf589bd),N(0x1,_0x1641e7(_0x5130d8)),N(0x2,_0x10c05b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3cd8c3=_0x5246;(function(_0x303c41,_0x5ab185){const _0x3c7fba=_0x5246,_0x4c0178=_0x303c41();while(!![]){try{const _0x53092c=-parseInt(_0x3c7fba(0xec))/0x1*(parseInt(_0x3c7fba(0x128))/0x2)+parseInt(_0x3c7fba(0x113))/0x3+-parseInt(_0x3c7fba(0xfb))/0x4*(-parseInt(_0x3c7fba(0x115))/0x5)+-parseInt(_0x3c7fba(0x10b))/0x6*(-parseInt(_0x3c7fba(0xe3))/0x7)+parseInt(_0x3c7fba(0x102))/0x8+parseInt(_0x3c7fba(0x11c))/0x9*(parseInt(_0x3c7fba(0x13e))/0xa)+-parseInt(_0x3c7fba(0xee))/0xb;if(_0x53092c===_0x5ab185)break;else _0x4c0178['push'](_0x4c0178['shift']());}catch(_0x49af91){_0x4c0178['push'](_0x4c0178['shift']());}}}(_0xd3eb,0x6e342));import{CommentService as _0x12372b,CollaborationSessionService as _0x13af67,UniverCollaborationClientPlugin as _0xebf8a9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x27609b}from'@univerjs-pro/license';import{dayjs as _0x1bdee6,UserManagerService as _0x948e73,Inject as _0x25eae3,Injector as _0x245dbf,Disposable as _0x2250bd,CustomRangeType as _0x438108,UniverInstanceType as _0x3622ec,DependentOn as _0x4a67e7,IConfigService as _0x3d1f60,Plugin as _0x11527a,merge as _0xfb99a3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x167a39}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x25573b,IThreadCommentDataSourceService as _0x2d1481}from'@univerjs/thread-comment';import{bufferTime as _0x5b44d5}from'rxjs';import{HTTPService as _0x290f9b}from'@univerjs/network';const W=_0x3cd8c3(0x11f);var I=(_0x4343d7=>(_0x4343d7[_0x4343d7['OpenOrReOpen']=0x0]=_0x3cd8c3(0x140),_0x4343d7[_0x4343d7['Solved']=0x1]=_0x3cd8c3(0x122),_0x4343d7[_0x4343d7['UNRECOGNIZED']=-0x1]=_0x3cd8c3(0x10c),_0x4343d7))(I||{}),v=(_0x57c5df=>(_0x57c5df[_0x57c5df[_0x3cd8c3(0xe9)]=0x0]=_0x3cd8c3(0xe9),_0x57c5df[_0x57c5df[_0x3cd8c3(0x11a)]=0x1]=_0x3cd8c3(0x11a),_0x57c5df[_0x57c5df['Reply']=0x2]=_0x3cd8c3(0xf6),_0x57c5df[_0x57c5df[_0x3cd8c3(0xf1)]=0x3]=_0x3cd8c3(0xf1),_0x57c5df[_0x57c5df[_0x3cd8c3(0xeb)]=0x4]=_0x3cd8c3(0xeb),_0x57c5df[_0x57c5df['Solve']=0x5]=_0x3cd8c3(0xe6),_0x57c5df[_0x57c5df[_0x3cd8c3(0x10c)]=-0x1]=_0x3cd8c3(0x10c),_0x57c5df))(v||{});const y=_0xbaf0a7=>_0x1bdee6(new Date(+_0xbaf0a7))[_0x3cd8c3(0x144)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3bf735,_0x268c59)=>{const _0x2d1f71=_0x3cd8c3,_0x32c3f0=_0x3bf735['get'](_0x948e73),_0x5207ca=_0x3bf735[_0x2d1f71(0x11d)](_0x290f9b);_0x268c59[_0x2d1f71(0x145)](_0x31cd7b=>{const _0x469caa=_0x2d1f71;_0x32c3f0[_0x469caa(0x126)](_0x31cd7b)&&_0x268c59[_0x469caa(0x134)](_0x31cd7b);}),_0x268c59['size']&&(await _0x5207ca[_0x2d1f71(0x11d)](_0x2d1f71(0x124),{'params':{'userIDs':[..._0x268c59]}}))[_0x2d1f71(0x106)]['users'][_0x2d1f71(0x145)](_0x265ec3=>{const _0x346896=_0x2d1f71;_0x265ec3&&_0x32c3f0[_0x346896(0x137)](_0x265ec3);});};var K=Object[_0x3cd8c3(0x121)],V=(_0x8001a2,_0x42a89b,_0x3525f8,_0x4714e4)=>{const _0x4d6f24=_0x3cd8c3;for(var _0x1620bb=_0x4714e4>0x1?void 0x0:_0x4714e4?K(_0x42a89b,_0x3525f8):_0x42a89b,_0x4ff418=_0x8001a2[_0x4d6f24(0x10a)]-0x1,_0xaff0fb;_0x4ff418>=0x0;_0x4ff418--)(_0xaff0fb=_0x8001a2[_0x4ff418])&&(_0x1620bb=_0xaff0fb(_0x1620bb)||_0x1620bb);return _0x1620bb;},p=(_0x2cf1db,_0x394f2d)=>(_0x1dfb0e,_0xc385c6)=>_0x394f2d(_0x1dfb0e,_0xc385c6,_0x2cf1db);let _=class extends _0x2250bd{constructor(_0x664652,_0x1eba39,_0x364cc6,_0x5a46e6){const _0x3af1b2=_0x3cd8c3;super(),this[_0x3af1b2(0x111)]=_0x664652,this[_0x3af1b2(0xe7)]=_0x1eba39,this[_0x3af1b2(0x112)]=_0x364cc6,this['_injector']=_0x5a46e6,this[_0x3af1b2(0xea)](),this[_0x3af1b2(0x109)]();}[_0x3cd8c3(0x109)](){const _0xf568b1=_0x3cd8c3;this['disposeWithMe'](this[_0xf568b1(0xe7)][_0xf568b1(0x133)][_0xf568b1(0x103)](_0x5b44d5(0x10))[_0xf568b1(0x13d)](_0x1f84c9=>{const _0x1c7740=_0xf568b1,_0x548c18=new Set();_0x1f84c9[_0x1c7740(0x145)](_0xce5b0d=>{const _0x3eb078=_0x1c7740;switch(_0xce5b0d[_0x3eb078(0x138)]){case _0x3eb078(0x132):{const _0x3cbbd5=_0xce5b0d[_0x3eb078(0x116)][_0x3eb078(0x149)];_0x548c18[_0x3eb078(0x132)](_0x3cbbd5);break;}}}),B(this[_0x1c7740(0x139)],_0x548c18);}));}[_0x3cd8c3(0xea)](){const _0x3d9c45=_0x3cd8c3;this[_0x3d9c45(0xfa)](this[_0x3d9c45(0x111)][_0x3d9c45(0x133)][_0x3d9c45(0x13d)](async _0x49c116=>{const _0xd97adc=_0x3d9c45;var _0x1a6c15,_0x19e6f9,_0x7f824c,_0x3301c1;const _0x2889a3=(_0x1a6c15=this[_0xd97adc(0xe7)]['getUnit'](_0x49c116[_0xd97adc(0x117)])['find'](_0x36866c=>_0x36866c['threadId']===_0x49c116[_0xd97adc(0x119)]))==null?void 0x0:_0x1a6c15[_0xd97adc(0xf7)];if(!_0x2889a3)return;const {unitId:_0x870ed,subUnitId:_0x3b12ee}=_0x2889a3;switch(_0x49c116[_0xd97adc(0x10d)]&&this[_0xd97adc(0x112)][_0xd97adc(0x137)](_0x49c116[_0xd97adc(0x10d)]),_0x49c116[_0xd97adc(0x138)]){case v[_0xd97adc(0x11a)]:break;case v[_0xd97adc(0xf6)]:{this['_threadCommentModel'][_0xd97adc(0x10f)](_0x870ed,_0x3b12ee,{'unitId':_0x870ed,'subUnitId':_0x3b12ee,'ref':'','id':_0x49c116[_0xd97adc(0x13f)],'dT':y(+_0x49c116[_0xd97adc(0x13a)]),'threadId':_0x49c116[_0xd97adc(0x119)],'personId':(_0x7f824c=(_0x19e6f9=_0x49c116[_0xd97adc(0x10d)])==null?void 0x0:_0x19e6f9['userID'])!=null?_0x7f824c:_0x49c116['userId'],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)]),'parentId':_0x2889a3['id']});break;}case v[_0xd97adc(0xeb)]:{const _0x4e455e=this[_0xd97adc(0xe7)][_0xd97adc(0x108)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);_0x4e455e&&_0x4e455e[_0xd97adc(0x100)]&&this[_0xd97adc(0xe7)][_0xd97adc(0x110)](_0x870ed,_0x3b12ee,_0x49c116[_0xd97adc(0x13f)]);break;}case v[_0xd97adc(0xf1)]:{this[_0xd97adc(0xe7)]['updateComment'](_0x870ed,_0x3b12ee,{'commentId':_0x49c116[_0xd97adc(0x13f)],'text':JSON[_0xd97adc(0x148)](_0x49c116[_0xd97adc(0x125)])});break;}case v[_0xd97adc(0xe6)]:{const _0x20112e=(_0x3301c1=this[_0xd97adc(0xe7)][_0xd97adc(0x129)](_0x49c116['unitId'])['find'](_0x4d40c3=>_0x4d40c3[_0xd97adc(0x119)]===_0x49c116['threadId']))==null?void 0x0:_0x3301c1[_0xd97adc(0xf7)];_0x20112e&&this[_0xd97adc(0xe7)]['resolveComment'](_0x870ed,_0x3b12ee,_0x20112e['id'],_0x49c116[_0xd97adc(0x11b)]===I[_0xd97adc(0x122)]);break;}}}));}};_=V([p(0x0,_0x25eae3(_0x12372b)),p(0x1,_0x25eae3(_0x25573b)),p(0x2,_0x25eae3(_0x948e73)),p(0x3,_0x25eae3(_0x245dbf))],_);function _0x5246(_0x329e47,_0x18a5bb){_0x329e47=_0x329e47-0xe2;const _0xd3eba=_0xd3eb();let _0x52460b=_0xd3eba[_0x329e47];return _0x52460b;}const z=_0x3cd8c3(0x141),O={};var k=Object[_0x3cd8c3(0x121)],Q=(_0x546993,_0x3b008f,_0x5d2cd9,_0x3b0c37)=>{const _0x5edb3f=_0x3cd8c3;for(var _0x79483b=_0x3b0c37>0x1?void 0x0:_0x3b0c37?k(_0x3b008f,_0x5d2cd9):_0x3b008f,_0x58fad3=_0x546993[_0x5edb3f(0x10a)]-0x1,_0x534c47;_0x58fad3>=0x0;_0x58fad3--)(_0x534c47=_0x546993[_0x58fad3])&&(_0x79483b=_0x534c47(_0x79483b)||_0x79483b);return _0x79483b;},b=(_0xa55114,_0x19c916)=>(_0x2bb6d7,_0x4a650d)=>_0x19c916(_0x2bb6d7,_0x4a650d,_0xa55114);function X(_0x1dd8c2,_0x41b9c6){const _0xd7b116=_0x3cd8c3,_0x4d703c=_0x1dd8c2[_0xd7b116(0xfe)][0x0];return{..._0x41b9c6,'id':_0x4d703c[_0xd7b116(0x13f)],'resolved':_0x1dd8c2[_0xd7b116(0x11b)]===0x1,'dT':y(_0x4d703c[_0xd7b116(0x13a)]),'personId':_0x4d703c[_0xd7b116(0xf5)],'threadId':_0x4d703c[_0xd7b116(0x119)]};}function ee(_0x2c613b,_0x46cb6d,_0x3546e4){const _0x4b4906=_0x3cd8c3;var _0x491973,_0x2b84de;if(((_0x2b84de=(_0x491973=_0x2c613b==null?void 0x0:_0x2c613b[_0x4b4906(0xfe)])==null?void 0x0:_0x491973[_0x4b4906(0x10a)])!=null?_0x2b84de:0x0)>0x0){const _0x531dce=(_0x34a178,_0x40ba87)=>({'id':_0x34a178[_0x4b4906(0x13f)],'threadId':_0x34a178[_0x4b4906(0x119)],'dT':y(_0x34a178[_0x4b4906(0x13a)]),'personId':_0x34a178['userId'],'resolved':_0x2c613b[_0x4b4906(0x11b)]===I[_0x4b4906(0x122)],'unitId':_0x46cb6d,'subUnitId':_0x3546e4,'text':JSON[_0x4b4906(0x148)](_0x34a178[_0x4b4906(0x125)]),'parentId':_0x40ba87}),_0x4d8f36=_0x531dce(_0x2c613b[_0x4b4906(0xfe)][0x0]);return{..._0x4d8f36,'children':_0x2c613b['replies'][_0x4b4906(0x142)](0x1)[_0x4b4906(0xff)](_0x5a5063=>_0x531dce(_0x5a5063,_0x4d8f36['id']))};}return null;}let S=class{constructor(_0x435483,_0x551482,_0x45502d){const _0x1ef87e=_0x3cd8c3;this[_0x1ef87e(0xf3)]=_0x435483,this['_userService']=_0x551482,this[_0x1ef87e(0x11e)]=_0x45502d;}async['addComment'](_0x4c6bc6){const _0x405b9c=_0x3cd8c3;var _0x23a6e3,_0xf3bcee;const {parentId:_0x8c6f0b,unitId:_0x254788,text:_0x2e842c,threadId:_0x3981aa}=_0x4c6bc6,_0x838d6=(_0xf3bcee=(_0x23a6e3=_0x2e842c['customRanges'])==null?void 0x0:_0x23a6e3['filter'](_0x59f64b=>_0x59f64b[_0x405b9c(0x118)]===_0x438108[_0x405b9c(0x131)])[_0x405b9c(0xff)](_0x16df6c=>_0x16df6c[_0x405b9c(0xf9)]))!=null?_0xf3bcee:[],_0x4cc774=JSON['stringify'](_0x2e842c),_0xa5c1be=(await this[_0x405b9c(0x11e)][_0x405b9c(0x13b)](_0x254788))[_0x405b9c(0x10e)]();if(_0x8c6f0b){const _0x2cab31={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6,'threadId':_0x3981aa},_0xb13c66=(await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x130),{'body':_0x2cab31}))[_0x405b9c(0x106)][_0x405b9c(0x12b)];return{..._0x4c6bc6,'id':_0xb13c66['replyId'],'dT':_0x1bdee6(+_0xb13c66[_0x405b9c(0x13a)])[_0x405b9c(0x144)](_0x405b9c(0x146)),'personId':_0xb13c66[_0x405b9c(0xf5)]};}else{const _0x46c38b={'memberId':_0xa5c1be,'unitId':_0x254788,'content':_0x4cc774,'mention':_0x838d6},_0x6f9736=await this[_0x405b9c(0xf3)][_0x405b9c(0xef)](_0x405b9c(0xed)+_0x254788+_0x405b9c(0x114),{'body':_0x46c38b});return X(_0x6f9736['body']['comment'],_0x4c6bc6);}}async[_0x3cd8c3(0xf2)](_0x570f80){const _0x4aac2f=_0x3cd8c3;var _0x3f0bdd,_0x5cb2c7;const {text:_0x188382,unitId:_0x2132d0}=_0x570f80,_0x177849=(_0x5cb2c7=(_0x3f0bdd=_0x188382[_0x4aac2f(0x120)])==null?void 0x0:_0x3f0bdd[_0x4aac2f(0xfd)](_0x51a59d=>_0x51a59d[_0x4aac2f(0x118)]===_0x438108['COMMENT'])[_0x4aac2f(0xff)](_0x599114=>_0x599114['rangeId']))!=null?_0x5cb2c7:[],_0x469ce6=JSON[_0x4aac2f(0x123)](_0x188382),_0x272a73=_0x570f80['threadId'],_0x6b428b=_0x570f80['id'],_0x3a9c89={'memberId':(await this[_0x4aac2f(0x11e)][_0x4aac2f(0x13b)](_0x2132d0))[_0x4aac2f(0x10e)](),'unitId':_0x2132d0,'threadId':_0x272a73,'mention':_0x177849,'content':_0x469ce6,'replyId':_0x6b428b},_0x738c07=await this[_0x4aac2f(0xf3)][_0x4aac2f(0xef)](_0x4aac2f(0xed)+_0x2132d0+'/edit',{'body':_0x3a9c89});return!_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)]||_0x738c07[_0x4aac2f(0x106)][_0x4aac2f(0x12c)][_0x4aac2f(0xfc)]===0x1;}async[_0x3cd8c3(0x101)](_0xbc399d){const _0x391083=_0x3cd8c3,{unitId:_0x3a39c8}=_0xbc399d,_0x532295=_0xbc399d['threadId'],_0x222aa5={'memberId':this[_0x391083(0x112)][_0x391083(0x136)]()[_0x391083(0xe8)],'unitId':_0x3a39c8,'threadId':_0x532295,'solved':_0xbc399d['resolved']?I[_0x391083(0x122)]:I['OpenOrReOpen']},_0x262844=await this[_0x391083(0xf3)][_0x391083(0xef)](_0x391083(0xed)+_0x3a39c8+_0x391083(0x12e),{'body':_0x222aa5});return!_0x262844['body'][_0x391083(0x12c)]||_0x262844[_0x391083(0x106)]['error']['code']===0x1;}async[_0x3cd8c3(0x110)](_0x3ded6d,_0x89f6b6,_0x10231c,_0x1f5ee0){const _0x1e3340=_0x3cd8c3,_0x5c2ca8={'memberId':(await this[_0x1e3340(0x11e)]['requireSession'](_0x3ded6d))[_0x1e3340(0x10e)](),'threadId':_0x10231c,'replyId':_0x1f5ee0,'unitId':_0x3ded6d},_0x29f922=await this['_httpService'][_0x1e3340(0xef)]('/universer-api/comment/unit/'+_0x3ded6d+_0x1e3340(0x12f),{'body':_0x5c2ca8});return!_0x29f922['body'][_0x1e3340(0x12c)]||_0x29f922[_0x1e3340(0x106)]['error'][_0x1e3340(0xfc)]===0x1;}async[_0x3cd8c3(0x107)](_0x3f6d3b,_0x586d2c,_0x5de6ca){const _0x2745a4=_0x3cd8c3,_0x318762={'unitId':_0x3f6d3b,'threadId':_0x5de6ca},_0x124747=await this['_httpService'][_0x2745a4(0xef)](_0x2745a4(0xed)+_0x3f6d3b+_0x2745a4(0xf0),{'body':_0x318762}),_0x565892=_0x5de6ca['map'](_0x11d7cd=>ee(_0x124747['body'][_0x2745a4(0x12d)][_0x11d7cd],_0x3f6d3b,_0x586d2c))[_0x2745a4(0xfd)](Boolean);return Object[_0x2745a4(0xe5)](_0x124747[_0x2745a4(0x106)]['users'])[_0x2745a4(0x145)](_0x668c04=>{const _0x123a2f=_0x2745a4;this[_0x123a2f(0x112)][_0x123a2f(0x137)](_0x668c04);}),_0x565892;}[_0x3cd8c3(0x135)](_0x4f1e54){const _0xebaec5=_0x3cd8c3;return{'id':_0x4f1e54['id'],'threadId':_0x4f1e54['threadId'],'ref':_0x4f1e54[_0xebaec5(0x12a)]};}};S=Q([b(0x0,_0x25eae3(_0x290f9b)),b(0x1,_0x25eae3(_0x948e73)),b(0x2,_0x25eae3(_0x13af67))],S);var re=Object[_0x3cd8c3(0x121)],te=(_0x2e49b8,_0x22cc17,_0x21ff40,_0x4e8be2)=>{const _0x469c92=_0x3cd8c3;for(var _0x5b659f=_0x4e8be2>0x1?void 0x0:_0x4e8be2?re(_0x22cc17,_0x21ff40):_0x22cc17,_0x2f87d4=_0x2e49b8[_0x469c92(0x10a)]-0x1,_0x37c24f;_0x2f87d4>=0x0;_0x2f87d4--)(_0x37c24f=_0x2e49b8[_0x2f87d4])&&(_0x5b659f=_0x37c24f(_0x5b659f)||_0x5b659f);return _0x5b659f;},M=(_0x86d5f,_0x4edead)=>(_0x47073b,_0x3bbe96)=>_0x4edead(_0x47073b,_0x3bbe96,_0x86d5f);let f=class extends _0x2250bd{constructor(_0x1c7893,_0x4c7bb5){const _0xd2d9e8=_0x3cd8c3;super(),this[_0xd2d9e8(0xf8)]=_0x1c7893,this[_0xd2d9e8(0x105)]=_0x4c7bb5,this[_0xd2d9e8(0xe4)]();}['_initDataSource'](){const _0xd6b21a=_0x3cd8c3;this[_0xd6b21a(0xf8)]['dataSource']=this[_0xd6b21a(0x105)],this['_threadCommentDataSourceService'][_0xd6b21a(0x127)]=!0x1;}};f=te([M(0x0,_0x2d1481),M(0x1,_0x25eae3(S))],f);function _0xd3eb(){const _0x52cab1=['subscribe','244300ewILnb','replyId','OpenOrReOpen','thread-comment-data-source.config','slice','onReady','format','forEach','YYYY/MM/DD\x20HH:mm','defineProperty','parse','personId','UNIVER_UNKNOWN','_config','onStarting','91SWajyh','_initDataSource','values','Solve','_threadCommentModel','userID','Unknown','_init','Delete','97IDVpED','/universer-api/comment/unit/','16767102EuaCYq','post','/list','Edit','updateComment','_httpService','_configService','userId','Reply','root','_threadCommentDataSourceService','rangeId','disposeWithMe','5532lGRfIj','code','filter','replies','map','parentId','resolveComment','1919384qMOqnD','pipe','pluginName','_threadCommentDataSource','body','listComments','getComment','_initUserSync','length','17670OGMWpP','UNRECOGNIZED','user','getMemberID','addComment','deleteComment','_commentService','_userService','2036673tARMGN','/add','1510UHdoqN','payload','unitId','rangeType','threadId','Add','solved','252eRLTxr','get','_sessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','getOwnPropertyDescriptor','Solved','stringify','/universer-api/user/list','content','getUser','syncUpdateMutationToColla','1714uNUbsM','getUnit','ref','reply','error','comments','/solved','/delete','/reply','COMMENT','add','commentUpdate$','delete','saveCommentToSnapshot','getCurrentUser','addUser','type','_injector','createTimestamp','requireSession','setConfig'];_0xd3eb=function(){return _0x52cab1;};return _0xd3eb();}var se=Object[_0x3cd8c3(0x147)],oe=Object[_0x3cd8c3(0x121)],ne=(_0x21232c,_0x2eb2ea,_0x3a12ba)=>_0x2eb2ea in _0x21232c?se(_0x21232c,_0x2eb2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a12ba}):_0x21232c[_0x2eb2ea]=_0x3a12ba,ie=(_0x51797e,_0x2ea2bb,_0x3cd3a0,_0x425d8d)=>{const _0x3b4a94=_0x3cd8c3;for(var _0x5e97b7=_0x425d8d>0x1?void 0x0:_0x425d8d?oe(_0x2ea2bb,_0x3cd3a0):_0x2ea2bb,_0x25ca92=_0x51797e[_0x3b4a94(0x10a)]-0x1,_0x327cb5;_0x25ca92>=0x0;_0x25ca92--)(_0x327cb5=_0x51797e[_0x25ca92])&&(_0x5e97b7=_0x327cb5(_0x5e97b7)||_0x5e97b7);return _0x5e97b7;},N=(_0x1f42f0,_0x22cda6)=>(_0x1d375b,_0x5258d2)=>_0x22cda6(_0x1d375b,_0x5258d2,_0x1f42f0),$=(_0x5567c1,_0x180cf1,_0xd130e9)=>ne(_0x5567c1,typeof _0x180cf1!='symbol'?_0x180cf1+'':_0x180cf1,_0xd130e9);let g=class extends _0x11527a{constructor(_0x1b9e80=O,_0x766dd9,_0x3561c1){const _0x12294b=_0x3cd8c3;super(),this['_config']=_0x1b9e80,this[_0x12294b(0x139)]=_0x766dd9,this[_0x12294b(0xf4)]=_0x3561c1;const {..._0x25b780}=_0xfb99a3({},O,this[_0x12294b(0x14b)]);this[_0x12294b(0xf4)][_0x12294b(0x13c)](z,_0x25b780);}[_0x3cd8c3(0xe2)](){const _0x4e82fe=_0x3cd8c3;[[S],[f],[_]][_0x4e82fe(0x145)](_0x43197d=>{const _0x3ce87a=_0x4e82fe;this[_0x3ce87a(0x139)][_0x3ce87a(0x132)](_0x43197d);});}[_0x3cd8c3(0x143)](){const _0x2cd861=_0x3cd8c3;this['_injector'][_0x2cd861(0x11d)](f),this['_injector']['get'](_);}};$(g,_0x3cd8c3(0x104),W),$(g,_0x3cd8c3(0x138),_0x3622ec[_0x3cd8c3(0x14a)]),g=ie([_0x4a67e7(_0x167a39,_0xebf8a9,_0x27609b),N(0x1,_0x25eae3(_0x245dbf)),N(0x2,_0x3d1f60)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x34024c=_0x5be3;(function(_0x5c622f,_0x52bf93){const _0x5c70d0=_0x5be3,_0x3249d4=_0x5c622f();while(!![]){try{const _0x52e758=-parseInt(_0x5c70d0(0x1d0))/0x1+parseInt(_0x5c70d0(0x1cb))/0x2*(-parseInt(_0x5c70d0(0x1d6))/0x3)+-parseInt(_0x5c70d0(0x1b8))/0x4+-parseInt(_0x5c70d0(0x1b3))/0x5+parseInt(_0x5c70d0(0x1dd))/0x6+-parseInt(_0x5c70d0(0x1cf))/0x7+parseInt(_0x5c70d0(0x19b))/0x8;if(_0x52e758===_0x52bf93)break;else _0x3249d4['push'](_0x3249d4['shift']());}catch(_0x1bb696){_0x3249d4['push'](_0x3249d4['shift']());}}}(_0x2c5a,0xb8804));import{CommentService as _0x1b5be1,CollaborationSessionService as _0x17f016,UniverCollaborationClientPlugin as _0x46d5fb}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf589bd}from'@univerjs-pro/license';import{dayjs as _0x57f149,UserManagerService as _0x1feaec,Inject as _0x1641e7,Injector as _0x5130d8,Disposable as _0x577d5c,CustomRangeType as _0x48489b,UniverInstanceType as _0x1cfbda,DependentOn as _0x114dff,IConfigService as _0x10c05b,Plugin as _0x5ad258,merge as _0x239049}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x59bd5d}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xa45dbf,IThreadCommentDataSourceService as _0x18ef7c}from'@univerjs/thread-comment';import{bufferTime as _0x2d9430}from'rxjs';import{HTTPService as _0x55367e}from'@univerjs/network';const W=_0x34024c(0x1d5);var I=(_0x3390e7=>(_0x3390e7[_0x3390e7[_0x34024c(0x1e5)]=0x0]=_0x34024c(0x1e5),_0x3390e7[_0x3390e7[_0x34024c(0x1ba)]=0x1]=_0x34024c(0x1ba),_0x3390e7[_0x3390e7[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x3390e7))(I||{}),v=(_0x45831e=>(_0x45831e[_0x45831e[_0x34024c(0x1de)]=0x0]='Unknown',_0x45831e[_0x45831e[_0x34024c(0x19c)]=0x1]='Add',_0x45831e[_0x45831e['Reply']=0x2]=_0x34024c(0x1f8),_0x45831e[_0x45831e[_0x34024c(0x1c1)]=0x3]=_0x34024c(0x1c1),_0x45831e[_0x45831e['Delete']=0x4]='Delete',_0x45831e[_0x45831e[_0x34024c(0x1a2)]=0x5]=_0x34024c(0x1a2),_0x45831e[_0x45831e[_0x34024c(0x1c9)]=-0x1]=_0x34024c(0x1c9),_0x45831e))(v||{});const y=_0x5b355d=>_0x57f149(new Date(+_0x5b355d))['format'](_0x34024c(0x1a6)),B=async(_0x17c5a2,_0x16a130)=>{const _0x41c8aa=_0x34024c,_0x3f72e9=_0x17c5a2[_0x41c8aa(0x1d9)](_0x1feaec),_0xad84a0=_0x17c5a2[_0x41c8aa(0x1d9)](_0x55367e);_0x16a130[_0x41c8aa(0x1f6)](_0x4f5a43=>{const _0x4976e8=_0x41c8aa;_0x3f72e9[_0x4976e8(0x1f3)](_0x4f5a43)&&_0x16a130[_0x4976e8(0x200)](_0x4f5a43);}),_0x16a130[_0x41c8aa(0x1ec)]&&(await _0xad84a0[_0x41c8aa(0x1d9)](_0x41c8aa(0x1db),{'params':{'userIDs':[..._0x16a130]}}))[_0x41c8aa(0x1b9)][_0x41c8aa(0x1d4)][_0x41c8aa(0x1f6)](_0x842289=>{const _0x5e289f=_0x41c8aa;_0x842289&&_0x3f72e9[_0x5e289f(0x1b6)](_0x842289);});};var K=Object[_0x34024c(0x1cc)],V=(_0x5f3d30,_0x1c2704,_0x55bb9d,_0x5315d7)=>{const _0xf0b0c2=_0x34024c;for(var _0x275314=_0x5315d7>0x1?void 0x0:_0x5315d7?K(_0x1c2704,_0x55bb9d):_0x1c2704,_0x2dee09=_0x5f3d30[_0xf0b0c2(0x1aa)]-0x1,_0x56e849;_0x2dee09>=0x0;_0x2dee09--)(_0x56e849=_0x5f3d30[_0x2dee09])&&(_0x275314=_0x56e849(_0x275314)||_0x275314);return _0x275314;},p=(_0x57b42d,_0x31ecf3)=>(_0x24c347,_0x3cd345)=>_0x31ecf3(_0x24c347,_0x3cd345,_0x57b42d);let _=class extends _0x577d5c{constructor(_0x5ae4a0,_0x47ab27,_0x35fb7d,_0x4ceb57){const _0x17c7ed=_0x34024c;super(),this['_commentService']=_0x5ae4a0,this['_threadCommentModel']=_0x47ab27,this[_0x17c7ed(0x1c4)]=_0x35fb7d,this['_injector']=_0x4ceb57,this[_0x17c7ed(0x1f7)](),this[_0x17c7ed(0x1b0)]();}[_0x34024c(0x1b0)](){const _0x33b2bc=_0x34024c;this[_0x33b2bc(0x1fb)](this[_0x33b2bc(0x1dc)][_0x33b2bc(0x1e1)][_0x33b2bc(0x1fd)](_0x2d9430(0x10))['subscribe'](_0x3059da=>{const _0x185ce8=_0x33b2bc,_0x12c00a=new Set();_0x3059da[_0x185ce8(0x1f6)](_0x1cdf69=>{const _0x1a20fc=_0x185ce8;switch(_0x1cdf69['type']){case _0x1a20fc(0x1e8):{const _0x29690f=_0x1cdf69[_0x1a20fc(0x1ae)][_0x1a20fc(0x1bf)];_0x12c00a['add'](_0x29690f);break;}}}),B(this[_0x185ce8(0x1bd)],_0x12c00a);}));}['_init'](){const _0x493807=_0x34024c;this[_0x493807(0x1fb)](this['_commentService'][_0x493807(0x1e1)]['subscribe'](async _0x50ec9a=>{const _0x521f6a=_0x493807;var _0x3d1775,_0xfd8eac,_0x2c265f,_0x42e616;const _0x51f1a3=(_0x3d1775=this['_threadCommentModel']['getUnit'](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x4e49a0=>_0x4e49a0[_0x521f6a(0x1f9)]===_0x50ec9a['threadId']))==null?void 0x0:_0x3d1775[_0x521f6a(0x1df)];if(!_0x51f1a3)return;const {unitId:_0x2e9807,subUnitId:_0x5da9ae}=_0x51f1a3;switch(_0x50ec9a[_0x521f6a(0x1f1)]&&this[_0x521f6a(0x1c4)][_0x521f6a(0x1b6)](_0x50ec9a[_0x521f6a(0x1f1)]),_0x50ec9a[_0x521f6a(0x1ea)]){case v[_0x521f6a(0x19c)]:break;case v[_0x521f6a(0x1f8)]:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1e7)](_0x2e9807,_0x5da9ae,{'unitId':_0x2e9807,'subUnitId':_0x5da9ae,'ref':'','id':_0x50ec9a[_0x521f6a(0x1b1)],'dT':y(+_0x50ec9a['createTimestamp']),'threadId':_0x50ec9a[_0x521f6a(0x1f9)],'personId':(_0x2c265f=(_0xfd8eac=_0x50ec9a[_0x521f6a(0x1f1)])==null?void 0x0:_0xfd8eac[_0x521f6a(0x1d7)])!=null?_0x2c265f:_0x50ec9a[_0x521f6a(0x19d)],'text':JSON['parse'](_0x50ec9a['content']),'parentId':_0x51f1a3['id']});break;}case v[_0x521f6a(0x1ef)]:{const _0x28dc6e=this['_threadCommentModel'][_0x521f6a(0x1a0)](_0x2e9807,_0x5da9ae,_0x50ec9a['replyId']);_0x28dc6e&&_0x28dc6e[_0x521f6a(0x1b2)]&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1fe)](_0x2e9807,_0x5da9ae,_0x50ec9a[_0x521f6a(0x1b1)]);break;}case v['Edit']:{this[_0x521f6a(0x1dc)][_0x521f6a(0x1c0)](_0x2e9807,_0x5da9ae,{'commentId':_0x50ec9a['replyId'],'text':JSON[_0x521f6a(0x1b5)](_0x50ec9a[_0x521f6a(0x1eb)])});break;}case v['Solve']:{const _0x525ad2=(_0x42e616=this['_threadCommentModel'][_0x521f6a(0x202)](_0x50ec9a[_0x521f6a(0x1a4)])[_0x521f6a(0x1e9)](_0x300f7e=>_0x300f7e[_0x521f6a(0x1f9)]===_0x50ec9a[_0x521f6a(0x1f9)]))==null?void 0x0:_0x42e616[_0x521f6a(0x1df)];_0x525ad2&&this[_0x521f6a(0x1dc)][_0x521f6a(0x1d1)](_0x2e9807,_0x5da9ae,_0x525ad2['id'],_0x50ec9a[_0x521f6a(0x1fa)]===I[_0x521f6a(0x1ba)]);break;}}}));}};function _0x5be3(_0x49aadc,_0x1175b0){_0x49aadc=_0x49aadc-0x19a;const _0x2c5a1f=_0x2c5a();let _0x5be38c=_0x2c5a1f[_0x49aadc];return _0x5be38c;}function _0x2c5a(){const _0x185e46=['_sessionService','pipe','deleteComment','rangeType','delete','_httpService','getUnit','values','29070976lzuoVY','Add','userId','setConfig','_threadCommentDataSource','getComment','pluginName','Solve','/add','unitId','getMemberID','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','/solved','comment','length','/universer-api/comment/unit/','COMMENT','reply','payload','ref','_initUserSync','replyId','parentId','7023835WjPdcU','_threadCommentDataSourceService','parse','addUser','filter','1804348yOPkrL','body','Solved','_config','_configService','_injector','/edit','personId','updateComment','Edit','UNIVER_UNKNOWN','rangeId','_userService','listComments','replies','saveCommentToSnapshot','map','UNRECOGNIZED','stringify','51886vfHlRC','getOwnPropertyDescriptor','format','post','127785yQLyfq','205305ogzASL','resolveComment','createTimestamp','/delete','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','93hSZgMM','userID','requireSession','get','/list','/universer-api/user/list','_threadCommentModel','32946ZGHgJB','Unknown','root','symbol','commentUpdate$','syncUpdateMutationToColla','code','getCurrentUser','OpenOrReOpen','/reply','addComment','add','find','type','content','size','comments','error','Delete','_initDataSource','user','customRanges','getUser','resolved','onStarting','forEach','_init','Reply','threadId','solved','disposeWithMe'];_0x2c5a=function(){return _0x185e46;};return _0x2c5a();}_=V([p(0x0,_0x1641e7(_0x1b5be1)),p(0x1,_0x1641e7(_0xa45dbf)),p(0x2,_0x1641e7(_0x1feaec)),p(0x3,_0x1641e7(_0x5130d8))],_);const z=_0x34024c(0x1a7),O={};var k=Object[_0x34024c(0x1cc)],Q=(_0x359413,_0x5dc9a8,_0x23fd4a,_0x4cab43)=>{const _0x1d3788=_0x34024c;for(var _0x4ab8cc=_0x4cab43>0x1?void 0x0:_0x4cab43?k(_0x5dc9a8,_0x23fd4a):_0x5dc9a8,_0x47e372=_0x359413[_0x1d3788(0x1aa)]-0x1,_0x46e32c;_0x47e372>=0x0;_0x47e372--)(_0x46e32c=_0x359413[_0x47e372])&&(_0x4ab8cc=_0x46e32c(_0x4ab8cc)||_0x4ab8cc);return _0x4ab8cc;},b=(_0x1ce649,_0x3388af)=>(_0xf78e80,_0x465caa)=>_0x3388af(_0xf78e80,_0x465caa,_0x1ce649);function X(_0x3a1cd0,_0x13f02d){const _0x5c26bd=_0x34024c,_0x1b690d=_0x3a1cd0[_0x5c26bd(0x1c6)][0x0];return{..._0x13f02d,'id':_0x1b690d[_0x5c26bd(0x1b1)],'resolved':_0x3a1cd0[_0x5c26bd(0x1fa)]===0x1,'dT':y(_0x1b690d[_0x5c26bd(0x1d2)]),'personId':_0x1b690d['userId'],'threadId':_0x1b690d['threadId']};}function ee(_0x1856fa,_0x465b27,_0x264b51){const _0x334cee=_0x34024c;var _0xbb920e,_0x421e1b;if(((_0x421e1b=(_0xbb920e=_0x1856fa==null?void 0x0:_0x1856fa[_0x334cee(0x1c6)])==null?void 0x0:_0xbb920e['length'])!=null?_0x421e1b:0x0)>0x0){const _0x305c46=(_0xcf0558,_0x50c12f)=>({'id':_0xcf0558['replyId'],'threadId':_0xcf0558[_0x334cee(0x1f9)],'dT':y(_0xcf0558[_0x334cee(0x1d2)]),'personId':_0xcf0558['userId'],'resolved':_0x1856fa[_0x334cee(0x1fa)]===I[_0x334cee(0x1ba)],'unitId':_0x465b27,'subUnitId':_0x264b51,'text':JSON[_0x334cee(0x1b5)](_0xcf0558[_0x334cee(0x1eb)]),'parentId':_0x50c12f}),_0x583def=_0x305c46(_0x1856fa[_0x334cee(0x1c6)][0x0]);return{..._0x583def,'children':_0x1856fa[_0x334cee(0x1c6)]['slice'](0x1)[_0x334cee(0x1c8)](_0x55d94c=>_0x305c46(_0x55d94c,_0x583def['id']))};}return null;}let S=class{constructor(_0x1e804f,_0x356f43,_0x1bcccc){const _0x2adbc2=_0x34024c;this[_0x2adbc2(0x201)]=_0x1e804f,this['_userService']=_0x356f43,this[_0x2adbc2(0x1fc)]=_0x1bcccc;}async[_0x34024c(0x1e7)](_0x2088cc){const _0x2a1cb5=_0x34024c;var _0x2f1687,_0x1aee98;const {parentId:_0x3ef606,unitId:_0xdccd3e,text:_0x241f43,threadId:_0x539130}=_0x2088cc,_0x10b8e8=(_0x1aee98=(_0x2f1687=_0x241f43[_0x2a1cb5(0x1f2)])==null?void 0x0:_0x2f1687[_0x2a1cb5(0x1b7)](_0x588708=>_0x588708[_0x2a1cb5(0x1ff)]===_0x48489b[_0x2a1cb5(0x1ac)])[_0x2a1cb5(0x1c8)](_0x3f6654=>_0x3f6654[_0x2a1cb5(0x1c3)]))!=null?_0x1aee98:[],_0x5367b7=JSON[_0x2a1cb5(0x1ca)](_0x241f43),_0x5246c7=(await this[_0x2a1cb5(0x1fc)][_0x2a1cb5(0x1d8)](_0xdccd3e))[_0x2a1cb5(0x1a5)]();if(_0x3ef606){const _0x37e11b={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8,'threadId':_0x539130},_0x1b57ab=(await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1e6),{'body':_0x37e11b}))[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1ad)];return{..._0x2088cc,'id':_0x1b57ab[_0x2a1cb5(0x1b1)],'dT':_0x57f149(+_0x1b57ab[_0x2a1cb5(0x1d2)])[_0x2a1cb5(0x1cd)](_0x2a1cb5(0x1a6)),'personId':_0x1b57ab[_0x2a1cb5(0x19d)]};}else{const _0x398d98={'memberId':_0x5246c7,'unitId':_0xdccd3e,'content':_0x5367b7,'mention':_0x10b8e8},_0x3ee03e=await this[_0x2a1cb5(0x201)][_0x2a1cb5(0x1ce)](_0x2a1cb5(0x1ab)+_0xdccd3e+_0x2a1cb5(0x1a3),{'body':_0x398d98});return X(_0x3ee03e[_0x2a1cb5(0x1b9)][_0x2a1cb5(0x1a9)],_0x2088cc);}}async['updateComment'](_0x5ea9b0){const _0x309747=_0x34024c;var _0x5a7bb0,_0x549720;const {text:_0x550b5c,unitId:_0x8ebd09}=_0x5ea9b0,_0xc3b6df=(_0x549720=(_0x5a7bb0=_0x550b5c['customRanges'])==null?void 0x0:_0x5a7bb0['filter'](_0x10880e=>_0x10880e[_0x309747(0x1ff)]===_0x48489b[_0x309747(0x1ac)])['map'](_0xfaffb7=>_0xfaffb7[_0x309747(0x1c3)]))!=null?_0x549720:[],_0x2df98d=JSON['stringify'](_0x550b5c),_0x5b5b47=_0x5ea9b0[_0x309747(0x1f9)],_0x223063=_0x5ea9b0['id'],_0x255e5f={'memberId':(await this[_0x309747(0x1fc)]['requireSession'](_0x8ebd09))[_0x309747(0x1a5)](),'unitId':_0x8ebd09,'threadId':_0x5b5b47,'mention':_0xc3b6df,'content':_0x2df98d,'replyId':_0x223063},_0x2a07e3=await this['_httpService'][_0x309747(0x1ce)]('/universer-api/comment/unit/'+_0x8ebd09+_0x309747(0x1be),{'body':_0x255e5f});return!_0x2a07e3['body'][_0x309747(0x1ee)]||_0x2a07e3[_0x309747(0x1b9)][_0x309747(0x1ee)][_0x309747(0x1e3)]===0x1;}async[_0x34024c(0x1d1)](_0x10a7ea){const _0x48a59c=_0x34024c,{unitId:_0x3ebd04}=_0x10a7ea,_0x353576=_0x10a7ea[_0x48a59c(0x1f9)],_0x3d54de={'memberId':this[_0x48a59c(0x1c4)][_0x48a59c(0x1e4)]()['userID'],'unitId':_0x3ebd04,'threadId':_0x353576,'solved':_0x10a7ea[_0x48a59c(0x1f4)]?I[_0x48a59c(0x1ba)]:I[_0x48a59c(0x1e5)]},_0x10164b=await this[_0x48a59c(0x201)]['post'](_0x48a59c(0x1ab)+_0x3ebd04+_0x48a59c(0x1a8),{'body':_0x3d54de});return!_0x10164b['body'][_0x48a59c(0x1ee)]||_0x10164b[_0x48a59c(0x1b9)][_0x48a59c(0x1ee)]['code']===0x1;}async['deleteComment'](_0x539f6e,_0x4f9213,_0x52b5a3,_0x36a12f){const _0x1e7a30=_0x34024c,_0x26732b={'memberId':(await this[_0x1e7a30(0x1fc)][_0x1e7a30(0x1d8)](_0x539f6e))[_0x1e7a30(0x1a5)](),'threadId':_0x52b5a3,'replyId':_0x36a12f,'unitId':_0x539f6e},_0x43d90f=await this[_0x1e7a30(0x201)][_0x1e7a30(0x1ce)](_0x1e7a30(0x1ab)+_0x539f6e+_0x1e7a30(0x1d3),{'body':_0x26732b});return!_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)]||_0x43d90f[_0x1e7a30(0x1b9)][_0x1e7a30(0x1ee)][_0x1e7a30(0x1e3)]===0x1;}async[_0x34024c(0x1c5)](_0x115913,_0x483dc1,_0x522ecf){const _0x4413d0=_0x34024c,_0x323056={'unitId':_0x115913,'threadId':_0x522ecf},_0x102b59=await this[_0x4413d0(0x201)][_0x4413d0(0x1ce)](_0x4413d0(0x1ab)+_0x115913+_0x4413d0(0x1da),{'body':_0x323056}),_0x3c6f47=_0x522ecf['map'](_0x2ed0e9=>ee(_0x102b59[_0x4413d0(0x1b9)][_0x4413d0(0x1ed)][_0x2ed0e9],_0x115913,_0x483dc1))[_0x4413d0(0x1b7)](Boolean);return Object[_0x4413d0(0x19a)](_0x102b59[_0x4413d0(0x1b9)]['users'])[_0x4413d0(0x1f6)](_0x2ce036=>{const _0x41efa9=_0x4413d0;this[_0x41efa9(0x1c4)][_0x41efa9(0x1b6)](_0x2ce036);}),_0x3c6f47;}[_0x34024c(0x1c7)](_0x459c2e){const _0x501831=_0x34024c;return{'id':_0x459c2e['id'],'threadId':_0x459c2e[_0x501831(0x1f9)],'ref':_0x459c2e[_0x501831(0x1af)]};}};S=Q([b(0x0,_0x1641e7(_0x55367e)),b(0x1,_0x1641e7(_0x1feaec)),b(0x2,_0x1641e7(_0x17f016))],S);var re=Object[_0x34024c(0x1cc)],te=(_0x3e4e4f,_0x99c6cf,_0x362df6,_0xb328f4)=>{const _0x2bdfeb=_0x34024c;for(var _0x40f84c=_0xb328f4>0x1?void 0x0:_0xb328f4?re(_0x99c6cf,_0x362df6):_0x99c6cf,_0x400bf7=_0x3e4e4f[_0x2bdfeb(0x1aa)]-0x1,_0x50e93b;_0x400bf7>=0x0;_0x400bf7--)(_0x50e93b=_0x3e4e4f[_0x400bf7])&&(_0x40f84c=_0x50e93b(_0x40f84c)||_0x40f84c);return _0x40f84c;},M=(_0x1f6019,_0x27e34f)=>(_0x5f2b6c,_0x4377d3)=>_0x27e34f(_0x5f2b6c,_0x4377d3,_0x1f6019);let f=class extends _0x577d5c{constructor(_0x3d56b7,_0x4b8689){const _0xea98e3=_0x34024c;super(),this['_threadCommentDataSourceService']=_0x3d56b7,this[_0xea98e3(0x19f)]=_0x4b8689,this['_initDataSource']();}[_0x34024c(0x1f0)](){const _0x528918=_0x34024c;this[_0x528918(0x1b4)]['dataSource']=this[_0x528918(0x19f)],this['_threadCommentDataSourceService'][_0x528918(0x1e2)]=!0x1;}};f=te([M(0x0,_0x18ef7c),M(0x1,_0x1641e7(S))],f);var se=Object['defineProperty'],oe=Object[_0x34024c(0x1cc)],ne=(_0xf90f18,_0x5c2e80,_0x419594)=>_0x5c2e80 in _0xf90f18?se(_0xf90f18,_0x5c2e80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x419594}):_0xf90f18[_0x5c2e80]=_0x419594,ie=(_0x2e92bc,_0x36598e,_0x59db40,_0x11915c)=>{for(var _0x4d65f7=_0x11915c>0x1?void 0x0:_0x11915c?oe(_0x36598e,_0x59db40):_0x36598e,_0x76265b=_0x2e92bc['length']-0x1,_0x33d925;_0x76265b>=0x0;_0x76265b--)(_0x33d925=_0x2e92bc[_0x76265b])&&(_0x4d65f7=_0x33d925(_0x4d65f7)||_0x4d65f7);return _0x4d65f7;},N=(_0x2970a4,_0x49b1f0)=>(_0xc86579,_0x2b6f40)=>_0x49b1f0(_0xc86579,_0x2b6f40,_0x2970a4),$=(_0x5eb057,_0x4254f3,_0x4fd376)=>ne(_0x5eb057,typeof _0x4254f3!=_0x34024c(0x1e0)?_0x4254f3+'':_0x4254f3,_0x4fd376);let g=class extends _0x5ad258{constructor(_0x1692ad=O,_0x1058e8,_0x33ea62){const _0x9aa18d=_0x34024c;super(),this['_config']=_0x1692ad,this[_0x9aa18d(0x1bd)]=_0x1058e8,this[_0x9aa18d(0x1bc)]=_0x33ea62;const {..._0x4da21d}=_0x239049({},O,this[_0x9aa18d(0x1bb)]);this[_0x9aa18d(0x1bc)][_0x9aa18d(0x19e)](z,_0x4da21d);}[_0x34024c(0x1f5)](){const _0x354bb4=_0x34024c;[[S],[f],[_]][_0x354bb4(0x1f6)](_0x3322a9=>{const _0x557c5a=_0x354bb4;this[_0x557c5a(0x1bd)][_0x557c5a(0x1e8)](_0x3322a9);});}['onReady'](){const _0x58d2b8=_0x34024c;this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](f),this[_0x58d2b8(0x1bd)][_0x58d2b8(0x1d9)](_);}};$(g,_0x34024c(0x1a1),W),$(g,_0x34024c(0x1ea),_0x1cfbda[_0x34024c(0x1c2)]),g=ie([_0x114dff(_0x59bd5d,_0x46d5fb,_0xf589bd),N(0x1,_0x1641e7(_0x5130d8)),N(0x2,_0x10c05b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x33b233,_0x595fad){const _0x47d44a=_0x3c7e,_0x3eab5d=_0x33b233();while(!![]){try{const _0x47fa08=parseInt(_0x47d44a(0x243))/0x1+-parseInt(_0x47d44a(0x23d))/0x2*(parseInt(_0x47d44a(0x23b))/0x3)+parseInt(_0x47d44a(0x1e3))/0x4+parseInt(_0x47d44a(0x1e1))/0x5*(-parseInt(_0x47d44a(0x1fd))/0x6)+-parseInt(_0x47d44a(0x22d))/0x7+-parseInt(_0x47d44a(0x225))/0x8*(-parseInt(_0x47d44a(0x1eb))/0x9)+-parseInt(_0x47d44a(0x217))/0xa;if(_0x47fa08===_0x595fad)break;else _0x3eab5d['push'](_0x3eab5d['shift']());}catch(_0x13d2fb){_0x3eab5d['push'](_0x3eab5d['shift']());}}}(_0x1668,0x19d57),function(_0x42ed06,_0xf28392){const _0x133241=_0x3c7e;typeof exports==_0x133241(0x209)&&typeof module<'u'?_0xf28392(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x133241(0x1fa)&&define[_0x133241(0x1d0)]?define(['exports',_0x133241(0x1f9),_0x133241(0x20f),_0x133241(0x252),_0x133241(0x242),'@univerjs/thread-comment',_0x133241(0x24a),_0x133241(0x1ee)],_0xf28392):(_0x42ed06=typeof globalThis<'u'?globalThis:_0x42ed06||self,_0xf28392(_0x42ed06['UniverProThreadCommentDatasource']={},_0x42ed06['UniverProCollaborationClient'],_0x42ed06[_0x133241(0x1fc)],_0x42ed06[_0x133241(0x1e7)],_0x42ed06[_0x133241(0x230)],_0x42ed06['UniverThreadComment'],_0x42ed06[_0x133241(0x24a)],_0x42ed06['UniverNetwork']));}(this,function(_0x4a3a80,_0x13648d,_0x4340f9,_0x525483,_0x279728,_0x406360,_0x1c3b9f,_0x2f6d70){'use strict';const _0x56720d=_0x3c7e;const _0x254eb9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x197c1e=(_0x469a84=>(_0x469a84[_0x469a84[_0x56720d(0x1e4)]=0x0]=_0x56720d(0x1e4),_0x469a84[_0x469a84[_0x56720d(0x1df)]=0x1]='Solved',_0x469a84[_0x469a84[_0x56720d(0x215)]=-0x1]=_0x56720d(0x215),_0x469a84))(_0x197c1e||{}),_0x40483b=(_0x4f3def=>(_0x4f3def[_0x4f3def[_0x56720d(0x1d9)]=0x0]=_0x56720d(0x1d9),_0x4f3def[_0x4f3def[_0x56720d(0x1e2)]=0x1]=_0x56720d(0x1e2),_0x4f3def[_0x4f3def['Reply']=0x2]=_0x56720d(0x233),_0x4f3def[_0x4f3def[_0x56720d(0x234)]=0x3]=_0x56720d(0x234),_0x4f3def[_0x4f3def[_0x56720d(0x229)]=0x4]=_0x56720d(0x229),_0x4f3def[_0x4f3def[_0x56720d(0x1d6)]=0x5]=_0x56720d(0x1d6),_0x4f3def[_0x4f3def[_0x56720d(0x215)]=-0x1]=_0x56720d(0x215),_0x4f3def))(_0x40483b||{});const _0x422562=_0x4d103c=>_0x525483[_0x56720d(0x221)](new Date(+_0x4d103c))[_0x56720d(0x1f8)](_0x56720d(0x211)),_0x1d94d9=async(_0x6458b0,_0x27319d)=>{const _0x1b3fb2=_0x56720d,_0xf9010a=_0x6458b0['get'](_0x525483['UserManagerService']),_0x4691e6=_0x6458b0[_0x1b3fb2(0x1dc)](_0x2f6d70[_0x1b3fb2(0x236)]);_0x27319d[_0x1b3fb2(0x1d1)](_0x19d661=>{const _0x531414=_0x1b3fb2;_0xf9010a[_0x531414(0x22b)](_0x19d661)&&_0x27319d[_0x531414(0x21b)](_0x19d661);}),_0x27319d[_0x1b3fb2(0x1e0)]&&(await _0x4691e6['get'](_0x1b3fb2(0x249),{'params':{'userIDs':[..._0x27319d]}}))['body']['users'][_0x1b3fb2(0x1d1)](_0x55006a=>{const _0xadc46f=_0x1b3fb2;_0x55006a&&_0xf9010a[_0xadc46f(0x21c)](_0x55006a);});};var _0x588554=Object[_0x56720d(0x1f5)],_0x4cd362=(_0x2b4e83,_0x2815c2,_0x17fb1e,_0x40ea6b)=>{for(var _0x24465e=_0x40ea6b>0x1?void 0x0:_0x40ea6b?_0x588554(_0x2815c2,_0x17fb1e):_0x2815c2,_0x2f78d7=_0x2b4e83['length']-0x1,_0x1e2c96;_0x2f78d7>=0x0;_0x2f78d7--)(_0x1e2c96=_0x2b4e83[_0x2f78d7])&&(_0x24465e=_0x1e2c96(_0x24465e)||_0x24465e);return _0x24465e;},_0x482da6=(_0x2347d3,_0x5011dc)=>(_0x18bc3c,_0xa61c3)=>_0x5011dc(_0x18bc3c,_0xa61c3,_0x2347d3);let _0x45e3f1=class extends _0x525483[_0x56720d(0x24f)]{constructor(_0x1611c0,_0x1e2be9,_0x22aa0c,_0x45580c){const _0x2aa815=_0x56720d;super(),this[_0x2aa815(0x1e8)]=_0x1611c0,this[_0x2aa815(0x228)]=_0x1e2be9,this[_0x2aa815(0x1d2)]=_0x22aa0c,this[_0x2aa815(0x205)]=_0x45580c,this[_0x2aa815(0x21f)](),this[_0x2aa815(0x1fe)]();}['_initUserSync'](){const _0x213c4d=_0x56720d;this[_0x213c4d(0x23e)](this[_0x213c4d(0x228)]['commentUpdate$']['pipe'](_0x1c3b9f[_0x213c4d(0x1f7)](0x10))['subscribe'](_0x485a5a=>{const _0x482df1=_0x213c4d,_0x1d0179=new Set();_0x485a5a['forEach'](_0x1bd32c=>{const _0x3b1c10=_0x3c7e;switch(_0x1bd32c[_0x3b1c10(0x21d)]){case _0x3b1c10(0x23c):{const _0x2be03a=_0x1bd32c[_0x3b1c10(0x238)][_0x3b1c10(0x200)];_0x1d0179[_0x3b1c10(0x23c)](_0x2be03a);break;}}}),_0x1d94d9(this[_0x482df1(0x205)],_0x1d0179);}));}[_0x56720d(0x21f)](){const _0x510d15=_0x56720d;this[_0x510d15(0x23e)](this[_0x510d15(0x1e8)]['commentUpdate$'][_0x510d15(0x1f0)](async _0x51fcf9=>{const _0x3b811f=_0x510d15;var _0xdcce89,_0x1b7082,_0x229f22,_0x3aa6d1;const _0x433b82=(_0xdcce89=this[_0x3b811f(0x228)]['getUnit'](_0x51fcf9['unitId'])['find'](_0x57d6a8=>_0x57d6a8[_0x3b811f(0x206)]===_0x51fcf9[_0x3b811f(0x206)]))==null?void 0x0:_0xdcce89['root'];if(!_0x433b82)return;const {unitId:_0x54bebc,subUnitId:_0x18f27b}=_0x433b82;switch(_0x51fcf9['user']&&this['_userService']['addUser'](_0x51fcf9[_0x3b811f(0x1d7)]),_0x51fcf9['type']){case _0x40483b[_0x3b811f(0x1e2)]:break;case _0x40483b[_0x3b811f(0x233)]:{this[_0x3b811f(0x228)][_0x3b811f(0x247)](_0x54bebc,_0x18f27b,{'unitId':_0x54bebc,'subUnitId':_0x18f27b,'ref':'','id':_0x51fcf9[_0x3b811f(0x1e5)],'dT':_0x422562(+_0x51fcf9[_0x3b811f(0x239)]),'threadId':_0x51fcf9[_0x3b811f(0x206)],'personId':(_0x229f22=(_0x1b7082=_0x51fcf9[_0x3b811f(0x1d7)])==null?void 0x0:_0x1b7082[_0x3b811f(0x22c)])!=null?_0x229f22:_0x51fcf9['userId'],'text':JSON[_0x3b811f(0x237)](_0x51fcf9[_0x3b811f(0x251)]),'parentId':_0x433b82['id']});break;}case _0x40483b['Delete']:{const _0x726599=this['_threadCommentModel']['getComment'](_0x54bebc,_0x18f27b,_0x51fcf9[_0x3b811f(0x1e5)]);_0x726599&&_0x726599[_0x3b811f(0x241)]&&this['_threadCommentModel'][_0x3b811f(0x250)](_0x54bebc,_0x18f27b,_0x51fcf9[_0x3b811f(0x1e5)]);break;}case _0x40483b['Edit']:{this[_0x3b811f(0x228)][_0x3b811f(0x1d3)](_0x54bebc,_0x18f27b,{'commentId':_0x51fcf9[_0x3b811f(0x1e5)],'text':JSON[_0x3b811f(0x237)](_0x51fcf9[_0x3b811f(0x251)])});break;}case _0x40483b[_0x3b811f(0x1d6)]:{const _0xfd4cc0=(_0x3aa6d1=this['_threadCommentModel']['getUnit'](_0x51fcf9['unitId'])[_0x3b811f(0x1f1)](_0x481a58=>_0x481a58[_0x3b811f(0x206)]===_0x51fcf9[_0x3b811f(0x206)]))==null?void 0x0:_0x3aa6d1[_0x3b811f(0x1d4)];_0xfd4cc0&&this[_0x3b811f(0x228)]['resolveComment'](_0x54bebc,_0x18f27b,_0xfd4cc0['id'],_0x51fcf9[_0x3b811f(0x203)]===_0x197c1e[_0x3b811f(0x1df)]);break;}}}));}};_0x45e3f1=_0x4cd362([_0x482da6(0x0,_0x525483[_0x56720d(0x1e9)](_0x13648d[_0x56720d(0x1dd)])),_0x482da6(0x1,_0x525483[_0x56720d(0x1e9)](_0x406360[_0x56720d(0x235)])),_0x482da6(0x2,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x22e)])),_0x482da6(0x3,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x218)]))],_0x45e3f1);const _0x3d21c7=_0x56720d(0x1e6),_0x3a391f={};var _0x313121=Object[_0x56720d(0x1f5)],_0x4843bd=(_0x51788b,_0xfdd25c,_0x45a249,_0x222c5a)=>{const _0x31a43f=_0x56720d;for(var _0x3a4eb3=_0x222c5a>0x1?void 0x0:_0x222c5a?_0x313121(_0xfdd25c,_0x45a249):_0xfdd25c,_0x536e2e=_0x51788b[_0x31a43f(0x224)]-0x1,_0x5508de;_0x536e2e>=0x0;_0x536e2e--)(_0x5508de=_0x51788b[_0x536e2e])&&(_0x3a4eb3=_0x5508de(_0x3a4eb3)||_0x3a4eb3);return _0x3a4eb3;},_0x9e8b73=(_0x2c5472,_0x5c7e84)=>(_0x5cf7ef,_0x5e4e4b)=>_0x5c7e84(_0x5cf7ef,_0x5e4e4b,_0x2c5472);function _0x3fcce9(_0x23829c,_0x337b78){const _0x5c69b8=_0x56720d,_0x249598=_0x23829c[_0x5c69b8(0x22f)][0x0];return{..._0x337b78,'id':_0x249598['replyId'],'resolved':_0x23829c[_0x5c69b8(0x203)]===0x1,'dT':_0x422562(_0x249598[_0x5c69b8(0x239)]),'personId':_0x249598[_0x5c69b8(0x207)],'threadId':_0x249598[_0x5c69b8(0x206)]};}function _0x1bc301(_0xd82791,_0x34e3c4,_0xaff656){const _0x2d84c2=_0x56720d;var _0x2e295b,_0x29cd24;if(((_0x29cd24=(_0x2e295b=_0xd82791==null?void 0x0:_0xd82791[_0x2d84c2(0x22f)])==null?void 0x0:_0x2e295b[_0x2d84c2(0x224)])!=null?_0x29cd24:0x0)>0x0){const _0x495c0b=(_0x424264,_0x5e3a8b)=>({'id':_0x424264[_0x2d84c2(0x1e5)],'threadId':_0x424264[_0x2d84c2(0x206)],'dT':_0x422562(_0x424264[_0x2d84c2(0x239)]),'personId':_0x424264[_0x2d84c2(0x207)],'resolved':_0xd82791[_0x2d84c2(0x203)]===_0x197c1e[_0x2d84c2(0x1df)],'unitId':_0x34e3c4,'subUnitId':_0xaff656,'text':JSON[_0x2d84c2(0x237)](_0x424264['content']),'parentId':_0x5e3a8b}),_0x87f0c1=_0x495c0b(_0xd82791['replies'][0x0]);return{..._0x87f0c1,'children':_0xd82791['replies'][_0x2d84c2(0x1ed)](0x1)[_0x2d84c2(0x219)](_0x1eb1d7=>_0x495c0b(_0x1eb1d7,_0x87f0c1['id']))};}return null;}let _0x4b7ec2=class{constructor(_0x55d2c5,_0x4b4022,_0xc7cd55){const _0x1b0f6d=_0x56720d;this[_0x1b0f6d(0x24d)]=_0x55d2c5,this[_0x1b0f6d(0x1d2)]=_0x4b4022,this[_0x1b0f6d(0x1f2)]=_0xc7cd55;}async[_0x56720d(0x247)](_0xe46b6){const _0x3b8478=_0x56720d;var _0xa2ede3,_0x4b9b05;const {parentId:_0x45fada,unitId:_0xecdb20,text:_0x3da925,threadId:_0x37dd08}=_0xe46b6,_0x1e43bb=(_0x4b9b05=(_0xa2ede3=_0x3da925['customRanges'])==null?void 0x0:_0xa2ede3[_0x3b8478(0x212)](_0x5bacb2=>_0x5bacb2['rangeType']===_0x525483['CustomRangeType']['COMMENT'])[_0x3b8478(0x219)](_0x2e291b=>_0x2e291b['rangeId']))!=null?_0x4b9b05:[],_0x49056b=JSON[_0x3b8478(0x21a)](_0x3da925),_0x1b833b=(await this[_0x3b8478(0x1f2)][_0x3b8478(0x231)](_0xecdb20))[_0x3b8478(0x214)]();if(_0x45fada){const _0x36ef92={'memberId':_0x1b833b,'unitId':_0xecdb20,'content':_0x49056b,'mention':_0x1e43bb,'threadId':_0x37dd08},_0x255746=(await this[_0x3b8478(0x24d)][_0x3b8478(0x22a)](_0x3b8478(0x1d8)+_0xecdb20+_0x3b8478(0x1f6),{'body':_0x36ef92}))[_0x3b8478(0x240)]['reply'];return{..._0xe46b6,'id':_0x255746['replyId'],'dT':_0x525483[_0x3b8478(0x221)](+_0x255746[_0x3b8478(0x239)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x255746[_0x3b8478(0x207)]};}else{const _0x10cb84={'memberId':_0x1b833b,'unitId':_0xecdb20,'content':_0x49056b,'mention':_0x1e43bb},_0xe39c60=await this['_httpService'][_0x3b8478(0x22a)]('/universer-api/comment/unit/'+_0xecdb20+'/add',{'body':_0x10cb84});return _0x3fcce9(_0xe39c60[_0x3b8478(0x240)][_0x3b8478(0x21e)],_0xe46b6);}}async['updateComment'](_0x3ae6df){const _0x291882=_0x56720d;var _0x561349,_0x120dd7;const {text:_0x160ca0,unitId:_0x1631ec}=_0x3ae6df,_0x446cc7=(_0x120dd7=(_0x561349=_0x160ca0[_0x291882(0x24e)])==null?void 0x0:_0x561349[_0x291882(0x212)](_0x1f35f3=>_0x1f35f3[_0x291882(0x20b)]===_0x525483[_0x291882(0x210)][_0x291882(0x201)])[_0x291882(0x219)](_0x54d797=>_0x54d797[_0x291882(0x216)]))!=null?_0x120dd7:[],_0x108ebe=JSON[_0x291882(0x21a)](_0x160ca0),_0x301fa8=_0x3ae6df['threadId'],_0x58f747=_0x3ae6df['id'],_0x1c2384={'memberId':(await this['_sessionService'][_0x291882(0x231)](_0x1631ec))['getMemberID'](),'unitId':_0x1631ec,'threadId':_0x301fa8,'mention':_0x446cc7,'content':_0x108ebe,'replyId':_0x58f747},_0x266e4a=await this[_0x291882(0x24d)][_0x291882(0x22a)]('/universer-api/comment/unit/'+_0x1631ec+_0x291882(0x1ef),{'body':_0x1c2384});return!_0x266e4a[_0x291882(0x240)][_0x291882(0x23f)]||_0x266e4a[_0x291882(0x240)][_0x291882(0x23f)][_0x291882(0x222)]===0x1;}async['resolveComment'](_0x3735b3){const _0x35f812=_0x56720d,{unitId:_0x15fbdc}=_0x3735b3,_0x292503=_0x3735b3[_0x35f812(0x206)],_0x1558a5={'memberId':this[_0x35f812(0x1d2)]['getCurrentUser']()[_0x35f812(0x22c)],'unitId':_0x15fbdc,'threadId':_0x292503,'solved':_0x3735b3[_0x35f812(0x1f4)]?_0x197c1e['Solved']:_0x197c1e[_0x35f812(0x1e4)]},_0x5533e2=await this[_0x35f812(0x24d)][_0x35f812(0x22a)]('/universer-api/comment/unit/'+_0x15fbdc+'/solved',{'body':_0x1558a5});return!_0x5533e2[_0x35f812(0x240)][_0x35f812(0x23f)]||_0x5533e2[_0x35f812(0x240)][_0x35f812(0x23f)][_0x35f812(0x222)]===0x1;}async[_0x56720d(0x250)](_0x5cdd16,_0x588338,_0x8b0468,_0x355aa2){const _0x3b57f5=_0x56720d,_0x4609bd={'memberId':(await this[_0x3b57f5(0x1f2)][_0x3b57f5(0x231)](_0x5cdd16))[_0x3b57f5(0x214)](),'threadId':_0x8b0468,'replyId':_0x355aa2,'unitId':_0x5cdd16},_0x540056=await this[_0x3b57f5(0x24d)][_0x3b57f5(0x22a)]('/universer-api/comment/unit/'+_0x5cdd16+_0x3b57f5(0x24c),{'body':_0x4609bd});return!_0x540056[_0x3b57f5(0x240)][_0x3b57f5(0x23f)]||_0x540056[_0x3b57f5(0x240)][_0x3b57f5(0x23f)][_0x3b57f5(0x222)]===0x1;}async[_0x56720d(0x23a)](_0x2ee95a,_0x3f39e7,_0x11d80f){const _0x5b712f=_0x56720d,_0x1d872b={'unitId':_0x2ee95a,'threadId':_0x11d80f},_0x136202=await this[_0x5b712f(0x24d)][_0x5b712f(0x22a)](_0x5b712f(0x1d8)+_0x2ee95a+_0x5b712f(0x226),{'body':_0x1d872b}),_0x241951=_0x11d80f['map'](_0xee2461=>_0x1bc301(_0x136202['body'][_0x5b712f(0x202)][_0xee2461],_0x2ee95a,_0x3f39e7))[_0x5b712f(0x212)](Boolean);return Object[_0x5b712f(0x1fb)](_0x136202[_0x5b712f(0x240)][_0x5b712f(0x20a)])[_0x5b712f(0x1d1)](_0x3c4173=>{const _0x4e09d9=_0x5b712f;this['_userService'][_0x4e09d9(0x21c)](_0x3c4173);}),_0x241951;}['saveCommentToSnapshot'](_0x1a7087){const _0x32538d=_0x56720d;return{'id':_0x1a7087['id'],'threadId':_0x1a7087[_0x32538d(0x206)],'ref':_0x1a7087[_0x32538d(0x20d)]};}};_0x4b7ec2=_0x4843bd([_0x9e8b73(0x0,_0x525483['Inject'](_0x2f6d70[_0x56720d(0x236)])),_0x9e8b73(0x1,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x22e)])),_0x9e8b73(0x2,_0x525483[_0x56720d(0x1e9)](_0x13648d[_0x56720d(0x1f3)]))],_0x4b7ec2);var _0x23cff4=Object[_0x56720d(0x1f5)],_0x3de4e7=(_0x223fbe,_0x2eed46,_0x65505,_0x819511)=>{for(var _0x3b8f8f=_0x819511>0x1?void 0x0:_0x819511?_0x23cff4(_0x2eed46,_0x65505):_0x2eed46,_0x110c5d=_0x223fbe['length']-0x1,_0x55c55b;_0x110c5d>=0x0;_0x110c5d--)(_0x55c55b=_0x223fbe[_0x110c5d])&&(_0x3b8f8f=_0x55c55b(_0x3b8f8f)||_0x3b8f8f);return _0x3b8f8f;},_0xf86572=(_0x50a455,_0x3819ce)=>(_0x32402b,_0x156cf9)=>_0x3819ce(_0x32402b,_0x156cf9,_0x50a455);let _0x15e92f=class extends _0x525483[_0x56720d(0x24f)]{constructor(_0x48c599,_0x4ef969){const _0x99bfd9=_0x56720d;super(),this['_threadCommentDataSourceService']=_0x48c599,this[_0x99bfd9(0x1da)]=_0x4ef969,this[_0x99bfd9(0x220)]();}[_0x56720d(0x220)](){const _0x489895=_0x56720d;this[_0x489895(0x20e)]['dataSource']=this[_0x489895(0x1da)],this[_0x489895(0x20e)][_0x489895(0x204)]=!0x1;}};_0x15e92f=_0x3de4e7([_0xf86572(0x0,_0x406360[_0x56720d(0x208)]),_0xf86572(0x1,_0x525483[_0x56720d(0x1e9)](_0x4b7ec2))],_0x15e92f);var _0x3d2a86=Object[_0x56720d(0x1ff)],_0x1e27fc=Object[_0x56720d(0x1f5)],_0x5bc067=(_0x52c961,_0x49036a,_0x445c36)=>_0x49036a in _0x52c961?_0x3d2a86(_0x52c961,_0x49036a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x445c36}):_0x52c961[_0x49036a]=_0x445c36,_0x11e518=(_0x57dff6,_0x1239a6,_0x16931a,_0xcbef54)=>{const _0x148383=_0x56720d;for(var _0x5ebe72=_0xcbef54>0x1?void 0x0:_0xcbef54?_0x1e27fc(_0x1239a6,_0x16931a):_0x1239a6,_0x502a22=_0x57dff6[_0x148383(0x224)]-0x1,_0xfb6169;_0x502a22>=0x0;_0x502a22--)(_0xfb6169=_0x57dff6[_0x502a22])&&(_0x5ebe72=_0xfb6169(_0x5ebe72)||_0x5ebe72);return _0x5ebe72;},_0x2d76a7=(_0x4db5f4,_0x44713f)=>(_0x135f74,_0x44752f)=>_0x44713f(_0x135f74,_0x44752f,_0x4db5f4),_0x4f3453=(_0x3f4477,_0x2eff1d,_0x3e69aa)=>_0x5bc067(_0x3f4477,typeof _0x2eff1d!=_0x56720d(0x1d5)?_0x2eff1d+'':_0x2eff1d,_0x3e69aa);_0x4a3a80['UniverThreadCommentDataSourcePlugin']=class extends _0x525483[_0x56720d(0x245)]{constructor(_0x1e9495=_0x3a391f,_0x2a2573,_0x3c24ab){const _0x3d067d=_0x56720d;super(),this[_0x3d067d(0x227)]=_0x1e9495,this[_0x3d067d(0x205)]=_0x2a2573,this['_configService']=_0x3c24ab;const {..._0x568af9}=_0x525483[_0x3d067d(0x232)]({},_0x3a391f,this['_config']);this[_0x3d067d(0x248)][_0x3d067d(0x1ea)](_0x3d21c7,_0x568af9);}[_0x56720d(0x1cf)](){const _0x2704aa=_0x56720d;[[_0x4b7ec2],[_0x15e92f],[_0x45e3f1]][_0x2704aa(0x1d1)](_0x15501a=>{const _0xe8a46b=_0x2704aa;this[_0xe8a46b(0x205)]['add'](_0x15501a);});}[_0x56720d(0x1ec)](){const _0x325ce1=_0x56720d;this[_0x325ce1(0x205)]['get'](_0x15e92f),this[_0x325ce1(0x205)]['get'](_0x45e3f1);}},_0x4f3453(_0x4a3a80[_0x56720d(0x1de)],'pluginName',_0x254eb9),_0x4f3453(_0x4a3a80[_0x56720d(0x1de)],_0x56720d(0x21d),_0x525483[_0x56720d(0x223)]['UNIVER_UNKNOWN']),_0x4a3a80[_0x56720d(0x1de)]=_0x11e518([_0x525483[_0x56720d(0x213)](_0x279728[_0x56720d(0x24b)],_0x13648d['UniverCollaborationClientPlugin'],_0x4340f9[_0x56720d(0x246)]),_0x2d76a7(0x1,_0x525483[_0x56720d(0x1e9)](_0x525483[_0x56720d(0x218)])),_0x2d76a7(0x2,_0x525483[_0x56720d(0x20c)])],_0x4a3a80['UniverThreadCommentDataSourcePlugin']),Object[_0x56720d(0x1ff)](_0x4a3a80,Symbol[_0x56720d(0x244)],{'value':_0x56720d(0x1db)});}));function _0x3c7e(_0x126814,_0x4c2150){_0x126814=_0x126814-0x1cf;const _0x16682f=_0x1668();let _0x3c7e6b=_0x16682f[_0x126814];return _0x3c7e6b;}function _0x1668(){const _0x23b250=['add','68078cQgqPU','disposeWithMe','error','body','parentId','@univerjs/thread-comment-ui','135021ZzXVXw','toStringTag','Plugin','UniverLicensePlugin','addComment','_configService','/universer-api/user/list','rxjs','UniverThreadCommentUIPlugin','/delete','_httpService','customRanges','Disposable','deleteComment','content','@univerjs/core','onStarting','amd','forEach','_userService','updateComment','root','symbol','Solve','user','/universer-api/comment/unit/','Unknown','_threadCommentDataSource','Module','get','CommentService','UniverThreadCommentDataSourcePlugin','Solved','size','5yotmLN','Add','353380VlZeqe','OpenOrReOpen','replyId','thread-comment-data-source.config','UniverCore','_commentService','Inject','setConfig','9BHqcFW','onReady','slice','@univerjs/network','/edit','subscribe','find','_sessionService','CollaborationSessionService','resolved','getOwnPropertyDescriptor','/reply','bufferTime','format','@univerjs-pro/collaboration-client','function','values','UniverProLicense','150882gdtVIN','_initUserSync','defineProperty','personId','COMMENT','comments','solved','syncUpdateMutationToColla','_injector','threadId','userId','IThreadCommentDataSourceService','object','users','rangeType','IConfigService','ref','_threadCommentDataSourceService','@univerjs-pro/license','CustomRangeType','YYYY/MM/DD\x20HH:mm','filter','DependentOn','getMemberID','UNRECOGNIZED','rangeId','679630lgBCSF','Injector','map','stringify','delete','addUser','type','comment','_init','_initDataSource','dayjs','code','UniverInstanceType','length','1622384liTaje','/list','_config','_threadCommentModel','Delete','post','getUser','userID','1352400euSnkm','UserManagerService','replies','UniverThreadCommentUi','requireSession','merge','Reply','Edit','ThreadCommentModel','HTTPService','parse','payload','createTimestamp','listComments','3wwWMuX'];_0x1668=function(){return _0x23b250;};return _0x1668();}
|
|
1
|
+
function _0x1e10(_0x512148,_0x2ee8c3){_0x512148=_0x512148-0x67;const _0x404909=_0x4049();let _0x1e1039=_0x404909[_0x512148];return _0x1e1039;}(function(_0x104196,_0x2ec350){const _0x586797=_0x1e10,_0x59149f=_0x104196();while(!![]){try{const _0x9d4b96=parseInt(_0x586797(0x92))/0x1+parseInt(_0x586797(0xd4))/0x2+-parseInt(_0x586797(0xb7))/0x3+-parseInt(_0x586797(0xcc))/0x4+-parseInt(_0x586797(0xb5))/0x5+parseInt(_0x586797(0xac))/0x6*(parseInt(_0x586797(0xa8))/0x7)+-parseInt(_0x586797(0x6e))/0x8;if(_0x9d4b96===_0x2ec350)break;else _0x59149f['push'](_0x59149f['shift']());}catch(_0x3e6089){_0x59149f['push'](_0x59149f['shift']());}}}(_0x4049,0x8f55d),function(_0xe078fe,_0x1635f9){const _0x50102b=_0x1e10;typeof exports==_0x50102b(0xcb)&&typeof module<'u'?_0x1635f9(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x50102b(0xdd)&&define[_0x50102b(0xcf)]?define([_0x50102b(0xb0),_0x50102b(0x7a),_0x50102b(0x91),_0x50102b(0xbf),'@univerjs/thread-comment-ui',_0x50102b(0xe5),_0x50102b(0x71),_0x50102b(0xd7)],_0x1635f9):(_0xe078fe=typeof globalThis<'u'?globalThis:_0xe078fe||self,_0x1635f9(_0xe078fe['UniverProThreadCommentDatasource']={},_0xe078fe[_0x50102b(0xa6)],_0xe078fe[_0x50102b(0x77)],_0xe078fe[_0x50102b(0x9c)],_0xe078fe[_0x50102b(0x90)],_0xe078fe[_0x50102b(0x96)],_0xe078fe[_0x50102b(0x71)],_0xe078fe[_0x50102b(0xe8)]));}(this,function(_0x8c5ac4,_0x150138,_0x41db44,_0x20b2cb,_0x422b9e,_0x452b2f,_0xd5333,_0x9f538c){'use strict';const _0x518227=_0x1e10;const _0x378f72=_0x518227(0x95);var _0x4a49df=(_0x51d771=>(_0x51d771[_0x51d771['OpenOrReOpen']=0x0]=_0x518227(0xd9),_0x51d771[_0x51d771[_0x518227(0x8d)]=0x1]=_0x518227(0x8d),_0x51d771[_0x51d771[_0x518227(0x6a)]=-0x1]=_0x518227(0x6a),_0x51d771))(_0x4a49df||{}),_0x39c2af=(_0x3d4198=>(_0x3d4198[_0x3d4198[_0x518227(0xb4)]=0x0]=_0x518227(0xb4),_0x3d4198[_0x3d4198[_0x518227(0x99)]=0x1]=_0x518227(0x99),_0x3d4198[_0x3d4198['Reply']=0x2]=_0x518227(0x9d),_0x3d4198[_0x3d4198[_0x518227(0xd0)]=0x3]='Edit',_0x3d4198[_0x3d4198[_0x518227(0x6f)]=0x4]=_0x518227(0x6f),_0x3d4198[_0x3d4198[_0x518227(0xe9)]=0x5]=_0x518227(0xe9),_0x3d4198[_0x3d4198[_0x518227(0x6a)]=-0x1]=_0x518227(0x6a),_0x3d4198))(_0x39c2af||{});const _0x21b2ba=_0x3039eb=>_0x20b2cb[_0x518227(0xea)](new Date(+_0x3039eb))[_0x518227(0x68)](_0x518227(0xba)),_0x555a25=async(_0x5f30a9,_0x5a5b52)=>{const _0x19177c=_0x518227,_0x4afab7=_0x5f30a9[_0x19177c(0xde)](_0x20b2cb[_0x19177c(0xc8)]),_0x2c7e1b=_0x5f30a9['get'](_0x9f538c[_0x19177c(0xbb)]);_0x5a5b52['forEach'](_0x39fc39=>{const _0x3ea067=_0x19177c;_0x4afab7[_0x3ea067(0xb9)](_0x39fc39)&&_0x5a5b52[_0x3ea067(0xa9)](_0x39fc39);}),_0x5a5b52['size']&&(await _0x2c7e1b['get'](_0x19177c(0x7d),{'params':{'userIDs':[..._0x5a5b52]}}))['body'][_0x19177c(0x85)][_0x19177c(0x7e)](_0x1519cf=>{const _0x110e45=_0x19177c;_0x1519cf&&_0x4afab7[_0x110e45(0x69)](_0x1519cf);});};var _0x32e3d9=Object[_0x518227(0xa5)],_0x40c1de=(_0xaebe00,_0x1b210b,_0x24abab,_0x3d3558)=>{const _0x362537=_0x518227;for(var _0x39e4f5=_0x3d3558>0x1?void 0x0:_0x3d3558?_0x32e3d9(_0x1b210b,_0x24abab):_0x1b210b,_0x1d416a=_0xaebe00[_0x362537(0xab)]-0x1,_0x3ce2c3;_0x1d416a>=0x0;_0x1d416a--)(_0x3ce2c3=_0xaebe00[_0x1d416a])&&(_0x39e4f5=_0x3ce2c3(_0x39e4f5)||_0x39e4f5);return _0x39e4f5;},_0x213a69=(_0x2595d3,_0x378ed7)=>(_0x53d753,_0x5bddd8)=>_0x378ed7(_0x53d753,_0x5bddd8,_0x2595d3);let _0x2021bf=class extends _0x20b2cb[_0x518227(0x88)]{constructor(_0x467d79,_0xb16511,_0x3a4511,_0x2d883c){const _0x215223=_0x518227;super(),this[_0x215223(0xa4)]=_0x467d79,this[_0x215223(0x8c)]=_0xb16511,this[_0x215223(0xda)]=_0x3a4511,this[_0x215223(0x78)]=_0x2d883c,this[_0x215223(0xdc)](),this[_0x215223(0xa3)]();}['_initUserSync'](){const _0x50dd91=_0x518227;this['disposeWithMe'](this[_0x50dd91(0x8c)][_0x50dd91(0xb2)][_0x50dd91(0xaa)](_0xd5333['bufferTime'](0x10))[_0x50dd91(0xe7)](_0x5a1e10=>{const _0x7a8d1b=_0x50dd91,_0x514c0a=new Set();_0x5a1e10[_0x7a8d1b(0x7e)](_0x1a5a9f=>{const _0x55b731=_0x7a8d1b;switch(_0x1a5a9f[_0x55b731(0x8a)]){case _0x55b731(0xbd):{const _0x32a87d=_0x1a5a9f[_0x55b731(0xe4)][_0x55b731(0x67)];_0x514c0a['add'](_0x32a87d);break;}}}),_0x555a25(this['_injector'],_0x514c0a);}));}[_0x518227(0xdc)](){const _0x13763a=_0x518227;this[_0x13763a(0xc9)](this['_commentService']['commentUpdate$']['subscribe'](async _0x533b69=>{const _0x650bbd=_0x13763a;var _0x13251c,_0x884367,_0x210d32,_0x53448d;const _0x18a952=(_0x13251c=this['_threadCommentModel']['getUnit'](_0x533b69[_0x650bbd(0xe0)])['find'](_0x4327a9=>_0x4327a9[_0x650bbd(0x86)]===_0x533b69[_0x650bbd(0x86)]))==null?void 0x0:_0x13251c[_0x650bbd(0xd1)];if(!_0x18a952)return;const {unitId:_0x5707dd,subUnitId:_0x490785}=_0x18a952;switch(_0x533b69['user']&&this['_userService']['addUser'](_0x533b69[_0x650bbd(0xc6)]),_0x533b69[_0x650bbd(0x8a)]){case _0x39c2af[_0x650bbd(0x99)]:break;case _0x39c2af[_0x650bbd(0x9d)]:{this['_threadCommentModel']['addComment'](_0x5707dd,_0x490785,{'unitId':_0x5707dd,'subUnitId':_0x490785,'ref':'','id':_0x533b69[_0x650bbd(0xce)],'dT':_0x21b2ba(+_0x533b69[_0x650bbd(0xca)]),'threadId':_0x533b69[_0x650bbd(0x86)],'personId':(_0x210d32=(_0x884367=_0x533b69[_0x650bbd(0xc6)])==null?void 0x0:_0x884367['userID'])!=null?_0x210d32:_0x533b69[_0x650bbd(0x79)],'text':JSON['parse'](_0x533b69[_0x650bbd(0xdf)]),'parentId':_0x18a952['id']});break;}case _0x39c2af[_0x650bbd(0x6f)]:{const _0x71bad=this[_0x650bbd(0x8c)][_0x650bbd(0xe2)](_0x5707dd,_0x490785,_0x533b69[_0x650bbd(0xce)]);_0x71bad&&_0x71bad['parentId']&&this['_threadCommentModel']['deleteComment'](_0x5707dd,_0x490785,_0x533b69[_0x650bbd(0xce)]);break;}case _0x39c2af[_0x650bbd(0xd0)]:{this[_0x650bbd(0x8c)]['updateComment'](_0x5707dd,_0x490785,{'commentId':_0x533b69[_0x650bbd(0xce)],'text':JSON[_0x650bbd(0xae)](_0x533b69[_0x650bbd(0xdf)])});break;}case _0x39c2af[_0x650bbd(0xe9)]:{const _0x2ccc66=(_0x53448d=this[_0x650bbd(0x8c)][_0x650bbd(0x87)](_0x533b69[_0x650bbd(0xe0)])['find'](_0x180e4a=>_0x180e4a[_0x650bbd(0x86)]===_0x533b69[_0x650bbd(0x86)]))==null?void 0x0:_0x53448d['root'];_0x2ccc66&&this['_threadCommentModel'][_0x650bbd(0xad)](_0x5707dd,_0x490785,_0x2ccc66['id'],_0x533b69[_0x650bbd(0xd2)]===_0x4a49df['Solved']);break;}}}));}};_0x2021bf=_0x40c1de([_0x213a69(0x0,_0x20b2cb[_0x518227(0x76)](_0x150138[_0x518227(0xaf)])),_0x213a69(0x1,_0x20b2cb['Inject'](_0x452b2f['ThreadCommentModel'])),_0x213a69(0x2,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0xc8)])),_0x213a69(0x3,_0x20b2cb[_0x518227(0x76)](_0x20b2cb['Injector']))],_0x2021bf);const _0xd4012=_0x518227(0x81),_0x12b701={};var _0x13bd95=Object[_0x518227(0xa5)],_0x1e9da9=(_0x257214,_0x49d8cc,_0xaa434b,_0x73aa5)=>{const _0x4105f4=_0x518227;for(var _0x50d19c=_0x73aa5>0x1?void 0x0:_0x73aa5?_0x13bd95(_0x49d8cc,_0xaa434b):_0x49d8cc,_0x3f62ac=_0x257214[_0x4105f4(0xab)]-0x1,_0x43b91f;_0x3f62ac>=0x0;_0x3f62ac--)(_0x43b91f=_0x257214[_0x3f62ac])&&(_0x50d19c=_0x43b91f(_0x50d19c)||_0x50d19c);return _0x50d19c;},_0x5ec117=(_0x2aecdb,_0x169b11)=>(_0x1d9617,_0x4cb2e8)=>_0x169b11(_0x1d9617,_0x4cb2e8,_0x2aecdb);function _0x3c462a(_0x289c47,_0x3fabb){const _0x28b727=_0x518227,_0x42b375=_0x289c47[_0x28b727(0x72)][0x0];return{..._0x3fabb,'id':_0x42b375[_0x28b727(0xce)],'resolved':_0x289c47[_0x28b727(0xd2)]===0x1,'dT':_0x21b2ba(_0x42b375[_0x28b727(0xca)]),'personId':_0x42b375['userId'],'threadId':_0x42b375[_0x28b727(0x86)]};}function _0x52bbc0(_0x1432c7,_0xa742e7,_0x28ff06){const _0x52146c=_0x518227;var _0x4cdfbd,_0x2abd54;if(((_0x2abd54=(_0x4cdfbd=_0x1432c7==null?void 0x0:_0x1432c7[_0x52146c(0x72)])==null?void 0x0:_0x4cdfbd[_0x52146c(0xab)])!=null?_0x2abd54:0x0)>0x0){const _0x4ec8b6=(_0x95cea8,_0xbf9922)=>({'id':_0x95cea8['replyId'],'threadId':_0x95cea8['threadId'],'dT':_0x21b2ba(_0x95cea8[_0x52146c(0xca)]),'personId':_0x95cea8[_0x52146c(0x79)],'resolved':_0x1432c7[_0x52146c(0xd2)]===_0x4a49df['Solved'],'unitId':_0xa742e7,'subUnitId':_0x28ff06,'text':JSON[_0x52146c(0xae)](_0x95cea8[_0x52146c(0xdf)]),'parentId':_0xbf9922}),_0x9a3d33=_0x4ec8b6(_0x1432c7[_0x52146c(0x72)][0x0]);return{..._0x9a3d33,'children':_0x1432c7['replies']['slice'](0x1)[_0x52146c(0xbe)](_0x36e757=>_0x4ec8b6(_0x36e757,_0x9a3d33['id']))};}return null;}let _0x2b8bfd=class{constructor(_0x25ef62,_0x1f6465,_0x2ac169){const _0x4ac67b=_0x518227;this[_0x4ac67b(0xd8)]=_0x25ef62,this['_userService']=_0x1f6465,this[_0x4ac67b(0xd5)]=_0x2ac169;}async['addComment'](_0x3741dd){const _0x53660f=_0x518227;var _0x4b88e8,_0x2656b2;const {parentId:_0x506af3,unitId:_0x53637c,text:_0x4ecfec,threadId:_0x5abcbb}=_0x3741dd,_0x248cad=(_0x2656b2=(_0x4b88e8=_0x4ecfec[_0x53660f(0xb6)])==null?void 0x0:_0x4b88e8[_0x53660f(0x9b)](_0x57c490=>_0x57c490[_0x53660f(0x9a)]===_0x20b2cb[_0x53660f(0x6c)][_0x53660f(0x97)])[_0x53660f(0xbe)](_0x21f21f=>_0x21f21f[_0x53660f(0x7f)]))!=null?_0x2656b2:[],_0x242dde=JSON[_0x53660f(0x83)](_0x4ecfec),_0x287395=(await this['_sessionService'][_0x53660f(0xa7)](_0x53637c))[_0x53660f(0xc2)]();if(_0x506af3){const _0xb23eab={'memberId':_0x287395,'unitId':_0x53637c,'content':_0x242dde,'mention':_0x248cad,'threadId':_0x5abcbb},_0x38c1aa=(await this[_0x53660f(0xd8)]['post'](_0x53660f(0xc5)+_0x53637c+_0x53660f(0xe6),{'body':_0xb23eab}))['body'][_0x53660f(0x9e)];return{..._0x3741dd,'id':_0x38c1aa[_0x53660f(0xce)],'dT':_0x20b2cb[_0x53660f(0xea)](+_0x38c1aa[_0x53660f(0xca)])[_0x53660f(0x68)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x38c1aa['userId']};}else{const _0x23feea={'memberId':_0x287395,'unitId':_0x53637c,'content':_0x242dde,'mention':_0x248cad},_0x35a650=await this['_httpService'][_0x53660f(0x73)](_0x53660f(0xc5)+_0x53637c+_0x53660f(0x8e),{'body':_0x23feea});return _0x3c462a(_0x35a650['body'][_0x53660f(0x84)],_0x3741dd);}}async[_0x518227(0x74)](_0x3560c4){const _0x4fdaf0=_0x518227;var _0x17be41,_0x4fb7b8;const {text:_0x3b64ac,unitId:_0x101030}=_0x3560c4,_0x33dffd=(_0x4fb7b8=(_0x17be41=_0x3b64ac['customRanges'])==null?void 0x0:_0x17be41['filter'](_0x5ef4a4=>_0x5ef4a4[_0x4fdaf0(0x9a)]===_0x20b2cb[_0x4fdaf0(0x6c)][_0x4fdaf0(0x97)])[_0x4fdaf0(0xbe)](_0x24389f=>_0x24389f['rangeId']))!=null?_0x4fb7b8:[],_0x38b5dc=JSON[_0x4fdaf0(0x83)](_0x3b64ac),_0x4df5cf=_0x3560c4['threadId'],_0x220387=_0x3560c4['id'],_0x4d6267={'memberId':(await this['_sessionService'][_0x4fdaf0(0xa7)](_0x101030))['getMemberID'](),'unitId':_0x101030,'threadId':_0x4df5cf,'mention':_0x33dffd,'content':_0x38b5dc,'replyId':_0x220387},_0x4688ea=await this[_0x4fdaf0(0xd8)][_0x4fdaf0(0x73)](_0x4fdaf0(0xc5)+_0x101030+_0x4fdaf0(0xa0),{'body':_0x4d6267});return!_0x4688ea[_0x4fdaf0(0xb3)][_0x4fdaf0(0xc0)]||_0x4688ea[_0x4fdaf0(0xb3)][_0x4fdaf0(0xc0)][_0x4fdaf0(0xc3)]===0x1;}async[_0x518227(0xad)](_0x4c8b32){const _0x515808=_0x518227,{unitId:_0x427b02}=_0x4c8b32,_0x4c09b7=_0x4c8b32[_0x515808(0x86)],_0x31184c={'memberId':this['_userService']['getCurrentUser']()[_0x515808(0xc1)],'unitId':_0x427b02,'threadId':_0x4c09b7,'solved':_0x4c8b32[_0x515808(0xc4)]?_0x4a49df[_0x515808(0x8d)]:_0x4a49df[_0x515808(0xd9)]},_0x3ccd92=await this[_0x515808(0xd8)][_0x515808(0x73)](_0x515808(0xc5)+_0x427b02+'/solved',{'body':_0x31184c});return!_0x3ccd92[_0x515808(0xb3)][_0x515808(0xc0)]||_0x3ccd92[_0x515808(0xb3)][_0x515808(0xc0)][_0x515808(0xc3)]===0x1;}async['deleteComment'](_0x13e7b3,_0x5a1f9c,_0x4f338a,_0x19c020){const _0x26841f=_0x518227,_0x20972b={'memberId':(await this[_0x26841f(0xd5)][_0x26841f(0xa7)](_0x13e7b3))[_0x26841f(0xc2)](),'threadId':_0x4f338a,'replyId':_0x19c020,'unitId':_0x13e7b3},_0x246971=await this['_httpService'][_0x26841f(0x73)](_0x26841f(0xc5)+_0x13e7b3+_0x26841f(0x6b),{'body':_0x20972b});return!_0x246971[_0x26841f(0xb3)][_0x26841f(0xc0)]||_0x246971[_0x26841f(0xb3)]['error'][_0x26841f(0xc3)]===0x1;}async[_0x518227(0x80)](_0x3035db,_0x3958bf,_0x4bd665){const _0x529cff=_0x518227,_0x21de8e={'unitId':_0x3035db,'threadId':_0x4bd665},_0x50bbe2=await this[_0x529cff(0xd8)][_0x529cff(0x73)](_0x529cff(0xc5)+_0x3035db+_0x529cff(0xe3),{'body':_0x21de8e}),_0x5bc75b=_0x4bd665[_0x529cff(0xbe)](_0x19cdee=>_0x52bbc0(_0x50bbe2[_0x529cff(0xb3)][_0x529cff(0x8b)][_0x19cdee],_0x3035db,_0x3958bf))['filter'](Boolean);return Object[_0x529cff(0xcd)](_0x50bbe2[_0x529cff(0xb3)][_0x529cff(0x85)])['forEach'](_0x5ce4cb=>{const _0x289ea6=_0x529cff;this[_0x289ea6(0xda)][_0x289ea6(0x69)](_0x5ce4cb);}),_0x5bc75b;}[_0x518227(0x75)](_0x4bcd1d){return{'id':_0x4bcd1d['id'],'threadId':_0x4bcd1d['threadId'],'ref':_0x4bcd1d['ref']};}};_0x2b8bfd=_0x1e9da9([_0x5ec117(0x0,_0x20b2cb[_0x518227(0x76)](_0x9f538c[_0x518227(0xbb)])),_0x5ec117(0x1,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0xc8)])),_0x5ec117(0x2,_0x20b2cb[_0x518227(0x76)](_0x150138['CollaborationSessionService']))],_0x2b8bfd);var _0x40aa5b=Object[_0x518227(0xa5)],_0x2864da=(_0x24cbed,_0x4522d9,_0x238b83,_0x5dc6da)=>{const _0x74259c=_0x518227;for(var _0x3b7039=_0x5dc6da>0x1?void 0x0:_0x5dc6da?_0x40aa5b(_0x4522d9,_0x238b83):_0x4522d9,_0x50cb7d=_0x24cbed[_0x74259c(0xab)]-0x1,_0x12b061;_0x50cb7d>=0x0;_0x50cb7d--)(_0x12b061=_0x24cbed[_0x50cb7d])&&(_0x3b7039=_0x12b061(_0x3b7039)||_0x3b7039);return _0x3b7039;},_0x348bbf=(_0x394d1d,_0x561967)=>(_0x517952,_0x18508f)=>_0x561967(_0x517952,_0x18508f,_0x394d1d);let _0x4c10ff=class extends _0x20b2cb['Disposable']{constructor(_0x132fe5,_0x591af8){const _0x37e73f=_0x518227;super(),this[_0x37e73f(0xd3)]=_0x132fe5,this[_0x37e73f(0xe1)]=_0x591af8,this[_0x37e73f(0x9f)]();}[_0x518227(0x9f)](){const _0x4dba7b=_0x518227;this[_0x4dba7b(0xd3)][_0x4dba7b(0xdb)]=this[_0x4dba7b(0xe1)],this[_0x4dba7b(0xd3)][_0x4dba7b(0xa2)]=!0x1;}};_0x4c10ff=_0x2864da([_0x348bbf(0x0,_0x452b2f[_0x518227(0x98)]),_0x348bbf(0x1,_0x20b2cb[_0x518227(0x76)](_0x2b8bfd))],_0x4c10ff);var _0x2140a9=Object['defineProperty'],_0x4a86ed=Object[_0x518227(0xa5)],_0x4eabb3=(_0x190cda,_0x21650a,_0xf1fa12)=>_0x21650a in _0x190cda?_0x2140a9(_0x190cda,_0x21650a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf1fa12}):_0x190cda[_0x21650a]=_0xf1fa12,_0x90131d=(_0x1205dd,_0x4a51cd,_0x4fe526,_0x2466a4)=>{const _0x4f42d6=_0x518227;for(var _0x3255e0=_0x2466a4>0x1?void 0x0:_0x2466a4?_0x4a86ed(_0x4a51cd,_0x4fe526):_0x4a51cd,_0x34cfca=_0x1205dd[_0x4f42d6(0xab)]-0x1,_0x58af97;_0x34cfca>=0x0;_0x34cfca--)(_0x58af97=_0x1205dd[_0x34cfca])&&(_0x3255e0=_0x58af97(_0x3255e0)||_0x3255e0);return _0x3255e0;},_0x7e1683=(_0x485826,_0x2d718d)=>(_0x1121de,_0xd6b854)=>_0x2d718d(_0x1121de,_0xd6b854,_0x485826),_0xbafd78=(_0x355641,_0x4780d0,_0x3ddd51)=>_0x4eabb3(_0x355641,typeof _0x4780d0!='symbol'?_0x4780d0+'':_0x4780d0,_0x3ddd51);_0x8c5ac4[_0x518227(0xb8)]=class extends _0x20b2cb['Plugin']{constructor(_0x11ad2c=_0x12b701,_0x518f52,_0x374606){const _0x3e03c3=_0x518227;super(),this[_0x3e03c3(0x8f)]=_0x11ad2c,this['_injector']=_0x518f52,this[_0x3e03c3(0x82)]=_0x374606;const {..._0x2df462}=_0x20b2cb[_0x3e03c3(0x93)]({},_0x12b701,this[_0x3e03c3(0x8f)]);this[_0x3e03c3(0x82)][_0x3e03c3(0xbc)](_0xd4012,_0x2df462);}[_0x518227(0xc7)](){const _0x1dfb57=_0x518227;[[_0x2b8bfd],[_0x4c10ff],[_0x2021bf]][_0x1dfb57(0x7e)](_0x483a63=>{const _0x48c6f4=_0x1dfb57;this[_0x48c6f4(0x78)]['add'](_0x483a63);});}[_0x518227(0xb1)](){const _0x4da6a1=_0x518227;this[_0x4da6a1(0x78)][_0x4da6a1(0xde)](_0x4c10ff),this['_injector'][_0x4da6a1(0xde)](_0x2021bf);}},_0xbafd78(_0x8c5ac4[_0x518227(0xb8)],'pluginName',_0x378f72),_0xbafd78(_0x8c5ac4[_0x518227(0xb8)],'type',_0x20b2cb[_0x518227(0xd6)][_0x518227(0x7b)]),_0x8c5ac4[_0x518227(0xb8)]=_0x90131d([_0x20b2cb[_0x518227(0x94)](_0x422b9e['UniverThreadCommentUIPlugin'],_0x150138[_0x518227(0x6d)],_0x41db44['UniverLicensePlugin']),_0x7e1683(0x1,_0x20b2cb[_0x518227(0x76)](_0x20b2cb[_0x518227(0x89)])),_0x7e1683(0x2,_0x20b2cb['IConfigService'])],_0x8c5ac4[_0x518227(0xb8)]),Object[_0x518227(0x70)](_0x8c5ac4,Symbol[_0x518227(0xa1)],{'value':_0x518227(0x7c)});}));function _0x4049(){const _0x39bf12=['Edit','root','solved','_threadCommentDataSourceService','1078990nHrzGv','_sessionService','UniverInstanceType','@univerjs/network','_httpService','OpenOrReOpen','_userService','dataSource','_init','function','get','content','unitId','_threadCommentDataSource','getComment','/list','payload','@univerjs/thread-comment','/reply','subscribe','UniverNetwork','Solve','dayjs','personId','format','addUser','UNRECOGNIZED','/delete','CustomRangeType','UniverCollaborationClientPlugin','1108864xDxIzK','Delete','defineProperty','rxjs','replies','post','updateComment','saveCommentToSnapshot','Inject','UniverProLicense','_injector','userId','@univerjs-pro/collaboration-client','UNIVER_UNKNOWN','Module','/universer-api/user/list','forEach','rangeId','listComments','thread-comment-data-source.config','_configService','stringify','comment','users','threadId','getUnit','Disposable','Injector','type','comments','_threadCommentModel','Solved','/add','_config','UniverThreadCommentUi','@univerjs-pro/license','786372HcNVZo','merge','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadComment','COMMENT','IThreadCommentDataSourceService','Add','rangeType','filter','UniverCore','Reply','reply','_initDataSource','/edit','toStringTag','syncUpdateMutationToColla','_initUserSync','_commentService','getOwnPropertyDescriptor','UniverProCollaborationClient','requireSession','63jOAwxh','delete','pipe','length','602466pjRWgY','resolveComment','parse','CommentService','exports','onReady','commentUpdate$','body','Unknown','1147360qIuSXe','customRanges','2384244rRYBel','UniverThreadCommentDataSourcePlugin','getUser','YYYY/MM/DD\x20HH:mm','HTTPService','setConfig','add','map','@univerjs/core','error','userID','getMemberID','code','resolved','/universer-api/comment/unit/','user','onStarting','UserManagerService','disposeWithMe','createTimestamp','object','1918548GsNzdI','values','replyId','amd'];_0x4049=function(){return _0x39bf12;};return _0x4049();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.13.0-insiders.
|
|
3
|
+
"version": "0.13.0-insiders.20251223-857805c",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.13.0-insiders.
|
|
49
|
-
"@univerjs-pro/license": "0.13.0-insiders.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.13.0-insiders.20251223-857805c",
|
|
49
|
+
"@univerjs-pro/license": "0.13.0-insiders.20251223-857805c",
|
|
50
|
+
"@univerjs/network": "0.13.0-insiders.20251223-857805c",
|
|
51
|
+
"@univerjs/core": "0.13.0-insiders.20251223-857805c",
|
|
50
52
|
"@univerjs/protocol": "0.1.47",
|
|
51
|
-
"@univerjs/thread-comment": "0.13.0-insiders.
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.13.0-insiders.20251220-0a5ea4d",
|
|
54
|
-
"@univerjs/core": "0.13.0-insiders.20251220-0a5ea4d"
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.13.0-insiders.20251223-857805c",
|
|
54
|
+
"@univerjs/thread-comment": "0.13.0-insiders.20251223-857805c"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|