@univerjs-pro/thread-comment-datasource 0.13.0-insiders.20251220-0a5ea4d → 0.14.0

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 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 _0xc7ea9d=_0x1d5a;(function(_0xbfdb7f,_0x5779fb){const _0x389ae1=_0x1d5a,_0x4e2bda=_0xbfdb7f();while(!![]){try{const _0x34894e=parseInt(_0x389ae1(0x152))/0x1+-parseInt(_0x389ae1(0x132))/0x2*(parseInt(_0x389ae1(0x149))/0x3)+parseInt(_0x389ae1(0x175))/0x4*(-parseInt(_0x389ae1(0x137))/0x5)+parseInt(_0x389ae1(0x103))/0x6*(parseInt(_0x389ae1(0x16d))/0x7)+-parseInt(_0x389ae1(0x13f))/0x8*(-parseInt(_0x389ae1(0x158))/0x9)+parseInt(_0x389ae1(0x140))/0xa*(parseInt(_0x389ae1(0x111))/0xb)+-parseInt(_0x389ae1(0x12b))/0xc;if(_0x34894e===_0x5779fb)break;else _0x4e2bda['push'](_0x4e2bda['shift']());}catch(_0x2b1d8e){_0x4e2bda['push'](_0x4e2bda['shift']());}}}(_0x7f21,0xbe171));Object[_0xc7ea9d(0x141)](exports,Symbol[_0xc7ea9d(0x114)],{'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=_0xc7ea9d(0x135);var I=(_0x19bd48=>(_0x19bd48[_0x19bd48[_0xc7ea9d(0x170)]=0x0]=_0xc7ea9d(0x170),_0x19bd48[_0x19bd48[_0xc7ea9d(0x160)]=0x1]=_0xc7ea9d(0x160),_0x19bd48[_0x19bd48[_0xc7ea9d(0x120)]=-0x1]='UNRECOGNIZED',_0x19bd48))(I||{}),v=(_0x437aa3=>(_0x437aa3[_0x437aa3[_0xc7ea9d(0x13b)]=0x0]=_0xc7ea9d(0x13b),_0x437aa3[_0x437aa3['Add']=0x1]='Add',_0x437aa3[_0x437aa3['Reply']=0x2]=_0xc7ea9d(0x10f),_0x437aa3[_0x437aa3['Edit']=0x3]=_0xc7ea9d(0x14d),_0x437aa3[_0x437aa3[_0xc7ea9d(0x15f)]=0x4]='Delete',_0x437aa3[_0x437aa3['Solve']=0x5]=_0xc7ea9d(0x128),_0x437aa3[_0x437aa3[_0xc7ea9d(0x120)]=-0x1]=_0xc7ea9d(0x120),_0x437aa3))(v||{});const f=_0x4bba74=>c[_0xc7ea9d(0x153)](new Date(+_0x4bba74))[_0xc7ea9d(0x154)](_0xc7ea9d(0x159)),R=async(_0x327065,_0x14d99c)=>{const _0x563bfc=_0xc7ea9d,_0x40dbbb=_0x327065[_0x563bfc(0x16a)](c[_0x563bfc(0x15b)]),_0x4ff4a9=_0x327065[_0x563bfc(0x16a)](P[_0x563bfc(0x106)]);_0x14d99c['forEach'](_0x4ba75f=>{const _0x4989ca=_0x563bfc;_0x40dbbb[_0x4989ca(0x11b)](_0x4ba75f)&&_0x14d99c[_0x4989ca(0x12d)](_0x4ba75f);}),_0x14d99c[_0x563bfc(0x16c)]&&(await _0x4ff4a9['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x14d99c]}}))['body']['users']['forEach'](_0x249d99=>{const _0x34f785=_0x563bfc;_0x249d99&&_0x40dbbb[_0x34f785(0x11a)](_0x249d99);});};function _0x7f21(){const _0x53381a=['18407640ULAkSD','UniverThreadCommentUIPlugin','delete','onStarting','_sessionService','replyId','rangeType','4SzWaLv','_injector','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_init','604530tjWGok','rangeId','solved','find','Unknown','root','slice','length','16aVNsGS','10GyIjvz','defineProperty','customRanges','resolved','post','Injector','replies','COMMENT','listComments','323580XQGrzb','ref','content','code','Edit','forEach','stringify','userId','createTimestamp','59647yJxhLO','dayjs','format','/reply','_initDataSource','userID','3237723keIgWT','YYYY/MM/DD\x20HH:mm','getCurrentUser','UserManagerService','unitId','resolveComment','syncUpdateMutationToColla','Delete','Solved','onReady','getOwnPropertyDescriptor','personId','user','UniverLicensePlugin','requireSession','disposeWithMe','getUnit','_threadCommentModel','get','getMemberID','size','10558541HbfvHO','_commentService','saveCommentToSnapshot','OpenOrReOpen','addComment','map','/list','/universer-api/comment/unit/','32zlaVfu','/solved','error','commentUpdate$','Inject','reply','symbol','IThreadCommentDataSourceService','updateComment','UniverInstanceType','Disposable','6cNIlzw','IConfigService','subscribe','HTTPService','threadId','body','CommentService','pipe','/delete','_userService','parentId','_configService','Reply','Add','13288473meUKil','UNIVER_UNKNOWN','dataSource','toStringTag','deleteComment','parse','DependentOn','filter','type','addUser','getUser','_httpService','ThreadCommentModel','/edit','CollaborationSessionService','UNRECOGNIZED','Plugin','CustomRangeType','_threadCommentDataSourceService','_threadCommentDataSource','add','_config','comments','Solve','UniverThreadCommentDataSourcePlugin','/add'];_0x7f21=function(){return _0x53381a;};return _0x7f21();}var $=Object['getOwnPropertyDescriptor'],E=(_0x12e60b,_0x337cb5,_0xc30a6b,_0x3a88b6)=>{const _0x5d9593=_0xc7ea9d;for(var _0x28121=_0x3a88b6>0x1?void 0x0:_0x3a88b6?$(_0x337cb5,_0xc30a6b):_0x337cb5,_0x5d0fe6=_0x12e60b[_0x5d9593(0x13e)]-0x1,_0xe133cf;_0x5d0fe6>=0x0;_0x5d0fe6--)(_0xe133cf=_0x12e60b[_0x5d0fe6])&&(_0x28121=_0xe133cf(_0x28121)||_0x28121);return _0x28121;},S=(_0x4e8bb7,_0x1cf07e)=>(_0x4c0bfd,_0x27fb72)=>_0x1cf07e(_0x4c0bfd,_0x27fb72,_0x4e8bb7);let _=class extends c[_0xc7ea9d(0x102)]{constructor(_0x3e210a,_0x122860,_0x24e489,_0x158e97){const _0x5e3d21=_0xc7ea9d;super(),this[_0x5e3d21(0x16e)]=_0x3e210a,this['_threadCommentModel']=_0x122860,this[_0x5e3d21(0x10c)]=_0x24e489,this[_0x5e3d21(0x133)]=_0x158e97,this[_0x5e3d21(0x136)](),this['_initUserSync']();}['_initUserSync'](){const _0x3ba473=_0xc7ea9d;this[_0x3ba473(0x167)](this[_0x3ba473(0x169)][_0x3ba473(0xfb)][_0x3ba473(0x10a)](j[_0x3ba473(0x134)](0x10))[_0x3ba473(0x105)](_0x18c511=>{const _0x549fe6=_0x3ba473,_0x29dd15=new Set();_0x18c511[_0x549fe6(0x14e)](_0x6443ce=>{const _0xd974f8=_0x549fe6;switch(_0x6443ce[_0xd974f8(0x119)]){case _0xd974f8(0x125):{const _0x237f29=_0x6443ce['payload'][_0xd974f8(0x163)];_0x29dd15[_0xd974f8(0x125)](_0x237f29);break;}}}),R(this[_0x549fe6(0x133)],_0x29dd15);}));}[_0xc7ea9d(0x136)](){const _0x9a945c=_0xc7ea9d;this['disposeWithMe'](this[_0x9a945c(0x16e)][_0x9a945c(0xfb)]['subscribe'](async _0x3443b1=>{const _0x4f8797=_0x9a945c;var _0x874776,_0x336975,_0x4a9ca6,_0x1680ca;const _0x2fc8a4=(_0x874776=this['_threadCommentModel'][_0x4f8797(0x168)](_0x3443b1[_0x4f8797(0x15c)])[_0x4f8797(0x13a)](_0x1f0523=>_0x1f0523[_0x4f8797(0x107)]===_0x3443b1[_0x4f8797(0x107)]))==null?void 0x0:_0x874776[_0x4f8797(0x13c)];if(!_0x2fc8a4)return;const {unitId:_0x1b71ce,subUnitId:_0xd92325}=_0x2fc8a4;switch(_0x3443b1[_0x4f8797(0x164)]&&this[_0x4f8797(0x10c)][_0x4f8797(0x11a)](_0x3443b1[_0x4f8797(0x164)]),_0x3443b1[_0x4f8797(0x119)]){case v[_0x4f8797(0x110)]:break;case v['Reply']:{this['_threadCommentModel'][_0x4f8797(0x171)](_0x1b71ce,_0xd92325,{'unitId':_0x1b71ce,'subUnitId':_0xd92325,'ref':'','id':_0x3443b1[_0x4f8797(0x130)],'dT':f(+_0x3443b1['createTimestamp']),'threadId':_0x3443b1['threadId'],'personId':(_0x4a9ca6=(_0x336975=_0x3443b1[_0x4f8797(0x164)])==null?void 0x0:_0x336975[_0x4f8797(0x157)])!=null?_0x4a9ca6:_0x3443b1[_0x4f8797(0x150)],'text':JSON[_0x4f8797(0x116)](_0x3443b1[_0x4f8797(0x14b)]),'parentId':_0x2fc8a4['id']});break;}case v[_0x4f8797(0x15f)]:{const _0x417d1e=this['_threadCommentModel']['getComment'](_0x1b71ce,_0xd92325,_0x3443b1['replyId']);_0x417d1e&&_0x417d1e[_0x4f8797(0x10d)]&&this[_0x4f8797(0x169)][_0x4f8797(0x115)](_0x1b71ce,_0xd92325,_0x3443b1['replyId']);break;}case v[_0x4f8797(0x14d)]:{this[_0x4f8797(0x169)][_0x4f8797(0x100)](_0x1b71ce,_0xd92325,{'commentId':_0x3443b1['replyId'],'text':JSON['parse'](_0x3443b1[_0x4f8797(0x14b)])});break;}case v[_0x4f8797(0x128)]:{const _0x3b4432=(_0x1680ca=this[_0x4f8797(0x169)][_0x4f8797(0x168)](_0x3443b1[_0x4f8797(0x15c)])[_0x4f8797(0x13a)](_0x43e023=>_0x43e023[_0x4f8797(0x107)]===_0x3443b1['threadId']))==null?void 0x0:_0x1680ca[_0x4f8797(0x13c)];_0x3b4432&&this[_0x4f8797(0x169)]['resolveComment'](_0x1b71ce,_0xd92325,_0x3b4432['id'],_0x3443b1[_0x4f8797(0x139)]===I[_0x4f8797(0x160)]);break;}}}));}};_=E([S(0x0,c[_0xc7ea9d(0xfc)](b[_0xc7ea9d(0x109)])),S(0x1,c[_0xc7ea9d(0xfc)](M[_0xc7ea9d(0x11d)])),S(0x2,c['Inject'](c[_0xc7ea9d(0x15b)])),S(0x3,c['Inject'](c[_0xc7ea9d(0x145)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2cde8e,_0x4fc9bd,_0x1afeee,_0x2873e5)=>{const _0xb6d6b=_0xc7ea9d;for(var _0x225043=_0x2873e5>0x1?void 0x0:_0x2873e5?A(_0x4fc9bd,_0x1afeee):_0x4fc9bd,_0x4a20ed=_0x2cde8e[_0xb6d6b(0x13e)]-0x1,_0x41911c;_0x4a20ed>=0x0;_0x4a20ed--)(_0x41911c=_0x2cde8e[_0x4a20ed])&&(_0x225043=_0x41911c(_0x225043)||_0x225043);return _0x225043;},C=(_0x360d13,_0x2fb168)=>(_0x40949f,_0x3aa738)=>_0x2fb168(_0x40949f,_0x3aa738,_0x360d13);function Y(_0x36debc,_0x4f5b0d){const _0x1ce032=_0xc7ea9d,_0x32b7f1=_0x36debc['replies'][0x0];return{..._0x4f5b0d,'id':_0x32b7f1[_0x1ce032(0x130)],'resolved':_0x36debc['solved']===0x1,'dT':f(_0x32b7f1[_0x1ce032(0x151)]),'personId':_0x32b7f1[_0x1ce032(0x150)],'threadId':_0x32b7f1[_0x1ce032(0x107)]};}function G(_0x178b0c,_0x480ef0,_0x1a5e30){const _0x1e02eb=_0xc7ea9d;var _0x50ce00,_0x5988a8;if(((_0x5988a8=(_0x50ce00=_0x178b0c==null?void 0x0:_0x178b0c[_0x1e02eb(0x146)])==null?void 0x0:_0x50ce00[_0x1e02eb(0x13e)])!=null?_0x5988a8:0x0)>0x0){const _0x26c527=(_0x1c4cf3,_0x4fd260)=>({'id':_0x1c4cf3[_0x1e02eb(0x130)],'threadId':_0x1c4cf3[_0x1e02eb(0x107)],'dT':f(_0x1c4cf3['createTimestamp']),'personId':_0x1c4cf3['userId'],'resolved':_0x178b0c['solved']===I[_0x1e02eb(0x160)],'unitId':_0x480ef0,'subUnitId':_0x1a5e30,'text':JSON[_0x1e02eb(0x116)](_0x1c4cf3[_0x1e02eb(0x14b)]),'parentId':_0x4fd260}),_0x57d047=_0x26c527(_0x178b0c[_0x1e02eb(0x146)][0x0]);return{..._0x57d047,'children':_0x178b0c[_0x1e02eb(0x146)][_0x1e02eb(0x13d)](0x1)[_0x1e02eb(0x172)](_0x3dec17=>_0x26c527(_0x3dec17,_0x57d047['id']))};}return null;}let p=class{constructor(_0x2ccd9f,_0x1553f8,_0xb60f41){const _0x51201c=_0xc7ea9d;this[_0x51201c(0x11c)]=_0x2ccd9f,this[_0x51201c(0x10c)]=_0x1553f8,this['_sessionService']=_0xb60f41;}async[_0xc7ea9d(0x171)](_0x45d62c){const _0x562fa9=_0xc7ea9d;var _0x22ffd7,_0x108676;const {parentId:_0x1ca9f2,unitId:_0x4651b2,text:_0x4c9638,threadId:_0xe82f2b}=_0x45d62c,_0x5ce828=(_0x108676=(_0x22ffd7=_0x4c9638[_0x562fa9(0x142)])==null?void 0x0:_0x22ffd7['filter'](_0xe9ca14=>_0xe9ca14['rangeType']===c[_0x562fa9(0x122)][_0x562fa9(0x147)])[_0x562fa9(0x172)](_0x5f419b=>_0x5f419b[_0x562fa9(0x138)]))!=null?_0x108676:[],_0x25c947=JSON[_0x562fa9(0x14f)](_0x4c9638),_0x2d7a92=(await this[_0x562fa9(0x12f)]['requireSession'](_0x4651b2))['getMemberID']();if(_0x1ca9f2){const _0x3e74c0={'memberId':_0x2d7a92,'unitId':_0x4651b2,'content':_0x25c947,'mention':_0x5ce828,'threadId':_0xe82f2b},_0x1aa19d=(await this[_0x562fa9(0x11c)]['post'](_0x562fa9(0x174)+_0x4651b2+_0x562fa9(0x155),{'body':_0x3e74c0}))[_0x562fa9(0x108)][_0x562fa9(0xfd)];return{..._0x45d62c,'id':_0x1aa19d[_0x562fa9(0x130)],'dT':c[_0x562fa9(0x153)](+_0x1aa19d[_0x562fa9(0x151)])[_0x562fa9(0x154)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1aa19d[_0x562fa9(0x150)]};}else{const _0x919bbd={'memberId':_0x2d7a92,'unitId':_0x4651b2,'content':_0x25c947,'mention':_0x5ce828},_0xf1e468=await this[_0x562fa9(0x11c)]['post'](_0x562fa9(0x174)+_0x4651b2+_0x562fa9(0x12a),{'body':_0x919bbd});return Y(_0xf1e468[_0x562fa9(0x108)]['comment'],_0x45d62c);}}async[_0xc7ea9d(0x100)](_0x485a3a){const _0x44d7c3=_0xc7ea9d;var _0x2e81f6,_0x38fd3b;const {text:_0x246b30,unitId:_0x3195ff}=_0x485a3a,_0x594d09=(_0x38fd3b=(_0x2e81f6=_0x246b30['customRanges'])==null?void 0x0:_0x2e81f6[_0x44d7c3(0x118)](_0x4b8925=>_0x4b8925[_0x44d7c3(0x131)]===c['CustomRangeType'][_0x44d7c3(0x147)])[_0x44d7c3(0x172)](_0xdbe5f8=>_0xdbe5f8[_0x44d7c3(0x138)]))!=null?_0x38fd3b:[],_0x229389=JSON[_0x44d7c3(0x14f)](_0x246b30),_0x56461a=_0x485a3a['threadId'],_0x307541=_0x485a3a['id'],_0x1d059f={'memberId':(await this[_0x44d7c3(0x12f)][_0x44d7c3(0x166)](_0x3195ff))[_0x44d7c3(0x16b)](),'unitId':_0x3195ff,'threadId':_0x56461a,'mention':_0x594d09,'content':_0x229389,'replyId':_0x307541},_0xe4842e=await this[_0x44d7c3(0x11c)][_0x44d7c3(0x144)](_0x44d7c3(0x174)+_0x3195ff+_0x44d7c3(0x11e),{'body':_0x1d059f});return!_0xe4842e[_0x44d7c3(0x108)][_0x44d7c3(0x177)]||_0xe4842e[_0x44d7c3(0x108)]['error'][_0x44d7c3(0x14c)]===0x1;}async[_0xc7ea9d(0x15d)](_0x314ced){const _0x263aa0=_0xc7ea9d,{unitId:_0x4425be}=_0x314ced,_0x1b10c0=_0x314ced[_0x263aa0(0x107)],_0x390ddd={'memberId':this[_0x263aa0(0x10c)][_0x263aa0(0x15a)]()['userID'],'unitId':_0x4425be,'threadId':_0x1b10c0,'solved':_0x314ced[_0x263aa0(0x143)]?I[_0x263aa0(0x160)]:I[_0x263aa0(0x170)]},_0x2d6161=await this[_0x263aa0(0x11c)]['post'](_0x263aa0(0x174)+_0x4425be+_0x263aa0(0x176),{'body':_0x390ddd});return!_0x2d6161['body']['error']||_0x2d6161[_0x263aa0(0x108)][_0x263aa0(0x177)][_0x263aa0(0x14c)]===0x1;}async[_0xc7ea9d(0x115)](_0x119451,_0x58d098,_0x795017,_0xbd284f){const _0x3660c1=_0xc7ea9d,_0xa9cba0={'memberId':(await this['_sessionService']['requireSession'](_0x119451))[_0x3660c1(0x16b)](),'threadId':_0x795017,'replyId':_0xbd284f,'unitId':_0x119451},_0x58df11=await this[_0x3660c1(0x11c)][_0x3660c1(0x144)]('/universer-api/comment/unit/'+_0x119451+_0x3660c1(0x10b),{'body':_0xa9cba0});return!_0x58df11[_0x3660c1(0x108)][_0x3660c1(0x177)]||_0x58df11[_0x3660c1(0x108)][_0x3660c1(0x177)][_0x3660c1(0x14c)]===0x1;}async[_0xc7ea9d(0x148)](_0x4a2dfd,_0x32fc70,_0x186d78){const _0x44a949=_0xc7ea9d,_0x334209={'unitId':_0x4a2dfd,'threadId':_0x186d78},_0x53feb5=await this[_0x44a949(0x11c)]['post'](_0x44a949(0x174)+_0x4a2dfd+_0x44a949(0x173),{'body':_0x334209}),_0x2f5f49=_0x186d78[_0x44a949(0x172)](_0x5b2e34=>G(_0x53feb5[_0x44a949(0x108)][_0x44a949(0x127)][_0x5b2e34],_0x4a2dfd,_0x32fc70))[_0x44a949(0x118)](Boolean);return Object['values'](_0x53feb5[_0x44a949(0x108)]['users'])['forEach'](_0x206786=>{const _0x166c53=_0x44a949;this[_0x166c53(0x10c)][_0x166c53(0x11a)](_0x206786);}),_0x2f5f49;}[_0xc7ea9d(0x16f)](_0x4b101f){const _0x403621=_0xc7ea9d;return{'id':_0x4b101f['id'],'threadId':_0x4b101f['threadId'],'ref':_0x4b101f[_0x403621(0x14a)]};}};p=x([C(0x0,c[_0xc7ea9d(0xfc)](P[_0xc7ea9d(0x106)])),C(0x1,c[_0xc7ea9d(0xfc)](c[_0xc7ea9d(0x15b)])),C(0x2,c['Inject'](b[_0xc7ea9d(0x11f)]))],p);var H=Object[_0xc7ea9d(0x162)],J=(_0x5bcc11,_0x420258,_0x28628c,_0x4b4acf)=>{const _0x4d7289=_0xc7ea9d;for(var _0x175983=_0x4b4acf>0x1?void 0x0:_0x4b4acf?H(_0x420258,_0x28628c):_0x420258,_0x9ae618=_0x5bcc11[_0x4d7289(0x13e)]-0x1,_0x4d81cb;_0x9ae618>=0x0;_0x9ae618--)(_0x4d81cb=_0x5bcc11[_0x9ae618])&&(_0x175983=_0x4d81cb(_0x175983)||_0x175983);return _0x175983;},y=(_0x1c3fa0,_0x4e4006)=>(_0x5cfd95,_0x330326)=>_0x4e4006(_0x5cfd95,_0x330326,_0x1c3fa0);let g=class extends c[_0xc7ea9d(0x102)]{constructor(_0x2127ee,_0x15df66){const _0x380c8e=_0xc7ea9d;super(),this[_0x380c8e(0x123)]=_0x2127ee,this['_threadCommentDataSource']=_0x15df66,this['_initDataSource']();}[_0xc7ea9d(0x156)](){const _0xef508e=_0xc7ea9d;this['_threadCommentDataSourceService'][_0xef508e(0x113)]=this[_0xef508e(0x124)],this[_0xef508e(0x123)][_0xef508e(0x15e)]=!0x1;}};function _0x1d5a(_0x1d703a,_0x30a22e){_0x1d703a=_0x1d703a-0xfb;const _0x7f2138=_0x7f21();let _0x1d5a0d=_0x7f2138[_0x1d703a];return _0x1d5a0d;}g=J([y(0x0,M[_0xc7ea9d(0xff)]),y(0x1,c[_0xc7ea9d(0xfc)](p))],g);var F=Object[_0xc7ea9d(0x141)],L=Object[_0xc7ea9d(0x162)],Z=(_0x17c062,_0xcd6ec7,_0x533e9f)=>_0xcd6ec7 in _0x17c062?F(_0x17c062,_0xcd6ec7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x533e9f}):_0x17c062[_0xcd6ec7]=_0x533e9f,W=(_0xd7f3dd,_0x1b7628,_0x4d2c9f,_0x232ffe)=>{for(var _0x2fddcf=_0x232ffe>0x1?void 0x0:_0x232ffe?L(_0x1b7628,_0x4d2c9f):_0x1b7628,_0x2d4b72=_0xd7f3dd['length']-0x1,_0x1b20c9;_0x2d4b72>=0x0;_0x2d4b72--)(_0x1b20c9=_0xd7f3dd[_0x2d4b72])&&(_0x2fddcf=_0x1b20c9(_0x2fddcf)||_0x2fddcf);return _0x2fddcf;},O=(_0x4d267f,_0x2ffe01)=>(_0x1eb11f,_0x3b81e7)=>_0x2ffe01(_0x1eb11f,_0x3b81e7,_0x4d267f),N=(_0x28704c,_0x33b98c,_0x444fa9)=>Z(_0x28704c,typeof _0x33b98c!=_0xc7ea9d(0xfe)?_0x33b98c+'':_0x33b98c,_0x444fa9);exports[_0xc7ea9d(0x129)]=class extends c[_0xc7ea9d(0x121)]{constructor(_0x5c200e=D,_0x32a070,_0x4ac22a){const _0x122307=_0xc7ea9d;super(),this['_config']=_0x5c200e,this[_0x122307(0x133)]=_0x32a070,this[_0x122307(0x10e)]=_0x4ac22a;const {..._0x402540}=c['merge']({},D,this[_0x122307(0x126)]);this[_0x122307(0x10e)]['setConfig'](q,_0x402540);}[_0xc7ea9d(0x12e)](){const _0x4fa4c2=_0xc7ea9d;[[p],[g],[_]][_0x4fa4c2(0x14e)](_0x1ec68a=>{const _0x260c55=_0x4fa4c2;this[_0x260c55(0x133)][_0x260c55(0x125)](_0x1ec68a);});}[_0xc7ea9d(0x161)](){const _0x5eb720=_0xc7ea9d;this[_0x5eb720(0x133)][_0x5eb720(0x16a)](g),this[_0x5eb720(0x133)][_0x5eb720(0x16a)](_);}},N(exports[_0xc7ea9d(0x129)],'pluginName',U),N(exports[_0xc7ea9d(0x129)],_0xc7ea9d(0x119),c[_0xc7ea9d(0x101)][_0xc7ea9d(0x112)]),exports[_0xc7ea9d(0x129)]=W([c[_0xc7ea9d(0x117)](w[_0xc7ea9d(0x12c)],b['UniverCollaborationClientPlugin'],T[_0xc7ea9d(0x165)]),O(0x1,c[_0xc7ea9d(0xfc)](c[_0xc7ea9d(0x145)])),O(0x2,c[_0xc7ea9d(0x104)])],exports[_0xc7ea9d(0x129)]);
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 _0x20d3ef=_0x3a04;(function(_0x176ada,_0x441a61){const _0x4ac79e=_0x3a04,_0x35d0a7=_0x176ada();while(!![]){try{const _0x2b27cf=-parseInt(_0x4ac79e(0xe9))/0x1*(parseInt(_0x4ac79e(0xf3))/0x2)+-parseInt(_0x4ac79e(0x10e))/0x3+parseInt(_0x4ac79e(0xc8))/0x4+-parseInt(_0x4ac79e(0x107))/0x5+-parseInt(_0x4ac79e(0xe6))/0x6*(-parseInt(_0x4ac79e(0xf9))/0x7)+parseInt(_0x4ac79e(0xc9))/0x8+-parseInt(_0x4ac79e(0xe0))/0x9;if(_0x2b27cf===_0x441a61)break;else _0x35d0a7['push'](_0x35d0a7['shift']());}catch(_0x3b9e7a){_0x35d0a7['push'](_0x35d0a7['shift']());}}}(_0xcb29,0x59340));function _0xcb29(){const _0x1c9ab3=['addUser','updateComment','pluginName','length','YYYY/MM/DD\x20HH:mm','subscribe','462828rtZAeb','Add','user','replyId','saveCommentToSnapshot','users','filter','unitId','setConfig','root','/add','Reply','getComment','rangeType','post','getUser','_commentService','getCurrentUser','defineProperty','pipe','content','rangeId','find','replies','code','payload','_threadCommentModel','Solve','syncUpdateMutationToColla','parse','UNIVER_UNKNOWN','deleteComment','get','Edit','1578860xlTGTB','3753440NWikdF','customRanges','_sessionService','reply','add','_threadCommentDataSource','type','parentId','commentUpdate$','COMMENT','_threadCommentDataSourceService','getOwnPropertyDescriptor','disposeWithMe','Delete','userId','delete','addComment','comments','/reply','UNRECOGNIZED','resolveComment','OpenOrReOpen','/universer-api/user/list','1799289pxGZQC','_initDataSource','_configService','_initUserSync','solved','onReady','986190ZrgyMX','Unknown','_injector','216819KOCsUQ','Solved','userID','/universer-api/comment/unit/','ref','map','thread-comment-data-source.config','forEach','/list','stringify','4OmfsBT','_config','_init','error','symbol','resolved','14iWyUcp','slice','createTimestamp','format','requireSession','/solved','threadId','getMemberID','_userService','getUnit','values','/edit','_httpService','body','197070WONsoS'];_0xcb29=function(){return _0x1c9ab3;};return _0xcb29();}import{CommentService as _0x4dd9a5,CollaborationSessionService as _0x4249b0,UniverCollaborationClientPlugin as _0x193453}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x31702b}from'@univerjs-pro/license';import{dayjs as _0x4b771f,UserManagerService as _0x4d5910,Inject as _0x11232c,Injector as _0x88c32a,Disposable as _0x571afd,CustomRangeType as _0x5823e2,UniverInstanceType as _0x441124,DependentOn as _0x157e0d,IConfigService as _0x1f2235,Plugin as _0x224704,merge as _0x270e57}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24ac9f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3b4192,IThreadCommentDataSourceService as _0x503f14}from'@univerjs/thread-comment';import{bufferTime as _0x581a90}from'rxjs';import{HTTPService as _0x2906d1}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1e1590=>(_0x1e1590[_0x1e1590['OpenOrReOpen']=0x0]=_0x20d3ef(0xde),_0x1e1590[_0x1e1590[_0x20d3ef(0xea)]=0x1]=_0x20d3ef(0xea),_0x1e1590[_0x1e1590[_0x20d3ef(0xdc)]=-0x1]=_0x20d3ef(0xdc),_0x1e1590))(I||{}),v=(_0xa773b9=>(_0xa773b9[_0xa773b9[_0x20d3ef(0xe7)]=0x0]=_0x20d3ef(0xe7),_0xa773b9[_0xa773b9[_0x20d3ef(0x10f)]=0x1]=_0x20d3ef(0x10f),_0xa773b9[_0xa773b9['Reply']=0x2]='Reply',_0xa773b9[_0xa773b9[_0x20d3ef(0xc7)]=0x3]=_0x20d3ef(0xc7),_0xa773b9[_0xa773b9[_0x20d3ef(0xd6)]=0x4]=_0x20d3ef(0xd6),_0xa773b9[_0xa773b9[_0x20d3ef(0xc1)]=0x5]=_0x20d3ef(0xc1),_0xa773b9[_0xa773b9['UNRECOGNIZED']=-0x1]=_0x20d3ef(0xdc),_0xa773b9))(v||{});const y=_0x37d5ce=>_0x4b771f(new Date(+_0x37d5ce))[_0x20d3ef(0xfc)](_0x20d3ef(0x10c)),B=async(_0x1ca6d3,_0x17ca68)=>{const _0x39e394=_0x20d3ef,_0x5a3cdd=_0x1ca6d3[_0x39e394(0xc6)](_0x4d5910),_0x5c05c2=_0x1ca6d3[_0x39e394(0xc6)](_0x2906d1);_0x17ca68['forEach'](_0x4df2c4=>{const _0x1e46c0=_0x39e394;_0x5a3cdd[_0x1e46c0(0x11d)](_0x4df2c4)&&_0x17ca68[_0x1e46c0(0xd8)](_0x4df2c4);}),_0x17ca68['size']&&(await _0x5c05c2[_0x39e394(0xc6)](_0x39e394(0xdf),{'params':{'userIDs':[..._0x17ca68]}}))[_0x39e394(0x106)][_0x39e394(0x113)][_0x39e394(0xf0)](_0x49a58c=>{const _0x58a7e6=_0x39e394;_0x49a58c&&_0x5a3cdd[_0x58a7e6(0x108)](_0x49a58c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2394e2,_0x42004d,_0x5433f1,_0x511e66)=>{const _0x71f9c=_0x20d3ef;for(var _0x4caa47=_0x511e66>0x1?void 0x0:_0x511e66?K(_0x42004d,_0x5433f1):_0x42004d,_0x4c24f2=_0x2394e2[_0x71f9c(0x10b)]-0x1,_0x29a03c;_0x4c24f2>=0x0;_0x4c24f2--)(_0x29a03c=_0x2394e2[_0x4c24f2])&&(_0x4caa47=_0x29a03c(_0x4caa47)||_0x4caa47);return _0x4caa47;},p=(_0x2ef0d6,_0x27cf3c)=>(_0xe6e851,_0x1b3a2d)=>_0x27cf3c(_0xe6e851,_0x1b3a2d,_0x2ef0d6);let _=class extends _0x571afd{constructor(_0x45218d,_0x587c91,_0x197e62,_0x3c8a18){const _0x3a7f27=_0x20d3ef;super(),this[_0x3a7f27(0x11e)]=_0x45218d,this[_0x3a7f27(0x128)]=_0x587c91,this['_userService']=_0x197e62,this[_0x3a7f27(0xe8)]=_0x3c8a18,this[_0x3a7f27(0xf5)](),this['_initUserSync']();}[_0x20d3ef(0xe3)](){const _0x70a83a=_0x20d3ef;this[_0x70a83a(0xd5)](this[_0x70a83a(0x128)][_0x70a83a(0xd1)][_0x70a83a(0x121)](_0x581a90(0x10))['subscribe'](_0x31eff9=>{const _0x20325f=_0x70a83a,_0x38e293=new Set();_0x31eff9[_0x20325f(0xf0)](_0x45030d=>{const _0x383a9d=_0x20325f;switch(_0x45030d[_0x383a9d(0xcf)]){case _0x383a9d(0xcd):{const _0x63622b=_0x45030d[_0x383a9d(0x127)]['personId'];_0x38e293[_0x383a9d(0xcd)](_0x63622b);break;}}}),B(this['_injector'],_0x38e293);}));}['_init'](){const _0x518dd9=_0x20d3ef;this[_0x518dd9(0xd5)](this[_0x518dd9(0x11e)][_0x518dd9(0xd1)][_0x518dd9(0x10d)](async _0x5b06a0=>{const _0x20a3a3=_0x518dd9;var _0x3d9c6b,_0x990977,_0x458c73,_0x407cfc;const _0x278394=(_0x3d9c6b=this[_0x20a3a3(0x128)][_0x20a3a3(0x102)](_0x5b06a0[_0x20a3a3(0x115)])[_0x20a3a3(0x124)](_0x1c70ea=>_0x1c70ea[_0x20a3a3(0xff)]===_0x5b06a0[_0x20a3a3(0xff)]))==null?void 0x0:_0x3d9c6b[_0x20a3a3(0x117)];if(!_0x278394)return;const {unitId:_0x3f87a3,subUnitId:_0x33b411}=_0x278394;switch(_0x5b06a0[_0x20a3a3(0x110)]&&this[_0x20a3a3(0x101)][_0x20a3a3(0x108)](_0x5b06a0[_0x20a3a3(0x110)]),_0x5b06a0[_0x20a3a3(0xcf)]){case v[_0x20a3a3(0x10f)]:break;case v[_0x20a3a3(0x119)]:{this[_0x20a3a3(0x128)][_0x20a3a3(0xd9)](_0x3f87a3,_0x33b411,{'unitId':_0x3f87a3,'subUnitId':_0x33b411,'ref':'','id':_0x5b06a0['replyId'],'dT':y(+_0x5b06a0[_0x20a3a3(0xfb)]),'threadId':_0x5b06a0[_0x20a3a3(0xff)],'personId':(_0x458c73=(_0x990977=_0x5b06a0[_0x20a3a3(0x110)])==null?void 0x0:_0x990977['userID'])!=null?_0x458c73:_0x5b06a0[_0x20a3a3(0xd7)],'text':JSON['parse'](_0x5b06a0[_0x20a3a3(0x122)]),'parentId':_0x278394['id']});break;}case v[_0x20a3a3(0xd6)]:{const _0x321746=this[_0x20a3a3(0x128)][_0x20a3a3(0x11a)](_0x3f87a3,_0x33b411,_0x5b06a0['replyId']);_0x321746&&_0x321746[_0x20a3a3(0xd0)]&&this[_0x20a3a3(0x128)][_0x20a3a3(0xc5)](_0x3f87a3,_0x33b411,_0x5b06a0[_0x20a3a3(0x111)]);break;}case v['Edit']:{this[_0x20a3a3(0x128)][_0x20a3a3(0x109)](_0x3f87a3,_0x33b411,{'commentId':_0x5b06a0['replyId'],'text':JSON[_0x20a3a3(0xc3)](_0x5b06a0['content'])});break;}case v[_0x20a3a3(0xc1)]:{const _0x48a184=(_0x407cfc=this['_threadCommentModel'][_0x20a3a3(0x102)](_0x5b06a0[_0x20a3a3(0x115)])[_0x20a3a3(0x124)](_0x40e933=>_0x40e933[_0x20a3a3(0xff)]===_0x5b06a0[_0x20a3a3(0xff)]))==null?void 0x0:_0x407cfc[_0x20a3a3(0x117)];_0x48a184&&this[_0x20a3a3(0x128)][_0x20a3a3(0xdd)](_0x3f87a3,_0x33b411,_0x48a184['id'],_0x5b06a0[_0x20a3a3(0xe4)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x11232c(_0x4dd9a5)),p(0x1,_0x11232c(_0x3b4192)),p(0x2,_0x11232c(_0x4d5910)),p(0x3,_0x11232c(_0x88c32a))],_);const z=_0x20d3ef(0xef),O={};var k=Object[_0x20d3ef(0xd4)],Q=(_0x5a206b,_0x49df59,_0x401177,_0x182076)=>{for(var _0x2db7ec=_0x182076>0x1?void 0x0:_0x182076?k(_0x49df59,_0x401177):_0x49df59,_0x3e6be4=_0x5a206b['length']-0x1,_0x3db3d1;_0x3e6be4>=0x0;_0x3e6be4--)(_0x3db3d1=_0x5a206b[_0x3e6be4])&&(_0x2db7ec=_0x3db3d1(_0x2db7ec)||_0x2db7ec);return _0x2db7ec;},b=(_0x407991,_0x467582)=>(_0x3ca49d,_0x38dfc8)=>_0x467582(_0x3ca49d,_0x38dfc8,_0x407991);function X(_0x2cb9db,_0x2798ec){const _0x1e6141=_0x20d3ef,_0x89273e=_0x2cb9db['replies'][0x0];return{..._0x2798ec,'id':_0x89273e[_0x1e6141(0x111)],'resolved':_0x2cb9db[_0x1e6141(0xe4)]===0x1,'dT':y(_0x89273e['createTimestamp']),'personId':_0x89273e[_0x1e6141(0xd7)],'threadId':_0x89273e[_0x1e6141(0xff)]};}function _0x3a04(_0x3d3149,_0x48b9be){_0x3d3149=_0x3d3149-0xc1;const _0xcb2924=_0xcb29();let _0x3a0416=_0xcb2924[_0x3d3149];return _0x3a0416;}function ee(_0x58d4dd,_0x573446,_0x41b5b2){const _0x4742a2=_0x20d3ef;var _0x2f814d,_0xe2bb91;if(((_0xe2bb91=(_0x2f814d=_0x58d4dd==null?void 0x0:_0x58d4dd[_0x4742a2(0x125)])==null?void 0x0:_0x2f814d[_0x4742a2(0x10b)])!=null?_0xe2bb91:0x0)>0x0){const _0xa1e99d=(_0x1c90a7,_0x1288b3)=>({'id':_0x1c90a7[_0x4742a2(0x111)],'threadId':_0x1c90a7[_0x4742a2(0xff)],'dT':y(_0x1c90a7[_0x4742a2(0xfb)]),'personId':_0x1c90a7[_0x4742a2(0xd7)],'resolved':_0x58d4dd[_0x4742a2(0xe4)]===I[_0x4742a2(0xea)],'unitId':_0x573446,'subUnitId':_0x41b5b2,'text':JSON[_0x4742a2(0xc3)](_0x1c90a7[_0x4742a2(0x122)]),'parentId':_0x1288b3}),_0x1e0f1b=_0xa1e99d(_0x58d4dd[_0x4742a2(0x125)][0x0]);return{..._0x1e0f1b,'children':_0x58d4dd[_0x4742a2(0x125)][_0x4742a2(0xfa)](0x1)[_0x4742a2(0xee)](_0x364e55=>_0xa1e99d(_0x364e55,_0x1e0f1b['id']))};}return null;}let S=class{constructor(_0x42d9f8,_0x37ce67,_0x59d13c){const _0x396583=_0x20d3ef;this[_0x396583(0x105)]=_0x42d9f8,this[_0x396583(0x101)]=_0x37ce67,this['_sessionService']=_0x59d13c;}async[_0x20d3ef(0xd9)](_0x36a2ab){const _0x5e9b3c=_0x20d3ef;var _0x3969b5,_0x506db8;const {parentId:_0x161dfb,unitId:_0x341c30,text:_0xd73826,threadId:_0x44c276}=_0x36a2ab,_0x4d7929=(_0x506db8=(_0x3969b5=_0xd73826[_0x5e9b3c(0xca)])==null?void 0x0:_0x3969b5[_0x5e9b3c(0x114)](_0x5b931d=>_0x5b931d[_0x5e9b3c(0x11b)]===_0x5823e2[_0x5e9b3c(0xd2)])[_0x5e9b3c(0xee)](_0x10b0bc=>_0x10b0bc[_0x5e9b3c(0x123)]))!=null?_0x506db8:[],_0x205ce4=JSON[_0x5e9b3c(0xf2)](_0xd73826),_0x181c94=(await this['_sessionService'][_0x5e9b3c(0xfd)](_0x341c30))[_0x5e9b3c(0x100)]();if(_0x161dfb){const _0x56ed9d={'memberId':_0x181c94,'unitId':_0x341c30,'content':_0x205ce4,'mention':_0x4d7929,'threadId':_0x44c276},_0x52477a=(await this['_httpService'][_0x5e9b3c(0x11c)](_0x5e9b3c(0xec)+_0x341c30+_0x5e9b3c(0xdb),{'body':_0x56ed9d}))[_0x5e9b3c(0x106)][_0x5e9b3c(0xcc)];return{..._0x36a2ab,'id':_0x52477a[_0x5e9b3c(0x111)],'dT':_0x4b771f(+_0x52477a[_0x5e9b3c(0xfb)])[_0x5e9b3c(0xfc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x52477a['userId']};}else{const _0x41c209={'memberId':_0x181c94,'unitId':_0x341c30,'content':_0x205ce4,'mention':_0x4d7929},_0x17abbb=await this[_0x5e9b3c(0x105)][_0x5e9b3c(0x11c)]('/universer-api/comment/unit/'+_0x341c30+_0x5e9b3c(0x118),{'body':_0x41c209});return X(_0x17abbb[_0x5e9b3c(0x106)]['comment'],_0x36a2ab);}}async[_0x20d3ef(0x109)](_0x3d8e17){const _0x12f98d=_0x20d3ef;var _0x4caace,_0xfad038;const {text:_0x579db,unitId:_0x27d519}=_0x3d8e17,_0x418c89=(_0xfad038=(_0x4caace=_0x579db['customRanges'])==null?void 0x0:_0x4caace[_0x12f98d(0x114)](_0x8a5133=>_0x8a5133['rangeType']===_0x5823e2[_0x12f98d(0xd2)])[_0x12f98d(0xee)](_0x8ebcf3=>_0x8ebcf3[_0x12f98d(0x123)]))!=null?_0xfad038:[],_0x3833c7=JSON[_0x12f98d(0xf2)](_0x579db),_0x50032a=_0x3d8e17[_0x12f98d(0xff)],_0x4975bc=_0x3d8e17['id'],_0xfd4e75={'memberId':(await this[_0x12f98d(0xcb)]['requireSession'](_0x27d519))['getMemberID'](),'unitId':_0x27d519,'threadId':_0x50032a,'mention':_0x418c89,'content':_0x3833c7,'replyId':_0x4975bc},_0x250e5e=await this[_0x12f98d(0x105)][_0x12f98d(0x11c)](_0x12f98d(0xec)+_0x27d519+_0x12f98d(0x104),{'body':_0xfd4e75});return!_0x250e5e[_0x12f98d(0x106)][_0x12f98d(0xf6)]||_0x250e5e[_0x12f98d(0x106)][_0x12f98d(0xf6)]['code']===0x1;}async[_0x20d3ef(0xdd)](_0x11c737){const _0x3a2224=_0x20d3ef,{unitId:_0x7668cd}=_0x11c737,_0x10a679=_0x11c737[_0x3a2224(0xff)],_0x54eb87={'memberId':this[_0x3a2224(0x101)][_0x3a2224(0x11f)]()[_0x3a2224(0xeb)],'unitId':_0x7668cd,'threadId':_0x10a679,'solved':_0x11c737[_0x3a2224(0xf8)]?I[_0x3a2224(0xea)]:I[_0x3a2224(0xde)]},_0x598899=await this[_0x3a2224(0x105)]['post'](_0x3a2224(0xec)+_0x7668cd+_0x3a2224(0xfe),{'body':_0x54eb87});return!_0x598899[_0x3a2224(0x106)][_0x3a2224(0xf6)]||_0x598899[_0x3a2224(0x106)][_0x3a2224(0xf6)][_0x3a2224(0x126)]===0x1;}async[_0x20d3ef(0xc5)](_0x4b5c95,_0x52b9c1,_0x5b7c8d,_0x57970a){const _0x5e93e8=_0x20d3ef,_0x4394cd={'memberId':(await this['_sessionService'][_0x5e93e8(0xfd)](_0x4b5c95))[_0x5e93e8(0x100)](),'threadId':_0x5b7c8d,'replyId':_0x57970a,'unitId':_0x4b5c95},_0x135cd3=await this[_0x5e93e8(0x105)][_0x5e93e8(0x11c)](_0x5e93e8(0xec)+_0x4b5c95+'/delete',{'body':_0x4394cd});return!_0x135cd3[_0x5e93e8(0x106)][_0x5e93e8(0xf6)]||_0x135cd3['body'][_0x5e93e8(0xf6)][_0x5e93e8(0x126)]===0x1;}async['listComments'](_0xb8f6b0,_0x38fe92,_0x2ad6a2){const _0x3be9f2=_0x20d3ef,_0x28f070={'unitId':_0xb8f6b0,'threadId':_0x2ad6a2},_0x172aca=await this[_0x3be9f2(0x105)][_0x3be9f2(0x11c)](_0x3be9f2(0xec)+_0xb8f6b0+_0x3be9f2(0xf1),{'body':_0x28f070}),_0x22f829=_0x2ad6a2['map'](_0x4e5f66=>ee(_0x172aca[_0x3be9f2(0x106)][_0x3be9f2(0xda)][_0x4e5f66],_0xb8f6b0,_0x38fe92))['filter'](Boolean);return Object[_0x3be9f2(0x103)](_0x172aca[_0x3be9f2(0x106)][_0x3be9f2(0x113)])[_0x3be9f2(0xf0)](_0x4ecf3a=>{const _0x2788c8=_0x3be9f2;this[_0x2788c8(0x101)][_0x2788c8(0x108)](_0x4ecf3a);}),_0x22f829;}[_0x20d3ef(0x112)](_0x313f8b){const _0x42c96b=_0x20d3ef;return{'id':_0x313f8b['id'],'threadId':_0x313f8b['threadId'],'ref':_0x313f8b[_0x42c96b(0xed)]};}};S=Q([b(0x0,_0x11232c(_0x2906d1)),b(0x1,_0x11232c(_0x4d5910)),b(0x2,_0x11232c(_0x4249b0))],S);var re=Object[_0x20d3ef(0xd4)],te=(_0x57634b,_0x202de,_0x40f356,_0x36240e)=>{for(var _0x681d22=_0x36240e>0x1?void 0x0:_0x36240e?re(_0x202de,_0x40f356):_0x202de,_0x35d51d=_0x57634b['length']-0x1,_0x4595e2;_0x35d51d>=0x0;_0x35d51d--)(_0x4595e2=_0x57634b[_0x35d51d])&&(_0x681d22=_0x4595e2(_0x681d22)||_0x681d22);return _0x681d22;},M=(_0x41e866,_0x59d12b)=>(_0x29bbeb,_0x4505d9)=>_0x59d12b(_0x29bbeb,_0x4505d9,_0x41e866);let f=class extends _0x571afd{constructor(_0x2c017b,_0x17c633){const _0x49bae5=_0x20d3ef;super(),this[_0x49bae5(0xd3)]=_0x2c017b,this[_0x49bae5(0xce)]=_0x17c633,this[_0x49bae5(0xe1)]();}['_initDataSource'](){const _0x5a0493=_0x20d3ef;this[_0x5a0493(0xd3)]['dataSource']=this[_0x5a0493(0xce)],this[_0x5a0493(0xd3)][_0x5a0493(0xc2)]=!0x1;}};f=te([M(0x0,_0x503f14),M(0x1,_0x11232c(S))],f);var se=Object[_0x20d3ef(0x120)],oe=Object[_0x20d3ef(0xd4)],ne=(_0x1913e1,_0x774d5e,_0xe07c6d)=>_0x774d5e in _0x1913e1?se(_0x1913e1,_0x774d5e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe07c6d}):_0x1913e1[_0x774d5e]=_0xe07c6d,ie=(_0x174462,_0x1786fa,_0x3e360c,_0x45e5f8)=>{const _0x163777=_0x20d3ef;for(var _0x1d935e=_0x45e5f8>0x1?void 0x0:_0x45e5f8?oe(_0x1786fa,_0x3e360c):_0x1786fa,_0x6e72ba=_0x174462[_0x163777(0x10b)]-0x1,_0x65a37b;_0x6e72ba>=0x0;_0x6e72ba--)(_0x65a37b=_0x174462[_0x6e72ba])&&(_0x1d935e=_0x65a37b(_0x1d935e)||_0x1d935e);return _0x1d935e;},N=(_0x4b672e,_0x3fc143)=>(_0x43c440,_0x1998d2)=>_0x3fc143(_0x43c440,_0x1998d2,_0x4b672e),$=(_0x47347f,_0x1f1135,_0x2b5172)=>ne(_0x47347f,typeof _0x1f1135!=_0x20d3ef(0xf7)?_0x1f1135+'':_0x1f1135,_0x2b5172);let g=class extends _0x224704{constructor(_0x59cf49=O,_0x13840e,_0x3b8c7d){const _0x3dfbca=_0x20d3ef;super(),this[_0x3dfbca(0xf4)]=_0x59cf49,this['_injector']=_0x13840e,this[_0x3dfbca(0xe2)]=_0x3b8c7d;const {..._0x223881}=_0x270e57({},O,this[_0x3dfbca(0xf4)]);this[_0x3dfbca(0xe2)][_0x3dfbca(0x116)](z,_0x223881);}['onStarting'](){const _0x25b922=_0x20d3ef;[[S],[f],[_]][_0x25b922(0xf0)](_0x158da3=>{const _0xf0f0dc=_0x25b922;this[_0xf0f0dc(0xe8)][_0xf0f0dc(0xcd)](_0x158da3);});}[_0x20d3ef(0xe5)](){const _0x1ae226=_0x20d3ef;this[_0x1ae226(0xe8)]['get'](f),this[_0x1ae226(0xe8)][_0x1ae226(0xc6)](_);}};$(g,_0x20d3ef(0x10a),W),$(g,'type',_0x441124[_0x20d3ef(0xc4)]),g=ie([_0x157e0d(_0x24ac9f,_0x193453,_0x31702b),N(0x1,_0x11232c(_0x88c32a)),N(0x2,_0x1f2235)],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 _0x20d3ef=_0x3a04;(function(_0x176ada,_0x441a61){const _0x4ac79e=_0x3a04,_0x35d0a7=_0x176ada();while(!![]){try{const _0x2b27cf=-parseInt(_0x4ac79e(0xe9))/0x1*(parseInt(_0x4ac79e(0xf3))/0x2)+-parseInt(_0x4ac79e(0x10e))/0x3+parseInt(_0x4ac79e(0xc8))/0x4+-parseInt(_0x4ac79e(0x107))/0x5+-parseInt(_0x4ac79e(0xe6))/0x6*(-parseInt(_0x4ac79e(0xf9))/0x7)+parseInt(_0x4ac79e(0xc9))/0x8+-parseInt(_0x4ac79e(0xe0))/0x9;if(_0x2b27cf===_0x441a61)break;else _0x35d0a7['push'](_0x35d0a7['shift']());}catch(_0x3b9e7a){_0x35d0a7['push'](_0x35d0a7['shift']());}}}(_0xcb29,0x59340));function _0xcb29(){const _0x1c9ab3=['addUser','updateComment','pluginName','length','YYYY/MM/DD\x20HH:mm','subscribe','462828rtZAeb','Add','user','replyId','saveCommentToSnapshot','users','filter','unitId','setConfig','root','/add','Reply','getComment','rangeType','post','getUser','_commentService','getCurrentUser','defineProperty','pipe','content','rangeId','find','replies','code','payload','_threadCommentModel','Solve','syncUpdateMutationToColla','parse','UNIVER_UNKNOWN','deleteComment','get','Edit','1578860xlTGTB','3753440NWikdF','customRanges','_sessionService','reply','add','_threadCommentDataSource','type','parentId','commentUpdate$','COMMENT','_threadCommentDataSourceService','getOwnPropertyDescriptor','disposeWithMe','Delete','userId','delete','addComment','comments','/reply','UNRECOGNIZED','resolveComment','OpenOrReOpen','/universer-api/user/list','1799289pxGZQC','_initDataSource','_configService','_initUserSync','solved','onReady','986190ZrgyMX','Unknown','_injector','216819KOCsUQ','Solved','userID','/universer-api/comment/unit/','ref','map','thread-comment-data-source.config','forEach','/list','stringify','4OmfsBT','_config','_init','error','symbol','resolved','14iWyUcp','slice','createTimestamp','format','requireSession','/solved','threadId','getMemberID','_userService','getUnit','values','/edit','_httpService','body','197070WONsoS'];_0xcb29=function(){return _0x1c9ab3;};return _0xcb29();}import{CommentService as _0x4dd9a5,CollaborationSessionService as _0x4249b0,UniverCollaborationClientPlugin as _0x193453}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x31702b}from'@univerjs-pro/license';import{dayjs as _0x4b771f,UserManagerService as _0x4d5910,Inject as _0x11232c,Injector as _0x88c32a,Disposable as _0x571afd,CustomRangeType as _0x5823e2,UniverInstanceType as _0x441124,DependentOn as _0x157e0d,IConfigService as _0x1f2235,Plugin as _0x224704,merge as _0x270e57}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x24ac9f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3b4192,IThreadCommentDataSourceService as _0x503f14}from'@univerjs/thread-comment';import{bufferTime as _0x581a90}from'rxjs';import{HTTPService as _0x2906d1}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x1e1590=>(_0x1e1590[_0x1e1590['OpenOrReOpen']=0x0]=_0x20d3ef(0xde),_0x1e1590[_0x1e1590[_0x20d3ef(0xea)]=0x1]=_0x20d3ef(0xea),_0x1e1590[_0x1e1590[_0x20d3ef(0xdc)]=-0x1]=_0x20d3ef(0xdc),_0x1e1590))(I||{}),v=(_0xa773b9=>(_0xa773b9[_0xa773b9[_0x20d3ef(0xe7)]=0x0]=_0x20d3ef(0xe7),_0xa773b9[_0xa773b9[_0x20d3ef(0x10f)]=0x1]=_0x20d3ef(0x10f),_0xa773b9[_0xa773b9['Reply']=0x2]='Reply',_0xa773b9[_0xa773b9[_0x20d3ef(0xc7)]=0x3]=_0x20d3ef(0xc7),_0xa773b9[_0xa773b9[_0x20d3ef(0xd6)]=0x4]=_0x20d3ef(0xd6),_0xa773b9[_0xa773b9[_0x20d3ef(0xc1)]=0x5]=_0x20d3ef(0xc1),_0xa773b9[_0xa773b9['UNRECOGNIZED']=-0x1]=_0x20d3ef(0xdc),_0xa773b9))(v||{});const y=_0x37d5ce=>_0x4b771f(new Date(+_0x37d5ce))[_0x20d3ef(0xfc)](_0x20d3ef(0x10c)),B=async(_0x1ca6d3,_0x17ca68)=>{const _0x39e394=_0x20d3ef,_0x5a3cdd=_0x1ca6d3[_0x39e394(0xc6)](_0x4d5910),_0x5c05c2=_0x1ca6d3[_0x39e394(0xc6)](_0x2906d1);_0x17ca68['forEach'](_0x4df2c4=>{const _0x1e46c0=_0x39e394;_0x5a3cdd[_0x1e46c0(0x11d)](_0x4df2c4)&&_0x17ca68[_0x1e46c0(0xd8)](_0x4df2c4);}),_0x17ca68['size']&&(await _0x5c05c2[_0x39e394(0xc6)](_0x39e394(0xdf),{'params':{'userIDs':[..._0x17ca68]}}))[_0x39e394(0x106)][_0x39e394(0x113)][_0x39e394(0xf0)](_0x49a58c=>{const _0x58a7e6=_0x39e394;_0x49a58c&&_0x5a3cdd[_0x58a7e6(0x108)](_0x49a58c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2394e2,_0x42004d,_0x5433f1,_0x511e66)=>{const _0x71f9c=_0x20d3ef;for(var _0x4caa47=_0x511e66>0x1?void 0x0:_0x511e66?K(_0x42004d,_0x5433f1):_0x42004d,_0x4c24f2=_0x2394e2[_0x71f9c(0x10b)]-0x1,_0x29a03c;_0x4c24f2>=0x0;_0x4c24f2--)(_0x29a03c=_0x2394e2[_0x4c24f2])&&(_0x4caa47=_0x29a03c(_0x4caa47)||_0x4caa47);return _0x4caa47;},p=(_0x2ef0d6,_0x27cf3c)=>(_0xe6e851,_0x1b3a2d)=>_0x27cf3c(_0xe6e851,_0x1b3a2d,_0x2ef0d6);let _=class extends _0x571afd{constructor(_0x45218d,_0x587c91,_0x197e62,_0x3c8a18){const _0x3a7f27=_0x20d3ef;super(),this[_0x3a7f27(0x11e)]=_0x45218d,this[_0x3a7f27(0x128)]=_0x587c91,this['_userService']=_0x197e62,this[_0x3a7f27(0xe8)]=_0x3c8a18,this[_0x3a7f27(0xf5)](),this['_initUserSync']();}[_0x20d3ef(0xe3)](){const _0x70a83a=_0x20d3ef;this[_0x70a83a(0xd5)](this[_0x70a83a(0x128)][_0x70a83a(0xd1)][_0x70a83a(0x121)](_0x581a90(0x10))['subscribe'](_0x31eff9=>{const _0x20325f=_0x70a83a,_0x38e293=new Set();_0x31eff9[_0x20325f(0xf0)](_0x45030d=>{const _0x383a9d=_0x20325f;switch(_0x45030d[_0x383a9d(0xcf)]){case _0x383a9d(0xcd):{const _0x63622b=_0x45030d[_0x383a9d(0x127)]['personId'];_0x38e293[_0x383a9d(0xcd)](_0x63622b);break;}}}),B(this['_injector'],_0x38e293);}));}['_init'](){const _0x518dd9=_0x20d3ef;this[_0x518dd9(0xd5)](this[_0x518dd9(0x11e)][_0x518dd9(0xd1)][_0x518dd9(0x10d)](async _0x5b06a0=>{const _0x20a3a3=_0x518dd9;var _0x3d9c6b,_0x990977,_0x458c73,_0x407cfc;const _0x278394=(_0x3d9c6b=this[_0x20a3a3(0x128)][_0x20a3a3(0x102)](_0x5b06a0[_0x20a3a3(0x115)])[_0x20a3a3(0x124)](_0x1c70ea=>_0x1c70ea[_0x20a3a3(0xff)]===_0x5b06a0[_0x20a3a3(0xff)]))==null?void 0x0:_0x3d9c6b[_0x20a3a3(0x117)];if(!_0x278394)return;const {unitId:_0x3f87a3,subUnitId:_0x33b411}=_0x278394;switch(_0x5b06a0[_0x20a3a3(0x110)]&&this[_0x20a3a3(0x101)][_0x20a3a3(0x108)](_0x5b06a0[_0x20a3a3(0x110)]),_0x5b06a0[_0x20a3a3(0xcf)]){case v[_0x20a3a3(0x10f)]:break;case v[_0x20a3a3(0x119)]:{this[_0x20a3a3(0x128)][_0x20a3a3(0xd9)](_0x3f87a3,_0x33b411,{'unitId':_0x3f87a3,'subUnitId':_0x33b411,'ref':'','id':_0x5b06a0['replyId'],'dT':y(+_0x5b06a0[_0x20a3a3(0xfb)]),'threadId':_0x5b06a0[_0x20a3a3(0xff)],'personId':(_0x458c73=(_0x990977=_0x5b06a0[_0x20a3a3(0x110)])==null?void 0x0:_0x990977['userID'])!=null?_0x458c73:_0x5b06a0[_0x20a3a3(0xd7)],'text':JSON['parse'](_0x5b06a0[_0x20a3a3(0x122)]),'parentId':_0x278394['id']});break;}case v[_0x20a3a3(0xd6)]:{const _0x321746=this[_0x20a3a3(0x128)][_0x20a3a3(0x11a)](_0x3f87a3,_0x33b411,_0x5b06a0['replyId']);_0x321746&&_0x321746[_0x20a3a3(0xd0)]&&this[_0x20a3a3(0x128)][_0x20a3a3(0xc5)](_0x3f87a3,_0x33b411,_0x5b06a0[_0x20a3a3(0x111)]);break;}case v['Edit']:{this[_0x20a3a3(0x128)][_0x20a3a3(0x109)](_0x3f87a3,_0x33b411,{'commentId':_0x5b06a0['replyId'],'text':JSON[_0x20a3a3(0xc3)](_0x5b06a0['content'])});break;}case v[_0x20a3a3(0xc1)]:{const _0x48a184=(_0x407cfc=this['_threadCommentModel'][_0x20a3a3(0x102)](_0x5b06a0[_0x20a3a3(0x115)])[_0x20a3a3(0x124)](_0x40e933=>_0x40e933[_0x20a3a3(0xff)]===_0x5b06a0[_0x20a3a3(0xff)]))==null?void 0x0:_0x407cfc[_0x20a3a3(0x117)];_0x48a184&&this[_0x20a3a3(0x128)][_0x20a3a3(0xdd)](_0x3f87a3,_0x33b411,_0x48a184['id'],_0x5b06a0[_0x20a3a3(0xe4)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x11232c(_0x4dd9a5)),p(0x1,_0x11232c(_0x3b4192)),p(0x2,_0x11232c(_0x4d5910)),p(0x3,_0x11232c(_0x88c32a))],_);const z=_0x20d3ef(0xef),O={};var k=Object[_0x20d3ef(0xd4)],Q=(_0x5a206b,_0x49df59,_0x401177,_0x182076)=>{for(var _0x2db7ec=_0x182076>0x1?void 0x0:_0x182076?k(_0x49df59,_0x401177):_0x49df59,_0x3e6be4=_0x5a206b['length']-0x1,_0x3db3d1;_0x3e6be4>=0x0;_0x3e6be4--)(_0x3db3d1=_0x5a206b[_0x3e6be4])&&(_0x2db7ec=_0x3db3d1(_0x2db7ec)||_0x2db7ec);return _0x2db7ec;},b=(_0x407991,_0x467582)=>(_0x3ca49d,_0x38dfc8)=>_0x467582(_0x3ca49d,_0x38dfc8,_0x407991);function X(_0x2cb9db,_0x2798ec){const _0x1e6141=_0x20d3ef,_0x89273e=_0x2cb9db['replies'][0x0];return{..._0x2798ec,'id':_0x89273e[_0x1e6141(0x111)],'resolved':_0x2cb9db[_0x1e6141(0xe4)]===0x1,'dT':y(_0x89273e['createTimestamp']),'personId':_0x89273e[_0x1e6141(0xd7)],'threadId':_0x89273e[_0x1e6141(0xff)]};}function _0x3a04(_0x3d3149,_0x48b9be){_0x3d3149=_0x3d3149-0xc1;const _0xcb2924=_0xcb29();let _0x3a0416=_0xcb2924[_0x3d3149];return _0x3a0416;}function ee(_0x58d4dd,_0x573446,_0x41b5b2){const _0x4742a2=_0x20d3ef;var _0x2f814d,_0xe2bb91;if(((_0xe2bb91=(_0x2f814d=_0x58d4dd==null?void 0x0:_0x58d4dd[_0x4742a2(0x125)])==null?void 0x0:_0x2f814d[_0x4742a2(0x10b)])!=null?_0xe2bb91:0x0)>0x0){const _0xa1e99d=(_0x1c90a7,_0x1288b3)=>({'id':_0x1c90a7[_0x4742a2(0x111)],'threadId':_0x1c90a7[_0x4742a2(0xff)],'dT':y(_0x1c90a7[_0x4742a2(0xfb)]),'personId':_0x1c90a7[_0x4742a2(0xd7)],'resolved':_0x58d4dd[_0x4742a2(0xe4)]===I[_0x4742a2(0xea)],'unitId':_0x573446,'subUnitId':_0x41b5b2,'text':JSON[_0x4742a2(0xc3)](_0x1c90a7[_0x4742a2(0x122)]),'parentId':_0x1288b3}),_0x1e0f1b=_0xa1e99d(_0x58d4dd[_0x4742a2(0x125)][0x0]);return{..._0x1e0f1b,'children':_0x58d4dd[_0x4742a2(0x125)][_0x4742a2(0xfa)](0x1)[_0x4742a2(0xee)](_0x364e55=>_0xa1e99d(_0x364e55,_0x1e0f1b['id']))};}return null;}let S=class{constructor(_0x42d9f8,_0x37ce67,_0x59d13c){const _0x396583=_0x20d3ef;this[_0x396583(0x105)]=_0x42d9f8,this[_0x396583(0x101)]=_0x37ce67,this['_sessionService']=_0x59d13c;}async[_0x20d3ef(0xd9)](_0x36a2ab){const _0x5e9b3c=_0x20d3ef;var _0x3969b5,_0x506db8;const {parentId:_0x161dfb,unitId:_0x341c30,text:_0xd73826,threadId:_0x44c276}=_0x36a2ab,_0x4d7929=(_0x506db8=(_0x3969b5=_0xd73826[_0x5e9b3c(0xca)])==null?void 0x0:_0x3969b5[_0x5e9b3c(0x114)](_0x5b931d=>_0x5b931d[_0x5e9b3c(0x11b)]===_0x5823e2[_0x5e9b3c(0xd2)])[_0x5e9b3c(0xee)](_0x10b0bc=>_0x10b0bc[_0x5e9b3c(0x123)]))!=null?_0x506db8:[],_0x205ce4=JSON[_0x5e9b3c(0xf2)](_0xd73826),_0x181c94=(await this['_sessionService'][_0x5e9b3c(0xfd)](_0x341c30))[_0x5e9b3c(0x100)]();if(_0x161dfb){const _0x56ed9d={'memberId':_0x181c94,'unitId':_0x341c30,'content':_0x205ce4,'mention':_0x4d7929,'threadId':_0x44c276},_0x52477a=(await this['_httpService'][_0x5e9b3c(0x11c)](_0x5e9b3c(0xec)+_0x341c30+_0x5e9b3c(0xdb),{'body':_0x56ed9d}))[_0x5e9b3c(0x106)][_0x5e9b3c(0xcc)];return{..._0x36a2ab,'id':_0x52477a[_0x5e9b3c(0x111)],'dT':_0x4b771f(+_0x52477a[_0x5e9b3c(0xfb)])[_0x5e9b3c(0xfc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x52477a['userId']};}else{const _0x41c209={'memberId':_0x181c94,'unitId':_0x341c30,'content':_0x205ce4,'mention':_0x4d7929},_0x17abbb=await this[_0x5e9b3c(0x105)][_0x5e9b3c(0x11c)]('/universer-api/comment/unit/'+_0x341c30+_0x5e9b3c(0x118),{'body':_0x41c209});return X(_0x17abbb[_0x5e9b3c(0x106)]['comment'],_0x36a2ab);}}async[_0x20d3ef(0x109)](_0x3d8e17){const _0x12f98d=_0x20d3ef;var _0x4caace,_0xfad038;const {text:_0x579db,unitId:_0x27d519}=_0x3d8e17,_0x418c89=(_0xfad038=(_0x4caace=_0x579db['customRanges'])==null?void 0x0:_0x4caace[_0x12f98d(0x114)](_0x8a5133=>_0x8a5133['rangeType']===_0x5823e2[_0x12f98d(0xd2)])[_0x12f98d(0xee)](_0x8ebcf3=>_0x8ebcf3[_0x12f98d(0x123)]))!=null?_0xfad038:[],_0x3833c7=JSON[_0x12f98d(0xf2)](_0x579db),_0x50032a=_0x3d8e17[_0x12f98d(0xff)],_0x4975bc=_0x3d8e17['id'],_0xfd4e75={'memberId':(await this[_0x12f98d(0xcb)]['requireSession'](_0x27d519))['getMemberID'](),'unitId':_0x27d519,'threadId':_0x50032a,'mention':_0x418c89,'content':_0x3833c7,'replyId':_0x4975bc},_0x250e5e=await this[_0x12f98d(0x105)][_0x12f98d(0x11c)](_0x12f98d(0xec)+_0x27d519+_0x12f98d(0x104),{'body':_0xfd4e75});return!_0x250e5e[_0x12f98d(0x106)][_0x12f98d(0xf6)]||_0x250e5e[_0x12f98d(0x106)][_0x12f98d(0xf6)]['code']===0x1;}async[_0x20d3ef(0xdd)](_0x11c737){const _0x3a2224=_0x20d3ef,{unitId:_0x7668cd}=_0x11c737,_0x10a679=_0x11c737[_0x3a2224(0xff)],_0x54eb87={'memberId':this[_0x3a2224(0x101)][_0x3a2224(0x11f)]()[_0x3a2224(0xeb)],'unitId':_0x7668cd,'threadId':_0x10a679,'solved':_0x11c737[_0x3a2224(0xf8)]?I[_0x3a2224(0xea)]:I[_0x3a2224(0xde)]},_0x598899=await this[_0x3a2224(0x105)]['post'](_0x3a2224(0xec)+_0x7668cd+_0x3a2224(0xfe),{'body':_0x54eb87});return!_0x598899[_0x3a2224(0x106)][_0x3a2224(0xf6)]||_0x598899[_0x3a2224(0x106)][_0x3a2224(0xf6)][_0x3a2224(0x126)]===0x1;}async[_0x20d3ef(0xc5)](_0x4b5c95,_0x52b9c1,_0x5b7c8d,_0x57970a){const _0x5e93e8=_0x20d3ef,_0x4394cd={'memberId':(await this['_sessionService'][_0x5e93e8(0xfd)](_0x4b5c95))[_0x5e93e8(0x100)](),'threadId':_0x5b7c8d,'replyId':_0x57970a,'unitId':_0x4b5c95},_0x135cd3=await this[_0x5e93e8(0x105)][_0x5e93e8(0x11c)](_0x5e93e8(0xec)+_0x4b5c95+'/delete',{'body':_0x4394cd});return!_0x135cd3[_0x5e93e8(0x106)][_0x5e93e8(0xf6)]||_0x135cd3['body'][_0x5e93e8(0xf6)][_0x5e93e8(0x126)]===0x1;}async['listComments'](_0xb8f6b0,_0x38fe92,_0x2ad6a2){const _0x3be9f2=_0x20d3ef,_0x28f070={'unitId':_0xb8f6b0,'threadId':_0x2ad6a2},_0x172aca=await this[_0x3be9f2(0x105)][_0x3be9f2(0x11c)](_0x3be9f2(0xec)+_0xb8f6b0+_0x3be9f2(0xf1),{'body':_0x28f070}),_0x22f829=_0x2ad6a2['map'](_0x4e5f66=>ee(_0x172aca[_0x3be9f2(0x106)][_0x3be9f2(0xda)][_0x4e5f66],_0xb8f6b0,_0x38fe92))['filter'](Boolean);return Object[_0x3be9f2(0x103)](_0x172aca[_0x3be9f2(0x106)][_0x3be9f2(0x113)])[_0x3be9f2(0xf0)](_0x4ecf3a=>{const _0x2788c8=_0x3be9f2;this[_0x2788c8(0x101)][_0x2788c8(0x108)](_0x4ecf3a);}),_0x22f829;}[_0x20d3ef(0x112)](_0x313f8b){const _0x42c96b=_0x20d3ef;return{'id':_0x313f8b['id'],'threadId':_0x313f8b['threadId'],'ref':_0x313f8b[_0x42c96b(0xed)]};}};S=Q([b(0x0,_0x11232c(_0x2906d1)),b(0x1,_0x11232c(_0x4d5910)),b(0x2,_0x11232c(_0x4249b0))],S);var re=Object[_0x20d3ef(0xd4)],te=(_0x57634b,_0x202de,_0x40f356,_0x36240e)=>{for(var _0x681d22=_0x36240e>0x1?void 0x0:_0x36240e?re(_0x202de,_0x40f356):_0x202de,_0x35d51d=_0x57634b['length']-0x1,_0x4595e2;_0x35d51d>=0x0;_0x35d51d--)(_0x4595e2=_0x57634b[_0x35d51d])&&(_0x681d22=_0x4595e2(_0x681d22)||_0x681d22);return _0x681d22;},M=(_0x41e866,_0x59d12b)=>(_0x29bbeb,_0x4505d9)=>_0x59d12b(_0x29bbeb,_0x4505d9,_0x41e866);let f=class extends _0x571afd{constructor(_0x2c017b,_0x17c633){const _0x49bae5=_0x20d3ef;super(),this[_0x49bae5(0xd3)]=_0x2c017b,this[_0x49bae5(0xce)]=_0x17c633,this[_0x49bae5(0xe1)]();}['_initDataSource'](){const _0x5a0493=_0x20d3ef;this[_0x5a0493(0xd3)]['dataSource']=this[_0x5a0493(0xce)],this[_0x5a0493(0xd3)][_0x5a0493(0xc2)]=!0x1;}};f=te([M(0x0,_0x503f14),M(0x1,_0x11232c(S))],f);var se=Object[_0x20d3ef(0x120)],oe=Object[_0x20d3ef(0xd4)],ne=(_0x1913e1,_0x774d5e,_0xe07c6d)=>_0x774d5e in _0x1913e1?se(_0x1913e1,_0x774d5e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe07c6d}):_0x1913e1[_0x774d5e]=_0xe07c6d,ie=(_0x174462,_0x1786fa,_0x3e360c,_0x45e5f8)=>{const _0x163777=_0x20d3ef;for(var _0x1d935e=_0x45e5f8>0x1?void 0x0:_0x45e5f8?oe(_0x1786fa,_0x3e360c):_0x1786fa,_0x6e72ba=_0x174462[_0x163777(0x10b)]-0x1,_0x65a37b;_0x6e72ba>=0x0;_0x6e72ba--)(_0x65a37b=_0x174462[_0x6e72ba])&&(_0x1d935e=_0x65a37b(_0x1d935e)||_0x1d935e);return _0x1d935e;},N=(_0x4b672e,_0x3fc143)=>(_0x43c440,_0x1998d2)=>_0x3fc143(_0x43c440,_0x1998d2,_0x4b672e),$=(_0x47347f,_0x1f1135,_0x2b5172)=>ne(_0x47347f,typeof _0x1f1135!=_0x20d3ef(0xf7)?_0x1f1135+'':_0x1f1135,_0x2b5172);let g=class extends _0x224704{constructor(_0x59cf49=O,_0x13840e,_0x3b8c7d){const _0x3dfbca=_0x20d3ef;super(),this[_0x3dfbca(0xf4)]=_0x59cf49,this['_injector']=_0x13840e,this[_0x3dfbca(0xe2)]=_0x3b8c7d;const {..._0x223881}=_0x270e57({},O,this[_0x3dfbca(0xf4)]);this[_0x3dfbca(0xe2)][_0x3dfbca(0x116)](z,_0x223881);}['onStarting'](){const _0x25b922=_0x20d3ef;[[S],[f],[_]][_0x25b922(0xf0)](_0x158da3=>{const _0xf0f0dc=_0x25b922;this[_0xf0f0dc(0xe8)][_0xf0f0dc(0xcd)](_0x158da3);});}[_0x20d3ef(0xe5)](){const _0x1ae226=_0x20d3ef;this[_0x1ae226(0xe8)]['get'](f),this[_0x1ae226(0xe8)][_0x1ae226(0xc6)](_);}};$(g,_0x20d3ef(0x10a),W),$(g,'type',_0x441124[_0x20d3ef(0xc4)]),g=ie([_0x157e0d(_0x24ac9f,_0x193453,_0x31702b),N(0x1,_0x11232c(_0x88c32a)),N(0x2,_0x1f2235)],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 _0x56ed(_0x3f7a7b,_0x34ae77){_0x3f7a7b=_0x3f7a7b-0x94;const _0x4668e6=_0x4668();let _0x56ed99=_0x4668e6[_0x3f7a7b];return _0x56ed99;}function _0x4668(){const _0x6a2fdc=['content','getCurrentUser','_threadCommentDataSource','_httpService','/universer-api/user/list','Plugin','_threadCommentDataSourceService','deleteComment','UniverCollaborationClientPlugin','71256PoxdAq','addUser','getMemberID','post','UNRECOGNIZED','syncUpdateMutationToColla','getUser','Unknown','YYYY/MM/DD\x20HH:mm','745MvDyxp','UNIVER_UNKNOWN','bufferTime','OpenOrReOpen','_init','@univerjs-pro/license','setConfig','find','customRanges','Delete','error','350262KftHmT','_initUserSync','Solve','listComments','/add','function','resolveComment','33090zdbBio','unitId','UniverThreadCommentDataSourcePlugin','1709466wzXflt','Inject','Injector','createTimestamp','Edit','17398bgyrEC','root','_injector','users','userID','CollaborationSessionService','/list','size','@univerjs/core','requireSession','values','replyId','length','map','12771WpcPSe','getUnit','CustomRangeType','rangeType','disposeWithMe','commentUpdate$','dataSource','filter','UniverProCollaborationClient','HTTPService','amd','DependentOn','rxjs','getOwnPropertyDescriptor','dayjs','personId','onStarting','111dFBOgx','delete','_sessionService','UniverProLicense','UniverThreadComment','/reply','UserManagerService','@univerjs/network','getComment','code','replies','defineProperty','12873nynIJF','body','/delete','type','stringify','Add','user','parse','UniverProThreadCommentDatasource','COMMENT','forEach','subscribe','rangeId','onReady','_config','UniverThreadCommentUi','get','slice','updateComment','UniverNetwork','solved','@univerjs-pro/collaboration-client','7456zlvOfs','Reply','saveCommentToSnapshot','addComment','IThreadCommentDataSourceService','_configService','reply','threadId','payload','symbol','@univerjs/thread-comment-ui','_userService','parentId','Solved','add','/universer-api/comment/unit/','userId','Module','ref','object','pluginName','/edit','_threadCommentModel','format','Disposable','5892480QKRyaO'];_0x4668=function(){return _0x6a2fdc;};return _0x4668();}(function(_0x29ba91,_0x1c0ac0){const _0x4c3199=_0x56ed,_0x8c9142=_0x29ba91();while(!![]){try{const _0xff8ef7=-parseInt(_0x4c3199(0xea))/0x1+-parseInt(_0x4c3199(0xef))/0x2*(-parseInt(_0x4c3199(0x10e))/0x3)+-parseInt(_0x4c3199(0xc2))/0x4+parseInt(_0x4c3199(0xd5))/0x5*(parseInt(_0x4c3199(0xcc))/0x6)+-parseInt(_0x4c3199(0x11a))/0x7*(parseInt(_0x4c3199(0xa9))/0x8)+-parseInt(_0x4c3199(0xe0))/0x9+-parseInt(_0x4c3199(0xe7))/0xa*(-parseInt(_0x4c3199(0xfd))/0xb);if(_0xff8ef7===_0x1c0ac0)break;else _0x8c9142['push'](_0x8c9142['shift']());}catch(_0x830bd3){_0x8c9142['push'](_0x8c9142['shift']());}}}(_0x4668,0xf3934),function(_0x521cd4,_0xf85836){const _0x2cbebc=_0x56ed;typeof exports==_0x2cbebc(0xbc)&&typeof module<'u'?_0xf85836(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==_0x2cbebc(0xe5)&&define[_0x2cbebc(0x107)]?define(['exports',_0x2cbebc(0xa8),_0x2cbebc(0xda),_0x2cbebc(0xf7),_0x2cbebc(0xb3),'@univerjs/thread-comment',_0x2cbebc(0x109),_0x2cbebc(0x115)],_0xf85836):(_0x521cd4=typeof globalThis<'u'?globalThis:_0x521cd4||self,_0xf85836(_0x521cd4[_0x2cbebc(0x9b)]={},_0x521cd4[_0x2cbebc(0x105)],_0x521cd4[_0x2cbebc(0x111)],_0x521cd4['UniverCore'],_0x521cd4[_0x2cbebc(0xa2)],_0x521cd4[_0x2cbebc(0x112)],_0x521cd4[_0x2cbebc(0x109)],_0x521cd4[_0x2cbebc(0xa6)]));}(this,function(_0xa5bb3,_0x5c0f8f,_0x9d00dd,_0x529188,_0x42974a,_0x43ac1c,_0x17b312,_0x4890dd){'use strict';const _0x5742a8=_0x56ed;const _0x3cb245='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x21fb96=(_0x6958b1=>(_0x6958b1[_0x6958b1[_0x5742a8(0xd8)]=0x0]=_0x5742a8(0xd8),_0x6958b1[_0x6958b1[_0x5742a8(0xb6)]=0x1]=_0x5742a8(0xb6),_0x6958b1[_0x6958b1[_0x5742a8(0xd0)]=-0x1]=_0x5742a8(0xd0),_0x6958b1))(_0x21fb96||{}),_0x32f01a=(_0x221187=>(_0x221187[_0x221187[_0x5742a8(0xd3)]=0x0]=_0x5742a8(0xd3),_0x221187[_0x221187[_0x5742a8(0x98)]=0x1]=_0x5742a8(0x98),_0x221187[_0x221187[_0x5742a8(0xaa)]=0x2]=_0x5742a8(0xaa),_0x221187[_0x221187[_0x5742a8(0xee)]=0x3]='Edit',_0x221187[_0x221187[_0x5742a8(0xde)]=0x4]=_0x5742a8(0xde),_0x221187[_0x221187[_0x5742a8(0xe2)]=0x5]=_0x5742a8(0xe2),_0x221187[_0x221187[_0x5742a8(0xd0)]=-0x1]=_0x5742a8(0xd0),_0x221187))(_0x32f01a||{});const _0x185e1b=_0x42363d=>_0x529188[_0x5742a8(0x10b)](new Date(+_0x42363d))[_0x5742a8(0xc0)](_0x5742a8(0xd4)),_0x51fd4b=async(_0x229e2a,_0x1811b4)=>{const _0x2817c3=_0x5742a8,_0x3c129a=_0x229e2a[_0x2817c3(0xa3)](_0x529188['UserManagerService']),_0x87e017=_0x229e2a[_0x2817c3(0xa3)](_0x4890dd[_0x2817c3(0x106)]);_0x1811b4[_0x2817c3(0x9d)](_0x2c2b41=>{const _0x5c587a=_0x2817c3;_0x3c129a[_0x5c587a(0xd2)](_0x2c2b41)&&_0x1811b4[_0x5c587a(0x10f)](_0x2c2b41);}),_0x1811b4[_0x2817c3(0xf6)]&&(await _0x87e017[_0x2817c3(0xa3)](_0x2817c3(0xc7),{'params':{'userIDs':[..._0x1811b4]}}))[_0x2817c3(0x94)][_0x2817c3(0xf2)][_0x2817c3(0x9d)](_0x29713c=>{const _0x5467db=_0x2817c3;_0x29713c&&_0x3c129a[_0x5467db(0xcd)](_0x29713c);});};var _0x2b550b=Object[_0x5742a8(0x10a)],_0x27eed1=(_0xbf8479,_0x2fedee,_0xeb7972,_0x1e708e)=>{const _0x1aee87=_0x5742a8;for(var _0x4d7c76=_0x1e708e>0x1?void 0x0:_0x1e708e?_0x2b550b(_0x2fedee,_0xeb7972):_0x2fedee,_0x3f5ce5=_0xbf8479[_0x1aee87(0xfb)]-0x1,_0x430cab;_0x3f5ce5>=0x0;_0x3f5ce5--)(_0x430cab=_0xbf8479[_0x3f5ce5])&&(_0x4d7c76=_0x430cab(_0x4d7c76)||_0x4d7c76);return _0x4d7c76;},_0x1d911a=(_0xe0c7d1,_0x32ffba)=>(_0x20ce3e,_0x405f87)=>_0x32ffba(_0x20ce3e,_0x405f87,_0xe0c7d1);let _0x2c1637=class extends _0x529188[_0x5742a8(0xc1)]{constructor(_0x322f93,_0x50dfc3,_0x27370e,_0x22801c){const _0x171ba0=_0x5742a8;super(),this['_commentService']=_0x322f93,this[_0x171ba0(0xbf)]=_0x50dfc3,this['_userService']=_0x27370e,this[_0x171ba0(0xf1)]=_0x22801c,this['_init'](),this[_0x171ba0(0xe1)]();}[_0x5742a8(0xe1)](){const _0x524134=_0x5742a8;this[_0x524134(0x101)](this['_threadCommentModel'][_0x524134(0x102)]['pipe'](_0x17b312[_0x524134(0xd7)](0x10))['subscribe'](_0x5ab807=>{const _0x4873a1=_0x524134,_0x11e621=new Set();_0x5ab807[_0x4873a1(0x9d)](_0x51b92f=>{const _0x27cef4=_0x4873a1;switch(_0x51b92f[_0x27cef4(0x96)]){case _0x27cef4(0xb7):{const _0x1d2784=_0x51b92f[_0x27cef4(0xb1)][_0x27cef4(0x10c)];_0x11e621[_0x27cef4(0xb7)](_0x1d2784);break;}}}),_0x51fd4b(this['_injector'],_0x11e621);}));}[_0x5742a8(0xd9)](){const _0x508b7a=_0x5742a8;this['disposeWithMe'](this['_commentService']['commentUpdate$'][_0x508b7a(0x9e)](async _0x53af1f=>{const _0x1b76aa=_0x508b7a;var _0x36b57f,_0x48d539,_0x2e066c,_0x54535d;const _0x3b84d8=(_0x36b57f=this[_0x1b76aa(0xbf)]['getUnit'](_0x53af1f[_0x1b76aa(0xe8)])[_0x1b76aa(0xdc)](_0x52b6dd=>_0x52b6dd[_0x1b76aa(0xb0)]===_0x53af1f[_0x1b76aa(0xb0)]))==null?void 0x0:_0x36b57f['root'];if(!_0x3b84d8)return;const {unitId:_0x40bf24,subUnitId:_0x39a1e9}=_0x3b84d8;switch(_0x53af1f[_0x1b76aa(0x99)]&&this[_0x1b76aa(0xb4)][_0x1b76aa(0xcd)](_0x53af1f[_0x1b76aa(0x99)]),_0x53af1f[_0x1b76aa(0x96)]){case _0x32f01a[_0x1b76aa(0x98)]:break;case _0x32f01a[_0x1b76aa(0xaa)]:{this[_0x1b76aa(0xbf)][_0x1b76aa(0xac)](_0x40bf24,_0x39a1e9,{'unitId':_0x40bf24,'subUnitId':_0x39a1e9,'ref':'','id':_0x53af1f[_0x1b76aa(0xfa)],'dT':_0x185e1b(+_0x53af1f[_0x1b76aa(0xed)]),'threadId':_0x53af1f[_0x1b76aa(0xb0)],'personId':(_0x2e066c=(_0x48d539=_0x53af1f[_0x1b76aa(0x99)])==null?void 0x0:_0x48d539['userID'])!=null?_0x2e066c:_0x53af1f['userId'],'text':JSON['parse'](_0x53af1f['content']),'parentId':_0x3b84d8['id']});break;}case _0x32f01a[_0x1b76aa(0xde)]:{const _0x2d50f5=this[_0x1b76aa(0xbf)][_0x1b76aa(0x116)](_0x40bf24,_0x39a1e9,_0x53af1f[_0x1b76aa(0xfa)]);_0x2d50f5&&_0x2d50f5[_0x1b76aa(0xb5)]&&this[_0x1b76aa(0xbf)][_0x1b76aa(0xca)](_0x40bf24,_0x39a1e9,_0x53af1f[_0x1b76aa(0xfa)]);break;}case _0x32f01a['Edit']:{this[_0x1b76aa(0xbf)]['updateComment'](_0x40bf24,_0x39a1e9,{'commentId':_0x53af1f[_0x1b76aa(0xfa)],'text':JSON['parse'](_0x53af1f['content'])});break;}case _0x32f01a[_0x1b76aa(0xe2)]:{const _0x7c106b=(_0x54535d=this[_0x1b76aa(0xbf)][_0x1b76aa(0xfe)](_0x53af1f[_0x1b76aa(0xe8)])[_0x1b76aa(0xdc)](_0xbe16a1=>_0xbe16a1[_0x1b76aa(0xb0)]===_0x53af1f[_0x1b76aa(0xb0)]))==null?void 0x0:_0x54535d[_0x1b76aa(0xf0)];_0x7c106b&&this[_0x1b76aa(0xbf)]['resolveComment'](_0x40bf24,_0x39a1e9,_0x7c106b['id'],_0x53af1f[_0x1b76aa(0xa7)]===_0x21fb96[_0x1b76aa(0xb6)]);break;}}}));}};_0x2c1637=_0x27eed1([_0x1d911a(0x0,_0x529188[_0x5742a8(0xeb)](_0x5c0f8f['CommentService'])),_0x1d911a(0x1,_0x529188[_0x5742a8(0xeb)](_0x43ac1c['ThreadCommentModel'])),_0x1d911a(0x2,_0x529188['Inject'](_0x529188['UserManagerService'])),_0x1d911a(0x3,_0x529188['Inject'](_0x529188[_0x5742a8(0xec)]))],_0x2c1637);const _0x292bb0='thread-comment-data-source.config',_0x1ad811={};var _0x178272=Object[_0x5742a8(0x10a)],_0x160547=(_0x48f27f,_0x134781,_0x174182,_0x1dd9fc)=>{const _0x112408=_0x5742a8;for(var _0xd0dcb7=_0x1dd9fc>0x1?void 0x0:_0x1dd9fc?_0x178272(_0x134781,_0x174182):_0x134781,_0x35d469=_0x48f27f[_0x112408(0xfb)]-0x1,_0x1df304;_0x35d469>=0x0;_0x35d469--)(_0x1df304=_0x48f27f[_0x35d469])&&(_0xd0dcb7=_0x1df304(_0xd0dcb7)||_0xd0dcb7);return _0xd0dcb7;},_0x299324=(_0x1e71b7,_0x31deab)=>(_0xd4f739,_0x11d9c6)=>_0x31deab(_0xd4f739,_0x11d9c6,_0x1e71b7);function _0x366ea8(_0xb9d51,_0x57137d){const _0x8622f9=_0x5742a8,_0x1eb956=_0xb9d51[_0x8622f9(0x118)][0x0];return{..._0x57137d,'id':_0x1eb956['replyId'],'resolved':_0xb9d51[_0x8622f9(0xa7)]===0x1,'dT':_0x185e1b(_0x1eb956['createTimestamp']),'personId':_0x1eb956['userId'],'threadId':_0x1eb956['threadId']};}function _0x1a9e6c(_0x640cbb,_0x5343db,_0x469881){const _0x2e5b31=_0x5742a8;var _0x99b36b,_0x2b99a4;if(((_0x2b99a4=(_0x99b36b=_0x640cbb==null?void 0x0:_0x640cbb[_0x2e5b31(0x118)])==null?void 0x0:_0x99b36b['length'])!=null?_0x2b99a4:0x0)>0x0){const _0x589a1a=(_0xb0dc00,_0x50c005)=>({'id':_0xb0dc00['replyId'],'threadId':_0xb0dc00[_0x2e5b31(0xb0)],'dT':_0x185e1b(_0xb0dc00['createTimestamp']),'personId':_0xb0dc00[_0x2e5b31(0xb9)],'resolved':_0x640cbb[_0x2e5b31(0xa7)]===_0x21fb96[_0x2e5b31(0xb6)],'unitId':_0x5343db,'subUnitId':_0x469881,'text':JSON[_0x2e5b31(0x9a)](_0xb0dc00[_0x2e5b31(0xc3)]),'parentId':_0x50c005}),_0x1d56d8=_0x589a1a(_0x640cbb[_0x2e5b31(0x118)][0x0]);return{..._0x1d56d8,'children':_0x640cbb['replies'][_0x2e5b31(0xa4)](0x1)['map'](_0x5c5d63=>_0x589a1a(_0x5c5d63,_0x1d56d8['id']))};}return null;}let _0x558f1a=class{constructor(_0x10850,_0x3db3ac,_0x2c29a6){const _0x14ed0c=_0x5742a8;this[_0x14ed0c(0xc6)]=_0x10850,this[_0x14ed0c(0xb4)]=_0x3db3ac,this['_sessionService']=_0x2c29a6;}async['addComment'](_0x274738){const _0x4c1e52=_0x5742a8;var _0x383ad6,_0x30e933;const {parentId:_0x578486,unitId:_0x2bf226,text:_0x356204,threadId:_0x2ec94e}=_0x274738,_0x286394=(_0x30e933=(_0x383ad6=_0x356204[_0x4c1e52(0xdd)])==null?void 0x0:_0x383ad6[_0x4c1e52(0x104)](_0x26a006=>_0x26a006[_0x4c1e52(0x100)]===_0x529188[_0x4c1e52(0xff)]['COMMENT'])['map'](_0x3e8f6d=>_0x3e8f6d[_0x4c1e52(0x9f)]))!=null?_0x30e933:[],_0x526a0f=JSON['stringify'](_0x356204),_0x547594=(await this[_0x4c1e52(0x110)][_0x4c1e52(0xf8)](_0x2bf226))['getMemberID']();if(_0x578486){const _0x22c62d={'memberId':_0x547594,'unitId':_0x2bf226,'content':_0x526a0f,'mention':_0x286394,'threadId':_0x2ec94e},_0x7513ce=(await this[_0x4c1e52(0xc6)]['post'](_0x4c1e52(0xb8)+_0x2bf226+_0x4c1e52(0x113),{'body':_0x22c62d}))['body'][_0x4c1e52(0xaf)];return{..._0x274738,'id':_0x7513ce[_0x4c1e52(0xfa)],'dT':_0x529188['dayjs'](+_0x7513ce['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x7513ce[_0x4c1e52(0xb9)]};}else{const _0x4230e8={'memberId':_0x547594,'unitId':_0x2bf226,'content':_0x526a0f,'mention':_0x286394},_0x1d5470=await this[_0x4c1e52(0xc6)][_0x4c1e52(0xcf)](_0x4c1e52(0xb8)+_0x2bf226+_0x4c1e52(0xe4),{'body':_0x4230e8});return _0x366ea8(_0x1d5470[_0x4c1e52(0x94)]['comment'],_0x274738);}}async[_0x5742a8(0xa5)](_0x34721e){const _0x134348=_0x5742a8;var _0x52b469,_0x2f40fe;const {text:_0x1d7c37,unitId:_0x362ae6}=_0x34721e,_0x4782d4=(_0x2f40fe=(_0x52b469=_0x1d7c37[_0x134348(0xdd)])==null?void 0x0:_0x52b469[_0x134348(0x104)](_0x334cc7=>_0x334cc7[_0x134348(0x100)]===_0x529188['CustomRangeType'][_0x134348(0x9c)])['map'](_0x42e2cd=>_0x42e2cd['rangeId']))!=null?_0x2f40fe:[],_0x2dbd94=JSON[_0x134348(0x97)](_0x1d7c37),_0x58ca84=_0x34721e[_0x134348(0xb0)],_0x26db7c=_0x34721e['id'],_0x69a3ae={'memberId':(await this[_0x134348(0x110)][_0x134348(0xf8)](_0x362ae6))[_0x134348(0xce)](),'unitId':_0x362ae6,'threadId':_0x58ca84,'mention':_0x4782d4,'content':_0x2dbd94,'replyId':_0x26db7c},_0x2489be=await this[_0x134348(0xc6)][_0x134348(0xcf)]('/universer-api/comment/unit/'+_0x362ae6+_0x134348(0xbe),{'body':_0x69a3ae});return!_0x2489be[_0x134348(0x94)]['error']||_0x2489be[_0x134348(0x94)][_0x134348(0xdf)][_0x134348(0x117)]===0x1;}async[_0x5742a8(0xe6)](_0xbc4358){const _0x531425=_0x5742a8,{unitId:_0x48cb50}=_0xbc4358,_0x43c736=_0xbc4358['threadId'],_0x11211e={'memberId':this['_userService'][_0x531425(0xc4)]()[_0x531425(0xf3)],'unitId':_0x48cb50,'threadId':_0x43c736,'solved':_0xbc4358['resolved']?_0x21fb96['Solved']:_0x21fb96['OpenOrReOpen']},_0x34a13b=await this[_0x531425(0xc6)]['post'](_0x531425(0xb8)+_0x48cb50+'/solved',{'body':_0x11211e});return!_0x34a13b[_0x531425(0x94)][_0x531425(0xdf)]||_0x34a13b[_0x531425(0x94)][_0x531425(0xdf)][_0x531425(0x117)]===0x1;}async['deleteComment'](_0x3ca24e,_0x5d8836,_0x1023d6,_0x38719c){const _0x171f7e=_0x5742a8,_0x2b87f7={'memberId':(await this[_0x171f7e(0x110)][_0x171f7e(0xf8)](_0x3ca24e))[_0x171f7e(0xce)](),'threadId':_0x1023d6,'replyId':_0x38719c,'unitId':_0x3ca24e},_0x1b010a=await this[_0x171f7e(0xc6)][_0x171f7e(0xcf)]('/universer-api/comment/unit/'+_0x3ca24e+_0x171f7e(0x95),{'body':_0x2b87f7});return!_0x1b010a['body'][_0x171f7e(0xdf)]||_0x1b010a[_0x171f7e(0x94)][_0x171f7e(0xdf)][_0x171f7e(0x117)]===0x1;}async[_0x5742a8(0xe3)](_0x38341e,_0xfe7183,_0xfaf705){const _0x388122=_0x5742a8,_0x2e7943={'unitId':_0x38341e,'threadId':_0xfaf705},_0xe46c9b=await this[_0x388122(0xc6)][_0x388122(0xcf)](_0x388122(0xb8)+_0x38341e+_0x388122(0xf5),{'body':_0x2e7943}),_0x49757f=_0xfaf705[_0x388122(0xfc)](_0x16c340=>_0x1a9e6c(_0xe46c9b[_0x388122(0x94)]['comments'][_0x16c340],_0x38341e,_0xfe7183))[_0x388122(0x104)](Boolean);return Object[_0x388122(0xf9)](_0xe46c9b[_0x388122(0x94)]['users'])[_0x388122(0x9d)](_0x455a34=>{const _0x561840=_0x388122;this[_0x561840(0xb4)][_0x561840(0xcd)](_0x455a34);}),_0x49757f;}[_0x5742a8(0xab)](_0x4eb4ed){const _0x5a84a2=_0x5742a8;return{'id':_0x4eb4ed['id'],'threadId':_0x4eb4ed[_0x5a84a2(0xb0)],'ref':_0x4eb4ed[_0x5a84a2(0xbb)]};}};_0x558f1a=_0x160547([_0x299324(0x0,_0x529188[_0x5742a8(0xeb)](_0x4890dd[_0x5742a8(0x106)])),_0x299324(0x1,_0x529188[_0x5742a8(0xeb)](_0x529188[_0x5742a8(0x114)])),_0x299324(0x2,_0x529188[_0x5742a8(0xeb)](_0x5c0f8f[_0x5742a8(0xf4)]))],_0x558f1a);var _0xe58bd2=Object[_0x5742a8(0x10a)],_0x4ef192=(_0x327709,_0x445f46,_0x3a78c3,_0x4b0617)=>{const _0x2d265e=_0x5742a8;for(var _0x211581=_0x4b0617>0x1?void 0x0:_0x4b0617?_0xe58bd2(_0x445f46,_0x3a78c3):_0x445f46,_0x1ad223=_0x327709[_0x2d265e(0xfb)]-0x1,_0x1113ae;_0x1ad223>=0x0;_0x1ad223--)(_0x1113ae=_0x327709[_0x1ad223])&&(_0x211581=_0x1113ae(_0x211581)||_0x211581);return _0x211581;},_0x18ac63=(_0x34b8ab,_0x42f84d)=>(_0x29c62b,_0x2d36e0)=>_0x42f84d(_0x29c62b,_0x2d36e0,_0x34b8ab);let _0x428263=class extends _0x529188[_0x5742a8(0xc1)]{constructor(_0x4d438,_0x4319b0){const _0x569ae9=_0x5742a8;super(),this['_threadCommentDataSourceService']=_0x4d438,this[_0x569ae9(0xc5)]=_0x4319b0,this['_initDataSource']();}['_initDataSource'](){const _0x446dcd=_0x5742a8;this[_0x446dcd(0xc9)][_0x446dcd(0x103)]=this[_0x446dcd(0xc5)],this['_threadCommentDataSourceService'][_0x446dcd(0xd1)]=!0x1;}};_0x428263=_0x4ef192([_0x18ac63(0x0,_0x43ac1c[_0x5742a8(0xad)]),_0x18ac63(0x1,_0x529188['Inject'](_0x558f1a))],_0x428263);var _0x2ee584=Object[_0x5742a8(0x119)],_0x58495d=Object['getOwnPropertyDescriptor'],_0xecfc1d=(_0x2ea57b,_0x524e8b,_0x5f2ee4)=>_0x524e8b in _0x2ea57b?_0x2ee584(_0x2ea57b,_0x524e8b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f2ee4}):_0x2ea57b[_0x524e8b]=_0x5f2ee4,_0x29369a=(_0xc76ec6,_0x5b4508,_0x31ad88,_0x569ffe)=>{const _0x59f539=_0x5742a8;for(var _0x145be7=_0x569ffe>0x1?void 0x0:_0x569ffe?_0x58495d(_0x5b4508,_0x31ad88):_0x5b4508,_0x12a004=_0xc76ec6[_0x59f539(0xfb)]-0x1,_0x393231;_0x12a004>=0x0;_0x12a004--)(_0x393231=_0xc76ec6[_0x12a004])&&(_0x145be7=_0x393231(_0x145be7)||_0x145be7);return _0x145be7;},_0x2c4bf6=(_0x2a58d3,_0x43b2bd)=>(_0x29ee75,_0x1c2952)=>_0x43b2bd(_0x29ee75,_0x1c2952,_0x2a58d3),_0x4e7d19=(_0x2dd6a3,_0x531dc7,_0x29eeef)=>_0xecfc1d(_0x2dd6a3,typeof _0x531dc7!=_0x5742a8(0xb2)?_0x531dc7+'':_0x531dc7,_0x29eeef);_0xa5bb3['UniverThreadCommentDataSourcePlugin']=class extends _0x529188[_0x5742a8(0xc8)]{constructor(_0x5455cd=_0x1ad811,_0x150ba4,_0x108b3e){const _0x5330c3=_0x5742a8;super(),this[_0x5330c3(0xa1)]=_0x5455cd,this[_0x5330c3(0xf1)]=_0x150ba4,this[_0x5330c3(0xae)]=_0x108b3e;const {..._0x43c85d}=_0x529188['merge']({},_0x1ad811,this['_config']);this[_0x5330c3(0xae)][_0x5330c3(0xdb)](_0x292bb0,_0x43c85d);}[_0x5742a8(0x10d)](){const _0x5515cd=_0x5742a8;[[_0x558f1a],[_0x428263],[_0x2c1637]][_0x5515cd(0x9d)](_0x168e0b=>{const _0x3e9c30=_0x5515cd;this[_0x3e9c30(0xf1)]['add'](_0x168e0b);});}[_0x5742a8(0xa0)](){const _0x1bda62=_0x5742a8;this[_0x1bda62(0xf1)][_0x1bda62(0xa3)](_0x428263),this[_0x1bda62(0xf1)]['get'](_0x2c1637);}},_0x4e7d19(_0xa5bb3[_0x5742a8(0xe9)],_0x5742a8(0xbd),_0x3cb245),_0x4e7d19(_0xa5bb3[_0x5742a8(0xe9)],'type',_0x529188['UniverInstanceType'][_0x5742a8(0xd6)]),_0xa5bb3[_0x5742a8(0xe9)]=_0x29369a([_0x529188[_0x5742a8(0x108)](_0x42974a['UniverThreadCommentUIPlugin'],_0x5c0f8f[_0x5742a8(0xcb)],_0x9d00dd['UniverLicensePlugin']),_0x2c4bf6(0x1,_0x529188[_0x5742a8(0xeb)](_0x529188[_0x5742a8(0xec)])),_0x2c4bf6(0x2,_0x529188['IConfigService'])],_0xa5bb3[_0x5742a8(0xe9)]),Object[_0x5742a8(0x119)](_0xa5bb3,Symbol['toStringTag'],{'value':_0x5742a8(0xba)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.13.0-insiders.20251220-0a5ea4d",
3
+ "version": "0.14.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.13.0-insiders.20251220-0a5ea4d",
49
- "@univerjs-pro/license": "0.13.0-insiders.20251220-0a5ea4d",
48
+ "@univerjs-pro/collaboration-client": "0.14.0",
49
+ "@univerjs-pro/license": "0.14.0",
50
+ "@univerjs/core": "0.14.0",
50
51
  "@univerjs/protocol": "0.1.47",
51
- "@univerjs/thread-comment": "0.13.0-insiders.20251220-0a5ea4d",
52
- "@univerjs/network": "0.13.0-insiders.20251220-0a5ea4d",
53
- "@univerjs/thread-comment-ui": "0.13.0-insiders.20251220-0a5ea4d",
54
- "@univerjs/core": "0.13.0-insiders.20251220-0a5ea4d"
52
+ "@univerjs/network": "0.14.0",
53
+ "@univerjs/thread-comment-ui": "0.14.0",
54
+ "@univerjs/thread-comment": "0.14.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.2.7",
60
60
  "vitest": "^4.0.15",
61
- "@univerjs-infra/shared": "0.13.0"
61
+ "@univerjs-infra/shared": "0.14.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",