@univerjs-pro/thread-comment-datasource 0.3.0-alpha.1 → 0.3.0-nightly.202410111606
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 _0x14e1af=_0x17a2;(function(_0x32d0a8,_0x44a11a){const _0x3de674=_0x17a2,_0x29b8e4=_0x32d0a8();while(!![]){try{const _0x1724fa=parseInt(_0x3de674(0x1f3))/0x1+parseInt(_0x3de674(0x1db))/0x2+-parseInt(_0x3de674(0x223))/0x3+parseInt(_0x3de674(0x1c6))/0x4*(parseInt(_0x3de674(0x1fd))/0x5)+parseInt(_0x3de674(0x202))/0x6+-parseInt(_0x3de674(0x1ea))/0x7*(parseInt(_0x3de674(0x210))/0x8)+-parseInt(_0x3de674(0x1d6))/0x9*(-parseInt(_0x3de674(0x1cd))/0xa);if(_0x1724fa===_0x44a11a)break;else _0x29b8e4['push'](_0x29b8e4['shift']());}catch(_0x3357e6){_0x29b8e4['push'](_0x29b8e4['shift']());}}}(_0x9769,0xbb6af));Object[_0x14e1af(0x1d2)](exports,Symbol['toStringTag'],{'value':'Module'});const c=require(_0x14e1af(0x1e0)),g=require('@univerjs/thread-comment'),N=require(_0x14e1af(0x1d7)),O=require('@univerjs-pro/collaboration-client'),E=require(_0x14e1af(0x21e)),q=require(_0x14e1af(0x1c5)),P=require(_0x14e1af(0x1f4)),$=require(_0x14e1af(0x1ce)),x=_0x14e1af(0x1e9);var p=(_0x105048=>(_0x105048[_0x105048[_0x14e1af(0x212)]=0x0]='OpenOrReOpen',_0x105048[_0x105048[_0x14e1af(0x1ef)]=0x1]=_0x14e1af(0x1ef),_0x105048[_0x105048[_0x14e1af(0x20d)]=-0x1]=_0x14e1af(0x20d),_0x105048))(p||{}),v=(_0x2ffb75=>(_0x2ffb75[_0x2ffb75[_0x14e1af(0x215)]=0x0]=_0x14e1af(0x215),_0x2ffb75[_0x2ffb75[_0x14e1af(0x1d1)]=0x1]='Add',_0x2ffb75[_0x2ffb75['Reply']=0x2]='Reply',_0x2ffb75[_0x2ffb75[_0x14e1af(0x228)]=0x3]=_0x14e1af(0x228),_0x2ffb75[_0x2ffb75[_0x14e1af(0x1e2)]=0x4]=_0x14e1af(0x1e2),_0x2ffb75[_0x2ffb75['Solve']=0x5]=_0x14e1af(0x201),_0x2ffb75[_0x2ffb75[_0x14e1af(0x20d)]=-0x1]=_0x14e1af(0x20d),_0x2ffb75))(v||{});const y=_0x70ae20=>$(new Date(+_0x70ae20))[_0x14e1af(0x1cc)](_0x14e1af(0x1de)),Y=async(_0x5185d6,_0x2eb56f)=>{const _0x3e233f=_0x14e1af,_0x3eb6d9=_0x5185d6[_0x3e233f(0x1d5)](c[_0x3e233f(0x1b9)]),_0x20fc0c=_0x5185d6[_0x3e233f(0x1d5)](P[_0x3e233f(0x219)]);_0x2eb56f[_0x3e233f(0x1e3)](_0x3336c3=>{const _0x58eebc=_0x3e233f;_0x3eb6d9[_0x58eebc(0x1ba)](_0x3336c3)&&_0x2eb56f[_0x58eebc(0x20e)](_0x3336c3);}),_0x2eb56f[_0x3e233f(0x22d)]&&(await _0x20fc0c[_0x3e233f(0x1d5)](_0x3e233f(0x221),{'params':{'userIDs':[..._0x2eb56f]}}))[_0x3e233f(0x1f6)][_0x3e233f(0x1ed)][_0x3e233f(0x1e3)](_0x567853=>{const _0x27d111=_0x3e233f;_0x567853&&_0x3eb6d9[_0x27d111(0x20c)](_0x567853);});};function _0x9769(){const _0x5302c6=['get','657JySGLy','@univerjs/thread-comment-ui','Reply','user','DependentOn','1008240MYQRst','rangeType','type','YYYY/MM/DD\x20HH:mm','getThread','@univerjs/core','CustomRangeType','Delete','forEach','comments','_threadCommentDataSource','_userService','/add','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','811951TKaTZk','getComment','thread-comment-data-source.config','users','_init','Solved','/universer-api/comment/unit/','protocol','solved','344028Bialzr','@univerjs/network','_threadCommentMentionDataSource','body','getOwnPropertyDescriptor','/solved','disposeWithMe','resolved','onReady','listComments','35rzJLZI','setConfig','add','UniverThreadCommentUIPlugin','Solve','199962ORqSdl','UNIVER_UNKNOWN','host','replyId','post','error','slice','http','getMentions','Plugin','addUser','UNRECOGNIZED','delete','IThreadCommentDataSourceService','8jmImrM','IConfigService','OpenOrReOpen','bufferTime','subject','Unknown','_sessionService','location','subscribe','HTTPService','_initUserSync','customRanges','parentId','_injector','@univerjs-pro/license','_threadCommentModel','length','/universer-api/user/list','saveCommentToSnapshot','1269612qTIuEV','userID','addComment','_threadCommentMentionDataService','requireSession','Edit','_configService','/universer-api/authz/collaborator','_initDataSource','/reply','size','/edit','https','getMemberID','replies','resolveComment','UniverInstanceType','pluginName','_httpService','deleteComment','dataSource','pipe','userId','createTimestamp','updateComment','searchParams','Disposable','comment','code','threadId','UserManagerService','getUser','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','filter','content','CollaborationSessionService','COMMENT','_threadCommentDataSourceService','rangeId','CommentService','Inject','rxjs','46144iptovE','map','getCurrentUser','onStarting','avatar','Injector','format','47210ViUfRd','dayjs','parse','_commentService','Add','defineProperty','reply','stringify'];_0x9769=function(){return _0x5302c6;};return _0x9769();}function _0x17a2(_0x3d6b7c,_0x41550a){const _0x17a227=_0x9769();return _0x17a2=function(_0xfb9465,_0x24ef61){_0xfb9465=_0xfb9465-0x1b0;let _0x2b024a=_0x17a227[_0xfb9465];return _0x2b024a;},_0x17a2(_0x3d6b7c,_0x41550a);}var G=Object[_0x14e1af(0x1d2)],H=Object[_0x14e1af(0x1f7)],A=(_0xf42add,_0x27ea88,_0x44258f,_0x4c18ce)=>{const _0x395476=_0x14e1af;for(var _0x2bfedc=_0x4c18ce>0x1?void 0x0:_0x4c18ce?H(_0x27ea88,_0x44258f):_0x27ea88,_0x4c1047=_0xf42add[_0x395476(0x220)]-0x1,_0x30509f;_0x4c1047>=0x0;_0x4c1047--)(_0x30509f=_0xf42add[_0x4c1047])&&(_0x2bfedc=(_0x4c18ce?_0x30509f(_0x27ea88,_0x44258f,_0x2bfedc):_0x30509f(_0x2bfedc))||_0x2bfedc);return _0x4c18ce&&_0x2bfedc&&G(_0x27ea88,_0x44258f,_0x2bfedc),_0x2bfedc;},I=(_0x35a37d,_0x5b3479)=>(_0x2a6f59,_0x572bc2)=>_0x5b3479(_0x2a6f59,_0x572bc2,_0x35a37d);let f=class extends c[_0x14e1af(0x1b5)]{constructor(_0x52249c,_0x201383,_0xdd4560,_0x59ece5){const _0x2de77b=_0x14e1af;super(),this['_commentService']=_0x52249c,this[_0x2de77b(0x21f)]=_0x201383,this[_0x2de77b(0x1e6)]=_0xdd4560,this[_0x2de77b(0x21d)]=_0x59ece5,this[_0x2de77b(0x1ee)](),this[_0x2de77b(0x21a)]();}[_0x14e1af(0x21a)](){const _0x98360a=_0x14e1af;this[_0x98360a(0x1f9)](this[_0x98360a(0x21f)]['commentUpdate$'][_0x98360a(0x1b0)](q[_0x98360a(0x213)](0x10))[_0x98360a(0x218)](_0x33458d=>{const _0xdfeb1f=_0x98360a,_0x4ed383=new Set();_0x33458d[_0xdfeb1f(0x1e3)](_0x4887d9=>{const _0x3775da=_0xdfeb1f;switch(_0x4887d9[_0x3775da(0x1dd)]){case _0x3775da(0x1ff):{const _0x879512=_0x4887d9['payload']['personId'];_0x4ed383[_0x3775da(0x1ff)](_0x879512);break;}}}),Y(this[_0xdfeb1f(0x21d)],_0x4ed383);}));}[_0x14e1af(0x1ee)](){const _0x1e634d=_0x14e1af;this['disposeWithMe'](this[_0x1e634d(0x1d0)]['commentUpdate$'][_0x1e634d(0x218)](async _0x37e33e=>{const _0x2c07f6=_0x1e634d;var _0x43c84d,_0x5e39dd;const _0x2418dd=this[_0x2c07f6(0x21f)]['getThread'](_0x37e33e['unitId'],_0x37e33e[_0x2c07f6(0x1b8)]);if(!_0x2418dd)return;const {unitId:_0x453c6f,subUnitId:_0x183247}=_0x2418dd;switch(_0x37e33e[_0x2c07f6(0x1d9)]&&this[_0x2c07f6(0x1e6)][_0x2c07f6(0x20c)](_0x37e33e[_0x2c07f6(0x1d9)]),_0x37e33e[_0x2c07f6(0x1dd)]){case v[_0x2c07f6(0x1d1)]:break;case v[_0x2c07f6(0x1d8)]:{this[_0x2c07f6(0x21f)][_0x2c07f6(0x225)](_0x453c6f,_0x183247,{'unitId':_0x453c6f,'subUnitId':_0x183247,'ref':'','id':_0x37e33e['replyId'],'dT':y(+_0x37e33e['createTimestamp']),'threadId':_0x37e33e[_0x2c07f6(0x1b8)],'personId':(_0x5e39dd=(_0x43c84d=_0x37e33e[_0x2c07f6(0x1d9)])==null?void 0x0:_0x43c84d[_0x2c07f6(0x224)])!=null?_0x5e39dd:_0x37e33e[_0x2c07f6(0x1b1)],'text':JSON[_0x2c07f6(0x1cf)](_0x37e33e['content']),'parentId':_0x2418dd['id']});break;}case v[_0x2c07f6(0x1e2)]:{const _0x26e22f=this['_threadCommentModel'][_0x2c07f6(0x1eb)](_0x453c6f,_0x183247,_0x37e33e[_0x2c07f6(0x205)]);_0x26e22f&&_0x26e22f[_0x2c07f6(0x21c)]&&this[_0x2c07f6(0x21f)][_0x2c07f6(0x236)](_0x453c6f,_0x183247,_0x37e33e[_0x2c07f6(0x205)]);break;}case v['Edit']:{this[_0x2c07f6(0x21f)][_0x2c07f6(0x1b3)](_0x453c6f,_0x183247,{'commentId':_0x37e33e[_0x2c07f6(0x205)],'text':JSON[_0x2c07f6(0x1cf)](_0x37e33e['content'])});break;}case v[_0x2c07f6(0x201)]:{const _0x336ac0=this['_threadCommentModel'][_0x2c07f6(0x1df)](_0x453c6f,_0x37e33e[_0x2c07f6(0x1b8)]);_0x336ac0&&this[_0x2c07f6(0x21f)]['resolveComment'](_0x453c6f,_0x183247,_0x336ac0['id'],_0x37e33e['solved']===p[_0x2c07f6(0x1ef)]);break;}}}));}};f=A([I(0x0,c[_0x14e1af(0x1c4)](O[_0x14e1af(0x1c3)])),I(0x1,c[_0x14e1af(0x1c4)](g['ThreadCommentModel'])),I(0x2,c[_0x14e1af(0x1c4)](c[_0x14e1af(0x1b9)])),I(0x3,c['Inject'](c['Injector']))],f);const J=_0x14e1af(0x1ec),L={};var F=Object[_0x14e1af(0x1d2)],Z=Object[_0x14e1af(0x1f7)],W=(_0x675c2e,_0x1568a2,_0x34c044,_0x389f10)=>{const _0x53900f=_0x14e1af;for(var _0x2a190c=_0x389f10>0x1?void 0x0:_0x389f10?Z(_0x1568a2,_0x34c044):_0x1568a2,_0x18ad19=_0x675c2e[_0x53900f(0x220)]-0x1,_0x3d6f1e;_0x18ad19>=0x0;_0x18ad19--)(_0x3d6f1e=_0x675c2e[_0x18ad19])&&(_0x2a190c=(_0x389f10?_0x3d6f1e(_0x1568a2,_0x34c044,_0x2a190c):_0x3d6f1e(_0x2a190c))||_0x2a190c);return _0x389f10&&_0x2a190c&&F(_0x1568a2,_0x34c044,_0x2a190c),_0x2a190c;},_=(_0x4baf9c,_0x32d63f)=>(_0x146efd,_0x8c43fb)=>_0x32d63f(_0x146efd,_0x8c43fb,_0x4baf9c);function z(_0x16a50e,_0x1b8ec2){const _0x69fdb3=_0x14e1af,_0xc79f57=_0x16a50e[_0x69fdb3(0x231)][0x0];return{..._0x1b8ec2,'id':_0xc79f57['replyId'],'resolved':_0x16a50e[_0x69fdb3(0x1f2)]===0x1,'dT':y(_0xc79f57[_0x69fdb3(0x1b2)]),'personId':_0xc79f57[_0x69fdb3(0x1b1)],'threadId':_0xc79f57[_0x69fdb3(0x1b8)]};}function B(_0x54b507,_0x4d98e0,_0x217861){const _0x3a3a7=_0x14e1af;var _0x1bc722,_0x3abd39;if(((_0x3abd39=(_0x1bc722=_0x54b507==null?void 0x0:_0x54b507['replies'])==null?void 0x0:_0x1bc722[_0x3a3a7(0x220)])!=null?_0x3abd39:0x0)>0x0){const _0x286d5e=(_0x5da1bd,_0x5a2070)=>({'id':_0x5da1bd[_0x3a3a7(0x205)],'threadId':_0x5da1bd['threadId'],'dT':y(_0x5da1bd[_0x3a3a7(0x1b2)]),'personId':_0x5da1bd['userId'],'resolved':_0x54b507[_0x3a3a7(0x1f2)]===p[_0x3a3a7(0x1ef)],'unitId':_0x4d98e0,'subUnitId':_0x217861,'text':JSON[_0x3a3a7(0x1cf)](_0x5da1bd[_0x3a3a7(0x1be)]),'parentId':_0x5a2070}),_0x1a818f=_0x286d5e(_0x54b507['replies'][0x0]);return{..._0x1a818f,'children':_0x54b507['replies'][_0x3a3a7(0x208)](0x1)[_0x3a3a7(0x1c7)](_0x3261af=>_0x286d5e(_0x3261af,_0x1a818f['id']))};}return null;}let b=class{constructor(_0x182c4b,_0x394037,_0x3c865d,_0x305069){const _0x2bb5c7=_0x14e1af;this['_httpService']=_0x182c4b,this[_0x2bb5c7(0x1e6)]=_0x394037,this[_0x2bb5c7(0x216)]=_0x3c865d,this[_0x2bb5c7(0x21d)]=_0x305069;}async[_0x14e1af(0x225)](_0x291266){const _0x66a890=_0x14e1af;var _0x2c9630,_0x23d608;const {parentId:_0x9538d6,unitId:_0x3cb65d,text:_0x2b8fec,threadId:_0x2fa92a}=_0x291266,_0x1f083d=(_0x23d608=(_0x2c9630=_0x2b8fec[_0x66a890(0x21b)])==null?void 0x0:_0x2c9630[_0x66a890(0x1bd)](_0x377d46=>_0x377d46[_0x66a890(0x1dc)]===c[_0x66a890(0x1e1)][_0x66a890(0x1c0)])['map'](_0x430fc4=>_0x430fc4['rangeId']))!=null?_0x23d608:[],_0x49daf0=JSON[_0x66a890(0x1d4)](_0x2b8fec),_0xaaccfb=(await this[_0x66a890(0x216)][_0x66a890(0x227)](_0x3cb65d))[_0x66a890(0x230)]();if(_0x9538d6){const _0x16ef09={'memberId':_0xaaccfb,'unitId':_0x3cb65d,'content':_0x49daf0,'mention':_0x1f083d,'threadId':_0x2fa92a},_0x470508=(await this[_0x66a890(0x235)][_0x66a890(0x206)](_0x66a890(0x1f0)+_0x3cb65d+_0x66a890(0x22c),{'body':_0x16ef09}))[_0x66a890(0x1f6)][_0x66a890(0x1d3)];return{..._0x291266,'id':_0x470508[_0x66a890(0x205)],'dT':$(+_0x470508[_0x66a890(0x1b2)])[_0x66a890(0x1cc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x470508[_0x66a890(0x1b1)]};}else{const _0x434786={'memberId':_0xaaccfb,'unitId':_0x3cb65d,'content':_0x49daf0,'mention':_0x1f083d},_0x22388f=await this['_httpService']['post'](_0x66a890(0x1f0)+_0x3cb65d+_0x66a890(0x1e7),{'body':_0x434786});return z(_0x22388f[_0x66a890(0x1f6)][_0x66a890(0x1b6)],_0x291266);}}async[_0x14e1af(0x1b3)](_0xbebcc5){const _0x14d583=_0x14e1af;var _0x24842a,_0x3d267e;const {text:_0x2584d4,unitId:_0x374c07}=_0xbebcc5,_0x10445e=(_0x3d267e=(_0x24842a=_0x2584d4[_0x14d583(0x21b)])==null?void 0x0:_0x24842a['filter'](_0x3f824a=>_0x3f824a[_0x14d583(0x1dc)]===c[_0x14d583(0x1e1)]['COMMENT'])[_0x14d583(0x1c7)](_0x159463=>_0x159463[_0x14d583(0x1c2)]))!=null?_0x3d267e:[],_0x1c5523=JSON[_0x14d583(0x1d4)](_0x2584d4),_0x3bf93e=_0xbebcc5['threadId'],_0x419178=_0xbebcc5['id'],_0x42e55d={'memberId':(await this[_0x14d583(0x216)][_0x14d583(0x227)](_0x374c07))['getMemberID'](),'unitId':_0x374c07,'threadId':_0x3bf93e,'mention':_0x10445e,'content':_0x1c5523,'replyId':_0x419178},_0x8c1c36=await this[_0x14d583(0x235)][_0x14d583(0x206)](_0x14d583(0x1f0)+_0x374c07+_0x14d583(0x22e),{'body':_0x42e55d});return!_0x8c1c36['body'][_0x14d583(0x207)]||_0x8c1c36['body'][_0x14d583(0x207)]['code']===0x1;}async[_0x14e1af(0x232)](_0x23480b){const _0x2fd152=_0x14e1af,{unitId:_0x1dc756}=_0x23480b,_0x10eb56=_0x23480b['threadId'],_0x9e69d7={'memberId':this['_userService'][_0x2fd152(0x1c8)]()['userID'],'unitId':_0x1dc756,'threadId':_0x10eb56,'solved':_0x23480b[_0x2fd152(0x1fa)]?p[_0x2fd152(0x1ef)]:p[_0x2fd152(0x212)]},_0x4f9772=await this[_0x2fd152(0x235)][_0x2fd152(0x206)]('/universer-api/comment/unit/'+_0x1dc756+_0x2fd152(0x1f8),{'body':_0x9e69d7});return!_0x4f9772[_0x2fd152(0x1f6)][_0x2fd152(0x207)]||_0x4f9772[_0x2fd152(0x1f6)]['error'][_0x2fd152(0x1b7)]===0x1;}async[_0x14e1af(0x236)](_0x5c1d24,_0x38f2be,_0x1b440d,_0x2a4ed3){const _0x39bfa0=_0x14e1af,_0xbe120={'memberId':(await this[_0x39bfa0(0x216)][_0x39bfa0(0x227)](_0x5c1d24))['getMemberID'](),'threadId':_0x1b440d,'replyId':_0x2a4ed3,'unitId':_0x5c1d24},_0x5b88ab=await this['_httpService'][_0x39bfa0(0x206)](_0x39bfa0(0x1f0)+_0x5c1d24+'/delete',{'body':_0xbe120});return!_0x5b88ab[_0x39bfa0(0x1f6)]['error']||_0x5b88ab['body']['error'][_0x39bfa0(0x1b7)]===0x1;}async[_0x14e1af(0x1fc)](_0x235e6b,_0x536da0,_0x2a5e1e){const _0x38acf0=_0x14e1af,_0x292298={'unitId':_0x235e6b,'threadId':_0x2a5e1e},_0x27f115=await this[_0x38acf0(0x235)]['post'](_0x38acf0(0x1f0)+_0x235e6b+'/list',{'body':_0x292298}),_0x121e0f=_0x2a5e1e[_0x38acf0(0x1c7)](_0x48cb70=>B(_0x27f115[_0x38acf0(0x1f6)][_0x38acf0(0x1e4)][_0x48cb70],_0x235e6b,_0x536da0))[_0x38acf0(0x1bd)](Boolean);return Object['values'](_0x27f115[_0x38acf0(0x1f6)][_0x38acf0(0x1ed)])[_0x38acf0(0x1e3)](_0x2a3ed5=>{const _0x10c941=_0x38acf0;this['_userService'][_0x10c941(0x20c)](_0x2a3ed5);}),_0x121e0f;}[_0x14e1af(0x222)](_0x257431){const _0x19a695=_0x14e1af;return{'id':_0x257431['id'],'threadId':_0x257431[_0x19a695(0x1b8)],'ref':_0x257431['ref']};}};b=W([_(0x0,c['Inject'](P[_0x14e1af(0x219)])),_(0x1,c['Inject'](c['UserManagerService'])),_(0x2,c['Inject'](O[_0x14e1af(0x1bf)])),_(0x3,c[_0x14e1af(0x1c4)](c[_0x14e1af(0x1cb)]))],b);var K=Object[_0x14e1af(0x1d2)],V=Object[_0x14e1af(0x1f7)],Q=(_0xf3e6eb,_0x4abd22,_0x268f5c,_0x55389c)=>{const _0x503aad=_0x14e1af;for(var _0x386412=_0x55389c>0x1?void 0x0:_0x55389c?V(_0x4abd22,_0x268f5c):_0x4abd22,_0x550838=_0xf3e6eb[_0x503aad(0x220)]-0x1,_0x5e53c5;_0x550838>=0x0;_0x550838--)(_0x5e53c5=_0xf3e6eb[_0x550838])&&(_0x386412=(_0x55389c?_0x5e53c5(_0x4abd22,_0x268f5c,_0x386412):_0x5e53c5(_0x386412))||_0x386412);return _0x55389c&&_0x386412&&K(_0x4abd22,_0x268f5c,_0x386412),_0x386412;},X=(_0x3126aa,_0x26defd)=>(_0x5a38e9,_0x2d5853)=>_0x26defd(_0x5a38e9,_0x2d5853,_0x3126aa);let C=class{constructor(_0x52329a){this['_httpService']=_0x52329a;}async[_0x14e1af(0x20a)](_0x274dc9,_0x1fc55c,_0x4fbf2f){const _0x4a0472=_0x14e1af,_0x148bc9=new URL(window[_0x4a0472(0x217)]['href'])[_0x4a0472(0x1b4)][_0x4a0472(0x1d5)]('unit');if(!_0x148bc9)return[];const _0x425b5e=window[_0x4a0472(0x217)][_0x4a0472(0x204)],_0x32cffb=window[_0x4a0472(0x217)][_0x4a0472(0x1f1)]==='https:'?_0x4a0472(0x22f):_0x4a0472(0x209);return(await this[_0x4a0472(0x235)][_0x4a0472(0x1d5)](_0x32cffb+'://'+_0x425b5e+_0x4a0472(0x22a),{'params':{'objectID':_0x148bc9,'unitID':_0x148bc9}}))[_0x4a0472(0x1f6)]['collaborators']['map'](_0xec1536=>{const _0x5c098d=_0x4a0472;var _0x30c742,_0x5d57f7,_0x2af975,_0x575774,_0xe0ba59,_0x4ecc52;return{'id':(_0x5d57f7=(_0x30c742=_0xec1536[_0x5c098d(0x214)])==null?void 0x0:_0x30c742[_0x5c098d(0x224)])!=null?_0x5d57f7:'','label':(_0x575774=(_0x2af975=_0xec1536['subject'])==null?void 0x0:_0x2af975['name'])!=null?_0x575774:'','icon':(_0x4ecc52=(_0xe0ba59=_0xec1536[_0x5c098d(0x214)])==null?void 0x0:_0xe0ba59[_0x5c098d(0x1ca)])!=null?_0x4ecc52:'','type':'user'};});}};C=Q([X(0x0,c[_0x14e1af(0x1c4)](P[_0x14e1af(0x219)]))],C);var k=Object[_0x14e1af(0x1d2)],ee=Object[_0x14e1af(0x1f7)],re=(_0x4b8322,_0x2cb96b,_0x13c485,_0x220258)=>{const _0x59a28a=_0x14e1af;for(var _0x27c8de=_0x220258>0x1?void 0x0:_0x220258?ee(_0x2cb96b,_0x13c485):_0x2cb96b,_0x323100=_0x4b8322[_0x59a28a(0x220)]-0x1,_0x46e3ef;_0x323100>=0x0;_0x323100--)(_0x46e3ef=_0x4b8322[_0x323100])&&(_0x27c8de=(_0x220258?_0x46e3ef(_0x2cb96b,_0x13c485,_0x27c8de):_0x46e3ef(_0x27c8de))||_0x27c8de);return _0x220258&&_0x27c8de&&k(_0x2cb96b,_0x13c485,_0x27c8de),_0x27c8de;},S=(_0x101bd5,_0x529034)=>(_0xe0ce34,_0x29f0f2)=>_0x529034(_0xe0ce34,_0x29f0f2,_0x101bd5);let D=class extends c['Disposable']{constructor(_0x5c3beb,_0x27c767,_0x4bfa3d,_0x2ebb7d){const _0x162ae4=_0x14e1af;super(),this[_0x162ae4(0x1c1)]=_0x5c3beb,this[_0x162ae4(0x1e5)]=_0x27c767,this[_0x162ae4(0x226)]=_0x4bfa3d,this[_0x162ae4(0x1f5)]=_0x2ebb7d,this[_0x162ae4(0x22b)]();}[_0x14e1af(0x22b)](){const _0x41e7c9=_0x14e1af;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this[_0x41e7c9(0x226)][_0x41e7c9(0x237)]=this[_0x41e7c9(0x1f5)];}};D=re([S(0x0,g[_0x14e1af(0x20f)]),S(0x1,c[_0x14e1af(0x1c4)](b)),S(0x2,N['IThreadCommentMentionDataService']),S(0x3,c[_0x14e1af(0x1c4)](C))],D);var U=Object[_0x14e1af(0x1d2)],te=Object[_0x14e1af(0x1f7)],se=(_0x25ef1e,_0x56db9a,_0x5acd03)=>_0x56db9a in _0x25ef1e?U(_0x25ef1e,_0x56db9a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5acd03}):_0x25ef1e[_0x56db9a]=_0x5acd03,ne=(_0x49b864,_0x277de9,_0x39ffba,_0x3c0384)=>{const _0xf46c42=_0x14e1af;for(var _0x3ca9e9=_0x3c0384>0x1?void 0x0:_0x3c0384?te(_0x277de9,_0x39ffba):_0x277de9,_0x53838e=_0x49b864[_0xf46c42(0x220)]-0x1,_0x5de808;_0x53838e>=0x0;_0x53838e--)(_0x5de808=_0x49b864[_0x53838e])&&(_0x3ca9e9=(_0x3c0384?_0x5de808(_0x277de9,_0x39ffba,_0x3ca9e9):_0x5de808(_0x3ca9e9))||_0x3ca9e9);return _0x3c0384&&_0x3ca9e9&&U(_0x277de9,_0x39ffba,_0x3ca9e9),_0x3ca9e9;},T=(_0x436054,_0x564122)=>(_0x451c03,_0x9c3860)=>_0x564122(_0x451c03,_0x9c3860,_0x436054),R=(_0x9789c7,_0x3419a0,_0x10a084)=>se(_0x9789c7,typeof _0x3419a0!='symbol'?_0x3419a0+'':_0x3419a0,_0x10a084);exports[_0x14e1af(0x1bb)]=class extends c[_0x14e1af(0x20b)]{constructor(_0x3ac106=L,_0x410ac7,_0x5b59c2){const _0x5d328a=_0x14e1af;super(),this['_config']=_0x3ac106,this[_0x5d328a(0x21d)]=_0x410ac7,this[_0x5d328a(0x229)]=_0x5b59c2;const {..._0x28966a}=this['_config'];this[_0x5d328a(0x229)][_0x5d328a(0x1fe)](J,_0x28966a);}[_0x14e1af(0x1c9)](){const _0x3b7b3f=_0x14e1af;[[C],[b],[D],[f]][_0x3b7b3f(0x1e3)](_0x45abf1=>{const _0x176946=_0x3b7b3f;this[_0x176946(0x21d)][_0x176946(0x1ff)](_0x45abf1);}),this[_0x3b7b3f(0x21d)]['get'](D);}[_0x14e1af(0x1fb)](){const _0x271531=_0x14e1af;this[_0x271531(0x21d)]['get'](f);}},R(exports['UniverThreadCommentDataSourcePlugin'],_0x14e1af(0x234),x),R(exports[_0x14e1af(0x1bb)],_0x14e1af(0x1dd),c[_0x14e1af(0x233)][_0x14e1af(0x203)]),exports['UniverThreadCommentDataSourcePlugin']=ne([c[_0x14e1af(0x1da)](g['UniverThreadCommentPlugin'],N[_0x14e1af(0x200)],O[_0x14e1af(0x1bc)],E[_0x14e1af(0x1e8)]),T(0x1,c[_0x14e1af(0x1c4)](c[_0x14e1af(0x1cb)])),T(0x2,c[_0x14e1af(0x211)])],exports[_0x14e1af(0x1bb)]);
|
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 _0x3b2c7c=_0x58a5;(function(_0x1b7f20,_0x47dc67){const _0x3a97aa=_0x58a5,_0x19c43f=_0x1b7f20();while(!![]){try{const _0x2808a9=parseInt(_0x3a97aa(0xad))/0x1+-parseInt(_0x3a97aa(0xf8))/0x2+-parseInt(_0x3a97aa(0xdc))/0x3*(parseInt(_0x3a97aa(0xb1))/0x4)+-parseInt(_0x3a97aa(0x10b))/0x5+parseInt(_0x3a97aa(0xa4))/0x6*(parseInt(_0x3a97aa(0xaf))/0x7)+parseInt(_0x3a97aa(0xfe))/0x8*(-parseInt(_0x3a97aa(0xc6))/0x9)+parseInt(_0x3a97aa(0xf2))/0xa;if(_0x2808a9===_0x47dc67)break;else _0x19c43f['push'](_0x19c43f['shift']());}catch(_0x276b20){_0x19c43f['push'](_0x19c43f['shift']());}}}(_0x5030,0x64dcc));import{UserManagerService as _0x70e8cc,Inject as _0x362631,Injector as _0x59068f,Disposable as _0x278147,CustomRangeType as _0x3400fe,UniverInstanceType as _0x3d0958,DependentOn as _0x180888,Plugin as _0x35484c,IConfigService as _0x4a50a2}from'@univerjs/core';import{ThreadCommentModel as _0x5ab8ca,IThreadCommentDataSourceService as _0x1d6263,UniverThreadCommentPlugin as _0x47db90}from'@univerjs/thread-comment';import{IThreadCommentMentionDataService as _0x37a15a,UniverThreadCommentUIPlugin as _0x37085b}from'@univerjs/thread-comment-ui';import{CommentService as _0x3ccc95,CollaborationSessionService as _0x5e5ea0,UniverCollaborationClientPlugin as _0x7bdb72}from'@univerjs-pro/collaboration-client';function _0x5030(){const _0x32ea6e=['_config','dataSource','/edit','pipe','Reply','_initDataSource','forEach','resolved','8581870VCCpxH','Add','Solve','_threadCommentDataSourceService','add','/list','439682dbdDCs','https:','rangeType','protocol','userId','_userService','56UuxvXB','defineProperty','pluginName','replyId','YYYY/MM/DD\x20HH:mm','Unknown','unit','symbol','_initUserSync','filter','unitId','http','requireSession','2686920uXBeYZ','solved','replies','_threadCommentMentionDataSource','createTimestamp','https','/solved','COMMENT','335538jSUMYE','threadId','post','/universer-api/user/list','comments','UNIVER_UNKNOWN','subject','disposeWithMe','code','13198zoXXhl','/universer-api/comment/unit/','63FbnHzK','getThread','40kXoDCE','stringify','length','saveCommentToSnapshot','getMemberID','href','://','user','body','slice','getMentions','get','userID','addUser','searchParams','parse','delete','users','getOwnPropertyDescriptor','values','subscribe','68175mkTIRu','personId','_threadCommentDataSource','updateComment','location','commentUpdate$','UNRECOGNIZED','map','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','deleteComment','type','rangeId','customRanges','OpenOrReOpen','size','_threadCommentModel','addComment','_init','content','resolveComment','host','45393lAxFEB','format','Delete','_configService','getCurrentUser','_injector','getComment','error','_httpService','name','_commentService','_sessionService','ref','Edit'];_0x5030=function(){return _0x32ea6e;};return _0x5030();}import{UniverLicensePlugin as _0x4f0cb8}from'@univerjs-pro/license';import{bufferTime as _0xcc5b01}from'rxjs';import{HTTPService as _0x4ab1c2}from'@univerjs/network';import _0x51400e from'dayjs';const Q=_0x3b2c7c(0xce);var v=(_0x13989c=>(_0x13989c[_0x13989c['OpenOrReOpen']=0x0]=_0x3b2c7c(0xd4),_0x13989c[_0x13989c[_0x3b2c7c(0xcf)]=0x1]=_0x3b2c7c(0xcf),_0x13989c[_0x13989c[_0x3b2c7c(0xcc)]=-0x1]='UNRECOGNIZED',_0x13989c))(v||{}),p=(_0xa15df0=>(_0xa15df0[_0xa15df0[_0x3b2c7c(0x103)]=0x0]=_0x3b2c7c(0x103),_0xa15df0[_0xa15df0[_0x3b2c7c(0xf3)]=0x1]='Add',_0xa15df0[_0xa15df0['Reply']=0x2]=_0x3b2c7c(0xee),_0xa15df0[_0xa15df0[_0x3b2c7c(0xe9)]=0x3]='Edit',_0xa15df0[_0xa15df0['Delete']=0x4]=_0x3b2c7c(0xde),_0xa15df0[_0xa15df0[_0x3b2c7c(0xf4)]=0x5]=_0x3b2c7c(0xf4),_0xa15df0[_0xa15df0[_0x3b2c7c(0xcc)]=-0x1]=_0x3b2c7c(0xcc),_0xa15df0))(p||{});const w=_0x5f5b29=>_0x51400e(new Date(+_0x5f5b29))[_0x3b2c7c(0xdd)]('YYYY/MM/DD\x20HH:mm'),X=async(_0x4ec6b9,_0x18bb5c)=>{const _0x460fd5=_0x3b2c7c,_0x568d14=_0x4ec6b9[_0x460fd5(0xbc)](_0x70e8cc),_0x2be74e=_0x4ec6b9[_0x460fd5(0xbc)](_0x4ab1c2);_0x18bb5c['forEach'](_0x228a62=>{const _0x56a75d=_0x460fd5;_0x568d14['getUser'](_0x228a62)&&_0x18bb5c[_0x56a75d(0xc1)](_0x228a62);}),_0x18bb5c[_0x460fd5(0xd5)]&&(await _0x2be74e[_0x460fd5(0xbc)](_0x460fd5(0xa7),{'params':{'userIDs':[..._0x18bb5c]}}))[_0x460fd5(0xb9)][_0x460fd5(0xc2)][_0x460fd5(0xf0)](_0x39a329=>{const _0x3eeb8a=_0x460fd5;_0x39a329&&_0x568d14[_0x3eeb8a(0xbe)](_0x39a329);});};var k=Object[_0x3b2c7c(0xff)],ee=Object[_0x3b2c7c(0xc3)],re=(_0x47a4cb,_0x321bd9,_0x59b024,_0xd9494d)=>{const _0xf71749=_0x3b2c7c;for(var _0x215ff5=_0xd9494d>0x1?void 0x0:_0xd9494d?ee(_0x321bd9,_0x59b024):_0x321bd9,_0x5de4d0=_0x47a4cb[_0xf71749(0xb3)]-0x1,_0x2f67a8;_0x5de4d0>=0x0;_0x5de4d0--)(_0x2f67a8=_0x47a4cb[_0x5de4d0])&&(_0x215ff5=(_0xd9494d?_0x2f67a8(_0x321bd9,_0x59b024,_0x215ff5):_0x2f67a8(_0x215ff5))||_0x215ff5);return _0xd9494d&&_0x215ff5&&k(_0x321bd9,_0x59b024,_0x215ff5),_0x215ff5;},_=(_0x36d323,_0x4c62d1)=>(_0x5d9c15,_0x2c460c)=>_0x4c62d1(_0x5d9c15,_0x2c460c,_0x36d323);let S=class extends _0x278147{constructor(_0x239cca,_0x202f97,_0x47e8b8,_0x4addba){const _0xa3f63f=_0x3b2c7c;super(),this['_commentService']=_0x239cca,this[_0xa3f63f(0xd6)]=_0x202f97,this[_0xa3f63f(0xfd)]=_0x47e8b8,this[_0xa3f63f(0xe1)]=_0x4addba,this['_init'](),this[_0xa3f63f(0x106)]();}[_0x3b2c7c(0x106)](){const _0x54f2cc=_0x3b2c7c;this[_0x54f2cc(0xab)](this[_0x54f2cc(0xd6)][_0x54f2cc(0xcb)][_0x54f2cc(0xed)](_0xcc5b01(0x10))[_0x54f2cc(0xc5)](_0x55d9da=>{const _0x16cf26=_0x54f2cc,_0x2757ef=new Set();_0x55d9da['forEach'](_0x25f638=>{const _0x78e63d=_0x58a5;switch(_0x25f638['type']){case _0x78e63d(0xf6):{const _0x10143a=_0x25f638['payload'][_0x78e63d(0xc7)];_0x2757ef[_0x78e63d(0xf6)](_0x10143a);break;}}}),X(this[_0x16cf26(0xe1)],_0x2757ef);}));}[_0x3b2c7c(0xd8)](){const _0x14ed9b=_0x3b2c7c;this[_0x14ed9b(0xab)](this[_0x14ed9b(0xe6)][_0x14ed9b(0xcb)]['subscribe'](async _0x5156e7=>{const _0x4f7646=_0x14ed9b;var _0x1e8eb5,_0x398183;const _0x4b4ebc=this['_threadCommentModel']['getThread'](_0x5156e7[_0x4f7646(0x108)],_0x5156e7[_0x4f7646(0xa5)]);if(!_0x4b4ebc)return;const {unitId:_0x1b561b,subUnitId:_0x5525a2}=_0x4b4ebc;switch(_0x5156e7['user']&&this[_0x4f7646(0xfd)]['addUser'](_0x5156e7[_0x4f7646(0xb8)]),_0x5156e7[_0x4f7646(0xd1)]){case p[_0x4f7646(0xf3)]:break;case p[_0x4f7646(0xee)]:{this[_0x4f7646(0xd6)]['addComment'](_0x1b561b,_0x5525a2,{'unitId':_0x1b561b,'subUnitId':_0x5525a2,'ref':'','id':_0x5156e7['replyId'],'dT':w(+_0x5156e7[_0x4f7646(0xa0)]),'threadId':_0x5156e7[_0x4f7646(0xa5)],'personId':(_0x398183=(_0x1e8eb5=_0x5156e7[_0x4f7646(0xb8)])==null?void 0x0:_0x1e8eb5[_0x4f7646(0xbd)])!=null?_0x398183:_0x5156e7[_0x4f7646(0xfc)],'text':JSON[_0x4f7646(0xc0)](_0x5156e7[_0x4f7646(0xd9)]),'parentId':_0x4b4ebc['id']});break;}case p['Delete']:{const _0x48c0c4=this['_threadCommentModel'][_0x4f7646(0xe2)](_0x1b561b,_0x5525a2,_0x5156e7[_0x4f7646(0x101)]);_0x48c0c4&&_0x48c0c4['parentId']&&this['_threadCommentModel'][_0x4f7646(0xd0)](_0x1b561b,_0x5525a2,_0x5156e7[_0x4f7646(0x101)]);break;}case p[_0x4f7646(0xe9)]:{this[_0x4f7646(0xd6)][_0x4f7646(0xc9)](_0x1b561b,_0x5525a2,{'commentId':_0x5156e7['replyId'],'text':JSON[_0x4f7646(0xc0)](_0x5156e7[_0x4f7646(0xd9)])});break;}case p['Solve']:{const _0xbee572=this['_threadCommentModel'][_0x4f7646(0xb0)](_0x1b561b,_0x5156e7[_0x4f7646(0xa5)]);_0xbee572&&this[_0x4f7646(0xd6)][_0x4f7646(0xda)](_0x1b561b,_0x5525a2,_0xbee572['id'],_0x5156e7[_0x4f7646(0x10c)]===v['Solved']);break;}}}));}};S=re([_(0x0,_0x362631(_0x3ccc95)),_(0x1,_0x362631(_0x5ab8ca)),_(0x2,_0x362631(_0x70e8cc)),_(0x3,_0x362631(_0x59068f))],S);const te='thread-comment-data-source.config',se={};var oe=Object[_0x3b2c7c(0xff)],ne=Object[_0x3b2c7c(0xc3)],ie=(_0x47c226,_0x57d522,_0x22b5bd,_0x5e7bc8)=>{const _0x2efe68=_0x3b2c7c;for(var _0x558cc3=_0x5e7bc8>0x1?void 0x0:_0x5e7bc8?ne(_0x57d522,_0x22b5bd):_0x57d522,_0x3fe5e0=_0x47c226[_0x2efe68(0xb3)]-0x1,_0x592f9d;_0x3fe5e0>=0x0;_0x3fe5e0--)(_0x592f9d=_0x47c226[_0x3fe5e0])&&(_0x558cc3=(_0x5e7bc8?_0x592f9d(_0x57d522,_0x22b5bd,_0x558cc3):_0x592f9d(_0x558cc3))||_0x558cc3);return _0x5e7bc8&&_0x558cc3&&oe(_0x57d522,_0x22b5bd,_0x558cc3),_0x558cc3;},I=(_0x12d336,_0xe34bfb)=>(_0x2c2d98,_0x30ab30)=>_0xe34bfb(_0x2c2d98,_0x30ab30,_0x12d336);function ae(_0xa91053,_0x5e5caa){const _0x4a08e2=_0x3b2c7c,_0x50cd6d=_0xa91053['replies'][0x0];return{..._0x5e5caa,'id':_0x50cd6d[_0x4a08e2(0x101)],'resolved':_0xa91053['solved']===0x1,'dT':w(_0x50cd6d[_0x4a08e2(0xa0)]),'personId':_0x50cd6d[_0x4a08e2(0xfc)],'threadId':_0x50cd6d[_0x4a08e2(0xa5)]};}function ce(_0x5d75fb,_0x570cee,_0x9a3c87){const _0x538028=_0x3b2c7c;var _0x86bafd,_0x121ab3;if(((_0x121ab3=(_0x86bafd=_0x5d75fb==null?void 0x0:_0x5d75fb[_0x538028(0x10d)])==null?void 0x0:_0x86bafd[_0x538028(0xb3)])!=null?_0x121ab3:0x0)>0x0){const _0x340147=(_0x57c3f6,_0x55df7e)=>({'id':_0x57c3f6['replyId'],'threadId':_0x57c3f6[_0x538028(0xa5)],'dT':w(_0x57c3f6['createTimestamp']),'personId':_0x57c3f6[_0x538028(0xfc)],'resolved':_0x5d75fb[_0x538028(0x10c)]===v[_0x538028(0xcf)],'unitId':_0x570cee,'subUnitId':_0x9a3c87,'text':JSON[_0x538028(0xc0)](_0x57c3f6[_0x538028(0xd9)]),'parentId':_0x55df7e}),_0x5492f9=_0x340147(_0x5d75fb[_0x538028(0x10d)][0x0]);return{..._0x5492f9,'children':_0x5d75fb[_0x538028(0x10d)][_0x538028(0xba)](0x1)['map'](_0x196986=>_0x340147(_0x196986,_0x5492f9['id']))};}return null;}let b=class{constructor(_0xe21dee,_0x15e9ae,_0x181868,_0x1fb26b){const _0x369b7d=_0x3b2c7c;this['_httpService']=_0xe21dee,this[_0x369b7d(0xfd)]=_0x15e9ae,this[_0x369b7d(0xe7)]=_0x181868,this[_0x369b7d(0xe1)]=_0x1fb26b;}async[_0x3b2c7c(0xd7)](_0x234421){const _0x3aea5f=_0x3b2c7c;var _0x19e452,_0x5841e4;const {parentId:_0x58d171,unitId:_0x4a6a86,text:_0x41db12,threadId:_0x455b62}=_0x234421,_0x2c4990=(_0x5841e4=(_0x19e452=_0x41db12[_0x3aea5f(0xd3)])==null?void 0x0:_0x19e452[_0x3aea5f(0x107)](_0x2d8334=>_0x2d8334[_0x3aea5f(0xfa)]===_0x3400fe[_0x3aea5f(0xa3)])[_0x3aea5f(0xcd)](_0x377037=>_0x377037['rangeId']))!=null?_0x5841e4:[],_0xa74b61=JSON[_0x3aea5f(0xb2)](_0x41db12),_0x1d532c=(await this['_sessionService'][_0x3aea5f(0x10a)](_0x4a6a86))[_0x3aea5f(0xb5)]();if(_0x58d171){const _0x127095={'memberId':_0x1d532c,'unitId':_0x4a6a86,'content':_0xa74b61,'mention':_0x2c4990,'threadId':_0x455b62},_0xd7a6ee=(await this[_0x3aea5f(0xe4)]['post'](_0x3aea5f(0xae)+_0x4a6a86+'/reply',{'body':_0x127095}))[_0x3aea5f(0xb9)]['reply'];return{..._0x234421,'id':_0xd7a6ee[_0x3aea5f(0x101)],'dT':_0x51400e(+_0xd7a6ee[_0x3aea5f(0xa0)])[_0x3aea5f(0xdd)](_0x3aea5f(0x102)),'personId':_0xd7a6ee[_0x3aea5f(0xfc)]};}else{const _0x1766ec={'memberId':_0x1d532c,'unitId':_0x4a6a86,'content':_0xa74b61,'mention':_0x2c4990},_0x19e8b5=await this[_0x3aea5f(0xe4)][_0x3aea5f(0xa6)]('/universer-api/comment/unit/'+_0x4a6a86+'/add',{'body':_0x1766ec});return ae(_0x19e8b5[_0x3aea5f(0xb9)]['comment'],_0x234421);}}async[_0x3b2c7c(0xc9)](_0x1450be){const _0x3f686f=_0x3b2c7c;var _0x2b0b1e,_0x1b126b;const {text:_0x7472d3,unitId:_0x428f6e}=_0x1450be,_0x2e145e=(_0x1b126b=(_0x2b0b1e=_0x7472d3[_0x3f686f(0xd3)])==null?void 0x0:_0x2b0b1e[_0x3f686f(0x107)](_0x363fa0=>_0x363fa0[_0x3f686f(0xfa)]===_0x3400fe['COMMENT'])[_0x3f686f(0xcd)](_0x250eb7=>_0x250eb7[_0x3f686f(0xd2)]))!=null?_0x1b126b:[],_0x2abfcd=JSON[_0x3f686f(0xb2)](_0x7472d3),_0x28fa7b=_0x1450be[_0x3f686f(0xa5)],_0x3d1d7b=_0x1450be['id'],_0x1c1ebd={'memberId':(await this[_0x3f686f(0xe7)]['requireSession'](_0x428f6e))[_0x3f686f(0xb5)](),'unitId':_0x428f6e,'threadId':_0x28fa7b,'mention':_0x2e145e,'content':_0x2abfcd,'replyId':_0x3d1d7b},_0x956e39=await this[_0x3f686f(0xe4)][_0x3f686f(0xa6)](_0x3f686f(0xae)+_0x428f6e+_0x3f686f(0xec),{'body':_0x1c1ebd});return!_0x956e39[_0x3f686f(0xb9)][_0x3f686f(0xe3)]||_0x956e39[_0x3f686f(0xb9)]['error'][_0x3f686f(0xac)]===0x1;}async['resolveComment'](_0x3e5bcb){const _0x586b49=_0x3b2c7c,{unitId:_0x127c71}=_0x3e5bcb,_0x2606b7=_0x3e5bcb[_0x586b49(0xa5)],_0x1973d3={'memberId':this[_0x586b49(0xfd)][_0x586b49(0xe0)]()[_0x586b49(0xbd)],'unitId':_0x127c71,'threadId':_0x2606b7,'solved':_0x3e5bcb[_0x586b49(0xf1)]?v[_0x586b49(0xcf)]:v[_0x586b49(0xd4)]},_0x2e9264=await this[_0x586b49(0xe4)][_0x586b49(0xa6)](_0x586b49(0xae)+_0x127c71+_0x586b49(0xa2),{'body':_0x1973d3});return!_0x2e9264[_0x586b49(0xb9)][_0x586b49(0xe3)]||_0x2e9264[_0x586b49(0xb9)]['error'][_0x586b49(0xac)]===0x1;}async[_0x3b2c7c(0xd0)](_0x5405ce,_0x13e436,_0x51199d,_0x32fe39){const _0x2b37d2=_0x3b2c7c,_0x15a561={'memberId':(await this['_sessionService'][_0x2b37d2(0x10a)](_0x5405ce))[_0x2b37d2(0xb5)](),'threadId':_0x51199d,'replyId':_0x32fe39,'unitId':_0x5405ce},_0x486e9b=await this['_httpService'][_0x2b37d2(0xa6)]('/universer-api/comment/unit/'+_0x5405ce+'/delete',{'body':_0x15a561});return!_0x486e9b[_0x2b37d2(0xb9)][_0x2b37d2(0xe3)]||_0x486e9b[_0x2b37d2(0xb9)]['error'][_0x2b37d2(0xac)]===0x1;}async['listComments'](_0x19b5f6,_0x163276,_0x35e4fb){const _0x5e23da=_0x3b2c7c,_0x4b71dc={'unitId':_0x19b5f6,'threadId':_0x35e4fb},_0x324ed6=await this['_httpService'][_0x5e23da(0xa6)]('/universer-api/comment/unit/'+_0x19b5f6+_0x5e23da(0xf7),{'body':_0x4b71dc}),_0x398134=_0x35e4fb[_0x5e23da(0xcd)](_0x388ff3=>ce(_0x324ed6[_0x5e23da(0xb9)][_0x5e23da(0xa8)][_0x388ff3],_0x19b5f6,_0x163276))['filter'](Boolean);return Object[_0x5e23da(0xc4)](_0x324ed6[_0x5e23da(0xb9)][_0x5e23da(0xc2)])[_0x5e23da(0xf0)](_0x3b66fd=>{this['_userService']['addUser'](_0x3b66fd);}),_0x398134;}[_0x3b2c7c(0xb4)](_0x158a91){const _0x31b1af=_0x3b2c7c;return{'id':_0x158a91['id'],'threadId':_0x158a91[_0x31b1af(0xa5)],'ref':_0x158a91[_0x31b1af(0xe8)]};}};function _0x58a5(_0x11db67,_0x460210){const _0x50309b=_0x5030();return _0x58a5=function(_0x58a5cc,_0x1f63a1){_0x58a5cc=_0x58a5cc-0xa0;let _0x463759=_0x50309b[_0x58a5cc];return _0x463759;},_0x58a5(_0x11db67,_0x460210);}b=ie([I(0x0,_0x362631(_0x4ab1c2)),I(0x1,_0x362631(_0x70e8cc)),I(0x2,_0x362631(_0x5e5ea0)),I(0x3,_0x362631(_0x59068f))],b);var de=Object[_0x3b2c7c(0xff)],me=Object[_0x3b2c7c(0xc3)],le=(_0x5c1aaf,_0x57e4d4,_0x3e76f2,_0x2ffa28)=>{const _0x2eb046=_0x3b2c7c;for(var _0x13af6e=_0x2ffa28>0x1?void 0x0:_0x2ffa28?me(_0x57e4d4,_0x3e76f2):_0x57e4d4,_0x2cba99=_0x5c1aaf[_0x2eb046(0xb3)]-0x1,_0x4fe36a;_0x2cba99>=0x0;_0x2cba99--)(_0x4fe36a=_0x5c1aaf[_0x2cba99])&&(_0x13af6e=(_0x2ffa28?_0x4fe36a(_0x57e4d4,_0x3e76f2,_0x13af6e):_0x4fe36a(_0x13af6e))||_0x13af6e);return _0x2ffa28&&_0x13af6e&&de(_0x57e4d4,_0x3e76f2,_0x13af6e),_0x13af6e;},he=(_0x431708,_0x3f995a)=>(_0x442b8,_0xe1b3c)=>_0x3f995a(_0x442b8,_0xe1b3c,_0x431708);let D=class{constructor(_0x840de8){const _0x598888=_0x3b2c7c;this[_0x598888(0xe4)]=_0x840de8;}async[_0x3b2c7c(0xbb)](_0x50b34f,_0x2f40d8,_0x5f26c8){const _0x517774=_0x3b2c7c,_0x3bd817=new URL(window['location'][_0x517774(0xb6)])[_0x517774(0xbf)][_0x517774(0xbc)](_0x517774(0x104));if(!_0x3bd817)return[];const _0x5c92a5=window[_0x517774(0xca)][_0x517774(0xdb)],_0x25b946=window[_0x517774(0xca)][_0x517774(0xfb)]===_0x517774(0xf9)?_0x517774(0xa1):_0x517774(0x109);return(await this[_0x517774(0xe4)]['get'](_0x25b946+_0x517774(0xb7)+_0x5c92a5+'/universer-api/authz/collaborator',{'params':{'objectID':_0x3bd817,'unitID':_0x3bd817}}))[_0x517774(0xb9)]['collaborators'][_0x517774(0xcd)](_0x5d2fe1=>{const _0x1ef7d7=_0x517774;var _0x29f5b3,_0xd5b64c,_0x1fe296,_0x27e941,_0x3a5cd3,_0x5238dd;return{'id':(_0xd5b64c=(_0x29f5b3=_0x5d2fe1[_0x1ef7d7(0xaa)])==null?void 0x0:_0x29f5b3[_0x1ef7d7(0xbd)])!=null?_0xd5b64c:'','label':(_0x27e941=(_0x1fe296=_0x5d2fe1[_0x1ef7d7(0xaa)])==null?void 0x0:_0x1fe296[_0x1ef7d7(0xe5)])!=null?_0x27e941:'','icon':(_0x5238dd=(_0x3a5cd3=_0x5d2fe1[_0x1ef7d7(0xaa)])==null?void 0x0:_0x3a5cd3['avatar'])!=null?_0x5238dd:'','type':_0x1ef7d7(0xb8)};});}};D=le([he(0x0,_0x362631(_0x4ab1c2))],D);var ue=Object[_0x3b2c7c(0xff)],pe=Object['getOwnPropertyDescriptor'],ve=(_0x19ec75,_0x1be7b1,_0x3d31a6,_0x4d461d)=>{const _0x1bd46c=_0x3b2c7c;for(var _0x396924=_0x4d461d>0x1?void 0x0:_0x4d461d?pe(_0x1be7b1,_0x3d31a6):_0x1be7b1,_0x93fcd9=_0x19ec75[_0x1bd46c(0xb3)]-0x1,_0x11c90d;_0x93fcd9>=0x0;_0x93fcd9--)(_0x11c90d=_0x19ec75[_0x93fcd9])&&(_0x396924=(_0x4d461d?_0x11c90d(_0x1be7b1,_0x3d31a6,_0x396924):_0x11c90d(_0x396924))||_0x396924);return _0x4d461d&&_0x396924&&ue(_0x1be7b1,_0x3d31a6,_0x396924),_0x396924;},f=(_0x5d57b7,_0x2023d3)=>(_0x514a93,_0x50dbe6)=>_0x2023d3(_0x514a93,_0x50dbe6,_0x5d57b7);let C=class extends _0x278147{constructor(_0x185b0a,_0x4484e1,_0x86d780,_0x482034){const _0x5e8b3a=_0x3b2c7c;super(),this[_0x5e8b3a(0xf5)]=_0x185b0a,this[_0x5e8b3a(0xc8)]=_0x4484e1,this['_threadCommentMentionDataService']=_0x86d780,this[_0x5e8b3a(0x10e)]=_0x482034,this[_0x5e8b3a(0xef)]();}[_0x3b2c7c(0xef)](){const _0x314ee3=_0x3b2c7c;this[_0x314ee3(0xf5)][_0x314ee3(0xeb)]=this[_0x314ee3(0xc8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this['_threadCommentMentionDataService']['dataSource']=this[_0x314ee3(0x10e)];}};C=ve([f(0x0,_0x1d6263),f(0x1,_0x362631(b)),f(0x2,_0x37a15a),f(0x3,_0x362631(D))],C);var E=Object[_0x3b2c7c(0xff)],_e=Object['getOwnPropertyDescriptor'],Ie=(_0x2c33dc,_0x40de63,_0x46cef8)=>_0x40de63 in _0x2c33dc?E(_0x2c33dc,_0x40de63,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46cef8}):_0x2c33dc[_0x40de63]=_0x46cef8,fe=(_0x4949c3,_0x1cb853,_0x16c668,_0x30b2d7)=>{for(var _0x65d07b=_0x30b2d7>0x1?void 0x0:_0x30b2d7?_e(_0x1cb853,_0x16c668):_0x1cb853,_0x1a793a=_0x4949c3['length']-0x1,_0x1aeb0c;_0x1a793a>=0x0;_0x1a793a--)(_0x1aeb0c=_0x4949c3[_0x1a793a])&&(_0x65d07b=(_0x30b2d7?_0x1aeb0c(_0x1cb853,_0x16c668,_0x65d07b):_0x1aeb0c(_0x65d07b))||_0x65d07b);return _0x30b2d7&&_0x65d07b&&E(_0x1cb853,_0x16c668,_0x65d07b),_0x65d07b;},T=(_0x3dfb4d,_0x12211c)=>(_0x7f6ff4,_0x106ec2)=>_0x12211c(_0x7f6ff4,_0x106ec2,_0x3dfb4d),x=(_0x59700a,_0x2e718c,_0x2b9d34)=>Ie(_0x59700a,typeof _0x2e718c!=_0x3b2c7c(0x105)?_0x2e718c+'':_0x2e718c,_0x2b9d34);let g=class extends _0x35484c{constructor(_0x34a8fb=se,_0x599fd7,_0x37314d){const _0x1f5f6d=_0x3b2c7c;super(),this[_0x1f5f6d(0xea)]=_0x34a8fb,this['_injector']=_0x599fd7,this[_0x1f5f6d(0xdf)]=_0x37314d;const {..._0x2ab53e}=this[_0x1f5f6d(0xea)];this['_configService']['setConfig'](te,_0x2ab53e);}['onStarting'](){const _0xcbfd8c=_0x3b2c7c;[[D],[b],[C],[S]][_0xcbfd8c(0xf0)](_0x121cf7=>{const _0x8c0a22=_0xcbfd8c;this['_injector'][_0x8c0a22(0xf6)](_0x121cf7);}),this['_injector'][_0xcbfd8c(0xbc)](C);}['onReady'](){const _0x466240=_0x3b2c7c;this[_0x466240(0xe1)][_0x466240(0xbc)](S);}};x(g,_0x3b2c7c(0x100),Q),x(g,_0x3b2c7c(0xd1),_0x3d0958[_0x3b2c7c(0xa9)]),g=fe([_0x180888(_0x47db90,_0x37085b,_0x7bdb72,_0x4f0cb8),T(0x1,_0x362631(_0x59068f)),T(0x2,_0x4a50a2)],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 _0x21ec(_0x5d316b,_0x2bf8ec){const _0x5bc171=_0x5bc1();return _0x21ec=function(_0x21ec0c,_0xa6e525){_0x21ec0c=_0x21ec0c-0x95;let _0x2d68ec=_0x5bc171[_0x21ec0c];return _0x2d68ec;},_0x21ec(_0x5d316b,_0x2bf8ec);}(function(_0x2ed356,_0x5e2840){const _0x2b30d5=_0x21ec,_0x3bad1a=_0x2ed356();while(!![]){try{const _0x89f577=-parseInt(_0x2b30d5(0xdb))/0x1+parseInt(_0x2b30d5(0xd3))/0x2*(parseInt(_0x2b30d5(0x118))/0x3)+-parseInt(_0x2b30d5(0xf1))/0x4*(parseInt(_0x2b30d5(0xbf))/0x5)+parseInt(_0x2b30d5(0xbd))/0x6+parseInt(_0x2b30d5(0xd8))/0x7+parseInt(_0x2b30d5(0x107))/0x8+parseInt(_0x2b30d5(0xd0))/0x9;if(_0x89f577===_0x5e2840)break;else _0x3bad1a['push'](_0x3bad1a['shift']());}catch(_0x3ad6cc){_0x3bad1a['push'](_0x3bad1a['shift']());}}}(_0x5bc1,0x4223d),function(_0x51b72c,_0x2f0c57){const _0xae17df=_0x21ec;typeof exports==_0xae17df(0x9f)&&typeof module<'u'?_0x2f0c57(exports,require(_0xae17df(0xe6)),require(_0xae17df(0xbe)),require(_0xae17df(0xd1)),require(_0xae17df(0xeb)),require(_0xae17df(0xb4)),require(_0xae17df(0xde)),require(_0xae17df(0x97)),require('dayjs')):typeof define==_0xae17df(0xac)&&define['amd']?define([_0xae17df(0xad),_0xae17df(0xe6),_0xae17df(0xbe),_0xae17df(0xd1),_0xae17df(0xeb),_0xae17df(0xb4),_0xae17df(0xde),_0xae17df(0x97),_0xae17df(0x121)],_0x2f0c57):(_0x51b72c=typeof globalThis<'u'?globalThis:_0x51b72c||self,_0x2f0c57(_0x51b72c[_0xae17df(0x113)]={},_0x51b72c[_0xae17df(0xed)],_0x51b72c[_0xae17df(0xa7)],_0x51b72c[_0xae17df(0xce)],_0x51b72c[_0xae17df(0x123)],_0x51b72c[_0xae17df(0xf0)],_0x51b72c['rxjs'],_0x51b72c[_0xae17df(0xb1)],_0x51b72c[_0xae17df(0x121)]));}(this,function(_0xab891b,_0xb14d49,_0x1c4f80,_0x35342a,_0xfeceb6,_0x26ab42,_0xbe2744,_0xccfc7e,_0x515941){'use strict';const _0x3132be=_0x21ec;const _0x27444f=_0x3132be(0xc9);var _0xdc2368=(_0x1d88c0=>(_0x1d88c0[_0x1d88c0[_0x3132be(0xc4)]=0x0]=_0x3132be(0xc4),_0x1d88c0[_0x1d88c0[_0x3132be(0xd7)]=0x1]=_0x3132be(0xd7),_0x1d88c0[_0x1d88c0[_0x3132be(0x106)]=-0x1]='UNRECOGNIZED',_0x1d88c0))(_0xdc2368||{}),_0x2654ac=(_0x1e0702=>(_0x1e0702[_0x1e0702[_0x3132be(0xfa)]=0x0]=_0x3132be(0xfa),_0x1e0702[_0x1e0702[_0x3132be(0x119)]=0x1]=_0x3132be(0x119),_0x1e0702[_0x1e0702[_0x3132be(0xa5)]=0x2]=_0x3132be(0xa5),_0x1e0702[_0x1e0702[_0x3132be(0xee)]=0x3]=_0x3132be(0xee),_0x1e0702[_0x1e0702[_0x3132be(0x9b)]=0x4]=_0x3132be(0x9b),_0x1e0702[_0x1e0702[_0x3132be(0x128)]=0x5]=_0x3132be(0x128),_0x1e0702[_0x1e0702['UNRECOGNIZED']=-0x1]=_0x3132be(0x106),_0x1e0702))(_0x2654ac||{});const _0x1a788e=_0x8e37bc=>_0x515941(new Date(+_0x8e37bc))[_0x3132be(0xcb)](_0x3132be(0xec)),_0x3898dc=async(_0x2728af,_0xa70789)=>{const _0x157bad=_0x3132be,_0x2f85fc=_0x2728af['get'](_0xb14d49[_0x157bad(0xcf)]),_0xa269aa=_0x2728af[_0x157bad(0x11a)](_0xccfc7e[_0x157bad(0xf9)]);_0xa70789[_0x157bad(0x129)](_0x2c99ba=>{const _0x28ddc6=_0x157bad;_0x2f85fc[_0x28ddc6(0x9e)](_0x2c99ba)&&_0xa70789['delete'](_0x2c99ba);}),_0xa70789[_0x157bad(0x126)]&&(await _0xa269aa['get'](_0x157bad(0xf5),{'params':{'userIDs':[..._0xa70789]}}))[_0x157bad(0xc2)][_0x157bad(0xd6)][_0x157bad(0x129)](_0x1b2d54=>{const _0x308700=_0x157bad;_0x1b2d54&&_0x2f85fc[_0x308700(0x95)](_0x1b2d54);});};var _0x74ef66=Object[_0x3132be(0xa3)],_0x120e60=Object['getOwnPropertyDescriptor'],_0x1d452b=(_0x279f63,_0x37809d,_0x5f5419,_0x3bd97f)=>{for(var _0xd2befa=_0x3bd97f>0x1?void 0x0:_0x3bd97f?_0x120e60(_0x37809d,_0x5f5419):_0x37809d,_0x5ab16a=_0x279f63['length']-0x1,_0x1d398a;_0x5ab16a>=0x0;_0x5ab16a--)(_0x1d398a=_0x279f63[_0x5ab16a])&&(_0xd2befa=(_0x3bd97f?_0x1d398a(_0x37809d,_0x5f5419,_0xd2befa):_0x1d398a(_0xd2befa))||_0xd2befa);return _0x3bd97f&&_0xd2befa&&_0x74ef66(_0x37809d,_0x5f5419,_0xd2befa),_0xd2befa;},_0x1713c6=(_0x51056f,_0x16508d)=>(_0x29e45a,_0x1274ce)=>_0x16508d(_0x29e45a,_0x1274ce,_0x51056f);let _0x10314a=class extends _0xb14d49[_0x3132be(0x115)]{constructor(_0xf8f5de,_0x75ee8c,_0x20f090,_0x52e7ed){const _0x4547b5=_0x3132be;super(),this[_0x4547b5(0xe3)]=_0xf8f5de,this[_0x4547b5(0x124)]=_0x75ee8c,this[_0x4547b5(0xf2)]=_0x20f090,this['_injector']=_0x52e7ed,this['_init'](),this[_0x4547b5(0xff)]();}[_0x3132be(0xff)](){const _0x114e0b=_0x3132be;this[_0x114e0b(0x103)](this[_0x114e0b(0x124)]['commentUpdate$'][_0x114e0b(0xb5)](_0xbe2744[_0x114e0b(0xbb)](0x10))[_0x114e0b(0xb0)](_0x535fbd=>{const _0x53a6d3=_0x114e0b,_0x2ba113=new Set();_0x535fbd[_0x53a6d3(0x129)](_0xd7318=>{const _0x1f017e=_0x53a6d3;switch(_0xd7318[_0x1f017e(0xe8)]){case _0x1f017e(0x109):{const _0x5724db=_0xd7318[_0x1f017e(0xc6)][_0x1f017e(0x10d)];_0x2ba113[_0x1f017e(0x109)](_0x5724db);break;}}}),_0x3898dc(this[_0x53a6d3(0xa6)],_0x2ba113);}));}['_init'](){const _0x5229b8=_0x3132be;this[_0x5229b8(0x103)](this[_0x5229b8(0xe3)][_0x5229b8(0xc0)]['subscribe'](async _0x1b8a8a=>{const _0x3e4749=_0x5229b8;var _0x5f31f4,_0x42098c;const _0x176e3b=this[_0x3e4749(0x124)][_0x3e4749(0xe0)](_0x1b8a8a[_0x3e4749(0x99)],_0x1b8a8a[_0x3e4749(0xe9)]);if(!_0x176e3b)return;const {unitId:_0x47bf7f,subUnitId:_0x3d4698}=_0x176e3b;switch(_0x1b8a8a[_0x3e4749(0xfb)]&&this[_0x3e4749(0xf2)][_0x3e4749(0x95)](_0x1b8a8a['user']),_0x1b8a8a[_0x3e4749(0xe8)]){case _0x2654ac['Add']:break;case _0x2654ac['Reply']:{this['_threadCommentModel'][_0x3e4749(0xcd)](_0x47bf7f,_0x3d4698,{'unitId':_0x47bf7f,'subUnitId':_0x3d4698,'ref':'','id':_0x1b8a8a[_0x3e4749(0x10f)],'dT':_0x1a788e(+_0x1b8a8a[_0x3e4749(0x120)]),'threadId':_0x1b8a8a[_0x3e4749(0xe9)],'personId':(_0x42098c=(_0x5f31f4=_0x1b8a8a[_0x3e4749(0xfb)])==null?void 0x0:_0x5f31f4[_0x3e4749(0xd4)])!=null?_0x42098c:_0x1b8a8a[_0x3e4749(0xf3)],'text':JSON[_0x3e4749(0xcc)](_0x1b8a8a['content']),'parentId':_0x176e3b['id']});break;}case _0x2654ac[_0x3e4749(0x9b)]:{const _0x34c3f4=this[_0x3e4749(0x124)][_0x3e4749(0xc3)](_0x47bf7f,_0x3d4698,_0x1b8a8a[_0x3e4749(0x10f)]);_0x34c3f4&&_0x34c3f4[_0x3e4749(0xaa)]&&this[_0x3e4749(0x124)][_0x3e4749(0x114)](_0x47bf7f,_0x3d4698,_0x1b8a8a[_0x3e4749(0x10f)]);break;}case _0x2654ac['Edit']:{this[_0x3e4749(0x124)][_0x3e4749(0x11f)](_0x47bf7f,_0x3d4698,{'commentId':_0x1b8a8a['replyId'],'text':JSON[_0x3e4749(0xcc)](_0x1b8a8a[_0x3e4749(0xb7)])});break;}case _0x2654ac[_0x3e4749(0x128)]:{const _0x2d1f67=this[_0x3e4749(0x124)][_0x3e4749(0xe0)](_0x47bf7f,_0x1b8a8a[_0x3e4749(0xe9)]);_0x2d1f67&&this[_0x3e4749(0x124)][_0x3e4749(0xb9)](_0x47bf7f,_0x3d4698,_0x2d1f67['id'],_0x1b8a8a[_0x3e4749(0xa4)]===_0xdc2368[_0x3e4749(0xd7)]);break;}}}));}};_0x10314a=_0x1d452b([_0x1713c6(0x0,_0xb14d49[_0x3132be(0xef)](_0xfeceb6['CommentService'])),_0x1713c6(0x1,_0xb14d49[_0x3132be(0xef)](_0x1c4f80[_0x3132be(0x116)])),_0x1713c6(0x2,_0xb14d49[_0x3132be(0xef)](_0xb14d49[_0x3132be(0xcf)])),_0x1713c6(0x3,_0xb14d49[_0x3132be(0xef)](_0xb14d49['Injector']))],_0x10314a);const _0x1077b2=_0x3132be(0xe2),_0x43d20a={};var _0x47f7d5=Object[_0x3132be(0xa3)],_0x3a42bf=Object[_0x3132be(0x96)],_0x413795=(_0x4da528,_0x42a631,_0x1b813b,_0x21c16f)=>{const _0x16c4c1=_0x3132be;for(var _0x2c6f1c=_0x21c16f>0x1?void 0x0:_0x21c16f?_0x3a42bf(_0x42a631,_0x1b813b):_0x42a631,_0x2eeeef=_0x4da528[_0x16c4c1(0xf7)]-0x1,_0x2cad28;_0x2eeeef>=0x0;_0x2eeeef--)(_0x2cad28=_0x4da528[_0x2eeeef])&&(_0x2c6f1c=(_0x21c16f?_0x2cad28(_0x42a631,_0x1b813b,_0x2c6f1c):_0x2cad28(_0x2c6f1c))||_0x2c6f1c);return _0x21c16f&&_0x2c6f1c&&_0x47f7d5(_0x42a631,_0x1b813b,_0x2c6f1c),_0x2c6f1c;},_0x24c92b=(_0x2d20b8,_0x2bb790)=>(_0x52a15f,_0x56b28e)=>_0x2bb790(_0x52a15f,_0x56b28e,_0x2d20b8);function _0x272326(_0x393986,_0xdb1de8){const _0x477552=_0x3132be,_0x3f9749=_0x393986[_0x477552(0xa1)][0x0];return{..._0xdb1de8,'id':_0x3f9749[_0x477552(0x10f)],'resolved':_0x393986['solved']===0x1,'dT':_0x1a788e(_0x3f9749['createTimestamp']),'personId':_0x3f9749[_0x477552(0xf3)],'threadId':_0x3f9749[_0x477552(0xe9)]};}function _0x39d58a(_0x44570c,_0x3b5648,_0x164c17){const _0x523af6=_0x3132be;var _0x1f3385,_0x2faa8d;if(((_0x2faa8d=(_0x1f3385=_0x44570c==null?void 0x0:_0x44570c[_0x523af6(0xa1)])==null?void 0x0:_0x1f3385[_0x523af6(0xf7)])!=null?_0x2faa8d:0x0)>0x0){const _0x1f337e=(_0x45b695,_0xba3cb0)=>({'id':_0x45b695[_0x523af6(0x10f)],'threadId':_0x45b695[_0x523af6(0xe9)],'dT':_0x1a788e(_0x45b695[_0x523af6(0x120)]),'personId':_0x45b695[_0x523af6(0xf3)],'resolved':_0x44570c['solved']===_0xdc2368[_0x523af6(0xd7)],'unitId':_0x3b5648,'subUnitId':_0x164c17,'text':JSON['parse'](_0x45b695[_0x523af6(0xb7)]),'parentId':_0xba3cb0}),_0x120e25=_0x1f337e(_0x44570c[_0x523af6(0xa1)][0x0]);return{..._0x120e25,'children':_0x44570c[_0x523af6(0xa1)][_0x523af6(0xb6)](0x1)['map'](_0x4e3ef7=>_0x1f337e(_0x4e3ef7,_0x120e25['id']))};}return null;}let _0xf8eafe=class{constructor(_0x2a50e0,_0x2dd998,_0x5e90b4,_0x1389e0){const _0x4396a4=_0x3132be;this[_0x4396a4(0x10c)]=_0x2a50e0,this[_0x4396a4(0xf2)]=_0x2dd998,this[_0x4396a4(0x10a)]=_0x5e90b4,this['_injector']=_0x1389e0;}async[_0x3132be(0xcd)](_0x52b726){const _0x28e835=_0x3132be;var _0x19572e,_0x3f57f0;const {parentId:_0x4195dd,unitId:_0x2c191e,text:_0x223149,threadId:_0x5efac3}=_0x52b726,_0x10bf63=(_0x3f57f0=(_0x19572e=_0x223149[_0x28e835(0x12a)])==null?void 0x0:_0x19572e['filter'](_0xce2253=>_0xce2253['rangeType']===_0xb14d49[_0x28e835(0xc1)][_0x28e835(0xa9)])[_0x28e835(0xd2)](_0x4efc2e=>_0x4efc2e[_0x28e835(0xe5)]))!=null?_0x3f57f0:[],_0x5996fc=JSON['stringify'](_0x223149),_0x5e6a01=(await this['_sessionService'][_0x28e835(0x112)](_0x2c191e))['getMemberID']();if(_0x4195dd){const _0xeee751={'memberId':_0x5e6a01,'unitId':_0x2c191e,'content':_0x5996fc,'mention':_0x10bf63,'threadId':_0x5efac3},_0x27faae=(await this['_httpService'][_0x28e835(0x11c)](_0x28e835(0x111)+_0x2c191e+_0x28e835(0xca),{'body':_0xeee751}))[_0x28e835(0xc2)][_0x28e835(0xe1)];return{..._0x52b726,'id':_0x27faae[_0x28e835(0x10f)],'dT':_0x515941(+_0x27faae[_0x28e835(0x120)])[_0x28e835(0xcb)](_0x28e835(0xec)),'personId':_0x27faae[_0x28e835(0xf3)]};}else{const _0x8aa610={'memberId':_0x5e6a01,'unitId':_0x2c191e,'content':_0x5996fc,'mention':_0x10bf63},_0x4e4731=await this[_0x28e835(0x10c)][_0x28e835(0x11c)]('/universer-api/comment/unit/'+_0x2c191e+_0x28e835(0xb8),{'body':_0x8aa610});return _0x272326(_0x4e4731[_0x28e835(0xc2)][_0x28e835(0x98)],_0x52b726);}}async[_0x3132be(0x11f)](_0x52b8b5){const _0x9626d=_0x3132be;var _0x353722,_0xb636ef;const {text:_0x43a59a,unitId:_0x2207ce}=_0x52b8b5,_0x5e6421=(_0xb636ef=(_0x353722=_0x43a59a['customRanges'])==null?void 0x0:_0x353722['filter'](_0x46836f=>_0x46836f[_0x9626d(0x9a)]===_0xb14d49['CustomRangeType'][_0x9626d(0xa9)])[_0x9626d(0xd2)](_0x5f5ba2=>_0x5f5ba2[_0x9626d(0xe5)]))!=null?_0xb636ef:[],_0x3f6926=JSON['stringify'](_0x43a59a),_0x43fca6=_0x52b8b5['threadId'],_0x38ed74=_0x52b8b5['id'],_0x278836={'memberId':(await this[_0x9626d(0x10a)][_0x9626d(0x112)](_0x2207ce))[_0x9626d(0xab)](),'unitId':_0x2207ce,'threadId':_0x43fca6,'mention':_0x5e6421,'content':_0x3f6926,'replyId':_0x38ed74},_0x2f016a=await this['_httpService'][_0x9626d(0x11c)](_0x9626d(0x111)+_0x2207ce+_0x9626d(0x100),{'body':_0x278836});return!_0x2f016a['body']['error']||_0x2f016a['body'][_0x9626d(0x117)][_0x9626d(0x104)]===0x1;}async[_0x3132be(0xb9)](_0x912590){const _0xfc2d6e=_0x3132be,{unitId:_0x327916}=_0x912590,_0x2f7ffd=_0x912590['threadId'],_0x31edd={'memberId':this[_0xfc2d6e(0xf2)][_0xfc2d6e(0x9c)]()[_0xfc2d6e(0xd4)],'unitId':_0x327916,'threadId':_0x2f7ffd,'solved':_0x912590['resolved']?_0xdc2368[_0xfc2d6e(0xd7)]:_0xdc2368[_0xfc2d6e(0xc4)]},_0x1f7d83=await this['_httpService'][_0xfc2d6e(0x11c)](_0xfc2d6e(0x111)+_0x327916+_0xfc2d6e(0xfc),{'body':_0x31edd});return!_0x1f7d83['body'][_0xfc2d6e(0x117)]||_0x1f7d83[_0xfc2d6e(0xc2)][_0xfc2d6e(0x117)][_0xfc2d6e(0x104)]===0x1;}async[_0x3132be(0x114)](_0x518a5a,_0x2fc5ec,_0x27c0ff,_0x541304){const _0x992f58=_0x3132be,_0x5a60da={'memberId':(await this[_0x992f58(0x10a)][_0x992f58(0x112)](_0x518a5a))['getMemberID'](),'threadId':_0x27c0ff,'replyId':_0x541304,'unitId':_0x518a5a},_0x13ed5f=await this[_0x992f58(0x10c)]['post'](_0x992f58(0x111)+_0x518a5a+_0x992f58(0xfe),{'body':_0x5a60da});return!_0x13ed5f[_0x992f58(0xc2)][_0x992f58(0x117)]||_0x13ed5f['body'][_0x992f58(0x117)][_0x992f58(0x104)]===0x1;}async['listComments'](_0xa69796,_0x5b1980,_0x5e76fc){const _0x3b35af=_0x3132be,_0x50723b={'unitId':_0xa69796,'threadId':_0x5e76fc},_0x4c4b7d=await this[_0x3b35af(0x10c)]['post'](_0x3b35af(0x111)+_0xa69796+_0x3b35af(0xbc),{'body':_0x50723b}),_0x337915=_0x5e76fc[_0x3b35af(0xd2)](_0x53cc1d=>_0x39d58a(_0x4c4b7d[_0x3b35af(0xc2)]['comments'][_0x53cc1d],_0xa69796,_0x5b1980))[_0x3b35af(0xa0)](Boolean);return Object[_0x3b35af(0x127)](_0x4c4b7d[_0x3b35af(0xc2)][_0x3b35af(0xd6)])[_0x3b35af(0x129)](_0x552868=>{const _0x1740e7=_0x3b35af;this['_userService'][_0x1740e7(0x95)](_0x552868);}),_0x337915;}['saveCommentToSnapshot'](_0x5138da){const _0x13e3eb=_0x3132be;return{'id':_0x5138da['id'],'threadId':_0x5138da[_0x13e3eb(0xe9)],'ref':_0x5138da[_0x13e3eb(0xf4)]};}};_0xf8eafe=_0x413795([_0x24c92b(0x0,_0xb14d49['Inject'](_0xccfc7e[_0x3132be(0xf9)])),_0x24c92b(0x1,_0xb14d49[_0x3132be(0xef)](_0xb14d49[_0x3132be(0xcf)])),_0x24c92b(0x2,_0xb14d49['Inject'](_0xfeceb6[_0x3132be(0xc7)])),_0x24c92b(0x3,_0xb14d49['Inject'](_0xb14d49[_0x3132be(0xf8)]))],_0xf8eafe);var _0x33c730=Object['defineProperty'],_0x5f7168=Object['getOwnPropertyDescriptor'],_0x4877f7=(_0x360b95,_0x57748f,_0x4bf71b,_0xb71aa7)=>{const _0x38cdba=_0x3132be;for(var _0x1e9589=_0xb71aa7>0x1?void 0x0:_0xb71aa7?_0x5f7168(_0x57748f,_0x4bf71b):_0x57748f,_0x215a9b=_0x360b95[_0x38cdba(0xf7)]-0x1,_0x4dcbc6;_0x215a9b>=0x0;_0x215a9b--)(_0x4dcbc6=_0x360b95[_0x215a9b])&&(_0x1e9589=(_0xb71aa7?_0x4dcbc6(_0x57748f,_0x4bf71b,_0x1e9589):_0x4dcbc6(_0x1e9589))||_0x1e9589);return _0xb71aa7&&_0x1e9589&&_0x33c730(_0x57748f,_0x4bf71b,_0x1e9589),_0x1e9589;},_0x3c8b68=(_0xaebe4f,_0x25ffc7)=>(_0x127860,_0x2eaed1)=>_0x25ffc7(_0x127860,_0x2eaed1,_0xaebe4f);let _0xf38a08=class{constructor(_0x51c9d6){const _0x4c2881=_0x3132be;this[_0x4c2881(0x10c)]=_0x51c9d6;}async[_0x3132be(0xe7)](_0x21ff04,_0x4beba1,_0x80e8e7){const _0x5adbf7=_0x3132be,_0x4333aa=new URL(window['location']['href'])[_0x5adbf7(0xae)]['get'](_0x5adbf7(0xf6));if(!_0x4333aa)return[];const _0x10e635=window[_0x5adbf7(0xea)]['host'],_0x3480f6=window[_0x5adbf7(0xea)][_0x5adbf7(0xe4)]==='https:'?_0x5adbf7(0xdc):_0x5adbf7(0xd5);return(await this[_0x5adbf7(0x10c)]['get'](_0x3480f6+_0x5adbf7(0xba)+_0x10e635+_0x5adbf7(0xdf),{'params':{'objectID':_0x4333aa,'unitID':_0x4333aa}}))[_0x5adbf7(0xc2)]['collaborators'][_0x5adbf7(0xd2)](_0x5870e6=>{const _0x2156f0=_0x5adbf7;var _0x33209a,_0xb6dc91,_0x4700ca,_0x53bcf8,_0x3c0261,_0x50f927;return{'id':(_0xb6dc91=(_0x33209a=_0x5870e6[_0x2156f0(0xc5)])==null?void 0x0:_0x33209a[_0x2156f0(0xd4)])!=null?_0xb6dc91:'','label':(_0x53bcf8=(_0x4700ca=_0x5870e6['subject'])==null?void 0x0:_0x4700ca[_0x2156f0(0x122)])!=null?_0x53bcf8:'','icon':(_0x50f927=(_0x3c0261=_0x5870e6[_0x2156f0(0xc5)])==null?void 0x0:_0x3c0261[_0x2156f0(0x102)])!=null?_0x50f927:'','type':_0x2156f0(0xfb)};});}};_0xf38a08=_0x4877f7([_0x3c8b68(0x0,_0xb14d49[_0x3132be(0xef)](_0xccfc7e[_0x3132be(0xf9)]))],_0xf38a08);var _0x1c9708=Object['defineProperty'],_0x58817a=Object['getOwnPropertyDescriptor'],_0x817959=(_0x39be46,_0x3f2b79,_0x20ea5c,_0x3f9eaf)=>{for(var _0x349922=_0x3f9eaf>0x1?void 0x0:_0x3f9eaf?_0x58817a(_0x3f2b79,_0x20ea5c):_0x3f2b79,_0x25dcb7=_0x39be46['length']-0x1,_0x362062;_0x25dcb7>=0x0;_0x25dcb7--)(_0x362062=_0x39be46[_0x25dcb7])&&(_0x349922=(_0x3f9eaf?_0x362062(_0x3f2b79,_0x20ea5c,_0x349922):_0x362062(_0x349922))||_0x349922);return _0x3f9eaf&&_0x349922&&_0x1c9708(_0x3f2b79,_0x20ea5c,_0x349922),_0x349922;},_0x11e3a7=(_0x241ef7,_0x4321dc)=>(_0x49950e,_0x525265)=>_0x4321dc(_0x49950e,_0x525265,_0x241ef7);let _0x3ea484=class extends _0xb14d49['Disposable']{constructor(_0x6863d0,_0x1fbb52,_0x115e00,_0x38e11f){const _0x29b867=_0x3132be;super(),this['_threadCommentDataSourceService']=_0x6863d0,this['_threadCommentDataSource']=_0x1fbb52,this['_threadCommentMentionDataService']=_0x115e00,this[_0x29b867(0x9d)]=_0x38e11f,this[_0x29b867(0xfd)]();}[_0x3132be(0xfd)](){const _0x5acc7c=_0x3132be;this['_threadCommentDataSourceService'][_0x5acc7c(0xdd)]=this[_0x5acc7c(0xda)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1,this[_0x5acc7c(0x11e)]['dataSource']=this[_0x5acc7c(0x9d)];}};_0x3ea484=_0x817959([_0x11e3a7(0x0,_0x1c4f80[_0x3132be(0x10b)]),_0x11e3a7(0x1,_0xb14d49['Inject'](_0xf8eafe)),_0x11e3a7(0x2,_0x35342a[_0x3132be(0x105)]),_0x11e3a7(0x3,_0xb14d49[_0x3132be(0xef)](_0xf38a08))],_0x3ea484);var _0x54830f=Object[_0x3132be(0xa3)],_0x1e9713=Object[_0x3132be(0x96)],_0x1f288c=(_0x8a535b,_0x43d7ab,_0x24004d)=>_0x43d7ab in _0x8a535b?_0x54830f(_0x8a535b,_0x43d7ab,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x24004d}):_0x8a535b[_0x43d7ab]=_0x24004d,_0x229748=(_0x4d3ca2,_0xd5f084,_0x187cda,_0x278448)=>{const _0x5d19a3=_0x3132be;for(var _0x59b0a9=_0x278448>0x1?void 0x0:_0x278448?_0x1e9713(_0xd5f084,_0x187cda):_0xd5f084,_0x3aa71e=_0x4d3ca2[_0x5d19a3(0xf7)]-0x1,_0x51008e;_0x3aa71e>=0x0;_0x3aa71e--)(_0x51008e=_0x4d3ca2[_0x3aa71e])&&(_0x59b0a9=(_0x278448?_0x51008e(_0xd5f084,_0x187cda,_0x59b0a9):_0x51008e(_0x59b0a9))||_0x59b0a9);return _0x278448&&_0x59b0a9&&_0x54830f(_0xd5f084,_0x187cda,_0x59b0a9),_0x59b0a9;},_0x1fbe67=(_0x538fb4,_0xe16c02)=>(_0xf964e,_0x3e4319)=>_0xe16c02(_0xf964e,_0x3e4319,_0x538fb4),_0x59efb2=(_0x37e57a,_0x255b72,_0x200588)=>_0x1f288c(_0x37e57a,typeof _0x255b72!=_0x3132be(0x110)?_0x255b72+'':_0x255b72,_0x200588);_0xab891b[_0x3132be(0x11d)]=class extends _0xb14d49['Plugin']{constructor(_0x4354c8=_0x43d20a,_0x421212,_0x1289a3){const _0x23fa62=_0x3132be;super(),this[_0x23fa62(0x10e)]=_0x4354c8,this['_injector']=_0x421212,this[_0x23fa62(0x11b)]=_0x1289a3;const {..._0x5454f7}=this[_0x23fa62(0x10e)];this[_0x23fa62(0x11b)][_0x23fa62(0xa2)](_0x1077b2,_0x5454f7);}['onStarting'](){const _0x389742=_0x3132be;[[_0xf38a08],[_0xf8eafe],[_0x3ea484],[_0x10314a]]['forEach'](_0x5d1ad7=>{const _0x5498c2=_0x21ec;this[_0x5498c2(0xa6)][_0x5498c2(0x109)](_0x5d1ad7);}),this[_0x389742(0xa6)][_0x389742(0x11a)](_0x3ea484);}[_0x3132be(0xd9)](){const _0x1840e6=_0x3132be;this[_0x1840e6(0xa6)]['get'](_0x10314a);}},_0x59efb2(_0xab891b[_0x3132be(0x11d)],_0x3132be(0x125),_0x27444f),_0x59efb2(_0xab891b[_0x3132be(0x11d)],_0x3132be(0xe8),_0xb14d49[_0x3132be(0xb3)][_0x3132be(0x108)]),_0xab891b[_0x3132be(0x11d)]=_0x229748([_0xb14d49[_0x3132be(0x101)](_0x1c4f80[_0x3132be(0xaf)],_0x35342a['UniverThreadCommentUIPlugin'],_0xfeceb6[_0x3132be(0xb2)],_0x26ab42['UniverLicensePlugin']),_0x1fbe67(0x1,_0xb14d49[_0x3132be(0xef)](_0xb14d49[_0x3132be(0xf8)])),_0x1fbe67(0x2,_0xb14d49[_0x3132be(0xc8)])],_0xab891b[_0x3132be(0x11d)]),Object['defineProperty'](_0xab891b,Symbol['toStringTag'],{'value':_0x3132be(0xa8)});}));function _0x5bc1(){const _0x54acf2=['pluginName','size','values','Solve','forEach','customRanges','addUser','getOwnPropertyDescriptor','@univerjs/network','comment','unitId','rangeType','Delete','getCurrentUser','_threadCommentMentionDataSource','getUser','object','filter','replies','setConfig','defineProperty','solved','Reply','_injector','UniverThreadComment','Module','COMMENT','parentId','getMemberID','function','exports','searchParams','UniverThreadCommentPlugin','subscribe','UniverNetwork','UniverCollaborationClientPlugin','UniverInstanceType','@univerjs-pro/license','pipe','slice','content','/add','resolveComment','://','bufferTime','/list','1399092zbLReW','@univerjs/thread-comment','505PQkrWS','commentUpdate$','CustomRangeType','body','getComment','OpenOrReOpen','subject','payload','CollaborationSessionService','IConfigService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/reply','format','parse','addComment','UniverThreadCommentUi','UserManagerService','3562695WgwljE','@univerjs/thread-comment-ui','map','292xaShos','userID','http','users','Solved','1089690fVfKPP','onReady','_threadCommentDataSource','536035tkbtZQ','https','dataSource','rxjs','/universer-api/authz/collaborator','getThread','reply','thread-comment-data-source.config','_commentService','protocol','rangeId','@univerjs/core','getMentions','type','threadId','location','@univerjs-pro/collaboration-client','YYYY/MM/DD\x20HH:mm','UniverCore','Edit','Inject','UniverLicense','16620EeXCto','_userService','userId','ref','/universer-api/user/list','unit','length','Injector','HTTPService','Unknown','user','/solved','_initDataSource','/delete','_initUserSync','/edit','DependentOn','avatar','disposeWithMe','code','IThreadCommentMentionDataService','UNRECOGNIZED','2698848ccKiwB','UNIVER_UNKNOWN','add','_sessionService','IThreadCommentDataSourceService','_httpService','personId','_config','replyId','symbol','/universer-api/comment/unit/','requireSession','UniverThreadCommentDatasource','deleteComment','Disposable','ThreadCommentModel','error','2148hqiWFR','Add','get','_configService','post','UniverThreadCommentDataSourcePlugin','_threadCommentMentionDataService','updateComment','createTimestamp','dayjs','name','UniverCollaborationClient','_threadCommentModel'];_0x5bc1=function(){return _0x54acf2;};return _0x5bc1();}
|
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.202410111606",
|
|
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/network": "0.3.0-
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.3.0-
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.3.0-nightly.202410111606",
|
|
49
|
+
"@univerjs-pro/license": "0.3.0-nightly.202410111606",
|
|
50
|
+
"@univerjs/network": "0.3.0-nightly.202410111606",
|
|
51
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410111606",
|
|
52
|
+
"@univerjs/core": "0.3.0-nightly.202410111606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410111606"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"dayjs": "^1.11.13",
|
|
57
|
-
"@univerjs-pro/collaboration-client": "0.3.0-
|
|
58
|
-
"@univerjs-pro/license": "0.3.0-
|
|
59
|
-
"@univerjs
|
|
60
|
-
"@univerjs/
|
|
61
|
-
"@univerjs/
|
|
62
|
-
"@univerjs/
|
|
63
|
-
"@univerjs/
|
|
64
|
-
"@univerjs/thread-comment-ui": "0.3.0-
|
|
65
|
-
"@univerjs/uniscript": "0.3.0-
|
|
57
|
+
"@univerjs-pro/collaboration-client": "0.3.0-nightly.202410111606",
|
|
58
|
+
"@univerjs-pro/license": "0.3.0-nightly.202410111606",
|
|
59
|
+
"@univerjs/network": "0.3.0-nightly.202410111606",
|
|
60
|
+
"@univerjs/core": "0.3.0-nightly.202410111606",
|
|
61
|
+
"@univerjs-pro/facade": "0.3.0-nightly.202410111606",
|
|
62
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410111606",
|
|
63
|
+
"@univerjs/protocol": "0.1.39-alpha.24",
|
|
64
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410111606",
|
|
65
|
+
"@univerjs/uniscript": "0.3.0-nightly.202410111606"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"rxjs": "^7.8.1",
|
|
69
|
-
"typescript": "
|
|
69
|
+
"typescript": "5.6.3",
|
|
70
70
|
"vite": "^5.4.8",
|
|
71
|
-
"vitest": "^2.1.
|
|
72
|
-
"@univerjs-infra/shared": "0.3.0
|
|
71
|
+
"vitest": "^2.1.2",
|
|
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
|
}
|