@univerjs/sheets-thread-comment 0.3.0-alpha.1 → 0.3.0-nightly.202410101606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -823
- package/lib/types/controllers/sheets-thread-comment-copy-paste.controller.d.ts +1 -1
- package/lib/types/plugin.d.ts +3 -1
- package/lib/umd/index.js +1 -1
- package/package.json +19 -20
- package/LICENSE +0 -176
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
|
2
|
+
import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment-base';
|
|
2
3
|
import { ISheetClipboardService } from '@univerjs/sheets-ui';
|
|
3
4
|
import { IThreadCommentDataSourceService } from '@univerjs/thread-comment';
|
|
4
|
-
import { SheetsThreadCommentModel } from '@univerjs/sheets-thread-comment-base';
|
|
5
5
|
export declare class SheetsThreadCommentCopyPasteController extends Disposable {
|
|
6
6
|
private _sheetClipboardService;
|
|
7
7
|
private _sheetsThreadCommentModel;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
1
|
import { IUniverSheetsThreadCommentConfig } from './controllers/config.schema';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
export declare class UniverSheetsThreadCommentPlugin extends Plugin {
|
|
4
4
|
private readonly _config;
|
|
5
5
|
protected _injector: Injector;
|
|
@@ -9,4 +9,6 @@ export declare class UniverSheetsThreadCommentPlugin extends Plugin {
|
|
|
9
9
|
static type: UniverInstanceType;
|
|
10
10
|
constructor(_config: Partial<IUniverSheetsThreadCommentConfig> | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService);
|
|
11
11
|
onStarting(): void;
|
|
12
|
+
onReady(): void;
|
|
13
|
+
onRendered(): void;
|
|
12
14
|
}
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@univerjs/core"),require("@univerjs/sheets"),require("@univerjs/sheets-thread-comment-base"),require("@univerjs/thread-comment-ui"),require("@univerjs/sheets-ui"),require("@univerjs/ui"),require("rxjs"),require("@univerjs/engine-render"),require("react"),require("@univerjs/engine-formula"),require("@univerjs/thread-comment")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets","@univerjs/sheets-thread-comment-base","@univerjs/thread-comment-ui","@univerjs/sheets-ui","@univerjs/ui","rxjs","@univerjs/engine-render","react","@univerjs/engine-formula","@univerjs/thread-comment"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global.UniverSheetsThreadComment={},global.UniverCore,global.UniverSheets,global.UniverSheetsThreadCommentBase,global.UniverThreadCommentUi,global.UniverSheetsUi,global.UniverUi,global.rxjs,global.UniverEngineRender,global.React,global.UniverEngineFormula,global.UniverThreadComment))})(this,function(exports2,core,sheets,sheetsThreadCommentBase,threadCommentUi,sheetsUi,ui,rxjs,engineRender,React,engineFormula,threadComment){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);var _a,_b,_c,_d,_e,_f,_g,_h;const SHEETS_THREAD_COMMENT_MODAL="univer.sheet.thread-comment-modal",COMMENT_SINGLE_ICON="comment-single",SHEETS_THREAD_COMMENT="SHEET_THREAD_COMMENT";var __defProp$7=Object.defineProperty,__getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$7=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$7(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$7(target,key,result),result},"__decorateClass$7"),__decorateParam$7=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$7");exports2.SheetsThreadCommentPopupService=(_a=class extends core.Disposable{constructor(_canvasPopupManagerService,_zenZoneService){super();__publicField(this,"_lastPopup",null);__publicField(this,"_activePopup");__publicField(this,"_activePopup$",new rxjs.BehaviorSubject(null));__publicField(this,"activePopup$",this._activePopup$.asObservable());this._canvasPopupManagerService=_canvasPopupManagerService,this._zenZoneService=_zenZoneService,this._initZenVisible(),this.disposeWithMe(()=>{this._activePopup$.complete()})}get activePopup(){return this._activePopup}_initZenVisible(){this.disposeWithMe(this._zenZoneService.visible$.subscribe(visible=>{visible&&this.hidePopup()}))}showPopup(location,onHide){var _a2;const{row,col,unitId,subUnitId}=location;if(this._activePopup&&row===this._activePopup.row&&col===this._activePopup.col&&unitId===this._activePopup.unitId&&subUnitId===((_a2=this.activePopup)==null?void 0:_a2.subUnitId)){this._activePopup=location,this._activePopup$.next(location);return}if(this._lastPopup&&this._lastPopup.dispose(),this._zenZoneService.visible)return;this._activePopup=location,this._activePopup$.next(location);const popupDisposable=this._canvasPopupManagerService.attachPopupToCell(row,col,{componentKey:SHEETS_THREAD_COMMENT_MODAL,onClickOutside:__name(()=>{this.hidePopup()},"onClickOutside"),direction:"horizontal",excludeOutside:[...Array.from(document.querySelectorAll(".univer-thread-comment")),document.getElementById("thread-comment-add")].filter(Boolean)});if(!popupDisposable)throw new Error("[SheetsThreadCommentPopupService]: cannot show popup!");const disposableCollection=new core.DisposableCollection;disposableCollection.add(popupDisposable),disposableCollection.add({dispose:__name(()=>{onHide==null||onHide()},"dispose")}),this._lastPopup=disposableCollection}hidePopup(){this._activePopup&&(this._lastPopup&&this._lastPopup.dispose(),this._lastPopup=null,this._activePopup=null,this._activePopup$.next(null))}persistPopup(){!this._activePopup||!this._activePopup.temp||(this._activePopup={...this._activePopup,temp:!1},this._activePopup$.next(this._activePopup))}},__name(_a,"SheetsThreadCommentPopupService"),_a),exports2.SheetsThreadCommentPopupService=__decorateClass$7([__decorateParam$7(0,core.Inject(sheetsUi.SheetCanvasPopManagerService)),__decorateParam$7(1,ui.IZenZoneService)],exports2.SheetsThreadCommentPopupService);const ShowAddSheetCommentModalOperation={type:core.CommandType.OPERATION,id:"sheets.operation.show-comment-modal",handler(accessor){var _a2;const selectionManagerService=accessor.get(sheets.SheetsSelectionsService),univerInstanceService=accessor.get(core.IUniverInstanceService),sheetsThreadCommentPopupService=accessor.get(exports2.SheetsThreadCommentPopupService),threadCommentPanelService=accessor.get(threadCommentUi.ThreadCommentPanelService),activeCell=(_a2=selectionManagerService.getCurrentLastSelection())==null?void 0:_a2.primary,model=accessor.get(sheetsThreadCommentBase.SheetsThreadCommentModel);if(!activeCell)return!1;const result=sheets.getSheetCommandTarget(univerInstanceService);if(!result)return!1;const{workbook,worksheet,unitId,subUnitId}=result,location={workbook,worksheet,unitId,subUnitId,row:activeCell.startRow,col:activeCell.startColumn};sheetsThreadCommentPopupService.showPopup(location);const rootId=model.getByLocation(unitId,subUnitId,activeCell.startRow,activeCell.startColumn);return rootId&&threadCommentPanelService.setActiveComment({unitId,subUnitId,commentId:rootId,trigger:"context-menu"}),!0}},PLUGIN_CONFIG_KEY="sheets-thread-comment.config",defaultPluginConfig={};var __defProp$6=Object.defineProperty,__getOwnPropDesc$6=Object.getOwnPropertyDescriptor,__decorateClass$6=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$6(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$6(target,key,result),result},"__decorateClass$6"),__decorateParam$6=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$6");let SheetsThreadCommentRenderController=(_b=class extends core.Disposable{constructor(_sheetInterceptorService,_sheetsThreadCommentModel,_univerInstanceService,_renderManagerService){super(),this._sheetInterceptorService=_sheetInterceptorService,this._sheetsThreadCommentModel=_sheetsThreadCommentModel,this._univerInstanceService=_univerInstanceService,this._renderManagerService=_renderManagerService,this._initViewModelIntercept(),this._initSkeletonChange()}_initViewModelIntercept(){this.disposeWithMe(this._sheetInterceptorService.intercept(sheets.INTERCEPTOR_POINT.CELL_CONTENT,{effect:core.InterceptorEffectEnum.Style,handler:__name((cell,pos,next)=>{const{row,col,unitId,subUnitId}=pos;return this._sheetsThreadCommentModel.showCommentMarker(unitId,subUnitId,row,col)?next({...cell,markers:{...cell==null?void 0:cell.markers,tr:{color:"#FFBD37",size:6}}}):next(cell)},"handler"),priority:100}))}_initSkeletonChange(){const markSkeletonDirty=__name(()=>{var _a2;const workbook=this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET);if(!workbook)return;const unitId=workbook.getUnitId(),subUnitId=(_a2=workbook.getActiveSheet())==null?void 0:_a2.getSheetId();if(!subUnitId){console.warn("No active sheet found");return}const currentRender=this._renderManagerService.getRenderById(unitId),skeleton=currentRender==null?void 0:currentRender.with(sheetsUi.SheetSkeletonManagerService).getOrCreateSkeleton({sheetId:subUnitId});skeleton==null||skeleton.makeDirty(!0),skeleton==null||skeleton.calculate(),currentRender&¤tRender.mainComponent.makeForceDirty()},"markSkeletonDirty");this.disposeWithMe(this._sheetsThreadCommentModel.commentUpdate$.pipe(rxjs.debounceTime(16)).subscribe(update=>{markSkeletonDirty()}))}},__name(_b,"SheetsThreadCommentRenderController"),_b);SheetsThreadCommentRenderController=__decorateClass$6([core.OnLifecycle(core.LifecycleStages.Ready,SheetsThreadCommentRenderController),__decorateParam$6(0,core.Inject(sheets.SheetInterceptorService)),__decorateParam$6(1,core.Inject(sheetsThreadCommentBase.SheetsThreadCommentModel)),__decorateParam$6(2,core.IUniverInstanceService),__decorateParam$6(3,engineRender.IRenderManagerService)],SheetsThreadCommentRenderController);var __assign=function(){return __assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&(t[p]=s[p])}return t},__assign.apply(this,arguments)},__rest=function(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]]);return t},IconBase=React.forwardRef(function(props,ref){var icon=props.icon,id=props.id,className=props.className,extend=props.extend,restProps=__rest(props,["icon","id","className","extend"]),cls="univerjs-icon univerjs-icon-".concat(id," ").concat(className||"").trim(),idSuffix=React.useRef("_".concat(generateShortUuid()));return render(icon,"".concat(id),{defIds:icon.defIds,idSuffix:idSuffix.current},__assign({ref,className:cls},restProps),extend)});function render(node,id,runtimeProps,rootProps,extend){return React.createElement(node.tag,__assign(__assign({key:id},replaceRuntimeIdsAndExtInAttrs(node,runtimeProps,extend)),rootProps),(replaceRuntimeIdsInDefs(node,runtimeProps).children||[]).map(function(child,index){return render(child,"".concat(id,"-").concat(node.tag,"-").concat(index),runtimeProps,void 0,extend)}))}__name(render,"render");function replaceRuntimeIdsAndExtInAttrs(node,runtimeProps,extend){var attrs=__assign({},node.attrs);extend!=null&&extend.colorChannel1&&attrs.fill==="colorChannel1"&&(attrs.fill=extend.colorChannel1);var defIds=runtimeProps.defIds;return!defIds||defIds.length===0||(node.tag==="use"&&attrs["xlink:href"]&&(attrs["xlink:href"]=attrs["xlink:href"]+runtimeProps.idSuffix),Object.entries(attrs).forEach(function(_a2){var key=_a2[0],value=_a2[1];typeof value=="string"&&(attrs[key]=value.replace(/url\(#(.*)\)/,"url(#$1".concat(runtimeProps.idSuffix,")")))})),attrs}__name(replaceRuntimeIdsAndExtInAttrs,"replaceRuntimeIdsAndExtInAttrs");function replaceRuntimeIdsInDefs(node,runtimeProps){var _a2,defIds=runtimeProps.defIds;return!defIds||defIds.length===0?node:node.tag==="defs"&&(!((_a2=node.children)===null||_a2===void 0)&&_a2.length)?__assign(__assign({},node),{children:node.children.map(function(child){return typeof child.attrs.id=="string"&&defIds&&defIds.indexOf(child.attrs.id)>-1?__assign(__assign({},child),{attrs:__assign(__assign({},child.attrs),{id:child.attrs.id+runtimeProps.idSuffix})}):child})}):node}__name(replaceRuntimeIdsInDefs,"replaceRuntimeIdsInDefs");function generateShortUuid(){return Math.random().toString(36).substring(2,8)}__name(generateShortUuid,"generateShortUuid"),IconBase.displayName="UniverIcon";var element={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521C5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345ZM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521C8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345ZM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521C11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345Z",fillRule:"evenodd",clipRule:"evenodd"}},{tag:"path",attrs:{fill:"currentColor",d:"M5.83725 6.78345C6.22188 6.78345 6.53368 7.10742 6.53368 7.50706V8.41159C6.53368 8.81123 6.22188 9.13521 5.83725 9.13521 5.45263 9.13521 5.14082 8.81123 5.14082 8.41159V7.50706C5.14082 7.10742 5.45263 6.78345 5.83725 6.78345zM8.73904 6.78345C9.12366 6.78345 9.43546 7.10742 9.43546 7.50706V8.41159C9.43546 8.81123 9.12366 9.13521 8.73904 9.13521 8.35441 9.13521 8.04261 8.81123 8.04261 8.41159V7.50706C8.04261 7.10742 8.35441 6.78345 8.73904 6.78345zM11.6408 6.78345C12.0254 6.78345 12.3372 7.10742 12.3372 7.50706V8.41159C12.3372 8.81123 12.0254 9.13521 11.6408 9.13521 11.2562 9.13521 10.9444 8.81123 10.9444 8.41159V7.50706C10.9444 7.10742 11.2562 6.78345 11.6408 6.78345z"}},{tag:"path",attrs:{fill:"currentColor",d:"M1.84351 3.41861C1.84351 3.01861 2.15531 2.69434 2.53993 2.69434H14.9381C15.3228 2.69434 15.6346 3.01861 15.6346 3.41861V12.4611C15.6346 12.8612 15.3228 13.1854 14.9381 13.1854H8.82117L6.06643 14.6179C5.85054 14.7301 5.59416 14.7181 5.38884 14.5862C5.18352 14.4542 5.05855 14.2211 5.05855 13.9701V13.1854H2.53993C2.15531 13.1854 1.84351 12.8612 1.84351 12.4611L1.84351 3.41861ZM6.45141 12.7982L8.34531 12.0135C8.44201 11.9632 8.54864 11.9371 8.65676 11.9371H14.2417C14.3522 11.9371 14.4417 11.8475 14.4417 11.7371V4.14271C14.4417 4.03225 14.3522 3.94271 14.2417 3.94271H3.23636C3.12591 3.94271 3.03636 4.03225 3.03636 4.14271L3.03636 11.7371C3.03636 11.8475 3.12591 11.9371 3.23636 11.9371L5.75498 11.9371C6.1396 11.9371 6.45141 12.0611 6.45141 12.4611V12.7982Z",fillRule:"evenodd",clipRule:"evenodd"}}]},CommentSingle=React.forwardRef(function(props,ref){return React.createElement(IconBase,Object.assign({},props,{id:"comment-single",ref,icon:element}))});CommentSingle.displayName="CommentSingle";const SheetsThreadCommentCell=__name(()=>{const univerInstanceService=core.useDependency(core.IUniverInstanceService),sheetsThreadCommentPopupService=core.useDependency(exports2.SheetsThreadCommentPopupService),activePopup=ui.useObservable(sheetsThreadCommentPopupService.activePopup$),sheetThreadCommentModel=core.useDependency(sheetsThreadCommentBase.SheetsThreadCommentModel);if(ui.useObservable(sheetThreadCommentModel.commentUpdate$),!activePopup)return null;const{row,col,unitId,subUnitId,trigger}=activePopup,rootId=sheetThreadCommentModel.getByLocation(unitId,subUnitId,row,col),ref=`${core.Tools.chatAtABC(col)}${row+1}`,onClose=__name(()=>{sheetsThreadCommentPopupService.hidePopup()},"onClose"),getSubUnitName=__name(id=>{var _a2,_b2,_c2;return(_c2=(_b2=(_a2=univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET))==null?void 0:_a2.getSheetBySheetId(id))==null?void 0:_b2.getName())!=null?_c2:""},"getSubUnitName");return React.createElement(threadCommentUi.ThreadCommentTree,{onClick:__name(()=>{sheetsThreadCommentPopupService.persistPopup()},"onClick"),prefix:"cell",id:rootId,unitId,subUnitId,type:core.UniverInstanceType.UNIVER_SHEET,refStr:ref,onClose,getSubUnitName,autoFocus:trigger==="context-menu"})},"SheetsThreadCommentCell"),SheetsThreadCommentPanel=__name(()=>{var _a2;const markSelectionService=core.useDependency(sheetsUi.IMarkSelectionService),univerInstanceService=core.useDependency(core.IUniverInstanceService),sheetsThreadCommentPopupService=core.useDependency(exports2.SheetsThreadCommentPopupService),workbook=univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET),unitId=workbook.getUnitId(),commandService=core.useDependency(core.ICommandService),subUnitId$=React.useMemo(()=>workbook.activeSheet$.pipe(rxjs.map(i=>i==null?void 0:i.getSheetId())),[workbook.activeSheet$]),subUnitId=ui.useObservable(subUnitId$,(_a2=workbook.getActiveSheet())==null?void 0:_a2.getSheetId()),hoverShapeId=React.useRef(),panelService=core.useDependency(threadCommentUi.ThreadCommentPanelService),activeCommentId=ui.useObservable(panelService.activeCommentId$),panelVisible=ui.useObservable(panelService.panelVisible$,panelService.panelVisible),sortComments=React.useCallback(comments=>{const worksheets=workbook.getSheets(),sheetIndex={};worksheets.forEach((sheet,i)=>{sheetIndex[sheet.getSheetId()]=i});const sort=__name(comments2=>comments2.map(comment=>{var _a3;const ref=engineFormula.singleReferenceToGrid(comment.ref),p=[(_a3=sheetIndex[comment.subUnitId])!=null?_a3:0,ref.row,ref.column];return{...comment,p}}).sort((pre,aft)=>pre.p[0]===aft.p[0]?pre.p[1]===aft.p[1]?pre.p[2]-aft.p[2]:pre.p[1]-aft.p[1]:pre.p[0]-aft.p[0]),"sort");return[...sort(comments.filter(comment=>!comment.resolved)),...sort(comments.filter(comment=>comment.resolved))]},[workbook]),showShape=React.useCallback(comment=>{var _a3;if(comment.unitId===unitId&&comment.subUnitId===subUnitId&&!comment.resolved){const{row,column}=engineFormula.singleReferenceToGrid(comment.ref),worksheet=workbook.getSheetBySheetId(comment.subUnitId),mergeInfo=(_a3=worksheet==null?void 0:worksheet.getMergedCell(row,column))!=null?_a3:{startColumn:column,endColumn:column,startRow:row,endRow:row};if(!Number.isNaN(row)&&!Number.isNaN(column))return markSelectionService.addShape({range:mergeInfo,style:{hasAutoFill:!1,fill:"rgb(255, 189, 55, 0.35)",strokeWidth:1,stroke:"#FFBD37",widgets:{}},primary:null})}},[markSelectionService,subUnitId,unitId]),getSubUnitName=__name(id=>{var _a3,_b2;return(_b2=(_a3=workbook.getSheetBySheetId(id))==null?void 0:_a3.getName())!=null?_b2:""},"getSubUnitName"),handleAdd=__name(()=>{commandService.executeCommand(ShowAddSheetCommentModalOperation.id)},"handleAdd"),handleHover=__name(comment=>{activeCommentId&&activeCommentId.unitId===comment.unitId&&activeCommentId.subUnitId===comment.subUnitId&&activeCommentId.commentId===comment.id||(hoverShapeId.current&&(markSelectionService.removeShape(hoverShapeId.current),hoverShapeId.current=null),hoverShapeId.current=showShape(comment))},"handleHover"),handleLeave=__name(()=>{hoverShapeId.current&&(markSelectionService.removeShape(hoverShapeId.current),hoverShapeId.current=null)},"handleLeave"),handleResolve=__name((id,resolved)=>{resolved&&sheetsThreadCommentPopupService.hidePopup()},"handleResolve");return React.useEffect(()=>{!panelVisible&&hoverShapeId.current&&markSelectionService.removeShape(hoverShapeId.current)},[markSelectionService,panelVisible]),React.createElement(threadCommentUi.ThreadCommentPanel,{unitId,subUnitId$,type:core.UniverInstanceType.UNIVER_SHEET,onAdd:handleAdd,getSubUnitName,onResolve:handleResolve,sortComments,onItemEnter:handleHover,onItemLeave:handleLeave,onDeleteComment:__name(()=>(handleLeave(),!0),"onDeleteComment")})},"SheetsThreadCommentPanel"),threadCommentMenuFactory=__name(accessor=>({id:ShowAddSheetCommentModalOperation.id,type:ui.MenuItemType.BUTTON,icon:COMMENT_SINGLE_ICON,title:"sheetThreadComment.menu.addComment",hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET),disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookCommentPermission],worksheetTypes:[sheets.WorksheetViewPermission],rangeTypes:[sheets.RangeProtectionPermissionViewPoint]})}),"threadCommentMenuFactory"),threadPanelMenuFactory=__name(accessor=>({id:threadCommentUi.ToggleSheetCommentPanelOperation.id,type:ui.MenuItemType.BUTTON,icon:COMMENT_SINGLE_ICON,tooltip:"sheetThreadComment.menu.commentManagement",disabled$:sheetsUi.getCurrentRangeDisable$(accessor,{workbookTypes:[sheets.WorkbookCommentPermission],worksheetTypes:[sheets.WorksheetViewPermission],rangeTypes:[sheets.RangeProtectionPermissionViewPoint]}),hidden$:ui.getMenuHiddenObservable(accessor,core.UniverInstanceType.UNIVER_SHEET)}),"threadPanelMenuFactory"),AddCommentShortcut={id:ShowAddSheetCommentModalOperation.id,binding:ui.KeyCode.M|ui.MetaKeys.CTRL_COMMAND|ui.MetaKeys.ALT,preconditions:sheetsUi.whenSheetEditorFocused},menuSchema={[ui.RibbonStartGroup.OTHERS]:{[threadCommentUi.ToggleSheetCommentPanelOperation.id]:{order:1,menuItemFactory:threadPanelMenuFactory}},[ui.ContextMenuPosition.MAIN_AREA]:{[ui.ContextMenuGroup.OTHERS]:{[ShowAddSheetCommentModalOperation.id]:{order:0,menuItemFactory:threadCommentMenuFactory}}}};var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$5=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$5(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$5(target,key,result),result},"__decorateClass$5"),__decorateParam$5=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$5");let SheetsThreadCommentController=(_c=class extends core.Disposable{constructor(_menuManagerService,_componentManager,_shortcutService){super(),this._menuManagerService=_menuManagerService,this._componentManager=_componentManager,this._shortcutService=_shortcutService,this._initMenu(),this._initShortcut(),this._initComponent()}_initShortcut(){this._shortcutService.registerShortcut(AddCommentShortcut)}_initMenu(){this._menuManagerService.mergeMenu(menuSchema)}_initComponent(){[[SHEETS_THREAD_COMMENT_MODAL,SheetsThreadCommentCell],[threadCommentUi.THREAD_COMMENT_PANEL,SheetsThreadCommentPanel],[COMMENT_SINGLE_ICON,CommentSingle]].forEach(([key,comp])=>{this._componentManager.register(key,comp)})}},__name(_c,"SheetsThreadCommentController"),_c);SheetsThreadCommentController=__decorateClass$5([core.OnLifecycle(core.LifecycleStages.Starting,SheetsThreadCommentController),__decorateParam$5(0,ui.IMenuManagerService),__decorateParam$5(1,core.Inject(ui.ComponentManager)),__decorateParam$5(2,ui.IShortcutService)],SheetsThreadCommentController);var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$4=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$4(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$4(target,key,result),result},"__decorateClass$4"),__decorateParam$4=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$4");const transformRef=__name((ref,source,target)=>{const refObj=engineFormula.singleReferenceToGrid(ref),offsetRow=target.row-source.row,offsetCol=target.column-source.column,targetRange={startColumn:refObj.column+offsetCol,startRow:refObj.row+offsetRow,endColumn:refObj.column+offsetCol,endRow:refObj.row+offsetRow};return engineFormula.serializeRange(targetRange)},"transformRef");let SheetsThreadCommentCopyPasteController=(_d=class extends core.Disposable{constructor(_sheetClipboardService,_sheetsThreadCommentModel,_threadCommentDataSourceService){super();__publicField(this,"_copyInfo");this._sheetClipboardService=_sheetClipboardService,this._sheetsThreadCommentModel=_sheetsThreadCommentModel,this._threadCommentDataSourceService=_threadCommentDataSourceService,this._initClipboardHook()}_initClipboardHook(){this.disposeWithMe(this._sheetClipboardService.addClipboardHook({id:SHEETS_THREAD_COMMENT,onBeforeCopy:__name((unitId,subUnitId,range)=>{this._copyInfo={unitId,subUnitId,range}},"onBeforeCopy"),onPasteCells:__name((_pasteFrom,pasteTo,_data,payload)=>{const{unitId:targetUnitId,subUnitId:targetSubUnitId,range}=pasteTo,targetPos={row:range.rows[0],column:range.cols[0]};if(payload.copyType===sheetsUi.COPY_TYPE.CUT&&this._copyInfo){const{range:range2,unitId:sourceUnitId,subUnitId:sourceSubUnitId}=this._copyInfo,sourcePos={row:range2.startRow,column:range2.startColumn};if(!(targetUnitId===sourceUnitId&&targetSubUnitId===sourceSubUnitId)){const roots=[];core.Range.foreach(range2,(row,col)=>{const comments=this._sheetsThreadCommentModel.getAllByLocation(sourceUnitId,sourceSubUnitId,row,col);this._threadCommentDataSourceService.syncUpdateMutationToColla?comments.forEach(comment=>{roots.push(comment)}):comments.forEach(({children,...comment})=>{comment.parentId||roots.push(comment)})});const sourceRedos=[],sourceUndos=[],targetRedos=[],targetUndos=[],handleCommentItem=__name(item=>{sourceRedos.unshift({id:threadComment.DeleteCommentMutation.id,params:{unitId:sourceUnitId,subUnitId:sourceSubUnitId,commentId:item.id}}),targetRedos.push({id:threadComment.AddCommentMutation.id,params:{unitId:targetUnitId,subUnitId:targetSubUnitId,comment:{...item,ref:transformRef(item.ref,sourcePos,targetPos),unitId:targetUnitId,subUnitId:targetSubUnitId},sync:!0}}),sourceUndos.push({id:threadComment.AddCommentMutation.id,params:{unitId:sourceUnitId,subUnitId:sourceSubUnitId,comment:item,sync:!0}}),targetUndos.unshift({id:threadComment.DeleteCommentMutation.id,params:{unitId:targetUnitId,subUnitId:targetSubUnitId,commentId:item.id}})},"handleCommentItem");return roots.forEach(root=>{handleCommentItem(root)}),{redos:[...sourceRedos,...targetRedos],undos:[...targetUndos,...sourceUndos]}}}return{redos:[],undos:[]}},"onPasteCells")}))}},__name(_d,"SheetsThreadCommentCopyPasteController"),_d);SheetsThreadCommentCopyPasteController=__decorateClass$4([core.OnLifecycle(core.LifecycleStages.Rendered,SheetsThreadCommentCopyPasteController),__decorateParam$4(0,core.Inject(sheetsUi.ISheetClipboardService)),__decorateParam$4(1,core.Inject(sheetsThreadCommentBase.SheetsThreadCommentModel)),__decorateParam$4(2,threadComment.IThreadCommentDataSourceService)],SheetsThreadCommentCopyPasteController);var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$3(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$3(target,key,result),result},"__decorateClass$3"),__decorateParam$3=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$3");let SheetsThreadCommentHoverController=(_e=class extends core.Disposable{constructor(_hoverManagerService,_sheetsThreadCommentPopupService,_sheetsThreadCommentModel,_sheetPermissionInterceptorBaseController){super(),this._hoverManagerService=_hoverManagerService,this._sheetsThreadCommentPopupService=_sheetsThreadCommentPopupService,this._sheetsThreadCommentModel=_sheetsThreadCommentModel,this._sheetPermissionInterceptorBaseController=_sheetPermissionInterceptorBaseController,this._initHoverEvent()}_initHoverEvent(){this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(rxjs.debounceTime(100)).subscribe(cell=>{const currentPopup=this._sheetsThreadCommentPopupService.activePopup;if(cell&&(currentPopup&¤tPopup.temp||!currentPopup)){const{location}=cell,{unitId,subUnitId,row,col}=location,commentId=this._sheetsThreadCommentModel.getByLocation(unitId,subUnitId,row,col);if(commentId){if(!this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({workbookTypes:[sheets.WorkbookCommentPermission],worksheetTypes:[sheets.WorksheetViewPermission],rangeTypes:[sheets.RangeProtectionPermissionViewPoint]},[{startRow:row,startColumn:col,endRow:row,endColumn:col}]))return;const comment=this._sheetsThreadCommentModel.getComment(unitId,subUnitId,commentId);comment&&!comment.resolved&&this._sheetsThreadCommentPopupService.showPopup({unitId,subUnitId,row,col,commentId,temp:!0})}else currentPopup&&this._sheetsThreadCommentPopupService.hidePopup()}}))}},__name(_e,"SheetsThreadCommentHoverController"),_e);SheetsThreadCommentHoverController=__decorateClass$3([core.OnLifecycle(core.LifecycleStages.Rendered,SheetsThreadCommentHoverController),__decorateParam$3(0,core.Inject(sheetsUi.HoverManagerService)),__decorateParam$3(1,core.Inject(exports2.SheetsThreadCommentPopupService)),__decorateParam$3(2,core.Inject(sheetsThreadCommentBase.SheetsThreadCommentModel)),__decorateParam$3(3,core.Inject(sheetsUi.SheetPermissionInterceptorBaseController))],SheetsThreadCommentHoverController);var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$2(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$2(target,key,result),result},"__decorateClass$2"),__decorateParam$2=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$2");let SheetsThreadCommentPopupController=(_f=class extends core.Disposable{constructor(_commandService,_sheetsThreadCommentPopupService,_sheetsThreadCommentModel,_threadCommentPanelService,_univerInstanceService,_sheetPermissionInterceptorBaseController,_markSelectionService,_sheetSelectionService,_editorBridgeService){super();__publicField(this,"_isSwitchToCommenting",!1);__publicField(this,"_selectionShapeInfo",null);this._commandService=_commandService,this._sheetsThreadCommentPopupService=_sheetsThreadCommentPopupService,this._sheetsThreadCommentModel=_sheetsThreadCommentModel,this._threadCommentPanelService=_threadCommentPanelService,this._univerInstanceService=_univerInstanceService,this._sheetPermissionInterceptorBaseController=_sheetPermissionInterceptorBaseController,this._markSelectionService=_markSelectionService,this._sheetSelectionService=_sheetSelectionService,this._editorBridgeService=_editorBridgeService,this._initCommandListener(),this._initPanelListener(),this._initMarkSelection(),this._initSelectionUpdateListener(),this._initEditorBridge()}_handleSelectionChange(selections,unitId,subUnitId){var _a2,_b2;const range=(_a2=selections[0])==null?void 0:_a2.range;if(!range)return;if(((_b2=range.rangeType)!=null?_b2:core.RANGE_TYPE.NORMAL)!==core.RANGE_TYPE.NORMAL||range.endColumn-range.startColumn>0||range.endRow-range.startRow>0){this._threadCommentPanelService.activeCommentId&&this._commandService.executeCommand(threadCommentUi.SetActiveCommentOperation.id);return}const row=range.startRow,col=range.startColumn;if(!this._sheetsThreadCommentModel.showCommentMarker(unitId,subUnitId,row,col)){this._threadCommentPanelService.activeCommentId&&this._commandService.executeCommand(threadCommentUi.SetActiveCommentOperation.id);return}const commentId=this._sheetsThreadCommentModel.getByLocation(unitId,subUnitId,row,col);commentId&&this._commandService.executeCommand(threadCommentUi.SetActiveCommentOperation.id,{unitId,subUnitId,commentId})}_initSelectionUpdateListener(){this.disposeWithMe(this._sheetSelectionService.selectionMoveEnd$.subscribe(selections=>{if(this._isSwitchToCommenting)return;const current=this._sheetSelectionService.currentSelectionParam;current&&this._handleSelectionChange(selections,current.unitId,current.sheetId)}))}_initEditorBridge(){this.disposeWithMe(this._editorBridgeService.visible$.subscribe(visible=>{visible.visible&&this._sheetsThreadCommentPopupService.hidePopup()}))}_initCommandListener(){this._commandService.onCommandExecuted(commandInfo=>{if(commandInfo.id===threadComment.DeleteCommentMutation.id){const params=commandInfo.params,active=this._sheetsThreadCommentPopupService.activePopup;if(!active)return;const{unitId,subUnitId,commentId}=active;params.unitId===unitId&¶ms.subUnitId===subUnitId&¶ms.commentId===commentId&&this._sheetsThreadCommentPopupService.hidePopup()}})}_initPanelListener(){this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.subscribe(async commentInfo=>{var _a2;if(commentInfo){const{unitId,subUnitId,commentId,trigger}=commentInfo,comment=this._sheetsThreadCommentModel.getComment(unitId,subUnitId,commentId);if(!comment||comment.resolved)return;const currentUnit=this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET);if(!currentUnit||currentUnit.getUnitId()!==unitId)return;this._isSwitchToCommenting=!0,((_a2=currentUnit.getActiveSheet())==null?void 0:_a2.getSheetId())!==subUnitId&&await this._commandService.executeCommand(sheets.SetWorksheetActiveOperation.id,{unitId,subUnitId}),this._isSwitchToCommenting=!1;const location=engineFormula.singleReferenceToGrid(comment.ref),{row,column:col}=location;if(!this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({workbookTypes:[sheets.WorkbookCommentPermission],worksheetTypes:[sheets.WorksheetViewPermission],rangeTypes:[sheets.RangeProtectionPermissionViewPoint]},[{startRow:row,startColumn:col,endRow:row,endColumn:col}]))return;const GAP=1;if(await this._commandService.executeCommand(sheetsUi.ScrollToRangeOperation.id,{range:{startRow:Math.max(location.row-GAP,0),endRow:location.row+GAP,startColumn:Math.max(location.column-GAP,0),endColumn:location.column+GAP}}),this._editorBridgeService.isVisible().visible)return;this._sheetsThreadCommentPopupService.showPopup({unitId,subUnitId,row:location.row,col:location.column,commentId:comment.id,trigger})}else this._sheetsThreadCommentPopupService.hidePopup()}))}_initMarkSelection(){this.disposeWithMe(this._threadCommentPanelService.activeCommentId$.pipe(rxjs.debounceTime(100)).subscribe(activeComment=>{var _a2,_b2;if(!activeComment){this._selectionShapeInfo&&(this._markSelectionService.removeShape(this._selectionShapeInfo.shapeId),this._selectionShapeInfo=null);return}const{unitId,subUnitId,commentId}=activeComment;this._selectionShapeInfo&&(this._markSelectionService.removeShape(this._selectionShapeInfo.shapeId),this._selectionShapeInfo=null);const comment=this._sheetsThreadCommentModel.getComment(unitId,subUnitId,commentId);if(!comment)return;const location=engineFormula.singleReferenceToGrid(comment.ref),{row,column}=location;if(Number.isNaN(row)||Number.isNaN(column))return null;const worksheet=(_a2=this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET))==null?void 0:_a2.getSheetBySheetId(subUnitId),mergeInfo=(_b2=worksheet==null?void 0:worksheet.getMergedCell(row,column))!=null?_b2:{startColumn:column,endColumn:column,startRow:row,endRow:row},shapeId=this._markSelectionService.addShape({range:mergeInfo,style:{hasAutoFill:!1,fill:"rgb(255, 189, 55, 0.35)",strokeWidth:1,stroke:"#FFBD37",widgets:{}},primary:null},[],-1);shapeId&&(this._selectionShapeInfo={...activeComment,shapeId})}))}},__name(_f,"SheetsThreadCommentPopupController"),_f);SheetsThreadCommentPopupController=__decorateClass$2([core.OnLifecycle(core.LifecycleStages.Rendered,SheetsThreadCommentPopupController),__decorateParam$2(0,core.ICommandService),__decorateParam$2(1,core.Inject(exports2.SheetsThreadCommentPopupService)),__decorateParam$2(2,core.Inject(sheetsThreadCommentBase.SheetsThreadCommentModel)),__decorateParam$2(3,core.Inject(threadCommentUi.ThreadCommentPanelService)),__decorateParam$2(4,core.IUniverInstanceService),__decorateParam$2(5,core.Inject(sheetsUi.SheetPermissionInterceptorBaseController)),__decorateParam$2(6,sheetsUi.IMarkSelectionService),__decorateParam$2(7,core.Inject(sheets.SheetsSelectionsService)),__decorateParam$2(8,sheetsUi.IEditorBridgeService)],SheetsThreadCommentPopupController);var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc$1(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp$1(target,key,result),result},"__decorateClass$1"),__decorateParam$1=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam$1");let ThreadCommentRemoveSheetsController=(_g=class extends core.Disposable{constructor(_sheetInterceptorService,_univerInstanceService,_threadCommentModel,_threadCommentDataSourceService){super(),this._sheetInterceptorService=_sheetInterceptorService,this._univerInstanceService=_univerInstanceService,this._threadCommentModel=_threadCommentModel,this._threadCommentDataSourceService=_threadCommentDataSourceService,this._initSheetChange()}_initSheetChange(){this.disposeWithMe(this._sheetInterceptorService.interceptCommand({getMutations:__name(commandInfo=>{var _a2;if(commandInfo.id===sheets.RemoveSheetCommand.id){const params=commandInfo.params,workbook=params.unitId?this._univerInstanceService.getUnit(params.unitId):this._univerInstanceService.getCurrentUnitForType(core.UniverInstanceType.UNIVER_SHEET);if(!workbook)return{redos:[],undos:[]};const unitId=workbook.getUnitId(),subUnitId=params.subUnitId||((_a2=workbook.getActiveSheet())==null?void 0:_a2.getSheetId());if(!subUnitId)return{redos:[],undos:[]};const{commentMap}=this._threadCommentModel.ensureMap(unitId,subUnitId),comments=Array.from(Object.values(commentMap)).filter(comment=>!comment.parentId),ids=comments.map(comment=>comment.id),shouldSync=this._threadCommentDataSourceService.syncUpdateMutationToColla,redos=ids.map(id=>({id:threadComment.DeleteCommentMutation.id,params:{unitId,subUnitId,commentId:id}})),undos=comments.map(({children,...comment})=>({id:threadComment.AddCommentMutation.id,params:{unitId,subUnitId,comment:{...comment,children:shouldSync?children:void 0},sync:!shouldSync}}));return{redos,undos}}return{redos:[],undos:[]}},"getMutations")}))}},__name(_g,"ThreadCommentRemoveSheetsController"),_g);ThreadCommentRemoveSheetsController=__decorateClass$1([core.OnLifecycle(core.LifecycleStages.Ready,ThreadCommentRemoveSheetsController),__decorateParam$1(0,core.Inject(sheets.SheetInterceptorService)),__decorateParam$1(1,core.IUniverInstanceService),__decorateParam$1(2,core.Inject(threadComment.ThreadCommentModel)),__decorateParam$1(3,threadComment.IThreadCommentDataSourceService)],ThreadCommentRemoveSheetsController);var __defProp2=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__defNormalProp2=__name((obj,key,value)=>key in obj?__defProp2(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,"__defNormalProp"),__decorateClass=__name((decorators,target,key,kind)=>{for(var result=kind>1?void 0:kind?__getOwnPropDesc(target,key):target,i=decorators.length-1,decorator;i>=0;i--)(decorator=decorators[i])&&(result=(kind?decorator(target,key,result):decorator(result))||result);return kind&&result&&__defProp2(target,key,result),result},"__decorateClass"),__decorateParam=__name((index,decorator)=>(target,key)=>decorator(target,key,index),"__decorateParam"),__publicField2=__name((obj,key,value)=>__defNormalProp2(obj,typeof key!="symbol"?key+"":key,value),"__publicField");exports2.UniverSheetsThreadCommentPlugin=(_h=class extends core.Plugin{constructor(_config=defaultPluginConfig,_injector,_commandService,_configService){super(),this._config=_config,this._injector=_injector,this._commandService=_commandService,this._configService=_configService;const{menu,...rest}=this._config;menu&&this._configService.setConfig("menu",menu,{merge:!0}),this._configService.setConfig(PLUGIN_CONFIG_KEY,rest)}onStarting(){[[SheetsThreadCommentController],[SheetsThreadCommentRenderController],[SheetsThreadCommentCopyPasteController],[SheetsThreadCommentHoverController],[ThreadCommentRemoveSheetsController],[SheetsThreadCommentPopupController],[exports2.SheetsThreadCommentPopupService]].forEach(dep=>{this._injector.add(dep)}),[ShowAddSheetCommentModalOperation].forEach(command=>{this._commandService.registerCommand(command)})}},__name(_h,"UniverSheetsThreadCommentPlugin"),_h),__publicField2(exports2.UniverSheetsThreadCommentPlugin,"pluginName",SHEETS_THREAD_COMMENT),__publicField2(exports2.UniverSheetsThreadCommentPlugin,"type",core.UniverInstanceType.UNIVER_SHEET),exports2.UniverSheetsThreadCommentPlugin=__decorateClass([core.DependentOn(threadCommentUi.UniverThreadCommentUIPlugin,sheetsThreadCommentBase.UniverSheetsThreadCommentBasePlugin),__decorateParam(1,core.Inject(core.Injector)),__decorateParam(2,core.Inject(core.ICommandService)),__decorateParam(3,core.IConfigService)],exports2.UniverSheetsThreadCommentPlugin),Object.defineProperty(exports2,"SheetsThreadCommentModel",{enumerable:!0,get:__name(()=>sheetsThreadCommentBase.SheetsThreadCommentModel,"get")}),Object.defineProperty(exports2,"IThreadCommentMentionDataService",{enumerable:!0,get:__name(()=>threadCommentUi.IThreadCommentMentionDataService,"get")}),Object.defineProperty(exports2,"UniverThreadCommentUIPlugin",{enumerable:!0,get:__name(()=>threadCommentUi.UniverThreadCommentUIPlugin,"get")}),Object.defineProperty(exports2,"AddCommentCommand",{enumerable:!0,get:__name(()=>threadComment.AddCommentCommand,"get")}),Object.defineProperty(exports2,"DeleteCommentCommand",{enumerable:!0,get:__name(()=>threadComment.DeleteCommentCommand,"get")}),Object.defineProperty(exports2,"DeleteCommentTreeCommand",{enumerable:!0,get:__name(()=>threadComment.DeleteCommentTreeCommand,"get")}),Object.defineProperty(exports2,"IThreadCommentDataSourceService",{enumerable:!0,get:__name(()=>threadComment.IThreadCommentDataSourceService,"get")}),Object.defineProperty(exports2,"ResolveCommentCommand",{enumerable:!0,get:__name(()=>threadComment.ResolveCommentCommand,"get")}),Object.defineProperty(exports2,"UpdateCommentCommand",{enumerable:!0,get:__name(()=>threadComment.UpdateCommentCommand,"get")}),exports2.SHEETS_THREAD_COMMENT=SHEETS_THREAD_COMMENT,exports2.ShowAddSheetCommentModalOperation=ShowAddSheetCommentModalOperation,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
function _0x3c2f(_0x3019f7,_0x1b471b){const _0x3258d2=_0x3258();return _0x3c2f=function(_0x3c2f13,_0x47b35a){_0x3c2f13=_0x3c2f13-0xb4;let _0x2bb9be=_0x3258d2[_0x3c2f13];return _0x2bb9be;},_0x3c2f(_0x3019f7,_0x1b471b);}(function(_0x13038d,_0x34b800){const _0xd0cb58=_0x3c2f,_0x439315=_0x13038d();while(!![]){try{const _0x53ccee=-parseInt(_0xd0cb58(0x1ed))/0x1*(parseInt(_0xd0cb58(0xca))/0x2)+parseInt(_0xd0cb58(0x14a))/0x3+parseInt(_0xd0cb58(0x138))/0x4*(-parseInt(_0xd0cb58(0x118))/0x5)+-parseInt(_0xd0cb58(0xcc))/0x6+-parseInt(_0xd0cb58(0x1dc))/0x7*(-parseInt(_0xd0cb58(0x147))/0x8)+-parseInt(_0xd0cb58(0x164))/0x9+-parseInt(_0xd0cb58(0x175))/0xa*(-parseInt(_0xd0cb58(0x149))/0xb);if(_0x53ccee===_0x34b800)break;else _0x439315['push'](_0x439315['shift']());}catch(_0x3e1a00){_0x439315['push'](_0x439315['shift']());}}}(_0x3258,0xf133c),function(_0x3488ea,_0x389ed4){const _0x48c30f=_0x3c2f;typeof exports==_0x48c30f(0xc6)&&typeof module<'u'?_0x389ed4(exports,require(_0x48c30f(0x17b)),require(_0x48c30f(0x1b1)),require(_0x48c30f(0x13a)),require('@univerjs/thread-comment-ui'),require(_0x48c30f(0x169)),require(_0x48c30f(0xbe)),require(_0x48c30f(0x199)),require('@univerjs/engine-render'),require(_0x48c30f(0xc8)),require('@univerjs/engine-formula'),require(_0x48c30f(0x1d1))):typeof define=='function'&&define[_0x48c30f(0x17a)]?define([_0x48c30f(0x17d),'@univerjs/core',_0x48c30f(0x1b1),_0x48c30f(0x13a),_0x48c30f(0xce),_0x48c30f(0x169),_0x48c30f(0xbe),_0x48c30f(0x199),_0x48c30f(0x140),_0x48c30f(0xc8),_0x48c30f(0x1f8),'@univerjs/thread-comment'],_0x389ed4):(_0x3488ea=typeof globalThis<'u'?globalThis:_0x3488ea||self,_0x389ed4(_0x3488ea['UniverSheetsThreadComment']={},_0x3488ea[_0x48c30f(0xe7)],_0x3488ea[_0x48c30f(0x124)],_0x3488ea[_0x48c30f(0x1c6)],_0x3488ea['UniverThreadCommentUi'],_0x3488ea[_0x48c30f(0x103)],_0x3488ea[_0x48c30f(0x11a)],_0x3488ea[_0x48c30f(0x199)],_0x3488ea[_0x48c30f(0x106)],_0x3488ea['React'],_0x3488ea['UniverEngineFormula'],_0x3488ea['UniverThreadComment']));}(this,function(_0x496a1c,_0x406e39,_0x5e6cb0,_0x4cf1db,_0x40b2af,_0x5ef1f5,_0x48410b,_0x2d855b,_0x130b75,_0x188714,_0x4d5a79,_0x15384c){'use strict';const _0x5318e2=_0x3c2f;var _0x533647=Object[_0x5318e2(0x1b5)],_0x4b3fa2=(_0x16ea78,_0x1ce2ea,_0x5ce4d4)=>_0x1ce2ea in _0x16ea78?_0x533647(_0x16ea78,_0x1ce2ea,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5ce4d4}):_0x16ea78[_0x1ce2ea]=_0x5ce4d4,_0x454ee3=(_0x17813a,_0x11aa9c)=>_0x533647(_0x17813a,'name',{'value':_0x11aa9c,'configurable':!0x0}),_0x1cb9c5=(_0x176112,_0x503e32,_0x227cd2)=>_0x4b3fa2(_0x176112,typeof _0x503e32!=_0x5318e2(0x131)?_0x503e32+'':_0x503e32,_0x227cd2),_0x126e51,_0x78e01f,_0xc09543,_0x51e176,_0x4d2e61,_0x3babff,_0x1c0780,_0x4368b5;const _0x1a9763='univer.sheet.thread-comment-modal',_0x62fe4=_0x5318e2(0x1b8),_0x4ad0ee=_0x5318e2(0x1e8);var _0x2b9738=Object[_0x5318e2(0x1b5)],_0x41bf0c=Object[_0x5318e2(0x161)],_0x5a63fe=_0x454ee3((_0x3a1799,_0x586b2b,_0x721cd7,_0x17fb95)=>{const _0xc3877e=_0x5318e2;for(var _0x203308=_0x17fb95>0x1?void 0x0:_0x17fb95?_0x41bf0c(_0x586b2b,_0x721cd7):_0x586b2b,_0x44103e=_0x3a1799[_0xc3877e(0x1d9)]-0x1,_0x14983c;_0x44103e>=0x0;_0x44103e--)(_0x14983c=_0x3a1799[_0x44103e])&&(_0x203308=(_0x17fb95?_0x14983c(_0x586b2b,_0x721cd7,_0x203308):_0x14983c(_0x203308))||_0x203308);return _0x17fb95&&_0x203308&&_0x2b9738(_0x586b2b,_0x721cd7,_0x203308),_0x203308;},_0x5318e2(0x126)),_0x22d02c=_0x454ee3((_0xa079b8,_0x460f83)=>(_0x353080,_0x51303f)=>_0x460f83(_0x353080,_0x51303f,_0xa079b8),_0x5318e2(0xe5));_0x496a1c[_0x5318e2(0x171)]=(_0x126e51=class extends _0x406e39[_0x5318e2(0x1fc)]{constructor(_0x2b89a0,_0x9aff7d){const _0x2501fc=_0x5318e2;super(),_0x1cb9c5(this,'_lastPopup',null),_0x1cb9c5(this,'_activePopup'),_0x1cb9c5(this,_0x2501fc(0xdf),new _0x2d855b[(_0x2501fc(0x163))](null)),_0x1cb9c5(this,_0x2501fc(0x113),this['_activePopup$'][_0x2501fc(0x1f5)]()),(this[_0x2501fc(0x108)]=_0x2b89a0,this[_0x2501fc(0x17e)]=_0x9aff7d,this['_initZenVisible'](),this['disposeWithMe'](()=>{const _0x341edf=_0x2501fc;this[_0x341edf(0xdf)][_0x341edf(0x11b)]();}));}get[_0x5318e2(0x14f)](){return this['_activePopup'];}[_0x5318e2(0xff)](){const _0x1b5ef1=_0x5318e2;this[_0x1b5ef1(0x19a)](this[_0x1b5ef1(0x17e)][_0x1b5ef1(0x102)][_0x1b5ef1(0xb9)](_0x266a27=>{const _0x37b498=_0x1b5ef1;_0x266a27&&this[_0x37b498(0x14b)]();}));}[_0x5318e2(0x19b)](_0x4b9a83,_0x28a305){const _0xf8aae1=_0x5318e2;var _0x3e5bb5;const {row:_0x373734,col:_0x5a4bec,unitId:_0x3c5513,subUnitId:_0xa133b9}=_0x4b9a83;if(this['_activePopup']&&_0x373734===this['_activePopup'][_0xf8aae1(0x173)]&&_0x5a4bec===this['_activePopup'][_0xf8aae1(0x160)]&&_0x3c5513===this[_0xf8aae1(0x178)][_0xf8aae1(0x1f7)]&&_0xa133b9===((_0x3e5bb5=this[_0xf8aae1(0x14f)])==null?void 0x0:_0x3e5bb5[_0xf8aae1(0x15b)])){this[_0xf8aae1(0x178)]=_0x4b9a83,this[_0xf8aae1(0xdf)][_0xf8aae1(0xc4)](_0x4b9a83);return;}if(this[_0xf8aae1(0x1c4)]&&this['_lastPopup'][_0xf8aae1(0xd7)](),this[_0xf8aae1(0x17e)][_0xf8aae1(0x1d0)])return;this[_0xf8aae1(0x178)]=_0x4b9a83,this[_0xf8aae1(0xdf)]['next'](_0x4b9a83);const _0x4e1323=this[_0xf8aae1(0x108)][_0xf8aae1(0x16e)](_0x373734,_0x5a4bec,{'componentKey':_0x1a9763,'onClickOutside':_0x454ee3(()=>{const _0x257102=_0xf8aae1;this[_0x257102(0x14b)]();},_0xf8aae1(0xc2)),'direction':_0xf8aae1(0xd6),'excludeOutside':[...Array[_0xf8aae1(0x1cf)](document[_0xf8aae1(0x19f)](_0xf8aae1(0x162))),document[_0xf8aae1(0xe1)](_0xf8aae1(0x146))]['filter'](Boolean)});if(!_0x4e1323)throw new Error('[SheetsThreadCommentPopupService]:\x20cannot\x20show\x20popup!');const _0x4cc286=new _0x406e39[(_0xf8aae1(0x130))]();_0x4cc286[_0xf8aae1(0x10b)](_0x4e1323),_0x4cc286[_0xf8aae1(0x10b)]({'dispose':_0x454ee3(()=>{_0x28a305==null||_0x28a305();},_0xf8aae1(0xd7))}),this[_0xf8aae1(0x1c4)]=_0x4cc286;}[_0x5318e2(0x14b)](){const _0x26ce96=_0x5318e2;this['_activePopup']&&(this[_0x26ce96(0x1c4)]&&this[_0x26ce96(0x1c4)][_0x26ce96(0xd7)](),this[_0x26ce96(0x1c4)]=null,this[_0x26ce96(0x178)]=null,this[_0x26ce96(0xdf)][_0x26ce96(0xc4)](null));}['persistPopup'](){const _0x73199d=_0x5318e2;!this['_activePopup']||!this[_0x73199d(0x178)][_0x73199d(0x1a5)]||(this[_0x73199d(0x178)]={...this[_0x73199d(0x178)],'temp':!0x1},this[_0x73199d(0xdf)][_0x73199d(0xc4)](this['_activePopup']));}},_0x454ee3(_0x126e51,_0x5318e2(0x171)),_0x126e51),_0x496a1c[_0x5318e2(0x171)]=_0x5a63fe([_0x22d02c(0x0,_0x406e39['Inject'](_0x5ef1f5['SheetCanvasPopManagerService'])),_0x22d02c(0x1,_0x48410b['IZenZoneService'])],_0x496a1c['SheetsThreadCommentPopupService']);const _0x1f94b6={'type':_0x406e39[_0x5318e2(0x17c)]['OPERATION'],'id':_0x5318e2(0x153),'handler'(_0x1ae81d){const _0x4290fc=_0x5318e2;var _0x290e3b;const _0x428706=_0x1ae81d['get'](_0x5e6cb0[_0x4290fc(0x1d3)]),_0xb3399f=_0x1ae81d['get'](_0x406e39[_0x4290fc(0x19c)]),_0x2b54d6=_0x1ae81d['get'](_0x496a1c[_0x4290fc(0x171)]),_0x11ed5d=_0x1ae81d['get'](_0x40b2af[_0x4290fc(0xd2)]),_0x271801=(_0x290e3b=_0x428706[_0x4290fc(0x137)]())==null?void 0x0:_0x290e3b[_0x4290fc(0x10e)],_0x2c17a5=_0x1ae81d['get'](_0x4cf1db[_0x4290fc(0x1cb)]);if(!_0x271801)return!0x1;const _0x5d85d5=_0x5e6cb0[_0x4290fc(0x121)](_0xb3399f);if(!_0x5d85d5)return!0x1;const {workbook:_0x3efbe3,worksheet:_0x1aa535,unitId:_0x314c07,subUnitId:_0x1bdc1c}=_0x5d85d5,_0x5b0d4f={'workbook':_0x3efbe3,'worksheet':_0x1aa535,'unitId':_0x314c07,'subUnitId':_0x1bdc1c,'row':_0x271801['startRow'],'col':_0x271801['startColumn']};_0x2b54d6[_0x4290fc(0x19b)](_0x5b0d4f);const _0x641ad3=_0x2c17a5['getByLocation'](_0x314c07,_0x1bdc1c,_0x271801['startRow'],_0x271801[_0x4290fc(0x1d2)]);return _0x641ad3&&_0x11ed5d[_0x4290fc(0x177)]({'unitId':_0x314c07,'subUnitId':_0x1bdc1c,'commentId':_0x641ad3,'trigger':_0x4290fc(0x188)}),!0x0;}},_0x391f6a=_0x5318e2(0x1b4),_0x1f4d6e={};var _0x4e8c87=Object[_0x5318e2(0x1b5)],_0x2eb779=Object[_0x5318e2(0x161)],_0xe9c709=_0x454ee3((_0x41f992,_0x5b9c7a,_0x12f0d3,_0xea3d24)=>{const _0x3f4ad4=_0x5318e2;for(var _0x2a8f8a=_0xea3d24>0x1?void 0x0:_0xea3d24?_0x2eb779(_0x5b9c7a,_0x12f0d3):_0x5b9c7a,_0xd83718=_0x41f992[_0x3f4ad4(0x1d9)]-0x1,_0x34496c;_0xd83718>=0x0;_0xd83718--)(_0x34496c=_0x41f992[_0xd83718])&&(_0x2a8f8a=(_0xea3d24?_0x34496c(_0x5b9c7a,_0x12f0d3,_0x2a8f8a):_0x34496c(_0x2a8f8a))||_0x2a8f8a);return _0xea3d24&&_0x2a8f8a&&_0x4e8c87(_0x5b9c7a,_0x12f0d3,_0x2a8f8a),_0x2a8f8a;},_0x5318e2(0x19e)),_0x4d4b5e=_0x454ee3((_0xf2507b,_0x4e25b1)=>(_0x50abd6,_0x456ec2)=>_0x4e25b1(_0x50abd6,_0x456ec2,_0xf2507b),_0x5318e2(0x11e));let _0x21fa99=(_0x78e01f=class extends _0x406e39[_0x5318e2(0x1fc)]{constructor(_0x8ac087,_0x78c8b2,_0x3c7067,_0x1ed8bb){const _0x47ff0a=_0x5318e2;super(),this['_sheetInterceptorService']=_0x8ac087,this[_0x47ff0a(0x1ff)]=_0x78c8b2,this[_0x47ff0a(0xe2)]=_0x3c7067,this[_0x47ff0a(0x167)]=_0x1ed8bb,this[_0x47ff0a(0x139)](),this[_0x47ff0a(0xfb)]();}[_0x5318e2(0x139)](){const _0x132772=_0x5318e2;this[_0x132772(0x19a)](this[_0x132772(0x183)][_0x132772(0xd3)](_0x5e6cb0[_0x132772(0x142)]['CELL_CONTENT'],{'effect':_0x406e39[_0x132772(0x155)][_0x132772(0x12a)],'handler':_0x454ee3((_0x4a40b0,_0x5997d9,_0x4e1609)=>{const _0x1528e1=_0x132772,{row:_0x21e92b,col:_0x2686a2,unitId:_0x1faf04,subUnitId:_0x22382f}=_0x5997d9;return this[_0x1528e1(0x1ff)][_0x1528e1(0xbf)](_0x1faf04,_0x22382f,_0x21e92b,_0x2686a2)?_0x4e1609({..._0x4a40b0,'markers':{..._0x4a40b0==null?void 0x0:_0x4a40b0[_0x1528e1(0xcf)],'tr':{'color':_0x1528e1(0x184),'size':0x6}}}):_0x4e1609(_0x4a40b0);},_0x132772(0xc9)),'priority':0x64}));}[_0x5318e2(0xfb)](){const _0x310d2c=_0x5318e2,_0x15106b=_0x454ee3(()=>{const _0x2a753e=_0x3c2f;var _0x3c3c51;const _0x40ba3b=this['_univerInstanceService'][_0x2a753e(0x105)](_0x406e39[_0x2a753e(0x119)]['UNIVER_SHEET']);if(!_0x40ba3b)return;const _0x8a9332=_0x40ba3b[_0x2a753e(0xeb)](),_0x46be07=this[_0x2a753e(0x167)][_0x2a753e(0xf8)](_0x8a9332);(_0x3c3c51=_0x46be07==null?void 0x0:_0x46be07[_0x2a753e(0x13c)])==null||_0x3c3c51[_0x2a753e(0xf3)]();},_0x310d2c(0xfd));this[_0x310d2c(0x19a)](this[_0x310d2c(0x1ff)][_0x310d2c(0x112)][_0x310d2c(0xb5)](_0x2d855b[_0x310d2c(0xd8)](0x10))['subscribe'](()=>{_0x15106b();}));}},_0x454ee3(_0x78e01f,'SheetsThreadCommentRenderController'),_0x78e01f);_0x21fa99=_0xe9c709([_0x4d4b5e(0x0,_0x406e39[_0x5318e2(0xbb)](_0x5e6cb0['SheetInterceptorService'])),_0x4d4b5e(0x1,_0x406e39[_0x5318e2(0xbb)](_0x4cf1db[_0x5318e2(0x1cb)])),_0x4d4b5e(0x2,_0x406e39['IUniverInstanceService']),_0x4d4b5e(0x3,_0x130b75[_0x5318e2(0x10f)])],_0x21fa99);var _0x5ded5a=function(){const _0x5cd6b6=_0x5318e2;return _0x5ded5a=Object[_0x5cd6b6(0x1ad)]||function(_0xd36503){const _0x323be4=_0x5cd6b6;for(var _0x2c4003,_0x1b6c07=0x1,_0x45474b=arguments[_0x323be4(0x1d9)];_0x1b6c07<_0x45474b;_0x1b6c07++){_0x2c4003=arguments[_0x1b6c07];for(var _0x306d5e in _0x2c4003)Object[_0x323be4(0xd9)][_0x323be4(0xf7)][_0x323be4(0x1c5)](_0x2c4003,_0x306d5e)&&(_0xd36503[_0x306d5e]=_0x2c4003[_0x306d5e]);}return _0xd36503;},_0x5ded5a[_0x5cd6b6(0x1d7)](this,arguments);},_0x3c34c7=function(_0x28bedb,_0x5b00a0){const _0x54d6a3=_0x5318e2;var _0xfde623={};for(var _0x4c35d2 in _0x28bedb)Object[_0x54d6a3(0xd9)][_0x54d6a3(0xf7)][_0x54d6a3(0x1c5)](_0x28bedb,_0x4c35d2)&&_0x5b00a0['indexOf'](_0x4c35d2)<0x0&&(_0xfde623[_0x4c35d2]=_0x28bedb[_0x4c35d2]);if(_0x28bedb!=null&&typeof Object[_0x54d6a3(0x1bc)]==_0x54d6a3(0x128)){for(var _0xb0b4f1=0x0,_0x4c35d2=Object['getOwnPropertySymbols'](_0x28bedb);_0xb0b4f1<_0x4c35d2[_0x54d6a3(0x1d9)];_0xb0b4f1++)_0x5b00a0[_0x54d6a3(0x1ee)](_0x4c35d2[_0xb0b4f1])<0x0&&Object['prototype'][_0x54d6a3(0x156)][_0x54d6a3(0x1c5)](_0x28bedb,_0x4c35d2[_0xb0b4f1])&&(_0xfde623[_0x4c35d2[_0xb0b4f1]]=_0x28bedb[_0x4c35d2[_0xb0b4f1]]);}return _0xfde623;},_0x1524bb=_0x188714[_0x5318e2(0x158)](function(_0x5f2bea,_0x548bbc){const _0x53b24e=_0x5318e2;var _0x47759f=_0x5f2bea['icon'],_0x1b1ea2=_0x5f2bea['id'],_0x525e84=_0x5f2bea[_0x53b24e(0xb4)],_0x18fd7e=_0x5f2bea[_0x53b24e(0xf1)],_0x5d2483=_0x3c34c7(_0x5f2bea,[_0x53b24e(0xd0),'id','className',_0x53b24e(0xf1)]),_0x2b3846=_0x53b24e(0xd5)[_0x53b24e(0xf2)](_0x1b1ea2,'\x20')['concat'](_0x525e84||'')[_0x53b24e(0x200)](),_0x2be4a3=_0x188714[_0x53b24e(0x1aa)]('_'[_0x53b24e(0xf2)](_0x57712c()));return _0x3e8e42(_0x47759f,''['concat'](_0x1b1ea2),{'defIds':_0x47759f[_0x53b24e(0x1ba)],'idSuffix':_0x2be4a3[_0x53b24e(0x144)]},_0x5ded5a({'ref':_0x548bbc,'className':_0x2b3846},_0x5d2483),_0x18fd7e);});function _0x3e8e42(_0x128818,_0x380438,_0x9b1764,_0x400d18,_0x4b012b){const _0x31f3c4=_0x5318e2;return _0x188714[_0x31f3c4(0xf5)](_0x128818[_0x31f3c4(0x1db)],_0x5ded5a(_0x5ded5a({'key':_0x380438},_0x164efd(_0x128818,_0x9b1764,_0x4b012b)),_0x400d18),(_0x3856a2(_0x128818,_0x9b1764)['children']||[])['map'](function(_0x3dd55d,_0x685023){const _0x2391cf=_0x31f3c4;return _0x3e8e42(_0x3dd55d,''[_0x2391cf(0xf2)](_0x380438,'-')['concat'](_0x128818[_0x2391cf(0x1db)],'-')[_0x2391cf(0xf2)](_0x685023),_0x9b1764,void 0x0,_0x4b012b);}));}_0x454ee3(_0x3e8e42,_0x5318e2(0x148));function _0x164efd(_0xeef710,_0xeb3e14,_0x61589a){const _0x4f5b02=_0x5318e2;var _0x2fba8a=_0x5ded5a({},_0xeef710[_0x4f5b02(0x187)]);_0x61589a!=null&&_0x61589a[_0x4f5b02(0xc3)]&&_0x2fba8a[_0x4f5b02(0x1e7)]===_0x4f5b02(0xc3)&&(_0x2fba8a['fill']=_0x61589a[_0x4f5b02(0xc3)]);var _0x3376e2=_0xeb3e14['defIds'];return!_0x3376e2||_0x3376e2[_0x4f5b02(0x1d9)]===0x0||(_0xeef710[_0x4f5b02(0x1db)]===_0x4f5b02(0x107)&&_0x2fba8a[_0x4f5b02(0x1cc)]&&(_0x2fba8a[_0x4f5b02(0x1cc)]=_0x2fba8a[_0x4f5b02(0x1cc)]+_0xeb3e14[_0x4f5b02(0xe3)]),Object['entries'](_0x2fba8a)[_0x4f5b02(0x1ea)](function(_0x11f17b){const _0x440f81=_0x4f5b02;var _0x82444d=_0x11f17b[0x0],_0x1dc33a=_0x11f17b[0x1];typeof _0x1dc33a==_0x440f81(0xe8)&&(_0x2fba8a[_0x82444d]=_0x1dc33a[_0x440f81(0x1a0)](/url\(#(.*)\)/,_0x440f81(0x1a2)[_0x440f81(0xf2)](_0xeb3e14['idSuffix'],')')));})),_0x2fba8a;}_0x454ee3(_0x164efd,'replaceRuntimeIdsAndExtInAttrs');function _0x3856a2(_0x2ed49b,_0x2df6aa){const _0x369f20=_0x5318e2;var _0x3cd6c7,_0x17054e=_0x2df6aa[_0x369f20(0x1ba)];return!_0x17054e||_0x17054e[_0x369f20(0x1d9)]===0x0?_0x2ed49b:_0x2ed49b[_0x369f20(0x1db)]===_0x369f20(0x1d8)&&(!((_0x3cd6c7=_0x2ed49b[_0x369f20(0x100)])===null||_0x3cd6c7===void 0x0)&&_0x3cd6c7['length'])?_0x5ded5a(_0x5ded5a({},_0x2ed49b),{'children':_0x2ed49b['children'][_0x369f20(0xde)](function(_0x12d114){const _0x11ce6a=_0x369f20;return typeof _0x12d114[_0x11ce6a(0x187)]['id']==_0x11ce6a(0xe8)&&_0x17054e&&_0x17054e[_0x11ce6a(0x1ee)](_0x12d114['attrs']['id'])>-0x1?_0x5ded5a(_0x5ded5a({},_0x12d114),{'attrs':_0x5ded5a(_0x5ded5a({},_0x12d114['attrs']),{'id':_0x12d114[_0x11ce6a(0x187)]['id']+_0x2df6aa[_0x11ce6a(0xe3)]})}):_0x12d114;})}):_0x2ed49b;}_0x454ee3(_0x3856a2,'replaceRuntimeIdsInDefs');function _0x57712c(){const _0x3e42db=_0x5318e2;return Math['random']()[_0x3e42db(0x141)](0x24)['substring'](0x2,0x8);}_0x454ee3(_0x57712c,_0x5318e2(0x145)),_0x1524bb[_0x5318e2(0x110)]='UniverIcon';var _0x1ae434={'tag':_0x5318e2(0xc0),'attrs':{'fill':_0x5318e2(0x16d),'viewBox':_0x5318e2(0x1b3),'width':_0x5318e2(0x1a8),'height':'1em'},'children':[{'tag':_0x5318e2(0x1bf),'attrs':{'fill':_0x5318e2(0xda),'d':_0x5318e2(0x17f),'fillRule':'evenodd','clipRule':_0x5318e2(0xfa)}},{'tag':_0x5318e2(0x1bf),'attrs':{'fill':_0x5318e2(0xda),'d':'M5.83725\x206.78345C6.22188\x206.78345\x206.53368\x207.10742\x206.53368\x207.50706V8.41159C6.53368\x208.81123\x206.22188\x209.13521\x205.83725\x209.13521\x205.45263\x209.13521\x205.14082\x208.81123\x205.14082\x208.41159V7.50706C5.14082\x207.10742\x205.45263\x206.78345\x205.83725\x206.78345zM8.73904\x206.78345C9.12366\x206.78345\x209.43546\x207.10742\x209.43546\x207.50706V8.41159C9.43546\x208.81123\x209.12366\x209.13521\x208.73904\x209.13521\x208.35441\x209.13521\x208.04261\x208.81123\x208.04261\x208.41159V7.50706C8.04261\x207.10742\x208.35441\x206.78345\x208.73904\x206.78345zM11.6408\x206.78345C12.0254\x206.78345\x2012.3372\x207.10742\x2012.3372\x207.50706V8.41159C12.3372\x208.81123\x2012.0254\x209.13521\x2011.6408\x209.13521\x2011.2562\x209.13521\x2010.9444\x208.81123\x2010.9444\x208.41159V7.50706C10.9444\x207.10742\x2011.2562\x206.78345\x2011.6408\x206.78345z'}},{'tag':_0x5318e2(0x1bf),'attrs':{'fill':_0x5318e2(0xda),'d':'M1.84351\x203.41861C1.84351\x203.01861\x202.15531\x202.69434\x202.53993\x202.69434H14.9381C15.3228\x202.69434\x2015.6346\x203.01861\x2015.6346\x203.41861V12.4611C15.6346\x2012.8612\x2015.3228\x2013.1854\x2014.9381\x2013.1854H8.82117L6.06643\x2014.6179C5.85054\x2014.7301\x205.59416\x2014.7181\x205.38884\x2014.5862C5.18352\x2014.4542\x205.05855\x2014.2211\x205.05855\x2013.9701V13.1854H2.53993C2.15531\x2013.1854\x201.84351\x2012.8612\x201.84351\x2012.4611L1.84351\x203.41861ZM6.45141\x2012.7982L8.34531\x2012.0135C8.44201\x2011.9632\x208.54864\x2011.9371\x208.65676\x2011.9371H14.2417C14.3522\x2011.9371\x2014.4417\x2011.8475\x2014.4417\x2011.7371V4.14271C14.4417\x204.03225\x2014.3522\x203.94271\x2014.2417\x203.94271H3.23636C3.12591\x203.94271\x203.03636\x204.03225\x203.03636\x204.14271L3.03636\x2011.7371C3.03636\x2011.8475\x203.12591\x2011.9371\x203.23636\x2011.9371L5.75498\x2011.9371C6.1396\x2011.9371\x206.45141\x2012.0611\x206.45141\x2012.4611V12.7982Z','fillRule':'evenodd','clipRule':_0x5318e2(0xfa)}}]},_0x43f22d=_0x188714['forwardRef'](function(_0x178cff,_0x543784){const _0x5552e1=_0x5318e2;return _0x188714[_0x5552e1(0xf5)](_0x1524bb,Object[_0x5552e1(0x1ad)]({},_0x178cff,{'id':'comment-single','ref':_0x543784,'icon':_0x1ae434}));});_0x43f22d[_0x5318e2(0x110)]=_0x5318e2(0x14e);const _0x324a66=_0x454ee3(()=>{const _0x493841=_0x5318e2,_0x5a5e59=_0x406e39[_0x493841(0x11f)](_0x406e39['IUniverInstanceService']),_0x29e001=_0x406e39[_0x493841(0x11f)](_0x496a1c[_0x493841(0x171)]),_0x1c201d=_0x48410b[_0x493841(0x166)](_0x29e001['activePopup$']),_0x6e1785=_0x406e39[_0x493841(0x11f)](_0x4cf1db[_0x493841(0x1cb)]);if(_0x48410b[_0x493841(0x166)](_0x6e1785[_0x493841(0x112)]),!_0x1c201d)return null;const {row:_0x28afdd,col:_0x4916dc,unitId:_0x5082c4,subUnitId:_0x19cca8,trigger:_0x330249}=_0x1c201d,_0x1901fd=_0x6e1785[_0x493841(0x13b)](_0x5082c4,_0x19cca8,_0x28afdd,_0x4916dc),_0xc5de65=''+_0x406e39[_0x493841(0x18a)][_0x493841(0x117)](_0x4916dc)+(_0x28afdd+0x1),_0x1ab412=_0x454ee3(()=>{const _0x23cc3b=_0x493841;_0x29e001[_0x23cc3b(0x14b)]();},_0x493841(0x1b0)),_0x4917d8=_0x454ee3(_0x378805=>{const _0x82dc16=_0x493841;var _0x316aa9,_0x433c55,_0x31f61e;return(_0x31f61e=(_0x433c55=(_0x316aa9=_0x5a5e59[_0x82dc16(0x105)](_0x406e39[_0x82dc16(0x119)][_0x82dc16(0xed)]))==null?void 0x0:_0x316aa9[_0x82dc16(0x1ec)](_0x378805))==null?void 0x0:_0x433c55[_0x82dc16(0x11d)]())!=null?_0x31f61e:'';},_0x493841(0x1a1));return _0x188714[_0x493841(0xf5)](_0x40b2af[_0x493841(0x1b2)],{'onClick':_0x454ee3(()=>{const _0x6a9ff8=_0x493841;_0x29e001[_0x6a9ff8(0x16c)]();},'onClick'),'prefix':'cell','id':_0x1901fd,'unitId':_0x5082c4,'subUnitId':_0x19cca8,'type':_0x406e39[_0x493841(0x119)]['UNIVER_SHEET'],'refStr':_0xc5de65,'onClose':_0x1ab412,'getSubUnitName':_0x4917d8,'autoFocus':_0x330249===_0x493841(0x188)});},'SheetsThreadCommentCell'),_0x301069=_0x454ee3(()=>{const _0xa88e03=_0x5318e2;var _0x5d2276;const _0x28d8d6=_0x406e39['useDependency'](_0x5ef1f5['IMarkSelectionService']),_0x42d585=_0x406e39['useDependency'](_0x406e39[_0xa88e03(0x19c)]),_0x560335=_0x406e39[_0xa88e03(0x11f)](_0x496a1c[_0xa88e03(0x171)]),_0x4e896b=_0x42d585['getCurrentUnitForType'](_0x406e39[_0xa88e03(0x119)]['UNIVER_SHEET']),_0x3ef67c=_0x4e896b[_0xa88e03(0xeb)](),_0x41d933=_0x406e39[_0xa88e03(0x11f)](_0x406e39[_0xa88e03(0xc7)]),_0xb43828=_0x188714['useMemo'](()=>_0x4e896b[_0xa88e03(0x122)][_0xa88e03(0xb5)](_0x2d855b['map'](_0x4e1576=>_0x4e1576==null?void 0x0:_0x4e1576['getSheetId']())),[_0x4e896b[_0xa88e03(0x122)]]),_0x92d229=_0x48410b[_0xa88e03(0x166)](_0xb43828,(_0x5d2276=_0x4e896b[_0xa88e03(0x1f9)]())==null?void 0x0:_0x5d2276[_0xa88e03(0x115)]()),_0x57c9fa=_0x188714[_0xa88e03(0x1aa)](),_0x1b93f4=_0x406e39['useDependency'](_0x40b2af[_0xa88e03(0xd2)]),_0x183a0e=_0x48410b[_0xa88e03(0x166)](_0x1b93f4[_0xa88e03(0x12e)]),_0x17ff05=_0x48410b[_0xa88e03(0x166)](_0x1b93f4[_0xa88e03(0xfc)],_0x1b93f4['panelVisible']),_0x46c747=_0x188714[_0xa88e03(0xbd)](_0x11b71c=>{const _0x1b354f=_0xa88e03,_0x3f7876=_0x4e896b[_0x1b354f(0x129)](),_0x185785={};_0x3f7876[_0x1b354f(0x1ea)]((_0x338167,_0x1ef9ba)=>{const _0x1dda07=_0x1b354f;_0x185785[_0x338167[_0x1dda07(0x115)]()]=_0x1ef9ba;});const _0x444ce6=_0x454ee3(_0x4d0331=>_0x4d0331[_0x1b354f(0xde)](_0x3b84d9=>{const _0x2aa486=_0x1b354f;var _0x5cd193;const _0x23075d=_0x4d5a79[_0x2aa486(0x13d)](_0x3b84d9[_0x2aa486(0x1df)]),_0x45715b=[(_0x5cd193=_0x185785[_0x3b84d9['subUnitId']])!=null?_0x5cd193:0x0,_0x23075d['row'],_0x23075d['column']];return{..._0x3b84d9,'p':_0x45715b};})['sort']((_0x576f33,_0x2808a3)=>_0x576f33['p'][0x0]===_0x2808a3['p'][0x0]?_0x576f33['p'][0x1]===_0x2808a3['p'][0x1]?_0x576f33['p'][0x2]-_0x2808a3['p'][0x2]:_0x576f33['p'][0x1]-_0x2808a3['p'][0x1]:_0x576f33['p'][0x0]-_0x2808a3['p'][0x0]),_0x1b354f(0x136));return[..._0x444ce6(_0x11b71c['filter'](_0x3090b8=>!_0x3090b8[_0x1b354f(0xef)])),..._0x444ce6(_0x11b71c[_0x1b354f(0xdb)](_0x2677ff=>_0x2677ff['resolved']))];},[_0x4e896b]),_0x38860c=_0x188714[_0xa88e03(0xbd)](_0x993414=>{const _0x120d45=_0xa88e03;var _0x1b379c;if(_0x993414[_0x120d45(0x1f7)]===_0x3ef67c&&_0x993414[_0x120d45(0x15b)]===_0x92d229&&!_0x993414[_0x120d45(0xef)]){const {row:_0x289ec5,column:_0x51370c}=_0x4d5a79[_0x120d45(0x13d)](_0x993414['ref']),_0x4a4daf=_0x4e896b[_0x120d45(0x1ec)](_0x993414['subUnitId']),_0xd08f88=(_0x1b379c=_0x4a4daf==null?void 0x0:_0x4a4daf[_0x120d45(0x1af)](_0x289ec5,_0x51370c))!=null?_0x1b379c:{'startColumn':_0x51370c,'endColumn':_0x51370c,'startRow':_0x289ec5,'endRow':_0x289ec5};if(!Number[_0x120d45(0x1e9)](_0x289ec5)&&!Number[_0x120d45(0x1e9)](_0x51370c))return _0x28d8d6[_0x120d45(0x1b6)]({'range':_0xd08f88,'style':{'hasAutoFill':!0x1,'fill':_0x120d45(0xf6),'strokeWidth':0x1,'stroke':_0x120d45(0x184),'widgets':{}},'primary':null});}},[_0x28d8d6,_0x92d229,_0x3ef67c]),_0x5474e0=_0x454ee3(_0x281446=>{const _0x1af346=_0xa88e03;var _0x3db5b6,_0x19fa73;return(_0x19fa73=(_0x3db5b6=_0x4e896b[_0x1af346(0x1ec)](_0x281446))==null?void 0x0:_0x3db5b6['getName']())!=null?_0x19fa73:'';},_0xa88e03(0x1a1)),_0x5ee060=_0x454ee3(()=>{_0x41d933['executeCommand'](_0x1f94b6['id']);},_0xa88e03(0x12d)),_0x267dc1=_0x454ee3(_0x248b67=>{const _0x1e87a5=_0xa88e03;_0x183a0e&&_0x183a0e['unitId']===_0x248b67[_0x1e87a5(0x1f7)]&&_0x183a0e[_0x1e87a5(0x15b)]===_0x248b67[_0x1e87a5(0x15b)]&&_0x183a0e[_0x1e87a5(0x1f1)]===_0x248b67['id']||(_0x57c9fa[_0x1e87a5(0x144)]&&(_0x28d8d6[_0x1e87a5(0x1f2)](_0x57c9fa[_0x1e87a5(0x144)]),_0x57c9fa[_0x1e87a5(0x144)]=null),_0x57c9fa[_0x1e87a5(0x144)]=_0x38860c(_0x248b67));},'handleHover'),_0x4b6d10=_0x454ee3(()=>{const _0x3ea775=_0xa88e03;_0x57c9fa[_0x3ea775(0x144)]&&(_0x28d8d6['removeShape'](_0x57c9fa[_0x3ea775(0x144)]),_0x57c9fa[_0x3ea775(0x144)]=null);},_0xa88e03(0x195)),_0x2bb70c=_0x454ee3((_0x26858d,_0x11178d)=>{const _0x10024e=_0xa88e03;_0x11178d&&_0x560335[_0x10024e(0x14b)]();},_0xa88e03(0xbc));return _0x188714[_0xa88e03(0xba)](()=>{const _0x5d0506=_0xa88e03;!_0x17ff05&&_0x57c9fa[_0x5d0506(0x144)]&&_0x28d8d6[_0x5d0506(0x1f2)](_0x57c9fa['current']);},[_0x28d8d6,_0x17ff05]),_0x188714['createElement'](_0x40b2af[_0xa88e03(0x16b)],{'unitId':_0x3ef67c,'subUnitId$':_0xb43828,'type':_0x406e39[_0xa88e03(0x119)]['UNIVER_SHEET'],'onAdd':_0x5ee060,'getSubUnitName':_0x5474e0,'onResolve':_0x2bb70c,'sortComments':_0x46c747,'onItemEnter':_0x267dc1,'onItemLeave':_0x4b6d10,'onDeleteComment':_0x454ee3(()=>(_0x4b6d10(),!0x0),'onDeleteComment')});},_0x5318e2(0xf9)),_0x1b17f4=_0x454ee3(_0x4018aa=>({'id':_0x1f94b6['id'],'type':_0x48410b['MenuItemType'][_0x5318e2(0x1ae)],'icon':_0x62fe4,'title':_0x5318e2(0x125),'hidden$':_0x48410b[_0x5318e2(0x1bd)](_0x4018aa,_0x406e39[_0x5318e2(0x119)]['UNIVER_SHEET']),'disabled$':_0x5ef1f5[_0x5318e2(0x19d)](_0x4018aa,{'workbookTypes':[_0x5e6cb0[_0x5318e2(0x150)]],'worksheetTypes':[_0x5e6cb0['WorksheetViewPermission']],'rangeTypes':[_0x5e6cb0[_0x5318e2(0x1bb)]]})}),_0x5318e2(0x1ac)),_0x4beb69=_0x454ee3(_0x41624d=>({'id':_0x40b2af[_0x5318e2(0x101)]['id'],'type':_0x48410b[_0x5318e2(0x1a9)][_0x5318e2(0x1ae)],'icon':_0x62fe4,'tooltip':'sheetThreadComment.menu.commentManagement','disabled$':_0x5ef1f5['getCurrentRangeDisable$'](_0x41624d,{'workbookTypes':[_0x5e6cb0[_0x5318e2(0x150)]],'worksheetTypes':[_0x5e6cb0['WorksheetViewPermission']],'rangeTypes':[_0x5e6cb0[_0x5318e2(0x1bb)]]}),'hidden$':_0x48410b[_0x5318e2(0x1bd)](_0x41624d,_0x406e39[_0x5318e2(0x119)]['UNIVER_SHEET'])}),'threadPanelMenuFactory'),_0x24ba99={'id':_0x1f94b6['id'],'binding':_0x48410b['KeyCode']['M']|_0x48410b[_0x5318e2(0x196)][_0x5318e2(0x18c)]|_0x48410b[_0x5318e2(0x196)][_0x5318e2(0x10c)],'preconditions':_0x5ef1f5[_0x5318e2(0x1c2)]},_0x1b1fed={[_0x48410b[_0x5318e2(0x182)][_0x5318e2(0x1f4)]]:{[_0x40b2af[_0x5318e2(0x101)]['id']]:{'order':0x1,'menuItemFactory':_0x4beb69}},[_0x48410b[_0x5318e2(0x159)][_0x5318e2(0x15d)]]:{[_0x48410b[_0x5318e2(0x14d)][_0x5318e2(0x1f4)]]:{[_0x1f94b6['id']]:{'order':0x0,'menuItemFactory':_0x1b17f4}}}};var _0x2d0dda=Object[_0x5318e2(0x1b5)],_0x3ce2e2=Object['getOwnPropertyDescriptor'],_0x45bf29=_0x454ee3((_0x35c5d2,_0x109b9e,_0x5c278,_0x322590)=>{for(var _0xf448bc=_0x322590>0x1?void 0x0:_0x322590?_0x3ce2e2(_0x109b9e,_0x5c278):_0x109b9e,_0x30f172=_0x35c5d2['length']-0x1,_0x601b94;_0x30f172>=0x0;_0x30f172--)(_0x601b94=_0x35c5d2[_0x30f172])&&(_0xf448bc=(_0x322590?_0x601b94(_0x109b9e,_0x5c278,_0xf448bc):_0x601b94(_0xf448bc))||_0xf448bc);return _0x322590&&_0xf448bc&&_0x2d0dda(_0x109b9e,_0x5c278,_0xf448bc),_0xf448bc;},_0x5318e2(0xb6)),_0x17d456=_0x454ee3((_0xf41282,_0x1a8507)=>(_0x266b61,_0x57c45e)=>_0x1a8507(_0x266b61,_0x57c45e,_0xf41282),'__decorateParam$5');let _0x2c59ad=(_0xc09543=class extends _0x406e39[_0x5318e2(0x1fc)]{constructor(_0x58f1db,_0xb6ab13,_0xbaa739){const _0x559fae=_0x5318e2;super(),this[_0x559fae(0x10a)]=_0x58f1db,this[_0x559fae(0x143)]=_0xb6ab13,this[_0x559fae(0x1fd)]=_0xbaa739,this[_0x559fae(0x132)](),this['_initShortcut'](),this[_0x559fae(0x1f3)]();}[_0x5318e2(0x13f)](){const _0x3a7fce=_0x5318e2;this[_0x3a7fce(0x1fd)][_0x3a7fce(0x194)](_0x24ba99);}['_initMenu'](){const _0x2b1fc7=_0x5318e2;this['_menuManagerService'][_0x2b1fc7(0x154)](_0x1b1fed);}[_0x5318e2(0x1f3)](){const _0x209029=_0x5318e2;[[_0x1a9763,_0x324a66],[_0x40b2af[_0x209029(0x1a7)],_0x301069],[_0x62fe4,_0x43f22d]]['forEach'](([_0x44436d,_0x1aaeb9])=>{const _0x46e8c7=_0x209029;this[_0x46e8c7(0x143)][_0x46e8c7(0x170)](_0x44436d,_0x1aaeb9);});}},_0x454ee3(_0xc09543,'SheetsThreadCommentController'),_0xc09543);_0x2c59ad=_0x45bf29([_0x17d456(0x0,_0x48410b[_0x5318e2(0x12b)]),_0x17d456(0x1,_0x406e39[_0x5318e2(0xbb)](_0x48410b[_0x5318e2(0xe4)])),_0x17d456(0x2,_0x48410b['IShortcutService'])],_0x2c59ad);var _0x544843=Object[_0x5318e2(0x1b5)],_0x33d11e=Object[_0x5318e2(0x161)],_0x5895c3=_0x454ee3((_0x4e42fa,_0x36f222,_0x44c6db,_0xaca18f)=>{const _0x5e757f=_0x5318e2;for(var _0x11862e=_0xaca18f>0x1?void 0x0:_0xaca18f?_0x33d11e(_0x36f222,_0x44c6db):_0x36f222,_0x25ed3f=_0x4e42fa[_0x5e757f(0x1d9)]-0x1,_0x46d913;_0x25ed3f>=0x0;_0x25ed3f--)(_0x46d913=_0x4e42fa[_0x25ed3f])&&(_0x11862e=(_0xaca18f?_0x46d913(_0x36f222,_0x44c6db,_0x11862e):_0x46d913(_0x11862e))||_0x11862e);return _0xaca18f&&_0x11862e&&_0x544843(_0x36f222,_0x44c6db,_0x11862e),_0x11862e;},_0x5318e2(0x1e5)),_0x2ae8c3=_0x454ee3((_0x4b91e6,_0x54c4c1)=>(_0x2d16fa,_0x57d7f7)=>_0x54c4c1(_0x2d16fa,_0x57d7f7,_0x4b91e6),_0x5318e2(0x127));const _0x5e085a=_0x454ee3((_0x21e2e3,_0x91294e,_0x38d968)=>{const _0x25cc42=_0x5318e2,_0x330d57=_0x4d5a79[_0x25cc42(0x13d)](_0x21e2e3),_0x13c25b=_0x38d968[_0x25cc42(0x173)]-_0x91294e[_0x25cc42(0x173)],_0x1c3c10=_0x38d968[_0x25cc42(0xd4)]-_0x91294e[_0x25cc42(0xd4)],_0x50dfcd={'startColumn':_0x330d57[_0x25cc42(0xd4)]+_0x1c3c10,'startRow':_0x330d57[_0x25cc42(0x173)]+_0x13c25b,'endColumn':_0x330d57['column']+_0x1c3c10,'endRow':_0x330d57[_0x25cc42(0x173)]+_0x13c25b};return _0x4d5a79[_0x25cc42(0x114)](_0x50dfcd);},_0x5318e2(0x1ca));let _0x3bd8cb=(_0x51e176=class extends _0x406e39[_0x5318e2(0x1fc)]{constructor(_0x139565,_0x2f8047,_0x347704){const _0x2d9e4c=_0x5318e2;super(),_0x1cb9c5(this,_0x2d9e4c(0xf4)),(this[_0x2d9e4c(0x1e2)]=_0x139565,this[_0x2d9e4c(0x1ff)]=_0x2f8047,this[_0x2d9e4c(0x1c7)]=_0x347704,this[_0x2d9e4c(0x133)]());}[_0x5318e2(0x133)](){const _0x544554=_0x5318e2;this[_0x544554(0x19a)](this[_0x544554(0x1e2)][_0x544554(0xea)]({'id':_0x4ad0ee,'onBeforeCopy':_0x454ee3((_0x398fbf,_0x436de3,_0x3575f1)=>{this['_copyInfo']={'unitId':_0x398fbf,'subUnitId':_0x436de3,'range':_0x3575f1};},_0x544554(0x1e3)),'onPasteCells':_0x454ee3((_0x1b064d,_0x5cdb48,_0x63b021,_0xd4b21)=>{const _0xe00e00=_0x544554,{unitId:_0x389f9b,subUnitId:_0x74df48,range:_0x2fede9}=_0x5cdb48,_0x4744e5={'row':_0x2fede9[_0xe00e00(0x15e)][0x0],'column':_0x2fede9['cols'][0x0]};if(_0xd4b21[_0xe00e00(0x16a)]===_0x5ef1f5[_0xe00e00(0x181)]['CUT']&&this['_copyInfo']){const {range:_0x17d1f3,unitId:_0x30fd20,subUnitId:_0x2c999e}=this['_copyInfo'],_0x4ef15a={'row':_0x17d1f3[_0xe00e00(0x1ce)],'column':_0x17d1f3[_0xe00e00(0x1d2)]};if(!(_0x389f9b===_0x30fd20&&_0x74df48===_0x2c999e)){const _0x48021e=[];_0x406e39[_0xe00e00(0x111)][_0xe00e00(0xc1)](_0x17d1f3,(_0x34decf,_0x3f2035)=>{const _0x449c08=_0xe00e00,_0x5858d2=this[_0x449c08(0x1ff)][_0x449c08(0x179)](_0x30fd20,_0x2c999e,_0x34decf,_0x3f2035);this['_threadCommentDataSourceService'][_0x449c08(0xf0)]?_0x5858d2['forEach'](_0x24d824=>{const _0x1e608f=_0x449c08;_0x48021e[_0x1e608f(0x1be)](_0x24d824);}):_0x5858d2['forEach'](({children:_0x4c60ea,..._0x1f0e26})=>{const _0xd154bb=_0x449c08;_0x1f0e26[_0xd154bb(0x15f)]||_0x48021e[_0xd154bb(0x1be)](_0x1f0e26);});});const _0x381544=[],_0x37c22d=[],_0x9590b=[],_0xdbccdf=[],_0x55830f=_0x454ee3(_0x28d7a9=>{const _0x2665de=_0xe00e00;_0x381544[_0x2665de(0x18f)]({'id':_0x15384c[_0x2665de(0x18e)]['id'],'params':{'unitId':_0x30fd20,'subUnitId':_0x2c999e,'commentId':_0x28d7a9['id']}}),_0x9590b[_0x2665de(0x1be)]({'id':_0x15384c[_0x2665de(0x189)]['id'],'params':{'unitId':_0x389f9b,'subUnitId':_0x74df48,'comment':{..._0x28d7a9,'ref':_0x5e085a(_0x28d7a9[_0x2665de(0x1df)],_0x4ef15a,_0x4744e5),'unitId':_0x389f9b,'subUnitId':_0x74df48},'sync':!0x0}}),_0x37c22d[_0x2665de(0x1be)]({'id':_0x15384c[_0x2665de(0x189)]['id'],'params':{'unitId':_0x30fd20,'subUnitId':_0x2c999e,'comment':_0x28d7a9,'sync':!0x0}}),_0xdbccdf[_0x2665de(0x18f)]({'id':_0x15384c['DeleteCommentMutation']['id'],'params':{'unitId':_0x389f9b,'subUnitId':_0x74df48,'commentId':_0x28d7a9['id']}});},'handleCommentItem');return _0x48021e['forEach'](_0x5bd07c=>{_0x55830f(_0x5bd07c);}),{'redos':[..._0x381544,..._0x9590b],'undos':[..._0xdbccdf,..._0x37c22d]};}}return{'redos':[],'undos':[]};},'onPasteCells')}));}},_0x454ee3(_0x51e176,_0x5318e2(0x1e6)),_0x51e176);_0x3bd8cb=_0x5895c3([_0x2ae8c3(0x0,_0x406e39[_0x5318e2(0xbb)](_0x5ef1f5[_0x5318e2(0x134)])),_0x2ae8c3(0x1,_0x406e39[_0x5318e2(0xbb)](_0x4cf1db[_0x5318e2(0x1cb)])),_0x2ae8c3(0x2,_0x15384c[_0x5318e2(0x15c)])],_0x3bd8cb);var _0x3698bd=Object[_0x5318e2(0x1b5)],_0x40a369=Object[_0x5318e2(0x161)],_0x3bb24b=_0x454ee3((_0x56765a,_0x17b09c,_0x4ca2b7,_0x2376f9)=>{const _0x3790f3=_0x5318e2;for(var _0x495d8d=_0x2376f9>0x1?void 0x0:_0x2376f9?_0x40a369(_0x17b09c,_0x4ca2b7):_0x17b09c,_0x34e8f0=_0x56765a[_0x3790f3(0x1d9)]-0x1,_0x3184c6;_0x34e8f0>=0x0;_0x34e8f0--)(_0x3184c6=_0x56765a[_0x34e8f0])&&(_0x495d8d=(_0x2376f9?_0x3184c6(_0x17b09c,_0x4ca2b7,_0x495d8d):_0x3184c6(_0x495d8d))||_0x495d8d);return _0x2376f9&&_0x495d8d&&_0x3698bd(_0x17b09c,_0x4ca2b7,_0x495d8d),_0x495d8d;},_0x5318e2(0x10d)),_0x1a003c=_0x454ee3((_0x5e9b33,_0x18ee42)=>(_0x1aacf3,_0x2e833d)=>_0x18ee42(_0x1aacf3,_0x2e833d,_0x5e9b33),'__decorateParam$3');let _0x574e86=(_0x4d2e61=class extends _0x406e39['Disposable']{constructor(_0x12bbac,_0x58fa6f,_0x2def54,_0xcc3419){const _0x4d20d1=_0x5318e2;super(),this['_hoverManagerService']=_0x12bbac,this['_sheetsThreadCommentPopupService']=_0x58fa6f,this[_0x4d20d1(0x1ff)]=_0x2def54,this[_0x4d20d1(0x152)]=_0xcc3419,this['_initHoverEvent']();}[_0x5318e2(0x109)](){const _0x421b27=_0x5318e2;this[_0x421b27(0x19a)](this['_hoverManagerService'][_0x421b27(0xb8)][_0x421b27(0xb5)](_0x2d855b[_0x421b27(0xd8)](0x64))['subscribe'](_0x119946=>{const _0x390352=_0x421b27,_0x5cf89e=this['_sheetsThreadCommentPopupService']['activePopup'];if(_0x119946&&(_0x5cf89e&&_0x5cf89e[_0x390352(0x1a5)]||!_0x5cf89e)){const {location:_0x60cc9d}=_0x119946,{unitId:_0x590186,subUnitId:_0x56107d,row:_0x22bd43,col:_0x338003}=_0x60cc9d,_0x1f5b60=this[_0x390352(0x1ff)][_0x390352(0x13b)](_0x590186,_0x56107d,_0x22bd43,_0x338003);if(_0x1f5b60){if(!this[_0x390352(0x152)][_0x390352(0x1a4)]({'workbookTypes':[_0x5e6cb0['WorkbookCommentPermission']],'worksheetTypes':[_0x5e6cb0[_0x390352(0xcb)]],'rangeTypes':[_0x5e6cb0[_0x390352(0x1bb)]]},[{'startRow':_0x22bd43,'startColumn':_0x338003,'endRow':_0x22bd43,'endColumn':_0x338003}]))return;const _0x3be3dd=this[_0x390352(0x1ff)][_0x390352(0x1d4)](_0x590186,_0x56107d,_0x1f5b60);_0x3be3dd&&!_0x3be3dd[_0x390352(0xef)]&&this[_0x390352(0xdd)][_0x390352(0x19b)]({'unitId':_0x590186,'subUnitId':_0x56107d,'row':_0x22bd43,'col':_0x338003,'commentId':_0x1f5b60,'temp':!0x0});}else _0x5cf89e&&this['_sheetsThreadCommentPopupService']['hidePopup']();}}));}},_0x454ee3(_0x4d2e61,_0x5318e2(0x12c)),_0x4d2e61);_0x574e86=_0x3bb24b([_0x1a003c(0x0,_0x406e39[_0x5318e2(0xbb)](_0x5ef1f5['HoverManagerService'])),_0x1a003c(0x1,_0x406e39[_0x5318e2(0xbb)](_0x496a1c[_0x5318e2(0x171)])),_0x1a003c(0x2,_0x406e39['Inject'](_0x4cf1db[_0x5318e2(0x1cb)])),_0x1a003c(0x3,_0x406e39[_0x5318e2(0xbb)](_0x5ef1f5['SheetPermissionInterceptorBaseController']))],_0x574e86);var _0x3b7b1a=Object['defineProperty'],_0x44ab1e=Object['getOwnPropertyDescriptor'],_0x3eb1ed=_0x454ee3((_0x277540,_0x3ec74f,_0x189854,_0x4be4cd)=>{const _0x17c0c6=_0x5318e2;for(var _0x4bc6ca=_0x4be4cd>0x1?void 0x0:_0x4be4cd?_0x44ab1e(_0x3ec74f,_0x189854):_0x3ec74f,_0x23f021=_0x277540[_0x17c0c6(0x1d9)]-0x1,_0x28c4bc;_0x23f021>=0x0;_0x23f021--)(_0x28c4bc=_0x277540[_0x23f021])&&(_0x4bc6ca=(_0x4be4cd?_0x28c4bc(_0x3ec74f,_0x189854,_0x4bc6ca):_0x28c4bc(_0x4bc6ca))||_0x4bc6ca);return _0x4be4cd&&_0x4bc6ca&&_0x3b7b1a(_0x3ec74f,_0x189854,_0x4bc6ca),_0x4bc6ca;},_0x5318e2(0x198)),_0x9d480=_0x454ee3((_0x546a88,_0x51f27b)=>(_0x1c597e,_0x4e6bcd)=>_0x51f27b(_0x1c597e,_0x4e6bcd,_0x546a88),_0x5318e2(0x1d6));let _0x4e9a45=(_0x3babff=class extends _0x406e39[_0x5318e2(0x1fc)]{constructor(_0x55477b,_0x2dbacd,_0x151cc8,_0x3bc62f,_0x224f22,_0x527d23,_0x1e40fb,_0x4edeb5,_0x31b556){const _0x33437f=_0x5318e2;super(),_0x1cb9c5(this,_0x33437f(0x15a),!0x1),_0x1cb9c5(this,_0x33437f(0x1ab),null),(this[_0x33437f(0x1e1)]=_0x55477b,this[_0x33437f(0xdd)]=_0x2dbacd,this[_0x33437f(0x1ff)]=_0x151cc8,this[_0x33437f(0x176)]=_0x3bc62f,this['_univerInstanceService']=_0x224f22,this['_sheetPermissionInterceptorBaseController']=_0x527d23,this[_0x33437f(0x1da)]=_0x1e40fb,this[_0x33437f(0x1ef)]=_0x4edeb5,this[_0x33437f(0xd1)]=_0x31b556,this['_initCommandListener'](),this[_0x33437f(0x151)](),this[_0x33437f(0x1eb)](),this[_0x33437f(0x1fe)](),this[_0x33437f(0x190)]());}[_0x5318e2(0x1a3)](_0x37d7eb,_0x16ddee,_0x433a2c){const _0x278266=_0x5318e2;var _0x2b63ce,_0x53e87f;const _0x11ac92=(_0x2b63ce=_0x37d7eb[0x0])==null?void 0x0:_0x2b63ce[_0x278266(0xdc)];if(!_0x11ac92)return;if(((_0x53e87f=_0x11ac92[_0x278266(0x1cd)])!=null?_0x53e87f:_0x406e39[_0x278266(0x1c8)][_0x278266(0x1e4)])!==_0x406e39[_0x278266(0x1c8)][_0x278266(0x1e4)]||_0x11ac92['endColumn']-_0x11ac92['startColumn']>0x0||_0x11ac92[_0x278266(0x14c)]-_0x11ac92[_0x278266(0x1ce)]>0x0){this[_0x278266(0x176)][_0x278266(0x1b7)]&&this[_0x278266(0x1e1)][_0x278266(0x1fb)](_0x40b2af['SetActiveCommentOperation']['id']);return;}const _0x2e78bd=_0x11ac92['startRow'],_0x53d89b=_0x11ac92[_0x278266(0x1d2)];if(!this[_0x278266(0x1ff)][_0x278266(0xbf)](_0x16ddee,_0x433a2c,_0x2e78bd,_0x53d89b)){this[_0x278266(0x176)][_0x278266(0x1b7)]&&this[_0x278266(0x1e1)][_0x278266(0x1fb)](_0x40b2af[_0x278266(0x1c9)]['id']);return;}const _0x53b299=this[_0x278266(0x1ff)]['getByLocation'](_0x16ddee,_0x433a2c,_0x2e78bd,_0x53d89b);_0x53b299&&this[_0x278266(0x1e1)]['executeCommand'](_0x40b2af['SetActiveCommentOperation']['id'],{'unitId':_0x16ddee,'subUnitId':_0x433a2c,'commentId':_0x53b299});}[_0x5318e2(0x1fe)](){const _0x2ba8fc=_0x5318e2;this['disposeWithMe'](this[_0x2ba8fc(0x1ef)][_0x2ba8fc(0x193)][_0x2ba8fc(0xb9)](_0x2cac15=>{const _0xfc8531=_0x2ba8fc;if(this['_isSwitchToCommenting'])return;const _0x23eb8e=this[_0xfc8531(0x1ef)][_0xfc8531(0x1f6)];_0x23eb8e&&this[_0xfc8531(0x1a3)](_0x2cac15,_0x23eb8e[_0xfc8531(0x1f7)],_0x23eb8e['sheetId']);}));}[_0x5318e2(0x190)](){const _0x570f8c=_0x5318e2;this[_0x570f8c(0x19a)](this['_editorBridgeService'][_0x570f8c(0x102)][_0x570f8c(0xb9)](_0x4acce9=>{const _0x5fb249=_0x570f8c;_0x4acce9[_0x5fb249(0x1d0)]&&this[_0x5fb249(0xdd)][_0x5fb249(0x14b)]();}));}['_initCommandListener'](){const _0x41a804=_0x5318e2;this[_0x41a804(0x1e1)][_0x41a804(0x1c3)](_0x4d1317=>{const _0x56cd1a=_0x41a804;if(_0x4d1317['id']===_0x15384c[_0x56cd1a(0x18e)]['id']){const _0xa4c0a5=_0x4d1317[_0x56cd1a(0x1d5)],_0x5521a9=this[_0x56cd1a(0xdd)]['activePopup'];if(!_0x5521a9)return;const {unitId:_0x5db148,subUnitId:_0x42498d,commentId:_0x35843d}=_0x5521a9;_0xa4c0a5[_0x56cd1a(0x1f7)]===_0x5db148&&_0xa4c0a5[_0x56cd1a(0x15b)]===_0x42498d&&_0xa4c0a5['commentId']===_0x35843d&&this[_0x56cd1a(0xdd)][_0x56cd1a(0x14b)]();}});}[_0x5318e2(0x151)](){const _0x4b7f32=_0x5318e2;this['disposeWithMe'](this[_0x4b7f32(0x176)]['activeCommentId$'][_0x4b7f32(0xb9)](async _0x2f0ce8=>{const _0x3b1968=_0x4b7f32;var _0x574f15;if(_0x2f0ce8){const {unitId:_0x125abd,subUnitId:_0x4fd0fb,commentId:_0x1ab2f4,trigger:_0x2f9fb1}=_0x2f0ce8,_0x413c2c=this['_sheetsThreadCommentModel'][_0x3b1968(0x1d4)](_0x125abd,_0x4fd0fb,_0x1ab2f4);if(!_0x413c2c||_0x413c2c[_0x3b1968(0xef)])return;const _0x3b4844=this[_0x3b1968(0xe2)][_0x3b1968(0x105)](_0x406e39['UniverInstanceType'][_0x3b1968(0xed)]);if(!_0x3b4844||_0x3b4844[_0x3b1968(0xeb)]()!==_0x125abd)return;this['_isSwitchToCommenting']=!0x0,((_0x574f15=_0x3b4844[_0x3b1968(0x1f9)]())==null?void 0x0:_0x574f15[_0x3b1968(0x115)]())!==_0x4fd0fb&&await this[_0x3b1968(0x1e1)][_0x3b1968(0x1fb)](_0x5e6cb0['SetWorksheetActiveOperation']['id'],{'unitId':_0x125abd,'subUnitId':_0x4fd0fb}),this[_0x3b1968(0x15a)]=!0x1;const _0x47f529=_0x4d5a79[_0x3b1968(0x13d)](_0x413c2c[_0x3b1968(0x1df)]),{row:_0x43aab3,column:_0x80c8ff}=_0x47f529;if(!this['_sheetPermissionInterceptorBaseController'][_0x3b1968(0x1a4)]({'workbookTypes':[_0x5e6cb0[_0x3b1968(0x150)]],'worksheetTypes':[_0x5e6cb0[_0x3b1968(0xcb)]],'rangeTypes':[_0x5e6cb0[_0x3b1968(0x1bb)]]},[{'startRow':_0x43aab3,'startColumn':_0x80c8ff,'endRow':_0x43aab3,'endColumn':_0x80c8ff}]))return;const _0x29cc16=0x1;if(await this[_0x3b1968(0x1e1)][_0x3b1968(0x1fb)](_0x5ef1f5[_0x3b1968(0x186)]['id'],{'range':{'startRow':Math['max'](_0x47f529['row']-_0x29cc16,0x0),'endRow':_0x47f529[_0x3b1968(0x173)]+_0x29cc16,'startColumn':Math[_0x3b1968(0x116)](_0x47f529[_0x3b1968(0xd4)]-_0x29cc16,0x0),'endColumn':_0x47f529[_0x3b1968(0xd4)]+_0x29cc16}}),this[_0x3b1968(0xd1)]['isVisible']()['visible'])return;this[_0x3b1968(0xdd)][_0x3b1968(0x19b)]({'unitId':_0x125abd,'subUnitId':_0x4fd0fb,'row':_0x47f529[_0x3b1968(0x173)],'col':_0x47f529['column'],'commentId':_0x413c2c['id'],'trigger':_0x2f9fb1});}else this['_sheetsThreadCommentPopupService'][_0x3b1968(0x14b)]();}));}[_0x5318e2(0x1eb)](){const _0x5725ce=_0x5318e2;this['disposeWithMe'](this[_0x5725ce(0x176)][_0x5725ce(0x12e)][_0x5725ce(0xb5)](_0x2d855b[_0x5725ce(0xd8)](0x64))[_0x5725ce(0xb9)](_0x19ef8e=>{const _0x48826a=_0x5725ce;var _0x28e837,_0x270061;if(!_0x19ef8e){this[_0x48826a(0x1ab)]&&(this[_0x48826a(0x1da)][_0x48826a(0x1f2)](this[_0x48826a(0x1ab)][_0x48826a(0x172)]),this[_0x48826a(0x1ab)]=null);return;}const {unitId:_0x276554,subUnitId:_0x1099b7,commentId:_0x83c146}=_0x19ef8e;this[_0x48826a(0x1ab)]&&(this[_0x48826a(0x1da)]['removeShape'](this[_0x48826a(0x1ab)][_0x48826a(0x172)]),this['_selectionShapeInfo']=null);const _0x4efac4=this[_0x48826a(0x1ff)][_0x48826a(0x1d4)](_0x276554,_0x1099b7,_0x83c146);if(!_0x4efac4)return;const _0xa35db6=_0x4d5a79[_0x48826a(0x13d)](_0x4efac4[_0x48826a(0x1df)]),{row:_0x436990,column:_0xb26f3e}=_0xa35db6;if(Number[_0x48826a(0x1e9)](_0x436990)||Number[_0x48826a(0x1e9)](_0xb26f3e))return null;const _0x2f3e2f=(_0x28e837=this['_univerInstanceService'][_0x48826a(0x105)](_0x406e39[_0x48826a(0x119)][_0x48826a(0xed)]))==null?void 0x0:_0x28e837['getSheetBySheetId'](_0x1099b7),_0xe797db=(_0x270061=_0x2f3e2f==null?void 0x0:_0x2f3e2f[_0x48826a(0x1af)](_0x436990,_0xb26f3e))!=null?_0x270061:{'startColumn':_0xb26f3e,'endColumn':_0xb26f3e,'startRow':_0x436990,'endRow':_0x436990},_0x27d066=this[_0x48826a(0x1da)][_0x48826a(0x1b6)]({'range':_0xe797db,'style':{'hasAutoFill':!0x1,'fill':'rgb(255,\x20189,\x2055,\x200.35)','strokeWidth':0x1,'stroke':_0x48826a(0x184),'widgets':{}},'primary':null},[],-0x1);_0x27d066&&(this[_0x48826a(0x1ab)]={..._0x19ef8e,'shapeId':_0x27d066});}));}},_0x454ee3(_0x3babff,_0x5318e2(0x11c)),_0x3babff);_0x4e9a45=_0x3eb1ed([_0x9d480(0x0,_0x406e39['ICommandService']),_0x9d480(0x1,_0x406e39['Inject'](_0x496a1c[_0x5318e2(0x171)])),_0x9d480(0x2,_0x406e39[_0x5318e2(0xbb)](_0x4cf1db[_0x5318e2(0x1cb)])),_0x9d480(0x3,_0x406e39['Inject'](_0x40b2af[_0x5318e2(0xd2)])),_0x9d480(0x4,_0x406e39['IUniverInstanceService']),_0x9d480(0x5,_0x406e39['Inject'](_0x5ef1f5['SheetPermissionInterceptorBaseController'])),_0x9d480(0x6,_0x5ef1f5[_0x5318e2(0x1fa)]),_0x9d480(0x7,_0x406e39['Inject'](_0x5e6cb0[_0x5318e2(0x1d3)])),_0x9d480(0x8,_0x5ef1f5[_0x5318e2(0x165)])],_0x4e9a45);var _0x848106=Object[_0x5318e2(0x1b5)],_0xd4820a=Object['getOwnPropertyDescriptor'],_0xf4ac17=_0x454ee3((_0x545467,_0x272604,_0x1e8d8e,_0x5cd7d3)=>{const _0x3de274=_0x5318e2;for(var _0x53cc04=_0x5cd7d3>0x1?void 0x0:_0x5cd7d3?_0xd4820a(_0x272604,_0x1e8d8e):_0x272604,_0x50b77b=_0x545467[_0x3de274(0x1d9)]-0x1,_0x1fdc40;_0x50b77b>=0x0;_0x50b77b--)(_0x1fdc40=_0x545467[_0x50b77b])&&(_0x53cc04=(_0x5cd7d3?_0x1fdc40(_0x272604,_0x1e8d8e,_0x53cc04):_0x1fdc40(_0x53cc04))||_0x53cc04);return _0x5cd7d3&&_0x53cc04&&_0x848106(_0x272604,_0x1e8d8e,_0x53cc04),_0x53cc04;},_0x5318e2(0x135)),_0x24f706=_0x454ee3((_0x3f1819,_0x1b0aaf)=>(_0x37eb6a,_0x1b4a0c)=>_0x1b0aaf(_0x37eb6a,_0x1b4a0c,_0x3f1819),_0x5318e2(0x201));let _0x50daea=(_0x1c0780=class extends _0x406e39[_0x5318e2(0x1fc)]{constructor(_0x3407b,_0x2cb7cc,_0x5d3343,_0x1f7389){const _0x499e6d=_0x5318e2;super(),this[_0x499e6d(0x183)]=_0x3407b,this['_univerInstanceService']=_0x2cb7cc,this['_threadCommentModel']=_0x5d3343,this[_0x499e6d(0x1c7)]=_0x1f7389,this[_0x499e6d(0x123)]();}[_0x5318e2(0x123)](){const _0x26026c=_0x5318e2;this[_0x26026c(0x19a)](this[_0x26026c(0x183)]['interceptCommand']({'getMutations':_0x454ee3(_0x3a8ca6=>{const _0xba7326=_0x26026c;var _0x3cd9bc;if(_0x3a8ca6['id']===_0x5e6cb0[_0xba7326(0x1c1)]['id']){const _0x234957=_0x3a8ca6['params'],_0x70ab3e=_0x234957[_0xba7326(0x1f7)]?this[_0xba7326(0xe2)][_0xba7326(0x197)](_0x234957['unitId']):this[_0xba7326(0xe2)]['getCurrentUnitForType'](_0x406e39[_0xba7326(0x119)]['UNIVER_SHEET']);if(!_0x70ab3e)return{'redos':[],'undos':[]};const _0x3076c7=_0x70ab3e[_0xba7326(0xeb)](),_0x55c842=_0x234957['subUnitId']||((_0x3cd9bc=_0x70ab3e[_0xba7326(0x1f9)]())==null?void 0x0:_0x3cd9bc[_0xba7326(0x115)]());if(!_0x55c842)return{'redos':[],'undos':[]};const {commentMap:_0x6f42f7}=this[_0xba7326(0xfe)]['ensureMap'](_0x3076c7,_0x55c842),_0x162f4c=Array['from'](Object[_0xba7326(0xcd)](_0x6f42f7))['filter'](_0x5cdcd3=>!_0x5cdcd3['parentId']),_0x445ba3=_0x162f4c['map'](_0x20c28f=>_0x20c28f['id']),_0x1e6ed7=this[_0xba7326(0x1c7)][_0xba7326(0xf0)],_0xc04437=_0x445ba3[_0xba7326(0xde)](_0xd39f75=>({'id':_0x15384c[_0xba7326(0x18e)]['id'],'params':{'unitId':_0x3076c7,'subUnitId':_0x55c842,'commentId':_0xd39f75}})),_0x3ac360=_0x162f4c['map'](({children:_0xc8a332,..._0x291ee9})=>({'id':_0x15384c[_0xba7326(0x189)]['id'],'params':{'unitId':_0x3076c7,'subUnitId':_0x55c842,'comment':{..._0x291ee9,'children':_0x1e6ed7?_0xc8a332:void 0x0},'sync':!_0x1e6ed7}}));return{'redos':_0xc04437,'undos':_0x3ac360};}return{'redos':[],'undos':[]};},_0x26026c(0x185))}));}},_0x454ee3(_0x1c0780,'ThreadCommentRemoveSheetsController'),_0x1c0780);_0x50daea=_0xf4ac17([_0x24f706(0x0,_0x406e39['Inject'](_0x5e6cb0['SheetInterceptorService'])),_0x24f706(0x1,_0x406e39[_0x5318e2(0x19c)]),_0x24f706(0x2,_0x406e39['Inject'](_0x15384c[_0x5318e2(0x16f)])),_0x24f706(0x3,_0x15384c[_0x5318e2(0x15c)])],_0x50daea);var _0x33276a=Object[_0x5318e2(0x1b5)],_0x35dc83=Object[_0x5318e2(0x161)],_0x5d318a=_0x454ee3((_0x186d87,_0x405670,_0x39b9eb)=>_0x405670 in _0x186d87?_0x33276a(_0x186d87,_0x405670,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39b9eb}):_0x186d87[_0x405670]=_0x39b9eb,'__defNormalProp'),_0x4374f6=_0x454ee3((_0x32c98c,_0x367f4b,_0x442020,_0x363b11)=>{const _0x55d9e1=_0x5318e2;for(var _0x18f950=_0x363b11>0x1?void 0x0:_0x363b11?_0x35dc83(_0x367f4b,_0x442020):_0x367f4b,_0x15d463=_0x32c98c[_0x55d9e1(0x1d9)]-0x1,_0x5e06f;_0x15d463>=0x0;_0x15d463--)(_0x5e06f=_0x32c98c[_0x15d463])&&(_0x18f950=(_0x363b11?_0x5e06f(_0x367f4b,_0x442020,_0x18f950):_0x5e06f(_0x18f950))||_0x18f950);return _0x363b11&&_0x18f950&&_0x33276a(_0x367f4b,_0x442020,_0x18f950),_0x18f950;},_0x5318e2(0x1a6)),_0x4b9447=_0x454ee3((_0x2c729d,_0x233fb7)=>(_0x302911,_0x5f4cc5)=>_0x233fb7(_0x302911,_0x5f4cc5,_0x2c729d),_0x5318e2(0x192)),_0x541761=_0x454ee3((_0x4dc9ff,_0x578080,_0x496bb7)=>_0x5d318a(_0x4dc9ff,typeof _0x578080!=_0x5318e2(0x131)?_0x578080+'':_0x578080,_0x496bb7),_0x5318e2(0xec));_0x496a1c[_0x5318e2(0xee)]=(_0x4368b5=class extends _0x406e39['Plugin']{constructor(_0x357606=_0x1f4d6e,_0x9952bc,_0x44315e,_0x859948){const _0xc1a7f7=_0x5318e2;super(),this[_0xc1a7f7(0x120)]=_0x357606,this['_injector']=_0x9952bc,this[_0xc1a7f7(0x1e1)]=_0x44315e,this['_configService']=_0x859948;const {menu:_0x6be8b2,..._0x4c63b5}=this[_0xc1a7f7(0x120)];_0x6be8b2&&this[_0xc1a7f7(0xe9)][_0xc1a7f7(0xc5)](_0xc1a7f7(0x1e0),_0x6be8b2,{'merge':!0x0}),this[_0xc1a7f7(0xe9)]['setConfig'](_0x391f6a,_0x4c63b5);}[_0x5318e2(0x18d)](){const _0x502418=_0x5318e2;[[_0x2c59ad],[_0x21fa99],[_0x3bd8cb],[_0x574e86],[_0x50daea],[_0x4e9a45],[_0x496a1c[_0x502418(0x171)]]][_0x502418(0x1ea)](_0xd13ce=>{const _0xdf0833=_0x502418;this[_0xdf0833(0x12f)][_0xdf0833(0x10b)](_0xd13ce);}),[_0x1f94b6][_0x502418(0x1ea)](_0x29841a=>{const _0x411b48=_0x502418;this[_0x411b48(0x1e1)]['registerCommand'](_0x29841a);}),this[_0x502418(0x12f)][_0x502418(0xb7)](_0x2c59ad);}[_0x5318e2(0x191)](){const _0x2510f6=_0x5318e2;this[_0x2510f6(0x12f)]['get'](_0x21fa99),this[_0x2510f6(0x12f)]['get'](_0x50daea);}[_0x5318e2(0x13e)](){const _0x1dcf9d=_0x5318e2;this[_0x1dcf9d(0x12f)][_0x1dcf9d(0xb7)](_0x3bd8cb),this[_0x1dcf9d(0x12f)]['get'](_0x574e86),this[_0x1dcf9d(0x12f)][_0x1dcf9d(0xb7)](_0x4e9a45);}},_0x454ee3(_0x4368b5,_0x5318e2(0xee)),_0x4368b5),_0x541761(_0x496a1c[_0x5318e2(0xee)],_0x5318e2(0x168),_0x4ad0ee),_0x541761(_0x496a1c[_0x5318e2(0xee)],_0x5318e2(0x104),_0x406e39['UniverInstanceType']['UNIVER_SHEET']),_0x496a1c['UniverSheetsThreadCommentPlugin']=_0x4374f6([_0x406e39[_0x5318e2(0x1c0)](_0x40b2af[_0x5318e2(0x157)],_0x4cf1db['UniverSheetsThreadCommentBasePlugin']),_0x4b9447(0x1,_0x406e39['Inject'](_0x406e39['Injector'])),_0x4b9447(0x2,_0x406e39[_0x5318e2(0xbb)](_0x406e39[_0x5318e2(0xc7)])),_0x4b9447(0x3,_0x406e39[_0x5318e2(0x174)])],_0x496a1c[_0x5318e2(0xee)]),Object[_0x5318e2(0x1b5)](_0x496a1c,_0x5318e2(0x1cb),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x4cf1db[_0x5318e2(0x1cb)],_0x5318e2(0xb7))}),Object[_0x5318e2(0x1b5)](_0x496a1c,'IThreadCommentMentionDataService',{'enumerable':!0x0,'get':_0x454ee3(()=>_0x40b2af[_0x5318e2(0x1de)],_0x5318e2(0xb7))}),Object['defineProperty'](_0x496a1c,_0x5318e2(0x157),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x40b2af[_0x5318e2(0x157)],_0x5318e2(0xb7))}),Object[_0x5318e2(0x1b5)](_0x496a1c,_0x5318e2(0x180),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x15384c[_0x5318e2(0x180)],_0x5318e2(0xb7))}),Object[_0x5318e2(0x1b5)](_0x496a1c,'DeleteCommentCommand',{'enumerable':!0x0,'get':_0x454ee3(()=>_0x15384c['DeleteCommentCommand'],_0x5318e2(0xb7))}),Object[_0x5318e2(0x1b5)](_0x496a1c,_0x5318e2(0x1b9),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x15384c[_0x5318e2(0x1b9)],_0x5318e2(0xb7))}),Object[_0x5318e2(0x1b5)](_0x496a1c,_0x5318e2(0x15c),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x15384c['IThreadCommentDataSourceService'],'get')}),Object[_0x5318e2(0x1b5)](_0x496a1c,_0x5318e2(0x1f0),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x15384c[_0x5318e2(0x1f0)],_0x5318e2(0xb7))}),Object['defineProperty'](_0x496a1c,_0x5318e2(0x18b),{'enumerable':!0x0,'get':_0x454ee3(()=>_0x15384c[_0x5318e2(0x18b)],_0x5318e2(0xb7))}),_0x496a1c['SHEETS_THREAD_COMMENT']=_0x4ad0ee,_0x496a1c[_0x5318e2(0x1dd)]=_0x1f94b6,Object[_0x5318e2(0x1b5)](_0x496a1c,Symbol[_0x5318e2(0xe6)],{'value':_0x5318e2(0xe0)});}));function _0x3258(){const _0x2a96c9=['hasOwnProperty','getRenderById','SheetsThreadCommentPanel','evenodd','_initSkeletonChange','panelVisible$','markSkeletonDirty','_threadCommentModel','_initZenVisible','children','ToggleSheetCommentPanelOperation','visible$','UniverSheetsUi','type','getCurrentUnitForType','UniverEngineRender','use','_canvasPopupManagerService','_initHoverEvent','_menuManagerService','add','ALT','__decorateClass$3','primary','IRenderManagerService','displayName','Range','commentUpdate$','activePopup$','serializeRange','getSheetId','max','chatAtABC','25aeGYpP','UniverInstanceType','UniverUi','complete','SheetsThreadCommentPopupController','getName','__decorateParam$6','useDependency','_config','getSheetCommandTarget','activeSheet$','_initSheetChange','UniverSheets','sheetThreadComment.menu.addComment','__decorateClass$7','__decorateParam$4','function','getSheets','Style','IMenuManagerService','SheetsThreadCommentHoverController','handleAdd','activeCommentId$','_injector','DisposableCollection','symbol','_initMenu','_initClipboardHook','ISheetClipboardService','__decorateClass$1','sort','getCurrentLastSelection','1438516WkjbPU','_initViewModelIntercept','@univerjs/sheets-thread-comment-base','getByLocation','mainComponent','singleReferenceToGrid','onRendered','_initShortcut','@univerjs/engine-render','toString','INTERCEPTOR_POINT','_componentManager','current','generateShortUuid','thread-comment-add','336SOmVia','render','33KCIveS','5673966mHBwCC','hidePopup','endRow','ContextMenuGroup','CommentSingle','activePopup','WorkbookCommentPermission','_initPanelListener','_sheetPermissionInterceptorBaseController','sheets.operation.show-comment-modal','mergeMenu','InterceptorEffectEnum','propertyIsEnumerable','UniverThreadCommentUIPlugin','forwardRef','ContextMenuPosition','_isSwitchToCommenting','subUnitId','IThreadCommentDataSourceService','MAIN_AREA','rows','parentId','col','getOwnPropertyDescriptor','.univer-thread-comment','BehaviorSubject','14007609PjqPZF','IEditorBridgeService','useObservable','_renderManagerService','pluginName','@univerjs/sheets-ui','copyType','ThreadCommentPanel','persistPopup','none','attachPopupToCell','ThreadCommentModel','register','SheetsThreadCommentPopupService','shapeId','row','IConfigService','12960710YSasLw','_threadCommentPanelService','setActiveComment','_activePopup','getAllByLocation','amd','@univerjs/core','CommandType','exports','_zenZoneService','M5.83725\x206.78345C6.22188\x206.78345\x206.53368\x207.10742\x206.53368\x207.50706V8.41159C6.53368\x208.81123\x206.22188\x209.13521\x205.83725\x209.13521C5.45263\x209.13521\x205.14082\x208.81123\x205.14082\x208.41159V7.50706C5.14082\x207.10742\x205.45263\x206.78345\x205.83725\x206.78345ZM8.73904\x206.78345C9.12366\x206.78345\x209.43546\x207.10742\x209.43546\x207.50706V8.41159C9.43546\x208.81123\x209.12366\x209.13521\x208.73904\x209.13521C8.35441\x209.13521\x208.04261\x208.81123\x208.04261\x208.41159V7.50706C8.04261\x207.10742\x208.35441\x206.78345\x208.73904\x206.78345ZM11.6408\x206.78345C12.0254\x206.78345\x2012.3372\x207.10742\x2012.3372\x207.50706V8.41159C12.3372\x208.81123\x2012.0254\x209.13521\x2011.6408\x209.13521C11.2562\x209.13521\x2010.9444\x208.81123\x2010.9444\x208.41159V7.50706C10.9444\x207.10742\x2011.2562\x206.78345\x2011.6408\x206.78345Z','AddCommentCommand','COPY_TYPE','RibbonStartGroup','_sheetInterceptorService','#FFBD37','getMutations','ScrollToRangeOperation','attrs','context-menu','AddCommentMutation','Tools','UpdateCommentCommand','CTRL_COMMAND','onStarting','DeleteCommentMutation','unshift','_initEditorBridge','onReady','__decorateParam','selectionMoveEnd$','registerShortcut','handleLeave','MetaKeys','getUnit','__decorateClass$2','rxjs','disposeWithMe','showPopup','IUniverInstanceService','getCurrentRangeDisable$','__decorateClass$6','querySelectorAll','replace','getSubUnitName','url(#$1','_handleSelectionChange','permissionCheckWithRanges','temp','__decorateClass','THREAD_COMMENT_PANEL','1em','MenuItemType','useRef','_selectionShapeInfo','threadCommentMenuFactory','assign','BUTTON','getMergedCell','onClose','@univerjs/sheets','ThreadCommentTree','0\x200\x2017\x2017','sheets-thread-comment.config','defineProperty','addShape','activeCommentId','comment-single','DeleteCommentTreeCommand','defIds','RangeProtectionPermissionViewPoint','getOwnPropertySymbols','getMenuHiddenObservable','push','path','DependentOn','RemoveSheetCommand','whenSheetEditorFocused','onCommandExecuted','_lastPopup','call','UniverSheetsThreadCommentBase','_threadCommentDataSourceService','RANGE_TYPE','SetActiveCommentOperation','transformRef','SheetsThreadCommentModel','xlink:href','rangeType','startRow','from','visible','@univerjs/thread-comment','startColumn','SheetsSelectionsService','getComment','params','__decorateParam$2','apply','defs','length','_markSelectionService','tag','222005EdrIVC','ShowAddSheetCommentModalOperation','IThreadCommentMentionDataService','ref','menu','_commandService','_sheetClipboardService','onBeforeCopy','NORMAL','__decorateClass$4','SheetsThreadCommentCopyPasteController','fill','SHEET_THREAD_COMMENT','isNaN','forEach','_initMarkSelection','getSheetBySheetId','187349JsSVJg','indexOf','_sheetSelectionService','ResolveCommentCommand','commentId','removeShape','_initComponent','OTHERS','asObservable','currentSelectionParam','unitId','@univerjs/engine-formula','getActiveSheet','IMarkSelectionService','executeCommand','Disposable','_shortcutService','_initSelectionUpdateListener','_sheetsThreadCommentModel','trim','__decorateParam$1','className','pipe','__decorateClass$5','get','currentCell$','subscribe','useEffect','Inject','handleResolve','useCallback','@univerjs/ui','showCommentMarker','svg','foreach','onClickOutside','colorChannel1','next','setConfig','object','ICommandService','react','handler','16ifYkWi','WorksheetViewPermission','7621578LpvtyB','values','@univerjs/thread-comment-ui','markers','icon','_editorBridgeService','ThreadCommentPanelService','intercept','column','univerjs-icon\x20univerjs-icon-','horizontal','dispose','debounceTime','prototype','currentColor','filter','range','_sheetsThreadCommentPopupService','map','_activePopup$','Module','getElementById','_univerInstanceService','idSuffix','ComponentManager','__decorateParam$7','toStringTag','UniverCore','string','_configService','addClipboardHook','getUnitId','__publicField','UNIVER_SHEET','UniverSheetsThreadCommentPlugin','resolved','syncUpdateMutationToColla','extend','concat','makeForceDirty','_copyInfo','createElement','rgb(255,\x20189,\x2055,\x200.35)'];_0x3258=function(){return _0x2a96c9;};return _0x3258();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-thread-comment",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-nightly.202410101606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Univer thread comment plugin",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -47,26 +47,26 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
|
|
49
49
|
"rxjs": ">=7.0.0",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/engine-
|
|
53
|
-
"@univerjs/sheets": "0.3.0-
|
|
54
|
-
"@univerjs/sheets
|
|
55
|
-
"@univerjs/sheets-ui": "0.3.0-
|
|
56
|
-
"@univerjs/thread-comment": "0.3.0-
|
|
57
|
-
"@univerjs/thread-comment
|
|
58
|
-
"@univerjs/ui": "0.3.0-
|
|
50
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
51
|
+
"@univerjs/engine-render": "0.3.0-nightly.202410101606",
|
|
52
|
+
"@univerjs/engine-formula": "0.3.0-nightly.202410101606",
|
|
53
|
+
"@univerjs/sheets-thread-comment-base": "0.3.0-nightly.202410101606",
|
|
54
|
+
"@univerjs/sheets": "0.3.0-nightly.202410101606",
|
|
55
|
+
"@univerjs/sheets-ui": "0.3.0-nightly.202410101606",
|
|
56
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410101606",
|
|
57
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410101606",
|
|
58
|
+
"@univerjs/ui": "0.3.0-nightly.202410101606"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@univerjs/icons": "^0.1.78",
|
|
62
62
|
"clsx": "^2.1.1",
|
|
63
|
-
"@univerjs/core": "0.3.0-
|
|
64
|
-
"@univerjs/design": "0.3.0-
|
|
65
|
-
"@univerjs/sheets-thread-comment-base": "0.3.0-
|
|
66
|
-
"@univerjs/engine-formula": "0.3.0-
|
|
67
|
-
"@univerjs/thread-comment": "0.3.0-
|
|
68
|
-
"@univerjs/thread-comment
|
|
69
|
-
"@univerjs/ui": "0.3.0-
|
|
63
|
+
"@univerjs/core": "0.3.0-nightly.202410101606",
|
|
64
|
+
"@univerjs/design": "0.3.0-nightly.202410101606",
|
|
65
|
+
"@univerjs/sheets-thread-comment-base": "0.3.0-nightly.202410101606",
|
|
66
|
+
"@univerjs/engine-formula": "0.3.0-nightly.202410101606",
|
|
67
|
+
"@univerjs/thread-comment-ui": "0.3.0-nightly.202410101606",
|
|
68
|
+
"@univerjs/thread-comment": "0.3.0-nightly.202410101606",
|
|
69
|
+
"@univerjs/ui": "0.3.0-nightly.202410101606"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"react": "18.3.1",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "^5.6.2",
|
|
75
75
|
"vite": "^5.4.8",
|
|
76
76
|
"vitest": "^2.1.1",
|
|
77
|
-
"@univerjs-infra/shared": "0.3.0
|
|
77
|
+
"@univerjs-infra/shared": "0.3.0"
|
|
78
78
|
},
|
|
79
79
|
"univerSpace": {
|
|
80
80
|
".": {
|
|
@@ -95,7 +95,6 @@
|
|
|
95
95
|
"test:watch": "vitest",
|
|
96
96
|
"coverage": "vitest run --coverage",
|
|
97
97
|
"lint:types": "tsc --noEmit",
|
|
98
|
-
"build": "tsc && vite build"
|
|
99
|
-
"sync:cnpm": "cnpm sync"
|
|
98
|
+
"build": "tsc && vite build"
|
|
100
99
|
}
|
|
101
100
|
}
|
package/LICENSE
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|