@univerjs-pro/sheets-pivot-ui 1.5.0 → 1.5.2
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/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +16 -15
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x4e7b(){const _0x76d11a=['_initControl','sheets-pivot-ui.dateFilter.equal','non-scaling-stroke','checkRangesEditablePermission','panel','IUniverInstanceService','RemoveColCommand','MobileActionRowGroup','00:00:00','time','_initMenuInterceptor','transformByState','univer-text-xs\x20univer-text-red-500','16px\x2016px\x200','getDialogs$','univer-text-sm\x20univer-text-gray-500','sheets-pivot-ui.dateFilter.afterOrEqual','sheets-pivot-ui.numberGroup.start','0\x200\x2017\x2016','useWholeDay','sheets-pivot-ui.dateFilter.rule','OPERATION','_initEditListener','SheetsPivotTableUIMenuSchema','getSubUnitPivotMatrix','DATA','currentShowDataAs','moveDown','UNIVER_SHEET_PIVOT_FIELD_NUMFMT','_confirmService','from','EMPTY','_sheetInterceptorService','viewUpdate$','bottomCount','FilteredSortDesc','pointerEvents','button','sheets-pivot-ui.config.displaySection','sheets-pivot-ui.varpName','univer-flex\x20univer-flex-col\x20univer-gap-5\x20univer-py-4','sheetId','serializeRange','month','sheets-pivot-ui.rowDesc','destination','sheets-pivot-ui.dialog.cancel','sheets-pivot-ui.subtotal.count','[PivotFilterOptions]','COLUMN','clip','sheets-pivot-ui.dateFilter.title','M5.9334\x202.00527C5.9334\x201.6739\x205.66477\x201.40527\x205.3334\x201.40527C5.00203\x201.40527\x204.7334\x201.6739\x204.7334\x202.00527V4.73877H1.9999C1.66853\x204.73877\x201.3999\x205.0074\x201.3999\x205.33877C1.3999\x205.67014\x201.66853\x205.93877\x201.9999\x205.93877H4.7334V10.072H1.9999C1.66853\x2010.072\x201.3999\x2010.3407\x201.3999\x2010.672C1.3999\x2011.0034\x201.66853\x2011.272\x201.9999\x2011.272H4.7334V14.0053C4.7334\x2014.3366\x205.00203\x2014.6053\x205.3334\x2014.6053C5.66477\x2014.6053\x205.9334\x2014.3366\x205.9334\x2014.0053V11.272H10.0667V14.0053C10.0667\x2014.3366\x2010.3353\x2014.6053\x2010.6667\x2014.6053C10.998\x2014.6053\x2011.2667\x2014.3366\x2011.2667\x2014.0053V11.272H13.9999C14.3313\x2011.272\x2014.5999\x2011.0034\x2014.5999\x2010.672C14.5999\x2010.3407\x2014.3313\x2010.072\x2013.9999\x2010.072H11.2667V5.93877H13.9999C14.3313\x205.93877\x2014.5999\x205.67014\x2014.5999\x205.33877C14.5999\x205.0074\x2014.3313\x204.73877\x2013.9999\x204.73877H11.2667V2.00527C11.2667\x201.6739\x2010.998\x201.40527\x2010.6667\x201.40527C10.3353\x201.40527\x2010.0667\x201.6739\x2010.0667\x202.00527V4.73877H5.9334V2.00527ZM10.0667\x2010.072V5.93877H5.9334V10.072H10.0667Z','getPivotAppliedRanges','M12.4208\x2014.4667C12.4208\x2014.798\x2012.1522\x2015.0667\x2011.8208\x2015.0667C11.4895\x2015.0667\x2011.2208\x2014.798\x2011.2208\x2014.4667V2.98193L9.97861\x204.22417C9.7443\x204.45848\x209.3644\x204.45848\x209.13008\x204.22417C8.89577\x203.98985\x208.89577\x203.60995\x209.13008\x203.37564L11.3967\x201.10897C11.6311\x200.874657\x2012.011\x200.874657\x2012.2453\x201.10897L14.5119\x203.37564C14.7463\x203.60995\x2014.7463\x203.98985\x2014.5119\x204.22417C14.2776\x204.45848\x2013.8977\x204.45848\x2013.6634\x204.22417L12.4208\x202.9816V14.4667Z','WorksheetPivotTablePermission','univer-w-24','M8\x209C8.55228\x209\x209\x208.55228\x209\x208C9\x207.44772\x208.55228\x207\x208\x207C7.44772\x207\x207\x207.44772\x207\x208C7\x208.55228\x207.44772\x209\x208\x209Z','registerCommand','univer-flex\x20univer-cursor-pointer\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-text-gray-600','sheets-pivot-ui.filterField','_(\x22','greaterThan','mask','sheet.pivot.context-menu.manual-group','A/P\x20h:mm','univer-flex\x20univer-flex-wrap\x20univer-items-center\x20univer-gap-2','_pivotTableId','subscribe','collapse','ERROR','PivotCellStyleTypeEnum','_registerIcons','red','lineTo','interceptAsync','translate(','univer-text-sm\x20univer-text-gray-600','function','univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-gap-2','Fragment','PositionType','@univerjs/core','univer-flex\x20univer-flex-col\x20univer-gap-5','MOVE','expected','17.8544','end','split','TextIcon','value','SheetContextMenuMobileRenderController','UniverEngineFormula','_sheetClipboardService','random','cellHeight','\x22*\x20#,##0','7.59766','tag','univer-flex\x20univer-h-8\x20univer-cursor-pointer\x20univer-items-center\x20univer-justify-center\x20univer-gap-1.5\x20univer-rounded\x20univer-border-none\x20univer-bg-gray-0\x20univer-px-3\x20univer-text-primary-600','MoreDownIcon','contextMenuInterceptor','daysInterval','defaultNormalField','SheetSkeletonManagerService','hiddenFields','_skeletonManagerService','relative:next','getPivotDateGroupContext','getSheets','UniverDesign','univer-flex\x20univer-min-w-0\x20univer-flex-1\x20univer-items-center\x20univer-text-xs\x20univer-leading-4\x20univer-text-gray-900\x20dark:!univer-text-gray-0','univer-flex\x20univer-min-h-12\x20univer-items-center\x20univer-gap-3\x20univer-rounded-xl\x20univer-px-3','sheets-pivot-ui.config.showColGrandTotal','Year','univer-max-h-[40vh]\x20univer-overflow-y-auto\x20univer-rounded-xl\x20univer-bg-gray-50\x20univer-p-2\x20dark:!univer-bg-gray-800','sheets-pivot-ui.dialog.source.newSheet','univer-mb-2\x20univer-h-5\x20univer-text-sm\x20univer-font-medium','Second','object','pivot-format-painter-hook','sheets-pivot-ui.noMatchingFields','SetPivotFilterCommand','getSheetBySheetName','sheets-pivot-ui.dateGroup.day','getPivotDisplayConfig','rowType','getPropertyPriority','sheets-pivot-ui.valueFilter.bottomCount','sheets-pivot-ui.numberGroup.end','univer-mt-5','Date1900','tabular','isFinite','sheets-pivot-ui.sourceRangeLabel','save','isDateGroupFieldJSON','subTotalType','constructor','none','25.959','close','closest','isBottomTotal','fillStyle','element','_pivotButtonShapesArr','xlink:href','08-05','auto','_renderManagerService','rowSubtotalPosition','currentLocale$','positionSheetName','rxjs','sheets-pivot-ui.config.showColSubtotal','sheets-pivot-ui.stdDevName','ColumnIcon','Checkbox','UniverProSheetsPivotUi','GrandTotal','drawCollapse','UniverSheetsPivotTableUIPlugin','BUTTON','localeKey','circle','unitId','_closePivotPanel','@univerjs/sheets','boxSizing','sheets-pivot-ui.showValuesAs.baseField','_handlePointerUp','memberPaths','univer-inline-block\x20univer-align-top','footer','RemovePivotTableMutation','_selectionRenderService','baseItemMode','pointermove','getTime','useMemo','[MobilePivotPanel]','appliedStrokeWidth','sheet.numfmt.accounting','scrollbarClassName','expandToContinuousRange','univer-flex\x20univer-flex-1\x20univer-gap-2\x20univer-text-sm\x20rtl:univer-flex-row-reverse','true','_componentManager','concat','excelSerialToDateTimeParts','sheets-pivot-ui.config.dateGroupingSwitchMessage','sheets-pivot-ui.sourceFieldDescription','UniverUi','stroke','draggingOver','Plugin','_sheetSkeletonManagerService','deepClone','sheets-pivot-ui.countName','startRow','trim','univer-box-border\x20univer-min-h-0\x20univer-flex-1\x20univer-rounded-lg\x20univer-bg-gray-0\x20univer-p-2\x20dark:!univer-bg-gray-900','targetCellInfo','defaultValueFieldId','sheets-pivot-ui.config.rowSubtotalTop','getValue','sheets-pivot-ui.dateGroup.minute','moveToFilter','_configModel','ContextMenuGroup','_registerRenderModules','sheets-pivot-ui.showValuesAs.dialogTitle','disabled','defineProperty','_scenePointerMoveSubscribe','sheet.pivot.context-menu.value-filter','SheetPermissionCheckController','sheets-pivot-ui.config.allowMultipleFilters','getMilliseconds','markDirty$','Rect','SearchIcon','sheet.numfmt.date','Inject','mergeMenu','positionType','_contextMenuController','currentColor','interval','_initPanelOpen','univer-box-border\x20univer-h-full\x20univer-px-2','sheets-pivot-ui.valueFilter.lessThanOrEqual','MobileSelect','getCoordByCell','61325nIOHoI','onPointerDown$','univer-py-4\x20univer-text-center\x20univer-text-xs\x20univer-text-gray-500','sheets-pivot-ui.dialog.numfmt.accountingDesc','sheets-pivot-ui.valueFilter.dialogTitle','SHEET_PIVOT_TABLE_PLUGIN','sheets-pivot-ui.dateFilter.between','Shape','percentRunningTotal','sheets-pivot-ui.config.pageSection','IMessageService','border-box','descending-icon','Draggable/Droppable\x20must\x20be\x20used\x20inside\x20DragDropContext','univer-group\x20univer-relative\x20univer-box-border\x20univer-flex\x20univer-h-8\x20univer-w-full\x20univer-flex-row\x20univer-items-center\x20univer-rounded-md\x20univer-px-1\x20univer-py-2\x20univer-leading-4\x20univer-transition-all\x20hover:univer-bg-gray-100\x20dark:hover:!univer-bg-gray-700','univer-text-sm\x20univer-font-medium\x20univer-text-gray-600','UniverSheetsMobileUIPlugin','toString','13:30','Dropdown','Vector2','univer-flex\x20univer-min-h-12\x20univer-items-center\x20univer-gap-3\x20univer-rounded-xl\x20univer-px-2','datetime','touchDependencies','filter','allowMultipleFilters','amd','sheets-pivot-ui.valueFilter.condition','setCursor','sheets-pivot-ui.dialog.source.position','product','auditTime','getDate','outline','UpdatePivotTableSourceRangeCommand','Rectangle','bind','FilteredSortAsc','startY','item:','reduce','differenceFrom','equal','Disposable','MovePivotFieldCommand','isValue','average','mainComponent','descending','PivotFilterTypeEnum','topPercent','[MobilePivotSourceRange]','_commandService','context','IConfirmService','visible','deserializeRangeWithSheet','date','CommandType','sheet.pivot.context-menu.manual-rename','ExcelLike','sheets-pivot-ui.subtotal.var','sheets-pivot-ui.sourceFieldTile','getCoordByOffset','sheets-pivot-ui.dateGroup.title','_initUIInterceptListener','_initRegisterCommand','ActionRow','items','item','pivot-value-filter-expected','createInstance','checkedItems','PivotDrillDownCommand','sheets-pivot-ui.mobile.delete','sidebarOptions$','getCurrentSkeleton','useState','getColumnCount','univer-text-sm\x20univer-font-medium\x20univer-leading-5\x20univer-text-gray-900','setData','sheets-pivot-ui.config.multipleFiltersClearWarning','h:mm','univer-flex\x20univer-size-full\x20univer-min-h-0\x20univer-flex-col','univer-flex','exports','UNIVER_SHEET_PIVOT_SHOW_DATA_AS_DIALOG','Subject','Minute','switchMap','#,##0.00_);-#,##0.00','_pivotParams','SheetsSelectionsService','top','_closeChildDialogs','AddWorksheetMergeMutation','0\x2024px\x2020px','relative:previous','subtotal','_initButtonRender','diffValue','sheets-pivot-ui.dialog.filter.confirm','useDependency','entries','replace','alert','getPivotDateGroupingMode','pivot-value-filter-confirm','_dialogService','pivot','defer','checked','autoStart','sheets-pivot-ui.showValuesAs.percentRunningTotal','use','requiresParameters','Draggable','_openPivotActionPanel','sheets-pivot-ui.mobile.sourceFieldDescription','isPivotTableFilterRestrictive','pointerup','sheets-pivot-ui.perform.tips','univer-min-h-[200px]\x20univer-flex-1\x20univer-p-1','ISheetSelectionRenderService','M13\x209C13.5523\x209\x2014\x208.55228\x2014\x208C14\x207.44772\x2013.5523\x207\x2013\x207C12.4477\x207\x2012\x207.44772\x2012\x208C12\x208.55228\x2012.4477\x209\x2013\x209Z','ungroup','rowFields','sheet.operation.set-pivot-date-group','univer-p-4\x20univer-text-center\x20univer-text-xs\x20univer-text-gray-500','FilterSingle','info','UNIVER_SHEET_PIVOT_EXCEL_DATE_GROUP_DIALOG','minutes','push','SheetsPivotTableConfigModel','univer-min-w-0\x20univer-flex-1\x20univer-truncate\x20univer-text-sm','getPermissionPoint','sheets-pivot-ui.perform.blocked','_initSkeleton','yyyy\x22年\x22MM\x22月\x22dd\x22日\x22','getRowCount','sheets-pivot-ui.valueFilter.greaterThan','sheets-pivot-ui.perform.rowColError','M3.32182\x202.60967C2.98161\x202.60967\x202.79671\x203.0074\x203.01601\x203.2675L6.85819\x207.8246C6.94943\x207.93282\x206.99947\x208.06981\x206.99947\x208.21136V12.7338C6.99947\x2012.898\x207.0998\x2013.0455\x207.2525\x2013.1058L8.73833\x2013.6928C9.00085\x2013.7965\x209.28531\x2013.6031\x209.28531\x2013.3208V8.21136C9.28531\x208.06981\x209.33535\x207.93282\x209.42659\x207.8246L13.2688\x203.2675C13.4881\x203.0074\x2013.3032\x202.60967\x2012.963\x202.60967H3.32182ZM2.09858\x204.04101C1.22139\x203.0006\x201.96097\x201.40967\x203.32182\x201.40967H12.963C14.3238\x201.40967\x2015.0634\x203.0006\x2014.1862\x204.04101L10.4853\x208.43054V13.3208C10.4853\x2014.4498\x209.34747\x2015.2237\x208.29742\x2014.8089L6.81158\x2014.2219C6.20078\x2013.9806\x205.79947\x2013.3905\x205.79947\x2012.7338V8.43054L2.09858\x204.04101Z','univer-mt-3','executeCommand','univer-text-xs\x20univer-text-gray-500','univer-text-xs\x20univer-text-gray-600\x20dark:!univer-text-gray-200','WorkbookEditablePermission','UniverSheetsUIPlugin','@univerjs-pro/engine-pivot','colorChannel1','catch','resolve','normal','2258404oJUTRd','univer-border-primary-600','getMonth','addObjects','customFields','univer-text-xs\x20univer-leading-4\x20univer-text-gray-600','pipe','unit','Segmented','clientX','HasFilter','thousandthPercentile','下午01:30','FilterAll','univerDndDropDisabled','unsubscribe','M2\x204.0863C2\x202.98173\x202.89543\x202.0863\x204\x202.0863H9.24705C9.57842\x202.0863\x209.84705\x202.35493\x209.84705\x202.6863V8.73981C9.84705\x209.07118\x209.57842\x209.33981\x209.24705\x209.33981H2.6C2.26863\x209.33981\x202\x209.07118\x202\x208.73981V4.0863Z','1em','FilterPartial','isReleased','excelDateTimePartsToSerial','sheets-pivot-ui.config.pageOverThenDown','univer-flex\x20univer-items-start\x20univer-gap-2\x20univer-text-sm','M1.28069\x204.85444C0.842195\x204.33435\x201.21191\x203.53906\x201.89218\x203.53906H8.59333C9.2736\x203.53906\x209.64331\x204.33435\x209.20482\x204.85443L6.51052\x208.05006V11.6601C6.51052\x2012.2245\x205.94174\x2012.6113\x205.41683\x2012.404L4.48092\x2012.0342C4.1756\x2011.9136\x203.97498\x2011.6186\x203.97498\x2011.2903V8.05006L1.28069\x204.85444Z','attrs','univer-overflow-auto','dragHandleProps','sheets-pivot-ui.dialog.sourceName','sheet.operation.set-pivot-show-data-as','_configService','sheets-pivot-ui.config.rowSubtotalBottom','CustomCommandExecutionError','sheets-mobile-pivot-button-','univer-flex\x20univer-flex-col\x20univer-gap-4\x20univer-py-4','intersects','univer-mb-4','IConfigService','AscendingIcon','univer-rounded-xl\x20univer-p-2','[MobilePivotConfigPanel]','DateSystem','isDraggingOver','PIVOT_OPTION_FILTER_COORDINATION','draggableId','other','univer-cursor-pointer','remove','_sheetPermissionCheckController','PivotDataFieldDataTypeEnum','getCellWithCoordByIndex','endRow','sourceFieldId','CURSOR_TYPE','filterFields','row-icon','sheet.pivot.context-menu.excel-date-group','2147483647','univer-mb-2\x20univer-text-sm\x20univer-font-medium\x20univer-text-gray-600','sheets-pivot-ui.dateGroup.daysInterval','UniverSheetsPivotTableMobileUIPlugin','dataFieldInfo','repeatRowLabels','_messageService','opacity','sheets-pivot-ui.dialog.source.existingSheet','start','sheets-pivot-ui.manualGroup.renameTitle','UpdatePivotFieldSettingCommand','scene','moveToColumn','generateHexNumber','onFocusChange','sheets-pivot-ui.configPanel','FilterNoneSortDesc','getCellMatrix','sheet.operation.set-pivot-manual-group','sheets-pivot-ui.dialog.numfmt.negativeNumberTypes','onPointerLeave','Quarter','registerSelfRenderingMutations','1,235','percentOfParent','2.2793','toLocaleLowerCase','PivotShowAsBaseItemTypeEnum','sheets-pivot-ui.showValuesAs.differenceFrom','range','_registerComponents','useObservable','CalendarIcon','sheets-pivot-ui.dialog.filter.selectAll','Panel','onPointerEnter','PivotShowAsTypeEnum','univer-w-[14px]\x20univer-text-sm\x20univer-text-gray-200','draggingId','univer-mt-2\x20univer-flex\x20univer-justify-end','itemTypes','univer-flex\x20univer-flex-col\x20univer-gap-2\x20univer-text-sm','0\x200\x2017\x2017','children','UniverEngineRender','univer-max-w-[66px]\x20univer-flex-1\x20univer-shrink-0\x20univer-truncate\x20univer-text-xs\x20univer-leading-4\x20univer-text-gray-800\x20dark:!univer-text-gray-100','map','univer-mt-1\x20univer-text-xs\x20univer-text-gray-500','baseItemType','M5.1846\x201.86439C4.8641\x200.989866\x203.62725\x200.989866\x203.30674\x201.86439L1.34882\x207.20672C1.23479\x207.51786\x201.39458\x207.86252\x201.70571\x207.97655C2.01684\x208.09058\x202.3615\x207.93079\x202.47553\x207.61966L3.06159\x206.02055L3.06338\x206.02056H5.42975L6.01581\x207.61966C6.12984\x207.93079\x206.4745\x208.09058\x206.78563\x207.97655C7.09677\x207.86252\x207.25655\x207.51786\x207.14252\x207.20672L5.1846\x201.86439ZM4.98996\x204.82056L4.24567\x202.78971L3.50138\x204.82056H4.98996Z','find','sheets-pivot-ui.fieldPanel','isPatternEqualWithoutDecimal','open','sheets-pivot-ui.title','numberGroupField','complete','dateGroupContext','Legacy','MOBILE_CONTEXT_MENU','originalDataFieldId','direction$','percentOfColumnTotal','countNums','autoEnd','isSubtotal','lessThanOrEqual','values','SetPivotManualGroupsCommand','_initMoveRangeConfirmCheck','false','20px\x2024px\x200','assign','div','univer-flex\x20univer-flex-col\x20univer-gap-4','menuItemFactory','sheets-pivot-ui.removeField','custom','univer-w-4\x20univer-text-base\x20univer-text-primary-600','test','useRef','univer-flex\x20univer-h-[140px]\x20univer-flex-col\x20univer-items-center\x20univer-justify-center\x20univer-gap-1\x20univer-self-stretch\x20univer-px-2','univer-text-xs\x20univer-text-gray-600','sheets-pivot-ui.subtotal.average','isBetween','px)','getFullYear','rankDescending','univer-min-h-0\x20univer-flex-1','dateType','dateNewerThanOrEqual','\x22#,##0.00_);[Red](\x22','watchPivotTableChanges','field-setting-','M2.22891\x202.67227H11.5622M6.89541\x202.67227V14.0056M10.2289\x207.00552H15.5622M12.8954\x207.00552V14.0055','section','removeAlert','sheets-pivot-ui.subtotal.sum','tableFieldInfo','_initFormatPainterListener','Error','asObservable','addObject','clearTimeout','useContext','RowIcon','between','sheets-pivot-ui.config.multipleFiltersTitle','IPermissionService','filter-icon','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','\x22#,##0.00_);-\x22','58866PEqXyf','_selectionsService','flatMap','getHours','SetPivotOptionCommand','univerDndDroppableId','_clearButtons','invalidSelection','sheets-pivot-ui.dateFilter.before','getObservableWithExclusiveRange$','1930-08-05','_sheetPrintInterceptorService','FilterNoneSortNone','_draw','min','permissionCheckWithRanges','isValueFilterOperator','onRendered','defIds','DROP','UpdatePivotValuePositionCommand','(1,235)\x20','UNIVER_SHEET_PIVOT_FILTER_PANEL_ID','defaultOverride','originalStrokeWidth','key','sheets-pivot-ui.dialog.numfmt.fieldSetting','nativeEvent','M12.4208\x201.53335C12.4208\x201.20198\x2012.1522\x200.93335\x2011.8208\x200.93335C11.4895\x200.93335\x2011.2208\x201.20198\x2011.2208\x201.53335V13.0181L9.97861\x2011.7758C9.7443\x2011.5415\x209.3644\x2011.5415\x209.13008\x2011.7758C8.89577\x2012.0101\x208.89577\x2012.39\x209.13008\x2012.6244L11.3967\x2014.891C11.6311\x2015.1253\x2012.011\x2015.1253\x2012.2453\x2014.891L14.5119\x2012.6244C14.7463\x2012.39\x2014.7463\x2012.0101\x2014.5119\x2011.7758C14.2776\x2011.5415\x2013.8977\x2011.5415\x2013.6634\x2011.7758L12.4208\x2013.0184V1.53335Z','member','collection','SetCellEditVisibleOperation','sheets-pivot-ui.dialog.filter.blank','getTextInfo','univer-text-gray-400\x20dark:!univer-text-gray-500','-1,234.56','univerjs-icon\x20univerjs-icon-','IMenuManagerService','percentOfParentColumnTotal','disposeWithMe','UNIVER_SHEET','dateNotBetween','dateEqual','sheets-pivot-ui.column','sourceList','filterInfo','register','onPointerLeave$','numberGroupDefaults','textKey','361514PqmZcO','dataFieldType','ILogService','sheets-pivot-ui.showValuesAs.cancel','sheets-pivot-ui.showValuesAs.next','sheet.operation.set-pivot-excel-date-group','percentOfParentRowTotal','move','addClipboardHook','next','index','strokeStyle','Optional','0.9','0\x200\x2020\x2020','arcTo','sheets-pivot-ui.dialog.numfmt.cancel','sheets-pivot-ui.fieldSettings','SHEETS_PIVOT_PLUGIN_CONFIG_KEY','blockedRange','onPointerMove$','drawExpand','sheets-pivot-ui.valueFilter.notBetween','sheets-pivot-ui.showValuesAs.normal','getScrollXYInfoByViewport','targetFieldName','univer-grid\x20univer-grid-cols-2\x20univer-gap-3','Tooltip','_initListener','univer-relative\x20univer-h-full\x20univer-overflow-y-auto','partialItems','sheets-pivot-ui.dateGroup.hourMinute','_initialize','下午1:30','activeSheet$','getMinutes','\x22#,##0.00','ManualGroupMembers','univer-flex\x20univer-flex-col\x20univer-gap-1','ROW','iterator','dateRange','cellWidth','primary.600','sheet.operation.set-pivot-value-filter','sheets-pivot-ui.mobile.edit','bottom','sheets-pivot-ui.subtotal.stdDev','NumberIcon','IDialogService','round','MessageType','univer-flex\x20univer-h-12\x20univer-w-full\x20univer-items-center\x20univer-gap-2\x20univer-rounded-xl\x20univer-border-0\x20univer-bg-transparent\x20univer-px-3\x20univer-text-left\x20univer-text-sm','ST_PivotFilterOperatorEnum','sheet.operation.open-pivot-table-panel','currencySymbols','valueFieldId','sheets-pivot-ui.countNumsName','source','univer-flex\x20univer-gap-2','isAll','PivotSubtotalTypeEnum','pivot-source-field-viewport','_context','serializeRangeWithSheet','M1.98967\x2010.2798C1.6583\x2010.2798\x201.38967\x2010.0112\x201.38967\x209.67983C1.38967\x209.34846\x201.6583\x209.07983\x201.98967\x209.07983H6.50138C6.74406\x209.07983\x206.96284\x209.22602\x207.05571\x209.45022C7.14858\x209.67443\x207.09725\x209.9325\x206.92565\x2010.1041L3.43819\x2013.5916H6.50138C6.83276\x2013.5916\x207.10138\x2013.8602\x207.10138\x2014.1916C7.10138\x2014.5229\x206.83276\x2014.7916\x206.50138\x2014.7916H1.98967C1.74699\x2014.7916\x201.52821\x2014.6454\x201.43534\x2014.4212C1.34247\x2014.197\x201.3938\x2013.9389\x201.5654\x2013.7673L5.05286\x2010.2798H1.98967Z','moveToValue','sheets-pivot-ui.mobile.moveToValue','sheets-pivot-ui.dateGroup.second','getCurrentSelections','Button','@univerjs/docs-ui','area','suffix','univer-flex\x20univer-flex-col\x20univer-gap-3','circle,\x20ellipse,\x20line,\x20path,\x20polygon,\x20polyline,\x20rect,\x20text,\x20textPath,\x20tspan,\x20use','_moveStartRange','style','clientY','yyyy-MM-dd','UNIVER_SHEET_PIVOT_MOBILE_ACTION_PANEL_ID','stdDev','disconnect','otherDataKey','_defaultOverride','baseItem','generateRandomId','sheets-pivot-ui.showValuesAs.index','OpenPivotTableRangeSelectorPanelOperation','resolvePivotValueFieldId','sheet-pivot.confirm.change-date-grouping-mode','default','bottomPercent','version','mapPivotSheetRange','sheets-pivot-ui.dialog.numfmt.date','legend','_initPrintArea','rangesInfo','_moveRowOrCol','RangeSelector','params','projection','UNIVER_SHEET_PIVOT_NUMBER_GROUP_DIALOG','getIntersectsPivotTable','onReady','sourceRange','ValueFilter','pointerType','accounting','Hour','evenodd','vectorEffect','stroke-width','sheets-pivot-ui.minName','UNIVER_SHEET_PIVOT_NUMBER_GROUP_DIALOG_ID','primary','Existing','sheets-pivot-ui.dateGroup.year','_sidebarService','size','onPointerDown','1,235)','lineCap','realContain','sheets-pivot-ui.config.layoutOutline','createContext','21.9067','sheets-pivot-ui.showValuesAs.baseItem','sheets-pivot-ui.manualGroup.defaultName','@univerjs-pro/license','appendChild','pivot-value-filter-clear','redos','univer-flex\x20univer-items-center\x20univer-justify-between','get','sheets-pivot-ui.sumName','165qQNscT','MAIN_AREA','univer-size-8','univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-gap-3\x20univer-text-sm','23:59:59','New','MoreHorizontalIcon','target','\x22#,##0.00)','#ECECEC','droppableProps','show','elementFromPoint','selectedGroupId','UNIVER_SHEET_PIVOT_PANEL_ID','univer-cursor-pointer\x20univer-text-xs\x20univer-text-primary-600','univer-inline-flex\x20univer-flex-col\x20univer-rounded-lg\x20univer-border\x20univer-border-gray-200\x20univer-bg-gray-0\x20univer-p-2\x20univer-shadow-lg','react','univer-flex\x20univer-h-8\x20univer-w-[140px]\x20univer-flex-1\x20univer-cursor-pointer\x20univer-items-center\x20univer-justify-center\x20univer-rounded-l-md\x20univer-text-center\x20univer-text-sm\x20hover:univer-bg-gray-100\x20rtl:univer-rounded-l-none\x20rtl:univer-rounded-r-md\x20dark:hover:!univer-bg-gray-700','setControlExtensionDisable','_isRangeSelector2Focus','08-05\x20下午\x2001:30','univer-shrink-0','M2.27\x208L6.09\x2011.82L13.73\x204.18','sheets-pivot-ui.dateFilter.to','MM-dd\x20A/P\x20hh:mm','selection','strokeOpacity','RemovePivotTableCommand','sourceRangeInfo','blank','21.9404','dragover','fieldset','hours','fieldDataType','createElement','PivotTableValuePositionEnum','sheets-pivot-ui.dialog.numfmt.formatTypes','univer-mb-2\x20univer-text-sm\x20univer-font-medium','shouldClear','pivotConfigChange$','univer-flex\x20univer-flex-wrap\x20univer-items-center\x20univer-justify-between\x20univer-gap-2','_isRangeSelectorFocus','getPivotTableIdByCell','univer-w-full','permissionPointUpdate$','splice','debounceTime','_menuManagerService','_initBlockedPivotAlert','rangeInfo','dateOlderThanOrEqual','some','Row','sheets-pivot-ui.dateGroup.yearMonth','MM-dd','decimal','pageWrap','#,##0.00_);[Red]-#,##0.00','sheets-pivot-ui.dialog.numfmt.decimalPlaces','sheets-pivot-ui.valueFilter.greaterThanOrEqual','forValue','univer-h-full\x20univer-overflow-y-auto','grouping','sheets-pivot-ui.config.layoutTabular','dataTransfer','gray.50','FilterSelectionMode','_initMenu','displayName','getDateSystem','sheets-pivot-ui.showValuesAs.percentOfParent','useLayoutEffect','dateNewerThan','M12.2983\x2012.4011C12.2982\x2012.0697\x2012.5669\x2011.8009\x2012.8983\x2011.8009L29.3931\x2011.8009C29.7243\x2011.8009\x2029.9929\x2012.0694\x2029.9931\x2012.4007L29.9993\x2027.9129C29.9997\x2029.0178\x2029.1042\x2029.9137\x2027.9993\x2029.9137H12.9051C12.5738\x2029.9137\x2012.3053\x2029.6452\x2012.3051\x2029.314L12.2983\x2012.4011Z','sheets-pivot-ui.dateFilter.wholeDay','sheets-pivot-ui.config.rowSubtotalPosition','Tools','selectionMoveEnd$','getSheetCommandTarget','priority','univer-flex\x20univer-flex-col\x20univer-gap-2','sheets-pivot-ui.showValuesAs.rankDescending','sheets-pivot-ui.dialog.numfmt.','univer-w-[136px]','decorate','startWith','InputNumber','Month','getCurrentUnitOfType','univer-flex\x20univer-min-h-10\x20univer-items-center\x20univer-justify-between\x20univer-gap-3','sheets-pivot-ui.dialog.numfmt.confirm','sheets-pivot-ui.showValuesAs.percentOf','getPivotTableConfig','previous','merge','useEffect','validate','MoveRangeCommand','measure','sheet.pivot.context-menu.number-group','name','sheets-pivot-ui.averageName','RANGE_TYPE','#,##0.00_);[Red]#,##0.00','IconManager','sheets-pivot-ui.showValuesAs.percentOfGrandTotal','FilteredSortNone','_closePanel','_registerCommands','_moveStartCellIndex','_movePivotId','fetchThroughAsyncInterceptors','1.5.0','sheets-pivot-ui.showValuesAs.percentOfParentColumnTotal','univer-ml-1\x20univer-flex\x20univer-size-5\x20univer-cursor-pointer\x20univer-items-center\x20univer-justify-center\x20univer-rounded-md\x20univer-transition-opacity\x20hover:univer-bg-gray-200\x20rtl:univer-ml-0\x20rtl:univer-mr-1\x20dark:hover:!univer-bg-gray-700','valueGreaterThanOrEqual','fields','width','ISidebarService','_hovered','number','getRange','RibbonDataGroup','getPivotItemRenderInfoCache','getPivotTableCellData','AddPivotFieldCommand','pivotTableId','mode','has','univer-mb-2\x20univer-text-sm\x20univer-font-medium\x20univer-text-gray-900\x20dark:!univer-text-gray-0','MERGE_CELL_INTERCEPTOR_CHECK','univer-mt-2\x20univer-text-xs\x20univer-text-red-500','mapPivotSheetColumn','_targetRange','percentOf','subtle','blockExecuteWithoutPermission','_sheetsPivotTableAdaptorModel','onSteady','CANCEL','sheets-pivot-ui.valueFilter.cancel','drawNoSetting','stopPropagation','showRowGrandTotal','sheets-pivot-ui.valueFilter.valueField','rect','takeUntil','input','univer-overflow-hidden','offsetY','#274FEE','add','general','max','length','resolvePivotSheetCell','pbt','Value','sheets-pivot-ui.valueFilter.selectValueField','PIVOT_DATE_GROUP_TYPES','getCoordRelativeToViewport','sheets-pivot-ui.config.totalsSection','getOwnPropertyDescriptor','valueFields','conditionFilter','UniverLicensePlugin','univer-mb-5\x20univer-flex\x20univer-h-6\x20univer-cursor-pointer\x20univer-items-center\x20univer-text-base\x20univer-font-medium\x20univer-leading-6','isolateTextForBidiContext','floor','translate','univer-flex\x20univer-justify-between\x20univer-gap-3','ascending-icon','sheets-pivot-ui.addToValue','_sheetsSelectionsService','sheets-pivot-ui.msg.permissionError','sheets-pivot-ui.showValuesAs.percentDifferenceFrom','SetPivotCollapseCommand','sourceSheetName','sheets-pivot-ui.msg.invalidSize','pageOverThenDown','PivotDateGroupingMode','boolean','Day','sheets-pivot-ui.addToRow','toFixed','getCurrentRangeDisable$','transform','item-or-relative','UniverInstanceType','sheetName','compact','rtl','_permissionController','SHEET_PIVOT_MOVE_KEY','sheets-pivot-ui.config.showRowSubtotal','sheets-pivot-ui.moveToRow','reason','keys','moveToRow','sheets-pivot-ui.config.layoutCompact','hadStyleAttribute','endColumn','pivotTablePanelVisible$','parseFloat','buttonType','RemovePivotFieldCommand','_moveType','string','sheets-pivot-ui.dialog.numfmt.thousandthPercentileDesc','sheets-pivot-ui.mobile.columnDesc','0px','sheet.operation.ungroup-pivot-manual-group','univer-h-40\x20univer-flex-1\x20univer-overflow-y-auto\x20univer-rounded-lg','getDirection','univer-mb-3\x20univer-w-full','PivotDisplayDataType','positionRange','univer-text-center\x20univer-text-xs\x20univer-leading-4\x20univer-text-gray-600\x20dark:!univer-text-gray-200','SetPivotSortCommand','sheets-pivot-ui.stdDevpName','{0}','sheets-pivot-ui.mobile.moveToRow','pluginName','NORMAL','_mergeCellController','cloneNode','sheets-pivot-ui.config.dateGroupingLegacy','result','calendar-icon','WorksheetEditPermission','middle','registerRenderModule','sheets-pivot-ui.valueDesc','sheets-pivot-ui.dialog.format','ContextMenuPosition','col','baseFieldId','SetPivotExcelDateGroupCommand','subUnitId','isPivotDateGroupTypeDisabled','univer-box-border\x20univer-h-8','restore','getSheetId','members','sheets-pivot-ui.dateGroup.hour','parentFieldOnly','sheets-pivot-ui.config.dateGroupingMode','univer-flex\x20univer-min-h-12\x20univer-items-center\x20univer-px-2','sheet.operation.open-pivot-table-range-selector-panel','source-','UniverProLicense','command','M8.01375\x2013.0622L9.82677\x2014.8752C10.0611\x2015.1095\x2010.441\x2015.1095\x2010.6753\x2014.8752C10.9096\x2014.6409\x2010.9096\x2014.261\x2010.6753\x2014.0267L9.60391\x2012.9553L12.5981\x2012.9537C14.0335\x2012.953\x2015.1968\x2011.7891\x2015.1968\x2010.3537V7.70108C15.1968\x207.3697\x2014.9281\x207.10108\x2014.5968\x207.10108C14.2654\x207.10108\x2013.9968\x207.3697\x2013.9968\x207.70108V10.3537C13.9968\x2011.1266\x2013.3704\x2011.7533\x2012.5975\x2011.7537L9.60349\x2011.7553L10.6753\x2010.6835C10.9096\x2010.4492\x2010.9096\x2010.0693\x2010.6753\x209.83495C10.441\x209.60063\x2010.0611\x209.60063\x209.82677\x209.83495L8.01375\x2011.648C7.62322\x2012.0385\x207.62322\x2012.6717\x208.01375\x2013.0622Z','sheets-pivot-ui.perform.blockedByPivot','Subtotal','dataset','SheetsPivotRPCService','RangeProtectionPermissionViewPoint','baseVal','defs','univer-h-5\x20univer-text-sm\x20univer-text-red-400','1129485ykLbDZ','dataFieldId','mouse','M13.5\x208H2.5M7.5\x203L2.5\x208L7.5\x2013','parse','pivotTableIds','getSheetObject','offsetX','sheets-pivot-ui.showValuesAs.percentOfColumnTotal','_cellAlerts','getUnitId','700RLGCJv','\x22#,##0.00_);[Red]-\x22','body','text/plain','M1.4082\x203.74922C1.4082\x204.63288\x202.12455\x205.34922\x203.0082\x205.34922H4.2082C5.09186\x205.34922\x205.8082\x204.63287\x205.8082\x203.74922V2.54922C5.8082\x201.66556\x205.09186\x200.949219\x204.2082\x200.949219H3.0082C2.12455\x200.949219\x201.4082\x201.66556\x201.4082\x202.54922V3.74922ZM3.0082\x204.14922C2.78729\x204.14922\x202.6082\x203.97013\x202.6082\x203.74922V2.54922C2.6082\x202.32831\x202.78729\x202.14922\x203.0082\x202.14922H4.2082C4.42912\x202.14922\x204.6082\x202.32831\x204.6082\x202.54922V3.74922C4.6082\x203.97013\x204.42912\x204.14922\x204.2082\x204.14922L3.0082\x204.14922Z','set','univer-mb-1\x20univer-mt-0\x20univer-text-sm\x20univer-font-medium\x20univer-leading-5\x20univer-text-gray-900\x20dark:!univer-text-gray-0','lineWidth','getCurrentLastSelection','Filter','_buttonShapes','univer-min-w-0\x20univer-flex-1','POINTER','sheets-pivot-ui.dateGroup.start','sheets-pivot-ui.addToFilter','0.95','sheets-pivot-ui.dialog.filter.cancel','Input','M2\x2012.3661C2\x2012.0347\x202.26863\x2011.7661\x202.6\x2011.7661H9.24705C9.57842\x2011.7661\x209.84705\x2012.0347\x209.84705\x2012.3661V29.278C9.84705\x2029.6093\x209.57842\x2029.878\x209.24705\x2029.878H4C2.89543\x2029.878\x202\x2028.9825\x202\x2027.878V12.3661Z','Module','M5.51638\x202.58693C5.23363\x201.81542\x204.14248\x201.81543\x203.85973\x202.58693L2.13245\x207.29995C2.03185\x207.57443\x202.17281\x207.87849\x202.4473\x207.97909C2.72178\x208.07969\x203.02584\x207.93872\x203.12644\x207.66424L3.64346\x206.25351L3.64504\x206.25351H5.73266L6.24968\x207.66424C6.35027\x207.93872\x206.65433\x208.07969\x206.92882\x207.97909C7.2033\x207.87849\x207.34426\x207.57443\x207.24367\x207.29995L5.51638\x202.58693ZM5.34467\x205.19487L4.68806\x203.40325L4.03144\x205.19487H5.34467Z','getSubUnitPivotConfigs','CustomFilter','InitializePivotRuntimeLocalMutation','M3.30363\x203C2.79117\x203\x202.51457\x203.60097\x202.84788\x203.99024L6.8\x208.60593V12.5662C6.8\x2012.7184\x206.8864\x2012.8575\x207.02289\x2012.9249L8.76717\x2013.7863C8.96655\x2013.8847\x209.2\x2013.7396\x209.2\x2013.5173V8.60593L13.1521\x203.99024C13.4854\x203.60097\x2013.2088\x203\x2012.6964\x203H3.30363Z','SetPivotDateFilterCommand','columnFields','list','generateSetRangeValueMutations','error','interceptBeforeCommand','ThemeService','MergeCellController','sheets-pivot-ui.showValuesAs.ok','pivotParams','univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-gap-3','arrow-left-icon','univer-flex\x20univer-flex-row\x20univer-gap-4','MenuItemType','useId','sheet-pivot.confirm.add-sheet-pivot','sheets-pivot-ui.manualGroup.groupTitle','_initContextMenu','PivotTableIcon','univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-sm','targetFieldId','_UI_PLUGIN','cellToRange','univer-mx-1.5\x20univer-my-0\x20univer-h-4\x20univer-text-xs\x20univer-text-gray-200\x20dark:!univer-text-gray-600','originalFieldId','sheets-pivot-ui.dateGroup.groupBy','M12.2637\x202.6863C12.2637\x202.35493\x2012.5323\x202.0863\x2012.8637\x202.0863H27.9702C29.0748\x202.0863\x2029.9702\x202.98173\x2029.9702\x204.0863V8.73627C29.9702\x209.06764\x2029.7016\x209.33627\x2029.3702\x209.33627H12.8637C12.5323\x209.33627\x2012.2637\x209.06764\x2012.2637\x208.73627L12.2637\x202.6863Z','IRenderManagerService','exec','packageName','univer-box-border\x20univer-h-[161px]\x20univer-w-full\x20univer-flex-col\x20univer-items-center\x20univer-justify-center\x20univer-overflow-x-hidden\x20univer-rounded-lg\x20univer-bg-gray-50\x20univer-py-2\x20dark:!univer-bg-gray-900','Radio','sheets-pivot-ui.filter','univer-mb-2','join','getBoundingClientRect','sheet.numfmt.thousandthPercentile','univer-truncate\x20univer-text-xs\x20univer-text-gray-500','sheets-pivot-ui.perform.info','effectAllowed','All','itemType','type','sheets-pivot-ui.dialog.source.intersect','getCellIndexByOffset','univer-text-xs','sheet.operation.open-pivot-table-filter-panel','univer-mb-1\x20univer-box-border\x20univer-h-7\x20univer-py-[5px]\x20univer-pl-[22px]\x20univer-pr-1\x20univer-text-sm\x20rtl:univer-pl-1\x20rtl:univer-pr-[22px]','univer-text-primary-600','FilterNoneSortAsc','bdi','_initRowColOperationCheck','_pivotSelectionMoveShape','dateNotEqual','valueNotEqual','univer-truncate','isArray','getPropertyValue','fractionalSecond','Provider','useCallback','sheets-pivot-ui.dateFilter.notBetween','React','lower','sheets-pivot-ui.sheet','@univerjs/sheets-formula-ui','[data-univer-dnd-droppable-id]','groups','path','ICommandService','excelLike','LocaleService','isPivotDateFilter','DescendingIcon','greaterThanOrEqual','GripVerticalIcon','getColorFromTheme','univer-flex\x20univer-justify-end\x20univer-gap-3','stdDevp','percentOfRowTotal','univer-mt-2\x20univer-h-5\x20univer-text-xs\x20univer-text-red-400','sheets-pivot-ui.valueFilter.lessThan','univer-grid\x20univer-grid-cols-2\x20univer-gap-2','row','onPointerEnter$','DatePicker','sheets-pivot-ui.dialog.numfmt.accounting','removeObject','PivotSubtotalPositionEnum','BLANK_PLACEHOLDER','currency','borderClassName','makeDirty','_iconManager','sheets-pivot-ui.dateGroup.monthDate','sheets-pivot-ui.subtotal.min','SetPivotLayoutCommand','isSingleCellSelection','sheets-pivot-ui.dialog.numfmt.currencyTypes','sheets-pivot-ui.config.repeatRowLabels','percent','univer-mt-4','search-icon','getStyles','dimension','preventDefault','fieldIds','sheets-pivot-ui.mobile.filterDesc','sheets-pivot-ui.multipleValue','RadioGroup','varp','sheets-pivot-ui.config.filteringSection','column-icon','menu','sheets-pivot-ui.valueFilter.between','PivotMultipleValueId','height','drawWith','seconds','InsertTextCommand','sheetDisposed$','sheets-pivot-ui.valueFilter.equal','UNIVER_SHEET_PIVOT_EXCEL_DATE_GROUP_DIALOG_ID','sheets-pivot-ui.manualGroup.ungroupTitle','clsx','localName','supportsDateFilter','sheets-pivot-ui.dialog.numfmt.general','PivotTableFiledAreaEnum','drawIconByPath','[sheets-pivot-ui]:\x20Pivot\x20render\x20cache\x20is\x20unavailable','isTopTotal','showRowSubtotal','sheets-pivot-ui.config.dateGroupingSwitchTitle','sheets-pivot-ui.varName','sheets-pivot-ui.dialog.numfmt.currency','tap','_selectionControl','sheets-pivot-ui.config.repeatColLabels','getSubUnitPivotRenderCache','sheets-pivot-ui.dateGroup.excelLikeTitle','sheet.pivot.context-menu.date-group.','sheets-pivot-ui.valueFilter.clear','M5\x206.5L8\x209.5L11\x206.5','univer-mb-4\x20univer-flex\x20univer-min-h-0\x20univer-flex-1\x20univer-flex-col','small','UNIVER_SHEET_PIVOT_FIELD_SETTING','startsWith','NotFilter','slice','PivotDataFieldSortOperatorEnum','lessThan','sheets-pivot-ui.productName','SetPivotDateGroupCommand','getInterceptPoints','zIndex','_pivotTablePanelVisible$','@univerjs-pro/sheets-pivot','percentOfGrandTotal','sheets-pivot-ui.dialog.numfmt.generalDesc','sheets-pivot-ui.dateGroup.date','SheetsPivotTableService','forwardRef','itemLabels','options','sheets-pivot-ui.mobile.moveToFilter','pivot-field-areas','onCommandExecuted','symbol','resolvePivotValueFilterTarget','sheets-pivot-ui.valueFilter.topCount','setPointerCapture','M5.5165\x202.58693C5.23375\x201.81542\x204.1426\x201.81543\x203.85985\x202.58693L2.13257\x207.29995C2.03197\x207.57443\x202.17294\x207.8785\x202.44742\x207.97909C2.7219\x208.07969\x203.02596\x207.93872\x203.12656\x207.66424L3.64358\x206.25351L3.64516\x206.25351H5.73278L6.2498\x207.66424C6.35039\x207.93872\x206.65446\x208.07969\x206.92894\x207.97909C7.20342\x207.8785\x207.34438\x207.57443\x207.24379\x207.29995L5.5165\x202.58693ZM5.34479\x205.19487L4.68818\x203.40325L4.03156\x205.19487H5.34479Z','0\x200\x2016\x2016','ALL','NumberGroupDefaults','idSuffix','[PivotConfigPanel]','@univerjs/engine-render','univer-mb-1\x20univer-box-border\x20univer-h-7\x20univer-py-1\x20univer-pl-[22px]\x20univer-pr-1\x20univer-text-sm\x20rtl:univer-pl-1\x20rtl:univer-pr-[22px]','sheets-pivot-ui.msg.emptySourceRange','Select','_injector','valueGreaterThan','pointerId','hasPivotMultipleFilters','tableFieldId','currentTarget','year','395082EtGcze','M5\x201.5V4.5M11\x201.5V4.5M1.8\x206.2H14.2M4.2\x209.2H6.2M9.8\x209.2H11.8M4.2\x2011.8H6.2M9.8\x2011.8H11.8','_themeService','1.13965','valueLessThanOrEqual','moveUp','generateMutationsByRanges','_univerInstanceService','sheets-pivot-ui.msg.editCellError','GlobalConfig','univer-mt-2\x20univer-w-full','sheets-pivot-ui.dateFilter.after','sheets-pivot-ui.dateGroup.month','sheet.pivot.context-menu.manual-ungroup','notEqual','Column','rowRanges','UNIVER_SHEET_PIVOT_MANUAL_GROUP_DIALOG_ID','_localeService','showColGrandTotal','svg','getUnit','ISheetClipboardService','DEFAULT','sheets-pivot-ui.config.pageWrap','colRanges','univer-rounded-xl\x20univer-bg-gray-50\x20univer-p-1\x20dark:!univer-bg-gray-800','ascending','getSelectionControls','378ActIXu','MobileDropdownMenu','pointercancel','operator','config','rangeType','sheets-pivot-ui.dateGroup.yearQuarter','sheets-pivot-ui.perform.confirm','43464gsLDmj','M12.2982\x2012.4011C12.2981\x2012.0697\x2012.5667\x2011.8009\x2012.8982\x2011.8009L29.3929\x2011.8009C29.7242\x2011.8009\x2029.9928\x2012.0694\x2029.9929\x2012.4007L29.9992\x2027.9129C29.9996\x2029.0178\x2029.104\x2029.9137\x2027.9992\x2029.9137H12.905C12.5737\x2029.9137\x2012.3051\x2029.6452\x2012.305\x2029.314L12.2982\x2012.4011Z','_config','more-down-icon','onPointerUp$','querySelectorAll','univer-text-sm','skip','layout','InsertRowCommand','observe','M2.69792\x2010.0113C2.40558\x2010.0113\x202.16859\x209.77429\x202.16859\x209.48196C2.16859\x209.18962\x202.40558\x208.95264\x202.69792\x208.95264H6.67816C6.89225\x208.95264\x207.08526\x209.0816\x207.16719\x209.2794C7.24912\x209.47719\x207.20384\x209.70486\x207.05245\x209.85624L3.97581\x2012.9329H6.67816C6.9705\x2012.9329\x207.20749\x2013.1699\x207.20749\x2013.4622C7.20749\x2013.7545\x206.9705\x2013.9915\x206.67816\x2013.9915H2.69792C2.48383\x2013.9915\x202.29082\x2013.8626\x202.20889\x2013.6648C2.12696\x2013.467\x202.17224\x2013.2393\x202.32363\x2013.0879L5.40027\x2010.0113H2.69792Z','FromArray','interceptor','_controlMoving','setProperty','SheetsPivotTableAdaptorModel','sheet.numfmt.general','RecordValueType','var','0\x200\x2032\x2032','M12.8325\x203.00753L12.2725\x202.44328C11.9909\x202.15966\x2011.6076\x201.9999\x2011.2079\x201.9999H4.08689C3.55342\x201.9999\x203.28522\x202.64412\x203.66105\x203.02295L7.78136\x207.17471C8.25623\x207.65323\x208.25623\x208.43812\x207.78136\x208.91664L3.66105\x2013.0684C3.28522\x2013.4473\x203.55342\x2014.0915\x204.08689\x2014.0915H11.2079C11.6076\x2014.0915\x2011.9909\x2013.9317\x2012.2725\x2013.648L12.8325\x2013.0838','droppableId','SheetPrintInterceptorService','(1,235)','univer-flex\x20univer-cursor-pointer\x20univer-items-center\x20univer-self-stretch\x20univer-px-2\x20univer-py-1.5\x20univer-text-sm\x20univer-leading-5\x20univer-text-gray-900\x20hover:univer-bg-gray-100\x20dark:!univer-text-gray-0\x20dark:hover:!univer-bg-gray-700','textGroupField','more-horizontal-icon','startColumn','UniverProEnginePivot','sheets-pivot-ui.config.pageDownThenOver','jsxs','Injector','sheets-pivot-ui.config.pageWrapDownThenOverHelp','call','current','_adaptorModel','UNIVER_SHEET_PIVOT_VALUE_FILTER_DIALOG','sheets-pivot-ui.config.showRowGrandTotal','sum','SelectList','setTimeout','upper','hasAttribute','-9999px','sheets-pivot-ui.moveToColumn','subscribeEvent','PivotLayoutTypeEnum','sheets-pivot-ui.dateFilter.beforeOrEqual','strokeWidth','Expand','_getPivotAppliedRanges','sheets-pivot-ui.row','sheets-pivot-ui.valueFilter.ok','isBottom','UniverSheetsFormulaUi','dateBetween','span','_sheetsPivotTableService','_sheetsRenderService','startX','menuPosition','toDisposable','setIsRangeSelector2Focus','ManualFilter','MobileRangeSelector','sheets-pivot-ui.manualGroup.name','_controlPointerDownHandler','Collapse','_scenePointerUpSubscribe','_setPivotTableId','function-icon','sheet.numfmt.currency','getAncestorScale','units','fill','repeatColLabels','closePath','forEach','M9.74932\x204.98481L9.74934\x203.18484C9.74936\x202.24595\x2010.5105\x201.48484\x2011.4494\x201.48486L13.2493\x201.48491C14.1882\x201.48494\x2014.9493\x202.24604\x2014.9493\x203.18491V4.98483C14.9493\x205.92372\x2014.1882\x206.68483\x2013.2493\x206.68483H11.4493C10.5104\x206.68483\x209.7493\x205.9237\x209.74932\x204.98481ZM10.9493\x203.18486L10.9493\x204.98483C10.9493\x205.26097\x2011.1732\x205.48483\x2011.4493\x205.48483H13.2493C13.5254\x205.48483\x2013.7493\x205.26098\x2013.7493\x204.98483V3.18491C13.7493\x202.90877\x2013.5254\x202.68492\x2013.2493\x202.68491L11.4494\x202.68486C11.1732\x202.68486\x2010.9493\x202.90871\x2010.9493\x203.18486Z','sheets-pivot-ui.subtotal.varp','#D8D8D8','sheets-pivot-ui.dialog.filter.clearFilter','rankAscending','sheets-pivot-ui.config','univer-flex\x20univer-h-8\x20univer-w-[140px]\x20univer-flex-1\x20univer-cursor-pointer\x20univer-items-center\x20univer-justify-center\x20univer-rounded-r-md\x20univer-text-center\x20univer-text-sm\x20hover:univer-bg-gray-100\x20rtl:univer-rounded-l-md\x20rtl:univer-rounded-r-none\x20dark:hover:!univer-bg-gray-700','beginPath','setDragImage','_updatePivotSort','IFormatPainterService','removeEventListener','PivotExcelDateGroupUnit','vertical','sheets-pivot-ui.showValuesAs.other','link','univer-flex\x20univer-cursor-pointer\x20univer-items-center\x20univer-self-stretch\x20univer-px-2\x20univer-py-1.5\x20univer-text-sm\x20univer-leading-5\x20univer-text-gray-900\x20dark:!univer-text-gray-0','addEventListener','onStarting','UniverSheetsPivotTablePlugin','sheets-pivot-ui.addToColumn','position','sheets-pivot-ui.mobile.moveToColumn','UniverRenderEnginePlugin','sheets-pivot-ui.maxName','CellAlertType','http://www.w3.org/2000/svg','univer-flex\x20univer-items-center\x20univer-gap-1\x20univer-self-stretch\x20univer-border\x20univer-border-transparent\x20univer-p-0.5\x20univer-leading-4\x20hover:univer-bg-gray-100\x20dark:hover:!univer-bg-gray-700','M11.9003\x2013.7046C11.9003\x2013.9969\x2011.6633\x2014.2339\x2011.371\x2014.2339C11.0787\x2014.2339\x2010.8417\x2013.9969\x2010.8417\x2013.7046V3.57272L9.74577\x204.66862C9.53906\x204.87534\x209.20391\x204.87534\x208.9972\x204.66862C8.79048\x204.46191\x208.79048\x204.12676\x208.9972\x203.92005L10.9969\x201.92039C11.2036\x201.71368\x2011.5387\x201.71368\x2011.7454\x201.92039L13.7451\x203.92005C13.9518\x204.12676\x2013.9518\x204.46191\x2013.7451\x204.66862C13.5384\x204.87534\x2013.2032\x204.87534\x2012.9965\x204.66862L11.9003\x203.57243V13.7046Z','field','color','label','px,\x20','@univerjs/design','useImperativeHandle','univer-mb-2\x20univer-flex\x20univer-h-5\x20univer-justify-between\x20univer-text-sm\x20univer-leading-5','day','confirm','univer-flex\x20univer-items-center\x20univer-gap-1.5\x20univer-self-stretch\x20univer-rounded-md\x20univer-px-2\x20univer-py-1.5\x20univer-text-sm\x20univer-capitalize\x20univer-leading-5','univer-mb-2\x20univer-mt-5\x20univer-h-5\x20univer-text-sm\x20univer-font-medium','jsx','pivot-value-filter-value-field','sheets-pivot-ui.perform.blockedByMerge','getCollection','sheets-pivot-ui.dialog.source.insertPivotTable','dispose','univer-w-40','sheets-pivot-ui.dialog.filter.ascending','setConfig','M12.4008\x202.81641C12.6907\x202.81641\x2012.9258\x203.05146\x2012.9258\x203.34141V11.3908L14.013\x2010.3036C14.218\x2010.0986\x2014.5505\x2010.0986\x2014.7555\x2010.3036C14.9605\x2010.5086\x2014.9605\x2010.841\x2014.7555\x2011.046L12.7721\x2013.0294C12.5671\x2013.2344\x2012.2347\x2013.2344\x2012.0297\x2013.0294L10.0463\x2011.046C9.84132\x2010.841\x209.84132\x2010.5086\x2010.0463\x2010.3036C10.2514\x2010.0986\x2010.5838\x2010.0986\x2010.7888\x2010.3036L11.8758\x2011.3905V3.34141C11.8758\x203.05146\x2012.1108\x202.81641\x2012.4008\x202.81641Z','DependentOn','M8.04163\x206.24451L8.0418\x206.25869L8.04163\x206.27285L8.04173\x2010.4233L8.0418\x2010.4325L8.04173\x2010.4417L8.0418\x2013.5069C8.04182\x2014.4458\x207.2807\x2015.2069\x206.3418\x2015.2069H4.54183C3.60294\x2015.2069\x202.84182\x2014.4458\x202.84183\x2013.5069L2.84184\x2010.4397L2.8418\x2010.4325L2.84184\x2010.4253L2.84186\x206.26726L2.8418\x206.25869L2.84186\x206.25011L2.84187\x203.18486C2.84187\x202.24596\x203.60301\x201.48484\x204.54191\x201.48486L6.3416\x201.48491C7.28046\x201.48493\x208.04154\x202.24602\x208.04156\x203.18487L8.04163\x206.24451ZM6.8418\x2013.5069L6.84174\x2011.0325H4.04184L4.04183\x2013.5069C4.04183\x2013.783\x204.26568\x2014.0069\x204.54183\x2014.0069H6.3418C6.61794\x2014.0069\x206.8418\x2013.783\x206.8418\x2013.5069ZM6.84171\x209.83252H4.04184L4.04185\x206.85869H6.84165L6.84171\x209.83252ZM6.84162\x205.65869H4.04186L4.04187\x203.18486C4.04187\x202.90871\x204.26574\x202.68486\x204.54188\x202.68486L6.34158\x202.68491C6.61771\x202.68491\x206.84156\x202.90876\x206.84156\x203.1849L6.84162\x205.65869Z','fieldsConfig','sheets-pivot-ui.dialog.summarizeBy','sheets-pivot-ui.showValuesAs.runningTotal','univer-rounded-lg\x20univer-p-2','sheets-pivot-ui.dateGroup.autoEnd','moveTo','react/jsx-runtime','PivotDataFieldTypeEnum','showColSubtotal','UniverSheetsPlugin','setShapeProps','showDataAs','stringify','PIVOT_PERFORM_CHECK','sheets-pivot-ui.config.dateGroupingExcelLike','UniverCore','PivotFilterPanel','rename','sheets-pivot-ui.dialog.fieldName','M3\x209C3.55228\x209\x204\x208.55228\x204\x208C4\x207.44772\x203.55228\x207\x203\x207C2.44772\x207\x202\x207.44772\x202\x208C2\x208.55228\x202.44772\x209\x203\x209Z','univer-mt-1.5\x20univer-text-sm\x20univer-leading-5\x20univer-text-gray-600\x20dark:!univer-text-gray-200','getName','UNIVER_SHEET_PIVOT_PANEL','UNIVER_SHEET_PIVOT_SHOW_DATA_AS_DIALOG_ID','_cellHeight','padStart','sheets-pivot-ui.dialog.filter.descending','intercept','asyncInterceptor','sheets-pivot-ui.numberGroup.title','_sheetsPivotTableConfigModel','WorksheetViewPermission','sheets-pivot-ui.mobile.moveUp','UNIVER_SHEET_PIVOT_FIELD_NUMFMT_ID','sheets-pivot-ui.dialog.numfmt.thousandthPercentile','setIsRangeSelectorFocus','_permissionService','numfmt','valueLessThan','reCalculate','univer-max-h-[40vh]\x20univer-overflow-y-auto\x20univer-rounded-xl\x20univer-bg-gray-50\x20univer-p-1\x20dark:!univer-bg-gray-800','\x22#,##0.00_);[Red]\x22','group','univer-w-32','ΣValue','currentSkeleton$','ORGANIZATION','getActiveSheet','addHook','32yLQYqX','SHEET_PIVOT_BLOCKED:','includes','univer-w-36','innerRef','valueBetween','text','univer-mx-0\x20univer-mb-4\x20univer-mt-3\x20univer-h-[300px]\x20univer-rounded-lg\x20univer-p-2','sheets-pivot-ui.dialog.ok','scale','url(#$1','count','univer-text-sm\x20univer-font-medium','getConfig','univer-flex\x20univer-min-w-0\x20univer-flex-col\x20univer-gap-3','format','_cellWidth','RangeProtectionPermissionEditPoint','@univerjs/engine-formula','settings','SUBITEMS','sheets-pivot-ui.showValuesAs.percentOfParentRowTotal','column','removeProperty','left'];_0x4e7b=function(){return _0x76d11a;};return _0x4e7b();}function _0x5115(_0x42e4e8,_0x5c3918){_0x42e4e8=_0x42e4e8-0x12b;const _0x4e7b68=_0x4e7b();let _0x511500=_0x4e7b68[_0x42e4e8];return _0x511500;}(function(_0x954838,_0x1a656e){const _0x7f6358=_0x5115,_0x289516=_0x954838();while(!![]){try{const _0x588c4f=parseInt(_0x7f6358(0x2b2))/0x1+-parseInt(_0x7f6358(0x1d7))/0x2+-parseInt(_0x7f6358(0x33b))/0x3*(-parseInt(_0x7f6358(0x548))/0x4)+parseInt(_0x7f6358(0x442))/0x5+parseInt(_0x7f6358(0x280))/0x6*(parseInt(_0x7f6358(0x540))/0x7)+-parseInt(_0x7f6358(0x5fc))/0x8*(parseInt(_0x7f6358(0x523))/0x9)+parseInt(_0x7f6358(0x44d))/0xa*(parseInt(_0x7f6358(0x13c))/0xb);if(_0x588c4f===_0x1a656e)break;else _0x289516['push'](_0x289516['shift']());}catch(_0x1a9df5){_0x289516['push'](_0x289516['shift']());}}}(_0x4e7b,0xc3623),function(_0x3c3320,_0x338135){const _0x15ce2e=_0x5115;typeof exports==_0x15ce2e(0x68c)&&typeof module<'u'?_0x338135(exports,require('@univerjs-pro/engine-pivot'),require('@univerjs-pro/sheets-pivot'),require('@univerjs/core'),require('@univerjs/sheets'),require('@univerjs/ui'),require('@univerjs/sheets-ui'),require('rxjs'),require('@univerjs/design'),require('@univerjs-pro/license'),require('@univerjs/engine-render'),require('react'),require('react/jsx-runtime'),require('@univerjs/engine-formula'),require('@univerjs/sheets-formula-ui'),require('@univerjs/docs'),require('@univerjs/docs-ui')):typeof define==_0x15ce2e(0x663)&&define[_0x15ce2e(0x156)]?define([_0x15ce2e(0x191),_0x15ce2e(0x1d2),_0x15ce2e(0x503),_0x15ce2e(0x667),_0x15ce2e(0x6bd),'@univerjs/ui','@univerjs/sheets-ui',_0x15ce2e(0x6af),_0x15ce2e(0x5b8),_0x15ce2e(0x334),_0x15ce2e(0x518),_0x15ce2e(0x34c),_0x15ce2e(0x5d1),_0x15ce2e(0x60e),_0x15ce2e(0x4a7),'@univerjs/docs',_0x15ce2e(0x2f9)],_0x338135):(_0x3c3320=typeof globalThis<'u'?globalThis:_0x3c3320||self,_0x338135(_0x3c3320[_0x15ce2e(0x6b4)]={},_0x3c3320[_0x15ce2e(0x565)],_0x3c3320['UniverProSheetsPivot'],_0x3c3320[_0x15ce2e(0x5da)],_0x3c3320['UniverSheets'],_0x3c3320[_0x15ce2e(0x6d6)],_0x3c3320['UniverSheetsUi'],_0x3c3320[_0x15ce2e(0x6af)],_0x3c3320[_0x15ce2e(0x683)],_0x3c3320[_0x15ce2e(0x437)],_0x3c3320[_0x15ce2e(0x23c)],_0x3c3320[_0x15ce2e(0x4a4)],_0x3c3320[_0x15ce2e(0x4a4)],_0x3c3320[_0x15ce2e(0x671)],_0x3c3320[_0x15ce2e(0x57f)],_0x3c3320['UniverDocs'],_0x3c3320['UniverDocsUi']));}(this,function(_0x125c1f,_0x55c699,_0x5ec675,_0x1ed97c,_0x44d557,_0x2ef21f,_0x21977c,_0x3ae495,_0x3fc00c,_0x2e1acb,_0x4134a1,_0x2b3aa2,_0x282aef,_0x43497d,_0x1e2b01,_0xc948cf,_0x157223){const _0x34037b=_0x5115;Object['defineProperty'](_0x125c1f,Symbol['toStringTag'],{'value':_0x34037b(0x460)});let _0x4a650f=_0x34037b(0x5e1),_0x414c39=_0x34037b(0x349),_0x32bf4e='UNIVER_SHEET_PIVOT_FILTER_PANEL',_0x24e684=_0x34037b(0x296),_0xce0285=_0x34037b(0x4f8),_0x178877='UNIVER_SHEET_PIVOT_FIELD_SETTING_ID',_0x3ff5dc=_0x34037b(0x631),_0x4442ad=_0x34037b(0x5ec),_0x2ac0fe=_0x34037b(0x192),_0x594d0c=_0x34037b(0x56d),_0x88d50d=_0x34037b(0x1bf),_0x337ca9=_0x34037b(0x319),_0x195935='UNIVER_SHEET_PIVOT_MANUAL_GROUP_DIALOG',_0x34436c='univer.sheet.pivot-table-range-selector',_0x57dcf9='UNIVER_SHEET_PIVOT_MOBILE_ACTION_PANEL',_0x3ca145=_0x34037b(0x302),_0x288ca1={'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'id':_0x34037b(0x435),async 'handler'(_0x31039b){const _0x17f011=_0x34037b;let _0x3e2c02=_0x31039b[_0x17f011(0x339)](_0x1ed97c[_0x17f011(0x61a)]),_0x13eb20=_0x31039b['get'](_0x1ed97c['ICommandService']),_0x191733=(0x0,_0x44d557['getSheetCommandTarget'])(_0x3e2c02),_0x3f84f2=_0x31039b['get'](_0x1ed97c['LocaleService']);if(!_0x191733)return!0x1;let {unitId:_0x4f0f4e,subUnitId:_0xc16010,worksheet:_0x39b15f,workbook:_0x56bbb8}=_0x191733,_0x4368b7=_0x31039b[_0x17f011(0x339)](_0x44d557[_0x17f011(0x198)])[_0x17f011(0x455)](),_0x5aecce=(_0x4368b7==null?void 0x0:_0x4368b7[_0x17f011(0x22d)])??{'startRow':0x0,'endRow':0x0,'startColumn':0x0,'endColumn':0x0,'rangeType':_0x1ed97c['RANGE_TYPE'][_0x17f011(0x41c)]},_0x2b50cc=await _0x38641a(_0x31039b,_0x4f0f4e,_0xc16010,(0x0,_0x44d557[_0x17f011(0x4c7)])(_0x4368b7)?(0x0,_0x44d557[_0x17f011(0x6ce)])(_0x5aecce,{'up':!0x0,'left':!0x0,'right':!0x0,'down':!0x0},_0x39b15f):_0x5aecce,_0x39b15f['getName']());if(!_0x2b50cc)return!0x1;let _0x14e5b3=_0x56bbb8[_0x17f011(0x682)]()[_0x17f011(0x242)](_0xea5aa4=>_0xea5aa4[_0x17f011(0x5e0)]()===_0x2b50cc[_0x17f011(0x3ee)]);if(!_0x14e5b3)return!0x1;let _0x1f0b3f;if(_0x2b50cc[_0x17f011(0x133)]===_0x5ec675[_0x17f011(0x666)]['New'])_0x1f0b3f={'row':0x0,'col':0x0,'unitId':_0x4f0f4e,'subUnitId':(0x0,_0x1ed97c[_0x17f011(0x308)])(),'sheetName':_0x56bbb8['generateNewSheetName'](''+_0x3f84f2['t'](_0x17f011(0x4a6)))};else{if(!_0x2b50cc[_0x17f011(0x415)]||!_0x2b50cc[_0x17f011(0x6ae)])return!0x1;let _0x16a12a=_0x56bbb8[_0x17f011(0x682)]()[_0x17f011(0x242)](_0x2cac88=>_0x2cac88['getName']()===_0x2b50cc[_0x17f011(0x6ae)]);if(!_0x16a12a)return!0x1;_0x1f0b3f={'row':_0x2b50cc[_0x17f011(0x415)][_0x17f011(0x6dd)],'col':_0x2b50cc[_0x17f011(0x415)][_0x17f011(0x564)],'unitId':_0x4f0f4e,'subUnitId':_0x16a12a[_0x17f011(0x42f)](),'sheetName':_0x16a12a[_0x17f011(0x5e0)]()};}let _0x47c963=(0x0,_0x55c699[_0x17f011(0x21d)])(0x8);return await _0x13eb20['executeCommand'](_0x5ec675['AddPivotTableCommand']['id'],{'pivotTableId':_0x47c963,'pivotTableConfig':{'targetCellInfo':_0x1f0b3f,'sourceRangeInfo':{'range':_0x2b50cc[_0x17f011(0x31c)],'unitId':_0x4f0f4e,'sheetName':_0x2b50cc[_0x17f011(0x3ee)],'subUnitId':_0x14e5b3[_0x17f011(0x42f)]()}},'positionType':_0x2b50cc['positionType']})?{'unitId':_0x1f0b3f[_0x17f011(0x6bb)],'subUnitId':_0x1f0b3f['subUnitId'],'pivotTableId':_0x47c963}:!0x1;}};async function _0x38641a(_0x33f4bd,_0x2b0177,_0x1120cf,_0x1837f3,_0x3341fb){const _0x312f65=_0x34037b;let _0x4229d6=_0x33f4bd['get'](_0x2ef21f[_0x312f65(0x2e3)]),_0x397a2d=_0x33f4bd['get'](_0x1ed97c['LocaleService']);return new Promise(_0x46b669=>{const _0x427369=_0x312f65;let _0x1724f7,_0x4fc19a={'unitId':_0x2b0177,'subUnitId':_0x1120cf,'sourceRange':_0x1837f3,'positionRange':null,'sourceSheetName':_0x3341fb,'positionSheetName':_0x3341fb,'onConfirm':_0x430ddd=>{const _0x123e93=_0x5115;_0x46b669(_0x430ddd),_0x1724f7==null||_0x1724f7[_0x123e93(0x5c4)]();},'onCancel':()=>{const _0x34715e=_0x5115;_0x46b669(null),_0x1724f7==null||_0x1724f7[_0x34715e(0x5c4)]();}};_0x1724f7=_0x4229d6[_0x427369(0x245)]({'id':_0x34436c,'title':{'title':_0x397a2d['t'](_0x427369(0x5c3))},'draggable':!0x0,'mask':!0x1,'maskClosable':!0x1,'children':{'label':{'name':_0x34436c,'props':_0x4fc19a}},'width':0x190,'onClose':()=>{const _0x37c8ad=_0x427369;_0x1724f7[_0x37c8ad(0x5c4)]();}});});}let _0x1ccce8={'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'id':_0x34037b(0x1bb),async 'handler'(_0x489beb,_0x1cfc78){const _0x3d4408=_0x34037b;if(!_0x1cfc78)return!0x1;let _0xb3636b=_0x1b213f(_0x489beb);return _0xb3636b?_0x489beb[_0x3d4408(0x339)](_0x1ed97c[_0x3d4408(0x4ab)])['executeCommand'](_0x5ec675[_0x3d4408(0x4ff)]['id'],{'unitId':_0xb3636b[_0x3d4408(0x6bb)],'subUnitId':_0xb3636b[_0x3d4408(0x42b)],'pivotTableId':_0xb3636b[_0x3d4408(0x3bb)],'tableFieldId':_0xb3636b[_0x3d4408(0x520)],'dateType':_0x1cfc78[_0x3d4408(0x269)]}):!0x1;}};function _0x1b213f(_0x578528,_0x3c2fed=_0x55c699['PivotDateGroupingMode']['Legacy']){const _0xcf2497=_0x34037b;let _0x4f1151=_0x578528[_0xcf2497(0x339)](_0x1ed97c['IUniverInstanceService']),_0x10d119=(0x0,_0x44d557[_0xcf2497(0x38b)])(_0x4f1151);if(!_0x10d119)return;let _0xfb5e9d=_0x578528['get'](_0x44d557['SheetsSelectionsService'])['getCurrentLastSelection'](),_0x4b7daf=_0xfb5e9d==null?void 0x0:_0xfb5e9d['primary'];if(!_0x4b7daf)return;let {unitId:_0x127e6c,subUnitId:_0x3ccf78}=_0x10d119,_0x2fb2fa=_0x4b7daf[_0xcf2497(0x6dd)],_0x1e662e=_0x4b7daf[_0xcf2497(0x564)],_0x4a26e7=_0x578528['get'](_0x5ec675[_0xcf2497(0x558)])['getPivotTableIdByCell'](_0x127e6c,_0x3ccf78,_0x2fb2fa,_0x1e662e);if(!_0x4a26e7)return;let _0x124388=_0x5bab83(_0x578528,_0x127e6c,_0x3ccf78,_0x4a26e7,_0x2fb2fa,_0x1e662e);if(!_0x124388)return;let _0x41a449=_0x578528[_0xcf2497(0x339)](_0x5ec675['SheetsPivotTableConfigModel']),_0x2007ab=_0x41a449[_0xcf2497(0x399)](_0x127e6c,_0x3ccf78,_0x4a26e7);if((0x0,_0x55c699[_0xcf2497(0x1a6)])(_0x2007ab==null?void 0x0:_0x2007ab[_0xcf2497(0x5cb)][_0xcf2497(0x50a)])!==_0x3c2fed)return;let _0x49ff8e=_0x41a449[_0xcf2497(0x5c2)](_0x127e6c,_0x4a26e7),_0x31909a=(0x0,_0x5ec675[_0xcf2497(0x681)])(_0x2007ab==null?void 0x0:_0x2007ab[_0xcf2497(0x5cb)],_0x49ff8e,_0x124388);if(_0x31909a)return{'unitId':_0x127e6c,'subUnitId':_0x3ccf78,'pivotTableId':_0x4a26e7,'tableFieldId':_0x124388,'row':_0x2fb2fa,'col':_0x1e662e,'dateGroupContext':_0x31909a};}function _0x5bab83(_0x2abdd0,_0x33d173,_0x4fda22,_0x234ce5,_0x2b387b,_0xd99263){const _0x20a44e=_0x34037b;let _0xff6eea=_0x2abdd0[_0x20a44e(0x339)](_0x5ec675[_0x20a44e(0x558)])[_0x20a44e(0x3b8)](_0x33d173,_0x4fda22,_0x234ce5);if(!_0xff6eea)return;let _0x19a946=_0x2abdd0[_0x20a44e(0x339)](_0x5ec675[_0x20a44e(0x558)])[_0x20a44e(0x3b9)](_0x33d173,_0x4fda22,_0x2b387b,_0xd99263),_0x7e0c48=(0x0,_0x5ec675[_0x20a44e(0x3d8)])(_0x2b387b,_0xd99263,_0x19a946,_0xff6eea);return _0x7e0c48==null?void 0x0:_0x7e0c48['tableFieldId'];}function _0x253277(_0x1cd7bc){const _0x145ac6=_0x34037b;let _0x45df65=_0x1b213f(_0x1cd7bc,_0x55c699[_0x145ac6(0x3f1)]['ExcelLike']);if(!_0x45df65)return;let _0x4eb0a5=_0x1cd7bc[_0x145ac6(0x339)](_0x5ec675[_0x145ac6(0x1c2)]),_0x21983e=_0x4eb0a5[_0x145ac6(0x399)](_0x45df65['unitId'],_0x45df65[_0x145ac6(0x42b)],_0x45df65[_0x145ac6(0x3bb)]),_0x321067=_0x21983e==null?void 0x0:_0x21983e['fieldsConfig'][_0x145ac6(0x4ce)][_0x45df65[_0x145ac6(0x520)]];if(!_0x321067)return;let _0x5c0d3c=_0x4eb0a5[_0x145ac6(0x5c2)](_0x45df65[_0x145ac6(0x6bb)],_0x45df65[_0x145ac6(0x3bb)]),_0x19c884=(_0x45df65['dateGroupContext'][_0x145ac6(0x2fa)]===_0x55c699[_0x145ac6(0x4e6)]['Row']?_0x21983e[_0x145ac6(0x5cb)][_0x145ac6(0x1ba)]:_0x21983e['fieldsConfig'][_0x145ac6(0x467)])['flatMap'](_0x1c0b93=>{const _0x1c4924=_0x145ac6;let _0x272d67=_0x21983e['fieldsConfig'][_0x1c4924(0x4ce)][_0x1c0b93],_0x3f22db=_0x272d67?_0x5c0d3c==null?void 0x0:_0x5c0d3c[_0x1c4924(0x3b1)][_0x272d67[_0x1c4924(0x443)]]:void 0x0;return _0x3f22db&&(0x0,_0x55c699[_0x1c4924(0x69d)])(_0x3f22db)&&_0x3f22db['originalFieldId']===_0x45df65[_0x1c4924(0x249)][_0x1c4924(0x24c)]&&_0x3f22db['excelLike']?[_0x3f22db[_0x1c4924(0x4ac)]]:[];}),_0xc9e174=_0x19c884[0x0],_0x168ae3=_0xc9e174?{'units':_0x19c884[_0x145ac6(0x23e)](_0x17b94c=>_0x17b94c['unit']),'autoStart':_0xc9e174[_0x145ac6(0x1ac)],'autoEnd':_0xc9e174[_0x145ac6(0x250)],..._0xc9e174['start']===void 0x0?{}:{'start':_0xc9e174[_0x145ac6(0x218)]},..._0xc9e174['end']===void 0x0?{}:{'end':_0xc9e174[_0x145ac6(0x66c)]},..._0xc9e174[_0x145ac6(0x67b)]===void 0x0?{}:{'daysInterval':_0xc9e174['daysInterval']}}:void 0x0;return{..._0x45df65,'targetFieldName':_0x321067[_0x145ac6(0x381)],'grouping':_0x168ae3};}let _0x5c3106={'id':_0x34037b(0x2b7),'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],async 'handler'(_0x107b5f){const _0x10ea08=_0x34037b;let _0x25db30=_0x253277(_0x107b5f);if(!_0x25db30)return!0x1;let _0x39865f=_0x107b5f['get'](_0x5ec675[_0x10ea08(0x1c2)]),_0x45d473=_0x39865f['getPivotTableConfig'](_0x25db30['unitId'],_0x25db30[_0x10ea08(0x42b)],_0x25db30[_0x10ea08(0x3bb)]),_0x2b84f2=_0x39865f[_0x10ea08(0x5c2)](_0x25db30[_0x10ea08(0x6bb)],_0x25db30[_0x10ea08(0x3bb)]),_0x2d8c0c=_0x107b5f[_0x10ea08(0x339)](_0x2ef21f[_0x10ea08(0x2e3)]),_0x3d3819=_0x107b5f[_0x10ea08(0x339)](_0x1ed97c['LocaleService']),_0xd02d4f=_0x107b5f['get'](_0x1ed97c[_0x10ea08(0x61a)])[_0x10ea08(0x538)](_0x25db30['unitId']),_0xc5106d=(_0xd02d4f==null?void 0x0:_0xd02d4f[_0x10ea08(0x382)]())??_0x1ed97c[_0x10ea08(0x1ff)]['Date1900'],_0x489357=null,_0x1fc1f9=!0x1,_0x453fa1=!0x1,_0xeeb1a2=()=>{const _0x47d447=_0x10ea08;_0x1fc1f9||(_0x1fc1f9=!0x0,_0x489357==null||_0x489357[_0x47d447(0x5c4)](),_0x489357=null);},_0x4c18f4=async _0x1a79d9=>{const _0x3257e5=_0x10ea08;if(!(_0x453fa1||_0x1fc1f9)){_0x453fa1=!0x0;try{let _0x5161af=_0x253277(_0x107b5f);if(!_0x5161af||_0x5161af[_0x3257e5(0x6bb)]!==_0x25db30[_0x3257e5(0x6bb)]||_0x5161af[_0x3257e5(0x42b)]!==_0x25db30[_0x3257e5(0x42b)]||_0x5161af[_0x3257e5(0x3bb)]!==_0x25db30[_0x3257e5(0x3bb)]||_0x5161af['tableFieldId']!==_0x25db30[_0x3257e5(0x520)]||_0x39865f[_0x3257e5(0x399)](_0x25db30[_0x3257e5(0x6bb)],_0x25db30[_0x3257e5(0x42b)],_0x25db30[_0x3257e5(0x3bb)])!==_0x45d473||_0x39865f['getCollection'](_0x25db30[_0x3257e5(0x6bb)],_0x25db30['pivotTableId'])!==_0x2b84f2)return;await _0x107b5f[_0x3257e5(0x339)](_0x1ed97c[_0x3257e5(0x4ab)])[_0x3257e5(0x1cd)](_0x5ec675[_0x3257e5(0x42a)]['id'],{'unitId':_0x25db30[_0x3257e5(0x6bb)],'subUnitId':_0x25db30[_0x3257e5(0x42b)],'pivotTableId':_0x25db30[_0x3257e5(0x3bb)],'tableFieldId':_0x25db30['tableFieldId'],'grouping':{..._0x1a79d9,'units':_0x1a79d9['units'][_0x3257e5(0x6d2)]()}});}catch{}finally{_0xeeb1a2();}}};try{_0x489357=_0x2d8c0c[_0x10ea08(0x245)]({'id':_0x10ea08(0x4e0),'title':{'title':_0x3d3819['t'](_0x10ea08(0x4f2))},'draggable':!0x0,'mask':!0x0,'maskClosable':!0x1,'width':0x1b8,'children':{'label':{'name':_0x88d50d,'props':{'targetFieldName':_0x25db30[_0x10ea08(0x2cb)],'dateSystem':_0xc5106d,'grouping':_0x25db30[_0x10ea08(0x37b)],'onConfirm':_0x4c18f4,'onCancel':_0xeeb1a2}}},'onClose':_0xeeb1a2});}catch{return _0xeeb1a2(),!0x1;}return!0x0;}};function _0x227ff5(_0x4bce19){const _0x42a574=_0x34037b;return _0x4bce19[_0x42a574(0x23e)](_0x113d4a=>({..._0x113d4a,'members':_0x113d4a[_0x42a574(0x430)][_0x42a574(0x23e)](_0x77eeed=>({..._0x77eeed}))}));}function _0x388536(_0xc39608){const _0x8a66a4=_0x34037b;let _0x54cfae;try{_0x54cfae=JSON[_0x8a66a4(0x446)](_0xc39608);}catch{return;}if(!(!Array[_0x8a66a4(0x49e)](_0x54cfae)||_0x54cfae[_0x8a66a4(0x3d7)]<0x1||typeof _0x54cfae[0x0]!=_0x8a66a4(0x40c)))return _0x54cfae[0x0]===_0x1ed97c[_0x8a66a4(0x55a)]['Blank']?_0x55c699['GlobalConfig'][_0x8a66a4(0x4bf)]:String(_0x54cfae[0x1]);}function _0x131ebf(_0x49a782,_0x7bc936){const _0x5ec29b=_0x34037b;var _0x51b52e;let _0x3bd8f6=()=>({'error':'invalidSelection'}),_0x1b7643=(0x0,_0x44d557[_0x5ec29b(0x38b)])(_0x49a782['get'](_0x1ed97c['IUniverInstanceService'])),_0x5813a0=_0x49a782[_0x5ec29b(0x339)](_0x44d557[_0x5ec29b(0x198)])[_0x5ec29b(0x2f7)]();if(!_0x1b7643||!_0x5813a0['length'])return _0x3bd8f6();let {unitId:_0x31a17a,subUnitId:_0x69c191}=_0x1b7643,_0x260357=_0x5813a0[0x0][_0x5ec29b(0x326)];if(!_0x260357)return _0x3bd8f6();let _0x4693ad=_0x49a782[_0x5ec29b(0x339)](_0x5ec675[_0x5ec29b(0x558)]),_0x166b47=_0x4693ad[_0x5ec29b(0x367)](_0x31a17a,_0x69c191,_0x260357[_0x5ec29b(0x6dd)],_0x260357[_0x5ec29b(0x564)]),_0x458e92=_0x49a782[_0x5ec29b(0x339)](_0x5ec675[_0x5ec29b(0x1c2)]),_0x2fa7f2=_0x166b47&&_0x458e92[_0x5ec29b(0x399)](_0x31a17a,_0x69c191,_0x166b47),_0xfb6777=_0x166b47&&_0x458e92[_0x5ec29b(0x5c2)](_0x31a17a,_0x166b47),_0x3b3840=_0x166b47&&_0x4693ad[_0x5ec29b(0x3b8)](_0x31a17a,_0x69c191,_0x166b47);if(!_0x166b47||!_0x2fa7f2||!_0xfb6777||!_0x3b3840)return _0x3bd8f6();let _0x5a4d39=(0x0,_0x5ec675[_0x5ec29b(0x3d8)])(_0x260357[_0x5ec29b(0x6dd)],_0x260357[_0x5ec29b(0x564)],_0x4693ad['getPivotTableCellData'](_0x31a17a,_0x69c191,_0x260357[_0x5ec29b(0x6dd)],_0x260357[_0x5ec29b(0x564)]),_0x3b3840),_0x33a08f=_0x5a4d39==null?void 0x0:_0x5a4d39[_0x5ec29b(0x520)],_0x3ac523=_0x33a08f&&_0x2fa7f2[_0x5ec29b(0x5cb)][_0x5ec29b(0x4ce)][_0x33a08f];if(!_0x33a08f||!_0x3ac523||!(_0x2fa7f2[_0x5ec29b(0x5cb)][_0x5ec29b(0x1ba)]['includes'](_0x33a08f)||_0x2fa7f2[_0x5ec29b(0x5cb)]['columnFields'][_0x5ec29b(0x5fe)](_0x33a08f)))return _0x3bd8f6();let _0x33df5d=_0xfb6777[_0x5ec29b(0x3b1)][_0x3ac523['dataFieldId']];if(!_0x33df5d)return _0x3bd8f6();let _0x34009d=_0x33df5d[_0x5ec29b(0x2b3)]===_0x55c699[_0x5ec29b(0x5d2)][_0x5ec29b(0x562)]?_0x33df5d:void 0x0;if(!_0x34009d&&_0x33df5d[_0x5ec29b(0x2b3)]!==_0x55c699['PivotDataFieldTypeEnum'][_0x5ec29b(0x67c)])return _0x3bd8f6();let _0x130f33=(_0x34009d==null?void 0x0:_0x34009d[_0x5ec29b(0x47e)])??_0x33df5d['id'];if(((_0x51b52e=_0xfb6777[_0x5ec29b(0x3b1)][_0x130f33])==null?void 0x0:_0x51b52e[_0x5ec29b(0x2b3)])!==_0x55c699[_0x5ec29b(0x5d2)][_0x5ec29b(0x67c)])return _0x3bd8f6();let _0x2dea6c=_0x227ff5((_0x34009d==null?void 0x0:_0x34009d['grouping'][_0x5ec29b(0x4a9)])??[]),_0x6b763e=new Map(),_0x156e71=new Set(),_0x1167ca=0x0;for(let _0x2db73a of _0x5813a0){let {startRow:_0x50a909,endRow:_0x5f4831,startColumn:_0xa3f24a,endColumn:_0x1f4d10}=_0x2db73a[_0x5ec29b(0x22d)];if(_0x1167ca+=(_0x5f4831-_0x50a909+0x1)*(_0x1f4d10-_0xa3f24a+0x1),_0x1167ca>0x200)return _0x3bd8f6();for(let _0x3fc348=_0x50a909;_0x3fc348<=_0x5f4831;_0x3fc348++)for(let _0x2bf4a3=_0xa3f24a;_0x2bf4a3<=_0x1f4d10;_0x2bf4a3++){if(_0x4693ad[_0x5ec29b(0x367)](_0x31a17a,_0x69c191,_0x3fc348,_0x2bf4a3)!==_0x166b47)return _0x3bd8f6();let _0x605632=(0x0,_0x5ec675[_0x5ec29b(0x3d8)])(_0x3fc348,_0x2bf4a3,_0x4693ad[_0x5ec29b(0x3b9)](_0x31a17a,_0x69c191,_0x3fc348,_0x2bf4a3),_0x3b3840),_0x35ca20=_0x605632==null?void 0x0:_0x605632[_0x5ec29b(0x1be)];if(!_0x605632||_0x605632[_0x5ec29b(0x2fa)]!==_0x5ec29b(0x533)&&_0x605632[_0x5ec29b(0x2fa)]!==_0x5ec29b(0x53c)||_0x605632['tableFieldId']!==_0x33a08f||!_0x35ca20||_0x35ca20[_0x5ec29b(0x169)]||_0x35ca20[_0x5ec29b(0x251)]||_0x35ca20[_0x5ec29b(0x6a4)]||_0x35ca20[_0x5ec29b(0x4e9)]||_0x35ca20[_0x5ec29b(0x693)]&&_0x35ca20[_0x5ec29b(0x693)]!==_0x5ec29b(0x181)||_0x35ca20['level']<0x1)return _0x3bd8f6();let _0x43e1e3=_0x35ca20['paths'][_0x35ca20['level']-0x1];if(_0x43e1e3===void 0x0)return _0x3bd8f6();if(_0x34009d){let _0x31446f;try{_0x31446f=JSON[_0x5ec29b(0x446)](_0x43e1e3);}catch{return _0x3bd8f6();}if(!Array[_0x5ec29b(0x49e)](_0x31446f)||_0x31446f[_0x5ec29b(0x3d7)]!==0x2||typeof _0x31446f[0x1]!=_0x5ec29b(0x40c))return _0x3bd8f6();if(_0x31446f[0x0]==='group'){if(!_0x2dea6c[_0x5ec29b(0x370)](_0x276fe2=>_0x276fe2['id']===_0x31446f[0x1]))return _0x3bd8f6();_0x156e71[_0x5ec29b(0x3d4)](_0x31446f[0x1]);continue;}if(_0x31446f[0x0]!==_0x5ec29b(0x29d))return _0x3bd8f6();let _0x30b108=_0x388536(_0x31446f[0x1]);if(_0x30b108===void 0x0)return _0x3bd8f6();_0x6b763e['set'](_0x31446f[0x1],{'path':_0x30b108,'memberKey':_0x31446f[0x1]});}else{var _0x37e9b1;let _0x4d5b43=(_0x37e9b1=_0x4693ad[_0x5ec29b(0x3b9)](_0x31a17a,_0x69c191,_0x3fc348,_0x2bf4a3))==null?void 0x0:_0x37e9b1['v'],_0x42dd81=_0x4d5b43==null||_0x4d5b43===''?_0x55c699[_0x5ec29b(0x52c)]['BLANK_PLACEHOLDER']:String(_0x4d5b43);_0x6b763e[_0x5ec29b(0x452)](_0x43e1e3,{'path':_0x42dd81,'tupleKey':_0x43e1e3});}}}return _0x7bc936===_0x5ec29b(0x5f5)&&(_0x6b763e[_0x5ec29b(0x32a)]<0x2||_0x156e71['size']>0x0)||_0x7bc936!=='group'&&(_0x6b763e[_0x5ec29b(0x32a)]>0x0||_0x156e71[_0x5ec29b(0x32a)]!==0x1)?_0x3bd8f6():{'context':{'unitId':_0x31a17a,'subUnitId':_0x69c191,'pivotTableId':_0x166b47,'tableFieldId':_0x33a08f,'sourceFieldId':_0x130f33,'targetFieldName':_0x3ac523['displayName'],'groups':_0x2dea6c,'memberPaths':Array[_0x5ec29b(0x633)](_0x6b763e[_0x5ec29b(0x253)]()),'selectedGroupId':Array['from'](_0x156e71)[0x0]}};}function _0x2ade2a(_0x7618fa,_0x198a00){const _0xa5f7e4=_0x34037b;return _0x131ebf(_0x7618fa,_0x198a00)[_0xa5f7e4(0x171)];}function _0x4714c2(_0x2907de,_0x1770ea){const _0x41b405=_0x34037b;_0x2907de[_0x41b405(0x339)](_0x2ef21f[_0x41b405(0x146)])[_0x41b405(0x346)]({'type':_0x3fc00c[_0x41b405(0x2e5)][_0x41b405(0x274)],'content':_0x2907de[_0x41b405(0x339)](_0x1ed97c[_0x41b405(0x4ad)])['t']('sheets-pivot-ui.manualGroup.'+_0x1770ea)});}function _0x2342fa(_0x1f9662,_0x3f8144,_0x1c025e){const _0x321d09=_0x34037b;let _0x1d6795=_0x2ade2a(_0x1f9662,_0x3f8144);return!!_0x1d6795&&_0x1d6795[_0x321d09(0x6bb)]===_0x1c025e[_0x321d09(0x6bb)]&&_0x1d6795[_0x321d09(0x42b)]===_0x1c025e['subUnitId']&&_0x1d6795['pivotTableId']===_0x1c025e[_0x321d09(0x3bb)]&&_0x1d6795['tableFieldId']===_0x1c025e[_0x321d09(0x520)]&&_0x1d6795[_0x321d09(0x20a)]===_0x1c025e['sourceFieldId']&&_0x1d6795[_0x321d09(0x348)]===_0x1c025e[_0x321d09(0x348)]&&JSON[_0x321d09(0x5d7)](_0x1d6795[_0x321d09(0x6c1)])===JSON[_0x321d09(0x5d7)](_0x1c025e['memberPaths'])&&JSON[_0x321d09(0x5d7)](_0x1d6795[_0x321d09(0x4a9)])===JSON['stringify'](_0x1c025e['groups']);}async function _0xc40f0f(_0x1edb11,_0x46c2c0){const _0x3e1d15=_0x34037b;let _0x186c6f=_0x131ebf(_0x1edb11,_0x46c2c0),_0x4147bf=_0x186c6f[_0x3e1d15(0x171)];if(!_0x4147bf)return _0x4714c2(_0x1edb11,_0x186c6f[_0x3e1d15(0x46a)]),!0x1;let _0x562f2c=_0x1edb11[_0x3e1d15(0x339)](_0x5ec675[_0x3e1d15(0x1c2)]),_0x3f24fe=_0x562f2c['getPivotTableConfig'](_0x4147bf[_0x3e1d15(0x6bb)],_0x4147bf[_0x3e1d15(0x42b)],_0x4147bf[_0x3e1d15(0x3bb)]),_0x1ca294=_0x562f2c[_0x3e1d15(0x5c2)](_0x4147bf['unitId'],_0x4147bf[_0x3e1d15(0x3bb)]),_0x22295d=[];if(_0x46c2c0==='group'){try{let _0x368839=(await _0x1edb11['get'](_0x5ec675[_0x3e1d15(0x43d)])[_0x3e1d15(0x692)]({'unitId':_0x4147bf[_0x3e1d15(0x6bb)],'subUnitId':_0x4147bf[_0x3e1d15(0x42b)],'pivotTableId':_0x4147bf[_0x3e1d15(0x3bb)],'params':{'type':_0x5ec675[_0x3e1d15(0x414)][_0x3e1d15(0x2d7)],'manualGroupMembers':{'sourceFieldId':_0x4147bf[_0x3e1d15(0x20a)],'paths':_0x4147bf[_0x3e1d15(0x6c1)]}}}))[_0x3e1d15(0x420)]['manualGroupMembers'];if(!_0x368839||_0x368839[_0x3e1d15(0x46a)]||_0x368839['members'][_0x3e1d15(0x3d7)]<0x2)return _0x4714c2(_0x1edb11,(_0x368839==null?void 0x0:_0x368839[_0x3e1d15(0x46a)])??'invalidSelection'),!0x1;_0x22295d=_0x368839[_0x3e1d15(0x430)];}catch{return _0x4714c2(_0x1edb11,_0x3e1d15(0x287)),!0x1;}if(!_0x2342fa(_0x1edb11,_0x46c2c0,_0x4147bf)||_0x562f2c[_0x3e1d15(0x399)](_0x4147bf[_0x3e1d15(0x6bb)],_0x4147bf['subUnitId'],_0x4147bf['pivotTableId'])!==_0x3f24fe||_0x562f2c[_0x3e1d15(0x5c2)](_0x4147bf[_0x3e1d15(0x6bb)],_0x4147bf['pivotTableId'])!==_0x1ca294)return!0x1;}let _0x38907a=_0x1edb11['get'](_0x2ef21f[_0x3e1d15(0x2e3)]),_0x55d210=_0x1edb11[_0x3e1d15(0x339)](_0x1ed97c[_0x3e1d15(0x4ad)]),_0x520c41=_0x4147bf[_0x3e1d15(0x4a9)][_0x3e1d15(0x242)](_0x5d904d=>_0x5d904d['id']===_0x4147bf[_0x3e1d15(0x348)]),_0x5b3e1e=(_0x520c41==null?void 0x0:_0x520c41[_0x3e1d15(0x3a1)])??_0x55d210['t'](_0x3e1d15(0x333),String(_0x4147bf[_0x3e1d15(0x4a9)][_0x3e1d15(0x3d7)]+0x1));if(!_0x520c41){let _0xf73f53=_0x4147bf['groups'][_0x3e1d15(0x3d7)]+0x1;for(;_0x4147bf[_0x3e1d15(0x4a9)][_0x3e1d15(0x370)](_0x52f00d=>_0x52f00d[_0x3e1d15(0x3a1)]===_0x5b3e1e);)_0xf73f53++,_0x5b3e1e=_0x55d210['t'](_0x3e1d15(0x333),String(_0xf73f53));}let _0x163f4c=null,_0x2628f5=!0x1,_0x504999=!0x1,_0x4fec85=()=>{_0x2628f5||(_0x2628f5=!0x0,_0x163f4c==null||_0x163f4c['dispose'](),_0x163f4c=null);},_0x36a0ed=async _0x2d09d9=>{const _0x342428=_0x3e1d15;if(_0x504999||_0x2628f5)return;let _0x2c2f95=_0x2d09d9[_0x342428(0x6de)]();if(!_0x2c2f95||_0x4147bf['groups'][_0x342428(0x370)](_0xff9a97=>_0xff9a97['name']===_0x2c2f95&&_0xff9a97['id']!==_0x4147bf[_0x342428(0x348)]))_0x4714c2(_0x1edb11,_0x342428(0x287));else{_0x504999=!0x0;try{if(!_0x2342fa(_0x1edb11,_0x46c2c0,_0x4147bf)||_0x562f2c['getPivotTableConfig'](_0x4147bf[_0x342428(0x6bb)],_0x4147bf[_0x342428(0x42b)],_0x4147bf[_0x342428(0x3bb)])!==_0x3f24fe||_0x562f2c[_0x342428(0x5c2)](_0x4147bf[_0x342428(0x6bb)],_0x4147bf['pivotTableId'])!==_0x1ca294)return;let _0x840a91=_0x46c2c0===_0x342428(0x5f5)?_0x4147bf['groups'][_0x342428(0x6d2)]({'id':(0x0,_0x1ed97c[_0x342428(0x308)])(),'name':_0x2c2f95,'members':_0x22295d[_0x342428(0x23e)](_0x41a13b=>({..._0x41a13b}))}):_0x4147bf[_0x342428(0x4a9)][_0x342428(0x23e)](_0x49cca7=>_0x49cca7['id']===_0x4147bf['selectedGroupId']?{..._0x49cca7,'name':_0x2c2f95}:_0x49cca7);await _0x1edb11[_0x342428(0x339)](_0x1ed97c[_0x342428(0x4ab)])[_0x342428(0x1cd)](_0x5ec675[_0x342428(0x254)]['id'],{'unitId':_0x4147bf[_0x342428(0x6bb)],'subUnitId':_0x4147bf[_0x342428(0x42b)],'pivotTableId':_0x4147bf[_0x342428(0x3bb)],'sourceFieldId':_0x4147bf[_0x342428(0x20a)],'groups':_0x840a91});}catch{}finally{_0x4fec85();}}};try{_0x163f4c=_0x38907a[_0x3e1d15(0x245)]({'id':_0x3e1d15(0x534),'title':{'title':_0x55d210['t'](_0x46c2c0===_0x3e1d15(0x5f5)?_0x3e1d15(0x476):_0x3e1d15(0x219))},'draggable':!0x0,'mask':!0x0,'maskClosable':!0x1,'width':0x190,'children':{'label':{'name':_0x195935,'props':{'name':_0x5b3e1e,'onConfirm':_0x36a0ed,'onCancel':_0x4fec85}}},'onClose':_0x4fec85});}catch{return _0x4fec85(),!0x1;}return!0x0;}let _0x25ab52={'id':_0x34037b(0x222),'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'handler':_0x1b2834=>_0xc40f0f(_0x1b2834,_0x34037b(0x5f5))},_0x2670c7={'id':'sheet.operation.rename-pivot-manual-group','type':_0x1ed97c['CommandType'][_0x34037b(0x62a)],'handler':_0x85ce24=>_0xc40f0f(_0x85ce24,_0x34037b(0x5dc))},_0x40b133={'id':_0x34037b(0x410),'type':_0x1ed97c['CommandType']['OPERATION'],async 'handler'(_0x2dc30a){const _0x2ce5ec=_0x34037b;let _0x502820=_0x131ebf(_0x2dc30a,_0x2ce5ec(0x1b9)),_0x4ce6e8=_0x502820['context'];if(!_0x4ce6e8)return _0x4714c2(_0x2dc30a,_0x502820['error']),!0x1;let _0x57802d=_0x2dc30a[_0x2ce5ec(0x339)](_0x5ec675['SheetsPivotTableConfigModel']),_0x352c81=_0x57802d['getPivotTableConfig'](_0x4ce6e8[_0x2ce5ec(0x6bb)],_0x4ce6e8[_0x2ce5ec(0x42b)],_0x4ce6e8['pivotTableId']),_0x5c3fda=_0x57802d[_0x2ce5ec(0x5c2)](_0x4ce6e8[_0x2ce5ec(0x6bb)],_0x4ce6e8['pivotTableId']);return!_0x2342fa(_0x2dc30a,_0x2ce5ec(0x1b9),_0x4ce6e8)||_0x57802d[_0x2ce5ec(0x399)](_0x4ce6e8[_0x2ce5ec(0x6bb)],_0x4ce6e8['subUnitId'],_0x4ce6e8['pivotTableId'])!==_0x352c81||_0x57802d[_0x2ce5ec(0x5c2)](_0x4ce6e8['unitId'],_0x4ce6e8[_0x2ce5ec(0x3bb)])!==_0x5c3fda?!0x1:_0x2dc30a[_0x2ce5ec(0x339)](_0x1ed97c['ICommandService'])[_0x2ce5ec(0x1cd)](_0x5ec675['SetPivotManualGroupsCommand']['id'],{'unitId':_0x4ce6e8['unitId'],'subUnitId':_0x4ce6e8[_0x2ce5ec(0x42b)],'pivotTableId':_0x4ce6e8['pivotTableId'],'sourceFieldId':_0x4ce6e8['sourceFieldId'],'groups':_0x4ce6e8[_0x2ce5ec(0x4a9)][_0x2ce5ec(0x154)](_0x25cbf5=>_0x25cbf5['id']!==_0x4ce6e8[_0x2ce5ec(0x348)])});}};function _0x5f1653(_0x51c96c){const _0x174abc=_0x34037b;return typeof _0x51c96c[_0x174abc(0x1ac)]=='boolean'&&typeof _0x51c96c['autoEnd']==_0x174abc(0x3f2)&&Number[_0x174abc(0x69a)](_0x51c96c['interval'])&&_0x51c96c[_0x174abc(0x136)]>0x0&&(_0x51c96c['start']===void 0x0||Number['isFinite'](_0x51c96c[_0x174abc(0x218)]))&&(_0x51c96c['end']===void 0x0||Number[_0x174abc(0x69a)](_0x51c96c[_0x174abc(0x66c)]))&&(_0x51c96c[_0x174abc(0x1ac)]||_0x51c96c[_0x174abc(0x218)]!==void 0x0)&&(_0x51c96c['autoEnd']||_0x51c96c[_0x174abc(0x66c)]!==void 0x0)&&(_0x51c96c['start']===void 0x0||_0x51c96c[_0x174abc(0x66c)]===void 0x0||_0x51c96c[_0x174abc(0x218)]<=_0x51c96c['end']);}function _0x583d46(_0x1cd289,_0xaa467b){const _0x1b77bd=_0x34037b;if(_0x1cd289['dataFieldType']===_0x55c699['PivotDataFieldTypeEnum'][_0x1b77bd(0x247)]){let _0x1cbadb=_0x1cd289,_0x5966f4=_0xaa467b[_0x1b77bd(0x3b1)][_0x1cbadb[_0x1b77bd(0x47e)]];return!_0x5966f4||_0x5966f4[_0x1b77bd(0x2b3)]!==_0x55c699[_0x1b77bd(0x5d2)][_0x1b77bd(0x67c)]||_0x5966f4[_0x1b77bd(0x35e)]!==_0x55c699[_0x1b77bd(0x207)][_0x1b77bd(0x3b5)]?void 0x0:{'sourceFieldId':_0x1cbadb[_0x1b77bd(0x47e)],'grouping':{..._0x1cbadb[_0x1b77bd(0x37b)]}};}if(_0x1cd289[_0x1b77bd(0x2b3)]===_0x55c699[_0x1b77bd(0x5d2)][_0x1b77bd(0x67c)]&&_0x1cd289[_0x1b77bd(0x35e)]===_0x55c699['PivotDataFieldDataTypeEnum'][_0x1b77bd(0x3b5)])return{'sourceFieldId':_0x1cd289['id']};}function _0x1aedd0(_0x129d36){const _0x3e825f=_0x34037b;var _0x1d2134;let _0x223559=(0x0,_0x44d557[_0x3e825f(0x38b)])(_0x129d36[_0x3e825f(0x339)](_0x1ed97c['IUniverInstanceService'])),_0x1903b0=(_0x1d2134=_0x129d36[_0x3e825f(0x339)](_0x44d557[_0x3e825f(0x198)])[_0x3e825f(0x455)]())==null?void 0x0:_0x1d2134[_0x3e825f(0x326)];if(!_0x223559||!_0x1903b0)return;let {unitId:_0x36f099,subUnitId:_0x1a9225}=_0x223559,_0x1fabd2=_0x1903b0[_0x3e825f(0x6dd)],_0xea6287=_0x1903b0[_0x3e825f(0x564)],_0x47337c=_0x129d36[_0x3e825f(0x339)](_0x5ec675[_0x3e825f(0x558)]),_0x126227=_0x47337c[_0x3e825f(0x367)](_0x36f099,_0x1a9225,_0x1fabd2,_0xea6287);if(!_0x126227)return;let _0x324972=_0x47337c[_0x3e825f(0x3b8)](_0x36f099,_0x1a9225,_0x126227);if(!_0x324972)return;let _0x49422f=(0x0,_0x5ec675[_0x3e825f(0x3d8)])(_0x1fabd2,_0xea6287,_0x47337c[_0x3e825f(0x3b9)](_0x36f099,_0x1a9225,_0x1fabd2,_0xea6287),_0x324972),_0x4d5513=_0x49422f==null?void 0x0:_0x49422f['tableFieldId'];if(!_0x4d5513||_0x49422f[_0x3e825f(0x2fa)]!=='rowRanges'&&_0x49422f['area']!==_0x3e825f(0x53c))return;let _0xc12b0b=_0x129d36['get'](_0x5ec675[_0x3e825f(0x1c2)]),_0x1c37cf=_0xc12b0b[_0x3e825f(0x399)](_0x36f099,_0x1a9225,_0x126227),_0x569229=_0xc12b0b[_0x3e825f(0x5c2)](_0x36f099,_0x126227),_0x16d7a9=_0x1c37cf==null?void 0x0:_0x1c37cf[_0x3e825f(0x5cb)][_0x3e825f(0x4ce)][_0x4d5513];if(!_0x16d7a9||!_0x569229||!(_0x1c37cf['fieldsConfig'][_0x3e825f(0x1ba)][_0x3e825f(0x5fe)](_0x4d5513)||_0x1c37cf[_0x3e825f(0x5cb)][_0x3e825f(0x467)]['includes'](_0x4d5513)))return;let _0x2ae764=_0x569229['fields'][_0x16d7a9['dataFieldId']];if(!_0x2ae764)return;let _0x585786=_0x583d46(_0x2ae764,_0x569229);if(_0x585786)return{'unitId':_0x36f099,'subUnitId':_0x1a9225,'pivotTableId':_0x126227,'tableFieldId':_0x4d5513,'targetFieldName':_0x16d7a9['displayName'],..._0x585786};}let _0x28bfcc={'id':'sheet.operation.set-pivot-number-group','type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],async 'handler'(_0x560953){const _0x1f7f23=_0x34037b;let _0x9fb202=_0x1aedd0(_0x560953);if(!_0x9fb202)return!0x1;let _0x4d90da=_0x560953[_0x1f7f23(0x339)](_0x5ec675[_0x1f7f23(0x1c2)]),_0x205b73=_0x4d90da['getCollection'](_0x9fb202[_0x1f7f23(0x6bb)],_0x9fb202[_0x1f7f23(0x3bb)]),_0x28ded5=_0x4d90da[_0x1f7f23(0x399)](_0x9fb202[_0x1f7f23(0x6bb)],_0x9fb202[_0x1f7f23(0x42b)],_0x9fb202[_0x1f7f23(0x3bb)]),_0x5e5c8a=_0x560953['get'](_0x1ed97c[_0x1f7f23(0x61a)]),_0x446e69=()=>{const _0x1a345a=_0x1f7f23;let _0x156a71=_0x1aedd0(_0x560953);return!!_0x156a71&&_0x156a71[_0x1a345a(0x6bb)]===_0x9fb202[_0x1a345a(0x6bb)]&&_0x156a71[_0x1a345a(0x42b)]===_0x9fb202[_0x1a345a(0x42b)]&&_0x156a71[_0x1a345a(0x3bb)]===_0x9fb202['pivotTableId']&&_0x156a71[_0x1a345a(0x520)]===_0x9fb202['tableFieldId']&&_0x156a71[_0x1a345a(0x20a)]===_0x9fb202[_0x1a345a(0x20a)]&&JSON[_0x1a345a(0x5d7)](_0x156a71['grouping'])===JSON['stringify'](_0x9fb202[_0x1a345a(0x37b)]);},_0x1c541f=_0x560953[_0x1f7f23(0x339)](_0x2ef21f[_0x1f7f23(0x2e3)]),_0x932940=_0x560953[_0x1f7f23(0x339)](_0x1ed97c[_0x1f7f23(0x4ad)]),_0x58c003=null,_0x5b8ff8=!0x1,_0x3fc01e=!0x1,_0x180747=new _0x3ae495[(_0x1f7f23(0x193))](),_0x336247=async()=>{const _0x1835a3=_0x1f7f23;if(!_0x5b8ff8&&_0x446e69())try{let _0x327a1f=(await _0x560953[_0x1835a3(0x339)](_0x5ec675[_0x1835a3(0x43d)])[_0x1835a3(0x692)]({'unitId':_0x9fb202['unitId'],'subUnitId':_0x9fb202[_0x1835a3(0x42b)],'pivotTableId':_0x9fb202[_0x1835a3(0x3bb)],'params':{'type':_0x5ec675[_0x1835a3(0x414)][_0x1835a3(0x515)],'numberGroupDefaults':{'tableFieldId':_0x9fb202['tableFieldId']}}}))[_0x1835a3(0x420)][_0x1835a3(0x2b0)];return!_0x5b8ff8&&_0x446e69()&&_0x327a1f&&_0x5f1653(_0x327a1f)?_0x327a1f:void 0x0;}catch{return;}},_0x3c9fbf=()=>{const _0x2e66cf=_0x1f7f23;_0x5b8ff8||(_0x5b8ff8=!0x0,_0x180747[_0x2e66cf(0x2bb)](),_0x180747[_0x2e66cf(0x248)](),_0x58c003==null||_0x58c003[_0x2e66cf(0x5c4)](),_0x58c003=null);},_0xb7fb81=await _0x336247();if(!_0xb7fb81)return _0x3c9fbf(),!0x1;let _0x44aaca=_0x5e5c8a['unitDisposed$']['pipe']((0x0,_0x3ae495[_0x1f7f23(0x154)])(_0x5a0cdd=>_0x5a0cdd['getUnitId']()===_0x9fb202[_0x1f7f23(0x6bb)]),(0x0,_0x3ae495[_0x1f7f23(0x4ee)])(_0x3c9fbf)),_0x5ff3e4=(0x0,_0x3ae495[_0x1f7f23(0x1aa)])(()=>{const _0x3f6532=_0x1f7f23;if(_0x5b8ff8||!_0x5e5c8a[_0x3f6532(0x538)](_0x9fb202[_0x3f6532(0x6bb)]))return _0x3c9fbf(),_0x3ae495[_0x3f6532(0x634)];let _0x5f1ce8=_0x4d90da[_0x3f6532(0x26c)](_0x9fb202[_0x3f6532(0x6bb)],_0x9fb202[_0x3f6532(0x42b)],_0x9fb202[_0x3f6532(0x3bb)])['pipe']((0x0,_0x3ae495[_0x3f6532(0x36b)])(0x0),(0x0,_0x3ae495[_0x3f6532(0x23e)])(()=>void 0x0));return(0x0,_0x3ae495['merge'])((0x0,_0x3ae495['of'])(_0xb7fb81),_0x5f1ce8)[_0x3f6532(0x1dd)]((0x0,_0x3ae495[_0x3f6532(0x195)])(_0x3d52a8=>_0x3d52a8&&_0x4d90da[_0x3f6532(0x5c2)](_0x9fb202[_0x3f6532(0x6bb)],_0x9fb202[_0x3f6532(0x3bb)])===_0x205b73&&_0x4d90da[_0x3f6532(0x399)](_0x9fb202[_0x3f6532(0x6bb)],_0x9fb202[_0x3f6532(0x42b)],_0x9fb202['pivotTableId'])===_0x28ded5?(0x0,_0x3ae495['of'])(_0x3d52a8):(0x0,_0x3ae495[_0x3f6532(0x6d2)])((0x0,_0x3ae495['of'])(void 0x0),_0x336247())),(0x0,_0x3ae495[_0x3f6532(0x3cf)])((0x0,_0x3ae495[_0x3f6532(0x39b)])(_0x180747,_0x44aaca)));}),_0x4a88b7=async _0x477258=>{const _0x41d7d0=_0x1f7f23;if(!(_0x3fc01e||_0x5b8ff8)){_0x3fc01e=!0x0;try{if(!_0x5f1653(_0x477258)||!_0x446e69())return;await _0x560953[_0x41d7d0(0x339)](_0x1ed97c[_0x41d7d0(0x4ab)])[_0x41d7d0(0x1cd)](_0x5ec675['SetPivotNumberGroupCommand']['id'],{'unitId':_0x9fb202[_0x41d7d0(0x6bb)],'subUnitId':_0x9fb202[_0x41d7d0(0x42b)],'pivotTableId':_0x9fb202[_0x41d7d0(0x3bb)],'tableFieldId':_0x9fb202[_0x41d7d0(0x520)],'grouping':{..._0x477258}});}catch{}finally{_0x3c9fbf();}}};try{_0x58c003=_0x1c541f['open']({'id':_0x1f7f23(0x325),'title':{'title':_0x932940['t'](_0x1f7f23(0x5e8))},'draggable':!0x0,'mask':!0x0,'maskClosable':!0x1,'width':0x190,'children':{'label':{'name':_0x337ca9,'props':{'targetFieldName':_0x9fb202[_0x1f7f23(0x2cb)],'grouping':_0x9fb202['grouping'],'defaults$':_0x5ff3e4,'onConfirm':_0x4a88b7,'onCancel':_0x3c9fbf}}},'onClose':_0x3c9fbf});}catch{return _0x3c9fbf(),!0x1;}return!0x0;}},_0x3ce038=[{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x1d6)],'localeKey':_0x34037b(0x2c9),'requiresParameters':!0x1,'baseItemMode':_0x34037b(0x6a0)},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x504)],'localeKey':_0x34037b(0x3a6),'requiresParameters':!0x1,'baseItemMode':'none'},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x4b5)],'localeKey':'sheets-pivot-ui.showValuesAs.percentOfRowTotal','requiresParameters':!0x1,'baseItemMode':_0x34037b(0x6a0)},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x24e)],'localeKey':_0x34037b(0x44a),'requiresParameters':!0x1,'baseItemMode':_0x34037b(0x6a0)},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x2b8)],'localeKey':_0x34037b(0x611),'requiresParameters':!0x1,'baseItemMode':'none'},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x2a6)],'localeKey':_0x34037b(0x3ae),'requiresParameters':!0x1,'baseItemMode':_0x34037b(0x6a0)},{'type':_0x55c699['PivotShowAsTypeEnum'][_0x34037b(0x2bc)],'localeKey':_0x34037b(0x309),'requiresParameters':!0x1,'baseItemMode':_0x34037b(0x6a0)},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x228)],'localeKey':_0x34037b(0x383),'requiresParameters':!0x0,'baseItemMode':_0x34037b(0x6a0),'parentFieldOnly':!0x0},{'type':_0x55c699['PivotShowAsTypeEnum'][_0x34037b(0x3c3)],'localeKey':_0x34037b(0x398),'requiresParameters':!0x0,'baseItemMode':_0x34037b(0x181)},{'type':_0x55c699['PivotShowAsTypeEnum'][_0x34037b(0x165)],'localeKey':_0x34037b(0x22c),'requiresParameters':!0x0,'baseItemMode':_0x34037b(0x3f8)},{'type':_0x55c699[_0x34037b(0x234)]['percentDifferenceFrom'],'localeKey':_0x34037b(0x3ec),'requiresParameters':!0x0,'baseItemMode':'item-or-relative'},{'type':_0x55c699[_0x34037b(0x234)]['runningTotal'],'localeKey':_0x34037b(0x5cd),'requiresParameters':!0x0,'baseItemMode':'none'},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x144)],'localeKey':_0x34037b(0x1ad),'requiresParameters':!0x0,'baseItemMode':'none'},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x59b)],'localeKey':'sheets-pivot-ui.showValuesAs.rankAscending','requiresParameters':!0x0,'baseItemMode':'none'},{'type':_0x55c699[_0x34037b(0x234)][_0x34037b(0x267)],'localeKey':_0x34037b(0x38e),'requiresParameters':!0x0,'baseItemMode':_0x34037b(0x6a0)}],_0x5f228f={'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'id':_0x34037b(0x1f3),async 'handler'(_0xe7a344,_0xae5f26){const _0x151c76=_0x34037b;let _0x380704=_0xae5f26&&_0x3ce038[_0x151c76(0x242)](_0x1a3111=>_0x1a3111[_0x151c76(0x490)]===_0xae5f26[_0x151c76(0x490)]);if(!_0x380704)return!0x1;let _0x441fe6=_0x5e0dd0(_0xe7a344);if(!_0x441fe6)return!0x1;if(!_0x380704[_0x151c76(0x1af)])return _0xe7a344['get'](_0x1ed97c['ICommandService'])[_0x151c76(0x1cd)](_0x5ec675[_0x151c76(0x21a)]['id'],{'unitId':_0x441fe6[_0x151c76(0x6bb)],'subUnitId':_0x441fe6[_0x151c76(0x42b)],'pivotTableId':_0x441fe6[_0x151c76(0x3bb)],'tableFieldId':_0x441fe6[_0x151c76(0x520)],'showDataAs':{'type':_0x380704[_0x151c76(0x490)],'baseFieldId':'','baseItem':''},'tableFieldInfo':_0x441fe6[_0x151c76(0x272)],'dataFieldInfo':_0x441fe6[_0x151c76(0x213)]});let _0xabb8e=_0x4ec8ce(_0xe7a344,_0x441fe6);if(!_0xabb8e)return!0x1;let _0x3425ce=_0x53be85(_0xabb8e[_0x151c76(0x544)],_0xabb8e['collection'],_0x380704);if(_0x3425ce[_0x151c76(0x3d7)]===0x0)return!0x1;let _0x2af627={};if(_0x380704['baseItemMode']!==_0x151c76(0x6a0)){try{_0x2af627=await _0x33c5cf(_0xe7a344,_0xabb8e[_0x151c76(0x544)],_0x441fe6[_0x151c76(0x3bb)],_0x3425ce);}catch{return!0x1;}if(!_0x3425ce['some'](_0x459c79=>_0x2af627[_0x459c79]&&(_0x380704[_0x151c76(0x6c6)]===_0x151c76(0x3f8)||_0x2af627[_0x459c79][_0x151c76(0x180)][_0x151c76(0x3d7)]>0x0)))return!0x1;}let _0x16ecbd=_0xe7a344[_0x151c76(0x339)](_0x2ef21f[_0x151c76(0x2e3)]),_0x16b6f2=_0xe7a344[_0x151c76(0x339)](_0x1ed97c['LocaleService']),_0x36e7c7=null,_0x1ff532=!0x1,_0x34a250=!0x1,_0xd67760=()=>{const _0x15bdfc=_0x151c76;_0x1ff532||(_0x1ff532=!0x0,_0x36e7c7==null||_0x36e7c7[_0x15bdfc(0x5c4)](),_0x36e7c7=null);};try{_0x36e7c7=_0x16ecbd[_0x151c76(0x245)]({'id':_0x151c76(0x5e2),'title':{'title':_0x16b6f2['t'](_0x151c76(0x6e9))},'draggable':!0x0,'mask':!0x0,'maskClosable':!0x1,'width':0x190,'children':{'label':{'name':_0x2ac0fe,'props':{'unitId':_0x441fe6[_0x151c76(0x6bb)],'subUnitId':_0x441fe6[_0x151c76(0x42b)],'pivotTableId':_0x441fe6['pivotTableId'],'tableFieldId':_0x441fe6[_0x151c76(0x520)],'type':_0x380704[_0x151c76(0x490)],'baseItems':_0x2af627,'onCancel':_0xd67760,'onConfirm':async _0x4a9c4d=>{const _0x4cfc1a=_0x151c76;if(!_0x34a250){_0x34a250=!0x0;try{let _0x20df63=_0x4ec8ce(_0xe7a344,_0x441fe6);if(!_0x20df63||!_0x41b98d(_0x20df63['config'],_0x20df63[_0x4cfc1a(0x29e)],_0x380704,_0x4a9c4d))return;if(_0x380704['baseItemMode']!=='none'&&_0x4a9c4d['baseItemType']===void 0x0){var _0x622494;if(!((_0x622494=(await _0x33c5cf(_0xe7a344,_0x20df63[_0x4cfc1a(0x544)],_0x20df63[_0x4cfc1a(0x171)][_0x4cfc1a(0x3bb)],[_0x4a9c4d[_0x4cfc1a(0x429)]]))[_0x4a9c4d[_0x4cfc1a(0x429)]])!=null&&_0x622494[_0x4cfc1a(0x180)][_0x4cfc1a(0x5fe)](_0x4a9c4d[_0x4cfc1a(0x307)])))return;}await _0xe7a344[_0x4cfc1a(0x339)](_0x1ed97c['ICommandService'])['executeCommand'](_0x5ec675['UpdatePivotFieldSettingCommand']['id'],{'unitId':_0x20df63[_0x4cfc1a(0x171)][_0x4cfc1a(0x6bb)],'subUnitId':_0x20df63['context'][_0x4cfc1a(0x42b)],'pivotTableId':_0x20df63['context'][_0x4cfc1a(0x3bb)],'tableFieldId':_0x20df63[_0x4cfc1a(0x171)]['tableFieldId'],'showDataAs':_0x4a9c4d,'tableFieldInfo':_0x20df63[_0x4cfc1a(0x171)][_0x4cfc1a(0x272)],'dataFieldInfo':_0x20df63[_0x4cfc1a(0x171)][_0x4cfc1a(0x213)]});}catch{}finally{_0xd67760();}}}}}},'onClose':_0xd67760});}catch{return _0xd67760(),!0x1;}return!0x0;}};function _0x53be85(_0x30679f,_0x1238fe,_0x3d7006){const _0x562b56=_0x34037b;let {rowFields:_0x21e113,columnFields:_0x4bb694,dimension:_0x49e8a2}=_0x30679f[_0x562b56(0x5cb)];return(_0x3d7006[_0x562b56(0x432)]?[..._0x21e113[_0x562b56(0x4fb)](0x0,-0x1),..._0x4bb694[_0x562b56(0x4fb)](0x0,-0x1)]:[..._0x21e113,..._0x4bb694])[_0x562b56(0x154)](_0x99ee97=>{const _0x2ce3a0=_0x562b56;let _0x4e7026=_0x49e8a2[_0x99ee97];return!!(_0x4e7026&&(_0x1238fe[_0x2ce3a0(0x3b1)][_0x4e7026[_0x2ce3a0(0x443)]]||_0x1238fe['customFields']['find'](_0x2bb853=>_0x2bb853['id']===_0x4e7026[_0x2ce3a0(0x443)])));});}function _0x5e0dd0(_0x5047fe){const _0x35b21d=_0x34037b;var _0x23a438,_0x38b03a;let _0x178110=(0x0,_0x44d557['getSheetCommandTarget'])(_0x5047fe[_0x35b21d(0x339)](_0x1ed97c[_0x35b21d(0x61a)])),_0x3a523b=(_0x23a438=_0x5047fe[_0x35b21d(0x339)](_0x44d557[_0x35b21d(0x198)])[_0x35b21d(0x455)]())==null?void 0x0:_0x23a438[_0x35b21d(0x326)];if(!_0x178110||!_0x3a523b)return;let {unitId:_0x10e638,subUnitId:_0xa4666f}=_0x178110,_0x2608bb=_0x3a523b[_0x35b21d(0x6dd)],_0x2ffe6b=_0x3a523b[_0x35b21d(0x564)],_0x92ff41=_0x5047fe[_0x35b21d(0x339)](_0x5ec675['SheetsPivotTableAdaptorModel']),_0x5c75d1=_0x92ff41[_0x35b21d(0x367)](_0x10e638,_0xa4666f,_0x2608bb,_0x2ffe6b);if(!_0x5c75d1)return;let _0x421f87=_0x5047fe[_0x35b21d(0x339)](_0x5ec675[_0x35b21d(0x1c2)])['getPivotTableConfig'](_0x10e638,_0xa4666f,_0x5c75d1),_0x14e16b=_0x92ff41['getPivotItemRenderInfoCache'](_0x10e638,_0xa4666f,_0x5c75d1),_0x1aa990=_0x92ff41['getPivotTableCellData'](_0x10e638,_0xa4666f,_0x2608bb,_0x2ffe6b);if(!_0x421f87||!_0x14e16b)return;let _0x3d235e=(0x0,_0x5ec675[_0x35b21d(0x3d8)])(_0x2608bb,_0x2ffe6b,_0x1aa990,_0x14e16b);if(!_0x3d235e)return;let _0x2c3cd7=(0x0,_0x5ec675[_0x35b21d(0x30b)])(_0x3d235e,_0x421f87[_0x35b21d(0x5cb)][_0x35b21d(0x3e0)]);if(_0x2c3cd7)return(_0x38b03a=_0x4ec8ce(_0x5047fe,{'unitId':_0x10e638,'subUnitId':_0xa4666f,'pivotTableId':_0x5c75d1,'tableFieldId':_0x2c3cd7}))==null?void 0x0:_0x38b03a[_0x35b21d(0x171)];}function _0x4ec8ce(_0xb4d742,_0x1eea44){const _0x20d5d3=_0x34037b;let {unitId:_0x226661,subUnitId:_0x22ad42,pivotTableId:_0x307262,tableFieldId:_0x12e69e}=_0x1eea44,_0x358fde=_0xb4d742['get'](_0x5ec675[_0x20d5d3(0x1c2)]),_0x387d17=_0x358fde['getPivotTableConfig'](_0x226661,_0x22ad42,_0x307262),_0x60523a=_0x358fde[_0x20d5d3(0x5c2)](_0x226661,_0x307262),_0x3f161b=_0x387d17==null?void 0x0:_0x387d17[_0x20d5d3(0x5cb)]['measure'][_0x12e69e];if(!_0x387d17||!_0x60523a||!_0x3f161b||!_0x387d17[_0x20d5d3(0x5cb)][_0x20d5d3(0x3e0)][_0x20d5d3(0x5fe)](_0x3f161b['id']))return;let _0x464f6f=_0x60523a[_0x20d5d3(0x3b1)][_0x3f161b[_0x20d5d3(0x443)]]??_0x60523a[_0x20d5d3(0x1db)][_0x20d5d3(0x242)](_0x1f915d=>_0x1f915d['id']===_0x3f161b[_0x20d5d3(0x443)]);if(!_0x464f6f)return;let _0x186701={..._0x3f161b[_0x20d5d3(0x5d6)]};return{'config':_0x387d17,'collection':_0x60523a,'context':{'unitId':_0x226661,'subUnitId':_0x22ad42,'pivotTableId':_0x307262,'tableFieldId':_0x3f161b['id'],'currentShowDataAs':_0x186701,'tableFieldInfo':{'tableFieldId':_0x3f161b['id'],'displayName':_0x3f161b[_0x20d5d3(0x381)],'dataFieldId':_0x3f161b[_0x20d5d3(0x443)],'format':_0x3f161b['format'],'subTotalType':_0x3f161b[_0x20d5d3(0x19e)],'showDataAs':{..._0x186701}},'dataFieldInfo':{'id':_0x464f6f['id'],'dataFieldId':_0x464f6f['id'],'name':_0x464f6f[_0x20d5d3(0x3a1)],'type':_0x464f6f[_0x20d5d3(0x35e)],'checked':!0x0,'pivotTableId':_0x307262}}};}async function _0x33c5cf(_0x4d7a06,_0x13fef3,_0x47a5cb,_0x12d812){const _0x94080b=_0x34037b;let {unitId:_0x2648bc,subUnitId:_0x2b82ef}=_0x13fef3[_0x94080b(0x6e0)],_0x291a31=_0x13fef3['targetCellInfo'],_0x51c805=_0x4d7a06[_0x94080b(0x339)](_0x5ec675[_0x94080b(0x558)])[_0x94080b(0x3b8)](_0x2648bc,_0x2b82ef,_0x47a5cb);if(!_0x51c805)throw Error(_0x94080b(0x4e8));return(await Promise['all'](_0x12d812[_0x94080b(0x23e)](async _0x40bf09=>{const _0x130d3e=_0x94080b;try{return[_0x40bf09,(await _0x4d7a06[_0x130d3e(0x339)](_0x5ec675[_0x130d3e(0x43d)])['getPivotDisplayConfig']({'unitId':_0x2648bc,'subUnitId':_0x2b82ef,'pivotTableId':_0x47a5cb,'params':{'type':_0x5ec675[_0x130d3e(0x414)][_0x130d3e(0x456)],'filter':{'row':_0x291a31[_0x130d3e(0x4b9)],'col':_0x291a31[_0x130d3e(0x428)],'tableFieldId':_0x40bf09,'pivotItemRenderInfoCache':_0x51c805}}}))[_0x130d3e(0x420)][_0x130d3e(0x154)]];}catch{return[_0x40bf09,void 0x0];}})))[_0x94080b(0x164)]((_0x310a15,[_0x411ef7,_0x45eb73])=>(_0x45eb73&&(_0x310a15[_0x411ef7]={'items':_0x45eb73[_0x94080b(0x180)],'itemTypes':_0x45eb73[_0x94080b(0x238)],..._0x45eb73[_0x94080b(0x509)]?{'itemLabels':_0x45eb73[_0x94080b(0x509)]}:{},'format':_0x45eb73[_0x94080b(0x60b)]}),_0x310a15),{});}function _0x41b98d(_0x31e55b,_0x4fa3c0,_0x2d4d32,_0x2ab239){const _0x2955bd=_0x34037b;return _0x2ab239[_0x2955bd(0x490)]!==_0x2d4d32[_0x2955bd(0x490)]||!_0x53be85(_0x31e55b,_0x4fa3c0,_0x2d4d32)[_0x2955bd(0x5fe)](_0x2ab239[_0x2955bd(0x429)])?!0x1:_0x2d4d32[_0x2955bd(0x6c6)]==='none'?_0x2ab239[_0x2955bd(0x307)]===''&&_0x2ab239[_0x2955bd(0x240)]===void 0x0:_0x2ab239[_0x2955bd(0x240)]===void 0x0?_0x2ab239[_0x2955bd(0x307)]!=='':_0x2d4d32['baseItemMode']===_0x2955bd(0x3f8)&&_0x2ab239['baseItem']===''&&(_0x2ab239[_0x2955bd(0x240)]===_0x55c699[_0x2955bd(0x22b)][_0x2955bd(0x39a)]||_0x2ab239[_0x2955bd(0x240)]===_0x55c699[_0x2955bd(0x22b)][_0x2955bd(0x2bb)]);}function _0x6ed3b(_0x231eb0){const _0x294cd4=_0x34037b;return{..._0x231eb0,'expected':Array['isArray'](_0x231eb0[_0x294cd4(0x66a)])?_0x231eb0[_0x294cd4(0x66a)]['concat']():_0x231eb0[_0x294cd4(0x66a)]};}function _0x4e92f0(_0x19cbe4,_0x40b66e){const _0x41b0e9=_0x34037b;let _0x4e048e=_0x19cbe4['get'](_0x5ec675[_0x41b0e9(0x1c2)])[_0x41b0e9(0x399)](_0x40b66e[_0x41b0e9(0x6bb)],_0x40b66e['subUnitId'],_0x40b66e[_0x41b0e9(0x3bb)]);if(_0x4e048e&&_0x4e048e[_0x41b0e9(0x5cb)][_0x41b0e9(0x4ce)][_0x40b66e[_0x41b0e9(0x47a)]]&&(_0x4e048e[_0x41b0e9(0x5cb)][_0x41b0e9(0x1ba)][_0x41b0e9(0x5fe)](_0x40b66e[_0x41b0e9(0x47a)])||_0x4e048e[_0x41b0e9(0x5cb)][_0x41b0e9(0x467)][_0x41b0e9(0x5fe)](_0x40b66e[_0x41b0e9(0x47a)])))return _0x4e048e;}function _0x190883(_0x19425f){const _0x40b226=_0x34037b;var _0xff292c,_0x573073;let _0x4fd333=(0x0,_0x44d557['getSheetCommandTarget'])(_0x19425f[_0x40b226(0x339)](_0x1ed97c['IUniverInstanceService'])),_0xf5e782=(_0xff292c=_0x19425f[_0x40b226(0x339)](_0x44d557[_0x40b226(0x198)])[_0x40b226(0x455)]())==null?void 0x0:_0xff292c[_0x40b226(0x326)];if(!_0x4fd333||!_0xf5e782)return;let {unitId:_0x188c01,subUnitId:_0x33d1c5}=_0x4fd333,_0x46f237=_0xf5e782[_0x40b226(0x6dd)],_0x178f29=_0xf5e782[_0x40b226(0x564)],_0x27ad19=_0x19425f['get'](_0x5ec675[_0x40b226(0x558)]),_0x5cd93a=_0x27ad19[_0x40b226(0x367)](_0x188c01,_0x33d1c5,_0x46f237,_0x178f29);if(!_0x5cd93a)return;let _0x7682d=_0x19425f[_0x40b226(0x339)](_0x5ec675[_0x40b226(0x1c2)])[_0x40b226(0x399)](_0x188c01,_0x33d1c5,_0x5cd93a),_0xde26bc=_0x27ad19['getPivotItemRenderInfoCache'](_0x188c01,_0x33d1c5,_0x5cd93a);if(!_0x7682d||!_0xde26bc)return;let _0x1cf401=(0x0,_0x5ec675['resolvePivotSheetCell'])(_0x46f237,_0x178f29,_0x27ad19[_0x40b226(0x3b9)](_0x188c01,_0x33d1c5,_0x46f237,_0x178f29),_0xde26bc),_0x4e512f=_0x1cf401&&(0x0,_0x5ec675[_0x40b226(0x50f)])(_0x1cf401,_0x7682d[_0x40b226(0x5cb)]);if(!_0x4e512f)return;let _0x27ae9a=_0x7682d['fieldsConfig'][_0x40b226(0x4ce)][_0x4e512f[_0x40b226(0x47a)]],_0x539b32=_0x7682d[_0x40b226(0x5cb)][_0x40b226(0x3e0)][_0x40b226(0x282)](_0x199de5=>{const _0x4998c1=_0x40b226;let _0x347e1f=_0x7682d['fieldsConfig'][_0x4998c1(0x39f)][_0x199de5];return _0x347e1f?[{'id':_0x347e1f['id'],'label':_0x347e1f[_0x4998c1(0x381)]}]:[];});if(!_0x27ae9a||_0x539b32[_0x40b226(0x3d7)]===0x0)return;let _0x333b88=(_0x573073=_0x7682d[_0x40b226(0x5cb)]['valueFilter'])==null||(_0x573073=_0x573073[_0x40b226(0x242)](_0x3110d3=>_0x3110d3['fieldId']===_0x4e512f['targetFieldId']))==null?void 0x0:_0x573073[_0x40b226(0x2ad)];return{'unitId':_0x188c01,'subUnitId':_0x33d1c5,'pivotTableId':_0x5cd93a,'targetFieldId':_0x4e512f['targetFieldId'],'targetFieldName':_0x27ae9a[_0x40b226(0x381)],'valueFields':_0x539b32,'defaultValueFieldId':_0x4e512f[_0x40b226(0x6e1)],..._0x333b88?{'currentFilter':_0x6ed3b(_0x333b88)}:{}};}let _0xf4f2cb={'type':_0x1ed97c[_0x34037b(0x176)]['OPERATION'],'id':_0x34037b(0x2de),async 'handler'(_0x218f3d){const _0x48d9c3=_0x34037b;let _0xd2d9b7=_0x190883(_0x218f3d);if(!_0xd2d9b7)return!0x1;let _0x1888ce=_0x218f3d['get'](_0x2ef21f['IDialogService']),_0x4ddbd2=_0x218f3d[_0x48d9c3(0x339)](_0x1ed97c[_0x48d9c3(0x4ad)]),_0x410e23=null,_0x1e8335=!0x1,_0x4d798a=!0x1,_0x355b23=()=>{const _0x534d8e=_0x48d9c3;_0x1e8335||(_0x1e8335=!0x0,_0x410e23==null||_0x410e23[_0x534d8e(0x5c4)](),_0x410e23=null);},_0x217212=async _0x2a7069=>{const _0x1c347b=_0x48d9c3;if(!_0x4d798a){_0x4d798a=!0x0;try{let _0x496eca=_0x4e92f0(_0x218f3d,_0xd2d9b7);if(!_0x496eca||_0x2a7069&&(!_0x496eca[_0x1c347b(0x5cb)][_0x1c347b(0x39f)][_0x2a7069[_0x1c347b(0x2ea)]]||!_0x496eca[_0x1c347b(0x5cb)][_0x1c347b(0x3e0)][_0x1c347b(0x5fe)](_0x2a7069[_0x1c347b(0x2ea)])||!(0x0,_0x55c699[_0x1c347b(0x290)])(_0x2a7069['operator'])))return;await _0x218f3d[_0x1c347b(0x339)](_0x1ed97c[_0x1c347b(0x4ab)])['executeCommand'](_0x5ec675['SetPivotValueFilterCommand']['id'],{'unitId':_0xd2d9b7['unitId'],'subUnitId':_0xd2d9b7['subUnitId'],'pivotTableId':_0xd2d9b7[_0x1c347b(0x3bb)],'fieldId':_0xd2d9b7['targetFieldId'],'valueFilterInfo':_0x2a7069?{..._0x2a7069,'type':_0x55c699[_0x1c347b(0x16d)][_0x1c347b(0x31d)],'expected':Array[_0x1c347b(0x49e)](_0x2a7069[_0x1c347b(0x66a)])?_0x2a7069[_0x1c347b(0x66a)][_0x1c347b(0x6d2)]():_0x2a7069['expected']}:void 0x0});}catch{}finally{_0x355b23();}}};try{_0x410e23=_0x1888ce[_0x48d9c3(0x245)]({'id':'UNIVER_SHEET_PIVOT_VALUE_FILTER_DIALOG_ID','title':{'title':_0x4ddbd2['t'](_0x48d9c3(0x140))},'draggable':!0x0,'mask':!0x0,'maskClosable':!0x1,'width':0x1a4,'children':{'label':{'name':_0x594d0c,'props':{'targetFieldId':_0xd2d9b7[_0x48d9c3(0x47a)],'targetFieldName':_0xd2d9b7[_0x48d9c3(0x2cb)],'valueFields':_0xd2d9b7[_0x48d9c3(0x3e0)],'defaultValueFieldId':_0xd2d9b7[_0x48d9c3(0x6e1)],'currentFilter':_0xd2d9b7['currentFilter'],'onConfirm':_0x5629ba=>_0x217212(_0x5629ba),'onClear':()=>_0x217212(void 0x0),'onCancel':_0x355b23}}},'onClose':_0x355b23});}catch{return _0x355b23(),!0x1;}return!0x0;}},_0x46fdd4='sheet.pivot.context-menu.date-group',_0x2cd41d=_0x34037b(0x20e),_0x16205f=_0x34037b(0x3a0),_0x193702=_0x34037b(0x655),_0x54856e=_0x34037b(0x177),_0x399d7e=_0x34037b(0x530),_0x5359e5='sheet.pivot.context-menu.show-data-as',_0x51d405=_0x34037b(0x6ed),_0xb77d93={'year':_0x34037b(0x328),'year-quarter':_0x34037b(0x546),'quarter':'sheets-pivot-ui.dateGroup.quarter','year-month':_0x34037b(0x372),'month':_0x34037b(0x52f),'month-date':_0x34037b(0x4c4),'year-month-date':'sheets-pivot-ui.dateGroup.yearMonthDate','date':_0x34037b(0x506),'hour':_0x34037b(0x431),'minute':_0x34037b(0x6e4),'hour-minute':_0x34037b(0x2d1)};function _0xf93a4f(_0x17e151){const _0x919682=_0x34037b;return{'id':_0x288ca1['id'],'type':_0x2ef21f['MenuItemType'][_0x919682(0x6b8)],'icon':_0x919682(0x478),'hidden$':(0x0,_0x2ef21f['getMenuHiddenObservable'])(_0x17e151,_0x1ed97c['UniverInstanceType']['UNIVER_SHEET']),'disabled$':(0x0,_0x21977c[_0x919682(0x289)])(_0x17e151,(0x0,_0x21977c[_0x919682(0x3f6)])(_0x17e151,{'workbookTypes':[_0x44d557[_0x919682(0x1d0)]],'worksheetTypes':[_0x44d557['WorksheetViewPermission'],_0x44d557[_0x919682(0x64c)]],'rangeTypes':[_0x44d557[_0x919682(0x43e)]]})),'tooltip':_0x919682(0x246),'title':_0x919682(0x246)};}function _0x5d4296(_0x1f2235){const _0x59fcaf=_0x34037b;return{'id':_0x46fdd4,'type':_0x2ef21f['MenuItemType'][_0x59fcaf(0x610)],'title':_0x59fcaf(0x17c),'hidden$':_0x59042e(_0x1f2235)};}function _0x596e58(_0x411e1b){const _0x164ac3=_0x34037b;return{'id':_0x2cd41d,'commandId':_0x5c3106['id'],'type':_0x2ef21f[_0x164ac3(0x473)]['BUTTON'],'title':_0x164ac3(0x4f2),'hidden$':_0x27b227(_0x411e1b)[_0x164ac3(0x1dd)]((0x0,_0x3ae495['map'])(()=>!_0x253277(_0x411e1b)))};}function _0x580e1e(_0x42e896){const _0x192231=_0x34037b;return{'id':_0x16205f,'commandId':_0x28bfcc['id'],'type':_0x2ef21f[_0x192231(0x473)][_0x192231(0x6b8)],'title':_0x192231(0x5e8),'hidden$':_0x27b227(_0x42e896)[_0x192231(0x1dd)]((0x0,_0x3ae495[_0x192231(0x23e)])(()=>!_0x1aedd0(_0x42e896)))};}function _0x41e5ff(_0xa66b07){const _0x10a313=_0x34037b;return{'id':_0x193702,'commandId':_0x25ab52['id'],'type':_0x2ef21f[_0x10a313(0x473)]['BUTTON'],'title':_0x10a313(0x476),'hidden$':_0x27b227(_0xa66b07)[_0x10a313(0x1dd)]((0x0,_0x3ae495[_0x10a313(0x23e)])(()=>!_0x2ade2a(_0xa66b07,'group')))};}function _0x27e504(_0x5d8563){const _0x4cf1cf=_0x34037b;return{'id':_0x54856e,'commandId':_0x2670c7['id'],'type':_0x2ef21f[_0x4cf1cf(0x473)][_0x4cf1cf(0x6b8)],'title':_0x4cf1cf(0x219),'hidden$':_0x27b227(_0x5d8563)[_0x4cf1cf(0x1dd)]((0x0,_0x3ae495[_0x4cf1cf(0x23e)])(()=>!_0x2ade2a(_0x5d8563,'rename')))};}function _0x5479d4(_0x21823c){const _0x4d5e6f=_0x34037b;return{'id':_0x399d7e,'commandId':_0x40b133['id'],'type':_0x2ef21f[_0x4d5e6f(0x473)][_0x4d5e6f(0x6b8)],'title':_0x4d5e6f(0x4e1),'hidden$':_0x27b227(_0x21823c)[_0x4d5e6f(0x1dd)]((0x0,_0x3ae495[_0x4d5e6f(0x23e)])(()=>!_0x2ade2a(_0x21823c,_0x4d5e6f(0x1b9))))};}function _0x2272a6(_0x100c57){const _0x17f85d=_0x34037b;return _0xd267fd=>({'id':_0x50bbcf(_0x100c57),'commandId':_0x1ccce8['id'],'type':_0x2ef21f[_0x17f85d(0x473)][_0x17f85d(0x6b8)],'title':_0xb77d93[_0x100c57],'params':{'dateType':_0x100c57},'disabled$':_0xd6bf68(_0xd267fd,_0x100c57),'activated$':_0x485a1f(_0xd267fd,_0x100c57)});}function _0x50bbcf(_0x184424){const _0x18e1fb=_0x34037b;return _0x18e1fb(0x4f3)+_0x184424;}function _0x59042e(_0x485d68){const _0x5963bf=_0x34037b;return _0x27b227(_0x485d68)[_0x5963bf(0x1dd)]((0x0,_0x3ae495[_0x5963bf(0x23e)])(()=>!_0x1b213f(_0x485d68)));}function _0xd6bf68(_0x474fa9,_0x3ba72c){return _0x27b227(_0x474fa9)['pipe']((0x0,_0x3ae495['map'])(()=>{const _0x347b3e=_0x5115;let _0x21f4ed=_0x1b213f(_0x474fa9);return!_0x21f4ed||(0x0,_0x5ec675[_0x347b3e(0x42c)])(_0x21f4ed[_0x347b3e(0x249)],_0x3ba72c);}));}function _0x485a1f(_0x17930a,_0xf4451d){const _0x342cca=_0x34037b;return _0x27b227(_0x17930a)[_0x342cca(0x1dd)]((0x0,_0x3ae495[_0x342cca(0x23e)])(()=>{let _0x28ba88=_0x1b213f(_0x17930a);return(_0x28ba88==null?void 0x0:_0x28ba88['dateGroupContext']['currentDateType'])===_0xf4451d;}));}function _0x27b227(_0x544b00){const _0xac69a9=_0x34037b;let _0xc7ffa2=_0x544b00[_0xac69a9(0x339)](_0x5ec675['SheetsPivotTableConfigModel']),_0x326716=()=>{const _0x2329a0=_0xac69a9;var _0x53b424;let _0x34d39a=(0x0,_0x44d557[_0x2329a0(0x38b)])(_0x544b00[_0x2329a0(0x339)](_0x1ed97c[_0x2329a0(0x61a)])),_0x2f204c=(_0x53b424=_0x544b00[_0x2329a0(0x339)](_0x44d557[_0x2329a0(0x198)])[_0x2329a0(0x455)]())==null?void 0x0:_0x53b424[_0x2329a0(0x326)];if(!_0x34d39a||!_0x2f204c)return;let {unitId:_0x19c2f7,subUnitId:_0x44acc}=_0x34d39a,_0x38a5f1=_0x544b00[_0x2329a0(0x339)](_0x5ec675[_0x2329a0(0x558)])[_0x2329a0(0x367)](_0x19c2f7,_0x44acc,_0x2f204c[_0x2329a0(0x6dd)],_0x2f204c['startColumn']);return _0x38a5f1?{'unitId':_0x19c2f7,'subUnitId':_0x44acc,'pivotTableId':_0x38a5f1}:void 0x0;};return(0x0,_0x3ae495['merge'])(_0x544b00[_0xac69a9(0x339)](_0x44d557[_0xac69a9(0x198)])[_0xac69a9(0x38a)],_0xc7ffa2['pivotConfigChange$']['pipe']((0x0,_0x3ae495[_0xac69a9(0x154)])(_0x511180=>{const _0xf4448=_0xac69a9;let _0x2f09e9=_0x326716();return(_0x2f09e9==null?void 0x0:_0x2f09e9[_0xf4448(0x6bb)])===_0x511180['unitId']&&_0x2f09e9[_0xf4448(0x42b)]===_0x511180[_0xf4448(0x42b)]&&_0x2f09e9[_0xf4448(0x3bb)]===_0x511180['pivotTableId'];})),_0xc7ffa2['collectionChange$'][_0xac69a9(0x1dd)]((0x0,_0x3ae495[_0xac69a9(0x154)])(_0x2bf13a=>{const _0x88ef7f=_0xac69a9;let _0xc024b2=_0x326716();if(!_0xc024b2||!_0x2bf13a[_0x88ef7f(0x447)][_0x88ef7f(0x5fe)](_0xc024b2[_0x88ef7f(0x3bb)]))return!0x1;let _0x5a44d7=_0xc7ffa2[_0x88ef7f(0x399)](_0xc024b2['unitId'],_0xc024b2[_0x88ef7f(0x42b)],_0xc024b2[_0x88ef7f(0x3bb)]);return _0x2bf13a[_0x88ef7f(0x6bb)]===((_0x5a44d7==null?void 0x0:_0x5a44d7[_0x88ef7f(0x358)][_0x88ef7f(0x6bb)])??_0xc024b2[_0x88ef7f(0x6bb)]);})))[_0xac69a9(0x1dd)]((0x0,_0x3ae495[_0xac69a9(0x392)])(null));}let _0x4e5a1e=_0x5ec675[_0x34037b(0x3dc)]['map'](_0x34baca=>({'dateType':_0x34baca,'id':_0x50bbcf(_0x34baca),'menuItemFactory':_0x2272a6(_0x34baca)}));function _0x2bfb70(_0x4825d0){const _0x3f030c=_0x34037b;return{'id':_0x5359e5,'type':_0x2ef21f[_0x3f030c(0x473)]['SUBITEMS'],'title':'sheets-pivot-ui.showValuesAs.title','hidden$':_0x420a86(_0x4825d0)[_0x3f030c(0x1dd)]((0x0,_0x3ae495[_0x3f030c(0x23e)])(()=>!_0x5e0dd0(_0x4825d0)))};}function _0x40c091(_0xfdd1c7){const _0x2e7c3d=_0x34037b;return _0x4ca111=>({'id':_0x292898(_0xfdd1c7[_0x2e7c3d(0x490)]),'commandId':_0x5f228f['id'],'type':_0x2ef21f['MenuItemType'][_0x2e7c3d(0x6b8)],'title':_0xfdd1c7[_0x2e7c3d(0x6b9)],'params':{'type':_0xfdd1c7[_0x2e7c3d(0x490)]},'activated$':_0x420a86(_0x4ca111)[_0x2e7c3d(0x1dd)]((0x0,_0x3ae495[_0x2e7c3d(0x23e)])(()=>{const _0x13709b=_0x2e7c3d;let _0x306be2=_0x5e0dd0(_0x4ca111);return!!(_0x306be2&&(_0x306be2[_0x13709b(0x62f)]['type']??_0x55c699[_0x13709b(0x234)][_0x13709b(0x1d6)])===_0xfdd1c7[_0x13709b(0x490)]);}))});}function _0x292898(_0x3ed585){return'sheet.pivot.context-menu.show-data-as.'+_0x3ed585;}function _0x420a86(_0x1091df){const _0x4bfdf2=_0x34037b;return _0x1091df[_0x4bfdf2(0x339)](_0x44d557[_0x4bfdf2(0x198)])[_0x4bfdf2(0x38a)][_0x4bfdf2(0x1dd)]((0x0,_0x3ae495['startWith'])(null));}let _0x559efd=_0x3ce038[_0x34037b(0x23e)](_0x4f0d73=>({'rule':_0x4f0d73,'id':_0x292898(_0x4f0d73[_0x34037b(0x490)]),'menuItemFactory':_0x40c091(_0x4f0d73)}));function _0xc02f83(_0x553847){const _0x764968=_0x34037b;return{'id':_0x51d405,'commandId':_0xf4f2cb['id'],'type':_0x2ef21f[_0x764968(0x473)][_0x764968(0x6b8)],'title':'sheets-pivot-ui.valueFilter.title','hidden$':_0x553847['get'](_0x44d557[_0x764968(0x198)])[_0x764968(0x38a)][_0x764968(0x1dd)]((0x0,_0x3ae495['startWith'])(null),(0x0,_0x3ae495[_0x764968(0x23e)])(()=>!_0x190883(_0x553847)))};}let _0x335361=_0x4e5a1e['reduce']((_0x27a544,_0x25f1e9,_0x779fa0)=>(_0x27a544[_0x25f1e9['id']]={'order':_0x779fa0+0x1,'menuItemFactory':_0x25f1e9[_0x34037b(0x25b)]},_0x27a544),{}),_0x698e60=_0x559efd['reduce']((_0x46d74b,_0x57d542,_0x1f6383)=>(_0x46d74b[_0x57d542['id']]={'order':_0x1f6383+0x1,'menuItemFactory':_0x57d542['menuItemFactory']},_0x46d74b),{}),_0xe95c8={[_0x2ef21f['RibbonDataGroup'][_0x34037b(0x5f9)]]:{[_0x288ca1['id']]:{'order':0x1,'gridLayout':{'row':0x2,'column':0x1},'menuItemFactory':_0xf93a4f}},[_0x2ef21f[_0x34037b(0x427)]['MAIN_AREA']]:{[_0x2ef21f[_0x34037b(0x6e7)][_0x34037b(0x62e)]]:{[_0x288ca1['id']]:{'order':0x1,'menuItemFactory':_0xf93a4f},[_0x46fdd4]:{'order':0x2,'menuItemFactory':_0x5d4296,..._0x335361},[_0x2cd41d]:{'order':0x3,'menuItemFactory':_0x596e58},[_0x16205f]:{'order':0x4,'menuItemFactory':_0x580e1e},[_0x193702]:{'order':0x5,'menuItemFactory':_0x41e5ff},[_0x54856e]:{'order':0x6,'menuItemFactory':_0x27e504},[_0x399d7e]:{'order':0x7,'menuItemFactory':_0x5479d4},[_0x5359e5]:{'order':0x8,'menuItemFactory':_0x2bfb70,..._0x698e60},[_0x51d405]:{'order':0x9,'menuItemFactory':_0xc02f83}}},[_0x2ef21f['ContextMenuPosition']['COL_HEADER']]:{[_0x2ef21f[_0x34037b(0x6e7)][_0x34037b(0x62e)]]:{[_0x288ca1['id']]:{'order':0x1,'menuItemFactory':_0xf93a4f},[_0x46fdd4]:{'order':0x2,'menuItemFactory':_0x5d4296,..._0x335361},[_0x2cd41d]:{'order':0x3,'menuItemFactory':_0x596e58},[_0x16205f]:{'order':0x4,'menuItemFactory':_0x580e1e},[_0x193702]:{'order':0x5,'menuItemFactory':_0x41e5ff},[_0x54856e]:{'order':0x6,'menuItemFactory':_0x27e504},[_0x399d7e]:{'order':0x7,'menuItemFactory':_0x5479d4}}}};var _0xb51988='@univerjs-pro/sheets-pivot-ui',_0x420eec=_0x34037b(0x3ad);let _0x30f033={'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'id':_0x34037b(0x494),async 'handler'(_0x3c4f82,_0x19c725){const _0x1a11a3=_0x34037b;if(!_0x19c725)return!0x1;let {row:_0x14df9f,col:_0xd371a1,unitId:_0x54acb2,subUnitId:_0x2ed5dc,tableFieldId:_0x43b12a,pivotTableId:_0x4912ae}=_0x19c725,_0x275720=_0x3c4f82[_0x1a11a3(0x339)](_0x5ec675[_0x1a11a3(0x558)]),_0x20a900=_0x4912ae||_0x275720['getPivotTableIdByCell'](_0x54acb2,_0x2ed5dc,_0x14df9f,_0xd371a1);if(!_0x20a900)return!0x1;let _0x918b3d=_0x3c4f82[_0x1a11a3(0x339)](_0x5ec675[_0x1a11a3(0x43d)]),_0x501184=_0x275720[_0x1a11a3(0x3b8)](_0x54acb2,_0x2ed5dc,_0x20a900);if(!(_0x501184!=null&&_0x501184['rangesInfo']))return!0x1;let _0x19476a=_0x275720[_0x1a11a3(0x3b9)](_0x54acb2,_0x2ed5dc,_0x14df9f,_0xd371a1),_0x159d90=(await _0x918b3d[_0x1a11a3(0x692)]({'unitId':_0x54acb2,'subUnitId':_0x2ed5dc,'pivotTableId':_0x20a900,'params':{'type':_0x5ec675[_0x1a11a3(0x414)]['Filter'],'filter':{'row':_0x14df9f,'col':_0xd371a1,'tableFieldId':_0x43b12a,'cellData':_0x19476a,'pivotItemRenderInfoCache':_0x501184}}}))[_0x1a11a3(0x420)][_0x1a11a3(0x154)];if(!_0x159d90)return!0x1;let _0x2333ef=_0x3c4f82['get'](_0x2ef21f['IDialogService']),_0x1e7b78={'id':_0x24e684,'draggable':!0x0,'mask':!0x1,'maskClosable':!0x1,'width':0x150,'dialogStyles':{'header':{'padding':_0x1a11a3(0x622),'height':0x0},'body':{'padding':'0\x2016px\x2016px'}},'closable':!0x1,'children':{'label':_0x32bf4e,'unitId':_0x54acb2,'subUnitId':_0x2ed5dc,'key':_0x14df9f+'-'+_0xd371a1+'-'+(_0x43b12a||''),'filterItemInfo':_0x159d90},'onClose':()=>{const _0x38bd88=_0x1a11a3;_0x2333ef[_0x38bd88(0x6a2)](_0x24e684);}};return _0x2333ef[_0x1a11a3(0x245)](_0x1e7b78),!0x0;}},_0x54b7ed={'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'id':'sheet.operation.open-pivot-table-field-setting-panel','handler'(_0x1cc4fb,_0x27209a){const _0x241f02=_0x34037b;if(!_0x27209a)return!0x1;let _0x3fff3a=_0x1cc4fb[_0x241f02(0x339)](_0x1ed97c[_0x241f02(0x4ad)]),{tableFieldId:_0x12d5b5,pivotTableId:_0x4ba4d2,unitId:_0x49da11,subUnitId:_0x29c227,tableFieldInfo:_0x54293e,dataFieldInfo:_0x3bce57}=_0x27209a,_0x3e1522=_0x1cc4fb[_0x241f02(0x339)](_0x2ef21f['IDialogService']),_0x5483ef={'id':_0x178877,'title':{'title':_0x3fff3a['t'](_0x241f02(0x2c3))},'draggable':!0x0,'mask':!0x1,'maskClosable':!0x1,'width':0x190,'children':{'label':_0xce0285,'tableFieldId':_0x12d5b5,'pivotTableId':_0x4ba4d2,'tableFieldInfo':_0x54293e,'dataFieldInfo':_0x3bce57,'unitId':_0x49da11,'subUnitId':_0x29c227,'version':Math[_0x241f02(0x673)](),'key':_0x241f02(0x26d)+(_0x12d5b5||''),'closeFn':()=>{const _0x203234=_0x241f02;_0x3e1522[_0x203234(0x6a2)](_0x178877);}},'onClose':()=>{const _0x4f19d4=_0x241f02;_0x3e1522[_0x4f19d4(0x6a2)](_0x178877);}};return _0x3e1522[_0x241f02(0x245)](_0x5483ef),!0x0;}};function _0x2d5dca(_0xbf1cde,_0x40cae4,_0x3a0197){const _0xca7119=_0x34037b;let _0x364402=_0x3a0197[_0xca7119(0x4d0)],{fieldsConfig:_0x342f47}=_0x40cae4,{rowFields:_0x103485,columnFields:_0x423040,valueFields:_0x931508,filterFields:_0x431cc8,hiddenFields:_0x43f160,dimension:_0x327d8c,measure:_0x41e476,valueIndex:_0x1f4e9b,valuePosition:_0x4bca74}=_0x342f47,_0x25959b=new Set();[..._0x103485,..._0x423040,..._0x931508,..._0x431cc8,..._0x43f160][_0xca7119(0x596)](_0x4b4756=>{const _0x2655be=_0xca7119;let _0x6b9849=_0x327d8c[_0x4b4756]||_0x41e476[_0x4b4756];_0x6b9849&&_0x25959b[_0x2655be(0x3d4)](_0x6b9849[_0x2655be(0x443)]);});let _0x376c34=_0x364402[_0xca7119(0x23e)](_0x103344=>{const _0x56f48c=_0xca7119;let _0x1b8448=_0x3a0197['fields'][_0x103344];return{'checked':_0x25959b[_0x56f48c(0x3bd)](_0x103344),'dataFieldId':_0x1b8448['id'],'id':_0x1b8448['id'],'name':_0x1b8448[_0x56f48c(0x3a1)],'type':_0x1b8448[_0x56f48c(0x35e)],'pivotTableId':_0xbf1cde};}),_0x1cbb2a=_0x103485[_0xca7119(0x282)](_0xd6ae41=>{const _0x136c4a=_0xca7119;let _0x4d5eff=_0x327d8c[_0xd6ae41];return _0x4d5eff?[{'dataFieldId':_0x4d5eff[_0x136c4a(0x443)],'tableFieldId':_0x4d5eff['id'],'displayName':_0x4d5eff['displayName']}]:[];}),_0x1ee3e8=_0x423040[_0xca7119(0x282)](_0x1fb592=>{const _0x250cba=_0xca7119;let _0x3f5362=_0x327d8c[_0x1fb592];return _0x3f5362?[{'dataFieldId':_0x3f5362[_0x250cba(0x443)],'tableFieldId':_0x3f5362['id'],'displayName':_0x3f5362['displayName']}]:[];}),_0x238231=_0x931508[_0xca7119(0x282)](_0x1bc0a8=>{const _0x44cbc2=_0xca7119;let _0x12c59b=_0x41e476[_0x1bc0a8];return _0x12c59b?[{'dataFieldId':_0x12c59b[_0x44cbc2(0x443)],'tableFieldId':_0x12c59b['id'],'displayName':_0x12c59b[_0x44cbc2(0x381)],'format':_0x12c59b[_0x44cbc2(0x60b)],'subTotalType':_0x12c59b[_0x44cbc2(0x19e)]}]:[];}),_0x27dac1=_0x431cc8[_0xca7119(0x282)](_0x441ab2=>{let _0x4cfd71=_0x327d8c[_0x441ab2];return _0x4cfd71?[{'dataFieldId':_0x4cfd71['dataFieldId'],'tableFieldId':_0x4cfd71['id'],'displayName':_0x4cfd71['displayName']}]:[];}),_0x2f35c8=_0x43f160[_0xca7119(0x282)](_0x552253=>{const _0xe13f31=_0xca7119;let _0xb70469=_0x327d8c[_0x552253];return _0xb70469?[{'dataFieldId':_0xb70469[_0xe13f31(0x443)],'tableFieldId':_0xb70469['id'],'displayName':_0xb70469[_0xe13f31(0x381)],'filterInfo':_0xb70469['filterInfo']}]:[];});return _0x238231[_0xca7119(0x3d7)]>0x1&&(_0x4bca74===_0x55c699[_0xca7119(0x360)][_0xca7119(0x371)]?_0x1cbb2a:_0x1ee3e8)[_0xca7119(0x36a)](_0x1f4e9b,0x0,{'dataFieldId':'','tableFieldId':_0xca7119(0x4d9),'displayName':_0xca7119(0x5f7)}),{'sourceList':_0x376c34,'sourceRange':_0x40cae4[_0xca7119(0x358)],'rowFields':_0x1cbb2a,'columnFields':_0x1ee3e8,'valueFields':_0x238231,'filterFields':_0x27dac1,'hiddenFields':_0x2f35c8,'positionInfo':_0x40cae4['targetCellInfo']};}let _0x5f33e8={'type':_0x1ed97c[_0x34037b(0x176)][_0x34037b(0x62a)],'id':_0x34037b(0x2e8),async 'handler'(_0x51e6ff,_0xda53f0){const _0x5ee19c=_0x34037b;let _0x507b3a=_0xda53f0==null?void 0x0:_0xda53f0[_0x5ee19c(0x3bb)];if(!_0x507b3a)return!0x1;let _0x41cb9b=_0x51e6ff[_0x5ee19c(0x339)](_0x2ef21f[_0x5ee19c(0x3b3)]),_0x338723=_0x51e6ff[_0x5ee19c(0x339)](_0x1ed97c[_0x5ee19c(0x61a)]),_0x11f0e7=_0x51e6ff[_0x5ee19c(0x339)](_0x1ed97c['LocaleService']),_0x51755f=_0x51e6ff[_0x5ee19c(0x339)](_0x5ec675[_0x5ee19c(0x1c2)]),_0xbec3bf=(0x0,_0x44d557['getSheetCommandTarget'])(_0x338723);if(!_0xbec3bf)return!0x1;let {unitId:_0x8d9185,subUnitId:_0x47896c}=_0xbec3bf,_0x548282=_0x51755f[_0x5ee19c(0x399)](_0x8d9185,_0x47896c,_0x507b3a),_0x172481=_0x51755f[_0x5ee19c(0x5c2)](_0x8d9185,_0x507b3a);if(!_0x548282||!_0x172481)return!0x1;let _0x3d64e5=_0x2d5dca(_0x507b3a,_0x548282,_0x172481),_0x15f94f={'header':{'title':_0x11f0e7['t'](_0x5ee19c(0x246))},'id':_0x414c39,'children':{'label':_0x4a650f,'panelInfo':_0x3d64e5,'version':Math[_0x5ee19c(0x673)](),'setVersion':()=>Math[_0x5ee19c(0x673)](),'pivotTableId':_0x507b3a,'unitId':_0x8d9185,'subUnitId':_0x47896c},'width':0x15a};return _0x41cb9b[_0x5ee19c(0x245)](_0x15f94f),!0x0;}},_0x525de5=_0x34037b(0x59c),_0x29acb0={};function _0x3cc5c8(_0x43883d){'@babel/helpers - typeof';const _0x32b8ec=_0x34037b;return _0x3cc5c8=typeof Symbol=='function'&&typeof Symbol[_0x32b8ec(0x2da)]=='symbol'?function(_0xa2445f){return typeof _0xa2445f;}:function(_0x2fea55){const _0x4b9cb4=_0x32b8ec;return _0x2fea55&&typeof Symbol==_0x4b9cb4(0x663)&&_0x2fea55[_0x4b9cb4(0x69f)]===Symbol&&_0x2fea55!==Symbol['prototype']?_0x4b9cb4(0x50e):typeof _0x2fea55;},_0x3cc5c8(_0x43883d);}function _0xe8f411(_0x52e541,_0x20c8d2){const _0xa6f673=_0x34037b;if(_0x3cc5c8(_0x52e541)!=_0xa6f673(0x68c)||!_0x52e541)return _0x52e541;var _0x5b597f;if(typeof Symbol<'u'&&(_0x5b597f=_0x52e541[Symbol['toPrimitive']])!==void 0x0){var _0x12a9d3=_0x5b597f['call'](_0x52e541,_0x20c8d2||'default');if(_0x3cc5c8(_0x12a9d3)!=_0xa6f673(0x68c))return _0x12a9d3;throw TypeError(_0xa6f673(0x27e));}return(_0x20c8d2===_0xa6f673(0x40c)?String:Number)(_0x52e541);}function _0x536298(_0xb75917){const _0x1e34c4=_0x34037b;var _0x1325e8=_0xe8f411(_0xb75917,_0x1e34c4(0x40c));return _0x3cc5c8(_0x1325e8)=='symbol'?_0x1325e8:_0x1325e8+'';}function _0x27eded(_0x3512d1,_0x2d2940,_0x59e5d9){const _0x3ba4aa=_0x34037b;return(_0x2d2940=_0x536298(_0x2d2940))in _0x3512d1?Object[_0x3ba4aa(0x6eb)](_0x3512d1,_0x2d2940,{'value':_0x59e5d9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3512d1[_0x2d2940]=_0x59e5d9,_0x3512d1;}function _0x5e4599(_0x576d7a,_0x410538){return function(_0x28016a,_0x34c138){_0x410538(_0x28016a,_0x34c138,_0x576d7a);};}function _0x41bfa1(_0x12777a,_0x233f79,_0x48f4d9,_0x10fe82){const _0x24fcb3=_0x34037b;var _0x578ce2=arguments[_0x24fcb3(0x3d7)],_0x4a9987=_0x578ce2<0x3?_0x233f79:_0x10fe82===null?_0x10fe82=Object[_0x24fcb3(0x3df)](_0x233f79,_0x48f4d9):_0x10fe82,_0x2fbbbf;if(typeof Reflect==_0x24fcb3(0x68c)&&typeof Reflect[_0x24fcb3(0x391)]=='function')_0x4a9987=Reflect[_0x24fcb3(0x391)](_0x12777a,_0x233f79,_0x48f4d9,_0x10fe82);else{for(var _0x5dedfa=_0x12777a[_0x24fcb3(0x3d7)]-0x1;_0x5dedfa>=0x0;_0x5dedfa--)(_0x2fbbbf=_0x12777a[_0x5dedfa])&&(_0x4a9987=(_0x578ce2<0x3?_0x2fbbbf(_0x4a9987):_0x578ce2>0x3?_0x2fbbbf(_0x233f79,_0x48f4d9,_0x4a9987):_0x2fbbbf(_0x233f79,_0x48f4d9))||_0x4a9987);}return _0x578ce2>0x3&&_0x4a9987&&Object['defineProperty'](_0x233f79,_0x48f4d9,_0x4a9987),_0x4a9987;}let _0x5d54c8=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x33e94c,_0x362124,_0x3b5cb3,_0x1262ad,_0x4d4a4b,_0x22e323,_0x3dc86e,_0x362bc0){const _0x31b4c6=_0x34037b;var _0xa4a049;super(),this[_0x31b4c6(0x535)]=_0x33e94c,this[_0x31b4c6(0x635)]=_0x362124,this[_0x31b4c6(0x51c)]=_0x3b5cb3,this[_0x31b4c6(0x632)]=_0x1262ad,this[_0x31b4c6(0x582)]=_0x4d4a4b,this[_0x31b4c6(0x1f4)]=_0x22e323,this[_0x31b4c6(0x206)]=_0x3dc86e,this[_0x31b4c6(0x583)]=_0x362bc0,_0x27eded(this,_0x31b4c6(0x306),!0x1),this[_0x31b4c6(0x2a7)](this[_0x31b4c6(0x583)][_0x31b4c6(0x226)](_0x5ec675[_0x31b4c6(0x464)]['id'])),this[_0x31b4c6(0x17d)](),this[_0x31b4c6(0x306)]=((_0xa4a049=this['_configService'][_0x31b4c6(0x609)](_0x5ec675[_0x31b4c6(0x2c4)]))==null?void 0x0:_0xa4a049[_0x31b4c6(0x297)])??!0x1;}[_0x34037b(0x57b)](_0x5e22c8,_0x2d2a3f,_0x12516e){const _0x57cde7=_0x34037b;return(0x0,_0x5ec675[_0x57cde7(0x64a)])(_0x5e22c8,_0x2d2a3f,_0x12516e,this[_0x57cde7(0x535)]['getDirection']());}[_0x34037b(0x17d)](){const _0x118081=_0x34037b;this[_0x118081(0x582)][_0x118081(0x5e7)][_0x118081(0x660)](this[_0x118081(0x582)][_0x118081(0x5e7)][_0x118081(0x500)]()[_0x118081(0x5d8)],{'handler':async(_0x2f0772,_0x382865)=>{const _0x3c0785=_0x118081;let {cellInfo:_0x83af33,view:_0xb4907f,isEmpty:_0x4084a4}=_0x382865,{unitId:_0x2f4655,subUnitId:_0x299ca5}=_0x83af33,_0x3bfef9=this[_0x3c0785(0x57b)](_0x83af33,_0xb4907f,_0x4084a4);if(!(0x0,_0x44d557['checkRangesEditablePermission'])(this['_injector'],_0x2f4655,_0x299ca5,_0x3bfef9)){let _0x25c228=this[_0x3c0785(0x535)]['t'](_0x3c0785(0x3eb));this[_0x3c0785(0x206)][_0x3c0785(0x3c5)](_0x25c228);}let _0x41e9a5=this[_0x3c0785(0x635)][_0x3c0785(0x529)]({'unitId':_0x2f4655,'subUnitId':_0x299ca5,'ranges':_0x3bfef9}),_0x1216af=(0x0,_0x5ec675[_0x3c0785(0x469)])(this['_injector'],_0x2f4655,_0x299ca5,_0x3bfef9);if(_0x41e9a5[_0x3c0785(0x337)][_0x3c0785(0x3d7)]||_0x1216af[_0x3c0785(0x363)]){if(this[_0x3c0785(0x306)])return Promise[_0x3c0785(0x1d5)](!0x0);{let _0x2ab367=await this[_0x3c0785(0x632)][_0x3c0785(0x5bc)]({'id':_0x3c0785(0x475),'title':{'title':this['_localeService']['t']('sheets-pivot-ui.perform.tips')},'children':{'title':this[_0x3c0785(0x535)]['t'](_0x3c0785(0x48c))},'cancelText':this['_localeService']['t']('sheets-pivot-ui.perform.cancel'),'confirmText':this[_0x3c0785(0x535)]['t'](_0x3c0785(0x547))});return Promise[_0x3c0785(0x1d5)](_0x2ab367);}}return Promise['resolve'](!0x0);}});}};_0x5d54c8=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ad)])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557['SheetInterceptorService'])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c['IConfirmService'])),_0x5e4599(0x4,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x507)])),_0x5e4599(0x5,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x1fb)])),_0x5e4599(0x6,(0x0,_0x1ed97c['Inject'])(_0x44d557['SheetPermissionCheckController'])),_0x5e4599(0x7,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x21977c['SheetsRenderService']))],_0x5d54c8);function _0x5e1293({ref:_0x17514b,..._0x573e7f}){const _0x138f5a=_0x34037b;let {preserveStrokeWidth:_0x39b080,icon:_0x20a9e4,id:_0xa4c70e,className:_0x58ae77,extend:_0x9f4f17,..._0x920371}=_0x573e7f,_0x14f354=(_0x138f5a(0x2a4)+_0xa4c70e+'\x20'+(_0x58ae77||''))[_0x138f5a(0x6de)](),_0x1a25cd='_'+(0x0,_0x2b3aa2[_0x138f5a(0x474)])(),_0x4b58bd=(0x0,_0x2b3aa2[_0x138f5a(0x260)])(null);return(0x0,_0x2b3aa2[_0x138f5a(0x5b9)])(_0x17514b,()=>_0x4b58bd[_0x138f5a(0x56b)]),(0x0,_0x2b3aa2[_0x138f5a(0x384)])(()=>{const _0x147aa6=_0x138f5a;if(_0x39b080&&_0x4b58bd[_0x147aa6(0x56b)]&&_0x4b58bd[_0x147aa6(0x56b)][_0x147aa6(0x4e3)]===_0x20a9e4['tag'])return _0x5eac2e(_0x4b58bd[_0x147aa6(0x56b)]);},[_0x39b080,_0x20a9e4]),_0x15f18b(_0x20a9e4,''+_0xa4c70e,{'defIds':_0x20a9e4[_0x138f5a(0x292)],'idSuffix':_0x1a25cd},{'ref':_0x4b58bd,'className':_0x14f354,..._0x920371},_0x9f4f17);}function _0x15f18b(_0x5a3675,_0x341003,_0x2f0418,_0x372c06,_0x59cf5f){const _0x495733=_0x34037b;return(0x0,_0x2b3aa2[_0x495733(0x35f)])(_0x5a3675[_0x495733(0x677)],{'key':_0x341003,..._0x549fbe(_0x5a3675,_0x2f0418,_0x59cf5f),..._0x372c06},(_0x5855df(_0x5a3675,_0x2f0418)[_0x495733(0x23b)]||[])[_0x495733(0x23e)]((_0x5ef130,_0x50f59)=>_0x15f18b(_0x5ef130,_0x341003+'-'+_0x5a3675['tag']+'-'+_0x50f59,_0x2f0418,void 0x0,_0x59cf5f)));}function _0x549fbe(_0x55a56c,_0x4b7c9c,_0x514473){const _0x5c1d6c=_0x34037b;let _0x25f67a={..._0x55a56c['attrs']};_0x514473!=null&&_0x514473[_0x5c1d6c(0x1d3)]&&_0x25f67a[_0x5c1d6c(0x593)]==='colorChannel1'&&(_0x25f67a['fill']=_0x514473[_0x5c1d6c(0x1d3)]),_0x514473!=null&&_0x514473[_0x5c1d6c(0x1d3)]&&_0x25f67a[_0x5c1d6c(0x6d7)]==='colorChannel1'&&(_0x25f67a[_0x5c1d6c(0x6d7)]=_0x514473[_0x5c1d6c(0x1d3)]),_0x55a56c['tag']===_0x5c1d6c(0x654)&&_0x25f67a['id']&&(_0x25f67a['id']+=_0x4b7c9c[_0x5c1d6c(0x516)]),Object['entries'](_0x25f67a)[_0x5c1d6c(0x596)](([_0x3c181f,_0x279695])=>{const _0x172e89=_0x5c1d6c;_0x3c181f===_0x172e89(0x654)&&typeof _0x279695==_0x172e89(0x40c)&&(_0x25f67a[_0x3c181f]=_0x279695[_0x172e89(0x1a4)](/url\(#(.*)\)/,_0x172e89(0x606)+_0x4b7c9c[_0x172e89(0x516)]+')'));});let {defIds:_0x3adbbf}=_0x4b7c9c;return!_0x3adbbf||_0x3adbbf[_0x5c1d6c(0x3d7)]===0x0||(_0x55a56c[_0x5c1d6c(0x677)]===_0x5c1d6c(0x1ae)&&_0x25f67a[_0x5c1d6c(0x6a8)]&&(_0x25f67a[_0x5c1d6c(0x6a8)]+=_0x4b7c9c['idSuffix']),Object[_0x5c1d6c(0x1a3)](_0x25f67a)[_0x5c1d6c(0x596)](([_0x155451,_0x4f44e0])=>{const _0x2c293c=_0x5c1d6c;typeof _0x4f44e0=='string'&&(_0x25f67a[_0x155451]=_0x4f44e0[_0x2c293c(0x1a4)](/url\(#(.*)\)/,_0x2c293c(0x606)+_0x4b7c9c[_0x2c293c(0x516)]+')'));})),_0x25f67a;}function _0x5855df(_0x5a8d05,_0x2c5e76){const _0x244219=_0x34037b;var _0x396687;let {defIds:_0x597d3e}=_0x2c5e76;return!_0x597d3e||_0x597d3e[_0x244219(0x3d7)]===0x0?_0x5a8d05:_0x5a8d05[_0x244219(0x677)]===_0x244219(0x440)&&(_0x396687=_0x5a8d05[_0x244219(0x23b)])!=null&&_0x396687[_0x244219(0x3d7)]?{..._0x5a8d05,'children':_0x5a8d05[_0x244219(0x23b)]['map'](_0x127df6=>typeof _0x127df6[_0x244219(0x1ef)]['id']==_0x244219(0x40c)&&_0x597d3e&&_0x597d3e[_0x244219(0x5fe)](_0x127df6[_0x244219(0x1ef)]['id'])?{..._0x127df6,'attrs':{..._0x127df6[_0x244219(0x1ef)],'id':_0x127df6[_0x244219(0x1ef)]['id']+_0x2c5e76[_0x244219(0x516)]}}:_0x127df6)}:_0x5a8d05;}function _0x5eac2e(_0x415cc0){const _0x4885eb=_0x34037b;let _0x1bf72c=_0x415cc0['viewBox'][_0x4885eb(0x43f)],_0x14bd9d=Math[_0x4885eb(0x3d6)](_0x1bf72c[_0x4885eb(0x3b2)],_0x1bf72c[_0x4885eb(0x4da)]);if(!Number['isFinite'](_0x14bd9d)||_0x14bd9d<=0x0||_0x1bf72c[_0x4885eb(0x3b2)]<=0x0||_0x1bf72c['height']<=0x0)return()=>void 0x0;let _0x2c4ed0=0x10/_0x14bd9d,_0x4bb4e9=Array['from'](_0x415cc0['querySelectorAll'](_0x4885eb(0x2fd)))[_0x4885eb(0x282)](_0x21e42b=>{const _0x1077e0=_0x4885eb;let _0x5eb354=getComputedStyle(_0x21e42b),_0x2647bd=Number['parseFloat'](_0x5eb354[_0x1077e0(0x579)]);return _0x5eb354['stroke']===_0x1077e0(0x6a0)||Number[_0x1077e0(0x408)](_0x5eb354[_0x1077e0(0x356)])===0x0||_0x5eb354[_0x1077e0(0x322)]===_0x1077e0(0x617)||!Number[_0x1077e0(0x69a)](_0x2647bd)||_0x2647bd<=0x0?[]:[{'element':_0x21e42b,'hadStyleAttribute':_0x21e42b[_0x1077e0(0x573)](_0x1077e0(0x2ff)),'originalStrokeWidth':_0x2647bd,'strokeWidth':_0x58044f(_0x21e42b[_0x1077e0(0x2ff)],_0x1077e0(0x323))}];})[_0x4885eb(0x23e)](_0xb2dcd3=>({'appliedStrokeWidth':null,'element':_0xb2dcd3[_0x4885eb(0x6a6)],'hadStyleAttribute':_0xb2dcd3[_0x4885eb(0x405)],'isReleased':!0x1,'originalStrokeWidth':_0xb2dcd3['originalStrokeWidth'],'strokeWidth':_0xb2dcd3[_0x4885eb(0x579)]}));if(_0x4bb4e9[_0x4885eb(0x3d7)]===0x0)return()=>void 0x0;let _0x25d518=(_0x18d168,_0x9542ef)=>{const _0x10e88d=_0x4885eb;if(_0x1bf72c[_0x10e88d(0x3b2)]<=0x0||_0x1bf72c[_0x10e88d(0x4da)]<=0x0||_0x18d168<=0x0||_0x9542ef<=0x0)return;let _0x332fd8=Math[_0x10e88d(0x28e)](_0x18d168/_0x1bf72c[_0x10e88d(0x3b2)],_0x9542ef/_0x1bf72c[_0x10e88d(0x4da)]);!Number[_0x10e88d(0x69a)](_0x332fd8)||_0x332fd8<=0x0||_0x4bb4e9[_0x10e88d(0x596)](_0x1a33de=>{const _0x58185b=_0x10e88d;if(_0x1a33de['isReleased'])return;if(_0x1a33de[_0x58185b(0x6cb)]!==null&&(_0x1a33de[_0x58185b(0x6a6)][_0x58185b(0x2ff)][_0x58185b(0x49f)](_0x58185b(0x323))!==_0x1a33de[_0x58185b(0x6cb)]||_0x1a33de['element'][_0x58185b(0x2ff)][_0x58185b(0x694)](_0x58185b(0x323))!==_0x1a33de[_0x58185b(0x579)][_0x58185b(0x38c)])){_0x1a33de[_0x58185b(0x6cb)]=null,_0x1a33de[_0x58185b(0x1ea)]=!0x0;return;}let _0x4591ff=_0x1a33de[_0x58185b(0x298)]*_0x2c4ed0/_0x332fd8,_0x3f0200=Number(_0x4591ff[_0x58185b(0x3f5)](0xc))+'px';_0x1a33de['element'][_0x58185b(0x2ff)][_0x58185b(0x557)](_0x58185b(0x323),_0x3f0200,_0x1a33de[_0x58185b(0x579)][_0x58185b(0x38c)]),_0x1a33de[_0x58185b(0x6cb)]=_0x3f0200;});},_0x1c9073=_0x415cc0[_0x4885eb(0x489)]();_0x25d518(_0x1c9073[_0x4885eb(0x3b2)],_0x1c9073[_0x4885eb(0x4da)]);let _0x540f9c=typeof ResizeObserver>'u'?null:new ResizeObserver(_0x5b6dba=>{const _0x3ff9ee=_0x4885eb;if(_0x5b6dba[_0x3ff9ee(0x370)](_0x42100d=>_0x42100d['target']===_0x415cc0)){let _0x5817dd=_0x415cc0[_0x3ff9ee(0x489)]();_0x25d518(_0x5817dd['width'],_0x5817dd[_0x3ff9ee(0x4da)]);}});return _0x540f9c==null||_0x540f9c[_0x4885eb(0x552)](_0x415cc0),()=>{const _0x7ce0e1=_0x4885eb;_0x540f9c==null||_0x540f9c[_0x7ce0e1(0x304)](),_0x4bb4e9[_0x7ce0e1(0x596)](_0x43c353=>{const _0x36acd2=_0x7ce0e1;_0x43c353[_0x36acd2(0x6cb)]!==null&&(_0x3bb3f9(_0x43c353[_0x36acd2(0x6a6)]['style'],'stroke-width',_0x43c353['appliedStrokeWidth'],_0x43c353[_0x36acd2(0x579)][_0x36acd2(0x38c)],_0x43c353[_0x36acd2(0x579)]),!_0x43c353[_0x36acd2(0x405)]&&_0x43c353[_0x36acd2(0x6a6)][_0x36acd2(0x2ff)][_0x36acd2(0x3d7)]===0x0&&_0x43c353[_0x36acd2(0x6a6)]['removeAttribute'](_0x36acd2(0x2ff)));});};}function _0x58044f(_0x36fd91,_0xbb6d5b){const _0x2e7b86=_0x34037b;return{'priority':_0x36fd91[_0x2e7b86(0x694)](_0xbb6d5b),'value':_0x36fd91[_0x2e7b86(0x49f)](_0xbb6d5b)};}function _0x3bb3f9(_0x43f839,_0x5e590d,_0x76a0c1,_0xd0bfcd,_0x3af5a1){const _0x1a1d19=_0x34037b;_0x43f839['getPropertyValue'](_0x5e590d)===_0x76a0c1&&_0x43f839[_0x1a1d19(0x694)](_0x5e590d)===_0xd0bfcd&&(_0x3af5a1[_0x1a1d19(0x66f)]?_0x43f839[_0x1a1d19(0x557)](_0x5e590d,_0x3af5a1['value'],_0x3af5a1[_0x1a1d19(0x38c)]):_0x43f839[_0x1a1d19(0x613)](_0x5e590d));}_0x5e1293[_0x34037b(0x381)]='UniverIcon';let _0x597295={'tag':'svg','attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':'path','attrs':{'stroke':_0x34037b(0x135),'d':_0x34037b(0x445),'strokeLinecap':_0x34037b(0x2e4),'strokeLinejoin':'round','strokeWidth':1.2}}]},_0x3a1947=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x33892d,_0x309676){const _0x1bd46b=_0x34037b;return(0x0,_0x2b3aa2[_0x1bd46b(0x35f)])(_0x5e1293,Object[_0x1bd46b(0x258)]({},_0x33892d,{'id':_0x1bd46b(0x471),'ref':_0x309676,'icon':_0x597295}));});_0x3a1947[_0x34037b(0x381)]='ArrowLeftIcon';let _0x3e31f0={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':'0\x200\x2016\x2016','width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x64b)}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':'currentColor','d':_0x34037b(0x2f3),'fillRule':_0x34037b(0x321),'clipRule':'evenodd'}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x241),'fillRule':_0x34037b(0x321),'clipRule':_0x34037b(0x321)}}]},_0x508f58=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x26efe0,_0x2feace){const _0x4f14f8=_0x34037b;return(0x0,_0x2b3aa2[_0x4f14f8(0x35f)])(_0x5e1293,Object[_0x4f14f8(0x258)]({},_0x26efe0,{'id':_0x4f14f8(0x3e8),'ref':_0x2feace,'icon':_0x3e31f0}));});_0x508f58['displayName']=_0x34037b(0x1fc);let _0x592dd3={'tag':'svg','attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':'0\x200\x2016\x2016','width':_0x34037b(0x1e8),'height':'1em'},'children':[{'tag':'g','attrs':{'stroke':_0x34037b(0x135),'strokeLinecap':_0x34037b(0x2e4),'strokeLinejoin':'round','strokeWidth':1.2},'children':[{'tag':_0x34037b(0x3ce),'attrs':{'width':12.4,'height':0xb,'x':1.8,'y':3.2,'rx':1.2}},{'tag':_0x34037b(0x4aa),'attrs':{'d':_0x34037b(0x524)}}]}]},_0x4ad438=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x1e218c,_0x9d7ef9){const _0x14fcf2=_0x34037b;return(0x0,_0x2b3aa2[_0x14fcf2(0x35f)])(_0x5e1293,Object[_0x14fcf2(0x258)]({},_0x1e218c,{'id':_0x14fcf2(0x421),'ref':_0x9d7ef9,'icon':_0x592dd3}));});_0x4ad438[_0x34037b(0x381)]=_0x34037b(0x230);let _0x208fe5={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':'1em'},'children':[{'tag':'path','attrs':{'stroke':'currentColor','d':_0x34037b(0x352),'strokeLinecap':'round','strokeLinejoin':'round','strokeWidth':1.2}}]},_0x3e7ec4=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x31c0f4,_0x3a0d44){const _0x33cb4f=_0x34037b;return(0x0,_0x2b3aa2[_0x33cb4f(0x35f)])(_0x5e1293,Object[_0x33cb4f(0x258)]({},_0x31c0f4,{'id':'check-mark-icon','ref':_0x3a0d44,'icon':_0x208fe5}));});_0x3e7ec4[_0x34037b(0x381)]='CheckMarkIcon';let _0x5a1f1a={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x23a),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x3ce),'attrs':{'width':12.52,'height':0x4,'x':2.63,'y':2.89,'stroke':_0x34037b(0x135),'rx':1.1,'strokeWidth':1.2}},{'tag':'path','attrs':{'stroke':'currentColor','d':'M6.80825\x202.89202V6.89199M10.9821\x202.89202V6.89199','strokeWidth':1.2}},{'tag':_0x34037b(0x3ce),'attrs':{'width':0x4,'height':0x4,'x':2.63,'y':9.8,'stroke':_0x34037b(0x135),'rx':1.1,'strokeWidth':1.2}}]},_0xcce2d3=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x4290ac,_0x3fa297){const _0x146a7b=_0x34037b;return(0x0,_0x2b3aa2['createElement'])(_0x5e1293,Object[_0x146a7b(0x258)]({},_0x4290ac,{'id':_0x146a7b(0x4d6),'ref':_0x3fa297,'icon':_0x5a1f1a}));});_0xcce2d3[_0x34037b(0x381)]=_0x34037b(0x6b2);let _0x98ebf3={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x29c)}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x2f3),'fillRule':'evenodd','clipRule':_0x34037b(0x321)}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':'currentColor','d':'M5.1846\x201.86439C4.8641\x200.989866\x203.62725\x200.989866\x203.30674\x201.86439L1.34882\x207.20672C1.23479\x207.51786\x201.39458\x207.86252\x201.70571\x207.97655C2.01684\x208.09058\x202.3615\x207.93079\x202.47553\x207.61966L3.06159\x206.02055L3.06338\x206.02056H5.42975L6.01581\x207.61966C6.12984\x207.93079\x206.4745\x208.09058\x206.78563\x207.97655C7.09677\x207.86252\x207.25655\x207.51786\x207.14252\x207.20672L5.1846\x201.86439ZM4.98996\x204.82056L4.24567\x202.78971L3.50138\x204.82056H4.98996Z','fillRule':_0x34037b(0x321),'clipRule':'evenodd'}}]},_0x4a9b75=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x2a2fb7,_0x271d47){const _0x2d4922=_0x34037b;return(0x0,_0x2b3aa2[_0x2d4922(0x35f)])(_0x5e1293,Object[_0x2d4922(0x258)]({},_0x2a2fb7,{'id':_0x2d4922(0x148),'ref':_0x271d47,'icon':_0x98ebf3}));});_0x4a9b75['displayName']=_0x34037b(0x4af);let _0x5ed140={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x627),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':'path','attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x1cb),'fillRule':'evenodd','clipRule':_0x34037b(0x321)}}]},_0x48b3b9=(0x0,_0x2b3aa2['forwardRef'])(function(_0x2af0cb,_0xbad338){const _0x1f8a90=_0x34037b;return(0x0,_0x2b3aa2[_0x1f8a90(0x35f)])(_0x5e1293,Object[_0x1f8a90(0x258)]({},_0x2af0cb,{'id':_0x1f8a90(0x27d),'ref':_0xbad338,'icon':_0x5ed140}));});_0x48b3b9[_0x34037b(0x381)]='FilterIcon';let _0x3c9be6={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':'1em'},'children':[{'tag':_0x34037b(0x4aa),'attrs':{'stroke':_0x34037b(0x135),'d':_0x34037b(0x55d),'strokeLinecap':_0x34037b(0x2e4),'strokeLinejoin':'round','strokeWidth':1.2}}]},_0x214d9a=(0x0,_0x2b3aa2['forwardRef'])(function(_0x298e92,_0x5b367a){const _0x49eb1b=_0x34037b;return(0x0,_0x2b3aa2[_0x49eb1b(0x35f)])(_0x5e1293,Object[_0x49eb1b(0x258)]({},_0x298e92,{'id':_0x49eb1b(0x58f),'ref':_0x5b367a,'icon':_0x3c9be6}));});_0x214d9a[_0x34037b(0x381)]='FunctionIcon';let _0x171e35={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x2c0),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x6ba),'attrs':{'cx':0x7,'cy':0x5,'r':1.1,'fill':_0x34037b(0x135)}},{'tag':_0x34037b(0x6ba),'attrs':{'cx':0xd,'cy':0x5,'r':1.1,'fill':_0x34037b(0x135)}},{'tag':'circle','attrs':{'cx':0x7,'cy':0xa,'r':1.1,'fill':'currentColor'}},{'tag':_0x34037b(0x6ba),'attrs':{'cx':0xd,'cy':0xa,'r':1.1,'fill':'currentColor'}},{'tag':_0x34037b(0x6ba),'attrs':{'cx':0x7,'cy':0xf,'r':1.1,'fill':_0x34037b(0x135)}},{'tag':_0x34037b(0x6ba),'attrs':{'cx':0xd,'cy':0xf,'r':1.1,'fill':_0x34037b(0x135)}}]},_0x2b8ab3=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x274c11,_0x2ebece){const _0x4d80c9=_0x34037b;return(0x0,_0x2b3aa2[_0x4d80c9(0x35f)])(_0x5e1293,Object['assign']({},_0x274c11,{'id':'grip-vertical-icon','ref':_0x2ebece,'icon':_0x171e35}));});_0x2b8ab3[_0x34037b(0x381)]=_0x34037b(0x4b1);let _0xd1a8bc={'tag':'svg','attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x513),'width':'1em','height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x4aa),'attrs':{'stroke':_0x34037b(0x135),'d':_0x34037b(0x4f5),'strokeLinecap':_0x34037b(0x2e4),'strokeLinejoin':_0x34037b(0x2e4),'strokeWidth':1.2}}]},_0x10a0af=(0x0,_0x2b3aa2['forwardRef'])(function(_0x1fed73,_0x76a5fd){const _0x41d0dd=_0x34037b;return(0x0,_0x2b3aa2[_0x41d0dd(0x35f)])(_0x5e1293,Object['assign']({},_0x1fed73,{'id':_0x41d0dd(0x54b),'ref':_0x76a5fd,'icon':_0xd1a8bc}));});_0x10a0af[_0x34037b(0x381)]=_0x34037b(0x679);let _0x431039={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x5de)}},{'tag':'path','attrs':{'fill':'currentColor','d':_0x34037b(0x64e)}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x1b8)}}]},_0x184fe1=(0x0,_0x2b3aa2['forwardRef'])(function(_0x5dfb11,_0x13f2d2){const _0x591c0f=_0x34037b;return(0x0,_0x2b3aa2[_0x591c0f(0x35f)])(_0x5e1293,Object[_0x591c0f(0x258)]({},_0x5dfb11,{'id':_0x591c0f(0x563),'ref':_0x13f2d2,'icon':_0x431039}));});_0x184fe1[_0x34037b(0x381)]=_0x34037b(0x341);let _0x1e3f4b={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':'none','viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':'1em'},'children':[{'tag':'path','attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x649),'fillRule':_0x34037b(0x321),'clipRule':_0x34037b(0x321)}}]},_0xeac63=(0x0,_0x2b3aa2['forwardRef'])(function(_0x509c79,_0x23d9a5){const _0x23b94e=_0x34037b;return(0x0,_0x2b3aa2[_0x23b94e(0x35f)])(_0x5e1293,Object[_0x23b94e(0x258)]({},_0x509c79,{'id':'number-icon','ref':_0x23d9a5,'icon':_0x1e3f4b}));});_0xeac63[_0x34037b(0x381)]=_0x34037b(0x2e2);let _0x2b8b9f={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x627),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':_0x34037b(0x4aa),'attrs':{'fill':'currentColor','d':_0x34037b(0x451),'fillRule':_0x34037b(0x321),'clipRule':_0x34037b(0x321)}},{'tag':'path','attrs':{'fill':'currentColor','d':'M8.60757\x205.24912C7.72391\x205.24912\x207.00757\x204.53278\x207.00757\x203.64912V2.64912C7.00757\x201.76547\x207.72391\x201.04912\x208.60757\x201.04912L14.0076\x201.04912C14.8912\x201.04912\x2015.6076\x201.76546\x2015.6076\x202.64912V3.64912C15.6076\x204.53278\x2014.8912\x205.24912\x2014.0076\x205.24912L8.60757\x205.24912ZM8.20757\x203.64912C8.20757\x203.87003\x208.38665\x204.04912\x208.60757\x204.04912L14.0076\x204.04912C14.2285\x204.04912\x2014.4076\x203.87003\x2014.4076\x203.64912V2.64912C14.4076\x202.42821\x2014.2285\x202.24912\x2014.0076\x202.24912L8.60757\x202.24912C8.38665\x202.24912\x208.20757\x202.42821\x208.20757\x202.64912V3.64912Z','fillRule':_0x34037b(0x321),'clipRule':_0x34037b(0x321)}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':_0x34037b(0x135),'d':'M1.5083\x208.05078C1.5083\x207.16713\x202.22464\x206.45078\x203.1083\x206.45078H4.1083C4.99196\x206.45078\x205.7083\x207.16713\x205.7083\x208.05078V13.4508C5.7083\x2014.3344\x204.99196\x2015.0508\x204.1083\x2015.0508H3.1083C2.22464\x2015.0508\x201.5083\x2014.3344\x201.5083\x2013.4508V8.05078ZM3.1083\x207.65078C2.88739\x207.65078\x202.7083\x207.82987\x202.7083\x208.05078V13.4508C2.7083\x2013.6717\x202.88739\x2013.8508\x203.1083\x2013.8508H4.1083C4.32921\x2013.8508\x204.5083\x2013.6717\x204.5083\x2013.4508V8.05078C4.5083\x207.82987\x204.32921\x207.65078\x204.1083\x207.65078H3.1083Z','fillRule':'evenodd','clipRule':_0x34037b(0x321)}},{'tag':_0x34037b(0x4aa),'attrs':{'fill':'currentColor','d':_0x34037b(0x439)}}]},_0x4aa130=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x29e231,_0x3a3e38){const _0x48ec55=_0x34037b;return(0x0,_0x2b3aa2[_0x48ec55(0x35f)])(_0x5e1293,Object['assign']({},_0x29e231,{'id':'pivot-table-icon','ref':_0x3a3e38,'icon':_0x2b8b9f}));});_0x4aa130['displayName']=_0x34037b(0x478);let _0x32269d={'tag':_0x34037b(0x537),'attrs':{'xmlns':_0x34037b(0x5b1),'fill':'none','viewBox':_0x34037b(0x23a),'width':'1em','height':_0x34037b(0x1e8)},'children':[{'tag':'path','attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x5ca),'fillRule':_0x34037b(0x321),'clipRule':_0x34037b(0x321)}},{'tag':'path','attrs':{'fill':_0x34037b(0x135),'d':_0x34037b(0x597),'fillRule':_0x34037b(0x321),'clipRule':_0x34037b(0x321)}}]},_0x561333=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x48bb63,_0x3dbf8a){const _0x3c094b=_0x34037b;return(0x0,_0x2b3aa2[_0x3c094b(0x35f)])(_0x5e1293,Object[_0x3c094b(0x258)]({},_0x48bb63,{'id':_0x3c094b(0x20d),'ref':_0x3dbf8a,'icon':_0x32269d}));});_0x561333['displayName']=_0x34037b(0x279);let _0x513ef2={'tag':_0x34037b(0x537),'attrs':{'xmlns':'http://www.w3.org/2000/svg','fill':'none','viewBox':_0x34037b(0x513),'width':_0x34037b(0x1e8),'height':_0x34037b(0x1e8)},'children':[{'tag':'g','attrs':{'stroke':_0x34037b(0x135),'strokeLinecap':_0x34037b(0x2e4),'strokeLinejoin':_0x34037b(0x2e4),'strokeWidth':1.2},'children':[{'tag':_0x34037b(0x6ba),'attrs':{'cx':0x7,'cy':0x7,'r':5.2}},{'tag':_0x34037b(0x4aa),'attrs':{'d':'M10.8\x2010.8L14.2\x2014.2'}}]}]},_0x58cfa4=(0x0,_0x2b3aa2['forwardRef'])(function(_0x1ab9d4,_0x43c960){const _0x5db990=_0x34037b;return(0x0,_0x2b3aa2[_0x5db990(0x35f)])(_0x5e1293,Object[_0x5db990(0x258)]({},_0x1ab9d4,{'id':_0x5db990(0x4cc),'ref':_0x43c960,'icon':_0x513ef2}));});_0x58cfa4[_0x34037b(0x381)]=_0x34037b(0x12f);let _0x18aa6c={'tag':_0x34037b(0x537),'attrs':{'xmlns':'http://www.w3.org/2000/svg','fill':_0x34037b(0x6a0),'viewBox':_0x34037b(0x627),'width':'1em','height':_0x34037b(0x1e8)},'children':[{'tag':'path','attrs':{'stroke':_0x34037b(0x135),'d':_0x34037b(0x26e),'strokeLinecap':_0x34037b(0x2e4),'strokeWidth':1.2}}]},_0x1177fb=(0x0,_0x2b3aa2[_0x34037b(0x508)])(function(_0x397f85,_0x485ffa){const _0x5f0886=_0x34037b;return(0x0,_0x2b3aa2['createElement'])(_0x5e1293,Object[_0x5f0886(0x258)]({},_0x397f85,{'id':'text-icon','ref':_0x485ffa,'icon':_0x18aa6c}));});_0x1177fb['displayName']=_0x34037b(0x66e);function _0x4d719f(_0x380be2){const _0x198a88=_0x34037b;let {editable:_0x5a0765,pivotTableId:_0x4867d5,subUnitId:_0x558066,unitId:_0x419e8e}=_0x380be2,_0x18f518=(0x0,_0x2ef21f[_0x198a88(0x1a2)])(_0x1ed97c[_0x198a88(0x4ab)]),_0x2faf64=(0x0,_0x2ef21f[_0x198a88(0x1a2)])(_0x2ef21f[_0x198a88(0x2e3)]),_0x5ddb98=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x198a88(0x4ad)]),_0x55dfc8=[{'command':{'id':_0x5f33e8['id'],'params':{'pivotTableId':_0x4867d5}},'disabled':!_0x5a0765,'label':_0x198a88(0x2df)},{'command':{'id':_0x5ec675[_0x198a88(0x357)]['id'],'params':{'unitId':_0x419e8e,'subUnitId':_0x558066,'pivotTableId':_0x4867d5}},'disabled':!_0x5a0765,'label':_0x198a88(0x186)}];async function _0x1866cf(_0x117d3b){const _0x401aae=_0x198a88;await _0x18f518[_0x401aae(0x1cd)](_0x117d3b['id'],_0x117d3b['params']),_0x2faf64['close'](_0x3ca145);}return(0x0,_0x282aef[_0x198a88(0x5bf)])(_0x198a88(0x259),{'className':_0x198a88(0x38d),'children':_0x55dfc8[_0x198a88(0x23e)](_0x1eacb4=>{const _0xdd7460=_0x198a88;let _0x50c628=_0x5ddb98['t'](_0x1eacb4[_0xdd7460(0x5b6)]);return(0x0,_0x282aef[_0xdd7460(0x5bf)])(_0x3fc00c['MobileActionRow'],{'title':_0x50c628,'aria-label':_0x50c628,'variant':_0xdd7460(0x3c4),'disabled':_0x1eacb4[_0xdd7460(0x6ea)],'onClick':()=>_0x1866cf(_0x1eacb4[_0xdd7460(0x438)])},_0x1eacb4[_0xdd7460(0x438)]['id']);})});}let _0x5a99a9=[{'label':_0x34037b(0x28a),'suffix':_0x34037b(0x301)},{'label':'1930/08/05','suffix':'yyyy/MM/dd'},{'label':'1930年08月05日','suffix':_0x34037b(0x1c7)},{'label':_0x34037b(0x6a9),'suffix':_0x34037b(0x373)},{'label':'8月5日','suffix':'M\x22月\x22d\x22日\x22'},{'label':'13:30:30','suffix':'h:mm:ss'},{'label':_0x34037b(0x14e),'suffix':_0x34037b(0x18e)},{'label':_0x34037b(0x1e3),'suffix':'A/P\x20hh:mm'},{'label':_0x34037b(0x2d3),'suffix':_0x34037b(0x656)},{'label':'下午1:30:30','suffix':'A/P\x20h:mm:ss'},{'label':_0x34037b(0x350),'suffix':_0x34037b(0x354)}],_0x2c1f4d=[{'label':_0x34037b(0x560),'suffix':'#,##0_);(#,##0)'},{'label':_0x34037b(0x295),'suffix':'#,##0_);[Red](#,##0)','color':_0x34037b(0x65e)},{'label':'1,234.56','suffix':'#,##0.00_);#,##0.00'},{'label':'1,234.56','suffix':_0x34037b(0x3a4),'color':_0x34037b(0x65e)},{'label':_0x34037b(0x2a3),'suffix':_0x34037b(0x196)},{'label':_0x34037b(0x2a3),'suffix':_0x34037b(0x376),'color':_0x34037b(0x65e)}],_0x3584c6=[{'label':_0x5a8a96=>_0x5a8a96+'1,235','suffix':_0x282a6c=>'\x22'+_0x282a6c+'\x22#,##0.00_);\x22'+_0x282a6c+_0x34037b(0x2d6)},{'label':_0x590084=>_0x590084+_0x34037b(0x227),'suffix':_0x2ce0f1=>'\x22'+_0x2ce0f1+_0x34037b(0x5f4)+_0x2ce0f1+_0x34037b(0x2d6),'color':_0x34037b(0x65e)},{'label':_0x303de3=>'('+_0x303de3+_0x34037b(0x32c),'suffix':_0x8101eb=>'\x22'+_0x8101eb+'\x22#,##0.00_);(\x22'+_0x8101eb+_0x34037b(0x343)},{'label':_0x47b7ec=>'('+_0x47b7ec+'1,235)','suffix':_0x1415a0=>'\x22'+_0x1415a0+_0x34037b(0x26b)+_0x1415a0+'\x22#,##0.00)','color':'red'},{'label':_0x396b1c=>'-'+_0x396b1c+_0x34037b(0x227),'suffix':_0x575ba4=>'\x22'+_0x575ba4+_0x34037b(0x27f)+_0x575ba4+_0x34037b(0x2d6)},{'label':_0x2f09ac=>'-'+_0x2f09ac+_0x34037b(0x227),'suffix':_0x569e7f=>'\x22'+_0x569e7f+_0x34037b(0x44e)+_0x569e7f+'\x22#,##0.00','color':_0x34037b(0x65e)}],_0x4630f1=_0x34037b(0x4d9);function _0x2bf750(_0x10c77b,_0x34138b){const _0x3e6201=_0x34037b;if(_0x34138b===_0x55c699[_0x3e6201(0x207)][_0x3e6201(0x359)])return _0x3e6201(0x2a0);if(_0x34138b===_0x55c699[_0x3e6201(0x207)]['other']&&_0x10c77b===_0x55c699[_0x3e6201(0x52c)][_0x3e6201(0x305)])return _0x3e6201(0x5a5);}function _0x225775(_0x505e1c,_0x48ecc5){const _0x51486d=_0x34037b;let _0x48c2ca=(0x0,_0x5ec675[_0x51486d(0x3e4)])(_0x48ecc5,_0x505e1c);return _0x505e1c[_0x51486d(0x5fe)](_0x51486d(0x419))?_0x505e1c[_0x51486d(0x1a4)](_0x51486d(0x419),_0x48c2ca):''+_0x505e1c+_0x48c2ca;}let _0x550c59=_0x3cbf43=>{const _0x22a32f=_0x34037b;switch(_0x3cbf43){case'filter':return _0x55c699[_0x22a32f(0x4e6)][_0x22a32f(0x456)];case _0x22a32f(0x4b9):return _0x55c699[_0x22a32f(0x4e6)][_0x22a32f(0x371)];case _0x22a32f(0x612):return _0x55c699[_0x22a32f(0x4e6)][_0x22a32f(0x532)];case _0x22a32f(0x66f):return _0x55c699['PivotTableFiledAreaEnum'][_0x22a32f(0x3da)];default:return _0x55c699[_0x22a32f(0x4e6)][_0x22a32f(0x371)];}};function _0x453394(_0x4c7785,_0x30313e){const _0x1dcdbb=_0x34037b;switch(_0x30313e[_0x1dcdbb(0x545)]||_0x1ed97c[_0x1dcdbb(0x3a3)][_0x1dcdbb(0x41c)]){case _0x1ed97c[_0x1dcdbb(0x3a3)][_0x1dcdbb(0x41c)]:return{'startRow':_0x30313e[_0x1dcdbb(0x6dd)],'startColumn':_0x30313e[_0x1dcdbb(0x564)],'endRow':_0x30313e['endRow'],'endColumn':_0x30313e[_0x1dcdbb(0x406)]};case _0x1ed97c[_0x1dcdbb(0x3a3)][_0x1dcdbb(0x2d9)]:return{'startRow':_0x30313e[_0x1dcdbb(0x6dd)],'startColumn':0x0,'endRow':_0x30313e[_0x1dcdbb(0x209)],'endColumn':_0x4c7785[_0x1dcdbb(0x18a)]()-0x1};case _0x1ed97c[_0x1dcdbb(0x3a3)][_0x1dcdbb(0x646)]:return{'startRow':0x0,'startColumn':_0x30313e[_0x1dcdbb(0x564)],'endRow':_0x4c7785[_0x1dcdbb(0x1c8)]()-0x1,'endColumn':_0x30313e[_0x1dcdbb(0x406)]};case _0x1ed97c[_0x1dcdbb(0x3a3)][_0x1dcdbb(0x514)]:return{'startRow':0x0,'startColumn':0x0,'endRow':_0x4c7785[_0x1dcdbb(0x1c8)]()-0x1,'endColumn':_0x4c7785[_0x1dcdbb(0x18a)]()-0x1};}}function _0x54f172(_0x508e0f,_0x35a6b5){const _0x2196ea=_0x34037b;if(!_0x35a6b5||!_0x508e0f||_0x35a6b5[_0x2196ea(0x209)]-_0x35a6b5[_0x2196ea(0x6dd)]<=0x0)return 0x1;let {startRow:_0x4e1cd6,startColumn:_0x40dfe3,endRow:_0xd82040,endColumn:_0x4510eb}=_0x453394(_0x508e0f,_0x35a6b5),_0x49a3c9=_0x508e0f[_0x2196ea(0x221)](),_0x4839e7=!0x1;for(let _0x76d8cd=_0x4e1cd6;_0x76d8cd<=_0xd82040;_0x76d8cd++){for(let _0x4760b9=_0x40dfe3;_0x4760b9<=_0x4510eb;_0x4760b9++)if(_0x49a3c9[_0x2196ea(0x6e3)](_0x76d8cd,_0x4760b9)!=null){_0x4839e7=!0x0;break;}if(_0x4839e7)break;}return _0x4839e7?0x2:0x0;}async function _0x4e67e7(_0x131abb,_0x4019ac,_0x125f71){const _0x1e352d=_0x34037b;let {commandService:_0x26a574,pivotTableInfo:_0x5dd530,pivotTableId:_0xb0454,unitId:_0x3a3dc8,subUnitId:_0x109d12}=_0x131abb,_0x4f5e1d=[],{rowFields:_0x4ed03a,columnFields:_0x50b9ef,filterFields:_0xa9588a,valueFields:_0x13ac86}=_0x5dd530,_0xb153d3=[..._0x4ed03a,..._0x50b9ef,..._0xa9588a,..._0x13ac86];_0x4019ac==='PivotMultipleValueId'&&_0x13ac86[_0x1e352d(0x596)](_0x15aed7=>{const _0x800a6d=_0x1e352d;_0x4f5e1d[_0x800a6d(0x1c1)](_0x15aed7[_0x800a6d(0x520)]);}),_0x125f71===_0x1e352d(0x2ec)&&_0xb153d3[_0x1e352d(0x596)](_0x25de9a=>{const _0x2f9446=_0x1e352d;_0x25de9a[_0x2f9446(0x443)]===_0x4019ac&&_0x4f5e1d[_0x2f9446(0x1c1)](_0x25de9a[_0x2f9446(0x520)]);}),_0x125f71!==_0x1e352d(0x2ec)&&_0xb153d3[_0x1e352d(0x242)](_0x4cebcb=>_0x4cebcb[_0x1e352d(0x520)]===_0x4019ac)&&_0x4f5e1d['push'](_0x4019ac),await _0x26a574['executeCommand'](_0x5ec675['RemovePivotFieldCommand']['id'],{'pivotTableId':_0xb0454,'fieldIds':_0x4f5e1d,'unitId':_0x3a3dc8,'subUnitId':_0x109d12});}async function _0x4e1716(_0xab2ce0,_0xffc805,_0x19f659,_0x4e8972,_0x4163ad){const _0x38aec6=_0x34037b;let _0x58975d={'unitId':_0x4e8972,'subUnitId':_0x4163ad,'token':_0xffc805,'dataRangeInfo':_0x19f659};await _0xab2ce0[_0x38aec6(0x1cd)](_0x5ec675[_0x38aec6(0x15e)]['id'],_0x58975d);}let _0x1c4045=(_0x5d4c79,_0x1f0a32)=>{const _0x40d141=_0x34037b;let {rowFields:_0x42f57f,columnFields:_0x48bc1e,filterFields:_0x452bdc}=_0x5d4c79,_0x5b5431=[..._0x42f57f,..._0x48bc1e,..._0x452bdc],_0x51c341=[];return _0x5b5431[_0x40d141(0x596)](_0x5313fa=>{const _0x13380c=_0x40d141;_0x5313fa[_0x13380c(0x443)]===_0x1f0a32&&_0x51c341['push'](_0x5313fa[_0x13380c(0x520)]);}),_0x51c341;};async function _0x48c10d(_0x37be3b,_0x2219b4,_0xc4b1ff,_0x559cd9,_0x2cf89a){const _0x3b56f9=_0x34037b;if(_0xc4b1ff===_0x3b56f9(0x2ec)&&_0x559cd9==='source')return;let _0x3bc181=_0x2219b4===_0x4630f1,{commandService:_0x49d0db,pivotTableInfo:_0x2c1342,pivotTableId:_0x591103,unitId:_0x43f09e,subUnitId:_0x1ba7a2}=_0x37be3b;if(_0xc4b1ff===_0x3b56f9(0x2ec)&&_0x559cd9!==_0x3b56f9(0x2ec)){let {sourceList:_0xfdd8ea}=_0x2c1342,_0x47d9be=_0xfdd8ea[_0x3b56f9(0x242)](_0x2b19bc=>_0x2b19bc['id']===_0x2219b4);if(_0x47d9be){let _0x38c14f=_0x1c4045(_0x2c1342,_0x2219b4);if(_0x559cd9!==_0x3b56f9(0x66f)&&_0x38c14f[_0x3b56f9(0x3d7)]>0x0){let _0x599454=_0x38c14f[0x0];await _0x49d0db[_0x3b56f9(0x1cd)](_0x5ec675['MovePivotFieldCommand']['id'],{'pivotTableId':_0x591103,'fieldId':_0x599454,'area':_0x550c59(_0x559cd9),'index':_0x2cf89a,'unitId':_0x43f09e,'subUnitId':_0x1ba7a2});}else await _0x49d0db[_0x3b56f9(0x1cd)](_0x5ec675[_0x3b56f9(0x3ba)]['id'],{'pivotTableId':_0x591103,'dataFieldId':_0x47d9be[_0x3b56f9(0x443)],'fieldArea':_0x550c59(_0x559cd9),'index':_0x2cf89a,'unitId':_0x43f09e,'subUnitId':_0x1ba7a2});}}if(_0xc4b1ff!==_0x3b56f9(0x2ec)&&_0x559cd9==='source'){let {rowFields:_0x501746,columnFields:_0x5267b5,filterFields:_0x1d13d7,valueFields:_0x3d561a}=_0x2c1342,_0x55e1f1=[..._0x501746,..._0x5267b5,..._0x1d13d7,..._0x3d561a],_0x1bdb34=[];_0x3bc181?_0x3d561a[_0x3b56f9(0x596)](_0x234c4d=>{const _0x51f8ae=_0x3b56f9;_0x1bdb34[_0x51f8ae(0x1c1)](_0x234c4d[_0x51f8ae(0x520)]);}):_0x55e1f1['find'](_0x559b8e=>_0x559b8e[_0x3b56f9(0x520)]===_0x2219b4)&&_0x1bdb34[_0x3b56f9(0x1c1)](_0x2219b4),await _0x469ef1(_0x37be3b,_0x1bdb34);}else _0xc4b1ff!==_0x3b56f9(0x2ec)&&_0x559cd9!==_0x3b56f9(0x2ec)&&await _0x1fc485(_0x37be3b,_0x2219b4,_0xc4b1ff,_0x559cd9,_0x2cf89a);}async function _0x469ef1(_0x443da5,_0x30e30b){const _0x165aa8=_0x34037b;let {commandService:_0x56f302,pivotTableId:_0x4609d4,unitId:_0x24a4c6,subUnitId:_0x4a6aef}=_0x443da5;await _0x56f302[_0x165aa8(0x1cd)](_0x5ec675[_0x165aa8(0x40a)]['id'],{'pivotTableId':_0x4609d4,'fieldIds':_0x30e30b,'unitId':_0x24a4c6,'subUnitId':_0x4a6aef});}async function _0x37733f(_0x3bfb79,_0x38acd1,_0x39c9be){const _0x2f914b=_0x34037b;let {commandService:_0x446764,pivotTableId:_0x4ccaf7,unitId:_0x29907a,subUnitId:_0x2b8666}=_0x3bfb79;await _0x446764[_0x2f914b(0x1cd)](_0x5ec675[_0x2f914b(0x294)]['id'],{'pivotTableId':_0x4ccaf7,'position':_0x38acd1,'index':_0x39c9be,'unitId':_0x29907a,'subUnitId':_0x2b8666});}async function _0x1fc485(_0x353aba,_0x5224a0,_0x1bc496,_0x4ab63b,_0x5cf63b){const _0x238bb3=_0x34037b;let _0x5ef0bb=_0x5224a0===_0x4630f1,{commandService:_0x2c8a73,pivotTableInfo:_0x2fd2b6,pivotTableId:_0x8bb5b7,unitId:_0x6dc7b7,subUnitId:_0x1164d3}=_0x353aba;if(_0x5ef0bb){let _0x252898=_0x550c59(_0x4ab63b);(_0x252898===_0x55c699[_0x238bb3(0x4e6)][_0x238bb3(0x371)]||_0x252898===_0x55c699['PivotTableFiledAreaEnum'][_0x238bb3(0x532)])&&await _0x2c8a73[_0x238bb3(0x1cd)](_0x5ec675['UpdatePivotValuePositionCommand']['id'],{'pivotTableId':_0x8bb5b7,'position':_0x252898===_0x55c699[_0x238bb3(0x4e6)][_0x238bb3(0x371)]?_0x55c699[_0x238bb3(0x360)][_0x238bb3(0x371)]:_0x55c699[_0x238bb3(0x360)][_0x238bb3(0x532)],'index':_0x5cf63b,'unitId':_0x6dc7b7,'subUnitId':_0x1164d3});return;}let {rowFields:_0x265d87,columnFields:_0x499757,filterFields:_0x5dcc07,valueFields:_0x9c43b6}=_0x2fd2b6,_0x71e73b=[..._0x265d87,..._0x499757,..._0x5dcc07,..._0x9c43b6]['find'](_0x5c9e3c=>_0x5c9e3c['tableFieldId']===_0x5224a0);if(_0x71e73b){let _0x3bb1f3=[..._0x265d87,..._0x499757,..._0x5dcc07];if(_0x1bc496===_0x238bb3(0x66f)&&_0x4ab63b!=='value'&&_0x3bb1f3[_0x238bb3(0x242)](_0x2bf642=>_0x2bf642['dataFieldId']===_0x71e73b[_0x238bb3(0x443)])){await _0x469ef1(_0x353aba,[_0x5224a0]);return;}await _0x2c8a73[_0x238bb3(0x1cd)](_0x5ec675[_0x238bb3(0x168)]['id'],{'pivotTableId':_0x8bb5b7,'fieldId':_0x5224a0,'area':_0x550c59(_0x4ab63b),'index':_0x5cf63b,'unitId':_0x6dc7b7,'subUnitId':_0x1164d3});}}function _0x1508e8(_0x52e94b,_0x30db51,_0x340269,_0x4358ae,_0x2acbb2){const _0x470ebe=_0x34037b;_0x52e94b[_0x470ebe(0x1cd)](_0x30f033['id'],{'row':-0x1,'col':-0x1,'unitId':_0x30db51,'subUnitId':_0x340269,'tableFieldId':_0x2acbb2,'pivotTableId':_0x4358ae});}function _0x4e9ea8(_0x63f2c2,_0x45d447,_0x28b3cc,_0x402557,_0x5c0948,_0x3fddbb){const _0x167349=_0x34037b;let {sourceList:_0x3f2672,rowFields:_0x3cd600,columnFields:_0x4abcbe,valueFields:_0x4e936f,filterFields:_0xbfdfae}=_0x3fddbb,_0x436e26=[..._0x3cd600,..._0x4abcbe,..._0x4e936f,..._0xbfdfae][_0x167349(0x242)](_0x5af728=>_0x5af728['tableFieldId']===_0x28b3cc),_0x551bf2=_0x3f2672[_0x167349(0x242)](_0x183bce=>_0x183bce['id']===(_0x436e26==null?void 0x0:_0x436e26['dataFieldId']));if(_0x436e26&&_0x551bf2){let _0x2ad128={'tableFieldId':_0x28b3cc,'pivotTableId':_0x45d447,'unitId':_0x402557,'subUnitId':_0x5c0948,'tableFieldInfo':_0x436e26,'dataFieldInfo':_0x551bf2};_0x63f2c2[_0x167349(0x1cd)](_0x54b7ed['id'],_0x2ad128);}}let _0x3d67b4=[{'type':_0x55c699['PivotSubtotalTypeEnum'][_0x34037b(0x16a)],'textKey':_0x34037b(0x263)},{'type':_0x55c699['PivotSubtotalTypeEnum'][_0x34037b(0x607)],'textKey':_0x34037b(0x644)},{'type':_0x55c699[_0x34037b(0x2ef)][_0x34037b(0x24f)],'textKey':'sheets-pivot-ui.subtotal.countNums'},{'type':_0x55c699['PivotSubtotalTypeEnum']['max'],'textKey':'sheets-pivot-ui.subtotal.max'},{'type':_0x55c699[_0x34037b(0x2ef)][_0x34037b(0x28e)],'textKey':_0x34037b(0x4c5)},{'type':_0x55c699[_0x34037b(0x2ef)]['product'],'textKey':'sheets-pivot-ui.subtotal.product'},{'type':_0x55c699[_0x34037b(0x2ef)][_0x34037b(0x303)],'textKey':_0x34037b(0x2e1)},{'type':_0x55c699['PivotSubtotalTypeEnum'][_0x34037b(0x4b4)],'textKey':'sheets-pivot-ui.subtotal.stdDevp'},{'type':_0x55c699[_0x34037b(0x2ef)][_0x34037b(0x56f)],'textKey':_0x34037b(0x271)},{'type':_0x55c699[_0x34037b(0x2ef)][_0x34037b(0x55b)],'textKey':_0x34037b(0x179)},{'type':_0x55c699[_0x34037b(0x2ef)][_0x34037b(0x4d4)],'textKey':_0x34037b(0x598)}],_0x36e58b=(_0x465f16,_0x1c1351=0x0)=>_0x465f16?_0x1ed97c[_0x34037b(0x5f0)]['getFormatInfo'](_0x465f16)['maxDecimals']??_0x1c1351:_0x1c1351,_0x4c5776=_0x5d8cea=>Array(Math[_0x34037b(0x28e)](Math[_0x34037b(0x3d6)](0x0,Number(_0x5d8cea)),0x1e))[_0x34037b(0x593)](0x0)[_0x34037b(0x488)](''),_0x57e3a0=(_0x3d4019,_0x113a4b)=>_0x3d4019[_0x34037b(0x66d)](';')[_0x34037b(0x23e)](_0x10cf7c=>/\.0?/[_0x34037b(0x25f)](_0x10cf7c)?_0x10cf7c[_0x34037b(0x1a4)](/\.0*/g,''+(_0x113a4b>0x0?'.':'')+_0x4c5776(Number(_0x113a4b||0x0))):/0[^0]?/[_0x34037b(0x25f)](_0x10cf7c)?_0x10cf7c[_0x34037b(0x1a4)](/0[^0]+|0$/,'0'+(_0x113a4b>0x0?'.':'')+_0x4c5776(Number(_0x113a4b||0x0))):_0x10cf7c)['join'](';'),_0x3e673d=_0x340e81=>_0x1ed97c[_0x34037b(0x2e9)][_0x34037b(0x242)](_0x3bed01=>_0x340e81[_0x34037b(0x5fe)](_0x3bed01)),_0x464cc7=_0x4d06ee=>!_0x4d06ee,_0x30997e=_0x3c1d7d=>!!_0x3e673d(_0x3c1d7d)&&_0x3c1d7d[_0x34037b(0x4f9)]('_('),_0x5d0aa9=_0x5b04de=>!!_0x3e673d(_0x5b04de)&&!_0x5b04de['startsWith']('_('),_0x153ced=()=>_0x5a99a9[_0x34037b(0x23e)](_0x344e31=>({'label':_0x344e31['label'],'value':_0x344e31[_0x34037b(0x2fb)]})),_0x409d73=_0x20688b=>{const _0x536713=_0x34037b;let _0x1a39bb=_0x1ed97c['numfmt']['getFormatInfo'](_0x20688b);return _0x153ced()[_0x536713(0x23e)](_0x5cb19a=>_0x5cb19a[_0x536713(0x66f)])[_0x536713(0x5fe)](_0x20688b)||[_0x536713(0x175),_0x536713(0x152),_0x536713(0x61e)][_0x536713(0x5fe)](_0x1a39bb[_0x536713(0x490)]);},_0x2628e4=()=>_0x2c1f4d['map'](_0x2d0a5c=>({'label':_0x2d0a5c[_0x34037b(0x5b6)],'value':_0x2d0a5c[_0x34037b(0x2fb)],'color':_0x2d0a5c[_0x34037b(0x5b5)]})),_0x23f8f0=_0x4aab5f=>_0x2628e4()[_0x34037b(0x370)](_0x1b9b3d=>(0x0,_0x1ed97c[_0x34037b(0x244)])(_0x1b9b3d['value'],_0x4aab5f)),_0xf5a23b=(_0x46558e,_0x2b43d7)=>{const _0x583d88=_0x34037b;switch(_0x2b43d7){case _0x55c699[_0x583d88(0x4e6)][_0x583d88(0x371)]:return _0x46558e[_0x583d88(0x1ba)]['length'];case _0x55c699['PivotTableFiledAreaEnum']['Column']:return _0x46558e[_0x583d88(0x467)]['length'];case _0x55c699['PivotTableFiledAreaEnum']['Filter']:return _0x46558e[_0x583d88(0x20c)]['length'];case _0x55c699['PivotTableFiledAreaEnum']['Value']:return _0x46558e[_0x583d88(0x3e0)][_0x583d88(0x3d7)];default:return 0x0;}},_0x4c990d=(_0x37ebcc,_0x50784b,_0x59fa7a)=>{const _0x3513ea=_0x34037b;for(let _0x5243bc of[_0x3513ea(0x3a2),'sheets-pivot-ui.countName',_0x3513ea(0x2eb),_0x3513ea(0x5af),_0x3513ea(0x324),_0x3513ea(0x4fe),_0x3513ea(0x6b1),_0x3513ea(0x418),_0x3513ea(0x33a),_0x3513ea(0x4ec),'sheets-pivot-ui.varpName']){let _0x389120=_0x59fa7a[_0x5243bc];if(_0x389120+(0x0,_0x5ec675[_0x3513ea(0x3e4)])(_0x37ebcc,_0x389120)===_0x50784b||_0x389120+_0x37ebcc===_0x50784b)return!0x0;}return!0x1;},_0x4d7bab=(_0x2d64cc,_0x584339,_0x201ff9)=>{const _0x4efa7c=_0x34037b;let _0x133bf0='';switch(_0x201ff9){case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x16a)]:_0x133bf0=_0x584339[_0x4efa7c(0x3a2)];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x607)]:_0x133bf0=_0x584339[_0x4efa7c(0x6dc)];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x24f)]:_0x133bf0=_0x584339[_0x4efa7c(0x2eb)];break;case _0x55c699['PivotSubtotalTypeEnum'][_0x4efa7c(0x3d6)]:_0x133bf0=_0x584339[_0x4efa7c(0x5af)];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x28e)]:_0x133bf0=_0x584339[_0x4efa7c(0x324)];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x15a)]:_0x133bf0=_0x584339['sheets-pivot-ui.productName'];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x303)]:_0x133bf0=_0x584339[_0x4efa7c(0x6b1)];break;case _0x55c699['PivotSubtotalTypeEnum'][_0x4efa7c(0x4b4)]:_0x133bf0=_0x584339[_0x4efa7c(0x418)];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x56f)]:_0x133bf0=_0x584339[_0x4efa7c(0x33a)];break;case _0x55c699['PivotSubtotalTypeEnum']['var']:_0x133bf0=_0x584339[_0x4efa7c(0x4ec)];break;case _0x55c699[_0x4efa7c(0x2ef)][_0x4efa7c(0x4d4)]:_0x133bf0=_0x584339[_0x4efa7c(0x63c)];break;default:return _0x2d64cc;}return _0x133bf0+(0x0,_0x5ec675['isolateTextForBidiContext'])(_0x2d64cc,_0x133bf0);};function _0x158960(_0x3de435,_0x4c94de){const _0x1246a1=_0x34037b;if(_0x4c94de[_0x1246a1(0x3e1)]&&(0x0,_0x55c699[_0x1246a1(0x1b3)])(_0x4c94de['conditionFilter']))return'HasFilter';if(!_0x3de435)return _0x1246a1(0x4fa);if((0x0,_0x55c699['isPivotDateFilter'])(_0x3de435))return _0x1246a1(0x1e1);if((0x0,_0x55c699['isManualPivotFilter'])(_0x3de435)){var _0x1d4456;return _0x3de435[_0x1246a1(0x2ee)]||((_0x1d4456=_0x4c94de[_0x1246a1(0x180)])==null?void 0x0:_0x1d4456[_0x1246a1(0x3d7)])===_0x3de435[_0x1246a1(0x468)]['length']?_0x1246a1(0x4fa):_0x1246a1(0x1e1);}return(0x0,_0x55c699['isPivotTableFilterRestrictive'])(_0x3de435)?_0x1246a1(0x1e1):_0x1246a1(0x4fa);}function _0x15d7b4(_0x1ab1ab){const _0x41d28a=_0x34037b;return _0x30997e(_0x1ab1ab)?_0x41d28a(0x31f):_0x5d0aa9(_0x1ab1ab)?_0x41d28a(0x4c0):_0x409d73(_0x1ab1ab)?_0x41d28a(0x175):_0x23f8f0(_0x1ab1ab)?_0x41d28a(0x1e2):_0x41d28a(0x3d5);}function _0x4a428a(_0x162093){const _0x5e8524=_0x34037b;let {originPattern:_0x373200='',onChange:_0x39f414}=_0x162093,_0x595442=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x5e8524(0x4ad)]),[_0x3e99ed,_0x1e3b4f]=(0x0,_0x2b3aa2[_0x5e8524(0x189)])(()=>_0x15d7b4(_0x373200)),[_0x1b4baa,_0x27f4d1]=(0x0,_0x2b3aa2['useState'])(()=>_0x36e58b(_0x373200,0x2)),[_0x405e35,_0x2f30ae]=(0x0,_0x2b3aa2[_0x5e8524(0x189)])(()=>_0x3e673d(_0x373200)||_0x1ed97c[_0x5e8524(0x2e9)][0x0]),[_0xde9bf1,_0x1481dd]=(0x0,_0x2b3aa2[_0x5e8524(0x189)])(_0x373200),_0x9d858c=(0x0,_0x2b3aa2['useMemo'])(()=>[{'value':'general','label':_0x595442['t']('sheets-pivot-ui.dialog.numfmt.general')},{'value':_0x5e8524(0x31f),'label':_0x595442['t']('sheets-pivot-ui.dialog.numfmt.accounting')},{'value':'currency','label':_0x595442['t'](_0x5e8524(0x4ed))},{'value':_0x5e8524(0x175),'label':_0x595442['t'](_0x5e8524(0x311))},{'value':'thousandthPercentile','label':_0x595442['t']('sheets-pivot-ui.dialog.numfmt.thousandthPercentile')}],[_0x595442]),_0x4502f0=_0x1ed97c['currencySymbols'][_0x5e8524(0x23e)](_0xf9f6ef=>({'label':_0xf9f6ef,'value':_0xf9f6ef}));function _0x3654f1(_0x2a47d4){_0x1481dd(_0x2a47d4),_0x39f414(_0x2a47d4);}function _0x4b23d7(_0x5dac2f,_0x555dca){const _0x51867d=_0x5e8524;return _0x57e3a0(_0x51867d(0x652)+_0x5dac2f+_0x51867d(0x675)+(_0x555dca>0x0?'.0':'')+'_)',_0x555dca);}function _0x439160(_0x1785f6){const _0x16de9d=_0x5e8524;_0x1e3b4f(_0x1785f6),_0x3654f1(_0x1785f6===_0x16de9d(0x3d5)?'':_0x1785f6===_0x16de9d(0x31f)?_0x4b23d7(_0x405e35,_0x1b4baa):_0x1785f6==='currency'?_0x57e3a0(_0x3584c6[0x0][_0x16de9d(0x2fb)](_0x405e35),_0x1b4baa):_0x1785f6===_0x16de9d(0x175)?_0x5a99a9[0x0][_0x16de9d(0x2fb)]:_0x57e3a0(_0x2c1f4d[0x0]['suffix'],_0x1b4baa));}function _0x420b14(_0x3e44eb){const _0x4a143f=_0x5e8524;_0x2f30ae(_0x3e44eb),_0x3654f1(_0x3e99ed===_0x4a143f(0x31f)?_0x4b23d7(_0x3e44eb,_0x1b4baa):_0x57e3a0(_0x3584c6[0x0][_0x4a143f(0x2fb)](_0x3e44eb),_0x1b4baa));}function _0x212991(_0x1ac8b8){const _0x5cb7d3=_0x5e8524;let _0x94724=_0x1ac8b8??0x0;_0x27f4d1(_0x94724),_0x3654f1(_0x3e99ed===_0x5cb7d3(0x31f)?_0x4b23d7(_0x405e35,_0x94724):_0x57e3a0(_0xde9bf1,_0x94724));}let _0x109df7=_0x3584c6[_0x5e8524(0x23e)](_0x27a7d7=>({'label':_0x27a7d7[_0x5e8524(0x5b6)](_0x405e35),'value':_0x27a7d7[_0x5e8524(0x2fb)](_0x405e35),'color':_0x27a7d7['color']})),_0x1e93a7=_0x2c1f4d[_0x5e8524(0x23e)](_0xb17a65=>({'label':_0xb17a65['label'],'value':_0xb17a65['suffix'],'color':_0xb17a65[_0x5e8524(0x5b5)]})),_0x18a6bd=_0x5a99a9[_0x5e8524(0x23e)](_0x3cf7d5=>({'label':_0x3cf7d5['label'],'value':_0x3cf7d5[_0x5e8524(0x2fb)]}));return(0x0,_0x282aef[_0x5e8524(0x567)])(_0x5e8524(0x259),{'className':_0x5e8524(0x25a),'children':[(0x0,_0x282aef[_0x5e8524(0x567)])(_0x5e8524(0x259),{'children':[(0x0,_0x282aef['jsx'])(_0x5e8524(0x259),{'className':'univer-mb-2\x20univer-text-sm\x20univer-font-medium','children':_0x595442['t'](_0x5e8524(0x361))}),(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c[_0x5e8524(0x13a)],{'className':_0x5e8524(0x368),'value':_0x3e99ed,'options':_0x9d858c,'onChange':_0x266d1e=>_0x439160(_0x266d1e),'size':'small'})]}),(_0x3e99ed===_0x5e8524(0x31f)||_0x3e99ed==='currency')&&(0x0,_0x282aef[_0x5e8524(0x567)])('div',{'className':_0x5e8524(0x2cc),'children':[(0x0,_0x282aef[_0x5e8524(0x567)])('div',{'children':[(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x5e8524(0x259),{'className':_0x5e8524(0x362),'children':_0x595442['t'](_0x5e8524(0x377))}),(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c['InputNumber'],{'className':'univer-w-full','value':_0x1b4baa,'min':0x0,'max':0x14,'onChange':_0x212991,'size':'small','controls':!0x1})]}),(0x0,_0x282aef['jsxs'])(_0x5e8524(0x259),{'children':[(0x0,_0x282aef['jsx'])(_0x5e8524(0x259),{'className':_0x5e8524(0x362),'children':_0x595442['t']('sheets-pivot-ui.dialog.numfmt.currencyTypes')}),(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c['MobileSelect'],{'className':'univer-w-full','value':_0x405e35,'options':_0x4502f0,'onChange':_0x420b14,'size':_0x5e8524(0x4f7)})]})]}),_0x3e99ed===_0x5e8524(0x1e2)&&(0x0,_0x282aef[_0x5e8524(0x567)])(_0x5e8524(0x259),{'children':[(0x0,_0x282aef[_0x5e8524(0x5bf)])('div',{'className':_0x5e8524(0x362),'children':_0x595442['t'](_0x5e8524(0x377))}),(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c[_0x5e8524(0x393)],{'className':'univer-w-full','value':_0x1b4baa,'min':0x0,'max':0x14,'onChange':_0x212991,'size':'small','controls':!0x1})]}),_0x3e99ed==='currency'&&(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c['SelectList'],{'className':_0x5e8524(0x1fd),'options':_0x109df7,'value':_0xde9bf1,'onChange':_0x65e9d6=>_0x3654f1(_0x57e3a0(_0x65e9d6,_0x1b4baa))}),_0x3e99ed===_0x5e8524(0x175)&&(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c[_0x5e8524(0x570)],{'className':_0x5e8524(0x1fd),'options':_0x18a6bd,'value':_0xde9bf1,'onChange':_0x274525=>_0x3654f1(_0x274525)}),_0x3e99ed==='thousandthPercentile'&&(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x3fc00c[_0x5e8524(0x570)],{'className':'univer-rounded-xl\x20univer-p-2','options':_0x1e93a7,'value':_0xde9bf1,'onChange':_0x31ebfe=>_0x3654f1(_0x57e3a0(_0x31ebfe,_0x1b4baa))}),(0x0,_0x282aef[_0x5e8524(0x5bf)])(_0x5e8524(0x259),{'className':_0x5e8524(0x624),'children':_0x595442['t'](_0x5e8524(0x38f)+_0x3e99ed+'Desc')})]});}function _0x4bd94c(_0x5d17fd){const _0x44c9b2=_0x34037b;let {unitId:_0x55938e,subUnitId:_0x230d16,pivotTableId:_0x596bb8,tableFieldId:_0x2966b8,originPattern:_0x58a201,tableFieldInfo:_0x3bdb43,dataFieldInfo:_0x28a810}=_0x5d17fd,_0x3c13c4=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c['ICommandService']),_0x23d0fa=(0x0,_0x2ef21f['useDependency'])(_0x2ef21f[_0x44c9b2(0x2e3)]),_0x163b42=(0x0,_0x2ef21f[_0x44c9b2(0x1a2)])(_0x1ed97c[_0x44c9b2(0x4ad)]),[_0x131d19,_0x18063a]=(0x0,_0x2b3aa2[_0x44c9b2(0x189)])(_0x58a201??'');async function _0xcab73f(){const _0x136734=_0x44c9b2;let _0x2770cd={'format':_0x131d19,'tableFieldId':_0x2966b8,'pivotTableId':_0x596bb8,'unitId':_0x55938e,'subUnitId':_0x230d16,'tableFieldInfo':_0x3bdb43,'dataFieldInfo':_0x28a810};await _0x3c13c4[_0x136734(0x1cd)](_0x5ec675[_0x136734(0x21a)]['id'],_0x2770cd),_0x23d0fa['close'](_0x4442ad);}return(0x0,_0x282aef[_0x44c9b2(0x567)])(_0x44c9b2(0x259),{'className':_0x44c9b2(0x668),'dir':_0x163b42['getDirection'](),'children':[(0x0,_0x282aef[_0x44c9b2(0x5bf)])(_0x4a428a,{'originPattern':_0x58a201,'onChange':_0x18063a}),(0x0,_0x282aef[_0x44c9b2(0x567)])(_0x3fc00c['MobileActionRowGroup'],{'children':[(0x0,_0x282aef[_0x44c9b2(0x5bf)])(_0x3fc00c[_0x44c9b2(0x2f8)],{'onClick':()=>_0x23d0fa[_0x44c9b2(0x6a2)](_0x4442ad),'size':'middle','children':_0x163b42['t'](_0x44c9b2(0x2c2))}),(0x0,_0x282aef[_0x44c9b2(0x5bf)])(_0x3fc00c[_0x44c9b2(0x2f8)],{'variant':'primary','onClick':_0xcab73f,'size':_0x44c9b2(0x423),'children':_0x163b42['t']('sheets-pivot-ui.dialog.numfmt.confirm')})]})]});}function _0x3b4ae8(_0x38e4af){const _0x345be6=_0x34037b;let {unitId:_0x44af9d,subUnitId:_0x409c96,pivotTableId:_0x195107,tableFieldId:_0x20a783,tableFieldInfo:_0x171b65,dataFieldInfo:_0x5a2268,closeFn:_0x26308b,format:_0x2e0657,version:_0x1afc0d}=_0x38e4af,_0x598fed=(0x0,_0x2ef21f[_0x345be6(0x1a2)])(_0x1ed97c[_0x345be6(0x4ab)]),_0x130bc5=(0x0,_0x2ef21f[_0x345be6(0x1a2)])(_0x5ec675['SheetsPivotTableConfigModel']),_0x2404ae=(0x0,_0x2ef21f[_0x345be6(0x1a2)])(_0x1ed97c[_0x345be6(0x4ad)]),[_0x311a35,_0x13c2bb]=(0x0,_0x2b3aa2[_0x345be6(0x189)])('field'),[_0x45e6ba,_0xe0d4f6]=(0x0,_0x2b3aa2['useState'])(_0x171b65['displayName']),[_0x25df1a,_0x4f4770]=(0x0,_0x2b3aa2['useState'])(_0x171b65[_0x345be6(0x69e)]),[_0x5b5655,_0x46dd10]=(0x0,_0x2b3aa2['useState'])(_0x2e0657??_0x171b65[_0x345be6(0x60b)]??''),[_0x2896f7,_0x4b9d6f]=(0x0,_0x2b3aa2['useState'])(_0x5b5655);(0x0,_0x2b3aa2[_0x345be6(0x39c)])(()=>{const _0x54d88c=_0x345be6;_0x13c2bb(_0x54d88c(0x5b4)),_0xe0d4f6(_0x171b65['displayName']),_0x4f4770(_0x171b65[_0x54d88c(0x69e)]),_0x46dd10(_0x2e0657??_0x171b65[_0x54d88c(0x60b)]??''),_0x4b9d6f(_0x2e0657??_0x171b65[_0x54d88c(0x60b)]??'');},[_0x2e0657,_0x171b65,_0x1afc0d]);let _0x188f50={..._0x130bc5[_0x345be6(0x2a1)]()};['sheets-pivot-ui.averageName',_0x345be6(0x6dc),_0x345be6(0x2eb),_0x345be6(0x5af),'sheets-pivot-ui.minName',_0x345be6(0x4fe),_0x345be6(0x6b1),_0x345be6(0x418),_0x345be6(0x33a),'sheets-pivot-ui.varName','sheets-pivot-ui.varpName'][_0x345be6(0x596)](_0x1ec689=>{_0x188f50[_0x1ec689]=_0x2404ae['t'](_0x1ec689);});function _0x2ac68f(_0x17f695){const _0x4f2d6d=_0x345be6;_0x4f4770(_0x17f695),_0x4c990d(_0x5a2268[_0x4f2d6d(0x3a1)],_0x45e6ba,_0x188f50)&&_0xe0d4f6(_0x4d7bab(_0x5a2268['name'],_0x188f50,_0x17f695));}async function _0x5a43a4(){const _0x115df1=_0x345be6;let _0x1a237f={'displayName':_0x171b65[_0x115df1(0x381)]===_0x45e6ba?void 0x0:_0x45e6ba,'subtotalType':_0x171b65['subTotalType']===_0x25df1a?void 0x0:_0x25df1a,'format':_0x171b65['format']===_0x5b5655?void 0x0:_0x5b5655,'tableFieldId':_0x20a783,'pivotTableId':_0x195107,'unitId':_0x44af9d,'subUnitId':_0x409c96,'tableFieldInfo':_0x171b65,'dataFieldInfo':_0x5a2268};await _0x598fed[_0x115df1(0x1cd)](_0x5ec675[_0x115df1(0x21a)]['id'],_0x1a237f),_0x26308b();}return _0x311a35==='format'?(0x0,_0x282aef[_0x345be6(0x567)])(_0x345be6(0x259),{'className':_0x345be6(0x668),'dir':_0x2404ae[_0x345be6(0x412)](),'children':[(0x0,_0x282aef['jsxs'])(_0x345be6(0x63a),{'type':'button','className':'univer-flex\x20univer-h-10\x20univer-items-center\x20univer-gap-2\x20univer-border-0\x20univer-bg-transparent\x20univer-p-0\x20univer-text-base\x20univer-font-semibold','onClick':()=>_0x13c2bb(_0x345be6(0x5b4)),'children':[(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x3a1947,{}),_0x2404ae['t'](_0x345be6(0x29a))]}),(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x4a428a,{'originPattern':_0x5b5655,'onChange':_0x4b9d6f}),(0x0,_0x282aef[_0x345be6(0x567)])(_0x3fc00c['MobileActionRowGroup'],{'children':[(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x3fc00c['Button'],{'onClick':()=>_0x13c2bb('field'),'size':_0x345be6(0x423),'children':_0x2404ae['t']('sheets-pivot-ui.dialog.numfmt.cancel')}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x345be6(0x2f8)],{'variant':_0x345be6(0x326),'onClick':()=>{const _0x1bd121=_0x345be6;_0x46dd10(_0x2896f7),_0x13c2bb(_0x1bd121(0x5b4));},'size':'middle','children':_0x2404ae['t'](_0x345be6(0x397))})]})]}):(0x0,_0x282aef['jsxs'])(_0x345be6(0x259),{'className':_0x345be6(0x25a),'dir':_0x2404ae[_0x345be6(0x412)](),'children':[(0x0,_0x282aef['jsxs'])(_0x345be6(0x259),{'children':[(0x0,_0x282aef[_0x345be6(0x567)])('div',{'className':_0x345be6(0x470),'children':[(0x0,_0x282aef[_0x345be6(0x5bf)])('span',{'className':_0x345be6(0x608),'children':_0x2404ae['t'](_0x345be6(0x5dd))}),(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x345be6(0x581),{'className':_0x345be6(0x48b),'children':_0x225775(_0x2404ae['t'](_0x345be6(0x1f2)),_0x5a2268[_0x345be6(0x3a1)])})]}),(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x3fc00c['Input'],{'className':_0x345be6(0x52d),'value':_0x45e6ba,'onChange':_0xe0d4f6,'size':_0x345be6(0x4f7)})]}),(0x0,_0x282aef[_0x345be6(0x567)])(_0x345be6(0x259),{'children':[(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x345be6(0x259),{'className':'univer-mb-2\x20univer-text-sm\x20univer-font-medium','children':_0x2404ae['t']('sheets-pivot-ui.dialog.summarizeBy')}),(0x0,_0x282aef[_0x345be6(0x5bf)])('div',{'className':_0x345be6(0x5f3),'children':_0x3d67b4[_0x345be6(0x23e)](_0x2edbd0=>(0x0,_0x282aef['jsxs'])('button',{'type':_0x345be6(0x63a),'className':(0x0,_0x3fc00c['clsx'])(_0x345be6(0x2e6),{'univer-bg-primary-50\x20dark:!univer-bg-gray-700':_0x25df1a===_0x2edbd0[_0x345be6(0x490)]}),'onClick':()=>_0x2ac68f(_0x2edbd0[_0x345be6(0x490)]),'children':[(0x0,_0x282aef['jsx'])(_0x3e7ec4,{'className':(0x0,_0x3fc00c[_0x345be6(0x4e2)])(_0x345be6(0x496),{'univer-invisible':_0x25df1a!==_0x2edbd0['type']})}),_0x2404ae['t'](_0x2edbd0[_0x345be6(0x2b1)])]},_0x2edbd0[_0x345be6(0x490)]))})]}),(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x3fc00c['Button'],{'className':_0x345be6(0x368),'onClick':()=>{const _0x3ec96f=_0x345be6;_0x4b9d6f(_0x5b5655),_0x13c2bb(_0x3ec96f(0x60b));},'size':_0x345be6(0x423),'children':_0x2404ae['t']('sheets-pivot-ui.dialog.format')}),(0x0,_0x282aef[_0x345be6(0x567)])(_0x3fc00c[_0x345be6(0x61c)],{'children':[(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x3fc00c[_0x345be6(0x2f8)],{'onClick':_0x26308b,'size':_0x345be6(0x423),'children':_0x2404ae['t'](_0x345be6(0x643))}),(0x0,_0x282aef[_0x345be6(0x5bf)])(_0x3fc00c['Button'],{'variant':_0x345be6(0x326),'disabled':!_0x45e6ba,'onClick':_0x5a43a4,'size':'middle','children':_0x2404ae['t'](_0x345be6(0x604))})]})]});}function _0x250399(_0x1427db){const _0x23bfef=_0x34037b;var _0xe0ebf1;let {filterItemInfo:_0x40af81,unitId:_0x16ea79,subUnitId:_0x19c876}=_0x1427db,_0x5f6c9a=(0x0,_0x2ef21f[_0x23bfef(0x1a2)])(_0x1ed97c[_0x23bfef(0x4ab)]),_0x10e114=(0x0,_0x2ef21f['useDependency'])(_0x2ef21f['IDialogService']),_0x1d7ef6=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x23bfef(0x4ad)]),_0x2d8fcd=(0x0,_0x2ef21f[_0x23bfef(0x1a2)])(_0x1ed97c[_0x23bfef(0x61a)]),_0x190f0c=(0x0,_0x2ef21f[_0x23bfef(0x22f)])(_0x1d7ef6[_0x23bfef(0x24d)],_0x1d7ef6[_0x23bfef(0x412)]()),[_0x1a0ba0,_0x55d34b]=(0x0,_0x2b3aa2[_0x23bfef(0x189)])(()=>{const _0x343b9f=_0x23bfef;var _0x302402;return _0x40af81['checkedItems']??((_0x302402=_0x40af81[_0x343b9f(0x2ad)])==null?void 0x0:_0x302402[_0x343b9f(0x468)])??_0x40af81[_0x343b9f(0x180)];}),[_0x2bbcb1,_0x2e1ecd]=(0x0,_0x2b3aa2[_0x23bfef(0x189)])(()=>_0x40af81['partialItems']??[]),[_0x461150,_0x4c299d]=(0x0,_0x2b3aa2[_0x23bfef(0x189)])((_0xe0ebf1=_0x40af81['sortInfo'])==null?void 0x0:_0xe0ebf1[_0x23bfef(0x490)]),_0x4914ae=_0x2bbcb1[_0x23bfef(0x3d7)]===0x0&&_0x1a0ba0[_0x23bfef(0x3d7)]===_0x40af81[_0x23bfef(0x180)][_0x23bfef(0x3d7)],_0xb549db=_0x158960(_0x40af81[_0x23bfef(0x2ad)],{'items':_0x40af81[_0x23bfef(0x180)],'conditionFilter':_0x40af81[_0x23bfef(0x3e1)]});(0x0,_0x2b3aa2[_0x23bfef(0x39c)])(()=>{const _0x5c9983=_0x23bfef;let _0x4b851d=_0x2d8fcd[_0x5c9983(0x395)](_0x1ed97c[_0x5c9983(0x3f9)][_0x5c9983(0x2a8)]);if(!_0x4b851d)return;let _0x5232c2=_0x4b851d['activeSheet$'][_0x5c9983(0x659)](_0x21fc92=>{const _0x5a9e7c=_0x5c9983;(_0x21fc92==null?void 0x0:_0x21fc92[_0x5a9e7c(0x42f)]())!==_0x19c876&&_0x10e114[_0x5a9e7c(0x6a2)](_0x24e684);});return()=>_0x5232c2['unsubscribe']();},[_0x10e114,_0x19c876,_0x2d8fcd]);function _0x165f69(){const _0xa3ca06=_0x23bfef;_0x10e114[_0xa3ca06(0x6a2)](_0x24e684);}function _0x55d2cd(_0x3b6814){const _0x6f1421=_0x23bfef;_0x2bbcb1[_0x6f1421(0x5fe)](_0x3b6814)?(_0x2e1ecd(_0x23ec5f=>_0x23ec5f[_0x6f1421(0x154)](_0x54583c=>_0x54583c!==_0x3b6814)),_0x55d34b(_0x19cc2d=>[..._0x19cc2d,_0x3b6814])):_0x55d34b(_0x5a248f=>_0x5a248f[_0x6f1421(0x5fe)](_0x3b6814)?_0x5a248f[_0x6f1421(0x154)](_0x304489=>_0x304489!==_0x3b6814):[..._0x5a248f,_0x3b6814]);}async function _0x56fb9f(_0xa164ab,_0x2ef91f,_0x46bf9d,_0x52714a=!0x1){const _0x1831d7=_0x23bfef;await _0x5f6c9a['executeCommand'](_0x5ec675[_0x1831d7(0x68f)]['id'],{'unitId':_0x16ea79,'subUnitId':_0x19c876,'pivotTableId':_0x40af81[_0x1831d7(0x3bb)],'tableFieldId':_0x40af81[_0x1831d7(0x520)],'items':_0xa164ab,'partialItems':_0x46bf9d,'isAll':_0x2ef91f,'clearAllFilters':_0x52714a}),_0x165f69();}async function _0x1d36be(_0x112596){const _0x3938e7=_0x23bfef;await _0x5f6c9a['executeCommand'](_0x5ec675[_0x3938e7(0x417)]['id'],{'unitId':_0x16ea79,'subUnitId':_0x19c876,'pivotTableId':_0x40af81[_0x3938e7(0x3bb)],'tableFieldId':_0x40af81[_0x3938e7(0x520)],'info':{'type':_0x112596}}),_0x4c299d(_0x112596),_0x165f69();}return(0x0,_0x282aef[_0x23bfef(0x567)])('div',{'className':_0x23bfef(0x25a),'dir':_0x190f0c,'children':[(0x0,_0x282aef[_0x23bfef(0x5bf)])('div',{'className':'univer-text-base\x20univer-font-semibold','children':_0x1d7ef6['t'](_0x23bfef(0x651))}),(0x0,_0x282aef[_0x23bfef(0x567)])(_0x23bfef(0x259),{'className':_0x23bfef(0x4b8),'children':[(0x0,_0x282aef['jsxs'])(_0x3fc00c[_0x23bfef(0x2f8)],{'className':(0x0,_0x3fc00c[_0x23bfef(0x4e2)])('',{'univer-bg-gray-100\x20dark:!univer-bg-gray-700':_0x461150===_0x55c699[_0x23bfef(0x4fc)][_0x23bfef(0x53e)]}),'onClick':()=>_0x1d36be(_0x55c699['PivotDataFieldSortOperatorEnum'][_0x23bfef(0x53e)]),'size':'middle','children':[(0x0,_0x282aef[_0x23bfef(0x5bf)])(_0x508f58,{}),_0x1d7ef6['t'](_0x23bfef(0x5c6))]}),(0x0,_0x282aef['jsxs'])(_0x3fc00c[_0x23bfef(0x2f8)],{'className':(0x0,_0x3fc00c['clsx'])('',{'univer-bg-gray-100\x20dark:!univer-bg-gray-700':_0x461150===_0x55c699[_0x23bfef(0x4fc)]['descending']}),'onClick':()=>_0x1d36be(_0x55c699['PivotDataFieldSortOperatorEnum']['descending']),'size':_0x23bfef(0x423),'children':[(0x0,_0x282aef[_0x23bfef(0x5bf)])(_0x4a9b75,{}),_0x1d7ef6['t'](_0x23bfef(0x5e5))]})]}),(0x0,_0x282aef[_0x23bfef(0x567)])('div',{'className':_0x23bfef(0x688),'children':[(0x0,_0x282aef['jsx'])(_0x23bfef(0x259),{'className':_0x23bfef(0x434),'children':(0x0,_0x282aef[_0x23bfef(0x5bf)])(_0x3fc00c['Checkbox'],{'checked':_0x4914ae,'indeterminate':!_0x4914ae&&(_0x1a0ba0['length']>0x0||_0x2bbcb1[_0x23bfef(0x3d7)]>0x0),'onChange':()=>{const _0xe779f8=_0x23bfef;_0x2e1ecd([]),_0x55d34b(_0x4914ae?[]:_0x40af81[_0xe779f8(0x180)]);},'children':_0x1d7ef6['t'](_0x23bfef(0x231))})}),_0x40af81[_0x23bfef(0x180)][_0x23bfef(0x23e)]((_0x452bb5,_0x1eac13)=>{const _0x26646e=_0x23bfef;var _0x464ef3;let _0x5a493f=_0x40af81[_0x26646e(0x238)][_0x1eac13],_0x181ed5=(_0x464ef3=_0x40af81['itemLabels'])==null?void 0x0:_0x464ef3[_0x452bb5],_0x14c22b=_0x2bf750(_0x452bb5,_0x5a493f),_0x4b181b=_0x452bb5;return _0x14c22b?_0x4b181b=_0x1d7ef6['t'](_0x14c22b):_0x181ed5===void 0x0?_0x5a493f===_0x55c699[_0x26646e(0x207)][_0x26646e(0x175)]&&_0x40af81[_0x26646e(0x60b)]&&(_0x4b181b=_0x1ed97c[_0x26646e(0x5f0)][_0x26646e(0x60b)](_0x40af81['format'],Number(_0x452bb5))):_0x4b181b=_0x181ed5,(0x0,_0x282aef[_0x26646e(0x5bf)])(_0x26646e(0x259),{'className':'univer-flex\x20univer-min-h-12\x20univer-items-center\x20univer-px-2','children':(0x0,_0x282aef[_0x26646e(0x5bf)])(_0x3fc00c[_0x26646e(0x6b3)],{'checked':_0x1a0ba0[_0x26646e(0x5fe)](_0x452bb5),'indeterminate':_0x2bbcb1[_0x26646e(0x5fe)](_0x452bb5),'contentClassName':'univer-max-w-[70vw]\x20univer-truncate','onChange':()=>_0x55d2cd(_0x452bb5),'children':_0x4b181b})},_0x452bb5);})]}),(0x0,_0x282aef[_0x23bfef(0x5bf)])(_0x3fc00c['Button'],{'className':_0x23bfef(0x368),'variant':'link','disabled':_0xb549db===_0x23bfef(0x4fa),'onClick':()=>_0x56fb9f(_0x40af81['items'],!0x0,[],!0x0),'size':_0x23bfef(0x423),'children':_0x1d7ef6['t'](_0x23bfef(0x59a))}),(0x0,_0x282aef[_0x23bfef(0x567)])(_0x3fc00c[_0x23bfef(0x61c)],{'children':[(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x23bfef(0x2f8)],{'onClick':_0x165f69,'size':_0x23bfef(0x423),'children':_0x1d7ef6['t']('sheets-pivot-ui.dialog.filter.cancel')}),(0x0,_0x282aef[_0x23bfef(0x5bf)])(_0x3fc00c[_0x23bfef(0x2f8)],{'variant':_0x23bfef(0x326),'disabled':!_0x1a0ba0[_0x23bfef(0x3d7)]&&!_0x2bbcb1[_0x23bfef(0x3d7)],'onClick':()=>_0x56fb9f(_0x1a0ba0,_0x4914ae,_0x2bbcb1),'size':_0x23bfef(0x423),'children':_0x1d7ef6['t'](_0x23bfef(0x1a1))})]})]});}let _0x1d73ca=[{'label':_0x34037b(0x566),'value':_0x34037b(0x256)},{'label':'sheets-pivot-ui.config.pageOverThenDown','value':'true'}],_0x4704c=[{'label':_0x34037b(0x37c),'value':String(_0x55c699[_0x34037b(0x577)]['tabular'])},{'label':_0x34037b(0x404),'value':String(_0x55c699[_0x34037b(0x577)][_0x34037b(0x3fb)])},{'label':_0x34037b(0x32f),'value':String(_0x55c699[_0x34037b(0x577)][_0x34037b(0x15d)])}],_0x5931c0=[{'label':'sheets-pivot-ui.config.rowSubtotalTop','value':String(_0x55c699[_0x34037b(0x4be)][_0x34037b(0x199)])},{'label':'sheets-pivot-ui.config.rowSubtotalBottom','value':String(_0x55c699[_0x34037b(0x4be)]['bottom'])}],_0x52d9e5=[{'label':_0x34037b(0x41f),'value':_0x55c699[_0x34037b(0x3f1)][_0x34037b(0x24a)]},{'label':_0x34037b(0x5d9),'value':_0x55c699[_0x34037b(0x3f1)][_0x34037b(0x178)]}];function _0x178d40(_0x17eaba){const _0x693527=_0x34037b;let {unitId:_0xc647aa,subUnitId:_0x5178d3,pivotTableId:_0x2df27f}=_0x17eaba,_0x488482=(0x0,_0x2ef21f[_0x693527(0x1a2)])(_0x1ed97c[_0x693527(0x4ab)]),_0x5c95dc=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x693527(0x172)]),_0x4ebd30=(0x0,_0x2ef21f[_0x693527(0x1a2)])(_0x1ed97c[_0x693527(0x2b4)]),_0x554668=(0x0,_0x2ef21f[_0x693527(0x1a2)])(_0x1ed97c['LocaleService']),_0x37997a=(0x0,_0x2ef21f['useDependency'])(_0x5ec675[_0x693527(0x1c2)]),_0x48167=(0x0,_0x2b3aa2[_0x693527(0x6c9)])(()=>_0x37997a[_0x693527(0x26c)](_0xc647aa,_0x5178d3,_0x2df27f)[_0x693527(0x1dd)]((0x0,_0x3ae495['debounceTime'])(0x0)),[_0x37997a,_0xc647aa,_0x5178d3,_0x2df27f]);(0x0,_0x2ef21f[_0x693527(0x22f)])(_0x48167);let [_0x1592b5,_0xf4e602]=(0x0,_0x2b3aa2[_0x693527(0x189)])(!0x1),_0x2d602f=(0x0,_0x2b3aa2[_0x693527(0x260)])(!0x1),_0x522556=_0x37997a[_0x693527(0x399)](_0xc647aa,_0x5178d3,_0x2df27f),_0x1ebe07=(0x0,_0x55c699[_0x693527(0x1a6)])(_0x522556==null?void 0x0:_0x522556[_0x693527(0x5cb)][_0x693527(0x50a)]),[_0x2d806b,_0x22452b]=(0x0,_0x2b3aa2[_0x693527(0x189)])(()=>{const _0x4ace40=_0x693527;var _0x48df9e,_0x4d07ec;let _0x56f591=_0x37997a[_0x4ace40(0x399)](_0xc647aa,_0x5178d3,_0x2df27f),_0x298769=(_0x56f591==null||(_0x48df9e=_0x56f591[_0x4ace40(0x5cb)])==null?void 0x0:_0x48df9e[_0x4ace40(0x50a)])??{};return{'showRowSubtotal':_0x298769['showRowSubtotal']??!0x0,'showRowGrandTotal':_0x298769[_0x4ace40(0x3cc)]??!0x0,'showColSubtotal':_0x298769['showColSubtotal']??!0x0,'showColGrandTotal':_0x298769['showColGrandTotal']??!0x0,'pageWrap':_0x298769[_0x4ace40(0x375)]??0x1,'pageOverThenDown':_0x298769[_0x4ace40(0x3f0)]??!0x1,'repeatRowLabels':_0x298769['repeatRowLabels']??!0x1,'repeatColLabels':_0x298769[_0x4ace40(0x594)]??!0x1,'layout':(_0x56f591==null||(_0x4d07ec=_0x56f591[_0x4ace40(0x5cb)])==null?void 0x0:_0x4d07ec[_0x4ace40(0x550)])??_0x55c699[_0x4ace40(0x577)][_0x4ace40(0x699)],'rowSubtotalPosition':_0x298769[_0x4ace40(0x6ac)]??_0x55c699[_0x4ace40(0x4be)][_0x4ace40(0x199)]};});function _0x3a40df(_0x49f0c5){const _0x53bd91=_0x693527;let _0x5042c3={'unitId':_0xc647aa,'subUnitId':_0x5178d3,'pivotTableId':_0x2df27f,'options':_0x49f0c5};return _0x22452b(_0x4cee2c=>({..._0x4cee2c,..._0x49f0c5})),_0x488482['executeCommand'](_0x5ec675['SetPivotOptionCommand']['id'],_0x5042c3)[_0x53bd91(0x1d4)](_0x1eb63c=>_0x4ebd30['error']('[MobilePivotConfigPanel]',_0x1eb63c));}function _0x3daf82(_0x540356){const _0x29663a=_0x693527;let _0x2a11a7={'unitId':_0xc647aa,'subUnitId':_0x5178d3,'pivotTableId':_0x2df27f,'layout':_0x540356};return _0x22452b(_0x28a5b7=>({..._0x28a5b7,'layout':_0x540356})),_0x488482[_0x29663a(0x1cd)](_0x5ec675[_0x29663a(0x4c6)]['id'],_0x2a11a7)[_0x29663a(0x1d4)](_0x3ea304=>_0x4ebd30[_0x29663a(0x46a)](_0x29663a(0x1fe),_0x3ea304));}async function _0x5799b0(_0xf0f6fa){const _0x4f24d4=_0x693527;if(!(_0x2d602f['current']||_0xf0f6fa===_0x1ebe07)){_0x2d602f[_0x4f24d4(0x56b)]=!0x0,_0xf4e602(!0x0);try{let _0x5501b6=_0x37997a['getPivotTableConfig'](_0xc647aa,_0x5178d3,_0x2df27f),_0x317feb=_0x37997a[_0x4f24d4(0x5c2)](_0xc647aa,_0x2df27f);if(!_0x5501b6||!_0x317feb||(Object[_0x4f24d4(0x253)](_0x317feb[_0x4f24d4(0x3b1)])['some'](_0x55c699[_0x4f24d4(0x69d)])||_0x317feb[_0x4f24d4(0x1db)][_0x4f24d4(0x370)](_0x55c699[_0x4f24d4(0x69d)]))&&!await _0x5c95dc[_0x4f24d4(0x5bc)]({'id':_0x4f24d4(0x30c),'title':{'title':_0x554668['t'](_0x4f24d4(0x4eb))},'children':{'title':_0x554668['t'](_0x4f24d4(0x6d4))},'cancelText':_0x554668['t'](_0x4f24d4(0x643)),'confirmText':_0x554668['t'](_0x4f24d4(0x604))})||_0x37997a[_0x4f24d4(0x399)](_0xc647aa,_0x5178d3,_0x2df27f)!==_0x5501b6||_0x37997a[_0x4f24d4(0x5c2)](_0xc647aa,_0x2df27f)!==_0x317feb||(0x0,_0x55c699['getPivotDateGroupingMode'])(_0x5501b6[_0x4f24d4(0x5cb)]['options'])===_0xf0f6fa)return;await _0x488482[_0x4f24d4(0x1cd)](_0x5ec675['SetPivotOptionCommand']['id'],{'unitId':_0xc647aa,'subUnitId':_0x5178d3,'pivotTableId':_0x2df27f,'options':{'dateGroupingMode':_0xf0f6fa}});}catch(_0x19ec86){_0x4ebd30[_0x4f24d4(0x46a)](_0x4f24d4(0x1fe),_0x19ec86);}finally{_0x2d602f[_0x4f24d4(0x56b)]=!0x1,_0xf4e602(!0x1);}}}let _0x4f2d7d=_0x325af6=>_0x325af6[_0x693527(0x23e)](_0x4c5c90=>({..._0x4c5c90,'label':_0x554668['t'](_0x4c5c90[_0x693527(0x5b6)])}));return(0x0,_0x282aef[_0x693527(0x567)])(_0x693527(0x259),{'className':'univer-flex\x20univer-flex-col\x20univer-gap-5\x20univer-py-4','children':[(0x0,_0x282aef[_0x693527(0x567)])('section',{'className':'univer-flex\x20univer-flex-col\x20univer-gap-3','children':[(0x0,_0x282aef[_0x693527(0x5bf)])('div',{'className':_0x693527(0x14b),'children':_0x554668['t'](_0x693527(0x63b))}),(0x0,_0x282aef[_0x693527(0x567)])(_0x693527(0x259),{'className':'univer-flex\x20univer-min-h-10\x20univer-items-center\x20univer-justify-between\x20univer-gap-3','children':[(0x0,_0x282aef[_0x693527(0x5bf)])(_0x693527(0x581),{'className':_0x693527(0x54e),'children':_0x554668['t'](_0x693527(0x433))}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x13a)],{'className':_0x693527(0x5c5),'value':_0x1ebe07,'options':_0x4f2d7d(_0x52d9e5),'disabled':_0x1592b5,'onChange':_0x319ebc=>_0x5799b0(_0x319ebc),'size':'small'})]}),(0x0,_0x282aef['jsxs'])(_0x693527(0x259),{'className':_0x693527(0x396),'children':[(0x0,_0x282aef['jsx'])('span',{'className':_0x693527(0x54e),'children':_0x554668['t']('sheets-pivot-ui.config.layout')}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x13a)],{'className':_0x693527(0x5c5),'value':String(_0x2d806b[_0x693527(0x550)]),'options':_0x4f2d7d(_0x4704c),'onChange':_0x43631b=>_0x3daf82(Number(_0x43631b)),'size':_0x693527(0x4f7)})]}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x6b3)],{'checked':_0x2d806b[_0x693527(0x214)],'disabled':_0x2d806b[_0x693527(0x550)]===_0x55c699[_0x693527(0x577)][_0x693527(0x3fb)],'onChange':_0x3294ee=>_0x3a40df({'repeatRowLabels':!!_0x3294ee}),'children':_0x554668['t'](_0x693527(0x4c9))}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x6b3)],{'checked':_0x2d806b[_0x693527(0x594)],'onChange':_0x33cc69=>_0x3a40df({'repeatColLabels':!!_0x33cc69}),'children':_0x554668['t'](_0x693527(0x4f0))})]}),(0x0,_0x282aef['jsxs'])(_0x693527(0x26f),{'className':_0x693527(0x2fc),'children':[(0x0,_0x282aef['jsx'])('div',{'className':_0x693527(0x14b),'children':_0x554668['t'](_0x693527(0x3de))}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x6b3)],{'checked':_0x2d806b[_0x693527(0x4ea)],'onChange':_0x2f0930=>_0x3a40df({'showRowSubtotal':!!_0x2f0930}),'children':_0x554668['t'](_0x693527(0x3ff))}),_0x2d806b['layout']===_0x55c699[_0x693527(0x577)][_0x693527(0x15d)]&&(0x0,_0x282aef[_0x693527(0x567)])(_0x693527(0x259),{'className':_0x693527(0x396),'children':[(0x0,_0x282aef['jsx'])('span',{'className':_0x693527(0x54e),'children':_0x554668['t'](_0x693527(0x388))}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x13a)],{'className':_0x693527(0x5c5),'value':String(_0x2d806b[_0x693527(0x6ac)]),'options':_0x4f2d7d(_0x5931c0),'onChange':_0x13f0c6=>_0x3a40df({'rowSubtotalPosition':Number(_0x13f0c6)}),'size':_0x693527(0x4f7)})]}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x6b3)],{'checked':_0x2d806b[_0x693527(0x3cc)],'onChange':_0x467ede=>_0x3a40df({'showRowGrandTotal':!!_0x467ede}),'children':_0x554668['t'](_0x693527(0x56e))}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x6b3)],{'checked':_0x2d806b['showColSubtotal'],'onChange':_0x5d911b=>_0x3a40df({'showColSubtotal':!!_0x5d911b}),'children':_0x554668['t']('sheets-pivot-ui.config.showColSubtotal')}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x693527(0x6b3)],{'checked':_0x2d806b[_0x693527(0x536)],'onChange':_0x2b94dc=>_0x3a40df({'showColGrandTotal':!!_0x2b94dc}),'children':_0x554668['t'](_0x693527(0x686))})]}),(0x0,_0x282aef[_0x693527(0x567)])(_0x693527(0x26f),{'className':_0x693527(0x2fc),'children':[(0x0,_0x282aef[_0x693527(0x5bf)])(_0x693527(0x259),{'className':_0x693527(0x14b),'children':_0x554668['t'](_0x693527(0x145))}),(0x0,_0x282aef[_0x693527(0x567)])(_0x693527(0x259),{'className':'univer-flex\x20univer-min-h-10\x20univer-items-center\x20univer-justify-between\x20univer-gap-3','children':[(0x0,_0x282aef[_0x693527(0x5bf)])('span',{'className':_0x693527(0x54e),'children':_0x554668['t'](_0x693527(0x53b))}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x393)],{'className':'univer-w-24','value':_0x2d806b['pageWrap'],'min':0x1,'max':0x14,'onChange':_0xab2030=>{const _0x2dfa6e=_0x693527;let _0x2c2a83=Number(_0xab2030);return Number[_0x2dfa6e(0x69a)](_0x2c2a83)&&_0x2c2a83>=0x1?_0x3a40df({'pageWrap':_0x2c2a83}):void 0x0;},'size':_0x693527(0x4f7),'controls':!0x1})]}),(0x0,_0x282aef[_0x693527(0x5bf)])('p',{'className':_0x693527(0x262),'children':_0x554668['t'](_0x2d806b[_0x693527(0x3f0)]?'sheets-pivot-ui.config.pageWrapOverThenDownHelp':_0x693527(0x569))}),(0x0,_0x282aef['jsxs'])('div',{'className':_0x693527(0x396),'children':[(0x0,_0x282aef[_0x693527(0x5bf)])(_0x693527(0x581),{'className':'univer-text-sm','children':_0x554668['t']('sheets-pivot-ui.config.pageDirection')}),(0x0,_0x282aef[_0x693527(0x5bf)])(_0x3fc00c[_0x693527(0x13a)],{'className':'univer-w-40','value':String(_0x2d806b[_0x693527(0x3f0)]),'options':_0x4f2d7d(_0x1d73ca),'onChange':_0x5e0106=>_0x3a40df({'pageOverThenDown':_0x5e0106===_0x693527(0x6d0)}),'size':_0x693527(0x4f7)})]})]})]});}function _0x257eb2(_0x44ef7e,_0x263a4a,_0x454fd8,_0x14d045){const _0x1c13e5=_0x34037b;let _0x466f41=[];return _0x263a4a>0x0&&_0x466f41['push'](_0x1c13e5(0x528)),_0x263a4a<_0x454fd8-0x1&&_0x466f41[_0x1c13e5(0x1c1)]('moveDown'),_0x14d045?(_0x466f41[_0x1c13e5(0x1c1)](_0x44ef7e===_0x1c13e5(0x612)?_0x1c13e5(0x403):_0x1c13e5(0x21c)),_0x466f41[_0x1c13e5(0x1c1)](_0x1c13e5(0x205)),_0x466f41):(_0x44ef7e!=='filter'&&_0x466f41[_0x1c13e5(0x1c1)](_0x1c13e5(0x6e5)),_0x44ef7e!==_0x1c13e5(0x612)&&_0x466f41[_0x1c13e5(0x1c1)]('moveToColumn'),_0x44ef7e!==_0x1c13e5(0x4b9)&&_0x466f41[_0x1c13e5(0x1c1)](_0x1c13e5(0x403)),_0x44ef7e===_0x1c13e5(0x66f)?_0x466f41[_0x1c13e5(0x1c1)](_0x1c13e5(0x60f)):(_0x466f41['push'](_0x1c13e5(0x2f4)),_0x466f41[_0x1c13e5(0x1c1)](_0x1c13e5(0x154))),_0x466f41['push'](_0x1c13e5(0x205)),_0x466f41);}let _0x56f460=['filter',_0x34037b(0x612),_0x34037b(0x4b9),'value'];function _0x28cbfe(_0x125883,_0x199c1c){const _0x5bc4af=_0x34037b;switch(_0x199c1c){case _0x5bc4af(0x154):return _0x125883[_0x5bc4af(0x20c)];case _0x5bc4af(0x612):return _0x125883[_0x5bc4af(0x467)];case _0x5bc4af(0x4b9):return _0x125883[_0x5bc4af(0x1ba)];case'value':return _0x125883['valueFields'];default:return[];}}function _0x563446(_0x1957b8){const _0x330b42=_0x34037b;switch(_0x1957b8){case _0x330b42(0x154):return _0x330b42(0x486);case _0x330b42(0x612):return _0x330b42(0x2ab);case _0x330b42(0x4b9):return _0x330b42(0x57c);default:return'sheets-pivot-ui.value';}}function _0x4b3ba4(_0x35c174){const _0x26dcdd=_0x34037b;switch(_0x35c174){case _0x26dcdd(0x154):return _0x26dcdd(0x4d1);case'column':return _0x26dcdd(0x40e);case _0x26dcdd(0x4b9):return'sheets-pivot-ui.mobile.rowDesc';default:return _0x26dcdd(0x425);}}function _0xa23923(_0x3be202){const _0x745fd9=_0x34037b;switch(_0x3be202['area']){case'filter':return(0x0,_0x282aef[_0x745fd9(0x5bf)])(_0x48b3b9,{});case _0x745fd9(0x612):return(0x0,_0x282aef[_0x745fd9(0x5bf)])(_0x561333,{});case _0x745fd9(0x4b9):return(0x0,_0x282aef[_0x745fd9(0x5bf)])(_0xcce2d3,{});default:return(0x0,_0x282aef[_0x745fd9(0x5bf)])(_0x214d9a,{});}}function _0x23f4a9(_0x23634a){const _0x1ddd5b=_0x34037b;switch(_0x23634a){case _0x1ddd5b(0x528):return _0x1ddd5b(0x5eb);case _0x1ddd5b(0x630):return'sheets-pivot-ui.mobile.moveDown';case'moveToFilter':return _0x1ddd5b(0x50b);case _0x1ddd5b(0x21c):return _0x1ddd5b(0x5ad);case _0x1ddd5b(0x403):return _0x1ddd5b(0x41a);case _0x1ddd5b(0x2f4):return _0x1ddd5b(0x2f5);case'filter':return _0x1ddd5b(0x651);case _0x1ddd5b(0x60f):return'sheets-pivot-ui.fieldSettings';default:return'sheets-pivot-ui.removeField';}}function _0x3188f5(_0x33a6d6){const _0x4fb685=_0x34037b;switch(_0x33a6d6){case _0x4fb685(0x6e5):return _0x4fb685(0x154);case _0x4fb685(0x21c):return'column';case'moveToRow':return'row';case _0x4fb685(0x2f4):return _0x4fb685(0x66f);default:return null;}}function _0x58a9b3(_0x45eaf7){const _0x287c56=_0x34037b;let {area:_0x45dec7,field:_0x96bd1d,index:_0x54053b,fieldCount:_0x57c0a8,info:_0x243883,pivotTableId:_0x150d64,unitId:_0x26ee2f,subUnitId:_0x7da4e,refresh:_0x3f5045}=_0x45eaf7,_0x2f271e=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x287c56(0x4ab)]),_0x3394cf=(0x0,_0x2ef21f[_0x287c56(0x1a2)])(_0x1ed97c[_0x287c56(0x4ad)]),_0x39a984=_0x96bd1d[_0x287c56(0x520)]===_0x4630f1,_0x3abd84={'pivotTableInfo':_0x243883,'pivotTableId':_0x150d64,'commandService':_0x2f271e,'unitId':_0x26ee2f,'subUnitId':_0x7da4e};async function _0x4972c8(_0xfb3801){const _0x2d736f=_0x287c56;if(_0xfb3801===_0x2d736f(0x154)){_0x1508e8(_0x2f271e,_0x26ee2f,_0x7da4e,_0x150d64,_0x96bd1d[_0x2d736f(0x520)]);return;}if(_0xfb3801==='settings'){_0x4e9ea8(_0x2f271e,_0x150d64,_0x96bd1d['tableFieldId'],_0x26ee2f,_0x7da4e,_0x243883);return;}if(_0xfb3801===_0x2d736f(0x205)){await _0x4e67e7(_0x3abd84,_0x96bd1d[_0x2d736f(0x520)],_0x45dec7),await _0x3f5045();return;}let _0xcf8447=_0x3188f5(_0xfb3801)??_0x45dec7,_0x2ec8ca=_0x28cbfe(_0x243883,_0xcf8447)['length'];_0xfb3801==='moveUp'?_0x2ec8ca=_0x54053b-0x1:_0xfb3801===_0x2d736f(0x630)&&(_0x2ec8ca=_0x54053b+0x1),await _0x48c10d(_0x3abd84,_0x96bd1d['tableFieldId'],_0x45dec7,_0xcf8447,_0x2ec8ca),await _0x3f5045();}let _0x438b19=_0x257eb2(_0x45dec7,_0x54053b,_0x57c0a8,_0x39a984)[_0x287c56(0x23e)](_0x3e6124=>({'type':_0x287c56(0x181),'children':_0x3394cf['t'](_0x23f4a9(_0x3e6124)),'variant':_0x3e6124==='remove'?'destructive':_0x287c56(0x30d),'onSelect':()=>_0x4972c8(_0x3e6124)}));return(0x0,_0x282aef[_0x287c56(0x567)])('div',{'className':_0x287c56(0x685),'children':[(0x0,_0x282aef[_0x287c56(0x5bf)])(_0x287c56(0x498),{'className':_0x287c56(0x1c3),'dir':_0x287c56(0x6aa),'children':_0x39a984?_0x3394cf['t'](_0x287c56(0x4d2)):_0x96bd1d[_0x287c56(0x381)]}),(0x0,_0x282aef['jsx'])(_0x3fc00c['MobileDropdownMenu'],{'items':_0x438b19,'children':(0x0,_0x282aef[_0x287c56(0x5bf)])(_0x287c56(0x63a),{'type':_0x287c56(0x63a),'className':'univer-flex\x20univer-size-10\x20univer-shrink-0\x20univer-items-center\x20univer-justify-center\x20univer-rounded-lg\x20univer-border-0\x20univer-bg-transparent\x20active:univer-bg-gray-100\x20dark:active:!univer-bg-gray-700','children':(0x0,_0x282aef[_0x287c56(0x5bf)])(_0x184fe1,{})})})]});}function _0x595d01(_0x223362){const _0x269fcc=_0x34037b;let _0x2b1045=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x269fcc(0x4ad)]);return(0x0,_0x282aef[_0x269fcc(0x5bf)])(_0x269fcc(0x259),{'className':_0x269fcc(0x25a),'children':_0x56f460[_0x269fcc(0x23e)](_0x13821a=>{const _0x49b6ce=_0x269fcc;let _0x52851a=_0x28cbfe(_0x223362[_0x49b6ce(0x1be)],_0x13821a);return(0x0,_0x282aef[_0x49b6ce(0x567)])('section',{'children':[(0x0,_0x282aef[_0x49b6ce(0x567)])(_0x49b6ce(0x259),{'className':'univer-mb-2\x20univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-font-medium','children':[(0x0,_0x282aef[_0x49b6ce(0x5bf)])(_0xa23923,{'area':_0x13821a}),_0x2b1045['t'](_0x563446(_0x13821a))]}),(0x0,_0x282aef['jsx'])(_0x49b6ce(0x259),{'className':_0x49b6ce(0x53d),'children':_0x52851a[_0x49b6ce(0x3d7)]?_0x52851a[_0x49b6ce(0x23e)]((_0x4592a0,_0x290529)=>(0x0,_0x282aef[_0x49b6ce(0x5bf)])(_0x58a9b3,{..._0x223362,'area':_0x13821a,'field':_0x4592a0,'index':_0x290529,'fieldCount':_0x52851a['length']},_0x4592a0[_0x49b6ce(0x520)])):(0x0,_0x282aef[_0x49b6ce(0x5bf)])(_0x49b6ce(0x259),{'className':_0x49b6ce(0x1bc),'children':_0x2b1045['t'](_0x4b3ba4(_0x13821a))})})]},_0x13821a);})});}function _0x19fe22(_0x153640,_0x2c03d4){const _0x46780f=_0x34037b;switch(_0x2c03d4){case _0x46780f(0x154):return _0x153640[_0x46780f(0x20c)][_0x46780f(0x3d7)];case _0x46780f(0x612):return _0x153640[_0x46780f(0x467)][_0x46780f(0x3d7)];case _0x46780f(0x4b9):return _0x153640[_0x46780f(0x1ba)]['length'];case _0x46780f(0x66f):return _0x153640[_0x46780f(0x3e0)][_0x46780f(0x3d7)];default:return 0x0;}}function _0x4f38c1(_0x29207f){const _0x94ccb3=_0x34037b;let _0x113fde='univer-size-4\x20univer-shrink-0\x20univer-text-gray-500';switch(_0x29207f[_0x94ccb3(0x490)]){case _0x55c699[_0x94ccb3(0x207)]['number']:return(0x0,_0x282aef[_0x94ccb3(0x5bf)])(_0xeac63,{'className':_0x113fde});case _0x55c699[_0x94ccb3(0x207)][_0x94ccb3(0x175)]:return(0x0,_0x282aef[_0x94ccb3(0x5bf)])(_0x4ad438,{'className':_0x113fde});default:return(0x0,_0x282aef[_0x94ccb3(0x5bf)])(_0x1177fb,{'className':_0x113fde});}}function _0x138a49(_0x120a19){const _0xf14cda=_0x34037b;let {field:_0x3fad14,info:_0x30d079,pivotTableId:_0x3b5346,unitId:_0x23f62d,subUnitId:_0x365209,refresh:_0x27f9ea}=_0x120a19,_0x2f8e5e=(0x0,_0x2ef21f[_0xf14cda(0x1a2)])(_0x1ed97c['ICommandService']),_0x30cdda=(0x0,_0x2ef21f[_0xf14cda(0x1a2)])(_0x1ed97c[_0xf14cda(0x4ad)]),_0x18395a={'pivotTableInfo':_0x30d079,'pivotTableId':_0x3b5346,'commandService':_0x2f8e5e,'unitId':_0x23f62d,'subUnitId':_0x365209};async function _0x288495(_0x395e41){const _0x307331=_0xf14cda;if(_0x395e41){let _0x3d3385=_0x3fad14[_0x307331(0x490)]===_0x55c699['PivotDataFieldDataTypeEnum']['number']?_0x307331(0x66f):'row';await _0x48c10d(_0x18395a,_0x3fad14['dataFieldId'],_0x307331(0x2ec),_0x3d3385,_0x19fe22(_0x30d079,_0x3d3385));}else await _0x4e67e7(_0x18395a,_0x3fad14['dataFieldId'],'source');await _0x27f9ea();}async function _0x1330a4(_0x5263c8){const _0x2e4b54=_0xf14cda;await _0x48c10d(_0x18395a,_0x3fad14['dataFieldId'],_0x2e4b54(0x2ec),_0x5263c8,_0x19fe22(_0x30d079,_0x5263c8)),await _0x27f9ea();}let _0x120a30=[{'type':_0xf14cda(0x181),'children':_0x30cdda['t'](_0xf14cda(0x3f4)),'onSelect':()=>_0x1330a4('row')},{'type':_0xf14cda(0x181),'children':_0x30cdda['t'](_0xf14cda(0x5ab)),'onSelect':()=>_0x1330a4(_0xf14cda(0x612))},{'type':'item','children':_0x30cdda['t']('sheets-pivot-ui.addToValue'),'onSelect':()=>_0x1330a4(_0xf14cda(0x66f))},{'type':_0xf14cda(0x181),'children':_0x30cdda['t'](_0xf14cda(0x45b)),'onSelect':()=>_0x1330a4('filter')}];return(0x0,_0x282aef[_0xf14cda(0x567)])(_0xf14cda(0x259),{'className':_0xf14cda(0x151),'children':[(0x0,_0x282aef[_0xf14cda(0x5bf)])(_0x3fc00c[_0xf14cda(0x6b3)],{'checked':_0x3fad14[_0xf14cda(0x1ab)],'onChange':_0x3017b4=>_0x288495(!!_0x3017b4)}),(0x0,_0x282aef[_0xf14cda(0x5bf)])(_0x4f38c1,{'type':_0x3fad14[_0xf14cda(0x490)]}),(0x0,_0x282aef[_0xf14cda(0x5bf)])(_0xf14cda(0x498),{'className':'univer-min-w-0\x20univer-flex-1\x20univer-truncate\x20univer-text-sm','dir':_0xf14cda(0x6aa),'children':_0x3fad14['name']}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0xf14cda(0x541)],{'items':_0x120a30,'children':(0x0,_0x282aef[_0xf14cda(0x5bf)])('button',{'type':'button','className':'univer-flex\x20univer-size-10\x20univer-shrink-0\x20univer-items-center\x20univer-justify-center\x20univer-rounded-lg\x20univer-border-0\x20univer-bg-transparent\x20active:univer-bg-gray-100\x20dark:active:!univer-bg-gray-700','children':(0x0,_0x282aef[_0xf14cda(0x5bf)])(_0x184fe1,{})})})]});}function _0x198031(_0x43cdfa){const _0x39b21a=_0x34037b;let {info:_0x3f4e82}=_0x43cdfa,_0x4ccffc=(0x0,_0x2ef21f[_0x39b21a(0x1a2)])(_0x1ed97c['LocaleService']),[_0x537c8f,_0x136248]=(0x0,_0x2b3aa2['useState'])(''),_0x2cc8b2=_0x537c8f[_0x39b21a(0x6de)]()[_0x39b21a(0x22a)](),_0x386ba3=_0x2cc8b2?_0x3f4e82[_0x39b21a(0x2ac)]['filter'](_0x342544=>_0x342544[_0x39b21a(0x3a1)][_0x39b21a(0x22a)]()[_0x39b21a(0x5fe)](_0x2cc8b2)):_0x3f4e82[_0x39b21a(0x2ac)];return(0x0,_0x282aef[_0x39b21a(0x567)])(_0x39b21a(0x26f),{'className':_0x39b21a(0x38d),'children':[(0x0,_0x282aef[_0x39b21a(0x567)])('div',{'children':[(0x0,_0x282aef[_0x39b21a(0x5bf)])(_0x39b21a(0x259),{'className':_0x39b21a(0x608),'children':_0x4ccffc['t'](_0x39b21a(0x17a))}),(0x0,_0x282aef[_0x39b21a(0x5bf)])('div',{'className':_0x39b21a(0x23f),'children':_0x4ccffc['t'](_0x39b21a(0x1b2))})]}),(0x0,_0x282aef[_0x39b21a(0x5bf)])(_0x3fc00c[_0x39b21a(0x45e)],{'allowClear':!0x0,'value':_0x537c8f,'placeholder':_0x4ccffc['t']('sheets-pivot-ui.searchFieldPlaceholder'),'slot':(0x0,_0x282aef[_0x39b21a(0x5bf)])(_0x58cfa4,{}),'onChange':_0x136248,'size':'small'}),(0x0,_0x282aef[_0x39b21a(0x5bf)])(_0x39b21a(0x259),{'className':_0x39b21a(0x53d),'children':_0x386ba3[_0x39b21a(0x3d7)]?_0x386ba3[_0x39b21a(0x23e)](_0x51356d=>(0x0,_0x282aef[_0x39b21a(0x5bf)])(_0x138a49,{..._0x43cdfa,'field':_0x51356d},_0x51356d['id'])):(0x0,_0x282aef['jsx'])(_0x39b21a(0x259),{'className':'univer-p-4\x20univer-text-center\x20univer-text-sm\x20univer-text-gray-500','children':_0x4ccffc['t'](_0x39b21a(0x68e))})})]});}function _0x732e76(_0x454271){const _0x30c5a6=_0x34037b;var _0x38912f;let {sourceRangeInfo:_0x168861,positionInfo:_0xd0847c,pivotTableId:_0x3bc836,refresh:_0x17c3fd}=_0x454271,_0x2ab30e=(0x0,_0x2ef21f[_0x30c5a6(0x1a2)])(_0x1ed97c[_0x30c5a6(0x4ab)]),_0x3546b8=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x30c5a6(0x2b4)]),_0x378ec2=(0x0,_0x2ef21f[_0x30c5a6(0x1a2)])(_0x1ed97c[_0x30c5a6(0x4ad)]),_0x1d6256=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c['IUniverInstanceService'])[_0x30c5a6(0x538)](_0x168861['unitId']),_0x56fa8f=(_0x1d6256==null||(_0x38912f=_0x1d6256['getSheetBySheetId'](_0x168861['subUnitId']))==null?void 0x0:_0x38912f[_0x30c5a6(0x5e0)]())??_0x168861[_0x30c5a6(0x3fa)],[_0x255400,_0x5003c5]=(0x0,_0x2b3aa2[_0x30c5a6(0x189)])(_0x168861[_0x30c5a6(0x22d)]),[_0x3bf929,_0x3eefc3]=(0x0,_0x2b3aa2[_0x30c5a6(0x189)])(_0x56fa8f),[_0x3f3748,_0x175b02]=(0x0,_0x2b3aa2[_0x30c5a6(0x189)])('');(0x0,_0x2b3aa2[_0x30c5a6(0x39c)])(()=>{_0x5003c5(_0x168861['range']),_0x3eefc3(_0x56fa8f);},[_0x56fa8f,_0x168861]);async function _0x1ac52b(_0x53d674){const _0x13406e=_0x30c5a6;let _0x2256c4=_0x53d674['split'](',')['filter'](Boolean)['map'](_0x43497d[_0x13406e(0x174)])[0x0];if(!_0x2256c4||!_0x1d6256){_0x175b02(_0x378ec2['t'](_0x13406e(0x51a)));return;}let _0x15a80f=_0x2256c4[_0x13406e(0x3fa)]||_0x168861[_0x13406e(0x3fa)],_0x18fb57=_0x1d6256[_0x13406e(0x690)](_0x15a80f),_0x184455=_0x54f172(_0x18fb57,_0x2256c4[_0x13406e(0x22d)]);if(_0x184455!==0x2||!_0x18fb57){let _0x1d52ee=_0x184455===0x0?_0x13406e(0x51a):'sheets-pivot-ui.msg.invalidSize';_0x175b02(_0x378ec2['t'](_0x1d52ee));}else _0x175b02(''),_0x5003c5(_0x2256c4[_0x13406e(0x22d)]),_0x3eefc3(_0x15a80f),await _0x4e1716(_0x2ab30e,_0x3bc836,{'unitId':_0x168861[_0x13406e(0x6bb)],'subUnitId':_0x18fb57['getSheetId'](),'range':_0x2256c4['range'],'sheetName':_0x15a80f},_0xd0847c[_0x13406e(0x6bb)],_0xd0847c[_0x13406e(0x42b)]),await _0x17c3fd();}return(0x0,_0x282aef[_0x30c5a6(0x567)])(_0x30c5a6(0x26f),{'children':[(0x0,_0x282aef['jsx'])(_0x30c5a6(0x259),{'className':_0x30c5a6(0x362),'children':_0x378ec2['t'](_0x30c5a6(0x69b))}),(0x0,_0x282aef[_0x30c5a6(0x5bf)])(_0x1e2b01[_0x30c5a6(0x589)],{'unitId':_0x168861[_0x30c5a6(0x6bb)],'subUnitId':_0x168861[_0x30c5a6(0x42b)],'initialValue':(0x0,_0x43497d[_0x30c5a6(0x2f2)])(_0x3bf929,_0x255400),'maxRangeCount':0x1,'keepSheetReference':!0x0,'supportAcrossSheet':!0x0,'onChange':(_0x57fdbb,_0x34b89e)=>_0x1ac52b(_0x34b89e)[_0x30c5a6(0x1d4)](_0x8c90bf=>{const _0x4bbc0a=_0x30c5a6;_0x3546b8['error'](_0x4bbc0a(0x16f),_0x8c90bf);})}),_0x3f3748&&(0x0,_0x282aef[_0x30c5a6(0x5bf)])(_0x30c5a6(0x259),{'className':_0x30c5a6(0x3c0),'children':_0x3f3748})]});}function _0x1435d1(_0x1fd7b0){const _0x84a634=_0x34037b;let {pivotTableId:_0x4ae676,version:_0x2c4b13,unitId:_0x32f6c4,subUnitId:_0x88266b,panelInfo:_0x378555}=_0x1fd7b0,_0x1d0f52=(0x0,_0x2ef21f['useDependency'])(_0x5ec675[_0x84a634(0x1c2)]),_0x3fc558=(0x0,_0x2ef21f['useDependency'])(_0x5ec675[_0x84a634(0x43d)]),_0x5a08df=(0x0,_0x2ef21f[_0x84a634(0x1a2)])(_0x1ed97c[_0x84a634(0x2b4)]),_0x58026f=(0x0,_0x2b3aa2[_0x84a634(0x6c9)])(()=>_0x1d0f52['watchPivotTableChanges'](_0x32f6c4,_0x88266b,_0x4ae676)[_0x84a634(0x1dd)]((0x0,_0x3ae495['debounceTime'])(0x0)),[_0x1d0f52,_0x32f6c4,_0x88266b,_0x4ae676]),_0x35a15e=(0x0,_0x2ef21f[_0x84a634(0x22f)])(_0x58026f),[_0x502da1,_0x5d9339]=(0x0,_0x2b3aa2['useState'])(_0x378555),_0x4a68bb=(0x0,_0x2b3aa2[_0x84a634(0x4a2)])(async()=>{const _0x5731a7=_0x84a634;if(!_0x1d0f52[_0x5731a7(0x399)](_0x32f6c4,_0x88266b,_0x4ae676))return;let _0x12d130=await _0x3fc558[_0x5731a7(0x692)]({'unitId':_0x32f6c4,'subUnitId':_0x88266b,'pivotTableId':_0x4ae676,'params':{'type':_0x5ec675[_0x5731a7(0x414)][_0x5731a7(0x232)],'panel':{'pivotTableId':_0x4ae676}}});_0x12d130[_0x5731a7(0x420)][_0x5731a7(0x619)]&&_0x5d9339(_0x12d130[_0x5731a7(0x420)][_0x5731a7(0x619)]);},[_0x1d0f52,_0x4ae676,_0x3fc558,_0x88266b,_0x32f6c4]);return(0x0,_0x2b3aa2[_0x84a634(0x39c)])(()=>{const _0x3b5876=_0x84a634;_0x4a68bb()[_0x3b5876(0x1d4)](_0x509da2=>_0x5a08df['error'](_0x3b5876(0x6ca),_0x509da2));},[_0x35a15e,_0x5a08df,_0x4a68bb,_0x2c4b13]),(0x0,_0x282aef[_0x84a634(0x567)])(_0x84a634(0x259),{'className':_0x84a634(0x63d),'children':[(0x0,_0x282aef[_0x84a634(0x5bf)])(_0x732e76,{'sourceRangeInfo':_0x502da1[_0x84a634(0x31c)],'positionInfo':_0x502da1['positionInfo'],'pivotTableId':_0x4ae676,'refresh':_0x4a68bb}),(0x0,_0x282aef[_0x84a634(0x5bf)])(_0x198031,{'info':_0x502da1,'pivotTableId':_0x4ae676,'unitId':_0x32f6c4,'subUnitId':_0x88266b,'refresh':_0x4a68bb}),(0x0,_0x282aef[_0x84a634(0x5bf)])(_0x595d01,{'info':_0x502da1,'pivotTableId':_0x4ae676,'unitId':_0x32f6c4,'subUnitId':_0x88266b,'refresh':_0x4a68bb})]});}function _0x2c13e4(_0x4e8cd7){const _0x5a9da1=_0x34037b;let {className:_0x3d10d9,unitId:_0x2d22d6,subUnitId:_0xb37945,pivotTableId:_0x5ad1a9}=_0x4e8cd7,[_0x2164af,_0xb06d81]=(0x0,_0x2b3aa2[_0x5a9da1(0x189)])(_0x5a9da1(0x3b1)),_0x557521=(0x0,_0x2ef21f[_0x5a9da1(0x1a2)])(_0x1ed97c[_0x5a9da1(0x4ad)]);return(0x0,_0x282aef[_0x5a9da1(0x567)])(_0x5a9da1(0x259),{'className':(0x0,_0x3fc00c['clsx'])(_0x5a9da1(0x18f),_0x3d10d9),'dir':_0x557521[_0x5a9da1(0x412)](),'children':[(0x0,_0x282aef[_0x5a9da1(0x5bf)])(_0x3fc00c[_0x5a9da1(0x1df)],{'className':'univer-sticky\x20univer-top-0\x20univer-z-10\x20univer-my-3\x20univer-w-full\x20univer-shrink-0','items':[{'label':_0x557521['t'](_0x5a9da1(0x243)),'value':_0x5a9da1(0x3b1)},{'label':_0x557521['t'](_0x5a9da1(0x21f)),'value':'config'}],'value':_0x2164af,'onChange':_0xb06d81}),(0x0,_0x282aef[_0x5a9da1(0x5bf)])('div',{'className':'univer-min-h-0\x20univer-flex-1\x20univer-overflow-y-auto','children':_0x2164af===_0x5a9da1(0x3b1)?(0x0,_0x282aef['jsx'])(_0x1435d1,{..._0x4e8cd7}):(0x0,_0x282aef[_0x5a9da1(0x5bf)])(_0x178d40,{'unitId':_0x2d22d6,'subUnitId':_0xb37945,'pivotTableId':_0x5ad1a9})})]});}function _0xe1c32f(_0x47b9a4,_0x17f1ed){const _0x52c732=_0x34037b;switch(_0x47b9a4){case 0x1:return _0x17f1ed['t'](_0x52c732(0x3ef));case 0x0:return _0x17f1ed['t'](_0x52c732(0x51a));default:return'';}}function _0xe396c6(_0x18e56b){const _0x4a3edd=_0x34037b;let {unitId:_0x4167ee,subUnitId:_0x50d550,sourceRange:_0xe9f7df,positionRange:_0x4e61ae,sourceSheetName:_0x58ce29,positionSheetName:_0x3b4714,onConfirm:_0x10c059,onCancel:_0x57cacb}=_0x18e56b,_0x4ac55f=(0x0,_0x2ef21f[_0x4a3edd(0x1a2)])(_0x1ed97c[_0x4a3edd(0x4ad)]),_0x57e672=(0x0,_0x2ef21f[_0x4a3edd(0x1a2)])(_0x1ed97c['IUniverInstanceService'])['getUnit'](_0x4167ee),[_0x1c96f5,_0x34751c]=(0x0,_0x2b3aa2['useState'])(_0xe9f7df),[_0x18cc11,_0x495395]=(0x0,_0x2b3aa2['useState'])(_0x4e61ae),[_0x1f991c,_0x5764bb]=(0x0,_0x2b3aa2[_0x4a3edd(0x189)])(_0x58ce29),[_0xdf03e6,_0x2cbc3e]=(0x0,_0x2b3aa2[_0x4a3edd(0x189)])(_0x3b4714),[_0x31b34d,_0x3fb31f]=(0x0,_0x2b3aa2[_0x4a3edd(0x189)])(_0x5ec675[_0x4a3edd(0x666)][_0x4a3edd(0x340)]),[_0x30b939,_0x23251f]=(0x0,_0x2b3aa2['useState'])(''),[_0x2778b3,_0x499dc7]=(0x0,_0x2b3aa2[_0x4a3edd(0x189)])(!0x0);(0x0,_0x2b3aa2['useEffect'])(()=>{const _0x19441c=_0x4a3edd;let _0x3be0fd=_0x54f172(_0x57e672[_0x19441c(0x690)](_0x1f991c),_0x1c96f5);_0x23251f(_0xe1c32f(_0x3be0fd,_0x4ac55f));},[_0x4ac55f,_0x1c96f5,_0x1f991c,_0x57e672]);function _0x3cc83a(_0x16b3c9){const _0x1dcdba=_0x4a3edd;let _0x487625=_0x16b3c9[_0x1dcdba(0x66d)](',')['filter'](Boolean)['map'](_0x43497d[_0x1dcdba(0x174)])[0x0];_0x487625?(_0x34751c(_0x487625['range']),_0x5764bb(_0x487625[_0x1dcdba(0x3fa)]||_0x1f991c)):_0x23251f(_0x4ac55f['t'](_0x1dcdba(0x51a)));}function _0x610632(_0xa9ead0){const _0x2d019e=_0x4a3edd;let _0x1d858a=_0xa9ead0['split'](',')[_0x2d019e(0x154)](Boolean)[_0x2d019e(0x23e)](_0x43497d['deserializeRangeWithSheet'])[0x0];if(!_0x1d858a){_0x495395(null);return;}let _0x3fd18e=_0x1d858a[_0x2d019e(0x3fa)]||_0x58ce29;_0x495395(_0x1d858a[_0x2d019e(0x22d)]),_0x2cbc3e(_0x3fd18e),_0x499dc7(_0x3fd18e!==_0x1f991c||!_0x1ed97c[_0x2d019e(0x15f)][_0x2d019e(0x1f9)](_0x1d858a['range'],_0x1c96f5));}function _0x1d680a(){const _0x24dad7=_0x4a3edd;if(_0x30b939)return;let _0x994416;if(_0x31b34d===_0x5ec675[_0x24dad7(0x666)]['Existing']){if(!_0x18cc11||!_0x2778b3)return;_0x994416={'sourceRange':_0x1c96f5,'sourceSheetName':_0x1f991c,'positionRange':_0x18cc11,'positionSheetName':_0xdf03e6,'positionType':_0x31b34d};}else _0x994416={'sourceRange':_0x1c96f5,'sourceSheetName':_0x1f991c,'positionType':_0x31b34d};_0x10c059(_0x994416);}return(0x0,_0x282aef[_0x4a3edd(0x567)])(_0x4a3edd(0x259),{'className':'univer-flex\x20univer-flex-col\x20univer-gap-5','dir':_0x4ac55f[_0x4a3edd(0x412)](),'children':[(0x0,_0x282aef[_0x4a3edd(0x567)])(_0x4a3edd(0x26f),{'children':[(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x4a3edd(0x259),{'className':_0x4a3edd(0x362),'children':_0x4ac55f['t']('sheets-pivot-ui.dialog.source.sourceData')}),(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x1e2b01['MobileRangeSelector'],{'unitId':_0x4167ee,'subUnitId':_0x50d550,'initialValue':(0x0,_0x43497d['serializeRangeWithSheet'])(_0x1f991c,_0x1c96f5),'maxRangeCount':0x1,'supportAcrossSheet':!0x0,'keepSheetReference':!0x0,'onChange':(_0x4f576b,_0x850c7e)=>_0x3cc83a(_0x850c7e)}),_0x30b939&&(0x0,_0x282aef['jsx'])('div',{'className':'univer-mt-2\x20univer-text-xs\x20univer-text-red-500','children':_0x30b939})]}),(0x0,_0x282aef['jsxs'])('section',{'children':[(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x4a3edd(0x259),{'className':_0x4a3edd(0x362),'children':_0x4ac55f['t'](_0x4a3edd(0x159))}),(0x0,_0x282aef[_0x4a3edd(0x567)])(_0x3fc00c['RadioGroup'],{'className':'univer-flex\x20univer-flex-col\x20univer-gap-3','value':_0x31b34d,'onChange':_0x55a118=>_0x3fb31f(_0x55a118),'children':[(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x3fc00c[_0x4a3edd(0x485)],{'value':_0x5ec675[_0x4a3edd(0x666)]['New'],'children':_0x4ac55f['t'](_0x4a3edd(0x689))}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x4a3edd(0x485)],{'value':_0x5ec675['PositionType'][_0x4a3edd(0x327)],'children':_0x4ac55f['t']('sheets-pivot-ui.dialog.source.existingSheet')})]}),_0x31b34d===_0x5ec675[_0x4a3edd(0x666)][_0x4a3edd(0x327)]&&(0x0,_0x282aef[_0x4a3edd(0x567)])(_0x4a3edd(0x259),{'className':_0x4a3edd(0x1cc),'children':[(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x1e2b01[_0x4a3edd(0x589)],{'unitId':_0x4167ee,'subUnitId':_0x50d550,'initialValue':_0x18cc11?(0x0,_0x43497d['serializeRangeWithSheet'])(_0xdf03e6,_0x18cc11):'','maxRangeCount':0x1,'supportAcrossSheet':!0x0,'keepSheetReference':!0x0,'onChange':(_0x4d2bf8,_0x456c57)=>_0x610632(_0x456c57)}),!_0x2778b3&&(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x4a3edd(0x259),{'className':_0x4a3edd(0x3c0),'children':_0x4ac55f['t']('sheets-pivot-ui.dialog.source.intersect')})]})]}),(0x0,_0x282aef[_0x4a3edd(0x567)])(_0x3fc00c[_0x4a3edd(0x61c)],{'children':[(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x3fc00c[_0x4a3edd(0x2f8)],{'onClick':_0x57cacb,'size':_0x4a3edd(0x423),'children':_0x4ac55f['t']('sheets-pivot-ui.dialog.cancel')}),(0x0,_0x282aef[_0x4a3edd(0x5bf)])(_0x3fc00c[_0x4a3edd(0x2f8)],{'variant':'primary','onClick':_0x1d680a,'size':_0x4a3edd(0x423),'children':_0x4ac55f['t'](_0x4a3edd(0x604))})]})]});}let _0x4cee9f=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x257fac,_0x4e852e){const _0x4e60d8=_0x34037b;super(),[[_0x34436c,_0xe396c6],[_0x4a650f,_0x2c13e4],[_0x32bf4e,_0x250399],[_0xce0285,_0x3b4ae8],[_0x3ff5dc,_0x4bd94c],[_0x57dcf9,_0x4d719f]]['forEach'](([_0xc506df,_0x36135c])=>{const _0x4cf20e=_0x5115;this[_0x4cf20e(0x2a7)](_0x257fac[_0x4cf20e(0x2ae)](_0xc506df,_0x36135c));}),this[_0x4e60d8(0x2a7)](_0x4e852e[_0x4e60d8(0x2ae)]({'PivotTableIcon':_0x4aa130}));}};_0x4cee9f=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f['ComponentManager'])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f[_0x34037b(0x3a5)]))],_0x4cee9f);function _0x4a47e7(_0x538371){const _0x34d04e=_0x34037b;return{'id':_0x288ca1['id'],'commandId':_0x288ca1['id'],'type':_0x2ef21f[_0x34d04e(0x473)]['BUTTON'],'icon':'PivotTableIcon','title':_0x34d04e(0x246),'tooltip':_0x34d04e(0x246),'hidden$':(0x0,_0x2ef21f['getMenuHiddenObservable'])(_0x538371,_0x1ed97c[_0x34d04e(0x3f9)][_0x34d04e(0x2a8)]),'disabled$':(0x0,_0x21977c[_0x34d04e(0x289)])(_0x538371,(0x0,_0x21977c['getCurrentRangeDisable$'])(_0x538371,{'workbookTypes':[_0x44d557[_0x34d04e(0x1d0)]],'worksheetTypes':[_0x44d557[_0x34d04e(0x5ea)],_0x44d557[_0x34d04e(0x64c)]],'rangeTypes':[_0x44d557[_0x34d04e(0x43e)]]}))};}let _0x4191ee={[_0x2ef21f[_0x34037b(0x3b7)][_0x34037b(0x5f9)]]:{[_0x288ca1['id']]:{'order':0x1,'gridLayout':{'row':0x2,'column':0x1},'menuItemFactory':_0x4a47e7}},[_0x2ef21f[_0x34037b(0x427)][_0x34037b(0x33c)]]:{[_0x2ef21f[_0x34037b(0x6e7)]['DATA']]:{[_0x288ca1['id']]:{'order':0x1,'menuItemFactory':_0x4a47e7}}}},_0x27256c=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x3d9cb2){const _0x1b74a2=_0x34037b;super(),_0x3d9cb2[_0x1b74a2(0x132)](_0x4191ee);}};_0x27256c=_0x41bfa1([_0x5e4599(0x0,_0x2ef21f[_0x34037b(0x2a5)])],_0x27256c);let _0x1d49d4=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x1ad2a7,_0x4016fb,_0x4fc7e8,_0xf86bb0){const _0x1fb064=_0x34037b;super(),this['_sidebarService']=_0x4fc7e8,this[_0x1fb064(0x1a8)]=_0xf86bb0,_0x27eded(this,_0x1fb064(0x658),null),this[_0x1fb064(0x2a7)](_0x1ad2a7['onCommandExecuted'](_0x16ae2e=>{const _0x54f472=_0x1fb064;_0x16ae2e['id']===_0x5f33e8['id']?this['_pivotTableId']=_0x16ae2e[_0x54f472(0x317)]['pivotTableId']:_0x16ae2e['id']===_0x5ec675[_0x54f472(0x6c4)]['id']&&_0x16ae2e['params']['pivotTableId']===this[_0x54f472(0x658)]&&this[_0x54f472(0x3a8)]();}));let _0x255df1=_0x4016fb[_0x1fb064(0x395)](_0x1ed97c[_0x1fb064(0x3f9)][_0x1fb064(0x2a8)]);_0x255df1&&(this['disposeWithMe'](_0x255df1['activeSheet$'][_0x1fb064(0x1dd)]((0x0,_0x3ae495[_0x1fb064(0x54f)])(0x1))[_0x1fb064(0x659)](()=>this['_closePanel']())),this[_0x1fb064(0x2a7)](_0x255df1[_0x1fb064(0x4de)][_0x1fb064(0x659)](()=>this['_closePanel']()))),this[_0x1fb064(0x2a7)](this[_0x1fb064(0x329)][_0x1fb064(0x187)][_0x1fb064(0x659)](_0x191d54=>{const _0x74ba93=_0x1fb064;_0x191d54['id']===_0x74ba93(0x349)&&_0x191d54[_0x74ba93(0x173)]===!0x1&&(this[_0x74ba93(0x658)]=null,this[_0x74ba93(0x19a)]());}));}[_0x34037b(0x3a8)](){const _0x565d65=_0x34037b;this[_0x565d65(0x658)]=null,this['_sidebarService']['close'](_0x414c39),this[_0x565d65(0x19a)]();}[_0x34037b(0x19a)](){const _0x31ba31=_0x34037b;this[_0x31ba31(0x1a8)]['close'](_0x24e684),this[_0x31ba31(0x1a8)][_0x31ba31(0x6a2)](_0x178877),this[_0x31ba31(0x1a8)][_0x31ba31(0x6a2)](_0x4442ad);}};_0x1d49d4=_0x41bfa1([_0x5e4599(0x0,_0x1ed97c[_0x34037b(0x4ab)]),_0x5e4599(0x1,_0x1ed97c[_0x34037b(0x61a)]),_0x5e4599(0x2,_0x2ef21f['ISidebarService']),_0x5e4599(0x3,_0x2ef21f[_0x34037b(0x2e3)])],_0x1d49d4),new Path2D(_0x34037b(0x465));var _0x3333aa=class{static[_0x34037b(0x3ca)](_0x5f11d0,_0x4d3dec,_0x2df3e,_0x33260b){const _0x1525c7=_0x34037b;_0x5f11d0[_0x1525c7(0x69c)](),_0x4134a1[_0x1525c7(0x12e)][_0x1525c7(0x4db)](_0x5f11d0,{'radius':0x2,'width':0x10,'height':0x10,'fill':_0x33260b}),_0x5f11d0[_0x1525c7(0x32d)]='square',_0x5f11d0[_0x1525c7(0x2bd)]=_0x2df3e,_0x5f11d0[_0x1525c7(0x605)](_0x4d3dec/0x10,_0x4d3dec/0x10),_0x5f11d0[_0x1525c7(0x59e)](),_0x5f11d0[_0x1525c7(0x454)]=0x1,_0x5f11d0[_0x1525c7(0x32d)]=_0x1525c7(0x2e4),_0x5f11d0[_0x1525c7(0x5d0)](0x3,0x4),_0x5f11d0[_0x1525c7(0x65f)](0xd,0x4),_0x5f11d0[_0x1525c7(0x5d0)](4.5,0x8),_0x5f11d0[_0x1525c7(0x65f)](11.5,0x8),_0x5f11d0[_0x1525c7(0x5d0)](0x6,0xc),_0x5f11d0[_0x1525c7(0x65f)](0xa,0xc),_0x5f11d0[_0x1525c7(0x6d7)](),_0x5f11d0[_0x1525c7(0x42e)]();}static[_0x34037b(0x2c7)](_0x174796,_0x42f17d,_0x1dc9e2,_0x18c6ba,_0x337550){const _0x4d45fa=_0x34037b;let _0x8722f8=(_0x337550-_0x42f17d)/0x2;_0x174796[_0x4d45fa(0x69c)](),_0x174796[_0x4d45fa(0x6a5)]=_0x18c6ba,_0x174796['strokeStyle']=_0x1dc9e2,_0x174796['beginPath'](),_0x174796[_0x4d45fa(0x5d0)](0x6,_0x8722f8),_0x174796[_0x4d45fa(0x65f)](0x4+_0x42f17d-0x2,_0x8722f8),_0x174796['arcTo'](0x4+_0x42f17d,_0x8722f8,0x4+_0x42f17d,_0x8722f8+0x2,0x2),_0x174796[_0x4d45fa(0x65f)](0x4+_0x42f17d,_0x8722f8+_0x42f17d-0x2),_0x174796[_0x4d45fa(0x2c1)](0x4+_0x42f17d,_0x8722f8+_0x42f17d,0x4+_0x42f17d-0x2,_0x8722f8+_0x42f17d,0x2),_0x174796[_0x4d45fa(0x65f)](0x6,_0x8722f8+_0x42f17d),_0x174796[_0x4d45fa(0x2c1)](0x4,_0x8722f8+_0x42f17d,0x4,_0x8722f8+_0x42f17d-0x2,0x2),_0x174796[_0x4d45fa(0x65f)](0x4,_0x8722f8+0x2),_0x174796[_0x4d45fa(0x2c1)](0x4,_0x8722f8,0x6,_0x8722f8,0x2),_0x174796[_0x4d45fa(0x595)](),_0x174796[_0x4d45fa(0x6d7)](),_0x174796['fill'](),_0x174796[_0x4d45fa(0x59e)](),_0x174796[_0x4d45fa(0x5d0)](0x4+_0x42f17d/0x2,_0x8722f8+0x2),_0x174796[_0x4d45fa(0x65f)](0x4+_0x42f17d/0x2,_0x8722f8+_0x42f17d-0x2),_0x174796['moveTo'](0x6,_0x8722f8+_0x42f17d/0x2),_0x174796['lineTo'](0x4+_0x42f17d-0x2,_0x8722f8+_0x42f17d/0x2),_0x174796[_0x4d45fa(0x6d7)](),_0x174796[_0x4d45fa(0x42e)]();}static[_0x34037b(0x6b6)](_0x2a7411,_0x583824,_0x13ce4a,_0x1fcaa6,_0x5234a2){const _0x337a50=_0x34037b;let _0x364203=(_0x5234a2-_0x583824)/0x2;_0x2a7411[_0x337a50(0x69c)](),_0x2a7411[_0x337a50(0x6a5)]=_0x1fcaa6,_0x2a7411[_0x337a50(0x2bd)]=_0x13ce4a,_0x2a7411[_0x337a50(0x59e)](),_0x2a7411[_0x337a50(0x5d0)](0x6,_0x364203),_0x2a7411[_0x337a50(0x65f)](0x4+_0x583824-0x2,_0x364203),_0x2a7411['arcTo'](0x4+_0x583824,_0x364203,0x4+_0x583824,_0x364203+0x2,0x2),_0x2a7411['lineTo'](0x4+_0x583824,_0x364203+_0x583824-0x2),_0x2a7411[_0x337a50(0x2c1)](0x4+_0x583824,_0x364203+_0x583824,0x4+_0x583824-0x2,_0x364203+_0x583824,0x2),_0x2a7411['lineTo'](0x6,_0x364203+_0x583824),_0x2a7411[_0x337a50(0x2c1)](0x4,_0x364203+_0x583824,0x4,_0x364203+_0x583824-0x2,0x2),_0x2a7411[_0x337a50(0x65f)](0x4,_0x364203+0x2),_0x2a7411[_0x337a50(0x2c1)](0x4,_0x364203,0x6,_0x364203,0x2),_0x2a7411[_0x337a50(0x595)](),_0x2a7411[_0x337a50(0x593)](),_0x2a7411[_0x337a50(0x6d7)](),_0x2a7411[_0x337a50(0x59e)](),_0x2a7411[_0x337a50(0x5d0)](0x6,_0x364203+_0x583824/0x2),_0x2a7411['lineTo'](0x4+_0x583824-0x2,_0x364203+_0x583824/0x2),_0x2a7411[_0x337a50(0x6d7)](),_0x2a7411['restore']();}static['drawIconByPath'](_0x55c071,_0xfce3f3,_0x407147,_0x310d3d){const _0x4e4c79=_0x34037b;_0x55c071[_0x4e4c79(0x69c)](),_0x55c071[_0x4e4c79(0x2bd)]=_0x407147,_0x55c071['fillStyle']=_0x310d3d,_0x4134a1[_0x4e4c79(0x12e)]['drawWith'](_0x55c071,{'radius':0x2,'width':0x10,'height':0x10,'fill':_0x310d3d}),_0xfce3f3['forEach'](_0x293515=>{const _0xd7ea4a=_0x4e4c79;let _0x4f6988=new Path2D(_0x293515);_0x55c071['fillStyle']=_0x407147,_0x55c071[_0xd7ea4a(0x593)](_0x4f6988,_0xd7ea4a(0x321));}),_0x55c071[_0x4e4c79(0x42e)]();}};let _0x272d86=[_0x34037b(0x465)],_0x5145f1=['M12.4008\x2013.1831C12.6907\x2013.1831\x2012.9258\x2012.9481\x2012.9258\x2012.6581V4.60873L14.013\x205.69597C14.218\x205.901\x2014.5505\x205.901\x2014.7555\x205.69597C14.9605\x205.49094\x2014.9605\x205.15853\x2014.7555\x204.95351L12.7721\x202.97017C12.5671\x202.76515\x2012.2347\x202.76515\x2012.0297\x202.97017L10.0463\x204.95351C9.84132\x205.15853\x209.84132\x205.49094\x2010.0463\x205.69597C10.2514\x205.901\x2010.5838\x205.901\x2010.7888\x205.69597L11.8758\x204.60901V12.6581C11.8758\x2012.9481\x2012.1108\x2013.1831\x2012.4008\x2013.1831Z','M1.28069\x204.85447C0.842195\x204.33439\x201.21191\x203.5391\x201.89218\x203.5391H8.59333C9.2736\x203.5391\x209.64331\x204.33439\x209.20482\x204.85447L6.51052\x208.0501V11.6601C6.51052\x2012.2245\x205.94174\x2012.6114\x205.41683\x2012.404L4.48092\x2012.0343C4.1756\x2011.9136\x203.97498\x2011.6187\x203.97498\x2011.2904V8.0501L1.28069\x204.85447Z'],_0x3d3ef4=[_0x34037b(0x5c8),_0x34037b(0x1ee)],_0x2c59bd=[_0x34037b(0x5b3),'M2.69779\x2010.0113C2.40546\x2010.0113\x202.16847\x209.77429\x202.16847\x209.48196C2.16847\x209.18962\x202.40546\x208.95264\x202.69779\x208.95264H6.67804C6.89213\x208.95264\x207.08514\x209.0816\x207.16707\x209.2794C7.249\x209.47719\x207.20371\x209.70486\x207.05233\x209.85624L3.97569\x2012.9329H6.67804C6.97038\x2012.9329\x207.20736\x2013.1699\x207.20736\x2013.4622C7.20736\x2013.7545\x206.97038\x2013.9915\x206.67804\x2013.9915H2.69779C2.4837\x2013.9915\x202.29069\x2013.8626\x202.20876\x2013.6648C2.12684\x2013.467\x202.17212\x2013.2393\x202.32351\x2013.0879L5.40015\x2010.0113H2.69779Z',_0x34037b(0x461)],_0x2ea438=['M11.9003\x202.29495C11.9003\x202.00261\x2011.6633\x201.76562\x2011.371\x201.76562C11.0787\x201.76562\x2010.8417\x202.00261\x2010.8417\x202.29495V12.4268L9.74577\x2011.3309C9.53906\x2011.1242\x209.20391\x2011.1242\x208.9972\x2011.3309C8.79048\x2011.5376\x208.79048\x2011.8727\x208.9972\x2012.0795L10.9969\x2014.0791C11.2036\x2014.2858\x2011.5387\x2014.2858\x2011.7454\x2014.0791L13.7451\x2012.0795C13.9518\x2011.8727\x2013.9518\x2011.5376\x2013.7451\x2011.3309C13.5384\x2011.1242\x2013.2032\x2011.1242\x2012.9965\x2011.3309L11.9003\x2012.4271V2.29495Z',_0x34037b(0x553),_0x34037b(0x512)],_0x1325be=new Set([_0x55c699[_0x34037b(0x65c)][_0x34037b(0x1e4)],_0x55c699[_0x34037b(0x65c)]['FilterPartial'],_0x55c699[_0x34037b(0x65c)][_0x34037b(0x1bd)],_0x55c699[_0x34037b(0x65c)]['FilterNoneSortNone'],_0x55c699[_0x34037b(0x65c)][_0x34037b(0x161)],_0x55c699[_0x34037b(0x65c)][_0x34037b(0x638)],_0x55c699[_0x34037b(0x65c)]['FilteredSortNone'],_0x55c699[_0x34037b(0x65c)][_0x34037b(0x497)],_0x55c699[_0x34037b(0x65c)][_0x34037b(0x220)]]),_0x4d8d8b=new Set([_0x55c699['PivotCellStyleTypeEnum'][_0x34037b(0x57a)],_0x55c699['PivotCellStyleTypeEnum'][_0x34037b(0x58c)]]),_0x63baa2=class extends _0x4134a1['Shape']{constructor(_0x338919,_0x3b5c2e,_0x396e5f,_0x1369ba){const _0x1156ab=_0x34037b;super(_0x338919,_0x3b5c2e),this[_0x1156ab(0x170)]=_0x396e5f,this[_0x1156ab(0x525)]=_0x1369ba,_0x27eded(this,'_cellWidth',0x0),_0x27eded(this,_0x1156ab(0x5e3),0x0),_0x27eded(this,_0x1156ab(0x3b4),!0x1),_0x27eded(this,_0x1156ab(0x197),void 0x0),this[_0x1156ab(0x5d5)](_0x3b5c2e),this[_0x1156ab(0x13d)][_0x1156ab(0x576)](_0x356f92=>this[_0x1156ab(0x32b)](_0x356f92)),this[_0x1156ab(0x4ba)][_0x1156ab(0x576)](()=>this[_0x1156ab(0x233)]()),this[_0x1156ab(0x2af)][_0x1156ab(0x576)](()=>this[_0x1156ab(0x224)]());}[_0x34037b(0x5d5)](_0x4775d7){const _0x4b043e=_0x34037b;_0x4775d7['cellHeight']!==void 0x0&&(this[_0x4b043e(0x5e3)]=_0x4775d7[_0x4b043e(0x674)]),_0x4775d7[_0x4b043e(0x2dc)]!==void 0x0&&(this[_0x4b043e(0x60c)]=_0x4775d7[_0x4b043e(0x2dc)]),_0x4775d7['pivotParams']!==void 0x0&&(this[_0x4b043e(0x197)]=_0x4775d7['pivotParams']),this[_0x4b043e(0x620)]({'width':_0x4775d7[_0x4b043e(0x3b2)],'height':_0x4775d7['height']});}[_0x34037b(0x32b)](_0xb919bb){const _0x548426=_0x34037b;if(_0xb919bb[_0x548426(0x63a)]===0x2)return;let {col:_0x476b18,row:_0xeea0e6,unitId:_0x41f157,subUnitId:_0x24324c,buttonType:_0x42f358}=this[_0x548426(0x197)];_0x1325be[_0x548426(0x3bd)](_0x42f358)?setTimeout(()=>{const _0xb14c9c=_0x548426;this[_0xb14c9c(0x170)][_0xb14c9c(0x1cd)](_0x30f033['id'],{'row':_0xeea0e6,'col':_0x476b18,'unitId':_0x41f157,'subUnitId':_0x24324c});},0xc8):this[_0x548426(0x170)][_0x548426(0x1cd)](_0x5ec675[_0x548426(0x3ed)]['id'],{'row':_0xeea0e6,'col':_0x476b18,'unitId':_0x41f157,'subUnitId':_0x24324c,'collapse':_0x42f358===_0x55c699[_0x548426(0x65c)][_0x548426(0x57a)]});}[_0x34037b(0x233)](){const _0x4c9df8=_0x34037b;this[_0x4c9df8(0x3b4)]=!0x0,this[_0x4c9df8(0x158)](_0x4134a1[_0x4c9df8(0x20b)][_0x4c9df8(0x459)]),this[_0x4c9df8(0x4c2)](!0x0);}[_0x34037b(0x224)](){const _0xba77aa=_0x34037b;this[_0xba77aa(0x3b4)]=!0x1,this[_0xba77aa(0x158)](_0x4134a1[_0xba77aa(0x20b)]['DEFAULT']),this['makeDirty'](!0x0);}['_draw'](_0x2ec4f2){const _0x17b0df=_0x34037b;var _0x2d172a,_0x11d63d;if(!((_0x2d172a=this[_0x17b0df(0x197)])!=null&&_0x2d172a[_0x17b0df(0x409)]))return;let _0xb52199=this['_themeService'][_0x17b0df(0x4b2)]('primary.600'),_0x2db0cd=this[_0x17b0df(0x525)][_0x17b0df(0x4b2)](_0x17b0df(0x37e));_0x2ec4f2[_0x17b0df(0x69c)]();let _0x14157c=new Path2D();_0x14157c[_0x17b0df(0x3ce)](0x0,0x0,this[_0x17b0df(0x60c)],this[_0x17b0df(0x5e3)]),_0x2ec4f2[_0x17b0df(0x647)](_0x14157c),((_0x11d63d=this[_0x17b0df(0x197)])==null?void 0x0:_0x11d63d[_0x17b0df(0x409)])===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x58c)]?_0x3333aa['drawExpand'](_0x2ec4f2,0xc,_0xb52199,_0x2db0cd,this[_0x17b0df(0x5e3)]):this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x57a)]?_0x3333aa[_0x17b0df(0x6b6)](_0x2ec4f2,0xc,_0xb52199,_0x2db0cd,this['_cellHeight']):this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)]['FilterAll']||this['_pivotParams'][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x28c)]?_0x3333aa[_0x17b0df(0x3ca)](_0x2ec4f2,0x10,_0xb52199,_0x2db0cd):this[_0x17b0df(0x197)]['buttonType']===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x1e9)]||this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)]['FilterSingle']||this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x3a7)]?_0x3333aa[_0x17b0df(0x4e7)](_0x2ec4f2,_0x272d86,_0xb52199,_0x2db0cd):this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x497)]?_0x3333aa[_0x17b0df(0x4e7)](_0x2ec4f2,_0x2c59bd,_0xb52199,_0x2db0cd):this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x220)]?_0x3333aa[_0x17b0df(0x4e7)](_0x2ec4f2,_0x2ea438,_0xb52199,_0x2db0cd):this[_0x17b0df(0x197)][_0x17b0df(0x409)]===_0x55c699['PivotCellStyleTypeEnum'][_0x17b0df(0x161)]?_0x3333aa[_0x17b0df(0x4e7)](_0x2ec4f2,_0x5145f1,_0xb52199,_0x2db0cd):this['_pivotParams'][_0x17b0df(0x409)]===_0x55c699[_0x17b0df(0x65c)][_0x17b0df(0x638)]&&_0x3333aa[_0x17b0df(0x4e7)](_0x2ec4f2,_0x3d3ef4,_0xb52199,_0x2db0cd),_0x2ec4f2[_0x17b0df(0x42e)]();}};_0x63baa2=_0x41bfa1([_0x5e4599(0x2,_0x1ed97c[_0x34037b(0x4ab)]),_0x5e4599(0x3,(0x0,_0x1ed97c['Inject'])(_0x1ed97c[_0x34037b(0x46c)]))],_0x63baa2);let _0x58f784=class extends _0x4134a1['Shape']{constructor(_0xb9d5c1,_0x37a807,_0x4558be,_0x17666f){const _0x1c40b2=_0x34037b;super(_0xb9d5c1,_0x37a807),this['_commandService']=_0x4558be,this[_0x1c40b2(0x525)]=_0x17666f,_0x27eded(this,_0x1c40b2(0x60c),void 0x0),_0x27eded(this,'_cellHeight',void 0x0),_0x27eded(this,_0x1c40b2(0x197),void 0x0),this[_0x1c40b2(0x60c)]=_0x37a807['cellWidth'],this['_cellHeight']=_0x37a807[_0x1c40b2(0x674)],this[_0x1c40b2(0x197)]=_0x37a807[_0x1c40b2(0x46f)],this[_0x1c40b2(0x620)]({'width':_0x37a807[_0x1c40b2(0x3b2)],'height':_0x37a807['height']}),this[_0x1c40b2(0x54c)][_0x1c40b2(0x576)](_0x1a7080=>this[_0x1c40b2(0x6c0)](_0x1a7080));}['_handlePointerUp'](_0x1f709c){const _0x76179c=_0x34037b;if(_0x1f709c[_0x76179c(0x63a)]===0x2)return;let {col:_0x183885,row:_0x575f66,unitId:_0x500d5e,subUnitId:_0xde7259,buttonType:_0x32b6f3}=this[_0x76179c(0x197)];if(_0x1325be[_0x76179c(0x3bd)](_0x32b6f3))return this['_commandService'][_0x76179c(0x1cd)](_0x30f033['id'],{'row':_0x575f66,'col':_0x183885,'unitId':_0x500d5e,'subUnitId':_0xde7259});if(_0x4d8d8b[_0x76179c(0x3bd)](_0x32b6f3))return this[_0x76179c(0x170)][_0x76179c(0x1cd)](_0x5ec675['SetPivotCollapseCommand']['id'],{'row':_0x575f66,'col':_0x183885,'unitId':_0x500d5e,'subUnitId':_0xde7259,'collapse':_0x32b6f3===_0x55c699[_0x76179c(0x65c)][_0x76179c(0x57a)]});}[_0x34037b(0x28d)](_0x2cff77){const _0x43bf19=_0x34037b;let _0x1471f5=this[_0x43bf19(0x197)][_0x43bf19(0x409)],_0x18c8ef=this[_0x43bf19(0x525)][_0x43bf19(0x4b2)](_0x43bf19(0x2dd)),_0x226fce=this[_0x43bf19(0x525)]['getColorFromTheme'](_0x43bf19(0x37e));_0x2cff77['save']();let _0x23be26=new Path2D();_0x23be26[_0x43bf19(0x3ce)](0x0,0x0,this[_0x43bf19(0x60c)],this[_0x43bf19(0x5e3)]),_0x2cff77[_0x43bf19(0x647)](_0x23be26),_0x2cff77[_0x43bf19(0x3e6)](0x6,0x6),_0x1471f5===_0x55c699[_0x43bf19(0x65c)]['Collapse']?_0x3333aa[_0x43bf19(0x2c7)](_0x2cff77,0xc,_0x18c8ef,_0x226fce,this[_0x43bf19(0x5e3)]):_0x1471f5===_0x55c699[_0x43bf19(0x65c)][_0x43bf19(0x57a)]?_0x3333aa[_0x43bf19(0x6b6)](_0x2cff77,0xc,_0x18c8ef,_0x226fce,this['_cellHeight']):_0x1471f5===_0x55c699['PivotCellStyleTypeEnum'][_0x43bf19(0x1e4)]||_0x1471f5===_0x55c699[_0x43bf19(0x65c)][_0x43bf19(0x28c)]?_0x3333aa[_0x43bf19(0x3ca)](_0x2cff77,0x10,_0x18c8ef,_0x226fce):_0x1471f5===_0x55c699['PivotCellStyleTypeEnum'][_0x43bf19(0x1e9)]||_0x1471f5===_0x55c699[_0x43bf19(0x65c)][_0x43bf19(0x1bd)]||_0x1471f5===_0x55c699[_0x43bf19(0x65c)]['FilteredSortNone']?_0x3333aa[_0x43bf19(0x4e7)](_0x2cff77,_0x272d86,_0x18c8ef,_0x226fce):_0x1471f5===_0x55c699['PivotCellStyleTypeEnum'][_0x43bf19(0x497)]?_0x3333aa[_0x43bf19(0x4e7)](_0x2cff77,_0x2c59bd,_0x18c8ef,_0x226fce):_0x1471f5===_0x55c699['PivotCellStyleTypeEnum'][_0x43bf19(0x220)]?_0x3333aa[_0x43bf19(0x4e7)](_0x2cff77,_0x2ea438,_0x18c8ef,_0x226fce):_0x1471f5===_0x55c699[_0x43bf19(0x65c)][_0x43bf19(0x161)]?_0x3333aa[_0x43bf19(0x4e7)](_0x2cff77,_0x5145f1,_0x18c8ef,_0x226fce):_0x1471f5===_0x55c699['PivotCellStyleTypeEnum']['FilteredSortDesc']&&_0x3333aa[_0x43bf19(0x4e7)](_0x2cff77,_0x3d3ef4,_0x18c8ef,_0x226fce),_0x2cff77[_0x43bf19(0x42e)]();}};_0x58f784=_0x41bfa1([_0x5e4599(0x2,_0x1ed97c[_0x34037b(0x4ab)]),_0x5e4599(0x3,(0x0,_0x1ed97c['Inject'])(_0x1ed97c[_0x34037b(0x46c)]))],_0x58f784);function _0x27c50b(_0x466da9,_0x637b99,_0x568da6){const _0x215499=_0x34037b;let {startX:_0x470807,startY:_0x5a71c7,endX:_0x247b29,endY:_0x11b3e2}=_0x568da6;return{'left':(_0x637b99===_0x215499(0x154)?_0x466da9!==_0x215499(0x3fc):_0x466da9===_0x215499(0x3fc))?_0x247b29-0x10-0x1:_0x470807+0x1,'top':_0x637b99==='filter'?_0x11b3e2-0x10-0x1:_0x5a71c7+0x1};}let _0x1e50b5=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x542618,_0x2ecd24,_0x113962,_0x30dafd,_0x2e770b,_0x332397,_0x34f155,_0x3be519,_0x3d3242,_0x2aadac){const _0x2ff14f=_0x34037b;super(),this['_context']=_0x542618,this['_injector']=_0x2ecd24,this[_0x2ff14f(0x56c)]=_0x113962,this[_0x2ff14f(0x67f)]=_0x30dafd,this[_0x2ff14f(0x6e6)]=_0x2e770b,this[_0x2ff14f(0x3fd)]=_0x332397,this['_permissionService']=_0x34f155,this[_0x2ff14f(0x535)]=_0x3be519,this[_0x2ff14f(0x1a8)]=_0x3d3242,this[_0x2ff14f(0x134)]=_0x2aadac,_0x27eded(this,'_buttonShapes',[]),this[_0x2ff14f(0x477)](),this['_initButtonRender'](),this[_0x2ff14f(0x1c6)]();}[_0x34037b(0x5c4)](){const _0x22b011=_0x34037b;this['_clearButtons'](),super[_0x22b011(0x5c4)]();}[_0x34037b(0x286)](){const _0x34bb58=_0x34037b;this[_0x34bb58(0x457)][_0x34bb58(0x596)](_0x253163=>_0x253163[_0x34bb58(0x5c4)]()),this[_0x34bb58(0x457)][_0x34bb58(0x3d7)]=0x0;}[_0x34037b(0x477)](){const _0x3258ca=_0x34037b;if(!this[_0x3258ca(0x134)])return;let _0x28ec7f=this[_0x3258ca(0x134)][_0x3258ca(0x67a)][_0x3258ca(0x5e6)](_0x21977c[_0x3258ca(0x24b)],{'handler':(_0x354741,_0x214b19,_0x5a9bf6)=>{const _0x5bee16=_0x3258ca;if(_0x354741||_0x214b19[_0x5bee16(0x585)]!==_0x2ef21f[_0x5bee16(0x427)][_0x5bee16(0x33c)])return _0x5a9bf6(_0x354741);let {col:_0x4f41bc,row:_0xaa717f,subUnitId:_0x4c245f,unitId:_0x1087e7}=_0x214b19;if(_0x4f41bc==null||_0xaa717f==null)return _0x5a9bf6(_0x354741);let _0x101cc3=this['_adaptorModel'][_0x5bee16(0x367)](_0x1087e7,_0x4c245f,_0xaa717f,_0x4f41bc);return _0x101cc3?(this[_0x5bee16(0x1b1)](_0x1087e7,_0x4c245f,_0x101cc3,_0xaa717f,_0x4f41bc),!0x0):_0x5a9bf6(_0x354741);}});this['disposeWithMe']((0x0,_0x1ed97c[_0x3258ca(0x586)])(_0x28ec7f));}['_openPivotActionPanel'](_0x2c98a1,_0x4e6328,_0x2ff0f0,_0xdfc796,_0xf7b2ba){const _0x100b7f=_0x34037b;let _0x536a43=this['_permissionController'][_0x100b7f(0x28f)]({'workbookTypes':[_0x44d557[_0x100b7f(0x1d0)]],'worksheetTypes':[_0x44d557[_0x100b7f(0x64c)]],'rangeTypes':[_0x44d557[_0x100b7f(0x60d)]]},[{'startRow':_0xdfc796,'endRow':_0xdfc796,'startColumn':_0xf7b2ba,'endColumn':_0xf7b2ba}],_0x2c98a1,_0x4e6328);this[_0x100b7f(0x1a8)]['open']({'id':_0x3ca145,'title':{'title':this[_0x100b7f(0x535)]['t']('sheets-pivot-ui.title')},'children':{'label':{'name':_0x57dcf9,'props':{'editable':_0x536a43,'pivotTableId':_0x2ff0f0,'subUnitId':_0x4e6328,'unitId':_0x2c98a1}}},'onClose':()=>this['_dialogService'][_0x100b7f(0x6a2)](_0x3ca145)});}['_initButtonRender'](){const _0x466df1=_0x34037b;this['disposeWithMe']((0x0,_0x3ae495[_0x466df1(0x39b)])(this[_0x466df1(0x56c)]['viewUpdate$'][_0x466df1(0x1dd)]((0x0,_0x3ae495[_0x466df1(0x15b)])(0x0)),this['_skeletonManagerService'][_0x466df1(0x5f8)],this[_0x466df1(0x6e6)][_0x466df1(0x364)],this[_0x466df1(0x5ef)]['permissionPointUpdate$'][_0x466df1(0x1dd)]((0x0,_0x3ae495['auditTime'])(0x64)))['subscribe'](()=>{const _0x298aa7=_0x466df1;let _0x45c383=this[_0x298aa7(0x2f1)][_0x298aa7(0x1de)],_0x4ade28=this[_0x298aa7(0x67f)][_0x298aa7(0x188)]();if(!_0x45c383||!_0x4ade28)return;let _0x50f851=_0x45c383[_0x298aa7(0x5fa)](),_0x4e2857=_0x45c383[_0x298aa7(0x44c)](),_0x137780=_0x50f851['getSheetId'](),_0x728485=this['_localeService'][_0x298aa7(0x412)](),{scene:_0x5e8123}=this[_0x298aa7(0x2f1)];this[_0x298aa7(0x286)](),this[_0x298aa7(0x56c)][_0x298aa7(0x62d)](_0x4e2857,_0x137780)[_0x298aa7(0x379)]((_0x1a0cb8,_0x119815,_0x25ca60)=>{const _0x245ad9=_0x298aa7;if(!(_0x25ca60!=null&&_0x25ca60[_0x245ad9(0x3d9)]))return;let {startX:_0x41257d,startY:_0x44eb01,endX:_0x2a6356,endY:_0x17f083}=(0x0,_0x21977c[_0x245ad9(0x13b)])(_0x1a0cb8,_0x119815,_0x5e8123,_0x4ade28),_0x3f2774=_0x2a6356-_0x41257d,_0x8d9f3d=_0x17f083-_0x44eb01;if(_0x8d9f3d<0x8||_0x3f2774<0x8||!this[_0x245ad9(0x3fd)][_0x245ad9(0x28f)]({'workbookTypes':[_0x44d557[_0x245ad9(0x1d0)]],'worksheetTypes':[_0x44d557[_0x245ad9(0x5ea)],_0x44d557[_0x245ad9(0x422)],_0x44d557['WorksheetPivotTablePermission']],'rangeTypes':[_0x44d557[_0x245ad9(0x43e)],_0x44d557[_0x245ad9(0x60d)]]},[{'startRow':_0x1a0cb8,'endRow':_0x1a0cb8,'startColumn':_0x119815,'endColumn':_0x119815}],_0x4e2857,_0x137780))return;let _0x566fbd;if(_0x1325be[_0x245ad9(0x3bd)](_0x25ca60[_0x245ad9(0x3d9)]))_0x566fbd=_0x245ad9(0x154);else{if(_0x4d8d8b[_0x245ad9(0x3bd)](_0x25ca60[_0x245ad9(0x3d9)]))_0x566fbd=_0x245ad9(0x65a);else return;}let _0xcc452a=_0x27c50b(_0x728485,_0x566fbd,{'startX':_0x41257d,'startY':_0x44eb01,'endX':_0x2a6356,'endY':_0x17f083}),_0x3eb18a={'left':_0xcc452a[_0x245ad9(0x614)]-0x6,'top':_0xcc452a[_0x245ad9(0x199)]-0x6,'width':0x1c,'height':0x1c,'zIndex':0x1388,'cellWidth':_0x3f2774,'cellHeight':_0x8d9f3d,'pivotParams':{'row':_0x1a0cb8,'col':_0x119815,'unitId':_0x4e2857,'subUnitId':_0x137780,'buttonType':_0x25ca60[_0x245ad9(0x3d9)]}},_0x4fcf08=_0x245ad9(0x1f7)+_0x1a0cb8+'-'+_0x119815+'-'+_0x4e2857+'-'+_0x137780;this[_0x245ad9(0x457)][_0x245ad9(0x1c1)](this[_0x245ad9(0x51c)][_0x245ad9(0x183)](_0x58f784,_0x4fcf08,_0x3eb18a));}),this[_0x298aa7(0x457)][_0x298aa7(0x3d7)]&&_0x5e8123[_0x298aa7(0x1da)](this['_buttonShapes']),_0x5e8123[_0x298aa7(0x4c2)]();}));}[_0x34037b(0x1c6)](){const _0x41edaa=_0x34037b;var _0x1882f1;this['disposeWithMe'](this[_0x41edaa(0x56c)][_0x41edaa(0x12d)][_0x41edaa(0x659)](({unitId:_0x1cdf15,subUnitId:_0x214b00})=>{const _0x4d6df5=_0x41edaa;if(_0x1cdf15===this[_0x4d6df5(0x2f1)][_0x4d6df5(0x6bb)]&&(this[_0x4d6df5(0x67f)]['makeDirty']({'sheetId':_0x214b00}),this[_0x4d6df5(0x2f1)]['unit']['getActiveSheet']()[_0x4d6df5(0x42f)]()===_0x214b00)){var _0x3ec824;this[_0x4d6df5(0x67f)][_0x4d6df5(0x5f2)](),(_0x3ec824=this[_0x4d6df5(0x2f1)][_0x4d6df5(0x16b)])==null||_0x3ec824[_0x4d6df5(0x4c2)]();}}));let _0x4dd604=this[_0x41edaa(0x2f1)][_0x41edaa(0x6bb)];this[_0x41edaa(0x2f1)][_0x41edaa(0x1de)][_0x41edaa(0x682)]()[_0x41edaa(0x596)](_0x1652f3=>{const _0x29aa54=_0x41edaa;var _0x2e9a36;let _0xfc9425=_0x1652f3[_0x29aa54(0x42f)]();(_0x2e9a36=this['_adaptorModel'][_0x29aa54(0x4f1)](_0x4dd604,_0xfc9425))!=null&&_0x2e9a36[_0x29aa54(0x32a)]&&this[_0x29aa54(0x67f)]['makeDirty']({'sheetId':_0xfc9425});}),this['_skeletonManagerService'][_0x41edaa(0x5f2)](),(_0x1882f1=this['_context']['mainComponent'])==null||_0x1882f1[_0x41edaa(0x4c2)]();}};_0x1e50b5=_0x41bfa1([_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x2,(0x0,_0x1ed97c['Inject'])(_0x5ec675[_0x34037b(0x558)])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x21977c[_0x34037b(0x67d)])),_0x5e4599(0x4,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x1c2)])),_0x5e4599(0x5,(0x0,_0x1ed97c['Inject'])(_0x44d557[_0x34037b(0x6ee)])),_0x5e4599(0x6,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x27c)])),_0x5e4599(0x7,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ad)])),_0x5e4599(0x8,_0x2ef21f[_0x34037b(0x2e3)]),_0x5e4599(0x9,(0x0,_0x1ed97c[_0x34037b(0x2be)])(_0x21977c[_0x34037b(0x670)]))],_0x1e50b5);let _0x54447b=class extends _0x1ed97c['Disposable']{constructor(_0x2358f5,_0x44abac,_0x482e10){const _0x349900=_0x34037b;super(),this[_0x349900(0x52a)]=_0x2358f5,this[_0x349900(0x3c6)]=_0x44abac,this[_0x349900(0x672)]=_0x482e10,this[_0x349900(0x2d2)]();}[_0x34037b(0x2d2)](){const _0x47b981=_0x34037b;let _0x3441d8=this,_0x3f686a,_0x46c0d1;this[_0x47b981(0x2a7)](this[_0x47b981(0x672)][_0x47b981(0x2ba)]({'id':_0x5ec675[_0x47b981(0x141)],'onBeforeCopy'(_0x51e1ad,_0x597439){const _0x5be63f=_0x47b981;let _0x483761=_0x3441d8[_0x5be63f(0x52a)][_0x5be63f(0x538)](_0x51e1ad,_0x1ed97c['UniverInstanceType'][_0x5be63f(0x2a8)]);_0x483761&&(_0x3f686a=_0x3441d8[_0x5be63f(0x3c6)][_0x5be63f(0x62d)](_0x51e1ad,_0x597439),_0x46c0d1=_0x483761[_0x5be63f(0x4cd)]());},'onAfterCopy'(){_0x3f686a=null,_0x46c0d1=null;},'getCellValueBySpecialMatrix'(_0x2201fd,_0xe2b98e){const _0x4ba368=_0x47b981;if(!_0x3f686a)return;let _0x8b31df=_0x3f686a==null?void 0x0:_0x3f686a[_0x4ba368(0x6e3)](_0x2201fd,_0xe2b98e);if(_0x8b31df){var _0x25211a;return{..._0x8b31df,'s':_0x46c0d1==null?void 0x0:_0x46c0d1[_0x4ba368(0x339)](_0x8b31df['s']),'displayV':((_0x25211a=_0x8b31df['v'])==null?void 0x0:_0x25211a[_0x4ba368(0x14d)]())||''};}}}));}};_0x54447b=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c['Inject'])(_0x1ed97c[_0x34037b(0x61a)])),_0x5e4599(0x1,(0x0,_0x1ed97c['Inject'])(_0x5ec675[_0x34037b(0x558)])),_0x5e4599(0x2,_0x21977c[_0x34037b(0x539)])],_0x54447b);let _0x3689c6=[_0x44d557[_0x34037b(0x551)]['id'],_0x44d557[_0x34037b(0x61b)]['id'],_0x44d557['RemoveRowCommand']['id'],_0x44d557['InsertColCommand']['id']],_0x1c1101=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x7288d4,_0x44f614,_0x26c36e,_0x20c2ad,_0x341578,_0x84eb96,_0x12e86f,_0x13fb8b,_0x27b42c){const _0x1387fe=_0x34037b;var _0x255d0b;super(),this['_injector']=_0x7288d4,this[_0x1387fe(0x52a)]=_0x44f614,this[_0x1387fe(0x3c6)]=_0x26c36e,this['_sheetInterceptorService']=_0x20c2ad,this[_0x1387fe(0x632)]=_0x341578,this[_0x1387fe(0x535)]=_0x84eb96,this[_0x1387fe(0x5e9)]=_0x12e86f,this[_0x1387fe(0x215)]=_0x13fb8b,this[_0x1387fe(0x1f4)]=_0x27b42c,_0x27eded(this,_0x1387fe(0x306),!0x1),this[_0x1387fe(0x255)](),this[_0x1387fe(0x499)](),this['_defaultOverride']=((_0x255d0b=this[_0x1387fe(0x1f4)][_0x1387fe(0x609)](_0x5ec675[_0x1387fe(0x2c4)]))==null?void 0x0:_0x255d0b['defaultOverride'])??!0x1;}[_0x34037b(0x255)](){const _0x26bcdf=_0x34037b;this[_0x26bcdf(0x2a7)](this[_0x26bcdf(0x635)][_0x26bcdf(0x46b)]({'performCheck':async _0x383fbc=>{const _0xd9bc2f=_0x26bcdf;if(_0x383fbc['id']===_0x44d557[_0xd9bc2f(0x39e)]['id']){let _0x2faded=(0x0,_0x44d557['getSheetCommandTarget'])(this[_0xd9bc2f(0x52a)]);if(!_0x2faded)return Promise['resolve'](!0x1);let {unitId:_0x161edd,subUnitId:_0x7ced95}=_0x2faded,{fromRange:_0x3374eb,toRange:_0x1084c2}=_0x383fbc[_0xd9bc2f(0x317)],_0x2109b6=this[_0xd9bc2f(0x5e9)][_0xd9bc2f(0x462)](_0x161edd,_0x7ced95);if(!(_0x2109b6!=null&&_0x2109b6['size']))return Promise['resolve'](!0x0);for(let [_0x4e94f6,_0x2b71d6]of _0x2109b6){let {targetCellInfo:_0x401771}=_0x2b71d6,{row:_0x5a48b0,col:_0x1d9594}=_0x401771,_0x2cfc7d=_0x5a48b0-_0x3374eb[_0xd9bc2f(0x6dd)],_0x104621=_0x1d9594-_0x3374eb[_0xd9bc2f(0x564)],_0x311b6f={'row':_0x1084c2[_0xd9bc2f(0x6dd)]+_0x2cfc7d,'col':_0x1084c2[_0xd9bc2f(0x564)]+_0x104621},_0x5b6bee=_0x311b6f[_0xd9bc2f(0x4b9)]-_0x401771[_0xd9bc2f(0x4b9)],_0x1d7ec2=_0x311b6f[_0xd9bc2f(0x428)]-_0x401771['col'],_0x138bbb=this[_0xd9bc2f(0x3c6)][_0xd9bc2f(0x3b8)](_0x161edd,_0x7ced95,_0x4e94f6),_0x27085c=_0x138bbb==null?void 0x0:_0x138bbb[_0xd9bc2f(0x314)];if(!_0x27085c)return Promise[_0xd9bc2f(0x1d5)](!0x0);let _0x14508b=[];Object['keys'](_0x27085c)[_0xd9bc2f(0x596)](_0x1edd3b=>{const _0x31af33=_0xd9bc2f;_0x27085c[_0x1edd3b][_0x31af33(0x596)](_0x43d7c5=>{const _0x366ed1=_0x31af33;let _0x424ef3={..._0x43d7c5};_0x424ef3[_0x366ed1(0x6dd)]=_0x43d7c5[_0x366ed1(0x6dd)]+_0x5b6bee,_0x424ef3[_0x366ed1(0x209)]=_0x43d7c5['endRow']+_0x5b6bee,_0x424ef3['startColumn']=_0x43d7c5[_0x366ed1(0x564)]+_0x1d7ec2,_0x424ef3[_0x366ed1(0x406)]=_0x43d7c5[_0x366ed1(0x406)]+_0x1d7ec2,_0x14508b[_0x366ed1(0x1c1)](_0x424ef3);});});let _0x4c4745=this['_sheetInterceptorService']['generateMutationsByRanges']({'unitId':_0x161edd,'subUnitId':_0x7ced95,'ranges':_0x14508b}),_0x23c469=(0x0,_0x5ec675[_0xd9bc2f(0x469)])(this['_injector'],_0x161edd,_0x7ced95,_0x14508b);if(_0x4c4745[_0xd9bc2f(0x337)][_0xd9bc2f(0x3d7)]||_0x23c469[_0xd9bc2f(0x363)]){if(this[_0xd9bc2f(0x306)])return Promise['resolve'](!0x0);{let _0x88582e=await this['_confirmService'][_0xd9bc2f(0x5bc)]({'id':_0xd9bc2f(0x475),'title':{'title':this['_localeService']['t'](_0xd9bc2f(0x1b5))},'children':{'title':this[_0xd9bc2f(0x535)]['t'](_0xd9bc2f(0x48c))},'cancelText':this['_localeService']['t']('sheets-pivot-ui.perform.cancel'),'confirmText':this[_0xd9bc2f(0x535)]['t'](_0xd9bc2f(0x547))});return Promise[_0xd9bc2f(0x1d5)](_0x88582e);}}}}return Promise[_0xd9bc2f(0x1d5)](!0x0);}}));}['_initRowColOperationCheck'](){const _0x484361=_0x34037b;this[_0x484361(0x2a7)](this['_sheetInterceptorService']['interceptBeforeCommand']({'performCheck':async _0x32b1df=>{const _0xcc2860=_0x484361;if(_0x3689c6[_0xcc2860(0x5fe)](_0x32b1df['id'])){let _0x8a9453=_0x32b1df[_0xcc2860(0x317)],{range:_0xbdc21a}=_0x8a9453,_0x5397bd=(0x0,_0x44d557[_0xcc2860(0x38b)])(this['_univerInstanceService']),_0x483ffa=_0x8a9453[_0xcc2860(0x6bb)]||(_0x5397bd==null?void 0x0:_0x5397bd['unitId']),_0x389530=_0x8a9453['subUnitId']||(_0x5397bd==null?void 0x0:_0x5397bd['subUnitId']);if(!_0x483ffa||!_0x389530)return Promise[_0xcc2860(0x1d5)](!0x0);let _0x426492=this['_sheetsPivotTableConfigModel'][_0xcc2860(0x462)](_0x483ffa,_0x389530);if(_0x426492!=null&&_0x426492[_0xcc2860(0x32a)])for(let [_0x280837,_0x588b0b]of _0x426492){let _0x2bc414=this[_0xcc2860(0x3c6)][_0xcc2860(0x3b8)](_0x483ffa,_0x389530,_0x280837);if(_0x2bc414!=null&&_0x2bc414[_0xcc2860(0x314)]){for(let _0x3345b0 of Object[_0xcc2860(0x402)](_0x2bc414['rangesInfo']))if(_0x2bc414[_0xcc2860(0x314)][_0x3345b0][_0xcc2860(0x370)](_0x47fba7=>_0x1ed97c[_0xcc2860(0x15f)][_0xcc2860(0x1f9)](_0x47fba7,_0xbdc21a)))return this[_0xcc2860(0x215)]['show']({'type':_0x3fc00c[_0xcc2860(0x2e5)][_0xcc2860(0x274)],'content':this[_0xcc2860(0x535)]['t'](_0xcc2860(0x1ca))}),Promise[_0xcc2860(0x1d5)](!0x1);}}}return Promise[_0xcc2860(0x1d5)](!0x0);}}));}};_0x1c1101=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x61a)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675['SheetsPivotTableAdaptorModel'])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557['SheetInterceptorService'])),_0x5e4599(0x4,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x172)])),_0x5e4599(0x5,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ad)])),_0x5e4599(0x6,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x1c2)])),_0x5e4599(0x7,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f[_0x34037b(0x146)])),_0x5e4599(0x8,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x1fb)]))],_0x1c1101);let _0x48142b=[_0xc948cf[_0x34037b(0x4dd)]['id'],_0x157223['IMEInputCommand']['id'],_0x21977c[_0x34037b(0x29f)]['id']],_0x509446=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x1428ed,_0x5054d6,_0x5049f7,_0x364f4d,_0x1c226e,_0x56b8ea){const _0x261e0b=_0x34037b;super(),this[_0x261e0b(0x3ea)]=_0x1428ed,this[_0x261e0b(0x52a)]=_0x5054d6,this[_0x261e0b(0x3c6)]=_0x5049f7,this[_0x261e0b(0x170)]=_0x364f4d,this['_sheetsPivotTableConfigModel']=_0x1c226e,this['_localeService']=_0x56b8ea,this[_0x261e0b(0x62b)]();}[_0x34037b(0x62b)](){this['disposeWithMe'](this['_commandService']['beforeCommandExecuted'](_0x596bda=>{const _0x4fb98c=_0x5115;if(_0x48142b[_0x4fb98c(0x5fe)](_0x596bda['id'])){var _0x1fd2f7;let _0x42f8f9=(_0x1fd2f7=this['_sheetsSelectionsService'][_0x4fb98c(0x455)]())==null?void 0x0:_0x1fd2f7[_0x4fb98c(0x326)];if(!_0x42f8f9)return;let {actualRow:_0x3fe101,actualColumn:_0x8d7ea1}=_0x42f8f9,_0x3524d1=(0x0,_0x1ed97c[_0x4fb98c(0x47c)])(_0x3fe101,_0x8d7ea1),_0x22fb36=(0x0,_0x44d557[_0x4fb98c(0x38b)])(this[_0x4fb98c(0x52a)],_0x596bda[_0x4fb98c(0x317)]);if(!_0x22fb36)return;let {unitId:_0x4970cd,subUnitId:_0x15da92}=_0x22fb36,_0x588781=this['_sheetsPivotTableConfigModel']['getSubUnitPivotConfigs'](_0x4970cd,_0x15da92);if(_0x588781!=null&&_0x588781[_0x4fb98c(0x32a)])for(let [_0x318ed2]of _0x588781){let _0x50136c=this['_sheetsPivotTableAdaptorModel']['getPivotItemRenderInfoCache'](_0x4970cd,_0x15da92,_0x318ed2);if(_0x50136c!=null&&_0x50136c[_0x4fb98c(0x314)]){for(let _0x44dd9b of Object[_0x4fb98c(0x402)](_0x50136c[_0x4fb98c(0x314)]))if(_0x50136c[_0x4fb98c(0x314)][_0x44dd9b][_0x4fb98c(0x370)](_0x5140c9=>_0x1ed97c[_0x4fb98c(0x15f)][_0x4fb98c(0x1f9)](_0x5140c9,_0x3524d1)))throw new _0x1ed97c[(_0x4fb98c(0x1f6))](this['_localeService']['t'](_0x4fb98c(0x52b)));}}}}));}};_0x509446=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557[_0x34037b(0x198)])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x61a)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x558)])),_0x5e4599(0x3,(0x0,_0x1ed97c['Inject'])(_0x1ed97c[_0x34037b(0x4ab)])),_0x5e4599(0x4,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675['SheetsPivotTableConfigModel'])),_0x5e4599(0x5,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ad)]))],_0x509446);let _0xe6bd34=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x53a96a,_0x570687,_0x253dcd,_0x476038){const _0x19e089=_0x34037b;super(),this[_0x19e089(0x3c6)]=_0x53a96a,this['_formatPainterService']=_0x570687,this[_0x19e089(0x215)]=_0x253dcd,this[_0x19e089(0x535)]=_0x476038,this[_0x19e089(0x273)]();}[_0x34037b(0x273)](){const _0x58d14b=_0x34037b;let _0x3bb6ae=this[_0x58d14b(0x3c6)],_0x132af0=this['_messageService'],_0x4ec482=this[_0x58d14b(0x535)];this['_formatPainterService'][_0x58d14b(0x5fb)]({'id':_0x58d14b(0x68d),'onBeforeApply'(_0x2648b2){const _0x16f5b6=_0x58d14b;let {redoMutationsInfo:_0x39858b}=_0x2648b2;for(let _0x4ae043 of _0x39858b)if(_0x4ae043['id']===_0x44d557[_0x16f5b6(0x19b)]['id']){let {unitId:_0x5b78d7,subUnitId:_0x5ca6d3,ranges:_0x384def}=_0x4ae043[_0x16f5b6(0x317)];for(let _0x5cc16d of _0x384def)if(_0x3bb6ae[_0x16f5b6(0x31a)](_0x5b78d7,_0x5ca6d3,_0x5cc16d)[_0x16f5b6(0x3d7)]>0x0)return _0x132af0[_0x16f5b6(0x346)]({'type':_0x3fc00c[_0x16f5b6(0x2e5)][_0x16f5b6(0x274)],'content':_0x4ec482['t']('sheets-pivot-ui.msg.mergeCellError')}),!0x1;}return!0x0;}});}};_0xe6bd34=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675['SheetsPivotTableAdaptorModel'])),_0x5e4599(0x1,(0x0,_0x1ed97c['Inject'])(_0x21977c[_0x34037b(0x5a1)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f['IMessageService'])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ad)]))],_0xe6bd34);let _0x22d556=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x3678d9,_0x4b16e8,_0x1da6fc){const _0x373ddc=_0x34037b;super(),this[_0x373ddc(0x28b)]=_0x3678d9,this[_0x373ddc(0x3c6)]=_0x4b16e8,this[_0x373ddc(0x5e9)]=_0x1da6fc,this['_initPrintArea']();}[_0x34037b(0x313)](){const _0x4918af=_0x34037b;this[_0x4918af(0x2a7)](this[_0x4918af(0x28b)]['interceptor'][_0x4918af(0x5e6)](this['_sheetPrintInterceptorService']['interceptor'][_0x4918af(0x500)]()['PRINTING_RANGE'],{'handler':(_0x2229b6,_0x4e8216,_0x1f5199)=>{const _0x31b7b5=_0x4918af;let {unitId:_0x176c70,subUnitId:_0x18a8e3}=_0x4e8216,_0x29f084=(_0x2229b6==null?void 0x0:_0x2229b6[_0x31b7b5(0x6dd)])??0x1/0x0,_0x267ebc=(_0x2229b6==null?void 0x0:_0x2229b6[_0x31b7b5(0x209)])??-0x1/0x0,_0x170440=(_0x2229b6==null?void 0x0:_0x2229b6[_0x31b7b5(0x564)])??0x1/0x0,_0x16e3a4=(_0x2229b6==null?void 0x0:_0x2229b6[_0x31b7b5(0x406)])??-0x1/0x0,_0x3d5343=this['_sheetsPivotTableConfigModel'][_0x31b7b5(0x462)](_0x176c70,_0x18a8e3);if(!_0x3d5343)return _0x1f5199(_0x2229b6);for(let [_0x51c110,_0x1d0736]of _0x3d5343){var _0x25f7f1;let _0x2f4b5b=(_0x25f7f1=this[_0x31b7b5(0x3c6)]['getPivotItemRenderInfoCache'](_0x176c70,_0x18a8e3,_0x51c110))==null?void 0x0:_0x25f7f1[_0x31b7b5(0x314)];_0x2f4b5b&&Object[_0x31b7b5(0x253)](_0x2f4b5b)[_0x31b7b5(0x596)](_0xa1ab61=>{const _0x43209f=_0x31b7b5;_0xa1ab61[_0x43209f(0x596)](_0x159950=>{const _0x3da7d3=_0x43209f;let {startRow:_0x375c33,endRow:_0x47c2c6,startColumn:_0x58da63,endColumn:_0x957ec}=_0x159950;_0x29f084=Math[_0x3da7d3(0x28e)](_0x375c33,_0x29f084),_0x267ebc=Math['max'](_0x47c2c6,_0x267ebc),_0x170440=Math['min'](_0x58da63,_0x170440),_0x16e3a4=Math['max'](_0x957ec,_0x16e3a4);});});}let _0x2acc38={'startRow':_0x29f084,'endRow':_0x267ebc,'startColumn':_0x170440,'endColumn':_0x16e3a4};return(0x0,_0x1ed97c['isValidRange'])(_0x2acc38)?_0x1f5199(_0x2acc38):_0x1f5199(_0x2229b6);}}));}};_0x22d556=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c['Inject'])(_0x21977c[_0x34037b(0x55f)])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x558)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675['SheetsPivotTableConfigModel']))],_0x22d556);let _0x35358=class extends _0x1ed97c['Disposable']{constructor(_0x5d5774,_0x45fe2a,_0x1ab7b2){const _0x2e7bb6=_0x34037b;super(),this[_0x2e7bb6(0x41d)]=_0x5d5774,this[_0x2e7bb6(0x52a)]=_0x45fe2a,this[_0x2e7bb6(0x5e9)]=_0x1ab7b2,this['_initMenuInterceptor']();}[_0x34037b(0x61f)](){const _0x1bb109=_0x34037b;this['disposeWithMe'](this['_mergeCellController'][_0x1bb109(0x555)][_0x1bb109(0x5e6)](this['_mergeCellController'][_0x1bb109(0x555)][_0x1bb109(0x500)]()[_0x1bb109(0x3bf)],{'handler':(_0x313dee,_0x5ac497)=>{const _0x548698=_0x1bb109;let _0x1cd99a=(0x0,_0x44d557['getSheetCommandTarget'])(this['_univerInstanceService']);if(!_0x1cd99a)return _0x313dee;let {unitId:_0x24e351,subUnitId:_0x32b60a}=_0x1cd99a,_0x5b00c3=this[_0x548698(0x5e9)]['getSubUnitPivotConfigs'](_0x24e351,_0x32b60a),_0x18d7c5=[];return _0x5b00c3&&_0x5b00c3[_0x548698(0x596)]((_0x4b0c24,_0x474542)=>{const _0x4335f3=_0x548698;var _0x5ab7fd;let _0x40a41d=(_0x5ab7fd=this[_0x4335f3(0x5e9)]['getPivotTableRangeInfo'](_0x24e351,_0x32b60a,_0x474542))==null?void 0x0:_0x5ab7fd[_0x4335f3(0x36e)];_0x40a41d&&Object[_0x4335f3(0x402)](_0x40a41d)[_0x4335f3(0x596)](_0x250d9d=>{const _0x45ab52=_0x4335f3;let _0x308f87=_0x40a41d[_0x250d9d];Array[_0x45ab52(0x49e)](_0x308f87)&&_0x18d7c5[_0x45ab52(0x1c1)](..._0x308f87);});}),_0x18d7c5[_0x548698(0x3d7)]&&_0x5ac497[_0x548698(0x370)](_0x484f80=>_0x18d7c5[_0x548698(0x370)](_0xe96758=>_0x1ed97c[_0x548698(0x15f)]['intersects'](_0xe96758,_0x484f80)))?!0x0:_0x313dee;}}));}};_0x35358=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557[_0x34037b(0x46d)])),_0x5e4599(0x1,(0x0,_0x1ed97c['Inject'])(_0x1ed97c[_0x34037b(0x61a)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x1c2)]))],_0x35358);let _0x2b45df=class extends _0x1ed97c[_0x34037b(0x6d9)]{constructor(_0x3a19b4=_0x29acb0,_0x2f2284,_0x4f4fad,_0x3abb01,_0x251cf9){const _0x396314=_0x34037b;super(),this['_config']=_0x3a19b4,this[_0x396314(0x51c)]=_0x2f2284,this[_0x396314(0x170)]=_0x4f4fad,this[_0x396314(0x6ab)]=_0x3abb01,this['_configService']=_0x251cf9;let {menu:_0x3c5bbb,..._0x28be16}=(0x0,_0x1ed97c[_0x396314(0x39b)])({},_0x29acb0,this[_0x396314(0x54a)]);_0x3c5bbb&&this['_configService'][_0x396314(0x5c7)]('menu',_0x3c5bbb,{'merge':!0x0}),this[_0x396314(0x1f4)][_0x396314(0x5c7)](_0x525de5,_0x28be16),this[_0x396314(0x3a9)]();}[_0x34037b(0x5a9)](){const _0x17833e=_0x34037b;[[_0x4cee9f],[_0x27256c],[_0x1d49d4],[_0x35358],[_0x1c1101],[_0x22d556],[_0x509446],[_0xe6bd34],[_0x5d54c8],[_0x54447b]][_0x17833e(0x596)](_0x567d95=>this['_injector'][_0x17833e(0x3d4)](_0x567d95)),(0x0,_0x1ed97c[_0x17833e(0x153)])(this[_0x17833e(0x51c)],[[_0x4cee9f],[_0x27256c],[_0x1d49d4],[_0x5d54c8]]);}[_0x34037b(0x291)](){const _0x25dbd5=_0x34037b;this[_0x25dbd5(0x6e8)](),(0x0,_0x1ed97c[_0x25dbd5(0x153)])(this[_0x25dbd5(0x51c)],[[_0x1c1101],[_0x22d556],[_0x509446],[_0xe6bd34],[_0x54447b]]);}[_0x34037b(0x3c7)](){const _0x4f67fd=_0x34037b;(0x0,_0x1ed97c['touchDependencies'])(this[_0x4f67fd(0x51c)],[[_0x35358]]);}['_registerCommands'](){const _0x546872=_0x34037b;[_0x5f33e8,_0x288ca1,_0x30f033,_0x54b7ed,_0x1ccce8]['forEach'](_0xd4ceed=>this[_0x546872(0x2a7)](this[_0x546872(0x170)][_0x546872(0x64f)](_0xd4ceed)));}[_0x34037b(0x6e8)](){const _0x3745f4=_0x34037b;this[_0x3745f4(0x2a7)](this[_0x3745f4(0x6ab)]['registerRenderModule'](_0x1ed97c[_0x3745f4(0x3f9)][_0x3745f4(0x2a8)],[_0x1e50b5]));}};_0x27eded(_0x2b45df,_0x34037b(0x41b),_0x5ec675['SHEET_PIVOT_TABLE_PLUGIN']+_0x34037b(0x47b)),_0x27eded(_0x2b45df,_0x34037b(0x483),_0xb51988),_0x27eded(_0x2b45df,_0x34037b(0x30f),_0x420eec),_0x27eded(_0x2b45df,_0x34037b(0x490),_0x1ed97c['UniverInstanceType'][_0x34037b(0x2a8)]),_0x2b45df=_0x41bfa1([(0x0,_0x1ed97c[_0x34037b(0x5c9)])(_0x2e1acb[_0x34037b(0x3e2)],_0x4134a1[_0x34037b(0x5ae)],_0x44d557[_0x34037b(0x5d4)],_0x5ec675['UniverSheetsPivotTablePlugin'],_0x21977c[_0x34037b(0x14c)],_0x2ef21f['UniverMobileUIPlugin']),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x2,_0x1ed97c[_0x34037b(0x4ab)]),_0x5e4599(0x3,_0x4134a1[_0x34037b(0x481)]),_0x5e4599(0x4,_0x1ed97c[_0x34037b(0x1fb)])],_0x2b45df);let _0x503816=[_0x55c699['PivotExcelDateGroupUnit'][_0x34037b(0x687)],_0x55c699[_0x34037b(0x5a3)]['Quarter'],_0x55c699[_0x34037b(0x5a3)][_0x34037b(0x394)],_0x55c699[_0x34037b(0x5a3)]['Day'],_0x55c699[_0x34037b(0x5a3)][_0x34037b(0x320)],_0x55c699[_0x34037b(0x5a3)][_0x34037b(0x194)],_0x55c699[_0x34037b(0x5a3)][_0x34037b(0x68b)]],_0x44980d={[_0x55c699[_0x34037b(0x5a3)][_0x34037b(0x687)]]:_0x34037b(0x328),[_0x55c699[_0x34037b(0x5a3)][_0x34037b(0x225)]]:'sheets-pivot-ui.dateGroup.quarter',[_0x55c699[_0x34037b(0x5a3)]['Month']]:'sheets-pivot-ui.dateGroup.month',[_0x55c699['PivotExcelDateGroupUnit'][_0x34037b(0x3f3)]]:_0x34037b(0x691),[_0x55c699['PivotExcelDateGroupUnit']['Hour']]:_0x34037b(0x431),[_0x55c699['PivotExcelDateGroupUnit'][_0x34037b(0x194)]]:'sheets-pivot-ui.dateGroup.minute',[_0x55c699['PivotExcelDateGroupUnit'][_0x34037b(0x68b)]]:_0x34037b(0x2f6)},_0x431c65='univer-h-8\x20univer-rounded-md\x20univer-border\x20univer-border-gray-300\x20univer-bg-gray-0\x20univer-px-2\x20univer-text-sm\x20univer-text-gray-900\x20dark:univer-bg-gray-700\x20dark:univer-text-gray-0';function _0x38f730({targetFieldName:_0x2fc9ce,dateSystem:_0x5eeeb3,grouping:_0x495b88,onConfirm:_0x40c7d5,onCancel:_0x5f05d7}){const _0x3fbbdf=_0x34037b;let _0x3909bd=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x3fbbdf(0x4ad)]),_0x200154=(0x0,_0x2ef21f['useObservable'])(_0x3909bd[_0x3fbbdf(0x24d)],_0x3909bd[_0x3fbbdf(0x412)]()),_0x50aff9=(_0x151f54,_0x58f311)=>{const _0x4de312=_0x3fbbdf;let _0x3c5b80=_0x151f54===void 0x0?null:(0x0,_0x1ed97c['excelSerialToDateTimeParts'])(_0x151f54,{'dateSystem':_0x5eeeb3});if(!_0x3c5b80)return{'date':'','time':_0x58f311};let _0x376e73=_0x5d95cb=>String(_0x5d95cb)[_0x4de312(0x5e4)](0x2,'0');return{'date':_0x3c5b80['year']+'-'+_0x376e73(_0x3c5b80[_0x4de312(0x640)])+'-'+_0x376e73(_0x3c5b80[_0x4de312(0x5bb)]),'time':_0x376e73(_0x3c5b80[_0x4de312(0x35d)])+':'+_0x376e73(_0x3c5b80[_0x4de312(0x1c0)])+':'+_0x376e73(_0x3c5b80[_0x4de312(0x4dc)])};},[_0x1eaddd,_0x283e57]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])((_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x592)])??[_0x55c699[_0x3fbbdf(0x5a3)][_0x3fbbdf(0x3f3)]]),[_0x1b819b,_0x387799]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])((_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x1ac)])??!0x0),[_0x33110c,_0xeff0b0]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])((_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x250)])??!0x0),[_0x40821d,_0x49bf40]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])(()=>_0x50aff9(_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x218)],_0x3fbbdf(0x61d))['date']),[_0x30511f,_0x3e0661]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])(()=>_0x50aff9(_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x66c)],_0x3fbbdf(0x33f))[_0x3fbbdf(0x175)]),[_0x3480ba,_0xbad875]=(0x0,_0x2b3aa2['useState'])(()=>_0x50aff9(_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x218)],_0x3fbbdf(0x61d))[_0x3fbbdf(0x61e)]),[_0x598a3b,_0xce0477]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])(()=>_0x50aff9(_0x495b88==null?void 0x0:_0x495b88[_0x3fbbdf(0x66c)],_0x3fbbdf(0x33f))[_0x3fbbdf(0x61e)]),[_0xcce95e,_0x6fb432]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])((_0x495b88==null?void 0x0:_0x495b88['daysInterval'])??0x1),[_0x309c18,_0x20fa61]=(0x0,_0x2b3aa2[_0x3fbbdf(0x189)])(!0x1),_0x2d95e=(0x0,_0x2b3aa2[_0x3fbbdf(0x260)])(!0x1),_0x40cd3d=_0x1eaddd[_0x3fbbdf(0x370)](_0x5c6721=>_0x5c6721===_0x55c699[_0x3fbbdf(0x5a3)][_0x3fbbdf(0x320)]||_0x5c6721===_0x55c699[_0x3fbbdf(0x5a3)][_0x3fbbdf(0x194)]||_0x5c6721===_0x55c699[_0x3fbbdf(0x5a3)]['Second']),_0x36ab3b=_0x1eaddd['length']===0x1&&_0x1eaddd[0x0]===_0x55c699[_0x3fbbdf(0x5a3)]['Day'],_0x22859e=(_0x23487b,_0x14aa82,_0x4bf829)=>{const _0x2bdebe=_0x3fbbdf;let _0x1545b5=/^(\d{4})-(\d{2})-(\d{2})$/[_0x2bdebe(0x482)](_0x23487b),_0x3c734c=/^(\d{2}):(\d{2})(?::(\d{2}))?$/[_0x2bdebe(0x482)](_0x14aa82);return!_0x1545b5||!_0x3c734c?null:(0x0,_0x1ed97c['excelDateTimePartsToSerial'])({'year':Number(_0x1545b5[0x1]),'month':Number(_0x1545b5[0x2]),'day':Number(_0x1545b5[0x3]),'hours':_0x40cd3d?Number(_0x3c734c[0x1]):_0x4bf829?0x17:0x0,'minutes':_0x40cd3d?Number(_0x3c734c[0x2]):_0x4bf829?0x3b:0x0,'seconds':_0x40cd3d?Number(_0x3c734c[0x3]??0x0):_0x4bf829?0x3b:0x0,'fractionalSecond':_0x4bf829?0.999:0x0},{'dateSystem':_0x5eeeb3});},_0x1c6050=_0x1b819b?void 0x0:_0x22859e(_0x40821d,_0x3480ba,!0x1),_0x301d59=_0x33110c?void 0x0:_0x22859e(_0x30511f,_0x598a3b,!0x0),_0x409240=_0x1eaddd[_0x3fbbdf(0x3d7)]>0x0&&(_0x1b819b||_0x1c6050!==null)&&(_0x33110c||_0x301d59!==null)&&(_0x1c6050==null||_0x301d59==null||_0x1c6050<=_0x301d59)&&(!_0x36ab3b||Number['isInteger'](_0xcce95e)&&_0xcce95e>=0x1);return(0x0,_0x282aef[_0x3fbbdf(0x567)])(_0x3fbbdf(0x259),{'className':_0x3fbbdf(0x25a),'dir':_0x200154,'children':[(0x0,_0x282aef['jsx'])('div',{'className':'univer-text-sm\x20univer-font-medium','children':_0x2fc9ce}),(0x0,_0x282aef['jsxs'])(_0x3fbbdf(0x35c),{'children':[(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fbbdf(0x312),{'className':'univer-mb-2\x20univer-text-sm\x20univer-font-medium','children':_0x3909bd['t'](_0x3fbbdf(0x47f))}),(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fbbdf(0x259),{'className':'univer-grid\x20univer-grid-cols-2\x20univer-gap-2','children':_0x503816[_0x3fbbdf(0x23e)](_0x2c9b83=>(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x3fbbdf(0x6b3)],{'checked':_0x1eaddd['includes'](_0x2c9b83),'onChange':_0x12b6d0=>_0x283e57(_0x3a2fc5=>_0x12b6d0?_0x503816['filter'](_0x4e531d=>_0x4e531d===_0x2c9b83||_0x3a2fc5['includes'](_0x4e531d)):_0x3a2fc5[_0x3fbbdf(0x154)](_0xd9c9f3=>_0xd9c9f3!==_0x2c9b83)),'children':_0x3909bd['t'](_0x44980d[_0x2c9b83])},_0x2c9b83))})]}),_0x36ab3b&&(0x0,_0x282aef[_0x3fbbdf(0x567)])(_0x3fbbdf(0x5b6),{'className':'univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-gap-3\x20univer-text-sm','children':[_0x3909bd['t'](_0x3fbbdf(0x211)),(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fc00c['InputNumber'],{'className':_0x3fbbdf(0x64d),'value':_0xcce95e,'min':0x1,'onChange':_0x15832f=>_0x6fb432(Number(_0x15832f))})]}),(0x0,_0x282aef[_0x3fbbdf(0x567)])('div',{'className':_0x3fbbdf(0x38d),'children':[(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fc00c[_0x3fbbdf(0x6b3)],{'checked':_0x1b819b,'onChange':_0xf0aa64=>_0x387799(!!_0xf0aa64),'children':_0x3909bd['t']('sheets-pivot-ui.dateGroup.autoStart')}),!_0x1b819b&&(0x0,_0x282aef[_0x3fbbdf(0x567)])(_0x3fbbdf(0x5b6),{'className':_0x3fbbdf(0x479),'children':[_0x3909bd['t'](_0x3fbbdf(0x45a)),(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fc00c[_0x3fbbdf(0x45e)],{'type':_0x3fbbdf(0x175),'value':_0x40821d,'onChange':_0x49bf40}),_0x40cd3d&&(0x0,_0x282aef['jsx'])('input',{'className':_0x431c65,'type':'time','step':0x1,'value':_0x3480ba,'onChange':_0x454db5=>_0xbad875(_0x454db5[_0x3fbbdf(0x342)][_0x3fbbdf(0x66f)])})]}),(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fc00c[_0x3fbbdf(0x6b3)],{'checked':_0x33110c,'onChange':_0xb18fc8=>_0xeff0b0(!!_0xb18fc8),'children':_0x3909bd['t'](_0x3fbbdf(0x5cf))}),!_0x33110c&&(0x0,_0x282aef['jsxs'])('label',{'className':_0x3fbbdf(0x479),'children':[_0x3909bd['t']('sheets-pivot-ui.dateGroup.end'),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x3fbbdf(0x45e)],{'type':_0x3fbbdf(0x175),'value':_0x30511f,'onChange':_0x3e0661}),_0x40cd3d&&(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fbbdf(0x3d0),{'className':_0x431c65,'type':_0x3fbbdf(0x61e),'step':0x1,'value':_0x598a3b,'onChange':_0x315936=>_0xce0477(_0x315936['target'][_0x3fbbdf(0x66f)])})]})]}),(0x0,_0x282aef[_0x3fbbdf(0x567)])(_0x3fbbdf(0x259),{'className':_0x3fbbdf(0x4b3),'children':[(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fc00c[_0x3fbbdf(0x2f8)],{'onClick':_0x5f05d7,'children':_0x3909bd['t'](_0x3fbbdf(0x643))}),(0x0,_0x282aef[_0x3fbbdf(0x5bf)])(_0x3fc00c[_0x3fbbdf(0x2f8)],{'variant':_0x3fbbdf(0x326),'disabled':!_0x409240||_0x309c18,'onClick':async()=>{const _0x2cc80f=_0x3fbbdf;if(!_0x409240||_0x2d95e[_0x2cc80f(0x56b)])return;let _0x393361={'units':_0x503816[_0x2cc80f(0x154)](_0x30229e=>_0x1eaddd[_0x2cc80f(0x5fe)](_0x30229e)),'autoStart':_0x1b819b,'autoEnd':_0x33110c};!_0x1b819b&&_0x1c6050!=null&&(_0x393361['start']=_0x1c6050),!_0x33110c&&_0x301d59!=null&&(_0x393361[_0x2cc80f(0x66c)]=_0x301d59),_0x36ab3b&&_0xcce95e>0x1&&(_0x393361[_0x2cc80f(0x67b)]=_0xcce95e),_0x2d95e[_0x2cc80f(0x56b)]=!0x0,_0x20fa61(!0x0);try{await _0x40c7d5(_0x393361);}catch{}finally{_0x2d95e[_0x2cc80f(0x56b)]=!0x1,_0x20fa61(!0x1);}},'children':_0x3909bd['t'](_0x3fbbdf(0x604))})]})]});}function _0x179568(_0x3a1f07){const _0x5389fd=_0x34037b;let _0x323b5d=_0x3a1f07[_0x5389fd(0x543)]===_0x55c699[_0x5389fd(0x2e7)][_0x5389fd(0x580)]||_0x3a1f07[_0x5389fd(0x543)]===_0x55c699[_0x5389fd(0x2e7)][_0x5389fd(0x2a9)],_0x12637a={'type':_0x55c699['PivotFilterTypeEnum'][_0x5389fd(0x463)],'operator':_0x3a1f07['operator'],'expected':_0x323b5d?[_0x3a1f07[_0x5389fd(0x4a5)],_0x3a1f07[_0x5389fd(0x572)]]:_0x3a1f07['lower'],'useWholeDay':_0x3a1f07['useWholeDay']};try{return(0x0,_0x55c699['compilePivotDateFilter'])(_0x12637a),_0x12637a;}catch{return;}}function _0x5a2aaf(_0x44e2c6,_0x4a8d4d){const _0x2ab340=_0x34037b;let _0x4498d3=(0x0,_0x1ed97c[_0x2ab340(0x6d3)])(_0x44e2c6,{'dateSystem':_0x4a8d4d});if(!_0x4498d3||_0x4498d3[_0x2ab340(0x5bb)]===0x0||_0x4498d3[_0x2ab340(0x522)]===0x76c&&_0x4498d3[_0x2ab340(0x640)]===0x2&&_0x4498d3['day']===0x1d)return;let _0x16c3b7=new Date(0x7d0,0x0,0x1,0xc);return _0x16c3b7['setFullYear'](_0x4498d3[_0x2ab340(0x522)],_0x4498d3[_0x2ab340(0x640)]-0x1,_0x4498d3[_0x2ab340(0x5bb)]),_0x16c3b7;}function _0x43c78c(_0x3dfbe4,_0xfc247,_0x28c6b8){const _0x5aedaa=_0x34037b;let _0x1b823d=(0x0,_0x1ed97c[_0x5aedaa(0x1eb)])({'year':_0xfc247[_0x5aedaa(0x266)](),'month':_0xfc247[_0x5aedaa(0x1d9)]()+0x1,'day':_0xfc247[_0x5aedaa(0x15c)](),'hours':0x0,'minutes':0x0,'seconds':0x0,'fractionalSecond':0x0},{'dateSystem':_0x28c6b8});return _0x1b823d===null?void 0x0:_0x1b823d+(_0x3dfbe4===void 0x0?0x0:_0x3dfbe4-Math[_0x5aedaa(0x3e5)](_0x3dfbe4));}function _0x479b4d(_0x48b74c,_0x2caa26){const _0x248888=_0x34037b;return _0x48b74c===void 0x0||!Number[_0x248888(0x69a)](_0x2caa26[_0x248888(0x6c8)]())?_0x48b74c:Math[_0x248888(0x3e5)](_0x48b74c)+(_0x2caa26[_0x248888(0x283)]()*0xe10+_0x2caa26[_0x248888(0x2d5)]()*0x3c+_0x2caa26['getSeconds']()+_0x2caa26[_0x248888(0x12c)]()/0x3e8)/0x15180;}let _0x29886c=[{'value':_0x55c699[_0x34037b(0x2e7)]['dateEqual'],'label':_0x34037b(0x616)},{'value':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x49b)],'label':'sheets-pivot-ui.dateFilter.notEqual'},{'value':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x385)],'label':_0x34037b(0x52e)},{'value':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x26a)],'label':_0x34037b(0x625)},{'value':_0x55c699[_0x34037b(0x2e7)]['dateOlderThan'],'label':_0x34037b(0x288)},{'value':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x36f)],'label':_0x34037b(0x578)},{'value':_0x55c699['ST_PivotFilterOperatorEnum']['dateBetween'],'label':_0x34037b(0x142)},{'value':_0x55c699[_0x34037b(0x2e7)]['dateNotBetween'],'label':_0x34037b(0x4a3)}];function _0x1026fa({dateSystem:_0x305c73,defaultDate:_0x5e4f53,currentFilter:_0x142b32,onConfirm:_0x66354c,onCancel:_0x220fc3}){const _0xc3f6d3=_0x34037b;let _0x42bf52=(0x0,_0x2ef21f[_0xc3f6d3(0x1a2)])(_0x1ed97c[_0xc3f6d3(0x4ad)]);(0x0,_0x2ef21f[_0xc3f6d3(0x22f)])(_0x42bf52[_0xc3f6d3(0x6ad)]);let _0x5f4d74=(0x0,_0x2ef21f[_0xc3f6d3(0x22f)])(_0x42bf52[_0xc3f6d3(0x24d)],_0x42bf52[_0xc3f6d3(0x412)]()),[_0x667b3e,_0x5d92b0]=(0x0,_0x2b3aa2[_0xc3f6d3(0x189)])((_0x142b32==null?void 0x0:_0x142b32['operator'])??_0x55c699[_0xc3f6d3(0x2e7)][_0xc3f6d3(0x2aa)]),_0x14d584=Array[_0xc3f6d3(0x49e)](_0x142b32==null?void 0x0:_0x142b32[_0xc3f6d3(0x66a)])?_0x142b32['expected'][0x0]:_0x142b32==null?void 0x0:_0x142b32[_0xc3f6d3(0x66a)],_0x3a6bd7=Array[_0xc3f6d3(0x49e)](_0x142b32==null?void 0x0:_0x142b32[_0xc3f6d3(0x66a)])?_0x142b32[_0xc3f6d3(0x66a)][0x1]:void 0x0,[_0x4ca4aa,_0x3e4c50]=(0x0,_0x2b3aa2[_0xc3f6d3(0x189)])(()=>_0x14d584??_0x5e4f53??_0x43c78c(void 0x0,new Date(),_0x305c73)),[_0x26ebf3,_0x33b702]=(0x0,_0x2b3aa2[_0xc3f6d3(0x189)])(()=>_0x3a6bd7??_0x14d584??_0x5e4f53??_0x43c78c(void 0x0,new Date(),_0x305c73)),[_0x40330b,_0x496bd1]=(0x0,_0x2b3aa2[_0xc3f6d3(0x189)])((_0x142b32==null?void 0x0:_0x142b32[_0xc3f6d3(0x628)])===!0x0),[_0x5d7241,_0x579a1a]=(0x0,_0x2b3aa2['useState'])(!0x1),[_0x4ce694,_0x2f6704]=(0x0,_0x2b3aa2[_0xc3f6d3(0x189)])(!0x1),_0x58072e=(0x0,_0x2b3aa2[_0xc3f6d3(0x260)])(!0x1),_0x1d1457=_0x243310(_0x4ca4aa),_0x4527fe=_0x243310(_0x26ebf3),_0x3e0c0f=_0x667b3e===_0x55c699[_0xc3f6d3(0x2e7)][_0xc3f6d3(0x580)]||_0x667b3e===_0x55c699['ST_PivotFilterOperatorEnum'][_0xc3f6d3(0x2a9)],_0x51cb15=_0x179568({'operator':_0x667b3e,'lower':_0x1d1457,'upper':_0x4527fe,'useWholeDay':_0x40330b}),_0x21e975=_0x51cb15!==void 0x0&&_0x142b32!==void 0x0&&_0x667b3e===_0x142b32[_0xc3f6d3(0x543)]&&_0x40330b===(_0x142b32[_0xc3f6d3(0x628)]===!0x0)&&_0x1ed97c[_0xc3f6d3(0x389)][_0xc3f6d3(0x1a0)](_0x51cb15[_0xc3f6d3(0x66a)],_0x142b32[_0xc3f6d3(0x66a)]);async function _0x3c3770(_0x534055){const _0xb5edf6=_0xc3f6d3;if(!_0x58072e[_0xb5edf6(0x56b)]){_0x58072e[_0xb5edf6(0x56b)]=!0x0,_0x579a1a(!0x0),_0x2f6704(!0x1);try{await _0x66354c(_0x534055)||_0x2f6704(!0x0);}catch{_0x2f6704(!0x0);}finally{_0x58072e['current']=!0x1,_0x579a1a(!0x1);}}}function _0x243310(_0x17cda5){const _0x40c01a=_0xc3f6d3;return typeof _0x17cda5==_0x40c01a(0x40c)?_0x17cda5[_0x40c01a(0x6de)]()===''?void 0x0:Number(_0x17cda5):_0x17cda5;}function _0x541397(_0x1b4651,_0x512c7d){_0x512c7d?_0x33b702(_0x1b4651):_0x3e4c50(_0x1b4651);}function _0x4d1f17(_0x4cf349,_0x23701e){let _0x46db20=_0x43c78c(_0x23701e?_0x4527fe:_0x1d1457,_0x4cf349,_0x305c73);_0x23701e?_0x33b702(_0x46db20):_0x3e4c50(_0x46db20);}function _0x114093(_0x28a696,_0x48ad63){let _0x3f3685=_0x48ad63?_0x4527fe:_0x1d1457;if(_0x3f3685===void 0x0)return;let _0x1443f9=_0x479b4d(_0x3f3685,_0x28a696);_0x48ad63?_0x33b702(_0x1443f9):_0x3e4c50(_0x1443f9);}return(0x0,_0x282aef[_0xc3f6d3(0x567)])(_0xc3f6d3(0x259),{'dir':_0x5f4d74,'className':_0xc3f6d3(0x60a),'children':[(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0xc3f6d3(0x259),{'className':_0xc3f6d3(0x608),'children':_0x42bf52['t']('sheets-pivot-ui.dateFilter.title')}),(0x0,_0x282aef[_0xc3f6d3(0x567)])(_0xc3f6d3(0x259),{'className':_0xc3f6d3(0x2d8),'children':[(0x0,_0x282aef[_0xc3f6d3(0x5bf)])('span',{'className':_0xc3f6d3(0x493),'children':_0x42bf52['t'](_0xc3f6d3(0x629))}),(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0x3fc00c[_0xc3f6d3(0x51b)],{'className':_0xc3f6d3(0x368),'value':String(_0x667b3e),'options':_0x29886c['map'](_0x3043f0=>({'value':String(_0x3043f0[_0xc3f6d3(0x66f)]),'label':_0x42bf52['t'](_0x3043f0[_0xc3f6d3(0x5b6)])})),'onChange':_0x119a0e=>_0x5d92b0(Number(_0x119a0e))})]}),(_0x3e0c0f?[!0x1,!0x0]:[!0x1])['map'](_0x4c3431=>{const _0xca37f7=_0xc3f6d3;let _0x283f5f=_0x4c3431?_0x4527fe:_0x1d1457,_0x35a38=_0x283f5f===void 0x0?void 0x0:_0x5a2aaf(_0x283f5f,_0x305c73),_0x5d4a4b=(_0x4c3431?_0x3a6bd7:void 0x0)??_0x14d584??_0x5e4f53,_0x2c8a58=_0x5d4a4b!==void 0x0&&!_0x5a2aaf(_0x5d4a4b,_0x305c73),_0x1bf4f7=_0x283f5f===void 0x0?null:(0x0,_0x1ed97c[_0xca37f7(0x6d3)])(_0x283f5f,{'dateSystem':_0x305c73}),_0x25b366=_0x1bf4f7?new Date(0x7d0,0x0,0x1,_0x1bf4f7[_0xca37f7(0x35d)],_0x1bf4f7['minutes'],_0x1bf4f7[_0xca37f7(0x4dc)],Math['floor'](_0x1bf4f7[_0xca37f7(0x4a0)]*0x3e8)):void 0x0,_0x254e81='sheets-pivot-ui.dateFilter.date';return _0x3e0c0f&&(_0x254e81=_0x4c3431?_0xca37f7(0x353):'sheets-pivot-ui.dateFilter.from'),(0x0,_0x282aef[_0xca37f7(0x567)])(_0xca37f7(0x259),{'role':_0xca37f7(0x5f5),'aria-label':_0x42bf52['t'](_0x254e81),'className':'univer-flex\x20univer-min-w-0\x20univer-flex-col\x20univer-gap-1','children':[(0x0,_0x282aef[_0xca37f7(0x5bf)])(_0xca37f7(0x581),{'className':'univer-text-xs','children':_0x42bf52['t'](_0x254e81)}),_0x2c8a58?(0x0,_0x282aef[_0xca37f7(0x567)])(_0xca37f7(0x259),{'className':_0xca37f7(0x2d8),'children':[(0x0,_0x282aef[_0xca37f7(0x5bf)])('span',{'className':_0xca37f7(0x1ce),'children':_0x42bf52['t']('sheets-pivot-ui.dateFilter.serial')}),(0x0,_0x282aef[_0xca37f7(0x5bf)])(_0x3fc00c[_0xca37f7(0x45e)],{'value':String((_0x4c3431?_0x26ebf3:_0x4ca4aa)??''),'onChange':_0x109305=>_0x541397(_0x109305,_0x4c3431)})]}):(0x0,_0x282aef[_0xca37f7(0x567)])(_0xca37f7(0x259),{'className':_0xca37f7(0x657),'children':[(0x0,_0x282aef['jsx'])(_0x3fc00c[_0xca37f7(0x4bb)],{'value':_0x35a38,'onValueChange':_0x537f51=>_0x4d1f17(_0x537f51,_0x4c3431)}),!_0x40330b&&_0x283f5f!==void 0x0&&(0x0,_0x282aef['jsx'])(_0x3fc00c['TimeInput'],{'value':_0x25b366,'onValueChange':_0x1d8328=>_0x114093(_0x1d8328,_0x4c3431)})]})]},String(_0x4c3431));}),(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0x3fc00c[_0xc3f6d3(0x6b3)],{'checked':_0x40330b,'onChange':_0x2de4d4=>_0x496bd1(_0x2de4d4===!0x0),'children':_0x42bf52['t'](_0xc3f6d3(0x387))}),_0x4ce694&&(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0xc3f6d3(0x259),{'role':_0xc3f6d3(0x1a5),'className':_0xc3f6d3(0x621),'children':_0x42bf52['t']('sheets-pivot-ui.dateFilter.failed')}),(0x0,_0x282aef[_0xc3f6d3(0x567)])(_0xc3f6d3(0x259),{'className':_0xc3f6d3(0x365),'children':[(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0x3fc00c[_0xc3f6d3(0x2f8)],{'variant':_0xc3f6d3(0x5a6),'disabled':_0x5d7241||!_0x142b32,'onClick':()=>_0x3c3770(void 0x0),'children':_0x42bf52['t'](_0xc3f6d3(0x59a))}),(0x0,_0x282aef['jsxs'])(_0xc3f6d3(0x259),{'className':_0xc3f6d3(0x2ed),'children':[(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0x3fc00c[_0xc3f6d3(0x2f8)],{'disabled':_0x5d7241,'onClick':_0x220fc3,'children':_0x42bf52['t'](_0xc3f6d3(0x45d))}),(0x0,_0x282aef[_0xc3f6d3(0x5bf)])(_0x3fc00c[_0xc3f6d3(0x2f8)],{'variant':_0xc3f6d3(0x326),'disabled':_0x5d7241||!_0x51cb15||_0x21e975,'onClick':()=>_0x3c3770(_0x51cb15),'children':_0x42bf52['t'](_0xc3f6d3(0x1a1))})]})]})]});}function _0x45dd71(_0x575457){const _0x5f3a4f=_0x34037b;let {dialogId:_0xf44641=_0x24e684,filterItemInfo:_0x1cd45e,onClose:_0x191e6e,onSetFilter:_0x2616d4,onSetSort:_0x50ebee,onSetDateFilter:_0x2468ea,unitId:_0x142cf6,subUnitId:_0xc8e01}=_0x575457,{format:_0x9f2f1e,filterInfo:_0xe255d8,sortInfo:_0x3c6652}=_0x1cd45e,_0x1d924e=_0x1cd45e['conditionFilter']??_0xe255d8,_0x3e9a08=(0x0,_0x2ef21f[_0x5f3a4f(0x1a2)])(_0x1ed97c[_0x5f3a4f(0x4ab)]),_0xdce8af=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x5f3a4f(0x4ad)]);(0x0,_0x2ef21f['useObservable'])(_0xdce8af[_0x5f3a4f(0x6ad)]);let _0xa7b137=(0x0,_0x2ef21f[_0x5f3a4f(0x1a2)])(_0x2ef21f[_0x5f3a4f(0x2e3)]),_0x4cca65=(0x0,_0x2ef21f[_0x5f3a4f(0x1a2)])(_0x1ed97c[_0x5f3a4f(0x61a)]),_0x570975=(0x0,_0x2ef21f['useObservable'])(_0xdce8af[_0x5f3a4f(0x24d)],_0xdce8af[_0x5f3a4f(0x412)]()),_0x38e61f=(0x0,_0x2b3aa2['useRef'])(!0x0),[_0x52b4eb,_0x26fad1]=(0x0,_0x2b3aa2[_0x5f3a4f(0x189)])(!0x1);(0x0,_0x2b3aa2['useEffect'])(()=>(_0x38e61f[_0x5f3a4f(0x56b)]=!0x0,()=>{_0x38e61f['current']=!0x1;}),[]);let [_0x1fc7e7,_0x3e2b50]=(0x0,_0x2b3aa2[_0x5f3a4f(0x189)])(()=>_0x1cd45e?_0x1cd45e[_0x5f3a4f(0x184)]??(_0xe255d8==null?void 0x0:_0xe255d8[_0x5f3a4f(0x468)])??_0x1cd45e[_0x5f3a4f(0x180)]:[]),[_0x204f1e,_0x5bacd0]=(0x0,_0x2b3aa2['useState'])(()=>_0x1cd45e[_0x5f3a4f(0x2d0)]??[]),_0x35e5ef=_0x204f1e[_0x5f3a4f(0x3d7)]===0x0&&_0x1fc7e7['length']===_0x1cd45e[_0x5f3a4f(0x180)][_0x5f3a4f(0x3d7)],_0x32d76b=_0x1fc7e7[_0x5f3a4f(0x3d7)]===0x0&&_0x204f1e[_0x5f3a4f(0x3d7)]===0x0,[_0x82a92,_0x3e4324]=(0x0,_0x2b3aa2[_0x5f3a4f(0x189)])(()=>{const _0xb7f29e=_0x5f3a4f;if(_0x1cd45e)return _0x3c6652==null?void 0x0:_0x3c6652[_0xb7f29e(0x490)];}),_0xe323ce=()=>{const _0x2713d1=_0x5f3a4f;_0x38e61f[_0x2713d1(0x56b)]&&(_0x38e61f[_0x2713d1(0x56b)]=!0x1,_0x191e6e?_0x191e6e():_0xa7b137[_0x2713d1(0x6a2)](_0xf44641));};if((0x0,_0x2b3aa2[_0x5f3a4f(0x39c)])(()=>{const _0x14d926=_0x5f3a4f;let _0x1d034b=_0x4cca65['getCurrentUnitOfType'](_0x1ed97c[_0x14d926(0x3f9)]['UNIVER_SHEET']);if(!_0x1d034b)return;let _0x32dd45=_0x1d034b[_0x14d926(0x2d4)][_0x14d926(0x659)](_0x29ef47=>{const _0x49dea5=_0x14d926;_0x29ef47&&_0x29ef47[_0x49dea5(0x42f)]()!==_0xc8e01&&_0x38e61f[_0x49dea5(0x56b)]&&(_0x38e61f[_0x49dea5(0x56b)]=!0x1,_0x191e6e?_0x191e6e():_0xa7b137[_0x49dea5(0x6a2)](_0xf44641));});return()=>_0x32dd45==null?void 0x0:_0x32dd45['unsubscribe']();},[_0xf44641,_0xa7b137,_0x191e6e,_0xc8e01,_0x4cca65]),!_0x1cd45e)return;let _0x1b45f0=()=>{_0x5bacd0([]),_0x3e2b50(_0x35e5ef?[]:_0x1cd45e['items']);},_0x11d374=_0x43f6a3=>{const _0x48a2a5=_0x5f3a4f;_0x204f1e['includes'](_0x43f6a3)?(_0x5bacd0(_0x204f1e[_0x48a2a5(0x154)](_0x1f81dd=>_0x1f81dd!==_0x43f6a3)),_0x3e2b50([..._0x1fc7e7,_0x43f6a3])):_0x1fc7e7[_0x48a2a5(0x5fe)](_0x43f6a3)?_0x3e2b50(_0x1fc7e7['filter'](_0x4703fd=>_0x4703fd!==_0x43f6a3)):_0x3e2b50([..._0x1fc7e7,_0x43f6a3]);},_0x19ccb7=async()=>{const _0x40c0c7=_0x5f3a4f;let {tableFieldId:_0x1ab55e,pivotTableId:_0x3e1cc5}=_0x1cd45e;if(_0x1ab55e&&_0x3e1cc5)try{(_0x2616d4?await _0x2616d4(_0x1fc7e7,_0x35e5ef,_0x204f1e):await _0x3e9a08[_0x40c0c7(0x1cd)](_0x5ec675['SetPivotFilterCommand']['id'],{'unitId':_0x142cf6,'subUnitId':_0xc8e01,'pivotTableId':_0x3e1cc5,'tableFieldId':_0x1ab55e,'items':_0x1fc7e7,'partialItems':_0x204f1e,'isAll':_0x35e5ef}))&&_0x38e61f[_0x40c0c7(0x56b)]&&_0xe323ce();}catch{}},_0x4eace2=()=>{_0xe323ce();},_0x52f096=async()=>{const _0x2fff76=_0x5f3a4f;let {tableFieldId:_0x31d803,pivotTableId:_0x282d76}=_0x1cd45e;if(_0x31d803&&_0x282d76){_0x3e2b50(_0x1cd45e[_0x2fff76(0x180)]),_0x5bacd0([]);try{(_0x2616d4?await _0x2616d4(_0x1cd45e[_0x2fff76(0x180)],!0x0,[],!0x0):await _0x3e9a08[_0x2fff76(0x1cd)](_0x5ec675['SetPivotFilterCommand']['id'],{'unitId':_0x142cf6,'subUnitId':_0xc8e01,'pivotTableId':_0x282d76,'tableFieldId':_0x31d803,'items':_0x1cd45e[_0x2fff76(0x180)],'partialItems':[],'isAll':!0x0,'clearAllFilters':!0x0}))&&_0x38e61f['current']&&_0xe323ce();}catch{}}},_0x9d5c41=async _0x46af9e=>{let {tableFieldId:_0x5ce284,pivotTableId:_0x44ba73}=_0x1cd45e;if(!_0x5ce284||!_0x44ba73)return;let _0x387d92={'type':_0x46af9e};try{(_0x50ebee?await _0x50ebee(_0x387d92):await _0x3e9a08['executeCommand'](_0x5ec675['SetPivotSortCommand']['id'],{'unitId':_0x142cf6,'subUnitId':_0xc8e01,'pivotTableId':_0x44ba73,'tableFieldId':_0x5ce284,'info':_0x387d92}))&&_0x38e61f['current']&&(_0x3e4324(_0x46af9e),_0xe323ce());}catch{}},_0x332e90=_0x158960(_0xe255d8,{'items':_0x1cd45e[_0x5f3a4f(0x180)],'conditionFilter':_0x1cd45e[_0x5f3a4f(0x3e1)]});async function _0x227d48(_0x471a7c){const _0x2000a2=_0x5f3a4f;if(!_0x38e61f[_0x2000a2(0x56b)])return!0x1;let _0x1ee3e4=_0x2468ea?await _0x2468ea(_0x471a7c):await _0x3e9a08[_0x2000a2(0x1cd)](_0x5ec675[_0x2000a2(0x466)]['id'],{'unitId':_0x142cf6,'subUnitId':_0xc8e01,'pivotTableId':_0x1cd45e[_0x2000a2(0x3bb)],'tableFieldId':_0x1cd45e[_0x2000a2(0x520)],'filterInfo':_0x471a7c});return _0x1ee3e4&&_0x38e61f[_0x2000a2(0x56b)]&&_0xe323ce(),_0x1ee3e4;}if(_0x52b4eb){let _0x10db73=_0x4cca65[_0x5f3a4f(0x538)](_0x142cf6),_0x10edba=_0x1cd45e[_0x5f3a4f(0x238)]['findIndex'](_0x2cc807=>_0x2cc807===_0x55c699['PivotDataFieldDataTypeEnum'][_0x5f3a4f(0x175)]),_0x30728c=Number(_0x1cd45e[_0x5f3a4f(0x180)][_0x10edba]);return(0x0,_0x282aef['jsx'])(_0x1026fa,{'dateSystem':(_0x10db73==null?void 0x0:_0x10db73[_0x5f3a4f(0x382)]())??_0x1ed97c[_0x5f3a4f(0x1ff)][_0x5f3a4f(0x698)],'defaultDate':Number[_0x5f3a4f(0x69a)](_0x30728c)?_0x30728c:void 0x0,'currentFilter':(0x0,_0x55c699[_0x5f3a4f(0x4ae)])(_0x1d924e)?_0x1d924e:void 0x0,'onConfirm':_0x227d48,'onCancel':()=>_0x26fad1(!0x1)});}return(0x0,_0x282aef['jsxs'])('div',{'dir':_0x570975,'children':[_0x1cd45e[_0x5f3a4f(0x4e4)]&&(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x3fc00c[_0x5f3a4f(0x2f8)],{'className':_0x5f3a4f(0x413),'onClick':()=>_0x26fad1(!0x0),'children':_0xdce8af['t'](_0x5f3a4f(0x648))}),(0x0,_0x282aef['jsxs'])(_0x5f3a4f(0x259),{'className':_0x5f3a4f(0x190),'children':[(0x0,_0x282aef[_0x5f3a4f(0x567)])(_0x5f3a4f(0x259),{'className':(0x0,_0x3fc00c[_0x5f3a4f(0x4e2)])(_0x5f3a4f(0x34d),_0x3fc00c[_0x5f3a4f(0x4c1)],{'univer-bg-gray-100\x20dark:!univer-bg-gray-700':_0x82a92===_0x55c699[_0x5f3a4f(0x4fc)][_0x5f3a4f(0x53e)]}),'onClick':()=>_0x9d5c41(_0x55c699[_0x5f3a4f(0x4fc)][_0x5f3a4f(0x53e)]),'children':[(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x508f58,{}),_0xdce8af['t']('sheets-pivot-ui.dialog.filter.ascending')]}),(0x0,_0x282aef[_0x5f3a4f(0x567)])('div',{'className':(0x0,_0x3fc00c[_0x5f3a4f(0x4e2)])(_0x5f3a4f(0x59d),_0x3fc00c[_0x5f3a4f(0x4c1)],{'univer-bg-gray-100\x20dark:!univer-bg-gray-700':_0x82a92===_0x55c699[_0x5f3a4f(0x4fc)][_0x5f3a4f(0x16c)]}),'onClick':()=>_0x9d5c41(_0x55c699[_0x5f3a4f(0x4fc)][_0x5f3a4f(0x16c)]),'children':[(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x4a9b75,{}),_0xdce8af['t'](_0x5f3a4f(0x5e5))]})]}),(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x5f3a4f(0x259),{'className':(0x0,_0x3fc00c['clsx'])(_0x5f3a4f(0x603),_0x3fc00c[_0x5f3a4f(0x4c1)]),'children':(0x0,_0x282aef['jsxs'])(_0x5f3a4f(0x259),{'className':(0x0,_0x3fc00c[_0x5f3a4f(0x4e2)])(_0x5f3a4f(0x37a),_0x3fc00c['scrollbarClassName']),'children':[(0x0,_0x282aef['jsx'])(_0x5f3a4f(0x259),{'className':_0x5f3a4f(0x495),'children':(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x5f3a4f(0x6b3)],{'checked':_0x35e5ef,'onChange':_0x1b45f0,'indeterminate':!_0x35e5ef&&(_0x1fc7e7['length']>0x0||_0x204f1e[_0x5f3a4f(0x3d7)]>0x0),'children':_0xdce8af['t']('sheets-pivot-ui.dialog.filter.selectAll')})}),_0x1cd45e['items'][_0x5f3a4f(0x23e)]((_0x4e2f46,_0x5ad9a9)=>{const _0x151f4e=_0x5f3a4f;var _0x4afd5e,_0xc80678;let _0x14b309=_0x4e2f46,_0x3f6dee=(_0x4afd5e=_0x1cd45e[_0x151f4e(0x509)])==null?void 0x0:_0x4afd5e[_0x4e2f46],_0x3c072f=(_0xc80678=_0x1cd45e[_0x151f4e(0x238)])==null?void 0x0:_0xc80678[_0x5ad9a9],_0x3dba4c=_0x2bf750(_0x4e2f46,_0x3c072f);return _0x3dba4c?_0x14b309=_0xdce8af['t'](_0x3dba4c):_0x3f6dee===void 0x0?_0x3c072f===_0x55c699['PivotDataFieldDataTypeEnum'][_0x151f4e(0x175)]&&_0x9f2f1e&&(_0x14b309=_0x1ed97c['numfmt']['format'](_0x9f2f1e,Number(_0x4e2f46))):_0x14b309=_0x3f6dee,(0x0,_0x282aef['jsx'])(_0x151f4e(0x259),{'className':_0x151f4e(0x519),'children':(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x151f4e(0x6b3)],{'checked':_0x1fc7e7[_0x151f4e(0x5fe)](_0x4e2f46),'indeterminate':_0x204f1e['includes'](_0x4e2f46),'onChange':()=>_0x11d374(_0x4e2f46),'contentClassName':'univer-max-w-[200px]\x20univer-truncate','children':_0x14b309})},_0x4e2f46);})]})}),(0x0,_0x282aef['jsxs'])(_0x3fc00c[_0x5f3a4f(0x17f)],{'className':'univer-flex\x20univer-items-center\x20univer-justify-between','children':[(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x5f3a4f(0x259),{'className':_0x5f3a4f(0x34a),'children':(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x3fc00c[_0x5f3a4f(0x2f8)],{'variant':_0x5f3a4f(0x5a6),'disabled':_0x332e90==='NotFilter','onClick':_0x52f096,'children':_0xdce8af['t'](_0x5f3a4f(0x59a))})}),(0x0,_0x282aef[_0x5f3a4f(0x567)])(_0x3fc00c['ActionRow'],{'className':'univer-flex\x20univer-flex-1\x20univer-items-center\x20univer-gap-3','children':[(0x0,_0x282aef[_0x5f3a4f(0x5bf)])(_0x3fc00c[_0x5f3a4f(0x2f8)],{'onClick':_0x4eace2,'children':_0xdce8af['t'](_0x5f3a4f(0x45d))}),(0x0,_0x282aef['jsx'])(_0x3fc00c['Button'],{'variant':_0x5f3a4f(0x326),'disabled':_0x32d76b,'onClick':_0x19ccb7,'children':_0xdce8af['t'](_0x5f3a4f(0x1a1))})]})]})]});}function _0x1c535a({name:_0x24b9d0,onConfirm:_0x51d62f,onCancel:_0x657077}){const _0x4c506d=_0x34037b;let _0x4791d1=(0x0,_0x2ef21f[_0x4c506d(0x1a2)])(_0x1ed97c[_0x4c506d(0x4ad)]),_0x41e822=(0x0,_0x2ef21f[_0x4c506d(0x22f)])(_0x4791d1[_0x4c506d(0x24d)],_0x4791d1[_0x4c506d(0x412)]()),[_0x591c33,_0x5c349b]=(0x0,_0x2b3aa2[_0x4c506d(0x189)])(_0x24b9d0),[_0x1edcc5,_0x5dce65]=(0x0,_0x2b3aa2[_0x4c506d(0x189)])(!0x1),_0x19f738=(0x0,_0x2b3aa2['useRef'])(!0x1);return(0x0,_0x282aef[_0x4c506d(0x567)])(_0x4c506d(0x259),{'className':_0x4c506d(0x25a),'dir':_0x41e822,'children':[(0x0,_0x282aef[_0x4c506d(0x567)])('label',{'className':_0x4c506d(0x239),'children':[_0x4791d1['t'](_0x4c506d(0x58a)),(0x0,_0x282aef['jsx'])(_0x3fc00c['Input'],{'value':_0x591c33,'onChange':_0x5c349b})]}),(0x0,_0x282aef[_0x4c506d(0x567)])(_0x4c506d(0x259),{'className':_0x4c506d(0x4b3),'children':[(0x0,_0x282aef['jsx'])(_0x3fc00c['Button'],{'onClick':_0x657077,'children':_0x4791d1['t'](_0x4c506d(0x643))}),(0x0,_0x282aef[_0x4c506d(0x5bf)])(_0x3fc00c[_0x4c506d(0x2f8)],{'variant':_0x4c506d(0x326),'disabled':!_0x591c33[_0x4c506d(0x6de)]()||_0x1edcc5,'onClick':async()=>{const _0x2e9701=_0x4c506d;if(_0x591c33['trim']()&&!_0x19f738[_0x2e9701(0x56b)]){_0x19f738[_0x2e9701(0x56b)]=!0x0,_0x5dce65(!0x0);try{await _0x51d62f(_0x591c33);}catch{}finally{_0x19f738[_0x2e9701(0x56b)]=!0x1,_0x5dce65(!0x1);}}},'children':_0x4791d1['t']('sheets-pivot-ui.dialog.ok')})]})]});}let _0x1b4437=_0x34037b(0x33e);function _0x17d3c3({targetFieldName:_0x4ea72f,grouping:_0x7dac1a,defaults$:_0x3ab7ea,onConfirm:_0xa7c77f,onCancel:_0x2de462}){const _0xf9a67f=_0x34037b;let _0x51bf98=(0x0,_0x2ef21f[_0xf9a67f(0x1a2)])(_0x1ed97c[_0xf9a67f(0x4ad)]),_0x37c848=(0x0,_0x2ef21f[_0xf9a67f(0x22f)])(_0x51bf98[_0xf9a67f(0x24d)],_0x51bf98['getDirection']()),_0x510ea5=(0x0,_0x2ef21f[_0xf9a67f(0x22f)])(_0x3ab7ea),[_0x5957e3,_0x47d691]=(0x0,_0x2b3aa2[_0xf9a67f(0x189)])((_0x7dac1a==null?void 0x0:_0x7dac1a['autoStart'])??!0x0),[_0xf028cc,_0x7655d6]=(0x0,_0x2b3aa2[_0xf9a67f(0x189)])((_0x7dac1a==null?void 0x0:_0x7dac1a[_0xf9a67f(0x250)])??!0x0),[_0x5a0c41,_0x14eee9]=(0x0,_0x2b3aa2[_0xf9a67f(0x189)])((_0x7dac1a==null?void 0x0:_0x7dac1a[_0xf9a67f(0x1ac)])===!0x1?String(_0x7dac1a['start']):void 0x0),[_0xc54fa0,_0x413c6e]=(0x0,_0x2b3aa2[_0xf9a67f(0x189)])((_0x7dac1a==null?void 0x0:_0x7dac1a[_0xf9a67f(0x250)])===!0x1?String(_0x7dac1a[_0xf9a67f(0x66c)]):void 0x0),[_0x183c86,_0x404457]=(0x0,_0x2b3aa2[_0xf9a67f(0x189)])(_0x7dac1a?String(_0x7dac1a[_0xf9a67f(0x136)]):void 0x0),[_0x4f60be,_0x356a08]=(0x0,_0x2b3aa2[_0xf9a67f(0x189)])(!0x1),_0x1e0fb5=(0x0,_0x2b3aa2[_0xf9a67f(0x260)])(!0x1),_0x4b14a8=_0xfd0b36=>_0xfd0b36===void 0x0||!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i['test'](_0xfd0b36[_0xf9a67f(0x6de)]())?NaN:Number(_0xfd0b36),_0x580c42={'autoStart':_0x5957e3,'autoEnd':_0xf028cc,'start':_0x5957e3?_0x510ea5==null?void 0x0:_0x510ea5[_0xf9a67f(0x218)]:_0x4b14a8(_0x5a0c41),'end':_0xf028cc?_0x510ea5==null?void 0x0:_0x510ea5['end']:_0x4b14a8(_0xc54fa0),'interval':_0x183c86===void 0x0||_0x183c86[_0xf9a67f(0x6de)]()===''?(_0x510ea5==null?void 0x0:_0x510ea5[_0xf9a67f(0x136)])??0x0:_0x4b14a8(_0x183c86)},_0x44a0e9=!!_0x510ea5&&_0x5f1653(_0x580c42),_0x564762=_0x4979cb=>{const _0x4f095c=_0xf9a67f;!_0x4979cb&&_0x5a0c41===void 0x0&&(_0x510ea5==null?void 0x0:_0x510ea5[_0x4f095c(0x218)])!==void 0x0&&_0x14eee9(String(_0x510ea5[_0x4f095c(0x218)])),_0x47d691(_0x4979cb);},_0x446490=_0x101a97=>{const _0x26cdd9=_0xf9a67f;!_0x101a97&&_0xc54fa0===void 0x0&&(_0x510ea5==null?void 0x0:_0x510ea5[_0x26cdd9(0x66c)])!==void 0x0&&_0x413c6e(String(_0x510ea5[_0x26cdd9(0x66c)])),_0x7655d6(_0x101a97);};return(0x0,_0x282aef['jsxs'])(_0xf9a67f(0x259),{'className':_0xf9a67f(0x25a),'dir':_0x37c848,'children':[(0x0,_0x282aef[_0xf9a67f(0x5bf)])(_0xf9a67f(0x259),{'className':_0xf9a67f(0x608),'children':_0x4ea72f}),(0x0,_0x282aef['jsxs'])(_0xf9a67f(0x259),{'className':_0xf9a67f(0x38d),'children':[(0x0,_0x282aef['jsx'])(_0x3fc00c[_0xf9a67f(0x6b3)],{'checked':_0x5957e3,'onChange':_0x3db22d=>_0x564762(!!_0x3db22d),'children':_0x51bf98['t']('sheets-pivot-ui.numberGroup.autoStart')}),(0x0,_0x282aef[_0xf9a67f(0x567)])('label',{'className':_0x1b4437,'children':[_0x51bf98['t'](_0xf9a67f(0x626)),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0xf9a67f(0x45e)],{'className':_0xf9a67f(0x5f6),'value':_0x5957e3?String((_0x510ea5==null?void 0x0:_0x510ea5['start'])??''):_0x5a0c41??'','disabled':_0x5957e3,'onChange':_0x14eee9})]}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0xf9a67f(0x6b3)],{'checked':_0xf028cc,'onChange':_0x5a2f8d=>_0x446490(!!_0x5a2f8d),'children':_0x51bf98['t']('sheets-pivot-ui.numberGroup.autoEnd')}),(0x0,_0x282aef['jsxs'])(_0xf9a67f(0x5b6),{'className':_0x1b4437,'children':[_0x51bf98['t'](_0xf9a67f(0x696)),(0x0,_0x282aef[_0xf9a67f(0x5bf)])(_0x3fc00c[_0xf9a67f(0x45e)],{'className':_0xf9a67f(0x5f6),'value':_0xf028cc?String((_0x510ea5==null?void 0x0:_0x510ea5[_0xf9a67f(0x66c)])??''):_0xc54fa0??'','disabled':_0xf028cc,'onChange':_0x413c6e})]}),(0x0,_0x282aef[_0xf9a67f(0x567)])(_0xf9a67f(0x5b6),{'className':_0x1b4437,'children':[_0x51bf98['t']('sheets-pivot-ui.numberGroup.interval'),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0xf9a67f(0x45e)],{'className':_0xf9a67f(0x5f6),'value':_0x183c86??String((_0x510ea5==null?void 0x0:_0x510ea5[_0xf9a67f(0x136)])??''),'placeholder':String((_0x510ea5==null?void 0x0:_0x510ea5['interval'])??''),'onChange':_0x404457})]})]}),(0x0,_0x282aef[_0xf9a67f(0x567)])('div',{'className':'univer-flex\x20univer-justify-end\x20univer-gap-3','children':[(0x0,_0x282aef[_0xf9a67f(0x5bf)])(_0x3fc00c[_0xf9a67f(0x2f8)],{'onClick':_0x2de462,'children':_0x51bf98['t'](_0xf9a67f(0x643))}),(0x0,_0x282aef[_0xf9a67f(0x5bf)])(_0x3fc00c['Button'],{'variant':_0xf9a67f(0x326),'disabled':!_0x44a0e9||_0x4f60be,'onClick':async()=>{const _0x11ec50=_0xf9a67f;if(_0x44a0e9&&!_0x1e0fb5[_0x11ec50(0x56b)]){_0x1e0fb5[_0x11ec50(0x56b)]=!0x0,_0x356a08(!0x0);try{await _0xa7c77f(_0x580c42);}catch{}finally{_0x1e0fb5[_0x11ec50(0x56b)]=!0x1,_0x356a08(!0x1);}}},'children':_0x51bf98['t'](_0xf9a67f(0x604))})]})]});}let _0x32d3ff=({handlePatternChange:_0x3f18e8})=>{const _0x1dd9bc=_0x34037b;let _0x276575=(0x0,_0x2ef21f[_0x1dd9bc(0x1a2)])(_0x1ed97c[_0x1dd9bc(0x4ad)]);return(0x0,_0x2b3aa2['useEffect'])(()=>{_0x3f18e8('');},[]),(0x0,_0x282aef[_0x1dd9bc(0x5bf)])(_0x1dd9bc(0x259),{'className':_0x1dd9bc(0x5df),'children':_0x276575['t'](_0x1dd9bc(0x505))});},_0x6de781=({originPattern:_0x3c68fc,handlePatternChange:_0x9a3b16})=>{const _0x56fbc3=_0x34037b;let _0x58d193=(0x0,_0x2ef21f[_0x56fbc3(0x1a2)])(_0x1ed97c['LocaleService']),_0x4ac887=_0x1ed97c[_0x56fbc3(0x2e9)][_0x56fbc3(0x23e)](_0x101d61=>({'label':_0x101d61,'value':_0x101d61})),[_0x461599,_0x578a14]=(0x0,_0x2b3aa2[_0x56fbc3(0x189)])(()=>_0x36e58b(_0x3c68fc||'',0x2)),[_0x1280c2,_0x2d2405]=(0x0,_0x2b3aa2[_0x56fbc3(0x189)])(()=>_0x3e673d(_0x3c68fc??'')||_0x4ac887[0x0][_0x56fbc3(0x66f)]);return(0x0,_0x2b3aa2['useEffect'])(()=>{const _0x2047ec=_0x56fbc3;_0x9a3b16(_0x57e3a0(_0x2047ec(0x652)+_0x1280c2+_0x2047ec(0x675)+(_0x461599>0x0?'.0':'')+'_)',_0x461599));},[]),(0x0,_0x282aef[_0x56fbc3(0x567)])(_0x56fbc3(0x259),{'className':_0x56fbc3(0x697),'children':[(0x0,_0x282aef[_0x56fbc3(0x567)])('div',{'className':_0x56fbc3(0x338),'children':[(0x0,_0x282aef[_0x56fbc3(0x567)])(_0x56fbc3(0x259),{'className':_0x56fbc3(0x390),'children':[(0x0,_0x282aef[_0x56fbc3(0x5bf)])('div',{'className':_0x56fbc3(0x362),'children':_0x58d193['t'](_0x56fbc3(0x377))}),(0x0,_0x282aef[_0x56fbc3(0x5bf)])(_0x3fc00c['InputNumber'],{'className':'univer-box-border\x20univer-h-8','value':_0x461599,'max':0x14,'min':0x0,'onChange':_0x204bd3=>{const _0x406280=_0x56fbc3;let _0x38884c=_0x204bd3??0x0;_0x578a14(_0x38884c),_0x9a3b16(_0x57e3a0('_(\x22'+_0x1280c2+_0x406280(0x675)+(_0x38884c>0x0?'.0':'')+'_)',_0x38884c));}})]}),(0x0,_0x282aef[_0x56fbc3(0x567)])('div',{'className':'univer-w-[136px]','children':[(0x0,_0x282aef[_0x56fbc3(0x5bf)])(_0x56fbc3(0x259),{'className':_0x56fbc3(0x362),'children':_0x58d193['t'](_0x56fbc3(0x4c8))}),(0x0,_0x282aef[_0x56fbc3(0x5bf)])(_0x3fc00c[_0x56fbc3(0x51b)],{'options':_0x4ac887,'value':_0x1280c2,'onChange':_0x2a5fc2=>{const _0x38a884=_0x56fbc3;_0x2d2405(_0x2a5fc2),_0x9a3b16(_0x57e3a0(_0x38a884(0x652)+_0x2a5fc2+_0x38a884(0x675)+(_0x461599>0x0?'.0':'')+'_)',_0x461599));}})]})]}),(0x0,_0x282aef['jsx'])(_0x56fbc3(0x259),{'className':_0x56fbc3(0x5df),'children':_0x58d193['t'](_0x56fbc3(0x13f))})]});},_0x1fe9cd=({originPattern:_0x3a0f66,handlePatternChange:_0x58c1c7})=>{const _0x538e5d=_0x34037b;let _0x230698=(0x0,_0x2ef21f[_0x538e5d(0x1a2)])(_0x1ed97c[_0x538e5d(0x4ad)]),_0x4662b0=_0x1ed97c[_0x538e5d(0x2e9)][_0x538e5d(0x23e)](_0x36d990=>({'label':_0x36d990,'value':_0x36d990})),[_0x17ff21,_0x273813]=(0x0,_0x2b3aa2[_0x538e5d(0x189)])(()=>_0x36e58b(_0x3a0f66||'',0x2)),[_0xb7bf05,_0x22d9c2]=(0x0,_0x2b3aa2[_0x538e5d(0x189)])(()=>_0x3e673d(_0x3a0f66??'')||_0x4662b0[0x0]['value']),_0x5b01c2=_0x3584c6[_0x538e5d(0x23e)](_0x1502de=>({'label':_0x1502de['label'](_0xb7bf05),'value':_0x1502de[_0x538e5d(0x2fb)](_0xb7bf05),'color':_0x1502de[_0x538e5d(0x5b5)]})),[_0x2bacd9,_0x23207e]=(0x0,_0x2b3aa2[_0x538e5d(0x189)])(()=>{const _0x5294c1=_0x538e5d;var _0x10f2f6;return((_0x10f2f6=_0x5b01c2[_0x5294c1(0x242)](_0x10917d=>(0x0,_0x1ed97c[_0x5294c1(0x244)])(_0x10917d[_0x5294c1(0x66f)],_0x3a0f66??'')))==null?void 0x0:_0x10f2f6[_0x5294c1(0x66f)])||_0x5b01c2[0x0][_0x5294c1(0x66f)];});return(0x0,_0x2b3aa2['useEffect'])(()=>{_0x58c1c7(_0x57e3a0(_0x2bacd9,_0x17ff21));},[]),(0x0,_0x282aef['jsxs'])(_0x538e5d(0x259),{'className':_0x538e5d(0x697),'children':[(0x0,_0x282aef['jsxs'])('div',{'className':'univer-flex\x20univer-items-center\x20univer-justify-between','children':[(0x0,_0x282aef[_0x538e5d(0x567)])(_0x538e5d(0x259),{'className':_0x538e5d(0x390),'children':[(0x0,_0x282aef['jsx'])(_0x538e5d(0x259),{'className':_0x538e5d(0x362),'children':_0x230698['t']('sheets-pivot-ui.dialog.numfmt.decimalPlaces')}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x538e5d(0x393)],{'className':_0x538e5d(0x42d),'value':_0x17ff21,'max':0x14,'min':0x0,'onChange':_0x25b51c=>{_0x25b51c&&(_0x273813(_0x25b51c),_0x58c1c7(_0x57e3a0(_0x2bacd9,_0x25b51c)));}})]}),(0x0,_0x282aef[_0x538e5d(0x567)])(_0x538e5d(0x259),{'className':_0x538e5d(0x390),'children':[(0x0,_0x282aef['jsx'])(_0x538e5d(0x259),{'className':_0x538e5d(0x362),'children':_0x230698['t'](_0x538e5d(0x4c8))}),(0x0,_0x282aef[_0x538e5d(0x5bf)])(_0x3fc00c[_0x538e5d(0x51b)],{'options':_0x4662b0,'value':_0xb7bf05,'onChange':_0x267e67=>{const _0x322012=_0x538e5d;_0x22d9c2(_0x267e67);let _0x497779=_0x3584c6[_0x322012(0x23e)](_0x1c6ccc=>({'label':_0x1c6ccc[_0x322012(0x5b6)](_0x267e67),'value':_0x1c6ccc[_0x322012(0x2fb)](_0x267e67),'color':_0x1c6ccc[_0x322012(0x5b5)]}));_0x23207e(_0x497779[0x0]['value']),_0x58c1c7(_0x57e3a0(_0x497779[0x0]['value'],_0x17ff21));}})]})]}),(0x0,_0x282aef[_0x538e5d(0x567)])(_0x538e5d(0x259),{'className':_0x538e5d(0x4cb),'children':[(0x0,_0x282aef[_0x538e5d(0x5bf)])(_0x538e5d(0x259),{'className':_0x538e5d(0x362),'children':_0x230698['t'](_0x538e5d(0x223))}),(0x0,_0x282aef[_0x538e5d(0x5bf)])(_0x3fc00c[_0x538e5d(0x570)],{'className':'univer-rounded-lg\x20univer-p-2','options':_0x5b01c2,'value':_0x2bacd9,'onChange':_0x5b6923=>{_0x23207e(_0x5b6923),_0x58c1c7(_0x57e3a0(_0x5b6923,_0x17ff21));}}),(0x0,_0x282aef[_0x538e5d(0x5bf)])(_0x538e5d(0x259),{'className':_0x538e5d(0x5df),'children':_0x230698['t']('sheets-pivot-ui.dialog.numfmt.currencyDesc')})]})]});},_0x5a5f0a=({originPattern:_0x166e67,handlePatternChange:_0x53bb52})=>{const _0x2e56e3=_0x34037b;let _0x211e45=(0x0,_0x2ef21f[_0x2e56e3(0x1a2)])(_0x1ed97c[_0x2e56e3(0x4ad)]),_0x394367=_0x5a99a9[_0x2e56e3(0x23e)](_0x1f69fc=>({'label':_0x1f69fc[_0x2e56e3(0x5b6)],'value':_0x1f69fc[_0x2e56e3(0x2fb)]})),[_0x841ab8,_0x239363]=(0x0,_0x2b3aa2[_0x2e56e3(0x189)])(()=>{const _0x331f85=_0x2e56e3;if(_0x166e67){let _0x4be7ad=_0x394367[_0x331f85(0x242)](_0x53b1b7=>_0x53b1b7[_0x331f85(0x66f)]===_0x166e67);if(_0x4be7ad)return _0x4be7ad[_0x331f85(0x66f)];}return _0x394367[0x0][_0x331f85(0x66f)];});return(0x0,_0x2b3aa2[_0x2e56e3(0x39c)])(()=>{_0x53bb52(_0x841ab8);},[]),(0x0,_0x282aef[_0x2e56e3(0x5bf)])(_0x2e56e3(0x259),{'className':_0x2e56e3(0x697),'children':(0x0,_0x282aef['jsxs'])(_0x2e56e3(0x259),{'className':_0x2e56e3(0x697),'children':[(0x0,_0x282aef[_0x2e56e3(0x5bf)])(_0x2e56e3(0x259),{'className':_0x2e56e3(0x362),'children':_0x211e45['t']('sheets-pivot-ui.dialog.numfmt.dateTypes')}),(0x0,_0x282aef[_0x2e56e3(0x5bf)])(_0x2e56e3(0x259),{'children':(0x0,_0x282aef[_0x2e56e3(0x5bf)])(_0x3fc00c[_0x2e56e3(0x570)],{'className':'univer-rounded-lg\x20univer-p-2','options':_0x394367,'value':_0x841ab8,'onChange':_0x366e77=>{_0x239363(_0x366e77),_0x53bb52(_0x366e77);}})}),(0x0,_0x282aef[_0x2e56e3(0x5bf)])(_0x2e56e3(0x259),{'className':_0x2e56e3(0x5df),'children':_0x211e45['t']('sheets-pivot-ui.dialog.numfmt.dateDesc')})]})});},_0x5c8ed4=({originPattern:_0x25c3a7,handlePatternChange:_0x185b53})=>{const _0x4f9359=_0x34037b;let _0x572302=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x4f9359(0x4ad)]),[_0x206cb2,_0x382ea3]=(0x0,_0x2b3aa2['useState'])(()=>_0x36e58b(_0x25c3a7||'',0x0)),_0x1ac771=_0x2c1f4d['map'](_0x4dae32=>({'label':_0x4dae32[_0x4f9359(0x5b6)],'value':_0x4dae32[_0x4f9359(0x2fb)],'color':_0x4dae32[_0x4f9359(0x5b5)]})),[_0x30eadc,_0x203688]=(0x0,_0x2b3aa2[_0x4f9359(0x189)])(()=>{const _0x52c95d=_0x4f9359;let _0x55e83b=_0x1ac771[_0x52c95d(0x242)](_0x45c261=>(0x0,_0x1ed97c[_0x52c95d(0x244)])(_0x45c261[_0x52c95d(0x66f)],_0x25c3a7||''));return(_0x55e83b==null?void 0x0:_0x55e83b[_0x52c95d(0x66f)])||_0x1ac771[0x0][_0x52c95d(0x66f)];});return(0x0,_0x2b3aa2[_0x4f9359(0x39c)])(()=>{_0x185b53(_0x57e3a0(_0x30eadc,Number(_0x206cb2||0x0)));},[]),(0x0,_0x282aef['jsxs'])('div',{'className':_0x4f9359(0x697),'children':[(0x0,_0x282aef[_0x4f9359(0x5bf)])(_0x4f9359(0x259),{'className':'univer-flex\x20univer-items-center\x20univer-justify-between','children':(0x0,_0x282aef[_0x4f9359(0x567)])(_0x4f9359(0x259),{'className':_0x4f9359(0x390),'children':[(0x0,_0x282aef[_0x4f9359(0x5bf)])('div',{'className':_0x4f9359(0x362),'children':_0x572302['t'](_0x4f9359(0x377))}),(0x0,_0x282aef[_0x4f9359(0x5bf)])(_0x3fc00c[_0x4f9359(0x393)],{'className':_0x4f9359(0x42d),'value':_0x206cb2,'max':0x14,'min':0x0,'onChange':_0x3ab2b7=>{_0x3ab2b7&&(_0x382ea3(_0x3ab2b7),_0x185b53(_0x57e3a0(_0x30eadc,Number(_0x3ab2b7))));}})]})}),(0x0,_0x282aef[_0x4f9359(0x567)])('div',{'className':'univer-mt-4','children':[(0x0,_0x282aef['jsx'])(_0x4f9359(0x259),{'className':_0x4f9359(0x362),'children':_0x572302['t'](_0x4f9359(0x223))}),(0x0,_0x282aef[_0x4f9359(0x5bf)])(_0x3fc00c[_0x4f9359(0x570)],{'className':_0x4f9359(0x5ce),'options':_0x1ac771,'value':_0x30eadc,'onChange':_0x4fa0f3=>{_0x382ea3(_0x36e58b(_0x4fa0f3,0x0)),_0x203688(_0x4fa0f3),_0x185b53(_0x4fa0f3);}}),(0x0,_0x282aef[_0x4f9359(0x5bf)])('div',{'className':_0x4f9359(0x5df),'children':_0x572302['t'](_0x4f9359(0x40d))})]})]});},_0xf984f4=({unitId:_0x19ee8c,subUnitId:_0x1c5c7a,pivotTableId:_0xfe14e,tableFieldId:_0x9390c0,originPattern:_0x248297,tableFieldInfo:_0x32b5d6,dataFieldInfo:_0x33bd9d})=>{const _0x17921c=_0x34037b;let _0x1988b5=(0x0,_0x2ef21f[_0x17921c(0x1a2)])(_0x1ed97c[_0x17921c(0x4ad)]),_0x2071ed=(0x0,_0x2ef21f[_0x17921c(0x1a2)])(_0x2ef21f[_0x17921c(0x2e3)]),_0x56f5c5=_0x1988b5[_0x17921c(0x412)](),_0xb81105=(0x0,_0x2b3aa2[_0x17921c(0x6c9)])(()=>[{'label':_0x17921c(0x4e5),'component':_0x32d3ff,'key':_0x17921c(0x559)},{'label':_0x17921c(0x4bc),'component':_0x6de781,'key':_0x17921c(0x6cc)},{'label':_0x17921c(0x4ed),'component':_0x1fe9cd,'key':_0x17921c(0x590)},{'label':_0x17921c(0x311),'component':_0x5a5f0a,'key':_0x17921c(0x130)},{'label':_0x17921c(0x5ed),'component':_0x5c8ed4,'key':_0x17921c(0x48a)}][_0x17921c(0x23e)](_0x2e96ca=>({..._0x2e96ca,'label':_0x1988b5['t'](_0x2e96ca[_0x17921c(0x5b6)])})),[_0x1988b5]),_0x29f89e=_0xb81105[_0x17921c(0x23e)](_0x411c7b=>({'label':_0x411c7b[_0x17921c(0x5b6)],'value':_0x411c7b['key']})),[_0x278cf0,_0x17b78f]=(0x0,_0x2b3aa2['useState'])(()=>[_0x464cc7,_0x30997e,_0x5d0aa9,_0x409d73,_0x23f8f0]['reduce']((_0x4a7f27,_0xbe7339,_0x31bda1)=>_0x4a7f27||(_0xbe7339(_0x248297??'')?_0xb81105[_0x31bda1]['key']:''),'')||_0xb81105[0x0][_0x17921c(0x299)]),[_0x4bf0a8,_0x266f60]=(0x0,_0x2b3aa2[_0x17921c(0x189)])(_0x248297),_0x58a09a=_0xa0a605=>_0x266f60(_0xa0a605),_0x5d4e57=_0x5d140e=>{_0x17b78f(_0x5d140e);},_0x31edf4=_0x59ef45=>({'id':_0x178877,'title':{'title':_0x1988b5['t']('sheets-pivot-ui.fieldSettings')},'draggable':!0x0,'mask':!0x1,'maskClosable':!0x1,'width':0x190,'children':{'label':_0xce0285,'tableFieldId':_0x9390c0,'pivotTableId':_0xfe14e,'unitId':_0x19ee8c,'subUnitId':_0x1c5c7a,'tableFieldInfo':_0x32b5d6,'dataFieldInfo':_0x33bd9d,'key':_0x17921c(0x26d)+(_0x9390c0||''),'closeFn':()=>{_0x2071ed['close'](_0x178877);},'format':_0x59ef45?_0x4bf0a8:''},'onClose':()=>{const _0x488fae=_0x17921c;_0x2071ed[_0x488fae(0x6a2)](_0x178877);}}),_0x5e6b6b=()=>{const _0x5b919b=_0x17921c;_0x2071ed['close'](_0x4442ad);let _0xdbbab3=_0x31edf4(!0x1);_0x2071ed[_0x5b919b(0x245)](_0xdbbab3);};return(0x0,_0x282aef['jsxs'])(_0x17921c(0x259),{'dir':_0x56f5c5,'children':[(0x0,_0x282aef['jsx'])(_0x17921c(0x259),{'className':_0x17921c(0x190),'children':(0x0,_0x282aef['jsxs'])(_0x17921c(0x259),{'className':_0x17921c(0x3e3),'onClick':_0x5e6b6b,'children':[(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x3a1947,{}),_0x1988b5['t'](_0x17921c(0x29a))]})}),(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x17921c(0x259),{'className':'univer-mb-2\x20univer-h-5\x20univer-text-sm\x20univer-font-medium\x20univer-leading-5','children':_0x1988b5['t'](_0x17921c(0x361))}),(0x0,_0x282aef['jsx'])(_0x17921c(0x259),{'children':(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x3fc00c[_0x17921c(0x51b)],{'className':'univer-w-full','value':_0x278cf0,'options':_0x29f89e,'onChange':_0x3e14fe=>_0x5d4e57(_0x3e14fe)})}),(0x0,_0x282aef[_0x17921c(0x567)])(_0x17921c(0x259),{'children':[_0x278cf0===_0x17921c(0x559)&&(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x32d3ff,{'originPattern':_0x248297,'handlePatternChange':_0x58a09a}),_0x278cf0===_0x17921c(0x6cc)&&(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x6de781,{'originPattern':_0x248297,'handlePatternChange':_0x58a09a}),_0x278cf0===_0x17921c(0x590)&&(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x1fe9cd,{'originPattern':_0x248297,'handlePatternChange':_0x58a09a}),_0x278cf0==='sheet.numfmt.date'&&(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x5a5f0a,{'originPattern':_0x248297,'handlePatternChange':_0x58a09a}),_0x278cf0===_0x17921c(0x48a)&&(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x5c8ed4,{'originPattern':_0x248297,'handlePatternChange':_0x58a09a})]}),(0x0,_0x282aef[_0x17921c(0x567)])(_0x3fc00c['ActionRow'],{'className':_0x17921c(0x237),'children':[(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x3fc00c[_0x17921c(0x2f8)],{'onClick':_0x5e6b6b,'children':_0x1988b5['t'](_0x17921c(0x2c2))}),(0x0,_0x282aef[_0x17921c(0x5bf)])(_0x3fc00c[_0x17921c(0x2f8)],{'className':'univer-ml-3\x20rtl:univer-ml-0\x20rtl:univer-mr-3','variant':_0x17921c(0x326),'onClick':()=>{const _0x588d45=_0x17921c;_0x2071ed[_0x588d45(0x6a2)](_0x4442ad);let _0x4da038=_0x31edf4(!0x0);_0x2071ed[_0x588d45(0x245)](_0x4da038);},'children':_0x1988b5['t'](_0x17921c(0x397))})]})]});};function _0x4ceac8(_0x3e576b){const _0x2150fa=_0x34037b;var _0x5c74bb,_0x7a2fda;let {scope:_0x5537aa,report:_0x16c3f5,getCurrentReport:_0x2ed0f9,onChange:_0xe3076c}=_0x3e576b,_0x1c55ce=(0x0,_0x2ef21f[_0x2150fa(0x1a2)])(_0x1ed97c[_0x2150fa(0x4ad)]),_0x3fd88e=(0x0,_0x2ef21f[_0x2150fa(0x1a2)])(_0x1ed97c[_0x2150fa(0x172)]),_0x1da883=(0x0,_0x2ef21f[_0x2150fa(0x1a2)])(_0x5ec675[_0x2150fa(0x507)]),_0x18575c=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x2150fa(0x27c)]),_0x81c2=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x2150fa(0x2b4)]);(0x0,_0x2ef21f[_0x2150fa(0x22f)])(_0x18575c[_0x2150fa(0x369)]);let [_0x4082c5,_0x599d8e]=(0x0,_0x2b3aa2[_0x2150fa(0x189)])(!0x1),_0x398a4d=(0x0,_0x2b3aa2['useRef'])(!0x1),_0xb5d970=(0x0,_0x2b3aa2[_0x2150fa(0x260)])(!0x0),_0x435179=JSON[_0x2150fa(0x5d7)](_0x5537aa),_0x3dcc80=(0x0,_0x2b3aa2['useRef'])(_0x435179);_0x3dcc80['current']=_0x435179,(0x0,_0x2b3aa2[_0x2150fa(0x39c)])(()=>(_0xb5d970[_0x2150fa(0x56b)]=!0x0,()=>{const _0x334ae2=_0x2150fa;_0xb5d970[_0x334ae2(0x56b)]=!0x1;}),[]);let _0x29e2f6=_0x4082c5||!_0x16c3f5||((_0x5c74bb=_0x18575c[_0x2150fa(0x1c4)](new _0x44d557[(_0x2150fa(0x1d0))](_0x5537aa[_0x2150fa(0x6bb)])['id']))==null?void 0x0:_0x5c74bb[_0x2150fa(0x66f)])===!0x1||((_0x7a2fda=_0x18575c['getPermissionPoint'](new _0x44d557['WorksheetFilterPermission'](_0x5537aa[_0x2150fa(0x6bb)],_0x5537aa[_0x2150fa(0x42b)])['id']))==null?void 0x0:_0x7a2fda['value'])===!0x1,_0x2bd3ee=async _0x24fe4a=>{const _0x119f41=_0x2150fa;if(_0x398a4d[_0x119f41(0x56b)]||_0x29e2f6||!_0x16c3f5||_0x16c3f5[_0x119f41(0x50a)][_0x119f41(0x155)]===_0x24fe4a)return;_0x398a4d[_0x119f41(0x56b)]=!0x0,_0x599d8e(!0x0);let _0x574e53=_0x1ed97c['Tools'][_0x119f41(0x6db)](_0x16c3f5);try{if(!_0x24fe4a&&(0x0,_0x55c699[_0x119f41(0x51f)])(_0x16c3f5)){let _0x518890=await _0x1da883[_0x119f41(0x5e7)][_0x119f41(0x3ac)](_0x5ec675[_0x119f41(0x201)])({'redos':[],'undos':[],'groups':[],'validate':()=>void 0x0},_0x5537aa);if(!_0xb5d970['current']||_0x3dcc80['current']!==_0x435179||!await _0x3fd88e[_0x119f41(0x5bc)]({'id':'sheet-pivot.confirm.disable-multiple-filters','title':{'title':_0x1c55ce['t'](_0x119f41(0x27b))},'children':{'title':_0x1c55ce['t'](_0x119f41(0x18d))},'cancelText':_0x1c55ce['t'](_0x119f41(0x643)),'confirmText':_0x1c55ce['t']('sheets-pivot-ui.dialog.ok')}))return;_0x518890==null||_0x518890[_0x119f41(0x39d)]();}if(!_0xb5d970['current']||_0x3dcc80[_0x119f41(0x56b)]!==_0x435179||!_0x1ed97c['Tools']['diffValue'](_0x574e53,_0x2ed0f9()))return;await _0xe3076c(_0x24fe4a);}catch(_0x248c7e){_0x81c2['error'](_0x119f41(0x645),_0x248c7e);}finally{_0x398a4d['current']=!0x1,_0xb5d970['current']&&_0x599d8e(!0x1);}};return(0x0,_0x282aef['jsxs'])(_0x2150fa(0x26f),{'className':_0x2150fa(0x2fc),'children':[(0x0,_0x282aef[_0x2150fa(0x5bf)])(_0x2150fa(0x259),{'className':_0x2150fa(0x14b),'children':_0x1c55ce['t'](_0x2150fa(0x4d5))}),(0x0,_0x282aef['jsxs'])(_0x2150fa(0x5b6),{'className':_0x2150fa(0x1ed),'children':[(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x2150fa(0x6b3)],{'checked':(_0x16c3f5==null?void 0x0:_0x16c3f5[_0x2150fa(0x50a)][_0x2150fa(0x155)])===!0x0,'disabled':_0x29e2f6,'onChange':_0xfa6863=>_0x2bd3ee(!!_0xfa6863)}),(0x0,_0x282aef[_0x2150fa(0x5bf)])(_0x2150fa(0x581),{'children':_0x1c55ce['t'](_0x2150fa(0x12b))})]})]});}let _0x2f704e=[{'label':_0x34037b(0x566),'value':'false'},{'label':_0x34037b(0x1ec),'value':_0x34037b(0x6d0)}],_0x1c1d11=[{'label':_0x34037b(0x37c),'value':String(_0x55c699[_0x34037b(0x577)][_0x34037b(0x699)])},{'label':_0x34037b(0x404),'value':String(_0x55c699[_0x34037b(0x577)][_0x34037b(0x3fb)])},{'label':_0x34037b(0x32f),'value':String(_0x55c699[_0x34037b(0x577)][_0x34037b(0x15d)])}],_0x273908=[{'label':_0x34037b(0x6e2),'value':String(_0x55c699['PivotSubtotalPositionEnum']['top'])},{'label':_0x34037b(0x1f5),'value':String(_0x55c699[_0x34037b(0x4be)][_0x34037b(0x2e0)])}],_0x532386=[{'label':'sheets-pivot-ui.config.dateGroupingLegacy','value':_0x55c699['PivotDateGroupingMode']['Legacy']},{'label':_0x34037b(0x5d9),'value':_0x55c699['PivotDateGroupingMode'][_0x34037b(0x178)]}];function _0x4ac091(_0x2772f1){const _0x4b2dec=_0x34037b;let {unitId:_0x16e60c,subUnitId:_0x59d711,pivotTableId:_0x130e2c}=_0x2772f1,_0x243a3f=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x4b2dec(0x4ab)]),_0x470589=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x4b2dec(0x172)]),_0x5549db=(0x0,_0x2ef21f[_0x4b2dec(0x1a2)])(_0x1ed97c[_0x4b2dec(0x2b4)]),_0x577e7a=(0x0,_0x2ef21f[_0x4b2dec(0x1a2)])(_0x1ed97c[_0x4b2dec(0x4ad)]),_0x32727d=(0x0,_0x2ef21f['useDependency'])(_0x5ec675['SheetsPivotTableConfigModel']),_0x5218dd=(0x0,_0x2b3aa2[_0x4b2dec(0x6c9)])(()=>_0x32727d['watchPivotTableChanges'](_0x16e60c,_0x59d711,_0x130e2c)[_0x4b2dec(0x1dd)]((0x0,_0x3ae495[_0x4b2dec(0x36b)])(0x0)),[_0x32727d,_0x16e60c,_0x59d711,_0x130e2c]);(0x0,_0x2ef21f[_0x4b2dec(0x22f)])(_0x5218dd);let [_0x5b88dc,_0x5a33d5]=(0x0,_0x2b3aa2[_0x4b2dec(0x189)])(!0x1),_0x2b1e68=(0x0,_0x2b3aa2[_0x4b2dec(0x260)])(!0x1),_0x218c79=_0x32727d['getPivotTableConfig'](_0x16e60c,_0x59d711,_0x130e2c),_0x3d325e=(0x0,_0x55c699[_0x4b2dec(0x1a6)])(_0x218c79==null?void 0x0:_0x218c79['fieldsConfig']['options']),[_0x4d371e,_0x110f5d]=(0x0,_0x2b3aa2['useState'])(()=>{const _0x4bf48f=_0x4b2dec;var _0x2f2594,_0x2bf187;let _0x34a1d5=_0x32727d['getPivotTableConfig'](_0x16e60c,_0x59d711,_0x130e2c),_0xbf08d4=(_0x34a1d5==null||(_0x2f2594=_0x34a1d5[_0x4bf48f(0x5cb)])==null?void 0x0:_0x2f2594[_0x4bf48f(0x50a)])??{};return{'showRowSubtotal':_0xbf08d4[_0x4bf48f(0x4ea)]??!0x0,'showRowGrandTotal':_0xbf08d4['showRowGrandTotal']??!0x0,'showColSubtotal':_0xbf08d4[_0x4bf48f(0x5d3)]??!0x0,'showColGrandTotal':_0xbf08d4['showColGrandTotal']??!0x0,'pageWrap':_0xbf08d4[_0x4bf48f(0x375)]??0x1,'pageOverThenDown':_0xbf08d4['pageOverThenDown']??!0x1,'repeatRowLabels':_0xbf08d4[_0x4bf48f(0x214)]??!0x1,'repeatColLabels':_0xbf08d4[_0x4bf48f(0x594)]??!0x1,'layout':(_0x34a1d5==null||(_0x2bf187=_0x34a1d5['fieldsConfig'])==null?void 0x0:_0x2bf187[_0x4bf48f(0x550)])??_0x55c699[_0x4bf48f(0x577)]['tabular'],'rowSubtotalPosition':_0xbf08d4[_0x4bf48f(0x6ac)]??_0x55c699[_0x4bf48f(0x4be)][_0x4bf48f(0x199)]};}),_0x451e19=_0x2cf4ee=>{const _0x23bb6f=_0x4b2dec;let _0x574cc0={'unitId':_0x16e60c,'subUnitId':_0x59d711,'pivotTableId':_0x130e2c,'options':_0x2cf4ee};_0x243a3f[_0x23bb6f(0x1cd)](_0x5ec675[_0x23bb6f(0x284)]['id'],_0x574cc0)['catch'](_0x25a99b=>_0x5549db[_0x23bb6f(0x46a)](_0x23bb6f(0x517),_0x25a99b)),_0x110f5d(_0x4bde85=>({..._0x4bde85,..._0x2cf4ee}));},_0x4ec26e=_0x377d3e=>{const _0x4578fb=_0x4b2dec;let _0x3a8a83={'unitId':_0x16e60c,'subUnitId':_0x59d711,'pivotTableId':_0x130e2c,'layout':_0x377d3e};_0x243a3f[_0x4578fb(0x1cd)](_0x5ec675[_0x4578fb(0x4c6)]['id'],_0x3a8a83)[_0x4578fb(0x1d4)](_0x147ca2=>_0x5549db[_0x4578fb(0x46a)]('[PivotConfigPanel]',_0x147ca2)),_0x110f5d(_0xc0e073=>({..._0xc0e073,'layout':_0x377d3e}));},_0x14f56f=async _0x5ab2b0=>{const _0x5b781e=_0x4b2dec;if(!(_0x2b1e68[_0x5b781e(0x56b)]||_0x5ab2b0===_0x3d325e)){_0x2b1e68[_0x5b781e(0x56b)]=!0x0,_0x5a33d5(!0x0);try{let _0x28fbc9=_0x32727d['getPivotTableConfig'](_0x16e60c,_0x59d711,_0x130e2c),_0x255590=_0x32727d[_0x5b781e(0x5c2)](_0x16e60c,_0x130e2c);if(!_0x28fbc9||!_0x255590||(Object[_0x5b781e(0x253)](_0x255590[_0x5b781e(0x3b1)])[_0x5b781e(0x370)](_0x55c699[_0x5b781e(0x69d)])||_0x255590[_0x5b781e(0x1db)][_0x5b781e(0x370)](_0x55c699['isDateGroupFieldJSON']))&&!await _0x470589['confirm']({'id':_0x5b781e(0x30c),'title':{'title':_0x577e7a['t'](_0x5b781e(0x4eb))},'children':{'title':_0x577e7a['t'](_0x5b781e(0x6d4))},'cancelText':_0x577e7a['t'](_0x5b781e(0x643)),'confirmText':_0x577e7a['t']('sheets-pivot-ui.dialog.ok')})||_0x32727d[_0x5b781e(0x399)](_0x16e60c,_0x59d711,_0x130e2c)!==_0x28fbc9||_0x32727d['getCollection'](_0x16e60c,_0x130e2c)!==_0x255590||(0x0,_0x55c699['getPivotDateGroupingMode'])(_0x28fbc9[_0x5b781e(0x5cb)][_0x5b781e(0x50a)])===_0x5ab2b0)return;await _0x243a3f['executeCommand'](_0x5ec675[_0x5b781e(0x284)]['id'],{'unitId':_0x16e60c,'subUnitId':_0x59d711,'pivotTableId':_0x130e2c,'options':{'dateGroupingMode':_0x5ab2b0}});}catch(_0x3db736){_0x5549db[_0x5b781e(0x46a)](_0x5b781e(0x517),_0x3db736);}finally{_0x2b1e68[_0x5b781e(0x56b)]=!0x1,_0x5a33d5(!0x1);}}};return(0x0,_0x282aef[_0x4b2dec(0x567)])('div',{'className':_0x4b2dec(0x1f8),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x4ceac8,{'scope':{'unitId':_0x16e60c,'subUnitId':_0x59d711,'pivotTableId':_0x130e2c},'report':_0x218c79==null?void 0x0:_0x218c79[_0x4b2dec(0x5cb)],'getCurrentReport':()=>{const _0x44ab2a=_0x4b2dec;var _0x3cabf7;return(_0x3cabf7=_0x32727d[_0x44ab2a(0x399)](_0x16e60c,_0x59d711,_0x130e2c))==null?void 0x0:_0x3cabf7[_0x44ab2a(0x5cb)];},'onChange':_0xde11a4=>_0x243a3f[_0x4b2dec(0x1cd)](_0x5ec675[_0x4b2dec(0x284)]['id'],{'unitId':_0x16e60c,'subUnitId':_0x59d711,'pivotTableId':_0x130e2c,'options':{'allowMultipleFilters':_0xde11a4}})}),(0x0,_0x282aef[_0x4b2dec(0x567)])(_0x4b2dec(0x26f),{'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x210),'children':_0x577e7a['t'](_0x4b2dec(0x63b))}),(0x0,_0x282aef['jsxs'])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x38d),'children':[(0x0,_0x282aef[_0x4b2dec(0x567)])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x664),'children':[(0x0,_0x282aef['jsx'])(_0x4b2dec(0x581),{'className':_0x4b2dec(0x662),'children':_0x577e7a['t'](_0x4b2dec(0x433))}),(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x51b)],{'className':_0x4b2dec(0x5ff),'value':_0x3d325e,'options':_0x532386[_0x4b2dec(0x23e)](_0x2f3fb1=>({..._0x2f3fb1,'label':_0x577e7a['t'](_0x2f3fb1[_0x4b2dec(0x5b6)])})),'disabled':_0x5b88dc,'onChange':_0xf40100=>_0x14f56f(_0xf40100)})]}),(0x0,_0x282aef['jsxs'])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x664),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])('span',{'className':_0x4b2dec(0x662),'children':_0x577e7a['t']('sheets-pivot-ui.config.layout')}),(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x51b)],{'className':'univer-w-36','value':String(_0x4d371e[_0x4b2dec(0x550)]),'options':_0x1c1d11[_0x4b2dec(0x23e)](_0x36e0da=>({..._0x36e0da,'label':_0x577e7a['t'](_0x36e0da[_0x4b2dec(0x5b6)])})),'onChange':_0x1acc49=>_0x4ec26e(Number(_0x1acc49))})]}),(0x0,_0x282aef[_0x4b2dec(0x567)])('label',{'className':_0x4b2dec(0x650),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x6b3)],{'checked':_0x4d371e[_0x4b2dec(0x214)],'disabled':_0x4d371e[_0x4b2dec(0x550)]===_0x55c699[_0x4b2dec(0x577)][_0x4b2dec(0x3fb)],'onChange':_0x443303=>_0x451e19({'repeatRowLabels':!!_0x443303})}),_0x577e7a['t']('sheets-pivot-ui.config.repeatRowLabels')]}),(0x0,_0x282aef[_0x4b2dec(0x567)])(_0x4b2dec(0x5b6),{'className':_0x4b2dec(0x650),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c['Checkbox'],{'checked':_0x4d371e['repeatColLabels'],'onChange':_0x214010=>_0x451e19({'repeatColLabels':!!_0x214010})}),_0x577e7a['t'](_0x4b2dec(0x4f0))]})]})]}),(0x0,_0x282aef[_0x4b2dec(0x567)])(_0x4b2dec(0x26f),{'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x4b2dec(0x259),{'className':(0x0,_0x3fc00c[_0x4b2dec(0x4e2)])(_0x4b2dec(0x210)),'children':_0x577e7a['t'](_0x4b2dec(0x3de))}),(0x0,_0x282aef[_0x4b2dec(0x567)])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x38d),'children':[(0x0,_0x282aef['jsxs'])('label',{'className':_0x4b2dec(0x650),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x6b3)],{'checked':_0x4d371e['showRowSubtotal'],'onChange':_0x5be299=>_0x451e19({'showRowSubtotal':!!_0x5be299})}),_0x577e7a['t']('sheets-pivot-ui.config.showRowSubtotal')]}),_0x4d371e[_0x4b2dec(0x550)]===_0x55c699[_0x4b2dec(0x577)][_0x4b2dec(0x15d)]&&(0x0,_0x282aef['jsxs'])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x664),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x4b2dec(0x581),{'className':_0x4b2dec(0x662),'children':_0x577e7a['t'](_0x4b2dec(0x388))}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x4b2dec(0x51b)],{'className':_0x4b2dec(0x5ff),'value':String(_0x4d371e['rowSubtotalPosition']),'options':_0x273908[_0x4b2dec(0x23e)](_0x4f1fb8=>({..._0x4f1fb8,'label':_0x577e7a['t'](_0x4f1fb8[_0x4b2dec(0x5b6)])})),'onChange':_0x1538f8=>_0x451e19({'rowSubtotalPosition':Number(_0x1538f8)})})]}),(0x0,_0x282aef[_0x4b2dec(0x567)])('label',{'className':_0x4b2dec(0x650),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c['Checkbox'],{'checked':_0x4d371e[_0x4b2dec(0x3cc)],'onChange':_0x30aa7a=>_0x451e19({'showRowGrandTotal':!!_0x30aa7a})}),_0x577e7a['t'](_0x4b2dec(0x56e))]}),(0x0,_0x282aef[_0x4b2dec(0x567)])(_0x4b2dec(0x5b6),{'className':'univer-flex\x20univer-cursor-pointer\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-text-gray-600','children':[(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x4b2dec(0x6b3)],{'checked':_0x4d371e['showColSubtotal'],'onChange':_0x16c30c=>_0x451e19({'showColSubtotal':!!_0x16c30c})}),_0x577e7a['t'](_0x4b2dec(0x6b0))]}),(0x0,_0x282aef['jsxs'])('label',{'className':_0x4b2dec(0x650),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x6b3)],{'checked':_0x4d371e['showColGrandTotal'],'onChange':_0x4324cc=>_0x451e19({'showColGrandTotal':!!_0x4324cc})}),_0x577e7a['t']('sheets-pivot-ui.config.showColGrandTotal')]})]})]}),(0x0,_0x282aef['jsxs'])('section',{'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])('div',{'className':_0x4b2dec(0x210),'children':_0x577e7a['t'](_0x4b2dec(0x145))}),(0x0,_0x282aef[_0x4b2dec(0x567)])('div',{'className':'univer-flex\x20univer-flex-col\x20univer-gap-3','children':[(0x0,_0x282aef['jsxs'])(_0x4b2dec(0x259),{'className':_0x4b2dec(0x664),'children':[(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x4b2dec(0x581),{'className':_0x4b2dec(0x662),'children':_0x577e7a['t'](_0x4b2dec(0x53b))}),(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x393)],{'className':'univer-w-24','value':_0x4d371e[_0x4b2dec(0x375)],'min':0x1,'max':0x14,'onChange':_0x139b45=>{let _0x1d2d2d=Number(_0x139b45);Number['isFinite'](_0x1d2d2d)&&_0x1d2d2d>=0x1&&_0x451e19({'pageWrap':_0x1d2d2d});}})]}),(0x0,_0x282aef['jsx'])('p',{'className':'univer-text-xs\x20univer-text-gray-600','children':_0x577e7a['t'](_0x4d371e[_0x4b2dec(0x3f0)]?'sheets-pivot-ui.config.pageWrapOverThenDownHelp':_0x4b2dec(0x569))}),(0x0,_0x282aef[_0x4b2dec(0x567)])('div',{'className':'univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-gap-2','children':[(0x0,_0x282aef['jsx'])(_0x4b2dec(0x581),{'className':'univer-text-sm\x20univer-text-gray-600','children':_0x577e7a['t']('sheets-pivot-ui.config.pageDirection')}),(0x0,_0x282aef[_0x4b2dec(0x5bf)])(_0x3fc00c[_0x4b2dec(0x51b)],{'className':_0x4b2dec(0x5ff),'value':String(_0x4d371e['pageOverThenDown']),'options':_0x2f704e[_0x4b2dec(0x23e)](_0xca560d=>({..._0xca560d,'label':_0x577e7a['t'](_0xca560d['label'])})),'onChange':_0x409438=>_0x451e19({'pageOverThenDown':_0x409438===_0x4b2dec(0x6d0)})})]})]})]})]});}let _0x30e6e3=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x498817,_0x12c6a3,_0x40b4ec,_0x2d202c,_0x344b10,_0x1b4ca4,_0x3437ad,_0x327bcd){const _0xd9d848=_0x34037b;super(),this[_0xd9d848(0x3ea)]=_0x498817,this[_0xd9d848(0x52a)]=_0x12c6a3,this[_0xd9d848(0x3c6)]=_0x40b4ec,this[_0xd9d848(0x170)]=_0x2d202c,this[_0xd9d848(0x329)]=_0x344b10,this[_0xd9d848(0x1a8)]=_0x1b4ca4,this[_0xd9d848(0x51c)]=_0x3437ad,this[_0xd9d848(0x5ef)]=_0x327bcd,_0x27eded(this,_0xd9d848(0x658),void 0x0),_0x27eded(this,_0xd9d848(0x502),new _0x3ae495[(_0xd9d848(0x193))]()),_0x27eded(this,_0xd9d848(0x407),this[_0xd9d848(0x502)][_0xd9d848(0x275)]()),_0x27eded(this,'_isRangeSelectorFocus',!0x1),_0x27eded(this,_0xd9d848(0x34f),!0x1),this[_0xd9d848(0x137)](),this['_initSheetChange']();}['setIsRangeSelectorFocus'](_0x54db62){const _0x4bebbc=_0x34037b;this[_0x4bebbc(0x366)]=_0x54db62;}[_0x34037b(0x587)](_0x420c27){const _0x249e18=_0x34037b;this[_0x249e18(0x34f)]=_0x420c27;}[_0x34037b(0x58e)](_0xa4d592){const _0xf85b31=_0x34037b;this[_0xf85b31(0x658)]=_0xa4d592;}[_0x34037b(0x6bc)](){const _0x164c19=_0x34037b;this[_0x164c19(0x366)]||this[_0x164c19(0x34f)]||(this['_setPivotTableId'](void 0x0),this[_0x164c19(0x329)][_0x164c19(0x6a2)](_0x414c39));}[_0x34037b(0x137)](){const _0x165929=_0x34037b;let _0x54f163=this[_0x165929(0x52a)][_0x165929(0x395)](_0x1ed97c[_0x165929(0x3f9)][_0x165929(0x2a8)]);if(_0x54f163){let _0x125852=_0x54f163[_0x165929(0x2d4)];this['disposeWithMe']((0x0,_0x3ae495[_0x165929(0x39b)])(_0x125852,this[_0x165929(0x3ea)][_0x165929(0x38a)])[_0x165929(0x659)](()=>{const _0x493bbf=_0x165929;let _0x557392=this[_0x493bbf(0x3ea)]['getCurrentSelections']();if(!_0x557392)return;let _0xb04cde=_0x557392[_0x557392[_0x493bbf(0x3d7)]-0x1];if(!_0xb04cde)return;let _0x405478=_0xb04cde[_0x493bbf(0x326)];if(!_0x405478)return;let _0x3eab4f=this['_univerInstanceService']['getCurrentUnitOfType'](_0x1ed97c[_0x493bbf(0x3f9)][_0x493bbf(0x2a8)]),_0x430994=_0x3eab4f==null?void 0x0:_0x3eab4f[_0x493bbf(0x5fa)]();if(!_0x3eab4f||!_0x430994)return;let _0x25b13a=_0x3eab4f[_0x493bbf(0x44c)](),_0x120e52=_0x430994[_0x493bbf(0x42f)](),_0x3539ec=this[_0x493bbf(0x3c6)]['getPivotTableIdByCell'](_0x25b13a,_0x120e52,_0x405478['startRow'],_0x405478[_0x493bbf(0x564)]);if(_0x3539ec){var _0x2f5ae4,_0x5b85d8;let _0x5132f9=(_0x2f5ae4=this[_0x493bbf(0x3c6)]['getPivotItemRenderInfoCache'](_0x25b13a,_0x120e52,_0x3539ec))==null?void 0x0:_0x2f5ae4[_0x493bbf(0x314)],_0xa5d14=(0x0,_0x5ec675['unionPivotViewRange'])(_0x5132f9),_0x36d0aa=(0x0,_0x44d557[_0x493bbf(0x618)])(this[_0x493bbf(0x51c)],_0x25b13a,_0x120e52,_0xa5d14),_0xa45a35=(_0x5b85d8=this[_0x493bbf(0x5ef)][_0x493bbf(0x1c4)](new _0x44d557[(_0x493bbf(0x64c))](_0x25b13a,_0x120e52)['id']))==null?void 0x0:_0x5b85d8[_0x493bbf(0x66f)];if(!_0x36d0aa||!_0xa45a35)return;this[_0x493bbf(0x58e)](_0x3539ec),this[_0x493bbf(0x502)]['next'](!0x0),this[_0x493bbf(0x170)]['executeCommand'](_0x5f33e8['id'],{'pivotTableId':_0x3539ec});}else this[_0x493bbf(0x6bc)]();})),this[_0x165929(0x2a7)](this['_commandService'][_0x165929(0x50d)](_0x4c089f=>{const _0xf1660=_0x165929;_0x4c089f['id']===_0x5ec675[_0xf1660(0x6c4)]['id']&&_0x4c089f['params'][_0xf1660(0x3bb)]===this[_0xf1660(0x658)]&&this['_sidebarService'][_0xf1660(0x6a2)](_0x414c39);}));}}['_initSheetChange'](){const _0x4f7d70=_0x34037b;let _0x180f61=this['_univerInstanceService'][_0x4f7d70(0x395)](_0x1ed97c[_0x4f7d70(0x3f9)]['UNIVER_SHEET']);_0x180f61&&this[_0x4f7d70(0x2a7)](_0x180f61[_0x4f7d70(0x4de)][_0x4f7d70(0x659)](()=>{this['_sidebarService']['close']();})),this[_0x4f7d70(0x2a7)](this[_0x4f7d70(0x329)][_0x4f7d70(0x187)][_0x4f7d70(0x659)](_0x20d4b5=>{const _0x5c3f27=_0x4f7d70;if(_0x20d4b5['id']===_0x5c3f27(0x349)){let _0x53ce96=!!_0x20d4b5[_0x5c3f27(0x173)];this[_0x5c3f27(0x502)][_0x5c3f27(0x2bb)](_0x53ce96),_0x53ce96||this['_dialogService'][_0x5c3f27(0x6a2)](_0x178877);}})),this[_0x4f7d70(0x2a7)](this[_0x4f7d70(0x1a8)][_0x4f7d70(0x623)]()['subscribe'](_0x1615c8=>{const _0x244a85=_0x4f7d70;let _0xd7a65d=_0x1615c8[_0x244a85(0x242)](_0x2fd5e3=>_0x2fd5e3['id']===_0x34436c);_0xd7a65d&&_0xd7a65d[_0x244a85(0x245)]===!0x1&&this[_0x244a85(0x1a8)][_0x244a85(0x6a2)](_0x34436c);}));}};_0x30e6e3=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557[_0x34037b(0x198)])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c['IUniverInstanceService'])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675['SheetsPivotTableAdaptorModel'])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ab)])),_0x5e4599(0x4,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f[_0x34037b(0x3b3)])),_0x5e4599(0x5,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f[_0x34037b(0x2e3)])),_0x5e4599(0x6,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x7,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x27c)]))],_0x30e6e3);let _0x9d9c2b=(0x0,_0x2b3aa2[_0x34037b(0x330)])(null),_0x42311c=(0x0,_0x2b3aa2['createContext'])(null);function _0x4f76af(_0x193fea,_0x3802a7){const _0x307017=_0x34037b;return _0x193fea===_0x3802a7?!0x0:!_0x193fea||!_0x3802a7?!0x1:_0x193fea[_0x307017(0x55e)]===_0x3802a7['droppableId']&&_0x193fea[_0x307017(0x2bc)]===_0x3802a7['index'];}function _0x1e7712(_0x4442df){const _0x446178=_0x34037b;if(!(_0x4442df instanceof Element))return null;let _0x3d2070=_0x4442df[_0x446178(0x6a3)](_0x446178(0x4a8));return _0x3d2070 instanceof HTMLElement?_0x3d2070:null;}function _0x302c48(_0x4f7808,_0x2c8014,_0x5afeab,_0x43e4c8){const _0x4d9463=_0x34037b;let _0x212869=Array[_0x4d9463(0x633)](_0x4f7808[_0x4d9463(0x54d)]('[data-univer-dnd-item=\x22true\x22]'))[_0x4d9463(0x154)](_0x1dd309=>{const _0x3cbafc=_0x4d9463;let _0x4b7e90=_0x1dd309[_0x3cbafc(0x43c)]['univerDndId'];return _0x4b7e90?_0x4b7e90!==_0x5afeab[_0x3cbafc(0x202)]||_0x5afeab[_0x3cbafc(0x2ec)][_0x3cbafc(0x55e)]!==_0x43e4c8:!0x1;});if(!_0x212869['length'])return 0x0;for(let _0x549f19=0x0;_0x549f19<_0x212869[_0x4d9463(0x3d7)]-0x1;_0x549f19++){let _0x4feac8=_0x212869[_0x549f19][_0x4d9463(0x489)]();if(_0x2c8014<_0x4feac8['top']+_0x4feac8[_0x4d9463(0x4da)]/0x2)return _0x549f19;}let _0x501649=_0x212869['length']-0x1,_0x551b9f=_0x212869[_0x501649][_0x4d9463(0x489)]();return _0x2c8014<_0x551b9f[_0x4d9463(0x199)]+_0x551b9f['height']*0.35?_0x501649:_0x212869['length'];}function _0x14a783(){const _0x34081d=_0x34037b;let _0x5eba5f=(0x0,_0x2b3aa2[_0x34081d(0x278)])(_0x9d9c2b);if(!_0x5eba5f)throw Error(_0x34081d(0x149));return _0x5eba5f;}function _0x8277c9(_0x583851){const _0x1c2617=_0x34037b;let {children:_0x55649a,onDragEnd:_0xa07685,onDragStart:_0x4c47b2,onDragUpdate:_0xb3dc9f}=_0x583851,[_0x19f7d2,_0x1e484a]=(0x0,_0x2b3aa2[_0x1c2617(0x189)])(null),_0x46e0a4=(0x0,_0x2b3aa2['useRef'])(null),_0x4965e9=(0x0,_0x2b3aa2['useCallback'])((_0x401fe1,_0x4058)=>{let _0x16c421={'draggableId':_0x401fe1,'source':_0x4058,'destination':null};_0x46e0a4['current']=_0x16c421,_0x1e484a(_0x16c421),_0x4c47b2==null||_0x4c47b2({'draggableId':_0x401fe1,'source':_0x4058}),_0xb3dc9f==null||_0xb3dc9f({'draggableId':_0x401fe1,'source':_0x4058,'destination':null});},[_0x4c47b2,_0xb3dc9f]),_0xa177b4=(0x0,_0x2b3aa2['useCallback'])(_0x178668=>{const _0x290def=_0x1c2617;let _0x821757=_0x46e0a4[_0x290def(0x56b)];if(!_0x821757||_0x4f76af(_0x821757['destination'],_0x178668))return;let _0x41cb93={..._0x821757,'destination':_0x178668};_0x46e0a4[_0x290def(0x56b)]=_0x41cb93,_0x1e484a(_0x41cb93),_0xb3dc9f==null||_0xb3dc9f({'draggableId':_0x41cb93[_0x290def(0x202)],'source':_0x41cb93['source'],'destination':_0x41cb93['destination']});},[_0xb3dc9f]),_0x2594ea=(0x0,_0x2b3aa2[_0x1c2617(0x4a2)])(async(_0x5069ea,_0x461359)=>{const _0x4f19ce=_0x1c2617;let _0x4a732a=_0x46e0a4[_0x4f19ce(0x56b)];_0x4a732a&&(_0x46e0a4[_0x4f19ce(0x56b)]=null,_0x1e484a(null),await(_0xa07685==null?void 0x0:_0xa07685({'draggableId':_0x4a732a[_0x4f19ce(0x202)],'source':_0x4a732a[_0x4f19ce(0x2ec)],'destination':_0x461359===void 0x0?_0x4a732a[_0x4f19ce(0x642)]:_0x461359,'reason':_0x5069ea})));},[_0xa07685]);(0x0,_0x2b3aa2[_0x1c2617(0x39c)])(()=>{const _0x3315b6=_0x1c2617;if(!_0x19f7d2)return;let _0x1393ff=_0x3e8c2f=>{const _0x423d1d=_0x5115;let _0x125472=_0x1e7712(_0x3e8c2f[_0x423d1d(0x342)]);_0x125472&&_0x125472['dataset'][_0x423d1d(0x1e5)]!==_0x423d1d(0x6d0)||_0xa177b4(null);};return window[_0x3315b6(0x5a8)](_0x3315b6(0x35b),_0x1393ff,!0x0),()=>{const _0x3da450=_0x3315b6;window[_0x3da450(0x5a2)]('dragover',_0x1393ff,!0x0);};},[_0x19f7d2,_0xa177b4]);let _0xdc71ee=(0x0,_0x2b3aa2[_0x1c2617(0x6c9)])(()=>({'activeDrag':_0x19f7d2,'startDrag':_0x4965e9,'updateDestination':_0xa177b4,'endDrag':_0x2594ea}),[_0x19f7d2,_0x4965e9,_0xa177b4,_0x2594ea]);return(0x0,_0x282aef[_0x1c2617(0x5bf)])(_0x9d9c2b['Provider'],{'value':_0xdc71ee,'children':_0x55649a});}function _0xbf962e(_0x1a4d4b){const _0x36b11d=_0x34037b;var _0x57b82a;let {children:_0x4538e4,droppableId:_0x4b785d,isDropDisabled:_0x55d9c1=!0x1}=_0x1a4d4b,{activeDrag:_0x1425ef,updateDestination:_0x585bdf,endDrag:_0x25eed0}=_0x14a783(),_0x3451be=(0x0,_0x2b3aa2[_0x36b11d(0x260)])(null),_0x458812={'innerRef':(0x0,_0x2b3aa2['useCallback'])(_0x4fd8f7=>{_0x3451be['current']=_0x4fd8f7;},[]),'droppableProps':{'onDragOver':(0x0,_0x2b3aa2['useCallback'])(_0xd2938c=>{const _0x34749d=_0x36b11d;if(!_0x1425ef||_0x55d9c1||!_0x3451be[_0x34749d(0x56b)])return;_0xd2938c[_0x34749d(0x4cf)]();let _0xcb5870=_0x302c48(_0x3451be['current'],_0xd2938c[_0x34749d(0x300)],_0x1425ef,_0x4b785d);_0x585bdf({'droppableId':_0x4b785d,'index':_0xcb5870});},[_0x1425ef,_0x55d9c1,_0x4b785d,_0x585bdf]),'onDrop':(0x0,_0x2b3aa2[_0x36b11d(0x4a2)])(_0x9ed73c=>{const _0x452bcb=_0x36b11d;var _0x2b0f6b;if(!_0x1425ef||_0x55d9c1||!_0x3451be[_0x452bcb(0x56b)])return;_0x9ed73c['preventDefault']();let _0x19e48a=(((_0x2b0f6b=_0x1425ef['destination'])==null?void 0x0:_0x2b0f6b[_0x452bcb(0x55e)])===_0x4b785d?_0x1425ef['destination']:null)??{'droppableId':_0x4b785d,'index':_0x302c48(_0x3451be[_0x452bcb(0x56b)],_0x9ed73c[_0x452bcb(0x300)],_0x1425ef,_0x4b785d)};return _0x25eed0(_0x452bcb(0x293),_0x19e48a);},[_0x1425ef,_0x25eed0,_0x55d9c1,_0x4b785d]),'data-univer-dnd-droppable-id':_0x4b785d,'data-univer-dnd-drop-disabled':String(_0x55d9c1)},'placeholder':null},_0x94e652={'isDraggingOver':!!(_0x1425ef&&((_0x57b82a=_0x1425ef[_0x36b11d(0x642)])==null?void 0x0:_0x57b82a[_0x36b11d(0x55e)])===_0x4b785d)};return(0x0,_0x282aef['jsx'])(_0x42311c[_0x36b11d(0x4a1)],{'value':_0x4b785d,'children':_0x4538e4(_0x458812,_0x94e652)});}function _0x42d556(_0x5866db){const _0x450103=_0x34037b;var _0x36948f;let {children:_0x51de5d,draggableId:_0x479436,index:_0x27756c,isDragDisabled:_0x19b0f9=!0x1}=_0x5866db,{activeDrag:_0xd2c569,startDrag:_0x3ba2bb,updateDestination:_0x48ad88,endDrag:_0x2ef3ee}=_0x14a783(),_0x230a71=(0x0,_0x2b3aa2[_0x450103(0x278)])(_0x42311c),_0x3016b0=(0x0,_0x2b3aa2['useRef'])(null),_0x1e496f=(0x0,_0x2b3aa2[_0x450103(0x260)])(null),_0x49a9ec=(0x0,_0x2b3aa2[_0x450103(0x260)])(!0x1),_0x3b728d=(0x0,_0x2b3aa2[_0x450103(0x260)])(null),_0x497bb8=(0x0,_0x2b3aa2[_0x450103(0x260)])(null),_0x484109=(0x0,_0x2b3aa2['useRef'])(!0x1),_0x35abd5=(0x0,_0x2b3aa2['useRef'])(null),_0x4dcc42=(0x0,_0x2b3aa2[_0x450103(0x260)])(null),_0x1d2018=(0x0,_0x2b3aa2[_0x450103(0x260)])(null),_0x1b9a82=(0x0,_0x2b3aa2[_0x450103(0x4a2)])(_0x42cdb3=>{const _0x295896=_0x450103;_0x3016b0[_0x295896(0x56b)]=_0x42cdb3;},[]),_0x578864=(_0xd2c569==null?void 0x0:_0xd2c569[_0x450103(0x202)])===_0x479436,_0x2d933f=(0x0,_0x2b3aa2[_0x450103(0x4a2)])(()=>{const _0x227835=_0x450103;_0x497bb8['current']&&=(window[_0x227835(0x277)](_0x497bb8[_0x227835(0x56b)]),null);},[]),_0x1b8409=(0x0,_0x2b3aa2[_0x450103(0x4a2)])(()=>{const _0x1062ac=_0x450103;_0x2d933f(),_0x1d2018[_0x1062ac(0x56b)]=null,_0x3b728d['current']&&=(_0x3b728d[_0x1062ac(0x56b)](),null),_0x35abd5['current']&&=(_0x35abd5[_0x1062ac(0x56b)][_0x1062ac(0x205)](),null),_0x4dcc42[_0x1062ac(0x56b)]=null,_0x49a9ec[_0x1062ac(0x56b)]=!0x1;},[_0x2d933f]);(0x0,_0x2b3aa2[_0x450103(0x39c)])(()=>_0x1b8409,[_0x1b8409]);let _0x1d555a=(0x0,_0x2b3aa2[_0x450103(0x4a2)])((_0x2f4dca,_0x145e3c)=>{const _0x32010d=_0x450103;if(_0x35abd5['current'])return;let _0x23df0d=_0x3016b0[_0x32010d(0x56b)];if(!_0x23df0d)return;let _0x28cf19=_0x23df0d[_0x32010d(0x489)](),_0x1cc27e=_0x2f4dca>0x0?Math[_0x32010d(0x3d6)](0x0,_0x2f4dca-_0x28cf19['left']):0xc,_0x11021f=_0x145e3c>0x0?Math[_0x32010d(0x3d6)](0x0,_0x145e3c-_0x28cf19[_0x32010d(0x199)]):0xc,_0x195484=_0x23df0d['cloneNode'](!0x0);if(!(_0x195484 instanceof HTMLDivElement))return;let _0x5bc745=_0x195484;_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x5ac)]='fixed',_0x5bc745['style'][_0x32010d(0x614)]=_0x32010d(0x40f),_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x199)]='0px',_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x3b2)]=_0x28cf19[_0x32010d(0x3b2)]+'px',_0x5bc745[_0x32010d(0x2ff)]['height']=_0x28cf19['height']+'px',_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x639)]=_0x32010d(0x6a0),_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x216)]=_0x32010d(0x2bf),_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x501)]=_0x32010d(0x20f),_0x5bc745['style'][_0x32010d(0x6be)]=_0x32010d(0x147),_0x5bc745[_0x32010d(0x2ff)][_0x32010d(0x3f7)]=_0x32010d(0x661)+Math['max'](0x0,_0x2f4dca-_0x1cc27e)+_0x32010d(0x5b7)+Math[_0x32010d(0x3d6)](0x0,_0x145e3c-_0x11021f)+_0x32010d(0x265),document['body'][_0x32010d(0x335)](_0x5bc745),_0x35abd5[_0x32010d(0x56b)]=_0x5bc745,_0x4dcc42['current']={'x':_0x1cc27e,'y':_0x11021f};},[]),_0x5f7514=(0x0,_0x2b3aa2[_0x450103(0x4a2)])((_0x251a71,_0x5b4821)=>{const _0x634b4a=_0x450103;let _0x4dcc80=_0x35abd5[_0x634b4a(0x56b)],_0x3fb89c=_0x4dcc42[_0x634b4a(0x56b)];_0x4dcc80&&_0x3fb89c&&(_0x4dcc80['style'][_0x634b4a(0x3f7)]=_0x634b4a(0x661)+Math[_0x634b4a(0x3d6)](0x0,_0x251a71-_0x3fb89c['x'])+'px,\x20'+Math['max'](0x0,_0x5b4821-_0x3fb89c['y'])+_0x634b4a(0x265));},[]),_0x2859f2=(0x0,_0x2b3aa2[_0x450103(0x4a2)])((_0x19c12e,_0x106a3a)=>{const _0x5dea58=_0x450103;let _0x2911c2=_0x1e7712(document[_0x5dea58(0x347)](_0x19c12e,_0x106a3a));if(!_0x2911c2||_0x2911c2[_0x5dea58(0x43c)]['univerDndDropDisabled']===_0x5dea58(0x6d0))return null;let _0xad06bd=_0x2911c2['dataset'][_0x5dea58(0x285)];return _0xad06bd?{'droppableId':_0xad06bd,'index':_0x302c48(_0x2911c2,_0x106a3a,{'draggableId':_0x479436,'source':{'droppableId':_0x230a71??'','index':_0x27756c},'destination':null},_0xad06bd)}:null;},[_0x479436,_0x230a71,_0x27756c]),_0x486312=(0x0,_0x2b3aa2[_0x450103(0x4a2)])((_0x25ab8c,_0x4b82ae,_0x1f6ec7,_0x1dd4e1)=>{const _0x29d65b=_0x450103;if(_0x49a9ec['current']||_0x484109[_0x29d65b(0x56b)]||_0x19b0f9||!_0x230a71)return;_0x49a9ec[_0x29d65b(0x56b)]=!0x0,_0x2d933f(),_0x484109['current']=!0x1;try{var _0x54adb5;(_0x54adb5=_0x3016b0[_0x29d65b(0x56b)])==null||_0x54adb5[_0x29d65b(0x511)](_0x4b82ae);}catch{}_0x1d555a(_0x1f6ec7,_0x1dd4e1),_0x3ba2bb(_0x479436,{'droppableId':_0x230a71,'index':_0x27756c});let _0x4fd2b3=_0x2859f2(_0x1f6ec7,_0x1dd4e1);_0x48ad88(_0x4fd2b3);try{_0x25ab8c['preventDefault']();}catch{}},[_0x2d933f,_0x479436,_0x230a71,_0x27756c,_0x19b0f9,_0x1d555a,_0x2859f2,_0x3ba2bb,_0x48ad88]),_0x5ef043=(0x0,_0x2b3aa2['useCallback'])(_0x445c74=>{const _0x5adafd=_0x450103;if(_0x19b0f9||!_0x230a71||_0x445c74[_0x5adafd(0x31e)]===_0x5adafd(0x444)&&_0x445c74[_0x5adafd(0x63a)]!==0x0)return;_0x484109['current']=!0x1;let _0xde9f9d=_0x445c74[_0x5adafd(0x51e)];_0x1d2018[_0x5adafd(0x56b)]={'pointerId':_0xde9f9d,'pointerType':_0x445c74[_0x5adafd(0x31e)],'startX':_0x445c74[_0x5adafd(0x1e0)],'startY':_0x445c74[_0x5adafd(0x300)]},_0x2d933f(),_0x445c74[_0x5adafd(0x31e)]!=='mouse'&&(_0x497bb8['current']=window[_0x5adafd(0x571)](()=>{const _0x145141=_0x5adafd;let _0x58512a=_0x1d2018[_0x145141(0x56b)];_0x58512a&&_0x58512a[_0x145141(0x51e)]===_0xde9f9d&&_0x486312(_0x445c74[_0x145141(0x29b)],_0x58512a['pointerId'],_0x58512a['startX'],_0x58512a[_0x145141(0x162)]);},0x96));let _0x3c729b=_0x427f6e=>{const _0x1bcd66=_0x5adafd;let _0x9bee44=_0x1d2018['current'];if(!_0x9bee44||_0x427f6e[_0x1bcd66(0x51e)]!==_0x9bee44[_0x1bcd66(0x51e)])return;if(!_0x49a9ec[_0x1bcd66(0x56b)]){if(_0x484109[_0x1bcd66(0x56b)]){_0x1b8409();return;}if(_0x9bee44[_0x1bcd66(0x31e)]===_0x1bcd66(0x444)){let _0x5eb2ee=_0x427f6e[_0x1bcd66(0x1e0)]-_0x9bee44[_0x1bcd66(0x584)],_0x239ca4=_0x427f6e[_0x1bcd66(0x300)]-_0x9bee44[_0x1bcd66(0x162)];_0x5eb2ee*_0x5eb2ee+_0x239ca4*_0x239ca4>=0x10&&_0x486312(_0x427f6e,_0x9bee44['pointerId'],_0x427f6e[_0x1bcd66(0x1e0)],_0x427f6e['clientY']);}return;}_0x5f7514(_0x427f6e[_0x1bcd66(0x1e0)],_0x427f6e[_0x1bcd66(0x300)]);let _0x39aa7e=_0x2859f2(_0x427f6e['clientX'],_0x427f6e[_0x1bcd66(0x300)]);_0x48ad88(_0x39aa7e);try{_0x427f6e[_0x1bcd66(0x4cf)]();}catch{}},_0xe5aebe=_0xb9b67=>{const _0x4c533d=_0x5adafd;let _0x4c5663=_0x1d2018[_0x4c533d(0x56b)];if(!_0x4c5663||_0xb9b67[_0x4c533d(0x51e)]!==_0x4c5663['pointerId'])return;let _0x5ec763=_0x49a9ec[_0x4c533d(0x56b)]?_0x2859f2(_0xb9b67['clientX'],_0xb9b67[_0x4c533d(0x300)]):null,_0x4e613e=_0x49a9ec[_0x4c533d(0x56b)]?_0x2ef3ee(_0x5ec763?_0x4c533d(0x293):_0x4c533d(0x3c8),_0x5ec763):Promise['resolve']();return _0x1b8409(),_0x4e613e;};window['addEventListener'](_0x5adafd(0x6c7),_0x3c729b,{'capture':!0x0,'passive':!0x1}),window[_0x5adafd(0x5a8)](_0x5adafd(0x1b4),_0xe5aebe,{'capture':!0x0}),window[_0x5adafd(0x5a8)]('pointercancel',_0xe5aebe,{'capture':!0x0}),_0x3b728d[_0x5adafd(0x56b)]=()=>{const _0x126fa6=_0x5adafd;window[_0x126fa6(0x5a2)](_0x126fa6(0x6c7),_0x3c729b,!0x0),window['removeEventListener'](_0x126fa6(0x1b4),_0xe5aebe,!0x0),window[_0x126fa6(0x5a2)](_0x126fa6(0x542),_0xe5aebe,!0x0);};},[_0x1b8409,_0x2d933f,_0x230a71,_0x2ef3ee,_0x19b0f9,_0x2859f2,_0x486312,_0x48ad88,_0x5f7514]),_0x1220ea=(0x0,_0x2b3aa2[_0x450103(0x4a2)])(_0x317aea=>{const _0x4068be=_0x450103;let _0x599dc8=_0x317aea[_0x4068be(0x37d)];if(!_0x599dc8||typeof _0x599dc8[_0x4068be(0x59f)]!=_0x4068be(0x663))return;let _0x51eea6=_0x317aea[_0x4068be(0x521)],_0x5619d9=_0x51eea6[_0x4068be(0x41e)](!0x0);if(!(_0x5619d9 instanceof HTMLDivElement))return;let _0x49592e=_0x5619d9;_0x49592e['style'][_0x4068be(0x5ac)]='fixed',_0x49592e[_0x4068be(0x2ff)][_0x4068be(0x614)]=_0x4068be(0x574),_0x49592e[_0x4068be(0x2ff)][_0x4068be(0x199)]=_0x4068be(0x574),_0x49592e[_0x4068be(0x2ff)][_0x4068be(0x3b2)]=_0x51eea6[_0x4068be(0x489)]()['width']+'px',_0x49592e[_0x4068be(0x2ff)][_0x4068be(0x639)]=_0x4068be(0x6a0),_0x49592e[_0x4068be(0x2ff)][_0x4068be(0x216)]=_0x4068be(0x45c),_0x49592e[_0x4068be(0x2ff)][_0x4068be(0x501)]='2147483647',document[_0x4068be(0x44f)][_0x4068be(0x335)](_0x49592e);let _0x530215=_0x51eea6['getBoundingClientRect'](),_0x49c830=_0x317aea[_0x4068be(0x1e0)]>0x0?Math[_0x4068be(0x3d6)](0x0,_0x317aea['clientX']-_0x530215['left']):0xc,_0x12bcc1=_0x317aea['clientY']>0x0?Math['max'](0x0,_0x317aea[_0x4068be(0x300)]-_0x530215['top']):0xc;_0x599dc8['setDragImage'](_0x49592e,_0x49c830,_0x12bcc1),_0x1e496f[_0x4068be(0x56b)]&&_0x1e496f[_0x4068be(0x56b)]!==_0x49592e&&_0x1e496f['current'][_0x4068be(0x205)](),_0x1e496f[_0x4068be(0x56b)]=_0x49592e;},[]),_0x1d06f4=(0x0,_0x2b3aa2[_0x450103(0x4a2)])(_0xd17e5=>{const _0x4281c1=_0x450103;if(_0x49a9ec[_0x4281c1(0x56b)]||_0x19b0f9||!_0x230a71){_0xd17e5[_0x4281c1(0x4cf)]();return;}_0x484109['current']=!0x0,_0x2d933f(),_0x1d2018[_0x4281c1(0x56b)]=null,_0x3b728d['current']&&=(_0x3b728d[_0x4281c1(0x56b)](),null);let _0x19f2d0=_0xd17e5[_0x4281c1(0x37d)];if(_0x19f2d0){try{_0x19f2d0[_0x4281c1(0x48d)]=_0x4281c1(0x2b9);}catch{}try{_0x19f2d0[_0x4281c1(0x18c)](_0x4281c1(0x450),_0x479436);}catch{}}try{_0x1220ea(_0xd17e5);}catch{}_0x3ba2bb(_0x479436,{'droppableId':_0x230a71,'index':_0x27756c});},[_0x1220ea,_0x2d933f,_0x479436,_0x230a71,_0x27756c,_0x19b0f9,_0x3ba2bb]),_0x22e878=(0x0,_0x2b3aa2[_0x450103(0x4a2)])(()=>(_0x1e496f[_0x450103(0x56b)]&&=(_0x1e496f[_0x450103(0x56b)][_0x450103(0x205)](),null),_0x2ef3ee(_0x450103(0x3c8),null)),[_0x2ef3ee]);return _0x51de5d({'innerRef':_0x1b9a82,'draggableProps':{'draggable':!_0x19b0f9,'onDragStart':_0x1d06f4,'onDragEnd':_0x22e878,'style':_0x578864?{'opacity':0x1}:void 0x0,'data-univer-dnd-item':'true','data-univer-dnd-id':_0x479436,'data-univer-dnd-index':String(_0x27756c)},'dragHandleProps':{'onPointerDown':_0x5ef043}},{'isDragging':_0x578864,'draggingOver':_0xd2c569==null||(_0x36948f=_0xd2c569[_0x450103(0x642)])==null?void 0x0:_0x36948f['droppableId']});}function _0x26a35d(_0x59d970,_0x1797da){const _0x3ee6ae=_0x34037b;switch(_0x59d970){case'filter':return _0x1797da['t'](_0x3ee6ae(0x486));case _0x3ee6ae(0x4b9):return _0x1797da['t']('sheets-pivot-ui.row');case'column':return _0x1797da['t'](_0x3ee6ae(0x2ab));case _0x3ee6ae(0x66f):return _0x1797da['t']('sheets-pivot-ui.value');}}function _0x2d78b5(_0x296eac){const _0x420ebe=_0x34037b;switch(_0x296eac){case _0x420ebe(0x154):return(0x0,_0x282aef[_0x420ebe(0x5bf)])(_0x48b3b9,{'className':_0x420ebe(0x472)});case _0x420ebe(0x4b9):return(0x0,_0x282aef[_0x420ebe(0x5bf)])(_0xcce2d3,{'className':_0x420ebe(0x472)});case _0x420ebe(0x612):return(0x0,_0x282aef[_0x420ebe(0x5bf)])(_0x561333,{'className':_0x420ebe(0x472)});case _0x420ebe(0x66f):return(0x0,_0x282aef[_0x420ebe(0x5bf)])(_0x214d9a,{'className':_0x420ebe(0x472)});}}function _0x3ce817(_0x28627d){const _0x2d252c=_0x34037b;switch(_0x28627d){case'filter':return(0x0,_0x282aef[_0x2d252c(0x567)])(_0x2d252c(0x537),{'xmlns':_0x2d252c(0x5b1),'width':'32','height':'32','viewBox':_0x2d252c(0x55c),'fill':_0x2d252c(0x6a0),'children':[(0x0,_0x282aef['jsx'])(_0x2d252c(0x4aa),{'d':'M4.99957\x201.875C2.84556\x201.875\x201.67491\x204.3932\x203.06336\x206.04001L11.5946\x2016.1587V26.4187C11.5946\x2027.4582\x2012.2298\x2028.3922\x2013.1966\x2028.7741L16.1601\x2029.9449C17.8221\x2030.6015\x2019.6232\x2029.3766\x2019.6232\x2027.5895V16.1587L28.1544\x206.04C29.5428\x204.3932\x2028.3722\x201.875\x2026.2182\x201.875H4.99957Z','fill':_0x2d252c(0x344)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x3ce),{'x':_0x2d252c(0x35a),'y':_0x2d252c(0x66b),'width':_0x2d252c(0x676),'height':'2.2793','rx':'1.13965','fill':_0x2d252c(0x3d3)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x3ce),{'x':_0x2d252c(0x35a),'y':_0x2d252c(0x331),'width':_0x2d252c(0x676),'height':_0x2d252c(0x229),'rx':_0x2d252c(0x526),'fill':_0x2d252c(0x3d3)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x3ce),{'x':_0x2d252c(0x35a),'y':_0x2d252c(0x6a1),'width':'7.59766','height':_0x2d252c(0x229),'rx':_0x2d252c(0x526),'fill':'#274FEE'})]});case _0x2d252c(0x4b9):return(0x0,_0x282aef[_0x2d252c(0x567)])(_0x2d252c(0x537),{'xmlns':_0x2d252c(0x5b1),'width':'32','height':'32','viewBox':'0\x200\x2032\x2032','fill':_0x2d252c(0x6a0),'children':[(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':_0x2d252c(0x45f),'fill':_0x2d252c(0x599)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':_0x2d252c(0x1e7),'fill':_0x2d252c(0x599)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])('path',{'d':_0x2d252c(0x386),'fill':_0x2d252c(0x344)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':'M12.2517\x202.6863C12.2517\x202.35493\x2012.5203\x202.0863\x2012.8517\x202.0863H27.9582C29.0628\x202.0863\x2029.9582\x202.98173\x2029.9582\x204.0863V8.73627C29.9582\x209.06764\x2029.6896\x209.33627\x2029.3582\x209.33627H12.8517C12.5203\x209.33627\x2012.2517\x209.06764\x2012.2517\x208.73627L12.2517\x202.6863Z','fill':'#274FEE'})]});case _0x2d252c(0x612):return(0x0,_0x282aef[_0x2d252c(0x567)])(_0x2d252c(0x537),{'xmlns':_0x2d252c(0x5b1),'width':'32','height':'32','viewBox':'0\x200\x2032\x2032','fill':_0x2d252c(0x6a0),'children':[(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':_0x2d252c(0x45f),'fill':'#274FEE'}),(0x0,_0x282aef['jsx'])('path',{'d':_0x2d252c(0x1e7),'fill':'#D8D8D8'}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':'M12.2637\x202.6863C12.2637\x202.35493\x2012.5323\x202.0863\x2012.8637\x202.0863H27.9702C29.0748\x202.0863\x2029.9702\x202.98173\x2029.9702\x204.0863V8.73627C29.9702\x209.06764\x2029.7016\x209.33627\x2029.3702\x209.33627H12.8637C12.5323\x209.33627\x2012.2637\x209.06764\x2012.2637\x208.73627L12.2637\x202.6863Z','fill':'#D8D8D8'}),(0x0,_0x282aef[_0x2d252c(0x5bf)])('path',{'d':_0x2d252c(0x549),'fill':_0x2d252c(0x344)})]});case _0x2d252c(0x66f):return(0x0,_0x282aef[_0x2d252c(0x567)])(_0x2d252c(0x537),{'xmlns':_0x2d252c(0x5b1),'width':'32','height':'32','viewBox':_0x2d252c(0x55c),'fill':_0x2d252c(0x6a0),'children':[(0x0,_0x282aef['jsx'])(_0x2d252c(0x4aa),{'d':_0x2d252c(0x45f),'fill':'#D8D8D8'}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':'M2\x204.0863C2\x202.98173\x202.89543\x202.0863\x204\x202.0863H9.24705C9.57842\x202.0863\x209.84705\x202.35493\x209.84705\x202.6863V8.73981C9.84705\x209.07118\x209.57842\x209.33981\x209.24705\x209.33981H2.6C2.26863\x209.33981\x202\x209.07118\x202\x208.73981V4.0863Z','fill':_0x2d252c(0x599)}),(0x0,_0x282aef['jsx'])(_0x2d252c(0x4aa),{'d':_0x2d252c(0x480),'fill':_0x2d252c(0x599)}),(0x0,_0x282aef[_0x2d252c(0x5bf)])(_0x2d252c(0x4aa),{'d':_0x2d252c(0x549),'fill':'#274FEE'})]});}}function _0x578834(_0x509f60,_0x5ec46e){const _0x101b93=_0x34037b;switch(_0x509f60){case _0x101b93(0x154):return _0x5ec46e['t']('sheets-pivot-ui.filterDesc');case _0x101b93(0x4b9):return _0x5ec46e['t'](_0x101b93(0x641));case _0x101b93(0x612):return _0x5ec46e['t']('sheets-pivot-ui.columnDesc');case _0x101b93(0x66f):return _0x5ec46e['t'](_0x101b93(0x425));}}function _0x56408d(_0x5defa8){const _0x452cde=_0x34037b;let _0x1beb37=(0x0,_0x2ef21f[_0x452cde(0x1a2)])(_0x1ed97c[_0x452cde(0x4ad)]),{areaType:_0x1bee9c}=_0x5defa8,_0x147081=_0x578834(_0x1bee9c,_0x1beb37),_0x4facfc=_0x3ce817(_0x1bee9c);return(0x0,_0x282aef[_0x452cde(0x567)])(_0x452cde(0x259),{'className':_0x452cde(0x261),'children':[(0x0,_0x282aef[_0x452cde(0x5bf)])(_0x452cde(0x259),{'className':_0x452cde(0x33d),'children':_0x4facfc}),(0x0,_0x282aef[_0x452cde(0x5bf)])(_0x452cde(0x259),{'className':_0x452cde(0x416),'children':_0x147081})]});}function _0x4c3e69(_0x2f8573){const _0x5d491c=_0x34037b;let {areaType:_0x480513,items:_0x332b81,positionInfo:_0x5c5a3d,pivotTableId:_0x3d8190,pivotTableInfo:_0x11d2ed}=_0x2f8573,_0x36b39e=(0x0,_0x2ef21f[_0x5d491c(0x1a2)])(_0x1ed97c[_0x5d491c(0x4ad)]);return(0x0,_0x282aef[_0x5d491c(0x567)])(_0x5d491c(0x259),{'className':_0x5d491c(0x1b6),'children':[(0x0,_0x282aef['jsxs'])(_0x5d491c(0x259),{'className':'univer-mb-2\x20univer-mt-0\x20univer-flex\x20univer-w-full\x20univer-text-sm\x20univer-leading-4\x20univer-text-gray-900','children':[_0x2d78b5(_0x480513),(0x0,_0x282aef[_0x5d491c(0x5bf)])('span',{'className':_0x5d491c(0x6c2),'children':_0x26a35d(_0x480513,_0x36b39e)})]}),(0x0,_0x282aef['jsx'])(_0xbf962e,{'droppableId':''+_0x480513,'isCombineEnabled':!0x1,'isDropDisabled':!0x1,'ignoreContainerClipping':!0x1,'direction':_0x5d491c(0x5a4),'children':(_0x3fef50,_0x5f11d8)=>(0x0,_0x282aef[_0x5d491c(0x5bf)])('div',{'className':(0x0,_0x3fc00c[_0x5d491c(0x4e2)])(_0x5d491c(0x484),_0x3fc00c['borderClassName'],{'univer-border-primary-600':_0x5f11d8[_0x5d491c(0x200)]}),'children':(0x0,_0x282aef['jsx'])(_0x5d491c(0x259),{'className':(0x0,_0x3fc00c[_0x5d491c(0x4e2)])(_0x5d491c(0x37a),_0x3fc00c[_0x5d491c(0x6cd)]),'children':(0x0,_0x282aef[_0x5d491c(0x567)])(_0x5d491c(0x259),{'ref':_0x3fef50[_0x5d491c(0x600)],'className':'univer-box-border\x20univer-h-full\x20univer-px-2',..._0x3fef50[_0x5d491c(0x345)],'children':[_0x332b81[_0x5d491c(0x3d7)]>0x0&&_0x332b81[_0x5d491c(0x23e)]((_0x137d91,_0x3d46e6)=>(0x0,_0x282aef[_0x5d491c(0x5bf)])(_0x5d491c(0x259),{'children':(0x0,_0x282aef[_0x5d491c(0x5bf)])(_0x42d556,{'isDragDisabled':!0x1,'draggableId':_0x137d91[_0x5d491c(0x520)],'index':_0x3d46e6,'children':(_0x43138b,_0x59d94e)=>(0x0,_0x282aef[_0x5d491c(0x5bf)])(_0x282aef['Fragment'],{'children':(0x0,_0x282aef[_0x5d491c(0x5bf)])(_0x5d491c(0x259),{'ref':_0x43138b[_0x5d491c(0x600)],..._0x43138b['draggableProps'],..._0x43138b[_0x5d491c(0x1f1)],'style':_0x43138b['draggableProps']['style'],'className':(0x0,_0x3fc00c[_0x5d491c(0x4e2)])(_0x5d491c(0x5b2),_0x59d94e[_0x5d491c(0x6d8)]&&_0x5d491c(0x1d8)),'children':(0x0,_0x282aef[_0x5d491c(0x5bf)])(_0x3b5981,{'pivotTableId':_0x3d8190,'positionInfo':_0x5c5a3d,'item':_0x137d91,'areaType':_0x480513,'pivotTableInfo':_0x11d2ed})})})},_0x137d91[_0x5d491c(0x520)])},_0x137d91['tableFieldId'])),_0x332b81['length']===0x0&&(0x0,_0x282aef['jsx'])(_0x56408d,{'areaType':_0x480513})]})})})})]});}function _0x3b5981(_0xa09fef){const _0x14baf0=_0x34037b;let {areaType:_0x15cce8,item:_0x2d74e1,positionInfo:_0xa8d687,pivotTableId:_0x278ced,pivotTableInfo:_0x116a57}=_0xa09fef,{unitId:_0x426bcf,subUnitId:_0x4eed72}=_0xa8d687,_0x48645e=_0x2d74e1[_0x14baf0(0x520)]===_0x4630f1,_0xc05ddb=(0x0,_0x2ef21f[_0x14baf0(0x1a2)])(_0x1ed97c[_0x14baf0(0x4ab)]),_0x574c4b=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x14baf0(0x4ad)]),_0x33de05=()=>{const _0x22963a=_0x14baf0;if(_0x48645e){let _0x4d22d4=(_0x116a57[_0x22963a(0x3e0)]||[])[_0x22963a(0x23e)](_0x5a17d6=>_0x5a17d6[_0x22963a(0x520)]);_0x469ef1({'pivotTableId':_0x278ced,'unitId':_0x426bcf,'subUnitId':_0x4eed72,'commandService':_0xc05ddb},_0x4d22d4);}else _0x469ef1({'pivotTableId':_0x278ced,'unitId':_0x426bcf,'subUnitId':_0x4eed72,'commandService':_0xc05ddb},[_0x2d74e1[_0x22963a(0x520)]]);},_0x14ce61=()=>{const _0x3b2493=_0x14baf0;_0x426bcf&&_0x4eed72&&_0x1508e8(_0xc05ddb,_0x426bcf,_0x4eed72,_0x278ced,_0x2d74e1[_0x3b2493(0x520)]);},_0x14acba=()=>{_0x426bcf&&_0x4eed72&&_0x4e9ea8(_0xc05ddb,_0x278ced,_0x2d74e1['tableFieldId'],_0x426bcf,_0x4eed72,_0x116a57);},_0x17a3d4=_0x5081c8=>{const _0x48d46c=_0x14baf0;let _0x1cb469=_0x5081c8===_0x48d46c(0x612)?_0x55c699['PivotTableValuePositionEnum'][_0x48d46c(0x371)]:_0x55c699[_0x48d46c(0x360)][_0x48d46c(0x532)],_0x4b1fc3=_0x5081c8===_0x48d46c(0x612)?_0x116a57[_0x48d46c(0x1ba)][_0x48d46c(0x3d7)]:_0x116a57['columnFields'][_0x48d46c(0x3d7)];_0x37733f({'pivotTableId':_0x278ced,'unitId':_0x426bcf,'subUnitId':_0x4eed72,'commandService':_0xc05ddb},_0x1cb469,_0x4b1fc3);},_0x1b5191=(0x0,_0x282aef['jsxs'])(_0x14baf0(0x259),{'className':_0x14baf0(0x34b),'children':[(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x14baf0(0x259),{'className':_0x14baf0(0x5a7),'onClick':()=>{_0x33de05();},'children':_0x574c4b['t'](_0x14baf0(0x25c))}),_0x15cce8!=='value'&&!_0x48645e&&(0x0,_0x282aef[_0x14baf0(0x5bf)])('div',{'className':_0x14baf0(0x5a7),'onClick':()=>{_0x14ce61();},'children':_0x574c4b['t']('sheets-pivot-ui.filterField')}),_0x48645e&&(0x0,_0x282aef[_0x14baf0(0x5bf)])('div',{'className':_0x14baf0(0x5a7),'onClick':()=>{_0x17a3d4(_0x15cce8);},'children':_0x15cce8===_0x14baf0(0x612)?_0x574c4b['t'](_0x14baf0(0x400)):_0x574c4b['t'](_0x14baf0(0x575))}),_0x15cce8===_0x14baf0(0x66f)&&(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x14baf0(0x259),{'className':_0x14baf0(0x5a7),'onClick':()=>{_0x14acba();},'children':_0x574c4b['t'](_0x14baf0(0x2c3))})]}),_0x274bb9=_0x48645e?_0x574c4b['t'](_0x14baf0(0x4d2)):_0x2d74e1[_0x14baf0(0x381)],_0x4a3ddd=(0x0,_0x282aef[_0x14baf0(0x5bf)])('bdi',{'dir':'auto','children':_0x274bb9});return(0x0,_0x282aef[_0x14baf0(0x567)])(_0x282aef[_0x14baf0(0x665)],{'children':[(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x2b8ab3,{}),(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x14baf0(0x259),{'className':_0x14baf0(0x23d),'children':(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x3fc00c[_0x14baf0(0x2cd)],{'title':_0x4a3ddd,'children':_0x4a3ddd})}),(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x14baf0(0x259),{'className':_0x14baf0(0x204),'children':(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x3fc00c['Dropdown'],{'align':_0x14baf0(0x66c),'overlay':_0x1b5191,'children':(0x0,_0x282aef[_0x14baf0(0x5bf)])('span',{'children':(0x0,_0x282aef[_0x14baf0(0x5bf)])(_0x184fe1,{})})})})]});}function _0xfa3f31(_0x3aa4ba){const _0x2b5525=_0x34037b;var _0x3c4cba;let _0x99afbc=(0x0,_0x2ef21f[_0x2b5525(0x1a2)])(_0x1ed97c[_0x2b5525(0x61a)]),_0x2994e1=(0x0,_0x2ef21f[_0x2b5525(0x1a2)])(_0x1ed97c['LocaleService']),_0x5e937a=(0x0,_0x2ef21f[_0x2b5525(0x1a2)])(_0x1ed97c['ICommandService']),_0x118d92=(0x0,_0x2ef21f[_0x2b5525(0x1a2)])(_0x30e6e3),{sourceRangeInfo:_0x2e3155,refreshHandler:_0x56603f,pivotTableId:_0x2ad090,positionInfo:_0x3211b7}=_0x3aa4ba,{unitId:_0x2ec417,range:_0x1a97aa,subUnitId:_0x261bc2}=_0x2e3155,_0x5a97ed=_0x99afbc['getUnit'](_0x2ec417),_0x51557e=(_0x5a97ed==null||(_0x3c4cba=_0x5a97ed['getSheetBySheetId'](_0x261bc2))==null?void 0x0:_0x3c4cba[_0x2b5525(0x5e0)]())??'',[_0x184df3,_0xff576e]=(0x0,_0x2b3aa2[_0x2b5525(0x189)])(void 0x0),_0x32d6d1=(0x0,_0x2b3aa2['useRef'])(_0x184df3);_0x32d6d1['current']=_0x184df3;let [_0x57b92c,_0x2fdb95]=(0x0,_0x2b3aa2['useState'])(_0x1a97aa),[_0x525443,_0x329e79]=(0x0,_0x2b3aa2[_0x2b5525(0x189)])(_0x51557e),[_0x4b9d46,_0x299d64]=(0x0,_0x2b3aa2[_0x2b5525(0x189)])(!0x1);(0x0,_0x2b3aa2['useEffect'])(()=>{const _0x3443dc=_0x2b5525;_0x118d92[_0x3443dc(0x5ee)](_0x4b9d46);},[_0x4b9d46,_0x118d92]),(0x0,_0x2b3aa2[_0x2b5525(0x39c)])(()=>{const _0x5d05ac=_0x2b5525;_0x2fdb95(_0x2e3155[_0x5d05ac(0x22d)]),_0x329e79(_0x51557e);},[_0x2e3155,_0x51557e]);let _0x14c1dd=(0x0,_0x2b3aa2[_0x2b5525(0x6c9)])(()=>(0x0,_0x1ed97c['debounce'])(async _0x31d073=>{const _0x1175cf=_0x2b5525;let _0x3a6443=_0x31d073[_0x1175cf(0x66d)](',')[_0x1175cf(0x154)](_0x4a5bc0=>!!_0x4a5bc0)[_0x1175cf(0x23e)](_0x43497d[_0x1175cf(0x174)]);if(!_0x3a6443[0x0])return;let _0x13130f=_0x3a6443[0x0];if(!_0x5a97ed||_0x32d6d1[_0x1175cf(0x56b)])return;let _0x422eb9=_0x13130f[_0x1175cf(0x3fa)]||_0x2e3155[_0x1175cf(0x3fa)];_0x2fdb95(_0x13130f[_0x1175cf(0x22d)]),_0x329e79(_0x422eb9);let _0x1102ca={'unitId':_0x2ec417,'subUnitId':_0x5a97ed[_0x1175cf(0x690)](_0x422eb9)[_0x1175cf(0x42f)](),'range':{..._0x13130f['range']},'sheetName':_0x422eb9};await _0x4e1716(_0x5e937a,_0x2ad090,_0x1102ca,_0x3211b7[_0x1175cf(0x6bb)],_0x3211b7['subUnitId']),_0x56603f();},0x12c,{'leading':!0x1,'maxWait':0x3e8,'trailing':!0x0}),[]);return(0x0,_0x282aef[_0x2b5525(0x567)])('div',{'className':_0x2b5525(0x1fa),'children':[(0x0,_0x282aef[_0x2b5525(0x567)])(_0x2b5525(0x259),{'className':_0x2b5525(0x5ba),'children':[(0x0,_0x282aef['jsx'])(_0x2b5525(0x581),{'className':'univer-text-justify\x20univer-text-gray-900\x20dark:!univer-text-gray-0','children':_0x2994e1['t']('sheets-pivot-ui.sourceRangeLabel')}),(0x0,_0x282aef['jsx'])('span',{'className':_0x2b5525(0x1cf),'children':_0x2994e1['t']('sheets-pivot-ui.sourceRangePlaceholder')})]}),(0x0,_0x282aef['jsxs'])('div',{'className':'univer-relative','children':[(0x0,_0x282aef['jsx'])(_0x1e2b01[_0x2b5525(0x316)],{'unitId':_0x2ec417,'subUnitId':_0x261bc2,'initialValue':(0x0,_0x43497d[_0x2b5525(0x2f2)])(_0x525443,_0x57b92c),'onChange':(_0x448726,_0xbbb425)=>{const _0x5ca5ce=_0x2b5525;(0x0,_0x43497d[_0x5ca5ce(0x2f2)])(_0x525443,_0x57b92c)!==_0xbbb425&&_0x14c1dd(_0xbbb425);},'keepSheetReference':!0x0,'supportAcrossSheet':!0x0,'onVerify':(_0x195c09,_0x2d5608)=>{const _0x31ca37=_0x2b5525;let _0x17fe20=_0x2d5608[_0x31ca37(0x66d)](',')[_0x31ca37(0x154)](_0x5ed43f=>!!_0x5ed43f);if(!_0x17fe20[0x0]){_0xff576e(_0x2994e1['t']('sheets-pivot-ui.msg.emptySourceRange'));return;}if(!_0x195c09){_0xff576e(_0x2994e1['t']('sheets-pivot-ui.msg.invalidSize'));return;}let _0x2d48ec=(0x0,_0x43497d[_0x31ca37(0x174)])(_0x17fe20[0x0]),_0x46e93c=_0x2d48ec[_0x31ca37(0x3fa)]||_0x2e3155[_0x31ca37(0x3fa)];if(_0x5a97ed)switch(_0x54f172(_0x5a97ed['getSheetBySheetName'](_0x46e93c),_0x2d48ec[_0x31ca37(0x22d)])){case 0x2:_0xff576e(void 0x0);break;case 0x0:_0xff576e(_0x2994e1['t']('sheets-pivot-ui.msg.emptySourceRange'));break;case 0x1:_0xff576e(_0x2994e1['t'](_0x31ca37(0x3ef)));}},'maxRangeCount':0x1,'onFocusChange':_0x83e2e0=>{_0x299d64(_0x83e2e0);},'onRangeSelectorDialogVisibleChange':_0x3b34fd=>{_0x299d64(!!_0x3b34fd);}}),_0x184df3?(0x0,_0x282aef['jsx'])(_0x2b5525(0x259),{'className':'univer-my-1\x20univer-text-xs\x20univer-text-red-500','children':_0x184df3}):null]})]});}function _0x2dcc06(_0x14dfba){const _0x2a4869=_0x34037b;let {type:_0x4e6c7c}=_0x14dfba;switch(_0x4e6c7c){case _0x55c699[_0x2a4869(0x207)][_0x2a4869(0x602)]:return(0x0,_0x282aef[_0x2a4869(0x5bf)])(_0x1177fb,{'className':_0x2a4869(0x47d)});case _0x55c699[_0x2a4869(0x207)][_0x2a4869(0x3b5)]:return(0x0,_0x282aef[_0x2a4869(0x5bf)])(_0xeac63,{'className':'univer-mx-1.5\x20univer-my-0\x20univer-h-4\x20univer-text-xs\x20univer-text-gray-200\x20dark:!univer-text-gray-600'});case _0x55c699[_0x2a4869(0x207)][_0x2a4869(0x175)]:return(0x0,_0x282aef[_0x2a4869(0x5bf)])(_0x4ad438,{'className':_0x2a4869(0x47d)});}}function _0x4c0ba4(_0x24eccc){const _0x421c55=_0x34037b;if(!_0x24eccc)return!0x1;if(_0x24eccc[_0x421c55(0x490)]===_0x55c699[_0x421c55(0x16d)]['RecordFilter']){var _0x1a52a3;return _0x24eccc[_0x421c55(0x2db)]!==void 0x0||(((_0x1a52a3=_0x24eccc[_0x421c55(0x355)])==null?void 0x0:_0x1a52a3[_0x421c55(0x3bc)])??_0x1ed97c['FilterSelectionMode'][_0x421c55(0x48e)])!==_0x1ed97c[_0x421c55(0x37f)][_0x421c55(0x48e)];}return _0x24eccc[_0x421c55(0x490)]!==_0x55c699[_0x421c55(0x16d)][_0x421c55(0x588)]||_0x24eccc[_0x421c55(0x2ee)]!==!0x0;}function _0x447144(_0x4c2cba){const _0x5e2a09=_0x34037b;let {name:_0x238345,dataFieldId:_0x35c599,checked:_0x5f06df,type:_0x139bcc,refreshHandler:_0x468969,pivotTableId:_0x3832c3,draggingId:_0x176505,pivotTableInfo:_0x328831,unitId:_0x4d55c4,subUnitId:_0x566aaa}=_0x4c2cba,[_0x5b75a4,_0xe504c0]=(0x0,_0x2b3aa2['useState'])(!0x1),_0x1316d7=(0x0,_0x2ef21f[_0x5e2a09(0x1a2)])(_0x1ed97c[_0x5e2a09(0x4ab)]),_0x32f301=(0x0,_0x2ef21f[_0x5e2a09(0x1a2)])(_0x1ed97c['LocaleService']);if(!_0x328831)return null;let {rowFields:_0x288f44,columnFields:_0x2a1610,filterFields:_0x26db1e,valueFields:_0x29620d}=_0x328831,_0x8e433e=_0x328831[_0x5e2a09(0x67e)]??[],_0x2d86bf=[..._0x288f44,..._0x2a1610,..._0x26db1e,..._0x29620d,..._0x8e433e],_0x1abe48=_0x8e433e[_0x5e2a09(0x242)](_0x46b8b3=>_0x46b8b3[_0x5e2a09(0x443)]===_0x35c599),_0x1bcb31=async _0x57ba64=>{const _0x97b2f7=_0x5e2a09;let _0x4be3fd=!!_0x57ba64,_0x3985a6=!0x1;if(_0x4be3fd){let _0x12da04={'pivotTableId':_0x3832c3,'dataFieldId':_0x35c599,'fieldArea':_0x139bcc===_0x55c699['PivotDataFieldDataTypeEnum'][_0x97b2f7(0x3b5)]?_0x55c699['PivotTableFiledAreaEnum'][_0x97b2f7(0x3da)]:_0x55c699[_0x97b2f7(0x4e6)][_0x97b2f7(0x371)],'unitId':_0x4d55c4,'subUnitId':_0x566aaa,'index':_0x139bcc===_0x55c699[_0x97b2f7(0x207)]['number']?_0x29620d['length']:_0x288f44['length']};_0x3985a6=await _0x1316d7['executeCommand'](_0x5ec675[_0x97b2f7(0x3ba)]['id'],_0x12da04);}else{let _0xebe50f=[];_0x2d86bf[_0x97b2f7(0x596)](_0x559f78=>{const _0x5224ba=_0x97b2f7;_0x559f78[_0x5224ba(0x443)]===_0x35c599&&_0xebe50f[_0x5224ba(0x1c1)](_0x559f78[_0x5224ba(0x520)]);}),_0x3985a6=await _0x1316d7[_0x97b2f7(0x1cd)](_0x5ec675[_0x97b2f7(0x40a)]['id'],{'pivotTableId':_0x3832c3,'fieldIds':_0xebe50f,'unitId':_0x4d55c4,'subUnitId':_0x566aaa});}_0x3985a6&&_0x468969();},_0x5bedda=async _0x4c41d5=>{const _0x4c4d1d=_0x5e2a09;let _0x380409=!0x1,_0x4ebe95='';if([..._0x288f44,..._0x2a1610,..._0x26db1e,..._0x8e433e][_0x4c4d1d(0x596)](_0x2b203a=>{const _0x2414fa=_0x4c4d1d;_0x2b203a['dataFieldId']===_0x35c599&&(_0x380409=!0x0,_0x4ebe95=_0x2b203a[_0x2414fa(0x520)]);}),_0x380409&&_0x4c41d5!==_0x55c699[_0x4c4d1d(0x4e6)]['Value']){if(_0x3832c3){let _0x48d907=_0xf5a23b(_0x328831,_0x4c41d5),_0x58638b={'pivotTableId':_0x3832c3,'area':_0x4c41d5,'index':_0x48d907,'fieldId':_0x4ebe95,'unitId':_0x4d55c4,'subUnitId':_0x566aaa};await _0x1316d7['executeCommand'](_0x5ec675['MovePivotFieldCommand']['id'],_0x58638b)&&_0x468969();}}else{if(_0x3832c3){let _0x5f07ae={'pivotTableId':_0x3832c3,'dataFieldId':_0x35c599,'fieldArea':_0x4c41d5,'unitId':_0x4d55c4,'subUnitId':_0x566aaa,'index':_0xf5a23b(_0x328831,_0x4c41d5)};await _0x1316d7[_0x4c4d1d(0x1cd)](_0x5ec675[_0x4c4d1d(0x3ba)]['id'],_0x5f07ae)&&_0x468969();}}};return(0x0,_0x282aef[_0x5e2a09(0x567)])(_0x5e2a09(0x259),{'className':(0x0,_0x3fc00c[_0x5e2a09(0x4e2)])(_0x5e2a09(0x14a),{'univer-flex\x20univer-bg-gray-100\x20dark:!univer-bg-gray-700':_0x176505===_0x35c599}),'id':_0x5e2a09(0x436)+_0x35c599,'onContextMenu':_0x3f8c0f=>{_0x3f8c0f['preventDefault'](),_0xe504c0(!0x0);},'children':[(0x0,_0x282aef[_0x5e2a09(0x5bf)])('span',{'className':'univer-mr-2\x20univer-w-4\x20rtl:univer-ml-2\x20rtl:univer-mr-0','children':(0x0,_0x282aef['jsx'])(_0x2b8ab3,{})}),(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x3fc00c['Checkbox'],{'className':_0x5e2a09(0x235),'checked':_0x5f06df,'onChange':_0x1bcb31}),(0x0,_0x282aef[_0x5e2a09(0x567)])(_0x5e2a09(0x259),{'className':_0x5e2a09(0x684),'children':[(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x2dcc06,{'type':_0x139bcc}),(0x0,_0x282aef['jsx'])(_0x5e2a09(0x581),{'className':_0x5e2a09(0x49d),'children':_0x238345})]}),(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x3fc00c[_0x5e2a09(0x14f)],{'align':_0x5e2a09(0x66c),'side':'bottom','open':_0x5b75a4,'onOpenChange':_0xe504c0,'overlay':(0x0,_0x282aef[_0x5e2a09(0x567)])(_0x5e2a09(0x259),{'children':[_0x4c0ba4(_0x1abe48==null?void 0x0:_0x1abe48['filterInfo'])&&(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x5e2a09(0x259),{'className':_0x5e2a09(0x561),'onClick':async()=>{const _0x23fc5=_0x5e2a09;_0x1abe48&&(_0xe504c0(!0x1),await _0x1316d7['executeCommand'](_0x5ec675['SetPivotFilterCommand']['id'],{'unitId':_0x4d55c4,'subUnitId':_0x566aaa,'pivotTableId':_0x3832c3,'tableFieldId':_0x1abe48[_0x23fc5(0x520)],'items':[],'partialItems':[],'isAll':!0x0})&&_0x468969());},'children':_0x32f301['t'](_0x5e2a09(0x59a))}),(0x0,_0x282aef['jsx'])(_0x5e2a09(0x259),{'className':'univer-flex\x20univer-cursor-pointer\x20univer-items-center\x20univer-self-stretch\x20univer-px-2\x20univer-py-1.5\x20univer-text-sm\x20univer-leading-5\x20univer-text-gray-900\x20hover:univer-bg-gray-100\x20dark:!univer-text-gray-0\x20dark:hover:!univer-bg-gray-700','onClick':()=>{const _0x12e5f3=_0x5e2a09;_0xe504c0(!0x1),_0x5bedda(_0x55c699[_0x12e5f3(0x4e6)][_0x12e5f3(0x371)]);},'children':_0x32f301['t']('sheets-pivot-ui.addToRow')}),(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x5e2a09(0x259),{'className':_0x5e2a09(0x561),'onClick':()=>{const _0x5bf7de=_0x5e2a09;_0xe504c0(!0x1),_0x5bedda(_0x55c699[_0x5bf7de(0x4e6)][_0x5bf7de(0x532)]);},'children':_0x32f301['t'](_0x5e2a09(0x5ab))}),(0x0,_0x282aef[_0x5e2a09(0x5bf)])('div',{'className':_0x5e2a09(0x561),'onClick':()=>{const _0x34234e=_0x5e2a09;_0xe504c0(!0x1),_0x5bedda(_0x55c699[_0x34234e(0x4e6)][_0x34234e(0x3da)]);},'children':_0x32f301['t'](_0x5e2a09(0x3e9))}),(0x0,_0x282aef[_0x5e2a09(0x5bf)])('div',{'className':_0x5e2a09(0x561),'onClick':()=>{const _0x2f39d3=_0x5e2a09;_0xe504c0(!0x1),_0x5bedda(_0x55c699[_0x2f39d3(0x4e6)][_0x2f39d3(0x456)]);},'children':_0x32f301['t'](_0x5e2a09(0x45b))})]}),'children':(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x5e2a09(0x259),{'className':(0x0,_0x3fc00c[_0x5e2a09(0x4e2)])(_0x5e2a09(0x3af),{'univer-opacity-100':_0x5b75a4,'univer-opacity-0\x20group-hover:univer-opacity-100':!_0x5b75a4}),'onMouseDown':_0xe4235f=>_0xe4235f[_0x5e2a09(0x3cb)](),'onClick':_0x2a202d=>_0x2a202d[_0x5e2a09(0x3cb)](),'children':(0x0,_0x282aef[_0x5e2a09(0x5bf)])(_0x10a0af,{'className':_0x5e2a09(0x2a2)})})})]},_0x35c599);}function _0x2fc053(_0x38de93){const _0x144fb3=_0x34037b;let {sourceList:_0x10bfef,refreshHandler:_0x43b39d,pivotTableId:_0x51c951,pivotTableInfo:_0x1d64c6,unitId:_0x59fb1f,draggingId:_0x2c22f9,subUnitId:_0x578f2c}=_0x38de93,_0x20a3a2=(0x0,_0x2ef21f[_0x144fb3(0x1a2)])(_0x1ed97c[_0x144fb3(0x4ad)]),[_0x14e3b4,_0xc2eba5]=(0x0,_0x2b3aa2['useState'])(''),_0x4399f7=_0x14e3b4['trim']()['toLocaleLowerCase'](),_0xac7a69=_0x4399f7?_0x10bfef[_0x144fb3(0x154)](_0x464d28=>_0x464d28[_0x144fb3(0x3a1)]['toLocaleLowerCase']()[_0x144fb3(0x5fe)](_0x4399f7)):_0x10bfef;return(0x0,_0x282aef['jsxs'])(_0x144fb3(0x259),{'className':_0x144fb3(0x4f6),'children':[(0x0,_0x282aef[_0x144fb3(0x5bf)])('p',{'className':_0x144fb3(0x453),'children':_0x20a3a2['t'](_0x144fb3(0x17a))}),(0x0,_0x282aef[_0x144fb3(0x5bf)])('p',{'className':'univer-mb-2\x20univer-mt-0\x20univer-text-xs\x20univer-leading-4\x20univer-text-gray-600\x20dark:!univer-text-gray-200','children':_0x20a3a2['t'](_0x144fb3(0x6d5))}),(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x3fc00c[_0x144fb3(0x45e)],{'allowClear':!0x0,'className':_0x144fb3(0x487),'placeholder':_0x20a3a2['t']('sheets-pivot-ui.searchFieldPlaceholder'),'slot':(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x58cfa4,{}),'value':_0x14e3b4,'onChange':_0xc2eba5}),(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x144fb3(0x259),{'className':(0x0,_0x3fc00c[_0x144fb3(0x4e2)])(_0x144fb3(0x6df),_0x3fc00c['borderClassName']),'children':(0x0,_0x282aef['jsx'])(_0x144fb3(0x259),{'className':(0x0,_0x3fc00c[_0x144fb3(0x4e2)])(_0x144fb3(0x2cf),_0x3fc00c[_0x144fb3(0x6cd)]),'data-testid':_0x144fb3(0x2f0),'children':(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0xbf962e,{'droppableId':'source','direction':_0x144fb3(0x5a4),'isCombineEnabled':!0x1,'ignoreContainerClipping':!0x1,'isDropDisabled':!0x0,'children':_0x1be198=>(0x0,_0x282aef[_0x144fb3(0x567)])(_0x144fb3(0x259),{'ref':_0x1be198[_0x144fb3(0x600)],'className':_0x144fb3(0x138),..._0x1be198['droppableProps'],'children':[_0xac7a69[_0x144fb3(0x23e)]((_0x5ac1ef,_0x3377a8)=>(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x144fb3(0x259),{'className':'univer-relative\x20univer-flex\x20univer-h-8\x20univer-w-full\x20univer-items-center\x20univer-gap-1\x20univer-self-stretch\x20univer-border\x20univer-border-transparent\x20univer-p-0.5\x20univer-leading-4\x20hover:univer-bg-gray-100\x20dark:hover:!univer-bg-gray-700','children':(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x42d556,{'draggableId':_0x5ac1ef['id'],'isDragDisabled':!0x1,'index':_0x3377a8,'children':({innerRef:_0x34654e,draggableProps:_0x44a3b6,dragHandleProps:_0x3a163a})=>(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x144fb3(0x259),{'ref':_0x34654e,..._0x44a3b6,..._0x3a163a,'className':'univer-h-8\x20univer-w-full','style':_0x44a3b6[_0x144fb3(0x2ff)],'children':(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x447144,{'draggingId':_0x2c22f9,'unitId':_0x59fb1f,'subUnitId':_0x578f2c,..._0x5ac1ef,'refreshHandler':_0x43b39d,'pivotTableId':_0x51c951,'pivotTableInfo':_0x1d64c6})})},_0x5ac1ef['id'])},_0x5ac1ef['id'])),_0xac7a69['length']===0x0&&(0x0,_0x282aef[_0x144fb3(0x5bf)])(_0x144fb3(0x259),{'className':_0x144fb3(0x13e),'children':_0x20a3a2['t'](_0x144fb3(0x68e))})]})})})})]});}function _0x104c60(_0x2e708a){const _0x55e101=_0x34037b;let {pivotTableId:_0x4086e9,version:_0x5258cb,unitId:_0x90c1e,subUnitId:_0x4db38e,panelInfo:_0x45eedf}=_0x2e708a,_0x59fa22=(0x0,_0x2ef21f[_0x55e101(0x1a2)])(_0x5ec675[_0x55e101(0x1c2)]),_0x250d85=(0x0,_0x2b3aa2[_0x55e101(0x6c9)])(()=>_0x59fa22[_0x55e101(0x26c)](_0x90c1e,_0x4db38e,_0x4086e9)[_0x55e101(0x1dd)]((0x0,_0x3ae495[_0x55e101(0x36b)])(0x0)),[_0x59fa22,_0x90c1e,_0x4db38e,_0x4086e9]),_0x5d7700=(0x0,_0x2ef21f['useObservable'])(_0x250d85),_0x34b3d=(0x0,_0x2ef21f[_0x55e101(0x1a2)])(_0x5ec675[_0x55e101(0x43d)]),_0x58a70f=(0x0,_0x2ef21f[_0x55e101(0x1a2)])(_0x30e6e3),_0x34af79=(0x0,_0x2ef21f[_0x55e101(0x22f)])(_0x58a70f[_0x55e101(0x407)],!0x0),_0x2b7499=(0x0,_0x2ef21f[_0x55e101(0x1a2)])(_0x1ed97c['ICommandService']),_0x4355e0=(0x0,_0x2ef21f[_0x55e101(0x1a2)])(_0x1ed97c['ILogService']),[_0x54f34c,_0x54d61e]=(0x0,_0x2b3aa2['useState'])(_0x45eedf),[_0x2c96df,_0x2e712f]=(0x0,_0x2b3aa2['useState'])(null),_0x11f703=(0x0,_0x2b3aa2[_0x55e101(0x4a2)])(async()=>{const _0x3b004b=_0x55e101;if(!_0x59fa22[_0x3b004b(0x399)](_0x90c1e,_0x4db38e,_0x4086e9))return;let _0x36e581=await _0x34b3d[_0x3b004b(0x692)]({'unitId':_0x90c1e,'subUnitId':_0x4db38e,'pivotTableId':_0x4086e9,'params':{'type':_0x5ec675['PivotDisplayDataType'][_0x3b004b(0x232)],'panel':{'pivotTableId':_0x4086e9}}});_0x36e581[_0x3b004b(0x420)]['panel']&&_0x54d61e(_0x36e581[_0x3b004b(0x420)][_0x3b004b(0x619)]);},[_0x4086e9,_0x34b3d,_0x59fa22,_0x4db38e,_0x90c1e]);(0x0,_0x2b3aa2[_0x55e101(0x39c)])(()=>{const _0x2e1222=_0x55e101;_0x11f703()[_0x2e1222(0x1d4)](_0x1c438c=>_0x4355e0[_0x2e1222(0x46a)]('[PivotPanel]',_0x1c438c));},[_0x4355e0,_0x5d7700,_0x4086e9,_0x11f703,_0x5258cb]);let _0x42f98c=async _0x18ead4=>{const _0x8bb8be=_0x55e101;let {source:_0x8c4092,destination:_0x4ef08f,draggableId:_0x40f7b0}=_0x18ead4;_0x2e712f(null);let _0x3a93b3={'pivotTableInfo':_0x54f34c,'pivotTableId':_0x4086e9,'commandService':_0x2b7499,'unitId':_0x90c1e,'subUnitId':_0x4db38e},_0xe9eb94=_0x8c4092['droppableId'];if(_0x4ef08f&&_0x4ef08f[_0x8bb8be(0x55e)]){let _0x399d40=_0x4ef08f[_0x8bb8be(0x55e)];await _0x48c10d(_0x3a93b3,_0x40f7b0,_0xe9eb94,_0x399d40,_0x4ef08f[_0x8bb8be(0x2bc)]),await _0x11f703();}_0x4ef08f===null&&(await _0x4e67e7(_0x3a93b3,_0x40f7b0,_0xe9eb94),await _0x11f703());},_0x3d40f2=_0x5151d7=>{_0x2e712f({'draggingId':_0x5151d7['draggableId']});},_0x1d3de0=_0x164a3a=>{let {draggableId:_0x99ab7c,destination:_0x1faccb,source:_0x52764b}=_0x164a3a;_0x2e712f({'draggingId':_0x99ab7c,'destination':_0x1faccb,'source':_0x52764b});};if(!_0x34af79||!_0x54f34c)return null;let {sourceList:_0x5244d3,rowFields:_0x592806,columnFields:_0x1ec6dd,filterFields:_0x2a2a4b,valueFields:_0x448463,sourceRange:_0x23f60d,positionInfo:_0x4e376f}=_0x54f34c;return(0x0,_0x282aef['jsxs'])(_0x55e101(0x259),{'className':(0x0,_0x3fc00c[_0x55e101(0x4e2)])('univer-mt-4\x20univer-flex\x20univer-h-[calc(100%-16px)]\x20univer-min-h-0\x20univer-w-full\x20univer-flex-col\x20univer-overflow-y-auto\x20univer-overflow-x-hidden',_0x3fc00c[_0x55e101(0x6cd)]),'children':[(0x0,_0x282aef[_0x55e101(0x5bf)])(_0xfa3f31,{'sourceRangeInfo':_0x23f60d,'pivotTableId':_0x4086e9,'refreshHandler':_0x11f703,'positionInfo':_0x4e376f}),(0x0,_0x282aef[_0x55e101(0x567)])(_0x8277c9,{'onDragEnd':_0x42f98c,'onDragStart':_0x3d40f2,'onDragUpdate':_0x1d3de0,'children':[(0x0,_0x282aef['jsx'])(_0x2fc053,{'draggingId':(_0x2c96df==null?void 0x0:_0x2c96df[_0x55e101(0x236)])??'','sourceList':_0x5244d3,'refreshHandler':_0x11f703,'pivotTableId':_0x4086e9,'pivotTableInfo':_0x54f34c,'unitId':_0x90c1e,'subUnitId':_0x4db38e}),(0x0,_0x282aef['jsx'])(_0xf068eb,{'rowFields':_0x592806,'columnFields':_0x1ec6dd,'filterFields':_0x2a2a4b,'valueFields':_0x448463,'refreshHandler':_0x11f703,'positionInfo':_0x4e376f,'pivotTableId':_0x4086e9,'pivotTableInfo':_0x54f34c})]})]});}function _0xf068eb(_0x48af2e){const _0x5ec36e=_0x34037b;let {rowFields:_0x1ccd64,columnFields:_0x3edf7c,filterFields:_0x4df5ce,valueFields:_0x5d47fd,refreshHandler:_0x230d5f,pivotTableInfo:_0x5ba1de,positionInfo:_0x16b00c,pivotTableId:_0x5eb09c}=_0x48af2e;return(0x0,_0x282aef[_0x5ec36e(0x567)])(_0x5ec36e(0x259),{'className':_0x5ec36e(0x351),'data-testid':_0x5ec36e(0x50c),'children':[(0x0,_0x282aef[_0x5ec36e(0x567)])(_0x5ec36e(0x259),{'className':_0x5ec36e(0x472),'children':[(0x0,_0x282aef[_0x5ec36e(0x5bf)])(_0x4c3e69,{'areaType':_0x5ec36e(0x154),'items':_0x4df5ce,'positionInfo':_0x16b00c,'pivotTableId':_0x5eb09c,'pivotTableInfo':_0x5ba1de,'refreshHandler':_0x230d5f}),(0x0,_0x282aef[_0x5ec36e(0x5bf)])(_0x4c3e69,{'areaType':_0x5ec36e(0x612),'items':_0x3edf7c,'positionInfo':_0x16b00c,'pivotTableId':_0x5eb09c,'pivotTableInfo':_0x5ba1de,'refreshHandler':_0x230d5f})]}),(0x0,_0x282aef[_0x5ec36e(0x567)])('div',{'className':_0x5ec36e(0x472),'children':[(0x0,_0x282aef[_0x5ec36e(0x5bf)])(_0x4c3e69,{'areaType':'row','items':_0x1ccd64,'positionInfo':_0x16b00c,'pivotTableId':_0x5eb09c,'pivotTableInfo':_0x5ba1de,'refreshHandler':_0x230d5f}),(0x0,_0x282aef[_0x5ec36e(0x5bf)])(_0x4c3e69,{'areaType':_0x5ec36e(0x66f),'items':_0x5d47fd,'positionInfo':_0x16b00c,'pivotTableId':_0x5eb09c,'pivotTableInfo':_0x5ba1de,'refreshHandler':_0x230d5f})]})]});}function _0x3bfb25(_0x1e37eb){const _0x569aef=_0x34037b;let {className:_0x1a527d,unitId:_0x1ec30c,subUnitId:_0x14c93f,pivotTableId:_0x4e27ac}=_0x1e37eb,[_0x4e81f7,_0x3417f9]=(0x0,_0x2b3aa2[_0x569aef(0x189)])(0x0),_0x5071c4=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x569aef(0x4ad)]),_0x477e31=_0x5071c4[_0x569aef(0x412)]();return(0x0,_0x282aef[_0x569aef(0x567)])(_0x569aef(0x259),{'className':(0x0,_0x3fc00c[_0x569aef(0x4e2)])(_0x569aef(0x18f),_0x1a527d),'dir':_0x477e31,'children':[(0x0,_0x282aef[_0x569aef(0x5bf)])(_0x3fc00c[_0x569aef(0x1df)],{'className':'univer-my-3\x20univer-w-full\x20univer-shrink-0','items':[{'label':_0x5071c4['t'](_0x569aef(0x243)),'value':0x0},{'label':_0x5071c4['t']('sheets-pivot-ui.configPanel'),'value':0x1}],'value':_0x4e81f7,'onChange':_0x3417f9}),(0x0,_0x282aef['jsx'])(_0x569aef(0x259),{'className':(0x0,_0x3fc00c['clsx'])(_0x569aef(0x268),_0x4e81f7===0x0?_0x569aef(0x3d1):_0x569aef(0x1f0)),'children':_0x4e81f7===0x0?(0x0,_0x282aef[_0x569aef(0x5bf)])(_0x104c60,{..._0x1e37eb}):(0x0,_0x282aef[_0x569aef(0x5bf)])(_0x4ac091,{'unitId':_0x1ec30c,'subUnitId':_0x14c93f,'pivotTableId':_0x4e27ac})})]});}function _0x45914a(_0x38153e){const _0x58c2bb=_0x34037b;let {unitId:_0x55c430,subUnitId:_0x56d70c,pivotTableId:_0x23b6a4,tableFieldId:_0x45f5d5,type:_0x18c367}=_0x38153e,_0x59baea=JSON[_0x58c2bb(0x5d7)]([_0x55c430,_0x56d70c,_0x23b6a4,_0x45f5d5,_0x18c367]);return(0x0,_0x282aef['jsx'])(_0x51723d,{..._0x38153e},_0x59baea);}function _0x51723d({unitId:_0x543104,subUnitId:_0x520657,pivotTableId:_0x3fa538,tableFieldId:_0x761b9a,type:_0x2449a6,baseItems:_0x58bf59,onConfirm:_0x563faf,onCancel:_0x10f3c7}){const _0x11aeb6=_0x34037b;var _0x3e6033;let _0x355826=(0x0,_0x2ef21f['useDependency'])(_0x5ec675[_0x11aeb6(0x1c2)]),_0x2a67ed=(0x0,_0x2ef21f[_0x11aeb6(0x1a2)])(_0x1ed97c[_0x11aeb6(0x4ad)]),_0x47638f=(0x0,_0x2ef21f[_0x11aeb6(0x22f)])(_0x2a67ed['direction$'],_0x2a67ed[_0x11aeb6(0x412)]()),_0x454b73=_0x3ce038[_0x11aeb6(0x242)](_0x54426c=>_0x54426c[_0x11aeb6(0x490)]===_0x2449a6),_0x415fea=_0x355826[_0x11aeb6(0x399)](_0x543104,_0x520657,_0x3fa538),_0x3d2aa6=_0x415fea==null||(_0x3e6033=_0x415fea[_0x11aeb6(0x5cb)][_0x11aeb6(0x39f)][_0x761b9a])==null?void 0x0:_0x3e6033[_0x11aeb6(0x5d6)],_0x1bf414=()=>{const _0x5ec678=_0x11aeb6;var _0xb690fd;if((_0x3d2aa6==null?void 0x0:_0x3d2aa6['type'])!==_0x2449a6||!_0x3d2aa6[_0x5ec678(0x429)])return'';if(_0x3d2aa6['baseItemType']===_0x55c699[_0x5ec678(0x22b)][_0x5ec678(0x39a)])return'relative:previous';if(_0x3d2aa6[_0x5ec678(0x240)]===_0x55c699[_0x5ec678(0x22b)]['next'])return _0x5ec678(0x680);let _0x1f4869=((_0xb690fd=_0x58bf59[_0x3d2aa6[_0x5ec678(0x429)]])==null?void 0x0:_0xb690fd[_0x5ec678(0x180)]['indexOf'](_0x3d2aa6[_0x5ec678(0x307)]))??-0x1;return _0x1f4869<0x0?'':_0x5ec678(0x163)+_0x1f4869;},[_0x56e4d3,_0x3f1303]=(0x0,_0x2b3aa2[_0x11aeb6(0x189)])((_0x3d2aa6==null?void 0x0:_0x3d2aa6['type'])===_0x2449a6?_0x3d2aa6['baseFieldId']:''),[_0x334987,_0x294eff]=(0x0,_0x2b3aa2[_0x11aeb6(0x189)])(_0x1bf414),_0x1807bc=(0x0,_0x2b3aa2[_0x11aeb6(0x260)])(!0x1),[_0x18d823,_0x24a115]=(0x0,_0x2b3aa2[_0x11aeb6(0x189)])(!0x1),_0xcb62d6=_0x355826[_0x11aeb6(0x399)](_0x543104,_0x520657,_0x3fa538),_0x29e8eb=_0x355826['getCollection'](_0x543104,_0x3fa538),_0x4d5163=_0xcb62d6==null?void 0x0:_0xcb62d6[_0x11aeb6(0x5cb)]['measure'][_0x761b9a],_0x48d2ae=!!(_0x4d5163&&_0x29e8eb&&(_0x29e8eb['fields'][_0x4d5163[_0x11aeb6(0x443)]]||_0x29e8eb[_0x11aeb6(0x1db)][_0x11aeb6(0x242)](_0x227441=>_0x227441['id']===_0x4d5163[_0x11aeb6(0x443)]))),_0x1875db=(_0xcb62d6&&_0x29e8eb&&_0x454b73?_0x53be85(_0xcb62d6,_0x29e8eb,_0x454b73):[])[_0x11aeb6(0x154)](_0x3afad3=>{const _0x1e9065=_0x11aeb6;let _0x2799de=_0x58bf59[_0x3afad3];return(_0x454b73==null?void 0x0:_0x454b73['baseItemMode'])===_0x1e9065(0x6a0)||!!(_0x2799de&&((_0x454b73==null?void 0x0:_0x454b73[_0x1e9065(0x6c6)])==='item-or-relative'||_0x2799de[_0x1e9065(0x180)][_0x1e9065(0x3d7)]>0x0));}),_0x195b17=_0x1875db[_0x11aeb6(0x23e)](_0x51d770=>({'label':_0xcb62d6[_0x11aeb6(0x5cb)][_0x11aeb6(0x4ce)][_0x51d770]['displayName'],'value':_0x51d770})),_0x19b509=_0xcb62d6==null?void 0x0:_0xcb62d6[_0x11aeb6(0x5cb)][_0x11aeb6(0x4ce)][_0x56e4d3],_0x2d8a23=_0x19b509&&_0x29e8eb&&(_0x29e8eb[_0x11aeb6(0x3b1)][_0x19b509[_0x11aeb6(0x443)]]??_0x29e8eb[_0x11aeb6(0x1db)][_0x11aeb6(0x242)](_0x226ce6=>_0x226ce6['id']===_0x19b509['dataFieldId'])),_0x304ea3=_0x58bf59[_0x56e4d3],_0x403519=(_0x304ea3==null?void 0x0:_0x304ea3['items']['map']((_0x327ff5,_0x1ab0b1)=>{const _0x1f82ae=_0x11aeb6;var _0x51dca1;let _0x37c78b=_0x304ea3['itemTypes'][_0x1ab0b1],_0x1a5e9d=(_0x51dca1=_0x304ea3[_0x1f82ae(0x509)])==null?void 0x0:_0x51dca1[_0x327ff5],_0x487d3e=_0x2bf750(_0x327ff5,_0x37c78b),_0x6dd827=_0x327ff5;return _0x487d3e?_0x6dd827=_0x2a67ed['t'](_0x487d3e):_0x1a5e9d===void 0x0?_0x37c78b===_0x55c699[_0x1f82ae(0x207)][_0x1f82ae(0x203)]?_0x6dd827=_0x2a67ed['t']('sheets-pivot-ui.showValuesAs.other'):(_0x37c78b===_0x55c699['PivotDataFieldDataTypeEnum'][_0x1f82ae(0x175)]||_0x37c78b===_0x55c699[_0x1f82ae(0x207)][_0x1f82ae(0x3b5)])&&_0x304ea3['format']&&(_0x6dd827=_0x1ed97c[_0x1f82ae(0x5f0)][_0x1f82ae(0x60b)](_0x304ea3[_0x1f82ae(0x60b)],Number(_0x327ff5))):_0x6dd827=_0x1a5e9d,{'label':_0x6dd827,'value':_0x1f82ae(0x163)+_0x1ab0b1,'itemKey':_0x327ff5};}))??[];(_0x454b73==null?void 0x0:_0x454b73[_0x11aeb6(0x6c6)])==='item-or-relative'&&_0x403519[_0x11aeb6(0x1c1)]({'label':_0x2a67ed['t']('sheets-pivot-ui.showValuesAs.previous'),'value':_0x11aeb6(0x19d),'itemKey':'','itemType':_0x55c699['PivotShowAsBaseItemTypeEnum'][_0x11aeb6(0x39a)]},{'label':_0x2a67ed['t'](_0x11aeb6(0x2b6)),'value':_0x11aeb6(0x680),'itemKey':'','itemType':_0x55c699[_0x11aeb6(0x22b)][_0x11aeb6(0x2bb)]});let _0x4a1788=_0x403519[_0x11aeb6(0x242)](_0x5135d2=>_0x5135d2[_0x11aeb6(0x66f)]===_0x334987),_0x2bee53=!!(_0x454b73!=null&&_0x454b73['baseItemMode']&&_0x454b73['baseItemMode']!==_0x11aeb6(0x6a0)),_0x47238e=!!(_0x454b73&&_0xcb62d6&&_0x29e8eb&&_0x48d2ae&&_0xcb62d6[_0x11aeb6(0x5cb)][_0x11aeb6(0x3e0)][_0x11aeb6(0x5fe)](_0x761b9a)&&_0x1875db[_0x11aeb6(0x5fe)](_0x56e4d3)&&_0x2d8a23&&(!_0x2bee53||_0x4a1788));return(0x0,_0x282aef['jsxs'])(_0x11aeb6(0x259),{'dir':_0x47638f,'children':[(0x0,_0x282aef[_0x11aeb6(0x567)])(_0x11aeb6(0x259),{'className':_0x11aeb6(0x1fa),'children':[(0x0,_0x282aef['jsx'])(_0x11aeb6(0x259),{'className':_0x11aeb6(0x362),'children':_0x2a67ed['t'](_0x11aeb6(0x6bf))}),(0x0,_0x282aef[_0x11aeb6(0x5bf)])(_0x3fc00c['Select'],{'className':_0x11aeb6(0x368),'value':_0x56e4d3,'options':_0x195b17,'onChange':_0x3eeb95=>{_0x3f1303(_0x3eeb95),_0x294eff('');}})]}),_0x2bee53&&(0x0,_0x282aef['jsxs'])(_0x11aeb6(0x259),{'className':_0x11aeb6(0x1fa),'children':[(0x0,_0x282aef[_0x11aeb6(0x5bf)])(_0x11aeb6(0x259),{'className':_0x11aeb6(0x362),'children':_0x2a67ed['t'](_0x11aeb6(0x332))}),(0x0,_0x282aef[_0x11aeb6(0x5bf)])(_0x3fc00c[_0x11aeb6(0x51b)],{'className':'univer-w-full','value':_0x334987,'options':_0x403519,'disabled':!_0x56e4d3,'onChange':_0x294eff})]}),(0x0,_0x282aef[_0x11aeb6(0x567)])(_0x11aeb6(0x259),{'className':_0x11aeb6(0x4b3),'children':[(0x0,_0x282aef[_0x11aeb6(0x5bf)])(_0x3fc00c['Button'],{'onClick':_0x10f3c7,'children':_0x2a67ed['t'](_0x11aeb6(0x2b5))}),(0x0,_0x282aef[_0x11aeb6(0x5bf)])(_0x3fc00c[_0x11aeb6(0x2f8)],{'variant':'primary','disabled':!_0x47238e||_0x18d823,'onClick':async()=>{const _0x7a203=_0x11aeb6;let _0x5e577a=_0x355826[_0x7a203(0x399)](_0x543104,_0x520657,_0x3fa538),_0x58a14c=_0x355826[_0x7a203(0x5c2)](_0x543104,_0x3fa538),_0x41e1bc=_0x5e577a==null?void 0x0:_0x5e577a[_0x7a203(0x5cb)][_0x7a203(0x39f)][_0x761b9a];if(!_0x454b73||!_0x5e577a||!_0x58a14c||!_0x41e1bc||_0x1807bc[_0x7a203(0x56b)]||!_0x5e577a['fieldsConfig']['valueFields'][_0x7a203(0x5fe)](_0x761b9a)||!(_0x58a14c[_0x7a203(0x3b1)][_0x41e1bc[_0x7a203(0x443)]]||_0x58a14c[_0x7a203(0x1db)]['find'](_0x39f09c=>_0x39f09c['id']===_0x41e1bc[_0x7a203(0x443)]))||!_0x53be85(_0x5e577a,_0x58a14c,_0x454b73)[_0x7a203(0x5fe)](_0x56e4d3)||_0x2bee53&&!_0x4a1788)return;let _0x476450={'type':_0x2449a6,'baseFieldId':_0x56e4d3,'baseItem':(_0x4a1788==null?void 0x0:_0x4a1788['itemKey'])??''};(_0x4a1788==null?void 0x0:_0x4a1788[_0x7a203(0x48f)])!==void 0x0&&(_0x476450[_0x7a203(0x240)]=_0x4a1788['itemType']),_0x1807bc[_0x7a203(0x56b)]=!0x0,_0x24a115(!0x0);try{await _0x563faf(_0x476450);}catch{}finally{_0x1807bc[_0x7a203(0x56b)]=!0x1,_0x24a115(!0x1);}},'children':_0x2a67ed['t'](_0x11aeb6(0x46e))})]})]});}let _0x31bcfe=_0x509b60=>{const _0x4f63d8=_0x34037b;let [_0xb5b0c5,_0x1d5591]=(0x0,_0x2b3aa2[_0x4f63d8(0x189)])(!0x1),_0x3a2cff=(0x0,_0x2ef21f[_0x4f63d8(0x1a2)])(_0x30e6e3);return(0x0,_0x2b3aa2[_0x4f63d8(0x39c)])(()=>{const _0x353cdd=_0x4f63d8;_0x3a2cff[_0x353cdd(0x587)](_0xb5b0c5);},[_0xb5b0c5,_0x3a2cff]),(0x0,_0x282aef[_0x4f63d8(0x5bf)])(_0x1e2b01[_0x4f63d8(0x316)],{..._0x509b60,'onFocusChange':_0x410107=>{const _0x5c7ebb=_0x4f63d8;var _0x468bb9;(_0x468bb9=_0x509b60[_0x5c7ebb(0x21e)])==null||_0x468bb9[_0x5c7ebb(0x56a)](_0x509b60,_0x410107),_0x1d5591(_0x410107);}});},_0x42f7a8=(_0x48ac48,_0x261a1d,_0x1436fb,_0x5d9b69,_0x20423c,_0x500b15)=>(0x0,_0x282aef[_0x34037b(0x5bf)])(_0x31bcfe,{'unitId':_0x48ac48,'subUnitId':_0x261a1d,'initialValue':_0x5d9b69,'onChange':(_0x9c2678,_0x452a75)=>_0x1436fb(_0x452a75),'maxRangeCount':0x1,'supportAcrossSheet':!0x0,'keepSheetReference':!0x0}),_0x13be1e=(_0x15aac0,_0x36861b)=>{const _0x374d94=_0x34037b;switch(_0x15aac0){case 0x1:return _0x36861b['t'](_0x374d94(0x3ef));case 0x0:return _0x36861b['t']('sheets-pivot-ui.msg.emptySourceRange');default:return'';}};function _0xb35b27(_0x538518){const _0x2a774c=_0x34037b;let {unitId:_0x5f3c76,sourceRange:_0x5c4abc,positionRange:_0x574322,sourceSheetName:_0x4c7e6e,positionSheetName:_0x31f244,onConfirm:_0x3fc489,onCancel:_0x1ea1b0}=_0x538518,_0x2fb0c5=(0x0,_0x2ef21f[_0x2a774c(0x1a2)])(_0x1ed97c[_0x2a774c(0x4ad)]),_0x280ce6=(0x0,_0x2ef21f['useDependency'])(_0x1ed97c[_0x2a774c(0x61a)]),_0x36e12d=_0x2fb0c5[_0x2a774c(0x412)](),_0x71aebf=_0x280ce6[_0x2a774c(0x538)](_0x5f3c76),_0x1bc703=(0x0,_0x2b3aa2['useMemo'])(()=>_0x71aebf[_0x2a774c(0x5fa)]()[_0x2a774c(0x42f)](),[_0x71aebf]),[_0x1af8a9,_0x818786]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(_0x5c4abc),[_0x513371,_0x1f1b0b]=(0x0,_0x2b3aa2['useState'])(_0x574322),[_0x361445,_0x22a0a7]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(_0x4c7e6e),[_0x359cd4,_0x510b5d]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(_0x31f244),_0x41db1a=(0x0,_0x2b3aa2[_0x2a774c(0x260)])(void 0x0),[_0x533716,_0x504726]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(),[_0x300ec4,_0x2f7489]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(_0x5ec675[_0x2a774c(0x666)]['New']),[_0x4898a7,_0x3ad98e]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(!0x0),[_0x18eddb,_0x3c16e0]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(!0x0),[_0x470b10,_0x107ce6]=(0x0,_0x2b3aa2[_0x2a774c(0x189)])(void 0x0);(0x0,_0x2b3aa2[_0x2a774c(0x39c)])(()=>{let _0x5ab0e0=_0x54f172(_0x71aebf['getSheetBySheetName'](_0x361445),_0x1af8a9);_0x3c16e0(_0x5ab0e0===0x2),_0x107ce6(_0x13be1e(_0x5ab0e0,_0x2fb0c5));},[_0x1af8a9,_0x361445,_0x71aebf,_0x2fb0c5]);let _0x3e0bd7=_0x4067ff=>{const _0xf14b3a=_0x2a774c;if((0x0,_0x43497d['serializeRangeWithSheet'])(_0x361445,_0x1af8a9)===_0x4067ff)return;let _0x19ba59=_0x4067ff[_0xf14b3a(0x66d)](',')[_0xf14b3a(0x154)](_0x57bfea=>!!_0x57bfea)[_0xf14b3a(0x23e)](_0x43497d[_0xf14b3a(0x174)]);if(Array[_0xf14b3a(0x49e)](_0x19ba59)&&_0x19ba59[_0xf14b3a(0x3d7)]>0x0){let {range:_0x51699b,sheetName:_0x770a5c}=_0x19ba59[0x0];_0x818786(_0x51699b),_0x22a0a7(_0x770a5c);}_0x19ba59[0x0]||_0x107ce6(_0x2fb0c5['t'](_0xf14b3a(0x51a)));},_0x1df00d=_0x42f7a8(_0x5f3c76,_0x1bc703,_0x45bb1d=>{const _0x646b2d=_0x2a774c;if(_0x513371&&(0x0,_0x43497d[_0x646b2d(0x2f2)])(_0x359cd4,_0x513371)===_0x45bb1d)return;let _0x32e061=_0x45bb1d[_0x646b2d(0x66d)](',')[_0x646b2d(0x154)](_0x40613a=>!!_0x40613a)[_0x646b2d(0x23e)](_0x43497d['deserializeRangeWithSheet']);if(_0x32e061[_0x646b2d(0x3d7)]===0x0){_0x1f1b0b(null);return;}let _0x1050fb=_0x32e061[0x0];_0x1f1b0b(_0x1050fb[_0x646b2d(0x22d)]),_0x510b5d(_0x1050fb[_0x646b2d(0x3fa)]||_0x4c7e6e),_0x1050fb[_0x646b2d(0x3fa)]===_0x4c7e6e&&_0x1ed97c['Rectangle'][_0x646b2d(0x1f9)](_0x1050fb[_0x646b2d(0x22d)],_0x1af8a9)?_0x3ad98e(!0x1):_0x3ad98e(!0x0);},_0x513371?(0x0,_0x43497d[_0x2a774c(0x2f2)])(_0x359cd4,_0x513371):'',!0x1,_0x533716),_0x3c230e=()=>!!(_0x1af8a9&&_0x513371&&_0x361445&&_0x359cd4&&_0x300ec4===_0x5ec675['PositionType']['Existing']&&_0x4898a7&&_0x18eddb)||!!(_0x1af8a9&&_0x361445&&_0x300ec4===_0x5ec675[_0x2a774c(0x666)][_0x2a774c(0x340)]&&_0x18eddb);return(0x0,_0x2b3aa2[_0x2a774c(0x39c)])(()=>{const _0x33de7b=_0x2a774c;_0x504726(_0x41db1a[_0x33de7b(0x56b)]);},[]),(0x0,_0x282aef['jsxs'])(_0x2a774c(0x259),{'ref':_0x41db1a,'dir':_0x36e12d,'children':[(0x0,_0x282aef[_0x2a774c(0x5bf)])('div',{'className':_0x2a774c(0x68a),'children':_0x2fb0c5['t']('sheets-pivot-ui.dialog.source.sourceData')}),_0x42f7a8(_0x5f3c76,_0x1bc703,_0x3e0bd7,(0x0,_0x43497d[_0x2a774c(0x2f2)])(_0x361445,_0x1af8a9),!0x0,_0x533716),_0x470b10&&(0x0,_0x282aef[_0x2a774c(0x5bf)])(_0x2a774c(0x259),{'className':_0x2a774c(0x4b6),'children':_0x470b10}),(0x0,_0x282aef['jsx'])('div',{'className':_0x2a774c(0x5be),'children':_0x2fb0c5['t']('sheets-pivot-ui.dialog.source.position')}),(0x0,_0x282aef[_0x2a774c(0x567)])(_0x3fc00c[_0x2a774c(0x4d3)],{'value':_0x300ec4,'onChange':_0x195bb4=>_0x2f7489(_0x195bb4),'className':_0x2a774c(0x38d),'children':[(0x0,_0x282aef[_0x2a774c(0x5bf)])(_0x3fc00c[_0x2a774c(0x485)],{'value':_0x5ec675[_0x2a774c(0x666)]['New'],'children':_0x2fb0c5['t']('sheets-pivot-ui.dialog.source.newSheet')}),(0x0,_0x282aef[_0x2a774c(0x5bf)])(_0x3fc00c[_0x2a774c(0x485)],{'value':_0x5ec675[_0x2a774c(0x666)]['Existing'],'children':_0x2fb0c5['t'](_0x2a774c(0x217))})]}),_0x300ec4===_0x5ec675[_0x2a774c(0x666)][_0x2a774c(0x327)]&&(0x0,_0x282aef['jsxs'])(_0x282aef[_0x2a774c(0x665)],{'children':[_0x1df00d,!_0x4898a7&&(0x0,_0x282aef['jsx'])(_0x2a774c(0x581),{'className':_0x2a774c(0x441),'children':_0x2fb0c5['t'](_0x2a774c(0x491))})]}),(0x0,_0x282aef['jsx'])(_0x2a774c(0x6c3),{'className':_0x2a774c(0x697),'children':(0x0,_0x282aef[_0x2a774c(0x567)])(_0x3fc00c[_0x2a774c(0x17f)],{'className':'univer-flex\x20univer-justify-end\x20univer-gap-2','children':[(0x0,_0x282aef[_0x2a774c(0x5bf)])(_0x3fc00c[_0x2a774c(0x2f8)],{'onClick':()=>_0x1ea1b0(),'children':_0x2fb0c5['t'](_0x2a774c(0x643))}),(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x2a774c(0x2f8)],{'variant':_0x2a774c(0x326),'onClick':()=>{const _0x4f72d1=_0x2a774c;_0x3c230e()&&(_0x300ec4===_0x5ec675[_0x4f72d1(0x666)][_0x4f72d1(0x327)]?_0x3fc489({'sourceRange':_0x1af8a9,'sourceSheetName':_0x361445,'positionRange':_0x513371,'positionSheetName':_0x359cd4,'positionType':_0x300ec4}):_0x3fc489({'sourceRange':_0x1af8a9,'sourceSheetName':_0x361445,'positionType':_0x300ec4}));},'children':_0x2fb0c5['t'](_0x2a774c(0x604))})]})})]});}_0xb35b27['componentKey']=_0x34436c;let _0x46b1f7=[{'id':_0x34037b(0x166),'localeKey':_0x34037b(0x4df),'operator':_0x55c699[_0x34037b(0x2e7)]['valueEqual']},{'id':_0x34037b(0x531),'localeKey':'sheets-pivot-ui.valueFilter.notEqual','operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x49c)]},{'id':_0x34037b(0x653),'localeKey':_0x34037b(0x1c9),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x51d)]},{'id':_0x34037b(0x4b0),'localeKey':_0x34037b(0x378),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x3b0)]},{'id':_0x34037b(0x4fd),'localeKey':_0x34037b(0x4b7),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x5f1)]},{'id':_0x34037b(0x252),'localeKey':_0x34037b(0x139),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x527)]},{'id':_0x34037b(0x27a),'localeKey':_0x34037b(0x4d8),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x601)],'isBetween':!0x0},{'id':'notBetween','localeKey':_0x34037b(0x2c8),'operator':_0x55c699[_0x34037b(0x2e7)]['valueNotBetween'],'isBetween':!0x0},{'id':'topCount','localeKey':_0x34037b(0x510),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x607)],'isCount':!0x0},{'id':_0x34037b(0x637),'localeKey':_0x34037b(0x695),'operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x607)],'isBottom':!0x0,'isCount':!0x0},{'id':_0x34037b(0x16e),'localeKey':'sheets-pivot-ui.valueFilter.topPercent','operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x4ca)],'isPercent':!0x0},{'id':_0x34037b(0x30e),'localeKey':'sheets-pivot-ui.valueFilter.bottomPercent','operator':_0x55c699[_0x34037b(0x2e7)][_0x34037b(0x4ca)],'isBottom':!0x0,'isPercent':!0x0}];function _0x4fdd07({targetFieldId:_0xbeacb,targetFieldName:_0x4ccdf5,valueFields:_0x27a568,defaultValueFieldId:_0x4682dd,currentFilter:_0x19b15f,onConfirm:_0x5e3822,onClear:_0x3cc7e1,onCancel:_0x22a875}){const _0x51459c=_0x34037b;function _0x6f9285(_0x1b9483){const _0x18a187=_0x5115;var _0x4e5f38;return(_0x1b9483==null?void 0x0:_0x1b9483[_0x18a187(0x543)])===_0x55c699[_0x18a187(0x2e7)]['count']?_0x1b9483[_0x18a187(0x57e)]?_0x18a187(0x637):'topCount':(_0x1b9483==null?void 0x0:_0x1b9483[_0x18a187(0x543)])===_0x55c699[_0x18a187(0x2e7)][_0x18a187(0x4ca)]?_0x1b9483[_0x18a187(0x57e)]?_0x18a187(0x30e):'topPercent':((_0x4e5f38=_0x46b1f7[_0x18a187(0x242)](_0x49e381=>_0x49e381[_0x18a187(0x543)]===(_0x1b9483==null?void 0x0:_0x1b9483[_0x18a187(0x543)])))==null?void 0x0:_0x4e5f38['id'])??_0x18a187(0x653);}let _0x719f2=(0x0,_0x2ef21f[_0x51459c(0x1a2)])(_0x1ed97c['LocaleService']),_0x5af3e3=(0x0,_0x2ef21f[_0x51459c(0x22f)])(_0x719f2[_0x51459c(0x24d)],_0x719f2[_0x51459c(0x412)]()),_0x1f2d37=_0x19b15f==null?void 0x0:_0x19b15f['expected'],[_0x4eb328,_0x3639af]=(0x0,_0x2b3aa2[_0x51459c(0x189)])(()=>{const _0x4d3bdf=_0x51459c;let _0x90dc5e=_0x19b15f==null?void 0x0:_0x19b15f[_0x4d3bdf(0x2ea)];return _0x90dc5e&&_0x27a568[_0x4d3bdf(0x370)](_0x484b11=>_0x484b11['id']===_0x90dc5e)?_0x90dc5e:_0x4682dd&&_0x27a568[_0x4d3bdf(0x370)](_0x3c49db=>_0x3c49db['id']===_0x4682dd)?_0x4682dd:_0x27a568[_0x4d3bdf(0x3d7)]===0x1?_0x27a568[0x0]['id']:'';}),[_0x42004b,_0x1bfbc1]=(0x0,_0x2b3aa2[_0x51459c(0x189)])(()=>_0x6f9285(_0x19b15f)),[_0x502b22,_0x2bf337]=(0x0,_0x2b3aa2[_0x51459c(0x189)])(()=>String(Array[_0x51459c(0x49e)](_0x1f2d37)?_0x1f2d37[0x0]:_0x1f2d37??0x0)),[_0x599a35,_0x2e1eec]=(0x0,_0x2b3aa2[_0x51459c(0x189)])(()=>String(Array[_0x51459c(0x49e)](_0x1f2d37)?_0x1f2d37[0x1]:0x0)),_0x38e8fc=(0x0,_0x2b3aa2['useRef'])(!0x1),[_0x5d0bed,_0x994b8f]=(0x0,_0x2b3aa2['useState'])(!0x1),_0x2059e7=_0x46b1f7[_0x51459c(0x242)](_0x5cf637=>_0x5cf637['id']===_0x42004b),_0x22b305=_0x502b22['trim']()!==''&&Number[_0x51459c(0x69a)](Number(_0x502b22)),_0x5e2ba5=!_0x2059e7[_0x51459c(0x264)]||_0x599a35['trim']()!==''&&Number[_0x51459c(0x69a)](Number(_0x599a35)),_0x472482=!_0x2059e7['isCount']||Number['isInteger'](Number(_0x502b22))&&Number(_0x502b22)>=0x1,_0x30331a=!_0x2059e7['isPercent']||Number(_0x502b22)>=0x0&&Number(_0x502b22)<=0x64,_0x227c3b=!!(_0x27a568['some'](_0x295f7d=>_0x295f7d['id']===_0x4eb328)&&_0x22b305&&_0x5e2ba5&&_0x472482&&_0x30331a),_0x22c341=async _0x4bbd00=>{const _0x3af099=_0x51459c;if(!_0x38e8fc[_0x3af099(0x56b)]){_0x38e8fc['current']=!0x0,_0x994b8f(!0x0);try{await _0x4bbd00();}catch{}finally{_0x38e8fc[_0x3af099(0x56b)]=!0x1,_0x994b8f(!0x1);}}},_0x327836=()=>_0x22c341(async()=>{const _0xe5efa9=_0x51459c;if(!_0x227c3b)return;let _0x242f3c={'operator':_0x2059e7[_0xe5efa9(0x543)],'expected':_0x2059e7[_0xe5efa9(0x264)]?[Number(_0x502b22),Number(_0x599a35)]:Number(_0x502b22),'valueFieldId':_0x4eb328};_0x2059e7[_0xe5efa9(0x57e)]&&(_0x242f3c[_0xe5efa9(0x57e)]=!0x0),await _0x5e3822(_0x242f3c);}),_0x105b31=()=>_0x22c341(_0x3cc7e1);return(0x0,_0x282aef[_0x51459c(0x567)])('div',{'className':'univer-flex\x20univer-flex-col\x20univer-gap-4','data-target-field-id':_0xbeacb,'dir':_0x5af3e3,'children':[(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x51459c(0x259),{'className':_0x51459c(0x608),'children':(0x0,_0x282aef['jsx'])(_0x51459c(0x498),{'dir':_0x51459c(0x6aa),'children':_0x4ccdf5})}),(0x0,_0x282aef[_0x51459c(0x567)])(_0x51459c(0x5b6),{'className':_0x51459c(0x239),'children':[_0x719f2['t']('sheets-pivot-ui.valueFilter.valueField'),(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x3fc00c[_0x51459c(0x51b)],{'aria-label':_0x719f2['t'](_0x51459c(0x3cd)),'data-testid':_0x51459c(0x5c0),'value':_0x4eb328,'options':[{'value':'','label':_0x719f2['t'](_0x51459c(0x3db))},..._0x27a568[_0x51459c(0x23e)](_0x57dc15=>({'value':_0x57dc15['id'],'label':_0x57dc15[_0x51459c(0x5b6)]}))],'onChange':_0x3639af})]}),(0x0,_0x282aef[_0x51459c(0x567)])(_0x51459c(0x5b6),{'className':_0x51459c(0x239),'children':[_0x719f2['t'](_0x51459c(0x157)),(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x3fc00c[_0x51459c(0x51b)],{'aria-label':_0x719f2['t'](_0x51459c(0x157)),'data-testid':'pivot-value-filter-rule','value':_0x42004b,'options':_0x46b1f7['map'](_0x296980=>({'value':_0x296980['id'],'label':_0x719f2['t'](_0x296980['localeKey'])})),'onChange':_0x447e71=>_0x1bfbc1(_0x447e71)})]}),(0x0,_0x282aef['jsxs'])(_0x51459c(0x259),{'className':_0x51459c(0x2ed),'children':[(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x3fc00c[_0x51459c(0x45e)],{'aria-label':_0x719f2['t']('sheets-pivot-ui.valueFilter.condition'),'aria-invalid':!_0x22b305||!_0x472482||!_0x30331a,'className':_0x51459c(0x458),'data-testid':_0x51459c(0x182),'inputMode':_0x51459c(0x374),'value':_0x502b22,'onChange':_0x2bf337}),_0x2059e7[_0x51459c(0x264)]&&(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x51459c(0x45e)],{'aria-label':_0x719f2['t'](_0x51459c(0x157)),'aria-invalid':!_0x5e2ba5,'className':_0x51459c(0x458),'data-testid':_0x51459c(0x182),'inputMode':'decimal','value':_0x599a35,'onChange':_0x2e1eec})]}),(0x0,_0x282aef['jsxs'])('div',{'className':_0x51459c(0x3e7),'children':[(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x3fc00c[_0x51459c(0x2f8)],{'data-testid':_0x51459c(0x336),'disabled':_0x5d0bed,'onClick':_0x105b31,'children':_0x719f2['t'](_0x51459c(0x4f4))}),(0x0,_0x282aef[_0x51459c(0x567)])(_0x51459c(0x259),{'className':'univer-flex\x20univer-gap-3','children':[(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x3fc00c[_0x51459c(0x2f8)],{'disabled':_0x5d0bed,'onClick':_0x22a875,'children':_0x719f2['t'](_0x51459c(0x3c9))}),(0x0,_0x282aef[_0x51459c(0x5bf)])(_0x3fc00c[_0x51459c(0x2f8)],{'data-testid':_0x51459c(0x1a7),'variant':_0x51459c(0x326),'disabled':!_0x227c3b||_0x5d0bed,'onClick':_0x327836,'children':_0x719f2['t'](_0x51459c(0x57d))})]})]})]});}function _0x521789(_0x2653cc){const _0x5df876=_0x34037b;let {pivotTableId:_0x292775,tableFieldId:_0x4c5b67,closeFn:_0x149123,unitId:_0x580584,subUnitId:_0x5b7477,format:_0x258d18,tableFieldInfo:_0x264c65,dataFieldInfo:_0x389fd1,version:_0x224597}=_0x2653cc,[_0x45dbc8,_0x1d4355]=(0x0,_0x2b3aa2[_0x5df876(0x189)])(_0x264c65[_0x5df876(0x381)]),[_0x519502,_0x2fdb2f]=(0x0,_0x2b3aa2[_0x5df876(0x189)])(_0x264c65['subTotalType']),_0x5d89ed=(0x0,_0x2ef21f[_0x5df876(0x1a2)])(_0x1ed97c[_0x5df876(0x4ad)]),_0x2d83c3=(0x0,_0x2ef21f[_0x5df876(0x1a2)])(_0x1ed97c[_0x5df876(0x4ab)]),_0x172b5f=(0x0,_0x2ef21f[_0x5df876(0x1a2)])(_0x2ef21f[_0x5df876(0x2e3)]),_0xea88b0={...(0x0,_0x2ef21f[_0x5df876(0x1a2)])(_0x5ec675[_0x5df876(0x1c2)])['getTextInfo']()};for(let _0x44c9c8 of[_0x5df876(0x3a2),_0x5df876(0x6dc),_0x5df876(0x2eb),_0x5df876(0x5af),_0x5df876(0x324),_0x5df876(0x4fe),_0x5df876(0x6b1),_0x5df876(0x418),'sheets-pivot-ui.sumName',_0x5df876(0x4ec),'sheets-pivot-ui.varpName'])_0xea88b0[_0x44c9c8]=_0x5d89ed['t'](_0x44c9c8);if((0x0,_0x2b3aa2[_0x5df876(0x39c)])(()=>{const _0x15cea3=_0x5df876;_0x1d4355(_0x264c65['displayName']),_0x2fdb2f(_0x264c65[_0x15cea3(0x69e)]);},[_0x224597]),!_0x264c65||!_0x389fd1)return;let _0x4aad14=_0x389fd1[_0x5df876(0x3a1)],_0xe166f5=_0x5d89ed[_0x5df876(0x412)](),_0x4db1a2=_0x258d18??_0x264c65[_0x5df876(0x60b)],_0x4a33d4=_0x3d67b4[_0x5df876(0x23e)](_0x52196d=>({'value':''+_0x52196d[_0x5df876(0x490)],'type':_0x52196d[_0x5df876(0x490)],'label':_0x5d89ed['t'](_0x52196d[_0x5df876(0x2b1)])})),_0x5c0fd1=_0x109fc1=>{const _0x5e0d19=_0x5df876;let _0x20bc2d=_0x109fc1;if(Array[_0x5e0d19(0x49e)](_0x109fc1)&&(_0x20bc2d=_0x109fc1[0x0]),_0x20bc2d!==void 0x0){let _0x4d9fc3=Number(_0x20bc2d);_0x2fdb2f(_0x4d9fc3),_0x4c990d(_0x4aad14,_0x45dbc8,_0xea88b0)&&_0x1d4355(_0x4d7bab(_0x4aad14,_0xea88b0,_0x4d9fc3));}};return(0x0,_0x282aef[_0x5df876(0x567)])('div',{'dir':_0xe166f5,'children':[(0x0,_0x282aef[_0x5df876(0x567)])(_0x5df876(0x259),{'className':'univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-self-stretch\x20univer-leading-5','children':[(0x0,_0x282aef[_0x5df876(0x5bf)])('span',{'className':_0x5df876(0x18b),'children':_0x5d89ed['t'](_0x5df876(0x5dd))}),(0x0,_0x282aef[_0x5df876(0x5bf)])('span',{'className':_0x5df876(0x1dc),'children':_0x225775(_0x5d89ed['t'](_0x5df876(0x1f2)),_0x4aad14)})]}),(0x0,_0x282aef['jsx'])(_0x5df876(0x259),{'children':(0x0,_0x282aef[_0x5df876(0x5bf)])(_0x3fc00c[_0x5df876(0x45e)],{'className':'univer-mb-5\x20univer-mt-2\x20univer-box-border\x20univer-h-8\x20univer-w-full\x20univer-rounded-md\x20univer-py-1.5\x20univer-text-sm\x20univer-leading-5','value':_0x45dbc8,'onChange':_0xda410e=>_0x1d4355(_0xda410e)})}),(0x0,_0x282aef[_0x5df876(0x5bf)])('label',{'className':_0x5df876(0x3be),'children':_0x5d89ed['t'](_0x5df876(0x5cc))}),(0x0,_0x282aef['jsx'])(_0x5df876(0x259),{'className':(0x0,_0x3fc00c[_0x5df876(0x4e2)])(_0x5df876(0x411),_0x3fc00c[_0x5df876(0x4c1)],_0x3fc00c[_0x5df876(0x6cd)]),'children':_0x4a33d4[_0x5df876(0x23e)](_0x4b4d0b=>(0x0,_0x282aef[_0x5df876(0x567)])('div',{'className':_0x5df876(0x5bd),'onClick':()=>_0x5c0fd1(_0x4b4d0b['value']),'children':[(0x0,_0x282aef[_0x5df876(0x5bf)])('span',{'className':_0x5df876(0x25e),'children':(0x0,_0x282aef[_0x5df876(0x5bf)])(_0x3e7ec4,{'className':(0x0,_0x3fc00c[_0x5df876(0x4e2)])({'univer-hidden':_0x519502!==_0x4b4d0b[_0x5df876(0x490)]})})}),(0x0,_0x282aef['jsx'])('span',{'children':_0x4b4d0b['label']})]},_0x4b4d0b[_0x5df876(0x490)]))}),(0x0,_0x282aef[_0x5df876(0x5bf)])(_0x5df876(0x6c3),{'className':_0x5df876(0x697),'children':(0x0,_0x282aef[_0x5df876(0x567)])(_0x3fc00c[_0x5df876(0x17f)],{'className':'univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-self-stretch','children':[(0x0,_0x282aef['jsx'])(_0x3fc00c[_0x5df876(0x2f8)],{'className':_0x5df876(0x678),'onClick':()=>{const _0x5ef72c=_0x5df876;let _0x28e465={'id':_0x178877,'draggable':!0x0,'mask':!0x1,'maskClosable':!0x1,'width':0x190,'children':{'label':_0x3ff5dc,'unitId':_0x580584,'subUnitId':_0x5b7477,'pivotTableId':_0x292775,'tableFieldId':_0x4c5b67,'originPattern':_0x4db1a2,'tableFieldInfo':_0x264c65,'dataFieldInfo':_0x389fd1},'dialogStyles':{'header':{'padding':_0x5ef72c(0x257),'height':0x0},'body':{'padding':_0x5ef72c(0x19c)}},'closable':!0x1,'onClose':()=>{const _0x44b7c5=_0x5ef72c;_0x172b5f[_0x44b7c5(0x6a2)](_0x178877);}};_0x172b5f[_0x5ef72c(0x245)](_0x28e465);},'children':_0x5d89ed['t'](_0x5df876(0x426))}),(0x0,_0x282aef[_0x5df876(0x567)])(_0x3fc00c[_0x5df876(0x17f)],{'className':_0x5df876(0x6cf),'children':[(0x0,_0x282aef['jsx'])(_0x3fc00c['Button'],{'onClick':()=>{_0x149123&&_0x149123();},'children':_0x5d89ed['t'](_0x5df876(0x643))}),(0x0,_0x282aef['jsx'])(_0x3fc00c['Button'],{'variant':_0x5df876(0x326),'disabled':_0x45dbc8==='','onClick':()=>{const _0x2ef089=_0x5df876;let _0x2e411c=_0x264c65[_0x2ef089(0x381)],_0x50d656=_0x264c65[_0x2ef089(0x69e)],_0x41b423=_0x264c65[_0x2ef089(0x60b)],_0x3964b3=_0x2e411c===_0x45dbc8?void 0x0:_0x45dbc8,_0x5d9ad0=_0x50d656===_0x519502?void 0x0:_0x519502,_0x50103d=_0x41b423===_0x4db1a2?void 0x0:_0x4db1a2;if(_0x2e411c!==_0x45dbc8||_0x50d656!==_0x519502||_0x41b423!==_0x50103d){let _0x155cda={'displayName':_0x3964b3,'subtotalType':_0x5d9ad0,'format':_0x50103d,'tableFieldId':_0x4c5b67,'pivotTableId':_0x292775,'unitId':_0x580584,'subUnitId':_0x5b7477,'tableFieldInfo':_0x264c65,'dataFieldInfo':_0x389fd1};_0x2d83c3[_0x2ef089(0x1cd)](_0x5ec675[_0x2ef089(0x21a)]['id'],_0x155cda);}_0x149123&&_0x149123();},'children':_0x5d89ed['t'](_0x5df876(0x604))})]})]})})]});}let _0x1f5725=class extends _0x1ed97c['Disposable']{constructor(_0x5464ec,_0xe70ce7){const _0x33f29f=_0x34037b;super(),this[_0x33f29f(0x6d1)]=_0x5464ec,this['_iconManager']=_0xe70ce7,this[_0x33f29f(0x22e)](),this[_0x33f29f(0x65d)]();}[_0x34037b(0x22e)](){[[_0x34436c,_0xb35b27],[_0x4a650f,_0x3bfb25],[_0x32bf4e,_0x45dd71],[_0xce0285,_0x521789],[_0x3ff5dc,_0xf984f4],[_0x2ac0fe,_0x45914a],[_0x594d0c,_0x4fdd07],[_0x88d50d,_0x38f730],[_0x337ca9,_0x17d3c3],[_0x195935,_0x1c535a]]['forEach'](([_0x2b2844,_0x4b4885])=>{const _0xb0d0bb=_0x5115;this['disposeWithMe'](this['_componentManager'][_0xb0d0bb(0x2ae)](_0x2b2844,_0x4b4885));});}[_0x34037b(0x65d)](){const _0xd88531=_0x34037b;this[_0xd88531(0x2a7)](this[_0xd88531(0x4c3)][_0xd88531(0x2ae)]({'PivotTableIcon':_0x4aa130}));}};_0x1f5725=_0x41bfa1([_0x5e4599(0x0,(0x0,_0x1ed97c['Inject'])(_0x2ef21f['ComponentManager'])),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x2ef21f[_0x34037b(0x3a5)]))],_0x1f5725);let _0x2648bd=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x4221f6){const _0x4e8460=_0x34037b;super(),this[_0x4e8460(0x36c)]=_0x4221f6,this[_0x4e8460(0x380)]();}[_0x34037b(0x380)](){const _0x16d951=_0x34037b;this[_0x16d951(0x36c)]['mergeMenu'](_0xe95c8);}};_0x2648bd=_0x41bfa1([_0x5e4599(0x0,_0x2ef21f['IMenuManagerService'])],_0x2648bd);let _0x17d8d3=class extends _0x1ed97c['Disposable']{constructor(_0x222f3e,_0x16877a,_0x36687b,_0x3d94a1,_0x2f3b24,_0x3681e7,_0x3fd0c4,_0xc31d37,_0x1c3223,_0x1ffb9f,_0x48554d){const _0x3eab34=_0x34037b;super(),this[_0x3eab34(0x2f1)]=_0x222f3e,this['_injector']=_0x16877a,this[_0x3eab34(0x3c6)]=_0x36687b,this[_0x3eab34(0x6da)]=_0x3d94a1,this[_0x3eab34(0x5e9)]=_0x2f3b24,this[_0x3eab34(0x170)]=_0x3681e7,this[_0x3eab34(0x206)]=_0x3fd0c4,this[_0x3eab34(0x5ef)]=_0xc31d37,this[_0x3eab34(0x535)]=_0x1c3223,this[_0x3eab34(0x281)]=_0x1ffb9f,this[_0x3eab34(0x44b)]=_0x48554d,_0x27eded(this,'_pivotButtonShapesArr',[]),this[_0x3eab34(0x19f)](),this[_0x3eab34(0x1c6)](),this[_0x3eab34(0x2ce)](),this[_0x3eab34(0x36d)]();}[_0x34037b(0x36d)](){const _0x3201f6=_0x34037b;let _0x2b4c9a=_0x3201f6(0x5fd)+this[_0x3201f6(0x2f1)][_0x3201f6(0x6bb)];this[_0x3201f6(0x2a7)]((0x0,_0x3ae495['merge'])(this[_0x3201f6(0x281)]['selectionChanged$'],this[_0x3201f6(0x2f1)]['unit'][_0x3201f6(0x2d4)],this['_sheetsPivotTableAdaptorModel'][_0x3201f6(0x636)])[_0x3201f6(0x1dd)]((0x0,_0x3ae495[_0x3201f6(0x15b)])(0x0))[_0x3201f6(0x659)](()=>{const _0x4a9863=_0x3201f6;var _0x16995f,_0x35f13d,_0x11f2e0;let {unitId:_0x255686,unit:_0x4ca36f}=this['_context'],_0x59d5a9=this['_selectionsService']['currentSelectionParam'],_0x53efb1=(_0x16995f=_0x4ca36f[_0x4a9863(0x5fa)]())==null?void 0x0:_0x16995f['getSheetId'](),_0xaf7038=(_0x35f13d=this[_0x4a9863(0x281)][_0x4a9863(0x2f7)]())==null||(_0x35f13d=_0x35f13d[_0x4a9863(0x4fb)](-0x1)[0x0])==null?void 0x0:_0x35f13d[_0x4a9863(0x326)];if(!_0x53efb1||!_0xaf7038||(_0x59d5a9==null?void 0x0:_0x59d5a9[_0x4a9863(0x6bb)])!==_0x255686||_0x59d5a9[_0x4a9863(0x63e)]!==_0x53efb1){this[_0x4a9863(0x44b)][_0x4a9863(0x270)](_0x2b4c9a);return;}let {actualRow:_0x1ebc61,actualColumn:_0x3e145b}=_0xaf7038,_0xe0234e=this[_0x4a9863(0x3c6)],_0x4d5562=_0xe0234e['getPivotTableIdByCell'](_0x255686,_0x53efb1,_0x1ebc61,_0x3e145b),_0x36d55d=_0x4d5562&&((_0x11f2e0=_0xe0234e[_0x4a9863(0x3b8)](_0x255686,_0x53efb1,_0x4d5562))==null?void 0x0:_0x11f2e0[_0x4a9863(0x2c5)]);if(!_0x36d55d){this['_cellAlerts'][_0x4a9863(0x270)](_0x2b4c9a);return;}let _0x43c726=_0x4a9863(0x1c5);_0x36d55d['reason']===_0x4a9863(0x1a9)?_0x43c726=_0x4a9863(0x43a):_0x36d55d[_0x4a9863(0x401)]===_0x4a9863(0x39b)&&(_0x43c726=_0x4a9863(0x5c1)),this[_0x4a9863(0x44b)]['showAlert']({'key':_0x2b4c9a,'type':_0x21977c[_0x4a9863(0x5b0)][_0x4a9863(0x65b)],'title':this['_localeService']['t'](_0x4a9863(0x1b5)),'message':this[_0x4a9863(0x535)]['t'](_0x43c726,(0x0,_0x43497d[_0x4a9863(0x63f)])(_0x36d55d)),'location':{'unitId':_0x255686,'subUnitId':_0x53efb1,'row':_0x1ebc61,'col':_0x3e145b},'width':0x104,'height':0x60});})),this['disposeWithMe'](()=>this[_0x3201f6(0x44b)][_0x3201f6(0x270)](_0x2b4c9a));}['_initButtonRender'](){const _0x50f162=_0x34037b;this['disposeWithMe']((0x0,_0x3ae495[_0x50f162(0x39b)])(this[_0x50f162(0x3c6)][_0x50f162(0x636)][_0x50f162(0x1dd)]((0x0,_0x3ae495[_0x50f162(0x15b)])(0x0)),this[_0x50f162(0x6da)][_0x50f162(0x5f8)],this[_0x50f162(0x5e9)][_0x50f162(0x364)],this[_0x50f162(0x5ef)][_0x50f162(0x369)][_0x50f162(0x1dd)]((0x0,_0x3ae495['auditTime'])(0x64)))[_0x50f162(0x659)](()=>{const _0x4ca6a3=_0x50f162;if(!this[_0x4ca6a3(0x2f1)]['unit'])return;let _0x5aeefa=this[_0x4ca6a3(0x2f1)]['unitId'],_0x3f7c05=this[_0x4ca6a3(0x2f1)][_0x4ca6a3(0x1de)]['getActiveSheet']()[_0x4ca6a3(0x42f)](),{scene:_0xa7d46c}=this[_0x4ca6a3(0x2f1)],_0x54be6b=this[_0x4ca6a3(0x535)][_0x4ca6a3(0x412)](),_0x1e052d=this['_sheetSkeletonManagerService'][_0x4ca6a3(0x188)]();if(!_0x1e052d)return;let _0x668902=this[_0x4ca6a3(0x6a7)];_0x668902[_0x4ca6a3(0x596)](_0x1106c2=>_0x1106c2[_0x4ca6a3(0x5c4)]()),_0x668902[_0x4ca6a3(0x36a)](0x0,_0x668902[_0x4ca6a3(0x3d7)]),this[_0x4ca6a3(0x3c6)][_0x4ca6a3(0x62d)](_0x5aeefa,_0x3f7c05)[_0x4ca6a3(0x379)]((_0x1a1dd6,_0x475a37,_0xe39d79)=>{const _0x122c1c=_0x4ca6a3;if(_0xe39d79!=null&&_0xe39d79['pbt']){let _0x255191='sheets-pivot-button-'+_0x1a1dd6+'-'+_0x475a37+'-'+_0x5aeefa+'-'+_0x3f7c05,{startX:_0x45387b,startY:_0x30a263,endX:_0x1c98ff,endY:_0x4fbe28}=(0x0,_0x21977c[_0x122c1c(0x13b)])(_0x1a1dd6,_0x475a37,_0xa7d46c,_0x1e052d),_0xcea44b=_0x1c98ff-_0x45387b,_0x17c780=_0x4fbe28-_0x30a263;if(_0x17c780<0x8||_0xcea44b<0x8||this[_0x122c1c(0x206)]['permissionCheckWithRanges']({'workbookTypes':[_0x44d557['WorkbookEditablePermission']],'worksheetTypes':[_0x44d557['WorksheetViewPermission'],_0x44d557[_0x122c1c(0x422)],_0x44d557[_0x122c1c(0x64c)]],'rangeTypes':[_0x44d557['RangeProtectionPermissionViewPoint'],_0x44d557[_0x122c1c(0x60d)]]},[{'startRow':_0x1a1dd6,'endRow':_0x1a1dd6,'startColumn':_0x475a37,'endColumn':_0x475a37}],_0x5aeefa,_0x3f7c05)===!0x1)return;let _0xa675f7;if(_0x1325be[_0x122c1c(0x3bd)](_0xe39d79['pbt'])){let {left:_0x456f54,top:_0x38fdad}=_0x27c50b(_0x54be6b,_0x122c1c(0x154),{'startX':_0x45387b,'startY':_0x30a263,'endX':_0x1c98ff,'endY':_0x4fbe28});_0xa675f7={'left':_0x456f54,'top':_0x38fdad,'height':0x10,'width':0x10,'zIndex':0x1388,'cellWidth':_0xcea44b,'cellHeight':_0x17c780,'pivotParams':{'col':_0x475a37,'row':_0x1a1dd6,'unitId':_0x5aeefa,'subUnitId':_0x3f7c05,'buttonType':_0xe39d79['pbt']}};}else{if(_0x4d8d8b[_0x122c1c(0x3bd)](_0xe39d79[_0x122c1c(0x3d9)])){let {left:_0x3414de,top:_0x2ddc42}=_0x27c50b(_0x54be6b,_0x122c1c(0x65a),{'startX':_0x45387b,'startY':_0x30a263,'endX':_0x1c98ff,'endY':_0x4fbe28});_0xa675f7={'left':_0x3414de,'top':_0x2ddc42,'height':0x10,'width':0x10,'zIndex':0x1388,'cellWidth':_0xcea44b,'cellHeight':_0x17c780,'pivotParams':{'col':_0x475a37,'row':_0x1a1dd6,'unitId':_0x5aeefa,'subUnitId':_0x3f7c05,'buttonType':_0xe39d79[_0x122c1c(0x3d9)]}};}else return;}let _0x147a8e=this[_0x122c1c(0x51c)]['createInstance'](_0x63baa2,_0x255191,_0xa675f7);_0x668902['push'](_0x147a8e);}}),_0x668902[_0x4ca6a3(0x3d7)]&&_0xa7d46c[_0x4ca6a3(0x1da)](_0x668902),_0xa7d46c[_0x4ca6a3(0x4c2)]();}));}[_0x34037b(0x1c6)](){const _0x33c127=_0x34037b;var _0x42b545;this[_0x33c127(0x2a7)](this['_sheetsPivotTableAdaptorModel'][_0x33c127(0x12d)]['subscribe'](({unitId:_0x3680dd,subUnitId:_0xf9fecc})=>{const _0x361cb3=_0x33c127;if(_0x3680dd===this[_0x361cb3(0x2f1)][_0x361cb3(0x6bb)]&&(this[_0x361cb3(0x6da)][_0x361cb3(0x4c2)]({'sheetId':_0xf9fecc}),this['_context'][_0x361cb3(0x1de)]['getActiveSheet']()[_0x361cb3(0x42f)]()===_0xf9fecc)){var _0x19fbbe;this[_0x361cb3(0x6da)]['reCalculate'](),(_0x19fbbe=this[_0x361cb3(0x2f1)][_0x361cb3(0x16b)])==null||_0x19fbbe[_0x361cb3(0x4c2)]();}}));let _0x3bd59a=this[_0x33c127(0x2f1)][_0x33c127(0x6bb)];this[_0x33c127(0x2f1)][_0x33c127(0x1de)][_0x33c127(0x682)]()[_0x33c127(0x596)](_0xb499c9=>{const _0x23812a=_0x33c127;var _0x596eb2;let _0x2658eb=_0xb499c9[_0x23812a(0x42f)]();(_0x596eb2=this[_0x23812a(0x3c6)]['getSubUnitPivotRenderCache'](_0x3bd59a,_0x2658eb))!=null&&_0x596eb2[_0x23812a(0x32a)]&&this[_0x23812a(0x6da)][_0x23812a(0x4c2)]({'sheetId':_0x2658eb});}),this[_0x33c127(0x6da)][_0x33c127(0x5f2)](),(_0x42b545=this[_0x33c127(0x2f1)]['mainComponent'])==null||_0x42b545['makeDirty']();}['_initListener'](){const _0x3e3f37=_0x34037b;let _0x3b33a6=new _0x1ed97c['DisposableCollection'](),{spreadsheet:_0x16ec27}=(0x0,_0x21977c[_0x3e3f37(0x448)])(this[_0x3e3f37(0x2f1)][_0x3e3f37(0x1de)],this[_0x3e3f37(0x2f1)]);_0x3b33a6[_0x3e3f37(0x3d4)](_0x16ec27['onDblclick$'][_0x3e3f37(0x576)](_0x525286=>{const _0x4a5c08=_0x3e3f37;if(_0x525286[_0x4a5c08(0x63a)]===0x2)return;let _0x53566d=this[_0x4a5c08(0x6da)][_0x4a5c08(0x188)]();if(_0x53566d==null)return;let _0xe68680=this[_0x4a5c08(0x2f1)][_0x4a5c08(0x21b)],{row:_0x55cf0b,column:_0x124443}=(0x0,_0x21977c[_0x4a5c08(0x17b)])(_0x525286[_0x4a5c08(0x449)],_0x525286[_0x4a5c08(0x3d2)],_0xe68680,_0x53566d);this[_0x4a5c08(0x170)][_0x4a5c08(0x1cd)](_0x5ec675[_0x4a5c08(0x185)]['id'],{'row':_0x55cf0b,'col':_0x124443});}));}};_0x17d8d3=_0x41bfa1([_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x558)])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x21977c['SheetSkeletonManagerService'])),_0x5e4599(0x4,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675['SheetsPivotTableConfigModel'])),_0x5e4599(0x5,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ab)])),_0x5e4599(0x6,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557[_0x34037b(0x6ee)])),_0x5e4599(0x7,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x27c)])),_0x5e4599(0x8,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c['LocaleService'])),_0x5e4599(0x9,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557[_0x34037b(0x198)])),_0x5e4599(0xa,(0x0,_0x1ed97c['Inject'])(_0x21977c['CellAlertManagerService']))],_0x17d8d3);var _0x148076=class _0x49b835 extends _0x4134a1[_0x34037b(0x143)]{constructor(_0x29bf77){const _0x31698f=_0x34037b;super(_0x31698f(0x3fe)),_0x27eded(this,_0x31698f(0x40b),void 0x0),this['_moveType']=_0x29bf77;}[_0x34037b(0x28d)](_0x368f0f){const _0x3826b6=_0x34037b;this[_0x3826b6(0x3b2)]!==0x0&&this['height']!==0x0&&_0x49b835[_0x3826b6(0x4db)](_0x368f0f,this);}static['drawWith'](_0x207226,_0x335e12){const _0x50393d=_0x34037b;let _0x13f486=_0x335e12[_0x50393d(0x40b)];if(_0x207226[_0x50393d(0x69c)](),_0x207226['strokeStyle']='#8bc34a',_0x207226[_0x50393d(0x454)]=0x2,_0x13f486===_0x50393d(0x4b9)){let _0x480eeb=_0x335e12[_0x50393d(0x3b2)];if(!_0x480eeb)return;_0x207226[_0x50393d(0x59e)](),_0x207226[_0x50393d(0x5d0)](0x0,0x0),_0x207226[_0x50393d(0x65f)](0x0+_0x480eeb,0x0),_0x207226['moveTo'](0x0,-0xa),_0x207226[_0x50393d(0x65f)](0x0,0xa),_0x207226[_0x50393d(0x5d0)](0x0+_0x480eeb,-0xa),_0x207226[_0x50393d(0x65f)](0x0+_0x480eeb,0xa);}else{let _0x48044b=_0x335e12[_0x50393d(0x4da)];if(!_0x48044b)return;_0x207226['moveTo'](0x0,0x0),_0x207226[_0x50393d(0x65f)](0x0,0x0+_0x48044b),_0x207226[_0x50393d(0x5d0)](-0xa,0x0),_0x207226[_0x50393d(0x65f)](0xa,0x0),_0x207226[_0x50393d(0x5d0)](-0xa,0x0+_0x48044b),_0x207226[_0x50393d(0x65f)](0xa,0x0+_0x48044b);}_0x207226[_0x50393d(0x6d7)](),_0x207226[_0x50393d(0x42e)]();}};let _0x3bb0d9=class extends _0x1ed97c[_0x34037b(0x167)]{constructor(_0x10fa20,_0x2dc534,_0x44c97d,_0x200d8b,_0xd4bd,_0x2bde13){const _0x708ce9=_0x34037b;super(),this[_0x708ce9(0x2f1)]=_0x10fa20,this[_0x708ce9(0x3c6)]=_0x2dc534,this[_0x708ce9(0x6da)]=_0x44c97d,this[_0x708ce9(0x170)]=_0x200d8b,this[_0x708ce9(0x6c5)]=_0xd4bd,this[_0x708ce9(0x3ea)]=_0x2bde13,_0x27eded(this,_0x708ce9(0x49a),void 0x0),_0x27eded(this,'_scenePointerMoveSubscribe',void 0x0),_0x27eded(this,'_scenePointerUpSubscribe',void 0x0),_0x27eded(this,'_selectionControl',void 0x0),_0x27eded(this,'_moveStartRange',void 0x0),_0x27eded(this,_0x708ce9(0x3aa),void 0x0),_0x27eded(this,_0x708ce9(0x315),_0x708ce9(0x4b9)),_0x27eded(this,_0x708ce9(0x3c2),void 0x0),_0x27eded(this,_0x708ce9(0x3ab),void 0x0),this[_0x708ce9(0x615)]();}['_controlMoving'](_0x17814b,_0x53ae53){const _0x2a1e39=_0x34037b;let _0x51c4aa=this[_0x2a1e39(0x2f1)]['scene'],_0xf856ed=_0x51c4aa['getScrollXYInfoByViewport'](_0x4134a1[_0x2a1e39(0x150)][_0x2a1e39(0x554)]([_0x17814b,_0x53ae53])),{scaleX:_0x11a19,scaleY:_0x47bbd1}=_0x51c4aa[_0x2a1e39(0x591)](),_0x460041=this[_0x2a1e39(0x6da)][_0x2a1e39(0x188)]();if(!_0x460041||!this[_0x2a1e39(0x2fe)]||!this[_0x2a1e39(0x3aa)])return;let {row:_0xa1574d,column:_0x859f0}=_0x460041['getCellIndexByOffset'](_0x17814b,_0x53ae53,_0x11a19,_0x47bbd1,_0xf856ed);if(this[_0x2a1e39(0x315)]===_0x2a1e39(0x4b9)){var _0xe4384e;let _0x389baa=0x0,_0x1c7654=0x0,_0x3cde65=this[_0x2a1e39(0x2fe)][_0x2a1e39(0x406)]-this['_moveStartRange'][_0x2a1e39(0x564)]+0x1;if(this[_0x2a1e39(0x3aa)]['column']===this[_0x2a1e39(0x2fe)]['startColumn'])_0x389baa=_0x859f0,_0x1c7654=_0x859f0+_0x3cde65-0x1;else{if(this[_0x2a1e39(0x3aa)][_0x2a1e39(0x612)]===this['_moveStartRange'][_0x2a1e39(0x406)])_0x1c7654=_0x859f0,_0x389baa=_0x859f0-_0x3cde65+0x1;else{let _0x10b57a=this[_0x2a1e39(0x3aa)]['column']-this[_0x2a1e39(0x2fe)][_0x2a1e39(0x564)];_0x389baa=_0x859f0-_0x10b57a,_0x1c7654=_0x859f0-_0x10b57a+_0x3cde65-0x1;}}let _0x148214=_0x460041[_0x2a1e39(0x208)](_0xa1574d,_0x389baa),_0xe0e105=_0x460041[_0x2a1e39(0x208)](_0xa1574d,_0x1c7654),{startX:_0x24d6fe,endY:_0x4034f7}=_0x148214,{endX:_0x466056}=_0xe0e105;this['_targetRange']={'startRow':_0xa1574d,'endRow':_0xa1574d,'startColumn':_0x389baa,'endColumn':_0x1c7654},(_0xe4384e=this[_0x2a1e39(0x49a)])==null||_0xe4384e['transformByState']({'left':_0x24d6fe,'top':_0x4034f7,'width':_0x466056-_0x24d6fe,'height':0x14});}else{var _0x8fead7;let _0x39d08d=0x0,_0x305596=0x0,_0x5a01e2=this[_0x2a1e39(0x2fe)][_0x2a1e39(0x209)]-this[_0x2a1e39(0x2fe)][_0x2a1e39(0x6dd)]+0x1;if(this[_0x2a1e39(0x3aa)][_0x2a1e39(0x4b9)]===this[_0x2a1e39(0x2fe)][_0x2a1e39(0x6dd)])_0x39d08d=_0xa1574d,_0x305596=_0xa1574d+_0x5a01e2-0x1;else{if(this[_0x2a1e39(0x3aa)][_0x2a1e39(0x4b9)]===this[_0x2a1e39(0x2fe)][_0x2a1e39(0x209)])_0x305596=_0xa1574d,_0x39d08d=_0xa1574d-_0x5a01e2+0x1;else{let _0x38aa87=this['_moveStartCellIndex'][_0x2a1e39(0x4b9)]-this[_0x2a1e39(0x2fe)]['startRow'];_0x39d08d=_0xa1574d-_0x38aa87,_0x305596=_0xa1574d-_0x38aa87+_0x5a01e2-0x1;}}let _0x46595d=_0x460041[_0x2a1e39(0x208)](_0x39d08d,_0x859f0),_0x3f50eb=_0x460041['getCellWithCoordByIndex'](_0x305596,_0x859f0),{startX:_0x40984e,startY:_0x580157}=_0x46595d,{endY:_0x1485c3}=_0x3f50eb;this[_0x2a1e39(0x3c2)]={'startColumn':_0x859f0,'endColumn':_0x859f0,'startRow':_0x39d08d,'endRow':_0x305596},(_0x8fead7=this[_0x2a1e39(0x49a)])==null||_0x8fead7[_0x2a1e39(0x620)]({'left':_0x40984e,'top':_0x580157,'width':0x14,'height':_0x1485c3-_0x580157});}}[_0x34037b(0x58b)](_0x531b68){const _0x57e215=_0x34037b;var _0x18b27a,_0x58c167,_0xe91a01;(_0x18b27a=this['_selectionControl'])==null||_0x18b27a[_0x57e215(0x34e)](!0x1),this[_0x57e215(0x2f1)][_0x57e215(0x21b)][_0x57e215(0x158)](_0x4134a1[_0x57e215(0x20b)][_0x57e215(0x53a)]);let _0x200c1b=this[_0x57e215(0x3ea)]['getCurrentSelections']();if(!_0x200c1b[_0x57e215(0x3d7)]||_0x200c1b['length']>0x1)return;let _0x1e9955=_0x200c1b[0x0][_0x57e215(0x22d)],_0x2af1ce=this[_0x57e215(0x2f1)]['unit'],_0x54a9a0=_0x2af1ce[_0x57e215(0x5fa)](),_0x33889f=_0x2af1ce[_0x57e215(0x44c)](),_0x42b60a=_0x54a9a0[_0x57e215(0x42f)](),_0x2ceccc=this[_0x57e215(0x3c6)]['getSubUnitPivotRenderCache'](_0x33889f,_0x42b60a);if(!(_0x2ceccc!=null&&_0x2ceccc[_0x57e215(0x32a)]))return;let _0x34f00b=Array[_0x57e215(0x633)](_0x2ceccc)[_0x57e215(0x242)](([_0x1d9143,_0x4e85fc])=>{const _0x364799=_0x57e215;let {rangesInfo:_0x15b368}=_0x4e85fc;if(!_0x15b368)return!0x1;let {rowRanges:_0x3e78e4,colRanges:_0x2ab78a}=_0x15b368,_0x1941ce=_0x3e78e4[0x0],_0x543e29=_0x2ab78a[0x0],_0x2570e0=!0x1;return _0x1941ce&&(_0x2570e0=_0x1ed97c['Rectangle'][_0x364799(0x32e)](_0x1941ce,_0x1e9955),this['_moveRowOrCol']=_0x364799(0x4b9)),!_0x2570e0&&_0x543e29&&(_0x2570e0=_0x1ed97c[_0x364799(0x15f)]['realContain'](_0x543e29,_0x1e9955),this['_moveRowOrCol']=_0x364799(0x428)),_0x2570e0;});if(!_0x34f00b)return;this[_0x57e215(0x3ab)]=_0x34f00b[0x0],this[_0x57e215(0x49a)]||(this[_0x57e215(0x49a)]=new _0x148076(this[_0x57e215(0x315)]),this['_context']['scene'][_0x57e215(0x276)](this['_pivotSelectionMoveShape']));let _0x4f4d99=this[_0x57e215(0x2f1)]['scene'],_0x38de8a=this[_0x57e215(0x6da)][_0x57e215(0x188)]();if(!_0x38de8a)return;let {offsetX:_0x232591,offsetY:_0x193cfb}=_0x531b68,_0x5d5d55=_0x4f4d99['getCoordRelativeToViewport'](_0x4134a1[_0x57e215(0x150)][_0x57e215(0x554)]([_0x232591,_0x193cfb])),{x:_0x439eea,y:_0x212a90}=_0x5d5d55,_0x3157dd=_0x4f4d99[_0x57e215(0x2ca)](_0x5d5d55),{scaleX:_0x3da389,scaleY:_0x1c0cee}=_0x4f4d99[_0x57e215(0x591)](),{row:_0x299c0e,column:_0x29388c}=_0x38de8a[_0x57e215(0x492)](_0x439eea,_0x212a90,_0x3da389,_0x1c0cee,_0x3157dd),_0x345218=(_0x58c167=this['_selectionControl'])==null?void 0x0:_0x58c167['model'][_0x57e215(0x3b6)]();if(this['_moveStartRange']=_0x345218,!_0x345218)return;let _0x4fe5fc=0x0;_0x4fe5fc=_0x299c0e<_0x345218['startRow']?_0x345218[_0x57e215(0x6dd)]:_0x299c0e>_0x345218[_0x57e215(0x209)]?_0x345218[_0x57e215(0x209)]:_0x299c0e;let _0x5d4171=0x0;_0x5d4171=_0x29388c<_0x345218[_0x57e215(0x564)]?_0x345218['startColumn']:_0x29388c>_0x345218[_0x57e215(0x406)]?_0x345218[_0x57e215(0x406)]:_0x29388c,this[_0x57e215(0x3aa)]={'row':_0x4fe5fc,'column':_0x5d4171},(_0xe91a01=this[_0x57e215(0x4ef)])==null||_0xe91a01[_0x57e215(0x34e)](!0x0),this[_0x57e215(0x6ec)]=_0x4f4d99[_0x57e215(0x2c6)][_0x57e215(0x576)](_0x21eb9e=>{const _0x13ed7b=_0x57e215;let {offsetX:_0x540d31,offsetY:_0x3bd612}=_0x21eb9e,{x:_0x4353f1,y:_0xefed51}=_0x4f4d99[_0x13ed7b(0x3dd)](_0x4134a1[_0x13ed7b(0x150)][_0x13ed7b(0x554)]([_0x540d31,_0x3bd612]));this[_0x13ed7b(0x556)](_0x4353f1,_0xefed51),_0x4f4d99[_0x13ed7b(0x158)](_0x4134a1[_0x13ed7b(0x20b)][_0x13ed7b(0x669)]);}),this[_0x57e215(0x58d)]=_0x4f4d99[_0x57e215(0x54c)][_0x57e215(0x576)](_0x2add17=>{const _0x5141b6=_0x57e215;var _0x5cd238,_0x11a95c,_0x4d1ed2;(_0x5cd238=this['_scenePointerMoveSubscribe'])==null||_0x5cd238['unsubscribe'](),this[_0x5141b6(0x6ec)]=null,(_0x11a95c=this[_0x5141b6(0x4ef)])==null||_0x11a95c[_0x5141b6(0x34e)](!0x1),this[_0x5141b6(0x4ef)]=null,_0x4f4d99['setCursor'](_0x4134a1[_0x5141b6(0x20b)][_0x5141b6(0x53a)]),_0x4f4d99[_0x5141b6(0x4bd)](this[_0x5141b6(0x49a)]),this[_0x5141b6(0x49a)]=null,this['_updatePivotSort'](),(_0x4d1ed2=this[_0x5141b6(0x58d)])==null||_0x4d1ed2[_0x5141b6(0x1e6)](),this['_scenePointerUpSubscribe']=null;});}[_0x34037b(0x5a0)](){const _0x3845b8=_0x34037b;if(!this['_moveStartRange']||!this[_0x3845b8(0x3c2)]||!this[_0x3845b8(0x3ab)])return;let _0x1ebe92=this[_0x3845b8(0x2f1)][_0x3845b8(0x1de)][_0x3845b8(0x44c)](),_0x3c7438=this['_context'][_0x3845b8(0x1de)][_0x3845b8(0x5fa)]()[_0x3845b8(0x42f)]();if(this[_0x3845b8(0x315)]===_0x3845b8(0x4b9)){var _0x484a36;let _0x231c65=(_0x484a36=this[_0x3845b8(0x3c6)][_0x3845b8(0x4f1)](_0x1ebe92,_0x3c7438))==null?void 0x0:_0x484a36[_0x3845b8(0x339)](this['_movePivotId']);if(!_0x231c65)return;let _0x49e7c1=this[_0x3845b8(0x3c6)][_0x3845b8(0x62d)](_0x1ebe92,_0x3c7438);if(!_0x49e7c1)return;let _0xecef3a=[],_0x2ff2d0='',{headerMap:_0x1f6acf,rangesInfo:_0x17a670}=_0x231c65;for(let _0x4d1d76=this[_0x3845b8(0x2fe)][_0x3845b8(0x564)];_0x4d1d76<=this[_0x3845b8(0x2fe)][_0x3845b8(0x406)];_0x4d1d76++){var _0x2868ba;let _0x45a2b3=_0x1f6acf==null||(_0x2868ba=_0x1f6acf['rowHeaderMap'])==null?void 0x0:_0x2868ba[_0x4d1d76];if(!_0x45a2b3)continue;_0x2ff2d0=_0x45a2b3[_0x3845b8(0x520)];let _0x16748a=_0x17a670==null?void 0x0:_0x17a670['rowRanges'],_0x3b0bb1=_0x16748a==null?void 0x0:_0x16748a[0x0];if(!_0x3b0bb1)continue;let _0x232de7={..._0x3b0bb1,'startColumn':_0x4d1d76,'endColumn':_0x4d1d76};for(let _0x50b25b=_0x232de7[_0x3845b8(0x6dd)];_0x50b25b<=_0x232de7['endRow'];_0x50b25b++){let _0xd11fea=_0x49e7c1['getValue'](_0x50b25b,_0x4d1d76);if(!_0xd11fea)continue;let {v:_0x44eca3,pbt:_0xf05e87}=_0xd11fea;_0x44eca3&&_0xf05e87!==_0x55c699[_0x3845b8(0x65c)][_0x3845b8(0x43b)]&&_0xf05e87!==_0x55c699[_0x3845b8(0x65c)][_0x3845b8(0x6b5)]&&(typeof _0x44eca3==_0x3845b8(0x40c)?_0xecef3a[_0x50b25b]=_0x44eca3:typeof _0x44eca3==_0x3845b8(0x3b5)&&(_0xecef3a[_0x50b25b]=_0x44eca3['toString']()));}break;}if(!_0x2ff2d0)return;let _0x522edd=this['_moveStartRange'][_0x3845b8(0x6dd)],_0x9c209a=this['_moveStartRange'][_0x3845b8(0x209)]-this[_0x3845b8(0x2fe)]['startRow']+0x1,_0x1ff283=this[_0x3845b8(0x3c2)]['startRow'];if(_0x522edd<_0x1ff283){let _0x114bb2=_0xecef3a[_0x3845b8(0x36a)](_0x522edd,_0x9c209a);_0xecef3a[_0x3845b8(0x36a)](_0x1ff283-_0x9c209a,0x0,..._0x114bb2);}else{let _0x44158c=_0xecef3a[_0x3845b8(0x36a)](_0x522edd,_0x9c209a);_0xecef3a[_0x3845b8(0x36a)](_0x1ff283,0x0,..._0x44158c);}let _0x110532=_0xecef3a[_0x3845b8(0x154)](_0x4330a8=>_0x4330a8!==void 0x0);this[_0x3845b8(0x170)][_0x3845b8(0x1cd)](_0x5ec675[_0x3845b8(0x417)]['id'],{'unitId':_0x1ebe92,'subUnitId':_0x3c7438,'pivotTableId':this[_0x3845b8(0x3ab)],'tableFieldId':_0x2ff2d0,'info':{'type':_0x55c699[_0x3845b8(0x4fc)][_0x3845b8(0x25d)],'customOrder':_0x110532}});}else{var _0x4c35fc;let _0x2509a5=(_0x4c35fc=this[_0x3845b8(0x3c6)][_0x3845b8(0x4f1)](_0x1ebe92,_0x3c7438))==null?void 0x0:_0x4c35fc[_0x3845b8(0x339)](this[_0x3845b8(0x3ab)]);if(!_0x2509a5)return;let _0x3402e9=this[_0x3845b8(0x3c6)][_0x3845b8(0x62d)](_0x1ebe92,_0x3c7438);if(!_0x3402e9)return;let _0x4e6ad3=[],_0x153053='',{headerMap:_0x3886cc,rangesInfo:_0x2ad6d8}=_0x2509a5;for(let _0x8f341a=this[_0x3845b8(0x2fe)][_0x3845b8(0x6dd)];_0x8f341a<=this[_0x3845b8(0x2fe)]['endRow'];_0x8f341a++){var _0xd45a08;let _0x150534=_0x3886cc==null||(_0xd45a08=_0x3886cc['colHeaderMap'])==null?void 0x0:_0xd45a08[_0x8f341a];if(!_0x150534)continue;_0x153053=_0x150534[_0x3845b8(0x520)];let _0x10325e=_0x2ad6d8==null?void 0x0:_0x2ad6d8[_0x3845b8(0x53c)],_0x2942dd=_0x10325e==null?void 0x0:_0x10325e[0x0];if(!_0x2942dd)continue;let _0x50ece1={..._0x2942dd,'startRow':_0x8f341a,'endRow':_0x8f341a};for(let _0x4e69a8=_0x50ece1[_0x3845b8(0x564)];_0x4e69a8<=_0x50ece1[_0x3845b8(0x406)];_0x4e69a8++){let _0x4b0be9=_0x3402e9['getValue'](_0x8f341a,_0x4e69a8);if(!_0x4b0be9)continue;let {v:_0x33cffa,pbt:_0x5b254b}=_0x4b0be9;if(_0x33cffa&&_0x5b254b!==_0x55c699['PivotCellStyleTypeEnum'][_0x3845b8(0x43b)]&&_0x5b254b!==_0x55c699['PivotCellStyleTypeEnum'][_0x3845b8(0x6b5)]){if(typeof _0x33cffa==_0x3845b8(0x40c)){let _0x296fbf=_0x2509a5[_0x3845b8(0x318)]?(0x0,_0x5ec675[_0x3845b8(0x3c1)])(_0x2509a5[_0x3845b8(0x318)],_0x4e69a8):_0x4e69a8;_0x4e6ad3[_0x296fbf]=_0x33cffa;}else{if(typeof _0x33cffa==_0x3845b8(0x3b5)){let _0x4fddf4=_0x2509a5[_0x3845b8(0x318)]?(0x0,_0x5ec675[_0x3845b8(0x3c1)])(_0x2509a5[_0x3845b8(0x318)],_0x4e69a8):_0x4e69a8;_0x4e6ad3[_0x4fddf4]=_0x33cffa['toString']();}}}}break;}if(!_0x153053)return;let _0x47dd14=_0x2509a5[_0x3845b8(0x318)]?(0x0,_0x5ec675[_0x3845b8(0x310)])(_0x2509a5[_0x3845b8(0x318)],this[_0x3845b8(0x2fe)]):this[_0x3845b8(0x2fe)],_0xc27ee8=_0x2509a5[_0x3845b8(0x318)]?(0x0,_0x5ec675[_0x3845b8(0x310)])(_0x2509a5[_0x3845b8(0x318)],this['_targetRange']):this[_0x3845b8(0x3c2)],_0x40afdb=_0x47dd14[_0x3845b8(0x564)],_0x515581=this[_0x3845b8(0x2fe)][_0x3845b8(0x406)]-this[_0x3845b8(0x2fe)]['startColumn']+0x1,_0x7c105f=_0xc27ee8[_0x3845b8(0x564)];if(_0x40afdb<_0x7c105f){let _0x28805f=_0x4e6ad3[_0x3845b8(0x36a)](_0x40afdb,_0x515581);_0x4e6ad3[_0x3845b8(0x36a)](_0x7c105f-_0x515581,0x0,..._0x28805f);}else{let _0x2ce364=_0x4e6ad3['splice'](_0x40afdb,_0x515581);_0x4e6ad3['splice'](_0x7c105f,0x0,..._0x2ce364);}let _0x286c45=_0x4e6ad3[_0x3845b8(0x154)](_0x39c2e0=>_0x39c2e0!==void 0x0);this['_commandService'][_0x3845b8(0x1cd)](_0x5ec675[_0x3845b8(0x417)]['id'],{'unitId':_0x1ebe92,'subUnitId':_0x3c7438,'pivotTableId':this['_movePivotId'],'tableFieldId':_0x153053,'info':{'type':_0x55c699['PivotDataFieldSortOperatorEnum']['custom'],'customOrder':_0x286c45}});}}[_0x34037b(0x615)](){const _0x304bbb=_0x34037b;this[_0x304bbb(0x2a7)](this[_0x304bbb(0x3ea)][_0x304bbb(0x38a)][_0x304bbb(0x659)](()=>{const _0x42e981=_0x304bbb;let _0x298190=this[_0x42e981(0x6c5)][_0x42e981(0x53f)]();if(this[_0x42e981(0x4ef)]=_0x298190[_0x298190[_0x42e981(0x3d7)]-0x1],this[_0x42e981(0x4ef)]&&this['_selectionControl'][_0x42e981(0x34e)](!0x1),!this[_0x42e981(0x4ef)])return;let {leftControl:_0x36e903,rightControl:_0x23eb57,topControl:_0x5177c2,bottomControl:_0xca3b30}=this[_0x42e981(0x4ef)];[_0x36e903,_0x23eb57,_0x5177c2,_0xca3b30][_0x42e981(0x596)](_0x518f4e=>{const _0x4ab743=_0x42e981;_0x518f4e[_0x4ab743(0x13d)][_0x4ab743(0x576)](this[_0x4ab743(0x58b)][_0x4ab743(0x160)](this));});}));}[_0x34037b(0x5c4)](){const _0x58a3fc=_0x34037b;var _0x514b82,_0x16df46;(_0x514b82=this['_scenePointerMoveSubscribe'])==null||_0x514b82[_0x58a3fc(0x1e6)](),this[_0x58a3fc(0x6ec)]=null,(_0x16df46=this[_0x58a3fc(0x58d)])==null||_0x16df46[_0x58a3fc(0x1e6)](),this[_0x58a3fc(0x58d)]=null,this[_0x58a3fc(0x4ef)]=null,this[_0x58a3fc(0x2fe)]=null,this['_moveStartCellIndex']=null,this['_targetRange']=null,super['dispose']();}};_0x3bb0d9=_0x41bfa1([_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x5ec675[_0x34037b(0x558)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x21977c[_0x34037b(0x67d)])),_0x5e4599(0x3,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ab)])),_0x5e4599(0x4,_0x21977c[_0x34037b(0x1b7)]),_0x5e4599(0x5,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x44d557[_0x34037b(0x198)]))],_0x3bb0d9);let _0x58ceda=class extends _0x1ed97c['Plugin']{constructor(_0x56601c=_0x29acb0,_0x53a926,_0x52ef48,_0x4705d8,_0x1b2513){const _0x13392e=_0x34037b;super(),this[_0x13392e(0x54a)]=_0x56601c,this[_0x13392e(0x51c)]=_0x53a926,this[_0x13392e(0x170)]=_0x52ef48,this[_0x13392e(0x6ab)]=_0x4705d8,this[_0x13392e(0x1f4)]=_0x1b2513;let {menu:_0x88c00,..._0x216210}=(0x0,_0x1ed97c[_0x13392e(0x39b)])({},_0x29acb0,this[_0x13392e(0x54a)]);_0x88c00&&this[_0x13392e(0x1f4)][_0x13392e(0x5c7)](_0x13392e(0x4d7),_0x88c00,{'merge':!0x0}),this[_0x13392e(0x1f4)][_0x13392e(0x5c7)](_0x525de5,_0x216210),this[_0x13392e(0x17e)]();}[_0x34037b(0x5a9)](){const _0x4646f7=_0x34037b;this['_injector'][_0x4646f7(0x3d4)]([_0x1f5725]),this[_0x4646f7(0x51c)][_0x4646f7(0x339)](_0x1f5725),[[_0x2648bd],[_0x35358],[_0x1c1101],[_0x30e6e3],[_0x22d556],[_0x509446],[_0xe6bd34],[_0x5d54c8],[_0x54447b]]['forEach'](_0x42352d=>this[_0x4646f7(0x51c)][_0x4646f7(0x3d4)](_0x42352d)),this['_injector'][_0x4646f7(0x339)](_0x5d54c8);}[_0x34037b(0x31b)](){const _0x3a1fd3=_0x34037b;this[_0x3a1fd3(0x6e8)](),this['_injector']['get'](_0x2648bd);}['onRendered'](){const _0x48c921=_0x34037b;this[_0x48c921(0x51c)][_0x48c921(0x339)](_0x1c1101),this[_0x48c921(0x51c)]['get'](_0x30e6e3),this[_0x48c921(0x51c)][_0x48c921(0x339)](_0x22d556),this[_0x48c921(0x51c)][_0x48c921(0x339)](_0x509446),this[_0x48c921(0x51c)]['get'](_0xe6bd34),this[_0x48c921(0x51c)]['get'](_0x54447b);}[_0x34037b(0x3c7)](){const _0x21ccbb=_0x34037b;this[_0x21ccbb(0x51c)]['get'](_0x35358);}[_0x34037b(0x6e8)](){const _0x333c9e=_0x34037b;[[_0x17d8d3],[_0x3bb0d9]][_0x333c9e(0x596)](_0x3ddc87=>{const _0x100033=_0x333c9e;this[_0x100033(0x2a7)](this['_renderManagerService'][_0x100033(0x424)](_0x1ed97c[_0x100033(0x3f9)][_0x100033(0x2a8)],_0x3ddc87));});}[_0x34037b(0x17e)](){const _0x4c9b28=_0x34037b;[_0x5f33e8,_0x288ca1,_0x30f033,_0x54b7ed,_0x1ccce8,_0x5c3106,_0x25ab52,_0x2670c7,_0x40b133,_0x28bfcc,_0x5f228f,_0xf4f2cb][_0x4c9b28(0x596)](_0x15e732=>this[_0x4c9b28(0x170)][_0x4c9b28(0x64f)](_0x15e732));}};_0x27eded(_0x58ceda,_0x34037b(0x41b),_0x5ec675[_0x34037b(0x141)]+_0x34037b(0x47b)),_0x27eded(_0x58ceda,'packageName',_0xb51988),_0x27eded(_0x58ceda,_0x34037b(0x30f),_0x420eec),_0x27eded(_0x58ceda,_0x34037b(0x490),_0x1ed97c[_0x34037b(0x3f9)]['UNIVER_SHEET']),_0x58ceda=_0x41bfa1([(0x0,_0x1ed97c[_0x34037b(0x5c9)])(_0x2e1acb[_0x34037b(0x3e2)],_0x4134a1['UniverRenderEnginePlugin'],_0x44d557[_0x34037b(0x5d4)],_0x5ec675[_0x34037b(0x5aa)],_0x21977c[_0x34037b(0x1d1)]),_0x5e4599(0x1,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x568)])),_0x5e4599(0x2,(0x0,_0x1ed97c[_0x34037b(0x131)])(_0x1ed97c[_0x34037b(0x4ab)])),_0x5e4599(0x3,_0x4134a1[_0x34037b(0x481)]),_0x5e4599(0x4,_0x1ed97c[_0x34037b(0x1fb)])],_0x58ceda),_0x125c1f['DragDropContext']=_0x8277c9,_0x125c1f[_0x34037b(0x1b0)]=_0x42d556,_0x125c1f['Droppable']=_0xbf962e,_0x125c1f[_0x34037b(0x30a)]=_0x288ca1,_0x125c1f['PivotFilterOptions']=_0x4ceac8,_0x125c1f[_0x34037b(0x5db)]=_0x45dd71,_0x125c1f[_0x34037b(0x62c)]=_0xe95c8,Object['defineProperty'](_0x125c1f,_0x34037b(0x212),{'enumerable':!0x0,'get':function(){return _0x2b45df;}}),Object['defineProperty'](_0x125c1f,_0x34037b(0x6b7),{'enumerable':!0x0,'get':function(){return _0x58ceda;}});}));
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@univerjs-pro/engine-pivot"),require("@univerjs-pro/sheets-pivot"),require("@univerjs/core"),require("@univerjs/sheets"),require("@univerjs/ui"),require("@univerjs/sheets-ui"),require("rxjs"),require("@univerjs/design"),require("@univerjs-pro/license"),require("@univerjs/engine-render"),require("react"),require("react/jsx-runtime"),require("@univerjs/engine-formula"),require("@univerjs/sheets-formula-ui"),require("@univerjs/docs"),require("@univerjs/docs-ui")):typeof define==`function`&&define.amd?define([`exports`,`@univerjs-pro/engine-pivot`,`@univerjs-pro/sheets-pivot`,`@univerjs/core`,`@univerjs/sheets`,`@univerjs/ui`,`@univerjs/sheets-ui`,`rxjs`,`@univerjs/design`,`@univerjs-pro/license`,`@univerjs/engine-render`,`react`,`react/jsx-runtime`,`@univerjs/engine-formula`,`@univerjs/sheets-formula-ui`,`@univerjs/docs`,`@univerjs/docs-ui`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverProSheetsPivotUi={},e.UniverProEnginePivot,e.UniverProSheetsPivot,e.UniverCore,e.UniverSheets,e.UniverUi,e.UniverSheetsUi,e.rxjs,e.UniverDesign,e.UniverProLicense,e.UniverEngineRender,e.React,e.React,e.UniverEngineFormula,e.UniverSheetsFormulaUi,e.UniverDocs,e.UniverDocsUi))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let _=`UNIVER_SHEET_PIVOT_PANEL`,v=`UNIVER_SHEET_PIVOT_PANEL_ID`,y=`UNIVER_SHEET_PIVOT_FILTER_PANEL`,b=`UNIVER_SHEET_PIVOT_FILTER_PANEL_ID`,x=`UNIVER_SHEET_PIVOT_FIELD_SETTING`,S=`UNIVER_SHEET_PIVOT_FIELD_SETTING_ID`,C=`UNIVER_SHEET_PIVOT_FIELD_NUMFMT`,w=`UNIVER_SHEET_PIVOT_FIELD_NUMFMT_ID`,T=`UNIVER_SHEET_PIVOT_SHOW_DATA_AS_DIALOG`,E=`UNIVER_SHEET_PIVOT_VALUE_FILTER_DIALOG`,D=`UNIVER_SHEET_PIVOT_EXCEL_DATE_GROUP_DIALOG`,O=`UNIVER_SHEET_PIVOT_NUMBER_GROUP_DIALOG`,k=`UNIVER_SHEET_PIVOT_MANUAL_GROUP_DIALOG`,A=`univer.sheet.pivot-table-range-selector`,j=`UNIVER_SHEET_PIVOT_MOBILE_ACTION_PANEL`,M=`UNIVER_SHEET_PIVOT_MOBILE_ACTION_PANEL_ID`,N={type:r.CommandType.OPERATION,id:`sheet.operation.open-pivot-table-range-selector-panel`,async handler(e){let a=e.get(r.IUniverInstanceService),o=e.get(r.ICommandService),s=(0,i.getSheetCommandTarget)(a),c=e.get(r.LocaleService);if(!s)return!1;let{unitId:l,subUnitId:u,worksheet:d,workbook:f}=s,p=e.get(i.SheetsSelectionsService).getCurrentLastSelection(),m=(p==null?void 0:p.range)??{startRow:0,endRow:0,startColumn:0,endColumn:0,rangeType:r.RANGE_TYPE.NORMAL},h=await P(e,l,u,(0,i.isSingleCellSelection)(p)?(0,i.expandToContinuousRange)(m,{up:!0,left:!0,right:!0,down:!0},d):m,d.getName());if(!h)return!1;let g=f.getSheets().find(e=>e.getName()===h.sourceSheetName);if(!g)return!1;let _;if(h.positionType===n.PositionType.New)_={row:0,col:0,unitId:l,subUnitId:(0,r.generateRandomId)(),sheetName:f.generateNewSheetName(`${c.t(`sheets-pivot-ui.sheet`)}`)};else{if(!h.positionRange||!h.positionSheetName)return!1;let e=f.getSheets().find(e=>e.getName()===h.positionSheetName);if(!e)return!1;_={row:h.positionRange.startRow,col:h.positionRange.startColumn,unitId:l,subUnitId:e.getSheetId(),sheetName:e.getName()}}let v=(0,t.generateHexNumber)(8);return await o.executeCommand(n.AddPivotTableCommand.id,{pivotTableId:v,pivotTableConfig:{targetCellInfo:_,sourceRangeInfo:{range:h.sourceRange,unitId:l,sheetName:h.sourceSheetName,subUnitId:g.getSheetId()}},positionType:h.positionType})?{unitId:_.unitId,subUnitId:_.subUnitId,pivotTableId:v}:!1}};async function P(e,t,n,i,o){let s=e.get(a.IDialogService),c=e.get(r.LocaleService);return new Promise(e=>{let r,a={unitId:t,subUnitId:n,sourceRange:i,positionRange:null,sourceSheetName:o,positionSheetName:o,onConfirm:t=>{e(t),r==null||r.dispose()},onCancel:()=>{e(null),r==null||r.dispose()}};r=s.open({id:A,title:{title:c.t(`sheets-pivot-ui.dialog.source.insertPivotTable`)},draggable:!0,mask:!1,maskClosable:!1,children:{label:{name:A,props:a}},width:400,onClose:()=>{r.dispose()}})})}let F={type:r.CommandType.OPERATION,id:`sheet.operation.set-pivot-date-group`,async handler(e,t){if(!t)return!1;let i=I(e);return i?e.get(r.ICommandService).executeCommand(n.SetPivotDateGroupCommand.id,{unitId:i.unitId,subUnitId:i.subUnitId,pivotTableId:i.pivotTableId,tableFieldId:i.tableFieldId,dateType:t.dateType}):!1}};function I(e,a=t.PivotDateGroupingMode.Legacy){let o=e.get(r.IUniverInstanceService),s=(0,i.getSheetCommandTarget)(o);if(!s)return;let c=e.get(i.SheetsSelectionsService).getCurrentLastSelection(),l=c==null?void 0:c.primary;if(!l)return;let{unitId:u,subUnitId:d}=s,f=l.startRow,p=l.startColumn,m=e.get(n.SheetsPivotTableAdaptorModel).getPivotTableIdByCell(u,d,f,p);if(!m)return;let h=L(e,u,d,m,f,p);if(!h)return;let g=e.get(n.SheetsPivotTableConfigModel),_=g.getPivotTableConfig(u,d,m);if((0,t.getPivotDateGroupingMode)(_==null?void 0:_.fieldsConfig.options)!==a)return;let v=g.getCollection(u,m),y=(0,n.getPivotDateGroupContext)(_==null?void 0:_.fieldsConfig,v,h);if(y)return{unitId:u,subUnitId:d,pivotTableId:m,tableFieldId:h,row:f,col:p,dateGroupContext:y}}function L(e,t,r,i,a,o){let s=e.get(n.SheetsPivotTableAdaptorModel).getPivotItemRenderInfoCache(t,r,i);if(!s)return;let c=e.get(n.SheetsPivotTableAdaptorModel).getPivotTableCellData(t,r,a,o),l=(0,n.resolvePivotSheetCell)(a,o,c,s);return l==null?void 0:l.tableFieldId}function R(e){let r=I(e,t.PivotDateGroupingMode.ExcelLike);if(!r)return;let i=e.get(n.SheetsPivotTableConfigModel),a=i.getPivotTableConfig(r.unitId,r.subUnitId,r.pivotTableId),o=a==null?void 0:a.fieldsConfig.dimension[r.tableFieldId];if(!o)return;let s=i.getCollection(r.unitId,r.pivotTableId),c=(r.dateGroupContext.area===t.PivotTableFiledAreaEnum.Row?a.fieldsConfig.rowFields:a.fieldsConfig.columnFields).flatMap(e=>{let n=a.fieldsConfig.dimension[e],i=n?s==null?void 0:s.fields[n.dataFieldId]:void 0;return i&&(0,t.isDateGroupFieldJSON)(i)&&i.originalFieldId===r.dateGroupContext.originalDataFieldId&&i.excelLike?[i.excelLike]:[]}),l=c[0],u=l?{units:c.map(e=>e.unit),autoStart:l.autoStart,autoEnd:l.autoEnd,...l.start===void 0?{}:{start:l.start},...l.end===void 0?{}:{end:l.end},...l.daysInterval===void 0?{}:{daysInterval:l.daysInterval}}:void 0;return{...r,targetFieldName:o.displayName,grouping:u}}let z={id:`sheet.operation.set-pivot-excel-date-group`,type:r.CommandType.OPERATION,async handler(e){let t=R(e);if(!t)return!1;let i=e.get(n.SheetsPivotTableConfigModel),o=i.getPivotTableConfig(t.unitId,t.subUnitId,t.pivotTableId),s=i.getCollection(t.unitId,t.pivotTableId),c=e.get(a.IDialogService),l=e.get(r.LocaleService),u=e.get(r.IUniverInstanceService).getUnit(t.unitId),d=(u==null?void 0:u.getDateSystem())??r.DateSystem.Date1900,f=null,p=!1,m=!1,h=()=>{p||(p=!0,f==null||f.dispose(),f=null)},g=async a=>{if(!(m||p)){m=!0;try{let c=R(e);if(!c||c.unitId!==t.unitId||c.subUnitId!==t.subUnitId||c.pivotTableId!==t.pivotTableId||c.tableFieldId!==t.tableFieldId||i.getPivotTableConfig(t.unitId,t.subUnitId,t.pivotTableId)!==o||i.getCollection(t.unitId,t.pivotTableId)!==s)return;await e.get(r.ICommandService).executeCommand(n.SetPivotExcelDateGroupCommand.id,{unitId:t.unitId,subUnitId:t.subUnitId,pivotTableId:t.pivotTableId,tableFieldId:t.tableFieldId,grouping:{...a,units:a.units.concat()}})}catch{}finally{h()}}};try{f=c.open({id:`UNIVER_SHEET_PIVOT_EXCEL_DATE_GROUP_DIALOG_ID`,title:{title:l.t(`sheets-pivot-ui.dateGroup.excelLikeTitle`)},draggable:!0,mask:!0,maskClosable:!1,width:440,children:{label:{name:D,props:{targetFieldName:t.targetFieldName,dateSystem:d,grouping:t.grouping,onConfirm:g,onCancel:h}}},onClose:h})}catch{return h(),!1}return!0}};function B(e){return e.map(e=>({...e,members:e.members.map(e=>({...e}))}))}function V(e){let n;try{n=JSON.parse(e)}catch{return}if(!(!Array.isArray(n)||n.length<1||typeof n[0]!=`string`))return n[0]===r.RecordValueType.Blank?t.GlobalConfig.BLANK_PLACEHOLDER:String(n[1])}function ee(e,a){var o;let s=()=>({error:`invalidSelection`}),c=(0,i.getSheetCommandTarget)(e.get(r.IUniverInstanceService)),l=e.get(i.SheetsSelectionsService).getCurrentSelections();if(!c||!l.length)return s();let{unitId:u,subUnitId:d}=c,f=l[0].primary;if(!f)return s();let p=e.get(n.SheetsPivotTableAdaptorModel),m=p.getPivotTableIdByCell(u,d,f.startRow,f.startColumn),h=e.get(n.SheetsPivotTableConfigModel),g=m&&h.getPivotTableConfig(u,d,m),_=m&&h.getCollection(u,m),v=m&&p.getPivotItemRenderInfoCache(u,d,m);if(!m||!g||!_||!v)return s();let y=(0,n.resolvePivotSheetCell)(f.startRow,f.startColumn,p.getPivotTableCellData(u,d,f.startRow,f.startColumn),v),b=y==null?void 0:y.tableFieldId,x=b&&g.fieldsConfig.dimension[b];if(!b||!x||!(g.fieldsConfig.rowFields.includes(b)||g.fieldsConfig.columnFields.includes(b)))return s();let S=_.fields[x.dataFieldId];if(!S)return s();let C=S.dataFieldType===t.PivotDataFieldTypeEnum.textGroupField?S:void 0;if(!C&&S.dataFieldType!==t.PivotDataFieldTypeEnum.defaultNormalField)return s();let w=(C==null?void 0:C.originalFieldId)??S.id;if(((o=_.fields[w])==null?void 0:o.dataFieldType)!==t.PivotDataFieldTypeEnum.defaultNormalField)return s();let T=B((C==null?void 0:C.grouping.groups)??[]),E=/* @__PURE__ */ new Map,D=/* @__PURE__ */ new Set,O=0;for(let e of l){let{startRow:r,endRow:i,startColumn:a,endColumn:o}=e.range;if(O+=(i-r+1)*(o-a+1),O>512)return s();for(let e=r;e<=i;e++)for(let r=a;r<=o;r++){if(p.getPivotTableIdByCell(u,d,e,r)!==m)return s();let i=(0,n.resolvePivotSheetCell)(e,r,p.getPivotTableCellData(u,d,e,r),v),a=i==null?void 0:i.info;if(!i||i.area!==`rowRanges`&&i.area!==`colRanges`||i.tableFieldId!==b||!a||a.isValue||a.isSubtotal||a.isBottomTotal||a.isTopTotal||a.rowType&&a.rowType!==`item`||a.level<1)return s();let o=a.paths[a.level-1];if(o===void 0)return s();if(C){let e;try{e=JSON.parse(o)}catch{return s()}if(!Array.isArray(e)||e.length!==2||typeof e[1]!=`string`)return s();if(e[0]===`group`){if(!T.some(t=>t.id===e[1]))return s();D.add(e[1]);continue}if(e[0]!==`member`)return s();let t=V(e[1]);if(t===void 0)return s();E.set(e[1],{path:t,memberKey:e[1]})}else{var k;let n=(k=p.getPivotTableCellData(u,d,e,r))==null?void 0:k.v,i=n==null||n===``?t.GlobalConfig.BLANK_PLACEHOLDER:String(n);E.set(o,{path:i,tupleKey:o})}}}return a===`group`&&(E.size<2||D.size>0)||a!==`group`&&(E.size>0||D.size!==1)?s():{context:{unitId:u,subUnitId:d,pivotTableId:m,tableFieldId:b,sourceFieldId:w,targetFieldName:x.displayName,groups:T,memberPaths:Array.from(E.values()),selectedGroupId:Array.from(D)[0]}}}function H(e,t){return ee(e,t).context}function te(e,t){e.get(a.IMessageService).show({type:c.MessageType.Error,content:e.get(r.LocaleService).t(`sheets-pivot-ui.manualGroup.${t}`)})}function ne(e,t,n){let r=H(e,t);return!!r&&r.unitId===n.unitId&&r.subUnitId===n.subUnitId&&r.pivotTableId===n.pivotTableId&&r.tableFieldId===n.tableFieldId&&r.sourceFieldId===n.sourceFieldId&&r.selectedGroupId===n.selectedGroupId&&JSON.stringify(r.memberPaths)===JSON.stringify(n.memberPaths)&&JSON.stringify(r.groups)===JSON.stringify(n.groups)}async function re(e,t){let i=ee(e,t),o=i.context;if(!o)return te(e,i.error),!1;let s=e.get(n.SheetsPivotTableConfigModel),c=s.getPivotTableConfig(o.unitId,o.subUnitId,o.pivotTableId),l=s.getCollection(o.unitId,o.pivotTableId),u=[];if(t===`group`){try{let t=(await e.get(n.SheetsPivotRPCService).getPivotDisplayConfig({unitId:o.unitId,subUnitId:o.subUnitId,pivotTableId:o.pivotTableId,params:{type:n.PivotDisplayDataType.ManualGroupMembers,manualGroupMembers:{sourceFieldId:o.sourceFieldId,paths:o.memberPaths}}})).result.manualGroupMembers;if(!t||t.error||t.members.length<2)return te(e,(t==null?void 0:t.error)??`invalidSelection`),!1;u=t.members}catch{return te(e,`invalidSelection`),!1}if(!ne(e,t,o)||s.getPivotTableConfig(o.unitId,o.subUnitId,o.pivotTableId)!==c||s.getCollection(o.unitId,o.pivotTableId)!==l)return!1}let d=e.get(a.IDialogService),f=e.get(r.LocaleService),p=o.groups.find(e=>e.id===o.selectedGroupId),m=(p==null?void 0:p.name)??f.t(`sheets-pivot-ui.manualGroup.defaultName`,String(o.groups.length+1));if(!p){let e=o.groups.length+1;for(;o.groups.some(e=>e.name===m);)e++,m=f.t(`sheets-pivot-ui.manualGroup.defaultName`,String(e))}let h=null,g=!1,_=!1,v=()=>{g||(g=!0,h==null||h.dispose(),h=null)},y=async i=>{if(_||g)return;let a=i.trim();if(!a||o.groups.some(e=>e.name===a&&e.id!==o.selectedGroupId))te(e,`invalidSelection`);else{_=!0;try{if(!ne(e,t,o)||s.getPivotTableConfig(o.unitId,o.subUnitId,o.pivotTableId)!==c||s.getCollection(o.unitId,o.pivotTableId)!==l)return;let i=t===`group`?o.groups.concat({id:(0,r.generateRandomId)(),name:a,members:u.map(e=>({...e}))}):o.groups.map(e=>e.id===o.selectedGroupId?{...e,name:a}:e);await e.get(r.ICommandService).executeCommand(n.SetPivotManualGroupsCommand.id,{unitId:o.unitId,subUnitId:o.subUnitId,pivotTableId:o.pivotTableId,sourceFieldId:o.sourceFieldId,groups:i})}catch{}finally{v()}}};try{h=d.open({id:`UNIVER_SHEET_PIVOT_MANUAL_GROUP_DIALOG_ID`,title:{title:f.t(t===`group`?`sheets-pivot-ui.manualGroup.groupTitle`:`sheets-pivot-ui.manualGroup.renameTitle`)},draggable:!0,mask:!0,maskClosable:!1,width:400,children:{label:{name:k,props:{name:m,onConfirm:y,onCancel:v}}},onClose:v})}catch{return v(),!1}return!0}let ie={id:`sheet.operation.set-pivot-manual-group`,type:r.CommandType.OPERATION,handler:e=>re(e,`group`)},ae={id:`sheet.operation.rename-pivot-manual-group`,type:r.CommandType.OPERATION,handler:e=>re(e,`rename`)},oe={id:`sheet.operation.ungroup-pivot-manual-group`,type:r.CommandType.OPERATION,async handler(e){let t=ee(e,`ungroup`),i=t.context;if(!i)return te(e,t.error),!1;let a=e.get(n.SheetsPivotTableConfigModel),o=a.getPivotTableConfig(i.unitId,i.subUnitId,i.pivotTableId),s=a.getCollection(i.unitId,i.pivotTableId);return!ne(e,`ungroup`,i)||a.getPivotTableConfig(i.unitId,i.subUnitId,i.pivotTableId)!==o||a.getCollection(i.unitId,i.pivotTableId)!==s?!1:e.get(r.ICommandService).executeCommand(n.SetPivotManualGroupsCommand.id,{unitId:i.unitId,subUnitId:i.subUnitId,pivotTableId:i.pivotTableId,sourceFieldId:i.sourceFieldId,groups:i.groups.filter(e=>e.id!==i.selectedGroupId)})}};function se(e){return typeof e.autoStart==`boolean`&&typeof e.autoEnd==`boolean`&&Number.isFinite(e.interval)&&e.interval>0&&(e.start===void 0||Number.isFinite(e.start))&&(e.end===void 0||Number.isFinite(e.end))&&(e.autoStart||e.start!==void 0)&&(e.autoEnd||e.end!==void 0)&&(e.start===void 0||e.end===void 0||e.start<=e.end)}function ce(e,n){if(e.dataFieldType===t.PivotDataFieldTypeEnum.numberGroupField){let r=e,i=n.fields[r.originalFieldId];return!i||i.dataFieldType!==t.PivotDataFieldTypeEnum.defaultNormalField||i.fieldDataType!==t.PivotDataFieldDataTypeEnum.number?void 0:{sourceFieldId:r.originalFieldId,grouping:{...r.grouping}}}if(e.dataFieldType===t.PivotDataFieldTypeEnum.defaultNormalField&&e.fieldDataType===t.PivotDataFieldDataTypeEnum.number)return{sourceFieldId:e.id}}function le(e){var t;let a=(0,i.getSheetCommandTarget)(e.get(r.IUniverInstanceService)),o=(t=e.get(i.SheetsSelectionsService).getCurrentLastSelection())==null?void 0:t.primary;if(!a||!o)return;let{unitId:s,subUnitId:c}=a,l=o.startRow,u=o.startColumn,d=e.get(n.SheetsPivotTableAdaptorModel),f=d.getPivotTableIdByCell(s,c,l,u);if(!f)return;let p=d.getPivotItemRenderInfoCache(s,c,f);if(!p)return;let m=(0,n.resolvePivotSheetCell)(l,u,d.getPivotTableCellData(s,c,l,u),p),h=m==null?void 0:m.tableFieldId;if(!h||m.area!==`rowRanges`&&m.area!==`colRanges`)return;let g=e.get(n.SheetsPivotTableConfigModel),_=g.getPivotTableConfig(s,c,f),v=g.getCollection(s,f),y=_==null?void 0:_.fieldsConfig.dimension[h];if(!y||!v||!(_.fieldsConfig.rowFields.includes(h)||_.fieldsConfig.columnFields.includes(h)))return;let b=v.fields[y.dataFieldId];if(!b)return;let x=ce(b,v);if(x)return{unitId:s,subUnitId:c,pivotTableId:f,tableFieldId:h,targetFieldName:y.displayName,...x}}let ue={id:`sheet.operation.set-pivot-number-group`,type:r.CommandType.OPERATION,async handler(e){let t=le(e);if(!t)return!1;let i=e.get(n.SheetsPivotTableConfigModel),o=i.getCollection(t.unitId,t.pivotTableId),c=i.getPivotTableConfig(t.unitId,t.subUnitId,t.pivotTableId),l=e.get(r.IUniverInstanceService),u=()=>{let n=le(e);return!!n&&n.unitId===t.unitId&&n.subUnitId===t.subUnitId&&n.pivotTableId===t.pivotTableId&&n.tableFieldId===t.tableFieldId&&n.sourceFieldId===t.sourceFieldId&&JSON.stringify(n.grouping)===JSON.stringify(t.grouping)},d=e.get(a.IDialogService),f=e.get(r.LocaleService),p=null,m=!1,h=!1,g=new s.Subject,_=async()=>{if(!m&&u())try{let r=(await e.get(n.SheetsPivotRPCService).getPivotDisplayConfig({unitId:t.unitId,subUnitId:t.subUnitId,pivotTableId:t.pivotTableId,params:{type:n.PivotDisplayDataType.NumberGroupDefaults,numberGroupDefaults:{tableFieldId:t.tableFieldId}}})).result.numberGroupDefaults;return!m&&u()&&r&&se(r)?r:void 0}catch{return}},v=()=>{m||(m=!0,g.next(),g.complete(),p==null||p.dispose(),p=null)},y=await _();if(!y)return v(),!1;let b=l.unitDisposed$.pipe((0,s.filter)(e=>e.getUnitId()===t.unitId),(0,s.tap)(v)),x=(0,s.defer)(()=>{if(m||!l.getUnit(t.unitId))return v(),s.EMPTY;let e=i.watchPivotTableChanges(t.unitId,t.subUnitId,t.pivotTableId).pipe((0,s.debounceTime)(0),(0,s.map)(()=>void 0));return(0,s.merge)((0,s.of)(y),e).pipe((0,s.switchMap)(e=>e&&i.getCollection(t.unitId,t.pivotTableId)===o&&i.getPivotTableConfig(t.unitId,t.subUnitId,t.pivotTableId)===c?(0,s.of)(e):(0,s.concat)((0,s.of)(void 0),_())),(0,s.takeUntil)((0,s.merge)(g,b)))}),S=async i=>{if(!(h||m)){h=!0;try{if(!se(i)||!u())return;await e.get(r.ICommandService).executeCommand(n.SetPivotNumberGroupCommand.id,{unitId:t.unitId,subUnitId:t.subUnitId,pivotTableId:t.pivotTableId,tableFieldId:t.tableFieldId,grouping:{...i}})}catch{}finally{v()}}};try{p=d.open({id:`UNIVER_SHEET_PIVOT_NUMBER_GROUP_DIALOG_ID`,title:{title:f.t(`sheets-pivot-ui.numberGroup.title`)},draggable:!0,mask:!0,maskClosable:!1,width:400,children:{label:{name:O,props:{targetFieldName:t.targetFieldName,grouping:t.grouping,defaults$:x,onConfirm:S,onCancel:v}}},onClose:v})}catch{return v(),!1}return!0}},de=[{type:t.PivotShowAsTypeEnum.normal,localeKey:`sheets-pivot-ui.showValuesAs.normal`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentOfGrandTotal,localeKey:`sheets-pivot-ui.showValuesAs.percentOfGrandTotal`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentOfRowTotal,localeKey:`sheets-pivot-ui.showValuesAs.percentOfRowTotal`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentOfColumnTotal,localeKey:`sheets-pivot-ui.showValuesAs.percentOfColumnTotal`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentOfParentRowTotal,localeKey:`sheets-pivot-ui.showValuesAs.percentOfParentRowTotal`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentOfParentColumnTotal,localeKey:`sheets-pivot-ui.showValuesAs.percentOfParentColumnTotal`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.index,localeKey:`sheets-pivot-ui.showValuesAs.index`,requiresParameters:!1,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentOfParent,localeKey:`sheets-pivot-ui.showValuesAs.percentOfParent`,requiresParameters:!0,baseItemMode:`none`,parentFieldOnly:!0},{type:t.PivotShowAsTypeEnum.percentOf,localeKey:`sheets-pivot-ui.showValuesAs.percentOf`,requiresParameters:!0,baseItemMode:`item`},{type:t.PivotShowAsTypeEnum.differenceFrom,localeKey:`sheets-pivot-ui.showValuesAs.differenceFrom`,requiresParameters:!0,baseItemMode:`item-or-relative`},{type:t.PivotShowAsTypeEnum.percentDifferenceFrom,localeKey:`sheets-pivot-ui.showValuesAs.percentDifferenceFrom`,requiresParameters:!0,baseItemMode:`item-or-relative`},{type:t.PivotShowAsTypeEnum.runningTotal,localeKey:`sheets-pivot-ui.showValuesAs.runningTotal`,requiresParameters:!0,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.percentRunningTotal,localeKey:`sheets-pivot-ui.showValuesAs.percentRunningTotal`,requiresParameters:!0,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.rankAscending,localeKey:`sheets-pivot-ui.showValuesAs.rankAscending`,requiresParameters:!0,baseItemMode:`none`},{type:t.PivotShowAsTypeEnum.rankDescending,localeKey:`sheets-pivot-ui.showValuesAs.rankDescending`,requiresParameters:!0,baseItemMode:`none`}],fe={type:r.CommandType.OPERATION,id:`sheet.operation.set-pivot-show-data-as`,async handler(e,t){let i=t&&de.find(e=>e.type===t.type);if(!i)return!1;let o=me(e);if(!o)return!1;if(!i.requiresParameters)return e.get(r.ICommandService).executeCommand(n.UpdatePivotFieldSettingCommand.id,{unitId:o.unitId,subUnitId:o.subUnitId,pivotTableId:o.pivotTableId,tableFieldId:o.tableFieldId,showDataAs:{type:i.type,baseFieldId:``,baseItem:``},tableFieldInfo:o.tableFieldInfo,dataFieldInfo:o.dataFieldInfo});let s=he(e,o);if(!s)return!1;let c=pe(s.config,s.collection,i);if(c.length===0)return!1;let l={};if(i.baseItemMode!==`none`){try{l=await ge(e,s.config,o.pivotTableId,c)}catch{return!1}if(!c.some(e=>l[e]&&(i.baseItemMode===`item-or-relative`||l[e].items.length>0)))return!1}let u=e.get(a.IDialogService),d=e.get(r.LocaleService),f=null,p=!1,m=!1,h=()=>{p||(p=!0,f==null||f.dispose(),f=null)};try{f=u.open({id:`UNIVER_SHEET_PIVOT_SHOW_DATA_AS_DIALOG_ID`,title:{title:d.t(`sheets-pivot-ui.showValuesAs.dialogTitle`)},draggable:!0,mask:!0,maskClosable:!1,width:400,children:{label:{name:T,props:{unitId:o.unitId,subUnitId:o.subUnitId,pivotTableId:o.pivotTableId,tableFieldId:o.tableFieldId,type:i.type,baseItems:l,onCancel:h,onConfirm:async t=>{if(!m){m=!0;try{let s=he(e,o);if(!s||!_e(s.config,s.collection,i,t))return;if(i.baseItemMode!==`none`&&t.baseItemType===void 0){var a;if(!((a=(await ge(e,s.config,s.context.pivotTableId,[t.baseFieldId]))[t.baseFieldId])!=null&&a.items.includes(t.baseItem)))return}await e.get(r.ICommandService).executeCommand(n.UpdatePivotFieldSettingCommand.id,{unitId:s.context.unitId,subUnitId:s.context.subUnitId,pivotTableId:s.context.pivotTableId,tableFieldId:s.context.tableFieldId,showDataAs:t,tableFieldInfo:s.context.tableFieldInfo,dataFieldInfo:s.context.dataFieldInfo})}catch{}finally{h()}}}}}},onClose:h})}catch{return h(),!1}return!0}};function pe(e,t,n){let{rowFields:r,columnFields:i,dimension:a}=e.fieldsConfig;return(n.parentFieldOnly?[...r.slice(0,-1),...i.slice(0,-1)]:[...r,...i]).filter(e=>{let n=a[e];return!!(n&&(t.fields[n.dataFieldId]||t.customFields.find(e=>e.id===n.dataFieldId)))})}function me(e){var t,a;let o=(0,i.getSheetCommandTarget)(e.get(r.IUniverInstanceService)),s=(t=e.get(i.SheetsSelectionsService).getCurrentLastSelection())==null?void 0:t.primary;if(!o||!s)return;let{unitId:c,subUnitId:l}=o,u=s.startRow,d=s.startColumn,f=e.get(n.SheetsPivotTableAdaptorModel),p=f.getPivotTableIdByCell(c,l,u,d);if(!p)return;let m=e.get(n.SheetsPivotTableConfigModel).getPivotTableConfig(c,l,p),h=f.getPivotItemRenderInfoCache(c,l,p),g=f.getPivotTableCellData(c,l,u,d);if(!m||!h)return;let _=(0,n.resolvePivotSheetCell)(u,d,g,h);if(!_)return;let v=(0,n.resolvePivotValueFieldId)(_,m.fieldsConfig.valueFields);if(v)return(a=he(e,{unitId:c,subUnitId:l,pivotTableId:p,tableFieldId:v}))==null?void 0:a.context}function he(e,t){let{unitId:r,subUnitId:i,pivotTableId:a,tableFieldId:o}=t,s=e.get(n.SheetsPivotTableConfigModel),c=s.getPivotTableConfig(r,i,a),l=s.getCollection(r,a),u=c==null?void 0:c.fieldsConfig.measure[o];if(!c||!l||!u||!c.fieldsConfig.valueFields.includes(u.id))return;let d=l.fields[u.dataFieldId]??l.customFields.find(e=>e.id===u.dataFieldId);if(!d)return;let f={...u.showDataAs};return{config:c,collection:l,context:{unitId:r,subUnitId:i,pivotTableId:a,tableFieldId:u.id,currentShowDataAs:f,tableFieldInfo:{tableFieldId:u.id,displayName:u.displayName,dataFieldId:u.dataFieldId,format:u.format,subTotalType:u.subtotal,showDataAs:{...f}},dataFieldInfo:{id:d.id,dataFieldId:d.id,name:d.name,type:d.fieldDataType,checked:!0,pivotTableId:a}}}}async function ge(e,t,r,i){let{unitId:a,subUnitId:o}=t.targetCellInfo,s=t.targetCellInfo,c=e.get(n.SheetsPivotTableAdaptorModel).getPivotItemRenderInfoCache(a,o,r);if(!c)throw Error(`[sheets-pivot-ui]: Pivot render cache is unavailable`);return(await Promise.all(i.map(async t=>{try{return[t,(await e.get(n.SheetsPivotRPCService).getPivotDisplayConfig({unitId:a,subUnitId:o,pivotTableId:r,params:{type:n.PivotDisplayDataType.Filter,filter:{row:s.row,col:s.col,tableFieldId:t,pivotItemRenderInfoCache:c}}})).result.filter]}catch{return[t,void 0]}}))).reduce((e,[t,n])=>(n&&(e[t]={items:n.items,itemTypes:n.itemTypes,...n.itemLabels?{itemLabels:n.itemLabels}:{},format:n.format}),e),{})}function _e(e,n,r,i){return i.type!==r.type||!pe(e,n,r).includes(i.baseFieldId)?!1:r.baseItemMode===`none`?i.baseItem===``&&i.baseItemType===void 0:i.baseItemType===void 0?i.baseItem!==``:r.baseItemMode===`item-or-relative`&&i.baseItem===``&&(i.baseItemType===t.PivotShowAsBaseItemTypeEnum.previous||i.baseItemType===t.PivotShowAsBaseItemTypeEnum.next)}function ve(e){return{...e,expected:Array.isArray(e.expected)?e.expected.concat():e.expected}}function ye(e,t){let r=e.get(n.SheetsPivotTableConfigModel).getPivotTableConfig(t.unitId,t.subUnitId,t.pivotTableId);if(r&&r.fieldsConfig.dimension[t.targetFieldId]&&(r.fieldsConfig.rowFields.includes(t.targetFieldId)||r.fieldsConfig.columnFields.includes(t.targetFieldId)))return r}function be(e){var t,a;let o=(0,i.getSheetCommandTarget)(e.get(r.IUniverInstanceService)),s=(t=e.get(i.SheetsSelectionsService).getCurrentLastSelection())==null?void 0:t.primary;if(!o||!s)return;let{unitId:c,subUnitId:l}=o,u=s.startRow,d=s.startColumn,f=e.get(n.SheetsPivotTableAdaptorModel),p=f.getPivotTableIdByCell(c,l,u,d);if(!p)return;let m=e.get(n.SheetsPivotTableConfigModel).getPivotTableConfig(c,l,p),h=f.getPivotItemRenderInfoCache(c,l,p);if(!m||!h)return;let g=(0,n.resolvePivotSheetCell)(u,d,f.getPivotTableCellData(c,l,u,d),h),_=g&&(0,n.resolvePivotValueFilterTarget)(g,m.fieldsConfig);if(!_)return;let v=m.fieldsConfig.dimension[_.targetFieldId],y=m.fieldsConfig.valueFields.flatMap(e=>{let t=m.fieldsConfig.measure[e];return t?[{id:t.id,label:t.displayName}]:[]});if(!v||y.length===0)return;let b=(a=m.fieldsConfig.valueFilter)==null||(a=a.find(e=>e.fieldId===_.targetFieldId))==null?void 0:a.filterInfo;return{unitId:c,subUnitId:l,pivotTableId:p,targetFieldId:_.targetFieldId,targetFieldName:v.displayName,valueFields:y,defaultValueFieldId:_.defaultValueFieldId,...b?{currentFilter:ve(b)}:{}}}let xe={type:r.CommandType.OPERATION,id:`sheet.operation.set-pivot-value-filter`,async handler(e){let i=be(e);if(!i)return!1;let o=e.get(a.IDialogService),s=e.get(r.LocaleService),c=null,l=!1,u=!1,d=()=>{l||(l=!0,c==null||c.dispose(),c=null)},f=async a=>{if(!u){u=!0;try{let o=ye(e,i);if(!o||a&&(!o.fieldsConfig.measure[a.valueFieldId]||!o.fieldsConfig.valueFields.includes(a.valueFieldId)||!(0,t.isValueFilterOperator)(a.operator)))return;await e.get(r.ICommandService).executeCommand(n.SetPivotValueFilterCommand.id,{unitId:i.unitId,subUnitId:i.subUnitId,pivotTableId:i.pivotTableId,fieldId:i.targetFieldId,valueFilterInfo:a?{...a,type:t.PivotFilterTypeEnum.ValueFilter,expected:Array.isArray(a.expected)?a.expected.concat():a.expected}:void 0})}catch{}finally{d()}}};try{c=o.open({id:`UNIVER_SHEET_PIVOT_VALUE_FILTER_DIALOG_ID`,title:{title:s.t(`sheets-pivot-ui.valueFilter.dialogTitle`)},draggable:!0,mask:!0,maskClosable:!1,width:420,children:{label:{name:E,props:{targetFieldId:i.targetFieldId,targetFieldName:i.targetFieldName,valueFields:i.valueFields,defaultValueFieldId:i.defaultValueFieldId,currentFilter:i.currentFilter,onConfirm:e=>f(e),onClear:()=>f(void 0),onCancel:d}}},onClose:d})}catch{return d(),!1}return!0}},Se=`sheet.pivot.context-menu.date-group`,Ce=`sheet.pivot.context-menu.excel-date-group`,we=`sheet.pivot.context-menu.number-group`,Te=`sheet.pivot.context-menu.manual-group`,Ee=`sheet.pivot.context-menu.manual-rename`,De=`sheet.pivot.context-menu.manual-ungroup`,Oe=`sheet.pivot.context-menu.show-data-as`,ke=`sheet.pivot.context-menu.value-filter`,Ae={year:`sheets-pivot-ui.dateGroup.year`,"year-quarter":`sheets-pivot-ui.dateGroup.yearQuarter`,quarter:`sheets-pivot-ui.dateGroup.quarter`,"year-month":`sheets-pivot-ui.dateGroup.yearMonth`,month:`sheets-pivot-ui.dateGroup.month`,"month-date":`sheets-pivot-ui.dateGroup.monthDate`,"year-month-date":`sheets-pivot-ui.dateGroup.yearMonthDate`,date:`sheets-pivot-ui.dateGroup.date`,hour:`sheets-pivot-ui.dateGroup.hour`,minute:`sheets-pivot-ui.dateGroup.minute`,"hour-minute":`sheets-pivot-ui.dateGroup.hourMinute`};function je(e){return{id:N.id,type:a.MenuItemType.BUTTON,icon:`PivotTableIcon`,hidden$:(0,a.getMenuHiddenObservable)(e,r.UniverInstanceType.UNIVER_SHEET),disabled$:(0,o.getObservableWithExclusiveRange$)(e,(0,o.getCurrentRangeDisable$)(e,{workbookTypes:[i.WorkbookEditablePermission],worksheetTypes:[i.WorksheetViewPermission,i.WorksheetPivotTablePermission],rangeTypes:[i.RangeProtectionPermissionViewPoint]})),tooltip:`sheets-pivot-ui.title`,title:`sheets-pivot-ui.title`}}function Me(e){return{id:Se,type:a.MenuItemType.SUBITEMS,title:`sheets-pivot-ui.dateGroup.title`,hidden$:Be(e)}}function Ne(e){return{id:Ce,commandId:z.id,type:a.MenuItemType.BUTTON,title:`sheets-pivot-ui.dateGroup.excelLikeTitle`,hidden$:U(e).pipe((0,s.map)(()=>!R(e)))}}function Pe(e){return{id:we,commandId:ue.id,type:a.MenuItemType.BUTTON,title:`sheets-pivot-ui.numberGroup.title`,hidden$:U(e).pipe((0,s.map)(()=>!le(e)))}}function Fe(e){return{id:Te,commandId:ie.id,type:a.MenuItemType.BUTTON,title:`sheets-pivot-ui.manualGroup.groupTitle`,hidden$:U(e).pipe((0,s.map)(()=>!H(e,`group`)))}}function Ie(e){return{id:Ee,commandId:ae.id,type:a.MenuItemType.BUTTON,title:`sheets-pivot-ui.manualGroup.renameTitle`,hidden$:U(e).pipe((0,s.map)(()=>!H(e,`rename`)))}}function Le(e){return{id:De,commandId:oe.id,type:a.MenuItemType.BUTTON,title:`sheets-pivot-ui.manualGroup.ungroupTitle`,hidden$:U(e).pipe((0,s.map)(()=>!H(e,`ungroup`)))}}function Re(e){return t=>({id:ze(e),commandId:F.id,type:a.MenuItemType.BUTTON,title:Ae[e],params:{dateType:e},disabled$:Ve(t,e),activated$:He(t,e)})}function ze(e){return`sheet.pivot.context-menu.date-group.${e}`}function Be(e){return U(e).pipe((0,s.map)(()=>!I(e)))}function Ve(e,t){return U(e).pipe((0,s.map)(()=>{let r=I(e);return!r||(0,n.isPivotDateGroupTypeDisabled)(r.dateGroupContext,t)}))}function He(e,t){return U(e).pipe((0,s.map)(()=>{let n=I(e);return(n==null?void 0:n.dateGroupContext.currentDateType)===t}))}function U(e){let t=e.get(n.SheetsPivotTableConfigModel),a=()=>{var t;let a=(0,i.getSheetCommandTarget)(e.get(r.IUniverInstanceService)),o=(t=e.get(i.SheetsSelectionsService).getCurrentLastSelection())==null?void 0:t.primary;if(!a||!o)return;let{unitId:s,subUnitId:c}=a,l=e.get(n.SheetsPivotTableAdaptorModel).getPivotTableIdByCell(s,c,o.startRow,o.startColumn);return l?{unitId:s,subUnitId:c,pivotTableId:l}:void 0};return(0,s.merge)(e.get(i.SheetsSelectionsService).selectionMoveEnd$,t.pivotConfigChange$.pipe((0,s.filter)(e=>{let t=a();return(t==null?void 0:t.unitId)===e.unitId&&t.subUnitId===e.subUnitId&&t.pivotTableId===e.pivotTableId})),t.collectionChange$.pipe((0,s.filter)(e=>{let n=a();if(!n||!e.pivotTableIds.includes(n.pivotTableId))return!1;let r=t.getPivotTableConfig(n.unitId,n.subUnitId,n.pivotTableId);return e.unitId===((r==null?void 0:r.sourceRangeInfo.unitId)??n.unitId)}))).pipe((0,s.startWith)(null))}let Ue=n.PIVOT_DATE_GROUP_TYPES.map(e=>({dateType:e,id:ze(e),menuItemFactory:Re(e)}));function We(e){return{id:Oe,type:a.MenuItemType.SUBITEMS,title:`sheets-pivot-ui.showValuesAs.title`,hidden$:qe(e).pipe((0,s.map)(()=>!me(e)))}}function Ge(e){return n=>({id:Ke(e.type),commandId:fe.id,type:a.MenuItemType.BUTTON,title:e.localeKey,params:{type:e.type},activated$:qe(n).pipe((0,s.map)(()=>{let r=me(n);return!!(r&&(r.currentShowDataAs.type??t.PivotShowAsTypeEnum.normal)===e.type)}))})}function Ke(e){return`sheet.pivot.context-menu.show-data-as.${e}`}function qe(e){return e.get(i.SheetsSelectionsService).selectionMoveEnd$.pipe((0,s.startWith)(null))}let Je=de.map(e=>({rule:e,id:Ke(e.type),menuItemFactory:Ge(e)}));function Ye(e){return{id:ke,commandId:xe.id,type:a.MenuItemType.BUTTON,title:`sheets-pivot-ui.valueFilter.title`,hidden$:e.get(i.SheetsSelectionsService).selectionMoveEnd$.pipe((0,s.startWith)(null),(0,s.map)(()=>!be(e)))}}let Xe=Ue.reduce((e,t,n)=>(e[t.id]={order:n+1,menuItemFactory:t.menuItemFactory},e),{}),Ze=Je.reduce((e,t,n)=>(e[t.id]={order:n+1,menuItemFactory:t.menuItemFactory},e),{}),Qe={[a.RibbonDataGroup.ORGANIZATION]:{[N.id]:{order:1,gridLayout:{row:2,column:1},menuItemFactory:je}},[a.ContextMenuPosition.MAIN_AREA]:{[a.ContextMenuGroup.DATA]:{[N.id]:{order:1,menuItemFactory:je},[Se]:{order:2,menuItemFactory:Me,...Xe},[Ce]:{order:3,menuItemFactory:Ne},[we]:{order:4,menuItemFactory:Pe},[Te]:{order:5,menuItemFactory:Fe},[Ee]:{order:6,menuItemFactory:Ie},[De]:{order:7,menuItemFactory:Le},[Oe]:{order:8,menuItemFactory:We,...Ze},[ke]:{order:9,menuItemFactory:Ye}}},[a.ContextMenuPosition.COL_HEADER]:{[a.ContextMenuGroup.DATA]:{[N.id]:{order:1,menuItemFactory:je},[Se]:{order:2,menuItemFactory:Me,...Xe},[Ce]:{order:3,menuItemFactory:Ne},[we]:{order:4,menuItemFactory:Pe},[Te]:{order:5,menuItemFactory:Fe},[Ee]:{order:6,menuItemFactory:Ie},[De]:{order:7,menuItemFactory:Le}}}};var $e=`@univerjs-pro/sheets-pivot-ui`,et=`1.5.2`;let tt={type:r.CommandType.OPERATION,id:`sheet.operation.open-pivot-table-filter-panel`,async handler(e,t){if(!t)return!1;let{row:r,col:i,unitId:o,subUnitId:s,tableFieldId:c,pivotTableId:l}=t,u=e.get(n.SheetsPivotTableAdaptorModel),d=l||u.getPivotTableIdByCell(o,s,r,i);if(!d)return!1;let f=e.get(n.SheetsPivotRPCService),p=u.getPivotItemRenderInfoCache(o,s,d);if(!(p!=null&&p.rangesInfo))return!1;let m=u.getPivotTableCellData(o,s,r,i),h=(await f.getPivotDisplayConfig({unitId:o,subUnitId:s,pivotTableId:d,params:{type:n.PivotDisplayDataType.Filter,filter:{row:r,col:i,tableFieldId:c,cellData:m,pivotItemRenderInfoCache:p}}})).result.filter;if(!h)return!1;let g=e.get(a.IDialogService),_={id:b,draggable:!0,mask:!1,maskClosable:!1,width:336,dialogStyles:{header:{padding:`16px 16px 0`,height:0},body:{padding:`0 16px 16px`}},closable:!1,children:{label:y,unitId:o,subUnitId:s,key:`${r}-${i}-${c||``}`,filterItemInfo:h},onClose:()=>{g.close(b)}};return g.open(_),!0}},nt={type:r.CommandType.OPERATION,id:`sheet.operation.open-pivot-table-field-setting-panel`,handler(e,t){if(!t)return!1;let n=e.get(r.LocaleService),{tableFieldId:i,pivotTableId:o,unitId:s,subUnitId:c,tableFieldInfo:l,dataFieldInfo:u}=t,d=e.get(a.IDialogService),f={id:S,title:{title:n.t(`sheets-pivot-ui.fieldSettings`)},draggable:!0,mask:!1,maskClosable:!1,width:400,children:{label:x,tableFieldId:i,pivotTableId:o,tableFieldInfo:l,dataFieldInfo:u,unitId:s,subUnitId:c,version:Math.random(),key:`field-setting-${i||``}`,closeFn:()=>{d.close(S)}},onClose:()=>{d.close(S)}};return d.open(f),!0}};function rt(e,n,r){let i=r.fieldIds,{fieldsConfig:a}=n,{rowFields:o,columnFields:s,valueFields:c,filterFields:l,hiddenFields:u,dimension:d,measure:f,valueIndex:p,valuePosition:m}=a,h=/* @__PURE__ */ new Set;[...o,...s,...c,...l,...u].forEach(e=>{let t=d[e]||f[e];t&&h.add(t.dataFieldId)});let g=i.map(t=>{let n=r.fields[t];return{checked:h.has(t),dataFieldId:n.id,id:n.id,name:n.name,type:n.fieldDataType,pivotTableId:e}}),_=o.flatMap(e=>{let t=d[e];return t?[{dataFieldId:t.dataFieldId,tableFieldId:t.id,displayName:t.displayName}]:[]}),v=s.flatMap(e=>{let t=d[e];return t?[{dataFieldId:t.dataFieldId,tableFieldId:t.id,displayName:t.displayName}]:[]}),y=c.flatMap(e=>{let t=f[e];return t?[{dataFieldId:t.dataFieldId,tableFieldId:t.id,displayName:t.displayName,format:t.format,subTotalType:t.subtotal}]:[]}),b=l.flatMap(e=>{let t=d[e];return t?[{dataFieldId:t.dataFieldId,tableFieldId:t.id,displayName:t.displayName}]:[]}),x=u.flatMap(e=>{let t=d[e];return t?[{dataFieldId:t.dataFieldId,tableFieldId:t.id,displayName:t.displayName,filterInfo:t.filterInfo}]:[]});return y.length>1&&(m===t.PivotTableValuePositionEnum.Row?_:v).splice(p,0,{dataFieldId:``,tableFieldId:`PivotMultipleValueId`,displayName:`ΣValue`}),{sourceList:g,sourceRange:n.sourceRangeInfo,rowFields:_,columnFields:v,valueFields:y,filterFields:b,hiddenFields:x,positionInfo:n.targetCellInfo}}let it={type:r.CommandType.OPERATION,id:`sheet.operation.open-pivot-table-panel`,async handler(e,t){let o=t==null?void 0:t.pivotTableId;if(!o)return!1;let s=e.get(a.ISidebarService),c=e.get(r.IUniverInstanceService),l=e.get(r.LocaleService),u=e.get(n.SheetsPivotTableConfigModel),d=(0,i.getSheetCommandTarget)(c);if(!d)return!1;let{unitId:f,subUnitId:p}=d,m=u.getPivotTableConfig(f,p,o),h=u.getCollection(f,o);if(!m||!h)return!1;let g=rt(o,m,h),y={header:{title:l.t(`sheets-pivot-ui.title`)},id:v,children:{label:_,panelInfo:g,version:Math.random(),setVersion:()=>Math.random(),pivotTableId:o,unitId:f,subUnitId:p},width:346};return s.open(y),!0}},at=`sheets-pivot-ui.config`,ot={};function st(e){"@babel/helpers - typeof";return st=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},st(e)}function ct(e,t){if(st(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(st(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function lt(e){var t=ct(e,`string`);return st(t)==`symbol`?t:t+``}function W(e,t,n){return(t=lt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t){return function(n,r){t(n,r,e)}}function K(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}let q=class extends r.Disposable{constructor(e,t,r,i,a,o,s,c){var l;super(),this._localeService=e,this._sheetInterceptorService=t,this._injector=r,this._confirmService=i,this._sheetsPivotTableService=a,this._configService=o,this._sheetPermissionCheckController=s,this._sheetsRenderService=c,W(this,`_defaultOverride`,!1),this.disposeWithMe(this._sheetsRenderService.registerSelfRenderingMutations(n.InitializePivotRuntimeLocalMutation.id)),this._initUIInterceptListener(),this._defaultOverride=((l=this._configService.getConfig(n.SHEETS_PIVOT_PLUGIN_CONFIG_KEY))==null?void 0:l.defaultOverride)??!1}_getPivotAppliedRanges(e,t,r){return(0,n.getPivotAppliedRanges)(e,t,r,this._localeService.getDirection())}_initUIInterceptListener(){this._sheetsPivotTableService.asyncInterceptor.interceptAsync(this._sheetsPivotTableService.asyncInterceptor.getInterceptPoints().PIVOT_PERFORM_CHECK,{handler:async(e,t)=>{let{cellInfo:r,view:a,isEmpty:o}=t,{unitId:s,subUnitId:c}=r,l=this._getPivotAppliedRanges(r,a,o);if(!(0,i.checkRangesEditablePermission)(this._injector,s,c,l)){let e=this._localeService.t(`sheets-pivot-ui.msg.permissionError`);this._sheetPermissionCheckController.blockExecuteWithoutPermission(e)}let u=this._sheetInterceptorService.generateMutationsByRanges({unitId:s,subUnitId:c,ranges:l}),d=(0,n.generateSetRangeValueMutations)(this._injector,s,c,l);if(u.redos.length||d.shouldClear){if(this._defaultOverride)return Promise.resolve(!0);{let e=await this._confirmService.confirm({id:`sheet-pivot.confirm.add-sheet-pivot`,title:{title:this._localeService.t(`sheets-pivot-ui.perform.tips`)},children:{title:this._localeService.t(`sheets-pivot-ui.perform.info`)},cancelText:this._localeService.t(`sheets-pivot-ui.perform.cancel`),confirmText:this._localeService.t(`sheets-pivot-ui.perform.confirm`)});return Promise.resolve(e)}}return Promise.resolve(!0)}})}};q=K([G(0,(0,r.Inject)(r.LocaleService)),G(1,(0,r.Inject)(i.SheetInterceptorService)),G(2,(0,r.Inject)(r.Injector)),G(3,(0,r.Inject)(r.IConfirmService)),G(4,(0,r.Inject)(n.SheetsPivotTableService)),G(5,(0,r.Inject)(r.IConfigService)),G(6,(0,r.Inject)(i.SheetPermissionCheckController)),G(7,(0,r.Inject)(o.SheetsRenderService))],q);function J({ref:e,...t}){let{preserveStrokeWidth:n,icon:r,id:i,className:a,extend:o,...s}=t,c=`univerjs-icon univerjs-icon-${i} ${a||``}`.trim(),l=`_${(0,d.useId)()}`,u=(0,d.useRef)(null);return(0,d.useImperativeHandle)(e,()=>u.current),(0,d.useLayoutEffect)(()=>{if(n&&u.current&&u.current.localName===r.tag)return pt(u.current)},[n,r]),ut(r,`${i}`,{defIds:r.defIds,idSuffix:l},{ref:u,className:c,...s},o)}function ut(e,t,n,r,i){return(0,d.createElement)(e.tag,{key:t,...dt(e,n,i),...r},(ft(e,n).children||[]).map((r,a)=>ut(r,`${t}-${e.tag}-${a}`,n,void 0,i)))}function dt(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),n!=null&&n.colorChannel1&&r.stroke===`colorChannel1`&&(r.stroke=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0||(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))})),r}function ft(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function pt(e){let t=e.viewBox.baseVal,n=Math.max(t.width,t.height);if(!Number.isFinite(n)||n<=0||t.width<=0||t.height<=0)return()=>void 0;let r=16/n,i=Array.from(e.querySelectorAll(`circle, ellipse, line, path, polygon, polyline, rect, text, textPath, tspan, use`)).flatMap(e=>{let t=getComputedStyle(e),n=Number.parseFloat(t.strokeWidth);return t.stroke===`none`||Number.parseFloat(t.strokeOpacity)===0||t.vectorEffect===`non-scaling-stroke`||!Number.isFinite(n)||n<=0?[]:[{element:e,hadStyleAttribute:e.hasAttribute(`style`),originalStrokeWidth:n,strokeWidth:mt(e.style,`stroke-width`)}]}).map(e=>({appliedStrokeWidth:null,element:e.element,hadStyleAttribute:e.hadStyleAttribute,isReleased:!1,originalStrokeWidth:e.originalStrokeWidth,strokeWidth:e.strokeWidth}));if(i.length===0)return()=>void 0;let a=(e,n)=>{if(t.width<=0||t.height<=0||e<=0||n<=0)return;let a=Math.min(e/t.width,n/t.height);!Number.isFinite(a)||a<=0||i.forEach(e=>{if(e.isReleased)return;if(e.appliedStrokeWidth!==null&&(e.element.style.getPropertyValue(`stroke-width`)!==e.appliedStrokeWidth||e.element.style.getPropertyPriority(`stroke-width`)!==e.strokeWidth.priority)){e.appliedStrokeWidth=null,e.isReleased=!0;return}let t=e.originalStrokeWidth*r/a,n=`${Number(t.toFixed(12))}px`;e.element.style.setProperty(`stroke-width`,n,e.strokeWidth.priority),e.appliedStrokeWidth=n})},o=e.getBoundingClientRect();a(o.width,o.height);let s=typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{if(t.some(t=>t.target===e)){let t=e.getBoundingClientRect();a(t.width,t.height)}});return s==null||s.observe(e),()=>{s==null||s.disconnect(),i.forEach(e=>{e.appliedStrokeWidth!==null&&(ht(e.element.style,`stroke-width`,e.appliedStrokeWidth,e.strokeWidth.priority,e.strokeWidth),!e.hadStyleAttribute&&e.element.style.length===0&&e.element.removeAttribute(`style`))})}}function mt(e,t){return{priority:e.getPropertyPriority(t),value:e.getPropertyValue(t)}}function ht(e,t,n,r,i){e.getPropertyValue(t)===n&&e.getPropertyPriority(t)===r&&(i.value?e.setProperty(t,i.value,i.priority):e.removeProperty(t))}J.displayName=`UniverIcon`;let gt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{stroke:`currentColor`,d:`M13.5 8H2.5M7.5 3L2.5 8L7.5 13`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.2}}]},_t=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`arrow-left-icon`,ref:t,icon:gt}))});_t.displayName=`ArrowLeftIcon`;let vt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M12.4208 14.4667C12.4208 14.798 12.1522 15.0667 11.8208 15.0667C11.4895 15.0667 11.2208 14.798 11.2208 14.4667V2.98193L9.97861 4.22417C9.7443 4.45848 9.3644 4.45848 9.13008 4.22417C8.89577 3.98985 8.89577 3.60995 9.13008 3.37564L11.3967 1.10897C11.6311 0.874657 12.011 0.874657 12.2453 1.10897L14.5119 3.37564C14.7463 3.60995 14.7463 3.98985 14.5119 4.22417C14.2776 4.45848 13.8977 4.45848 13.6634 4.22417L12.4208 2.9816V14.4667Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z`,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},yt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`ascending-icon`,ref:t,icon:vt}))});yt.displayName=`AscendingIcon`;let bt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`g`,attrs:{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.2},children:[{tag:`rect`,attrs:{width:12.4,height:11,x:1.8,y:3.2,rx:1.2}},{tag:`path`,attrs:{d:`M5 1.5V4.5M11 1.5V4.5M1.8 6.2H14.2M4.2 9.2H6.2M9.8 9.2H11.8M4.2 11.8H6.2M9.8 11.8H11.8`}}]}]},xt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`calendar-icon`,ref:t,icon:bt}))});xt.displayName=`CalendarIcon`;let St={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{stroke:`currentColor`,d:`M2.27 8L6.09 11.82L13.73 4.18`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.2}}]},Ct=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`check-mark-icon`,ref:t,icon:St}))});Ct.displayName=`CheckMarkIcon`;let wt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 17`,width:`1em`,height:`1em`},children:[{tag:`rect`,attrs:{width:12.52,height:4,x:2.63,y:2.89,stroke:`currentColor`,rx:1.1,strokeWidth:1.2}},{tag:`path`,attrs:{stroke:`currentColor`,d:`M6.80825 2.89202V6.89199M10.9821 2.89202V6.89199`,strokeWidth:1.2}},{tag:`rect`,attrs:{width:4,height:4,x:2.63,y:9.8,stroke:`currentColor`,rx:1.1,strokeWidth:1.2}}]},Tt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`column-icon`,ref:t,icon:wt}))});Tt.displayName=`ColumnIcon`;let Et={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M12.4208 1.53335C12.4208 1.20198 12.1522 0.93335 11.8208 0.93335C11.4895 0.93335 11.2208 1.20198 11.2208 1.53335V13.0181L9.97861 11.7758C9.7443 11.5415 9.3644 11.5415 9.13008 11.7758C8.89577 12.0101 8.89577 12.39 9.13008 12.6244L11.3967 14.891C11.6311 15.1253 12.011 15.1253 12.2453 14.891L14.5119 12.6244C14.7463 12.39 14.7463 12.0101 14.5119 11.7758C14.2776 11.5415 13.8977 11.5415 13.6634 11.7758L12.4208 13.0184V1.53335Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.98967 10.2798C1.6583 10.2798 1.38967 10.0112 1.38967 9.67983C1.38967 9.34846 1.6583 9.07983 1.98967 9.07983H6.50138C6.74406 9.07983 6.96284 9.22602 7.05571 9.45022C7.14858 9.67443 7.09725 9.9325 6.92565 10.1041L3.43819 13.5916H6.50138C6.83276 13.5916 7.10138 13.8602 7.10138 14.1916C7.10138 14.5229 6.83276 14.7916 6.50138 14.7916H1.98967C1.74699 14.7916 1.52821 14.6454 1.43534 14.4212C1.34247 14.197 1.3938 13.9389 1.5654 13.7673L5.05286 10.2798H1.98967Z`,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M5.1846 1.86439C4.8641 0.989866 3.62725 0.989866 3.30674 1.86439L1.34882 7.20672C1.23479 7.51786 1.39458 7.86252 1.70571 7.97655C2.01684 8.09058 2.3615 7.93079 2.47553 7.61966L3.06159 6.02055L3.06338 6.02056H5.42975L6.01581 7.61966C6.12984 7.93079 6.4745 8.09058 6.78563 7.97655C7.09677 7.86252 7.25655 7.51786 7.14252 7.20672L5.1846 1.86439ZM4.98996 4.82056L4.24567 2.78971L3.50138 4.82056H4.98996Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},Dt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`descending-icon`,ref:t,icon:Et}))});Dt.displayName=`DescendingIcon`;let Ot={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.32182 2.60967C2.98161 2.60967 2.79671 3.0074 3.01601 3.2675L6.85819 7.8246C6.94943 7.93282 6.99947 8.06981 6.99947 8.21136V12.7338C6.99947 12.898 7.0998 13.0455 7.2525 13.1058L8.73833 13.6928C9.00085 13.7965 9.28531 13.6031 9.28531 13.3208V8.21136C9.28531 8.06981 9.33535 7.93282 9.42659 7.8246L13.2688 3.2675C13.4881 3.0074 13.3032 2.60967 12.963 2.60967H3.32182ZM2.09858 4.04101C1.22139 3.0006 1.96097 1.40967 3.32182 1.40967H12.963C14.3238 1.40967 15.0634 3.0006 14.1862 4.04101L10.4853 8.43054V13.3208C10.4853 14.4498 9.34747 15.2237 8.29742 14.8089L6.81158 14.2219C6.20078 13.9806 5.79947 13.3905 5.79947 12.7338V8.43054L2.09858 4.04101Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},kt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`filter-icon`,ref:t,icon:Ot}))});kt.displayName=`FilterIcon`;let At={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{stroke:`currentColor`,d:`M12.8325 3.00753L12.2725 2.44328C11.9909 2.15966 11.6076 1.9999 11.2079 1.9999H4.08689C3.55342 1.9999 3.28522 2.64412 3.66105 3.02295L7.78136 7.17471C8.25623 7.65323 8.25623 8.43812 7.78136 8.91664L3.66105 13.0684C3.28522 13.4473 3.55342 14.0915 4.08689 14.0915H11.2079C11.6076 14.0915 11.9909 13.9317 12.2725 13.648L12.8325 13.0838`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.2}}]},jt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`function-icon`,ref:t,icon:At}))});jt.displayName=`FunctionIcon`;let Mt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 20 20`,width:`1em`,height:`1em`},children:[{tag:`circle`,attrs:{cx:7,cy:5,r:1.1,fill:`currentColor`}},{tag:`circle`,attrs:{cx:13,cy:5,r:1.1,fill:`currentColor`}},{tag:`circle`,attrs:{cx:7,cy:10,r:1.1,fill:`currentColor`}},{tag:`circle`,attrs:{cx:13,cy:10,r:1.1,fill:`currentColor`}},{tag:`circle`,attrs:{cx:7,cy:15,r:1.1,fill:`currentColor`}},{tag:`circle`,attrs:{cx:13,cy:15,r:1.1,fill:`currentColor`}}]},Nt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`grip-vertical-icon`,ref:t,icon:Mt}))});Nt.displayName=`GripVerticalIcon`;let Pt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{stroke:`currentColor`,d:`M5 6.5L8 9.5L11 6.5`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.2}}]},Ft=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`more-down-icon`,ref:t,icon:Pt}))});Ft.displayName=`MoreDownIcon`;let It={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3 9C3.55228 9 4 8.55228 4 8C4 7.44772 3.55228 7 3 7C2.44772 7 2 7.44772 2 8C2 8.55228 2.44772 9 3 9Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8 9C8.55228 9 9 8.55228 9 8C9 7.44772 8.55228 7 8 7C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M13 9C13.5523 9 14 8.55228 14 8C14 7.44772 13.5523 7 13 7C12.4477 7 12 7.44772 12 8C12 8.55228 12.4477 9 13 9Z`}}]},Lt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`more-horizontal-icon`,ref:t,icon:It}))});Lt.displayName=`MoreHorizontalIcon`;let Rt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.9334 2.00527C5.9334 1.6739 5.66477 1.40527 5.3334 1.40527C5.00203 1.40527 4.7334 1.6739 4.7334 2.00527V4.73877H1.9999C1.66853 4.73877 1.3999 5.0074 1.3999 5.33877C1.3999 5.67014 1.66853 5.93877 1.9999 5.93877H4.7334V10.072H1.9999C1.66853 10.072 1.3999 10.3407 1.3999 10.672C1.3999 11.0034 1.66853 11.272 1.9999 11.272H4.7334V14.0053C4.7334 14.3366 5.00203 14.6053 5.3334 14.6053C5.66477 14.6053 5.9334 14.3366 5.9334 14.0053V11.272H10.0667V14.0053C10.0667 14.3366 10.3353 14.6053 10.6667 14.6053C10.998 14.6053 11.2667 14.3366 11.2667 14.0053V11.272H13.9999C14.3313 11.272 14.5999 11.0034 14.5999 10.672C14.5999 10.3407 14.3313 10.072 13.9999 10.072H11.2667V5.93877H13.9999C14.3313 5.93877 14.5999 5.67014 14.5999 5.33877C14.5999 5.0074 14.3313 4.73877 13.9999 4.73877H11.2667V2.00527C11.2667 1.6739 10.998 1.40527 10.6667 1.40527C10.3353 1.40527 10.0667 1.6739 10.0667 2.00527V4.73877H5.9334V2.00527ZM10.0667 10.072V5.93877H5.9334V10.072H10.0667Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},zt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`number-icon`,ref:t,icon:Rt}))});zt.displayName=`NumberIcon`;let Bt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M1.4082 3.74922C1.4082 4.63288 2.12455 5.34922 3.0082 5.34922H4.2082C5.09186 5.34922 5.8082 4.63287 5.8082 3.74922V2.54922C5.8082 1.66556 5.09186 0.949219 4.2082 0.949219H3.0082C2.12455 0.949219 1.4082 1.66556 1.4082 2.54922V3.74922ZM3.0082 4.14922C2.78729 4.14922 2.6082 3.97013 2.6082 3.74922V2.54922C2.6082 2.32831 2.78729 2.14922 3.0082 2.14922H4.2082C4.42912 2.14922 4.6082 2.32831 4.6082 2.54922V3.74922C4.6082 3.97013 4.42912 4.14922 4.2082 4.14922L3.0082 4.14922Z`,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.60757 5.24912C7.72391 5.24912 7.00757 4.53278 7.00757 3.64912V2.64912C7.00757 1.76547 7.72391 1.04912 8.60757 1.04912L14.0076 1.04912C14.8912 1.04912 15.6076 1.76546 15.6076 2.64912V3.64912C15.6076 4.53278 14.8912 5.24912 14.0076 5.24912L8.60757 5.24912ZM8.20757 3.64912C8.20757 3.87003 8.38665 4.04912 8.60757 4.04912L14.0076 4.04912C14.2285 4.04912 14.4076 3.87003 14.4076 3.64912V2.64912C14.4076 2.42821 14.2285 2.24912 14.0076 2.24912L8.60757 2.24912C8.38665 2.24912 8.20757 2.42821 8.20757 2.64912V3.64912Z`,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.5083 8.05078C1.5083 7.16713 2.22464 6.45078 3.1083 6.45078H4.1083C4.99196 6.45078 5.7083 7.16713 5.7083 8.05078V13.4508C5.7083 14.3344 4.99196 15.0508 4.1083 15.0508H3.1083C2.22464 15.0508 1.5083 14.3344 1.5083 13.4508V8.05078ZM3.1083 7.65078C2.88739 7.65078 2.7083 7.82987 2.7083 8.05078V13.4508C2.7083 13.6717 2.88739 13.8508 3.1083 13.8508H4.1083C4.32921 13.8508 4.5083 13.6717 4.5083 13.4508V8.05078C4.5083 7.82987 4.32921 7.65078 4.1083 7.65078H3.1083Z`,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.01375 13.0622L9.82677 14.8752C10.0611 15.1095 10.441 15.1095 10.6753 14.8752C10.9096 14.6409 10.9096 14.261 10.6753 14.0267L9.60391 12.9553L12.5981 12.9537C14.0335 12.953 15.1968 11.7891 15.1968 10.3537V7.70108C15.1968 7.3697 14.9281 7.10108 14.5968 7.10108C14.2654 7.10108 13.9968 7.3697 13.9968 7.70108V10.3537C13.9968 11.1266 13.3704 11.7533 12.5975 11.7537L9.60349 11.7553L10.6753 10.6835C10.9096 10.4492 10.9096 10.0693 10.6753 9.83495C10.441 9.60063 10.0611 9.60063 9.82677 9.83495L8.01375 11.648C7.62322 12.0385 7.62322 12.6717 8.01375 13.0622Z`}}]},Vt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`pivot-table-icon`,ref:t,icon:Bt}))});Vt.displayName=`PivotTableIcon`;let Ht={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 17`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.04163 6.24451L8.0418 6.25869L8.04163 6.27285L8.04173 10.4233L8.0418 10.4325L8.04173 10.4417L8.0418 13.5069C8.04182 14.4458 7.2807 15.2069 6.3418 15.2069H4.54183C3.60294 15.2069 2.84182 14.4458 2.84183 13.5069L2.84184 10.4397L2.8418 10.4325L2.84184 10.4253L2.84186 6.26726L2.8418 6.25869L2.84186 6.25011L2.84187 3.18486C2.84187 2.24596 3.60301 1.48484 4.54191 1.48486L6.3416 1.48491C7.28046 1.48493 8.04154 2.24602 8.04156 3.18487L8.04163 6.24451ZM6.8418 13.5069L6.84174 11.0325H4.04184L4.04183 13.5069C4.04183 13.783 4.26568 14.0069 4.54183 14.0069H6.3418C6.61794 14.0069 6.8418 13.783 6.8418 13.5069ZM6.84171 9.83252H4.04184L4.04185 6.85869H6.84165L6.84171 9.83252ZM6.84162 5.65869H4.04186L4.04187 3.18486C4.04187 2.90871 4.26574 2.68486 4.54188 2.68486L6.34158 2.68491C6.61771 2.68491 6.84156 2.90876 6.84156 3.1849L6.84162 5.65869Z`,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M9.74932 4.98481L9.74934 3.18484C9.74936 2.24595 10.5105 1.48484 11.4494 1.48486L13.2493 1.48491C14.1882 1.48494 14.9493 2.24604 14.9493 3.18491V4.98483C14.9493 5.92372 14.1882 6.68483 13.2493 6.68483H11.4493C10.5104 6.68483 9.7493 5.9237 9.74932 4.98481ZM10.9493 3.18486L10.9493 4.98483C10.9493 5.26097 11.1732 5.48483 11.4493 5.48483H13.2493C13.5254 5.48483 13.7493 5.26098 13.7493 4.98483V3.18491C13.7493 2.90877 13.5254 2.68492 13.2493 2.68491L11.4494 2.68486C11.1732 2.68486 10.9493 2.90871 10.9493 3.18486Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},Ut=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`row-icon`,ref:t,icon:Ht}))});Ut.displayName=`RowIcon`;let Wt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`g`,attrs:{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:1.2},children:[{tag:`circle`,attrs:{cx:7,cy:7,r:5.2}},{tag:`path`,attrs:{d:`M10.8 10.8L14.2 14.2`}}]}]},Gt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`search-icon`,ref:t,icon:Wt}))});Gt.displayName=`SearchIcon`;let Kt={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{stroke:`currentColor`,d:`M2.22891 2.67227H11.5622M6.89541 2.67227V14.0056M10.2289 7.00552H15.5622M12.8954 7.00552V14.0055`,strokeLinecap:`round`,strokeWidth:1.2}}]},qt=(0,d.forwardRef)(function(e,t){return(0,d.createElement)(J,Object.assign({},e,{id:`text-icon`,ref:t,icon:Kt}))});qt.displayName=`TextIcon`;function Jt(e){let{editable:t,pivotTableId:i,subUnitId:o,unitId:s}=e,l=(0,a.useDependency)(r.ICommandService),u=(0,a.useDependency)(a.IDialogService),d=(0,a.useDependency)(r.LocaleService),p=[{command:{id:it.id,params:{pivotTableId:i}},disabled:!t,label:`sheets-pivot-ui.mobile.edit`},{command:{id:n.RemovePivotTableCommand.id,params:{unitId:s,subUnitId:o,pivotTableId:i}},disabled:!t,label:`sheets-pivot-ui.mobile.delete`}];async function m(e){await l.executeCommand(e.id,e.params),u.close(M)}return/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:p.map(e=>{let t=d.t(e.label);return/* @__PURE__ */ (0,f.jsx)(c.MobileActionRow,{title:t,"aria-label":t,variant:`subtle`,disabled:e.disabled,onClick:()=>m(e.command)},e.command.id)})})}let Yt=[{label:`1930-08-05`,suffix:`yyyy-MM-dd`},{label:`1930/08/05`,suffix:`yyyy/MM/dd`},{label:`1930年08月05日`,suffix:`yyyy"年"MM"月"dd"日"`},{label:`08-05`,suffix:`MM-dd`},{label:`8月5日`,suffix:`M"月"d"日"`},{label:`13:30:30`,suffix:`h:mm:ss`},{label:`13:30`,suffix:`h:mm`},{label:`下午01:30`,suffix:`A/P hh:mm`},{label:`下午1:30`,suffix:`A/P h:mm`},{label:`下午1:30:30`,suffix:`A/P h:mm:ss`},{label:`08-05 下午 01:30`,suffix:`MM-dd A/P hh:mm`}],Xt=[{label:`(1,235)`,suffix:`#,##0_);(#,##0)`},{label:`(1,235) `,suffix:`#,##0_);[Red](#,##0)`,color:`red`},{label:`1,234.56`,suffix:`#,##0.00_);#,##0.00`},{label:`1,234.56`,suffix:`#,##0.00_);[Red]#,##0.00`,color:`red`},{label:`-1,234.56`,suffix:`#,##0.00_);-#,##0.00`},{label:`-1,234.56`,suffix:`#,##0.00_);[Red]-#,##0.00`,color:`red`}],Zt=[{label:e=>`${e}1,235`,suffix:e=>`"${e}"#,##0.00_);"${e}"#,##0.00`},{label:e=>`${e}1,235`,suffix:e=>`"${e}"#,##0.00_);[Red]"${e}"#,##0.00`,color:`red`},{label:e=>`(${e}1,235)`,suffix:e=>`"${e}"#,##0.00_);("${e}"#,##0.00)`},{label:e=>`(${e}1,235)`,suffix:e=>`"${e}"#,##0.00_);[Red]("${e}"#,##0.00)`,color:`red`},{label:e=>`-${e}1,235`,suffix:e=>`"${e}"#,##0.00_);-"${e}"#,##0.00`},{label:e=>`-${e}1,235`,suffix:e=>`"${e}"#,##0.00_);[Red]-"${e}"#,##0.00`,color:`red`}],Qt=`PivotMultipleValueId`;function $t(e,n){if(n===t.PivotDataFieldDataTypeEnum.blank)return`sheets-pivot-ui.dialog.filter.blank`;if(n===t.PivotDataFieldDataTypeEnum.other&&e===t.GlobalConfig.otherDataKey)return`sheets-pivot-ui.showValuesAs.other`}function en(e,t){let r=(0,n.isolateTextForBidiContext)(t,e);return e.includes(`{0}`)?e.replace(`{0}`,r):`${e}${r}`}let tn=e=>{switch(e){case`filter`:return t.PivotTableFiledAreaEnum.Filter;case`row`:return t.PivotTableFiledAreaEnum.Row;case`column`:return t.PivotTableFiledAreaEnum.Column;case`value`:return t.PivotTableFiledAreaEnum.Value;default:return t.PivotTableFiledAreaEnum.Row}};function nn(e,t){switch(t.rangeType||r.RANGE_TYPE.NORMAL){case r.RANGE_TYPE.NORMAL:return{startRow:t.startRow,startColumn:t.startColumn,endRow:t.endRow,endColumn:t.endColumn};case r.RANGE_TYPE.ROW:return{startRow:t.startRow,startColumn:0,endRow:t.endRow,endColumn:e.getColumnCount()-1};case r.RANGE_TYPE.COLUMN:return{startRow:0,startColumn:t.startColumn,endRow:e.getRowCount()-1,endColumn:t.endColumn};case r.RANGE_TYPE.ALL:return{startRow:0,startColumn:0,endRow:e.getRowCount()-1,endColumn:e.getColumnCount()-1}}}function rn(e,t){if(!t||!e||t.endRow-t.startRow<=0)return 1;let{startRow:n,startColumn:r,endRow:i,endColumn:a}=nn(e,t),o=e.getCellMatrix(),s=!1;for(let e=n;e<=i;e++){for(let t=r;t<=a;t++)if(o.getValue(e,t)!=null){s=!0;break}if(s)break}return s?2:0}async function an(e,t,r){let{commandService:i,pivotTableInfo:a,pivotTableId:o,unitId:s,subUnitId:c}=e,l=[],{rowFields:u,columnFields:d,filterFields:f,valueFields:p}=a,m=[...u,...d,...f,...p];t===`PivotMultipleValueId`&&p.forEach(e=>{l.push(e.tableFieldId)}),r===`source`&&m.forEach(e=>{e.dataFieldId===t&&l.push(e.tableFieldId)}),r!==`source`&&m.find(e=>e.tableFieldId===t)&&l.push(t),await i.executeCommand(n.RemovePivotFieldCommand.id,{pivotTableId:o,fieldIds:l,unitId:s,subUnitId:c})}async function on(e,t,r,i,a){let o={unitId:i,subUnitId:a,token:t,dataRangeInfo:r};await e.executeCommand(n.UpdatePivotTableSourceRangeCommand.id,o)}let sn=(e,t)=>{let{rowFields:n,columnFields:r,filterFields:i}=e,a=[...n,...r,...i],o=[];return a.forEach(e=>{e.dataFieldId===t&&o.push(e.tableFieldId)}),o};async function cn(e,t,r,i,a){if(r===`source`&&i===`source`)return;let o=t===Qt,{commandService:s,pivotTableInfo:c,pivotTableId:l,unitId:u,subUnitId:d}=e;if(r===`source`&&i!==`source`){let{sourceList:e}=c,r=e.find(e=>e.id===t);if(r){let e=sn(c,t);if(i!==`value`&&e.length>0){let t=e[0];await s.executeCommand(n.MovePivotFieldCommand.id,{pivotTableId:l,fieldId:t,area:tn(i),index:a,unitId:u,subUnitId:d})}else await s.executeCommand(n.AddPivotFieldCommand.id,{pivotTableId:l,dataFieldId:r.dataFieldId,fieldArea:tn(i),index:a,unitId:u,subUnitId:d})}}if(r!==`source`&&i===`source`){let{rowFields:n,columnFields:r,filterFields:i,valueFields:a}=c,s=[...n,...r,...i,...a],l=[];o?a.forEach(e=>{l.push(e.tableFieldId)}):s.find(e=>e.tableFieldId===t)&&l.push(t),await ln(e,l)}else r!==`source`&&i!==`source`&&await dn(e,t,r,i,a)}async function ln(e,t){let{commandService:r,pivotTableId:i,unitId:a,subUnitId:o}=e;await r.executeCommand(n.RemovePivotFieldCommand.id,{pivotTableId:i,fieldIds:t,unitId:a,subUnitId:o})}async function un(e,t,r){let{commandService:i,pivotTableId:a,unitId:o,subUnitId:s}=e;await i.executeCommand(n.UpdatePivotValuePositionCommand.id,{pivotTableId:a,position:t,index:r,unitId:o,subUnitId:s})}async function dn(e,r,i,a,o){let s=r===Qt,{commandService:c,pivotTableInfo:l,pivotTableId:u,unitId:d,subUnitId:f}=e;if(s){let e=tn(a);(e===t.PivotTableFiledAreaEnum.Row||e===t.PivotTableFiledAreaEnum.Column)&&await c.executeCommand(n.UpdatePivotValuePositionCommand.id,{pivotTableId:u,position:e===t.PivotTableFiledAreaEnum.Row?t.PivotTableValuePositionEnum.Row:t.PivotTableValuePositionEnum.Column,index:o,unitId:d,subUnitId:f});return}let{rowFields:p,columnFields:m,filterFields:h,valueFields:g}=l,_=[...p,...m,...h,...g].find(e=>e.tableFieldId===r);if(_){let t=[...p,...m,...h];if(i===`value`&&a!==`value`&&t.find(e=>e.dataFieldId===_.dataFieldId)){await ln(e,[r]);return}await c.executeCommand(n.MovePivotFieldCommand.id,{pivotTableId:u,fieldId:r,area:tn(a),index:o,unitId:d,subUnitId:f})}}function fn(e,t,n,r,i){e.executeCommand(tt.id,{row:-1,col:-1,unitId:t,subUnitId:n,tableFieldId:i,pivotTableId:r})}function pn(e,t,n,r,i,a){let{sourceList:o,rowFields:s,columnFields:c,valueFields:l,filterFields:u}=a,d=[...s,...c,...l,...u].find(e=>e.tableFieldId===n),f=o.find(e=>e.id===(d==null?void 0:d.dataFieldId));if(d&&f){let a={tableFieldId:n,pivotTableId:t,unitId:r,subUnitId:i,tableFieldInfo:d,dataFieldInfo:f};e.executeCommand(nt.id,a)}}let mn=[{type:t.PivotSubtotalTypeEnum.average,textKey:`sheets-pivot-ui.subtotal.average`},{type:t.PivotSubtotalTypeEnum.count,textKey:`sheets-pivot-ui.subtotal.count`},{type:t.PivotSubtotalTypeEnum.countNums,textKey:`sheets-pivot-ui.subtotal.countNums`},{type:t.PivotSubtotalTypeEnum.max,textKey:`sheets-pivot-ui.subtotal.max`},{type:t.PivotSubtotalTypeEnum.min,textKey:`sheets-pivot-ui.subtotal.min`},{type:t.PivotSubtotalTypeEnum.product,textKey:`sheets-pivot-ui.subtotal.product`},{type:t.PivotSubtotalTypeEnum.stdDev,textKey:`sheets-pivot-ui.subtotal.stdDev`},{type:t.PivotSubtotalTypeEnum.stdDevp,textKey:`sheets-pivot-ui.subtotal.stdDevp`},{type:t.PivotSubtotalTypeEnum.sum,textKey:`sheets-pivot-ui.subtotal.sum`},{type:t.PivotSubtotalTypeEnum.var,textKey:`sheets-pivot-ui.subtotal.var`},{type:t.PivotSubtotalTypeEnum.varp,textKey:`sheets-pivot-ui.subtotal.varp`}],hn=(e,t=0)=>e?r.numfmt.getFormatInfo(e).maxDecimals??t:t,gn=e=>Array(Math.min(Math.max(0,Number(e)),30)).fill(0).join(``),Y=(e,t)=>e.split(`;`).map(e=>/\.0?/.test(e)?e.replace(/\.0*/g,`${t>0?`.`:``}${gn(Number(t||0))}`):/0[^0]?/.test(e)?e.replace(/0[^0]+|0$/,`0${t>0?`.`:``}${gn(Number(t||0))}`):e).join(`;`),_n=e=>r.currencySymbols.find(t=>e.includes(t)),vn=e=>!e,yn=e=>!!_n(e)&&e.startsWith(`_(`),bn=e=>!!_n(e)&&!e.startsWith(`_(`),xn=()=>Yt.map(e=>({label:e.label,value:e.suffix})),Sn=e=>{let t=r.numfmt.getFormatInfo(e);return xn().map(e=>e.value).includes(e)||[`date`,`datetime`,`time`].includes(t.type)},Cn=()=>Xt.map(e=>({label:e.label,value:e.suffix,color:e.color})),wn=e=>Cn().some(t=>(0,r.isPatternEqualWithoutDecimal)(t.value,e)),Tn=(e,n)=>{switch(n){case t.PivotTableFiledAreaEnum.Row:return e.rowFields.length;case t.PivotTableFiledAreaEnum.Column:return e.columnFields.length;case t.PivotTableFiledAreaEnum.Filter:return e.filterFields.length;case t.PivotTableFiledAreaEnum.Value:return e.valueFields.length;default:return 0}},En=(e,t,r)=>{for(let i of[`sheets-pivot-ui.averageName`,`sheets-pivot-ui.countName`,`sheets-pivot-ui.countNumsName`,`sheets-pivot-ui.maxName`,`sheets-pivot-ui.minName`,`sheets-pivot-ui.productName`,`sheets-pivot-ui.stdDevName`,`sheets-pivot-ui.stdDevpName`,`sheets-pivot-ui.sumName`,`sheets-pivot-ui.varName`,`sheets-pivot-ui.varpName`]){let a=r[i];if(a+(0,n.isolateTextForBidiContext)(e,a)===t||a+e===t)return!0}return!1},Dn=(e,r,i)=>{let a=``;switch(i){case t.PivotSubtotalTypeEnum.average:a=r[`sheets-pivot-ui.averageName`];break;case t.PivotSubtotalTypeEnum.count:a=r[`sheets-pivot-ui.countName`];break;case t.PivotSubtotalTypeEnum.countNums:a=r[`sheets-pivot-ui.countNumsName`];break;case t.PivotSubtotalTypeEnum.max:a=r[`sheets-pivot-ui.maxName`];break;case t.PivotSubtotalTypeEnum.min:a=r[`sheets-pivot-ui.minName`];break;case t.PivotSubtotalTypeEnum.product:a=r[`sheets-pivot-ui.productName`];break;case t.PivotSubtotalTypeEnum.stdDev:a=r[`sheets-pivot-ui.stdDevName`];break;case t.PivotSubtotalTypeEnum.stdDevp:a=r[`sheets-pivot-ui.stdDevpName`];break;case t.PivotSubtotalTypeEnum.sum:a=r[`sheets-pivot-ui.sumName`];break;case t.PivotSubtotalTypeEnum.var:a=r[`sheets-pivot-ui.varName`];break;case t.PivotSubtotalTypeEnum.varp:a=r[`sheets-pivot-ui.varpName`];break;default:return e}return a+(0,n.isolateTextForBidiContext)(e,a)};function On(e,n){if(n.conditionFilter&&(0,t.isPivotTableFilterRestrictive)(n.conditionFilter))return`HasFilter`;if(!e)return`NotFilter`;if((0,t.isPivotDateFilter)(e))return`HasFilter`;if((0,t.isManualPivotFilter)(e)){var r;return e.isAll||((r=n.items)==null?void 0:r.length)===e.list.length?`NotFilter`:`HasFilter`}return(0,t.isPivotTableFilterRestrictive)(e)?`HasFilter`:`NotFilter`}function kn(e){return yn(e)?`accounting`:bn(e)?`currency`:Sn(e)?`date`:wn(e)?`thousandthPercentile`:`general`}function An(e){let{originPattern:t=``,onChange:n}=e,i=(0,a.useDependency)(r.LocaleService),[o,s]=(0,d.useState)(()=>kn(t)),[l,u]=(0,d.useState)(()=>hn(t,2)),[p,m]=(0,d.useState)(()=>_n(t)||r.currencySymbols[0]),[h,g]=(0,d.useState)(t),_=(0,d.useMemo)(()=>[{value:`general`,label:i.t(`sheets-pivot-ui.dialog.numfmt.general`)},{value:`accounting`,label:i.t(`sheets-pivot-ui.dialog.numfmt.accounting`)},{value:`currency`,label:i.t(`sheets-pivot-ui.dialog.numfmt.currency`)},{value:`date`,label:i.t(`sheets-pivot-ui.dialog.numfmt.date`)},{value:`thousandthPercentile`,label:i.t(`sheets-pivot-ui.dialog.numfmt.thousandthPercentile`)}],[i]),v=r.currencySymbols.map(e=>({label:e,value:e}));function y(e){g(e),n(e)}function b(e,t){return Y(`_("${e}"* #,##0${t>0?`.0`:``}_)`,t)}function x(e){s(e),y(e===`general`?``:e===`accounting`?b(p,l):e===`currency`?Y(Zt[0].suffix(p),l):e===`date`?Yt[0].suffix:Y(Xt[0].suffix,l))}function S(e){m(e),y(o===`accounting`?b(e,l):Y(Zt[0].suffix(e),l))}function C(e){let t=e??0;u(t),y(o===`accounting`?b(p,t):Y(h,t))}let w=Zt.map(e=>({label:e.label(p),value:e.suffix(p),color:e.color})),T=Xt.map(e=>({label:e.label,value:e.suffix,color:e.color})),E=Yt.map(e=>({label:e.label,value:e.suffix}));return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:i.t(`sheets-pivot-ui.dialog.numfmt.formatTypes`)}),/* @__PURE__ */ (0,f.jsx)(c.MobileSelect,{className:`univer-w-full`,value:o,options:_,onChange:e=>x(e),size:`small`})]}),(o===`accounting`||o===`currency`)&&/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:i.t(`sheets-pivot-ui.dialog.numfmt.decimalPlaces`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-w-full`,value:l,min:0,max:20,onChange:C,size:`small`,controls:!1})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:i.t(`sheets-pivot-ui.dialog.numfmt.currencyTypes`)}),/* @__PURE__ */ (0,f.jsx)(c.MobileSelect,{className:`univer-w-full`,value:p,options:v,onChange:S,size:`small`})]})]}),o===`thousandthPercentile`&&/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:i.t(`sheets-pivot-ui.dialog.numfmt.decimalPlaces`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-w-full`,value:l,min:0,max:20,onChange:C,size:`small`,controls:!1})]}),o===`currency`&&/* @__PURE__ */ (0,f.jsx)(c.SelectList,{className:`univer-rounded-xl univer-p-2`,options:w,value:h,onChange:e=>y(Y(e,l))}),o===`date`&&/* @__PURE__ */ (0,f.jsx)(c.SelectList,{className:`univer-rounded-xl univer-p-2`,options:E,value:h,onChange:e=>y(e)}),o===`thousandthPercentile`&&/* @__PURE__ */ (0,f.jsx)(c.SelectList,{className:`univer-rounded-xl univer-p-2`,options:T,value:h,onChange:e=>y(Y(e,l))}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-text-gray-500`,children:i.t(`sheets-pivot-ui.dialog.numfmt.${o}Desc`)})]})}function jn(e){let{unitId:t,subUnitId:i,pivotTableId:o,tableFieldId:s,originPattern:l,tableFieldInfo:u,dataFieldInfo:p}=e,m=(0,a.useDependency)(r.ICommandService),h=(0,a.useDependency)(a.IDialogService),g=(0,a.useDependency)(r.LocaleService),[_,v]=(0,d.useState)(l??``);async function y(){let e={format:_,tableFieldId:s,pivotTableId:o,unitId:t,subUnitId:i,tableFieldInfo:u,dataFieldInfo:p};await m.executeCommand(n.UpdatePivotFieldSettingCommand.id,e),h.close(w)}return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-5`,dir:g.getDirection(),children:[/* @__PURE__ */ (0,f.jsx)(An,{originPattern:l,onChange:v}),/* @__PURE__ */ (0,f.jsxs)(c.MobileActionRowGroup,{children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:()=>h.close(w),size:`middle`,children:g.t(`sheets-pivot-ui.dialog.numfmt.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,onClick:y,size:`middle`,children:g.t(`sheets-pivot-ui.dialog.numfmt.confirm`)})]})]})}function Mn(e){let{unitId:t,subUnitId:i,pivotTableId:o,tableFieldId:s,tableFieldInfo:l,dataFieldInfo:u,closeFn:p,format:m,version:h}=e,g=(0,a.useDependency)(r.ICommandService),_=(0,a.useDependency)(n.SheetsPivotTableConfigModel),v=(0,a.useDependency)(r.LocaleService),[y,b]=(0,d.useState)(`field`),[x,S]=(0,d.useState)(l.displayName),[C,w]=(0,d.useState)(l.subTotalType),[T,E]=(0,d.useState)(m??l.format??``),[D,O]=(0,d.useState)(T);(0,d.useEffect)(()=>{b(`field`),S(l.displayName),w(l.subTotalType),E(m??l.format??``),O(m??l.format??``)},[m,l,h]);let k={..._.getTextInfo()};[`sheets-pivot-ui.averageName`,`sheets-pivot-ui.countName`,`sheets-pivot-ui.countNumsName`,`sheets-pivot-ui.maxName`,`sheets-pivot-ui.minName`,`sheets-pivot-ui.productName`,`sheets-pivot-ui.stdDevName`,`sheets-pivot-ui.stdDevpName`,`sheets-pivot-ui.sumName`,`sheets-pivot-ui.varName`,`sheets-pivot-ui.varpName`].forEach(e=>{k[e]=v.t(e)});function A(e){w(e),En(u.name,x,k)&&S(Dn(u.name,k,e))}async function j(){let e={displayName:l.displayName===x?void 0:x,subtotalType:l.subTotalType===C?void 0:C,format:l.format===T?void 0:T,tableFieldId:s,pivotTableId:o,unitId:t,subUnitId:i,tableFieldInfo:l,dataFieldInfo:u};await g.executeCommand(n.UpdatePivotFieldSettingCommand.id,e),p()}return y===`format`?/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-5`,dir:v.getDirection(),children:[/* @__PURE__ */ (0,f.jsxs)(`button`,{type:`button`,className:`univer-flex univer-h-10 univer-items-center univer-gap-2 univer-border-0 univer-bg-transparent univer-p-0 univer-text-base univer-font-semibold`,onClick:()=>b(`field`),children:[/* @__PURE__ */ (0,f.jsx)(_t,{}),v.t(`sheets-pivot-ui.dialog.numfmt.fieldSetting`)]}),/* @__PURE__ */ (0,f.jsx)(An,{originPattern:T,onChange:O}),/* @__PURE__ */ (0,f.jsxs)(c.MobileActionRowGroup,{children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:()=>b(`field`),size:`middle`,children:v.t(`sheets-pivot-ui.dialog.numfmt.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,onClick:()=>{E(D),b(`field`)},size:`middle`,children:v.t(`sheets-pivot-ui.dialog.numfmt.confirm`)})]})]}):/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,dir:v.getDirection(),children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-font-medium`,children:v.t(`sheets-pivot-ui.dialog.fieldName`)}),/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-truncate univer-text-xs univer-text-gray-500`,children:en(v.t(`sheets-pivot-ui.dialog.sourceName`),u.name)})]}),/* @__PURE__ */ (0,f.jsx)(c.Input,{className:`univer-mt-2 univer-w-full`,value:x,onChange:S,size:`small`})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:v.t(`sheets-pivot-ui.dialog.summarizeBy`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-max-h-[40vh] univer-overflow-y-auto univer-rounded-xl univer-bg-gray-50 univer-p-1 dark:!univer-bg-gray-800`,children:mn.map(e=>/* @__PURE__ */ (0,f.jsxs)(`button`,{type:`button`,className:(0,c.clsx)(`univer-flex univer-h-12 univer-w-full univer-items-center univer-gap-2 univer-rounded-xl univer-border-0 univer-bg-transparent univer-px-3 univer-text-left univer-text-sm`,{"univer-bg-primary-50 dark:!univer-bg-gray-700":C===e.type}),onClick:()=>A(e.type),children:[/* @__PURE__ */ (0,f.jsx)(Ct,{className:(0,c.clsx)(`univer-text-primary-600`,{"univer-invisible":C!==e.type})}),v.t(e.textKey)]},e.type))})]}),/* @__PURE__ */ (0,f.jsx)(c.Button,{className:`univer-w-full`,onClick:()=>{O(T),b(`format`)},size:`middle`,children:v.t(`sheets-pivot-ui.dialog.format`)}),/* @__PURE__ */ (0,f.jsxs)(c.MobileActionRowGroup,{children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:p,size:`middle`,children:v.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:!x,onClick:j,size:`middle`,children:v.t(`sheets-pivot-ui.dialog.ok`)})]})]})}function Nn(e){var i;let{filterItemInfo:o,unitId:s,subUnitId:l}=e,u=(0,a.useDependency)(r.ICommandService),p=(0,a.useDependency)(a.IDialogService),m=(0,a.useDependency)(r.LocaleService),h=(0,a.useDependency)(r.IUniverInstanceService),g=(0,a.useObservable)(m.direction$,m.getDirection()),[_,v]=(0,d.useState)(()=>{var e;return o.checkedItems??((e=o.filterInfo)==null?void 0:e.list)??o.items}),[y,x]=(0,d.useState)(()=>o.partialItems??[]),[S,C]=(0,d.useState)((i=o.sortInfo)==null?void 0:i.type),w=y.length===0&&_.length===o.items.length,T=On(o.filterInfo,{items:o.items,conditionFilter:o.conditionFilter});(0,d.useEffect)(()=>{let e=h.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_SHEET);if(!e)return;let t=e.activeSheet$.subscribe(e=>{(e==null?void 0:e.getSheetId())!==l&&p.close(b)});return()=>t.unsubscribe()},[p,l,h]);function E(){p.close(b)}function D(e){y.includes(e)?(x(t=>t.filter(t=>t!==e)),v(t=>[...t,e])):v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}async function O(e,t,r,i=!1){await u.executeCommand(n.SetPivotFilterCommand.id,{unitId:s,subUnitId:l,pivotTableId:o.pivotTableId,tableFieldId:o.tableFieldId,items:e,partialItems:r,isAll:t,clearAllFilters:i}),E()}async function k(e){await u.executeCommand(n.SetPivotSortCommand.id,{unitId:s,subUnitId:l,pivotTableId:o.pivotTableId,tableFieldId:o.tableFieldId,info:{type:e}}),C(e),E()}return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,dir:g,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-base univer-font-semibold`,children:m.t(`sheets-pivot-ui.filterField`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsxs)(c.Button,{className:(0,c.clsx)(``,{"univer-bg-gray-100 dark:!univer-bg-gray-700":S===t.PivotDataFieldSortOperatorEnum.ascending}),onClick:()=>k(t.PivotDataFieldSortOperatorEnum.ascending),size:`middle`,children:[/* @__PURE__ */ (0,f.jsx)(yt,{}),m.t(`sheets-pivot-ui.dialog.filter.ascending`)]}),/* @__PURE__ */ (0,f.jsxs)(c.Button,{className:(0,c.clsx)(``,{"univer-bg-gray-100 dark:!univer-bg-gray-700":S===t.PivotDataFieldSortOperatorEnum.descending}),onClick:()=>k(t.PivotDataFieldSortOperatorEnum.descending),size:`middle`,children:[/* @__PURE__ */ (0,f.jsx)(Dt,{}),m.t(`sheets-pivot-ui.dialog.filter.descending`)]})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-max-h-[40vh] univer-overflow-y-auto univer-rounded-xl univer-bg-gray-50 univer-p-2 dark:!univer-bg-gray-800`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-min-h-12 univer-items-center univer-px-2`,children:/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:w,indeterminate:!w&&(_.length>0||y.length>0),onChange:()=>{x([]),v(w?[]:o.items)},children:m.t(`sheets-pivot-ui.dialog.filter.selectAll`)})}),o.items.map((e,n)=>{var i;let a=o.itemTypes[n],s=(i=o.itemLabels)==null?void 0:i[e],l=$t(e,a),u=e;return l?u=m.t(l):s===void 0?a===t.PivotDataFieldDataTypeEnum.date&&o.format&&(u=r.numfmt.format(o.format,Number(e))):u=s,/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-min-h-12 univer-items-center univer-px-2`,children:/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:_.includes(e),indeterminate:y.includes(e),contentClassName:`univer-max-w-[70vw] univer-truncate`,onChange:()=>D(e),children:u})},e)})]}),/* @__PURE__ */ (0,f.jsx)(c.Button,{className:`univer-w-full`,variant:`link`,disabled:T===`NotFilter`,onClick:()=>O(o.items,!0,[],!0),size:`middle`,children:m.t(`sheets-pivot-ui.dialog.filter.clearFilter`)}),/* @__PURE__ */ (0,f.jsxs)(c.MobileActionRowGroup,{children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:E,size:`middle`,children:m.t(`sheets-pivot-ui.dialog.filter.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:!_.length&&!y.length,onClick:()=>O(_,w,y),size:`middle`,children:m.t(`sheets-pivot-ui.dialog.filter.confirm`)})]})]})}let Pn=[{label:`sheets-pivot-ui.config.pageDownThenOver`,value:`false`},{label:`sheets-pivot-ui.config.pageOverThenDown`,value:`true`}],Fn=[{label:`sheets-pivot-ui.config.layoutTabular`,value:String(t.PivotLayoutTypeEnum.tabular)},{label:`sheets-pivot-ui.config.layoutCompact`,value:String(t.PivotLayoutTypeEnum.compact)},{label:`sheets-pivot-ui.config.layoutOutline`,value:String(t.PivotLayoutTypeEnum.outline)}],In=[{label:`sheets-pivot-ui.config.rowSubtotalTop`,value:String(t.PivotSubtotalPositionEnum.top)},{label:`sheets-pivot-ui.config.rowSubtotalBottom`,value:String(t.PivotSubtotalPositionEnum.bottom)}],Ln=[{label:`sheets-pivot-ui.config.dateGroupingLegacy`,value:t.PivotDateGroupingMode.Legacy},{label:`sheets-pivot-ui.config.dateGroupingExcelLike`,value:t.PivotDateGroupingMode.ExcelLike}];function Rn(e){let{unitId:i,subUnitId:o,pivotTableId:l}=e,u=(0,a.useDependency)(r.ICommandService),p=(0,a.useDependency)(r.IConfirmService),m=(0,a.useDependency)(r.ILogService),h=(0,a.useDependency)(r.LocaleService),g=(0,a.useDependency)(n.SheetsPivotTableConfigModel),_=(0,d.useMemo)(()=>g.watchPivotTableChanges(i,o,l).pipe((0,s.debounceTime)(0)),[g,i,o,l]);(0,a.useObservable)(_);let[v,y]=(0,d.useState)(!1),b=(0,d.useRef)(!1),x=g.getPivotTableConfig(i,o,l),S=(0,t.getPivotDateGroupingMode)(x==null?void 0:x.fieldsConfig.options),[C,w]=(0,d.useState)(()=>{var e,n;let r=g.getPivotTableConfig(i,o,l),a=(r==null||(e=r.fieldsConfig)==null?void 0:e.options)??{};return{showRowSubtotal:a.showRowSubtotal??!0,showRowGrandTotal:a.showRowGrandTotal??!0,showColSubtotal:a.showColSubtotal??!0,showColGrandTotal:a.showColGrandTotal??!0,pageWrap:a.pageWrap??1,pageOverThenDown:a.pageOverThenDown??!1,repeatRowLabels:a.repeatRowLabels??!1,repeatColLabels:a.repeatColLabels??!1,layout:(r==null||(n=r.fieldsConfig)==null?void 0:n.layout)??t.PivotLayoutTypeEnum.tabular,rowSubtotalPosition:a.rowSubtotalPosition??t.PivotSubtotalPositionEnum.top}});function T(e){let t={unitId:i,subUnitId:o,pivotTableId:l,options:e};return w(t=>({...t,...e})),u.executeCommand(n.SetPivotOptionCommand.id,t).catch(e=>m.error(`[MobilePivotConfigPanel]`,e))}function E(e){let t={unitId:i,subUnitId:o,pivotTableId:l,layout:e};return w(t=>({...t,layout:e})),u.executeCommand(n.SetPivotLayoutCommand.id,t).catch(e=>m.error(`[MobilePivotConfigPanel]`,e))}async function D(e){if(!(b.current||e===S)){b.current=!0,y(!0);try{let r=g.getPivotTableConfig(i,o,l),a=g.getCollection(i,l);if(!r||!a||(Object.values(a.fields).some(t.isDateGroupFieldJSON)||a.customFields.some(t.isDateGroupFieldJSON))&&!await p.confirm({id:`sheet-pivot.confirm.change-date-grouping-mode`,title:{title:h.t(`sheets-pivot-ui.config.dateGroupingSwitchTitle`)},children:{title:h.t(`sheets-pivot-ui.config.dateGroupingSwitchMessage`)},cancelText:h.t(`sheets-pivot-ui.dialog.cancel`),confirmText:h.t(`sheets-pivot-ui.dialog.ok`)})||g.getPivotTableConfig(i,o,l)!==r||g.getCollection(i,l)!==a||(0,t.getPivotDateGroupingMode)(r.fieldsConfig.options)===e)return;await u.executeCommand(n.SetPivotOptionCommand.id,{unitId:i,subUnitId:o,pivotTableId:l,options:{dateGroupingMode:e}})}catch(e){m.error(`[MobilePivotConfigPanel]`,e)}finally{b.current=!1,y(!1)}}}let O=e=>e.map(e=>({...e,label:h.t(e.label)}));return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-5 univer-py-4`,children:[/* @__PURE__ */ (0,f.jsxs)(`section`,{className:`univer-flex univer-flex-col univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.displaySection`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-10 univer-items-center univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm`,children:h.t(`sheets-pivot-ui.config.dateGroupingMode`)}),/* @__PURE__ */ (0,f.jsx)(c.MobileSelect,{className:`univer-w-40`,value:S,options:O(Ln),disabled:v,onChange:e=>D(e),size:`small`})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-10 univer-items-center univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm`,children:h.t(`sheets-pivot-ui.config.layout`)}),/* @__PURE__ */ (0,f.jsx)(c.MobileSelect,{className:`univer-w-40`,value:String(C.layout),options:O(Fn),onChange:e=>E(Number(e)),size:`small`})]}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.repeatRowLabels,disabled:C.layout===t.PivotLayoutTypeEnum.compact,onChange:e=>T({repeatRowLabels:!!e}),children:h.t(`sheets-pivot-ui.config.repeatRowLabels`)}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.repeatColLabels,onChange:e=>T({repeatColLabels:!!e}),children:h.t(`sheets-pivot-ui.config.repeatColLabels`)})]}),/* @__PURE__ */ (0,f.jsxs)(`section`,{className:`univer-flex univer-flex-col univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.totalsSection`)}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showRowSubtotal,onChange:e=>T({showRowSubtotal:!!e}),children:h.t(`sheets-pivot-ui.config.showRowSubtotal`)}),C.layout===t.PivotLayoutTypeEnum.outline&&/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-10 univer-items-center univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm`,children:h.t(`sheets-pivot-ui.config.rowSubtotalPosition`)}),/* @__PURE__ */ (0,f.jsx)(c.MobileSelect,{className:`univer-w-40`,value:String(C.rowSubtotalPosition),options:O(In),onChange:e=>T({rowSubtotalPosition:Number(e)}),size:`small`})]}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showRowGrandTotal,onChange:e=>T({showRowGrandTotal:!!e}),children:h.t(`sheets-pivot-ui.config.showRowGrandTotal`)}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showColSubtotal,onChange:e=>T({showColSubtotal:!!e}),children:h.t(`sheets-pivot-ui.config.showColSubtotal`)}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showColGrandTotal,onChange:e=>T({showColGrandTotal:!!e}),children:h.t(`sheets-pivot-ui.config.showColGrandTotal`)})]}),/* @__PURE__ */ (0,f.jsxs)(`section`,{className:`univer-flex univer-flex-col univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.pageSection`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-10 univer-items-center univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm`,children:h.t(`sheets-pivot-ui.config.pageWrap`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-w-24`,value:C.pageWrap,min:1,max:20,onChange:e=>{let t=Number(e);return Number.isFinite(t)&&t>=1?T({pageWrap:t}):void 0},size:`small`,controls:!1})]}),/* @__PURE__ */ (0,f.jsx)(`p`,{className:`univer-text-xs univer-text-gray-600`,children:h.t(C.pageOverThenDown?`sheets-pivot-ui.config.pageWrapOverThenDownHelp`:`sheets-pivot-ui.config.pageWrapDownThenOverHelp`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-10 univer-items-center univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm`,children:h.t(`sheets-pivot-ui.config.pageDirection`)}),/* @__PURE__ */ (0,f.jsx)(c.MobileSelect,{className:`univer-w-40`,value:String(C.pageOverThenDown),options:O(Pn),onChange:e=>T({pageOverThenDown:e===`true`}),size:`small`})]})]})]})}function zn(e,t,n,r){let i=[];return t>0&&i.push(`moveUp`),t<n-1&&i.push(`moveDown`),r?(i.push(e===`column`?`moveToRow`:`moveToColumn`),i.push(`remove`),i):(e!==`filter`&&i.push(`moveToFilter`),e!==`column`&&i.push(`moveToColumn`),e!==`row`&&i.push(`moveToRow`),e===`value`?i.push(`settings`):(i.push(`moveToValue`),i.push(`filter`)),i.push(`remove`),i)}let Bn=[`filter`,`column`,`row`,`value`];function Vn(e,t){switch(t){case`filter`:return e.filterFields;case`column`:return e.columnFields;case`row`:return e.rowFields;case`value`:return e.valueFields;default:return[]}}function Hn(e){switch(e){case`filter`:return`sheets-pivot-ui.filter`;case`column`:return`sheets-pivot-ui.column`;case`row`:return`sheets-pivot-ui.row`;default:return`sheets-pivot-ui.value`}}function Un(e){switch(e){case`filter`:return`sheets-pivot-ui.mobile.filterDesc`;case`column`:return`sheets-pivot-ui.mobile.columnDesc`;case`row`:return`sheets-pivot-ui.mobile.rowDesc`;default:return`sheets-pivot-ui.valueDesc`}}function Wn(e){switch(e.area){case`filter`:return/* @__PURE__ */ (0,f.jsx)(kt,{});case`column`:return/* @__PURE__ */ (0,f.jsx)(Ut,{});case`row`:return/* @__PURE__ */ (0,f.jsx)(Tt,{});default:return/* @__PURE__ */ (0,f.jsx)(jt,{})}}function Gn(e){switch(e){case`moveUp`:return`sheets-pivot-ui.mobile.moveUp`;case`moveDown`:return`sheets-pivot-ui.mobile.moveDown`;case`moveToFilter`:return`sheets-pivot-ui.mobile.moveToFilter`;case`moveToColumn`:return`sheets-pivot-ui.mobile.moveToColumn`;case`moveToRow`:return`sheets-pivot-ui.mobile.moveToRow`;case`moveToValue`:return`sheets-pivot-ui.mobile.moveToValue`;case`filter`:return`sheets-pivot-ui.filterField`;case`settings`:return`sheets-pivot-ui.fieldSettings`;default:return`sheets-pivot-ui.removeField`}}function Kn(e){switch(e){case`moveToFilter`:return`filter`;case`moveToColumn`:return`column`;case`moveToRow`:return`row`;case`moveToValue`:return`value`;default:return null}}function qn(e){let{area:t,field:n,index:i,fieldCount:o,info:s,pivotTableId:l,unitId:u,subUnitId:d,refresh:p}=e,m=(0,a.useDependency)(r.ICommandService),h=(0,a.useDependency)(r.LocaleService),g=n.tableFieldId===Qt,_={pivotTableInfo:s,pivotTableId:l,commandService:m,unitId:u,subUnitId:d};async function v(e){if(e===`filter`){fn(m,u,d,l,n.tableFieldId);return}if(e===`settings`){pn(m,l,n.tableFieldId,u,d,s);return}if(e===`remove`){await an(_,n.tableFieldId,t),await p();return}let r=Kn(e)??t,a=Vn(s,r).length;e===`moveUp`?a=i-1:e===`moveDown`&&(a=i+1),await cn(_,n.tableFieldId,t,r,a),await p()}let y=zn(t,i,o,g).map(e=>({type:`item`,children:h.t(Gn(e)),variant:e===`remove`?`destructive`:`default`,onSelect:()=>v(e)}));return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-12 univer-items-center univer-gap-3 univer-rounded-xl univer-px-3`,children:[/* @__PURE__ */ (0,f.jsx)(`bdi`,{className:`univer-min-w-0 univer-flex-1 univer-truncate univer-text-sm`,dir:`auto`,children:g?h.t(`sheets-pivot-ui.multipleValue`):n.displayName}),/* @__PURE__ */ (0,f.jsx)(c.MobileDropdownMenu,{items:y,children:/* @__PURE__ */ (0,f.jsx)(`button`,{type:`button`,className:`univer-flex univer-size-10 univer-shrink-0 univer-items-center univer-justify-center univer-rounded-lg univer-border-0 univer-bg-transparent active:univer-bg-gray-100 dark:active:!univer-bg-gray-700`,children:/* @__PURE__ */ (0,f.jsx)(Lt,{})})})]})}function Jn(e){let t=(0,a.useDependency)(r.LocaleService);return/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,children:Bn.map(n=>{let r=Vn(e.info,n);return/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-2 univer-flex univer-items-center univer-gap-2 univer-text-sm univer-font-medium`,children:[/* @__PURE__ */ (0,f.jsx)(Wn,{area:n}),t.t(Hn(n))]}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-rounded-xl univer-bg-gray-50 univer-p-1 dark:!univer-bg-gray-800`,children:r.length?r.map((t,i)=>/* @__PURE__ */ (0,f.jsx)(qn,{...e,area:n,field:t,index:i,fieldCount:r.length},t.tableFieldId)):/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-p-4 univer-text-center univer-text-xs univer-text-gray-500`,children:t.t(Un(n))})})]},n)})})}function Yn(e,t){switch(t){case`filter`:return e.filterFields.length;case`column`:return e.columnFields.length;case`row`:return e.rowFields.length;case`value`:return e.valueFields.length;default:return 0}}function Xn(e){let n=`univer-size-4 univer-shrink-0 univer-text-gray-500`;switch(e.type){case t.PivotDataFieldDataTypeEnum.number:return/* @__PURE__ */ (0,f.jsx)(zt,{className:n});case t.PivotDataFieldDataTypeEnum.date:return/* @__PURE__ */ (0,f.jsx)(xt,{className:n});default:return/* @__PURE__ */ (0,f.jsx)(qt,{className:n})}}function Zn(e){let{field:n,info:i,pivotTableId:o,unitId:s,subUnitId:l,refresh:u}=e,d=(0,a.useDependency)(r.ICommandService),p=(0,a.useDependency)(r.LocaleService),m={pivotTableInfo:i,pivotTableId:o,commandService:d,unitId:s,subUnitId:l};async function h(e){if(e){let e=n.type===t.PivotDataFieldDataTypeEnum.number?`value`:`row`;await cn(m,n.dataFieldId,`source`,e,Yn(i,e))}else await an(m,n.dataFieldId,`source`);await u()}async function g(e){await cn(m,n.dataFieldId,`source`,e,Yn(i,e)),await u()}let _=[{type:`item`,children:p.t(`sheets-pivot-ui.addToRow`),onSelect:()=>g(`row`)},{type:`item`,children:p.t(`sheets-pivot-ui.addToColumn`),onSelect:()=>g(`column`)},{type:`item`,children:p.t(`sheets-pivot-ui.addToValue`),onSelect:()=>g(`value`)},{type:`item`,children:p.t(`sheets-pivot-ui.addToFilter`),onSelect:()=>g(`filter`)}];return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-h-12 univer-items-center univer-gap-3 univer-rounded-xl univer-px-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:n.checked,onChange:e=>h(!!e)}),/* @__PURE__ */ (0,f.jsx)(Xn,{type:n.type}),/* @__PURE__ */ (0,f.jsx)(`bdi`,{className:`univer-min-w-0 univer-flex-1 univer-truncate univer-text-sm`,dir:`auto`,children:n.name}),/* @__PURE__ */ (0,f.jsx)(c.MobileDropdownMenu,{items:_,children:/* @__PURE__ */ (0,f.jsx)(`button`,{type:`button`,className:`univer-flex univer-size-10 univer-shrink-0 univer-items-center univer-justify-center univer-rounded-lg univer-border-0 univer-bg-transparent active:univer-bg-gray-100 dark:active:!univer-bg-gray-700`,children:/* @__PURE__ */ (0,f.jsx)(Lt,{})})})]})}function Qn(e){let{info:t}=e,n=(0,a.useDependency)(r.LocaleService),[i,o]=(0,d.useState)(``),s=i.trim().toLocaleLowerCase(),l=s?t.sourceList.filter(e=>e.name.toLocaleLowerCase().includes(s)):t.sourceList;return/* @__PURE__ */ (0,f.jsxs)(`section`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.sourceFieldTile`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-1 univer-text-xs univer-text-gray-500`,children:n.t(`sheets-pivot-ui.mobile.sourceFieldDescription`)})]}),/* @__PURE__ */ (0,f.jsx)(c.Input,{allowClear:!0,value:i,placeholder:n.t(`sheets-pivot-ui.searchFieldPlaceholder`),slot:/* @__PURE__ */ (0,f.jsx)(Gt,{}),onChange:o,size:`small`}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-rounded-xl univer-bg-gray-50 univer-p-1 dark:!univer-bg-gray-800`,children:l.length?l.map(t=>/* @__PURE__ */ (0,f.jsx)(Zn,{...e,field:t},t.id)):/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-p-4 univer-text-center univer-text-sm univer-text-gray-500`,children:n.t(`sheets-pivot-ui.noMatchingFields`)})})]})}function $n(e){var t;let{sourceRangeInfo:n,positionInfo:i,pivotTableId:o,refresh:s}=e,c=(0,a.useDependency)(r.ICommandService),l=(0,a.useDependency)(r.ILogService),u=(0,a.useDependency)(r.LocaleService),h=(0,a.useDependency)(r.IUniverInstanceService).getUnit(n.unitId),g=(h==null||(t=h.getSheetBySheetId(n.subUnitId))==null?void 0:t.getName())??n.sheetName,[_,v]=(0,d.useState)(n.range),[y,b]=(0,d.useState)(g),[x,S]=(0,d.useState)(``);(0,d.useEffect)(()=>{v(n.range),b(g)},[g,n]);async function C(e){let t=e.split(`,`).filter(Boolean).map(p.deserializeRangeWithSheet)[0];if(!t||!h){S(u.t(`sheets-pivot-ui.msg.emptySourceRange`));return}let r=t.sheetName||n.sheetName,a=h.getSheetBySheetName(r),l=rn(a,t.range);if(l!==2||!a){let e=l===0?`sheets-pivot-ui.msg.emptySourceRange`:`sheets-pivot-ui.msg.invalidSize`;S(u.t(e))}else S(``),v(t.range),b(r),await on(c,o,{unitId:n.unitId,subUnitId:a.getSheetId(),range:t.range,sheetName:r},i.unitId,i.subUnitId),await s()}return/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:u.t(`sheets-pivot-ui.sourceRangeLabel`)}),/* @__PURE__ */ (0,f.jsx)(m.MobileRangeSelector,{unitId:n.unitId,subUnitId:n.subUnitId,initialValue:(0,p.serializeRangeWithSheet)(y,_),maxRangeCount:1,keepSheetReference:!0,supportAcrossSheet:!0,onChange:(e,t)=>C(t).catch(e=>{l.error(`[MobilePivotSourceRange]`,e)})}),x&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-2 univer-text-xs univer-text-red-500`,children:x})]})}function er(e){let{pivotTableId:t,version:i,unitId:o,subUnitId:c,panelInfo:l}=e,u=(0,a.useDependency)(n.SheetsPivotTableConfigModel),p=(0,a.useDependency)(n.SheetsPivotRPCService),m=(0,a.useDependency)(r.ILogService),h=(0,d.useMemo)(()=>u.watchPivotTableChanges(o,c,t).pipe((0,s.debounceTime)(0)),[u,o,c,t]),g=(0,a.useObservable)(h),[_,v]=(0,d.useState)(l),y=(0,d.useCallback)(async()=>{if(!u.getPivotTableConfig(o,c,t))return;let e=await p.getPivotDisplayConfig({unitId:o,subUnitId:c,pivotTableId:t,params:{type:n.PivotDisplayDataType.Panel,panel:{pivotTableId:t}}});e.result.panel&&v(e.result.panel)},[u,t,p,c,o]);return(0,d.useEffect)(()=>{y().catch(e=>m.error(`[MobilePivotPanel]`,e))},[g,m,y,i]),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-5 univer-py-4`,children:[/* @__PURE__ */ (0,f.jsx)($n,{sourceRangeInfo:_.sourceRange,positionInfo:_.positionInfo,pivotTableId:t,refresh:y}),/* @__PURE__ */ (0,f.jsx)(Qn,{info:_,pivotTableId:t,unitId:o,subUnitId:c,refresh:y}),/* @__PURE__ */ (0,f.jsx)(Jn,{info:_,pivotTableId:t,unitId:o,subUnitId:c,refresh:y})]})}function tr(e){let{className:t,unitId:n,subUnitId:i,pivotTableId:o}=e,[s,l]=(0,d.useState)(`fields`),u=(0,a.useDependency)(r.LocaleService);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-flex univer-size-full univer-min-h-0 univer-flex-col`,t),dir:u.getDirection(),children:[/* @__PURE__ */ (0,f.jsx)(c.Segmented,{className:`univer-sticky univer-top-0 univer-z-10 univer-my-3 univer-w-full univer-shrink-0`,items:[{label:u.t(`sheets-pivot-ui.fieldPanel`),value:`fields`},{label:u.t(`sheets-pivot-ui.configPanel`),value:`config`}],value:s,onChange:l}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-min-h-0 univer-flex-1 univer-overflow-y-auto`,children:s===`fields`?/* @__PURE__ */ (0,f.jsx)(er,{...e}):/* @__PURE__ */ (0,f.jsx)(Rn,{unitId:n,subUnitId:i,pivotTableId:o})})]})}function nr(e,t){switch(e){case 1:return t.t(`sheets-pivot-ui.msg.invalidSize`);case 0:return t.t(`sheets-pivot-ui.msg.emptySourceRange`);default:return``}}function rr(e){let{unitId:t,subUnitId:i,sourceRange:o,positionRange:s,sourceSheetName:l,positionSheetName:u,onConfirm:h,onCancel:g}=e,_=(0,a.useDependency)(r.LocaleService),v=(0,a.useDependency)(r.IUniverInstanceService).getUnit(t),[y,b]=(0,d.useState)(o),[x,S]=(0,d.useState)(s),[C,w]=(0,d.useState)(l),[T,E]=(0,d.useState)(u),[D,O]=(0,d.useState)(n.PositionType.New),[k,A]=(0,d.useState)(``),[j,M]=(0,d.useState)(!0);(0,d.useEffect)(()=>{let e=rn(v.getSheetBySheetName(C),y);A(nr(e,_))},[_,y,C,v]);function N(e){let t=e.split(`,`).filter(Boolean).map(p.deserializeRangeWithSheet)[0];t?(b(t.range),w(t.sheetName||C)):A(_.t(`sheets-pivot-ui.msg.emptySourceRange`))}function P(e){let t=e.split(`,`).filter(Boolean).map(p.deserializeRangeWithSheet)[0];if(!t){S(null);return}let n=t.sheetName||l;S(t.range),E(n),M(n!==C||!r.Rectangle.intersects(t.range,y))}function F(){if(k)return;let e;if(D===n.PositionType.Existing){if(!x||!j)return;e={sourceRange:y,sourceSheetName:C,positionRange:x,positionSheetName:T,positionType:D}}else e={sourceRange:y,sourceSheetName:C,positionType:D};h(e)}return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-5`,dir:_.getDirection(),children:[/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:_.t(`sheets-pivot-ui.dialog.source.sourceData`)}),/* @__PURE__ */ (0,f.jsx)(m.MobileRangeSelector,{unitId:t,subUnitId:i,initialValue:(0,p.serializeRangeWithSheet)(C,y),maxRangeCount:1,supportAcrossSheet:!0,keepSheetReference:!0,onChange:(e,t)=>N(t)}),k&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-2 univer-text-xs univer-text-red-500`,children:k})]}),/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:_.t(`sheets-pivot-ui.dialog.source.position`)}),/* @__PURE__ */ (0,f.jsxs)(c.RadioGroup,{className:`univer-flex univer-flex-col univer-gap-3`,value:D,onChange:e=>O(e),children:[/* @__PURE__ */ (0,f.jsx)(c.Radio,{value:n.PositionType.New,children:_.t(`sheets-pivot-ui.dialog.source.newSheet`)}),/* @__PURE__ */ (0,f.jsx)(c.Radio,{value:n.PositionType.Existing,children:_.t(`sheets-pivot-ui.dialog.source.existingSheet`)})]}),D===n.PositionType.Existing&&/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-3`,children:[/* @__PURE__ */ (0,f.jsx)(m.MobileRangeSelector,{unitId:t,subUnitId:i,initialValue:x?(0,p.serializeRangeWithSheet)(T,x):``,maxRangeCount:1,supportAcrossSheet:!0,keepSheetReference:!0,onChange:(e,t)=>P(t)}),!j&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-2 univer-text-xs univer-text-red-500`,children:_.t(`sheets-pivot-ui.dialog.source.intersect`)})]})]}),/* @__PURE__ */ (0,f.jsxs)(c.MobileActionRowGroup,{children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:g,size:`middle`,children:_.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,onClick:F,size:`middle`,children:_.t(`sheets-pivot-ui.dialog.ok`)})]})]})}let ir=class extends r.Disposable{constructor(e,t){super(),[[A,rr],[_,tr],[y,Nn],[x,Mn],[C,jn],[j,Jt]].forEach(([t,n])=>{this.disposeWithMe(e.register(t,n))}),this.disposeWithMe(t.register({PivotTableIcon:Vt}))}};ir=K([G(0,(0,r.Inject)(a.ComponentManager)),G(1,(0,r.Inject)(a.IconManager))],ir);function ar(e){return{id:N.id,commandId:N.id,type:a.MenuItemType.BUTTON,icon:`PivotTableIcon`,title:`sheets-pivot-ui.title`,tooltip:`sheets-pivot-ui.title`,hidden$:(0,a.getMenuHiddenObservable)(e,r.UniverInstanceType.UNIVER_SHEET),disabled$:(0,o.getObservableWithExclusiveRange$)(e,(0,o.getCurrentRangeDisable$)(e,{workbookTypes:[i.WorkbookEditablePermission],worksheetTypes:[i.WorksheetViewPermission,i.WorksheetPivotTablePermission],rangeTypes:[i.RangeProtectionPermissionViewPoint]}))}}let or={[a.RibbonDataGroup.ORGANIZATION]:{[N.id]:{order:1,gridLayout:{row:2,column:1},menuItemFactory:ar}},[a.ContextMenuPosition.MAIN_AREA]:{[a.ContextMenuGroup.DATA]:{[N.id]:{order:1,menuItemFactory:ar}}}},sr=class extends r.Disposable{constructor(e){super(),e.mergeMenu(or)}};sr=K([G(0,a.IMenuManagerService)],sr);let cr=class extends r.Disposable{constructor(e,t,i,a){super(),this._sidebarService=i,this._dialogService=a,W(this,`_pivotTableId`,null),this.disposeWithMe(e.onCommandExecuted(e=>{e.id===it.id?this._pivotTableId=e.params.pivotTableId:e.id===n.RemovePivotTableMutation.id&&e.params.pivotTableId===this._pivotTableId&&this._closePanel()}));let o=t.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_SHEET);o&&(this.disposeWithMe(o.activeSheet$.pipe((0,s.skip)(1)).subscribe(()=>this._closePanel())),this.disposeWithMe(o.sheetDisposed$.subscribe(()=>this._closePanel()))),this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe(e=>{e.id===`UNIVER_SHEET_PIVOT_PANEL_ID`&&e.visible===!1&&(this._pivotTableId=null,this._closeChildDialogs())}))}_closePanel(){this._pivotTableId=null,this._sidebarService.close(v),this._closeChildDialogs()}_closeChildDialogs(){this._dialogService.close(b),this._dialogService.close(S),this._dialogService.close(w)}};cr=K([G(0,r.ICommandService),G(1,r.IUniverInstanceService),G(2,a.ISidebarService),G(3,a.IDialogService)],cr),new Path2D(`M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z`);var X=class{static drawNoSetting(e,t,n,r){e.save(),u.Rect.drawWith(e,{radius:2,width:16,height:16,fill:r}),e.lineCap=`square`,e.strokeStyle=n,e.scale(t/16,t/16),e.beginPath(),e.lineWidth=1,e.lineCap=`round`,e.moveTo(3,4),e.lineTo(13,4),e.moveTo(4.5,8),e.lineTo(11.5,8),e.moveTo(6,12),e.lineTo(10,12),e.stroke(),e.restore()}static drawExpand(e,t,n,r,i){let a=(i-t)/2;e.save(),e.fillStyle=r,e.strokeStyle=n,e.beginPath(),e.moveTo(6,a),e.lineTo(4+t-2,a),e.arcTo(4+t,a,4+t,a+2,2),e.lineTo(4+t,a+t-2),e.arcTo(4+t,a+t,4+t-2,a+t,2),e.lineTo(6,a+t),e.arcTo(4,a+t,4,a+t-2,2),e.lineTo(4,a+2),e.arcTo(4,a,6,a,2),e.closePath(),e.stroke(),e.fill(),e.beginPath(),e.moveTo(4+t/2,a+2),e.lineTo(4+t/2,a+t-2),e.moveTo(6,a+t/2),e.lineTo(4+t-2,a+t/2),e.stroke(),e.restore()}static drawCollapse(e,t,n,r,i){let a=(i-t)/2;e.save(),e.fillStyle=r,e.strokeStyle=n,e.beginPath(),e.moveTo(6,a),e.lineTo(4+t-2,a),e.arcTo(4+t,a,4+t,a+2,2),e.lineTo(4+t,a+t-2),e.arcTo(4+t,a+t,4+t-2,a+t,2),e.lineTo(6,a+t),e.arcTo(4,a+t,4,a+t-2,2),e.lineTo(4,a+2),e.arcTo(4,a,6,a,2),e.closePath(),e.fill(),e.stroke(),e.beginPath(),e.moveTo(6,a+t/2),e.lineTo(4+t-2,a+t/2),e.stroke(),e.restore()}static drawIconByPath(e,t,n,r){e.save(),e.strokeStyle=n,e.fillStyle=r,u.Rect.drawWith(e,{radius:2,width:16,height:16,fill:r}),t.forEach(t=>{let r=new Path2D(t);e.fillStyle=n,e.fill(r,`evenodd`)}),e.restore()}};let lr=[`M3.30363 3C2.79117 3 2.51457 3.60097 2.84788 3.99024L6.8 8.60593V12.5662C6.8 12.7184 6.8864 12.8575 7.02289 12.9249L8.76717 13.7863C8.96655 13.8847 9.2 13.7396 9.2 13.5173V8.60593L13.1521 3.99024C13.4854 3.60097 13.2088 3 12.6964 3H3.30363Z`],ur=[`M12.4008 13.1831C12.6907 13.1831 12.9258 12.9481 12.9258 12.6581V4.60873L14.013 5.69597C14.218 5.901 14.5505 5.901 14.7555 5.69597C14.9605 5.49094 14.9605 5.15853 14.7555 4.95351L12.7721 2.97017C12.5671 2.76515 12.2347 2.76515 12.0297 2.97017L10.0463 4.95351C9.84132 5.15853 9.84132 5.49094 10.0463 5.69597C10.2514 5.901 10.5838 5.901 10.7888 5.69597L11.8758 4.60901V12.6581C11.8758 12.9481 12.1108 13.1831 12.4008 13.1831Z`,`M1.28069 4.85447C0.842195 4.33439 1.21191 3.5391 1.89218 3.5391H8.59333C9.2736 3.5391 9.64331 4.33439 9.20482 4.85447L6.51052 8.0501V11.6601C6.51052 12.2245 5.94174 12.6114 5.41683 12.404L4.48092 12.0343C4.1756 11.9136 3.97498 11.6187 3.97498 11.2904V8.0501L1.28069 4.85447Z`],dr=[`M12.4008 2.81641C12.6907 2.81641 12.9258 3.05146 12.9258 3.34141V11.3908L14.013 10.3036C14.218 10.0986 14.5505 10.0986 14.7555 10.3036C14.9605 10.5086 14.9605 10.841 14.7555 11.046L12.7721 13.0294C12.5671 13.2344 12.2347 13.2344 12.0297 13.0294L10.0463 11.046C9.84132 10.841 9.84132 10.5086 10.0463 10.3036C10.2514 10.0986 10.5838 10.0986 10.7888 10.3036L11.8758 11.3905V3.34141C11.8758 3.05146 12.1108 2.81641 12.4008 2.81641Z`,`M1.28069 4.85444C0.842195 4.33435 1.21191 3.53906 1.89218 3.53906H8.59333C9.2736 3.53906 9.64331 4.33435 9.20482 4.85443L6.51052 8.05006V11.6601C6.51052 12.2245 5.94174 12.6113 5.41683 12.404L4.48092 12.0342C4.1756 11.9136 3.97498 11.6186 3.97498 11.2903V8.05006L1.28069 4.85444Z`],fr=[`M11.9003 13.7046C11.9003 13.9969 11.6633 14.2339 11.371 14.2339C11.0787 14.2339 10.8417 13.9969 10.8417 13.7046V3.57272L9.74577 4.66862C9.53906 4.87534 9.20391 4.87534 8.9972 4.66862C8.79048 4.46191 8.79048 4.12676 8.9972 3.92005L10.9969 1.92039C11.2036 1.71368 11.5387 1.71368 11.7454 1.92039L13.7451 3.92005C13.9518 4.12676 13.9518 4.46191 13.7451 4.66862C13.5384 4.87534 13.2032 4.87534 12.9965 4.66862L11.9003 3.57243V13.7046Z`,`M2.69779 10.0113C2.40546 10.0113 2.16847 9.77429 2.16847 9.48196C2.16847 9.18962 2.40546 8.95264 2.69779 8.95264H6.67804C6.89213 8.95264 7.08514 9.0816 7.16707 9.2794C7.249 9.47719 7.20371 9.70486 7.05233 9.85624L3.97569 12.9329H6.67804C6.97038 12.9329 7.20736 13.1699 7.20736 13.4622C7.20736 13.7545 6.97038 13.9915 6.67804 13.9915H2.69779C2.4837 13.9915 2.29069 13.8626 2.20876 13.6648C2.12684 13.467 2.17212 13.2393 2.32351 13.0879L5.40015 10.0113H2.69779Z`,`M5.51638 2.58693C5.23363 1.81542 4.14248 1.81543 3.85973 2.58693L2.13245 7.29995C2.03185 7.57443 2.17281 7.87849 2.4473 7.97909C2.72178 8.07969 3.02584 7.93872 3.12644 7.66424L3.64346 6.25351L3.64504 6.25351H5.73266L6.24968 7.66424C6.35027 7.93872 6.65433 8.07969 6.92882 7.97909C7.2033 7.87849 7.34426 7.57443 7.24367 7.29995L5.51638 2.58693ZM5.34467 5.19487L4.68806 3.40325L4.03144 5.19487H5.34467Z`],pr=[`M11.9003 2.29495C11.9003 2.00261 11.6633 1.76562 11.371 1.76562C11.0787 1.76562 10.8417 2.00261 10.8417 2.29495V12.4268L9.74577 11.3309C9.53906 11.1242 9.20391 11.1242 8.9972 11.3309C8.79048 11.5376 8.79048 11.8727 8.9972 12.0795L10.9969 14.0791C11.2036 14.2858 11.5387 14.2858 11.7454 14.0791L13.7451 12.0795C13.9518 11.8727 13.9518 11.5376 13.7451 11.3309C13.5384 11.1242 13.2032 11.1242 12.9965 11.3309L11.9003 12.4271V2.29495Z`,`M2.69792 10.0113C2.40558 10.0113 2.16859 9.77429 2.16859 9.48196C2.16859 9.18962 2.40558 8.95264 2.69792 8.95264H6.67816C6.89225 8.95264 7.08526 9.0816 7.16719 9.2794C7.24912 9.47719 7.20384 9.70486 7.05245 9.85624L3.97581 12.9329H6.67816C6.9705 12.9329 7.20749 13.1699 7.20749 13.4622C7.20749 13.7545 6.9705 13.9915 6.67816 13.9915H2.69792C2.48383 13.9915 2.29082 13.8626 2.20889 13.6648C2.12696 13.467 2.17224 13.2393 2.32363 13.0879L5.40027 10.0113H2.69792Z`,`M5.5165 2.58693C5.23375 1.81542 4.1426 1.81543 3.85985 2.58693L2.13257 7.29995C2.03197 7.57443 2.17294 7.8785 2.44742 7.97909C2.7219 8.07969 3.02596 7.93872 3.12656 7.66424L3.64358 6.25351L3.64516 6.25351H5.73278L6.2498 7.66424C6.35039 7.93872 6.65446 8.07969 6.92894 7.97909C7.20342 7.8785 7.34438 7.57443 7.24379 7.29995L5.5165 2.58693ZM5.34479 5.19487L4.68818 3.40325L4.03156 5.19487H5.34479Z`],mr=/* @__PURE__ */ new Set([t.PivotCellStyleTypeEnum.FilterAll,t.PivotCellStyleTypeEnum.FilterPartial,t.PivotCellStyleTypeEnum.FilterSingle,t.PivotCellStyleTypeEnum.FilterNoneSortNone,t.PivotCellStyleTypeEnum.FilteredSortAsc,t.PivotCellStyleTypeEnum.FilteredSortDesc,t.PivotCellStyleTypeEnum.FilteredSortNone,t.PivotCellStyleTypeEnum.FilterNoneSortAsc,t.PivotCellStyleTypeEnum.FilterNoneSortDesc]),hr=/* @__PURE__ */ new Set([t.PivotCellStyleTypeEnum.Expand,t.PivotCellStyleTypeEnum.Collapse]),gr=class extends u.Shape{constructor(e,t,n,r){super(e,t),this._commandService=n,this._themeService=r,W(this,`_cellWidth`,0),W(this,`_cellHeight`,0),W(this,`_hovered`,!1),W(this,`_pivotParams`,void 0),this.setShapeProps(t),this.onPointerDown$.subscribeEvent(e=>this.onPointerDown(e)),this.onPointerEnter$.subscribeEvent(()=>this.onPointerEnter()),this.onPointerLeave$.subscribeEvent(()=>this.onPointerLeave())}setShapeProps(e){e.cellHeight!==void 0&&(this._cellHeight=e.cellHeight),e.cellWidth!==void 0&&(this._cellWidth=e.cellWidth),e.pivotParams!==void 0&&(this._pivotParams=e.pivotParams),this.transformByState({width:e.width,height:e.height})}onPointerDown(e){if(e.button===2)return;let{col:r,row:i,unitId:a,subUnitId:o,buttonType:s}=this._pivotParams;mr.has(s)?setTimeout(()=>{this._commandService.executeCommand(tt.id,{row:i,col:r,unitId:a,subUnitId:o})},200):this._commandService.executeCommand(n.SetPivotCollapseCommand.id,{row:i,col:r,unitId:a,subUnitId:o,collapse:s===t.PivotCellStyleTypeEnum.Expand})}onPointerEnter(){this._hovered=!0,this.setCursor(u.CURSOR_TYPE.POINTER),this.makeDirty(!0)}onPointerLeave(){this._hovered=!1,this.setCursor(u.CURSOR_TYPE.DEFAULT),this.makeDirty(!0)}_draw(e){var n,r;if(!((n=this._pivotParams)!=null&&n.buttonType))return;let i=this._themeService.getColorFromTheme(`primary.600`),a=this._themeService.getColorFromTheme(`gray.50`);e.save();let o=new Path2D;o.rect(0,0,this._cellWidth,this._cellHeight),e.clip(o),((r=this._pivotParams)==null?void 0:r.buttonType)===t.PivotCellStyleTypeEnum.Collapse?X.drawExpand(e,12,i,a,this._cellHeight):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.Expand?X.drawCollapse(e,12,i,a,this._cellHeight):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilterAll||this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilterNoneSortNone?X.drawNoSetting(e,16,i,a):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilterPartial||this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilterSingle||this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilteredSortNone?X.drawIconByPath(e,lr,i,a):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilterNoneSortAsc?X.drawIconByPath(e,fr,i,a):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilterNoneSortDesc?X.drawIconByPath(e,pr,i,a):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilteredSortAsc?X.drawIconByPath(e,ur,i,a):this._pivotParams.buttonType===t.PivotCellStyleTypeEnum.FilteredSortDesc&&X.drawIconByPath(e,dr,i,a),e.restore()}};gr=K([G(2,r.ICommandService),G(3,(0,r.Inject)(r.ThemeService))],gr);let _r=class extends u.Shape{constructor(e,t,n,r){super(e,t),this._commandService=n,this._themeService=r,W(this,`_cellWidth`,void 0),W(this,`_cellHeight`,void 0),W(this,`_pivotParams`,void 0),this._cellWidth=t.cellWidth,this._cellHeight=t.cellHeight,this._pivotParams=t.pivotParams,this.transformByState({width:t.width,height:t.height}),this.onPointerUp$.subscribeEvent(e=>this._handlePointerUp(e))}_handlePointerUp(e){if(e.button===2)return;let{col:r,row:i,unitId:a,subUnitId:o,buttonType:s}=this._pivotParams;if(mr.has(s))return this._commandService.executeCommand(tt.id,{row:i,col:r,unitId:a,subUnitId:o});if(hr.has(s))return this._commandService.executeCommand(n.SetPivotCollapseCommand.id,{row:i,col:r,unitId:a,subUnitId:o,collapse:s===t.PivotCellStyleTypeEnum.Expand})}_draw(e){let n=this._pivotParams.buttonType,r=this._themeService.getColorFromTheme(`primary.600`),i=this._themeService.getColorFromTheme(`gray.50`);e.save();let a=new Path2D;a.rect(0,0,this._cellWidth,this._cellHeight),e.clip(a),e.translate(6,6),n===t.PivotCellStyleTypeEnum.Collapse?X.drawExpand(e,12,r,i,this._cellHeight):n===t.PivotCellStyleTypeEnum.Expand?X.drawCollapse(e,12,r,i,this._cellHeight):n===t.PivotCellStyleTypeEnum.FilterAll||n===t.PivotCellStyleTypeEnum.FilterNoneSortNone?X.drawNoSetting(e,16,r,i):n===t.PivotCellStyleTypeEnum.FilterPartial||n===t.PivotCellStyleTypeEnum.FilterSingle||n===t.PivotCellStyleTypeEnum.FilteredSortNone?X.drawIconByPath(e,lr,r,i):n===t.PivotCellStyleTypeEnum.FilterNoneSortAsc?X.drawIconByPath(e,fr,r,i):n===t.PivotCellStyleTypeEnum.FilterNoneSortDesc?X.drawIconByPath(e,pr,r,i):n===t.PivotCellStyleTypeEnum.FilteredSortAsc?X.drawIconByPath(e,ur,r,i):n===t.PivotCellStyleTypeEnum.FilteredSortDesc&&X.drawIconByPath(e,dr,r,i),e.restore()}};_r=K([G(2,r.ICommandService),G(3,(0,r.Inject)(r.ThemeService))],_r);function vr(e,t,n){let{startX:r,startY:i,endX:a,endY:o}=n;return{left:(t===`filter`?e!==`rtl`:e===`rtl`)?a-16-1:r+1,top:t===`filter`?o-16-1:i+1}}let yr=class extends r.Disposable{constructor(e,t,n,r,i,a,o,s,c,l){super(),this._context=e,this._injector=t,this._adaptorModel=n,this._skeletonManagerService=r,this._configModel=i,this._permissionController=a,this._permissionService=o,this._localeService=s,this._dialogService=c,this._contextMenuController=l,W(this,`_buttonShapes`,[]),this._initContextMenu(),this._initButtonRender(),this._initSkeleton()}dispose(){this._clearButtons(),super.dispose()}_clearButtons(){this._buttonShapes.forEach(e=>e.dispose()),this._buttonShapes.length=0}_initContextMenu(){if(!this._contextMenuController)return;let e=this._contextMenuController.contextMenuInterceptor.intercept(o.MOBILE_CONTEXT_MENU,{handler:(e,t,n)=>{if(e||t.menuPosition!==a.ContextMenuPosition.MAIN_AREA)return n(e);let{col:r,row:i,subUnitId:o,unitId:s}=t;if(r==null||i==null)return n(e);let c=this._adaptorModel.getPivotTableIdByCell(s,o,i,r);return c?(this._openPivotActionPanel(s,o,c,i,r),!0):n(e)}});this.disposeWithMe((0,r.toDisposable)(e))}_openPivotActionPanel(e,t,n,r,a){let o=this._permissionController.permissionCheckWithRanges({workbookTypes:[i.WorkbookEditablePermission],worksheetTypes:[i.WorksheetPivotTablePermission],rangeTypes:[i.RangeProtectionPermissionEditPoint]},[{startRow:r,endRow:r,startColumn:a,endColumn:a}],e,t);this._dialogService.open({id:M,title:{title:this._localeService.t(`sheets-pivot-ui.title`)},children:{label:{name:j,props:{editable:o,pivotTableId:n,subUnitId:t,unitId:e}}},onClose:()=>this._dialogService.close(M)})}_initButtonRender(){this.disposeWithMe((0,s.merge)(this._adaptorModel.viewUpdate$.pipe((0,s.auditTime)(0)),this._skeletonManagerService.currentSkeleton$,this._configModel.pivotConfigChange$,this._permissionService.permissionPointUpdate$.pipe((0,s.auditTime)(100))).subscribe(()=>{let e=this._context.unit,t=this._skeletonManagerService.getCurrentSkeleton();if(!e||!t)return;let n=e.getActiveSheet(),r=e.getUnitId(),a=n.getSheetId(),s=this._localeService.getDirection(),{scene:c}=this._context;this._clearButtons(),this._adaptorModel.getSubUnitPivotMatrix(r,a).forValue((e,n,l)=>{if(!(l!=null&&l.pbt))return;let{startX:u,startY:d,endX:f,endY:p}=(0,o.getCoordByCell)(e,n,c,t),m=f-u,h=p-d;if(h<8||m<8||!this._permissionController.permissionCheckWithRanges({workbookTypes:[i.WorkbookEditablePermission],worksheetTypes:[i.WorksheetViewPermission,i.WorksheetEditPermission,i.WorksheetPivotTablePermission],rangeTypes:[i.RangeProtectionPermissionViewPoint,i.RangeProtectionPermissionEditPoint]},[{startRow:e,endRow:e,startColumn:n,endColumn:n}],r,a))return;let g;if(mr.has(l.pbt))g=`filter`;else if(hr.has(l.pbt))g=`collapse`;else return;let _=vr(s,g,{startX:u,startY:d,endX:f,endY:p}),v={left:_.left-6,top:_.top-6,width:28,height:28,zIndex:5e3,cellWidth:m,cellHeight:h,pivotParams:{row:e,col:n,unitId:r,subUnitId:a,buttonType:l.pbt}},y=`sheets-mobile-pivot-button-${e}-${n}-${r}-${a}`;this._buttonShapes.push(this._injector.createInstance(_r,y,v))}),this._buttonShapes.length&&c.addObjects(this._buttonShapes),c.makeDirty()}))}_initSkeleton(){var e;this.disposeWithMe(this._adaptorModel.markDirty$.subscribe(({unitId:e,subUnitId:t})=>{if(e===this._context.unitId&&(this._skeletonManagerService.makeDirty({sheetId:t}),this._context.unit.getActiveSheet().getSheetId()===t)){var n;this._skeletonManagerService.reCalculate(),(n=this._context.mainComponent)==null||n.makeDirty()}}));let t=this._context.unitId;this._context.unit.getSheets().forEach(e=>{var n;let r=e.getSheetId();(n=this._adaptorModel.getSubUnitPivotRenderCache(t,r))!=null&&n.size&&this._skeletonManagerService.makeDirty({sheetId:r})}),this._skeletonManagerService.reCalculate(),(e=this._context.mainComponent)==null||e.makeDirty()}};yr=K([G(1,(0,r.Inject)(r.Injector)),G(2,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(3,(0,r.Inject)(o.SheetSkeletonManagerService)),G(4,(0,r.Inject)(n.SheetsPivotTableConfigModel)),G(5,(0,r.Inject)(i.SheetPermissionCheckController)),G(6,(0,r.Inject)(r.IPermissionService)),G(7,(0,r.Inject)(r.LocaleService)),G(8,a.IDialogService),G(9,(0,r.Optional)(o.SheetContextMenuMobileRenderController))],yr);let br=class extends r.Disposable{constructor(e,t,n){super(),this._univerInstanceService=e,this._sheetsPivotTableAdaptorModel=t,this._sheetClipboardService=n,this._initialize()}_initialize(){let e=this,t,i;this.disposeWithMe(this._sheetClipboardService.addClipboardHook({id:n.SHEET_PIVOT_TABLE_PLUGIN,onBeforeCopy(n,a){let o=e._univerInstanceService.getUnit(n,r.UniverInstanceType.UNIVER_SHEET);o&&(t=e._sheetsPivotTableAdaptorModel.getSubUnitPivotMatrix(n,a),i=o.getStyles())},onAfterCopy(){t=null,i=null},getCellValueBySpecialMatrix(e,n){if(!t)return;let r=t==null?void 0:t.getValue(e,n);if(r){var a;return{...r,s:i==null?void 0:i.get(r.s),displayV:((a=r.v)==null?void 0:a.toString())||``}}}}))}};br=K([G(0,(0,r.Inject)(r.IUniverInstanceService)),G(1,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(2,o.ISheetClipboardService)],br);let xr=[i.InsertRowCommand.id,i.RemoveColCommand.id,i.RemoveRowCommand.id,i.InsertColCommand.id],Sr=class extends r.Disposable{constructor(e,t,r,i,a,o,s,c,l){var u;super(),this._injector=e,this._univerInstanceService=t,this._sheetsPivotTableAdaptorModel=r,this._sheetInterceptorService=i,this._confirmService=a,this._localeService=o,this._sheetsPivotTableConfigModel=s,this._messageService=c,this._configService=l,W(this,`_defaultOverride`,!1),this._initMoveRangeConfirmCheck(),this._initRowColOperationCheck(),this._defaultOverride=((u=this._configService.getConfig(n.SHEETS_PIVOT_PLUGIN_CONFIG_KEY))==null?void 0:u.defaultOverride)??!1}_initMoveRangeConfirmCheck(){this.disposeWithMe(this._sheetInterceptorService.interceptBeforeCommand({performCheck:async e=>{if(e.id===i.MoveRangeCommand.id){let t=(0,i.getSheetCommandTarget)(this._univerInstanceService);if(!t)return Promise.resolve(!1);let{unitId:r,subUnitId:a}=t,{fromRange:o,toRange:s}=e.params,c=this._sheetsPivotTableConfigModel.getSubUnitPivotConfigs(r,a);if(!(c!=null&&c.size))return Promise.resolve(!0);for(let[e,t]of c){let{targetCellInfo:i}=t,{row:c,col:l}=i,u=c-o.startRow,d=l-o.startColumn,f={row:s.startRow+u,col:s.startColumn+d},p=f.row-i.row,m=f.col-i.col,h=this._sheetsPivotTableAdaptorModel.getPivotItemRenderInfoCache(r,a,e),g=h==null?void 0:h.rangesInfo;if(!g)return Promise.resolve(!0);let _=[];Object.keys(g).forEach(e=>{g[e].forEach(e=>{let t={...e};t.startRow=e.startRow+p,t.endRow=e.endRow+p,t.startColumn=e.startColumn+m,t.endColumn=e.endColumn+m,_.push(t)})});let v=this._sheetInterceptorService.generateMutationsByRanges({unitId:r,subUnitId:a,ranges:_}),y=(0,n.generateSetRangeValueMutations)(this._injector,r,a,_);if(v.redos.length||y.shouldClear){if(this._defaultOverride)return Promise.resolve(!0);{let e=await this._confirmService.confirm({id:`sheet-pivot.confirm.add-sheet-pivot`,title:{title:this._localeService.t(`sheets-pivot-ui.perform.tips`)},children:{title:this._localeService.t(`sheets-pivot-ui.perform.info`)},cancelText:this._localeService.t(`sheets-pivot-ui.perform.cancel`),confirmText:this._localeService.t(`sheets-pivot-ui.perform.confirm`)});return Promise.resolve(e)}}}}return Promise.resolve(!0)}}))}_initRowColOperationCheck(){this.disposeWithMe(this._sheetInterceptorService.interceptBeforeCommand({performCheck:async e=>{if(xr.includes(e.id)){let t=e.params,{range:n}=t,a=(0,i.getSheetCommandTarget)(this._univerInstanceService),o=t.unitId||(a==null?void 0:a.unitId),s=t.subUnitId||(a==null?void 0:a.subUnitId);if(!o||!s)return Promise.resolve(!0);let l=this._sheetsPivotTableConfigModel.getSubUnitPivotConfigs(o,s);if(l!=null&&l.size)for(let[e,t]of l){let t=this._sheetsPivotTableAdaptorModel.getPivotItemRenderInfoCache(o,s,e);if(t!=null&&t.rangesInfo){for(let e of Object.keys(t.rangesInfo))if(t.rangesInfo[e].some(e=>r.Rectangle.intersects(e,n)))return this._messageService.show({type:c.MessageType.Error,content:this._localeService.t(`sheets-pivot-ui.perform.rowColError`)}),Promise.resolve(!1)}}}return Promise.resolve(!0)}}))}};Sr=K([G(0,(0,r.Inject)(r.Injector)),G(1,(0,r.Inject)(r.IUniverInstanceService)),G(2,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(3,(0,r.Inject)(i.SheetInterceptorService)),G(4,(0,r.Inject)(r.IConfirmService)),G(5,(0,r.Inject)(r.LocaleService)),G(6,(0,r.Inject)(n.SheetsPivotTableConfigModel)),G(7,(0,r.Inject)(a.IMessageService)),G(8,(0,r.Inject)(r.IConfigService))],Sr);let Cr=[h.InsertTextCommand.id,g.IMEInputCommand.id,o.SetCellEditVisibleOperation.id],wr=class extends r.Disposable{constructor(e,t,n,r,i,a){super(),this._sheetsSelectionsService=e,this._univerInstanceService=t,this._sheetsPivotTableAdaptorModel=n,this._commandService=r,this._sheetsPivotTableConfigModel=i,this._localeService=a,this._initEditListener()}_initEditListener(){this.disposeWithMe(this._commandService.beforeCommandExecuted(e=>{if(Cr.includes(e.id)){var t;let n=(t=this._sheetsSelectionsService.getCurrentLastSelection())==null?void 0:t.primary;if(!n)return;let{actualRow:a,actualColumn:o}=n,s=(0,r.cellToRange)(a,o),c=(0,i.getSheetCommandTarget)(this._univerInstanceService,e.params);if(!c)return;let{unitId:l,subUnitId:u}=c,d=this._sheetsPivotTableConfigModel.getSubUnitPivotConfigs(l,u);if(d!=null&&d.size)for(let[e]of d){let t=this._sheetsPivotTableAdaptorModel.getPivotItemRenderInfoCache(l,u,e);if(t!=null&&t.rangesInfo){for(let e of Object.keys(t.rangesInfo))if(t.rangesInfo[e].some(e=>r.Rectangle.intersects(e,s)))throw new r.CustomCommandExecutionError(this._localeService.t(`sheets-pivot-ui.msg.editCellError`))}}}}))}};wr=K([G(0,(0,r.Inject)(i.SheetsSelectionsService)),G(1,(0,r.Inject)(r.IUniverInstanceService)),G(2,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(3,(0,r.Inject)(r.ICommandService)),G(4,(0,r.Inject)(n.SheetsPivotTableConfigModel)),G(5,(0,r.Inject)(r.LocaleService))],wr);let Tr=class extends r.Disposable{constructor(e,t,n,r){super(),this._sheetsPivotTableAdaptorModel=e,this._formatPainterService=t,this._messageService=n,this._localeService=r,this._initFormatPainterListener()}_initFormatPainterListener(){let e=this._sheetsPivotTableAdaptorModel,t=this._messageService,n=this._localeService;this._formatPainterService.addHook({id:`pivot-format-painter-hook`,onBeforeApply(r){let{redoMutationsInfo:a}=r;for(let r of a)if(r.id===i.AddWorksheetMergeMutation.id){let{unitId:i,subUnitId:a,ranges:o}=r.params;for(let r of o)if(e.getIntersectsPivotTable(i,a,r).length>0)return t.show({type:c.MessageType.Error,content:n.t(`sheets-pivot-ui.msg.mergeCellError`)}),!1}return!0}})}};Tr=K([G(0,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(1,(0,r.Inject)(o.IFormatPainterService)),G(2,(0,r.Inject)(a.IMessageService)),G(3,(0,r.Inject)(r.LocaleService))],Tr);let Er=class extends r.Disposable{constructor(e,t,n){super(),this._sheetPrintInterceptorService=e,this._sheetsPivotTableAdaptorModel=t,this._sheetsPivotTableConfigModel=n,this._initPrintArea()}_initPrintArea(){this.disposeWithMe(this._sheetPrintInterceptorService.interceptor.intercept(this._sheetPrintInterceptorService.interceptor.getInterceptPoints().PRINTING_RANGE,{handler:(e,t,n)=>{let{unitId:i,subUnitId:a}=t,o=(e==null?void 0:e.startRow)??1/0,s=(e==null?void 0:e.endRow)??-1/0,c=(e==null?void 0:e.startColumn)??1/0,l=(e==null?void 0:e.endColumn)??-1/0,u=this._sheetsPivotTableConfigModel.getSubUnitPivotConfigs(i,a);if(!u)return n(e);for(let[e,t]of u){var d;let t=(d=this._sheetsPivotTableAdaptorModel.getPivotItemRenderInfoCache(i,a,e))==null?void 0:d.rangesInfo;t&&Object.values(t).forEach(e=>{e.forEach(e=>{let{startRow:t,endRow:n,startColumn:r,endColumn:i}=e;o=Math.min(t,o),s=Math.max(n,s),c=Math.min(r,c),l=Math.max(i,l)})})}let f={startRow:o,endRow:s,startColumn:c,endColumn:l};return(0,r.isValidRange)(f)?n(f):n(e)}}))}};Er=K([G(0,(0,r.Inject)(o.SheetPrintInterceptorService)),G(1,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(2,(0,r.Inject)(n.SheetsPivotTableConfigModel))],Er);let Dr=class extends r.Disposable{constructor(e,t,n){super(),this._mergeCellController=e,this._univerInstanceService=t,this._sheetsPivotTableConfigModel=n,this._initMenuInterceptor()}_initMenuInterceptor(){this.disposeWithMe(this._mergeCellController.interceptor.intercept(this._mergeCellController.interceptor.getInterceptPoints().MERGE_CELL_INTERCEPTOR_CHECK,{handler:(e,t)=>{let n=(0,i.getSheetCommandTarget)(this._univerInstanceService);if(!n)return e;let{unitId:a,subUnitId:o}=n,s=this._sheetsPivotTableConfigModel.getSubUnitPivotConfigs(a,o),c=[];return s&&s.forEach((e,t)=>{var n;let r=(n=this._sheetsPivotTableConfigModel.getPivotTableRangeInfo(a,o,t))==null?void 0:n.rangeInfo;r&&Object.keys(r).forEach(e=>{let t=r[e];Array.isArray(t)&&c.push(...t)})}),c.length&&t.some(e=>c.some(t=>r.Rectangle.intersects(t,e)))?!0:e}}))}};Dr=K([G(0,(0,r.Inject)(i.MergeCellController)),G(1,(0,r.Inject)(r.IUniverInstanceService)),G(2,(0,r.Inject)(n.SheetsPivotTableConfigModel))],Dr);let Z=class extends r.Plugin{constructor(e=ot,t,n,i,a){super(),this._config=e,this._injector=t,this._commandService=n,this._renderManagerService=i,this._configService=a;let{menu:o,...s}=(0,r.merge)({},ot,this._config);o&&this._configService.setConfig(`menu`,o,{merge:!0}),this._configService.setConfig(at,s),this._registerCommands()}onStarting(){[[ir],[sr],[cr],[Dr],[Sr],[Er],[wr],[Tr],[q],[br]].forEach(e=>this._injector.add(e)),(0,r.touchDependencies)(this._injector,[[ir],[sr],[cr],[q]])}onRendered(){this._registerRenderModules(),(0,r.touchDependencies)(this._injector,[[Sr],[Er],[wr],[Tr],[br]])}onSteady(){(0,r.touchDependencies)(this._injector,[[Dr]])}_registerCommands(){[it,N,tt,nt,F].forEach(e=>this.disposeWithMe(this._commandService.registerCommand(e)))}_registerRenderModules(){this.disposeWithMe(this._renderManagerService.registerRenderModule(r.UniverInstanceType.UNIVER_SHEET,[yr]))}};W(Z,`pluginName`,`${n.SHEET_PIVOT_TABLE_PLUGIN}_UI_PLUGIN`),W(Z,`packageName`,$e),W(Z,`version`,et),W(Z,`type`,r.UniverInstanceType.UNIVER_SHEET),Z=K([(0,r.DependentOn)(l.UniverLicensePlugin,u.UniverRenderEnginePlugin,i.UniverSheetsPlugin,n.UniverSheetsPivotTablePlugin,o.UniverSheetsMobileUIPlugin,a.UniverMobileUIPlugin),G(1,(0,r.Inject)(r.Injector)),G(2,r.ICommandService),G(3,u.IRenderManagerService),G(4,r.IConfigService)],Z);let Or=[t.PivotExcelDateGroupUnit.Year,t.PivotExcelDateGroupUnit.Quarter,t.PivotExcelDateGroupUnit.Month,t.PivotExcelDateGroupUnit.Day,t.PivotExcelDateGroupUnit.Hour,t.PivotExcelDateGroupUnit.Minute,t.PivotExcelDateGroupUnit.Second],kr={[t.PivotExcelDateGroupUnit.Year]:`sheets-pivot-ui.dateGroup.year`,[t.PivotExcelDateGroupUnit.Quarter]:`sheets-pivot-ui.dateGroup.quarter`,[t.PivotExcelDateGroupUnit.Month]:`sheets-pivot-ui.dateGroup.month`,[t.PivotExcelDateGroupUnit.Day]:`sheets-pivot-ui.dateGroup.day`,[t.PivotExcelDateGroupUnit.Hour]:`sheets-pivot-ui.dateGroup.hour`,[t.PivotExcelDateGroupUnit.Minute]:`sheets-pivot-ui.dateGroup.minute`,[t.PivotExcelDateGroupUnit.Second]:`sheets-pivot-ui.dateGroup.second`},Ar=`univer-h-8 univer-rounded-md univer-border univer-border-gray-300 univer-bg-gray-0 univer-px-2 univer-text-sm univer-text-gray-900 dark:univer-bg-gray-700 dark:univer-text-gray-0`;function jr({targetFieldName:e,dateSystem:n,grouping:i,onConfirm:o,onCancel:s}){let l=(0,a.useDependency)(r.LocaleService),u=(0,a.useObservable)(l.direction$,l.getDirection()),p=(e,t)=>{let i=e===void 0?null:(0,r.excelSerialToDateTimeParts)(e,{dateSystem:n});if(!i)return{date:``,time:t};let a=e=>String(e).padStart(2,`0`);return{date:`${i.year}-${a(i.month)}-${a(i.day)}`,time:`${a(i.hours)}:${a(i.minutes)}:${a(i.seconds)}`}},[m,h]=(0,d.useState)((i==null?void 0:i.units)??[t.PivotExcelDateGroupUnit.Day]),[g,_]=(0,d.useState)((i==null?void 0:i.autoStart)??!0),[v,y]=(0,d.useState)((i==null?void 0:i.autoEnd)??!0),[b,x]=(0,d.useState)(()=>p(i==null?void 0:i.start,`00:00:00`).date),[S,C]=(0,d.useState)(()=>p(i==null?void 0:i.end,`23:59:59`).date),[w,T]=(0,d.useState)(()=>p(i==null?void 0:i.start,`00:00:00`).time),[E,D]=(0,d.useState)(()=>p(i==null?void 0:i.end,`23:59:59`).time),[O,k]=(0,d.useState)((i==null?void 0:i.daysInterval)??1),[A,j]=(0,d.useState)(!1),M=(0,d.useRef)(!1),N=m.some(e=>e===t.PivotExcelDateGroupUnit.Hour||e===t.PivotExcelDateGroupUnit.Minute||e===t.PivotExcelDateGroupUnit.Second),P=m.length===1&&m[0]===t.PivotExcelDateGroupUnit.Day,F=(e,t,i)=>{let a=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),o=/^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec(t);return!a||!o?null:(0,r.excelDateTimePartsToSerial)({year:Number(a[1]),month:Number(a[2]),day:Number(a[3]),hours:N?Number(o[1]):i?23:0,minutes:N?Number(o[2]):i?59:0,seconds:N?Number(o[3]??0):i?59:0,fractionalSecond:i?.999:0},{dateSystem:n})},I=g?void 0:F(b,w,!1),L=v?void 0:F(S,E,!0),R=m.length>0&&(g||I!==null)&&(v||L!==null)&&(I==null||L==null||I<=L)&&(!P||Number.isInteger(O)&&O>=1);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,dir:u,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium`,children:e}),/* @__PURE__ */ (0,f.jsxs)(`fieldset`,{children:[/* @__PURE__ */ (0,f.jsx)(`legend`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:l.t(`sheets-pivot-ui.dateGroup.groupBy`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2`,children:Or.map(e=>/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:m.includes(e),onChange:t=>h(n=>t?Or.filter(t=>t===e||n.includes(t)):n.filter(t=>t!==e)),children:l.t(kr[e])},e))})]}),P&&/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-3 univer-text-sm`,children:[l.t(`sheets-pivot-ui.dateGroup.daysInterval`),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-w-24`,value:O,min:1,onChange:e=>k(Number(e))})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:g,onChange:e=>_(!!e),children:l.t(`sheets-pivot-ui.dateGroup.autoStart`)}),!g&&/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-items-center univer-gap-2 univer-text-sm`,children:[l.t(`sheets-pivot-ui.dateGroup.start`),/* @__PURE__ */ (0,f.jsx)(c.Input,{type:`date`,value:b,onChange:x}),N&&/* @__PURE__ */ (0,f.jsx)(`input`,{className:Ar,type:`time`,step:1,value:w,onChange:e=>T(e.target.value)})]}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:v,onChange:e=>y(!!e),children:l.t(`sheets-pivot-ui.dateGroup.autoEnd`)}),!v&&/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-items-center univer-gap-2 univer-text-sm`,children:[l.t(`sheets-pivot-ui.dateGroup.end`),/* @__PURE__ */ (0,f.jsx)(c.Input,{type:`date`,value:S,onChange:C}),N&&/* @__PURE__ */ (0,f.jsx)(`input`,{className:Ar,type:`time`,step:1,value:E,onChange:e=>D(e.target.value)})]})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:s,children:l.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:!R||A,onClick:async()=>{if(!R||M.current)return;let e={units:Or.filter(e=>m.includes(e)),autoStart:g,autoEnd:v};!g&&I!=null&&(e.start=I),!v&&L!=null&&(e.end=L),P&&O>1&&(e.daysInterval=O),M.current=!0,j(!0);try{await o(e)}catch{}finally{M.current=!1,j(!1)}},children:l.t(`sheets-pivot-ui.dialog.ok`)})]})]})}function Mr(e){let n=e.operator===t.ST_PivotFilterOperatorEnum.dateBetween||e.operator===t.ST_PivotFilterOperatorEnum.dateNotBetween,r={type:t.PivotFilterTypeEnum.CustomFilter,operator:e.operator,expected:n?[e.lower,e.upper]:e.lower,useWholeDay:e.useWholeDay};try{return(0,t.compilePivotDateFilter)(r),r}catch{return}}function Nr(e,t){let n=(0,r.excelSerialToDateTimeParts)(e,{dateSystem:t});if(!n||n.day===0||n.year===1900&&n.month===2&&n.day===29)return;let i=new Date(2e3,0,1,12);return i.setFullYear(n.year,n.month-1,n.day),i}function Pr(e,t,n){let i=(0,r.excelDateTimePartsToSerial)({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:0,minutes:0,seconds:0,fractionalSecond:0},{dateSystem:n});return i===null?void 0:i+(e===void 0?0:e-Math.floor(e))}function Fr(e,t){return e===void 0||!Number.isFinite(t.getTime())?e:Math.floor(e)+(t.getHours()*3600+t.getMinutes()*60+t.getSeconds()+t.getMilliseconds()/1e3)/86400}let Ir=[{value:t.ST_PivotFilterOperatorEnum.dateEqual,label:`sheets-pivot-ui.dateFilter.equal`},{value:t.ST_PivotFilterOperatorEnum.dateNotEqual,label:`sheets-pivot-ui.dateFilter.notEqual`},{value:t.ST_PivotFilterOperatorEnum.dateNewerThan,label:`sheets-pivot-ui.dateFilter.after`},{value:t.ST_PivotFilterOperatorEnum.dateNewerThanOrEqual,label:`sheets-pivot-ui.dateFilter.afterOrEqual`},{value:t.ST_PivotFilterOperatorEnum.dateOlderThan,label:`sheets-pivot-ui.dateFilter.before`},{value:t.ST_PivotFilterOperatorEnum.dateOlderThanOrEqual,label:`sheets-pivot-ui.dateFilter.beforeOrEqual`},{value:t.ST_PivotFilterOperatorEnum.dateBetween,label:`sheets-pivot-ui.dateFilter.between`},{value:t.ST_PivotFilterOperatorEnum.dateNotBetween,label:`sheets-pivot-ui.dateFilter.notBetween`}];function Lr({dateSystem:e,defaultDate:n,currentFilter:i,onConfirm:o,onCancel:s}){let l=(0,a.useDependency)(r.LocaleService);(0,a.useObservable)(l.currentLocale$);let u=(0,a.useObservable)(l.direction$,l.getDirection()),[p,m]=(0,d.useState)((i==null?void 0:i.operator)??t.ST_PivotFilterOperatorEnum.dateEqual),h=Array.isArray(i==null?void 0:i.expected)?i.expected[0]:i==null?void 0:i.expected,g=Array.isArray(i==null?void 0:i.expected)?i.expected[1]:void 0,[_,v]=(0,d.useState)(()=>h??n??Pr(void 0,/* @__PURE__ */ new Date,e)),[y,b]=(0,d.useState)(()=>g??h??n??Pr(void 0,/* @__PURE__ */ new Date,e)),[x,S]=(0,d.useState)((i==null?void 0:i.useWholeDay)===!0),[C,w]=(0,d.useState)(!1),[T,E]=(0,d.useState)(!1),D=(0,d.useRef)(!1),O=P(_),k=P(y),A=p===t.ST_PivotFilterOperatorEnum.dateBetween||p===t.ST_PivotFilterOperatorEnum.dateNotBetween,j=Mr({operator:p,lower:O,upper:k,useWholeDay:x}),M=j!==void 0&&i!==void 0&&p===i.operator&&x===(i.useWholeDay===!0)&&r.Tools.diffValue(j.expected,i.expected);async function N(e){if(!D.current){D.current=!0,w(!0),E(!1);try{await o(e)||E(!0)}catch{E(!0)}finally{D.current=!1,w(!1)}}}function P(e){return typeof e==`string`?e.trim()===``?void 0:Number(e):e}function F(e,t){t?b(e):v(e)}function I(t,n){let r=Pr(n?k:O,t,e);n?b(r):v(r)}function L(e,t){let n=t?k:O;if(n===void 0)return;let r=Fr(n,e);t?b(r):v(r)}return/* @__PURE__ */ (0,f.jsxs)(`div`,{dir:u,className:`univer-flex univer-min-w-0 univer-flex-col univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium`,children:l.t(`sheets-pivot-ui.dateFilter.title`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-1`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-xs`,children:l.t(`sheets-pivot-ui.dateFilter.rule`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-full`,value:String(p),options:Ir.map(e=>({value:String(e.value),label:l.t(e.label)})),onChange:e=>m(Number(e))})]}),(A?[!1,!0]:[!1]).map(t=>{let i=t?k:O,a=i===void 0?void 0:Nr(i,e),o=(t?g:void 0)??h??n,s=o!==void 0&&!Nr(o,e),u=i===void 0?null:(0,r.excelSerialToDateTimeParts)(i,{dateSystem:e}),d=u?new Date(2e3,0,1,u.hours,u.minutes,u.seconds,Math.floor(u.fractionalSecond*1e3)):void 0,p=`sheets-pivot-ui.dateFilter.date`;return A&&(p=t?`sheets-pivot-ui.dateFilter.to`:`sheets-pivot-ui.dateFilter.from`),/* @__PURE__ */ (0,f.jsxs)(`div`,{role:`group`,"aria-label":l.t(p),className:`univer-flex univer-min-w-0 univer-flex-col univer-gap-1`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-xs`,children:l.t(p)}),s?/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-1`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-xs univer-text-gray-500`,children:l.t(`sheets-pivot-ui.dateFilter.serial`)}),/* @__PURE__ */ (0,f.jsx)(c.Input,{value:String((t?y:_)??``),onChange:e=>F(e,t)})]}):/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-wrap univer-items-center univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.DatePicker,{value:a,onValueChange:e=>I(e,t)}),!x&&i!==void 0&&/* @__PURE__ */ (0,f.jsx)(c.TimeInput,{value:d,onValueChange:e=>L(e,t)})]})]},String(t))}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:x,onChange:e=>S(e===!0),children:l.t(`sheets-pivot-ui.dateFilter.wholeDay`)}),T&&/* @__PURE__ */ (0,f.jsx)(`div`,{role:`alert`,className:`univer-text-xs univer-text-red-500`,children:l.t(`sheets-pivot-ui.dateFilter.failed`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-wrap univer-items-center univer-justify-between univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`link`,disabled:C||!i,onClick:()=>N(void 0),children:l.t(`sheets-pivot-ui.dialog.filter.clearFilter`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{disabled:C,onClick:s,children:l.t(`sheets-pivot-ui.dialog.filter.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:C||!j||M,onClick:()=>N(j),children:l.t(`sheets-pivot-ui.dialog.filter.confirm`)})]})]})]})}function Rr(e){let{dialogId:i=b,filterItemInfo:o,onClose:s,onSetFilter:l,onSetSort:u,onSetDateFilter:p,unitId:m,subUnitId:h}=e,{format:g,filterInfo:_,sortInfo:v}=o,y=o.conditionFilter??_,x=(0,a.useDependency)(r.ICommandService),S=(0,a.useDependency)(r.LocaleService);(0,a.useObservable)(S.currentLocale$);let C=(0,a.useDependency)(a.IDialogService),w=(0,a.useDependency)(r.IUniverInstanceService),T=(0,a.useObservable)(S.direction$,S.getDirection()),E=(0,d.useRef)(!0),[D,O]=(0,d.useState)(!1);(0,d.useEffect)(()=>(E.current=!0,()=>{E.current=!1}),[]);let[k,A]=(0,d.useState)(()=>o?o.checkedItems??(_==null?void 0:_.list)??o.items:[]),[j,M]=(0,d.useState)(()=>o.partialItems??[]),N=j.length===0&&k.length===o.items.length,P=k.length===0&&j.length===0,[F,I]=(0,d.useState)(()=>{if(o)return v==null?void 0:v.type}),L=()=>{E.current&&(E.current=!1,s?s():C.close(i))};if((0,d.useEffect)(()=>{let e=w.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_SHEET);if(!e)return;let t=e.activeSheet$.subscribe(e=>{e&&e.getSheetId()!==h&&E.current&&(E.current=!1,s?s():C.close(i))});return()=>t==null?void 0:t.unsubscribe()},[i,C,s,h,w]),!o)return;let R=()=>{M([]),A(N?[]:o.items)},z=e=>{j.includes(e)?(M(j.filter(t=>t!==e)),A([...k,e])):k.includes(e)?A(k.filter(t=>t!==e)):A([...k,e])},B=async()=>{let{tableFieldId:e,pivotTableId:t}=o;if(e&&t)try{(l?await l(k,N,j):await x.executeCommand(n.SetPivotFilterCommand.id,{unitId:m,subUnitId:h,pivotTableId:t,tableFieldId:e,items:k,partialItems:j,isAll:N}))&&E.current&&L()}catch{}},V=()=>{L()},ee=async()=>{let{tableFieldId:e,pivotTableId:t}=o;if(e&&t){A(o.items),M([]);try{(l?await l(o.items,!0,[],!0):await x.executeCommand(n.SetPivotFilterCommand.id,{unitId:m,subUnitId:h,pivotTableId:t,tableFieldId:e,items:o.items,partialItems:[],isAll:!0,clearAllFilters:!0}))&&E.current&&L()}catch{}}},H=async e=>{let{tableFieldId:t,pivotTableId:r}=o;if(!t||!r)return;let i={type:e};try{(u?await u(i):await x.executeCommand(n.SetPivotSortCommand.id,{unitId:m,subUnitId:h,pivotTableId:r,tableFieldId:t,info:i}))&&E.current&&(I(e),L())}catch{}},te=On(_,{items:o.items,conditionFilter:o.conditionFilter});async function ne(e){if(!E.current)return!1;let t=p?await p(e):await x.executeCommand(n.SetPivotDateFilterCommand.id,{unitId:m,subUnitId:h,pivotTableId:o.pivotTableId,tableFieldId:o.tableFieldId,filterInfo:e});return t&&E.current&&L(),t}if(D){let e=w.getUnit(m),n=o.itemTypes.findIndex(e=>e===t.PivotDataFieldDataTypeEnum.date),i=Number(o.items[n]);return/* @__PURE__ */ (0,f.jsx)(Lr,{dateSystem:(e==null?void 0:e.getDateSystem())??r.DateSystem.Date1900,defaultDate:Number.isFinite(i)?i:void 0,currentFilter:(0,t.isPivotDateFilter)(y)?y:void 0,onConfirm:ne,onCancel:()=>O(!1)})}return/* @__PURE__ */ (0,f.jsxs)(`div`,{dir:T,children:[o.supportsDateFilter&&/* @__PURE__ */ (0,f.jsx)(c.Button,{className:`univer-mb-3 univer-w-full`,onClick:()=>O(!0),children:S.t(`sheets-pivot-ui.dateFilter.title`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-flex univer-h-8 univer-w-[140px] univer-flex-1 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-l-md univer-text-center univer-text-sm hover:univer-bg-gray-100 rtl:univer-rounded-l-none rtl:univer-rounded-r-md dark:hover:!univer-bg-gray-700`,c.borderClassName,{"univer-bg-gray-100 dark:!univer-bg-gray-700":F===t.PivotDataFieldSortOperatorEnum.ascending}),onClick:()=>H(t.PivotDataFieldSortOperatorEnum.ascending),children:[/* @__PURE__ */ (0,f.jsx)(yt,{}),S.t(`sheets-pivot-ui.dialog.filter.ascending`)]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-flex univer-h-8 univer-w-[140px] univer-flex-1 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-r-md univer-text-center univer-text-sm hover:univer-bg-gray-100 rtl:univer-rounded-l-md rtl:univer-rounded-r-none dark:hover:!univer-bg-gray-700`,c.borderClassName,{"univer-bg-gray-100 dark:!univer-bg-gray-700":F===t.PivotDataFieldSortOperatorEnum.descending}),onClick:()=>H(t.PivotDataFieldSortOperatorEnum.descending),children:[/* @__PURE__ */ (0,f.jsx)(Dt,{}),S.t(`sheets-pivot-ui.dialog.filter.descending`)]})]}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-mx-0 univer-mb-4 univer-mt-3 univer-h-[300px] univer-rounded-lg univer-p-2`,c.borderClassName),children:/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-h-full univer-overflow-y-auto`,c.scrollbarClassName),children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-1 univer-box-border univer-h-7 univer-py-[5px] univer-pl-[22px] univer-pr-1 univer-text-sm rtl:univer-pl-1 rtl:univer-pr-[22px]`,children:/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:N,onChange:R,indeterminate:!N&&(k.length>0||j.length>0),children:S.t(`sheets-pivot-ui.dialog.filter.selectAll`)})}),o.items.map((e,n)=>{var i,a;let s=e,l=(i=o.itemLabels)==null?void 0:i[e],u=(a=o.itemTypes)==null?void 0:a[n],d=$t(e,u);return d?s=S.t(d):l===void 0?u===t.PivotDataFieldDataTypeEnum.date&&g&&(s=r.numfmt.format(g,Number(e))):s=l,/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-1 univer-box-border univer-h-7 univer-py-1 univer-pl-[22px] univer-pr-1 univer-text-sm rtl:univer-pl-1 rtl:univer-pr-[22px]`,children:/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:k.includes(e),indeterminate:j.includes(e),onChange:()=>z(e),contentClassName:`univer-max-w-[200px] univer-truncate`,children:s})},e)})]})}),/* @__PURE__ */ (0,f.jsxs)(c.ActionRow,{className:`univer-flex univer-items-center univer-justify-between`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-cursor-pointer univer-text-xs univer-text-primary-600`,children:/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`link`,disabled:te===`NotFilter`,onClick:ee,children:S.t(`sheets-pivot-ui.dialog.filter.clearFilter`)})}),/* @__PURE__ */ (0,f.jsxs)(c.ActionRow,{className:`univer-flex univer-flex-1 univer-items-center univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:V,children:S.t(`sheets-pivot-ui.dialog.filter.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:P,onClick:B,children:S.t(`sheets-pivot-ui.dialog.filter.confirm`)})]})]})]})}function zr({name:e,onConfirm:t,onCancel:n}){let i=(0,a.useDependency)(r.LocaleService),o=(0,a.useObservable)(i.direction$,i.getDirection()),[s,l]=(0,d.useState)(e),[u,p]=(0,d.useState)(!1),m=(0,d.useRef)(!1);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,dir:o,children:[/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-flex-col univer-gap-2 univer-text-sm`,children:[i.t(`sheets-pivot-ui.manualGroup.name`),/* @__PURE__ */ (0,f.jsx)(c.Input,{value:s,onChange:l})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:n,children:i.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:!s.trim()||u,onClick:async()=>{if(s.trim()&&!m.current){m.current=!0,p(!0);try{await t(s)}catch{}finally{m.current=!1,p(!1)}}},children:i.t(`sheets-pivot-ui.dialog.ok`)})]})]})}let Br=`univer-flex univer-items-center univer-justify-between univer-gap-3 univer-text-sm`;function Vr({targetFieldName:e,grouping:t,defaults$:n,onConfirm:i,onCancel:o}){let s=(0,a.useDependency)(r.LocaleService),l=(0,a.useObservable)(s.direction$,s.getDirection()),u=(0,a.useObservable)(n),[p,m]=(0,d.useState)((t==null?void 0:t.autoStart)??!0),[h,g]=(0,d.useState)((t==null?void 0:t.autoEnd)??!0),[_,v]=(0,d.useState)((t==null?void 0:t.autoStart)===!1?String(t.start):void 0),[y,b]=(0,d.useState)((t==null?void 0:t.autoEnd)===!1?String(t.end):void 0),[x,S]=(0,d.useState)(t?String(t.interval):void 0),[C,w]=(0,d.useState)(!1),T=(0,d.useRef)(!1),E=e=>e===void 0||!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i.test(e.trim())?NaN:Number(e),D={autoStart:p,autoEnd:h,start:p?u==null?void 0:u.start:E(_),end:h?u==null?void 0:u.end:E(y),interval:x===void 0||x.trim()===``?(u==null?void 0:u.interval)??0:E(x)},O=!!u&&se(D),k=e=>{!e&&_===void 0&&(u==null?void 0:u.start)!==void 0&&v(String(u.start)),m(e)},A=e=>{!e&&y===void 0&&(u==null?void 0:u.end)!==void 0&&b(String(u.end)),g(e)};return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,dir:l,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium`,children:e}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:p,onChange:e=>k(!!e),children:s.t(`sheets-pivot-ui.numberGroup.autoStart`)}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:Br,children:[s.t(`sheets-pivot-ui.numberGroup.start`),/* @__PURE__ */ (0,f.jsx)(c.Input,{className:`univer-w-32`,value:p?String((u==null?void 0:u.start)??``):_??``,disabled:p,onChange:v})]}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:h,onChange:e=>A(!!e),children:s.t(`sheets-pivot-ui.numberGroup.autoEnd`)}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:Br,children:[s.t(`sheets-pivot-ui.numberGroup.end`),/* @__PURE__ */ (0,f.jsx)(c.Input,{className:`univer-w-32`,value:h?String((u==null?void 0:u.end)??``):y??``,disabled:h,onChange:b})]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:Br,children:[s.t(`sheets-pivot-ui.numberGroup.interval`),/* @__PURE__ */ (0,f.jsx)(c.Input,{className:`univer-w-32`,value:x??String((u==null?void 0:u.interval)??``),placeholder:String((u==null?void 0:u.interval)??``),onChange:S})]})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:o,children:s.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:!O||C,onClick:async()=>{if(O&&!T.current){T.current=!0,w(!0);try{await i(D)}catch{}finally{T.current=!1,w(!1)}}},children:s.t(`sheets-pivot-ui.dialog.ok`)})]})]})}let Hr=({handlePatternChange:e})=>{let t=(0,a.useDependency)(r.LocaleService);return(0,d.useEffect)(()=>{e(``)},[]),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-1.5 univer-text-sm univer-leading-5 univer-text-gray-600 dark:!univer-text-gray-200`,children:t.t(`sheets-pivot-ui.dialog.numfmt.generalDesc`)})},Ur=({originPattern:e,handlePatternChange:t})=>{let n=(0,a.useDependency)(r.LocaleService),i=r.currencySymbols.map(e=>({label:e,value:e})),[o,s]=(0,d.useState)(()=>hn(e||``,2)),[l,u]=(0,d.useState)(()=>_n(e??``)||i[0].value);return(0,d.useEffect)(()=>{t(Y(`_("${l}"* #,##0${o>0?`.0`:``}_)`,o))},[]),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-5`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-w-[136px]`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.decimalPlaces`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-box-border univer-h-8`,value:o,max:20,min:0,onChange:e=>{let n=e??0;s(n),t(Y(`_("${l}"* #,##0${n>0?`.0`:``}_)`,n))}})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-w-[136px]`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.currencyTypes`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{options:i,value:l,onChange:e=>{u(e),t(Y(`_("${e}"* #,##0${o>0?`.0`:``}_)`,o))}})]})]}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-1.5 univer-text-sm univer-leading-5 univer-text-gray-600 dark:!univer-text-gray-200`,children:n.t(`sheets-pivot-ui.dialog.numfmt.accountingDesc`)})]})},Wr=({originPattern:e,handlePatternChange:t})=>{let n=(0,a.useDependency)(r.LocaleService),i=r.currencySymbols.map(e=>({label:e,value:e})),[o,s]=(0,d.useState)(()=>hn(e||``,2)),[l,u]=(0,d.useState)(()=>_n(e??``)||i[0].value),p=Zt.map(e=>({label:e.label(l),value:e.suffix(l),color:e.color})),[m,h]=(0,d.useState)(()=>{var t;return((t=p.find(t=>(0,r.isPatternEqualWithoutDecimal)(t.value,e??``)))==null?void 0:t.value)||p[0].value});return(0,d.useEffect)(()=>{t(Y(m,o))},[]),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-5`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-w-[136px]`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.decimalPlaces`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-box-border univer-h-8`,value:o,max:20,min:0,onChange:e=>{e&&(s(e),t(Y(m,e)))}})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-w-[136px]`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.currencyTypes`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{options:i,value:l,onChange:e=>{u(e);let n=Zt.map(t=>({label:t.label(e),value:t.suffix(e),color:t.color}));h(n[0].value),t(Y(n[0].value,o))}})]})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-4`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.negativeNumberTypes`)}),/* @__PURE__ */ (0,f.jsx)(c.SelectList,{className:`univer-rounded-lg univer-p-2`,options:p,value:m,onChange:e=>{h(e),t(Y(e,o))}}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-1.5 univer-text-sm univer-leading-5 univer-text-gray-600 dark:!univer-text-gray-200`,children:n.t(`sheets-pivot-ui.dialog.numfmt.currencyDesc`)})]})]})},Gr=({originPattern:e,handlePatternChange:t})=>{let n=(0,a.useDependency)(r.LocaleService),i=Yt.map(e=>({label:e.label,value:e.suffix})),[o,s]=(0,d.useState)(()=>{if(e){let t=i.find(t=>t.value===e);if(t)return t.value}return i[0].value});return(0,d.useEffect)(()=>{t(o)},[]),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-5`,children:/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-5`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.dateTypes`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{children:/* @__PURE__ */ (0,f.jsx)(c.SelectList,{className:`univer-rounded-lg univer-p-2`,options:i,value:o,onChange:e=>{s(e),t(e)}})}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-1.5 univer-text-sm univer-leading-5 univer-text-gray-600 dark:!univer-text-gray-200`,children:n.t(`sheets-pivot-ui.dialog.numfmt.dateDesc`)})]})})},Kr=({originPattern:e,handlePatternChange:t})=>{let n=(0,a.useDependency)(r.LocaleService),[i,o]=(0,d.useState)(()=>hn(e||``,0)),s=Xt.map(e=>({label:e.label,value:e.suffix,color:e.color})),[l,u]=(0,d.useState)(()=>{let t=s.find(t=>(0,r.isPatternEqualWithoutDecimal)(t.value,e||``));return(t==null?void 0:t.value)||s[0].value});return(0,d.useEffect)(()=>{t(Y(l,Number(i||0)))},[]),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-5`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-items-center univer-justify-between`,children:/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-w-[136px]`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.decimalPlaces`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-box-border univer-h-8`,value:i,max:20,min:0,onChange:e=>{e&&(o(e),t(Y(l,Number(e))))}})]})}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mt-4`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:n.t(`sheets-pivot-ui.dialog.numfmt.negativeNumberTypes`)}),/* @__PURE__ */ (0,f.jsx)(c.SelectList,{className:`univer-rounded-lg univer-p-2`,options:s,value:l,onChange:e=>{o(hn(e,0)),u(e),t(e)}}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-1.5 univer-text-sm univer-leading-5 univer-text-gray-600 dark:!univer-text-gray-200`,children:n.t(`sheets-pivot-ui.dialog.numfmt.thousandthPercentileDesc`)})]})]})},qr=({unitId:e,subUnitId:t,pivotTableId:n,tableFieldId:i,originPattern:o,tableFieldInfo:s,dataFieldInfo:l})=>{let u=(0,a.useDependency)(r.LocaleService),p=(0,a.useDependency)(a.IDialogService),m=u.getDirection(),h=(0,d.useMemo)(()=>[{label:`sheets-pivot-ui.dialog.numfmt.general`,component:Hr,key:`sheet.numfmt.general`},{label:`sheets-pivot-ui.dialog.numfmt.accounting`,component:Ur,key:`sheet.numfmt.accounting`},{label:`sheets-pivot-ui.dialog.numfmt.currency`,component:Wr,key:`sheet.numfmt.currency`},{label:`sheets-pivot-ui.dialog.numfmt.date`,component:Gr,key:`sheet.numfmt.date`},{label:`sheets-pivot-ui.dialog.numfmt.thousandthPercentile`,component:Kr,key:`sheet.numfmt.thousandthPercentile`}].map(e=>({...e,label:u.t(e.label)})),[u]),g=h.map(e=>({label:e.label,value:e.key})),[_,v]=(0,d.useState)(()=>[vn,yn,bn,Sn,wn].reduce((e,t,n)=>e||(t(o??``)?h[n].key:``),``)||h[0].key),[y,b]=(0,d.useState)(o),C=e=>b(e),T=e=>{v(e)},E=r=>({id:S,title:{title:u.t(`sheets-pivot-ui.fieldSettings`)},draggable:!0,mask:!1,maskClosable:!1,width:400,children:{label:x,tableFieldId:i,pivotTableId:n,unitId:e,subUnitId:t,tableFieldInfo:s,dataFieldInfo:l,key:`field-setting-${i||``}`,closeFn:()=>{p.close(S)},format:r?y:``},onClose:()=>{p.close(S)}}),D=()=>{p.close(w);let e=E(!1);p.open(e)};return/* @__PURE__ */ (0,f.jsxs)(`div`,{dir:m,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex`,children:/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-5 univer-flex univer-h-6 univer-cursor-pointer univer-items-center univer-text-base univer-font-medium univer-leading-6`,onClick:D,children:[/* @__PURE__ */ (0,f.jsx)(_t,{}),u.t(`sheets-pivot-ui.dialog.numfmt.fieldSetting`)]})}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-h-5 univer-text-sm univer-font-medium univer-leading-5`,children:u.t(`sheets-pivot-ui.dialog.numfmt.formatTypes`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{children:/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-full`,value:_,options:g,onChange:e=>T(e)})}),/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[_===`sheet.numfmt.general`&&/* @__PURE__ */ (0,f.jsx)(Hr,{originPattern:o,handlePatternChange:C}),_===`sheet.numfmt.accounting`&&/* @__PURE__ */ (0,f.jsx)(Ur,{originPattern:o,handlePatternChange:C}),_===`sheet.numfmt.currency`&&/* @__PURE__ */ (0,f.jsx)(Wr,{originPattern:o,handlePatternChange:C}),_===`sheet.numfmt.date`&&/* @__PURE__ */ (0,f.jsx)(Gr,{originPattern:o,handlePatternChange:C}),_===`sheet.numfmt.thousandthPercentile`&&/* @__PURE__ */ (0,f.jsx)(Kr,{originPattern:o,handlePatternChange:C})]}),/* @__PURE__ */ (0,f.jsxs)(c.ActionRow,{className:`univer-mt-2 univer-flex univer-justify-end`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:D,children:u.t(`sheets-pivot-ui.dialog.numfmt.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{className:`univer-ml-3 rtl:univer-ml-0 rtl:univer-mr-3`,variant:`primary`,onClick:()=>{p.close(w);let e=E(!0);p.open(e)},children:u.t(`sheets-pivot-ui.dialog.numfmt.confirm`)})]})]})};function Jr(e){var o,s;let{scope:l,report:u,getCurrentReport:p,onChange:m}=e,h=(0,a.useDependency)(r.LocaleService),g=(0,a.useDependency)(r.IConfirmService),_=(0,a.useDependency)(n.SheetsPivotTableService),v=(0,a.useDependency)(r.IPermissionService),y=(0,a.useDependency)(r.ILogService);(0,a.useObservable)(v.permissionPointUpdate$);let[b,x]=(0,d.useState)(!1),S=(0,d.useRef)(!1),C=(0,d.useRef)(!0),w=JSON.stringify(l),T=(0,d.useRef)(w);T.current=w,(0,d.useEffect)(()=>(C.current=!0,()=>{C.current=!1}),[]);let E=b||!u||((o=v.getPermissionPoint(new i.WorkbookEditablePermission(l.unitId).id))==null?void 0:o.value)===!1||((s=v.getPermissionPoint(new i.WorksheetFilterPermission(l.unitId,l.subUnitId).id))==null?void 0:s.value)===!1,D=async e=>{if(S.current||E||!u||u.options.allowMultipleFilters===e)return;S.current=!0,x(!0);let i=r.Tools.deepClone(u);try{if(!e&&(0,t.hasPivotMultipleFilters)(u)){let e=await _.asyncInterceptor.fetchThroughAsyncInterceptors(n.PIVOT_OPTION_FILTER_COORDINATION)({redos:[],undos:[],groups:[],validate:()=>void 0},l);if(!C.current||T.current!==w||!await g.confirm({id:`sheet-pivot.confirm.disable-multiple-filters`,title:{title:h.t(`sheets-pivot-ui.config.multipleFiltersTitle`)},children:{title:h.t(`sheets-pivot-ui.config.multipleFiltersClearWarning`)},cancelText:h.t(`sheets-pivot-ui.dialog.cancel`),confirmText:h.t(`sheets-pivot-ui.dialog.ok`)}))return;e==null||e.validate()}if(!C.current||T.current!==w||!r.Tools.diffValue(i,p()))return;await m(e)}catch(e){y.error(`[PivotFilterOptions]`,e)}finally{S.current=!1,C.current&&x(!1)}};return/* @__PURE__ */ (0,f.jsxs)(`section`,{className:`univer-flex univer-flex-col univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.filteringSection`)}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-items-start univer-gap-2 univer-text-sm`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:(u==null?void 0:u.options.allowMultipleFilters)===!0,disabled:E,onChange:e=>D(!!e)}),/* @__PURE__ */ (0,f.jsx)(`span`,{children:h.t(`sheets-pivot-ui.config.allowMultipleFilters`)})]})]})}let Yr=[{label:`sheets-pivot-ui.config.pageDownThenOver`,value:`false`},{label:`sheets-pivot-ui.config.pageOverThenDown`,value:`true`}],Xr=[{label:`sheets-pivot-ui.config.layoutTabular`,value:String(t.PivotLayoutTypeEnum.tabular)},{label:`sheets-pivot-ui.config.layoutCompact`,value:String(t.PivotLayoutTypeEnum.compact)},{label:`sheets-pivot-ui.config.layoutOutline`,value:String(t.PivotLayoutTypeEnum.outline)}],Zr=[{label:`sheets-pivot-ui.config.rowSubtotalTop`,value:String(t.PivotSubtotalPositionEnum.top)},{label:`sheets-pivot-ui.config.rowSubtotalBottom`,value:String(t.PivotSubtotalPositionEnum.bottom)}],Qr=[{label:`sheets-pivot-ui.config.dateGroupingLegacy`,value:t.PivotDateGroupingMode.Legacy},{label:`sheets-pivot-ui.config.dateGroupingExcelLike`,value:t.PivotDateGroupingMode.ExcelLike}];function $r(e){let{unitId:i,subUnitId:o,pivotTableId:l}=e,u=(0,a.useDependency)(r.ICommandService),p=(0,a.useDependency)(r.IConfirmService),m=(0,a.useDependency)(r.ILogService),h=(0,a.useDependency)(r.LocaleService),g=(0,a.useDependency)(n.SheetsPivotTableConfigModel),_=(0,d.useMemo)(()=>g.watchPivotTableChanges(i,o,l).pipe((0,s.debounceTime)(0)),[g,i,o,l]);(0,a.useObservable)(_);let[v,y]=(0,d.useState)(!1),b=(0,d.useRef)(!1),x=g.getPivotTableConfig(i,o,l),S=(0,t.getPivotDateGroupingMode)(x==null?void 0:x.fieldsConfig.options),[C,w]=(0,d.useState)(()=>{var e,n;let r=g.getPivotTableConfig(i,o,l),a=(r==null||(e=r.fieldsConfig)==null?void 0:e.options)??{};return{showRowSubtotal:a.showRowSubtotal??!0,showRowGrandTotal:a.showRowGrandTotal??!0,showColSubtotal:a.showColSubtotal??!0,showColGrandTotal:a.showColGrandTotal??!0,pageWrap:a.pageWrap??1,pageOverThenDown:a.pageOverThenDown??!1,repeatRowLabels:a.repeatRowLabels??!1,repeatColLabels:a.repeatColLabels??!1,layout:(r==null||(n=r.fieldsConfig)==null?void 0:n.layout)??t.PivotLayoutTypeEnum.tabular,rowSubtotalPosition:a.rowSubtotalPosition??t.PivotSubtotalPositionEnum.top}}),T=e=>{let t={unitId:i,subUnitId:o,pivotTableId:l,options:e};u.executeCommand(n.SetPivotOptionCommand.id,t).catch(e=>m.error(`[PivotConfigPanel]`,e)),w(t=>({...t,...e}))},E=e=>{let t={unitId:i,subUnitId:o,pivotTableId:l,layout:e};u.executeCommand(n.SetPivotLayoutCommand.id,t).catch(e=>m.error(`[PivotConfigPanel]`,e)),w(t=>({...t,layout:e}))},D=async e=>{if(!(b.current||e===S)){b.current=!0,y(!0);try{let r=g.getPivotTableConfig(i,o,l),a=g.getCollection(i,l);if(!r||!a||(Object.values(a.fields).some(t.isDateGroupFieldJSON)||a.customFields.some(t.isDateGroupFieldJSON))&&!await p.confirm({id:`sheet-pivot.confirm.change-date-grouping-mode`,title:{title:h.t(`sheets-pivot-ui.config.dateGroupingSwitchTitle`)},children:{title:h.t(`sheets-pivot-ui.config.dateGroupingSwitchMessage`)},cancelText:h.t(`sheets-pivot-ui.dialog.cancel`),confirmText:h.t(`sheets-pivot-ui.dialog.ok`)})||g.getPivotTableConfig(i,o,l)!==r||g.getCollection(i,l)!==a||(0,t.getPivotDateGroupingMode)(r.fieldsConfig.options)===e)return;await u.executeCommand(n.SetPivotOptionCommand.id,{unitId:i,subUnitId:o,pivotTableId:l,options:{dateGroupingMode:e}})}catch(e){m.error(`[PivotConfigPanel]`,e)}finally{b.current=!1,y(!1)}}};return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4 univer-py-4`,children:[/* @__PURE__ */ (0,f.jsx)(Jr,{scope:{unitId:i,subUnitId:o,pivotTableId:l},report:x==null?void 0:x.fieldsConfig,getCurrentReport:()=>{var e;return(e=g.getPivotTableConfig(i,o,l))==null?void 0:e.fieldsConfig},onChange:e=>u.executeCommand(n.SetPivotOptionCommand.id,{unitId:i,subUnitId:o,pivotTableId:l,options:{allowMultipleFilters:e}})}),/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.displaySection`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.dateGroupingMode`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-36`,value:S,options:Qr.map(e=>({...e,label:h.t(e.label)})),disabled:v,onChange:e=>D(e)})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.layout`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-36`,value:String(C.layout),options:Xr.map(e=>({...e,label:h.t(e.label)})),onChange:e=>E(Number(e))})]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-text-sm univer-text-gray-600`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.repeatRowLabels,disabled:C.layout===t.PivotLayoutTypeEnum.compact,onChange:e=>T({repeatRowLabels:!!e})}),h.t(`sheets-pivot-ui.config.repeatRowLabels`)]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-text-sm univer-text-gray-600`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.repeatColLabels,onChange:e=>T({repeatColLabels:!!e})}),h.t(`sheets-pivot-ui.config.repeatColLabels`)]})]})]}),/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-mb-2 univer-text-sm univer-font-medium univer-text-gray-600`),children:h.t(`sheets-pivot-ui.config.totalsSection`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-text-sm univer-text-gray-600`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showRowSubtotal,onChange:e=>T({showRowSubtotal:!!e})}),h.t(`sheets-pivot-ui.config.showRowSubtotal`)]}),C.layout===t.PivotLayoutTypeEnum.outline&&/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.rowSubtotalPosition`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-36`,value:String(C.rowSubtotalPosition),options:Zr.map(e=>({...e,label:h.t(e.label)})),onChange:e=>T({rowSubtotalPosition:Number(e)})})]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-text-sm univer-text-gray-600`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showRowGrandTotal,onChange:e=>T({showRowGrandTotal:!!e})}),h.t(`sheets-pivot-ui.config.showRowGrandTotal`)]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-text-sm univer-text-gray-600`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showColSubtotal,onChange:e=>T({showColSubtotal:!!e})}),h.t(`sheets-pivot-ui.config.showColSubtotal`)]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-gap-2 univer-text-sm univer-text-gray-600`,children:[/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{checked:C.showColGrandTotal,onChange:e=>T({showColGrandTotal:!!e})}),h.t(`sheets-pivot-ui.config.showColGrandTotal`)]})]})]}),/* @__PURE__ */ (0,f.jsxs)(`section`,{children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.pageSection`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.pageWrap`)}),/* @__PURE__ */ (0,f.jsx)(c.InputNumber,{className:`univer-w-24`,value:C.pageWrap,min:1,max:20,onChange:e=>{let t=Number(e);Number.isFinite(t)&&t>=1&&T({pageWrap:t})}})]}),/* @__PURE__ */ (0,f.jsx)(`p`,{className:`univer-text-xs univer-text-gray-600`,children:h.t(C.pageOverThenDown?`sheets-pivot-ui.config.pageWrapOverThenDownHelp`:`sheets-pivot-ui.config.pageWrapDownThenOverHelp`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-text-gray-600`,children:h.t(`sheets-pivot-ui.config.pageDirection`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-36`,value:String(C.pageOverThenDown),options:Yr.map(e=>({...e,label:h.t(e.label)})),onChange:e=>T({pageOverThenDown:e===`true`})})]})]})]})]})}let Q=class extends r.Disposable{constructor(e,t,n,r,i,a,o,c){super(),this._sheetsSelectionsService=e,this._univerInstanceService=t,this._sheetsPivotTableAdaptorModel=n,this._commandService=r,this._sidebarService=i,this._dialogService=a,this._injector=o,this._permissionService=c,W(this,`_pivotTableId`,void 0),W(this,`_pivotTablePanelVisible$`,new s.Subject),W(this,`pivotTablePanelVisible$`,this._pivotTablePanelVisible$.asObservable()),W(this,`_isRangeSelectorFocus`,!1),W(this,`_isRangeSelector2Focus`,!1),this._initPanelOpen(),this._initSheetChange()}setIsRangeSelectorFocus(e){this._isRangeSelectorFocus=e}setIsRangeSelector2Focus(e){this._isRangeSelector2Focus=e}_setPivotTableId(e){this._pivotTableId=e}_closePivotPanel(){this._isRangeSelectorFocus||this._isRangeSelector2Focus||(this._setPivotTableId(void 0),this._sidebarService.close(v))}_initPanelOpen(){let e=this._univerInstanceService.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_SHEET);if(e){let t=e.activeSheet$;this.disposeWithMe((0,s.merge)(t,this._sheetsSelectionsService.selectionMoveEnd$).subscribe(()=>{let e=this._sheetsSelectionsService.getCurrentSelections();if(!e)return;let t=e[e.length-1];if(!t)return;let a=t.primary;if(!a)return;let o=this._univerInstanceService.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_SHEET),s=o==null?void 0:o.getActiveSheet();if(!o||!s)return;let c=o.getUnitId(),l=s.getSheetId(),u=this._sheetsPivotTableAdaptorModel.getPivotTableIdByCell(c,l,a.startRow,a.startColumn);if(u){var d,f;let e=(d=this._sheetsPivotTableAdaptorModel.getPivotItemRenderInfoCache(c,l,u))==null?void 0:d.rangesInfo,t=(0,n.unionPivotViewRange)(e),r=(0,i.checkRangesEditablePermission)(this._injector,c,l,t),a=(f=this._permissionService.getPermissionPoint(new i.WorksheetPivotTablePermission(c,l).id))==null?void 0:f.value;if(!r||!a)return;this._setPivotTableId(u),this._pivotTablePanelVisible$.next(!0),this._commandService.executeCommand(it.id,{pivotTableId:u})}else this._closePivotPanel()})),this.disposeWithMe(this._commandService.onCommandExecuted(e=>{e.id===n.RemovePivotTableMutation.id&&e.params.pivotTableId===this._pivotTableId&&this._sidebarService.close(v)}))}}_initSheetChange(){let e=this._univerInstanceService.getCurrentUnitOfType(r.UniverInstanceType.UNIVER_SHEET);e&&this.disposeWithMe(e.sheetDisposed$.subscribe(()=>{this._sidebarService.close()})),this.disposeWithMe(this._sidebarService.sidebarOptions$.subscribe(e=>{if(e.id===`UNIVER_SHEET_PIVOT_PANEL_ID`){let t=!!e.visible;this._pivotTablePanelVisible$.next(t),t||this._dialogService.close(S)}})),this.disposeWithMe(this._dialogService.getDialogs$().subscribe(e=>{let t=e.find(e=>e.id===A);t&&t.open===!1&&this._dialogService.close(A)}))}};Q=K([G(0,(0,r.Inject)(i.SheetsSelectionsService)),G(1,(0,r.Inject)(r.IUniverInstanceService)),G(2,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(3,(0,r.Inject)(r.ICommandService)),G(4,(0,r.Inject)(a.ISidebarService)),G(5,(0,r.Inject)(a.IDialogService)),G(6,(0,r.Inject)(r.Injector)),G(7,(0,r.Inject)(r.IPermissionService))],Q);let ei=(0,d.createContext)(null),ti=(0,d.createContext)(null);function ni(e,t){return e===t?!0:!e||!t?!1:e.droppableId===t.droppableId&&e.index===t.index}function ri(e){if(!(e instanceof Element))return null;let t=e.closest(`[data-univer-dnd-droppable-id]`);return t instanceof HTMLElement?t:null}function ii(e,t,n,r){let i=Array.from(e.querySelectorAll(`[data-univer-dnd-item="true"]`)).filter(e=>{let t=e.dataset.univerDndId;return t?t!==n.draggableId||n.source.droppableId!==r:!1});if(!i.length)return 0;for(let e=0;e<i.length-1;e++){let n=i[e].getBoundingClientRect();if(t<n.top+n.height/2)return e}let a=i.length-1,o=i[a].getBoundingClientRect();return t<o.top+o.height*.35?a:i.length}function ai(){let e=(0,d.useContext)(ei);if(!e)throw Error(`Draggable/Droppable must be used inside DragDropContext`);return e}function oi(e){let{children:t,onDragEnd:n,onDragStart:r,onDragUpdate:i}=e,[a,o]=(0,d.useState)(null),s=(0,d.useRef)(null),c=(0,d.useCallback)((e,t)=>{let n={draggableId:e,source:t,destination:null};s.current=n,o(n),r==null||r({draggableId:e,source:t}),i==null||i({draggableId:e,source:t,destination:null})},[r,i]),l=(0,d.useCallback)(e=>{let t=s.current;if(!t||ni(t.destination,e))return;let n={...t,destination:e};s.current=n,o(n),i==null||i({draggableId:n.draggableId,source:n.source,destination:n.destination})},[i]),u=(0,d.useCallback)(async(e,t)=>{let r=s.current;r&&(s.current=null,o(null),await(n==null?void 0:n({draggableId:r.draggableId,source:r.source,destination:t===void 0?r.destination:t,reason:e})))},[n]);(0,d.useEffect)(()=>{if(!a)return;let e=e=>{let t=ri(e.target);t&&t.dataset.univerDndDropDisabled!==`true`||l(null)};return window.addEventListener(`dragover`,e,!0),()=>{window.removeEventListener(`dragover`,e,!0)}},[a,l]);let p=(0,d.useMemo)(()=>({activeDrag:a,startDrag:c,updateDestination:l,endDrag:u}),[a,c,l,u]);return/* @__PURE__ */ (0,f.jsx)(ei.Provider,{value:p,children:t})}function si(e){var t;let{children:n,droppableId:r,isDropDisabled:i=!1}=e,{activeDrag:a,updateDestination:o,endDrag:s}=ai(),c=(0,d.useRef)(null),l={innerRef:(0,d.useCallback)(e=>{c.current=e},[]),droppableProps:{onDragOver:(0,d.useCallback)(e=>{if(!a||i||!c.current)return;e.preventDefault();let t=ii(c.current,e.clientY,a,r);o({droppableId:r,index:t})},[a,i,r,o]),onDrop:(0,d.useCallback)(e=>{var t;if(!a||i||!c.current)return;e.preventDefault();let n=(((t=a.destination)==null?void 0:t.droppableId)===r?a.destination:null)??{droppableId:r,index:ii(c.current,e.clientY,a,r)};return s(`DROP`,n)},[a,s,i,r]),"data-univer-dnd-droppable-id":r,"data-univer-dnd-drop-disabled":String(i)},placeholder:null},u={isDraggingOver:!!(a&&((t=a.destination)==null?void 0:t.droppableId)===r)};return/* @__PURE__ */ (0,f.jsx)(ti.Provider,{value:r,children:n(l,u)})}function ci(e){var t;let{children:n,draggableId:r,index:i,isDragDisabled:a=!1}=e,{activeDrag:o,startDrag:s,updateDestination:c,endDrag:l}=ai(),u=(0,d.useContext)(ti),f=(0,d.useRef)(null),p=(0,d.useRef)(null),m=(0,d.useRef)(!1),h=(0,d.useRef)(null),g=(0,d.useRef)(null),_=(0,d.useRef)(!1),v=(0,d.useRef)(null),y=(0,d.useRef)(null),b=(0,d.useRef)(null),x=(0,d.useCallback)(e=>{f.current=e},[]),S=(o==null?void 0:o.draggableId)===r,C=(0,d.useCallback)(()=>{g.current&&=(window.clearTimeout(g.current),null)},[]),w=(0,d.useCallback)(()=>{C(),b.current=null,h.current&&=(h.current(),null),v.current&&=(v.current.remove(),null),y.current=null,m.current=!1},[C]);(0,d.useEffect)(()=>w,[w]);let T=(0,d.useCallback)((e,t)=>{if(v.current)return;let n=f.current;if(!n)return;let r=n.getBoundingClientRect(),i=e>0?Math.max(0,e-r.left):12,a=t>0?Math.max(0,t-r.top):12,o=n.cloneNode(!0);if(!(o instanceof HTMLDivElement))return;let s=o;s.style.position=`fixed`,s.style.left=`0px`,s.style.top=`0px`,s.style.width=`${r.width}px`,s.style.height=`${r.height}px`,s.style.pointerEvents=`none`,s.style.opacity=`0.9`,s.style.zIndex=`2147483647`,s.style.boxSizing=`border-box`,s.style.transform=`translate(${Math.max(0,e-i)}px, ${Math.max(0,t-a)}px)`,document.body.appendChild(s),v.current=s,y.current={x:i,y:a}},[]),E=(0,d.useCallback)((e,t)=>{let n=v.current,r=y.current;n&&r&&(n.style.transform=`translate(${Math.max(0,e-r.x)}px, ${Math.max(0,t-r.y)}px)`)},[]),D=(0,d.useCallback)((e,t)=>{let n=ri(document.elementFromPoint(e,t));if(!n||n.dataset.univerDndDropDisabled===`true`)return null;let a=n.dataset.univerDndDroppableId;return a?{droppableId:a,index:ii(n,t,{draggableId:r,source:{droppableId:u??``,index:i},destination:null},a)}:null},[r,u,i]),O=(0,d.useCallback)((e,t,n,o)=>{if(m.current||_.current||a||!u)return;m.current=!0,C(),_.current=!1;try{var l;(l=f.current)==null||l.setPointerCapture(t)}catch{}T(n,o),s(r,{droppableId:u,index:i});let d=D(n,o);c(d);try{e.preventDefault()}catch{}},[C,r,u,i,a,T,D,s,c]),k=(0,d.useCallback)(e=>{if(a||!u||e.pointerType===`mouse`&&e.button!==0)return;_.current=!1;let t=e.pointerId;b.current={pointerId:t,pointerType:e.pointerType,startX:e.clientX,startY:e.clientY},C(),e.pointerType!==`mouse`&&(g.current=window.setTimeout(()=>{let n=b.current;n&&n.pointerId===t&&O(e.nativeEvent,n.pointerId,n.startX,n.startY)},150));let n=e=>{let t=b.current;if(!t||e.pointerId!==t.pointerId)return;if(!m.current){if(_.current){w();return}if(t.pointerType===`mouse`){let n=e.clientX-t.startX,r=e.clientY-t.startY;n*n+r*r>=16&&O(e,t.pointerId,e.clientX,e.clientY)}return}E(e.clientX,e.clientY);let n=D(e.clientX,e.clientY);c(n);try{e.preventDefault()}catch{}},r=e=>{let t=b.current;if(!t||e.pointerId!==t.pointerId)return;let n=m.current?D(e.clientX,e.clientY):null,r=m.current?l(n?`DROP`:`CANCEL`,n):Promise.resolve();return w(),r};window.addEventListener(`pointermove`,n,{capture:!0,passive:!1}),window.addEventListener(`pointerup`,r,{capture:!0}),window.addEventListener(`pointercancel`,r,{capture:!0}),h.current=()=>{window.removeEventListener(`pointermove`,n,!0),window.removeEventListener(`pointerup`,r,!0),window.removeEventListener(`pointercancel`,r,!0)}},[w,C,u,l,a,D,O,c,E]),A=(0,d.useCallback)(e=>{let t=e.dataTransfer;if(!t||typeof t.setDragImage!=`function`)return;let n=e.currentTarget,r=n.cloneNode(!0);if(!(r instanceof HTMLDivElement))return;let i=r;i.style.position=`fixed`,i.style.left=`-9999px`,i.style.top=`-9999px`,i.style.width=`${n.getBoundingClientRect().width}px`,i.style.pointerEvents=`none`,i.style.opacity=`0.95`,i.style.zIndex=`2147483647`,document.body.appendChild(i);let a=n.getBoundingClientRect(),o=e.clientX>0?Math.max(0,e.clientX-a.left):12,s=e.clientY>0?Math.max(0,e.clientY-a.top):12;t.setDragImage(i,o,s),p.current&&p.current!==i&&p.current.remove(),p.current=i},[]),j=(0,d.useCallback)(e=>{if(m.current||a||!u){e.preventDefault();return}_.current=!0,C(),b.current=null,h.current&&=(h.current(),null);let t=e.dataTransfer;if(t){try{t.effectAllowed=`move`}catch{}try{t.setData(`text/plain`,r)}catch{}}try{A(e)}catch{}s(r,{droppableId:u,index:i})},[A,C,r,u,i,a,s]),M=(0,d.useCallback)(()=>(p.current&&=(p.current.remove(),null),l(`CANCEL`,null)),[l]);return n({innerRef:x,draggableProps:{draggable:!a,onDragStart:j,onDragEnd:M,style:S?{opacity:1}:void 0,"data-univer-dnd-item":`true`,"data-univer-dnd-id":r,"data-univer-dnd-index":String(i)},dragHandleProps:{onPointerDown:k}},{isDragging:S,draggingOver:o==null||(t=o.destination)==null?void 0:t.droppableId})}function li(e,t){switch(e){case`filter`:return t.t(`sheets-pivot-ui.filter`);case`row`:return t.t(`sheets-pivot-ui.row`);case`column`:return t.t(`sheets-pivot-ui.column`);case`value`:return t.t(`sheets-pivot-ui.value`)}}function ui(e){switch(e){case`filter`:return/* @__PURE__ */ (0,f.jsx)(kt,{className:`univer-flex univer-flex-row univer-gap-4`});case`row`:return/* @__PURE__ */ (0,f.jsx)(Tt,{className:`univer-flex univer-flex-row univer-gap-4`});case`column`:return/* @__PURE__ */ (0,f.jsx)(Ut,{className:`univer-flex univer-flex-row univer-gap-4`});case`value`:return/* @__PURE__ */ (0,f.jsx)(jt,{className:`univer-flex univer-flex-row univer-gap-4`})}}function di(e){switch(e){case`filter`:return/* @__PURE__ */ (0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,viewBox:`0 0 32 32`,fill:`none`,children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M4.99957 1.875C2.84556 1.875 1.67491 4.3932 3.06336 6.04001L11.5946 16.1587V26.4187C11.5946 27.4582 12.2298 28.3922 13.1966 28.7741L16.1601 29.9449C17.8221 30.6015 19.6232 29.3766 19.6232 27.5895V16.1587L28.1544 6.04C29.5428 4.3932 28.3722 1.875 26.2182 1.875H4.99957Z`,fill:`#ECECEC`}),/* @__PURE__ */ (0,f.jsx)(`rect`,{x:`21.9404`,y:`17.8544`,width:`7.59766`,height:`2.2793`,rx:`1.13965`,fill:`#274FEE`}),/* @__PURE__ */ (0,f.jsx)(`rect`,{x:`21.9404`,y:`21.9067`,width:`7.59766`,height:`2.2793`,rx:`1.13965`,fill:`#274FEE`}),/* @__PURE__ */ (0,f.jsx)(`rect`,{x:`21.9404`,y:`25.959`,width:`7.59766`,height:`2.2793`,rx:`1.13965`,fill:`#274FEE`})]});case`row`:return/* @__PURE__ */ (0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,viewBox:`0 0 32 32`,fill:`none`,children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 12.3661C2 12.0347 2.26863 11.7661 2.6 11.7661H9.24705C9.57842 11.7661 9.84705 12.0347 9.84705 12.3661V29.278C9.84705 29.6093 9.57842 29.878 9.24705 29.878H4C2.89543 29.878 2 28.9825 2 27.878V12.3661Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 4.0863C2 2.98173 2.89543 2.0863 4 2.0863H9.24705C9.57842 2.0863 9.84705 2.35493 9.84705 2.6863V8.73981C9.84705 9.07118 9.57842 9.33981 9.24705 9.33981H2.6C2.26863 9.33981 2 9.07118 2 8.73981V4.0863Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M12.2983 12.4011C12.2982 12.0697 12.5669 11.8009 12.8983 11.8009L29.3931 11.8009C29.7243 11.8009 29.9929 12.0694 29.9931 12.4007L29.9993 27.9129C29.9997 29.0178 29.1042 29.9137 27.9993 29.9137H12.9051C12.5738 29.9137 12.3053 29.6452 12.3051 29.314L12.2983 12.4011Z`,fill:`#ECECEC`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M12.2517 2.6863C12.2517 2.35493 12.5203 2.0863 12.8517 2.0863H27.9582C29.0628 2.0863 29.9582 2.98173 29.9582 4.0863V8.73627C29.9582 9.06764 29.6896 9.33627 29.3582 9.33627H12.8517C12.5203 9.33627 12.2517 9.06764 12.2517 8.73627L12.2517 2.6863Z`,fill:`#274FEE`})]});case`column`:return/* @__PURE__ */ (0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,viewBox:`0 0 32 32`,fill:`none`,children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 12.3661C2 12.0347 2.26863 11.7661 2.6 11.7661H9.24705C9.57842 11.7661 9.84705 12.0347 9.84705 12.3661V29.278C9.84705 29.6093 9.57842 29.878 9.24705 29.878H4C2.89543 29.878 2 28.9825 2 27.878V12.3661Z`,fill:`#274FEE`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 4.0863C2 2.98173 2.89543 2.0863 4 2.0863H9.24705C9.57842 2.0863 9.84705 2.35493 9.84705 2.6863V8.73981C9.84705 9.07118 9.57842 9.33981 9.24705 9.33981H2.6C2.26863 9.33981 2 9.07118 2 8.73981V4.0863Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M12.2637 2.6863C12.2637 2.35493 12.5323 2.0863 12.8637 2.0863H27.9702C29.0748 2.0863 29.9702 2.98173 29.9702 4.0863V8.73627C29.9702 9.06764 29.7016 9.33627 29.3702 9.33627H12.8637C12.5323 9.33627 12.2637 9.06764 12.2637 8.73627L12.2637 2.6863Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M12.2982 12.4011C12.2981 12.0697 12.5667 11.8009 12.8982 11.8009L29.3929 11.8009C29.7242 11.8009 29.9928 12.0694 29.9929 12.4007L29.9992 27.9129C29.9996 29.0178 29.104 29.9137 27.9992 29.9137H12.905C12.5737 29.9137 12.3051 29.6452 12.305 29.314L12.2982 12.4011Z`,fill:`#ECECEC`})]});case`value`:return/* @__PURE__ */ (0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,viewBox:`0 0 32 32`,fill:`none`,children:[/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 12.3661C2 12.0347 2.26863 11.7661 2.6 11.7661H9.24705C9.57842 11.7661 9.84705 12.0347 9.84705 12.3661V29.278C9.84705 29.6093 9.57842 29.878 9.24705 29.878H4C2.89543 29.878 2 28.9825 2 27.878V12.3661Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M2 4.0863C2 2.98173 2.89543 2.0863 4 2.0863H9.24705C9.57842 2.0863 9.84705 2.35493 9.84705 2.6863V8.73981C9.84705 9.07118 9.57842 9.33981 9.24705 9.33981H2.6C2.26863 9.33981 2 9.07118 2 8.73981V4.0863Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M12.2637 2.6863C12.2637 2.35493 12.5323 2.0863 12.8637 2.0863H27.9702C29.0748 2.0863 29.9702 2.98173 29.9702 4.0863V8.73627C29.9702 9.06764 29.7016 9.33627 29.3702 9.33627H12.8637C12.5323 9.33627 12.2637 9.06764 12.2637 8.73627L12.2637 2.6863Z`,fill:`#D8D8D8`}),/* @__PURE__ */ (0,f.jsx)(`path`,{d:`M12.2982 12.4011C12.2981 12.0697 12.5667 11.8009 12.8982 11.8009L29.3929 11.8009C29.7242 11.8009 29.9928 12.0694 29.9929 12.4007L29.9992 27.9129C29.9996 29.0178 29.104 29.9137 27.9992 29.9137H12.905C12.5737 29.9137 12.3051 29.6452 12.305 29.314L12.2982 12.4011Z`,fill:`#274FEE`})]})}}function fi(e,t){switch(e){case`filter`:return t.t(`sheets-pivot-ui.filterDesc`);case`row`:return t.t(`sheets-pivot-ui.rowDesc`);case`column`:return t.t(`sheets-pivot-ui.columnDesc`);case`value`:return t.t(`sheets-pivot-ui.valueDesc`)}}function pi(e){let t=(0,a.useDependency)(r.LocaleService),{areaType:n}=e,i=fi(n,t),o=di(n);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-h-[140px] univer-flex-col univer-items-center univer-justify-center univer-gap-1 univer-self-stretch univer-px-2`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-size-8`,children:o}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-center univer-text-xs univer-leading-4 univer-text-gray-600 dark:!univer-text-gray-200`,children:i})]})}function mi(e){let{areaType:t,items:n,positionInfo:i,pivotTableId:o,pivotTableInfo:s}=e,l=(0,a.useDependency)(r.LocaleService);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-min-h-[200px] univer-flex-1 univer-p-1`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-2 univer-mt-0 univer-flex univer-w-full univer-text-sm univer-leading-4 univer-text-gray-900`,children:[ui(t),/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-inline-block univer-align-top`,children:li(t,l)})]}),/* @__PURE__ */ (0,f.jsx)(si,{droppableId:`${t}`,isCombineEnabled:!1,isDropDisabled:!1,ignoreContainerClipping:!1,direction:`vertical`,children:(e,r)=>/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-box-border univer-h-[161px] univer-w-full univer-flex-col univer-items-center univer-justify-center univer-overflow-x-hidden univer-rounded-lg univer-bg-gray-50 univer-py-2 dark:!univer-bg-gray-900`,c.borderClassName,{"univer-border-primary-600":r.isDraggingOver}),children:/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-h-full univer-overflow-y-auto`,c.scrollbarClassName),children:/* @__PURE__ */ (0,f.jsxs)(`div`,{ref:e.innerRef,className:`univer-box-border univer-h-full univer-px-2`,...e.droppableProps,children:[n.length>0&&n.map((e,n)=>/* @__PURE__ */ (0,f.jsx)(`div`,{children:/* @__PURE__ */ (0,f.jsx)(ci,{isDragDisabled:!1,draggableId:e.tableFieldId,index:n,children:(n,r)=>/* @__PURE__ */ (0,f.jsx)(f.Fragment,{children:/* @__PURE__ */ (0,f.jsx)(`div`,{ref:n.innerRef,...n.draggableProps,...n.dragHandleProps,style:n.draggableProps.style,className:(0,c.clsx)(`univer-flex univer-items-center univer-gap-1 univer-self-stretch univer-border univer-border-transparent univer-p-0.5 univer-leading-4 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700`,r.draggingOver&&`univer-border-primary-600`),children:/* @__PURE__ */ (0,f.jsx)(hi,{pivotTableId:o,positionInfo:i,item:e,areaType:t,pivotTableInfo:s})})})},e.tableFieldId)},e.tableFieldId)),n.length===0&&/* @__PURE__ */ (0,f.jsx)(pi,{areaType:t})]})})})})]})}function hi(e){let{areaType:n,item:i,positionInfo:o,pivotTableId:s,pivotTableInfo:l}=e,{unitId:u,subUnitId:d}=o,p=i.tableFieldId===Qt,m=(0,a.useDependency)(r.ICommandService),h=(0,a.useDependency)(r.LocaleService),g=()=>{if(p){let e=(l.valueFields||[]).map(e=>e.tableFieldId);ln({pivotTableId:s,unitId:u,subUnitId:d,commandService:m},e)}else ln({pivotTableId:s,unitId:u,subUnitId:d,commandService:m},[i.tableFieldId])},_=()=>{u&&d&&fn(m,u,d,s,i.tableFieldId)},v=()=>{u&&d&&pn(m,s,i.tableFieldId,u,d,l)},y=e=>{let n=e===`column`?t.PivotTableValuePositionEnum.Row:t.PivotTableValuePositionEnum.Column,r=e===`column`?l.rowFields.length:l.columnFields.length;un({pivotTableId:s,unitId:u,subUnitId:d,commandService:m},n,r)},b=/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-inline-flex univer-flex-col univer-rounded-lg univer-border univer-border-gray-200 univer-bg-gray-0 univer-p-2 univer-shadow-lg`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 dark:!univer-text-gray-0`,onClick:()=>{g()},children:h.t(`sheets-pivot-ui.removeField`)}),n!==`value`&&!p&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 dark:!univer-text-gray-0`,onClick:()=>{_()},children:h.t(`sheets-pivot-ui.filterField`)}),p&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 dark:!univer-text-gray-0`,onClick:()=>{y(n)},children:n===`column`?h.t(`sheets-pivot-ui.moveToRow`):h.t(`sheets-pivot-ui.moveToColumn`)}),n===`value`&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 dark:!univer-text-gray-0`,onClick:()=>{v()},children:h.t(`sheets-pivot-ui.fieldSettings`)})]}),x=p?h.t(`sheets-pivot-ui.multipleValue`):i.displayName,S=/* @__PURE__ */ (0,f.jsx)(`bdi`,{dir:`auto`,children:x});return/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[/* @__PURE__ */ (0,f.jsx)(Nt,{}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-max-w-[66px] univer-flex-1 univer-shrink-0 univer-truncate univer-text-xs univer-leading-4 univer-text-gray-800 dark:!univer-text-gray-100`,children:/* @__PURE__ */ (0,f.jsx)(c.Tooltip,{title:S,children:S})}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-cursor-pointer`,children:/* @__PURE__ */ (0,f.jsx)(c.Dropdown,{align:`end`,overlay:b,children:/* @__PURE__ */ (0,f.jsx)(`span`,{children:/* @__PURE__ */ (0,f.jsx)(Lt,{})})})})]})}function gi(e){var t;let n=(0,a.useDependency)(r.IUniverInstanceService),i=(0,a.useDependency)(r.LocaleService),o=(0,a.useDependency)(r.ICommandService),s=(0,a.useDependency)(Q),{sourceRangeInfo:c,refreshHandler:l,pivotTableId:u,positionInfo:h}=e,{unitId:g,range:_,subUnitId:v}=c,y=n.getUnit(g),b=(y==null||(t=y.getSheetBySheetId(v))==null?void 0:t.getName())??``,[x,S]=(0,d.useState)(void 0),C=(0,d.useRef)(x);C.current=x;let[w,T]=(0,d.useState)(_),[E,D]=(0,d.useState)(b),[O,k]=(0,d.useState)(!1);(0,d.useEffect)(()=>{s.setIsRangeSelectorFocus(O)},[O,s]),(0,d.useEffect)(()=>{T(c.range),D(b)},[c,b]);let A=(0,d.useMemo)(()=>(0,r.debounce)(async e=>{let t=e.split(`,`).filter(e=>!!e).map(p.deserializeRangeWithSheet);if(!t[0])return;let n=t[0];if(!y||C.current)return;let r=n.sheetName||c.sheetName;T(n.range),D(r);let i={unitId:g,subUnitId:y.getSheetBySheetName(r).getSheetId(),range:{...n.range},sheetName:r};await on(o,u,i,h.unitId,h.subUnitId),l()},300,{leading:!1,maxWait:1e3,trailing:!0}),[]);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-4`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-2 univer-flex univer-h-5 univer-justify-between univer-text-sm univer-leading-5`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-justify univer-text-gray-900 dark:!univer-text-gray-0`,children:i.t(`sheets-pivot-ui.sourceRangeLabel`)}),/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-xs univer-text-gray-600 dark:!univer-text-gray-200`,children:i.t(`sheets-pivot-ui.sourceRangePlaceholder`)})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-relative`,children:[/* @__PURE__ */ (0,f.jsx)(m.RangeSelector,{unitId:g,subUnitId:v,initialValue:(0,p.serializeRangeWithSheet)(E,w),onChange:(e,t)=>{(0,p.serializeRangeWithSheet)(E,w)!==t&&A(t)},keepSheetReference:!0,supportAcrossSheet:!0,onVerify:(e,t)=>{let n=t.split(`,`).filter(e=>!!e);if(!n[0]){S(i.t(`sheets-pivot-ui.msg.emptySourceRange`));return}if(!e){S(i.t(`sheets-pivot-ui.msg.invalidSize`));return}let r=(0,p.deserializeRangeWithSheet)(n[0]),a=r.sheetName||c.sheetName;if(y)switch(rn(y.getSheetBySheetName(a),r.range)){case 2:S(void 0);break;case 0:S(i.t(`sheets-pivot-ui.msg.emptySourceRange`));break;case 1:S(i.t(`sheets-pivot-ui.msg.invalidSize`))}},maxRangeCount:1,onFocusChange:e=>{k(e)},onRangeSelectorDialogVisibleChange:e=>{k(!!e)}}),x?/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-my-1 univer-text-xs univer-text-red-500`,children:x}):null]})]})}function _i(e){let{type:n}=e;switch(n){case t.PivotDataFieldDataTypeEnum.text:return/* @__PURE__ */ (0,f.jsx)(qt,{className:`univer-mx-1.5 univer-my-0 univer-h-4 univer-text-xs univer-text-gray-200 dark:!univer-text-gray-600`});case t.PivotDataFieldDataTypeEnum.number:return/* @__PURE__ */ (0,f.jsx)(zt,{className:`univer-mx-1.5 univer-my-0 univer-h-4 univer-text-xs univer-text-gray-200 dark:!univer-text-gray-600`});case t.PivotDataFieldDataTypeEnum.date:return/* @__PURE__ */ (0,f.jsx)(xt,{className:`univer-mx-1.5 univer-my-0 univer-h-4 univer-text-xs univer-text-gray-200 dark:!univer-text-gray-600`})}}function vi(e){if(!e)return!1;if(e.type===t.PivotFilterTypeEnum.RecordFilter){var n;return e.dateRange!==void 0||(((n=e.selection)==null?void 0:n.mode)??r.FilterSelectionMode.All)!==r.FilterSelectionMode.All}return e.type!==t.PivotFilterTypeEnum.ManualFilter||e.isAll!==!0}function yi(e){let{name:i,dataFieldId:o,checked:s,type:l,refreshHandler:u,pivotTableId:p,draggingId:m,pivotTableInfo:h,unitId:g,subUnitId:_}=e,[v,y]=(0,d.useState)(!1),b=(0,a.useDependency)(r.ICommandService),x=(0,a.useDependency)(r.LocaleService);if(!h)return null;let{rowFields:S,columnFields:C,filterFields:w,valueFields:T}=h,E=h.hiddenFields??[],D=[...S,...C,...w,...T,...E],O=E.find(e=>e.dataFieldId===o),k=async e=>{let r=!!e,i=!1;if(r){let e={pivotTableId:p,dataFieldId:o,fieldArea:l===t.PivotDataFieldDataTypeEnum.number?t.PivotTableFiledAreaEnum.Value:t.PivotTableFiledAreaEnum.Row,unitId:g,subUnitId:_,index:l===t.PivotDataFieldDataTypeEnum.number?T.length:S.length};i=await b.executeCommand(n.AddPivotFieldCommand.id,e)}else{let e=[];D.forEach(t=>{t.dataFieldId===o&&e.push(t.tableFieldId)}),i=await b.executeCommand(n.RemovePivotFieldCommand.id,{pivotTableId:p,fieldIds:e,unitId:g,subUnitId:_})}i&&u()},A=async e=>{let r=!1,i=``;if([...S,...C,...w,...E].forEach(e=>{e.dataFieldId===o&&(r=!0,i=e.tableFieldId)}),r&&e!==t.PivotTableFiledAreaEnum.Value){if(p){let t=Tn(h,e),r={pivotTableId:p,area:e,index:t,fieldId:i,unitId:g,subUnitId:_};await b.executeCommand(n.MovePivotFieldCommand.id,r)&&u()}}else if(p){let t={pivotTableId:p,dataFieldId:o,fieldArea:e,unitId:g,subUnitId:_,index:Tn(h,e)};await b.executeCommand(n.AddPivotFieldCommand.id,t)&&u()}};return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-group univer-relative univer-box-border univer-flex univer-h-8 univer-w-full univer-flex-row univer-items-center univer-rounded-md univer-px-1 univer-py-2 univer-leading-4 univer-transition-all hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700`,{"univer-flex univer-bg-gray-100 dark:!univer-bg-gray-700":m===o}),id:`source-${o}`,onContextMenu:e=>{e.preventDefault(),y(!0)},children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-mr-2 univer-w-4 rtl:univer-ml-2 rtl:univer-mr-0`,children:/* @__PURE__ */ (0,f.jsx)(Nt,{})}),/* @__PURE__ */ (0,f.jsx)(c.Checkbox,{className:`univer-w-[14px] univer-text-sm univer-text-gray-200`,checked:s,onChange:k}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-min-w-0 univer-flex-1 univer-items-center univer-text-xs univer-leading-4 univer-text-gray-900 dark:!univer-text-gray-0`,children:[/* @__PURE__ */ (0,f.jsx)(_i,{type:l}),/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-truncate`,children:i})]}),/* @__PURE__ */ (0,f.jsx)(c.Dropdown,{align:`end`,side:`bottom`,open:v,onOpenChange:y,overlay:/* @__PURE__ */ (0,f.jsxs)(`div`,{children:[vi(O==null?void 0:O.filterInfo)&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 hover:univer-bg-gray-100 dark:!univer-text-gray-0 dark:hover:!univer-bg-gray-700`,onClick:async()=>{O&&(y(!1),await b.executeCommand(n.SetPivotFilterCommand.id,{unitId:g,subUnitId:_,pivotTableId:p,tableFieldId:O.tableFieldId,items:[],partialItems:[],isAll:!0})&&u())},children:x.t(`sheets-pivot-ui.dialog.filter.clearFilter`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 hover:univer-bg-gray-100 dark:!univer-text-gray-0 dark:hover:!univer-bg-gray-700`,onClick:()=>{y(!1),A(t.PivotTableFiledAreaEnum.Row)},children:x.t(`sheets-pivot-ui.addToRow`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 hover:univer-bg-gray-100 dark:!univer-text-gray-0 dark:hover:!univer-bg-gray-700`,onClick:()=>{y(!1),A(t.PivotTableFiledAreaEnum.Column)},children:x.t(`sheets-pivot-ui.addToColumn`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 hover:univer-bg-gray-100 dark:!univer-text-gray-0 dark:hover:!univer-bg-gray-700`,onClick:()=>{y(!1),A(t.PivotTableFiledAreaEnum.Value)},children:x.t(`sheets-pivot-ui.addToValue`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-self-stretch univer-px-2 univer-py-1.5 univer-text-sm univer-leading-5 univer-text-gray-900 hover:univer-bg-gray-100 dark:!univer-text-gray-0 dark:hover:!univer-bg-gray-700`,onClick:()=>{y(!1),A(t.PivotTableFiledAreaEnum.Filter)},children:x.t(`sheets-pivot-ui.addToFilter`)})]}),children:/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-ml-1 univer-flex univer-size-5 univer-cursor-pointer univer-items-center univer-justify-center univer-rounded-md univer-transition-opacity hover:univer-bg-gray-200 rtl:univer-ml-0 rtl:univer-mr-1 dark:hover:!univer-bg-gray-700`,{"univer-opacity-100":v,"univer-opacity-0 group-hover:univer-opacity-100":!v}),onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),children:/* @__PURE__ */ (0,f.jsx)(Ft,{className:`univer-text-gray-400 dark:!univer-text-gray-500`})})})]},o)}function bi(e){let{sourceList:t,refreshHandler:n,pivotTableId:i,pivotTableInfo:o,unitId:s,draggingId:l,subUnitId:u}=e,p=(0,a.useDependency)(r.LocaleService),[m,h]=(0,d.useState)(``),g=m.trim().toLocaleLowerCase(),_=g?t.filter(e=>e.name.toLocaleLowerCase().includes(g)):t;return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-4 univer-flex univer-min-h-0 univer-flex-1 univer-flex-col`,children:[/* @__PURE__ */ (0,f.jsx)(`p`,{className:`univer-mb-1 univer-mt-0 univer-text-sm univer-font-medium univer-leading-5 univer-text-gray-900 dark:!univer-text-gray-0`,children:p.t(`sheets-pivot-ui.sourceFieldTile`)}),/* @__PURE__ */ (0,f.jsx)(`p`,{className:`univer-mb-2 univer-mt-0 univer-text-xs univer-leading-4 univer-text-gray-600 dark:!univer-text-gray-200`,children:p.t(`sheets-pivot-ui.sourceFieldDescription`)}),/* @__PURE__ */ (0,f.jsx)(c.Input,{allowClear:!0,className:`univer-mb-2`,placeholder:p.t(`sheets-pivot-ui.searchFieldPlaceholder`),slot:/* @__PURE__ */ (0,f.jsx)(Gt,{}),value:m,onChange:h}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-box-border univer-min-h-0 univer-flex-1 univer-rounded-lg univer-bg-gray-0 univer-p-2 dark:!univer-bg-gray-900`,c.borderClassName),children:/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-relative univer-h-full univer-overflow-y-auto`,c.scrollbarClassName),"data-testid":`pivot-source-field-viewport`,children:/* @__PURE__ */ (0,f.jsx)(si,{droppableId:`source`,direction:`vertical`,isCombineEnabled:!1,ignoreContainerClipping:!1,isDropDisabled:!0,children:e=>/* @__PURE__ */ (0,f.jsxs)(`div`,{ref:e.innerRef,className:`univer-box-border univer-h-full univer-px-2`,...e.droppableProps,children:[_.map((e,t)=>/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-relative univer-flex univer-h-8 univer-w-full univer-items-center univer-gap-1 univer-self-stretch univer-border univer-border-transparent univer-p-0.5 univer-leading-4 hover:univer-bg-gray-100 dark:hover:!univer-bg-gray-700`,children:/* @__PURE__ */ (0,f.jsx)(ci,{draggableId:e.id,isDragDisabled:!1,index:t,children:({innerRef:t,draggableProps:r,dragHandleProps:a})=>/* @__PURE__ */ (0,f.jsx)(`div`,{ref:t,...r,...a,className:`univer-h-8 univer-w-full`,style:r.style,children:/* @__PURE__ */ (0,f.jsx)(yi,{draggingId:l,unitId:s,subUnitId:u,...e,refreshHandler:n,pivotTableId:i,pivotTableInfo:o})})},e.id)},e.id)),_.length===0&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-py-4 univer-text-center univer-text-xs univer-text-gray-500`,children:p.t(`sheets-pivot-ui.noMatchingFields`)})]})})})})]})}function xi(e){let{pivotTableId:t,version:i,unitId:o,subUnitId:l,panelInfo:u}=e,p=(0,a.useDependency)(n.SheetsPivotTableConfigModel),m=(0,d.useMemo)(()=>p.watchPivotTableChanges(o,l,t).pipe((0,s.debounceTime)(0)),[p,o,l,t]),h=(0,a.useObservable)(m),g=(0,a.useDependency)(n.SheetsPivotRPCService),_=(0,a.useDependency)(Q),v=(0,a.useObservable)(_.pivotTablePanelVisible$,!0),y=(0,a.useDependency)(r.ICommandService),b=(0,a.useDependency)(r.ILogService),[x,S]=(0,d.useState)(u),[C,w]=(0,d.useState)(null),T=(0,d.useCallback)(async()=>{if(!p.getPivotTableConfig(o,l,t))return;let e=await g.getPivotDisplayConfig({unitId:o,subUnitId:l,pivotTableId:t,params:{type:n.PivotDisplayDataType.Panel,panel:{pivotTableId:t}}});e.result.panel&&S(e.result.panel)},[t,g,p,l,o]);(0,d.useEffect)(()=>{T().catch(e=>b.error(`[PivotPanel]`,e))},[b,h,t,T,i]);let E=async e=>{let{source:n,destination:r,draggableId:i}=e;w(null);let a={pivotTableInfo:x,pivotTableId:t,commandService:y,unitId:o,subUnitId:l},s=n.droppableId;if(r&&r.droppableId){let e=r.droppableId;await cn(a,i,s,e,r.index),await T()}r===null&&(await an(a,i,s),await T())},D=e=>{w({draggingId:e.draggableId})},O=e=>{let{draggableId:t,destination:n,source:r}=e;w({draggingId:t,destination:n,source:r})};if(!v||!x)return null;let{sourceList:k,rowFields:A,columnFields:j,filterFields:M,valueFields:N,sourceRange:P,positionInfo:F}=x;return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-mt-4 univer-flex univer-h-[calc(100%-16px)] univer-min-h-0 univer-w-full univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden`,c.scrollbarClassName),children:[/* @__PURE__ */ (0,f.jsx)(gi,{sourceRangeInfo:P,pivotTableId:t,refreshHandler:T,positionInfo:F}),/* @__PURE__ */ (0,f.jsxs)(oi,{onDragEnd:E,onDragStart:D,onDragUpdate:O,children:[/* @__PURE__ */ (0,f.jsx)(bi,{draggingId:(C==null?void 0:C.draggingId)??``,sourceList:k,refreshHandler:T,pivotTableId:t,pivotTableInfo:x,unitId:o,subUnitId:l}),/* @__PURE__ */ (0,f.jsx)(Si,{rowFields:A,columnFields:j,filterFields:M,valueFields:N,refreshHandler:T,positionInfo:F,pivotTableId:t,pivotTableInfo:x})]})]})}function Si(e){let{rowFields:t,columnFields:n,filterFields:r,valueFields:i,refreshHandler:a,pivotTableInfo:o,positionInfo:s,pivotTableId:c}=e;return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-shrink-0`,"data-testid":`pivot-field-areas`,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-row univer-gap-4`,children:[/* @__PURE__ */ (0,f.jsx)(mi,{areaType:`filter`,items:r,positionInfo:s,pivotTableId:c,pivotTableInfo:o,refreshHandler:a}),/* @__PURE__ */ (0,f.jsx)(mi,{areaType:`column`,items:n,positionInfo:s,pivotTableId:c,pivotTableInfo:o,refreshHandler:a})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-row univer-gap-4`,children:[/* @__PURE__ */ (0,f.jsx)(mi,{areaType:`row`,items:t,positionInfo:s,pivotTableId:c,pivotTableInfo:o,refreshHandler:a}),/* @__PURE__ */ (0,f.jsx)(mi,{areaType:`value`,items:i,positionInfo:s,pivotTableId:c,pivotTableInfo:o,refreshHandler:a})]})]})}function Ci(e){let{className:t,unitId:n,subUnitId:i,pivotTableId:o}=e,[s,l]=(0,d.useState)(0),u=(0,a.useDependency)(r.LocaleService),p=u.getDirection();return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:(0,c.clsx)(`univer-flex univer-size-full univer-min-h-0 univer-flex-col`,t),dir:p,children:[/* @__PURE__ */ (0,f.jsx)(c.Segmented,{className:`univer-my-3 univer-w-full univer-shrink-0`,items:[{label:u.t(`sheets-pivot-ui.fieldPanel`),value:0},{label:u.t(`sheets-pivot-ui.configPanel`),value:1}],value:s,onChange:l}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-min-h-0 univer-flex-1`,s===0?`univer-overflow-hidden`:`univer-overflow-auto`),children:s===0?/* @__PURE__ */ (0,f.jsx)(xi,{...e}):/* @__PURE__ */ (0,f.jsx)($r,{unitId:n,subUnitId:i,pivotTableId:o})})]})}function wi(e){let{unitId:t,subUnitId:n,pivotTableId:r,tableFieldId:i,type:a}=e,o=JSON.stringify([t,n,r,i,a]);return/* @__PURE__ */ (0,f.jsx)(Ti,{...e},o)}function Ti({unitId:e,subUnitId:i,pivotTableId:o,tableFieldId:s,type:l,baseItems:u,onConfirm:p,onCancel:m}){var h;let g=(0,a.useDependency)(n.SheetsPivotTableConfigModel),_=(0,a.useDependency)(r.LocaleService),v=(0,a.useObservable)(_.direction$,_.getDirection()),y=de.find(e=>e.type===l),b=g.getPivotTableConfig(e,i,o),x=b==null||(h=b.fieldsConfig.measure[s])==null?void 0:h.showDataAs,S=()=>{var e;if((x==null?void 0:x.type)!==l||!x.baseFieldId)return``;if(x.baseItemType===t.PivotShowAsBaseItemTypeEnum.previous)return`relative:previous`;if(x.baseItemType===t.PivotShowAsBaseItemTypeEnum.next)return`relative:next`;let n=((e=u[x.baseFieldId])==null?void 0:e.items.indexOf(x.baseItem))??-1;return n<0?``:`item:${n}`},[C,w]=(0,d.useState)((x==null?void 0:x.type)===l?x.baseFieldId:``),[T,E]=(0,d.useState)(S),D=(0,d.useRef)(!1),[O,k]=(0,d.useState)(!1),A=g.getPivotTableConfig(e,i,o),j=g.getCollection(e,o),M=A==null?void 0:A.fieldsConfig.measure[s],N=!!(M&&j&&(j.fields[M.dataFieldId]||j.customFields.find(e=>e.id===M.dataFieldId))),P=(A&&j&&y?pe(A,j,y):[]).filter(e=>{let t=u[e];return(y==null?void 0:y.baseItemMode)===`none`||!!(t&&((y==null?void 0:y.baseItemMode)===`item-or-relative`||t.items.length>0))}),F=P.map(e=>({label:A.fieldsConfig.dimension[e].displayName,value:e})),I=A==null?void 0:A.fieldsConfig.dimension[C],L=I&&j&&(j.fields[I.dataFieldId]??j.customFields.find(e=>e.id===I.dataFieldId)),R=u[C],z=(R==null?void 0:R.items.map((e,n)=>{var i;let a=R.itemTypes[n],o=(i=R.itemLabels)==null?void 0:i[e],s=$t(e,a),c=e;return s?c=_.t(s):o===void 0?a===t.PivotDataFieldDataTypeEnum.other?c=_.t(`sheets-pivot-ui.showValuesAs.other`):(a===t.PivotDataFieldDataTypeEnum.date||a===t.PivotDataFieldDataTypeEnum.number)&&R.format&&(c=r.numfmt.format(R.format,Number(e))):c=o,{label:c,value:`item:${n}`,itemKey:e}}))??[];(y==null?void 0:y.baseItemMode)===`item-or-relative`&&z.push({label:_.t(`sheets-pivot-ui.showValuesAs.previous`),value:`relative:previous`,itemKey:``,itemType:t.PivotShowAsBaseItemTypeEnum.previous},{label:_.t(`sheets-pivot-ui.showValuesAs.next`),value:`relative:next`,itemKey:``,itemType:t.PivotShowAsBaseItemTypeEnum.next});let B=z.find(e=>e.value===T),V=!!(y!=null&&y.baseItemMode&&y.baseItemMode!==`none`),ee=!!(y&&A&&j&&N&&A.fieldsConfig.valueFields.includes(s)&&P.includes(C)&&L&&(!V||B));return/* @__PURE__ */ (0,f.jsxs)(`div`,{dir:v,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-4`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:_.t(`sheets-pivot-ui.showValuesAs.baseField`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-full`,value:C,options:F,onChange:e=>{w(e),E(``)}})]}),V&&/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-mb-4`,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-text-sm univer-font-medium`,children:_.t(`sheets-pivot-ui.showValuesAs.baseItem`)}),/* @__PURE__ */ (0,f.jsx)(c.Select,{className:`univer-w-full`,value:T,options:z,disabled:!C,onChange:E})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:m,children:_.t(`sheets-pivot-ui.showValuesAs.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:!ee||O,onClick:async()=>{let t=g.getPivotTableConfig(e,i,o),n=g.getCollection(e,o),r=t==null?void 0:t.fieldsConfig.measure[s];if(!y||!t||!n||!r||D.current||!t.fieldsConfig.valueFields.includes(s)||!(n.fields[r.dataFieldId]||n.customFields.find(e=>e.id===r.dataFieldId))||!pe(t,n,y).includes(C)||V&&!B)return;let a={type:l,baseFieldId:C,baseItem:(B==null?void 0:B.itemKey)??``};(B==null?void 0:B.itemType)!==void 0&&(a.baseItemType=B.itemType),D.current=!0,k(!0);try{await p(a)}catch{}finally{D.current=!1,k(!1)}},children:_.t(`sheets-pivot-ui.showValuesAs.ok`)})]})]})}let Ei=e=>{let[t,n]=(0,d.useState)(!1),r=(0,a.useDependency)(Q);return(0,d.useEffect)(()=>{r.setIsRangeSelector2Focus(t)},[t,r]),/* @__PURE__ */ (0,f.jsx)(m.RangeSelector,{...e,onFocusChange:t=>{var r;(r=e.onFocusChange)==null||r.call(e,t),n(t)}})},Di=(e,t,n,r,i,a)=>/* @__PURE__ */ (0,f.jsx)(Ei,{unitId:e,subUnitId:t,initialValue:r,onChange:(e,t)=>n(t),maxRangeCount:1,supportAcrossSheet:!0,keepSheetReference:!0}),Oi=(e,t)=>{switch(e){case 1:return t.t(`sheets-pivot-ui.msg.invalidSize`);case 0:return t.t(`sheets-pivot-ui.msg.emptySourceRange`);default:return``}};function ki(e){let{unitId:t,sourceRange:i,positionRange:o,sourceSheetName:s,positionSheetName:l,onConfirm:u,onCancel:m}=e,h=(0,a.useDependency)(r.LocaleService),g=(0,a.useDependency)(r.IUniverInstanceService),_=h.getDirection(),v=g.getUnit(t),y=(0,d.useMemo)(()=>v.getActiveSheet().getSheetId(),[v]),[b,x]=(0,d.useState)(i),[S,C]=(0,d.useState)(o),[w,T]=(0,d.useState)(s),[E,D]=(0,d.useState)(l),O=(0,d.useRef)(void 0),[k,A]=(0,d.useState)(),[j,M]=(0,d.useState)(n.PositionType.New),[N,P]=(0,d.useState)(!0),[F,I]=(0,d.useState)(!0),[L,R]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{let e=rn(v.getSheetBySheetName(w),b);I(e===2),R(Oi(e,h))},[b,w,v,h]);let z=e=>{if((0,p.serializeRangeWithSheet)(w,b)===e)return;let t=e.split(`,`).filter(e=>!!e).map(p.deserializeRangeWithSheet);if(Array.isArray(t)&&t.length>0){let{range:e,sheetName:n}=t[0];x(e),T(n)}t[0]||R(h.t(`sheets-pivot-ui.msg.emptySourceRange`))},B=Di(t,y,e=>{if(S&&(0,p.serializeRangeWithSheet)(E,S)===e)return;let t=e.split(`,`).filter(e=>!!e).map(p.deserializeRangeWithSheet);if(t.length===0){C(null);return}let n=t[0];C(n.range),D(n.sheetName||s),n.sheetName===s&&r.Rectangle.intersects(n.range,b)?P(!1):P(!0)},S?(0,p.serializeRangeWithSheet)(E,S):``,!1,k),V=()=>!!(b&&S&&w&&E&&j===n.PositionType.Existing&&N&&F)||!!(b&&w&&j===n.PositionType.New&&F);return(0,d.useEffect)(()=>{A(O.current)},[]),/* @__PURE__ */ (0,f.jsxs)(`div`,{ref:O,dir:_,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-h-5 univer-text-sm univer-font-medium`,children:h.t(`sheets-pivot-ui.dialog.source.sourceData`)}),Di(t,y,z,(0,p.serializeRangeWithSheet)(w,b),!0,k),L&&/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mt-2 univer-h-5 univer-text-xs univer-text-red-400`,children:L}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-mb-2 univer-mt-5 univer-h-5 univer-text-sm univer-font-medium`,children:h.t(`sheets-pivot-ui.dialog.source.position`)}),/* @__PURE__ */ (0,f.jsxs)(c.RadioGroup,{value:j,onChange:e=>M(e),className:`univer-flex univer-flex-col univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Radio,{value:n.PositionType.New,children:h.t(`sheets-pivot-ui.dialog.source.newSheet`)}),/* @__PURE__ */ (0,f.jsx)(c.Radio,{value:n.PositionType.Existing,children:h.t(`sheets-pivot-ui.dialog.source.existingSheet`)})]}),j===n.PositionType.Existing&&/* @__PURE__ */ (0,f.jsxs)(f.Fragment,{children:[B,!N&&/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-h-5 univer-text-sm univer-text-red-400`,children:h.t(`sheets-pivot-ui.dialog.source.intersect`)})]}),/* @__PURE__ */ (0,f.jsx)(`footer`,{className:`univer-mt-5`,children:/* @__PURE__ */ (0,f.jsxs)(c.ActionRow,{className:`univer-flex univer-justify-end univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:()=>m(),children:h.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,onClick:()=>{V()&&(j===n.PositionType.Existing?u({sourceRange:b,sourceSheetName:w,positionRange:S,positionSheetName:E,positionType:j}):u({sourceRange:b,sourceSheetName:w,positionType:j}))},children:h.t(`sheets-pivot-ui.dialog.ok`)})]})})]})}ki.componentKey=A;let Ai=[{id:`equal`,localeKey:`sheets-pivot-ui.valueFilter.equal`,operator:t.ST_PivotFilterOperatorEnum.valueEqual},{id:`notEqual`,localeKey:`sheets-pivot-ui.valueFilter.notEqual`,operator:t.ST_PivotFilterOperatorEnum.valueNotEqual},{id:`greaterThan`,localeKey:`sheets-pivot-ui.valueFilter.greaterThan`,operator:t.ST_PivotFilterOperatorEnum.valueGreaterThan},{id:`greaterThanOrEqual`,localeKey:`sheets-pivot-ui.valueFilter.greaterThanOrEqual`,operator:t.ST_PivotFilterOperatorEnum.valueGreaterThanOrEqual},{id:`lessThan`,localeKey:`sheets-pivot-ui.valueFilter.lessThan`,operator:t.ST_PivotFilterOperatorEnum.valueLessThan},{id:`lessThanOrEqual`,localeKey:`sheets-pivot-ui.valueFilter.lessThanOrEqual`,operator:t.ST_PivotFilterOperatorEnum.valueLessThanOrEqual},{id:`between`,localeKey:`sheets-pivot-ui.valueFilter.between`,operator:t.ST_PivotFilterOperatorEnum.valueBetween,isBetween:!0},{id:`notBetween`,localeKey:`sheets-pivot-ui.valueFilter.notBetween`,operator:t.ST_PivotFilterOperatorEnum.valueNotBetween,isBetween:!0},{id:`topCount`,localeKey:`sheets-pivot-ui.valueFilter.topCount`,operator:t.ST_PivotFilterOperatorEnum.count,isCount:!0},{id:`bottomCount`,localeKey:`sheets-pivot-ui.valueFilter.bottomCount`,operator:t.ST_PivotFilterOperatorEnum.count,isBottom:!0,isCount:!0},{id:`topPercent`,localeKey:`sheets-pivot-ui.valueFilter.topPercent`,operator:t.ST_PivotFilterOperatorEnum.percent,isPercent:!0},{id:`bottomPercent`,localeKey:`sheets-pivot-ui.valueFilter.bottomPercent`,operator:t.ST_PivotFilterOperatorEnum.percent,isBottom:!0,isPercent:!0}];function ji({targetFieldId:e,targetFieldName:n,valueFields:i,defaultValueFieldId:o,currentFilter:s,onConfirm:l,onClear:u,onCancel:p}){function m(e){var n;return(e==null?void 0:e.operator)===t.ST_PivotFilterOperatorEnum.count?e.isBottom?`bottomCount`:`topCount`:(e==null?void 0:e.operator)===t.ST_PivotFilterOperatorEnum.percent?e.isBottom?`bottomPercent`:`topPercent`:((n=Ai.find(t=>t.operator===(e==null?void 0:e.operator)))==null?void 0:n.id)??`greaterThan`}let h=(0,a.useDependency)(r.LocaleService),g=(0,a.useObservable)(h.direction$,h.getDirection()),_=s==null?void 0:s.expected,[v,y]=(0,d.useState)(()=>{let e=s==null?void 0:s.valueFieldId;return e&&i.some(t=>t.id===e)?e:o&&i.some(e=>e.id===o)?o:i.length===1?i[0].id:``}),[b,x]=(0,d.useState)(()=>m(s)),[S,C]=(0,d.useState)(()=>String(Array.isArray(_)?_[0]:_??0)),[w,T]=(0,d.useState)(()=>String(Array.isArray(_)?_[1]:0)),E=(0,d.useRef)(!1),[D,O]=(0,d.useState)(!1),k=Ai.find(e=>e.id===b),A=S.trim()!==``&&Number.isFinite(Number(S)),j=!k.isBetween||w.trim()!==``&&Number.isFinite(Number(w)),M=!k.isCount||Number.isInteger(Number(S))&&Number(S)>=1,N=!k.isPercent||Number(S)>=0&&Number(S)<=100,P=!!(i.some(e=>e.id===v)&&A&&j&&M&&N),F=async e=>{if(!E.current){E.current=!0,O(!0);try{await e()}catch{}finally{E.current=!1,O(!1)}}},I=()=>F(async()=>{if(!P)return;let e={operator:k.operator,expected:k.isBetween?[Number(S),Number(w)]:Number(S),valueFieldId:v};k.isBottom&&(e.isBottom=!0),await l(e)}),L=()=>F(u);return/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-flex-col univer-gap-4`,"data-target-field-id":e,dir:g,children:[/* @__PURE__ */ (0,f.jsx)(`div`,{className:`univer-text-sm univer-font-medium`,children:/* @__PURE__ */ (0,f.jsx)(`bdi`,{dir:`auto`,children:n})}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-flex-col univer-gap-2 univer-text-sm`,children:[h.t(`sheets-pivot-ui.valueFilter.valueField`),/* @__PURE__ */ (0,f.jsx)(c.Select,{"aria-label":h.t(`sheets-pivot-ui.valueFilter.valueField`),"data-testid":`pivot-value-filter-value-field`,value:v,options:[{value:``,label:h.t(`sheets-pivot-ui.valueFilter.selectValueField`)},...i.map(e=>({value:e.id,label:e.label}))],onChange:y})]}),/* @__PURE__ */ (0,f.jsxs)(`label`,{className:`univer-flex univer-flex-col univer-gap-2 univer-text-sm`,children:[h.t(`sheets-pivot-ui.valueFilter.condition`),/* @__PURE__ */ (0,f.jsx)(c.Select,{"aria-label":h.t(`sheets-pivot-ui.valueFilter.condition`),"data-testid":`pivot-value-filter-rule`,value:b,options:Ai.map(e=>({value:e.id,label:h.t(e.localeKey)})),onChange:e=>x(e)})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-gap-2`,children:[/* @__PURE__ */ (0,f.jsx)(c.Input,{"aria-label":h.t(`sheets-pivot-ui.valueFilter.condition`),"aria-invalid":!A||!M||!N,className:`univer-min-w-0 univer-flex-1`,"data-testid":`pivot-value-filter-expected`,inputMode:`decimal`,value:S,onChange:C}),k.isBetween&&/* @__PURE__ */ (0,f.jsx)(c.Input,{"aria-label":h.t(`sheets-pivot-ui.valueFilter.condition`),"aria-invalid":!j,className:`univer-min-w-0 univer-flex-1`,"data-testid":`pivot-value-filter-expected`,inputMode:`decimal`,value:w,onChange:T})]}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-justify-between univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{"data-testid":`pivot-value-filter-clear`,disabled:D,onClick:L,children:h.t(`sheets-pivot-ui.valueFilter.clear`)}),/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-gap-3`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{disabled:D,onClick:p,children:h.t(`sheets-pivot-ui.valueFilter.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{"data-testid":`pivot-value-filter-confirm`,variant:`primary`,disabled:!P||D,onClick:I,children:h.t(`sheets-pivot-ui.valueFilter.ok`)})]})]})]})}function Mi(e){let{pivotTableId:t,tableFieldId:i,closeFn:o,unitId:s,subUnitId:l,format:u,tableFieldInfo:p,dataFieldInfo:m,version:h}=e,[g,_]=(0,d.useState)(p.displayName),[v,y]=(0,d.useState)(p.subTotalType),b=(0,a.useDependency)(r.LocaleService),x=(0,a.useDependency)(r.ICommandService),w=(0,a.useDependency)(a.IDialogService),T={...(0,a.useDependency)(n.SheetsPivotTableConfigModel).getTextInfo()};for(let e of[`sheets-pivot-ui.averageName`,`sheets-pivot-ui.countName`,`sheets-pivot-ui.countNumsName`,`sheets-pivot-ui.maxName`,`sheets-pivot-ui.minName`,`sheets-pivot-ui.productName`,`sheets-pivot-ui.stdDevName`,`sheets-pivot-ui.stdDevpName`,`sheets-pivot-ui.sumName`,`sheets-pivot-ui.varName`,`sheets-pivot-ui.varpName`])T[e]=b.t(e);if((0,d.useEffect)(()=>{_(p.displayName),y(p.subTotalType)},[h]),!p||!m)return;let E=m.name,D=b.getDirection(),O=u??p.format,k=mn.map(e=>({value:`${e.type}`,type:e.type,label:b.t(e.textKey)})),A=e=>{let t=e;if(Array.isArray(e)&&(t=e[0]),t!==void 0){let e=Number(t);y(e),En(E,g,T)&&_(Dn(E,T,e))}};return/* @__PURE__ */ (0,f.jsxs)(`div`,{dir:D,children:[/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-justify-between univer-self-stretch univer-leading-5`,children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-sm univer-font-medium univer-leading-5 univer-text-gray-900`,children:b.t(`sheets-pivot-ui.dialog.fieldName`)}),/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-text-xs univer-leading-4 univer-text-gray-600`,children:en(b.t(`sheets-pivot-ui.dialog.sourceName`),E)})]}),/* @__PURE__ */ (0,f.jsx)(`div`,{children:/* @__PURE__ */ (0,f.jsx)(c.Input,{className:`univer-mb-5 univer-mt-2 univer-box-border univer-h-8 univer-w-full univer-rounded-md univer-py-1.5 univer-text-sm univer-leading-5`,value:g,onChange:e=>_(e)})}),/* @__PURE__ */ (0,f.jsx)(`label`,{className:`univer-mb-2 univer-text-sm univer-font-medium univer-text-gray-900 dark:!univer-text-gray-0`,children:b.t(`sheets-pivot-ui.dialog.summarizeBy`)}),/* @__PURE__ */ (0,f.jsx)(`div`,{className:(0,c.clsx)(`univer-h-40 univer-flex-1 univer-overflow-y-auto univer-rounded-lg`,c.borderClassName,c.scrollbarClassName),children:k.map(e=>/* @__PURE__ */ (0,f.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-1.5 univer-self-stretch univer-rounded-md univer-px-2 univer-py-1.5 univer-text-sm univer-capitalize univer-leading-5`,onClick:()=>A(e.value),children:[/* @__PURE__ */ (0,f.jsx)(`span`,{className:`univer-w-4 univer-text-base univer-text-primary-600`,children:/* @__PURE__ */ (0,f.jsx)(Ct,{className:(0,c.clsx)({"univer-hidden":v!==e.type})})}),/* @__PURE__ */ (0,f.jsx)(`span`,{children:e.label})]},e.type))}),/* @__PURE__ */ (0,f.jsx)(`footer`,{className:`univer-mt-5`,children:/* @__PURE__ */ (0,f.jsxs)(c.ActionRow,{className:`univer-flex univer-items-center univer-justify-between univer-self-stretch`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{className:`univer-flex univer-h-8 univer-cursor-pointer univer-items-center univer-justify-center univer-gap-1.5 univer-rounded univer-border-none univer-bg-gray-0 univer-px-3 univer-text-primary-600`,onClick:()=>{let e={id:S,draggable:!0,mask:!1,maskClosable:!1,width:400,children:{label:C,unitId:s,subUnitId:l,pivotTableId:t,tableFieldId:i,originPattern:O,tableFieldInfo:p,dataFieldInfo:m},dialogStyles:{header:{padding:`20px 24px 0`,height:0},body:{padding:`0 24px 20px`}},closable:!1,onClose:()=>{w.close(S)}};w.open(e)},children:b.t(`sheets-pivot-ui.dialog.format`)}),/* @__PURE__ */ (0,f.jsxs)(c.ActionRow,{className:`univer-flex univer-flex-1 univer-gap-2 univer-text-sm rtl:univer-flex-row-reverse`,children:[/* @__PURE__ */ (0,f.jsx)(c.Button,{onClick:()=>{o&&o()},children:b.t(`sheets-pivot-ui.dialog.cancel`)}),/* @__PURE__ */ (0,f.jsx)(c.Button,{variant:`primary`,disabled:g===``,onClick:()=>{let e=p.displayName,r=p.subTotalType,a=p.format,c=e===g?void 0:g,u=r===v?void 0:v,d=a===O?void 0:O;if(e!==g||r!==v||a!==d){let e={displayName:c,subtotalType:u,format:d,tableFieldId:i,pivotTableId:t,unitId:s,subUnitId:l,tableFieldInfo:p,dataFieldInfo:m};x.executeCommand(n.UpdatePivotFieldSettingCommand.id,e)}o&&o()},children:b.t(`sheets-pivot-ui.dialog.ok`)})]})]})})]})}let Ni=class extends r.Disposable{constructor(e,t){super(),this._componentManager=e,this._iconManager=t,this._registerComponents(),this._registerIcons()}_registerComponents(){[[A,ki],[_,Ci],[y,Rr],[x,Mi],[C,qr],[T,wi],[E,ji],[D,jr],[O,Vr],[k,zr]].forEach(([e,t])=>{this.disposeWithMe(this._componentManager.register(e,t))})}_registerIcons(){this.disposeWithMe(this._iconManager.register({PivotTableIcon:Vt}))}};Ni=K([G(0,(0,r.Inject)(a.ComponentManager)),G(1,(0,r.Inject)(a.IconManager))],Ni);let Pi=class extends r.Disposable{constructor(e){super(),this._menuManagerService=e,this._initMenu()}_initMenu(){this._menuManagerService.mergeMenu(Qe)}};Pi=K([G(0,a.IMenuManagerService)],Pi);let Fi=class extends r.Disposable{constructor(e,t,n,r,i,a,o,s,c,l,u){super(),this._context=e,this._injector=t,this._sheetsPivotTableAdaptorModel=n,this._sheetSkeletonManagerService=r,this._sheetsPivotTableConfigModel=i,this._commandService=a,this._sheetPermissionCheckController=o,this._permissionService=s,this._localeService=c,this._selectionsService=l,this._cellAlerts=u,W(this,`_pivotButtonShapesArr`,[]),this._initButtonRender(),this._initSkeleton(),this._initListener(),this._initBlockedPivotAlert()}_initBlockedPivotAlert(){let e=`SHEET_PIVOT_BLOCKED:${this._context.unitId}`;this.disposeWithMe((0,s.merge)(this._selectionsService.selectionChanged$,this._context.unit.activeSheet$,this._sheetsPivotTableAdaptorModel.viewUpdate$).pipe((0,s.auditTime)(0)).subscribe(()=>{var t,n,r;let{unitId:i,unit:a}=this._context,s=this._selectionsService.currentSelectionParam,c=(t=a.getActiveSheet())==null?void 0:t.getSheetId(),l=(n=this._selectionsService.getCurrentSelections())==null||(n=n.slice(-1)[0])==null?void 0:n.primary;if(!c||!l||(s==null?void 0:s.unitId)!==i||s.sheetId!==c){this._cellAlerts.removeAlert(e);return}let{actualRow:u,actualColumn:d}=l,f=this._sheetsPivotTableAdaptorModel,m=f.getPivotTableIdByCell(i,c,u,d),h=m&&((r=f.getPivotItemRenderInfoCache(i,c,m))==null?void 0:r.blockedRange);if(!h){this._cellAlerts.removeAlert(e);return}let g=`sheets-pivot-ui.perform.blocked`;h.reason===`pivot`?g=`sheets-pivot-ui.perform.blockedByPivot`:h.reason===`merge`&&(g=`sheets-pivot-ui.perform.blockedByMerge`),this._cellAlerts.showAlert({key:e,type:o.CellAlertType.ERROR,title:this._localeService.t(`sheets-pivot-ui.perform.tips`),message:this._localeService.t(g,(0,p.serializeRange)(h)),location:{unitId:i,subUnitId:c,row:u,col:d},width:260,height:96})})),this.disposeWithMe(()=>this._cellAlerts.removeAlert(e))}_initButtonRender(){this.disposeWithMe((0,s.merge)(this._sheetsPivotTableAdaptorModel.viewUpdate$.pipe((0,s.auditTime)(0)),this._sheetSkeletonManagerService.currentSkeleton$,this._sheetsPivotTableConfigModel.pivotConfigChange$,this._permissionService.permissionPointUpdate$.pipe((0,s.auditTime)(100))).subscribe(()=>{if(!this._context.unit)return;let e=this._context.unitId,t=this._context.unit.getActiveSheet().getSheetId(),{scene:n}=this._context,r=this._localeService.getDirection(),a=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!a)return;let s=this._pivotButtonShapesArr;s.forEach(e=>e.dispose()),s.splice(0,s.length),this._sheetsPivotTableAdaptorModel.getSubUnitPivotMatrix(e,t).forValue((c,l,u)=>{if(u!=null&&u.pbt){let d=`sheets-pivot-button-${c}-${l}-${e}-${t}`,{startX:f,startY:p,endX:m,endY:h}=(0,o.getCoordByCell)(c,l,n,a),g=m-f,_=h-p;if(_<8||g<8||this._sheetPermissionCheckController.permissionCheckWithRanges({workbookTypes:[i.WorkbookEditablePermission],worksheetTypes:[i.WorksheetViewPermission,i.WorksheetEditPermission,i.WorksheetPivotTablePermission],rangeTypes:[i.RangeProtectionPermissionViewPoint,i.RangeProtectionPermissionEditPoint]},[{startRow:c,endRow:c,startColumn:l,endColumn:l}],e,t)===!1)return;let v;if(mr.has(u.pbt)){let{left:n,top:i}=vr(r,`filter`,{startX:f,startY:p,endX:m,endY:h});v={left:n,top:i,height:16,width:16,zIndex:5e3,cellWidth:g,cellHeight:_,pivotParams:{col:l,row:c,unitId:e,subUnitId:t,buttonType:u.pbt}}}else if(hr.has(u.pbt)){let{left:n,top:i}=vr(r,`collapse`,{startX:f,startY:p,endX:m,endY:h});v={left:n,top:i,height:16,width:16,zIndex:5e3,cellWidth:g,cellHeight:_,pivotParams:{col:l,row:c,unitId:e,subUnitId:t,buttonType:u.pbt}}}else return;let y=this._injector.createInstance(gr,d,v);s.push(y)}}),s.length&&n.addObjects(s),n.makeDirty()}))}_initSkeleton(){var e;this.disposeWithMe(this._sheetsPivotTableAdaptorModel.markDirty$.subscribe(({unitId:e,subUnitId:t})=>{if(e===this._context.unitId&&(this._sheetSkeletonManagerService.makeDirty({sheetId:t}),this._context.unit.getActiveSheet().getSheetId()===t)){var n;this._sheetSkeletonManagerService.reCalculate(),(n=this._context.mainComponent)==null||n.makeDirty()}}));let t=this._context.unitId;this._context.unit.getSheets().forEach(e=>{var n;let r=e.getSheetId();(n=this._sheetsPivotTableAdaptorModel.getSubUnitPivotRenderCache(t,r))!=null&&n.size&&this._sheetSkeletonManagerService.makeDirty({sheetId:r})}),this._sheetSkeletonManagerService.reCalculate(),(e=this._context.mainComponent)==null||e.makeDirty()}_initListener(){let e=new r.DisposableCollection,{spreadsheet:t}=(0,o.getSheetObject)(this._context.unit,this._context);e.add(t.onDblclick$.subscribeEvent(e=>{if(e.button===2)return;let t=this._sheetSkeletonManagerService.getCurrentSkeleton();if(t==null)return;let r=this._context.scene,{row:i,column:a}=(0,o.getCoordByOffset)(e.offsetX,e.offsetY,r,t);this._commandService.executeCommand(n.PivotDrillDownCommand.id,{row:i,col:a})}))}};Fi=K([G(1,(0,r.Inject)(r.Injector)),G(2,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(3,(0,r.Inject)(o.SheetSkeletonManagerService)),G(4,(0,r.Inject)(n.SheetsPivotTableConfigModel)),G(5,(0,r.Inject)(r.ICommandService)),G(6,(0,r.Inject)(i.SheetPermissionCheckController)),G(7,(0,r.Inject)(r.IPermissionService)),G(8,(0,r.Inject)(r.LocaleService)),G(9,(0,r.Inject)(i.SheetsSelectionsService)),G(10,(0,r.Inject)(o.CellAlertManagerService))],Fi);var Ii=class e extends u.Shape{constructor(e){super(`SHEET_PIVOT_MOVE_KEY`),W(this,`_moveType`,void 0),this._moveType=e}_draw(t){this.width!==0&&this.height!==0&&e.drawWith(t,this)}static drawWith(e,t){let n=t._moveType;if(e.save(),e.strokeStyle=`#8bc34a`,e.lineWidth=2,n===`row`){let n=t.width;if(!n)return;e.beginPath(),e.moveTo(0,0),e.lineTo(0+n,0),e.moveTo(0,-10),e.lineTo(0,10),e.moveTo(0+n,-10),e.lineTo(0+n,10)}else{let n=t.height;if(!n)return;e.moveTo(0,0),e.lineTo(0,0+n),e.moveTo(-10,0),e.lineTo(10,0),e.moveTo(-10,0+n),e.lineTo(10,0+n)}e.stroke(),e.restore()}};let Li=class extends r.Disposable{constructor(e,t,n,r,i,a){super(),this._context=e,this._sheetsPivotTableAdaptorModel=t,this._sheetSkeletonManagerService=n,this._commandService=r,this._selectionRenderService=i,this._sheetsSelectionsService=a,W(this,`_pivotSelectionMoveShape`,void 0),W(this,`_scenePointerMoveSubscribe`,void 0),W(this,`_scenePointerUpSubscribe`,void 0),W(this,`_selectionControl`,void 0),W(this,`_moveStartRange`,void 0),W(this,`_moveStartCellIndex`,void 0),W(this,`_moveRowOrCol`,`row`),W(this,`_targetRange`,void 0),W(this,`_movePivotId`,void 0),this._initControl()}_controlMoving(e,t){let n=this._context.scene,r=n.getScrollXYInfoByViewport(u.Vector2.FromArray([e,t])),{scaleX:i,scaleY:a}=n.getAncestorScale(),o=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!o||!this._moveStartRange||!this._moveStartCellIndex)return;let{row:s,column:c}=o.getCellIndexByOffset(e,t,i,a,r);if(this._moveRowOrCol===`row`){var l;let e=0,t=0,n=this._moveStartRange.endColumn-this._moveStartRange.startColumn+1;if(this._moveStartCellIndex.column===this._moveStartRange.startColumn)e=c,t=c+n-1;else if(this._moveStartCellIndex.column===this._moveStartRange.endColumn)t=c,e=c-n+1;else{let r=this._moveStartCellIndex.column-this._moveStartRange.startColumn;e=c-r,t=c-r+n-1}let r=o.getCellWithCoordByIndex(s,e),i=o.getCellWithCoordByIndex(s,t),{startX:a,endY:u}=r,{endX:d}=i;this._targetRange={startRow:s,endRow:s,startColumn:e,endColumn:t},(l=this._pivotSelectionMoveShape)==null||l.transformByState({left:a,top:u,width:d-a,height:20})}else{var d;let e=0,t=0,n=this._moveStartRange.endRow-this._moveStartRange.startRow+1;if(this._moveStartCellIndex.row===this._moveStartRange.startRow)e=s,t=s+n-1;else if(this._moveStartCellIndex.row===this._moveStartRange.endRow)t=s,e=s-n+1;else{let r=this._moveStartCellIndex.row-this._moveStartRange.startRow;e=s-r,t=s-r+n-1}let r=o.getCellWithCoordByIndex(e,c),i=o.getCellWithCoordByIndex(t,c),{startX:a,startY:l}=r,{endY:u}=i;this._targetRange={startColumn:c,endColumn:c,startRow:e,endRow:t},(d=this._pivotSelectionMoveShape)==null||d.transformByState({left:a,top:l,width:20,height:u-l})}}_controlPointerDownHandler(e){var t,n,i;(t=this._selectionControl)==null||t.setControlExtensionDisable(!1),this._context.scene.setCursor(u.CURSOR_TYPE.DEFAULT);let a=this._sheetsSelectionsService.getCurrentSelections();if(!a.length||a.length>1)return;let o=a[0].range,s=this._context.unit,c=s.getActiveSheet(),l=s.getUnitId(),d=c.getSheetId(),f=this._sheetsPivotTableAdaptorModel.getSubUnitPivotRenderCache(l,d);if(!(f!=null&&f.size))return;let p=Array.from(f).find(([e,t])=>{let{rangesInfo:n}=t;if(!n)return!1;let{rowRanges:i,colRanges:a}=n,s=i[0],c=a[0],l=!1;return s&&(l=r.Rectangle.realContain(s,o),this._moveRowOrCol=`row`),!l&&c&&(l=r.Rectangle.realContain(c,o),this._moveRowOrCol=`col`),l});if(!p)return;this._movePivotId=p[0],this._pivotSelectionMoveShape||(this._pivotSelectionMoveShape=new Ii(this._moveRowOrCol),this._context.scene.addObject(this._pivotSelectionMoveShape));let m=this._context.scene,h=this._sheetSkeletonManagerService.getCurrentSkeleton();if(!h)return;let{offsetX:g,offsetY:_}=e,v=m.getCoordRelativeToViewport(u.Vector2.FromArray([g,_])),{x:y,y:b}=v,x=m.getScrollXYInfoByViewport(v),{scaleX:S,scaleY:C}=m.getAncestorScale(),{row:w,column:T}=h.getCellIndexByOffset(y,b,S,C,x),E=(n=this._selectionControl)==null?void 0:n.model.getRange();if(this._moveStartRange=E,!E)return;let D=0;D=w<E.startRow?E.startRow:w>E.endRow?E.endRow:w;let O=0;O=T<E.startColumn?E.startColumn:T>E.endColumn?E.endColumn:T,this._moveStartCellIndex={row:D,column:O},(i=this._selectionControl)==null||i.setControlExtensionDisable(!0),this._scenePointerMoveSubscribe=m.onPointerMove$.subscribeEvent(e=>{let{offsetX:t,offsetY:n}=e,{x:r,y:i}=m.getCoordRelativeToViewport(u.Vector2.FromArray([t,n]));this._controlMoving(r,i),m.setCursor(u.CURSOR_TYPE.MOVE)}),this._scenePointerUpSubscribe=m.onPointerUp$.subscribeEvent(e=>{var t,n,r;(t=this._scenePointerMoveSubscribe)==null||t.unsubscribe(),this._scenePointerMoveSubscribe=null,(n=this._selectionControl)==null||n.setControlExtensionDisable(!1),this._selectionControl=null,m.setCursor(u.CURSOR_TYPE.DEFAULT),m.removeObject(this._pivotSelectionMoveShape),this._pivotSelectionMoveShape=null,this._updatePivotSort(),(r=this._scenePointerUpSubscribe)==null||r.unsubscribe(),this._scenePointerUpSubscribe=null})}_updatePivotSort(){if(!this._moveStartRange||!this._targetRange||!this._movePivotId)return;let e=this._context.unit.getUnitId(),r=this._context.unit.getActiveSheet().getSheetId();if(this._moveRowOrCol===`row`){var i;let o=(i=this._sheetsPivotTableAdaptorModel.getSubUnitPivotRenderCache(e,r))==null?void 0:i.get(this._movePivotId);if(!o)return;let s=this._sheetsPivotTableAdaptorModel.getSubUnitPivotMatrix(e,r);if(!s)return;let c=[],l=``,{headerMap:u,rangesInfo:d}=o;for(let e=this._moveStartRange.startColumn;e<=this._moveStartRange.endColumn;e++){var a;let n=u==null||(a=u.rowHeaderMap)==null?void 0:a[e];if(!n)continue;l=n.tableFieldId;let r=d==null?void 0:d.rowRanges,i=r==null?void 0:r[0];if(!i)continue;let o={...i,startColumn:e,endColumn:e};for(let n=o.startRow;n<=o.endRow;n++){let r=s.getValue(n,e);if(!r)continue;let{v:i,pbt:a}=r;i&&a!==t.PivotCellStyleTypeEnum.Subtotal&&a!==t.PivotCellStyleTypeEnum.GrandTotal&&(typeof i==`string`?c[n]=i:typeof i==`number`&&(c[n]=i.toString()))}break}if(!l)return;let f=this._moveStartRange.startRow,p=this._moveStartRange.endRow-this._moveStartRange.startRow+1,m=this._targetRange.startRow;if(f<m){let e=c.splice(f,p);c.splice(m-p,0,...e)}else{let e=c.splice(f,p);c.splice(m,0,...e)}let h=c.filter(e=>e!==void 0);this._commandService.executeCommand(n.SetPivotSortCommand.id,{unitId:e,subUnitId:r,pivotTableId:this._movePivotId,tableFieldId:l,info:{type:t.PivotDataFieldSortOperatorEnum.custom,customOrder:h}})}else{var o;let i=(o=this._sheetsPivotTableAdaptorModel.getSubUnitPivotRenderCache(e,r))==null?void 0:o.get(this._movePivotId);if(!i)return;let a=this._sheetsPivotTableAdaptorModel.getSubUnitPivotMatrix(e,r);if(!a)return;let c=[],l=``,{headerMap:u,rangesInfo:d}=i;for(let e=this._moveStartRange.startRow;e<=this._moveStartRange.endRow;e++){var s;let r=u==null||(s=u.colHeaderMap)==null?void 0:s[e];if(!r)continue;l=r.tableFieldId;let o=d==null?void 0:d.colRanges,f=o==null?void 0:o[0];if(!f)continue;let p={...f,startRow:e,endRow:e};for(let r=p.startColumn;r<=p.endColumn;r++){let o=a.getValue(e,r);if(!o)continue;let{v:s,pbt:l}=o;if(s&&l!==t.PivotCellStyleTypeEnum.Subtotal&&l!==t.PivotCellStyleTypeEnum.GrandTotal){if(typeof s==`string`){let e=i.projection?(0,n.mapPivotSheetColumn)(i.projection,r):r;c[e]=s}else if(typeof s==`number`){let e=i.projection?(0,n.mapPivotSheetColumn)(i.projection,r):r;c[e]=s.toString()}}}break}if(!l)return;let f=i.projection?(0,n.mapPivotSheetRange)(i.projection,this._moveStartRange):this._moveStartRange,p=i.projection?(0,n.mapPivotSheetRange)(i.projection,this._targetRange):this._targetRange,m=f.startColumn,h=this._moveStartRange.endColumn-this._moveStartRange.startColumn+1,g=p.startColumn;if(m<g){let e=c.splice(m,h);c.splice(g-h,0,...e)}else{let e=c.splice(m,h);c.splice(g,0,...e)}let _=c.filter(e=>e!==void 0);this._commandService.executeCommand(n.SetPivotSortCommand.id,{unitId:e,subUnitId:r,pivotTableId:this._movePivotId,tableFieldId:l,info:{type:t.PivotDataFieldSortOperatorEnum.custom,customOrder:_}})}}_initControl(){this.disposeWithMe(this._sheetsSelectionsService.selectionMoveEnd$.subscribe(()=>{let e=this._selectionRenderService.getSelectionControls();if(this._selectionControl=e[e.length-1],this._selectionControl&&this._selectionControl.setControlExtensionDisable(!1),!this._selectionControl)return;let{leftControl:t,rightControl:n,topControl:r,bottomControl:i}=this._selectionControl;[t,n,r,i].forEach(e=>{e.onPointerDown$.subscribeEvent(this._controlPointerDownHandler.bind(this))})}))}dispose(){var e,t;(e=this._scenePointerMoveSubscribe)==null||e.unsubscribe(),this._scenePointerMoveSubscribe=null,(t=this._scenePointerUpSubscribe)==null||t.unsubscribe(),this._scenePointerUpSubscribe=null,this._selectionControl=null,this._moveStartRange=null,this._moveStartCellIndex=null,this._targetRange=null,super.dispose()}};Li=K([G(1,(0,r.Inject)(n.SheetsPivotTableAdaptorModel)),G(2,(0,r.Inject)(o.SheetSkeletonManagerService)),G(3,(0,r.Inject)(r.ICommandService)),G(4,o.ISheetSelectionRenderService),G(5,(0,r.Inject)(i.SheetsSelectionsService))],Li);let $=class extends r.Plugin{constructor(e=ot,t,n,i,a){super(),this._config=e,this._injector=t,this._commandService=n,this._renderManagerService=i,this._configService=a;let{menu:o,...s}=(0,r.merge)({},ot,this._config);o&&this._configService.setConfig(`menu`,o,{merge:!0}),this._configService.setConfig(at,s),this._initRegisterCommand()}onStarting(){this._injector.add([Ni]),this._injector.get(Ni),[[Pi],[Dr],[Sr],[Q],[Er],[wr],[Tr],[q],[br]].forEach(e=>this._injector.add(e)),this._injector.get(q)}onReady(){this._registerRenderModules(),this._injector.get(Pi)}onRendered(){this._injector.get(Sr),this._injector.get(Q),this._injector.get(Er),this._injector.get(wr),this._injector.get(Tr),this._injector.get(br)}onSteady(){this._injector.get(Dr)}_registerRenderModules(){[[Fi],[Li]].forEach(e=>{this.disposeWithMe(this._renderManagerService.registerRenderModule(r.UniverInstanceType.UNIVER_SHEET,e))})}_initRegisterCommand(){[it,N,tt,nt,F,z,ie,ae,oe,ue,fe,xe].forEach(e=>this._commandService.registerCommand(e))}};W($,`pluginName`,`${n.SHEET_PIVOT_TABLE_PLUGIN}_UI_PLUGIN`),W($,`packageName`,$e),W($,`version`,et),W($,`type`,r.UniverInstanceType.UNIVER_SHEET),$=K([(0,r.DependentOn)(l.UniverLicensePlugin,u.UniverRenderEnginePlugin,i.UniverSheetsPlugin,n.UniverSheetsPivotTablePlugin,o.UniverSheetsUIPlugin),G(1,(0,r.Inject)(r.Injector)),G(2,(0,r.Inject)(r.ICommandService)),G(3,u.IRenderManagerService),G(4,r.IConfigService)],$),e.DragDropContext=oi,e.Draggable=ci,e.Droppable=si,e.OpenPivotTableRangeSelectorPanelOperation=N,e.PivotFilterOptions=Jr,e.PivotFilterPanel=Rr,e.SheetsPivotTableUIMenuSchema=Qe,Object.defineProperty(e,"UniverSheetsPivotTableMobileUIPlugin",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(e,"UniverSheetsPivotTableUIPlugin",{enumerable:!0,get:function(){return $}})});
|