@univerjs-pro/thread-comment-datasource 0.3.0-alpha.1 → 0.3.0-nightly.202410101606
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 _0x50539d=_0x47f8;function _0x2c92(){const _0x43da5b=['forEach','OnLifecycle','customRanges','code','_threadCommentMentionDataService','toStringTag','dataSource','Unknown','getComment','host','comment','/universer-api/authz/collaborator','IThreadCommentDataSourceService','resolved','_config','requireSession','_initDataSource','UniverInstanceType','UNRECOGNIZED','_configService','UniverThreadCommentUIPlugin','content','/edit','51248ZEdhga','_httpService','dayjs','Edit','Reply','filter','userID','_threadCommentModel','UniverThreadCommentPlugin','get','addComment','/reply','slice','commentUpdate$','symbol','_sessionService','userId','/add','error','rxjs','location','HTTPService','@univerjs/thread-comment','10350414MhHzHE','thread-comment-data-source.config','replies','@univerjs-pro/collaboration-client','setConfig','@univerjs/core','1gcoOSM','payload','OpenOrReOpen','length','reply','@univerjs/thread-comment-ui','post','https:','ThreadCommentModel','add','931GOaVzI','YYYY/MM/DD\x20HH:mm','UniverLicensePlugin','ref','://','Injector','collaborators','_threadCommentDataSource','getThread','993435ywjBhk','COMMENT','LifecycleStages','stringify','/delete','subscribe','disposeWithMe','listComments','unitId','_threadCommentMentionDataSource','users','Add','avatar','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','IConfigService','pluginName','_init','onStarting','user','protocol','getUser','unit','5355964LqWpBH','syncUpdateMutationToColla','subject','comments','searchParams','_threadCommentDataSourceService','replyId','defineProperty','Inject','values','Solved','/solved','47661570PGQlGI','3082124tItkIw','42SdffWU','getMentions','Plugin','https','UNIVER_UNKNOWN','/list','getOwnPropertyDescriptor','map','threadId','UserManagerService','CommentService','UniverThreadCommentDataSourcePlugin','resolveComment','body','personId','_userService','getCurrentUser','_injector','size','1301847uuhiSo','pipe','type','/universer-api/comment/unit/','getMemberID','parse','rangeType','addUser','createTimestamp','name','Delete','Ready','_commentService'];_0x2c92=function(){return _0x43da5b;};return _0x2c92();}(function(_0x5469db,_0x5af784){const _0x4247e0=_0x47f8,_0x2a379f=_0x5469db();while(!![]){try{const _0x2f5e12=parseInt(_0x4247e0(0x1b0))/0x1*(-parseInt(_0x4247e0(0x1e6))/0x2)+-parseInt(_0x4247e0(0x1fa))/0x3+-parseInt(_0x4247e0(0x1d9))/0x4+parseInt(_0x4247e0(0x1c3))/0x5*(parseInt(_0x4247e0(0x1e7))/0x6)+parseInt(_0x4247e0(0x1ba))/0x7*(-parseInt(_0x4247e0(0x193))/0x8)+-parseInt(_0x4247e0(0x1aa))/0x9+parseInt(_0x4247e0(0x1e5))/0xa;if(_0x2f5e12===_0x5af784)break;else _0x2a379f['push'](_0x2a379f['shift']());}catch(_0x2c65df){_0x2a379f['push'](_0x2a379f['shift']());}}}(_0x2c92,0xcd4d8));Object[_0x50539d(0x1e0)](exports,Symbol[_0x50539d(0x20c)],{'value':'Module'});const c=require(_0x50539d(0x1af)),g=require(_0x50539d(0x1a9)),N=require(_0x50539d(0x1b5)),y=require(_0x50539d(0x1ad)),E=require('@univerjs-pro/license'),q=require(_0x50539d(0x1a6)),O=require('@univerjs/network'),$=require(_0x50539d(0x195)),x=_0x50539d(0x1d0);var p=(_0xddacba=>(_0xddacba[_0xddacba[_0x50539d(0x1b2)]=0x0]=_0x50539d(0x1b2),_0xddacba[_0xddacba['Solved']=0x1]=_0x50539d(0x1e3),_0xddacba[_0xddacba[_0x50539d(0x18e)]=-0x1]=_0x50539d(0x18e),_0xddacba))(p||{}),v=(_0x3d547a=>(_0x3d547a[_0x3d547a['Unknown']=0x0]=_0x50539d(0x20e),_0x3d547a[_0x3d547a[_0x50539d(0x1ce)]=0x1]=_0x50539d(0x1ce),_0x3d547a[_0x3d547a['Reply']=0x2]='Reply',_0x3d547a[_0x3d547a[_0x50539d(0x196)]=0x3]=_0x50539d(0x196),_0x3d547a[_0x3d547a[_0x50539d(0x204)]=0x4]=_0x50539d(0x204),_0x3d547a[_0x3d547a['Solve']=0x5]='Solve',_0x3d547a[_0x3d547a[_0x50539d(0x18e)]=-0x1]=_0x50539d(0x18e),_0x3d547a))(v||{});const P=_0x10c5fe=>$(new Date(+_0x10c5fe))['format'](_0x50539d(0x1bb)),L=async(_0x396c58,_0x5632db)=>{const _0x1a5b78=_0x50539d,_0x4faadb=_0x396c58['get'](c[_0x1a5b78(0x1f0)]),_0x4b8e9a=_0x396c58[_0x1a5b78(0x19c)](O[_0x1a5b78(0x1a8)]);_0x5632db['forEach'](_0x1f9900=>{const _0x20fbb2=_0x1a5b78;_0x4faadb[_0x20fbb2(0x1d7)](_0x1f9900)&&_0x5632db['delete'](_0x1f9900);}),_0x5632db[_0x1a5b78(0x1f9)]&&(await _0x4b8e9a[_0x1a5b78(0x19c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5632db]}}))[_0x1a5b78(0x1f4)][_0x1a5b78(0x1cd)][_0x1a5b78(0x207)](_0x557a45=>{const _0x5e9937=_0x1a5b78;_0x557a45&&_0x4faadb[_0x5e9937(0x201)](_0x557a45);});};var Y=Object[_0x50539d(0x1e0)],G=Object[_0x50539d(0x1ed)],H=(_0x4a77fa,_0x2ee927,_0x44001b,_0x54b175)=>{for(var _0x2f14fb=_0x54b175>0x1?void 0x0:_0x54b175?G(_0x2ee927,_0x44001b):_0x2ee927,_0xa2c84=_0x4a77fa['length']-0x1,_0x234b83;_0xa2c84>=0x0;_0xa2c84--)(_0x234b83=_0x4a77fa[_0xa2c84])&&(_0x2f14fb=(_0x54b175?_0x234b83(_0x2ee927,_0x44001b,_0x2f14fb):_0x234b83(_0x2f14fb))||_0x2f14fb);return _0x54b175&&_0x2f14fb&&Y(_0x2ee927,_0x44001b,_0x2f14fb),_0x2f14fb;},I=(_0x396fe0,_0x2b8a56)=>(_0x4d8296,_0x2e59f0)=>_0x2b8a56(_0x4d8296,_0x2e59f0,_0x396fe0);let f=class extends c['Disposable']{constructor(_0x9c29fb,_0xb6be02,_0x512584,_0x57b66a){const _0x52465d=_0x50539d;super(),this['_commentService']=_0x9c29fb,this['_threadCommentModel']=_0xb6be02,this[_0x52465d(0x1f6)]=_0x512584,this['_injector']=_0x57b66a,this[_0x52465d(0x1d3)](),this['_initUserSync']();}['_initUserSync'](){const _0x54a158=_0x50539d;this[_0x54a158(0x1c9)](this[_0x54a158(0x19a)]['commentUpdate$'][_0x54a158(0x1fb)](q['bufferTime'](0x10))[_0x54a158(0x1c8)](_0x251459=>{const _0x276441=_0x54a158,_0x5351a1=new Set();_0x251459[_0x276441(0x207)](_0x2310c0=>{const _0x4b9ca9=_0x276441;switch(_0x2310c0[_0x4b9ca9(0x1fc)]){case _0x4b9ca9(0x1b9):{const _0x15451f=_0x2310c0[_0x4b9ca9(0x1b1)][_0x4b9ca9(0x1f5)];_0x5351a1['add'](_0x15451f);break;}}}),L(this['_injector'],_0x5351a1);}));}[_0x50539d(0x1d3)](){const _0x40c78f=_0x50539d;this[_0x40c78f(0x1c9)](this[_0x40c78f(0x206)][_0x40c78f(0x1a0)][_0x40c78f(0x1c8)](async _0x7b2f89=>{const _0x31176e=_0x40c78f;var _0xa46c48,_0x22b4c3;const _0x18fb11=this['_threadCommentModel'][_0x31176e(0x1c2)](_0x7b2f89[_0x31176e(0x1cb)],_0x7b2f89[_0x31176e(0x1ef)]);if(!_0x18fb11)return;const {unitId:_0x352e85,subUnitId:_0x325527}=_0x18fb11;switch(_0x7b2f89['user']&&this['_userService']['addUser'](_0x7b2f89[_0x31176e(0x1d5)]),_0x7b2f89[_0x31176e(0x1fc)]){case v[_0x31176e(0x1ce)]:break;case v[_0x31176e(0x197)]:{this[_0x31176e(0x19a)][_0x31176e(0x19d)](_0x352e85,_0x325527,{'unitId':_0x352e85,'subUnitId':_0x325527,'ref':'','id':_0x7b2f89[_0x31176e(0x1df)],'dT':P(+_0x7b2f89[_0x31176e(0x202)]),'threadId':_0x7b2f89['threadId'],'personId':(_0x22b4c3=(_0xa46c48=_0x7b2f89[_0x31176e(0x1d5)])==null?void 0x0:_0xa46c48[_0x31176e(0x199)])!=null?_0x22b4c3:_0x7b2f89[_0x31176e(0x1a3)],'text':JSON[_0x31176e(0x1ff)](_0x7b2f89[_0x31176e(0x191)]),'parentId':_0x18fb11['id']});break;}case v[_0x31176e(0x204)]:{const _0x49705f=this[_0x31176e(0x19a)][_0x31176e(0x20f)](_0x352e85,_0x325527,_0x7b2f89[_0x31176e(0x1df)]);_0x49705f&&_0x49705f['parentId']&&this[_0x31176e(0x19a)]['deleteComment'](_0x352e85,_0x325527,_0x7b2f89[_0x31176e(0x1df)]);break;}case v[_0x31176e(0x196)]:{this[_0x31176e(0x19a)]['updateComment'](_0x352e85,_0x325527,{'commentId':_0x7b2f89[_0x31176e(0x1df)],'text':JSON[_0x31176e(0x1ff)](_0x7b2f89[_0x31176e(0x191)])});break;}case v['Solve']:{const _0x3b778f=this[_0x31176e(0x19a)][_0x31176e(0x1c2)](_0x352e85,_0x7b2f89[_0x31176e(0x1ef)]);_0x3b778f&&this['_threadCommentModel'][_0x31176e(0x1f3)](_0x352e85,_0x325527,_0x3b778f['id'],_0x7b2f89['solved']===p['Solved']);break;}}}));}};f=H([c['OnLifecycle'](c[_0x50539d(0x1c5)][_0x50539d(0x205)],f),I(0x0,c[_0x50539d(0x1e1)](y[_0x50539d(0x1f1)])),I(0x1,c[_0x50539d(0x1e1)](g[_0x50539d(0x1b8)])),I(0x2,c[_0x50539d(0x1e1)](c['UserManagerService'])),I(0x3,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)]))],f);const A=_0x50539d(0x1ab),J={};var F=Object[_0x50539d(0x1e0)],Z=Object['getOwnPropertyDescriptor'],W=(_0x261eaa,_0x522eb5,_0x29a6cb,_0x3dc950)=>{for(var _0x2e8657=_0x3dc950>0x1?void 0x0:_0x3dc950?Z(_0x522eb5,_0x29a6cb):_0x522eb5,_0x3a81ee=_0x261eaa['length']-0x1,_0x28ca64;_0x3a81ee>=0x0;_0x3a81ee--)(_0x28ca64=_0x261eaa[_0x3a81ee])&&(_0x2e8657=(_0x3dc950?_0x28ca64(_0x522eb5,_0x29a6cb,_0x2e8657):_0x28ca64(_0x2e8657))||_0x2e8657);return _0x3dc950&&_0x2e8657&&F(_0x522eb5,_0x29a6cb,_0x2e8657),_0x2e8657;},S=(_0x38385e,_0x42354d)=>(_0x4df3bd,_0x2d7ebb)=>_0x42354d(_0x4df3bd,_0x2d7ebb,_0x38385e);function z(_0x5730af,_0x46c4d9){const _0x1d3949=_0x50539d,_0x50c3e7=_0x5730af[_0x1d3949(0x1ac)][0x0];return{..._0x46c4d9,'id':_0x50c3e7['replyId'],'resolved':_0x5730af['solved']===0x1,'dT':P(_0x50c3e7['createTimestamp']),'personId':_0x50c3e7['userId'],'threadId':_0x50c3e7[_0x1d3949(0x1ef)]};}function B(_0xda7ef4,_0x2f6b3b,_0x1ece20){const _0x2f4f14=_0x50539d;var _0x57d68a,_0x21b7a2;if(((_0x21b7a2=(_0x57d68a=_0xda7ef4==null?void 0x0:_0xda7ef4[_0x2f4f14(0x1ac)])==null?void 0x0:_0x57d68a[_0x2f4f14(0x1b3)])!=null?_0x21b7a2:0x0)>0x0){const _0x3628ee=(_0x4c1083,_0x566e42)=>({'id':_0x4c1083[_0x2f4f14(0x1df)],'threadId':_0x4c1083[_0x2f4f14(0x1ef)],'dT':P(_0x4c1083[_0x2f4f14(0x202)]),'personId':_0x4c1083[_0x2f4f14(0x1a3)],'resolved':_0xda7ef4['solved']===p[_0x2f4f14(0x1e3)],'unitId':_0x2f6b3b,'subUnitId':_0x1ece20,'text':JSON[_0x2f4f14(0x1ff)](_0x4c1083['content']),'parentId':_0x566e42}),_0x29175f=_0x3628ee(_0xda7ef4[_0x2f4f14(0x1ac)][0x0]);return{..._0x29175f,'children':_0xda7ef4[_0x2f4f14(0x1ac)][_0x2f4f14(0x19f)](0x1)[_0x2f4f14(0x1ee)](_0x1ea9e1=>_0x3628ee(_0x1ea9e1,_0x29175f['id']))};}return null;}let C=class{constructor(_0x5741c4,_0x5e1535,_0x17eaa3,_0x875db1){const _0x3ae825=_0x50539d;this[_0x3ae825(0x194)]=_0x5741c4,this['_userService']=_0x5e1535,this[_0x3ae825(0x1a2)]=_0x17eaa3,this[_0x3ae825(0x1f8)]=_0x875db1;}async[_0x50539d(0x19d)](_0x5e60df){const _0x40b6bf=_0x50539d;var _0x397b57,_0x18683f;const {parentId:_0x549fea,unitId:_0x2f312a,text:_0x231fd9,threadId:_0x1452a8}=_0x5e60df,_0x54bee9=(_0x18683f=(_0x397b57=_0x231fd9[_0x40b6bf(0x209)])==null?void 0x0:_0x397b57[_0x40b6bf(0x198)](_0x109bdb=>_0x109bdb[_0x40b6bf(0x200)]===c['CustomRangeType'][_0x40b6bf(0x1c4)])[_0x40b6bf(0x1ee)](_0x2a09be=>_0x2a09be['rangeId']))!=null?_0x18683f:[],_0x56559a=JSON[_0x40b6bf(0x1c6)](_0x231fd9),_0x3a05a0=(await this[_0x40b6bf(0x1a2)]['requireSession'](_0x2f312a))[_0x40b6bf(0x1fe)]();if(_0x549fea){const _0x4e88ac={'memberId':_0x3a05a0,'unitId':_0x2f312a,'content':_0x56559a,'mention':_0x54bee9,'threadId':_0x1452a8},_0x3ab7cd=(await this['_httpService'][_0x40b6bf(0x1b6)](_0x40b6bf(0x1fd)+_0x2f312a+_0x40b6bf(0x19e),{'body':_0x4e88ac}))[_0x40b6bf(0x1f4)][_0x40b6bf(0x1b4)];return{..._0x5e60df,'id':_0x3ab7cd[_0x40b6bf(0x1df)],'dT':$(+_0x3ab7cd[_0x40b6bf(0x202)])['format'](_0x40b6bf(0x1bb)),'personId':_0x3ab7cd[_0x40b6bf(0x1a3)]};}else{const _0x1d2e9a={'memberId':_0x3a05a0,'unitId':_0x2f312a,'content':_0x56559a,'mention':_0x54bee9},_0x58181a=await this[_0x40b6bf(0x194)][_0x40b6bf(0x1b6)](_0x40b6bf(0x1fd)+_0x2f312a+_0x40b6bf(0x1a4),{'body':_0x1d2e9a});return z(_0x58181a[_0x40b6bf(0x1f4)][_0x40b6bf(0x211)],_0x5e60df);}}async['updateComment'](_0x2ece23){const _0x4187d6=_0x50539d;var _0x576574,_0xc40e2f;const {text:_0x2d7671,unitId:_0x43386b}=_0x2ece23,_0x2cbdd1=(_0xc40e2f=(_0x576574=_0x2d7671[_0x4187d6(0x209)])==null?void 0x0:_0x576574[_0x4187d6(0x198)](_0x15c18a=>_0x15c18a[_0x4187d6(0x200)]===c['CustomRangeType'][_0x4187d6(0x1c4)])[_0x4187d6(0x1ee)](_0x4e28dd=>_0x4e28dd['rangeId']))!=null?_0xc40e2f:[],_0x6d2748=JSON[_0x4187d6(0x1c6)](_0x2d7671),_0x2fd12b=_0x2ece23[_0x4187d6(0x1ef)],_0x48cfec=_0x2ece23['id'],_0x3c033e={'memberId':(await this[_0x4187d6(0x1a2)][_0x4187d6(0x18b)](_0x43386b))[_0x4187d6(0x1fe)](),'unitId':_0x43386b,'threadId':_0x2fd12b,'mention':_0x2cbdd1,'content':_0x6d2748,'replyId':_0x48cfec},_0x242833=await this['_httpService'][_0x4187d6(0x1b6)]('/universer-api/comment/unit/'+_0x43386b+_0x4187d6(0x192),{'body':_0x3c033e});return!_0x242833[_0x4187d6(0x1f4)][_0x4187d6(0x1a5)]||_0x242833[_0x4187d6(0x1f4)]['error'][_0x4187d6(0x20a)]===0x1;}async['resolveComment'](_0x2911fb){const _0x48d8cb=_0x50539d,{unitId:_0x248253}=_0x2911fb,_0x488e76=_0x2911fb['threadId'],_0x440178={'memberId':this[_0x48d8cb(0x1f6)][_0x48d8cb(0x1f7)]()[_0x48d8cb(0x199)],'unitId':_0x248253,'threadId':_0x488e76,'solved':_0x2911fb[_0x48d8cb(0x214)]?p[_0x48d8cb(0x1e3)]:p[_0x48d8cb(0x1b2)]},_0x450f02=await this[_0x48d8cb(0x194)]['post']('/universer-api/comment/unit/'+_0x248253+_0x48d8cb(0x1e4),{'body':_0x440178});return!_0x450f02[_0x48d8cb(0x1f4)][_0x48d8cb(0x1a5)]||_0x450f02[_0x48d8cb(0x1f4)]['error'][_0x48d8cb(0x20a)]===0x1;}async['deleteComment'](_0x1d78da,_0x59dabe,_0x334034,_0x2e8edb){const _0x53fb44=_0x50539d,_0x418813={'memberId':(await this['_sessionService'][_0x53fb44(0x18b)](_0x1d78da))[_0x53fb44(0x1fe)](),'threadId':_0x334034,'replyId':_0x2e8edb,'unitId':_0x1d78da},_0xa91db1=await this[_0x53fb44(0x194)][_0x53fb44(0x1b6)](_0x53fb44(0x1fd)+_0x1d78da+_0x53fb44(0x1c7),{'body':_0x418813});return!_0xa91db1[_0x53fb44(0x1f4)][_0x53fb44(0x1a5)]||_0xa91db1[_0x53fb44(0x1f4)][_0x53fb44(0x1a5)]['code']===0x1;}async[_0x50539d(0x1ca)](_0x3a7723,_0x40a73d,_0x1a74e0){const _0x22c576=_0x50539d,_0x37a7f6={'unitId':_0x3a7723,'threadId':_0x1a74e0},_0x45ee08=await this[_0x22c576(0x194)][_0x22c576(0x1b6)](_0x22c576(0x1fd)+_0x3a7723+_0x22c576(0x1ec),{'body':_0x37a7f6}),_0x14a23f=_0x1a74e0[_0x22c576(0x1ee)](_0x35b90a=>B(_0x45ee08[_0x22c576(0x1f4)][_0x22c576(0x1dc)][_0x35b90a],_0x3a7723,_0x40a73d))[_0x22c576(0x198)](Boolean);return Object[_0x22c576(0x1e2)](_0x45ee08[_0x22c576(0x1f4)][_0x22c576(0x1cd)])[_0x22c576(0x207)](_0x8a6395=>{const _0x1a74cc=_0x22c576;this[_0x1a74cc(0x1f6)][_0x1a74cc(0x201)](_0x8a6395);}),_0x14a23f;}['saveCommentToSnapshot'](_0x275549){const _0x778b67=_0x50539d;return{'id':_0x275549['id'],'threadId':_0x275549[_0x778b67(0x1ef)],'ref':_0x275549[_0x778b67(0x1bd)]};}};C=W([S(0x0,c['Inject'](O['HTTPService'])),S(0x1,c[_0x50539d(0x1e1)](c[_0x50539d(0x1f0)])),S(0x2,c[_0x50539d(0x1e1)](y['CollaborationSessionService'])),S(0x3,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)]))],C);var K=Object[_0x50539d(0x1e0)],V=Object[_0x50539d(0x1ed)],Q=(_0x24ed0c,_0x2bef9c,_0xd0096d,_0x3775b8)=>{const _0x4bfc37=_0x50539d;for(var _0x44d061=_0x3775b8>0x1?void 0x0:_0x3775b8?V(_0x2bef9c,_0xd0096d):_0x2bef9c,_0x4c7eb4=_0x24ed0c[_0x4bfc37(0x1b3)]-0x1,_0x2bf7ac;_0x4c7eb4>=0x0;_0x4c7eb4--)(_0x2bf7ac=_0x24ed0c[_0x4c7eb4])&&(_0x44d061=(_0x3775b8?_0x2bf7ac(_0x2bef9c,_0xd0096d,_0x44d061):_0x2bf7ac(_0x44d061))||_0x44d061);return _0x3775b8&&_0x44d061&&K(_0x2bef9c,_0xd0096d,_0x44d061),_0x44d061;},X=(_0x4b2a6b,_0x318f90)=>(_0x1f2765,_0x307439)=>_0x318f90(_0x1f2765,_0x307439,_0x4b2a6b);let D=class{constructor(_0x452304){const _0x27e141=_0x50539d;this[_0x27e141(0x194)]=_0x452304;}async[_0x50539d(0x1e8)](_0x32f909,_0x276f77,_0x47f7ce){const _0x1733b1=_0x50539d,_0x173f4a=new URL(window[_0x1733b1(0x1a7)]['href'])[_0x1733b1(0x1dd)]['get'](_0x1733b1(0x1d8));if(!_0x173f4a)return[];const _0x30c7aa=window[_0x1733b1(0x1a7)][_0x1733b1(0x210)],_0x2a6b16=window[_0x1733b1(0x1a7)][_0x1733b1(0x1d6)]===_0x1733b1(0x1b7)?_0x1733b1(0x1ea):'http';return(await this['_httpService'][_0x1733b1(0x19c)](_0x2a6b16+_0x1733b1(0x1be)+_0x30c7aa+_0x1733b1(0x212),{'params':{'objectID':_0x173f4a,'unitID':_0x173f4a}}))[_0x1733b1(0x1f4)][_0x1733b1(0x1c0)][_0x1733b1(0x1ee)](_0x8040e3=>{const _0x2e3f56=_0x1733b1;var _0x2162dc,_0x187f20,_0x1115e4,_0x445f82,_0x37a883,_0x33f784;return{'id':(_0x187f20=(_0x2162dc=_0x8040e3['subject'])==null?void 0x0:_0x2162dc[_0x2e3f56(0x199)])!=null?_0x187f20:'','label':(_0x445f82=(_0x1115e4=_0x8040e3[_0x2e3f56(0x1db)])==null?void 0x0:_0x1115e4[_0x2e3f56(0x203)])!=null?_0x445f82:'','icon':(_0x33f784=(_0x37a883=_0x8040e3[_0x2e3f56(0x1db)])==null?void 0x0:_0x37a883[_0x2e3f56(0x1cf)])!=null?_0x33f784:'','type':_0x2e3f56(0x1d5)};});}};D=Q([X(0x0,c[_0x50539d(0x1e1)](O[_0x50539d(0x1a8)]))],D);function _0x47f8(_0xc3419f,_0x58b90f){const _0x2c928d=_0x2c92();return _0x47f8=function(_0x47f81e,_0x4ad1ff){_0x47f81e=_0x47f81e-0x18b;let _0x350252=_0x2c928d[_0x47f81e];return _0x350252;},_0x47f8(_0xc3419f,_0x58b90f);}var k=Object[_0x50539d(0x1e0)],ee=Object[_0x50539d(0x1ed)],re=(_0x29f910,_0x2efe31,_0x40f44e,_0x5d2d66)=>{for(var _0x30f7c5=_0x5d2d66>0x1?void 0x0:_0x5d2d66?ee(_0x2efe31,_0x40f44e):_0x2efe31,_0x48f4e5=_0x29f910['length']-0x1,_0x270917;_0x48f4e5>=0x0;_0x48f4e5--)(_0x270917=_0x29f910[_0x48f4e5])&&(_0x30f7c5=(_0x5d2d66?_0x270917(_0x2efe31,_0x40f44e,_0x30f7c5):_0x270917(_0x30f7c5))||_0x30f7c5);return _0x5d2d66&&_0x30f7c5&&k(_0x2efe31,_0x40f44e,_0x30f7c5),_0x30f7c5;},_=(_0x467f81,_0x27b600)=>(_0x35a478,_0x356cc7)=>_0x27b600(_0x35a478,_0x356cc7,_0x467f81);let b=class extends c['Disposable']{constructor(_0xfdb7c,_0xbd4dda,_0x4068be,_0x207c01){const _0x47f4b6=_0x50539d;super(),this[_0x47f4b6(0x1de)]=_0xfdb7c,this[_0x47f4b6(0x1c1)]=_0xbd4dda,this[_0x47f4b6(0x20b)]=_0x4068be,this['_threadCommentMentionDataSource']=_0x207c01,this[_0x47f4b6(0x18c)]();}['_initDataSource'](){const _0x435208=_0x50539d;this[_0x435208(0x1de)][_0x435208(0x20d)]=this[_0x435208(0x1c1)],this[_0x435208(0x1de)][_0x435208(0x1da)]=!0x1,this['_threadCommentMentionDataService'][_0x435208(0x20d)]=this[_0x435208(0x1cc)];}};b=re([c[_0x50539d(0x208)](c[_0x50539d(0x1c5)]['Starting'],b),_(0x0,g[_0x50539d(0x213)]),_(0x1,c[_0x50539d(0x1e1)](C)),_(0x2,N['IThreadCommentMentionDataService']),_(0x3,c[_0x50539d(0x1e1)](D))],b);var U=Object[_0x50539d(0x1e0)],te=Object[_0x50539d(0x1ed)],se=(_0x3e584b,_0x539b19,_0x1bb44f)=>_0x539b19 in _0x3e584b?U(_0x3e584b,_0x539b19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bb44f}):_0x3e584b[_0x539b19]=_0x1bb44f,ne=(_0x56fc1f,_0x3fabac,_0x54e778,_0xf3fa54)=>{const _0x11eebc=_0x50539d;for(var _0x43fa5c=_0xf3fa54>0x1?void 0x0:_0xf3fa54?te(_0x3fabac,_0x54e778):_0x3fabac,_0x1b4d9f=_0x56fc1f[_0x11eebc(0x1b3)]-0x1,_0x202dd5;_0x1b4d9f>=0x0;_0x1b4d9f--)(_0x202dd5=_0x56fc1f[_0x1b4d9f])&&(_0x43fa5c=(_0xf3fa54?_0x202dd5(_0x3fabac,_0x54e778,_0x43fa5c):_0x202dd5(_0x43fa5c))||_0x43fa5c);return _0xf3fa54&&_0x43fa5c&&U(_0x3fabac,_0x54e778,_0x43fa5c),_0x43fa5c;},T=(_0x130afc,_0x1e773d)=>(_0x4ba982,_0x30e026)=>_0x1e773d(_0x4ba982,_0x30e026,_0x130afc),R=(_0x15dc9e,_0xc6a1b5,_0x47ee61)=>se(_0x15dc9e,typeof _0xc6a1b5!=_0x50539d(0x1a1)?_0xc6a1b5+'':_0xc6a1b5,_0x47ee61);exports[_0x50539d(0x1f2)]=class extends c[_0x50539d(0x1e9)]{constructor(_0x175a8e=J,_0x312077,_0x1569f7){const _0x33f209=_0x50539d;super(),this[_0x33f209(0x215)]=_0x175a8e,this[_0x33f209(0x1f8)]=_0x312077,this[_0x33f209(0x18f)]=_0x1569f7;const {..._0x32696c}=this[_0x33f209(0x215)];this[_0x33f209(0x18f)][_0x33f209(0x1ae)](A,_0x32696c);}[_0x50539d(0x1d4)](){const _0x41327e=_0x50539d;[[D],[C],[b],[f]][_0x41327e(0x207)](_0x371431=>{const _0x360dad=_0x41327e;this[_0x360dad(0x1f8)][_0x360dad(0x1b9)](_0x371431);});}},R(exports[_0x50539d(0x1f2)],_0x50539d(0x1d2),x),R(exports[_0x50539d(0x1f2)],_0x50539d(0x1fc),c[_0x50539d(0x18d)][_0x50539d(0x1eb)]),exports[_0x50539d(0x1f2)]=ne([c['DependentOn'](g[_0x50539d(0x19b)],N[_0x50539d(0x190)],y['UniverCollaborationClientPlugin'],E[_0x50539d(0x1bc)]),T(0x1,c[_0x50539d(0x1e1)](c[_0x50539d(0x1bf)])),T(0x2,c[_0x50539d(0x1d1)])],exports[_0x50539d(0x1f2)]);
|
|
1
|
+
'use strict';const _0x4fddd5=_0x574f;(function(_0x145856,_0x3b1e74){const _0x1259f4=_0x574f,_0x3839f1=_0x145856();while(!![]){try{const _0x45b51f=parseInt(_0x1259f4(0xfe))/0x1+-parseInt(_0x1259f4(0xfb))/0x2*(parseInt(_0x1259f4(0x11b))/0x3)+parseInt(_0x1259f4(0x140))/0x4+parseInt(_0x1259f4(0xf9))/0x5*(-parseInt(_0x1259f4(0xd2))/0x6)+-parseInt(_0x1259f4(0x11a))/0x7*(parseInt(_0x1259f4(0x10e))/0x8)+-parseInt(_0x1259f4(0x115))/0x9+-parseInt(_0x1259f4(0xb7))/0xa*(-parseInt(_0x1259f4(0x118))/0xb);if(_0x45b51f===_0x3b1e74)break;else _0x3839f1['push'](_0x3839f1['shift']());}catch(_0x2d1dba){_0x3839f1['push'](_0x3839f1['shift']());}}}(_0x272e,0xd7689));Object[_0x4fddd5(0x134)](exports,Symbol[_0x4fddd5(0xc7)],{'value':_0x4fddd5(0x10c)});const c=require(_0x4fddd5(0x106)),g=require('@univerjs/thread-comment'),N=require(_0x4fddd5(0xc6)),O=require('@univerjs-pro/collaboration-client'),E=require('@univerjs-pro/license'),q=require(_0x4fddd5(0x127)),P=require(_0x4fddd5(0xf8)),$=require('dayjs'),x=_0x4fddd5(0x107);var p=(_0x302052=>(_0x302052[_0x302052['OpenOrReOpen']=0x0]=_0x4fddd5(0xf5),_0x302052[_0x302052['Solved']=0x1]=_0x4fddd5(0x10f),_0x302052[_0x302052[_0x4fddd5(0x133)]=-0x1]='UNRECOGNIZED',_0x302052))(p||{}),v=(_0x92eae9=>(_0x92eae9[_0x92eae9[_0x4fddd5(0x123)]=0x0]=_0x4fddd5(0x123),_0x92eae9[_0x92eae9['Add']=0x1]='Add',_0x92eae9[_0x92eae9['Reply']=0x2]=_0x4fddd5(0xbd),_0x92eae9[_0x92eae9[_0x4fddd5(0x105)]=0x3]=_0x4fddd5(0x105),_0x92eae9[_0x92eae9[_0x4fddd5(0x11f)]=0x4]=_0x4fddd5(0x11f),_0x92eae9[_0x92eae9[_0x4fddd5(0xf2)]=0x5]=_0x4fddd5(0xf2),_0x92eae9[_0x92eae9[_0x4fddd5(0x133)]=-0x1]='UNRECOGNIZED',_0x92eae9))(v||{});const y=_0x441e2d=>$(new Date(+_0x441e2d))[_0x4fddd5(0xce)]('YYYY/MM/DD\x20HH:mm'),Y=async(_0xde5bf3,_0x36719b)=>{const _0x36a656=_0x4fddd5,_0x4e3987=_0xde5bf3[_0x36a656(0x108)](c['UserManagerService']),_0x5a6c73=_0xde5bf3[_0x36a656(0x108)](P[_0x36a656(0xe6)]);_0x36719b['forEach'](_0xf6ef74=>{const _0x44ca6c=_0x36a656;_0x4e3987['getUser'](_0xf6ef74)&&_0x36719b[_0x44ca6c(0x120)](_0xf6ef74);}),_0x36719b[_0x36a656(0xeb)]&&(await _0x5a6c73[_0x36a656(0x108)]('/universer-api/user/list',{'params':{'userIDs':[..._0x36719b]}}))[_0x36a656(0x132)]['users'][_0x36a656(0x122)](_0x213241=>{const _0x32c3ea=_0x36a656;_0x213241&&_0x4e3987[_0x32c3ea(0xc1)](_0x213241);});};var G=Object['defineProperty'],H=Object[_0x4fddd5(0x121)],A=(_0x292b89,_0x59768e,_0x39a0e5,_0x175fb8)=>{const _0x506cc3=_0x4fddd5;for(var _0x239baf=_0x175fb8>0x1?void 0x0:_0x175fb8?H(_0x59768e,_0x39a0e5):_0x59768e,_0x19ba4a=_0x292b89[_0x506cc3(0x126)]-0x1,_0x498cd9;_0x19ba4a>=0x0;_0x19ba4a--)(_0x498cd9=_0x292b89[_0x19ba4a])&&(_0x239baf=(_0x175fb8?_0x498cd9(_0x59768e,_0x39a0e5,_0x239baf):_0x498cd9(_0x239baf))||_0x239baf);return _0x175fb8&&_0x239baf&&G(_0x59768e,_0x39a0e5,_0x239baf),_0x239baf;},I=(_0x5c3568,_0x196f1f)=>(_0x33ac0d,_0x4fd975)=>_0x196f1f(_0x33ac0d,_0x4fd975,_0x5c3568);let f=class extends c['Disposable']{constructor(_0x39d8f9,_0x9573ec,_0x40b82d,_0x1b4781){const _0x464041=_0x4fddd5;super(),this[_0x464041(0xe5)]=_0x39d8f9,this['_threadCommentModel']=_0x9573ec,this[_0x464041(0xf0)]=_0x40b82d,this[_0x464041(0xea)]=_0x1b4781,this['_init'](),this[_0x464041(0xf4)]();}[_0x4fddd5(0xf4)](){const _0x90be7a=_0x4fddd5;this[_0x90be7a(0x125)](this[_0x90be7a(0x13d)][_0x90be7a(0x135)][_0x90be7a(0xb1)](q[_0x90be7a(0xfd)](0x10))[_0x90be7a(0xbb)](_0x59a213=>{const _0x686197=_0x90be7a,_0x13ecf5=new Set();_0x59a213[_0x686197(0x122)](_0x383ec7=>{const _0x462fbe=_0x686197;switch(_0x383ec7[_0x462fbe(0xb5)]){case _0x462fbe(0x101):{const _0x61d96=_0x383ec7[_0x462fbe(0xe1)][_0x462fbe(0x137)];_0x13ecf5[_0x462fbe(0x101)](_0x61d96);break;}}}),Y(this[_0x686197(0xea)],_0x13ecf5);}));}[_0x4fddd5(0x12d)](){const _0x242e9b=_0x4fddd5;this[_0x242e9b(0x125)](this[_0x242e9b(0xe5)]['commentUpdate$'][_0x242e9b(0xbb)](async _0x514193=>{const _0x9bdd63=_0x242e9b;var _0x15c23c,_0x3f0012;const _0x492693=this[_0x9bdd63(0x13d)]['getThread'](_0x514193[_0x9bdd63(0x113)],_0x514193[_0x9bdd63(0x141)]);if(!_0x492693)return;const {unitId:_0x414666,subUnitId:_0x26b07d}=_0x492693;switch(_0x514193[_0x9bdd63(0xe2)]&&this['_userService'][_0x9bdd63(0xc1)](_0x514193[_0x9bdd63(0xe2)]),_0x514193['type']){case v[_0x9bdd63(0xbe)]:break;case v[_0x9bdd63(0xbd)]:{this[_0x9bdd63(0x13d)][_0x9bdd63(0xb9)](_0x414666,_0x26b07d,{'unitId':_0x414666,'subUnitId':_0x26b07d,'ref':'','id':_0x514193[_0x9bdd63(0x12e)],'dT':y(+_0x514193[_0x9bdd63(0xc2)]),'threadId':_0x514193[_0x9bdd63(0x141)],'personId':(_0x3f0012=(_0x15c23c=_0x514193['user'])==null?void 0x0:_0x15c23c[_0x9bdd63(0xe4)])!=null?_0x3f0012:_0x514193[_0x9bdd63(0x131)],'text':JSON[_0x9bdd63(0xdd)](_0x514193[_0x9bdd63(0x114)]),'parentId':_0x492693['id']});break;}case v[_0x9bdd63(0x11f)]:{const _0x1aeb13=this['_threadCommentModel']['getComment'](_0x414666,_0x26b07d,_0x514193[_0x9bdd63(0x12e)]);_0x1aeb13&&_0x1aeb13[_0x9bdd63(0x109)]&&this['_threadCommentModel'][_0x9bdd63(0x10b)](_0x414666,_0x26b07d,_0x514193[_0x9bdd63(0x12e)]);break;}case v[_0x9bdd63(0x105)]:{this['_threadCommentModel'][_0x9bdd63(0xc8)](_0x414666,_0x26b07d,{'commentId':_0x514193['replyId'],'text':JSON['parse'](_0x514193[_0x9bdd63(0x114)])});break;}case v[_0x9bdd63(0xf2)]:{const _0x1d0f56=this['_threadCommentModel'][_0x9bdd63(0x13c)](_0x414666,_0x514193[_0x9bdd63(0x141)]);_0x1d0f56&&this[_0x9bdd63(0x13d)][_0x9bdd63(0xd7)](_0x414666,_0x26b07d,_0x1d0f56['id'],_0x514193[_0x9bdd63(0xdc)]===p[_0x9bdd63(0x10f)]);break;}}}));}};f=A([I(0x0,c[_0x4fddd5(0xd6)](O[_0x4fddd5(0x12f)])),I(0x1,c['Inject'](g[_0x4fddd5(0x12b)])),I(0x2,c['Inject'](c['UserManagerService'])),I(0x3,c[_0x4fddd5(0xd6)](c['Injector']))],f);const J=_0x4fddd5(0xec),L={};var F=Object[_0x4fddd5(0x134)],Z=Object[_0x4fddd5(0x121)],W=(_0x2611f2,_0x321d88,_0x337cee,_0x5cbe39)=>{const _0x7b2a0d=_0x4fddd5;for(var _0x232df8=_0x5cbe39>0x1?void 0x0:_0x5cbe39?Z(_0x321d88,_0x337cee):_0x321d88,_0x354a31=_0x2611f2[_0x7b2a0d(0x126)]-0x1,_0x16737d;_0x354a31>=0x0;_0x354a31--)(_0x16737d=_0x2611f2[_0x354a31])&&(_0x232df8=(_0x5cbe39?_0x16737d(_0x321d88,_0x337cee,_0x232df8):_0x16737d(_0x232df8))||_0x232df8);return _0x5cbe39&&_0x232df8&&F(_0x321d88,_0x337cee,_0x232df8),_0x232df8;},_=(_0x7220d5,_0x56491a)=>(_0x42830d,_0x5efac8)=>_0x56491a(_0x42830d,_0x5efac8,_0x7220d5);function z(_0x1fb473,_0x1da663){const _0x98c9b4=_0x4fddd5,_0x1a17c1=_0x1fb473[_0x98c9b4(0x11c)][0x0];return{..._0x1da663,'id':_0x1a17c1[_0x98c9b4(0x12e)],'resolved':_0x1fb473[_0x98c9b4(0xdc)]===0x1,'dT':y(_0x1a17c1[_0x98c9b4(0xc2)]),'personId':_0x1a17c1['userId'],'threadId':_0x1a17c1['threadId']};}function B(_0x3128e7,_0x244a1a,_0x15d6d9){const _0x4183d3=_0x4fddd5;var _0x1e1182,_0x1f6db5;if(((_0x1f6db5=(_0x1e1182=_0x3128e7==null?void 0x0:_0x3128e7[_0x4183d3(0x11c)])==null?void 0x0:_0x1e1182[_0x4183d3(0x126)])!=null?_0x1f6db5:0x0)>0x0){const _0x37a34b=(_0x4cda78,_0x1844a5)=>({'id':_0x4cda78[_0x4183d3(0x12e)],'threadId':_0x4cda78[_0x4183d3(0x141)],'dT':y(_0x4cda78[_0x4183d3(0xc2)]),'personId':_0x4cda78[_0x4183d3(0x131)],'resolved':_0x3128e7['solved']===p[_0x4183d3(0x10f)],'unitId':_0x244a1a,'subUnitId':_0x15d6d9,'text':JSON[_0x4183d3(0xdd)](_0x4cda78[_0x4183d3(0x114)]),'parentId':_0x1844a5}),_0x188807=_0x37a34b(_0x3128e7[_0x4183d3(0x11c)][0x0]);return{..._0x188807,'children':_0x3128e7[_0x4183d3(0x11c)][_0x4183d3(0xf7)](0x1)[_0x4183d3(0xdf)](_0x138d53=>_0x37a34b(_0x138d53,_0x188807['id']))};}return null;}let b=class{constructor(_0x4b36da,_0x36805c,_0x3b8c87,_0x304095){const _0x47bd47=_0x4fddd5;this[_0x47bd47(0x111)]=_0x4b36da,this['_userService']=_0x36805c,this[_0x47bd47(0x130)]=_0x3b8c87,this[_0x47bd47(0xea)]=_0x304095;}async['addComment'](_0x213c36){const _0x3dcc3e=_0x4fddd5;var _0x28154f,_0x417378;const {parentId:_0x2e3796,unitId:_0x2f3914,text:_0x1e0eb7,threadId:_0x3e7894}=_0x213c36,_0x586070=(_0x417378=(_0x28154f=_0x1e0eb7[_0x3dcc3e(0xf1)])==null?void 0x0:_0x28154f[_0x3dcc3e(0x103)](_0x42a4b6=>_0x42a4b6[_0x3dcc3e(0xd1)]===c[_0x3dcc3e(0x139)][_0x3dcc3e(0xf6)])[_0x3dcc3e(0xdf)](_0x5943ab=>_0x5943ab[_0x3dcc3e(0xbc)]))!=null?_0x417378:[],_0xbef1b0=JSON[_0x3dcc3e(0xda)](_0x1e0eb7),_0x14452f=(await this['_sessionService']['requireSession'](_0x2f3914))[_0x3dcc3e(0x100)]();if(_0x2e3796){const _0x3f3ea2={'memberId':_0x14452f,'unitId':_0x2f3914,'content':_0xbef1b0,'mention':_0x586070,'threadId':_0x3e7894},_0x4eb08b=(await this[_0x3dcc3e(0x111)][_0x3dcc3e(0x13a)](_0x3dcc3e(0x142)+_0x2f3914+_0x3dcc3e(0x138),{'body':_0x3f3ea2}))[_0x3dcc3e(0x132)][_0x3dcc3e(0xcd)];return{..._0x213c36,'id':_0x4eb08b[_0x3dcc3e(0x12e)],'dT':$(+_0x4eb08b[_0x3dcc3e(0xc2)])[_0x3dcc3e(0xce)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4eb08b['userId']};}else{const _0x5eaf29={'memberId':_0x14452f,'unitId':_0x2f3914,'content':_0xbef1b0,'mention':_0x586070},_0x12ba77=await this[_0x3dcc3e(0x111)][_0x3dcc3e(0x13a)](_0x3dcc3e(0x142)+_0x2f3914+'/add',{'body':_0x5eaf29});return z(_0x12ba77[_0x3dcc3e(0x132)][_0x3dcc3e(0x11d)],_0x213c36);}}async[_0x4fddd5(0xc8)](_0x430b2d){const _0x2aed7e=_0x4fddd5;var _0x427ac3,_0x3b3c0c;const {text:_0x39ff85,unitId:_0x5559d8}=_0x430b2d,_0x25bf05=(_0x3b3c0c=(_0x427ac3=_0x39ff85[_0x2aed7e(0xf1)])==null?void 0x0:_0x427ac3[_0x2aed7e(0x103)](_0x3e4c55=>_0x3e4c55[_0x2aed7e(0xd1)]===c[_0x2aed7e(0x139)]['COMMENT'])[_0x2aed7e(0xdf)](_0x28ec93=>_0x28ec93[_0x2aed7e(0xbc)]))!=null?_0x3b3c0c:[],_0x153865=JSON[_0x2aed7e(0xda)](_0x39ff85),_0x363a03=_0x430b2d[_0x2aed7e(0x141)],_0x353b6c=_0x430b2d['id'],_0x2ef501={'memberId':(await this['_sessionService']['requireSession'](_0x5559d8))[_0x2aed7e(0x100)](),'unitId':_0x5559d8,'threadId':_0x363a03,'mention':_0x25bf05,'content':_0x153865,'replyId':_0x353b6c},_0x1e65ec=await this[_0x2aed7e(0x111)]['post']('/universer-api/comment/unit/'+_0x5559d8+_0x2aed7e(0xc9),{'body':_0x2ef501});return!_0x1e65ec[_0x2aed7e(0x132)][_0x2aed7e(0x128)]||_0x1e65ec['body'][_0x2aed7e(0x128)][_0x2aed7e(0x12a)]===0x1;}async[_0x4fddd5(0xd7)](_0x20d0c5){const _0x58f763=_0x4fddd5,{unitId:_0x5253dc}=_0x20d0c5,_0x32db79=_0x20d0c5[_0x58f763(0x141)],_0x268190={'memberId':this[_0x58f763(0xf0)][_0x58f763(0x13f)]()['userID'],'unitId':_0x5253dc,'threadId':_0x32db79,'solved':_0x20d0c5['resolved']?p[_0x58f763(0x10f)]:p[_0x58f763(0xf5)]},_0x7131ef=await this[_0x58f763(0x111)][_0x58f763(0x13a)](_0x58f763(0x142)+_0x5253dc+'/solved',{'body':_0x268190});return!_0x7131ef[_0x58f763(0x132)]['error']||_0x7131ef['body'][_0x58f763(0x128)]['code']===0x1;}async[_0x4fddd5(0x10b)](_0x3d202b,_0x450dad,_0x37def2,_0x3a8197){const _0x11e699=_0x4fddd5,_0x1a60b2={'memberId':(await this[_0x11e699(0x130)][_0x11e699(0xc5)](_0x3d202b))['getMemberID'](),'threadId':_0x37def2,'replyId':_0x3a8197,'unitId':_0x3d202b},_0x4c36a0=await this[_0x11e699(0x111)][_0x11e699(0x13a)]('/universer-api/comment/unit/'+_0x3d202b+_0x11e699(0xe7),{'body':_0x1a60b2});return!_0x4c36a0['body'][_0x11e699(0x128)]||_0x4c36a0[_0x11e699(0x132)][_0x11e699(0x128)][_0x11e699(0x12a)]===0x1;}async[_0x4fddd5(0xb4)](_0x23e23b,_0x15f06a,_0x49d2a3){const _0x4c26f7=_0x4fddd5,_0x2685e9={'unitId':_0x23e23b,'threadId':_0x49d2a3},_0x1524f5=await this['_httpService']['post'](_0x4c26f7(0x142)+_0x23e23b+_0x4c26f7(0xca),{'body':_0x2685e9}),_0x12db09=_0x49d2a3['map'](_0xbaab4a=>B(_0x1524f5[_0x4c26f7(0x132)][_0x4c26f7(0xc0)][_0xbaab4a],_0x23e23b,_0x15f06a))[_0x4c26f7(0x103)](Boolean);return Object[_0x4c26f7(0xcb)](_0x1524f5[_0x4c26f7(0x132)][_0x4c26f7(0xd8)])[_0x4c26f7(0x122)](_0x57c482=>{const _0x648786=_0x4c26f7;this[_0x648786(0xf0)][_0x648786(0xc1)](_0x57c482);}),_0x12db09;}[_0x4fddd5(0x10d)](_0x9258da){const _0x4a97e3=_0x4fddd5;return{'id':_0x9258da['id'],'threadId':_0x9258da['threadId'],'ref':_0x9258da[_0x4a97e3(0xba)]};}};b=W([_(0x0,c[_0x4fddd5(0xd6)](P[_0x4fddd5(0xe6)])),_(0x1,c[_0x4fddd5(0xd6)](c['UserManagerService'])),_(0x2,c[_0x4fddd5(0xd6)](O[_0x4fddd5(0xb3)])),_(0x3,c[_0x4fddd5(0xd6)](c[_0x4fddd5(0xff)]))],b);var K=Object[_0x4fddd5(0x134)],V=Object['getOwnPropertyDescriptor'],Q=(_0x1715a0,_0x173194,_0x4ecf85,_0x155703)=>{const _0x386210=_0x4fddd5;for(var _0x2b7be5=_0x155703>0x1?void 0x0:_0x155703?V(_0x173194,_0x4ecf85):_0x173194,_0x40dffd=_0x1715a0[_0x386210(0x126)]-0x1,_0x24ab87;_0x40dffd>=0x0;_0x40dffd--)(_0x24ab87=_0x1715a0[_0x40dffd])&&(_0x2b7be5=(_0x155703?_0x24ab87(_0x173194,_0x4ecf85,_0x2b7be5):_0x24ab87(_0x2b7be5))||_0x2b7be5);return _0x155703&&_0x2b7be5&&K(_0x173194,_0x4ecf85,_0x2b7be5),_0x2b7be5;},X=(_0x340fb3,_0x495a3b)=>(_0x20eb3c,_0xee6906)=>_0x495a3b(_0x20eb3c,_0xee6906,_0x340fb3);let C=class{constructor(_0x3415f8){const _0x417abf=_0x4fddd5;this[_0x417abf(0x111)]=_0x3415f8;}async[_0x4fddd5(0xd4)](_0x3e6abf,_0x4a18e0,_0x233f65){const _0x411acf=_0x4fddd5,_0x4e46f8=new URL(window[_0x411acf(0x110)][_0x411acf(0x112)])[_0x411acf(0xed)][_0x411acf(0x108)]('unit');if(!_0x4e46f8)return[];const _0x341238=window[_0x411acf(0x110)][_0x411acf(0xcf)],_0x468342=window[_0x411acf(0x110)][_0x411acf(0x102)]===_0x411acf(0xe9)?_0x411acf(0x13e):_0x411acf(0xee);return(await this[_0x411acf(0x111)][_0x411acf(0x108)](_0x468342+_0x411acf(0x13b)+_0x341238+_0x411acf(0xe0),{'params':{'objectID':_0x4e46f8,'unitID':_0x4e46f8}}))['body'][_0x411acf(0xde)][_0x411acf(0xdf)](_0x1780d0=>{const _0x39b40e=_0x411acf;var _0x5c1472,_0x3ce691,_0x45e282,_0x17ed7b,_0x1a9d70,_0x4f2793;return{'id':(_0x3ce691=(_0x5c1472=_0x1780d0[_0x39b40e(0xf3)])==null?void 0x0:_0x5c1472['userID'])!=null?_0x3ce691:'','label':(_0x17ed7b=(_0x45e282=_0x1780d0[_0x39b40e(0xf3)])==null?void 0x0:_0x45e282[_0x39b40e(0x136)])!=null?_0x17ed7b:'','icon':(_0x4f2793=(_0x1a9d70=_0x1780d0[_0x39b40e(0xf3)])==null?void 0x0:_0x1a9d70[_0x39b40e(0xd3)])!=null?_0x4f2793:'','type':'user'};});}};C=Q([X(0x0,c['Inject'](P[_0x4fddd5(0xe6)]))],C);var k=Object[_0x4fddd5(0x134)],ee=Object[_0x4fddd5(0x121)],re=(_0x1f5921,_0xc214ac,_0x820245,_0x1cea17)=>{const _0x5c94a9=_0x4fddd5;for(var _0x32f459=_0x1cea17>0x1?void 0x0:_0x1cea17?ee(_0xc214ac,_0x820245):_0xc214ac,_0x3b19ba=_0x1f5921[_0x5c94a9(0x126)]-0x1,_0x446f1d;_0x3b19ba>=0x0;_0x3b19ba--)(_0x446f1d=_0x1f5921[_0x3b19ba])&&(_0x32f459=(_0x1cea17?_0x446f1d(_0xc214ac,_0x820245,_0x32f459):_0x446f1d(_0x32f459))||_0x32f459);return _0x1cea17&&_0x32f459&&k(_0xc214ac,_0x820245,_0x32f459),_0x32f459;},S=(_0x3a649d,_0x6c8e25)=>(_0x46d672,_0x2fd3fa)=>_0x6c8e25(_0x46d672,_0x2fd3fa,_0x3a649d);function _0x272e(){const _0x422294=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','parentId','UNIVER_UNKNOWN','deleteComment','Module','saveCommentToSnapshot','6232WgptVg','Solved','location','_httpService','href','unitId','content','10600101nXuaZI','_threadCommentDataSourceService','Plugin','209957nzeraT','UniverLicensePlugin','3962wLbHnH','427944dWKHmh','replies','comment','onReady','Delete','delete','getOwnPropertyDescriptor','forEach','Unknown','UniverInstanceType','disposeWithMe','length','rxjs','error','syncUpdateMutationToColla','code','ThreadCommentModel','_configService','_init','replyId','CommentService','_sessionService','userId','body','UNRECOGNIZED','defineProperty','commentUpdate$','name','personId','/reply','CustomRangeType','post','://','getThread','_threadCommentModel','https','getCurrentUser','738312XvJfTY','threadId','/universer-api/comment/unit/','pipe','IThreadCommentDataSourceService','CollaborationSessionService','listComments','type','_threadCommentMentionDataService','1060xwYLJS','IConfigService','addComment','ref','subscribe','rangeId','Reply','Add','UniverThreadCommentDataSourcePlugin','comments','addUser','createTimestamp','DependentOn','pluginName','requireSession','@univerjs/thread-comment-ui','toStringTag','updateComment','/edit','/list','values','_initDataSource','reply','format','host','setConfig','rangeType','90nhFlFA','avatar','getMentions','IThreadCommentMentionDataService','Inject','resolveComment','users','UniverThreadCommentUIPlugin','stringify','_threadCommentDataSource','solved','parse','collaborators','map','/universer-api/authz/collaborator','payload','user','UniverCollaborationClientPlugin','userID','_commentService','HTTPService','/delete','dataSource','https:','_injector','size','thread-comment-data-source.config','searchParams','http','Disposable','_userService','customRanges','Solve','subject','_initUserSync','OpenOrReOpen','COMMENT','slice','@univerjs/network','268900zZzsrt','UniverThreadCommentPlugin','8sRchGj','onStarting','bufferTime','1670508VuNGhN','Injector','getMemberID','add','protocol','filter','_config','Edit','@univerjs/core'];_0x272e=function(){return _0x422294;};return _0x272e();}let D=class extends c[_0x4fddd5(0xef)]{constructor(_0x4d04c8,_0x2d584a,_0x4272e8,_0xe1df49){const _0x1d7a63=_0x4fddd5;super(),this[_0x1d7a63(0x116)]=_0x4d04c8,this[_0x1d7a63(0xdb)]=_0x2d584a,this[_0x1d7a63(0xb6)]=_0x4272e8,this['_threadCommentMentionDataSource']=_0xe1df49,this[_0x1d7a63(0xcc)]();}[_0x4fddd5(0xcc)](){const _0x42bb2b=_0x4fddd5;this['_threadCommentDataSourceService']['dataSource']=this[_0x42bb2b(0xdb)],this[_0x42bb2b(0x116)][_0x42bb2b(0x129)]=!0x1,this[_0x42bb2b(0xb6)][_0x42bb2b(0xe8)]=this['_threadCommentMentionDataSource'];}};D=re([S(0x0,g[_0x4fddd5(0xb2)]),S(0x1,c[_0x4fddd5(0xd6)](b)),S(0x2,N[_0x4fddd5(0xd5)]),S(0x3,c[_0x4fddd5(0xd6)](C))],D);var U=Object['defineProperty'],te=Object[_0x4fddd5(0x121)],se=(_0x1cf49b,_0x275f6f,_0x427d06)=>_0x275f6f in _0x1cf49b?U(_0x1cf49b,_0x275f6f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x427d06}):_0x1cf49b[_0x275f6f]=_0x427d06,ne=(_0x4f9a83,_0x52ac65,_0x1703ef,_0x5988da)=>{for(var _0x143b8c=_0x5988da>0x1?void 0x0:_0x5988da?te(_0x52ac65,_0x1703ef):_0x52ac65,_0x318831=_0x4f9a83['length']-0x1,_0x2b7845;_0x318831>=0x0;_0x318831--)(_0x2b7845=_0x4f9a83[_0x318831])&&(_0x143b8c=(_0x5988da?_0x2b7845(_0x52ac65,_0x1703ef,_0x143b8c):_0x2b7845(_0x143b8c))||_0x143b8c);return _0x5988da&&_0x143b8c&&U(_0x52ac65,_0x1703ef,_0x143b8c),_0x143b8c;},T=(_0x51678a,_0x50e293)=>(_0x36c37b,_0x4938c3)=>_0x50e293(_0x36c37b,_0x4938c3,_0x51678a),R=(_0x1ecc48,_0x815cb4,_0x4fad89)=>se(_0x1ecc48,typeof _0x815cb4!='symbol'?_0x815cb4+'':_0x815cb4,_0x4fad89);function _0x574f(_0x4798cb,_0x3cde22){const _0x272e36=_0x272e();return _0x574f=function(_0x574ff7,_0x7b5218){_0x574ff7=_0x574ff7-0xb1;let _0x221769=_0x272e36[_0x574ff7];return _0x221769;},_0x574f(_0x4798cb,_0x3cde22);}exports[_0x4fddd5(0xbf)]=class extends c[_0x4fddd5(0x117)]{constructor(_0x3ebf98=L,_0x2b556e,_0x567069){const _0xd27f5=_0x4fddd5;super(),this[_0xd27f5(0x104)]=_0x3ebf98,this[_0xd27f5(0xea)]=_0x2b556e,this[_0xd27f5(0x12c)]=_0x567069;const {..._0x136552}=this['_config'];this[_0xd27f5(0x12c)][_0xd27f5(0xd0)](J,_0x136552);}[_0x4fddd5(0xfc)](){const _0x4c0eb0=_0x4fddd5;[[C],[b],[D],[f]]['forEach'](_0x31c1a4=>{const _0x18009b=_0x574f;this[_0x18009b(0xea)][_0x18009b(0x101)](_0x31c1a4);}),this[_0x4c0eb0(0xea)][_0x4c0eb0(0x108)](D);}[_0x4fddd5(0x11e)](){const _0x3c10e1=_0x4fddd5;this[_0x3c10e1(0xea)][_0x3c10e1(0x108)](f);}},R(exports[_0x4fddd5(0xbf)],_0x4fddd5(0xc4),x),R(exports[_0x4fddd5(0xbf)],_0x4fddd5(0xb5),c[_0x4fddd5(0x124)][_0x4fddd5(0x10a)]),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x4fddd5(0xc3)](g[_0x4fddd5(0xfa)],N[_0x4fddd5(0xd9)],O[_0x4fddd5(0xe3)],E[_0x4fddd5(0x119)]),T(0x1,c[_0x4fddd5(0xd6)](c[_0x4fddd5(0xff)])),T(0x2,c[_0x4fddd5(0xb8)])],exports[_0x4fddd5(0xbf)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xe2d821=_0x47bf;(function(_0x36fb22,_0x3eb2e3){const _0x2ccc19=_0x47bf,_0x2e3c35=_0x36fb22();while(!![]){try{const _0x5af6bc=-parseInt(_0x2ccc19(0x1d0))/0x1*(parseInt(_0x2ccc19(0x1f9))/0x2)+-parseInt(_0x2ccc19(0x1cd))/0x3*(parseInt(_0x2ccc19(0x216))/0x4)+parseInt(_0x2ccc19(0x1e7))/0x5*(parseInt(_0x2ccc19(0x220))/0x6)+-parseInt(_0x2ccc19(0x1eb))/0x7+parseInt(_0x2ccc19(0x221))/0x8*(parseInt(_0x2ccc19(0x21a))/0x9)+-parseInt(_0x2ccc19(0x211))/0xa+parseInt(_0x2ccc19(0x1fe))/0xb;if(_0x5af6bc===_0x3eb2e3)break;else _0x2e3c35['push'](_0x2e3c35['shift']());}catch(_0x6bcd26){_0x2e3c35['push'](_0x2e3c35['shift']());}}}(_0x4787,0x2c482));import{UserManagerService as _0x1398ac,OnLifecycle as _0xb139a8,LifecycleStages as _0x117143,Inject as _0x2d90da,Injector as _0x442235,Disposable as _0x43bd51,CustomRangeType as _0x42157a,UniverInstanceType as _0x341ef4,DependentOn as _0x5d261a,Plugin as _0x476fc3,IConfigService as _0xaa26c7}from'@univerjs/core';import{ThreadCommentModel as _0x325738,IThreadCommentDataSourceService as _0x581213,UniverThreadCommentPlugin as _0x1d0b94}from'@univerjs/thread-comment';function _0x47bf(_0x3d2ff1,_0x2d6e9e){const _0x47877a=_0x4787();return _0x47bf=function(_0x47bf46,_0x4712b5){_0x47bf46=_0x47bf46-0x1c6;let _0xa787dd=_0x47877a[_0x47bf46];return _0xa787dd;},_0x47bf(_0x3d2ff1,_0x2d6e9e);}import{IThreadCommentMentionDataService as _0xaf4732,UniverThreadCommentUIPlugin as _0x403add}from'@univerjs/thread-comment-ui';import{CommentService as _0x49a6d4,CollaborationSessionService as _0x112c6e,UniverCollaborationClientPlugin as _0x36fe94}from'@univerjs-pro/collaboration-client';function _0x4787(){const _0x5a7c40=['resolved','user','2967560wlozQa','_threadCommentMentionDataSource','_threadCommentDataSourceService','Unknown','href','565788MkjjBw','_initUserSync','_threadCommentMentionDataService','/list','733599saCRug','getMentions','userId','_threadCommentModel','addComment','setConfig','150QntuwU','24SmDpHO','avatar','collaborators','values','Edit','location','/add','_userService','/solved','replyId','subscribe','OpenOrReOpen','updateComment','getCurrentUser','_threadCommentDataSource','Starting','subject','Ready','body','https','personId','pluginName','syncUpdateMutationToColla','http','YYYY/MM/DD\x20HH:mm','Solve','format','createTimestamp','disposeWithMe','getMemberID','requireSession','add','_init','_sessionService','deleteComment','3ZFLuwW','forEach','rangeId','5992IGFkVo','stringify','code','length','filter','post','listComments','UNRECOGNIZED','users','commentUpdate$','/universer-api/authz/collaborator','getUser','_injector','/reply','content','saveCommentToSnapshot','Add','comment','thread-comment-data-source.config','COMMENT','resolveComment','_commentService','/universer-api/user/list','16115UxHfXh','Delete','reply','https:','2255645AkgPLq','searchParams','replies','map','addUser','customRanges','userID','_initDataSource','Reply','threadId','_httpService','rangeType','_configService','unitId','4IYWYSO','error','_config','solved','UNIVER_UNKNOWN','6915612RpIrvX','unit','://','getThread','defineProperty','size','get','symbol','type','parse','/universer-api/comment/unit/','parentId','protocol','comments','getOwnPropertyDescriptor','Solved','/delete'];_0x4787=function(){return _0x5a7c40;};return _0x4787();}import{UniverLicensePlugin as _0x3dedcc}from'@univerjs-pro/license';import{bufferTime as _0xbf8a55}from'rxjs';import{HTTPService as _0x5d5f1d}from'@univerjs/network';import _0x3f611e from'dayjs';const k='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var v=(_0x465002=>(_0x465002[_0x465002[_0xe2d821(0x22c)]=0x0]=_0xe2d821(0x22c),_0x465002[_0x465002[_0xe2d821(0x20d)]=0x1]=_0xe2d821(0x20d),_0x465002[_0x465002[_0xe2d821(0x1d7)]=-0x1]='UNRECOGNIZED',_0x465002))(v||{}),p=(_0x144086=>(_0x144086[_0x144086['Unknown']=0x0]=_0xe2d821(0x214),_0x144086[_0x144086['Add']=0x1]=_0xe2d821(0x1e0),_0x144086[_0x144086[_0xe2d821(0x1f3)]=0x2]='Reply',_0x144086[_0x144086[_0xe2d821(0x225)]=0x3]=_0xe2d821(0x225),_0x144086[_0x144086[_0xe2d821(0x1e8)]=0x4]='Delete',_0x144086[_0x144086[_0xe2d821(0x23a)]=0x5]=_0xe2d821(0x23a),_0x144086[_0x144086[_0xe2d821(0x1d7)]=-0x1]=_0xe2d821(0x1d7),_0x144086))(p||{});const w=_0x4ef3f2=>_0x3f611e(new Date(+_0x4ef3f2))['format'](_0xe2d821(0x239)),ee=async(_0x59866d,_0x234fd4)=>{const _0x483c32=_0xe2d821,_0x2cad2b=_0x59866d[_0x483c32(0x204)](_0x1398ac),_0x447a00=_0x59866d[_0x483c32(0x204)](_0x5d5f1d);_0x234fd4[_0x483c32(0x1ce)](_0xb470fe=>{const _0x562aee=_0x483c32;_0x2cad2b[_0x562aee(0x1db)](_0xb470fe)&&_0x234fd4['delete'](_0xb470fe);}),_0x234fd4[_0x483c32(0x203)]&&(await _0x447a00[_0x483c32(0x204)](_0x483c32(0x1e6),{'params':{'userIDs':[..._0x234fd4]}}))['body'][_0x483c32(0x1d8)][_0x483c32(0x1ce)](_0x3a2af8=>{const _0x4ca3fc=_0x483c32;_0x3a2af8&&_0x2cad2b[_0x4ca3fc(0x1ef)](_0x3a2af8);});};var re=Object[_0xe2d821(0x202)],te=Object[_0xe2d821(0x20c)],se=(_0x43e9a5,_0x143b40,_0x22374e,_0x1740bd)=>{const _0x37a4df=_0xe2d821;for(var _0x227450=_0x1740bd>0x1?void 0x0:_0x1740bd?te(_0x143b40,_0x22374e):_0x143b40,_0x3733b4=_0x43e9a5[_0x37a4df(0x1d3)]-0x1,_0x45414c;_0x3733b4>=0x0;_0x3733b4--)(_0x45414c=_0x43e9a5[_0x3733b4])&&(_0x227450=(_0x1740bd?_0x45414c(_0x143b40,_0x22374e,_0x227450):_0x45414c(_0x227450))||_0x227450);return _0x1740bd&&_0x227450&&re(_0x143b40,_0x22374e,_0x227450),_0x227450;},_=(_0x2a20fc,_0x3fc782)=>(_0x192b2c,_0x56faad)=>_0x3fc782(_0x192b2c,_0x56faad,_0x2a20fc);let S=class extends _0x43bd51{constructor(_0x2b2042,_0x411052,_0x108d82,_0x4c459e){const _0x4fbd85=_0xe2d821;super(),this[_0x4fbd85(0x1e5)]=_0x2b2042,this[_0x4fbd85(0x21d)]=_0x411052,this['_userService']=_0x108d82,this[_0x4fbd85(0x1dc)]=_0x4c459e,this['_init'](),this[_0x4fbd85(0x217)]();}[_0xe2d821(0x217)](){const _0x38172b=_0xe2d821;this[_0x38172b(0x1c6)](this['_threadCommentModel']['commentUpdate$']['pipe'](_0xbf8a55(0x10))[_0x38172b(0x22b)](_0x375a8b=>{const _0x17f782=_0x38172b,_0x3ec57d=new Set();_0x375a8b[_0x17f782(0x1ce)](_0x42edc=>{const _0x672d07=_0x17f782;switch(_0x42edc[_0x672d07(0x206)]){case _0x672d07(0x1c9):{const _0x1315e9=_0x42edc['payload'][_0x672d07(0x235)];_0x3ec57d[_0x672d07(0x1c9)](_0x1315e9);break;}}}),ee(this[_0x17f782(0x1dc)],_0x3ec57d);}));}[_0xe2d821(0x1ca)](){const _0x2a9101=_0xe2d821;this[_0x2a9101(0x1c6)](this[_0x2a9101(0x1e5)][_0x2a9101(0x1d9)][_0x2a9101(0x22b)](async _0x4e9e0b=>{const _0x2a86d9=_0x2a9101;var _0x133e23,_0x4882e4;const _0x102695=this[_0x2a86d9(0x21d)][_0x2a86d9(0x201)](_0x4e9e0b[_0x2a86d9(0x1f8)],_0x4e9e0b[_0x2a86d9(0x1f4)]);if(!_0x102695)return;const {unitId:_0x4933a2,subUnitId:_0x2f615b}=_0x102695;switch(_0x4e9e0b[_0x2a86d9(0x210)]&&this[_0x2a86d9(0x228)][_0x2a86d9(0x1ef)](_0x4e9e0b['user']),_0x4e9e0b[_0x2a86d9(0x206)]){case p['Add']:break;case p[_0x2a86d9(0x1f3)]:{this['_threadCommentModel']['addComment'](_0x4933a2,_0x2f615b,{'unitId':_0x4933a2,'subUnitId':_0x2f615b,'ref':'','id':_0x4e9e0b[_0x2a86d9(0x22a)],'dT':w(+_0x4e9e0b[_0x2a86d9(0x23c)]),'threadId':_0x4e9e0b[_0x2a86d9(0x1f4)],'personId':(_0x4882e4=(_0x133e23=_0x4e9e0b[_0x2a86d9(0x210)])==null?void 0x0:_0x133e23[_0x2a86d9(0x1f1)])!=null?_0x4882e4:_0x4e9e0b[_0x2a86d9(0x21c)],'text':JSON['parse'](_0x4e9e0b[_0x2a86d9(0x1de)]),'parentId':_0x102695['id']});break;}case p[_0x2a86d9(0x1e8)]:{const _0x35f8f8=this[_0x2a86d9(0x21d)]['getComment'](_0x4933a2,_0x2f615b,_0x4e9e0b[_0x2a86d9(0x22a)]);_0x35f8f8&&_0x35f8f8[_0x2a86d9(0x209)]&&this[_0x2a86d9(0x21d)][_0x2a86d9(0x1cc)](_0x4933a2,_0x2f615b,_0x4e9e0b['replyId']);break;}case p[_0x2a86d9(0x225)]:{this[_0x2a86d9(0x21d)][_0x2a86d9(0x22d)](_0x4933a2,_0x2f615b,{'commentId':_0x4e9e0b['replyId'],'text':JSON['parse'](_0x4e9e0b['content'])});break;}case p[_0x2a86d9(0x23a)]:{const _0x232dc3=this[_0x2a86d9(0x21d)]['getThread'](_0x4933a2,_0x4e9e0b[_0x2a86d9(0x1f4)]);_0x232dc3&&this[_0x2a86d9(0x21d)][_0x2a86d9(0x1e4)](_0x4933a2,_0x2f615b,_0x232dc3['id'],_0x4e9e0b['solved']===v[_0x2a86d9(0x20d)]);break;}}}));}};S=se([_0xb139a8(_0x117143[_0xe2d821(0x232)],S),_(0x0,_0x2d90da(_0x49a6d4)),_(0x1,_0x2d90da(_0x325738)),_(0x2,_0x2d90da(_0x1398ac)),_(0x3,_0x2d90da(_0x442235))],S);const oe=_0xe2d821(0x1e2),ne={};var ie=Object[_0xe2d821(0x202)],ae=Object[_0xe2d821(0x20c)],ce=(_0xd1ee0a,_0x27d2ce,_0x2611f4,_0x5db2d5)=>{for(var _0x4a12d6=_0x5db2d5>0x1?void 0x0:_0x5db2d5?ae(_0x27d2ce,_0x2611f4):_0x27d2ce,_0x518224=_0xd1ee0a['length']-0x1,_0x54c2e1;_0x518224>=0x0;_0x518224--)(_0x54c2e1=_0xd1ee0a[_0x518224])&&(_0x4a12d6=(_0x5db2d5?_0x54c2e1(_0x27d2ce,_0x2611f4,_0x4a12d6):_0x54c2e1(_0x4a12d6))||_0x4a12d6);return _0x5db2d5&&_0x4a12d6&&ie(_0x27d2ce,_0x2611f4,_0x4a12d6),_0x4a12d6;},f=(_0x1dd823,_0x82c9dc)=>(_0x246586,_0x152f31)=>_0x82c9dc(_0x246586,_0x152f31,_0x1dd823);function de(_0x53f4d8,_0x17a138){const _0x503d44=_0xe2d821,_0x5a4e8b=_0x53f4d8[_0x503d44(0x1ed)][0x0];return{..._0x17a138,'id':_0x5a4e8b[_0x503d44(0x22a)],'resolved':_0x53f4d8['solved']===0x1,'dT':w(_0x5a4e8b[_0x503d44(0x23c)]),'personId':_0x5a4e8b[_0x503d44(0x21c)],'threadId':_0x5a4e8b[_0x503d44(0x1f4)]};}function me(_0x32f4b0,_0x354b8e,_0x331969){const _0x1f6216=_0xe2d821;var _0xc0ea01,_0x438dec;if(((_0x438dec=(_0xc0ea01=_0x32f4b0==null?void 0x0:_0x32f4b0[_0x1f6216(0x1ed)])==null?void 0x0:_0xc0ea01['length'])!=null?_0x438dec:0x0)>0x0){const _0x6158e7=(_0x5e0f99,_0x1423db)=>({'id':_0x5e0f99[_0x1f6216(0x22a)],'threadId':_0x5e0f99[_0x1f6216(0x1f4)],'dT':w(_0x5e0f99[_0x1f6216(0x23c)]),'personId':_0x5e0f99[_0x1f6216(0x21c)],'resolved':_0x32f4b0[_0x1f6216(0x1fc)]===v['Solved'],'unitId':_0x354b8e,'subUnitId':_0x331969,'text':JSON[_0x1f6216(0x207)](_0x5e0f99['content']),'parentId':_0x1423db}),_0x3821b4=_0x6158e7(_0x32f4b0[_0x1f6216(0x1ed)][0x0]);return{..._0x3821b4,'children':_0x32f4b0[_0x1f6216(0x1ed)]['slice'](0x1)[_0x1f6216(0x1ee)](_0x19bd1a=>_0x6158e7(_0x19bd1a,_0x3821b4['id']))};}return null;}let D=class{constructor(_0x954e61,_0x2149c1,_0x11e651,_0x1a8c25){const _0x7bcd6c=_0xe2d821;this[_0x7bcd6c(0x1f5)]=_0x954e61,this[_0x7bcd6c(0x228)]=_0x2149c1,this['_sessionService']=_0x11e651,this[_0x7bcd6c(0x1dc)]=_0x1a8c25;}async[_0xe2d821(0x21e)](_0x205a6f){const _0x383d77=_0xe2d821;var _0x370f6b,_0x24b8cb;const {parentId:_0x26e259,unitId:_0x12d956,text:_0x2d77dc,threadId:_0x330ceb}=_0x205a6f,_0x37e2be=(_0x24b8cb=(_0x370f6b=_0x2d77dc[_0x383d77(0x1f0)])==null?void 0x0:_0x370f6b[_0x383d77(0x1d4)](_0x2b3942=>_0x2b3942[_0x383d77(0x1f6)]===_0x42157a['COMMENT'])['map'](_0xb88ce9=>_0xb88ce9['rangeId']))!=null?_0x24b8cb:[],_0x3a45e6=JSON[_0x383d77(0x1d1)](_0x2d77dc),_0x5a00ab=(await this[_0x383d77(0x1cb)]['requireSession'](_0x12d956))[_0x383d77(0x1c7)]();if(_0x26e259){const _0x537642={'memberId':_0x5a00ab,'unitId':_0x12d956,'content':_0x3a45e6,'mention':_0x37e2be,'threadId':_0x330ceb},_0x2d97e6=(await this[_0x383d77(0x1f5)][_0x383d77(0x1d5)](_0x383d77(0x208)+_0x12d956+_0x383d77(0x1dd),{'body':_0x537642}))['body'][_0x383d77(0x1e9)];return{..._0x205a6f,'id':_0x2d97e6[_0x383d77(0x22a)],'dT':_0x3f611e(+_0x2d97e6[_0x383d77(0x23c)])[_0x383d77(0x23b)](_0x383d77(0x239)),'personId':_0x2d97e6[_0x383d77(0x21c)]};}else{const _0x5980e5={'memberId':_0x5a00ab,'unitId':_0x12d956,'content':_0x3a45e6,'mention':_0x37e2be},_0x3e8521=await this[_0x383d77(0x1f5)][_0x383d77(0x1d5)](_0x383d77(0x208)+_0x12d956+_0x383d77(0x227),{'body':_0x5980e5});return de(_0x3e8521[_0x383d77(0x233)][_0x383d77(0x1e1)],_0x205a6f);}}async['updateComment'](_0x2e0013){const _0x2cb7aa=_0xe2d821;var _0xa65634,_0x402789;const {text:_0x419ec2,unitId:_0x588705}=_0x2e0013,_0x204d2a=(_0x402789=(_0xa65634=_0x419ec2[_0x2cb7aa(0x1f0)])==null?void 0x0:_0xa65634[_0x2cb7aa(0x1d4)](_0x3438a8=>_0x3438a8['rangeType']===_0x42157a[_0x2cb7aa(0x1e3)])[_0x2cb7aa(0x1ee)](_0xacbc57=>_0xacbc57[_0x2cb7aa(0x1cf)]))!=null?_0x402789:[],_0x40daad=JSON[_0x2cb7aa(0x1d1)](_0x419ec2),_0x5de36f=_0x2e0013['threadId'],_0x23ef23=_0x2e0013['id'],_0x4cc1b2={'memberId':(await this['_sessionService'][_0x2cb7aa(0x1c8)](_0x588705))['getMemberID'](),'unitId':_0x588705,'threadId':_0x5de36f,'mention':_0x204d2a,'content':_0x40daad,'replyId':_0x23ef23},_0x152142=await this['_httpService'][_0x2cb7aa(0x1d5)](_0x2cb7aa(0x208)+_0x588705+'/edit',{'body':_0x4cc1b2});return!_0x152142['body'][_0x2cb7aa(0x1fa)]||_0x152142[_0x2cb7aa(0x233)][_0x2cb7aa(0x1fa)][_0x2cb7aa(0x1d2)]===0x1;}async[_0xe2d821(0x1e4)](_0x1f2b53){const _0x2cb29f=_0xe2d821,{unitId:_0xfb5da3}=_0x1f2b53,_0x57a6bf=_0x1f2b53[_0x2cb29f(0x1f4)],_0x4c47cb={'memberId':this[_0x2cb29f(0x228)][_0x2cb29f(0x22e)]()[_0x2cb29f(0x1f1)],'unitId':_0xfb5da3,'threadId':_0x57a6bf,'solved':_0x1f2b53[_0x2cb29f(0x20f)]?v['Solved']:v[_0x2cb29f(0x22c)]},_0x25e432=await this[_0x2cb29f(0x1f5)][_0x2cb29f(0x1d5)](_0x2cb29f(0x208)+_0xfb5da3+_0x2cb29f(0x229),{'body':_0x4c47cb});return!_0x25e432[_0x2cb29f(0x233)][_0x2cb29f(0x1fa)]||_0x25e432[_0x2cb29f(0x233)][_0x2cb29f(0x1fa)][_0x2cb29f(0x1d2)]===0x1;}async[_0xe2d821(0x1cc)](_0x24e441,_0x1360b3,_0x8767d4,_0x5e0e60){const _0x217c77=_0xe2d821,_0x31809b={'memberId':(await this[_0x217c77(0x1cb)]['requireSession'](_0x24e441))[_0x217c77(0x1c7)](),'threadId':_0x8767d4,'replyId':_0x5e0e60,'unitId':_0x24e441},_0x11ccfb=await this[_0x217c77(0x1f5)][_0x217c77(0x1d5)](_0x217c77(0x208)+_0x24e441+_0x217c77(0x20e),{'body':_0x31809b});return!_0x11ccfb[_0x217c77(0x233)][_0x217c77(0x1fa)]||_0x11ccfb['body']['error'][_0x217c77(0x1d2)]===0x1;}async[_0xe2d821(0x1d6)](_0x4a33d4,_0x3eedad,_0x29b67e){const _0x99202b=_0xe2d821,_0x3cddbf={'unitId':_0x4a33d4,'threadId':_0x29b67e},_0x54e030=await this[_0x99202b(0x1f5)][_0x99202b(0x1d5)](_0x99202b(0x208)+_0x4a33d4+_0x99202b(0x219),{'body':_0x3cddbf}),_0xe25644=_0x29b67e['map'](_0x140e45=>me(_0x54e030[_0x99202b(0x233)][_0x99202b(0x20b)][_0x140e45],_0x4a33d4,_0x3eedad))[_0x99202b(0x1d4)](Boolean);return Object[_0x99202b(0x224)](_0x54e030[_0x99202b(0x233)][_0x99202b(0x1d8)])['forEach'](_0x265408=>{const _0x4f59bc=_0x99202b;this[_0x4f59bc(0x228)][_0x4f59bc(0x1ef)](_0x265408);}),_0xe25644;}[_0xe2d821(0x1df)](_0x27ea67){const _0x48f42a=_0xe2d821;return{'id':_0x27ea67['id'],'threadId':_0x27ea67[_0x48f42a(0x1f4)],'ref':_0x27ea67['ref']};}};D=ce([f(0x0,_0x2d90da(_0x5d5f1d)),f(0x1,_0x2d90da(_0x1398ac)),f(0x2,_0x2d90da(_0x112c6e)),f(0x3,_0x2d90da(_0x442235))],D);var le=Object[_0xe2d821(0x202)],he=Object[_0xe2d821(0x20c)],ue=(_0x359e51,_0xfdeca1,_0x420911,_0x253204)=>{for(var _0x6ddbea=_0x253204>0x1?void 0x0:_0x253204?he(_0xfdeca1,_0x420911):_0xfdeca1,_0x8e7dc6=_0x359e51['length']-0x1,_0x5f2202;_0x8e7dc6>=0x0;_0x8e7dc6--)(_0x5f2202=_0x359e51[_0x8e7dc6])&&(_0x6ddbea=(_0x253204?_0x5f2202(_0xfdeca1,_0x420911,_0x6ddbea):_0x5f2202(_0x6ddbea))||_0x6ddbea);return _0x253204&&_0x6ddbea&&le(_0xfdeca1,_0x420911,_0x6ddbea),_0x6ddbea;},pe=(_0x421a0e,_0x52b954)=>(_0x1dbc2f,_0x266cdf)=>_0x52b954(_0x1dbc2f,_0x266cdf,_0x421a0e);let C=class{constructor(_0x2d1adf){const _0x4af55a=_0xe2d821;this[_0x4af55a(0x1f5)]=_0x2d1adf;}async[_0xe2d821(0x21b)](_0x24bf81,_0x128e7e,_0xbbf639){const _0x494c72=_0xe2d821,_0x3d7639=new URL(window[_0x494c72(0x226)][_0x494c72(0x215)])[_0x494c72(0x1ec)]['get'](_0x494c72(0x1ff));if(!_0x3d7639)return[];const _0x42c4e7=window['location']['host'],_0x4dcefc=window[_0x494c72(0x226)][_0x494c72(0x20a)]===_0x494c72(0x1ea)?_0x494c72(0x234):_0x494c72(0x238);return(await this[_0x494c72(0x1f5)]['get'](_0x4dcefc+_0x494c72(0x200)+_0x42c4e7+_0x494c72(0x1da),{'params':{'objectID':_0x3d7639,'unitID':_0x3d7639}}))['body'][_0x494c72(0x223)]['map'](_0x32c827=>{const _0x4e08a4=_0x494c72;var _0x3bdb92,_0x4ac0df,_0x30fb6d,_0x57f64b,_0x4ed56a,_0x3bf0db;return{'id':(_0x4ac0df=(_0x3bdb92=_0x32c827['subject'])==null?void 0x0:_0x3bdb92[_0x4e08a4(0x1f1)])!=null?_0x4ac0df:'','label':(_0x57f64b=(_0x30fb6d=_0x32c827[_0x4e08a4(0x231)])==null?void 0x0:_0x30fb6d['name'])!=null?_0x57f64b:'','icon':(_0x3bf0db=(_0x4ed56a=_0x32c827[_0x4e08a4(0x231)])==null?void 0x0:_0x4ed56a[_0x4e08a4(0x222)])!=null?_0x3bf0db:'','type':_0x4e08a4(0x210)};});}};C=ue([pe(0x0,_0x2d90da(_0x5d5f1d))],C);var ve=Object[_0xe2d821(0x202)],_e=Object['getOwnPropertyDescriptor'],fe=(_0x23f86f,_0x4614bf,_0x499f23,_0x2da4c2)=>{const _0xd38771=_0xe2d821;for(var _0x352a2a=_0x2da4c2>0x1?void 0x0:_0x2da4c2?_e(_0x4614bf,_0x499f23):_0x4614bf,_0x3acaa2=_0x23f86f[_0xd38771(0x1d3)]-0x1,_0x49dd88;_0x3acaa2>=0x0;_0x3acaa2--)(_0x49dd88=_0x23f86f[_0x3acaa2])&&(_0x352a2a=(_0x2da4c2?_0x49dd88(_0x4614bf,_0x499f23,_0x352a2a):_0x49dd88(_0x352a2a))||_0x352a2a);return _0x2da4c2&&_0x352a2a&&ve(_0x4614bf,_0x499f23,_0x352a2a),_0x352a2a;},I=(_0x10fb90,_0x1ef125)=>(_0x363704,_0x131786)=>_0x1ef125(_0x363704,_0x131786,_0x10fb90);let b=class extends _0x43bd51{constructor(_0x582823,_0x4fcdb8,_0x1d9f2d,_0x5cb4fb){const _0x1cfdf2=_0xe2d821;super(),this[_0x1cfdf2(0x213)]=_0x582823,this[_0x1cfdf2(0x22f)]=_0x4fcdb8,this[_0x1cfdf2(0x218)]=_0x1d9f2d,this[_0x1cfdf2(0x212)]=_0x5cb4fb,this['_initDataSource']();}[_0xe2d821(0x1f2)](){const _0x22d8a2=_0xe2d821;this[_0x22d8a2(0x213)]['dataSource']=this['_threadCommentDataSource'],this[_0x22d8a2(0x213)][_0x22d8a2(0x237)]=!0x1,this[_0x22d8a2(0x218)]['dataSource']=this[_0x22d8a2(0x212)];}};b=fe([_0xb139a8(_0x117143[_0xe2d821(0x230)],b),I(0x0,_0x581213),I(0x1,_0x2d90da(D)),I(0x2,_0xaf4732),I(0x3,_0x2d90da(C))],b);var Y=Object[_0xe2d821(0x202)],Ie=Object['getOwnPropertyDescriptor'],Se=(_0x5ea31d,_0x2932d9,_0x237cd1)=>_0x2932d9 in _0x5ea31d?Y(_0x5ea31d,_0x2932d9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x237cd1}):_0x5ea31d[_0x2932d9]=_0x237cd1,be=(_0x3a6cf2,_0x1a51df,_0x139c39,_0x3e9e48)=>{const _0x5b7e04=_0xe2d821;for(var _0x11647f=_0x3e9e48>0x1?void 0x0:_0x3e9e48?Ie(_0x1a51df,_0x139c39):_0x1a51df,_0xf8e7dc=_0x3a6cf2[_0x5b7e04(0x1d3)]-0x1,_0x29ac08;_0xf8e7dc>=0x0;_0xf8e7dc--)(_0x29ac08=_0x3a6cf2[_0xf8e7dc])&&(_0x11647f=(_0x3e9e48?_0x29ac08(_0x1a51df,_0x139c39,_0x11647f):_0x29ac08(_0x11647f))||_0x11647f);return _0x3e9e48&&_0x11647f&&Y(_0x1a51df,_0x139c39,_0x11647f),_0x11647f;},j=(_0x51ab07,_0x36c257)=>(_0x89857a,_0x51a2d7)=>_0x36c257(_0x89857a,_0x51a2d7,_0x51ab07),G=(_0x531c16,_0x3a4dfa,_0x47a9af)=>Se(_0x531c16,typeof _0x3a4dfa!=_0xe2d821(0x205)?_0x3a4dfa+'':_0x3a4dfa,_0x47a9af);let g=class extends _0x476fc3{constructor(_0xed6676=ne,_0x5a284a,_0x2ed4b5){const _0x4de551=_0xe2d821;super(),this[_0x4de551(0x1fb)]=_0xed6676,this['_injector']=_0x5a284a,this['_configService']=_0x2ed4b5;const {..._0x271fde}=this['_config'];this[_0x4de551(0x1f7)][_0x4de551(0x21f)](oe,_0x271fde);}['onStarting'](){const _0x4b8cfa=_0xe2d821;[[C],[D],[b],[S]][_0x4b8cfa(0x1ce)](_0x326bc4=>{const _0x377b21=_0x4b8cfa;this[_0x377b21(0x1dc)]['add'](_0x326bc4);});}};G(g,_0xe2d821(0x236),k),G(g,_0xe2d821(0x206),_0x341ef4[_0xe2d821(0x1fd)]),g=be([_0x5d261a(_0x1d0b94,_0x403add,_0x36fe94,_0x3dedcc),j(0x1,_0x2d90da(_0x442235)),j(0x2,_0xaa26c7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x13dde2=_0x1d97;(function(_0x3d6f81,_0x36f6f8){const _0x34c911=_0x1d97,_0xb15042=_0x3d6f81();while(!![]){try{const _0x2c891a=-parseInt(_0x34c911(0xe5))/0x1*(parseInt(_0x34c911(0xbe))/0x2)+parseInt(_0x34c911(0xb3))/0x3+parseInt(_0x34c911(0xca))/0x4*(-parseInt(_0x34c911(0xdc))/0x5)+parseInt(_0x34c911(0xb5))/0x6*(-parseInt(_0x34c911(0xef))/0x7)+parseInt(_0x34c911(0xd0))/0x8+-parseInt(_0x34c911(0x116))/0x9*(parseInt(_0x34c911(0x102))/0xa)+parseInt(_0x34c911(0x107))/0xb;if(_0x2c891a===_0x36f6f8)break;else _0xb15042['push'](_0xb15042['shift']());}catch(_0x6ae904){_0xb15042['push'](_0xb15042['shift']());}}}(_0x4a59,0x871a7));import{UserManagerService as _0xdaed2f,Inject as _0x221299,Injector as _0x53080a,Disposable as _0x156250,CustomRangeType as _0x44569b,UniverInstanceType as _0x1def83,DependentOn as _0x3526f9,Plugin as _0x21977a,IConfigService as _0x183af9}from'@univerjs/core';import{ThreadCommentModel as _0x2b52ee,IThreadCommentDataSourceService as _0x273f0a,UniverThreadCommentPlugin as _0x508da6}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x201138,UniverThreadCommentUIPlugin as _0x178703}from'@univerjs/thread-comment-ui';import{CommentService as _0x2ba92e,CollaborationSessionService as _0x42a2af,UniverCollaborationClientPlugin as _0x2775d9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x56200b}from'@univerjs-pro/license';import{bufferTime as _0x433b2b}from'rxjs';import{HTTPService as _0x8b1593}from'@univerjs/network';import _0x52a6f3 from'dayjs';const Q=_0x13dde2(0xd1);var v=(_0x7cf8bc=>(_0x7cf8bc[_0x7cf8bc[_0x13dde2(0xe4)]=0x0]=_0x13dde2(0xe4),_0x7cf8bc[_0x7cf8bc['Solved']=0x1]='Solved',_0x7cf8bc[_0x7cf8bc[_0x13dde2(0xc4)]=-0x1]=_0x13dde2(0xc4),_0x7cf8bc))(v||{}),p=(_0xeb738d=>(_0xeb738d[_0xeb738d[_0x13dde2(0x11b)]=0x0]='Unknown',_0xeb738d[_0xeb738d[_0x13dde2(0x10a)]=0x1]=_0x13dde2(0x10a),_0xeb738d[_0xeb738d['Reply']=0x2]=_0x13dde2(0x11a),_0xeb738d[_0xeb738d[_0x13dde2(0xe6)]=0x3]=_0x13dde2(0xe6),_0xeb738d[_0xeb738d[_0x13dde2(0xe8)]=0x4]=_0x13dde2(0xe8),_0xeb738d[_0xeb738d['Solve']=0x5]=_0x13dde2(0xb6),_0xeb738d[_0xeb738d[_0x13dde2(0xc4)]=-0x1]=_0x13dde2(0xc4),_0xeb738d))(p||{});const w=_0x29206e=>_0x52a6f3(new Date(+_0x29206e))['format'](_0x13dde2(0xfb)),X=async(_0x5490e8,_0x1efbb6)=>{const _0xc47d99=_0x13dde2,_0x5ef621=_0x5490e8['get'](_0xdaed2f),_0x22eda6=_0x5490e8['get'](_0x8b1593);_0x1efbb6[_0xc47d99(0xb8)](_0x232f70=>{const _0x1c8208=_0xc47d99;_0x5ef621[_0x1c8208(0xeb)](_0x232f70)&&_0x1efbb6[_0x1c8208(0xcf)](_0x232f70);}),_0x1efbb6['size']&&(await _0x22eda6[_0xc47d99(0x10e)](_0xc47d99(0xd6),{'params':{'userIDs':[..._0x1efbb6]}}))[_0xc47d99(0xc8)]['users']['forEach'](_0x86d288=>{const _0x2abdea=_0xc47d99;_0x86d288&&_0x5ef621[_0x2abdea(0x10c)](_0x86d288);});};function _0x4a59(){const _0x26f6f3=['disposeWithMe','href','pluginName','getComment','format','https','_initDataSource','code','2977323pofZgM','deleteComment','6ofRUWd','Solve','collaborators','forEach','/delete','getMemberID','error','userId','customRanges','402834UlSSuE','symbol','addComment','slice','type','searchParams','UNRECOGNIZED','dataSource','_threadCommentDataSource','parse','body','_userService','10252tukhFd','_threadCommentMentionDataService','setConfig','_injector','commentUpdate$','delete','3618760jdFqZp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','_commentService','_httpService','_configService','/universer-api/user/list','content','map','user','_sessionService','Solved','955kgSDVu','_config','subject','resolveComment','/edit','location','ref','filter','OpenOrReOpen','3Ismmom','Edit','defineProperty','Delete','thread-comment-data-source.config','requireSession','getUser','name','_threadCommentMentionDataSource','length','1985354tzPMjs','rangeType','/universer-api/authz/collaborator','add','values','replies','_threadCommentDataSourceService','parentId','listComments','/add','_init','solved','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','replyId','COMMENT','unitId','getThread','://','60ZNubkm','stringify','_threadCommentModel','avatar','resolved','8787867xYUnqx','comments','host','Add','getOwnPropertyDescriptor','addUser','threadId','get','getMentions','_initUserSync','protocol','rangeId','pipe','createTimestamp','UNIVER_UNKNOWN','469341BnxHvE','reply','post','subscribe','Reply','Unknown','userID'];_0x4a59=function(){return _0x26f6f3;};return _0x4a59();}var k=Object[_0x13dde2(0xe7)],ee=Object[_0x13dde2(0x10b)],re=(_0x30eb6c,_0x14c724,_0x149029,_0x5bc52e)=>{for(var _0x441b5c=_0x5bc52e>0x1?void 0x0:_0x5bc52e?ee(_0x14c724,_0x149029):_0x14c724,_0x10e8ec=_0x30eb6c['length']-0x1,_0xc3601e;_0x10e8ec>=0x0;_0x10e8ec--)(_0xc3601e=_0x30eb6c[_0x10e8ec])&&(_0x441b5c=(_0x5bc52e?_0xc3601e(_0x14c724,_0x149029,_0x441b5c):_0xc3601e(_0x441b5c))||_0x441b5c);return _0x5bc52e&&_0x441b5c&&k(_0x14c724,_0x149029,_0x441b5c),_0x441b5c;},_=(_0x21d0ce,_0xfe748)=>(_0x5385b6,_0x243266)=>_0xfe748(_0x5385b6,_0x243266,_0x21d0ce);let S=class extends _0x156250{constructor(_0x4166e6,_0x116d2d,_0x4068fe,_0x5237ce){const _0x2394a9=_0x13dde2;super(),this[_0x2394a9(0xd3)]=_0x4166e6,this['_threadCommentModel']=_0x116d2d,this[_0x2394a9(0xc9)]=_0x4068fe,this[_0x2394a9(0xcd)]=_0x5237ce,this[_0x2394a9(0xf9)](),this[_0x2394a9(0x110)]();}['_initUserSync'](){const _0x94564e=_0x13dde2;this['disposeWithMe'](this[_0x94564e(0x104)][_0x94564e(0xce)][_0x94564e(0x113)](_0x433b2b(0x10))['subscribe'](_0x4a5da2=>{const _0x28d1e6=_0x94564e,_0x1a7a61=new Set();_0x4a5da2[_0x28d1e6(0xb8)](_0x36ecf2=>{const _0x11a7a5=_0x28d1e6;switch(_0x36ecf2['type']){case'add':{const _0x3bfebe=_0x36ecf2['payload']['personId'];_0x1a7a61[_0x11a7a5(0xf2)](_0x3bfebe);break;}}}),X(this[_0x28d1e6(0xcd)],_0x1a7a61);}));}['_init'](){const _0x46c381=_0x13dde2;this[_0x46c381(0x11d)](this['_commentService'][_0x46c381(0xce)][_0x46c381(0x119)](async _0x2b35db=>{const _0xb58926=_0x46c381;var _0x1c28fa,_0x4c51ef;const _0x40b8f3=this[_0xb58926(0x104)][_0xb58926(0x100)](_0x2b35db[_0xb58926(0xff)],_0x2b35db['threadId']);if(!_0x40b8f3)return;const {unitId:_0xdf5bb8,subUnitId:_0x450c09}=_0x40b8f3;switch(_0x2b35db[_0xb58926(0xd9)]&&this['_userService'][_0xb58926(0x10c)](_0x2b35db[_0xb58926(0xd9)]),_0x2b35db['type']){case p['Add']:break;case p[_0xb58926(0x11a)]:{this['_threadCommentModel'][_0xb58926(0xc0)](_0xdf5bb8,_0x450c09,{'unitId':_0xdf5bb8,'subUnitId':_0x450c09,'ref':'','id':_0x2b35db[_0xb58926(0xfd)],'dT':w(+_0x2b35db[_0xb58926(0x114)]),'threadId':_0x2b35db['threadId'],'personId':(_0x4c51ef=(_0x1c28fa=_0x2b35db[_0xb58926(0xd9)])==null?void 0x0:_0x1c28fa[_0xb58926(0x11c)])!=null?_0x4c51ef:_0x2b35db[_0xb58926(0xbc)],'text':JSON['parse'](_0x2b35db[_0xb58926(0xd7)]),'parentId':_0x40b8f3['id']});break;}case p[_0xb58926(0xe8)]:{const _0x2b6a05=this[_0xb58926(0x104)][_0xb58926(0xae)](_0xdf5bb8,_0x450c09,_0x2b35db['replyId']);_0x2b6a05&&_0x2b6a05[_0xb58926(0xf6)]&&this[_0xb58926(0x104)][_0xb58926(0xb4)](_0xdf5bb8,_0x450c09,_0x2b35db[_0xb58926(0xfd)]);break;}case p[_0xb58926(0xe6)]:{this[_0xb58926(0x104)]['updateComment'](_0xdf5bb8,_0x450c09,{'commentId':_0x2b35db[_0xb58926(0xfd)],'text':JSON[_0xb58926(0xc7)](_0x2b35db['content'])});break;}case p[_0xb58926(0xb6)]:{const _0x266887=this['_threadCommentModel'][_0xb58926(0x100)](_0xdf5bb8,_0x2b35db['threadId']);_0x266887&&this[_0xb58926(0x104)]['resolveComment'](_0xdf5bb8,_0x450c09,_0x266887['id'],_0x2b35db['solved']===v['Solved']);break;}}}));}};S=re([_(0x0,_0x221299(_0x2ba92e)),_(0x1,_0x221299(_0x2b52ee)),_(0x2,_0x221299(_0xdaed2f)),_(0x3,_0x221299(_0x53080a))],S);const te=_0x13dde2(0xe9),se={};var oe=Object[_0x13dde2(0xe7)],ne=Object[_0x13dde2(0x10b)],ie=(_0x42d5cb,_0xbfb09c,_0x469a8c,_0x56c2fb)=>{const _0x32dc12=_0x13dde2;for(var _0x11dd8e=_0x56c2fb>0x1?void 0x0:_0x56c2fb?ne(_0xbfb09c,_0x469a8c):_0xbfb09c,_0x2c23a3=_0x42d5cb[_0x32dc12(0xee)]-0x1,_0x1fed01;_0x2c23a3>=0x0;_0x2c23a3--)(_0x1fed01=_0x42d5cb[_0x2c23a3])&&(_0x11dd8e=(_0x56c2fb?_0x1fed01(_0xbfb09c,_0x469a8c,_0x11dd8e):_0x1fed01(_0x11dd8e))||_0x11dd8e);return _0x56c2fb&&_0x11dd8e&&oe(_0xbfb09c,_0x469a8c,_0x11dd8e),_0x11dd8e;},I=(_0x3c72e8,_0x704234)=>(_0x5c3a92,_0xf8b67c)=>_0x704234(_0x5c3a92,_0xf8b67c,_0x3c72e8);function ae(_0x7fa650,_0x143e40){const _0x10d9a4=_0x13dde2,_0x3e8db6=_0x7fa650[_0x10d9a4(0xf4)][0x0];return{..._0x143e40,'id':_0x3e8db6[_0x10d9a4(0xfd)],'resolved':_0x7fa650[_0x10d9a4(0xfa)]===0x1,'dT':w(_0x3e8db6[_0x10d9a4(0x114)]),'personId':_0x3e8db6[_0x10d9a4(0xbc)],'threadId':_0x3e8db6['threadId']};}function ce(_0x1d5cb2,_0x2e29ac,_0x33227f){const _0x530e0c=_0x13dde2;var _0x849423,_0x55294a;if(((_0x55294a=(_0x849423=_0x1d5cb2==null?void 0x0:_0x1d5cb2[_0x530e0c(0xf4)])==null?void 0x0:_0x849423[_0x530e0c(0xee)])!=null?_0x55294a:0x0)>0x0){const _0x11879e=(_0x3e45d2,_0x757ec2)=>({'id':_0x3e45d2['replyId'],'threadId':_0x3e45d2[_0x530e0c(0x10d)],'dT':w(_0x3e45d2[_0x530e0c(0x114)]),'personId':_0x3e45d2[_0x530e0c(0xbc)],'resolved':_0x1d5cb2[_0x530e0c(0xfa)]===v[_0x530e0c(0xdb)],'unitId':_0x2e29ac,'subUnitId':_0x33227f,'text':JSON[_0x530e0c(0xc7)](_0x3e45d2[_0x530e0c(0xd7)]),'parentId':_0x757ec2}),_0xd49f77=_0x11879e(_0x1d5cb2[_0x530e0c(0xf4)][0x0]);return{..._0xd49f77,'children':_0x1d5cb2[_0x530e0c(0xf4)][_0x530e0c(0xc1)](0x1)[_0x530e0c(0xd8)](_0x19ab9f=>_0x11879e(_0x19ab9f,_0xd49f77['id']))};}return null;}let b=class{constructor(_0x3d4ba5,_0x169e1a,_0x1a8fcb,_0x5f4a0f){const _0x3bde4f=_0x13dde2;this[_0x3bde4f(0xd4)]=_0x3d4ba5,this[_0x3bde4f(0xc9)]=_0x169e1a,this[_0x3bde4f(0xda)]=_0x1a8fcb,this['_injector']=_0x5f4a0f;}async[_0x13dde2(0xc0)](_0x56f1f4){const _0x14aedd=_0x13dde2;var _0x581209,_0xc7038d;const {parentId:_0x8c3721,unitId:_0x4f52c6,text:_0x305e5b,threadId:_0x4deafb}=_0x56f1f4,_0x244d7e=(_0xc7038d=(_0x581209=_0x305e5b[_0x14aedd(0xbd)])==null?void 0x0:_0x581209[_0x14aedd(0xe3)](_0x491d59=>_0x491d59[_0x14aedd(0xf0)]===_0x44569b['COMMENT'])['map'](_0x18c38d=>_0x18c38d[_0x14aedd(0x112)]))!=null?_0xc7038d:[],_0x3ebcb0=JSON['stringify'](_0x305e5b),_0x2cfaef=(await this[_0x14aedd(0xda)][_0x14aedd(0xea)](_0x4f52c6))[_0x14aedd(0xba)]();if(_0x8c3721){const _0x5c375b={'memberId':_0x2cfaef,'unitId':_0x4f52c6,'content':_0x3ebcb0,'mention':_0x244d7e,'threadId':_0x4deafb},_0x4cfac1=(await this[_0x14aedd(0xd4)][_0x14aedd(0x118)](_0x14aedd(0xd2)+_0x4f52c6+'/reply',{'body':_0x5c375b}))['body'][_0x14aedd(0x117)];return{..._0x56f1f4,'id':_0x4cfac1['replyId'],'dT':_0x52a6f3(+_0x4cfac1[_0x14aedd(0x114)])[_0x14aedd(0xaf)](_0x14aedd(0xfb)),'personId':_0x4cfac1[_0x14aedd(0xbc)]};}else{const _0x50de14={'memberId':_0x2cfaef,'unitId':_0x4f52c6,'content':_0x3ebcb0,'mention':_0x244d7e},_0x414f5c=await this[_0x14aedd(0xd4)][_0x14aedd(0x118)](_0x14aedd(0xd2)+_0x4f52c6+_0x14aedd(0xf8),{'body':_0x50de14});return ae(_0x414f5c[_0x14aedd(0xc8)]['comment'],_0x56f1f4);}}async['updateComment'](_0x258704){const _0x4d2e21=_0x13dde2;var _0x56c100,_0x1a94d3;const {text:_0x4f4ea4,unitId:_0x1dedc4}=_0x258704,_0x56a30a=(_0x1a94d3=(_0x56c100=_0x4f4ea4[_0x4d2e21(0xbd)])==null?void 0x0:_0x56c100[_0x4d2e21(0xe3)](_0x484add=>_0x484add[_0x4d2e21(0xf0)]===_0x44569b[_0x4d2e21(0xfe)])[_0x4d2e21(0xd8)](_0x3be8df=>_0x3be8df[_0x4d2e21(0x112)]))!=null?_0x1a94d3:[],_0x32cd6f=JSON[_0x4d2e21(0x103)](_0x4f4ea4),_0x373f12=_0x258704['threadId'],_0x5ad4ae=_0x258704['id'],_0x32d27e={'memberId':(await this[_0x4d2e21(0xda)]['requireSession'](_0x1dedc4))[_0x4d2e21(0xba)](),'unitId':_0x1dedc4,'threadId':_0x373f12,'mention':_0x56a30a,'content':_0x32cd6f,'replyId':_0x5ad4ae},_0x3a092d=await this[_0x4d2e21(0xd4)][_0x4d2e21(0x118)]('/universer-api/comment/unit/'+_0x1dedc4+_0x4d2e21(0xe0),{'body':_0x32d27e});return!_0x3a092d[_0x4d2e21(0xc8)][_0x4d2e21(0xbb)]||_0x3a092d['body'][_0x4d2e21(0xbb)][_0x4d2e21(0xb2)]===0x1;}async[_0x13dde2(0xdf)](_0x19f737){const _0x1f57f0=_0x13dde2,{unitId:_0x5f31f7}=_0x19f737,_0xb3e276=_0x19f737[_0x1f57f0(0x10d)],_0x103c6c={'memberId':this[_0x1f57f0(0xc9)]['getCurrentUser']()[_0x1f57f0(0x11c)],'unitId':_0x5f31f7,'threadId':_0xb3e276,'solved':_0x19f737[_0x1f57f0(0x106)]?v[_0x1f57f0(0xdb)]:v[_0x1f57f0(0xe4)]},_0x115054=await this[_0x1f57f0(0xd4)][_0x1f57f0(0x118)](_0x1f57f0(0xd2)+_0x5f31f7+'/solved',{'body':_0x103c6c});return!_0x115054['body'][_0x1f57f0(0xbb)]||_0x115054['body'][_0x1f57f0(0xbb)]['code']===0x1;}async[_0x13dde2(0xb4)](_0x1aae4d,_0x2a30c9,_0x4815a9,_0x10ae1e){const _0x109652=_0x13dde2,_0x30ba6c={'memberId':(await this[_0x109652(0xda)][_0x109652(0xea)](_0x1aae4d))[_0x109652(0xba)](),'threadId':_0x4815a9,'replyId':_0x10ae1e,'unitId':_0x1aae4d},_0x3696c9=await this[_0x109652(0xd4)][_0x109652(0x118)]('/universer-api/comment/unit/'+_0x1aae4d+_0x109652(0xb9),{'body':_0x30ba6c});return!_0x3696c9[_0x109652(0xc8)]['error']||_0x3696c9['body']['error'][_0x109652(0xb2)]===0x1;}async[_0x13dde2(0xf7)](_0x2ff5b5,_0x2e9a7f,_0x4568d9){const _0x151c43=_0x13dde2,_0xdb570c={'unitId':_0x2ff5b5,'threadId':_0x4568d9},_0xac1fdd=await this['_httpService']['post'](_0x151c43(0xd2)+_0x2ff5b5+'/list',{'body':_0xdb570c}),_0x42b2cd=_0x4568d9[_0x151c43(0xd8)](_0x56a3a7=>ce(_0xac1fdd[_0x151c43(0xc8)][_0x151c43(0x108)][_0x56a3a7],_0x2ff5b5,_0x2e9a7f))[_0x151c43(0xe3)](Boolean);return Object[_0x151c43(0xf3)](_0xac1fdd[_0x151c43(0xc8)]['users'])[_0x151c43(0xb8)](_0x34e5cc=>{const _0x3cd40e=_0x151c43;this[_0x3cd40e(0xc9)]['addUser'](_0x34e5cc);}),_0x42b2cd;}['saveCommentToSnapshot'](_0x5e11c8){const _0x36735c=_0x13dde2;return{'id':_0x5e11c8['id'],'threadId':_0x5e11c8['threadId'],'ref':_0x5e11c8[_0x36735c(0xe2)]};}};b=ie([I(0x0,_0x221299(_0x8b1593)),I(0x1,_0x221299(_0xdaed2f)),I(0x2,_0x221299(_0x42a2af)),I(0x3,_0x221299(_0x53080a))],b);var de=Object[_0x13dde2(0xe7)],me=Object['getOwnPropertyDescriptor'],le=(_0x29d667,_0x275c45,_0x4155a7,_0x41343f)=>{for(var _0x18720e=_0x41343f>0x1?void 0x0:_0x41343f?me(_0x275c45,_0x4155a7):_0x275c45,_0x3af199=_0x29d667['length']-0x1,_0x5978be;_0x3af199>=0x0;_0x3af199--)(_0x5978be=_0x29d667[_0x3af199])&&(_0x18720e=(_0x41343f?_0x5978be(_0x275c45,_0x4155a7,_0x18720e):_0x5978be(_0x18720e))||_0x18720e);return _0x41343f&&_0x18720e&&de(_0x275c45,_0x4155a7,_0x18720e),_0x18720e;},he=(_0x3f1352,_0xeece36)=>(_0x53e28f,_0x13dd31)=>_0xeece36(_0x53e28f,_0x13dd31,_0x3f1352);function _0x1d97(_0x1d59ad,_0x553abf){const _0x4a592c=_0x4a59();return _0x1d97=function(_0x1d97ae,_0x23d52c){_0x1d97ae=_0x1d97ae-0xae;let _0x1e1e52=_0x4a592c[_0x1d97ae];return _0x1e1e52;},_0x1d97(_0x1d59ad,_0x553abf);}let D=class{constructor(_0x4d5b7c){const _0x5dbb60=_0x13dde2;this[_0x5dbb60(0xd4)]=_0x4d5b7c;}async[_0x13dde2(0x10f)](_0x293fa9,_0x1548c6,_0x28050a){const _0x2ed3fc=_0x13dde2,_0x5280c8=new URL(window['location'][_0x2ed3fc(0x11e)])[_0x2ed3fc(0xc3)]['get']('unit');if(!_0x5280c8)return[];const _0x95c952=window['location'][_0x2ed3fc(0x109)],_0x191954=window[_0x2ed3fc(0xe1)][_0x2ed3fc(0x111)]==='https:'?_0x2ed3fc(0xb0):'http';return(await this[_0x2ed3fc(0xd4)][_0x2ed3fc(0x10e)](_0x191954+_0x2ed3fc(0x101)+_0x95c952+_0x2ed3fc(0xf1),{'params':{'objectID':_0x5280c8,'unitID':_0x5280c8}}))[_0x2ed3fc(0xc8)][_0x2ed3fc(0xb7)]['map'](_0x281503=>{const _0x23fade=_0x2ed3fc;var _0x31118e,_0xdb9738,_0x250713,_0x41d00d,_0x5035fe,_0x3002d1;return{'id':(_0xdb9738=(_0x31118e=_0x281503[_0x23fade(0xde)])==null?void 0x0:_0x31118e[_0x23fade(0x11c)])!=null?_0xdb9738:'','label':(_0x41d00d=(_0x250713=_0x281503['subject'])==null?void 0x0:_0x250713[_0x23fade(0xec)])!=null?_0x41d00d:'','icon':(_0x3002d1=(_0x5035fe=_0x281503['subject'])==null?void 0x0:_0x5035fe[_0x23fade(0x105)])!=null?_0x3002d1:'','type':_0x23fade(0xd9)};});}};D=le([he(0x0,_0x221299(_0x8b1593))],D);var ue=Object[_0x13dde2(0xe7)],pe=Object[_0x13dde2(0x10b)],ve=(_0x9b2de,_0x4b3ad7,_0x57cf6c,_0x5261f6)=>{const _0x4737cd=_0x13dde2;for(var _0x48404f=_0x5261f6>0x1?void 0x0:_0x5261f6?pe(_0x4b3ad7,_0x57cf6c):_0x4b3ad7,_0x3e2a27=_0x9b2de[_0x4737cd(0xee)]-0x1,_0x55c420;_0x3e2a27>=0x0;_0x3e2a27--)(_0x55c420=_0x9b2de[_0x3e2a27])&&(_0x48404f=(_0x5261f6?_0x55c420(_0x4b3ad7,_0x57cf6c,_0x48404f):_0x55c420(_0x48404f))||_0x48404f);return _0x5261f6&&_0x48404f&&ue(_0x4b3ad7,_0x57cf6c,_0x48404f),_0x48404f;},f=(_0x254c04,_0x30ae3d)=>(_0x2ebbab,_0x56be10)=>_0x30ae3d(_0x2ebbab,_0x56be10,_0x254c04);let C=class extends _0x156250{constructor(_0x271e74,_0x233c2c,_0x47441a,_0x4b49d8){const _0x52e026=_0x13dde2;super(),this[_0x52e026(0xf5)]=_0x271e74,this[_0x52e026(0xc6)]=_0x233c2c,this[_0x52e026(0xcb)]=_0x47441a,this[_0x52e026(0xed)]=_0x4b49d8,this[_0x52e026(0xb1)]();}[_0x13dde2(0xb1)](){const _0x36b599=_0x13dde2;this['_threadCommentDataSourceService'][_0x36b599(0xc5)]=this[_0x36b599(0xc6)],this[_0x36b599(0xf5)][_0x36b599(0xfc)]=!0x1,this[_0x36b599(0xcb)]['dataSource']=this[_0x36b599(0xed)];}};C=ve([f(0x0,_0x273f0a),f(0x1,_0x221299(b)),f(0x2,_0x201138),f(0x3,_0x221299(D))],C);var E=Object[_0x13dde2(0xe7)],_e=Object[_0x13dde2(0x10b)],Ie=(_0x14d597,_0x748702,_0x550809)=>_0x748702 in _0x14d597?E(_0x14d597,_0x748702,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x550809}):_0x14d597[_0x748702]=_0x550809,fe=(_0x1ee83c,_0x718546,_0xfba923,_0x5b9495)=>{const _0x2dfa30=_0x13dde2;for(var _0x5891e1=_0x5b9495>0x1?void 0x0:_0x5b9495?_e(_0x718546,_0xfba923):_0x718546,_0x15d38b=_0x1ee83c[_0x2dfa30(0xee)]-0x1,_0x5663c6;_0x15d38b>=0x0;_0x15d38b--)(_0x5663c6=_0x1ee83c[_0x15d38b])&&(_0x5891e1=(_0x5b9495?_0x5663c6(_0x718546,_0xfba923,_0x5891e1):_0x5663c6(_0x5891e1))||_0x5891e1);return _0x5b9495&&_0x5891e1&&E(_0x718546,_0xfba923,_0x5891e1),_0x5891e1;},T=(_0x4165ed,_0x3a2c8f)=>(_0x4b64f5,_0x32ac5f)=>_0x3a2c8f(_0x4b64f5,_0x32ac5f,_0x4165ed),x=(_0x1f623a,_0x4de791,_0x4b3721)=>Ie(_0x1f623a,typeof _0x4de791!=_0x13dde2(0xbf)?_0x4de791+'':_0x4de791,_0x4b3721);let g=class extends _0x21977a{constructor(_0xa11add=se,_0x536dee,_0x6c7ac6){const _0x4983c9=_0x13dde2;super(),this[_0x4983c9(0xdd)]=_0xa11add,this[_0x4983c9(0xcd)]=_0x536dee,this[_0x4983c9(0xd5)]=_0x6c7ac6;const {..._0x247299}=this['_config'];this[_0x4983c9(0xd5)][_0x4983c9(0xcc)](te,_0x247299);}['onStarting'](){const _0x5c1ae8=_0x13dde2;[[D],[b],[C],[S]][_0x5c1ae8(0xb8)](_0x2e09d6=>{const _0x5a76ba=_0x5c1ae8;this['_injector'][_0x5a76ba(0xf2)](_0x2e09d6);}),this[_0x5c1ae8(0xcd)][_0x5c1ae8(0x10e)](C);}['onReady'](){const _0x5535e3=_0x13dde2;this['_injector'][_0x5535e3(0x10e)](S);}};x(g,_0x13dde2(0x11f),Q),x(g,_0x13dde2(0xc2),_0x1def83[_0x13dde2(0x115)]),g=fe([_0x3526f9(_0x508da6,_0x178703,_0x2775d9,_0x56200b),T(0x1,_0x221299(_0x53080a)),T(0x2,_0x183af9)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable, Injector, UserManagerService } from '@univerjs/core';
|
|
2
|
-
import { CommentService } from '@univerjs-pro/collaboration-client';
|
|
3
2
|
import { ThreadCommentModel } from '@univerjs/thread-comment';
|
|
3
|
+
import { CommentService } from '@univerjs-pro/collaboration-client';
|
|
4
4
|
export declare class ThreadCommentCollaUpdateController extends Disposable {
|
|
5
5
|
private readonly _commentService;
|
|
6
6
|
private readonly _threadCommentModel;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export declare class UniverThreadCommentDataSourcePlugin extends Plugin {
|
|
|
8
8
|
static type: UniverInstanceType;
|
|
9
9
|
constructor(_config: IUniverThreadCommentDataSourceConfig | undefined, _injector: Injector, _configService: IConfigService);
|
|
10
10
|
onStarting(): void;
|
|
11
|
+
onReady(): void;
|
|
11
12
|
}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x288a7e,_0x5501ed){const _0x4b4a3e=_0x40bb,_0x1217e1=_0x288a7e();while(!![]){try{const _0xe93405=parseInt(_0x4b4a3e(0x11b))/0x1*(-parseInt(_0x4b4a3e(0x14a))/0x2)+parseInt(_0x4b4a3e(0x123))/0x3*(parseInt(_0x4b4a3e(0x103))/0x4)+-parseInt(_0x4b4a3e(0x152))/0x5*(parseInt(_0x4b4a3e(0x148))/0x6)+-parseInt(_0x4b4a3e(0x139))/0x7*(parseInt(_0x4b4a3e(0xf6))/0x8)+parseInt(_0x4b4a3e(0xf8))/0x9+parseInt(_0x4b4a3e(0x143))/0xa+-parseInt(_0x4b4a3e(0x14b))/0xb;if(_0xe93405===_0x5501ed)break;else _0x1217e1['push'](_0x1217e1['shift']());}catch(_0x1ccc8f){_0x1217e1['push'](_0x1217e1['shift']());}}}(_0x5a0e,0xdecfa),function(_0x2a5592,_0x4842d7){const _0x31b881=_0x40bb;typeof exports=='object'&&typeof module<'u'?_0x4842d7(exports,require(_0x31b881(0x101)),require(_0x31b881(0xf7)),require(_0x31b881(0xe9)),require(_0x31b881(0x10f)),require('@univerjs-pro/license'),require('rxjs'),require(_0x31b881(0xfa)),require('dayjs')):typeof define==_0x31b881(0x142)&&define[_0x31b881(0x13b)]?define([_0x31b881(0x160),'@univerjs/core',_0x31b881(0xf7),_0x31b881(0xe9),'@univerjs-pro/collaboration-client',_0x31b881(0xdf),'rxjs',_0x31b881(0xfa),'dayjs'],_0x4842d7):(_0x2a5592=typeof globalThis<'u'?globalThis:_0x2a5592||self,_0x4842d7(_0x2a5592[_0x31b881(0x13a)]={},_0x2a5592[_0x31b881(0xe4)],_0x2a5592[_0x31b881(0x12a)],_0x2a5592[_0x31b881(0x156)],_0x2a5592['UniverCollaborationClient'],_0x2a5592['UniverLicense'],_0x2a5592[_0x31b881(0x153)],_0x2a5592[_0x31b881(0x131)],_0x2a5592[_0x31b881(0xe1)]));}(this,function(_0x35516d,_0x5884e3,_0x47a0cf,_0x15ba5a,_0x2bc3ee,_0x495ec4,_0xd38334,_0x24a519,_0x445029){'use strict';const _0x114bcf=_0x40bb;const _0x5988b1=_0x114bcf(0xfe);var _0x276e42=(_0x102ddb=>(_0x102ddb[_0x102ddb[_0x114bcf(0xf3)]=0x0]='OpenOrReOpen',_0x102ddb[_0x102ddb[_0x114bcf(0xeb)]=0x1]=_0x114bcf(0xeb),_0x102ddb[_0x102ddb[_0x114bcf(0xea)]=-0x1]=_0x114bcf(0xea),_0x102ddb))(_0x276e42||{}),_0x412447=(_0x578556=>(_0x578556[_0x578556[_0x114bcf(0xdd)]=0x0]=_0x114bcf(0xdd),_0x578556[_0x578556[_0x114bcf(0x138)]=0x1]=_0x114bcf(0x138),_0x578556[_0x578556['Reply']=0x2]=_0x114bcf(0x15d),_0x578556[_0x578556[_0x114bcf(0xf5)]=0x3]='Edit',_0x578556[_0x578556[_0x114bcf(0xfc)]=0x4]=_0x114bcf(0xfc),_0x578556[_0x578556[_0x114bcf(0x15e)]=0x5]=_0x114bcf(0x15e),_0x578556[_0x578556[_0x114bcf(0xea)]=-0x1]='UNRECOGNIZED',_0x578556))(_0x412447||{});const _0x5c1fc0=_0x389f9e=>_0x445029(new Date(+_0x389f9e))[_0x114bcf(0xf1)]('YYYY/MM/DD\x20HH:mm'),_0x10b225=async(_0x23011e,_0x331cb2)=>{const _0x429b3d=_0x114bcf,_0x228159=_0x23011e['get'](_0x5884e3[_0x429b3d(0x109)]),_0x29b7ea=_0x23011e[_0x429b3d(0x10b)](_0x24a519[_0x429b3d(0x114)]);_0x331cb2[_0x429b3d(0x108)](_0x58de7d=>{const _0x3fd0d3=_0x429b3d;_0x228159[_0x3fd0d3(0x128)](_0x58de7d)&&_0x331cb2[_0x3fd0d3(0x12c)](_0x58de7d);}),_0x331cb2[_0x429b3d(0x105)]&&(await _0x29b7ea[_0x429b3d(0x10b)](_0x429b3d(0x133),{'params':{'userIDs':[..._0x331cb2]}}))[_0x429b3d(0x10e)][_0x429b3d(0x147)]['forEach'](_0x5b0b95=>{const _0x3879a4=_0x429b3d;_0x5b0b95&&_0x228159[_0x3879a4(0x115)](_0x5b0b95);});};var _0x21f306=Object[_0x114bcf(0x120)],_0x9c1afd=Object['getOwnPropertyDescriptor'],_0x18d26e=(_0x294375,_0x1e6643,_0x2acdc7,_0x531ec7)=>{for(var _0x16b3aa=_0x531ec7>0x1?void 0x0:_0x531ec7?_0x9c1afd(_0x1e6643,_0x2acdc7):_0x1e6643,_0x4d882d=_0x294375['length']-0x1,_0x3c572b;_0x4d882d>=0x0;_0x4d882d--)(_0x3c572b=_0x294375[_0x4d882d])&&(_0x16b3aa=(_0x531ec7?_0x3c572b(_0x1e6643,_0x2acdc7,_0x16b3aa):_0x3c572b(_0x16b3aa))||_0x16b3aa);return _0x531ec7&&_0x16b3aa&&_0x21f306(_0x1e6643,_0x2acdc7,_0x16b3aa),_0x16b3aa;},_0x126033=(_0x5e48ce,_0x2f0c6e)=>(_0x4f7ad2,_0x24ced8)=>_0x2f0c6e(_0x4f7ad2,_0x24ced8,_0x5e48ce);let _0x46ff54=class extends _0x5884e3[_0x114bcf(0x119)]{constructor(_0x20bd27,_0x44c580,_0x459861,_0x2b190d){const _0x11de71=_0x114bcf;super(),this[_0x11de71(0x157)]=_0x20bd27,this[_0x11de71(0xe7)]=_0x44c580,this['_userService']=_0x459861,this[_0x11de71(0x100)]=_0x2b190d,this[_0x11de71(0xf2)](),this['_initUserSync']();}['_initUserSync'](){const _0x546468=_0x114bcf;this[_0x546468(0x14d)](this[_0x546468(0xe7)][_0x546468(0x15f)][_0x546468(0x121)](_0xd38334[_0x546468(0x13f)](0x10))[_0x546468(0xf4)](_0x5eeabe=>{const _0x461852=_0x546468,_0xb3f17=new Set();_0x5eeabe[_0x461852(0x108)](_0x13f5b0=>{const _0x499ae0=_0x461852;switch(_0x13f5b0['type']){case _0x499ae0(0x146):{const _0x5d57bb=_0x13f5b0['payload'][_0x499ae0(0xe6)];_0xb3f17[_0x499ae0(0x146)](_0x5d57bb);break;}}}),_0x10b225(this['_injector'],_0xb3f17);}));}[_0x114bcf(0xf2)](){const _0x589cf2=_0x114bcf;this[_0x589cf2(0x14d)](this[_0x589cf2(0x157)][_0x589cf2(0x15f)][_0x589cf2(0xf4)](async _0x93c008=>{const _0xecd3f9=_0x589cf2;var _0xb2d297,_0xca670e;const _0x19afe5=this[_0xecd3f9(0xe7)][_0xecd3f9(0x137)](_0x93c008[_0xecd3f9(0x102)],_0x93c008[_0xecd3f9(0x151)]);if(!_0x19afe5)return;const {unitId:_0x508487,subUnitId:_0x3e4898}=_0x19afe5;switch(_0x93c008[_0xecd3f9(0x150)]&&this[_0xecd3f9(0xd6)][_0xecd3f9(0x115)](_0x93c008[_0xecd3f9(0x150)]),_0x93c008[_0xecd3f9(0x111)]){case _0x412447[_0xecd3f9(0x138)]:break;case _0x412447[_0xecd3f9(0x15d)]:{this[_0xecd3f9(0xe7)][_0xecd3f9(0x12e)](_0x508487,_0x3e4898,{'unitId':_0x508487,'subUnitId':_0x3e4898,'ref':'','id':_0x93c008[_0xecd3f9(0xe0)],'dT':_0x5c1fc0(+_0x93c008[_0xecd3f9(0x140)]),'threadId':_0x93c008[_0xecd3f9(0x151)],'personId':(_0xca670e=(_0xb2d297=_0x93c008['user'])==null?void 0x0:_0xb2d297[_0xecd3f9(0xfd)])!=null?_0xca670e:_0x93c008[_0xecd3f9(0x118)],'text':JSON['parse'](_0x93c008['content']),'parentId':_0x19afe5['id']});break;}case _0x412447[_0xecd3f9(0xfc)]:{const _0x9adc1=this[_0xecd3f9(0xe7)]['getComment'](_0x508487,_0x3e4898,_0x93c008[_0xecd3f9(0xe0)]);_0x9adc1&&_0x9adc1['parentId']&&this['_threadCommentModel']['deleteComment'](_0x508487,_0x3e4898,_0x93c008['replyId']);break;}case _0x412447['Edit']:{this[_0xecd3f9(0xe7)][_0xecd3f9(0x126)](_0x508487,_0x3e4898,{'commentId':_0x93c008[_0xecd3f9(0xe0)],'text':JSON[_0xecd3f9(0x15c)](_0x93c008['content'])});break;}case _0x412447[_0xecd3f9(0x15e)]:{const _0x5145eb=this['_threadCommentModel'][_0xecd3f9(0x137)](_0x508487,_0x93c008[_0xecd3f9(0x151)]);_0x5145eb&&this['_threadCommentModel']['resolveComment'](_0x508487,_0x3e4898,_0x5145eb['id'],_0x93c008[_0xecd3f9(0x11c)]===_0x276e42[_0xecd3f9(0xeb)]);break;}}}));}};_0x46ff54=_0x18d26e([_0x5884e3['OnLifecycle'](_0x5884e3['LifecycleStages']['Ready'],_0x46ff54),_0x126033(0x0,_0x5884e3[_0x114bcf(0x14e)](_0x2bc3ee[_0x114bcf(0x104)])),_0x126033(0x1,_0x5884e3[_0x114bcf(0x14e)](_0x47a0cf['ThreadCommentModel'])),_0x126033(0x2,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['UserManagerService'])),_0x126033(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['Injector']))],_0x46ff54);const _0x1bba56=_0x114bcf(0xf9),_0x17d309={};var _0x733f52=Object[_0x114bcf(0x120)],_0x570663=Object[_0x114bcf(0x12f)],_0x154237=(_0x266f42,_0x139424,_0x4aeeb1,_0x18a411)=>{const _0x534464=_0x114bcf;for(var _0x757265=_0x18a411>0x1?void 0x0:_0x18a411?_0x570663(_0x139424,_0x4aeeb1):_0x139424,_0x4f9449=_0x266f42[_0x534464(0x10a)]-0x1,_0x4751a4;_0x4f9449>=0x0;_0x4f9449--)(_0x4751a4=_0x266f42[_0x4f9449])&&(_0x757265=(_0x18a411?_0x4751a4(_0x139424,_0x4aeeb1,_0x757265):_0x4751a4(_0x757265))||_0x757265);return _0x18a411&&_0x757265&&_0x733f52(_0x139424,_0x4aeeb1,_0x757265),_0x757265;},_0x1c8759=(_0x3e6ee9,_0x44eadd)=>(_0x34ac4e,_0x3b8616)=>_0x44eadd(_0x34ac4e,_0x3b8616,_0x3e6ee9);function _0x25b9a(_0x1bce2e,_0xdc1321){const _0xf5c29b=_0x114bcf,_0x2c91de=_0x1bce2e[_0xf5c29b(0xee)][0x0];return{..._0xdc1321,'id':_0x2c91de[_0xf5c29b(0xe0)],'resolved':_0x1bce2e[_0xf5c29b(0x11c)]===0x1,'dT':_0x5c1fc0(_0x2c91de[_0xf5c29b(0x140)]),'personId':_0x2c91de[_0xf5c29b(0x118)],'threadId':_0x2c91de['threadId']};}function _0x1146aa(_0x1277e7,_0x1de0fe,_0x14570a){const _0x212ab1=_0x114bcf;var _0x1a906f,_0xbb33b5;if(((_0xbb33b5=(_0x1a906f=_0x1277e7==null?void 0x0:_0x1277e7[_0x212ab1(0xee)])==null?void 0x0:_0x1a906f['length'])!=null?_0xbb33b5:0x0)>0x0){const _0x2a2b4a=(_0x117050,_0x576855)=>({'id':_0x117050[_0x212ab1(0xe0)],'threadId':_0x117050[_0x212ab1(0x151)],'dT':_0x5c1fc0(_0x117050[_0x212ab1(0x140)]),'personId':_0x117050[_0x212ab1(0x118)],'resolved':_0x1277e7[_0x212ab1(0x11c)]===_0x276e42[_0x212ab1(0xeb)],'unitId':_0x1de0fe,'subUnitId':_0x14570a,'text':JSON[_0x212ab1(0x15c)](_0x117050['content']),'parentId':_0x576855}),_0x5be2d5=_0x2a2b4a(_0x1277e7[_0x212ab1(0xee)][0x0]);return{..._0x5be2d5,'children':_0x1277e7[_0x212ab1(0xee)][_0x212ab1(0x158)](0x1)['map'](_0x500aff=>_0x2a2b4a(_0x500aff,_0x5be2d5['id']))};}return null;}let _0x5c3061=class{constructor(_0x15b146,_0x333ebf,_0x26f889,_0x38adbf){const _0xb62f87=_0x114bcf;this['_httpService']=_0x15b146,this[_0xb62f87(0xd6)]=_0x333ebf,this[_0xb62f87(0xec)]=_0x26f889,this[_0xb62f87(0x100)]=_0x38adbf;}async['addComment'](_0x39a4e1){const _0x4bb2b1=_0x114bcf;var _0x27fb88,_0xcd5bce;const {parentId:_0x4aa864,unitId:_0x18bdb1,text:_0x43d7ab,threadId:_0x575f6c}=_0x39a4e1,_0x2ac051=(_0xcd5bce=(_0x27fb88=_0x43d7ab['customRanges'])==null?void 0x0:_0x27fb88[_0x4bb2b1(0x13c)](_0x310d73=>_0x310d73[_0x4bb2b1(0x10c)]===_0x5884e3[_0x4bb2b1(0x136)][_0x4bb2b1(0x141)])[_0x4bb2b1(0xde)](_0x4a621a=>_0x4a621a['rangeId']))!=null?_0xcd5bce:[],_0x4cec31=JSON[_0x4bb2b1(0xe3)](_0x43d7ab),_0x24a50b=(await this['_sessionService']['requireSession'](_0x18bdb1))[_0x4bb2b1(0x159)]();if(_0x4aa864){const _0x5a7396={'memberId':_0x24a50b,'unitId':_0x18bdb1,'content':_0x4cec31,'mention':_0x2ac051,'threadId':_0x575f6c},_0x3648db=(await this[_0x4bb2b1(0x144)][_0x4bb2b1(0x13d)](_0x4bb2b1(0x14f)+_0x18bdb1+'/reply',{'body':_0x5a7396}))['body'][_0x4bb2b1(0xda)];return{..._0x39a4e1,'id':_0x3648db[_0x4bb2b1(0xe0)],'dT':_0x445029(+_0x3648db[_0x4bb2b1(0x140)])[_0x4bb2b1(0xf1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3648db[_0x4bb2b1(0x118)]};}else{const _0x54d67e={'memberId':_0x24a50b,'unitId':_0x18bdb1,'content':_0x4cec31,'mention':_0x2ac051},_0x52e53c=await this['_httpService'][_0x4bb2b1(0x13d)](_0x4bb2b1(0x14f)+_0x18bdb1+_0x4bb2b1(0x10d),{'body':_0x54d67e});return _0x25b9a(_0x52e53c[_0x4bb2b1(0x10e)]['comment'],_0x39a4e1);}}async[_0x114bcf(0x126)](_0xd01299){const _0x20416d=_0x114bcf;var _0xe86cd6,_0x29c86b;const {text:_0x19100a,unitId:_0x20697b}=_0xd01299,_0x5a9160=(_0x29c86b=(_0xe86cd6=_0x19100a['customRanges'])==null?void 0x0:_0xe86cd6['filter'](_0x4d0805=>_0x4d0805[_0x20416d(0x10c)]===_0x5884e3[_0x20416d(0x136)][_0x20416d(0x141)])[_0x20416d(0xde)](_0x4ffa2c=>_0x4ffa2c[_0x20416d(0x129)]))!=null?_0x29c86b:[],_0x19d688=JSON[_0x20416d(0xe3)](_0x19100a),_0x36f4a5=_0xd01299['threadId'],_0x5d66a1=_0xd01299['id'],_0x5ca41e={'memberId':(await this[_0x20416d(0xec)][_0x20416d(0x135)](_0x20697b))[_0x20416d(0x159)](),'unitId':_0x20697b,'threadId':_0x36f4a5,'mention':_0x5a9160,'content':_0x19d688,'replyId':_0x5d66a1},_0x208727=await this[_0x20416d(0x144)]['post']('/universer-api/comment/unit/'+_0x20697b+'/edit',{'body':_0x5ca41e});return!_0x208727[_0x20416d(0x10e)][_0x20416d(0x132)]||_0x208727[_0x20416d(0x10e)][_0x20416d(0x132)][_0x20416d(0x11f)]===0x1;}async[_0x114bcf(0x124)](_0x21833a){const _0x52ae3e=_0x114bcf,{unitId:_0x3a6809}=_0x21833a,_0x1c1cd3=_0x21833a[_0x52ae3e(0x151)],_0x248e0d={'memberId':this[_0x52ae3e(0xd6)]['getCurrentUser']()[_0x52ae3e(0xfd)],'unitId':_0x3a6809,'threadId':_0x1c1cd3,'solved':_0x21833a[_0x52ae3e(0x113)]?_0x276e42[_0x52ae3e(0xeb)]:_0x276e42[_0x52ae3e(0xf3)]},_0x8d7eee=await this[_0x52ae3e(0x144)][_0x52ae3e(0x13d)](_0x52ae3e(0x14f)+_0x3a6809+_0x52ae3e(0x155),{'body':_0x248e0d});return!_0x8d7eee[_0x52ae3e(0x10e)][_0x52ae3e(0x132)]||_0x8d7eee[_0x52ae3e(0x10e)][_0x52ae3e(0x132)][_0x52ae3e(0x11f)]===0x1;}async['deleteComment'](_0x2d0447,_0x1a10ad,_0x30a71e,_0x3895f2){const _0x202581=_0x114bcf,_0x199bbb={'memberId':(await this[_0x202581(0xec)][_0x202581(0x135)](_0x2d0447))[_0x202581(0x159)](),'threadId':_0x30a71e,'replyId':_0x3895f2,'unitId':_0x2d0447},_0x26df8f=await this[_0x202581(0x144)]['post'](_0x202581(0x14f)+_0x2d0447+_0x202581(0xd7),{'body':_0x199bbb});return!_0x26df8f[_0x202581(0x10e)]['error']||_0x26df8f['body']['error'][_0x202581(0x11f)]===0x1;}async[_0x114bcf(0x11d)](_0x341d6e,_0x26943b,_0x1ec63b){const _0x50d997=_0x114bcf,_0x18c92d={'unitId':_0x341d6e,'threadId':_0x1ec63b},_0x2c11e0=await this[_0x50d997(0x144)][_0x50d997(0x13d)](_0x50d997(0x14f)+_0x341d6e+_0x50d997(0xff),{'body':_0x18c92d}),_0x16ca65=_0x1ec63b[_0x50d997(0xde)](_0x34bad2=>_0x1146aa(_0x2c11e0[_0x50d997(0x10e)]['comments'][_0x34bad2],_0x341d6e,_0x26943b))[_0x50d997(0x13c)](Boolean);return Object[_0x50d997(0xe2)](_0x2c11e0[_0x50d997(0x10e)][_0x50d997(0x147)])['forEach'](_0x49c747=>{this['_userService']['addUser'](_0x49c747);}),_0x16ca65;}['saveCommentToSnapshot'](_0x496002){const _0x3e37d5=_0x114bcf;return{'id':_0x496002['id'],'threadId':_0x496002[_0x3e37d5(0x151)],'ref':_0x496002['ref']};}};_0x5c3061=_0x154237([_0x1c8759(0x0,_0x5884e3['Inject'](_0x24a519[_0x114bcf(0x114)])),_0x1c8759(0x1,_0x5884e3['Inject'](_0x5884e3[_0x114bcf(0x109)])),_0x1c8759(0x2,_0x5884e3[_0x114bcf(0x14e)](_0x2bc3ee[_0x114bcf(0x106)])),_0x1c8759(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x5884e3['Injector']))],_0x5c3061);var _0x3d57ea=Object[_0x114bcf(0x120)],_0x43e2a3=Object[_0x114bcf(0x12f)],_0x2b00a3=(_0x29fc9f,_0x391d97,_0x274509,_0x3087de)=>{const _0x56f680=_0x114bcf;for(var _0x4d22a9=_0x3087de>0x1?void 0x0:_0x3087de?_0x43e2a3(_0x391d97,_0x274509):_0x391d97,_0x3373b3=_0x29fc9f[_0x56f680(0x10a)]-0x1,_0x13065c;_0x3373b3>=0x0;_0x3373b3--)(_0x13065c=_0x29fc9f[_0x3373b3])&&(_0x4d22a9=(_0x3087de?_0x13065c(_0x391d97,_0x274509,_0x4d22a9):_0x13065c(_0x4d22a9))||_0x4d22a9);return _0x3087de&&_0x4d22a9&&_0x3d57ea(_0x391d97,_0x274509,_0x4d22a9),_0x4d22a9;},_0x3583dd=(_0x30faaf,_0x520d90)=>(_0x12f3f0,_0x41bd3e)=>_0x520d90(_0x12f3f0,_0x41bd3e,_0x30faaf);let _0x1aaf47=class{constructor(_0x3ffccd){const _0x571559=_0x114bcf;this[_0x571559(0x144)]=_0x3ffccd;}async[_0x114bcf(0x12d)](_0x5b5cda,_0x299006,_0x2a8577){const _0x420b0f=_0x114bcf,_0x2ce15b=new URL(window['location'][_0x420b0f(0xd8)])[_0x420b0f(0xed)][_0x420b0f(0x10b)](_0x420b0f(0xf0));if(!_0x2ce15b)return[];const _0x1c4bc3=window[_0x420b0f(0xef)]['host'],_0x4e0b74=window['location'][_0x420b0f(0x117)]==='https:'?_0x420b0f(0x15a):'http';return(await this[_0x420b0f(0x144)][_0x420b0f(0x10b)](_0x4e0b74+'://'+_0x1c4bc3+'/universer-api/authz/collaborator',{'params':{'objectID':_0x2ce15b,'unitID':_0x2ce15b}}))[_0x420b0f(0x10e)][_0x420b0f(0xd9)]['map'](_0xd2a571=>{const _0x3481c2=_0x420b0f;var _0x35e145,_0x586e2f,_0x57ef87,_0x2c36fa,_0x570aed,_0x43b41b;return{'id':(_0x586e2f=(_0x35e145=_0xd2a571['subject'])==null?void 0x0:_0x35e145[_0x3481c2(0xfd)])!=null?_0x586e2f:'','label':(_0x2c36fa=(_0x57ef87=_0xd2a571['subject'])==null?void 0x0:_0x57ef87['name'])!=null?_0x2c36fa:'','icon':(_0x43b41b=(_0x570aed=_0xd2a571[_0x3481c2(0x107)])==null?void 0x0:_0x570aed[_0x3481c2(0x145)])!=null?_0x43b41b:'','type':'user'};});}};_0x1aaf47=_0x2b00a3([_0x3583dd(0x0,_0x5884e3[_0x114bcf(0x14e)](_0x24a519[_0x114bcf(0x114)]))],_0x1aaf47);var _0x59fa9f=Object[_0x114bcf(0x120)],_0x4e9b2b=Object['getOwnPropertyDescriptor'],_0x40f374=(_0xaad572,_0x253d30,_0x1bfc33,_0x3ffc16)=>{for(var _0x170acd=_0x3ffc16>0x1?void 0x0:_0x3ffc16?_0x4e9b2b(_0x253d30,_0x1bfc33):_0x253d30,_0x5a52f3=_0xaad572['length']-0x1,_0x488c94;_0x5a52f3>=0x0;_0x5a52f3--)(_0x488c94=_0xaad572[_0x5a52f3])&&(_0x170acd=(_0x3ffc16?_0x488c94(_0x253d30,_0x1bfc33,_0x170acd):_0x488c94(_0x170acd))||_0x170acd);return _0x3ffc16&&_0x170acd&&_0x59fa9f(_0x253d30,_0x1bfc33,_0x170acd),_0x170acd;},_0x449da5=(_0x226472,_0x9cce0)=>(_0x344e67,_0x28c026)=>_0x9cce0(_0x344e67,_0x28c026,_0x226472);let _0x3753c3=class extends _0x5884e3['Disposable']{constructor(_0x524067,_0x125d89,_0x1bb667,_0x3ae650){const _0x17ba00=_0x114bcf;super(),this[_0x17ba00(0xd4)]=_0x524067,this[_0x17ba00(0x112)]=_0x125d89,this[_0x17ba00(0xdc)]=_0x1bb667,this[_0x17ba00(0x11e)]=_0x3ae650,this[_0x17ba00(0x134)]();}['_initDataSource'](){const _0x53951b=_0x114bcf;this[_0x53951b(0xd4)][_0x53951b(0x130)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x53951b(0x110)]=!0x1,this[_0x53951b(0xdc)]['dataSource']=this[_0x53951b(0x11e)];}};_0x3753c3=_0x40f374([_0x5884e3[_0x114bcf(0x154)](_0x5884e3[_0x114bcf(0xd5)][_0x114bcf(0x116)],_0x3753c3),_0x449da5(0x0,_0x47a0cf['IThreadCommentDataSourceService']),_0x449da5(0x1,_0x5884e3[_0x114bcf(0x14e)](_0x5c3061)),_0x449da5(0x2,_0x15ba5a['IThreadCommentMentionDataService']),_0x449da5(0x3,_0x5884e3[_0x114bcf(0x14e)](_0x1aaf47))],_0x3753c3);var _0x26977c=Object['defineProperty'],_0x128639=Object[_0x114bcf(0x12f)],_0x1f0701=(_0xea266f,_0x372354,_0x40928d)=>_0x372354 in _0xea266f?_0x26977c(_0xea266f,_0x372354,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40928d}):_0xea266f[_0x372354]=_0x40928d,_0x295eba=(_0x2bc59d,_0x5a8588,_0x472865,_0x1ad5f6)=>{const _0x2de826=_0x114bcf;for(var _0x19557e=_0x1ad5f6>0x1?void 0x0:_0x1ad5f6?_0x128639(_0x5a8588,_0x472865):_0x5a8588,_0x416fb6=_0x2bc59d[_0x2de826(0x10a)]-0x1,_0x30127c;_0x416fb6>=0x0;_0x416fb6--)(_0x30127c=_0x2bc59d[_0x416fb6])&&(_0x19557e=(_0x1ad5f6?_0x30127c(_0x5a8588,_0x472865,_0x19557e):_0x30127c(_0x19557e))||_0x19557e);return _0x1ad5f6&&_0x19557e&&_0x26977c(_0x5a8588,_0x472865,_0x19557e),_0x19557e;},_0xfa89e1=(_0x3fb52e,_0xb3eaea)=>(_0xdb5f9c,_0x26dfe8)=>_0xb3eaea(_0xdb5f9c,_0x26dfe8,_0x3fb52e),_0x3898c8=(_0x3f5c1e,_0x150753,_0x148d4e)=>_0x1f0701(_0x3f5c1e,typeof _0x150753!=_0x114bcf(0x127)?_0x150753+'':_0x150753,_0x148d4e);_0x35516d[_0x114bcf(0xe8)]=class extends _0x5884e3[_0x114bcf(0x11a)]{constructor(_0x58938a=_0x17d309,_0xc31a52,_0x1c525d){const _0x5ed7c4=_0x114bcf;super(),this[_0x5ed7c4(0x122)]=_0x58938a,this[_0x5ed7c4(0x100)]=_0xc31a52,this[_0x5ed7c4(0xe5)]=_0x1c525d;const {..._0x390ccc}=this[_0x5ed7c4(0x122)];this[_0x5ed7c4(0xe5)][_0x5ed7c4(0xdb)](_0x1bba56,_0x390ccc);}[_0x114bcf(0x12b)](){[[_0x1aaf47],[_0x5c3061],[_0x3753c3],[_0x46ff54]]['forEach'](_0x5dc545=>{const _0x401c8d=_0x40bb;this['_injector'][_0x401c8d(0x146)](_0x5dc545);});}},_0x3898c8(_0x35516d[_0x114bcf(0xe8)],_0x114bcf(0x14c),_0x5988b1),_0x3898c8(_0x35516d[_0x114bcf(0xe8)],_0x114bcf(0x111),_0x5884e3['UniverInstanceType']['UNIVER_UNKNOWN']),_0x35516d['UniverThreadCommentDataSourcePlugin']=_0x295eba([_0x5884e3[_0x114bcf(0xfb)](_0x47a0cf['UniverThreadCommentPlugin'],_0x15ba5a['UniverThreadCommentUIPlugin'],_0x2bc3ee[_0x114bcf(0x15b)],_0x495ec4['UniverLicensePlugin']),_0xfa89e1(0x1,_0x5884e3['Inject'](_0x5884e3[_0x114bcf(0x125)])),_0xfa89e1(0x2,_0x5884e3[_0x114bcf(0x13e)])],_0x35516d['UniverThreadCommentDataSourcePlugin']),Object[_0x114bcf(0x120)](_0x35516d,Symbol[_0x114bcf(0x149)],{'value':'Module'});}));function _0x40bb(_0x253cda,_0x4518e1){const _0x5a0e31=_0x5a0e();return _0x40bb=function(_0x40bbb3,_0x466322){_0x40bbb3=_0x40bbb3-0xd4;let _0x4731b3=_0x5a0e31[_0x40bbb3];return _0x4731b3;},_0x40bb(_0x253cda,_0x4518e1);}function _0x5a0e(){const _0x128344=['Edit','16WhqLsz','@univerjs/thread-comment','1823319vlNvgm','thread-comment-data-source.config','@univerjs/network','DependentOn','Delete','userID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','_injector','@univerjs/core','unitId','4964644hpITLq','CommentService','size','CollaborationSessionService','subject','forEach','UserManagerService','length','get','rangeType','/add','body','@univerjs-pro/collaboration-client','syncUpdateMutationToColla','type','_threadCommentDataSource','resolved','HTTPService','addUser','Starting','protocol','userId','Disposable','Plugin','770407FGcvgq','solved','listComments','_threadCommentMentionDataSource','code','defineProperty','pipe','_config','3eYdNwd','resolveComment','Injector','updateComment','symbol','getUser','rangeId','UniverThreadComment','onStarting','delete','getMentions','addComment','getOwnPropertyDescriptor','dataSource','UniverNetwork','error','/universer-api/user/list','_initDataSource','requireSession','CustomRangeType','getThread','Add','3393467OkRuTQ','UniverThreadCommentDatasource','amd','filter','post','IConfigService','bufferTime','createTimestamp','COMMENT','function','15960210WfbBRJ','_httpService','avatar','add','users','6kWNOMd','toStringTag','2BhWyOg','3769689jGGblY','pluginName','disposeWithMe','Inject','/universer-api/comment/unit/','user','threadId','222355LrsvnC','rxjs','OnLifecycle','/solved','UniverThreadCommentUi','_commentService','slice','getMemberID','https','UniverCollaborationClientPlugin','parse','Reply','Solve','commentUpdate$','exports','_threadCommentDataSourceService','LifecycleStages','_userService','/delete','href','collaborators','reply','setConfig','_threadCommentMentionDataService','Unknown','map','@univerjs-pro/license','replyId','dayjs','values','stringify','UniverCore','_configService','personId','_threadCommentModel','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment-ui','UNRECOGNIZED','Solved','_sessionService','searchParams','replies','location','unit','format','_init','OpenOrReOpen','subscribe'];_0x5a0e=function(){return _0x128344;};return _0x5a0e();}
|
|
1
|
+
function _0x5e7e(){const _0x433b17=['https:','@univerjs/thread-comment-ui','exports','1878JaEedg','_httpService','https','YYYY/MM/DD\x20HH:mm','searchParams','updateComment','2565607KifEaQ','rxjs','Delete','parse','map','/list','dayjs','UniverThreadCommentUIPlugin','Module','http','object','comments','@univerjs/network','customRanges','personId','comment','/universer-api/comment/unit/','@univerjs/core','UniverCore','Injector','UniverLicense','_initUserSync','getMemberID','1910vOZgaE','slice','9048QDrTWp','host','UniverInstanceType','get','2607941lJmjxn','Edit','_userService','UniverThreadComment','rangeId','ref','location','/universer-api/authz/collaborator','deleteComment','UNIVER_UNKNOWN','createTimestamp','collaborators','size','_threadCommentModel','UNRECOGNIZED','ThreadCommentModel','Solve','onReady','_initDataSource','addComment','Reply','replies','_configService','UniverThreadCommentDataSourcePlugin','type','Plugin','dataSource','disposeWithMe','symbol','_config','pipe','14064YSKala','reply','subject','payload','IConfigService','getThread','_threadCommentDataSourceService','pluginName','Solved','_threadCommentDataSource','rangeType','subscribe','resolveComment','CommentService','avatar','UniverCollaborationClient','30GMyhjK','bufferTime','format','/universer-api/user/list','UniverNetwork','content','userID','requireSession','filter','CollaborationSessionService','unitId','addUser','6507sNuXaw','getCurrentUser','name','://','stringify','_threadCommentMentionDataSource','Disposable','defineProperty','users','Add','threadId','_init','add','Inject','syncUpdateMutationToColla','106ASVRgC','Unknown','IThreadCommentDataSourceService','747824qBXLYR','unit','660808BfopHT','post','UniverThreadCommentDatasource','error','getOwnPropertyDescriptor','body','user','UserManagerService','replyId','href','/edit','solved','code','listComments','HTTPService','@univerjs-pro/collaboration-client','saveCommentToSnapshot','CustomRangeType','UniverLicensePlugin','@univerjs-pro/license','userId','_sessionService','delete','length','_threadCommentMentionDataService','_injector','COMMENT','/solved','parentId','OpenOrReOpen','getComment','forEach'];_0x5e7e=function(){return _0x433b17;};return _0x5e7e();}function _0x4287(_0x5918c9,_0x4cc7cc){const _0x5e7e4f=_0x5e7e();return _0x4287=function(_0x428789,_0x401adc){_0x428789=_0x428789-0xd3;let _0x374d5f=_0x5e7e4f[_0x428789];return _0x374d5f;},_0x4287(_0x5918c9,_0x4cc7cc);}(function(_0xaf6f1c,_0x5a37ce){const _0x49fcaa=_0x4287,_0x2a25b2=_0xaf6f1c();while(!![]){try{const _0x2cee3d=-parseInt(_0x49fcaa(0xfc))/0x1+parseInt(_0x49fcaa(0xf7))/0x2*(-parseInt(_0x49fcaa(0x11f))/0x3)+-parseInt(_0x49fcaa(0xfa))/0x4+parseInt(_0x49fcaa(0x13c))/0x5*(parseInt(_0x49fcaa(0x161))/0x6)+parseInt(_0x49fcaa(0x142))/0x7+parseInt(_0x49fcaa(0x13e))/0x8*(parseInt(_0x49fcaa(0xe8))/0x9)+-parseInt(_0x49fcaa(0xdc))/0xa*(parseInt(_0x49fcaa(0x125))/0xb);if(_0x2cee3d===_0x5a37ce)break;else _0x2a25b2['push'](_0x2a25b2['shift']());}catch(_0x4489cf){_0x2a25b2['push'](_0x2a25b2['shift']());}}}(_0x5e7e,0x7b4c7),function(_0xb16af1,_0x114293){const _0x2d12c4=_0x4287;typeof exports==_0x2d12c4(0x12f)&&typeof module<'u'?_0x114293(exports,require(_0x2d12c4(0x136)),require('@univerjs/thread-comment'),require(_0x2d12c4(0x11d)),require(_0x2d12c4(0x10b)),require(_0x2d12c4(0x10f)),require('rxjs'),require(_0x2d12c4(0x131)),require(_0x2d12c4(0x12b))):typeof define=='function'&&define['amd']?define([_0x2d12c4(0x11e),_0x2d12c4(0x136),'@univerjs/thread-comment',_0x2d12c4(0x11d),_0x2d12c4(0x10b),'@univerjs-pro/license',_0x2d12c4(0x126),_0x2d12c4(0x131),_0x2d12c4(0x12b)],_0x114293):(_0xb16af1=typeof globalThis<'u'?globalThis:_0xb16af1||self,_0x114293(_0xb16af1[_0x2d12c4(0xfe)]={},_0xb16af1[_0x2d12c4(0x137)],_0xb16af1[_0x2d12c4(0x145)],_0xb16af1['UniverThreadCommentUi'],_0xb16af1[_0x2d12c4(0xdb)],_0xb16af1[_0x2d12c4(0x139)],_0xb16af1['rxjs'],_0xb16af1[_0x2d12c4(0xe0)],_0xb16af1[_0x2d12c4(0x12b)]));}(this,function(_0x44f0e4,_0x55f941,_0x1c8f4d,_0x2509f9,_0x3510d1,_0x22a343,_0x41d43f,_0x3d7abb,_0x49ecfc){'use strict';const _0x293c7c=_0x4287;const _0x44e02d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x508652=(_0xf4aec3=>(_0xf4aec3[_0xf4aec3[_0x293c7c(0x119)]=0x0]=_0x293c7c(0x119),_0xf4aec3[_0xf4aec3[_0x293c7c(0xd4)]=0x1]=_0x293c7c(0xd4),_0xf4aec3[_0xf4aec3[_0x293c7c(0x150)]=-0x1]='UNRECOGNIZED',_0xf4aec3))(_0x508652||{}),_0x57883f=(_0x146d07=>(_0x146d07[_0x146d07[_0x293c7c(0xf8)]=0x0]=_0x293c7c(0xf8),_0x146d07[_0x146d07[_0x293c7c(0xf1)]=0x1]=_0x293c7c(0xf1),_0x146d07[_0x146d07[_0x293c7c(0x156)]=0x2]=_0x293c7c(0x156),_0x146d07[_0x146d07['Edit']=0x3]=_0x293c7c(0x143),_0x146d07[_0x146d07[_0x293c7c(0x127)]=0x4]=_0x293c7c(0x127),_0x146d07[_0x146d07[_0x293c7c(0x152)]=0x5]=_0x293c7c(0x152),_0x146d07[_0x146d07[_0x293c7c(0x150)]=-0x1]=_0x293c7c(0x150),_0x146d07))(_0x57883f||{});const _0x109d4e=_0xac42e9=>_0x49ecfc(new Date(+_0xac42e9))[_0x293c7c(0xde)](_0x293c7c(0x122)),_0x2c0fef=async(_0x582dd6,_0x5d6ed6)=>{const _0x3e2288=_0x293c7c,_0x45079a=_0x582dd6['get'](_0x55f941[_0x3e2288(0x103)]),_0x35358b=_0x582dd6[_0x3e2288(0x141)](_0x3d7abb[_0x3e2288(0x10a)]);_0x5d6ed6['forEach'](_0x53d635=>{const _0x167d6c=_0x3e2288;_0x45079a['getUser'](_0x53d635)&&_0x5d6ed6[_0x167d6c(0x112)](_0x53d635);}),_0x5d6ed6[_0x3e2288(0x14e)]&&(await _0x35358b[_0x3e2288(0x141)](_0x3e2288(0xdf),{'params':{'userIDs':[..._0x5d6ed6]}}))[_0x3e2288(0x101)][_0x3e2288(0xf0)][_0x3e2288(0x11b)](_0x40c2af=>{const _0x209331=_0x3e2288;_0x40c2af&&_0x45079a[_0x209331(0xe7)](_0x40c2af);});};var _0x300c14=Object[_0x293c7c(0xef)],_0x114ad5=Object[_0x293c7c(0x100)],_0x1d5190=(_0x321439,_0x3f2d5f,_0x11f222,_0x4f053f)=>{const _0x514974=_0x293c7c;for(var _0x1ce9f9=_0x4f053f>0x1?void 0x0:_0x4f053f?_0x114ad5(_0x3f2d5f,_0x11f222):_0x3f2d5f,_0x1cafce=_0x321439[_0x514974(0x113)]-0x1,_0x27cce9;_0x1cafce>=0x0;_0x1cafce--)(_0x27cce9=_0x321439[_0x1cafce])&&(_0x1ce9f9=(_0x4f053f?_0x27cce9(_0x3f2d5f,_0x11f222,_0x1ce9f9):_0x27cce9(_0x1ce9f9))||_0x1ce9f9);return _0x4f053f&&_0x1ce9f9&&_0x300c14(_0x3f2d5f,_0x11f222,_0x1ce9f9),_0x1ce9f9;},_0x5436c4=(_0x38c9f2,_0x58bdd0)=>(_0x3c73bd,_0x468376)=>_0x58bdd0(_0x3c73bd,_0x468376,_0x38c9f2);let _0x25541b=class extends _0x55f941['Disposable']{constructor(_0x572110,_0x1376c0,_0x39ceb7,_0xb9684a){const _0x5df439=_0x293c7c;super(),this['_commentService']=_0x572110,this[_0x5df439(0x14f)]=_0x1376c0,this['_userService']=_0x39ceb7,this[_0x5df439(0x115)]=_0xb9684a,this[_0x5df439(0xf3)](),this[_0x5df439(0x13a)]();}[_0x293c7c(0x13a)](){const _0x35ca3b=_0x293c7c;this[_0x35ca3b(0x15d)](this['_threadCommentModel']['commentUpdate$'][_0x35ca3b(0x160)](_0x41d43f[_0x35ca3b(0xdd)](0x10))[_0x35ca3b(0xd7)](_0x4bf869=>{const _0x4e6073=_0x35ca3b,_0x3d7749=new Set();_0x4bf869[_0x4e6073(0x11b)](_0x13a192=>{const _0x5136aa=_0x4e6073;switch(_0x13a192[_0x5136aa(0x15a)]){case _0x5136aa(0xf4):{const _0x57ff8d=_0x13a192[_0x5136aa(0x164)][_0x5136aa(0x133)];_0x3d7749[_0x5136aa(0xf4)](_0x57ff8d);break;}}}),_0x2c0fef(this['_injector'],_0x3d7749);}));}[_0x293c7c(0xf3)](){const _0x2ae73f=_0x293c7c;this[_0x2ae73f(0x15d)](this['_commentService']['commentUpdate$'][_0x2ae73f(0xd7)](async _0x2a4330=>{const _0x5198f4=_0x2ae73f;var _0x20c2ba,_0x351fbd;const _0x546fae=this[_0x5198f4(0x14f)][_0x5198f4(0x166)](_0x2a4330[_0x5198f4(0xe6)],_0x2a4330['threadId']);if(!_0x546fae)return;const {unitId:_0x3f18e2,subUnitId:_0x31f53e}=_0x546fae;switch(_0x2a4330[_0x5198f4(0x102)]&&this[_0x5198f4(0x144)][_0x5198f4(0xe7)](_0x2a4330[_0x5198f4(0x102)]),_0x2a4330[_0x5198f4(0x15a)]){case _0x57883f[_0x5198f4(0xf1)]:break;case _0x57883f['Reply']:{this[_0x5198f4(0x14f)][_0x5198f4(0x155)](_0x3f18e2,_0x31f53e,{'unitId':_0x3f18e2,'subUnitId':_0x31f53e,'ref':'','id':_0x2a4330[_0x5198f4(0x104)],'dT':_0x109d4e(+_0x2a4330[_0x5198f4(0x14c)]),'threadId':_0x2a4330['threadId'],'personId':(_0x351fbd=(_0x20c2ba=_0x2a4330[_0x5198f4(0x102)])==null?void 0x0:_0x20c2ba[_0x5198f4(0xe2)])!=null?_0x351fbd:_0x2a4330[_0x5198f4(0x110)],'text':JSON[_0x5198f4(0x128)](_0x2a4330[_0x5198f4(0xe1)]),'parentId':_0x546fae['id']});break;}case _0x57883f[_0x5198f4(0x127)]:{const _0x1f8880=this['_threadCommentModel'][_0x5198f4(0x11a)](_0x3f18e2,_0x31f53e,_0x2a4330[_0x5198f4(0x104)]);_0x1f8880&&_0x1f8880[_0x5198f4(0x118)]&&this[_0x5198f4(0x14f)][_0x5198f4(0x14a)](_0x3f18e2,_0x31f53e,_0x2a4330[_0x5198f4(0x104)]);break;}case _0x57883f[_0x5198f4(0x143)]:{this[_0x5198f4(0x14f)][_0x5198f4(0x124)](_0x3f18e2,_0x31f53e,{'commentId':_0x2a4330[_0x5198f4(0x104)],'text':JSON[_0x5198f4(0x128)](_0x2a4330[_0x5198f4(0xe1)])});break;}case _0x57883f[_0x5198f4(0x152)]:{const _0x5b50fa=this[_0x5198f4(0x14f)][_0x5198f4(0x166)](_0x3f18e2,_0x2a4330[_0x5198f4(0xf2)]);_0x5b50fa&&this[_0x5198f4(0x14f)][_0x5198f4(0xd8)](_0x3f18e2,_0x31f53e,_0x5b50fa['id'],_0x2a4330[_0x5198f4(0x107)]===_0x508652[_0x5198f4(0xd4)]);break;}}}));}};_0x25541b=_0x1d5190([_0x5436c4(0x0,_0x55f941[_0x293c7c(0xf5)](_0x3510d1[_0x293c7c(0xd9)])),_0x5436c4(0x1,_0x55f941['Inject'](_0x1c8f4d[_0x293c7c(0x151)])),_0x5436c4(0x2,_0x55f941[_0x293c7c(0xf5)](_0x55f941[_0x293c7c(0x103)])),_0x5436c4(0x3,_0x55f941['Inject'](_0x55f941['Injector']))],_0x25541b);const _0x5a6721='thread-comment-data-source.config',_0xecbc0b={};var _0x4847a0=Object[_0x293c7c(0xef)],_0x51e1e8=Object[_0x293c7c(0x100)],_0x532a74=(_0x2f94bf,_0x2f51fd,_0x29e454,_0x5e3578)=>{const _0x3351d0=_0x293c7c;for(var _0x379b93=_0x5e3578>0x1?void 0x0:_0x5e3578?_0x51e1e8(_0x2f51fd,_0x29e454):_0x2f51fd,_0x3779e1=_0x2f94bf[_0x3351d0(0x113)]-0x1,_0x257785;_0x3779e1>=0x0;_0x3779e1--)(_0x257785=_0x2f94bf[_0x3779e1])&&(_0x379b93=(_0x5e3578?_0x257785(_0x2f51fd,_0x29e454,_0x379b93):_0x257785(_0x379b93))||_0x379b93);return _0x5e3578&&_0x379b93&&_0x4847a0(_0x2f51fd,_0x29e454,_0x379b93),_0x379b93;},_0x3fb6f6=(_0x56c7ef,_0x1b063e)=>(_0x383e4e,_0x97fadb)=>_0x1b063e(_0x383e4e,_0x97fadb,_0x56c7ef);function _0x5d9c85(_0x1e58e1,_0xe02f6d){const _0x547416=_0x293c7c,_0x52ca7c=_0x1e58e1[_0x547416(0x157)][0x0];return{..._0xe02f6d,'id':_0x52ca7c[_0x547416(0x104)],'resolved':_0x1e58e1[_0x547416(0x107)]===0x1,'dT':_0x109d4e(_0x52ca7c[_0x547416(0x14c)]),'personId':_0x52ca7c[_0x547416(0x110)],'threadId':_0x52ca7c[_0x547416(0xf2)]};}function _0xe30bdf(_0x25c487,_0x314f37,_0x5ef148){const _0x531d3e=_0x293c7c;var _0x2e606e,_0x12ebb0;if(((_0x12ebb0=(_0x2e606e=_0x25c487==null?void 0x0:_0x25c487[_0x531d3e(0x157)])==null?void 0x0:_0x2e606e[_0x531d3e(0x113)])!=null?_0x12ebb0:0x0)>0x0){const _0x4c31fa=(_0x1cef93,_0xbc9ced)=>({'id':_0x1cef93['replyId'],'threadId':_0x1cef93[_0x531d3e(0xf2)],'dT':_0x109d4e(_0x1cef93[_0x531d3e(0x14c)]),'personId':_0x1cef93['userId'],'resolved':_0x25c487[_0x531d3e(0x107)]===_0x508652[_0x531d3e(0xd4)],'unitId':_0x314f37,'subUnitId':_0x5ef148,'text':JSON[_0x531d3e(0x128)](_0x1cef93[_0x531d3e(0xe1)]),'parentId':_0xbc9ced}),_0x2eefa2=_0x4c31fa(_0x25c487['replies'][0x0]);return{..._0x2eefa2,'children':_0x25c487['replies'][_0x531d3e(0x13d)](0x1)[_0x531d3e(0x129)](_0x1ebed6=>_0x4c31fa(_0x1ebed6,_0x2eefa2['id']))};}return null;}let _0x92d595=class{constructor(_0x223411,_0x6b665e,_0x20a37f,_0x2f2fd5){const _0x208d25=_0x293c7c;this[_0x208d25(0x120)]=_0x223411,this['_userService']=_0x6b665e,this[_0x208d25(0x111)]=_0x20a37f,this[_0x208d25(0x115)]=_0x2f2fd5;}async['addComment'](_0xb236e){const _0x345675=_0x293c7c;var _0x244601,_0x55bef6;const {parentId:_0x2bf684,unitId:_0x3c074a,text:_0x1ec7a6,threadId:_0xc6f2d7}=_0xb236e,_0x18a902=(_0x55bef6=(_0x244601=_0x1ec7a6[_0x345675(0x132)])==null?void 0x0:_0x244601[_0x345675(0xe4)](_0x180291=>_0x180291[_0x345675(0xd6)]===_0x55f941[_0x345675(0x10d)][_0x345675(0x116)])[_0x345675(0x129)](_0x162354=>_0x162354[_0x345675(0x146)]))!=null?_0x55bef6:[],_0x4f3814=JSON[_0x345675(0xec)](_0x1ec7a6),_0xfcaf71=(await this[_0x345675(0x111)][_0x345675(0xe3)](_0x3c074a))[_0x345675(0x13b)]();if(_0x2bf684){const _0x59990e={'memberId':_0xfcaf71,'unitId':_0x3c074a,'content':_0x4f3814,'mention':_0x18a902,'threadId':_0xc6f2d7},_0x32601a=(await this[_0x345675(0x120)][_0x345675(0xfd)](_0x345675(0x135)+_0x3c074a+'/reply',{'body':_0x59990e}))['body'][_0x345675(0x162)];return{..._0xb236e,'id':_0x32601a[_0x345675(0x104)],'dT':_0x49ecfc(+_0x32601a[_0x345675(0x14c)])[_0x345675(0xde)](_0x345675(0x122)),'personId':_0x32601a[_0x345675(0x110)]};}else{const _0x2fa959={'memberId':_0xfcaf71,'unitId':_0x3c074a,'content':_0x4f3814,'mention':_0x18a902},_0x1ee6e4=await this[_0x345675(0x120)]['post']('/universer-api/comment/unit/'+_0x3c074a+'/add',{'body':_0x2fa959});return _0x5d9c85(_0x1ee6e4[_0x345675(0x101)][_0x345675(0x134)],_0xb236e);}}async[_0x293c7c(0x124)](_0x52d485){const _0x686e4c=_0x293c7c;var _0xfe52ba,_0x2e8c05;const {text:_0x382e7c,unitId:_0x3320be}=_0x52d485,_0x1abc23=(_0x2e8c05=(_0xfe52ba=_0x382e7c['customRanges'])==null?void 0x0:_0xfe52ba[_0x686e4c(0xe4)](_0x3f4c95=>_0x3f4c95[_0x686e4c(0xd6)]===_0x55f941[_0x686e4c(0x10d)][_0x686e4c(0x116)])['map'](_0x14f11c=>_0x14f11c['rangeId']))!=null?_0x2e8c05:[],_0x3e5859=JSON[_0x686e4c(0xec)](_0x382e7c),_0x11c65b=_0x52d485[_0x686e4c(0xf2)],_0x250999=_0x52d485['id'],_0x5306ec={'memberId':(await this['_sessionService']['requireSession'](_0x3320be))[_0x686e4c(0x13b)](),'unitId':_0x3320be,'threadId':_0x11c65b,'mention':_0x1abc23,'content':_0x3e5859,'replyId':_0x250999},_0x1235e7=await this['_httpService']['post'](_0x686e4c(0x135)+_0x3320be+_0x686e4c(0x106),{'body':_0x5306ec});return!_0x1235e7[_0x686e4c(0x101)][_0x686e4c(0xff)]||_0x1235e7[_0x686e4c(0x101)][_0x686e4c(0xff)]['code']===0x1;}async['resolveComment'](_0x5ba4f4){const _0xf9e0a9=_0x293c7c,{unitId:_0x3c789f}=_0x5ba4f4,_0x291a4e=_0x5ba4f4[_0xf9e0a9(0xf2)],_0x24954b={'memberId':this[_0xf9e0a9(0x144)][_0xf9e0a9(0xe9)]()[_0xf9e0a9(0xe2)],'unitId':_0x3c789f,'threadId':_0x291a4e,'solved':_0x5ba4f4['resolved']?_0x508652['Solved']:_0x508652['OpenOrReOpen']},_0x49404b=await this[_0xf9e0a9(0x120)][_0xf9e0a9(0xfd)](_0xf9e0a9(0x135)+_0x3c789f+_0xf9e0a9(0x117),{'body':_0x24954b});return!_0x49404b[_0xf9e0a9(0x101)]['error']||_0x49404b['body']['error'][_0xf9e0a9(0x108)]===0x1;}async['deleteComment'](_0x2a03d9,_0x4f73ce,_0x4790b1,_0x3591e3){const _0x3d945c=_0x293c7c,_0x50ab24={'memberId':(await this[_0x3d945c(0x111)]['requireSession'](_0x2a03d9))['getMemberID'](),'threadId':_0x4790b1,'replyId':_0x3591e3,'unitId':_0x2a03d9},_0x82b6f1=await this['_httpService'][_0x3d945c(0xfd)](_0x3d945c(0x135)+_0x2a03d9+'/delete',{'body':_0x50ab24});return!_0x82b6f1['body'][_0x3d945c(0xff)]||_0x82b6f1[_0x3d945c(0x101)]['error'][_0x3d945c(0x108)]===0x1;}async[_0x293c7c(0x109)](_0x144908,_0x54516e,_0x4d80ff){const _0x50e6f5=_0x293c7c,_0x2d44db={'unitId':_0x144908,'threadId':_0x4d80ff},_0x3b519f=await this[_0x50e6f5(0x120)][_0x50e6f5(0xfd)](_0x50e6f5(0x135)+_0x144908+_0x50e6f5(0x12a),{'body':_0x2d44db}),_0x45aad9=_0x4d80ff[_0x50e6f5(0x129)](_0x123148=>_0xe30bdf(_0x3b519f[_0x50e6f5(0x101)][_0x50e6f5(0x130)][_0x123148],_0x144908,_0x54516e))[_0x50e6f5(0xe4)](Boolean);return Object['values'](_0x3b519f['body'][_0x50e6f5(0xf0)])[_0x50e6f5(0x11b)](_0x3bd846=>{const _0x1e3d96=_0x50e6f5;this[_0x1e3d96(0x144)][_0x1e3d96(0xe7)](_0x3bd846);}),_0x45aad9;}[_0x293c7c(0x10c)](_0x1c2022){const _0x447132=_0x293c7c;return{'id':_0x1c2022['id'],'threadId':_0x1c2022[_0x447132(0xf2)],'ref':_0x1c2022[_0x447132(0x147)]};}};_0x92d595=_0x532a74([_0x3fb6f6(0x0,_0x55f941['Inject'](_0x3d7abb[_0x293c7c(0x10a)])),_0x3fb6f6(0x1,_0x55f941['Inject'](_0x55f941[_0x293c7c(0x103)])),_0x3fb6f6(0x2,_0x55f941[_0x293c7c(0xf5)](_0x3510d1[_0x293c7c(0xe5)])),_0x3fb6f6(0x3,_0x55f941[_0x293c7c(0xf5)](_0x55f941['Injector']))],_0x92d595);var _0x369121=Object[_0x293c7c(0xef)],_0x33c2eb=Object[_0x293c7c(0x100)],_0x1e276e=(_0x11ded8,_0x240e4f,_0xd8a0db,_0x1d62a4)=>{for(var _0x306e21=_0x1d62a4>0x1?void 0x0:_0x1d62a4?_0x33c2eb(_0x240e4f,_0xd8a0db):_0x240e4f,_0x163c53=_0x11ded8['length']-0x1,_0xcccce3;_0x163c53>=0x0;_0x163c53--)(_0xcccce3=_0x11ded8[_0x163c53])&&(_0x306e21=(_0x1d62a4?_0xcccce3(_0x240e4f,_0xd8a0db,_0x306e21):_0xcccce3(_0x306e21))||_0x306e21);return _0x1d62a4&&_0x306e21&&_0x369121(_0x240e4f,_0xd8a0db,_0x306e21),_0x306e21;},_0x22e937=(_0x3c62a3,_0x58d7dc)=>(_0x59a4f4,_0xed0d69)=>_0x58d7dc(_0x59a4f4,_0xed0d69,_0x3c62a3);let _0x4806c0=class{constructor(_0x1a01b6){const _0x3ef537=_0x293c7c;this[_0x3ef537(0x120)]=_0x1a01b6;}async['getMentions'](_0x56f412,_0x493995,_0x302962){const _0x31661d=_0x293c7c,_0x588108=new URL(window[_0x31661d(0x148)][_0x31661d(0x105)])[_0x31661d(0x123)]['get'](_0x31661d(0xfb));if(!_0x588108)return[];const _0x43b584=window[_0x31661d(0x148)][_0x31661d(0x13f)],_0x150c98=window[_0x31661d(0x148)]['protocol']===_0x31661d(0x11c)?_0x31661d(0x121):_0x31661d(0x12e);return(await this['_httpService'][_0x31661d(0x141)](_0x150c98+_0x31661d(0xeb)+_0x43b584+_0x31661d(0x149),{'params':{'objectID':_0x588108,'unitID':_0x588108}}))[_0x31661d(0x101)][_0x31661d(0x14d)][_0x31661d(0x129)](_0x25b899=>{const _0x431a7e=_0x31661d;var _0x142e98,_0x19cc05,_0xc7f2d8,_0x195816,_0x6d541c,_0x5b7858;return{'id':(_0x19cc05=(_0x142e98=_0x25b899[_0x431a7e(0x163)])==null?void 0x0:_0x142e98[_0x431a7e(0xe2)])!=null?_0x19cc05:'','label':(_0x195816=(_0xc7f2d8=_0x25b899[_0x431a7e(0x163)])==null?void 0x0:_0xc7f2d8[_0x431a7e(0xea)])!=null?_0x195816:'','icon':(_0x5b7858=(_0x6d541c=_0x25b899[_0x431a7e(0x163)])==null?void 0x0:_0x6d541c[_0x431a7e(0xda)])!=null?_0x5b7858:'','type':_0x431a7e(0x102)};});}};_0x4806c0=_0x1e276e([_0x22e937(0x0,_0x55f941[_0x293c7c(0xf5)](_0x3d7abb[_0x293c7c(0x10a)]))],_0x4806c0);var _0x3a12ba=Object['defineProperty'],_0x409c36=Object[_0x293c7c(0x100)],_0x3c7197=(_0x19e691,_0x492a57,_0x5ab534,_0x7beea1)=>{for(var _0x460826=_0x7beea1>0x1?void 0x0:_0x7beea1?_0x409c36(_0x492a57,_0x5ab534):_0x492a57,_0x43a170=_0x19e691['length']-0x1,_0x2e89c2;_0x43a170>=0x0;_0x43a170--)(_0x2e89c2=_0x19e691[_0x43a170])&&(_0x460826=(_0x7beea1?_0x2e89c2(_0x492a57,_0x5ab534,_0x460826):_0x2e89c2(_0x460826))||_0x460826);return _0x7beea1&&_0x460826&&_0x3a12ba(_0x492a57,_0x5ab534,_0x460826),_0x460826;},_0x11062e=(_0x182bb8,_0x55faa4)=>(_0x5a80b2,_0x3d57a3)=>_0x55faa4(_0x5a80b2,_0x3d57a3,_0x182bb8);let _0x44c5ef=class extends _0x55f941[_0x293c7c(0xee)]{constructor(_0x59a04f,_0x228b36,_0x1520c3,_0x603e58){const _0x2b1021=_0x293c7c;super(),this[_0x2b1021(0x167)]=_0x59a04f,this['_threadCommentDataSource']=_0x228b36,this[_0x2b1021(0x114)]=_0x1520c3,this[_0x2b1021(0xed)]=_0x603e58,this[_0x2b1021(0x154)]();}['_initDataSource'](){const _0x23fe92=_0x293c7c;this[_0x23fe92(0x167)][_0x23fe92(0x15c)]=this[_0x23fe92(0xd5)],this['_threadCommentDataSourceService'][_0x23fe92(0xf6)]=!0x1,this[_0x23fe92(0x114)]['dataSource']=this[_0x23fe92(0xed)];}};_0x44c5ef=_0x3c7197([_0x11062e(0x0,_0x1c8f4d[_0x293c7c(0xf9)]),_0x11062e(0x1,_0x55f941[_0x293c7c(0xf5)](_0x92d595)),_0x11062e(0x2,_0x2509f9['IThreadCommentMentionDataService']),_0x11062e(0x3,_0x55f941['Inject'](_0x4806c0))],_0x44c5ef);var _0x57c4e3=Object[_0x293c7c(0xef)],_0x50017a=Object[_0x293c7c(0x100)],_0x5d9b2e=(_0x18210f,_0x2f4f90,_0x5d98a6)=>_0x2f4f90 in _0x18210f?_0x57c4e3(_0x18210f,_0x2f4f90,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5d98a6}):_0x18210f[_0x2f4f90]=_0x5d98a6,_0x6d0b92=(_0x4a49af,_0x2253a9,_0x1eed10,_0x1421a7)=>{const _0x498ccf=_0x293c7c;for(var _0x2d7fcc=_0x1421a7>0x1?void 0x0:_0x1421a7?_0x50017a(_0x2253a9,_0x1eed10):_0x2253a9,_0x3b2fcf=_0x4a49af[_0x498ccf(0x113)]-0x1,_0x4f41cd;_0x3b2fcf>=0x0;_0x3b2fcf--)(_0x4f41cd=_0x4a49af[_0x3b2fcf])&&(_0x2d7fcc=(_0x1421a7?_0x4f41cd(_0x2253a9,_0x1eed10,_0x2d7fcc):_0x4f41cd(_0x2d7fcc))||_0x2d7fcc);return _0x1421a7&&_0x2d7fcc&&_0x57c4e3(_0x2253a9,_0x1eed10,_0x2d7fcc),_0x2d7fcc;},_0x36feda=(_0x1c3920,_0x44ca51)=>(_0xa6b2f7,_0x2ddf2d)=>_0x44ca51(_0xa6b2f7,_0x2ddf2d,_0x1c3920),_0x5ac85a=(_0x10ee10,_0x39997e,_0xe684e3)=>_0x5d9b2e(_0x10ee10,typeof _0x39997e!=_0x293c7c(0x15e)?_0x39997e+'':_0x39997e,_0xe684e3);_0x44f0e4['UniverThreadCommentDataSourcePlugin']=class extends _0x55f941[_0x293c7c(0x15b)]{constructor(_0x46f8d3=_0xecbc0b,_0x10d168,_0x46c2bc){const _0x3b4344=_0x293c7c;super(),this[_0x3b4344(0x15f)]=_0x46f8d3,this[_0x3b4344(0x115)]=_0x10d168,this[_0x3b4344(0x158)]=_0x46c2bc;const {..._0x301750}=this[_0x3b4344(0x15f)];this[_0x3b4344(0x158)]['setConfig'](_0x5a6721,_0x301750);}['onStarting'](){const _0x5ce16a=_0x293c7c;[[_0x4806c0],[_0x92d595],[_0x44c5ef],[_0x25541b]][_0x5ce16a(0x11b)](_0x1ddef6=>{const _0x10675f=_0x5ce16a;this['_injector'][_0x10675f(0xf4)](_0x1ddef6);}),this[_0x5ce16a(0x115)][_0x5ce16a(0x141)](_0x44c5ef);}[_0x293c7c(0x153)](){const _0x1446a4=_0x293c7c;this[_0x1446a4(0x115)][_0x1446a4(0x141)](_0x25541b);}},_0x5ac85a(_0x44f0e4[_0x293c7c(0x159)],_0x293c7c(0xd3),_0x44e02d),_0x5ac85a(_0x44f0e4['UniverThreadCommentDataSourcePlugin'],'type',_0x55f941[_0x293c7c(0x140)][_0x293c7c(0x14b)]),_0x44f0e4[_0x293c7c(0x159)]=_0x6d0b92([_0x55f941['DependentOn'](_0x1c8f4d['UniverThreadCommentPlugin'],_0x2509f9[_0x293c7c(0x12c)],_0x3510d1['UniverCollaborationClientPlugin'],_0x22a343[_0x293c7c(0x10e)]),_0x36feda(0x1,_0x55f941['Inject'](_0x55f941[_0x293c7c(0x138)])),_0x36feda(0x2,_0x55f941[_0x293c7c(0x165)])],_0x44f0e4['UniverThreadCommentDataSourcePlugin']),Object[_0x293c7c(0xef)](_0x44f0e4,Symbol['toStringTag'],{'value':_0x293c7c(0x12d)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-nightly.202410101606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,31 +45,31 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"dayjs": ">=1.11.0",
|
|
47
47
|
"rxjs": ">=7.0.0",
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.3.0-
|
|
49
|
-
"@univerjs-pro/license": "0.3.0-
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.3.0-
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.3.0-
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.3.0-nightly.202410101606",
|
|
49
|
+
"@univerjs-pro/license": "0.3.0-nightly.202410101606",
|
|
50
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
51
|
+
"@univerjs/network": "0.3.0-nightly.202410101606",
|
|
52
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410101606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410101606"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
|
-
"@univerjs-pro/collaboration-client": "0.3.0-
|
|
58
|
-
"@univerjs-pro/
|
|
59
|
-
"@univerjs-pro/
|
|
60
|
-
"@univerjs/network": "0.3.0-
|
|
61
|
-
"@univerjs/
|
|
62
|
-
"@univerjs/
|
|
63
|
-
"@univerjs/thread-comment": "0.3.0-
|
|
64
|
-
"@univerjs/thread-comment-ui": "0.3.0-
|
|
65
|
-
"@univerjs/uniscript": "0.3.0-
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.3.0-nightly.202410101606",
|
|
58
|
+
"@univerjs-pro/facade": "0.3.0-nightly.202410101606",
|
|
59
|
+
"@univerjs-pro/license": "0.3.0-nightly.202410101606",
|
|
60
|
+
"@univerjs/network": "0.3.0-nightly.202410101606",
|
|
61
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
62
|
+
"@univerjs/protocol": "0.1.39-alpha.24",
|
|
63
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410101606",
|
|
64
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410101606",
|
|
65
|
+
"@univerjs/uniscript": "0.3.0-nightly.202410101606"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"rxjs": "^7.8.1",
|
|
69
69
|
"typescript": "^5.6.2",
|
|
70
70
|
"vite": "^5.4.8",
|
|
71
71
|
"vitest": "^2.1.1",
|
|
72
|
-
"@univerjs-infra/shared": "0.3.0
|
|
72
|
+
"@univerjs-infra/shared": "0.3.0"
|
|
73
73
|
},
|
|
74
74
|
"univerSpace": {
|
|
75
75
|
".": {
|
|
@@ -89,7 +89,6 @@
|
|
|
89
89
|
"test:watch": "vitest",
|
|
90
90
|
"coverage": "vitest run --coverage",
|
|
91
91
|
"lint:types": "tsc --noEmit",
|
|
92
|
-
"build": "tsc && vite build"
|
|
93
|
-
"sync:pro:cnpm": "cnpm sync"
|
|
92
|
+
"build": "tsc && vite build"
|
|
94
93
|
}
|
|
95
94
|
}
|