@vmscloud/moz-ui-grid-react 0.1.20 → 0.1.22
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/README.md +3 -3
- package/dist/{legacy/locale/contextWrapper.d.ts → contextWrapper.d.ts} +2 -5
- package/dist/index.cjs +1 -25
- package/dist/index.d.ts +3 -7
- package/dist/index.js +54 -95645
- package/dist/locale/MozGridLocaleContext.d.ts +23 -0
- package/dist/style.css +1 -1
- package/package.json +21 -17
- package/dist/legacy/components/common/Dragging.d.ts +0 -30
- package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +0 -256
- package/dist/legacy/components/common/custom-cell/FormulaInput.d.ts +0 -25
- package/dist/legacy/components/common/custom-cell/GridCustomCell.d.ts +0 -17
- package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +0 -54
- package/dist/legacy/components/common/excel/ClientExcelUploadPopup.d.ts +0 -6
- package/dist/legacy/components/common/filter/GridFilter.d.ts +0 -13
- package/dist/legacy/components/common/footer/GridFooter.d.ts +0 -17
- package/dist/legacy/components/common/sort/GridSort.d.ts +0 -12
- package/dist/legacy/components/common/toolbar/GridSearchInput.d.ts +0 -26
- package/dist/legacy/components/grid/CellEditor.d.ts +0 -9
- package/dist/legacy/components/grid/CellTemplate.d.ts +0 -21
- package/dist/legacy/components/grid/DetailTemplate.d.ts +0 -8
- package/dist/legacy/components/grid/GroupTemplate.d.ts +0 -8
- package/dist/legacy/components/grid/HeaderTemplate.d.ts +0 -9
- package/dist/legacy/components/grid/MozGridReact.d.ts +0 -12
- package/dist/legacy/components/grid/MozGridReactCore.d.ts +0 -28
- package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.d.ts +0 -11
- package/dist/legacy/components/grid/context-menu/GridContextMenu.d.ts +0 -22
- package/dist/legacy/components/grid/group-panel/GroupPanel.d.ts +0 -5
- package/dist/legacy/components/grid/toolbar/ColumnPicker.d.ts +0 -18
- package/dist/legacy/components/grid/toolbar/GridOptionModal.d.ts +0 -30
- package/dist/legacy/components/grid/toolbar/GridSetupPopover.d.ts +0 -25
- package/dist/legacy/components/grid/toolbar/GridToolBox.d.ts +0 -49
- package/dist/legacy/components/pivot/MozPivotReact.d.ts +0 -47
- package/dist/legacy/components/pivot/PivotContextMenu.d.ts +0 -23
- package/dist/legacy/components/pivot/PivotFieldChip.d.ts +0 -17
- package/dist/legacy/components/pivot/PivotFieldDropZone.d.ts +0 -30
- package/dist/legacy/components/pivot/PivotFieldPanel.d.ts +0 -26
- package/dist/legacy/components/pivot/PivotOptionModal.d.ts +0 -36
- package/dist/legacy/components/pivot/PivotToolBox.d.ts +0 -56
- package/dist/legacy/components/pivot/chart/EChart.d.ts +0 -18
- package/dist/legacy/components/pivot/chart/MozPivotChart.d.ts +0 -23
- package/dist/legacy/components/pivot/chart/PivotChartDetail.d.ts +0 -17
- package/dist/legacy/components/pivot/chart/PivotChartMini.d.ts +0 -19
- package/dist/legacy/components/pivot/chart/PivotChartMultiple.d.ts +0 -16
- package/dist/legacy/components/pivot/chart/PivotChartToolbar.d.ts +0 -32
- package/dist/legacy/components/pivot/chart/chartUtils.d.ts +0 -45
- package/dist/legacy/contexts/index.d.ts +0 -31
- package/dist/legacy/contracts/notification.contract.d.ts +0 -34
- package/dist/legacy/hooks/index.d.ts +0 -16
- package/dist/legacy/hooks/useCellTooltip.d.ts +0 -8
- package/dist/legacy/hooks/useClientExcelExport.d.ts +0 -27
- package/dist/legacy/hooks/useClientExcelStore.d.ts +0 -18
- package/dist/legacy/hooks/useContextMenu.d.ts +0 -62
- package/dist/legacy/hooks/useGridBulkEditor.d.ts +0 -16
- package/dist/legacy/hooks/useGridChanges.d.ts +0 -10
- package/dist/legacy/hooks/useGridColumns.d.ts +0 -11
- package/dist/legacy/hooks/useGridCustomCell.d.ts +0 -32
- package/dist/legacy/hooks/useGridCustomCellModule.d.ts +0 -9
- package/dist/legacy/hooks/useGridEvents.d.ts +0 -13
- package/dist/legacy/hooks/useGridFilter.d.ts +0 -19
- package/dist/legacy/hooks/useGridInstance.d.ts +0 -9
- package/dist/legacy/hooks/useGridSelect.d.ts +0 -10
- package/dist/legacy/hooks/useGridSelection.d.ts +0 -6
- package/dist/legacy/hooks/useGridSort.d.ts +0 -16
- package/dist/legacy/hooks/useGridUndoRedo.d.ts +0 -10
- package/dist/legacy/hooks/useGridValidation.d.ts +0 -9
- package/dist/legacy/hooks/useSearchHighlight.d.ts +0 -9
- package/dist/legacy/icons/index.d.ts +0 -36
- package/dist/legacy/index.d.ts +0 -71
- package/dist/legacy/locale/MozConfigProvider.d.ts +0 -31
- package/dist/legacy/locale/en.d.ts +0 -2
- package/dist/legacy/locale/index.d.ts +0 -8
- package/dist/legacy/locale/ja.d.ts +0 -2
- package/dist/legacy/locale/ko.d.ts +0 -2
- package/dist/legacy/locale/types.d.ts +0 -328
- package/dist/legacy/locale/useMozLocale.d.ts +0 -15
- package/dist/legacy/locale/zh.d.ts +0 -2
- package/dist/legacy/stories/MozGridReact.stories.d.ts +0 -7
- package/dist/legacy/stories/MozPivotReact.stories.d.ts +0 -44
- package/dist/legacy/types/pivot-props.d.ts +0 -62
- package/dist/legacy/types/props.d.ts +0 -127
- package/dist/legacy/types/toolbar.d.ts +0 -117
- package/dist/legacy/ui/button/Button.d.ts +0 -18
- package/dist/legacy/ui/button/index.d.ts +0 -1
- package/dist/legacy/ui/checkbox/CheckBox.d.ts +0 -17
- package/dist/legacy/ui/checkbox/icons.d.ts +0 -9
- package/dist/legacy/ui/checkbox/index.d.ts +0 -1
- package/dist/legacy/ui/context-menu/ContextMenu.d.ts +0 -36
- package/dist/legacy/ui/context-menu/index.d.ts +0 -2
- package/dist/legacy/ui/context-menu/types.d.ts +0 -26
- package/dist/legacy/ui/date-input/DateInput.d.ts +0 -25
- package/dist/legacy/ui/date-input/index.d.ts +0 -1
- package/dist/legacy/ui/empty-state/EmptyState.d.ts +0 -28
- package/dist/legacy/ui/empty-state/index.d.ts +0 -1
- package/dist/legacy/ui/input/Input.d.ts +0 -27
- package/dist/legacy/ui/input/index.d.ts +0 -1
- package/dist/legacy/ui/multi-select/MultiSelect.d.ts +0 -43
- package/dist/legacy/ui/multi-select/index.d.ts +0 -1
- package/dist/legacy/ui/number-input/NumberInput.d.ts +0 -22
- package/dist/legacy/ui/number-input/index.d.ts +0 -1
- package/dist/legacy/ui/popup/Popup.d.ts +0 -50
- package/dist/legacy/ui/popup/index.d.ts +0 -1
- package/dist/legacy/ui/select/Select.d.ts +0 -56
- package/dist/legacy/ui/select/index.d.ts +0 -1
- package/dist/legacy/ui/toggle/Toggle.d.ts +0 -21
- package/dist/legacy/ui/toggle/index.d.ts +0 -1
- package/dist/legacy/utils/cn.d.ts +0 -5
- package/dist/legacy/utils/file.d.ts +0 -17
- package/dist/legacy/utils/index.d.ts +0 -2
- package/dist/legacy/utils/misc.d.ts +0 -17
- /package/dist/{legacy/stories → stories}/_helpers/sampleData.d.ts +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,25 +1 @@
|
|
|
1
|
-
"use strict";var e,t=Object.defineProperty,n=e=>{throw TypeError(e)},i=(e,n,i)=>((e,n,i)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i)(e,"symbol"!=typeof n?n+"":n,i),r=(e,t,i)=>t.has(e)||n("Cannot "+i),o=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),l=require("@vmscloud/moz-ui-grid-wrapper"),u=require("react-dom/client"),c=require("react-dom"),d=require("dayjs"),h=require("es-toolkit"),p=require("@vmscloud/moz-ui-grid-core");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const g=f(s),m=f(c);class v{constructor(){i(this,"instances",new Map),i(this,"contextWrapper",null),i(this,"lifecycleRoots",new WeakMap)}setContextWrapper(e){this.contextWrapper=e}mount(e,t,n,i={}){let r=this.instances.get(e);if(r&&r.container!==t){const t=r;queueMicrotask(()=>t.root.unmount()),this.instances.delete(e),r=void 0}if(r)return r.component=n,r.props={...i},void this.render(r);r={root:u.createRoot(t),container:t,component:n,props:{...i}},this.instances.set(e,r),this.render(r)}mountInstance(e,t,n){const i=this.lifecycleRoots.get(e);if(i)try{i.unmount()}catch{}const r=u.createRoot(e);this.lifecycleRoots.set(e,r);const o=e=>{const n=s.createElement(t,e);r.render(this.contextWrapper?this.contextWrapper(n):n)};return o(n),{update:e=>o(e),destroy:()=>{queueMicrotask(()=>{this.lifecycleRoots.get(e)===r&&(r.unmount(),this.lifecycleRoots.delete(e))})}}}updateProps(e,t){const n=this.instances.get(e);n&&(n.props={...n.props,...t},this.render(n))}unmount(e){const t=this.instances.get(e);t&&(queueMicrotask(()=>t.root.unmount()),this.instances.delete(e))}unmountByPrefix(e){for(const t of Array.from(this.instances.keys()))t.startsWith(e)&&this.unmount(t)}unmountAll(){for(const[,e]of this.instances)queueMicrotask(()=>e.root.unmount());this.instances.clear()}get size(){return this.instances.size}has(e){return this.instances.has(e)}render(e){const t=s.createElement(e.component,e.props),n=this.contextWrapper?this.contextWrapper(t):t;e.root.render(n)}}const y={Popup:{title:"팝업",save:"저장",cancel:"취소",ok:"확인",close:"닫기"},Select:{searchPlaceholder:"검색",emptyText:"데이터가 없습니다",requiredMessage:"{label} 은(는) 필수입니다"},MultiSelect:{search:"검색",selectAll:"전체 선택",selectFiltered:"필터 결과 선택",specificResults:"결과만",specificSelect:"선택만",noData:"데이터가 없습니다",required:"{label} 은(는) 필수입니다",headerFormat:"항목 ({count})"},TreeSelect:{search:"검색",selectAll:"전체 선택",selectFiltered:"필터 결과 선택",specificResults:"결과만",noData:"데이터가 없습니다",showSelectedOnly:"선택한 항목만 표시",expandAll:"모두 펼치기",collapseAll:"모두 접기",required:"{label} 은(는) 필수입니다",headerFormat:"항목 ({count})"},TagInput:{add:"추가"},TimePicker:{hour:"시",minute:"분",currentTime:"현재 시간"},EmptyState:{customEmptyHeader:"데이터 없음",customEmptyContent:"표시할 데이터가 없습니다.",dataEmptyHeader:"데이터가 없습니다.",dataEmptyContent:"필요한 데이터를 추가해 주세요.",resultEmptyHeader:"설정한 조건에 해당되는 데이터가 없습니다.",resultEmptyContent:"조회 조건이 적절하게 설정되었는지 확인해주세요.\n조회 조건을 변경하였다면, 조회 버튼을 다시 눌러주세요.",searchEmptyHeader:"검색 결과 없음",searchEmptyContent:"필터 값을 확인하고 다시 시도해 주세요."},TableSelect:{searchPlaceholder:"검색",emptyText:"데이터가 없습니다",requiredMessage:"{label} 은(는) 필수입니다",footerSelect:"선택",footerNavigate:"이동",footerClose:"닫기"},Common:{requiredMessage:"{label} 은(는) 필수입니다"},Grid:{layoutSetting:"보기 설정",filter:"필터",sort:"정렬",customCellStyle:"조건부 서식 설정",reset:"초기화",searchFilter:"검색",newView:"새 뷰",selectAll:"전체 선택",columnPicker:"열 표시/숨김 설정",viewToolbar:"Tool Bar 보기",viewFooter:"Footer 보기",viewGroupPanel:"그룹 패널 보기",resetFilterAndSort:"필터 및 정렬 초기화",defaultView:"기본 뷰",filterPopup:"필터 설정",resetFilter:"필터 초기화",addFilter:"필터 추가",sortingPopup:"정렬 설정",ascending:"오름차순",descending:"내림차순",resetSort:"정렬 초기화",addSort:"정렬 추가",symbolEqual:"같음",symbolNotEqual:"같지 않음",symbolContains:"포함",symbolNotContains:"포함하지 않음",symbolLessThan:"보다 작음",symbolGreaterThan:"보다 큼",symbolLessOrEqual:"이하",symbolGreaterOrEqual:"이상",symbolEmpty:"비어 있음",symbolNotEmpty:"비어 있지 않음",customCellRuleNamePlaceholder:"규칙 이름을 입력하세요",addFormulaCondition:"조건 추가",applicationColumn:"적용 열",backgroundColor:"배경색",fontColor:"글꼴 색",resetCustomCell:"초기화",addFormulaConditionSet:"규칙 추가",customColor:"사용자 지정 색상",formulaConditionSet:"새 규칙",contextFilterAndSort:"필터 및 정렬",contextAddFilter:"필터 추가",contextSelectFilter:"선택 값으로 필터",contextResetColumnFilter:"열 필터 초기화",contextResetColumnSort:"열 정렬 초기화",contextResetColumnAll:"열 필터/정렬 초기화",contextDataCopy:"선택한 데이터 복사",contextDataExcelCopy:"Excel 복사",contextDataWithHeaderCopy:"선택한 데이터 복사 (헤더 포함)",contextPin:"열 고정 / 해제",contextColumnPicker:"열 표시/숨김 설정",contextMoveColumnFirst:"첫 번째 열로 보내기",contextAutoSizeColumns:"열 너비 자동 조정",contextGroupPanel:"그룹 패널",contextGroupToggle:"그룹 접기/펼치기",contextGroupCollapseAll:"모든 그룹 접기",contextGroupExpandAll:"모든 그룹 펼치기",groupPanelPlaceholder:"열을 드래그 앤 드롭하여 그룹을 만듭니다.",contextBulkEdit:"데이터 일괄변경 [{name}]",contextImport:"가져오기",contextImportExcel:"Excel 가져오기 (덮어쓰기)",contextImportExcelAppend:"Excel 가져오기 (추가)",contextExport:"내보내기",contextExportXlsx:"엑셀 내보내기 (xlsx)",contextExportCsv:"CSV 내보내기 (csv)",contextSum:"합계",check:"확인",cancel:"취소",save:"저장",remove:"삭제",close:"닫기",pause:"일시 중지",add:"추가",immediateApply:"바로 적용",warning:"경고",mozWarning:"경고",confirmCancel:"취소하시겠습니까?",alreadyExcelProgress:"Excel 작업이 이미 진행 중입니다.",downloadFail:"다운로드에 실패했습니다.",addDataWithFilterSort:"필터/정렬이 적용된 상태에서 데이터를 추가하시겠습니까?",resetAndAdd:"초기화 후 추가",confirmDeleteGeneral:"{name}을(를) 삭제하시겠습니까?",toastCopySuccess:"복사되었습니다.",toastSaveSuccess:"저장되었습니다.",toastSaveError:"저장에 실패했습니다.",toastResetSuccess:"초기화되었습니다.",toastRequiredVal:"필수 값을 입력하세요.",excelInvalidExcel:"유효하지 않은 Excel 파일입니다.",excelInvalidUpload:"유효하지 않은 업로드 데이터입니다.",downloadFormat:"서식 내려받기",click:"클릭",drag:"드래그",overwriteSelected:"선택한 항목을 덮어쓰시겠습니까?",fileOverwrite:"파일을 덮어쓰시겠습니까?",dropHere:"이 곳을 클릭 또는 파일을 드래그 하세요.",dropHerePrefix:"이 곳을 ",dropHereMiddle:" 또는 파일을 ",dropHereSuffix:" 하세요.",withFormatting:"서식 포함",requestTimedOut:"요청 시간이 초과되었습니다.",serverError:"서버 오류가 발생했습니다.",total:"전체",correct:"정상",error:"오류",success:"성공",fail:"실패",excelExportConfirmLargeData:"대용량 데이터를 내보내시겠습니까?",footerTotalRowCount:"총 개수: {totalRowCount}개",footerFilteredRowCount:"{filterdRowCount} / {totalRowCount}",aggregateAverage:"평균",aggregateCount:"개수",aggregateMin:"최소",aggregateMax:"최대",aggregateSum:"합계"},GridPivot:{setting:"피봇 설정",gridSetting:"그리드 설정",fieldSetting:"값 필드 설정",showRowTotals:"행 합계 표시",showColumnTotals:"열 합계 표시",subtotalCriteria:"소계 기준",subtotalAggregateField:"소계 집계 필드",totalsBeforeData:"합계 먼저 보기",showZeros:"빈 값 채우기",showOutlineMode:"개요 모드",collapsibleSubtotal:"소계 접기",fieldName:"필드 이름",fieldAggregate:"집계",fieldShowAs:"표시 방식",fieldFormat:"형식",openChart:"차트 열기",selectValueField:"값 필드 선택",none:"없음",sum:"합계",count:"개수",average:"평균",max:"최대값",min:"최소값",range:"범위",std:"표준 편차",var:"분산",stdPop:"모표준 편차",varPop:"모분산",cntAll:"전체 개수",showFirstValue:"첫 번째 값",showLastValue:"마지막 값",noCalculation:"계산 없음",diffRow:"이전 행과의 차이",diffRowPct:"이전 행과의 차이 (%)",diffCol:"이전 열과의 차이",diffColPct:"이전 열과의 차이 (%)",grandtotalPct:"전체 합계 대비 (%)",rowTotalPct:"행 합계 대비 (%)",colTotalPct:"열 합계 대비 (%)",prevRowPct:"이전 행 대비 (%)",prevColPct:"이전 열 대비 (%)",runTot:"누적 합계",runTotPct:"누적 합계 (%)",generalFormat:"일반",int:"정수",float:"실수",currency:"통화",percentage:"백분율",percentageDot2:"백분율 (소수점 2자리)",thousands:"천 단위",millions:"백만 단위",billions:"십억 단위",subtotal:"소계",grandtotal:"전체 합계",grandtotalValue:"총합계",category:"범주",chartType:"차트 유형",chartXAxis:"X축 범주",chartYAxis:"Y축 범주",categoryName:"카테고리",barChart:"막대 차트",lineChart:"꺾은선 차트",lineSymbolChart:"기호 꺾은선 차트",areaChart:"영역 차트",chartRenderingErrorHeader:"차트 렌더링 오류",chartRenderingErrorContent:"차트를 표시할 수 없습니다.",contextPivotExportXlsx:"화면 내보내기 (xlsx)",contextPivotExportOriginXlsx:"원본 데이터 내보내기 (xlsx)",contextPivotExportOriginCsv:"원본 데이터 내보내기 (csv)",row:"행",column:"열",value:"값",filter:"필터",searchFieldPlaceholder:"필드 검색...",dropZoneRowPlaceholder:"행 축 필드를 드래그하세요",dropZoneColumnPlaceholder:"열 축 필드를 드래그하세요",dropZoneValuePlaceholder:"값 필드를 드래그하세요",dropZoneFilterPlaceholder:"필터 필드를 드래그하세요",update:"업데이트",selectFieldForReport:"보고서에 추가할 필드 선택:",dragFieldsBetweenAreas:"아래 영역 사이에 필드를 끌어 놓으십시오:",valueSummaryCriteria:"값 요약 기준"},Gantt:{searchPlaceholder:"검색",columnSize:"컬럼 크기",rowSize:"행 크기"},Chart:{filterPopup:"필터",resetFilter:"필터 초기화",addFilter:"필터 추가",symbolEqual:"같음",symbolNotEqual:"같지 않음",symbolContains:"포함",symbolNotContains:"포함하지 않음",symbolLessThan:"보다 작음",symbolGreaterThan:"보다 큼",symbolLessOrEqual:"작거나 같음",symbolGreaterOrEqual:"크거나 같음",symbolEmpty:"비어있음",symbolNotEmpty:"비어있지 않음",chartSetting:"차트 설정",chartCategory:"차트 카테고리",chartType:"차트 타입",chartUseZoom:"줌 사용",multiYAxisSetting:"Y축 다중 설정",notUsed:"(사용안함)",chartPopup:"차트 팝업",errorMessage:"데이터를 불러오는 중 오류가 발생했습니다.",valueFieldSetting:"값 필드 설정",valueSummaryCriteria:"값 요약 기준",selectFieldForReport:"보고서에 추가할 필드 선택:",column:"열",row:"행",value:"값",sumValue:"∑ 값",count:"개수",sum:"합계",average:"평균",min:"최소값",max:"최대값",seriesCategory:"일반",pieCategory:"파이",scatterCategory:"산점도",treemapCategory:"트리맵",boxplotCategory:"박스플롯",candlestickCategory:"캔들스틱",barChart:"바 차트",stackBarChart:"스택 바 차트",horizontalStackBarChart:"가로 스택 바 차트",lineChart:"선 차트",lineSymbolChart:"선 차트(심볼)",areaChart:"면적 차트",general:"일반",custom:"사용자 지정",axisCategoryLabel:"축 (범주)",legendSeriesLabel:"범례 (계열)",legendSingleLabel:"범례 (단일 선택)",legendMultiLabel:"범례 (다중 선택 가능)",valueSingleLabel:"값 (단일 선택)",xAxisSingleLabel:"X축 (단일 선택)",yAxisMultiLabel:"Y축 (다중 선택 가능)",notSet:"미지정"}},x=s.createContext(y);function _(){return s.useContext(x)}const b=s.createContext(null);function w(){return s.useContext(b)}function C(){const e=[];function t(e,t){return t?`${e}:${t}`:e}return{register(n){const i=e.findIndex(e=>t(e.type,e.fieldId)===t(n.type,n.fieldId));i>=0?e[i]=n:e.push(n)},unregister(n,i){const r=t(n,i),o=e.findIndex(e=>t(e.type,e.fieldId)===r);o>=0&&e.splice(o,1)},get(n,i){const r=t(n,i);return e.find(e=>t(e.type,e.fieldId)===r)},getAll:t=>e.filter(e=>e.type===t)}}function S(e,t,n){return e.map(e=>{const i={...e},r=t.get("cell",e.id);(null==r?void 0:r.component)&&(i.cellRenderer=function(e,t,n){const i=e=>({value:e.value,rowData:e.rowData,columnId:e.columnId,rowId:e.rowId}),r=(e,r)=>{const o=n.mountInstance(e,t,i(r));return{update:e=>(o.update(i(e)),!0),destroy(){o.destroy()}}};return r.__cellRendererKind="lifecycle",r}(e.id,r.component,n));const o=t.get("header",e.id);(null==o?void 0:o.component)&&(i.headerRenderer=function(e,t,n){return i=>{const r=document.createElement("div");r.style.display="contents";const o=`header:${e}`,a={columnId:i.columnId,header:i.header};return n.mount(o,r,t,a),r}}(e.id,o.component,n));const a=t.get("editor",e.id);return(null==a?void 0:a.component)&&(i.editor=function(e,t,n){return{type:"custom",renderer:i=>{const r=document.createElement("div");r.style.display="contents";const o=`editor:${e}`,a={value:i.value,rowData:i.rowData,columnId:e,onCommit:i.onCommit,onCancel:i.onCancel};return n.mount(o,r,t,a),r},destroy:()=>{n.unmount(`editor:${e}`)}}}(e.id,a.component,n)),i})}const M=[["row:click","onRowClick"],["row:dblclick","onRowDblclick"],["row:pinned","onRowPinned"],["row:unpinned","onRowUnpinned"],["row:reordered","onRowReordered"],["cell:click","onCellClick"],["cell:dblclick","onCellDblclick"],["cell:change","onCellChange"],["cell:beforeEdit","onCellBeforeEdit"],["cell:editCommitting","onCellEditCommitting"],["cell:editCommitted","onCellEditCommitted"],["cell:tooltip","onCellTooltip"],["selection:changed","onSelectionChanged"],["column:resize","onColumnResize"],["column:reorder","onColumnReorder"],["column:pin","onColumnPin"],["column:visibility","onColumnVisibility"],["sort:changed","onSortChanged"],["header:click","onHeaderClick"],["header:sortClick","onHeaderSortClick"],["header:filterClick","onHeaderFilterClick"],["filter:changed","onFilterChanged"],["scroll","onScroll"],["scroll:endReached","onEndReached"],["undo:stateChange","onUndoStateChange"],["clipboard:copy","onClipboardCopy"],["clipboard:paste","onClipboardPaste"],["validation:changed","onValidationChanged"],["columnGroup:toggle","onColumnGroupToggle"],["contextmenu","onContextMenu"],["rowGroup:toggle","onGroupToggle"],["rowGroup:batchToggle","onGroupBatchToggle"]],T=[["tool-left","toolLeft"],["tool-items","toolItems"],["option-popup","optionPopup"],["tool-bottom","toolBottom"],["notification","notification"],["footer","footer"],["empty-state","emptyStateContent"]],I=s.forwardRef(function(e,t){const n=s.useRef(null),i=s.useRef(null),r=s.useRef(null),o=w(),u=s.useRef(o);u.current=o;const c=s.useRef([]),d=s.useRef({disabled:!0,hasItem:!1}),h=s.useRef(new Set),p=e=>{d.current=e,h.current.forEach(e=>e())},f=s.useRef(e);f.current=e;const g=s.useRef(void 0),m=s.useRef(void 0),y=s.useRef(null),[x,_]=s.useState(0),b=()=>{var e;const t=f.current,n=r.current,i=null==(e=t.coreConfig)?void 0:e.fields;if(n&&i!==g.current){const e=C();for(const[n,i]of Object.entries(t.cellTemplates??{}))e.register({type:"cell",fieldId:n,component:i});for(const[n,i]of Object.entries(t.headerTemplates??{}))e.register({type:"header",fieldId:n,component:i});for(const[n,i]of Object.entries(t.editorTemplates??{}))e.register({type:"editor",fieldId:n,component:i});g.current=i,m.current=i?S(i,e,n):void 0}const o={...t.coreConfig??{}},a=m.current;return a&&(o.fields=a),void 0!==t.locale&&(o.locale=t.locale),o},I=()=>{const e=n.current;if(!e)return;const t=new v;t.setContextWrapper(u.current),r.current=t,g.current=void 0,m.current=void 0;const o=new l.GridChrome(e,b(),(e=>{const t=f.current,n={};for(const[i,r]of T)null!=t[r]&&(n[i]=t=>{const n=`slot:${i}`,o="tool-items"===i?()=>{const[,e]=s.useState(0);s.useEffect(()=>{const t=()=>e(e=>e+1);return h.current.add(t),()=>{h.current.delete(t)}},[]);const t=f.current.toolItems;return a.jsx(a.Fragment,{children:("function"==typeof t?t(d.current):t)??null})}:()=>a.jsx(a.Fragment,{children:f.current[r]??null});return e.mount(n,t,o,{}),()=>e.unmount(n)});return{useToolBox:t.useToolBox,useToolBoxSetting:t.useToolBoxSetting,useExtendFooter:t.useExtendFooter,useSummaryFooter:t.useSummaryFooter,useSort:t.useSort,useCustomCell:t.useCustomCell,useContextMenu:t.useContextMenu,useBuiltinTooltip:t.useBuiltinTooltip,usePivot:t.usePivot,usePivotBar:t.usePivotBar,useRowGroupSettings:t.useRowGroupSettings,useFieldSettings:t.useFieldSettings,useFormatSettings:t.useFormatSettings,useLayoutSettings:t.useLayoutSettings,useAggregateSettings:t.useAggregateSettings,useChart:t.useChart,useMultipleChart:t.useMultipleChart,chartIncludeGrandTotal:t.chartIncludeGrandTotal,chartMap:t.chartMap,loading:t.loading,locale:t.locale,sourceFields:t.sourceFields,contextMenuConfig:t.contextMenuConfig,emptyState:t.emptyState,slots:n,onToolItemsPropsChange:e=>p(e)}})(t));i.current=o,o.on("data:loaded",()=>{var e,t;return null==(t=(e=f.current).onDataLoaded)?void 0:t.call(e)});const x=o.on.bind(o);for(const[n,i]of M)x(n,e=>{var t,n;return null==(n=(t=f.current)[i])?void 0:n.call(t,e)});c.current.push(o.onConfigChange(()=>{var e,t;const n=f.current.coreConfig;null==(t=(e=f.current).onCoreConfigChange)||t.call(e,o.getCoreConfig(n))}));const _=y.current;y.current=null,o.ready().then(async()=>{var e,t;_&&await o.restoreReinitState(_),p(o.getToolItemsProps()),null==(t=(e=f.current).onReady)||t.call(e,o.grid,o)})};s.useEffect(()=>{var e;null==(e=r.current)||e.setContextWrapper(o)},[o]),s.useEffect(()=>(I(),()=>{var e,t;for(const n of c.current)try{n()}catch{}c.current=[],null==(e=i.current)||e.destroy(),i.current=null,null==(t=r.current)||t.unmountAll(),r.current=null}),[x]),s.useEffect(()=>{const e=i.current;if(!e)return;const{reinitRequired:t}=e.reconcileCoreConfig(b());t&&(y.current=e.captureReinitState(),_(e=>e+1))}),s.useEffect(()=>{var t;null==(t=i.current)||t.setUIOptions({useToolBox:e.useToolBox,useToolBoxSetting:e.useToolBoxSetting,useExtendFooter:e.useExtendFooter,useSummaryFooter:e.useSummaryFooter,useSort:e.useSort,useCustomCell:e.useCustomCell,useContextMenu:e.useContextMenu,useBuiltinTooltip:e.useBuiltinTooltip,usePivot:e.usePivot,usePivotBar:e.usePivotBar,useRowGroupSettings:e.useRowGroupSettings,useFieldSettings:e.useFieldSettings,useFormatSettings:e.useFormatSettings,useLayoutSettings:e.useLayoutSettings,useAggregateSettings:e.useAggregateSettings,loading:e.loading})},[e.useToolBox,e.useToolBoxSetting,e.useExtendFooter,e.useSummaryFooter,e.useSort,e.useCustomCell,e.useContextMenu,e.useBuiltinTooltip,e.usePivot,e.usePivotBar,e.useRowGroupSettings,e.useFieldSettings,e.useFormatSettings,e.useLayoutSettings,e.useAggregateSettings,e.loading]),s.useEffect(()=>{var t;null==(t=i.current)||t.setContextMenuConfig(e.contextMenuConfig)},[e.contextMenuConfig]),s.useImperativeHandle(t,()=>new Proxy({},{get(e,t){if("chrome"===t)return i.current;const n=i.current;if(!n)return;const r=n[t];return"function"==typeof r?r.bind(n):r},has:(e,t)=>"chrome"===t||!!i.current&&t in i.current}),[]);const D=e.height,k={height:"number"==typeof D?`${D}px`:D??"100%",width:"100%",overflow:"hidden"};return a.jsx("div",{ref:n,className:"moz-grid-chrome",style:k})});function D(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=D(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function k(...e){return function(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=D(e))&&(i&&(i+=" "),i+=t);return i}(e)}function A(e,t=16){return e/t}let E=0;function N(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replace(new RegExp(`\\{${t}\\}`,"g"),String(n)),e)}const L=s.createContext(null),P=s.createContext(null),O=s.createContext(null),R=s.createContext(null),F=s.createContext(null),z=s.createContext(null),V=s.createContext(null),B=s.createContext(null),j=["keyFields","theme","rowHeight","headerHeight","showHeader","resizableColumns","reorderableColumns","showRowHeader","rowHeader","rowSelection","cellSelection","cellSelectionImpliesRows","rowModel","endReachedThresholdRows","editable","tooltipMode","alternatingRows","autoFitColumns","dynamicRowHeights","reorderableRows","locale","engine","useWorker","loader","preventKeyEdit","showStatusBar","showDragHandleColumn","undoStack","formatRow","translations","rowStyle","headerStyle","rowHeightChangeThreshold"],G=["columnGroups","rowTemplate"],W={group:"rowGroupConfig"},H=["data:loaded","row:click","row:dblclick","row:pinned","row:unpinned","row:reordered","cell:click","cell:dblclick","cell:change","cell:beforeEdit","cell:editCommitting","cell:editCommitted","cell:tooltip","selection:changed","column:resize","column:reorder","column:pin","column:visibility","sort:changed","filter:changed","scroll","scroll:endReached","undo:stateChange","clipboard:copy","clipboard:paste","validation:changed","columnGroup:toggle","contextmenu"],U={"data:loaded":"onDataLoaded","row:click":"onRowClick","row:dblclick":"onRowDblclick","row:pinned":"onRowPinned","row:unpinned":"onRowUnpinned","row:reordered":"onRowReordered","cell:click":"onCellClick","cell:dblclick":"onCellDblclick","cell:change":"onCellChange","cell:beforeEdit":"onCellBeforeEdit","cell:editCommitting":"onCellEditCommitting","cell:editCommitted":"onCellEditCommitted","cell:tooltip":"onCellTooltip","selection:changed":"onSelectionChanged","column:resize":"onColumnResize","column:reorder":"onColumnReorder","column:pin":"onColumnPin","column:visibility":"onColumnVisibility","sort:changed":"onSortChanged","filter:changed":"onFilterChanged",scroll:"onScroll","scroll:endReached":"onEndReached","undo:stateChange":"onUndoStateChange","clipboard:copy":"onClipboardCopy","clipboard:paste":"onClipboardPaste","validation:changed":"onValidationChanged","columnGroup:toggle":"onColumnGroupToggle","rowGroup:toggle":"onGroupToggle","rowGroup:batchToggle":"onGroupBatchToggle",contextmenu:"onContextMenu"};function Y(){return s.useContext(L)}let Z=!1;function X(){const e=Y();s.useEffect(()=>{if(function(){if(Z)return;Z=!0;const e=document.createElement("style");e.textContent="\n.ps-search-hl {\n background-color: #d1ee12;\n color: inherit;\n border-radius: 1px;\n}\n.ps-search-match-current .ps-search-hl {\n background-color: #76c690;\n color: #fff;\n}",document.head.appendChild(e)}(),!(null==e?void 0:e.on))return;const t=e.on("search:highlighted",()=>function(e){var t;const n=null==(t=e.getSearchState)?void 0:t.call(e),i=e.container;if(!i||!n)return;const r=new Set;if(i.querySelectorAll("mark.ps-search-hl").forEach(e=>{const t=e.parentElement;t&&r.add(t)}),r.forEach(e=>{e.textContent=e.textContent??""}),!n.keyword)return;const o=n.keyword.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`(${o})`,"gi"),s=Array.from(i.querySelectorAll(".ps-search-match .ps-cell-content"));for(const l of s){if(l.children.length>0)continue;const e=(l.textContent??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),t=e.replace(a,'<mark class="ps-search-hl">$&</mark>');t!==e&&(l.innerHTML=t)}}(e));return()=>null==t?void 0:t()},[e])}const q=s.forwardRef(function(e,t){const{fields:n,data:i,mode:r="flat",pivotRowFields:o,pivotColumnFields:l,pivotValueFields:u,height:c="100%",children:d,...h}=e,f={...e,height:c,mode:r,showHeader:h.showHeader??!0,resizableColumns:h.resizableColumns??!0,reorderableColumns:h.reorderableColumns??!0,editable:h.editable??!1,tooltipMode:h.tooltipMode??"overflow",alternatingRows:h.alternatingRows??!0,dynamicRowHeights:h.dynamicRowHeights??!1,reorderableRows:h.reorderableRows??!1,rowHeight:h.rowHeight??32,headerHeight:h.headerHeight??32,cellSelection:h.cellSelection??{mode:"range"}},g=_(),m=w(),y=s.useRef(null),b=s.useRef(null),M=s.useRef(new v),T=s.useRef(C()),I=s.useRef(f);I.current=f;const[D,k]=s.useState(!1),[A,E]=s.useState(null),N=s.useContext(V),F=s.useRef(N);F.current=N,s.useEffect(()=>(M.current.setContextWrapper(e=>{const t=a.jsx(x.Provider,{value:g,children:e});return m?m(t):t}),()=>M.current.setContextWrapper(null)),[g,m]);const z=s.useCallback(()=>{const e={},t=I.current;"pivot"===t.mode?(e.mode="pivot",e.rowFields=t.pivotRowFields??[],e.columnFields=t.pivotColumnFields??[],e.valueFields=t.pivotValueFields??[]):e.fields=S(t.fields,T.current,M.current);for(const n of j){const i=t[n];void 0!==i&&(e[n]=i)}if("pivot"!==t.mode){for(const n of G){const i=t[n];void 0!==i&&(e[n]=i)}for(const[n,i]of Object.entries(W)){const r=t[n];void 0!==r&&(e[i]=r)}}return e},[]);s.useEffect(()=>{if(!y.current)return;let e=!1;const t=[];return(async()=>{var n,i,r;const o=new p.PureSheet(y.current,z());for(const e of H){const n=U[e],i=o.on(e,e=>{const t=I.current[n];null==t||t(e)});t.push(i)}null==(n=F.current)||n.setGrid(o),await o.waitForReady(),e?o.destroy():(b.current=o,o.setStatusBarVisible(!1),E(o),k(!0),I.current.data&&I.current.data.length>0&&await o.loadData(I.current.data),null==(r=(i=I.current).onReady)||r.call(i,o))})(),()=>{var n;e=!0;for(const e of t)e();M.current.unmountAll(),null==(n=F.current)||n.destroy(),b.current&&(b.current.destroy(),b.current=null),E(null),k(!1)}},[]),s.useEffect(()=>{D&&b.current&&i&&b.current.loadData(i).catch(e=>{})},[i,D]),s.useEffect(()=>{if(!D||!b.current)return;const e=S(n,T.current,M.current);b.current.updateFields(e)},[n,D]),s.useImperativeHandle(t,()=>({get grid(){return b.current},refresh:async()=>{var e;await(null==(e=b.current)?void 0:e.refresh())},loadData:async e=>{var t;await(null==(t=b.current)?void 0:t.loadData(e))},sort:async e=>{var t;await(null==(t=b.current)?void 0:t.sort(e))},filter:async e=>{var t;await(null==(t=b.current)?void 0:t.filter(e))},destroy:()=>{var e;M.current.unmountAll(),null==(e=b.current)||e.destroy(),b.current=null,E(null),k(!1)}}),[]);const B=s.useMemo(()=>({height:"number"==typeof c?`${c}px`:c,width:"100%",position:"relative"}),[c]);return a.jsx(L.Provider,{value:A,children:a.jsx(P.Provider,{value:y,children:a.jsx(O.Provider,{value:M.current,children:a.jsxs(R.Provider,{value:T.current,children:[a.jsx("div",{ref:y,style:B,className:"moz-r-grid-container"}),a.jsx($,{}),d]})})})})});function $(){return X(),null}function K(e){switch(e){case"text":return"moz-r-text-button";case"outline":return"moz-r-outline-button";case"icon":return"moz-r-icon-button";case"icon-accent":return"moz-r-icon-button moz-r-icon-accent-button";case"no-interaction":return"moz-r-icon-button moz-r-no-interaction-button";default:return"moz-r-default-button"}}function J(e){const{action:t,text:n,type:i="default",width:r,loading:o=!1,disabled:l=!1,icon:u,children:c,onClick:d,style:h,className:p,...f}=e,[g,m]=s.useState(o);s.useEffect(()=>{m(o)},[o]);const v="number"==typeof r?`${A(r)}rem`:r,y=!!u,x={...h,...v?{width:v,minWidth:v}:{}};return a.jsxs("button",{type:"button",className:k("moz-r-button",K(i),{"is-loading":g,"is-disabled":l,"moz-r-icon-text-button":y},p),disabled:l||g,style:x,onClick:e=>{null==d||d(e),"Search"!==t||o||(m(!0),Promise.resolve().then(()=>m(!1)))},...f,children:[g?a.jsx("span",{className:"moz-r-button__spinner","aria-hidden":!0,children:a.jsx(Q,{})}):u,(c||n)&&a.jsxs("span",{className:k("moz-r-button__text",{"has-icon-text":y}),children:[n,c]})]})}function Q(){return a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"rgba(69,104,224,0.15)",strokeWidth:"2"}),a.jsx("path",{d:"M8 1 a7 7 0 0 1 7 7",fill:"none",stroke:"#4568e0",strokeWidth:"2",strokeLinecap:"round",children:a.jsx("animateTransform",{attributeName:"transform",type:"rotate",from:"0 8 8",to:"360 8 8",dur:"0.7s",repeatCount:"indefinite"})})]})}q.displayName="MozGridReactCore";const ee={10:{width:10,height:10},12:{width:12,height:12},14:{width:14,height:14},16:{width:16,height:16},18:{width:18,height:18},20:{width:20,height:20},22:{width:22,height:22},30:{width:30,height:30}};function te(e,t){return"number"==typeof e?{width:e,height:e}:ee[e]??ee[t]}function ne({size:e="12",color:t="#8998b5",thin:n=!1,...i}){const r=te(e,"12");return n?a.jsx("svg",{width:r.width,height:r.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:a.jsx("path",{d:"M12.6679 10.3144L7.94084 5.70239L3.33203 10.3144",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 12 12",fill:"none",...i,children:a.jsx("path",{d:"M9.50095 7.73636L5.95563 4.27734L2.49902 7.73636",stroke:t,strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function ie({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:i.width,height:i.height,viewBox:"0 0 14 14",fill:"none",...n,children:a.jsx("path",{d:"M1.8459 2.72595C3.18952 4.45891 5.6739 7.67072 5.6739 7.67072V11.6819C5.6739 11.8588 5.74385 12.0284 5.86848 12.1539C5.99312 12.2794 6.16232 12.3504 6.33916 12.3516H7.67078C7.84762 12.3504 8.01683 12.2794 8.14146 12.1539C8.2661 12.0284 8.33605 11.8588 8.33605 11.6819V7.67072C8.33605 7.67072 10.8128 4.45891 12.1531 2.72595C12.2297 2.62769 12.2772 2.51 12.2903 2.38616C12.3034 2.26232 12.2816 2.13728 12.2274 2.02518C12.1731 1.91308 12.0886 1.81839 11.9834 1.75181C11.8781 1.68523 11.7564 1.64943 11.6318 1.64844H2.37157C2.24667 1.64862 2.12433 1.68384 2.01846 1.75009C1.91258 1.81635 1.82742 1.91098 1.77266 2.02323C1.71789 2.13549 1.69573 2.26085 1.70867 2.38508C1.72162 2.5093 1.76917 2.6274 1.8459 2.72595Z",stroke:t,strokeWidth:"1.4",strokeLinejoin:"round"})})}function re({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsxs("svg",{width:i.width,height:i.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[a.jsx("path",{d:"M14.1999 8C14.1999 5.10051 11.8494 2.75 8.94989 2.75C6.0504 2.75 3.69989 5.1005 3.69989 8C3.69989 8.29896 3.72445 8.5916 3.77216 8.87598C3.84069 9.28446 3.5654 9.6707 3.15692 9.73926C2.74842 9.80779 2.36218 9.53252 2.29364 9.12402C2.23223 8.75798 2.19989 8.38246 2.19989 8C2.19989 4.27208 5.22197 1.25 8.94989 1.25C12.6779 1.25 15.6999 4.27207 15.6999 8C15.6999 11.7279 12.6779 14.75 8.94989 14.75C7.39031 14.75 5.95244 14.2201 4.80927 13.3311C4.48231 13.0768 4.42313 12.6053 4.67743 12.2783C4.93176 11.9515 5.40325 11.8922 5.73017 12.1465C6.61941 12.8381 7.73538 13.25 8.94989 13.25C11.8494 13.25 14.1999 10.8995 14.1999 8Z",fill:t}),a.jsx("path",{d:"M4.46967 7.46973C4.76256 7.17683 5.23732 7.17683 5.53022 7.46973C5.82311 7.76262 5.82311 8.23738 5.53022 8.53027L3.67182 10.3887C3.30083 10.7597 2.69906 10.7597 2.32807 10.3887L0.46967 8.53027C0.176777 8.23738 0.176777 7.76262 0.46967 7.46973C0.762563 7.17683 1.23732 7.17683 1.53022 7.46973L2.99994 8.93945L4.46967 7.46973Z",fill:t})]})}function oe({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M7.72475 13.9199H6.33338C5.91819 13.9199 5.80747 13.812 5.10579 12.0442L4.79116 11.9136C3.13038 12.6845 2.9297 12.7186 2.61969 12.4072L1.63429 11.4214C1.34135 11.1234 1.34089 10.9693 2.09562 9.22499L1.96737 8.91405C0.261842 8.28895 0.0800781 8.1607 0.0800781 7.72475V6.332C0.0800781 5.9168 0.188952 5.80747 1.95768 5.10671L2.08732 4.79347C1.32566 3.14514 1.28599 2.92555 1.59646 2.61738L2.57817 1.63475C2.87111 1.34043 3.02658 1.33904 4.77501 2.09285L5.08641 1.9646C5.71243 0.261842 5.83976 0.0800781 6.27525 0.0800781H7.66662C8.08181 0.0800781 8.19253 0.188952 8.89421 1.95768L9.20792 2.08732C10.8512 1.32566 11.0703 1.2883 11.3762 1.59231L12.3629 2.57632C12.6587 2.87204 12.6591 3.02612 11.9044 4.77455L12.034 5.08826C13.7386 5.71151 13.9199 5.83838 13.9199 6.27479V7.66662C13.9199 8.08181 13.812 8.19207 12.0419 8.89468L11.9127 9.20792C11.9127 9.20792 12.7163 11.0721 12.4068 11.3808L11.4214 12.3657C11.1243 12.6568 10.9697 12.6591 9.22637 11.9044L8.91313 12.0349C8.28849 13.7382 8.1607 13.9199 7.72475 13.9199ZM6.66738 12.7606H7.38198C7.52038 12.4441 7.73628 11.8809 7.91158 11.3983C7.93915 11.3228 7.98207 11.2537 8.03766 11.1956C8.09324 11.1375 8.16027 11.0915 8.23451 11.0606L9.01047 10.7404C9.08213 10.7103 9.1592 10.6951 9.23695 10.6958C9.3147 10.6965 9.39148 10.7131 9.46257 10.7446C9.94466 10.9531 10.513 11.1879 10.8387 11.3083L11.3462 10.8032C11.2179 10.483 10.9739 9.9322 10.7571 9.46534C10.723 9.3927 10.7044 9.31378 10.7024 9.23358C10.7004 9.15337 10.7151 9.07363 10.7455 8.9994L11.0643 8.22344C11.0941 8.15147 11.138 8.0862 11.1935 8.03152C11.2489 7.97684 11.3148 7.93386 11.3872 7.90513C11.8762 7.71183 12.446 7.47563 12.7611 7.33031V6.61802C12.4437 6.47962 11.8822 6.26603 11.3997 6.09072C11.324 6.06324 11.2548 6.02036 11.1965 5.96477C11.1382 5.90919 11.0921 5.84211 11.0611 5.76779L10.7414 4.99092C10.7119 4.91906 10.6971 4.84202 10.698 4.76435C10.6989 4.68668 10.7153 4.60999 10.7464 4.53881C10.955 4.05673 11.1898 3.48837 11.3102 3.16221L10.8027 2.65706C10.4826 2.78531 9.93174 3.02889 9.46488 3.24617C9.39225 3.28039 9.31325 3.29897 9.23298 3.30072C9.15272 3.30247 9.07298 3.28734 8.99893 3.25632L8.22298 2.93616C8.15107 2.90646 8.08589 2.86256 8.03135 2.80707C7.97681 2.75158 7.93404 2.68565 7.90559 2.61323C7.71275 2.12468 7.47655 1.55679 7.33169 1.2417H6.61802C6.47962 1.5591 6.26464 2.12145 6.08888 2.604C6.06138 2.67948 6.01847 2.74841 5.96287 2.80639C5.90727 2.86437 5.84021 2.91014 5.76595 2.94077L4.9923 3.2637C4.92039 3.29345 4.84323 3.30844 4.76541 3.30781C4.68759 3.30718 4.6107 3.29092 4.53928 3.26001C4.05673 3.04642 3.48791 2.8116 3.16267 2.69166L2.65521 3.19912C2.78254 3.52205 3.02704 4.07103 3.24341 4.53697C3.27724 4.60954 3.29561 4.68836 3.29736 4.76841C3.29911 4.84846 3.28419 4.92801 3.25355 5.00199L2.9357 5.77564C2.90614 5.84779 2.86229 5.91323 2.80679 5.96801C2.7513 6.02279 2.6853 6.06578 2.61277 6.09441C2.12422 6.28725 1.55633 6.52253 1.24032 6.66738V7.38244C1.55679 7.52084 2.12007 7.73674 2.60308 7.91205C2.67856 7.93954 2.74749 7.98246 2.80547 8.03805C2.86345 8.09365 2.90921 8.16072 2.93985 8.23497L3.26001 9.00862C3.28986 9.08052 3.30488 9.15771 3.30417 9.23556C3.30345 9.31341 3.28702 9.39031 3.25586 9.46165C3.04642 9.94374 2.8116 10.5121 2.6912 10.8382L3.19866 11.3457C3.51882 11.2165 4.06964 10.9734 4.53651 10.7566C4.60923 10.7222 4.68835 10.7035 4.76877 10.7016C4.84918 10.6996 4.9291 10.7146 5.00337 10.7455L5.78025 11.0685C5.85202 11.0982 5.91704 11.1421 5.97143 11.1976C6.02581 11.2531 6.06842 11.319 6.09672 11.3914C6.28955 11.879 6.52575 12.4469 6.67061 12.7615M7 9.61158C6.48363 9.6114 5.9789 9.45811 5.54964 9.17111C5.12038 8.88411 4.78585 8.47627 4.58834 7.99916C4.39084 7.52205 4.33924 6.9971 4.44006 6.49066C4.54087 5.98423 4.78959 5.51906 5.15475 5.15396C5.51991 4.78886 5.98512 4.54023 6.49158 4.43951C6.99803 4.33878 7.52297 4.39047 8.00005 4.58806C8.47712 4.78565 8.8849 5.12025 9.17183 5.54956C9.45876 5.97888 9.61195 6.48363 9.61204 7C9.61119 7.69245 9.3357 8.35629 8.84602 8.84588C8.35634 9.33548 7.69245 9.61085 7 9.61158ZM7 5.54866C6.71279 5.54893 6.43211 5.63436 6.19345 5.79415C5.95479 5.95393 5.76886 6.18089 5.65919 6.44634C5.54951 6.71178 5.521 7.00379 5.57726 7.28543C5.63353 7.56708 5.77205 7.82571 5.9753 8.02864C6.17855 8.23157 6.4374 8.36967 6.71914 8.42549C7.00087 8.48131 7.29283 8.45234 7.5581 8.34224C7.82337 8.23214 8.05004 8.04585 8.20944 7.80694C8.36884 7.56803 8.45383 7.28721 8.45364 7C8.45291 6.61491 8.29945 6.24583 8.02693 5.97374C7.75441 5.70166 7.38509 5.54878 7 5.54866Z",fill:t})})}function ae({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M4.77237 7.68506C4.56199 7.68506 4.38563 7.61939 4.24331 7.48803C4.10099 7.35667 4.02983 7.1939 4.02983 6.99972V2.76769L2.63757 4.05272C2.50143 4.17836 2.33127 4.24119 2.12707 4.24119C1.92287 4.24119 1.74652 4.17836 1.59801 4.05272C1.4495 3.91565 1.37524 3.75288 1.37524 3.5644C1.37524 3.37593 1.4495 3.21316 1.59801 3.07609L4.25259 0.625971C4.32685 0.557436 4.40729 0.508891 4.49392 0.480334C4.58055 0.451778 4.67337 0.4375 4.77237 0.4375C4.87138 0.4375 4.9642 0.451778 5.05083 0.480334C5.13746 0.508891 5.2179 0.557436 5.29215 0.625971L7.9653 3.09323C8.11381 3.2303 8.18497 3.39021 8.17879 3.57297C8.1726 3.75573 8.09525 3.91565 7.94674 4.05272C7.79823 4.17836 7.62497 4.24404 7.42696 4.24975C7.22895 4.25546 7.05569 4.18979 6.90718 4.05272L5.51492 2.76769V6.99972C5.51492 7.1939 5.44376 7.35667 5.30143 7.48803C5.15911 7.61939 4.98276 7.68506 4.77237 7.68506ZM9.22763 13.5619C9.12862 13.5619 9.0358 13.5477 8.94917 13.5191C8.86254 13.4905 8.7821 13.442 8.70785 13.3735L6.0347 10.9062C5.88619 10.7691 5.81503 10.6092 5.82121 10.4265C5.8274 10.2437 5.90475 10.0838 6.05326 9.94672C6.20177 9.82107 6.37503 9.75539 6.57304 9.74968C6.77105 9.74397 6.94431 9.80965 7.09282 9.94672L8.48508 11.2317V6.99972C8.48508 6.80553 8.55624 6.64276 8.69857 6.5114C8.84089 6.38005 9.01724 6.31437 9.22763 6.31437C9.43801 6.31437 9.61437 6.38005 9.75669 6.5114C9.89901 6.64276 9.97017 6.80553 9.97017 6.99972V11.2317L11.3624 9.94672C11.4986 9.82107 11.6687 9.75824 11.8729 9.75824C12.0771 9.75824 12.2535 9.82107 12.402 9.94672C12.5505 10.0838 12.6248 10.2466 12.6248 10.435C12.6248 10.6235 12.5505 10.7863 12.402 10.9233L9.74741 13.3735C9.67315 13.442 9.59271 13.4905 9.50608 13.5191C9.41945 13.5477 9.32663 13.5619 9.22763 13.5619Z",fill:t})})}function se({size:e="16",color:t="#8998B5",...n}){const i="number"==typeof e?e:Number(e);return a.jsx("svg",{width:i,height:i,viewBox:"-0.3 -0.5 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M10.7413 0.764771C11.7612 -0.255002 13.4148 -0.254833 14.4347 0.764771C15.4546 1.78472 15.4546 3.43916 14.4347 4.45911L12.8624 6.03137L14.0929 7.26282C14.7351 7.905 14.7351 8.9468 14.0929 9.58899L13.0675 10.6144C12.5962 11.0857 11.9101 11.2099 11.3243 10.9894L7.59583 14.7189C6.95371 15.361 5.91183 15.3608 5.26965 14.7189L0.481567 9.93079C-0.160579 9.28859 -0.160616 8.24678 0.481567 7.60461L4.21106 3.87512C3.99088 3.28958 4.11412 2.6041 4.58508 2.13293L5.61145 1.10657C6.25363 0.464545 7.29549 0.464475 7.93762 1.10657L9.16809 2.33801L10.7413 0.764771ZM1.43958 8.56262C1.32625 8.67594 1.32628 8.85945 1.43958 8.97278L2.32825 9.86145L3.21692 8.97278C3.48129 8.7084 3.91049 8.70852 4.17493 8.97278C4.43935 9.23721 4.43935 9.66636 4.17493 9.93079L3.28625 10.8195L4.38 11.9132L6.29504 9.99915C6.55947 9.73472 6.98863 9.73472 7.25305 9.99915C7.51733 10.2636 7.51743 10.6928 7.25305 10.9572L5.33801 12.8712L6.22766 13.7609C6.341 13.874 6.52456 13.8741 6.63782 13.7609L10.2618 10.1359L5.0636 4.93762L1.43958 8.56262ZM13.4777 1.72278C12.9866 1.23172 12.1904 1.23177 11.6993 1.72278L9.68176 3.74036C9.39848 4.0235 8.93868 4.0235 8.6554 3.74036L6.97961 2.06458C6.86634 1.95135 6.68278 1.95142 6.56946 2.06458L5.54309 3.09094C5.43002 3.20427 5.4299 3.38784 5.54309 3.5011L11.6993 9.65637C11.8127 9.7697 11.9962 9.7697 12.1095 9.65637L13.1349 8.63098C13.2482 8.51765 13.2482 8.33415 13.1349 8.22083L11.4591 6.54504C11.176 6.26178 11.1761 5.80195 11.4591 5.51868L13.4777 3.5011C13.9686 3.01006 13.9685 2.21385 13.4777 1.72278Z",fill:t})})}function le({size:e="16",color:t="#8998B5",...n}){const i=te(e,"16");return a.jsxs("svg",{width:i.width,height:i.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[a.jsx("path",{d:"M4.5 7.5L2 5L4.5 2.5",stroke:t,strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M2 5H10C12.2091 5 14 6.79086 14 9C14 11.2091 12.2091 13 10 13H5",stroke:t,strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ue({size:e="16",color:t="#8998B5",...n}){const i=te(e,"16");return a.jsxs("svg",{width:i.width,height:i.height,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[a.jsx("path",{d:"M11.5 7.5L14 5L11.5 2.5",stroke:t,strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M14 5H6C3.79086 5 2 6.79086 2 9C2 11.2091 3.79086 13 6 13H11",stroke:t,strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ce({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=te(e,"12"),o=n?"#a7b1bc":t;return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 12 12",fill:"none",...i,children:[a.jsx("path",{d:"M6.24497 8.37401L8.19097 6.42801C8.24107 6.3796 8.27555 6.31731 8.28995 6.24915C8.30435 6.18098 8.29802 6.11007 8.27178 6.04553C8.24553 5.981 8.20057 5.9258 8.14269 5.88703C8.0848 5.84826 8.01664 5.82771 7.94697 5.82801H6.69697V0.947009C6.69697 0.761358 6.62322 0.58331 6.49194 0.452035C6.36067 0.320759 6.18262 0.247009 5.99697 0.247009C5.81132 0.247009 5.63327 0.320759 5.50199 0.452035C5.37072 0.58331 5.29697 0.761358 5.29697 0.947009V5.82801H4.05397C3.98489 5.82717 3.91715 5.84709 3.85951 5.88519C3.80188 5.92329 3.75702 5.97782 3.73073 6.04171C3.70444 6.1056 3.69794 6.17591 3.71207 6.24353C3.7262 6.31116 3.7603 6.37299 3.80997 6.42101L5.75697 8.36701C5.78841 8.39976 5.82603 8.42595 5.86767 8.44405C5.9093 8.46215 5.95411 8.47181 5.99951 8.47246C6.0449 8.47311 6.08997 8.46474 6.13211 8.44784C6.17424 8.43094 6.21261 8.40585 6.24497 8.37401Z",fill:o,stroke:o,strokeWidth:"0.2"}),a.jsx("path",{d:"M0.748 10.505C0.334891 10.505 0 10.8397 0 11.2525C0 11.6653 0.334891 12 0.748 12H11.252C11.6651 12 12 11.6653 12 11.2525C12 10.8397 11.6651 10.505 11.252 10.505H0.748Z",fill:"white"}),a.jsx("path",{d:"M0.748024 11.155C0.693901 11.155 0.650024 11.1987 0.650024 11.2525C0.650024 11.3064 0.693901 11.35 0.748024 11.35H11.252C11.3061 11.35 11.35 11.3064 11.35 11.2525C11.35 11.1987 11.3061 11.155 11.252 11.155H0.748024Z",stroke:o,strokeWidth:"1.3"})]})}function de({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=te(e,"12"),o=n?"#a7b1bc":t;return r.width<=13?a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 12 12",fill:"none",...i,children:a.jsx("path",{d:"M10.293 11.375L7.71099 8.79103C6.76581 9.4655 5.60162 9.76002 4.44941 9.61616C3.29719 9.4723 2.24116 8.90058 1.49082 8.01442C0.740489 7.12825 0.350682 5.99242 0.398745 4.83225C0.446808 3.67209 0.929227 2.57239 1.75029 1.75133C2.57135 0.930264 3.67106 0.447845 4.83122 0.399783C5.99138 0.35172 7.12722 0.741526 8.01338 1.49186C8.89954 2.2422 9.47126 3.29823 9.61512 4.45044C9.75898 5.60265 9.46446 6.76684 8.78999 7.71203L11.373 10.294C11.5163 10.4374 11.5969 10.6318 11.5969 10.8345C11.5969 11.0373 11.5163 11.2317 11.373 11.375C11.2296 11.5184 11.0352 11.5989 10.8325 11.5989C10.6298 11.5989 10.4363 11.5184 10.293 11.375ZM1.92899 5.02703C1.92899 5.64015 2.1108 6.2395 2.45144 6.7493C2.79207 7.25909 3.27622 7.65642 3.84267 7.89106C4.40912 8.12569 5.03243 8.18708 5.63377 8.06746C6.23511 7.94785 6.78748 7.6526 7.22102 7.21906C7.65457 6.78552 7.94981 6.23315 8.06943 5.63181C8.18904 5.03047 8.12765 4.40716 7.89302 3.84071C7.65839 3.27426 7.26105 2.79011 6.75126 2.44947C6.24147 2.10884 5.64211 1.92703 5.02899 1.92703C4.20682 1.92703 3.41832 2.25364 2.83696 2.835C2.2556 3.41636 1.92899 4.20486 1.92899 5.02703Z",fill:o})}):a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 14 14",fill:"none",...i,children:a.jsx("path",{d:"M5.84944 0.402344C2.83893 0.402344 0.398438 2.84284 0.398438 5.85334C0.398438 8.86385 2.83893 11.3043 5.84944 11.3043C7.0308 11.3043 8.12438 10.9285 9.01716 10.29L12.0619 13.3347C12.4134 13.6862 12.9832 13.6862 13.3347 13.3347C13.6862 12.9832 13.6862 12.4134 13.3347 12.0619L10.2893 9.01651C10.9259 8.12457 11.3004 7.03269 11.3004 5.85334C11.3004 2.84284 8.85994 0.402344 5.84944 0.402344ZM2.19844 5.85334C2.19844 3.83695 3.83305 2.20234 5.84944 2.20234C7.86583 2.20234 9.50044 3.83695 9.50044 5.85334C9.50044 7.86974 7.86583 9.50434 5.84944 9.50434C3.83305 9.50434 2.19844 7.86974 2.19844 5.85334Z",fill:o})})}function he({size:e="10",color:t="#8998b5",disabled:n=!1,thin:i=!1,...r}){const o=te(e,"10"),s=n?"#a7b1bc":t;return o.width<=10?a.jsxs("svg",{width:o.width,height:o.height,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[a.jsx("path",{d:"M8.5 1.5L1.49999 8.50001",stroke:s,strokeWidth:"1.75",strokeLinecap:"round"}),a.jsx("path",{d:"M1.5 1.5L8.50001 8.50001",stroke:s,strokeWidth:"1.75",strokeLinecap:"round"})]}):o.width<=13&&o.width>=11&&!i?a.jsxs("svg",{width:o.width,height:o.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[a.jsx("path",{d:"M1.71436 1.71428L10.8069 10.7926",stroke:s,strokeWidth:"2",strokeLinecap:"round"}),a.jsx("path",{d:"M10.8069 1.71428L1.71436 10.7926",stroke:s,strokeWidth:"2",strokeLinecap:"round"})]}):o.width<=13&&o.width>=11&&i?a.jsxs("svg",{width:o.width,height:o.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[a.jsx("path",{d:"M10.2 1.7998L1.79994 10.1998",stroke:s,strokeWidth:"1.6",strokeLinecap:"round"}),a.jsx("path",{d:"M1.79993 1.7998L10.1999 10.1998",stroke:s,strokeWidth:"1.6",strokeLinecap:"round"})]}):a.jsxs("svg",{width:o.width,height:o.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:[a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.29234 1.29345C1.68256 0.902618 2.31572 0.902121 2.70655 1.29234L13.3146 11.8837C13.7054 12.2739 13.7059 12.9071 13.3157 13.2979C12.9254 13.6887 12.2923 13.6892 11.9014 13.299L1.29345 2.70766C0.902618 2.31744 0.902121 1.68428 1.29234 1.29345Z",fill:s}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3157 1.29345C13.7059 1.68428 13.7054 2.31744 13.3146 2.70766L2.70655 13.299C2.31572 13.6892 1.68256 13.6887 1.29234 13.2979C0.902121 12.9071 0.902618 12.2739 1.29345 11.8837L11.9014 1.29234C12.2923 0.902121 12.9254 0.902618 13.3157 1.29345Z",fill:s})]})}function pe({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=te(e,"12"),o=n?"#a7b1bc":t;return r.width<=13?a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 12 12",...i,children:[a.jsx("path",{transform:"translate(6 1.424)",stroke:o,style:{strokeLinecap:"round",strokeWidth:"1.75px",fill:"none"},d:"M0 0v9.152"}),a.jsx("path",{transform:"translate(1.424 6)",stroke:o,style:{strokeLinecap:"round",strokeWidth:"1.75px",fill:"none"},d:"M0 0h9.152"})]}):a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 14 14",fill:"none",...i,children:[a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99998 1.1C7.49703 1.1 7.89998 1.50294 7.89998 2V12C7.89998 12.4971 7.49703 12.9 6.99998 12.9C6.50292 12.9 6.09998 12.4971 6.09998 12V2C6.09998 1.50294 6.50292 1.1 6.99998 1.1Z",fill:o}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.09998 7C1.09998 6.50294 1.50292 6.1 1.99998 6.1H12C12.497 6.1 12.9 6.50294 12.9 7C12.9 7.49705 12.497 7.9 12 7.9H1.99998C1.50292 7.9 1.09998 7.49705 1.09998 7Z",fill:o})]})}function fe({size:e="14",color:t="#A7B1BC",...n}){const i=te(e,"14");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M9.02197 2.91599L4.97803 7.05222L9.02197 11.0849",stroke:t,strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function ge({size:e="10",color:t="#8998b5",disabled:n=!1,...i}){const r=te(e,"10"),o=n?"#a7b1bc":t;return r.width<=10?a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:r.width,height:r.height,viewBox:"0 0 10 10",fill:"none",...i,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.72661 8.48896C3.41073 8.18004 3.40509 7.67354 3.71401 7.35766L6.04911 4.96997L3.72108 2.64854C3.40822 2.33656 3.4075 1.83003 3.71948 1.51717C4.03145 1.2043 4.53798 1.20359 4.85085 1.51556L7.73988 4.39642C8.0506 4.70626 8.05375 5.20855 7.74695 5.52226L4.85791 8.47636C4.54899 8.79224 4.04249 8.79788 3.72661 8.48896Z",fill:o})}):a.jsx("svg",{width:r.width,height:r.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.66551 6.42279C10.0106 6.77571 10.007 7.34071 9.65753 7.68925L5.61353 11.7223C5.26158 12.0732 4.69173 12.0725 4.34073 11.7205C3.98974 11.3686 3.99052 10.7987 4.34247 10.4477L7.75547 7.04401L4.33448 3.54519C3.98699 3.18979 3.9934 2.61998 4.3488 2.27248C4.7042 1.92498 5.27401 1.93139 5.62151 2.28679L9.66551 6.42279Z",fill:o})})}function me({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=te(e,"12"),o=n?"#a7b1bc":t;return a.jsx("svg",{width:r.width,height:r.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:a.jsx("path",{d:"M3.05618 7.9173L7.46067 12.4415C7.64045 12.6261 7.72659 12.8416 7.7191 13.0878C7.71161 13.334 7.61798 13.5494 7.4382 13.7341C7.25843 13.9034 7.04869 13.9918 6.80899 13.9995C6.56929 14.0072 6.35955 13.9187 6.17978 13.7341L0.247191 7.64031C0.157303 7.54798 0.093633 7.44795 0.0561798 7.34024C0.0187266 7.23252 0 7.11711 0 6.994C0 6.87089 0.0187266 6.75548 0.0561798 6.64776C0.093633 6.54004 0.157303 6.44002 0.247191 6.34769L6.17978 0.253908C6.34457 0.0846358 6.55056 0 6.79775 0C7.04494 0 7.25843 0.0846358 7.4382 0.253908C7.61798 0.438568 7.70787 0.657851 7.70787 0.911759C7.70787 1.16567 7.61798 1.38495 7.4382 1.56961L3.05618 6.0707H13.1011C13.3558 6.0707 13.5693 6.15918 13.7416 6.33615C13.9139 6.51311 14 6.7324 14 6.994C14 7.2556 13.9139 7.47488 13.7416 7.65185C13.5693 7.82882 13.3558 7.9173 13.1011 7.9173H3.05618Z",fill:o})})}function ve({size:e="30",color:t="#8998b5",...n}){const i="number"==typeof e?e:Number(e);return a.jsx("svg",{width:i,height:i,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30934 0.286082C5.69078 -0.0953606 6.30922 -0.0953606 6.69066 0.286082L11.7139 5.30934C12.0954 5.69078 12.0954 6.30922 11.7139 6.69066C11.3325 7.0721 10.714 7.0721 10.3326 6.69066L6.97674 3.33481V11.0233C6.97674 11.5627 6.53944 12 6 12C5.46056 12 5.02326 11.5627 5.02326 11.0233V3.33481L1.66741 6.69066C1.28596 7.0721 0.667524 7.0721 0.286082 6.69066C-0.0953606 6.30922 -0.0953606 5.69078 0.286082 5.30934L5.30934 0.286082Z",fill:t})})}function ye({size:e="30",color:t="#8998b5",...n}){const i="number"==typeof e?e:Number(e);return a.jsx("svg",{width:i,height:i,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.30934 11.7139C5.69078 12.0954 6.30922 12.0954 6.69066 11.7139L11.7139 6.69066C12.0954 6.30922 12.0954 5.69078 11.7139 5.30934C11.3325 4.9279 10.714 4.9279 10.3326 5.30934L6.97674 8.66519V0.9767C6.97674 0.4373 6.53944 0 6 0C5.46056 0 5.02326 0.4373 5.02326 0.9767V8.66519L1.66741 5.30934C1.28596 4.9279 0.667524 4.9279 0.286082 5.30934C-0.0953606 5.69078 -0.0953606 6.30922 0.286082 6.69066L5.30934 11.7139Z",fill:t})})}function xe({size:e="10",color:t="#8998b5",...n}){const i=te(e,"10");return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:i.width,height:i.height,viewBox:"0 0 10 10",fill:"none",...n,children:[a.jsx("path",{d:"M7.69601 1.776C7.69601 1.97002 7.63848 2.15969 7.53068 2.32101C7.42289 2.48234 7.26968 2.60807 7.09042 2.68232C6.91117 2.75657 6.71392 2.776 6.52363 2.73815C6.33333 2.7003 6.15853 2.60687 6.02134 2.46967C5.88414 2.33247 5.79071 2.15768 5.75286 1.96738C5.71501 1.77709 5.73443 1.57984 5.80868 1.40059C5.88293 1.22133 6.00867 1.06812 6.17 0.960326C6.33132 0.852533 6.52099 0.794998 6.71501 0.794998C6.97519 0.794998 7.22471 0.898353 7.40868 1.08233C7.59265 1.2663 7.69601 1.51582 7.69601 1.776Z",fill:t}),a.jsx("path",{d:"M4.264 1.776C4.264 1.97002 4.20647 2.15969 4.09867 2.32101C3.99088 2.48234 3.83767 2.60807 3.65841 2.68232C3.47916 2.75657 3.28191 2.776 3.09162 2.73815C2.90132 2.7003 2.72653 2.60687 2.58933 2.46967C2.45214 2.33247 2.3587 2.15768 2.32085 1.96738C2.283 1.77709 2.30243 1.57984 2.37668 1.40059C2.45093 1.22133 2.57666 1.06812 2.73799 0.960326C2.89931 0.852533 3.08898 0.794998 3.283 0.794998C3.54318 0.794998 3.7927 0.898353 3.97667 1.08233C4.16065 1.2663 4.264 1.51582 4.264 1.776Z",fill:t}),a.jsx("path",{d:"M7.69601 5C7.69601 5.19406 7.63845 5.38377 7.53061 5.54512C7.42277 5.70646 7.2695 5.8322 7.09019 5.90642C6.91088 5.98064 6.71358 6.00001 6.52326 5.96207C6.33293 5.92414 6.15814 5.83061 6.02098 5.69332C5.88383 5.55602 5.79048 5.38113 5.75274 5.19077C5.715 5.00041 5.73457 4.80313 5.80897 4.62389C5.88337 4.44465 6.00927 4.29151 6.17072 4.18384C6.33218 4.07617 6.52194 4.0188 6.71601 4.019C6.97619 4.019 7.22571 4.12235 7.40968 4.30633C7.59365 4.4903 7.69601 4.73982 7.69601 5Z",fill:t}),a.jsx("path",{d:"M4.264 5C4.264 5.19406 4.20644 5.38377 4.0986 5.54512C3.99077 5.70646 3.8375 5.8322 3.65818 5.90642C3.47887 5.98064 3.28157 6.00001 3.09125 5.96207C2.90093 5.92414 2.72613 5.83061 2.58898 5.69332C2.45182 5.55602 2.35847 5.38113 2.32073 5.19077C2.28299 5.00041 2.30256 4.80313 2.37696 4.62389C2.45137 4.44465 2.57726 4.29151 2.73872 4.18384C2.90017 4.07617 3.08994 4.0188 3.284 4.019C3.54418 4.019 3.7937 4.12235 3.97767 4.30633C4.16165 4.4903 4.264 4.73982 4.264 5Z",fill:t}),a.jsx("path",{d:"M7.69601 8.225C7.69601 8.41903 7.63848 8.60869 7.53068 8.77002C7.42289 8.93134 7.26968 9.05708 7.09042 9.13133C6.91117 9.20558 6.71392 9.22501 6.52363 9.18715C6.33333 9.1493 6.15853 9.05587 6.02134 8.91867C5.88414 8.78148 5.79071 8.60668 5.75286 8.41639C5.71501 8.22609 5.73443 8.02884 5.80868 7.84959C5.88293 7.67034 6.00867 7.51713 6.17 7.40933C6.33132 7.30154 6.52099 7.244 6.71501 7.244C6.84384 7.244 6.9714 7.26938 7.09042 7.31868C7.20944 7.36798 7.31759 7.44024 7.40868 7.53133C7.49978 7.62243 7.57204 7.73057 7.62134 7.84959C7.67064 7.96861 7.69601 8.09618 7.69601 8.225Z",fill:t}),a.jsx("path",{d:"M4.264 8.225C4.264 8.41903 4.20647 8.60869 4.09867 8.77002C3.99088 8.93134 3.83767 9.05708 3.65841 9.13133C3.47916 9.20558 3.28191 9.22501 3.09162 9.18715C2.90132 9.1493 2.72653 9.05587 2.58933 8.91867C2.45214 8.78148 2.3587 8.60668 2.32085 8.41639C2.283 8.22609 2.30243 8.02884 2.37668 7.84959C2.45093 7.67034 2.57666 7.51713 2.73799 7.40933C2.89931 7.30154 3.08898 7.244 3.283 7.244C3.41183 7.244 3.53939 7.26938 3.65841 7.31868C3.77744 7.36798 3.88558 7.44024 3.97667 7.53133C4.06777 7.62243 4.14003 7.73057 4.18933 7.84959C4.23863 7.96861 4.264 8.09618 4.264 8.225Z",fill:t})]})}function _e({size:e="12",color:t="#4568e0",...n}){const i=te(e,"12");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M11.7155 5.409C11.8354 6.44637 11.6393 7.49581 11.153 8.41951C10.6667 9.34321 9.91289 10.098 8.99057 10.5847C8.06826 11.0715 7.02056 11.2674 5.98506 11.1468C4.94957 11.0262 3.97468 10.5947 3.18843 9.909C3.13112 9.8593 3.08476 9.79818 3.05232 9.72955C3.01987 9.66091 3.00205 9.58626 2.99998 9.51035C2.99792 9.43444 3.01166 9.35892 3.04032 9.28862C3.06898 9.21832 3.11195 9.15476 3.16647 9.102C3.26796 9.00379 3.40278 8.94766 3.54387 8.94488C3.68495 8.9421 3.82187 8.99287 3.92714 9.087C4.57369 9.64424 5.37883 9.98362 6.22857 10.0571C7.07831 10.1306 7.92961 9.93449 8.66193 9.49652C9.39425 9.05854 9.9705 8.40091 10.3091 7.61672C10.6477 6.83254 10.7315 5.96152 10.5486 5.127C10.3868 4.36605 10.0085 3.66832 9.45928 3.11818C8.9101 2.56804 8.2136 2.18904 7.45397 2.027C6.85996 1.89578 6.24414 1.8996 5.65181 2.0382C5.05947 2.17679 4.50568 2.44663 4.03116 2.82787C3.55664 3.20911 3.17346 3.69205 2.9098 4.24118C2.64615 4.79031 2.50872 5.39166 2.50763 6.001H3.27628C3.34943 6.0001 3.42117 6.02122 3.4822 6.06163C3.54323 6.10203 3.59075 6.15986 3.61861 6.22762C3.64646 6.29539 3.65337 6.36997 3.63843 6.44171C3.62349 6.51345 3.5874 6.57904 3.53483 6.63L2.21214 7.963C2.17808 7.99826 2.13728 8.0263 2.09218 8.04545C2.04707 8.0646 1.99859 8.07447 1.9496 8.07447C1.90062 8.07447 1.85213 8.0646 1.80703 8.04545C1.76193 8.0263 1.72113 7.99826 1.68706 7.963L0.364376 6.63C0.313354 6.57786 0.278872 6.51176 0.265274 6.44003C0.251676 6.36829 0.259568 6.29414 0.287958 6.22689C0.316347 6.15964 0.363965 6.1023 0.424814 6.06211C0.485663 6.02191 0.557024 6.00065 0.629911 6.001H1.40056C1.40075 4.67758 1.90621 3.40433 2.81334 2.44221C3.72047 1.48008 4.96058 0.901932 6.27954 0.826241C7.59849 0.750551 8.8964 1.18305 9.90728 2.03511C10.9182 2.88717 11.5654 4.09426 11.7165 5.409H11.7155Z",fill:t,stroke:t,strokeWidth:"0.5"})})}function be({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsxs("svg",{width:i.width,height:i.height,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:[a.jsx("path",{d:"M0.370756 9.33698C0.231288 9.19751 0.164459 9.03189 0.170271 8.84012C0.176082 8.64835 0.24291 8.48854 0.370756 8.3607L4.04923 4.62993C4.31654 4.36262 4.64778 4.22896 5.04293 4.22896C5.43809 4.22896 5.76933 4.36262 6.03665 4.62993L7.8323 6.44301L11.4585 2.85171H10.3427C10.1451 2.85171 9.97952 2.78488 9.84587 2.65123C9.71221 2.51757 9.64538 2.35195 9.64538 2.15437C9.64538 1.95679 9.71221 1.79117 9.84587 1.65752C9.97952 1.52386 10.1451 1.45703 10.3427 1.45703H13.1321C13.3297 1.45703 13.4953 1.52386 13.6289 1.65752C13.7626 1.79117 13.8294 1.95679 13.8294 2.15437V4.94373C13.8294 5.14131 13.7626 5.30693 13.6289 5.44059C13.4953 5.57424 13.3297 5.64107 13.1321 5.64107C12.9345 5.64107 12.7689 5.57424 12.6352 5.44059C12.5016 5.30693 12.4347 5.14131 12.4347 4.94373V3.82799L8.82601 7.43672C8.55869 7.70404 8.22746 7.83769 7.8323 7.83769C7.43714 7.83769 7.1059 7.70404 6.83859 7.43672L5.04293 5.64107L1.34703 9.33698C1.21919 9.46482 1.05647 9.52874 0.858894 9.52874C0.661314 9.52874 0.498602 9.46482 0.370756 9.33698Z",fill:t}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.862305 12.5426V12.543H0.884766H13.1146H13.2129V12.5363C13.5612 12.4884 13.8294 12.1896 13.8294 11.8281C13.8294 11.4667 13.5612 11.1679 13.2129 11.12V11.1191H13.2065C13.1764 11.1153 13.1457 11.1133 13.1146 11.1133C13.0834 11.1133 13.0527 11.1153 13.0226 11.1191H0.976719C0.946614 11.1153 0.915923 11.1133 0.884766 11.1133C0.489968 11.1133 0.169922 11.4333 0.169922 11.8281C0.169922 12.2154 0.477901 12.5308 0.862305 12.5426Z",fill:t})]})}function we({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 14.5C10.866 14.5 14 11.366 14 7.5C14 3.63401 10.866 0.5 7 0.5C3.13401 0.5 0 3.63401 0 7.5C0 11.366 3.13401 14.5 7 14.5ZM6.53369 4.36582C6.53369 4.03445 6.80232 3.76582 7.13369 3.76582H7.33369C7.66506 3.76582 7.93369 4.03445 7.93369 4.36582V8.29915C7.93369 8.63052 7.66506 8.89915 7.33369 8.89915H7.13369C6.80232 8.89915 6.53369 8.63053 6.53369 8.29915V4.36582ZM6.53369 10.4327C6.53369 10.1013 6.80232 9.83272 7.13369 9.83272H7.33369C7.66506 9.83272 7.93369 10.1013 7.93369 10.4327V10.6327C7.93369 10.9641 7.66506 11.2327 7.33369 11.2327H7.13369C6.80232 11.2327 6.53369 10.9641 6.53369 10.6327V10.4327Z",fill:t})})}function Ce({size:e="12",color:t="#8998B5",...n}){const i="number"==typeof e?e:Number(e);return a.jsx("svg",{width:i,height:i,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.79979 0.548815C9.53158 -0.182973 10.7191 -0.182578 11.4512 0.548815C12.1828 1.28072 12.1828 2.4673 11.4512 3.19921L10.9111 3.74022L10.9853 3.81444C11.7166 4.54633 11.7167 5.73301 10.9853 6.46483C10.3069 7.1432 9.23845 7.19156 8.50292 6.61229L4.55956 10.5596C4.2497 10.8693 3.8396 11.0608 3.40331 11.1006L2.79589 11.1543L2.35546 11.5967C1.81683 12.135 0.942983 12.1349 0.404285 11.5967C-0.134114 11.058 -0.134107 10.1842 0.404285 9.64549L0.843738 9.20409L0.900379 8.59764C0.940129 8.16138 1.13181 7.75224 1.44139 7.44237L5.38671 3.4951C4.80955 2.75973 4.85778 1.69336 5.53514 1.01561C6.26705 0.283878 7.45458 0.283953 8.18651 1.01561L8.25975 1.08885L8.79979 0.548815ZM2.22655 8.22655C2.10059 8.35279 2.02119 8.51977 2.00487 8.69725L1.93261 9.50389C1.92086 9.63312 1.86389 9.75489 1.77245 9.84667L1.18944 10.4297C1.08421 10.5349 1.08442 10.7062 1.18944 10.8115C1.29474 10.9163 1.46513 10.9164 1.5703 10.8115L2.15233 10.2285C2.24413 10.1368 2.36686 10.0792 2.49608 10.0674L3.30272 9.99413C3.4804 9.97787 3.64717 9.90037 3.77343 9.7744L7.708 5.83885L6.16014 4.29198L2.22655 8.22655ZM10.667 1.33397C10.3685 1.03576 9.88442 1.03576 9.58593 1.33397L8.65428 2.26561C8.43725 2.48243 8.08421 2.48233 7.86718 2.26561L7.40136 1.80077C7.10287 1.50256 6.61879 1.50256 6.3203 1.80077C6.02233 2.09926 6.02224 2.5834 6.3203 2.88182L9.11913 5.68065C9.41759 5.97866 9.90174 5.97868 10.2002 5.68065C10.4984 5.38222 10.4983 4.89814 10.2002 4.5996L9.73436 4.13378C9.51765 3.91678 9.5179 3.56465 9.73436 3.34764L10.667 2.41503C10.965 2.1166 10.965 1.63245 10.667 1.33397Z",fill:t})})}function Se({size:e="12",color:t="#357E63",...n}){const i="number"==typeof e?e:Number(e);return a.jsx("svg",{width:i,height:i,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M10.973 2.72801L5.61697 8.08401C5.56746 8.13369 5.50862 8.1731 5.44384 8.19999C5.37907 8.22689 5.30961 8.24073 5.23947 8.24073C5.16933 8.24073 5.09988 8.22689 5.0351 8.19999C4.97032 8.1731 4.91149 8.13369 4.86197 8.08401L3.34697 6.56801C3.2973 6.51849 3.25788 6.45966 3.23099 6.39488C3.20409 6.3301 3.19025 6.26065 3.19025 6.19051C3.19025 6.12037 3.20409 6.05092 3.23099 5.98614C3.25788 5.92136 3.2973 5.86252 3.34697 5.81301C3.39649 5.76333 3.45532 5.72391 3.5201 5.69702C3.58488 5.67013 3.65433 5.65628 3.72447 5.65628C3.79461 5.65628 3.86407 5.67013 3.92884 5.69702C3.99362 5.72391 4.05246 5.76333 4.10197 5.81301L5.24097 6.94801L10.212 1.97301C10.2615 1.92333 10.3203 1.88391 10.3851 1.85702C10.4499 1.83013 10.5193 1.81628 10.5895 1.81628C10.6596 1.81628 10.7291 1.83013 10.7938 1.85702C10.8586 1.88391 10.9175 1.92333 10.967 1.97301C11.0175 2.02185 11.0578 2.08028 11.0856 2.14488C11.1133 2.20948 11.1278 2.27896 11.1284 2.34925C11.129 2.41954 11.1155 2.48924 11.0888 2.55427C11.0621 2.61931 11.0227 2.67837 10.973 2.72801ZM8.01697 1.04301C7.00993 0.633602 5.90211 0.540446 4.84084 0.775929C3.77956 1.01141 2.81511 1.56438 2.07573 2.36129C1.33635 3.15821 0.857074 4.16131 0.701629 5.23723C0.546185 6.31314 0.721939 7.41089 1.20552 8.38449C1.6891 9.3581 2.4576 10.1614 3.40883 10.6877C4.36005 11.2139 5.44893 11.4381 6.53068 11.3305C7.61242 11.2229 8.63578 10.7885 9.46467 10.0852C10.2936 9.38181 10.8887 8.44281 11.171 7.39301C11.3744 6.65713 11.4126 5.88539 11.283 5.13301C11.2658 5.03617 11.2225 4.94587 11.1577 4.87188C11.0929 4.7979 11.0091 4.74305 10.9154 4.71328C10.8216 4.68352 10.7216 4.67996 10.6259 4.703C10.5303 4.72605 10.4429 4.77481 10.373 4.84401C10.3122 4.90597 10.2673 4.98169 10.242 5.06474C10.2168 5.14778 10.2119 5.2357 10.228 5.32101C10.3588 6.0922 10.2622 6.88481 9.94997 7.60201C9.65203 8.32184 9.16641 8.94855 8.54376 9.41678C7.9211 9.885 7.18422 10.1776 6.40997 10.264C5.74684 10.329 5.07767 10.2385 4.45562 9.99974C3.83356 9.76093 3.27576 9.38038 2.82649 8.8883C2.37723 8.39622 2.04888 7.80617 1.86753 7.16501C1.68617 6.52384 1.6568 5.84923 1.78176 5.19473C1.90671 4.54023 2.18254 3.92388 2.58734 3.39462C2.99214 2.86537 3.51477 2.43778 4.11372 2.14582C4.71266 1.85385 5.37143 1.70556 6.03771 1.71271C6.70399 1.71986 7.35943 1.88226 7.95197 2.18701C8.0535 2.23932 8.16909 2.25782 8.28187 2.23984C8.39466 2.22185 8.49875 2.1683 8.57897 2.08701C8.63892 2.02756 8.684 1.95481 8.71056 1.87468C8.73713 1.79454 8.74442 1.70927 8.73186 1.62579C8.71929 1.5423 8.68722 1.46296 8.63824 1.39419C8.58926 1.32543 8.52476 1.26918 8.44997 1.23001C8.30597 1.17001 8.16097 1.10001 8.01697 1.04301Z",fill:t,stroke:t,strokeWidth:"0.28"})})}function Me({size:e="14",color:t="#8998b5",...n}){const i=te(e,"14");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M9.8564 6.00202C9.8564 5.88744 9.8564 5.77689 9.84091 5.66232L10.7975 4.9588C10.8971 4.88463 10.9655 4.77774 10.99 4.6581C11.0145 4.53845 10.9935 4.41421 10.9308 4.30855L9.969 2.69247C9.90739 2.58652 9.8077 2.50647 9.68909 2.46769C9.57048 2.42892 9.44132 2.43417 9.32644 2.48242L8.22107 2.9377C8.03145 2.80728 7.83024 2.6936 7.61983 2.598L7.47107 1.44223C7.456 1.32086 7.39596 1.20901 7.30221 1.12761C7.20846 1.04621 7.08743 1.00084 6.96178 1.00001H5.04339C4.91681 0.999065 4.79427 1.04337 4.69905 1.12452C4.60383 1.20567 4.54255 1.31801 4.52686 1.44022L4.3781 2.59599C4.16769 2.69159 3.96648 2.80527 3.77686 2.93569L2.67769 2.48041C2.56281 2.43216 2.43366 2.42691 2.31505 2.46568C2.19644 2.50446 2.09674 2.58451 2.03513 2.69046L1.06922 4.31157C1.00651 4.41722 0.985451 4.54146 1.00997 4.66111C1.03449 4.78076 1.10292 4.88764 1.20248 4.96182L2.15909 5.66533C2.14876 5.77488 2.1436 5.88543 2.1436 6.00001C2.1436 6.11458 2.1436 6.22513 2.15909 6.33971L1.20248 7.04322C1.10292 7.1174 1.03449 7.22428 1.00997 7.34393C0.985451 7.46358 1.00651 7.58782 1.06922 7.69347L2.031 9.30955C2.09261 9.4155 2.1923 9.49556 2.31091 9.53433C2.42953 9.57311 2.55868 9.56786 2.67356 9.5196L3.77893 9.06433C3.96855 9.19474 4.16976 9.30843 4.38017 9.40402L4.52893 10.5598C4.54447 10.6808 4.6047 10.7922 4.69841 10.8732C4.79211 10.9542 4.91288 10.9992 5.03822 11H6.95661C7.08195 10.9992 7.20273 10.9542 7.29643 10.8732C7.39013 10.7922 7.45037 10.6808 7.46591 10.5598L7.61467 9.40402C7.82507 9.30843 8.02629 9.19474 8.21591 9.06433L9.32128 9.5196C9.43615 9.56786 9.56531 9.57311 9.68392 9.53433C9.80253 9.49556 9.90223 9.4155 9.96384 9.30955L10.9256 7.69347C10.9883 7.58782 11.0094 7.46358 10.9849 7.34393C10.9603 7.22428 10.8919 7.1174 10.7924 7.04322L9.83574 6.33971C9.8502 6.2277 9.8571 6.1149 9.8564 6.00202ZM6.02066 7.75277C5.66474 7.75277 5.31681 7.65009 5.02087 7.45771C4.72493 7.26534 4.49427 6.99191 4.35806 6.672C4.22186 6.35209 4.18622 6.00008 4.25566 5.66046C4.32509 5.32085 4.49649 5.0089 4.74816 4.76405C4.99984 4.5192 5.32049 4.35246 5.66958 4.28491C6.01866 4.21735 6.3805 4.25202 6.70933 4.38453C7.03816 4.51704 7.31922 4.74144 7.51696 5.02935C7.7147 5.31726 7.82025 5.65575 7.82025 6.00202C7.8197 6.46618 7.62992 6.91118 7.29256 7.2394C6.95519 7.56761 6.49777 7.75224 6.02066 7.75277Z",fill:t})})}const Te=s.forwardRef(function(e,t){const{label:n=null,isRequired:i=!1,isDisabled:r=!1,value:o,placeholder:l="",onChange:u,onSearch:c,onNavigate:d,className:p}=e,f=Y(),[g,m]=s.useState(""),v=void 0!==o,y=v?o??"":g,[x,_]=s.useState(0),[b,w]=s.useState(0),C=s.useRef(!1),S=s.useRef("next"),M=()=>{if(!(null==f?void 0:f.getSearchState))return _(0),void w(0);const e=f.getSearchState();_(e.total),w(e.total>0?e.currentIndex+1:0)},T=s.useRef(null);s.useEffect(()=>{T.current=h.debounce(async e=>{var t;if(!e)return _(0),w(0),null==(t=null==f?void 0:f.clearSearch)||t.call(f),void(null==c||c(""));(null==f?void 0:f.search)&&(await f.search(e),M()),null==c||c(e)},200)},[f]);const I=e=>{var t;v||m(e),null==u||u(e),null==(t=T.current)||t.call(T,e)},D=()=>{if(!(null==f?void 0:f.findNext))return;S.current="next";const e=f.findNext();M(),e&&(null==d||d({row:e.rowIndex,col:0}))},k=()=>{if(!(null==f?void 0:f.findPrev))return;S.current="prev";const e=f.findPrev();M(),e&&(null==d||d({row:e.rowIndex,col:0}))},A=s.useRef(null),E=s.useRef(null),N=()=>{var e;""!==y&&(v||m(""),null==u||u("")),_(0),w(0),null==(e=null==f?void 0:f.clearSearch)||e.call(f)};return s.useEffect(()=>{if(!(null==f?void 0:f.on))return;const e=f.on("data:loaded",N);return()=>null==e?void 0:e()},[f]),s.useEffect(()=>()=>{A.current&&clearTimeout(A.current),E.current&&clearInterval(E.current)},[]),s.useImperativeHandle(t,()=>({resetSearch:N}),[y]),a.jsxs("div",{className:["grid-search-moz-input",p].filter(Boolean).join(" "),children:[n&&a.jsxs("label",{children:[n,i&&a.jsx("span",{className:"require-mark",children:"*"})]}),a.jsxs("div",{className:["moz-input-grid-search",n?"":"no-label"].filter(Boolean).join(" "),children:[a.jsx(J,{type:"icon-accent",className:"search-button spin dec",onClick:k,disabled:0===x||r,icon:a.jsx(fe,{color:"currentColor"})}),a.jsxs("div",{className:"moz-input-grid-search-input-wrapper",children:[a.jsx("input",{placeholder:l,value:y,onChange:e=>I(e.target.value),onCompositionStart:()=>{C.current=!0},onCompositionEnd:e=>{C.current=!1,I(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(e.nativeEvent.isComposing||0===x||(e.preventDefault(),A.current||E.current||("next"===S.current?D():k(),A.current=setTimeout(()=>{A.current=null,E.current=setInterval(()=>{"next"===S.current?D():k()},40)},400))))},onKeyUp:e=>{"Enter"===e.key&&(A.current&&(clearTimeout(A.current),A.current=null),E.current&&(clearInterval(E.current),E.current=null))},autoComplete:"off",disabled:r}),a.jsx("div",{style:{height:"100%",width:26,display:"flex",alignItems:"center"},children:a.jsx(de,{size:"12",color:r?"#a7b1bc":"#8998b5"})}),x>0&&a.jsxs("span",{className:"grid-search-count-popup",children:[b," / ",x]})]}),a.jsx(J,{type:"icon-accent",className:"search-button spin inc",onClick:D,disabled:0===x||r,icon:a.jsx(fe,{color:"currentColor"})})]})]})});function Ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(null==e||e(i),!1===n||!i.defaultPrevented)return null==t?void 0:t(i)}}function De(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ke(...e){return t=>{let n=!1;const i=e.map(e=>{const i=De(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){const n=i[t];"function"==typeof n?n():De(e[t],null)}}}}function Ae(...e){return g.useCallback(ke(...e),e)}function Ee(e,t=[]){let n=[];const i=()=>{const t=n.map(e=>g.createContext(e));return function(n){const i=(null==n?void 0:n[e])||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return i.scopeName=e,[function(t,i){const r=g.createContext(i),o=n.length;n=[...n,i];const s=t=>{var n;const{scope:i,children:s,...l}=t,u=(null==(n=null==i?void 0:i[e])?void 0:n[o])||r,c=g.useMemo(()=>l,Object.values(l));return a.jsx(u.Provider,{value:c,children:s})};return s.displayName=t+"Provider",[s,function(n,a){var s;const l=(null==(s=null==a?void 0:a[e])?void 0:s[o])||r,u=g.useContext(l);if(u)return u;if(void 0!==i)return i;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Ne(i,...t)]}function Ne(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const i=n.reduce((t,{useScope:n,scopeName:i})=>({...t,...n(e)[`__scope${i}`]}),{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}Te.displayName="GridSearchInput";var Le=(null==globalThis?void 0:globalThis.document)?g.useLayoutEffect:()=>{},Pe=g[" useId ".trim().toString()]||(()=>{}),Oe=0;function Re(e){const[t,n]=g.useState(Pe());return Le(()=>{n(e=>e??String(Oe++))},[e]),e||(t?`radix-${t}`:"")}var Fe=g[" useInsertionEffect ".trim().toString()]||Le;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[r,o,a]=function({defaultProp:e,onChange:t}){const[n,i]=g.useState(e),r=g.useRef(n),o=g.useRef(t);return Fe(()=>{o.current=t},[t]),g.useEffect(()=>{var e;r.current!==n&&(null==(e=o.current)||e.call(o,n),r.current=n)},[n,r]),[n,i,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:r;{const t=g.useRef(void 0!==e);g.useEffect(()=>{const e=t.current;if(e!==s){}t.current=s},[s,i])}const u=g.useCallback(t=>{var n;if(s){const i=function(e){return"function"==typeof e}(t)?t(e):t;i!==e&&(null==(n=a.current)||n.call(a,i))}else o(t)},[s,e,o,a]);return[l,u]}function Ve(e){const t=Be(e),n=g.forwardRef((e,n)=>{const{children:i,...r}=e,o=g.Children.toArray(i),s=o.find(Ge);if(s){const e=s.props.children,i=o.map(t=>t===s?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t);return a.jsx(t,{...r,ref:n,children:g.isValidElement(e)?g.cloneElement(e,void 0,i):null})}return a.jsx(t,{...r,ref:n,children:i})});return n.displayName=`${e}.Slot`,n}function Be(e){const t=g.forwardRef((e,t)=>{const{children:n,...i}=e;if(g.isValidElement(n)){const e=function(e){var t,n;let i=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,r=i&&"isReactWarning"in i&&i.isReactWarning;if(r)return e.ref;if(i=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),r=function(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...e)=>{const t=o(...e);return r(...e),t}:r&&(n[i]=r):"style"===i?n[i]={...r,...o}:"className"===i&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props);return n.type!==g.Fragment&&(r.ref=t?ke(t,e):e),g.cloneElement(n,r)}return g.Children.count(n)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var je=Symbol("radix.slottable");function Ge(e){return g.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===je}var We=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Ve(`Primitive.${t}`),i=g.forwardRef((e,i)=>{const{asChild:r,...o}=e,s=r?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),a.jsx(s,{...o,ref:i})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function He(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}function Ue(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[])}var Ye,Ze="dismissableLayer.update",Xe="dismissableLayer.pointerDownOutside",qe="dismissableLayer.focusOutside",$e=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ke=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,c=g.useContext($e),[d,h]=g.useState(null),p=(null==d?void 0:d.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=g.useState({}),m=Ae(t,e=>h(e)),v=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y),_=d?v.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=_>=x,C=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ue(e),i=g.useRef(!1),r=g.useRef(()=>{});return g.useEffect(()=>{const e=e=>{if(e.target&&!i.current){let i=function(){Qe(Xe,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",r.current),r.current=i,t.addEventListener("click",r.current,{once:!0})):i()}else t.removeEventListener("click",r.current);i.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}(e=>{const t=e.target,n=[...c.branches].some(e=>e.contains(t));w&&!n&&(null==r||r(e),null==s||s(e),e.defaultPrevented||null==l||l())},p),S=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ue(e),i=g.useRef(!1);return g.useEffect(()=>{const e=e=>{if(e.target&&!i.current){Qe(qe,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{const t=e.target;[...c.branches].some(e=>e.contains(t))||(null==o||o(e),null==s||s(e),e.defaultPrevented||null==l||l())},p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Ue(e);g.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{_===c.layers.size-1&&(null==i||i(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))},p),g.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(Ye=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Je(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Ye)}},[d,p,n,c]),g.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Je())},[d,c]),g.useEffect(()=>{const e=()=>f({});return document.addEventListener(Ze,e),()=>document.removeEventListener(Ze,e)},[]),a.jsx(We.div,{...u,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Ie(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ie(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ie(e.onPointerDownCapture,C.onPointerDownCapture)})});Ke.displayName="DismissableLayer";function Je(){const e=new CustomEvent(Ze);document.dispatchEvent(e)}function Qe(e,t,n,{discrete:i}){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?He(r,o):r.dispatchEvent(o)}g.forwardRef((e,t)=>{const n=g.useContext($e),i=g.useRef(null),r=Ae(t,i);return g.useEffect(()=>{const e=i.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),a.jsx(We.div,{...e,ref:r})}).displayName="DismissableLayerBranch";var et="focusScope.autoFocusOnMount",tt="focusScope.autoFocusOnUnmount",nt={bubbles:!1,cancelable:!0},it=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...s}=e,[l,u]=g.useState(null),c=Ue(r),d=Ue(o),h=g.useRef(null),p=Ae(t,e=>u(e)),f=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(i){let e=function(e){if(f.paused||!l)return;const t=e.target;l.contains(t)?h.current=t:st(h.current,{select:!0})},t=function(e){if(f.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||st(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&st(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const i=new MutationObserver(n);return l&&i.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),i.disconnect()}}},[i,l,f.paused]),g.useEffect(()=>{if(l){lt.add(f);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(et,nt);l.addEventListener(et,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(st(i,{select:t}),document.activeElement!==n)return}((e=rt(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&st(l))}return()=>{l.removeEventListener(et,c),setTimeout(()=>{const e=new CustomEvent(tt,nt);l.addEventListener(tt,d),l.dispatchEvent(e),e.defaultPrevented||st(t??document.body,{select:!0}),l.removeEventListener(tt,d),lt.remove(f)},0)}}var e},[l,c,d,f]);const m=g.useCallback(e=>{if(!n&&!i)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[i,o]=function(e){const t=rt(e),n=ot(t,e),i=ot(t.reverse(),e);return[n,i]}(t);i&&o?e.shiftKey||r!==o?e.shiftKey&&r===i&&(e.preventDefault(),n&&st(o,{select:!0})):(e.preventDefault(),n&&st(i,{select:!0})):r===t&&e.preventDefault()}},[n,i,f.paused]);return a.jsx(We.div,{tabIndex:-1,...s,ref:p,onKeyDown:m})});function rt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ot(e,t){for(const n of e)if(!at(n,{upTo:t}))return n}function at(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function st(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}it.displayName="FocusScope";var lt=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=ut(e,t),e.unshift(t)},remove(t){var n;e=ut(e,t),null==(n=e[0])||n.resume()}}}();function ut(e,t){const n=[...e],i=n.indexOf(t);return-1!==i&&n.splice(i,1),n}var ct=g.forwardRef((e,t)=>{var n;const{container:i,...r}=e,[o,s]=g.useState(!1);Le(()=>s(!0),[]);const l=i||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?c.createPortal(a.jsx(We.div,{...r,ref:t}),l):null});ct.displayName="Portal";var dt=e=>{const{present:t,children:n}=e,i=function(e){const[t,n]=g.useState(),i=g.useRef(null),r=g.useRef(e),o=g.useRef("none"),a=e?"mounted":"unmounted",[s,l]=function(e,t){return g.useReducer((e,n)=>t[e][n]??e,e)}(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const e=ht(i.current);o.current="mounted"===s?e:"none"},[s]),Le(()=>{const t=i.current,n=r.current;if(n!==e){const i=o.current,a=ht(t);if(e)l("MOUNT");else if("none"===a||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&i!==a?"ANIMATION_OUT":"UNMOUNT")}r.current=e}},[e,l]),Le(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=o=>{const a=ht(i.current).includes(CSS.escape(o.animationName));if(o.target===t&&a&&(l("ANIMATION_END"),!r.current)){const i=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=i)})}},s=e=>{e.target===t&&(o.current=ht(i.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback(e=>{i.current=e?getComputedStyle(e):null,n(e)},[])}}(t),r="function"==typeof n?n({present:i.isPresent}):g.Children.only(n),o=Ae(i.ref,function(e){var t,n;let i=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,r=i&&"isReactWarning"in i&&i.isReactWarning;if(r)return e.ref;if(i=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,r=i&&"isReactWarning"in i&&i.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r));return"function"==typeof n||i.isPresent?g.cloneElement(r,{ref:o}):null};function ht(e){return(null==e?void 0:e.animationName)||"none"}dt.displayName="Presence";var pt=0;function ft(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??gt()),document.body.insertAdjacentElement("beforeend",e[1]??gt()),pt++,()=>{1===pt&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),pt--}},[])}function gt(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var mt=function(){return mt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},mt.apply(this,arguments)};function vt(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}"function"==typeof SuppressedError&&SuppressedError;var yt="right-scroll-bar-position",xt="width-before-scroll-bar";function _t(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var bt="undefined"!=typeof window?g.useLayoutEffect:g.useEffect,wt=new WeakMap;function Ct(e,t){var n,i,r,o=(n=null,i=function(t){return e.forEach(function(e){return _t(e,t)})},(r=s.useState(function(){return{value:n,callback:i,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0]).callback=i,r.facade);return bt(function(){var t=wt.get(o);if(t){var n=new Set(t),i=new Set(e),r=o.current;n.forEach(function(e){i.has(e)||_t(e,null)}),i.forEach(function(e){n.has(e)||_t(e,r)})}wt.set(o,e)},[e]),o}function St(e){return e}var Mt=function(e){var t=e.sideCar,n=vt(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return g.createElement(i,mt({},n))};Mt.isSideCarExport=!0;var Tt=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=St);var n=[],i=!1;return{read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var r=t(e,i);return n.push(r),function(){n=n.filter(function(e){return e!==r})}},assignSyncMedium:function(e){for(i=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){i=!0;var t=[];if(n.length){var r=n;n=[],r.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(o)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=mt({async:!0,ssr:!1},e),t}(),It=function(){},Dt=g.forwardRef(function(e,t){var n=g.useRef(null),i=g.useState({onScrollCapture:It,onWheelCapture:It,onTouchMoveCapture:It}),r=i[0],o=i[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,f=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,x=void 0===y?"div":y,_=e.gapMode,b=vt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,C=Ct([n,t]),S=mt(mt({},b),r);return g.createElement(g.Fragment,null,c&&g.createElement(w,{sideCar:Tt,removeScrollBar:u,shards:d,noRelative:p,noIsolation:f,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:_}),a?g.cloneElement(g.Children.only(s),mt(mt({},S),{ref:C})):g.createElement(x,mt({},S,{className:l,ref:C}),s))});Dt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Dt.classNames={fullWidth:xt,zeroRight:yt};function kt(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var At=function(){var e=0,t=null;return{add:function(n){var i,r;0==e&&(t=kt())&&(r=n,(i=t).styleSheet?i.styleSheet.cssText=r:i.appendChild(document.createTextNode(r)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Et=function(){var e,t=(e=At(),function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,i=e.dynamic;return t(n,i),null}},Nt={left:0,top:0,right:0,gap:0},Lt=function(e){return parseInt(e||"",10)||0},Pt=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Nt;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],i=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Lt(n),Lt(i),Lt(r)]}(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},Ot=Et(),Rt="data-scroll-locked",Ft=function(e,t,n,i){var r=e.left,o=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(i,";\n padding-right: ").concat(s,"px ").concat(i,";\n }\n body[").concat(Rt,"] {\n overflow: hidden ").concat(i,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(i,";"),"margin"===n&&"\n padding-left: ".concat(r,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(i,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(i,";")].filter(Boolean).join(""),"\n }\n \n .").concat(yt," {\n right: ").concat(s,"px ").concat(i,";\n }\n \n .").concat(xt," {\n margin-right: ").concat(s,"px ").concat(i,";\n }\n \n .").concat(yt," .").concat(yt," {\n right: 0 ").concat(i,";\n }\n \n .").concat(xt," .").concat(xt," {\n margin-right: 0 ").concat(i,";\n }\n \n body[").concat(Rt,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},zt=function(){var e=parseInt(document.body.getAttribute(Rt)||"0",10);return isFinite(e)?e:0},Vt=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,r=void 0===i?"margin":i;g.useEffect(function(){return document.body.setAttribute(Rt,(zt()+1).toString()),function(){var e=zt()-1;e<=0?document.body.removeAttribute(Rt):document.body.setAttribute(Rt,e.toString())}},[]);var o=g.useMemo(function(){return Pt(r)},[r]);return g.createElement(Ot,{styles:Ft(o,!t,r,n?"":"!important")})},Bt=!1;if("undefined"!=typeof window)try{var jt=Object.defineProperty({},"passive",{get:function(){return Bt=!0,!0}});window.addEventListener("test",jt,jt),window.removeEventListener("test",jt,jt)}catch(_1){Bt=!1}var Gt=!!Bt&&{passive:!1},Wt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Ht=function(e,t){var n=t.ownerDocument,i=t;do{if("undefined"!=typeof ShadowRoot&&i instanceof ShadowRoot&&(i=i.host),Ut(e,i)){var r=Yt(e,i);if(r[1]>r[2])return!0}i=i.parentNode}while(i&&i!==n.body);return!1},Ut=function(e,t){return"v"===e?function(e){return Wt(e,"overflowY")}(t):function(e){return Wt(e,"overflowX")}(t)},Yt=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Zt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xt=function(e){return[e.deltaX,e.deltaY]},qt=function(e){return e&&"current"in e?e.current:e},$t=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Kt=0,Jt=[];function Qt(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const en=(tn=function(e){var t=g.useRef([]),n=g.useRef([0,0]),i=g.useRef(),r=g.useState(Kt++)[0],o=g.useState(Et)[0],a=g.useRef(e);g.useEffect(function(){a.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var t=function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(qt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var r,o=Zt(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],u="deltaY"in e?e.deltaY:s[1]-o[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var f=Ht(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=Ht(d,c)),!f)return!1;if(!i.current&&"changedTouches"in e&&(l||u)&&(i.current=r),!r)return!0;var g=i.current||r;return function(e,t,n,i){var r=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=r*i,a=n.target,s=t.contains(a),l=!1,u=o>0,c=0,d=0;do{if(!a)break;var h=Yt(e,a),p=h[0],f=h[1]-h[2]-r*p;(p||f)&&Ut(e,a)&&(c+=f,d+=p);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(u&&Math.abs(c)<1||!u&&Math.abs(d)<1)&&(l=!0),l}(g,t,e,"h"===g?l:u)},[]),l=g.useCallback(function(e){var n=e;if(Jt.length&&Jt[Jt.length-1]===o){var i="deltaY"in n?Xt(n):Zt(n),r=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,r=i,t[0]===r[0]&&t[1]===r[1]);var t,r})[0];if(r&&r.should)n.cancelable&&n.preventDefault();else if(!r){var l=(a.current.shards||[]).map(qt).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=g.useCallback(function(e,n,i,r){var o={name:e,delta:n,target:i,should:r,shadowParent:Qt(i)};t.current.push(o),setTimeout(function(){t.current=t.current.filter(function(e){return e!==o})},1)},[]),c=g.useCallback(function(e){n.current=Zt(e),i.current=void 0},[]),d=g.useCallback(function(t){u(t.type,Xt(t),t.target,s(t,e.lockRef.current))},[]),h=g.useCallback(function(t){u(t.type,Zt(t),t.target,s(t,e.lockRef.current))},[]);g.useEffect(function(){return Jt.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Gt),document.addEventListener("touchmove",l,Gt),document.addEventListener("touchstart",c,Gt),function(){Jt=Jt.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,Gt),document.removeEventListener("touchmove",l,Gt),document.removeEventListener("touchstart",c,Gt)}},[]);var p=e.removeScrollBar,f=e.inert;return g.createElement(g.Fragment,null,f?g.createElement(o,{styles:$t(r)}):null,p?g.createElement(Vt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Tt.useMedium(tn),Mt);var tn,nn=g.forwardRef(function(e,t){return g.createElement(Dt,mt({},e,{ref:t,sideCar:en}))});nn.classNames=Dt.classNames;var rn=new WeakMap,on=new WeakMap,an={},sn=0,ln=function(e){return e&&(e.host||ln(e.parentNode))},un=function(e,t,n,i){var r=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ln(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);an[n]||(an[n]=new WeakMap);var o=an[n],a=[],s=new Set,l=new Set(r),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};r.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(i),r=null!==t&&"false"!==t,l=(rn.get(e)||0)+1,u=(o.get(e)||0)+1;rn.set(e,l),o.set(e,u),a.push(e),1===l&&r&&on.set(e,!0),1===u&&e.setAttribute(n,"true"),r||e.setAttribute(i,"true")}catch(d){}})};return c(t),s.clear(),sn++,function(){a.forEach(function(e){var t=rn.get(e)-1,r=o.get(e)-1;rn.set(e,t),o.set(e,r),t||(on.has(e)||e.removeAttribute(i),on.delete(e)),r||e.removeAttribute(n)}),--sn||(rn=new WeakMap,rn=new WeakMap,on=new WeakMap,an={})}},cn=function(e,t,n){void 0===n&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),un(i,r,n,"aria-hidden")):function(){return null}},dn="Dialog",[hn]=Ee(dn),[pn,fn]=hn(dn),gn=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:r,onOpenChange:o,modal:s=!0}=e,l=g.useRef(null),u=g.useRef(null),[c,d]=ze({prop:i,defaultProp:r??!1,onChange:o,caller:dn});return a.jsx(pn,{scope:t,triggerRef:l,contentRef:u,contentId:Re(),titleId:Re(),descriptionId:Re(),open:c,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(e=>!e),[d]),modal:s,children:n})};gn.displayName=dn;var mn="DialogTrigger";g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=fn(mn,n),o=Ae(t,r.triggerRef);return a.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":On(r.open),...i,ref:o,onClick:Ie(e.onClick,r.onOpenToggle)})}).displayName=mn;var vn="DialogPortal",[yn,xn]=hn(vn,{forceMount:void 0}),_n=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:r}=e,o=fn(vn,t);return a.jsx(yn,{scope:t,forceMount:n,children:g.Children.map(i,e=>a.jsx(dt,{present:n||o.open,children:a.jsx(ct,{asChild:!0,container:r,children:e})}))})};_n.displayName=vn;var bn="DialogOverlay",wn=g.forwardRef((e,t)=>{const n=xn(bn,e.__scopeDialog),{forceMount:i=n.forceMount,...r}=e,o=fn(bn,e.__scopeDialog);return o.modal?a.jsx(dt,{present:i||o.open,children:a.jsx(Sn,{...r,ref:t})}):null});wn.displayName=bn;var Cn=Ve("DialogOverlay.RemoveScroll"),Sn=g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=fn(bn,n);return a.jsx(nn,{as:Cn,allowPinchZoom:!0,shards:[r.contentRef],children:a.jsx(We.div,{"data-state":On(r.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Mn="DialogContent",Tn=g.forwardRef((e,t)=>{const n=xn(Mn,e.__scopeDialog),{forceMount:i=n.forceMount,...r}=e,o=fn(Mn,e.__scopeDialog);return a.jsx(dt,{present:i||o.open,children:o.modal?a.jsx(In,{...r,ref:t}):a.jsx(Dn,{...r,ref:t})})});Tn.displayName=Mn;var In=g.forwardRef((e,t)=>{const n=fn(Mn,e.__scopeDialog),i=g.useRef(null),r=Ae(t,n.contentRef,i);return g.useEffect(()=>{const e=i.current;if(e)return cn(e)},[]),a.jsx(kn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Ie(e.onFocusOutside,e=>e.preventDefault())})}),Dn=g.forwardRef((e,t)=>{const n=fn(Mn,e.__scopeDialog),i=g.useRef(!1),r=g.useRef(!1);return a.jsx(kn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(i.current||null==(a=n.triggerRef.current)||a.focus(),t.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:t=>{var o,a;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));const s=t.target;(null==(a=n.triggerRef.current)?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}})}),kn=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=e,l=fn(Mn,n),u=g.useRef(null),c=Ae(t,u);return ft(),a.jsxs(a.Fragment,{children:[a.jsx(it,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx(Ke,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":On(l.open),...s,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(Vn,{titleId:l.titleId}),a.jsx(Bn,{contentRef:u,descriptionId:l.descriptionId})]})]})}),An="DialogTitle",En=g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=fn(An,n);return a.jsx(We.h2,{id:r.titleId,...i,ref:t})});En.displayName=An;var Nn="DialogDescription";g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=fn(Nn,n);return a.jsx(We.p,{id:r.descriptionId,...i,ref:t})}).displayName=Nn;var Ln="DialogClose",Pn=g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=fn(Ln,n);return a.jsx(We.button,{type:"button",...i,ref:t,onClick:Ie(e.onClick,()=>r.onOpenChange(!1))})});function On(e){return e?"open":"closed"}Pn.displayName=Ln;var Rn="DialogTitleWarning",[Fn,zn]=function(e,t){const n=g.createContext(t),i=e=>{const{children:t,...i}=e,r=g.useMemo(()=>i,Object.values(i));return a.jsx(n.Provider,{value:r,children:t})};return i.displayName=e+"Provider",[i,function(i){const r=g.useContext(n);if(r)return r;if(void 0!==t)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}]}(Rn,{contentName:Mn,titleName:An,docsSlug:"dialog"}),Vn=({titleId:e})=>{const t=zn(Rn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{if(e){document.getElementById(e)}},[n,e]),null},Bn=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zn("DialogDescriptionWarning").contentName}}.`;return g.useEffect(()=>{var n;const i=null==(n=e.current)?void 0:n.getAttribute("aria-describedby");if(t&&i){document.getElementById(t)}},[n,e,t]),null},jn=gn,Gn=_n,Wn=wn,Hn=Tn,Un=En,Yn=Pn;function Zn(e){const{visible:t,onVisibleChange:n,title:i="Popup",width:r,height:o,minWidth:l=300,minHeight:u=100,maxWidth:c=800,maxHeight:d=600,showCloseButton:h=!0,closeOnOutsideClick:p=!0,preset:f="close",dialogIcon:g="info",dialogMessage:m,loading:v=!1,disabledConfirmButton:y=!1,contentsPadding:x="24px 16px",showFooterBorder:b=!0,saveText:w,cancelText:C,okText:S,closeText:M,className:T,children:I,titleSlot:D,footerSlot:E,onOpen:N,onClose:L,onConfirm:P}=e,O=_(),R=s.useRef(t);s.useEffect(()=>{t&&!R.current&&(null==N||N()),!t&&R.current&&(null==L||L()),R.current=t},[t,N,L]);const F=(()=>{switch(f){case"save-cancel":return{positive:w??O.Popup.save,negative:C??O.Popup.cancel};case"ok-cancel":return{positive:S??O.Popup.ok,negative:C??O.Popup.cancel};case"ok":return{positive:S??O.Popup.ok,negative:null};case"cancel":return{positive:null,negative:C??O.Popup.cancel};case"close":return{positive:M??O.Popup.close,negative:null};default:return{positive:null,negative:null}}})(),z=()=>{null==P||P()},V=()=>{null==n||n(!1)},B={width:r?`${A(r)}rem`:void 0,height:o?`${A(o)}rem`:void 0,minWidth:`${A(l)}rem`,minHeight:`${A(u)}rem`,maxWidth:`${A(c)}rem`,maxHeight:`${A(d)}rem`};return a.jsx(jn,{open:t,onOpenChange:n,modal:!0,children:a.jsxs(Gn,{children:[a.jsx(Wn,{className:"moz-r-popup-overlay"}),a.jsxs(Hn,{className:k("moz-r-popup",T),style:B,onPointerDownOutside:e=>{p||e.preventDefault()},onInteractOutside:e=>{p||e.preventDefault()},children:[a.jsxs("div",{className:"moz-r-popup__title",children:[D??a.jsx(Un,{asChild:!0,children:a.jsx("span",{className:"moz-r-popup__title-text",children:i})}),h&&a.jsx(Yn,{asChild:!0,children:a.jsx(J,{type:"icon",className:"moz-r-popup__close-button",icon:a.jsx(Xn,{})})})]}),a.jsx("div",{className:"moz-r-popup__body",style:{padding:"number"==typeof x?`${A(x)}rem`:x},children:I??a.jsxs("div",{className:"moz-r-popup__dialog-body",children:[a.jsx(qn,{icon:g}),a.jsx("div",{className:"moz-r-popup__dialog-message",dangerouslySetInnerHTML:{__html:m??""}})]})}),(E||"no-footer"!==f)&&a.jsx("div",{className:k("moz-r-popup__footer",{"with-border":b}),children:E?E({onConfirm:z,onCancel:V}):a.jsxs(a.Fragment,{children:[F.positive&&a.jsx(J,{className:"moz-r-popup__preset-btn",loading:v,disabled:y,onClick:z,style:{minWidth:80},text:F.positive}),F.negative&&a.jsx(J,{className:"moz-r-popup__preset-btn",type:"outline",disabled:v,onClick:V,style:{minWidth:80},text:F.negative})]})})]})]})})}function Xn(){return a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:a.jsx("path",{d:"M2 2L12 12M12 2L2 12",stroke:"#8998b5",strokeWidth:"1.5",strokeLinecap:"round"})})}function qn({icon:e}){const t={info:"#4568e0",error:"#dc5a5a",success:"#357e63",warning:"#fa9e23"}[e];return a.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",className:"moz-r-popup__dialog-icon",children:[a.jsx("circle",{cx:"12",cy:"12",r:"11",stroke:t,strokeWidth:"1.5"}),a.jsx("path",{d:"M12 7V13",stroke:t,strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("circle",{cx:"12",cy:"17",r:"1",fill:t})]})}const $n=["top","right","bottom","left"],Kn=Math.min,Jn=Math.max,Qn=Math.round,ei=Math.floor,ti=e=>({x:e,y:e}),ni={left:"right",right:"left",bottom:"top",top:"bottom"};function ii(e,t,n){return Jn(e,Kn(t,n))}function ri(e,t){return"function"==typeof e?e(t):e}function oi(e){return e.split("-")[0]}function ai(e){return e.split("-")[1]}function si(e){return"x"===e?"y":"x"}function li(e){return"y"===e?"height":"width"}function ui(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ci(e){return si(ui(e))}function di(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const hi=["left","right"],pi=["right","left"],fi=["top","bottom"],gi=["bottom","top"];function mi(e,t,n,i){const r=ai(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?pi:hi:t?hi:pi;case"left":case"right":return t?fi:gi;default:return[]}}(oi(e),"start"===n,i);return r&&(o=o.map(e=>e+"-"+r),t&&(o=o.concat(o.map(di)))),o}function vi(e){const t=oi(e);return ni[t]+e.slice(t.length)}function yi(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function xi(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function _i(e,t,n){let{reference:i,floating:r}=e;const o=ui(t),a=ci(t),s=li(a),l=oi(t),u="y"===o,c=i.x+i.width/2-r.width/2,d=i.y+i.height/2-r.height/2,h=i[s]/2-r[s]/2;let p;switch(l){case"top":p={x:c,y:i.y-r.height};break;case"bottom":p={x:c,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:d};break;case"left":p={x:i.x-r.width,y:d};break;default:p={x:i.x,y:i.y}}switch(ai(t)){case"start":p[a]-=h*(n&&u?-1:1);break;case"end":p[a]+=h*(n&&u?-1:1)}return p}async function bi(e,t){var n;void 0===t&&(t={});const{x:i,y:r,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=ri(t,e),f=yi(p),g=s[h?"floating"===d?"reference":"floating":d],m=xi(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),v="floating"===d?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),x=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{x:1,y:1},_=xi(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(m.top-_.top+f.top)/x.y,bottom:(_.bottom-m.bottom+f.bottom)/x.y,left:(m.left-_.left+f.left)/x.x,right:(_.right-m.right+f.right)/x.x}}function wi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ci(e){return $n.some(t=>e[t]>=0)}const Si=new Set(["left","top"]);function Mi(){return"undefined"!=typeof window}function Ti(e){return ki(e)?(e.nodeName||"").toLowerCase():"#document"}function Ii(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Di(e){var t;return null==(t=(ki(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ki(e){return!!Mi()&&(e instanceof Node||e instanceof Ii(e).Node)}function Ai(e){return!!Mi()&&(e instanceof Element||e instanceof Ii(e).Element)}function Ei(e){return!!Mi()&&(e instanceof HTMLElement||e instanceof Ii(e).HTMLElement)}function Ni(e){return!(!Mi()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ii(e).ShadowRoot)}function Li(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Wi(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&"inline"!==r&&"contents"!==r}function Pi(e){return/^(table|td|th)$/.test(Ti(e))}function Oi(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const Ri=/transform|translate|scale|rotate|perspective|filter/,Fi=/paint|layout|strict|content/,zi=e=>!!e&&"none"!==e;let Vi;function Bi(e){const t=Ai(e)?Wi(e):e;return zi(t.transform)||zi(t.translate)||zi(t.scale)||zi(t.rotate)||zi(t.perspective)||!ji()&&(zi(t.backdropFilter)||zi(t.filter))||Ri.test(t.willChange||"")||Fi.test(t.contain||"")}function ji(){return null==Vi&&(Vi="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vi}function Gi(e){return/^(html|body|#document)$/.test(Ti(e))}function Wi(e){return Ii(e).getComputedStyle(e)}function Hi(e){return Ai(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ui(e){if("html"===Ti(e))return e;const t=e.assignedSlot||e.parentNode||Ni(e)&&e.host||Di(e);return Ni(t)?t.host:t}function Yi(e){const t=Ui(e);return Gi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ei(t)&&Li(t)?t:Yi(t)}function Zi(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Yi(e),o=r===(null==(i=e.ownerDocument)?void 0:i.body),a=Ii(r);if(o){const e=Xi(a);return t.concat(a,a.visualViewport||[],Li(r)?r:[],e&&n?Zi(e):[])}return t.concat(r,Zi(r,[],n))}function Xi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function qi(e){const t=Wi(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Ei(e),o=r?e.offsetWidth:n,a=r?e.offsetHeight:i,s=Qn(n)!==o||Qn(i)!==a;return s&&(n=o,i=a),{width:n,height:i,$:s}}function $i(e){return Ai(e)?e:e.contextElement}function Ki(e){const t=$i(e);if(!Ei(t))return ti(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:o}=qi(t);let a=(o?Qn(n.width):n.width)/i,s=(o?Qn(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Ji=ti(0);function Qi(e){const t=Ii(e);return ji()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ji}function er(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),o=$i(e);let a=ti(1);t&&(i?Ai(i)&&(a=Ki(i)):a=Ki(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ii(e))&&t}(o,n,i)?Qi(o):ti(0);let l=(r.left+s.x)/a.x,u=(r.top+s.y)/a.y,c=r.width/a.x,d=r.height/a.y;if(o){const e=Ii(o),t=i&&Ai(i)?Ii(i):i;let n=e,r=Xi(n);for(;r&&i&&t!==n;){const e=Ki(r),t=r.getBoundingClientRect(),i=Wi(r),o=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=o,u+=a,n=Ii(r),r=Xi(n)}}return xi({width:c,height:d,x:l,y:u})}function tr(e,t){const n=Hi(e).scrollLeft;return t?t.left+n:er(Di(e)).left+n}function nr(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-tr(e,n),y:n.top+t.scrollTop}}function ir(e,t,n){let i;if("viewport"===t)i=function(e,t){const n=Ii(e),i=Di(e),r=n.visualViewport;let o=i.clientWidth,a=i.clientHeight,s=0,l=0;if(r){o=r.width,a=r.height;const e=ji();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}const u=tr(i);if(u<=0){const e=i.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(i.clientWidth-t.clientWidth-r);a<=25&&(o-=a)}else u<=25&&(o+=u);return{width:o,height:a,x:s,y:l}}(e,n);else if("document"===t)i=function(e){const t=Di(e),n=Hi(e),i=e.ownerDocument.body,r=Jn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Jn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+tr(e);const s=-n.scrollTop;return"rtl"===Wi(i).direction&&(a+=Jn(t.clientWidth,i.clientWidth)-r),{width:r,height:o,x:a,y:s}}(Di(e));else if(Ai(t))i=function(e,t){const n=er(e,!0,"fixed"===t),i=n.top+e.clientTop,r=n.left+e.clientLeft,o=Ei(e)?Ki(e):ti(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:r*o.x,y:i*o.y}}(t,n);else{const n=Qi(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return xi(i)}function rr(e,t){const n=Ui(e);return!(n===t||!Ai(n)||Gi(n))&&("fixed"===Wi(n).position||rr(n,t))}function or(e,t,n){const i=Ei(t),r=Di(t),o="fixed"===n,a=er(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=ti(0);function u(){l.x=tr(r)}if(i||!i&&!o)if(("body"!==Ti(t)||Li(r))&&(s=Hi(t)),i){const e=er(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&u();o&&!i&&r&&u();const c=!r||i||o?ti(0):nr(r,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function ar(e){return"static"===Wi(e).position}function sr(e,t){if(!Ei(e)||"fixed"===Wi(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Di(e)===n&&(n=n.ownerDocument.body),n}function lr(e,t){const n=Ii(e);if(Oi(e))return n;if(!Ei(e)){let t=Ui(e);for(;t&&!Gi(t);){if(Ai(t)&&!ar(t))return t;t=Ui(t)}return n}let i=sr(e,t);for(;i&&Pi(i)&&ar(i);)i=sr(i,t);return i&&Gi(i)&&ar(i)&&!Bi(i)?n:i||function(e){let t=Ui(e);for(;Ei(t)&&!Gi(t);){if(Bi(t))return t;if(Oi(t))return null;t=Ui(t)}return null}(e)||n}const ur={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const o="fixed"===r,a=Di(i),s=!!t&&Oi(t.floating);if(i===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ti(1);const c=ti(0),d=Ei(i);if((d||!d&&!o)&&(("body"!==Ti(i)||Li(a))&&(l=Hi(i)),d)){const e=er(i);u=Ki(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const h=!a||d||o?ti(0):nr(a,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+h.x,y:n.y*u.y-l.scrollTop*u.y+c.y+h.y}},getDocumentElement:Di,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[..."clippingAncestors"===n?Oi(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let i=Zi(e,[],!1).filter(e=>Ai(e)&&"body"!==Ti(e)),r=null;const o="fixed"===Wi(e).position;let a=o?Ui(e):e;for(;Ai(a)&&!Gi(a);){const t=Wi(a),n=Bi(a);n||"fixed"!==t.position||(r=null),(o?!n&&!r:!n&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||Li(a)&&!n&&rr(e,a))?i=i.filter(e=>e!==a):r=t,a=Ui(a)}return t.set(e,i),i}(t,this._c):[].concat(n),i],a=ir(t,o[0],r);let s=a.top,l=a.right,u=a.bottom,c=a.left;for(let d=1;d<o.length;d++){const e=ir(t,o[d],r);s=Jn(e.top,s),l=Kn(e.right,l),u=Kn(e.bottom,u),c=Jn(e.left,c)}return{width:l-c,height:u-s,x:c,y:s}},getOffsetParent:lr,getElementRects:async function(e){const t=this.getOffsetParent||lr,n=this.getDimensions,i=await n(e.floating);return{reference:or(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=qi(e);return{width:t,height:n}},getScale:Ki,isElement:Ai,isRTL:function(e){return"rtl"===Wi(e).direction}};function cr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dr(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,u=$i(e),c=r||o?[...u?Zi(u):[],...t?Zi(t):[]]:[];c.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});const d=u&&s?function(e,t){let n,i=null;const r=Di(e);function o(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const u=e.getBoundingClientRect(),{left:c,top:d,width:h,height:p}=u;if(s||t(),!h||!p)return;const f={rootMargin:-ei(d)+"px "+-ei(r.clientWidth-(c+h))+"px "+-ei(r.clientHeight-(d+p))+"px "+-ei(c)+"px",threshold:Jn(0,Kn(1,l))||1};let g=!0;function m(t){const i=t[0].intersectionRatio;if(i!==l){if(!g)return a();i?a(!1,i):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==i||cr(u,e.getBoundingClientRect())||a(),g=!1}try{i=new IntersectionObserver(m,{...f,root:r.ownerDocument})}catch(v){i=new IntersectionObserver(m,f)}i.observe(e)}(!0),o}(u,n):null;let h,p=-1,f=null;a&&(f=new ResizeObserver(e=>{let[i]=e;i&&i.target===u&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),u&&!l&&f.observe(u),t&&f.observe(t));let g=l?er(e):null;return l&&function t(){const i=er(e);g&&!cr(g,i)&&n();g=i,h=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{r&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const hr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:o,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:i,elements:r}=e,o=await(null==i.isRTL?void 0:i.isRTL(r.floating)),a=oi(n),s=ai(n),l="y"===ui(n),u=Si.has(a)?-1:1,c=o&&l?-1:1,d=ri(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(p="end"===s?-1*f:f),l?{x:p*c,y:h*u}:{x:h*u,y:p*c}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(i=s.arrow)&&i.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:a}}}}},pr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r,platform:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=ri(e,t),c={x:n,y:i},d=await o.detectOverflow(t,u),h=ui(oi(r)),p=si(h);let f=c[p],g=c[h];if(a){const e="y"===p?"bottom":"right";f=ii(f+d["y"===p?"top":"left"],f,f-d[e])}if(s){const e="y"===h?"bottom":"right";g=ii(g+d["y"===h?"top":"left"],g,g-d[e])}const m=l.fn({...t,[p]:f,[h]:g});return{...m,data:{x:m.x-n,y:m.y-i,enabled:{[p]:a,[h]:s}}}}}},fr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:o,rects:a,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=ri(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const v=oi(r),y=ui(s),x=oi(s)===s,_=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(x||!g?[vi(s)]:function(e){const t=vi(e);return[di(e),t,di(t)]}(s)),w="none"!==f;!h&&w&&b.push(...mi(s,g,f,_));const C=[s,...b],S=await l.detectOverflow(t,m),M=[];let T=(null==(i=o.flip)?void 0:i.overflows)||[];if(c&&M.push(S[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const i=ai(e),r=ci(e),o=li(r);let a="x"===r?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=vi(a)),[a,vi(a)]}(r,a,_);M.push(S[e[0]],S[e[1]])}if(T=[...T,{placement:r,overflows:M}],!M.every(e=>e<=0)){var I,D;const e=((null==(I=o.flip)?void 0:I.index)||0)+1,t=C[e];if(t){if(!("alignment"===d&&y!==ui(t))||T.every(e=>ui(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(D=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:D.placement;if(!n)switch(p){case"bestFit":{var k;const e=null==(k=T.filter(e=>{if(w){const t=ui(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},gr=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=ri(e,t),c=await a.detectOverflow(t,u),d=oi(r),h=ai(r),p="y"===ui(r),{width:f,height:g}=o.floating;let m,v;"top"===d||"bottom"===d?(m=d,v=h===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,m="end"===h?"top":"bottom");const y=g-c.top-c.bottom,x=f-c.left-c.right,_=Kn(g-c[m],y),b=Kn(f-c[v],x),w=!t.middlewareData.shift;let C=_,S=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=x),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(C=y),w&&!h){const e=Jn(c.left,0),t=Jn(c.right,0),n=Jn(c.top,0),i=Jn(c.bottom,0);p?S=f-2*(0!==e||0!==t?e+t:Jn(c.left,c.right)):C=g-2*(0!==n||0!==i?n+i:Jn(c.top,c.bottom))}await l({...t,availableWidth:S,availableHeight:C});const M=await a.getDimensions(s.floating);return f!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}},mr=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...o}=ri(e,t);switch(r){case"referenceHidden":{const e=wi(await i.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ci(e)}}}case"escaped":{const e=wi(await i.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ci(e)}}}default:return{}}}}},vr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=ri(e,t)||{};if(null==u)return{};const d=yi(c),h={x:n,y:i},p=ci(r),f=li(p),g=await a.getDimensions(u),m="y"===p,v=m?"top":"left",y=m?"bottom":"right",x=m?"clientHeight":"clientWidth",_=o.reference[f]+o.reference[p]-h[p]-o.floating[f],b=h[p]-o.reference[p],w=await(null==a.getOffsetParent?void 0:a.getOffsetParent(u));let C=w?w[x]:0;C&&await(null==a.isElement?void 0:a.isElement(w))||(C=s.floating[x]||o.floating[f]);const S=_/2-b/2,M=C/2-g[f]/2-1,T=Kn(d[v],M),I=Kn(d[y],M),D=T,k=C-g[f]-I,A=C/2-g[f]/2+S,E=ii(D,A,k),N=!l.arrow&&null!=ai(r)&&A!==E&&o.reference[f]/2-(A<D?T:I)-g[f]/2<0,L=N?A<D?A-D:A-k:0;return{[p]:h[p]+L,data:{[p]:E,centerOffset:A-E-L,...N&&{alignmentOffset:L}},reset:N}}}),yr=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=ri(e,t),c={x:n,y:i},d=ui(r),h=si(d);let p=c[h],f=c[d];const g=ri(s,t),m="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const e="y"===h?"height":"width",t=o.reference[h]-o.floating[e]+m.mainAxis,n=o.reference[h]+o.reference[e]-m.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y;const e="y"===h?"width":"height",t=Si.has(oi(r)),n=o.reference[d]-o.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:m.crossAxis),i=o.reference[d]+o.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?m.crossAxis:0);f<n?f=n:f>i&&(f=i)}return{[h]:p,[d]:f}}}},xr=(e,t,n)=>{const i=new Map,r={platform:ur,...n},o={...r.platform,_c:i};return(async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:bi},l=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:d}=_i(u,i,l),h=i,p=0;const f={};for(let g=0;g<o.length;g++){const n=o[g];if(!n)continue;const{name:m,fn:v}=n,{x:y,y:x,data:_,reset:b}=await v({x:c,y:d,initialPlacement:i,placement:h,strategy:r,middlewareData:f,rects:u,platform:s,elements:{reference:e,floating:t}});c=null!=y?y:c,d=null!=x?x:d,f[m]={...f[m],..._},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):b.rects),({x:c,y:d}=_i(u,h,l))),g=-1)}return{x:c,y:d,placement:h,strategy:r,middlewareData:f}})(e,t,{...r,platform:o})};var _r="undefined"!=typeof document?s.useLayoutEffect:function(){};function br(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;0!==i--;)if(!br(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;0!==i--;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!==i--;){const n=r[i];if(("_owner"!==n||!e.$$typeof)&&!br(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function wr(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cr(e,t){const n=wr(e);return Math.round(t*n)/n}function Sr(e){const t=g.useRef(e);return _r(()=>{t.current=e}),t}const Mr=(e,t)=>{const n=hr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tr=(e,t)=>{const n=pr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ir=(e,t)=>({fn:yr(e).fn,options:[e,t]}),Dr=(e,t)=>{const n=fr(e);return{name:n.name,fn:n.fn,options:[e,t]}},kr=(e,t)=>{const n=gr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ar=(e,t)=>{const n=mr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Er=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:i}="function"==typeof e?e(t):e;return n&&(r=n,{}.hasOwnProperty.call(r,"current"))?null!=n.current?vr({element:n.current,padding:i}).fn(t):{}:n?vr({element:n,padding:i}).fn(t):{};var r}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Nr=g.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...o}=e;return a.jsx(We.svg,{...o,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nr.displayName="Arrow";var Lr=Nr;var Pr="Popper",[Or,Rr]=Ee(Pr),[Fr,zr]=Or(Pr),Vr=e=>{const{__scopePopper:t,children:n}=e,[i,r]=g.useState(null);return a.jsx(Fr,{scope:t,anchor:i,onAnchorChange:r,children:n})};Vr.displayName=Pr;var Br="PopperAnchor",jr=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,o=zr(Br,n),s=g.useRef(null),l=Ae(t,s),u=g.useRef(null);return g.useEffect(()=>{const e=u.current;u.current=(null==i?void 0:i.current)||s.current,e!==u.current&&o.onAnchorChange(u.current)}),i?null:a.jsx(We.div,{...r,ref:l})});jr.displayName=Br;var Gr="PopperContent",[Wr,Hr]=Or(Gr),Ur=g.forwardRef((e,t)=>{var n,i,r,o,s,l;const{__scopePopper:u,side:c="bottom",sideOffset:d=0,align:h="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:x=0,sticky:_="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:C,...S}=e,M=zr(Gr,u),[T,I]=g.useState(null),D=Ae(t,e=>I(e)),[k,A]=g.useState(null),E=function(e){const[t,n]=g.useState(void 0);return Le(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const i=t[0];let r,o;if("borderBoxSize"in i){const e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(k),N=(null==E?void 0:E.width)??0,L=(null==E?void 0:E.height)??0,P=c+("center"!==h?"-"+h:""),O="number"==typeof x?x:{top:0,right:0,bottom:0,left:0,...x},R=Array.isArray(y)?y:[y],F=R.length>0,z={padding:O,boundary:R.filter(qr),altBoundary:F},{refs:V,floatingStyles:B,placement:j,isPositioned:G,middlewareData:W}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=g.useState(i);br(h,i)||p(i);const[f,v]=g.useState(null),[y,x]=g.useState(null),_=g.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),b=g.useCallback(e=>{e!==M.current&&(M.current=e,x(e))},[]),w=o||f,C=a||y,S=g.useRef(null),M=g.useRef(null),T=g.useRef(c),I=null!=l,D=Sr(l),k=Sr(r),A=Sr(u),E=g.useCallback(()=>{if(!S.current||!M.current)return;const e={placement:t,strategy:n,middleware:h};k.current&&(e.platform=k.current),xr(S.current,M.current,e).then(e=>{const t={...e,isPositioned:!1!==A.current};N.current&&!br(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[h,t,n,k,A]);_r(()=>{!1===u&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);const N=g.useRef(!1);_r(()=>(N.current=!0,()=>{N.current=!1}),[]),_r(()=>{if(w&&(S.current=w),C&&(M.current=C),w&&C){if(D.current)return D.current(w,C,E);E()}},[w,C,E,D,I]);const L=g.useMemo(()=>({reference:S,floating:M,setReference:_,setFloating:b}),[_,b]),P=g.useMemo(()=>({reference:w,floating:C}),[w,C]),O=g.useMemo(()=>{const e={position:n,left:0,top:0};if(!P.floating)return e;const t=Cr(P.floating,c.x),i=Cr(P.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...wr(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:i}},[n,s,P.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:E,refs:L,elements:P,floatingStyles:O}),[c,E,L,P,O])}({strategy:"fixed",placement:P,whileElementsMounted:(...e)=>dr(...e,{animationFrame:"always"===w}),elements:{reference:M.anchor},middleware:[Mr({mainAxis:d+L,alignmentAxis:p}),v&&Tr({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?Ir():void 0,...z}),v&&Dr({...z}),kr({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:i})=>{const{width:r,height:o}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${i}px`),a.setProperty("--radix-popper-anchor-width",`${r}px`),a.setProperty("--radix-popper-anchor-height",`${o}px`)}}),k&&Er({element:k,padding:f}),$r({arrowWidth:N,arrowHeight:L}),b&&Ar({strategy:"referenceHidden",...z})]}),[H,U]=Kr(j),Y=Ue(C);Le(()=>{G&&(null==Y||Y())},[G,Y]);const Z=null==(n=W.arrow)?void 0:n.x,X=null==(i=W.arrow)?void 0:i.y,q=0!==(null==(r=W.arrow)?void 0:r.centerOffset),[$,K]=g.useState();return Le(()=>{T&&K(window.getComputedStyle(T).zIndex)},[T]),a.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:G?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[null==(o=W.transformOrigin)?void 0:o.x,null==(s=W.transformOrigin)?void 0:s.y].join(" "),...(null==(l=W.hide)?void 0:l.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Wr,{scope:u,placedSide:H,onArrowChange:A,arrowX:Z,arrowY:X,shouldHideArrow:q,children:a.jsx(We.div,{"data-side":H,"data-align":U,...S,ref:D,style:{...S.style,animation:G?void 0:"none"}})})})});Ur.displayName=Gr;var Yr="PopperArrow",Zr={top:"bottom",right:"left",bottom:"top",left:"right"},Xr=g.forwardRef(function(e,t){const{__scopePopper:n,...i}=e,r=Hr(Yr,n),o=Zr[r.placedSide];return a.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:a.jsx(Lr,{...i,ref:t,style:{...i.style,display:"block"}})})});function qr(e){return null!==e}Xr.displayName=Yr;var $r=e=>({name:"transformOrigin",options:e,fn(t){var n,i,r;const{placement:o,rects:a,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),u=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[d,h]=Kr(o),p={start:"0%",center:"50%",end:"100%"}[h],f=((null==(i=s.arrow)?void 0:i.x)??0)+u/2,g=((null==(r=s.arrow)?void 0:r.y)??0)+c/2;let m="",v="";return"bottom"===d?(m=l?p:`${f}px`,v=-c+"px"):"top"===d?(m=l?p:`${f}px`,v=`${a.floating.height+c}px`):"right"===d?(m=-c+"px",v=l?p:`${g}px`):"left"===d&&(m=`${a.floating.width+c}px`,v=l?p:`${g}px`),{data:{x:m,y:v}}}});function Kr(e){const[t,n="center"]=e.split("-");return[t,n]}var Jr=Vr,Qr=jr,eo=Ur,to=Xr,no="Popover",[io]=Ee(no,[Rr]),ro=Rr(),[oo,ao]=io(no),so=e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:r,onOpenChange:o,modal:s=!1}=e,l=ro(t),u=g.useRef(null),[c,d]=g.useState(!1),[h,p]=ze({prop:i,defaultProp:r??!1,onChange:o,caller:no});return a.jsx(Jr,{...l,children:a.jsx(oo,{scope:t,contentId:Re(),triggerRef:u,open:h,onOpenChange:p,onOpenToggle:g.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:c,onCustomAnchorAdd:g.useCallback(()=>d(!0),[]),onCustomAnchorRemove:g.useCallback(()=>d(!1),[]),modal:s,children:n})})};so.displayName=no;var lo="PopoverAnchor";g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=ao(lo,n),o=ro(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=r;return g.useEffect(()=>(s(),()=>l()),[s,l]),a.jsx(Qr,{...o,...i,ref:t})}).displayName=lo;var uo="PopoverTrigger",co=g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=ao(uo,n),o=ro(n),s=Ae(t,r.triggerRef),l=a.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Co(r.open),...i,ref:s,onClick:Ie(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?l:a.jsx(Qr,{asChild:!0,...o,children:l})});co.displayName=uo;var ho="PopoverPortal",[po,fo]=io(ho,{forceMount:void 0}),go=e=>{const{__scopePopover:t,forceMount:n,children:i,container:r}=e,o=ao(ho,t);return a.jsx(po,{scope:t,forceMount:n,children:a.jsx(dt,{present:n||o.open,children:a.jsx(ct,{asChild:!0,container:r,children:i})})})};go.displayName=ho;var mo="PopoverContent",vo=g.forwardRef((e,t)=>{const n=fo(mo,e.__scopePopover),{forceMount:i=n.forceMount,...r}=e,o=ao(mo,e.__scopePopover);return a.jsx(dt,{present:i||o.open,children:o.modal?a.jsx(xo,{...r,ref:t}):a.jsx(_o,{...r,ref:t})})});vo.displayName=mo;var yo=Ve("PopoverContent.RemoveScroll"),xo=g.forwardRef((e,t)=>{const n=ao(mo,e.__scopePopover),i=g.useRef(null),r=Ae(t,i),o=g.useRef(!1);return g.useEffect(()=>{const e=i.current;if(e)return cn(e)},[]),a.jsx(nn,{as:yo,allowPinchZoom:!0,children:a.jsx(bo,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ie(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:Ie(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,i=2===t.button||n;o.current=i},{checkForDefaultPrevented:!1}),onFocusOutside:Ie(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),_o=g.forwardRef((e,t)=>{const n=ao(mo,e.__scopePopover),i=g.useRef(!1),r=g.useRef(!1);return a.jsx(bo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,a;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(i.current||null==(a=n.triggerRef.current)||a.focus(),t.preventDefault()),i.current=!1,r.current=!1},onInteractOutside:t=>{var o,a;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(r.current=!0));const s=t.target;(null==(a=n.triggerRef.current)?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&r.current&&t.preventDefault()}})}),bo=g.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:d,...h}=e,p=ao(mo,n),f=ro(n);return ft(),a.jsx(it,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:a.jsx(eo,{"data-state":Co(p.open),role:"dialog",id:p.contentId,...f,...h,ref:t,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),wo="PopoverClose";g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=ao(wo,n);return a.jsx(We.button,{type:"button",...i,ref:t,onClick:Ie(e.onClick,()=>r.onOpenChange(!1))})}).displayName=wo;function Co(e){return e?"open":"closed"}g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=ro(n);return a.jsx(to,{...r,...i,ref:t})}).displayName="PopoverArrow";var So=so,Mo=co,To=go,Io=vo;function Do(e,t,n){let i,r=n.initialDeps??[],o=!0;function a(){var a,s,l;let u;n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(u=Date.now());const c=e();if(!(c.length!==r.length||c.some((e,t)=>r[t]!==e)))return i;let d;if(r=c,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(d=Date.now()),i=t(...c),n.key&&(null==(l=n.debug)?void 0:l.call(n))){Math.round(100*(Date.now()-u)),Math.round(100*(Date.now()-d))}return!(null==n?void 0:n.onChange)||o&&n.skipInitialOnChange||n.onChange(i),o=!1,i}return a.updateDeps=e=>{r=e},a}function ko(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const Ao=(e,t,n)=>{let i;return function(...r){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,r),n)}},Eo=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},No=e=>e,Lo=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let r=t;r<=n;r++)i.push(r);return i},Po=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const r=e=>{const{width:n,height:i}=e;t({width:Math.round(n),height:Math.round(i)})};if(r(Eo(n)),!i.ResizeObserver)return()=>{};const o=new i.ResizeObserver(t=>{const i=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void r({width:t.inlineSize,height:t.blockSize})}r(Eo(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Oo={passive:!0},Ro="undefined"==typeof window||"onscrollend"in window,Fo=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let r=0;const o=e.options.useScrollendEvent&&Ro?()=>{}:Ao(i,()=>{t(r,!1)},e.options.isScrollingResetDelay),a=i=>()=>{const{horizontal:a,isRtl:s}=e.options;r=a?n.scrollLeft*(s?-1:1):n.scrollTop,o(),t(r,i)},s=a(!0),l=a(!1);n.addEventListener("scroll",s,Oo);const u=e.options.useScrollendEvent&&Ro;return u&&n.addEventListener("scrollend",l,Oo),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},zo=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e){return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Vo=(e,{adjustments:t=0,behavior:n},i)=>{var r,o;const a=e+t;null==(o=null==(r=i.scrollElement)?void 0:r.scrollTo)||o.call(r,{[i.options.horizontal?"left":"top"]:a,behavior:n})};class Bo{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null;const t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const t=()=>{const t=e.target,n=this.indexFromElement(t);t.isConnected?this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this)):this.observer.unobserve(t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:No,rangeExtractor:Lo,onChange:()=>{},measureElement:zo,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=Do(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:"production"!==process.env.NODE_ENV&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const n=new Map,i=new Map;for(let r=t-1;r>=0;r--){const t=e[r];if(n.has(t.lane))continue;const o=i.get(t.lane);if(null==o||t.end>o.end?i.set(t.lane,t):t.end<o.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Do(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,i,r,o,a)=>(void 0!==this.prevLanes&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:r,lanes:o,laneAssignmentMode:a}),{key:!1}),this.getMeasurements=Do(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:r,lanes:o,laneAssignmentMode:a},s)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const d of this.laneAssignments.keys())d>=e&&this.laneAssignments.delete(d);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,l),c=new Array(o).fill(void 0);for(let d=0;d<l;d++){const e=u[d];e&&(c[e.lane]=d)}for(let d=l;d<e;d++){const e=i(d),r=this.laneAssignments.get(d);let o,l;const h="estimate"===a||s.has(e);if(void 0!==r&&this.options.lanes>1){o=r;const e=c[o],i=void 0!==e?u[e]:void 0;l=i?i.end+this.options.gap:t+n}else{const e=1===this.options.lanes?u[d-1]:this.getFurthestMeasurement(u,d);l=e?e.end+this.options.gap:t+n,o=e?e.lane:d%this.options.lanes,this.options.lanes>1&&h&&this.laneAssignments.set(d,o)}const p=s.get(e),f="number"==typeof p?p:this.options.estimateSize(d),g=l+f;u[d]={index:d,start:l,size:f,end:g,key:e,lane:o},c[o]=d}return this.measurementsCache=u,u},{key:"production"!==process.env.NODE_ENV&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Do(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,i)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){const r=e.length-1,o=t=>e[t].start;if(e.length<=i)return{startIndex:0,endIndex:r};let a=jo(0,r,o,n),s=a;if(1===i)for(;s<r&&e[s].end<n+t;)s++;else if(i>1){const o=Array(i).fill(0);for(;s<r&&o.some(e=>e<n+t);){const t=e[s];o[t.lane]=t.end,s++}const l=Array(i).fill(n+t);for(;a>=0&&l.some(e=>e>=n);){const t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%i),s=Math.min(r,s+(i-1-s%i))}return{startIndex:a,endIndex:s}}({measurements:e,outerSize:t,scrollOffset:n,lanes:i}):null,{key:"production"!==process.env.NODE_ENV&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Do(()=>{let e=null,t=null;const n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,i,r)=>null===i||null===r?[]:e({startIndex:i,endIndex:r,overscan:t,count:n}),{key:"production"!==process.env.NODE_ENV&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):-1},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;const n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){const t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),i=Math.max(0,n-t),r=Math.min(this.options.count-1,n+t);return e>=i&&e<=r}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});const t=this.indexFromElement(e),n=this.options.getItemKey(t),i=this.elementsCache.get(n);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(n,e)),this.isScrolling&&!this.scrollState||!this.shouldMeasureDuringScroll(t)||this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;const i=this.measurementsCache[e];if(!i)return;const r=t-(this.itemSizeCache.get(i.key)??i.size);0!==r&&("smooth"!==(null==(n=this.scrollState)?void 0:n.behavior)&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(i,r,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&("production"!==process.env.NODE_ENV&&this.options.debug,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,t)),this.notify(!1))},this.getVirtualItems=Do(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const n=[];for(let i=0,r=e.length;i<r;i++){const r=t[e[i]];n.push(r)}return n},{key:"production"!==process.env.NODE_ENV&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0!==t.length)return ko(t[jo(0,t.length-1,e=>ko(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),r=this.getScrollOffset();"auto"===t&&(t=e>=r+i?"end":"start"),"center"===t?e+=(n-i)/2:"end"===t&&(e-=i);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.getSize(),i=this.getScrollOffset(),r=this.measurementsCache[e];if(!r)return;if("auto"===t)if(r.end>=i+n-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=i+this.options.scrollPaddingStart))return[i,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const o="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t,r.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{const i=this.getOffsetForAlignment(e,t),r=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:r,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));const i=this.getOffsetForIndex(e,t);if(!i)return;const[r,o]=i,a=this.now();this.scrollState={index:e,align:o,behavior:n,startedAt:a,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{const n=this.getScrollOffset()+e,i=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:i,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let n;if(0===t.length)n=this.options.paddingStart;else if(1===this.options.lanes)n=(null==(e=t[t.length-1])?void 0:e.end)??0;else{const e=Array(this.options.lanes).fill(null);let i=t.length-1;for(;i>=0&&e.some(e=>null===e);){const n=t[i];null===e[n.lane]&&(e[n.lane]=n.end),i--}n=Math.max(...e.filter(e=>null!==e))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){this.targetWindow?null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})):this.scrollState=null}reconcileScroll(){if(!this.scrollState)return;if(!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3)return void(this.scrollState=null);const e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&(i=t,r=this.getScrollOffset(),Math.abs(i-r)<1.01)){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1)return void(this.scrollState=null)}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));var i,r;this.scheduleScrollReconcile()}}const jo=(e,t,n,i)=>{for(;e<=t;){const r=(e+t)/2|0,o=n(r);if(o<i)e=r+1;else{if(!(o>i))return r;t=r-1}}return e>0?e-1:0};const Go="undefined"!=typeof document?g.useLayoutEffect:g.useEffect;function Wo(e){return function({useFlushSync:e=!0,...t}){const n=g.useReducer(()=>({}),{})[1],i={...t,onChange:(i,r)=>{var o;e&&r?c.flushSync(n):n(),null==(o=t.onChange)||o.call(t,i,r)}},[r]=g.useState(()=>new Bo(i));return r.setOptions(i),Go(()=>r._didMount(),[]),Go(()=>r._willUpdate()),r}({observeElementRect:Po,observeElementOffset:Fo,scrollToFn:Vo,...e})}const Ho=s.forwardRef(function(e,t){const{itemsSource:n,label:i,width:r=200,required:o=!1,readonly:l=!1,disabled:u=!1,keyProp:c="id",displayProp:d="text",useObjBinding:h=!1,useFilter:p=!0,listWidth:f=0,searchPlaceholder:g,emptyText:m,requiredMessage:v,invalidMessage:y,value:x,onChange:b,onClose:w,inputContainerSlot:C,iconSlot:S,listItemSlot:M,emptySlot:T}=e,I=_(),[D,E]=s.useState(!1),[N,L]=s.useState(""),[P,O]=s.useState(""),[R,F]=s.useState(""),z=s.useRef(null);s.useEffect(()=>{const e=window.setTimeout(()=>O(N),300);return()=>window.clearTimeout(e)},[N]);const V=s.useCallback(e=>"function"==typeof d?d(e):String((null==e?void 0:e[d])??""),[d]),B=s.useCallback(e=>null==e?void 0:e[c],[c]),j=s.useMemo(()=>{if(!p||!P)return n;const e=P.toLowerCase();return n.filter(t=>V(t).toLowerCase().includes(e))},[n,P,p,V]),G=s.useMemo(()=>null==x?null:h&&"object"==typeof x?x:n.find(e=>B(e)===x)??null,[x,n,h,B]),W=G?V(G):"",H=Wo({count:j.length,getScrollElement:()=>z.current,estimateSize:()=>24,overscan:5});s.useEffect(()=>{if(!D)return;const e=requestAnimationFrame(()=>{H.measure();const e=requestAnimationFrame(()=>{const e=j.findIndex(e=>B(e)===(h&&G?B(G):x));e>=0&&H.scrollToIndex(e,{align:"center"})});return()=>cancelAnimationFrame(e)});return()=>cancelAnimationFrame(e)},[D,j,x,B,h,G,H]),s.useEffect(()=>{!D&&N&&L("")},[D,N]),s.useEffect(()=>{D||null==w||w()},[D,w]);const U=()=>{if(o&&(null==x||""===x)){const e=(v??I.Select.requiredMessage).replace("{label}",i??"");return F(e),!1}return F(""),!0};s.useImperativeHandle(t,()=>({validate:U,open:()=>E(!0),close:()=>E(!1)}));const Y={width:"number"==typeof r?`${A(r)}rem`:r},Z=f&&("string"==typeof f||f>0)?{minWidth:"number"==typeof f?`${A(f)}rem`:f}:{width:"var(--radix-popover-trigger-width)",minWidth:"var(--radix-popover-trigger-width)"},X=y||R,q=!!X;return a.jsxs("div",{className:k("moz-r-select",{"is-disabled":u,"is-invalid":q,"is-open":D}),style:Y,children:[i&&a.jsxs("label",{className:k("moz-r-select__label",{"is-disabled":u}),children:[i,o&&a.jsx("span",{className:"moz-r-select__required",children:"*"})]}),a.jsxs(So,{open:D,onOpenChange:e=>!u&&!l&&E(e),children:[a.jsx(Mo,{asChild:!0,children:a.jsxs("button",{type:"button",className:k("moz-r-select__input-container",{"is-disabled":u}),disabled:u,onBlur:()=>{o&&U()},children:[C?C({text:W,item:G}):a.jsx("span",{className:k("moz-r-select__value",{"is-placeholder":!W}),children:W||g||I.Select.searchPlaceholder}),S?S({isOpen:D}):a.jsx(Yo,{isOpen:D})]})}),a.jsx(To,{children:a.jsxs(Io,{className:"moz-r-select__list-box",sideOffset:2,style:Z,children:[p&&a.jsx("div",{className:"moz-r-select__filter-input",children:a.jsx("input",{className:"moz-r-select__filter-input-field",placeholder:g??I.Select.searchPlaceholder,value:N,onChange:e=>L(e.target.value),onKeyDown:e=>{"Escape"===e.key&&E(!1)},autoFocus:!0})}),a.jsx("div",{ref:z,className:"moz-r-select__list-box-container",children:0===j.length?a.jsx("div",{className:"moz-r-select__empty",children:T??m??I.Select.emptyText}):a.jsx("div",{style:{height:`${H.getTotalSize()}px`,position:"relative"},children:H.getVirtualItems().map(e=>{const t=j[e.index],n=V(t),i=B(t)===(h&&G?B(G):x);return a.jsx("div",{className:k("moz-r-select__list-box-item",{"is-selected":i}),style:{position:"absolute",top:0,left:0,width:"100%",height:`${e.size}px`,transform:`translateY(${e.start}px)`},onClick:()=>(e=>{const t=B(e);b(h?e:t,e),F(""),E(!1)})(t),children:M?M({item:t,text:n,index:e.index,highlightText:P}):a.jsx(Uo,{text:n,highlight:P})},e.key)})})})]})})]}),X&&a.jsx("span",{className:"moz-r-select__invalid-message",children:X})]})});function Uo({text:e,highlight:t}){if(!t)return a.jsx(a.Fragment,{children:e});const n=e.toLowerCase().indexOf(t.toLowerCase());return n<0?a.jsx(a.Fragment,{children:e}):a.jsxs(a.Fragment,{children:[e.slice(0,n),a.jsx("strong",{className:"moz-r-select__match-highlight",children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}function Yo({isOpen:e}){return a.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",style:{transition:"transform 0.15s",transform:e?"rotate(180deg)":"rotate(0deg)"},children:a.jsx("path",{d:"M1 1L5 5L9 1",stroke:"#8998b5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Zo=s.forwardRef(function(e,t){const{label:n,value:i,onChange:r,type:o="text",placeholder:l,required:u=!1,disabled:c=!1,isReadOnly:d=!1,width:h="100%",messagePosition:p="outside",invalidMessage:f="",useInvalidV2:g=!1,onEnter:m,name:v,style:y,className:x,onKeyDown:_,onFocus:b,onBlur:w,...C}=e,S=s.useId(),M=s.useRef(null),[T,I]=s.useState(!1);s.useImperativeHandle(t,()=>({focus:()=>{var e;return null==(e=M.current)?void 0:e.focus()},blur:()=>{var e;return null==(e=M.current)?void 0:e.blur()},element:M.current}));const D={...y,width:"number"==typeof h?`${h}px`:h},A=""!==f&&!T;return a.jsx("div",{className:k("moz-r-input-wrapper",{"is-invalid":""!==f}),style:D,children:a.jsxs("div",{className:"moz-r-input__container",children:[n&&a.jsxs("label",{htmlFor:S,className:k("moz-r-input__label",{"is-disabled":c||d}),children:[n,u&&a.jsx("span",{className:"moz-r-input__required",children:"*"})]}),a.jsx("input",{ref:M,id:S,className:k("moz-r-input",{"is-disabled":c,"is-readonly":d,"has-inside-message":!g&&"inside"===p&&A,"has-invalid-icon":g&&A},x),name:v,type:o,placeholder:l,disabled:c||d,value:i,onChange:e=>{r(e.target.value)},onFocus:e=>{I(!0),null==b||b(e)},onBlur:e=>{I(!1),null==w||w(e)},onKeyDown:e=>{null==_||_(e),"Enter"===e.key&&(null==m||m(e))},...C}),g&&A&&a.jsx("div",{className:"moz-r-input__invalid-icon-v2",title:f,children:a.jsx(Xo,{color:"#dc5a5a"})}),!g&&A&&a.jsx("span",{className:k("moz-r-input__invalid-message",`position-${p}`),children:f})]})})});function Xo({color:e="#dc5a5a"}){return a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:e,strokeWidth:"1.5"}),a.jsx("path",{d:"M8 5V8.5",stroke:e,strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("circle",{cx:"8",cy:"11",r:"0.75",fill:e})]})}function qo(e){const{label:t,name:n,width:i=100,required:r=!1,step:o=1,min:l=-Number.MAX_VALUE,max:u=Number.MAX_VALUE,disabled:c=!1,shortMode:d=!1,nullable:h=!1,value:p,onChange:f,onEnter:g}=e,m=s.useRef(null),v="number"==typeof i?`${A(i)}rem`:i,y=()=>{if(c||void 0===p)return;const e=p+o;void 0!==u&&e>u||f(e)},x=()=>{if(c||void 0===p)return;const e=p-o;void 0!==l&&e<l||f(e)};return a.jsxs("div",{className:k("moz-r-number-input-container",{"is-disabled":c}),children:[t&&a.jsxs("label",{className:k("moz-r-number-input__label",{"is-disabled":c}),children:[t,r&&a.jsx("span",{className:"moz-r-number-input__required",children:"*"})]}),a.jsxs("div",{className:"moz-r-number-input-wrapper",style:{width:v},children:[!d&&a.jsx(J,{type:"icon-accent",className:k("moz-r-number-input__btn",{"is-disabled":c,"is-min-disabled":l>=p}),style:{borderRadius:"4px 0 0 4px"},disabled:c,onClick:x,icon:a.jsx($o,{disabled:c||l>=p})}),a.jsxs("div",{className:k("moz-r-number-input",{"has-border":d}),children:[a.jsx("input",{ref:m,type:"number",name:n,disabled:c,value:p,onChange:e=>{if(c)return;let t=e.target.value;if(""===t&&!h)return void f(0);let n=+t.replace(/,/g,"");n<l&&(n=l),n>u&&(n=u),f(n)},onBlur:e=>{if(!c&&!h&&""===e.target.value){const t=l!==-Number.MAX_VALUE?l:0;f(t),e.target.value=String(t)}},onKeyDown:e=>{if("Enter"===e.key&&(null==g||g(e)),c||h)return;if("Backspace"!==e.key&&"Delete"!==e.key)return;if(l===-Number.MAX_VALUE)return;if(Number(p)!==Number(l))return;const t=e.target,n=t.selectionStart??0,i=t.selectionEnd??0,r=t.value,o=n!==i;(o&&0===n&&i===r.length||!o&&1===r.length)&&e.preventDefault()}}),d&&a.jsxs("div",{className:"moz-r-number-input__btn-stack",children:[a.jsx("button",{type:"button",className:"moz-r-number-input__btn-icon",onClick:y,children:a.jsx(Jo,{disabled:c})}),a.jsx("button",{type:"button",className:"moz-r-number-input__btn-icon",onClick:x,children:a.jsx(Qo,{disabled:c})})]})]}),!d&&a.jsx(J,{type:"icon-accent",className:k("moz-r-number-input__btn",{"is-disabled":c,"is-max-disabled":u<=p}),style:{borderRadius:"0 4px 4px 0"},disabled:c,onClick:y,icon:a.jsx(Ko,{disabled:c||u<=p})})]})]})}function $o({disabled:e}){return a.jsx("svg",{width:"12",height:"2",viewBox:"0 0 12 2",fill:"none",children:a.jsx("path",{d:"M1 1H11",stroke:e?"#a7b1bc":"#ffffff",strokeWidth:"1.5",strokeLinecap:"round"})})}function Ko({disabled:e}){return a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:a.jsx("path",{d:"M6 1V11M1 6H11",stroke:e?"#a7b1bc":"#ffffff",strokeWidth:"1.5",strokeLinecap:"round"})})}function Jo({disabled:e}){return a.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",children:a.jsx("path",{d:"M1 5L5 1L9 5",stroke:e?"#a7b1bc":"#8998b5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Qo({disabled:e}){return a.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",children:a.jsx("path",{d:"M1 1L5 5L9 1",stroke:e?"#a7b1bc":"#8998b5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const ea="YYYY-MM-DD";function ta(e){const{label:t,name:n,width:i=200,required:r=!1,disabled:o=!1,readonly:l=!1,format:u=ea,showSpin:c=!1,min:h=null,max:p=null,style:f,value:g,onChange:m}=e,v="number"==typeof i?`${A(i)}rem`:i,y=s.useRef(null),x=s.useMemo(()=>g?d(g).format(u):"",[g,u]),_=s.useMemo(()=>g?d(g).format("YYYY-MM-DD"):"",[g]),b=!!h&&d(x).isValid()&&d(x).isSame(d(h),"day"),w=!!p&&d(x).isValid()&&d(x).isSame(d(p),"day"),C=e=>{g&&g instanceof Date?m(e?d(e).toDate():null):m(e?d(e):null)};return a.jsxs("div",{className:k("moz-r-date-input-container",{"is-disabled":o}),style:{...f,width:v},children:[t&&a.jsxs("label",{className:k("moz-r-date-input__label",{"is-disabled":o}),children:[t,r&&a.jsx("span",{className:"moz-r-date-input__required",children:"*"})]}),a.jsxs("div",{className:"moz-r-date-input-wrapper",style:{width:v},children:[c&&a.jsx(J,{type:"icon-accent",className:k("moz-r-date-move-btn","moz-r-date-move-btn--left",{"is-disabled":b}),disabled:b,onClick:()=>{g&&C(d(g).subtract(1,"d"))},icon:a.jsx(na,{disabled:o||b})}),a.jsxs("div",{className:k("moz-r-date-input",{"no-lr-border":c,radius:!c,"is-disabled":o}),children:[a.jsx("input",{ref:y,type:"date",name:n,disabled:o,readOnly:l,value:_,className:k("moz-r-date-input__field",{"is-disabled":o}),onChange:e=>{const t=e.target.value;if(!t)return void C(null);let n=d(t);h&&n.isBefore(d(h),"day")&&(n=d(h)),p&&n.isAfter(d(p),"day")&&(n=d(p)),C(n)},"aria-label":x}),!l&&a.jsx("div",{className:"moz-r-date-input__icon-container","aria-hidden":!0,children:a.jsx(ra,{disabled:o})})]}),c&&a.jsx(J,{type:"icon-accent",className:k("moz-r-date-move-btn","moz-r-date-move-btn--right",{"is-disabled":w}),disabled:w,onClick:()=>{g&&C(d(g).add(1,"d"))},icon:a.jsx(ia,{disabled:o||w})})]})]})}function na({disabled:e}){return a.jsx("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",children:a.jsx("path",{d:"M7 1L1 7L7 13",stroke:e?"#a7b1bc":"#ffffff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function ia({disabled:e}){return a.jsx("svg",{width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",children:a.jsx("path",{d:"M1 1L7 7L1 13",stroke:e?"#a7b1bc":"#ffffff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function ra({disabled:e}){const t=e?"#a7b1bc":"#8998b5";return a.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[a.jsx("rect",{x:"1",y:"2.5",width:"12",height:"10.5",rx:"1.5",stroke:t,strokeWidth:"1.5"}),a.jsx("path",{d:"M1 5.5H13",stroke:t,strokeWidth:"1.5"}),a.jsx("path",{d:"M4 1V4",stroke:t,strokeWidth:"1.5",strokeLinecap:"round"}),a.jsx("path",{d:"M10 1V4",stroke:t,strokeWidth:"1.5",strokeLinecap:"round"})]})}function oa({color:e="#bac6d4",disabled:t=!1,className:n}){return a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:[a.jsx("path",{d:"M10 0H2C0.89543 0 0 0.89543 0 2V10C0 11.1046 0.89543 12 2 12H10C11.1046 12 12 11.1046 12 10V2C12 0.89543 11.1046 0 10 0Z",fill:t?"#f4f4f9":"#ffffff"}),a.jsx("path",{d:"M10 0.5H2C1.17157 0.5 0.5 1.17157 0.5 2V10C0.5 10.8284 1.17157 11.5 2 11.5H10C10.8284 11.5 11.5 10.8284 11.5 10V2C11.5 1.17157 10.8284 0.5 10 0.5Z",stroke:t?"#a7b1bc":e})]})}function aa({color:e="#4568e0",disabled:t=!1,className:n}){return a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:a.jsx("path",{d:"M10 12H2C1.46957 12 0.960859 11.7893 0.585786 11.4142C0.210714 11.0391 0 10.5304 0 10V2C0 1.46957 0.210714 0.960859 0.585786 0.585786C0.960859 0.210714 1.46957 0 2 0L10 0C10.5304 0 11.0391 0.210714 11.4142 0.585786C11.7893 0.960859 12 1.46957 12 2V10C12 10.5304 11.7893 11.0391 11.4142 11.4142C11.0391 11.7893 10.5304 12 10 12ZM2.276 5.472C2.18827 5.47227 2.10149 5.49011 2.02077 5.52446C1.94005 5.5588 1.86702 5.60897 1.806 5.672C1.68191 5.79695 1.61227 5.9659 1.61227 6.142C1.61227 6.3181 1.68191 6.48705 1.806 6.612L4.2 9C4.32469 9.12457 4.49374 9.19455 4.67 9.19455C4.84626 9.19455 5.01531 9.12457 5.14 9L10.194 3.94C10.2557 3.87821 10.3047 3.80487 10.338 3.72417C10.3714 3.64347 10.3886 3.55698 10.3885 3.46965C10.3885 3.38231 10.3712 3.29584 10.3378 3.21518C10.3043 3.13451 10.2553 3.06122 10.1935 2.9995C10.1317 2.93778 10.0584 2.88883 9.97767 2.85545C9.89697 2.82208 9.81048 2.80492 9.72315 2.80497C9.63581 2.80501 9.54934 2.82226 9.46868 2.85572C9.38801 2.88919 9.31472 2.93821 9.253 3L4.667 7.587L2.747 5.667C2.68531 5.60494 2.61191 5.55574 2.53105 5.52227C2.4502 5.48879 2.36351 5.47171 2.276 5.472Z",fill:t?"#a7b1bc":e})})}function sa({color:e="#4568e0",disabled:t=!1,className:n}){return a.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,children:[a.jsx("rect",{width:"12",height:"12",rx:"2",fill:t?"#a7b1bc":e}),a.jsx("path",{d:"M3 6H9",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})]})}function la(e){const{label:t,fieldId:n,disabled:i=!1,readonly:r=!1,checked:o,indeterminate:l=!1,defaultChecked:u=!1,onChange:c}=e,d=s.useId(),h=n||d,p=s.useRef(null),[f,g]=s.useState(!1),[m,v]=s.useState(u),y=void 0!==o,x=y?o:m,_=()=>{const e=!x;y||v(e),null==c||c(e)};return a.jsxs("div",{className:k("moz-r-checkbox",{"moz-r-checkbox--disabled":i,"moz-r-checkbox--readonly":r&&!i}),onClick:e=>{var t;i||r||(e.preventDefault(),e.stopPropagation(),_(),null==(t=p.current)||t.focus())},children:[a.jsxs("div",{className:"moz-r-checkbox__icon-wrapper",children:[a.jsx("input",{id:h,ref:p,type:"checkbox",className:"moz-r-checkbox__input",checked:x,disabled:i,tabIndex:i?-1:0,onClick:e=>e.stopPropagation(),onChange:e=>{if(r)return void(e.target.checked=x);const t=e.target.checked;y?(e.target.checked=x,null==c||c(t)):(v(t),null==c||c(t))},onFocus:()=>g(!0),onBlur:()=>g(!1),onKeyDown:e=>{i||r||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),_())}}),a.jsx("div",{className:k("moz-r-checkbox__visual",{"is-focused":f}),children:l?a.jsx(sa,{className:"moz-r-checkbox__checked-icon",disabled:i}):x?a.jsx(aa,{className:"moz-r-checkbox__checked-icon",disabled:i}):a.jsx(oa,{className:"moz-r-checkbox__check-icon",color:"#bac6d4",disabled:i})})]}),t&&a.jsx("label",{htmlFor:h,className:k("moz-r-checkbox__label",{"is-disabled":i}),onClick:e=>e.stopPropagation(),children:t})]})}function ua(e){return"∅"===e||"●"===e}function ca({visible:e,onVisibleChange:t,dateFormat:n="YYYY-MM-DD"}){const i=_(),r=Y(),[o,l]=s.useState([]),[u,c]=s.useState([]),[p,f]=s.useState(!1),g=s.useMemo(()=>({"=":i.Grid.symbolEqual,"≠":i.Grid.symbolNotEqual,"%":i.Grid.symbolContains,"!%":i.Grid.symbolNotContains,"<":i.Grid.symbolLessThan,">":i.Grid.symbolGreaterThan,"≤":i.Grid.symbolLessOrEqual,"≥":i.Grid.symbolGreaterOrEqual,"∅":i.Grid.symbolEmpty,"●":i.Grid.symbolNotEmpty}),[i]),m=s.useMemo(()=>["%","!%","=","≠","∅","●"].map(e=>({symbol:e,desc:g[e]})),[g]),v=s.useMemo(()=>["=","≠","<",">","≤","≥","∅","●"].map(e=>({symbol:e,desc:g[e]})),[g]),y=s.useMemo(()=>["=","≠","∅","●"].map(e=>({symbol:e,desc:g[e]})),[g]),x=s.useMemo(()=>[{key:"AND",value:"AND"},{key:"OR",value:"OR"}],[]),b=s.useCallback(e=>"number"===e||"date"===e?v:"boolean"===e?y:m,[m,v,y]),w=s.useMemo(()=>{if(!(null==r?void 0:r.select))return!1;try{return r.select(e=>e.totalRowCount).getSnapshot()<1e5}catch{return!1}},[r]),C=s.useCallback(()=>{var e,t;if(!r)return void c([]);const n=null==(e=r.getPivotFields)?void 0:e.call(r),i=(null==(t=r.getFields)?void 0:t.call(r))??(n?[...n.rowFields,...n.columnFields,...n.valueFields,...n.filterFields]:null);c((i??[]).filter(e=>!e.hidden&&e.header&&e.header.length>0))},[r]),S=s.useMemo(()=>u.map(e=>({header:e.header??""})),[u]),M=s.useCallback(()=>{if(!(null==r?void 0:r.select))return[];try{return(r.select(e=>e.viewState.filters).getSnapshot()??[]).map((e,t)=>{const n=u.find(t=>t.id===e.id),i=("array"===(null==n?void 0:n.dataType)?"string":null==n?void 0:n.dataType)||"string",r={eq:"=",neq:"≠",contains:"%",notContains:"!%",lt:"<",gt:">",lte:"≤",gte:"≥",isNull:"∅",isNotNull:"●"}[e.operator]??"=";const o=b(i),a=o.find(e=>e.symbol===r)??o[0];return{sequence:e.sequence??t,header:(null==n?void 0:n.header)??e.id,binding:e.id,type:i,logical:"or"===e.logical?"OR":"AND",comparison:a.symbol,comparisonObj:a,variable:e.filterValue,dummy:"date"===i&&e.filterValue?d(e.filterValue):void 0}})}catch{return[]}},[r,u,b]),T=s.useCallback(e=>{if(!(null==r?void 0:r.filter))return;const t=e.filter(e=>!!e.binding&&("∅"===e.comparison||"●"===e.comparison||void 0!==e.variable&&null!==e.variable&&""!==e.variable)).map((e,t)=>{return{id:e.binding,sequence:t+1,operator:(n=e.comparison,{"=":"eq","≠":"neq","%":"contains","!%":"notContains","<":"lt",">":"gt","≤":"lte","≥":"gte","∅":"isNull","●":"isNotNull"}[n]),logical:"OR"===e.logical?"or":"and",filterValue:e.variable};var n});r.filter(t)},[r]);s.useEffect(()=>{e&&(f(w),C())},[e,w,C]),s.useEffect(()=>{e&&l(M())},[e,u,M]);const I=s.useRef(null);s.useEffect(()=>{I.current=h.debounce(e=>{p&&T(e)},100)},[p,T]);const D=e=>{p&&T(e)},k=(e,t)=>{const n=o.map(n=>n.sequence===e.sequence?{...n,variable:t}:n);var i,r;l(n),i=n,null==(r=I.current)||r.call(I,i)},A=()=>{var e,t;let n=u;if(0===n.length&&r)try{const i=null==(e=r.getPivotFields)?void 0:e.call(r);n=((null==(t=r.getFields)?void 0:t.call(r))??(i?[...i.rowFields,...i.columnFields,...i.valueFields,...i.filterFields]:null)??[]).filter(e=>!e.hidden&&e.header&&e.header.length>0),n.length>0&&c(n)}catch{}const i=((e,t)=>{const n=("array"===t.dataType?"string":t.dataType)||"string",i=b(n),r="string"===n?i.find(e=>"%"===e.symbol):i[0];return{sequence:e,header:t.header||"",binding:t.id||"",type:n,logical:"AND",comparison:r.symbol,comparisonObj:r,variable:null}})(o.length>0?o[o.length-1].sequence+1:0,n[0]??{id:"",header:"",dataType:"string"}),a=[...o,i];l(a),D(a)},E=()=>{var e;null==(e=null==r?void 0:r.filter)||e.call(r,[]),l([]),L()},N=s.useRef(!1),L=()=>{var e;N.current||(N.current=!0,p||(o.length>0?T(o):null==(e=null==r?void 0:r.filter)||e.call(r,[])),t(!1),N.current=!1)},[P,O]=s.useState(-1),[R,F]=s.useState(null),z=o.length>1?565:480,V=s.useMemo(()=>{const e=o.length>13?13:o.length;return 125+30*e+8*(e-1)},[o.length]);return a.jsx(Zn,{visible:e,onVisibleChange:e=>e?t(!0):L(),title:i.Grid.filterPopup,width:z,height:V,contentsPadding:"16px 16px 0 16px",showFooterBorder:!1,preset:"no-footer",footerSlot:()=>a.jsxs("div",{className:"moz-filter-footer",children:[a.jsx(la,{checked:p,onChange:f,label:i.Grid.immediateApply}),a.jsxs("div",{className:"moz-filter-footer-actions",children:[a.jsx(J,{type:"text",onClick:E,icon:a.jsx(_e,{color:"#4568e0"}),text:i.Grid.resetFilter}),a.jsx(J,{type:"text",onClick:A,icon:a.jsx(pe,{color:"#4568e0"}),text:i.Grid.addFilter})]})]}),children:a.jsx("div",{className:"moz-filters-wrapper",onDragOver:e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move")},onDragLeave:e=>{const t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||F(null)},onDrop:e=>{e.preventDefault();const t=R,n=P;if(F(null),O(-1),n<0||!t)return;const i=t.before?t.index:t.index+1;if(n===i||n===i-1)return;const r=[...o],[a]=r.splice(n,1);r.splice(n<i?i-1:i,0,a);const s=r.map((e,t)=>({...e,sequence:t}));l(s),D(s)},children:o.map((e,t)=>{const i=b(e.type),r=0!==t,s=o.length<=1,c=(null==R?void 0:R.index)===t&&R.before,h=(null==R?void 0:R.index)===t&&!R.before;return a.jsxs("div",{className:["moz-filter-row",s?"minify-width":"",c?"is-drop-before":"",h?"is-drop-after":""].filter(Boolean).join(" "),draggable:!0,onDragStart:e=>((e,t)=>{O(t),e.dataTransfer&&(e.dataTransfer.setData("text/plain",String(t)),e.dataTransfer.effectAllowed="move")})(e,t),onDragOver:e=>((e,t)=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move");const n=e.currentTarget.getBoundingClientRect(),i=e.clientY<n.top+n.height/2;F({index:t,before:i})})(e,t),onDragEnd:()=>{O(-1),F(null)},style:{opacity:P===t?.4:1},children:[a.jsx("div",{className:"moz-filter-handler",children:a.jsx(xe,{size:"12"})}),r?a.jsx(Ho,{itemsSource:x,value:e.logical,keyProp:"key",displayProp:"value",width:"100%",onChange:t=>((e,t)=>{const n=o.map(n=>n.sequence===e.sequence?{...n,logical:t}:n);l(n),D(n)})(e,t)}):!s&&a.jsx("div",{className:"spacer"}),a.jsx(Ho,{itemsSource:S,value:e.header,keyProp:"header",displayProp:"header",width:"100%",onChange:t=>((e,t)=>{const n=u.find(e=>e.header===t),i=("array"===(null==n?void 0:n.dataType)?"string":null==n?void 0:n.dataType)||"string",r=b(i),a=o.map(o=>o.sequence===e.sequence?{...o,header:t,binding:(null==n?void 0:n.id)??"",type:i,variable:null,comparison:r[0].symbol,comparisonObj:r[0]}:o);l(a),setTimeout(()=>D(a),0)})(e,String(t))}),a.jsx(Ho,{itemsSource:i,value:e.comparisonObj,keyProp:"symbol",displayProp:"symbol",width:"100%",useObjBinding:!0,useFilter:!1,listWidth:172,onChange:(t,n)=>((e,t)=>{const n=o.map(n=>n.sequence===e.sequence?{...n,comparison:t.symbol,comparisonObj:t}:n);l(n),D(n)})(e,n)}),"number"===e.type?a.jsx(qo,{width:"100%",value:Number(e.variable??0),onChange:t=>k(e,t),disabled:ua(e.comparison),nullable:!0}):"boolean"===e.type?a.jsx(Ho,{itemsSource:[{key:!0,value:"TRUE"},{key:!1,value:"FALSE"}],value:e.variable,keyProp:"key",displayProp:"value",width:"100%",onChange:t=>k(e,t)}):"date"===e.type?a.jsx(ta,{value:e.variable?d(e.variable):null,onChange:t=>k(e,t?d(t).format("YYYY-MM-DD"):null),disabled:ua(e.comparison),format:n,width:"100%"}):a.jsx(Zo,{value:String(e.variable??""),onChange:t=>k(e,t),disabled:ua(e.comparison),width:"100%"}),a.jsx("span",{className:"remove-row",onClick:()=>(e=>{const t=o.filter(t=>t.sequence!==e.sequence);l(t),D(t),0===t.length&&L()})(e),tabIndex:0,children:a.jsx(he,{})})]},e.sequence)})})})}function da({visible:e,onVisibleChange:t,width:n=410}){const i=_(),r=Y(),[o,l]=s.useState([]),[u,c]=s.useState(!1),[d,h]=s.useState(!1),[p,f]=s.useState([]),[g,m]=s.useState([]),v=s.useMemo(()=>{if(!(null==r?void 0:r.select))return!1;try{return r.select(e=>e.totalRowCount).getSnapshot()<1e5}catch{return!1}},[r]),y=s.useMemo(()=>g.map(e=>({header:e.header??""})).filter(e=>e.header.length>0),[g]),x=s.useCallback(()=>{if(!(null==r?void 0:r.select))return[];try{return(r.select(e=>e.viewState.sorts).getSnapshot()??[]).map((e,t)=>{const n=g.find(t=>t.id===e.id);return{sequence:e.sequence??t,header:(null==n?void 0:n.header)??e.id,binding:e.id,ascending:"asc"===e.direction,ascendingStr:"asc"===e.direction?i.Grid.ascending:i.Grid.descending,by:e.by??""}})}catch{return[]}},[r,g,i]),b=s.useCallback(()=>{var e,t,n,i;if(!r)return h(!1),void f([]);try{const o="pivot"===(null==(t=null==(e=r.pivot)?void 0:e.getMode)?void 0:t.call(e));if(h(o),!o)return void f([]);const a=null==(i=null==(n=r.pivot)?void 0:n.getConfig)?void 0:i.call(n),s=null==a?void 0:a.valueFields;f(s&&s.length>0?s.map(e=>({field:e.field,header:e.header})):[])}catch{h(!1),f([])}},[r]),w=s.useCallback(()=>{var e,t;if(b(),r)try{const n=null==(e=r.getPivotFields)?void 0:e.call(r),i=(null==(t=r.getFields)?void 0:t.call(r))??(n?[...n.rowFields,...n.columnFields,...n.valueFields,...n.filterFields]:null);if(!i||0===i.length)return void m([]);m(i.filter(e=>"_RID"!==e.id&&e.header&&e.header.length>0))}catch{m([])}else m([])},[r,b]);s.useEffect(()=>{e&&(c(v),w())},[e,v,w]),s.useEffect(()=>{e&&l(x())},[e,g,x]);const C=s.useCallback(e=>{if(!(null==r?void 0:r.sort))return;const t=e.map((e,t)=>({id:e.binding,direction:e.ascending?"asc":"desc",sequence:t+1,...e.by?{by:e.by}:{}}));r.sort(t)},[r]),S=e=>{u&&C(e)},M=()=>{var e,t;let n=g;if(0===n.length&&r)try{const i=null==(e=r.getPivotFields)?void 0:e.call(r);n=((null==(t=r.getFields)?void 0:t.call(r))??(i?[...i.rowFields,...i.columnFields,...i.valueFields,...i.filterFields]:null)??[]).filter(e=>"_RID"!==e.id&&e.header&&e.header.length>0),n.length>0&&m(n)}catch{}const a=o.length>0?o[o.length-1].sequence+1:0,s=n.find(e=>!o.some(t=>t.binding===e.id)),u={sequence:a,header:(null==s?void 0:s.header)??"",binding:(null==s?void 0:s.id)??"",ascending:!0,ascendingStr:i.Grid.ascending,by:""},c=[...o,u];l(c),S(c)},T=()=>{var e;null==(e=null==r?void 0:r.sort)||e.call(r,[]),l([]),D()},I=s.useRef(!1),D=()=>{var e;I.current||(I.current=!0,u||(o.length>0?C(o):null==(e=null==r?void 0:r.sort)||e.call(r,[])),t(!1),I.current=!1)},[k,A]=s.useState(-1),[E,N]=s.useState(null),L=()=>{A(-1),N(null)},P=s.useMemo(()=>[{value:"",label:"레이블"},...p.map(e=>({value:e.field,label:e.header??e.field}))],[p]),O=d&&p.length>0?n+130:n,R=s.useMemo(()=>[{value:i.Grid.ascending},{value:i.Grid.descending}],[i]);return a.jsx(Zn,{visible:e,onVisibleChange:e=>e?t(!0):D(),title:i.Grid.sortingPopup,width:O,maxHeight:500,contentsPadding:"16px 16px 0 16px",showFooterBorder:!1,preset:"no-footer",footerSlot:()=>a.jsxs("div",{className:"moz-sort-footer",children:[a.jsx(la,{checked:u,onChange:c,label:i.Grid.immediateApply}),a.jsxs("div",{className:"moz-sort-footer-actions",children:[a.jsx(J,{type:"text",onClick:T,icon:a.jsx(_e,{color:o.length>0?"#4568e0":"#a7b1bc"}),text:i.Grid.resetSort,disabled:0===o.length}),a.jsx(J,{type:"text",onClick:M,icon:a.jsx(pe,{color:"#4568e0"}),text:i.Grid.addSort,disabled:o.length>=y.length&&y.length>0})]})]}),children:a.jsx("div",{className:"moz-sort-container",onDragOver:e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move")},onDragLeave:e=>{const t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||N(null)},onDrop:e=>{e.preventDefault();const t=E,n=k;if(A(-1),N(null),n<0||!t)return;const i=t.before?t.index:t.index+1;if(n===i||n===i-1)return;const r=[...o],[a]=r.splice(n,1);r.splice(n<i?i-1:i,0,a);const s=r.map((e,t)=>({...e,sequence:t}));l(s),S(s)},children:o.map((e,t)=>{const n=o.slice(0,t).map(e=>e.header),r=y.filter(e=>!n.includes(e.header)),s=(null==E?void 0:E.index)===t&&E.before,u=(null==E?void 0:E.index)===t&&!E.before;return a.jsxs("div",{className:["moz-sort-row",d&&p.length>0?"moz-sort-row--pivot":"",s?"is-drop-before":"",u?"is-drop-after":""].filter(Boolean).join(" "),draggable:!0,onDragStart:e=>((e,t)=>{A(t),e.dataTransfer&&(e.dataTransfer.setData("text/plain",String(t)),e.dataTransfer.effectAllowed="move")})(e,t),onDragOver:e=>((e,t)=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move");const n=e.currentTarget.getBoundingClientRect(),i=e.clientY<n.top+n.height/2;N({index:t,before:i})})(e,t),onDragEnd:L,style:{opacity:k===t?.4:1},children:[a.jsx("div",{className:"moz-sort-handler",children:a.jsx(xe,{size:"12"})}),a.jsx(Ho,{width:210,itemsSource:r,value:e.header,keyProp:"header",displayProp:"header",onChange:t=>((e,t)=>{const n=g.find(e=>e.header===t),r=o.map(r=>r.sequence===e.sequence?{...r,header:t,binding:(null==n?void 0:n.id)??"",ascending:!0,ascendingStr:i.Grid.ascending}:r);l(r),setTimeout(()=>S(r),0)})(e,String(t))}),a.jsx(Ho,{width:100,itemsSource:R,value:e.ascendingStr,keyProp:"value",displayProp:"value",onChange:t=>((e,t)=>{const n=t===i.Grid.ascending,r=o.map(i=>i.sequence===e.sequence?{...i,ascending:n,ascendingStr:t}:i);l(r),S(r)})(e,String(t))}),d&&p.length>0&&a.jsx(Ho,{width:120,itemsSource:P,value:e.by,keyProp:"value",displayProp:"label",onChange:t=>((e,t)=>{const n=o.map(n=>n.sequence===e.sequence?{...n,by:t}:n);l(n),S(n)})(e,String(t))}),a.jsx("span",{className:"remove-row",onClick:()=>(e=>{const t=o.filter(t=>t.sequence!==e.sequence);l(t),S(t),0===t.length&&D()})(e),children:a.jsx(he,{})})]},e.sequence)})})})}function ha(e){const{label:t,labelPosition:n="left",required:i=!1,readonly:r=!1,disabled:o=!1,visible:l=!0,value:u,defaultValue:c=!1,onChange:d}=e,h=`switch_${s.useId()}`,p=void 0!==u,[f,g]=s.useState(c),m=p?u:f;return l?a.jsx("div",{className:"moz-r-switch-wrapper",children:a.jsxs("div",{className:"moz-r-switch",children:["right"!==n&&t&&a.jsxs("label",{htmlFor:h,className:k("moz-r-switch__label","moz-r-switch__label--left",{"is-disabled":o}),children:[t,i&&a.jsx("span",{className:"moz-r-switch__required",children:"*"})]}),a.jsxs("div",{className:k("moz-r-switch__box",{"is-active":m,"is-disabled":o}),children:[a.jsx("input",{id:h,className:"moz-r-switch__input",type:"checkbox",disabled:o,checked:m,onChange:e=>{if(o||r)return;const t=e.target.checked;p||g(t),null==d||d(t)},onClick:e=>{(o||r)&&(e.preventDefault(),e.stopPropagation())}}),a.jsx("div",{className:k("moz-r-switch__handler",{"is-active":m,"is-disabled":o})})]}),"right"===n&&t&&a.jsxs("label",{htmlFor:h,className:k("moz-r-switch__label","moz-r-switch__label--right",{"is-disabled":o}),children:[t,i&&a.jsx("span",{className:"moz-r-switch__required",children:"*"})]})]})}):null}function pa(e){const{onClose:t,useViewSelectColumn:n=!0,customMenu:i=[],toolbarVisible:r,footerVisible:o,groupPanelVisible:l,onToolbarVisibleChange:u,onFooterVisibleChange:c,onGroupPanelVisibleChange:d,onClickColumnPicker:h,headerRight:p}=e,f=_(),[g,m]=s.useState(!0),[v,y]=s.useState(!0),[x,b]=s.useState(!1),w=r??g,C=o??v,S=l??x,M=e=>{void 0===r&&m(e),null==u||u(e)},T=e=>{void 0===o&&y(e),null==c||c(e)},I=e=>{void 0===l&&b(e),null==d||d(e)},D=i.filter(e=>!0===e.isVisibleOnGridOption);return a.jsxs("div",{className:"grid-option-modal",children:[a.jsxs("div",{className:"grid-option-modal__title-wrapper",children:[a.jsx("span",{className:"grid-option-modal__title",children:f.Grid.layoutSetting}),a.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[p,a.jsx(J,{className:"grid-option-modal__close-btn",type:"icon",onClick:()=>null==t?void 0:t(),icon:a.jsx(he,{size:"12"})})]})]}),a.jsx("div",{className:"context-menu-separator"}),a.jsxs("div",{children:[a.jsxs("div",{className:"context-menu-item",onClick:()=>M(!w),children:[a.jsx("span",{children:f.Grid.viewToolbar}),a.jsx(ha,{value:w,onChange:M})]}),a.jsxs("div",{className:"context-menu-item",onClick:()=>T(!C),children:[a.jsx("span",{children:f.Grid.viewFooter}),a.jsx(ha,{value:C,onChange:T})]}),a.jsxs("div",{className:"context-menu-item",onClick:()=>I(!S),children:[a.jsx("span",{children:f.Grid.viewGroupPanel}),a.jsx(ha,{value:S,onChange:I})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"context-menu-separator"}),a.jsx("div",{className:"context-menu-item",onClick:()=>{null==h||h(),null==t||t()},children:f.Grid.columnPicker})]}),D.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"context-menu-separator"}),D.map(e=>a.jsx("div",{className:"context-menu-item",onClick:()=>{var n;null==(n=e.clicked)||n.call(e),null==t||t()},children:e.header},e.header))]})]})]})}const fa=s.forwardRef(function(e,t){const{trigger:n,children:i,open:r,onOpenChange:o}=e,l=s.useRef(null),u=s.useRef(null),[d,h]=s.useState(!1),[p,f]=s.useState({left:0,top:0,width:0,height:0}),g=void 0!==r,m=g?r:d,v=s.useCallback(e=>{g||h(e),null==o||o(e)},[g,o]),y=()=>{var e;const t=(null==(e=l.current)?void 0:e.firstElementChild)??l.current;if(!t)return;const n=t.getBoundingClientRect();f({left:n.left,top:n.top,width:n.width,height:n.height})};s.useImperativeHandle(t,()=>({close:()=>v(!1),toggle:()=>{m||y(),v(!m)}}),[m,v]),s.useEffect(()=>{if(!m)return;const e=e=>{"Escape"===e.key&&v(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[m,v]),s.useEffect(()=>{if(!m)return;const e=e=>{var t,n,i,r;const o=e.target;o&&((null==(t=u.current)?void 0:t.contains(o))||(null==(n=l.current)?void 0:n.contains(o))||(null==(i=o.closest)?void 0:i.call(o,"[data-radix-popper-content-wrapper]"))||(null==(r=o.closest)?void 0:r.call(o,'[role="menu"], [role="listbox"], [role="dialog"]'))||v(!1))};return document.addEventListener("mousedown",e,!0),()=>document.removeEventListener("mousedown",e,!0)},[m,v]),s.useEffect(()=>{if(!m)return;const e=()=>v(!1);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[m,v]);const x={position:"fixed",left:p.left+p.width,top:p.top+p.height+4,transform:"translateX(-100%)",zIndex:1501};return a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l,onClick:()=>{m||y(),v(!m)},style:{display:"inline-flex"},children:n}),m&&c.createPortal(a.jsx("div",{ref:u,className:"grid-setup-popover",style:x,role:"dialog",children:i}),document.body)]})}),ga={"=":"eq","≠":"neq","%":"contains","!%":"notContains",">":"gt","≥":"gte","<":"lt","≤":"lte","∅":"isNull","●":"isNotNull"};function ma(){const e=s.useRef(null),[t,n]=s.useState([]),i=s.useCallback(t=>{e.current=t},[]),r=s.useCallback(()=>{e.current=null,n([])},[]),o=s.useCallback(e=>{n(t=>[...t,{sequence:(null==e?void 0:e.sequence)??t.length+1,header:(null==e?void 0:e.header)??"",binding:(null==e?void 0:e.binding)??"",comparison:(null==e?void 0:e.comparison)??"=",logical:(null==e?void 0:e.logical)??"AND",type:null==e?void 0:e.type,variable:(null==e?void 0:e.variable)??"",variable2:null==e?void 0:e.variable2}])},[]),a=s.useCallback(e=>{n(t=>t.filter(t=>t.sequence!==e))},[]),l=s.useCallback((e,t)=>{n(n=>n.map(n=>n.sequence===e?{...n,...t}:n))},[]),u=s.useCallback(async()=>{if(!e.current)return;const n=t.map((e,t)=>({id:e.binding,sequence:t+1,operator:ga[e.comparison],filterValue:e.variable,logical:"OR"===e.logical?"or":"and"}));await e.current.filter(n)},[t]),c=s.useCallback(async()=>{var t;n([]),await(null==(t=e.current)?void 0:t.filter([]))},[]);return s.useEffect(()=>()=>r(),[r]),{filters:t,setGrid:i,destroy:r,addFilter:o,removeFilter:a,updateFilter:l,applyFilters:u,resetFilters:c}}function va(){const e=s.useRef(null),[t,n]=s.useState([]),i=s.useCallback(t=>{e.current=t},[]),r=s.useCallback(()=>{e.current=null,n([])},[]),o=s.useCallback(e=>{n(t=>[...t,{sequence:(null==e?void 0:e.sequence)??t.length+1,header:(null==e?void 0:e.header)??"",binding:(null==e?void 0:e.binding)??"",ascending:(null==e?void 0:e.ascending)??!0,by:null==e?void 0:e.by}])},[]),a=s.useCallback(e=>{n(t=>t.filter(t=>t.sequence!==e))},[]),l=s.useCallback((e,t)=>{n(n=>n.map(n=>n.sequence===e?{...n,...t}:n))},[]),u=s.useCallback(async()=>{if(!e.current)return;const n=t.map((e,t)=>({id:e.binding,direction:e.ascending?"asc":"desc",sequence:t+1}));await e.current.sort(n)},[t]),c=s.useCallback(async()=>{var t;n([]),await(null==(t=e.current)?void 0:t.sort([]))},[]);return s.useEffect(()=>()=>r(),[r]),{sorts:t,setGrid:i,destroy:r,addSort:o,removeSort:a,updateSort:l,applySorts:u,resetSorts:c}}function ya(){return s.useContext(V)}function xa(e){const{itemsLength:t,filterCount:n,sortCount:i,customCellCount:r,expanded:o,onExpandedChange:l,useToolBoxSetting:u=!0,useSort:c=!0,useCustomCell:d=!0,editable:h=!1,useExportCsv:p=!1,useViewSelectColumn:f=!0,customMenu:g=[],onFilterClick:m,onSortClick:v,onCustomCellClick:y,onResetAllClick:x,onClickColumnPicker:b,onExportCsv:w,toolLeft:C,toolItems:S,toolItemsRight:M}=e,T=_(),I=Y(),D=ma(),k=va(),A=ya(),[E,N]=s.useState(!0),L=o??E,P=e=>{void 0===o&&N(e),null==l||l(e)},O=I,R=s.useMemo(()=>{if(!(null==O?void 0:O.select))return null;try{return O.select(e=>{var t;return(null==(t=e.viewState)?void 0:t.filters)??[]})}catch{return null}},[O]),F=s.useMemo(()=>{if(!(null==O?void 0:O.select))return null;try{return O.select(e=>{var t;return(null==(t=e.viewState)?void 0:t.sorts)??[]})}catch{return null}},[O]),z=s.useRef([]),V=s.useSyncExternalStore(s.useCallback(e=>(null==R?void 0:R.subscribe(e))??(()=>{}),[R]),s.useCallback(()=>(null==R?void 0:R.getSnapshot())??z.current,[R])),B=s.useSyncExternalStore(s.useCallback(e=>(null==F?void 0:F.subscribe(e))??(()=>{}),[F]),s.useCallback(()=>(null==F?void 0:F.getSnapshot())??z.current,[F])),j=t??0,G=n??V.length,W=i??B.length,H=r??(null==A?void 0:A.config.ruleSets.length)??0,U=(e,t=!1)=>j||t?e?"#4568E0":"#8998B5":"#A7B1BC",[Z,X]=s.useState(!1),q=G>0||W>0||H>0,$=s.useMemo(()=>j&&q?Z?"#4568E0":"#8998B5":"#A7B1BC",[j,q,Z]),[K,J]=s.useState(!1),[Q,ee]=s.useState(!1),[te,de]=s.useState(!1),he=m??(()=>J(!0)),pe=v??(()=>ee(!0)),fe=y??(()=>null==A?void 0:A.showCustomCellHandler()),ge=x??(()=>{var e,t;D.resetFilters(),k.resetSorts();const n=I;null==(e=null==n?void 0:n.filter)||e.call(n,[]),null==(t=null==n?void 0:n.sort)||t.call(n,[]),null==A||A.clearCustomCell()}),[me,ve]=s.useState(!1),[ye,xe]=s.useState(!1);s.useMemo(()=>{if(!I)return;const e=I.undoManager;e&&(ve(e.canUndo),xe(e.canRedo))},[I]);const _e=s.useCallback(()=>{var e,t;null==(t=null==(e=null==I?void 0:I.undoManager)?void 0:e.undo)||t.call(e);const n=null==I?void 0:I.undoManager;n&&(ve(n.canUndo),xe(n.canRedo))},[I]),be=s.useCallback(()=>{var e,t;null==(t=null==(e=null==I?void 0:I.undoManager)?void 0:e.redo)||t.call(e);const n=null==I?void 0:I.undoManager;n&&(ve(n.canUndo),xe(n.canRedo))},[I]),we=s.useCallback(async()=>{var e;if(w)return w();const t=I,n=await(null==(e=null==t?void 0:t.getExportData)?void 0:e.call(t,{scope:"all"}));if(!n)return;const{headers:i,rows:r}=n,o=i.map(e=>e.id),a=e=>{const t=null==e?"":String(e);return t.includes(",")||t.includes('"')||t.includes("\n")?`"${t.replace(/"/g,'""')}"`:t},s=[];s.push(i.map(e=>a(e.header)).join(","));for(const h of r)s.push(o.map(e=>a(h[e])).join(","));const l="\ufeff"+s.join("\r\n"),u=new Blob([l],{type:"text/csv;charset=utf-8;"}),c=URL.createObjectURL(u),d=document.createElement("a");d.href=c,d.download=`export_${(new Date).toISOString().slice(0,10)}.csv`,d.click(),URL.revokeObjectURL(c)},[I,w]),Ce=s.useRef(null),Se=({titleText:e,disabled:t,isActive:n,hasItem:i,onClick:r,children:o,className:s,extraInnerProps:l})=>a.jsx("div",{className:["extend-grid-tool-items-wrapper",s??"",t?"disabled":""].filter(Boolean).join(" "),title:e,children:a.jsx("div",{className:["extend-grid-tool-badge-item-wrapper",t?"extend-grid-tool-disabled":"",n?"is-active":"",i?"has-item":""].filter(Boolean).join(" "),onClick:t?void 0:r,onMouseDown:null==l?void 0:l.onMouseDown,onMouseUp:null==l?void 0:l.onMouseUp,onMouseLeave:null==l?void 0:l.onMouseLeave,children:o})}),Me={display:L?void 0:"none"};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"extend-flex-grid-tool-container",style:Me,children:[a.jsxs("div",{className:"extend-flex-grid-tool-top-wrapper",children:[a.jsx("div",{className:"extend-grid-tool-left-section",children:C}),a.jsxs("div",{className:"extend-grid-tool-setup-wrapper",children:[a.jsxs("div",{className:"extend-grid-tool-badge-wrapper",children:[S,u&&a.jsx("div",{className:"extend-grid-tool-items-wrapper toolbox-setting",children:a.jsx(fa,{open:te,onOpenChange:de,trigger:a.jsx("div",{ref:Ce,className:["extend-grid-tool-badge-item-wrapper",j?"":"extend-grid-tool-disabled",te?"is-active":""].filter(Boolean).join(" "),title:T.Grid.layoutSetting,children:a.jsx(oe,{color:U(te,!0),size:"16"})}),children:a.jsx(pa,{onClose:()=>de(!1),useViewSelectColumn:f,customMenu:g,toolbarVisible:e.toolbarVisible,footerVisible:e.footerVisible,groupPanelVisible:e.groupPanelVisible,onToolbarVisibleChange:e.onToolbarVisibleChange,onFooterVisibleChange:e.onFooterVisibleChange,onGroupPanelVisibleChange:e.onGroupPanelVisibleChange,onClickColumnPicker:b})})}),Se({titleText:T.Grid.filter,disabled:!j,hasItem:G>0,onClick:he,className:"toolbox-filter",children:a.jsx(ie,{color:U(G),size:"16"})}),c&&Se({titleText:T.Grid.sort,disabled:!j,hasItem:W>0,onClick:pe,className:"toolbox-sort",children:a.jsx(ae,{color:U(W),size:"16"})}),d&&Se({titleText:T.Grid.customCellStyle,disabled:!j,hasItem:H>0,onClick:fe,className:"toolbox-custom-cell",children:a.jsx(se,{color:U(H),size:"16"})}),Se({titleText:T.Grid.reset,disabled:!(j&&q),onClick:ge,className:"toolbox-reset-all",extraInnerProps:{onMouseDown:()=>j&&q&&X(!0),onMouseUp:()=>X(!1),onMouseLeave:()=>X(!1)},children:a.jsx(re,{color:$,size:"16"})}),h&&a.jsxs(a.Fragment,{children:[Se({titleText:"실행 취소",disabled:!me,onClick:_e,className:"toolbox-undo",children:a.jsx(le,{color:me?"#8998B5":"#A7B1BC",size:"16"})}),Se({titleText:"다시 실행",disabled:!ye,onClick:be,className:"toolbox-redo",children:a.jsx(ue,{color:ye?"#8998B5":"#A7B1BC",size:"16"})})]}),p&&Se({titleText:"CSV 내보내기",disabled:!j,onClick:()=>{we()},className:"toolbox-export",children:a.jsx(ce,{color:j?"#8998B5":"#A7B1BC",size:"16"})}),M]}),u&&a.jsx("div",{className:"extend-grid-tool-separator"}),a.jsx(Te,{className:"extend-grid-tool-search",placeholder:T.Grid.searchFilter,isDisabled:!j}),a.jsx("div",{className:"extend-grid-tool-toggle-icon-wrapper",onClick:()=>P(!1),title:T.Grid.close,children:a.jsx(ne,{})})]})]}),e.toolBottom]}),!L&&a.jsx("div",{className:"extend-grid-tool-toggle",onClick:()=>P(!0),children:a.jsx(ne,{style:{transform:"rotate(180deg)"}})}),a.jsx(ca,{visible:K,onVisibleChange:J}),a.jsx(da,{visible:Q,onVisibleChange:ee})]})}function _a({visible:e,onVisibleChange:t,keyFields:n=[],dataKey:i=[]}){const r=_(),o=Y(),[l,u]=s.useState([]),[c,d]=s.useState([]),[h,p]=s.useState(!1),[f,g]=s.useState(!1),m=[...(Array.isArray(i)?i:[i]).filter(Boolean),...n],v=e=>m.includes(e);s.useEffect(()=>{var e;if(!(null==o?void 0:o.select)||!(null==(e=o.columns)?void 0:e.getMap))return void u([]);const t=o.select(e=>e.columnStates),n=()=>{var e,n;const i=(null==(n=null==(e=o.columns)?void 0:e.getMap)?void 0:n.call(e))??[],r=[...t.getSnapshot()??[]].filter(e=>!e.id.startsWith("_")).sort((e,t)=>e.order-t.order).map(e=>{const t=i.find(t=>t.id===e.id);return{id:e.id,visible:e.visible,order:e.order,header:(null==t?void 0:t.header)??e.id}});u(r)};n();const i=t.subscribe(n);return()=>i()},[o]),s.useEffect(()=>{var t;if(!e||!(null==(t=null==o?void 0:o.columns)?void 0:t.getMap))return;const n=o.columns.getMap().filter(e=>!e.id.startsWith("_")).map(e=>({id:e.id,visible:e.visible,order:e.order}));d(n)},[e,o]),s.useEffect(()=>{var e;const t=l.filter(e=>!v(e.id));if(0===t.length)g(!1);else{const e=t.filter(e=>e.visible).length;g(e===t.length)}if(!(null==(e=null==o?void 0:o.columns)?void 0:e.getMap)||0===c.length)return void p(!1);const n=o.columns.getMap(),i=c.some(e=>{const t=n.find(t=>t.id===e.id);return!t||(t.visible!==e.visible||t.order!==e.order)});p(i)},[l,c]);const[y,x]=s.useState(null),[b,w]=s.useState(null),C=s.useRef(null),S=e=>{const t=["column-picker-item"];return y===e&&t.push("is-dragging"),b===e&&null!==y&&y!==e&&t.push("drop-target"),t.join(" ")};return a.jsxs(Zn,{visible:e,onVisibleChange:t,title:r.Grid.contextColumnPicker,preset:"no-footer",width:420,minHeight:180,maxHeight:640,children:[a.jsxs("div",{className:"column-picker-actions",children:[a.jsx(la,{checked:f,onChange:e=>{var t;(null==(t=null==o?void 0:o.columns)?void 0:t.setHidden)&&l.filter(e=>!v(e.id)).forEach(t=>{var n,i;return null==(i=null==(n=o.columns)?void 0:n.setHidden)?void 0:i.call(n,t.id,!e)})},label:r.Grid.selectAll}),a.jsx("div",{className:["reset-button",h?"":"disabled"].filter(Boolean).join(" "),onClick:()=>h&&(()=>{var e,t;if(!(null==o?void 0:o.columns))return;c.forEach(e=>{var t,n;return null==(n=null==(t=o.columns)?void 0:t.setHidden)?void 0:n.call(t,e.id,!e.visible)});const n=[...c].sort((e,t)=>e.order-t.order).map(e=>e.id);null==(t=(e=o.columns).setOrder)||t.call(e,n)})(),children:r.Grid.reset})]}),a.jsx("div",{ref:C,className:"column-picker",onDragOver:e=>{if(null===y)return;e.preventDefault();const t=C.current;if(!t)return;const n=t.querySelectorAll(".column-picker-item");let i=0,r=1/0;for(let o=0;o<n.length;o++){const t=n[o].getBoundingClientRect(),a=t.left+t.width/2,s=t.top+t.height/2,l=Math.hypot(e.clientX-a,e.clientY-s);l<r&&(r=l,i=o)}w(i)},onDrop:e=>{var t;if(e.preventDefault(),null===y||null===b||!(null==(t=null==o?void 0:o.columns)?void 0:t.setOrder))return x(null),void w(null);const n=y,i=b;if(n!==i){const e=l.map(e=>e.id),[t]=e.splice(n,1);e.splice(i,0,t),o.columns.setOrder(e)}x(null),w(null)},onDragEnd:()=>{x(null),w(null)},children:l.map((e,t)=>a.jsxs("div",{className:S(t),draggable:!0,onDragStart:e=>((e,t)=>{x(t),e.dataTransfer&&(e.dataTransfer.setData("text/plain",String(t)),e.dataTransfer.effectAllowed="move")})(e,t),children:[a.jsx("span",{className:"column-picker-drag-handle",children:"⠿"}),a.jsx(la,{checked:e.visible,label:e.header,disabled:v(e.id),onChange:t=>((e,t)=>{var n;(null==(n=null==o?void 0:o.columns)?void 0:n.setHidden)&&o.columns.setHidden(e,!t)})(e.id,t)})]},e.id))})]})}const ba=1,wa=2,Ca=3,Sa=4,Ma=class e{constructor(e){i(this,"input"),i(this,"position"),i(this,"tokens"),this.input=e,this.position=0,this.tokens=[]}tokenize(){for(this.tokens=[],this.position=0;this.position<this.input.length&&(this.skipWhitespace(),!(this.position>=this.input.length));){const e=this.input[this.position];if("["!==e)if("$"!==e)if('"'!==e&&"'"!==e)if("#"!==e){if(this.isDigit(e)||"."===e&&this.isDigit(this.peek(1)))this.readNumber();else if(this.isAlpha(e)||"_"===e)this.readIdentifier();else if(!this.readOperator())if("("!==e)if(")"!==e){if(","!==e)throw new Error(`알 수 없는 문자: '${e}' (위치: ${this.position})`);this.addToken("COMMA",","),this.position++}else this.addToken("RPAREN",")"),this.position++;else this.addToken("LPAREN","("),this.position++}else this.readDateLiteral();else this.readString(e);else this.readBindingRef();else this.readColumnRef()}return this.addToken("EOF",null),this.tokens}skipWhitespace(){for(;this.position<this.input.length&&/\s/.test(this.input[this.position]);)this.position++}peek(e=0){const t=this.position+e;return t<this.input.length?this.input[t]:""}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z가-힣ㄱ-ㅎㅏ-ㅣ]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9가-힣ㄱ-ㅎㅏ-ㅣ_]/.test(e)}addToken(e,t){this.tokens.push({type:e,value:t,position:this.position})}readColumnRef(){const e=this.position;this.position++;let t="";for(;this.position<this.input.length&&"]"!==this.input[this.position];)t+=this.input[this.position],this.position++;if("]"!==this.input[this.position])throw new Error(`닫는 대괄호 ']'가 없습니다 (위치: ${e})`);this.position++,this.tokens.push({type:"COLUMN_REF",value:t.trim(),position:e})}readBindingRef(){const e=this.position;this.position++;let t="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)t+=this.input[this.position],this.position++;if(0===t.length)throw new Error(`바인딩 참조 이름이 비어있습니다 (위치: ${e})`);this.tokens.push({type:"BINDING_REF",value:t,position:e})}readString(e){const t=this.position;this.position++;let n="";for(;this.position<this.input.length;){const i=this.input[this.position];if(i===e)return this.position++,void this.tokens.push({type:"STRING",value:n,position:t});if("\\"===i&&this.position+1<this.input.length){this.position++;const e=this.input[this.position];switch(e){case"n":n+="\n";break;case"t":n+="\t";break;case"\\":n+="\\";break;case'"':n+='"';break;case"'":n+="'";break;default:n+=e}}else n+=i;this.position++}throw new Error(`문자열이 닫히지 않았습니다 (위치: ${t})`)}readDateLiteral(){const e=this.position;this.position++;let t="";for(;this.position<this.input.length&&"#"!==this.input[this.position];)t+=this.input[this.position],this.position++;if("#"!==this.input[this.position])throw new Error(`날짜 리터럴이 닫히지 않았습니다 (위치: ${e}). #날짜# 형식을 사용하세요.`);this.position++;const n=t.trim(),i=new Date(n);if(isNaN(i.getTime()))throw new Error(`유효하지 않은 날짜 형식입니다: '${n}' (위치: ${e})`);this.tokens.push({type:"DATE",value:{date:i,original:n},position:e})}readNumber(){const e=this.position;let t="",n=!1;for(;this.position<this.input.length;){const e=this.input[this.position];if(this.isDigit(e))t+=e,this.position++;else{if("."!==e||n)break;n=!0,t+=e,this.position++}}if(this.position<this.input.length&&this.isAlpha(this.input[this.position])){for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)t+=this.input[this.position],this.position++;return void this.tokens.push({type:"STRING",value:t,position:e})}const i=n?parseFloat(t):parseInt(t,10);this.tokens.push({type:"NUMBER",value:i,position:e})}readIdentifier(){const t=this.position;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;const i=n.toUpperCase();if("NOT"===i&&"_"===this.peek()){this.position++;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;const r=`${i}_${n.toUpperCase()}`;if(e.KEYWORDS[r])return void this.tokens.push({type:e.KEYWORDS[r],value:r,position:t})}if("IS"===i&&"_"===this.peek()){this.position++;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;let r=`${i}_${n.toUpperCase()}`;if("IS_NOT"===r&&"_"===this.peek()){this.position++;let e="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)e+=this.input[this.position],this.position++;r=`IS_NOT_${e.toUpperCase()}`}if(e.KEYWORDS[r])return void this.tokens.push({type:e.KEYWORDS[r],value:r,position:t})}if(("STARTS"===i||"ENDS"===i)&&"_"===this.peek()){this.position++;let n="";for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)n+=this.input[this.position],this.position++;const r=`${i}_${n.toUpperCase()}`;if(e.KEYWORDS[r])return void this.tokens.push({type:e.KEYWORDS[r],value:r,position:t})}if(e.KEYWORDS[i]){const n=e.KEYWORDS[i];let r=i;return"BOOLEAN"===n?r="TRUE"===i:"NULL"===n&&(r=null),void this.tokens.push({type:n,value:r,position:t})}if(!e.FUNCTIONS.has(i))throw new Error(`알 수 없는 식별자: '${n}' (위치: ${t}). 문자열은 따옴표("" 또는 '')로 감싸세요.`);this.tokens.push({type:"FUNCTION",value:i,position:t})}readOperator(){this.position;const e=this.input[this.position],t=this.peek(1);if("="===e&&"="===t)return this.addToken("EQ","=="),this.position+=2,!0;if("!"===e&&"="===t)return this.addToken("NEQ","!="),this.position+=2,!0;if("<"===e&&">"===t)return this.addToken("NEQ","<>"),this.position+=2,!0;if("<"===e&&"="===t)return this.addToken("LTE","<="),this.position+=2,!0;if(">"===e&&"="===t)return this.addToken("GTE",">="),this.position+=2,!0;if("&"===e&&"&"===t)return this.addToken("AND","&&"),this.position+=2,!0;if("|"===e&&"|"===t)return this.addToken("OR","||"),this.position+=2,!0;switch(e){case"=":return this.addToken("EQ","="),this.position++,!0;case"≠":return this.addToken("NEQ","≠"),this.position++,!0;case"<":return this.addToken("LT","<"),this.position++,!0;case">":return this.addToken("GT",">"),this.position++,!0;case"≤":return this.addToken("LTE","≤"),this.position++,!0;case"≥":return this.addToken("GTE","≥"),this.position++,!0;case"+":return this.addToken("PLUS","+"),this.position++,!0;case"-":return this.addToken("MINUS","-"),this.position++,!0;case"*":return this.addToken("MULTIPLY","*"),this.position++,!0;case"/":return this.addToken("DIVIDE","/"),this.position++,!0;case"%":return this.addToken("MODULO","%"),this.position++,!0;case"!":return this.addToken("NOT","!"),this.position++,!0}return!1}};i(Ma,"KEYWORDS",{AND:"AND",OR:"OR",NOT:"NOT",TRUE:"BOOLEAN",FALSE:"BOOLEAN",NULL:"NULL",CONTAINS:"CONTAINS",NOT_CONTAINS:"NOT_CONTAINS",STARTS_WITH:"STARTS_WITH",ENDS_WITH:"ENDS_WITH",LIKE:"LIKE",IS_EMPTY:"IS_EMPTY",IS_NOT_EMPTY:"IS_NOT_EMPTY"}),i(Ma,"FUNCTIONS",new Set(["ABS","ROUND","FLOOR","CEIL","MIN","MAX","LEN","UPPER","LOWER","TRIM","LEFT","RIGHT","NOW","TODAY","DAYS","IF","COALESCE","CONCAT"]));let Ta=Ma;class Ia{constructor(e){i(this,"tokens"),i(this,"position"),this.tokens=e,this.position=0}parse(){const e=this.parseExpression();if("EOF"!==this.current().type)throw new Error(`예상치 못한 토큰: ${this.current().value} (위치: ${this.current().position})`);return e}current(){return this.tokens[this.position]||{type:"EOF",value:null,position:-1}}advance(){const e=this.current();return"EOF"!==e.type&&this.position++,e}expect(e){const t=this.current();if(t.type!==e)throw new Error(`예상: ${e}, 실제: ${t.type} (위치: ${t.position})`);return this.advance()}parseExpression(){return this.parseOrExpr()}parseOrExpr(){let e=this.parseAndExpr();for(;"OR"===this.current().type;){this.advance();e={type:"BinaryOp",operator:"OR",left:e,right:this.parseAndExpr()}}return e}parseAndExpr(){let e=this.parseNotExpr();for(;"AND"===this.current().type;){this.advance();e={type:"BinaryOp",operator:"AND",left:e,right:this.parseNotExpr()}}return e}parseNotExpr(){if("NOT"===this.current().type){this.advance();return{type:"UnaryOp",operator:"NOT",operand:this.parseNotExpr()}}return this.parseComparison()}parseComparison(){let e=this.parseStringOp();if(["EQ","NEQ","LT","GT","LTE","GTE"].includes(this.current().type)){const t=this.advance(),n=this.parseStringOp();e={type:"BinaryOp",operator:t.value,left:e,right:n}}return e}parseStringOp(){let e=this.parseAdditive();if(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(this.current().type)){const t=this.advance(),n=this.parseAdditive();e={type:"BinaryOp",operator:t.value,left:e,right:n}}if("IS_EMPTY"===this.current().type||"IS_NOT_EMPTY"===this.current().type){e={type:"PostfixOp",operator:this.advance().value,operand:e}}return e}parseAdditive(){let e=this.parseMultiplicative();for(;"PLUS"===this.current().type||"MINUS"===this.current().type;){const t=this.advance(),n=this.parseMultiplicative();e={type:"BinaryOp",operator:t.value,left:e,right:n}}return e}parseMultiplicative(){let e=this.parseUnary();for(;"MULTIPLY"===this.current().type||"DIVIDE"===this.current().type||"MODULO"===this.current().type;){const t=this.advance(),n=this.parseUnary();e={type:"BinaryOp",operator:t.value,left:e,right:n}}return e}parseUnary(){if("MINUS"===this.current().type){this.advance();return{type:"UnaryOp",operator:"-",operand:this.parseUnary()}}return"PLUS"===this.current().type?(this.advance(),this.parseUnary()):this.parsePrimary()}parsePrimary(){const e=this.current();switch(e.type){case"NUMBER":return this.advance(),{type:"Literal",value:e.value,dataType:"number"};case"STRING":return this.advance(),{type:"Literal",value:e.value,dataType:"string"};case"BOOLEAN":return this.advance(),{type:"Literal",value:e.value,dataType:"boolean"};case"NULL":return this.advance(),{type:"Literal",value:null,dataType:"null"};case"DATE":return this.advance(),{type:"Literal",value:e.value,dataType:"date"};case"COLUMN_REF":return this.advance(),{type:"ColumnRef",name:e.value,isBinding:!1};case"BINDING_REF":return this.advance(),{type:"ColumnRef",name:e.value,isBinding:!0};case"FUNCTION":return this.parseFunctionCall();case"LPAREN":this.advance();const t=this.parseExpression();return this.expect("RPAREN"),t;default:throw new Error(`예상치 못한 토큰: ${e.type} '${e.value}' (위치: ${e.position})`)}}parseFunctionCall(){const e=this.advance();this.expect("LPAREN");const t=[];if("RPAREN"!==this.current().type)for(t.push(this.parseExpression());"COMMA"===this.current().type;)this.advance(),t.push(this.parseExpression());return this.expect("RPAREN"),{type:"FunctionCall",name:e.value,args:t}}}class Da{constructor(e){i(this,"columnMap"),i(this,"bindingSet"),i(this,"columnTypeMap"),this.columnMap=new Map,this.bindingSet=new Set,this.columnTypeMap=new Map;for(const t of e)t.header&&t.binding&&(this.columnMap.set(t.header,t.binding),this.bindingSet.add(t.binding),void 0!==t.dataType&&(this.columnTypeMap.set(t.header,t.dataType),this.columnTypeMap.set(t.binding,t.dataType)))}getColumnDataType(e){return e.isBinding,this.columnTypeMap.get(e.name)}coerceValueByColumnType(e,t){if(null==e)return e;if(void 0===t)return e;switch(t){case ba:return String(e);case wa:if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e.replace(/,/g,""));return isNaN(t)?e:t}return e;case Sa:if(e instanceof Date)return e;if("string"==typeof e){const t=new Date(e);return isNaN(t.getTime())?e:t}return e;case Ca:if("boolean"==typeof e)return e;if("string"==typeof e){const t=e.toLowerCase();if("true"===t||"1"===t||"yes"===t)return!0;if("false"===t||"0"===t||"no"===t)return!1}return Boolean(e);default:return e}}evaluate(e,t){switch(e.type){case"Literal":return"date"===e.dataType&&e.value&&"object"==typeof e.value&&"date"in e.value?e.value.date:e.value;case"ColumnRef":return this.evaluateColumnRef(e,t);case"BinaryOp":return this.evaluateBinaryOp(e,t);case"UnaryOp":return this.evaluateUnaryOp(e,t);case"PostfixOp":return this.evaluatePostfixOp(e,t);case"FunctionCall":return this.evaluateFunctionCall(e,t);default:throw new Error(`알 수 없는 AST 노드 타입: ${e.type}`)}}evaluateColumnRef(e,t){let n;return n=e.isBinding?e.name:this.columnMap.get(e.name)||e.name,n in t?t[n]:e.name in t?t[e.name]:null}evaluateBinaryOp(e,t){let n=this.evaluate(e.left,t),i=this.evaluate(e.right,t);if(["<",">","<=","≤",">=","≥"].includes(e.operator)){const t="ColumnRef"===e.left.type?this.getColumnDataType(e.left):void 0,r="ColumnRef"===e.right.type?this.getColumnDataType(e.right):void 0;if(t===ba||r===ba)return!1;if(!("ColumnRef"===e.left.type&&"ColumnRef"===e.right.type)){if(t===wa&&"string"==typeof i)return!1;if(r===wa&&"string"==typeof n)return!1}}if(["=","==","!=","≠","<>","<",">","<=","≤",">=","≥","CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(e.operator)){if("ColumnRef"===e.left.type){const t=this.getColumnDataType(e.left);i=this.coerceValueByColumnType(i,t)}if("ColumnRef"===e.right.type){const t=this.getColumnDataType(e.right);n=this.coerceValueByColumnType(n,t)}}switch(e.operator){case"AND":return this.toBoolean(n)&&this.toBoolean(i);case"OR":return this.toBoolean(n)||this.toBoolean(i);case"=":case"==":return this.isEqual(n,i);case"!=":case"≠":case"<>":return!this.isEqual(n,i);case"<":return this.compare(n,i)<0;case">":return this.compare(n,i)>0;case"<=":case"≤":return this.compare(n,i)<=0;case">=":case"≥":return this.compare(n,i)>=0;case"+":return"string"==typeof n||"string"==typeof i?String(n??"")+String(i??""):this.toNumber(n)+this.toNumber(i);case"-":return this.toNumber(n)-this.toNumber(i);case"*":return this.toNumber(n)*this.toNumber(i);case"/":const t=this.toNumber(i);return 0===t?null:this.toNumber(n)/t;case"%":return this.toNumber(n)%this.toNumber(i);case"CONTAINS":{const e=this.toStringForComparison(i);return""!==e&&this.toStringForComparison(n).toLowerCase().includes(e.toLowerCase())}case"NOT_CONTAINS":{const e=this.toStringForComparison(i);return""!==e&&!this.toStringForComparison(n).toLowerCase().includes(e.toLowerCase())}case"STARTS_WITH":{const e=this.toStringForComparison(i);return""!==e&&this.toStringForComparison(n).toLowerCase().startsWith(e.toLowerCase())}case"ENDS_WITH":{const e=this.toStringForComparison(i);return""!==e&&this.toStringForComparison(n).toLowerCase().endsWith(e.toLowerCase())}case"LIKE":{const e=this.toStringForComparison(i);return""!==e&&this.matchLike(this.toStringForComparison(n),e)}default:throw new Error(`알 수 없는 이항 연산자: ${e.operator}`)}}evaluateUnaryOp(e,t){const n=this.evaluate(e.operand,t);switch(e.operator){case"NOT":case"!":return!this.toBoolean(n);case"-":return-this.toNumber(n);default:throw new Error(`알 수 없는 단항 연산자: ${e.operator}`)}}evaluatePostfixOp(e,t){const n=this.evaluate(e.operand,t);switch(e.operator){case"IS_EMPTY":return this.isEmpty(n);case"IS_NOT_EMPTY":return!this.isEmpty(n);default:throw new Error(`알 수 없는 후위 연산자: ${e.operator}`)}}evaluateFunctionCall(e,t){const n=e.args.map(e=>this.evaluate(e,t));switch(e.name){case"ABS":return Math.abs(this.toNumber(n[0]));case"ROUND":const t=n.length>1?this.toNumber(n[1]):0,i=Math.pow(10,t);return Math.round(this.toNumber(n[0])*i)/i;case"FLOOR":return Math.floor(this.toNumber(n[0]));case"CEIL":return Math.ceil(this.toNumber(n[0]));case"MIN":return Math.min(...n.map(e=>this.toNumber(e)));case"MAX":return Math.max(...n.map(e=>this.toNumber(e)));case"LEN":return String(n[0]??"").length;case"UPPER":return String(n[0]??"").toUpperCase();case"LOWER":return String(n[0]??"").toLowerCase();case"TRIM":return String(n[0]??"").trim();case"LEFT":return String(n[0]??"").substring(0,this.toNumber(n[1]));case"RIGHT":const r=String(n[0]??""),o=this.toNumber(n[1]);return r.substring(r.length-o);case"NOW":return new Date;case"TODAY":const a=new Date;return a.setHours(0,0,0,0),a;case"DAYS":const s=this.toDate(n[0]),l=this.toDate(n[1]);return s&&l?Math.floor((s.getTime()-l.getTime())/864e5):null;case"IF":return this.toBoolean(n[0])?n[1]:n[2];case"COALESCE":for(const e of n)if(!this.isEmpty(e))return e;return null;case"CONCAT":return n.map(e=>String(e??"")).join("");default:throw new Error(`알 수 없는 함수: ${e.name}`)}}toBoolean(e){return null!=e&&("boolean"==typeof e?e:"number"==typeof e?0!==e:"string"!=typeof e||e.length>0&&"false"!==e.toLowerCase())}toNumber(e){if(null==e)return 0;if("number"==typeof e)return e;if("boolean"==typeof e)return e?1:0;const t=String(e).replace(/,/g,""),n=parseFloat(t);return isNaN(n)?0:n}toDate(e){if(null==e)return null;if(e instanceof Date)return e;if("number"==typeof e)return null;if("string"==typeof e){const t=e.trim();if(/^\d+$/.test(t))return null;if(/^\d+\.\d+$/.test(t))return null}const t=new Date(e);return isNaN(t.getTime())?null:t}formatDateString(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}toDateString(e){if(null==e)return"";if(e instanceof Date)return this.formatDateString(e);const t=this.toDate(e);return t?this.formatDateString(t):String(e)}toStringForComparison(e){if(null==e)return"";if(e instanceof Date)return this.formatDateString(e);const t=this.toDate(e);return t?this.formatDateString(t):String(e)}isEmpty(e){return null==e||"string"==typeof e&&0===e.trim().length}isEqual(e,t){if(null==e)return null==t;if(null==t)return!1;const n="string"==typeof e&&""===e.trim(),i="string"==typeof t&&""===t.trim();if("number"==typeof e&&i||"number"==typeof t&&n)return!1;if(e instanceof Date||t instanceof Date){const n=this.toDate(e),i=this.toDate(t);if(n&&i)return this.formatDateString(n)===this.formatDateString(i);const r=this.toDateString(e),o=this.toDateString(t);return r.toLowerCase()===o.toLowerCase()}const r=this.toDate(e),o=this.toDate(t);if(r&&o)return this.formatDateString(r)===this.formatDateString(o);if(typeof e==typeof t)return e===t;const a=parseFloat(String(e).replace(/,/g,"")),s=parseFloat(String(t).replace(/,/g,""));return n||i||isNaN(a)||isNaN(s)?String(e).toLowerCase()===String(t).toLowerCase():a===s}compare(e,t){if(null==e)return null==t?0:-1;if(null==t)return 1;const n="string"==typeof e&&""===e.trim(),i="string"==typeof t&&""===t.trim(),r="number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(parseFloat(e)),o="number"==typeof t||"string"==typeof t&&""!==t.trim()&&!isNaN(parseFloat(t));if(r&&i||o&&n)return NaN;const a=this.toDate(e),s=this.toDate(t);if(a&&s)return a.getTime()-s.getTime();if("number"==typeof e&&"number"==typeof t)return e-t;const l=parseFloat(String(e).replace(/,/g,"")),u=parseFloat(String(t).replace(/,/g,""));return isNaN(l)||isNaN(u)?String(e).localeCompare(String(t)):l-u}matchLike(e,t){const n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/%/g,".*").replace(/_/g,".");return new RegExp(`^${n}$`,"i").test(e)}}class ka{constructor(e=[]){i(this,"columns"),this.columns=e}setColumns(e){this.columns=e}parse(e){try{if(!e||0===e.trim().length)return{success:!1,error:"수식이 비어있습니다."};const t=new Ta(e).tokenize(),n=new Ia(t);return{success:!0,ast:n.parse()}}catch(t){return{success:!1,error:t.message,errorPosition:this.extractPosition(t.message)}}}validate(e){const t=this.parse(e);if(!t.success)return{...t,error:this.toFriendlyErrorMessage(t.error??"수식이 올바르지 않습니다.")};try{return this.validateColumnRefs(t.ast),this.validateOperatorTypes(t.ast),t}catch(n){return{success:!1,error:this.toFriendlyErrorMessage((null==n?void 0:n.message)??"알 수 없는 수식 오류가 발생했습니다.")}}}evaluate(e,t){const n=this.parse(e);if(!n.success)return{success:!1,error:n.error};try{const e=new Da(this.columns);return{success:!0,value:e.evaluate(n.ast,t)}}catch(i){return{success:!1,error:i.message}}}evaluateAST(e,t){try{const n=new Da(this.columns);return{success:!0,value:n.evaluate(e,t)}}catch(n){return{success:!1,error:n.message}}}getReferencedColumns(e){const t=this.parse(e);if(!t.success)return[];const n=new Set;return this.collectColumnRefs(t.ast,n),Array.from(n)}validateColumnRefs(e){switch(e.type){case"ColumnRef":break;case"BinaryOp":this.validateColumnRefs(e.left),this.validateColumnRefs(e.right);break;case"UnaryOp":case"PostfixOp":this.validateColumnRefs(e.operand);break;case"FunctionCall":for(const t of e.args)this.validateColumnRefs(t)}}inferNodeType(e){if("Literal"===e.type)switch(e.dataType){case"number":return"number";case"string":return"string";case"date":return"date";case"boolean":return"boolean";default:return"unknown"}if("ColumnRef"===e.type){const t=this.columns.find(t=>e.isBinding?t.binding===e.name:t.header===e.name);switch(null==t?void 0:t.dataType){case wa:return"number";case ba:return"string";case Sa:return"date";case Ca:return"boolean";default:return"unknown"}}return"unknown"}validateOperatorTypes(e){const t=e=>{if("BinaryOp"===e.type){const n=e.operator.toUpperCase(),i=["=","==","!=","≠","<>","<",">","<=","≤",">=","≥"],r=["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"];if(i.includes(n)||r.includes(n)){const t=this.inferNodeType(e.left),o=this.inferNodeType(e.right);if("unknown"===t&&"unknown"===o);else if(r.includes(n)){if("string"!==t&&"date"!==t&&"string"!==o&&"date"!==o)throw new Error("문자열 연산자는 문자열 또는 날짜 값에만 사용할 수 있습니다. (CONTAINS, STARTS_WITH 등)")}else if(i.includes(n)&&["<",">","<=","≤",">=","≥"].includes(n)){const e=e=>"number"===e,n=e=>"date"===e,i=e(t)&&e(o),r=n(t)&&n(o);if(!i&&!r)throw new Error("크기 비교 연산자는 숫자 또는 날짜 값끼리만 사용할 수 있습니다. (<, >, <=, >=)")}}return t(e.left),void t(e.right)}if("UnaryOp"!==e.type)if("PostfixOp"!==e.type){if("FunctionCall"===e.type)for(const n of e.args)t(n)}else t(e.operand);else t(e.operand)};t(e)}collectColumnRefs(e,t){switch(e.type){case"ColumnRef":t.add(e.name);break;case"BinaryOp":this.collectColumnRefs(e.left,t),this.collectColumnRefs(e.right,t);break;case"UnaryOp":case"PostfixOp":this.collectColumnRefs(e.operand,t);break;case"FunctionCall":for(const n of e.args)this.collectColumnRefs(n,t)}}extractPosition(e){const t=e.match(/위치:\s*(\d+)/);return t?parseInt(t[1],10):void 0}toFriendlyErrorMessage(e){const t=e.match(/위치:\s*(\d+)/),n=t?Number(t[1]):void 0,i=void 0!==n?` (오류 위치: ${n})`:"";return e.includes("예상치 못한 토큰")&&e.includes("EOF")?`수식이 중간에 끝났습니다. 연산자 뒤에는 값이나 컬럼 조건이 더 필요합니다.${i}`:e.includes("예상치 못한 토큰")?`수식에 잘못된 기호나 토큰이 있습니다. 괄호, 연산자, 따옴표 위치를 다시 확인해 주세요.${i}`:e.includes("문자열이 닫히지 않았습니다")?`문자열 형식이 올바르지지 않았습니다. "값" 또는 '값' 처럼 양쪽 따옴표를 모두 입력해 주세요.${i}`:e.includes("날짜 리터럴이 닫히지 않았습니다")?`날짜 형식이 올바르지 않았습니다. #2025-01-01# 형식으로 앞뒤에 #을 모두 입력해 주세요.${i}`:e.includes("유효하지 않은 날짜 형식입니다")?`날짜는 #YYYY-MM-DD# 또는 #YYYY-MM-DD HH:mm:ss# 형식으로 입력해 주세요.${i}`:e.includes("알 수 없는 식별자")?`컬럼은 [컬럼명], 문자열은 "값" 또는 '값' 형식으로 입력해 주세요.${i}`:e}}function Aa(){const[e,t]=s.useState(!1),[n,i]=s.useState(null),[r,o]=s.useState({ruleSets:[]}),a=s.useRef({ruleSets:[]}),l=s.useRef(null),u=s.useRef(new ka),c=s.useRef(new Map),d=s.useCallback(()=>{var e,t;const n=l.current;if(n)try{const i=null==(e=n.getFields)?void 0:e.call(n);let r=i&&i.length>0?i:[];if(0===r.length){const e=null==(t=n.getPivotFields)?void 0:t.call(n);e&&(r=[...e.rowFields,...e.columnFields,...e.valueFields,...e.filterFields])}const o={String:1,Number:2,Boolean:3,Date:4},a={string:o.String,number:o.Number,boolean:o.Boolean,date:o.Date},s=r.map(e=>({header:e.header??e.id,binding:e.id,dataType:a[e.dataType]??o.String}));u.current.setColumns(s)}catch{}},[]),h=s.useRef(!1),f=s.useCallback(()=>{const e=l.current;e&&!h.current&&(e.formatRow.addHandler("_customCell",t=>{var n,i;if("data"!==t.type)return;for(const e of Object.keys(t.ctx.cells)){const n=t.ctx.cells[e];(null==n?void 0:n.element)&&(n.element.style.backgroundColor="",n.element.style.color="")}const r=a.current.ruleSets.filter(e=>!1!==e.enabled).sort((e,t)=>e.priority-t.priority);if(0===r.length)return;const o=(null==(i=null==(n=e.pivot)?void 0:n.getConfig)?void 0:i.call(n))??null;o?function(e,t,n,i,r){var o;const a=n.rowFields,s=n.columnFields,l=n.valueFields,u=s.length,c=new Map;for(const d of l)c.set(p.getValueFieldKey(d,l),d.field);for(const d of Object.keys(t.cells)){const e=t.cells[d];(null==e?void 0:e.element)&&(e.element.style.backgroundColor="",e.element.style.color="")}for(const[d,h]of Object.entries(t.cells)){if(!(null==h?void 0:h.element))continue;const{path:n,valueField:l}=p.parsePivotcolumnId(d,u),f=c.get(l);if(!f)continue;const g={};for(const e of a)g[e.field]=t.data[e.field];for(let e=0;e<s.length;e++)g[s[e].field]=n[e];let m,v;g[f]=h.value;for(const t of e){if((null==(o=t.targetColumns)?void 0:o.length)&&!t.targetColumns.includes(f))continue;Ea(t,g,i,r)&&(t.backgroundColor&&(m=t.backgroundColor),t.textColor&&(v=t.textColor))}m&&(h.element.style.backgroundColor=m),v&&(h.element.style.color=v)}}(r,t.ctx,o,u.current,c.current):function(e,t,n,i){var r;const o=t.data;for(const a of Object.keys(t.cells)){const e=t.cells[a];(null==e?void 0:e.element)&&(e.element.style.backgroundColor="",e.element.style.color="")}for(const a of e){if(!Ea(a,o,n,i))continue;const e=(null==(r=a.targetColumns)?void 0:r.length)?a.targetColumns:Object.keys(t.cells);for(const n of e){const e=t.cells[n];(null==e?void 0:e.element)&&(a.backgroundColor&&(e.element.style.backgroundColor=a.backgroundColor),a.textColor&&(e.element.style.color=a.textColor))}}}(r,t.ctx,u.current,c.current)},{priority:10}),h.current=!0)},[]),g=s.useCallback(()=>{const e=l.current;e&&(f(),e.refresh())},[f]),m=s.useCallback(e=>{l.current=e,h.current=!1,e&&d()},[d]),v=s.useCallback(e=>{e&&i(e),t(!0)},[]),y=s.useCallback(()=>{t(!1)},[]),x=s.useCallback(e=>{const t={ruleSets:[...e.ruleSets]};a.current=t,o(t),c.current.clear(),d(),g()},[d,g]),_=s.useCallback(()=>({ruleSets:[...a.current.ruleSets]}),[]),b=s.useCallback(()=>{const e={ruleSets:[]};a.current=e,o(e),g()},[g]),w=s.useCallback(()=>{const e=l.current;e&&h.current&&e.formatRow.removeHandler("_customCell"),h.current=!1,l.current=null;const n={ruleSets:[]};a.current=n,o(n),t(!1)},[]);return s.useEffect(()=>()=>w(),[w]),{showCustomCell:e,hitColumn:n,config:r,showCustomCellHandler:v,hideCustomCellHandler:y,setGrid:m,setCustomCell:x,getCustomCell:_,applyCellStyle:g,clearCustomCell:b,destroy:w}}function Ea(e,t,n,i){if("formula"===e.mode)return!(!e.formula||0===e.formula.trim().length)&&function(e,t,n,i){if(!e||0===e.trim().length)return!1;try{let r=i.get(e);if(void 0===r){const t=n.parse(e);if(!t.success||!t.ast)return i.set(e,null),!1;r=t.ast,i.set(e,r)}if(!r)return!1;if("ColumnRef"===r.type||"Literal"===r.type)return!1;const o=n.evaluateAST(r,t);return!!o.success&&Boolean(o.value)}catch{return!1}}(e.formula,t,n,i);if(!e.rules||0===e.rules.length)return!1;let r=Na(e.rules[0],t);for(let o=1;o<e.rules.length;o++){const n=e.rules[o],i=Na(n,t);r="OR"===n.logical?r||i:r&&i}return r}function Na(e,t){return function(e,t,n){switch(n){case"∅":return null==e||""===e;case"●":return null!=e&&""!==e;case"=":return String(e)===String(t);case"≠":return String(e)!==String(t);case"%":return String(e??"").toLowerCase().includes(String(t??"").toLowerCase());case"!%":return!String(e??"").toLowerCase().includes(String(t??"").toLowerCase());case">":return Number(e)>Number(t);case"≥":return Number(e)>=Number(t);case"<":return Number(e)<Number(t);case"≤":return Number(e)<=Number(t);default:return!1}}(t[e.binding],e.variable,e.comparison)}function La(e){const t=s.useRef(e??null),[n,i]=s.useState({visible:!1,columnId:null,rows:[]}),r=s.useCallback(()=>{t.current=null,i({visible:!1,columnId:null,rows:[]})},[]),o=s.useCallback((e,t)=>{i({visible:!0,columnId:e,rows:t})},[]),a=s.useCallback(()=>{i(e=>({...e,visible:!1}))},[]),l=s.useCallback(async e=>{const{columnId:i,rows:r}=n;if(!t.current||!i)return;const o=t.current.changes;(null==o?void 0:o.updateCells)&&(await o.updateCells(r.map(t=>({rowId:t.id,columnId:i,value:e}))),a())},[n,a]);return s.useEffect(()=>()=>r(),[r]),{...n,destroy:r,open:o,close:a,apply:l}}const Pa={useViewSelectColumn:!0,useFixedColumn:!0,useGroupColumn:!1,useContextMenu:!0,useSort:!0,useFilter:!0,useCustomCell:!1,useBulkEditColumn:!1,useDataCopy:!0,useDataWithHeaderCopy:!0,useAutoSizeColumns:!0,useExportCsv:!1,useRowPinning:!1,useExportImport:!1,useExportExcel:!1,useClientExcelImport:!1,useClientExcelExport:!1,clientImportOptions:{},clientExportOptions:{},exportFileName:"export",customMenu:[]};function Oa(e={},t={}){const[n,i]=s.useState(!1),[r,o]=s.useState({x:0,y:0}),[a,l]=s.useState(null),u=s.useRef(null),c=s.useRef({...Pa,...e}),d=s.useRef(t);d.current=t;const h=s.useRef(null);h.current=a;const p=s.useCallback(e=>{u.current=e},[]),f=s.useCallback((e,t)=>{e.preventDefault(),h.current=t,l(t),o({x:e.clientX,y:e.clientY}),i(!0)},[]),g=s.useCallback(()=>{h.current=null,i(!1),l(null)},[]),m=s.useCallback(e=>{c.current={...c.current,...e}},[]),v=s.useCallback(e=>{var t;const n=u.current;if(!n)return!1;try{return((null==(t=n.select)?void 0:t.call(n,e=>{var t;return(null==(t=e.viewState)?void 0:t.filters)??[]}).getSnapshot())??[]).some(t=>t.id===e)}catch{return!1}},[]),y=s.useCallback(e=>{var t;const n=u.current;if(!n)return!1;try{return((null==(t=n.select)?void 0:t.call(n,e=>{var t;return(null==(t=e.viewState)?void 0:t.sorts)??[]}).getSnapshot())??[]).some(t=>t.id===e)}catch{return!1}},[]),x=s.useCallback(e=>{var t,n;e.field&&(null==(n=(t=d.current).onOpenFilter)||n.call(t,e.field))},[]),_=s.useCallback(e=>{var t,n,i,r;const o=u.current;if(!o||!e.field)return;const a=null===e.cellValue||void 0===e.cellValue||""===e.cellValue?"isNull":"eq",s=null!==(null==(t=o.getPivotFields)?void 0:t.call(o))&&void 0!==(null==(n=o.getPivotFields)?void 0:n.call(o))?e.field.id:e.columnId;try{const t=((null==(i=o.select)?void 0:i.call(o,e=>{var t;return(null==(t=e.viewState)?void 0:t.filters)??[]}).getSnapshot())??[]).slice(),n=t.length>0?Math.max(...t.map(e=>e.sequence??0))+1:1;t.push({id:s,sequence:n,operator:a,filterValue:e.cellValue,logical:"and"}),null==(r=o.filter)||r.call(o,t)}catch{}},[]),b=s.useCallback(e=>{var t,n,i;const r=u.current;if(!r)return;const o=(null==(t=e.field)?void 0:t.id)??e.columnId;try{const e=((null==(n=r.select)?void 0:n.call(r,e=>{var t;return(null==(t=e.viewState)?void 0:t.filters)??[]}).getSnapshot())??[]).filter(e=>e.id!==o);null==(i=r.filter)||i.call(r,e)}catch{}},[]),w=s.useCallback(e=>{var t,n;const i=u.current;if(i)try{const r=((null==(t=i.select)?void 0:t.call(i,e=>{var t;return(null==(t=e.viewState)?void 0:t.sorts)??[]}).getSnapshot())??[]).filter(t=>t.id!==e.columnId);null==(n=i.sort)||n.call(i,r)}catch{}},[]),C=s.useCallback(e=>{b(e),w(e)},[b,w]),S=s.useCallback(()=>{var e;const t=u.current;null==(e=null==t?void 0:t.clipboard)||e.copy().catch(()=>{})},[]),M=s.useCallback(()=>{var e;const t=u.current;null==(e=null==t?void 0:t.clipboard)||e.copy({includeHeaders:!0}).catch(()=>{})},[]),T=s.useCallback(e=>{var t,n,i,r,o,a;const s=u.current;if((null==s?void 0:s.columns)&&e.columnId)try{const l=((null==(n=(t=s.columns).getState)?void 0:n.call(t))??[]).find(t=>t.id===e.columnId);l&&l.pinned&&"none"!==l.pinned?null==(r=(i=s.columns).unpin)||r.call(i,e.columnId):null==(a=(o=s.columns).pinLeft)||a.call(o,e.columnId)}catch{}},[]),I=s.useCallback(e=>{var t,n,i,r;const o=u.current;if((null==o?void 0:o.columns)&&e.columnId)try{const a=[...(null==(n=(t=o.columns).getState)?void 0:n.call(t))??[]].sort((e,t)=>e.order-t.order).map(e=>e.id),s=a.indexOf(e.columnId);s>0&&(a.splice(s,1),a.unshift(e.columnId),null==(r=(i=o.columns).setOrder)||r.call(i,a))}catch{}},[]),D=s.useCallback(()=>{var e,t,n;const i=u.current;try{null==(t=null==(e=null==i?void 0:i.columns)?void 0:e.autoFitAll)||t.call(e,!1)}catch{null==(n=null==i?void 0:i.refresh)||n.call(i)}},[]),k=s.useCallback(e=>{var t,n;const i=u.current;if((null==i?void 0:i.headers)&&e.groupId)try{null==(n=(t=i.headers).toggle)||n.call(t,e.groupId)}catch{}},[]),A=s.useCallback(()=>{var e,t;const n=u.current;try{null==(t=null==(e=null==n?void 0:n.headers)?void 0:e.collapseAll)||t.call(e)}catch{}},[]),E=s.useCallback(()=>{var e,t;const n=u.current;try{null==(t=null==(e=null==n?void 0:n.headers)?void 0:e.expandAll)||t.call(e)}catch{}},[]),N=s.useCallback(e=>{var t,n,r,o,a,s;const u=h.current;if(u){switch(e){case"ADD_FLT":x(u);break;case"SEL_FLT":_(u);break;case"RST_COL_FLT":b(u);break;case"RST_COL_SORT":w(u);break;case"RST_COL_ALL":C(u);break;case"CUSTOM_CELL":break;case"DATA_COPY":S();break;case"DATA_HEADER_COPY":M();break;case"PIN_UNPIN":T(u);break;case"AUTO_SIZE_COLUMNS":D();break;case"COLUMN_VIEW_SELECT":null==(n=(t=d.current).onOpenColumnPicker)||n.call(t);break;case"MOVE_TO_FIRST":I(u);break;case"GROUP_PANEL":null==(o=(r=d.current).onToggleGroupPanel)||o.call(r);break;case"BULK_EDIT":u.field&&(null==(s=(a=d.current).onOpenBulkEditor)||s.call(a,u.field,u.cellValue));break;case"GROUP_TOGGLE":k(u);break;case"GROUP_COLLAPSE_ALL":A();break;case"GROUP_EXPAND_ALL":E();break;default:{const t=Ra(e,c.current.customMenu??[]);(null==t?void 0:t.handler)&&t.handler()}}h.current=null,i(!1),l(null)}},[x,_,b,w,C,S,M,T,I,D,k,A,E]),L=s.useCallback(()=>{u.current=null,i(!1),l(null)},[]);return s.useMemo(()=>({visible:n,position:r,context:a,show:f,hide:g,setGrid:p,updateConfig:m,executeCommand:N,hasColumnFilter:v,hasColumnSort:y,destroy:L}),[n,r,a,f,g,p,m,N,v,y,L])}function Ra(e,t){for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=Ra(e,n.children);if(t)return t}}}function Fa({filteredRowCount:e,totalRowCount:t,children:n}){const i=_(),r=Y(),o=s.useMemo(()=>{const e=i.Grid;return{AVERAGE:e.aggregateAverage??"평균",COUNT:e.aggregateCount??"개수",MIN:e.aggregateMin??"최소",MAX:e.aggregateMax??"최대",SUM:e.aggregateSum??"합계"}},[i]),l=r,u=s.useMemo(()=>{if(!(null==l?void 0:l.select))return null;try{return l.select(e=>e.totalRowCount??0)}catch{return null}},[l]),c=s.useMemo(()=>{if(!(null==l?void 0:l.select))return null;try{return l.select(e=>e.visibleRowCount??0)}catch{return null}},[l]),d=s.useSyncExternalStore(s.useCallback(e=>(null==u?void 0:u.subscribe(e))??(()=>{}),[u]),s.useCallback(()=>(null==u?void 0:u.getSnapshot())??0,[u])),h=s.useSyncExternalStore(s.useCallback(e=>(null==c?void 0:c.subscribe(e))??(()=>{}),[c]),s.useCallback(()=>(null==c?void 0:c.getSnapshot())??0,[c])),[p,f]=s.useState(null),g=s.useRef(null);s.useEffect(()=>{var e,t;if(null==(e=g.current)||e.call(g),g.current=null,!r)return;const n=r,i=null==(t=n.on)?void 0:t.call(n,"selection:changed",e=>{var t;const n=null==(t=null==e?void 0:e.aggregates)?void 0:t.total;n&&n.count>0?f(n):f(null)});return i&&(g.current=i),()=>{var e;null==(e=g.current)||e.call(g),g.current=null}},[r]);const m=void 0!==e&&e>=0?e:h,v=void 0!==t&&t>=0?t:d,y=e=>Number.isNaN(e)?String(e):e.toLocaleString(void 0,{maximumFractionDigits:2}),x=s.useMemo(()=>{const e=v.toLocaleString(),t=m.toLocaleString();return v===m?(i.Grid.footerTotalRowCount??"총 {totalRowCount}개").replace("{totalRowCount}",e):(i.Grid.footerFilteredRowCount??"필터링: {filterdRowCount} / 총 {totalRowCount}개").replace("{totalRowCount}",e).replace("{filterdRowCount}",t)},[v,m,i]);return a.jsxs("div",{className:"moz-ui-grid-footer-container",children:[a.jsx("div",{children:x}),p&&a.jsxs("div",{className:"grid-footer-aggregates",children:[a.jsxs("span",{className:"grid-footer-aggregates-item",children:[o.AVERAGE,": ",y(p.avg)]}),a.jsxs("span",{className:"grid-footer-aggregates-item",children:[o.COUNT,": ",p.count.toLocaleString()]}),a.jsxs("span",{className:"grid-footer-aggregates-item",children:[o.MIN,": ",y(p.min)]}),a.jsxs("span",{className:"grid-footer-aggregates-item",children:[o.MAX,": ",y(p.max)]}),a.jsxs("span",{className:"grid-footer-aggregates-item",children:[o.SUM,": ",y(p.sum)]})]}),n]})}function za(e){const t=e+"CollectionProvider",[n,i]=Ee(t),[r,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:t,children:n}=e,i=s.useRef(null),o=s.useRef(new Map).current;return a.jsx(r,{scope:t,itemMap:o,collectionRef:i,children:n})};l.displayName=t;const u=e+"CollectionSlot",c=Ve(u),d=s.forwardRef((e,t)=>{const{scope:n,children:i}=e,r=Ae(t,o(u,n).collectionRef);return a.jsx(c,{ref:r,children:i})});d.displayName=u;const h=e+"CollectionItemSlot",p="data-radix-collection-item",f=Ve(h),g=s.forwardRef((e,t)=>{const{scope:n,children:i,...r}=e,l=s.useRef(null),u=Ae(t,l),c=o(h,n);return s.useEffect(()=>(c.itemMap.set(l,{ref:l,...r}),()=>{c.itemMap.delete(l)})),a.jsx(f,{[p]:"",ref:u,children:i})});return g.displayName=h,[{Provider:l,Slot:d,ItemSlot:g},function(t){const n=o(e+"CollectionConsumer",t);return s.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},i]}var Va=g.createContext(void 0);function Ba(e){const t=g.useContext(Va);return e||t||"ltr"}var ja="rovingFocusGroup.onEntryFocus",Ga={bubbles:!1,cancelable:!0},Wa="RovingFocusGroup",[Ha,Ua,Ya]=za(Wa),[Za,Xa]=Ee(Wa,[Ya]),[qa,$a]=Za(Wa),Ka=g.forwardRef((e,t)=>a.jsx(Ha.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ha.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ja,{...e,ref:t})})}));Ka.displayName=Wa;var Ja=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:r=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...h}=e,p=g.useRef(null),f=Ae(t,p),m=Ba(o),[v,y]=ze({prop:s,defaultProp:l??null,onChange:u,caller:Wa}),[x,_]=g.useState(!1),b=Ue(c),w=Ua(n),C=g.useRef(!1),[S,M]=g.useState(0);return g.useEffect(()=>{const e=p.current;if(e)return e.addEventListener(ja,b),()=>e.removeEventListener(ja,b)},[b]),a.jsx(qa,{scope:n,orientation:i,dir:m,loop:r,currentTabStopId:v,onItemFocus:g.useCallback(e=>y(e),[y]),onItemShiftTab:g.useCallback(()=>_(!0),[]),onFocusableItemAdd:g.useCallback(()=>M(e=>e+1),[]),onFocusableItemRemove:g.useCallback(()=>M(e=>e-1),[]),children:a.jsx(We.div,{tabIndex:x||0===S?-1:0,"data-orientation":i,...h,ref:f,style:{outline:"none",...e.style},onMouseDown:Ie(e.onMouseDown,()=>{C.current=!0}),onFocus:Ie(e.onFocus,e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!x){const t=new CustomEvent(ja,Ga);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter(e=>e.focusable);ns([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),d)}}C.current=!1}),onBlur:Ie(e.onBlur,()=>_(!1))})})}),Qa="RovingFocusGroupItem",es=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:o,children:s,...l}=e,u=Re(),c=o||u,d=$a(Qa,n),h=d.currentTabStopId===c,p=Ua(n),{onFocusableItemAdd:f,onFocusableItemRemove:m,currentTabStopId:v}=d;return g.useEffect(()=>{if(i)return f(),()=>m()},[i,f,m]),a.jsx(Ha.ItemSlot,{scope:n,id:c,focusable:i,active:r,children:a.jsx(We.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Ie(e.onMouseDown,e=>{i?d.onItemFocus(c):e.preventDefault()}),onFocus:Ie(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Ie(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const i=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(i)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)?void 0:ts[i]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const o=r.indexOf(e.currentTarget);r=d.loop?(i=o+1,(n=r).map((e,t)=>n[(i+t)%n.length])):r.slice(o+1)}setTimeout(()=>ns(r))}var n,i}),children:"function"==typeof s?s({isCurrentTabStop:h,hasTabStop:null!=v}):s})})});es.displayName=Qa;var ts={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ns(e,t=!1){const n=document.activeElement;for(const i of e){if(i===n)return;if(i.focus({preventScroll:t}),document.activeElement!==n)return}}var is=Ka,rs=es,os=["Enter"," "],as=["ArrowUp","PageDown","End"],ss=["ArrowDown","PageUp","Home",...as],ls={ltr:[...os,"ArrowRight"],rtl:[...os,"ArrowLeft"]},us={ltr:["ArrowLeft"],rtl:["ArrowRight"]},cs="Menu",[ds,hs,ps]=za(cs),[fs,gs]=Ee(cs,[ps,Rr,Xa]),ms=Rr(),vs=Xa(),[ys,xs]=fs(cs),[_s,bs]=fs(cs),ws=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:o,modal:s=!0}=e,l=ms(t),[u,c]=g.useState(null),d=g.useRef(!1),h=Ue(o),p=Ba(r);return g.useEffect(()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),a.jsx(Jr,{...l,children:a.jsx(ys,{scope:t,open:n,onOpenChange:h,content:u,onContentChange:c,children:a.jsx(_s,{scope:t,onClose:g.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:p,modal:s,children:i})})})};ws.displayName=cs;var Cs=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=ms(n);return a.jsx(Qr,{...r,...i,ref:t})});Cs.displayName="MenuAnchor";var Ss="MenuPortal",[Ms,Ts]=fs(Ss,{forceMount:void 0}),Is=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,o=xs(Ss,t);return a.jsx(Ms,{scope:t,forceMount:n,children:a.jsx(dt,{present:n||o.open,children:a.jsx(ct,{asChild:!0,container:r,children:i})})})};Is.displayName=Ss;var Ds="MenuContent",[ks,As]=fs(Ds),Es=g.forwardRef((e,t)=>{const n=Ts(Ds,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,o=xs(Ds,e.__scopeMenu),s=bs(Ds,e.__scopeMenu);return a.jsx(ds.Provider,{scope:e.__scopeMenu,children:a.jsx(dt,{present:i||o.open,children:a.jsx(ds.Slot,{scope:e.__scopeMenu,children:s.modal?a.jsx(Ns,{...r,ref:t}):a.jsx(Ls,{...r,ref:t})})})})}),Ns=g.forwardRef((e,t)=>{const n=xs(Ds,e.__scopeMenu),i=g.useRef(null),r=Ae(t,i);return g.useEffect(()=>{const e=i.current;if(e)return cn(e)},[]),a.jsx(Os,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ie(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ls=g.forwardRef((e,t)=>{const n=xs(Ds,e.__scopeMenu);return a.jsx(Os,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ps=Ve("MenuContent.ScrollLock"),Os=g.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,disableOutsideScroll:m,...v}=e,y=xs(Ds,n),x=bs(Ds,n),_=ms(n),b=vs(n),w=hs(n),[C,S]=g.useState(null),M=g.useRef(null),T=Ae(t,M,y.onContentChange),I=g.useRef(0),D=g.useRef(""),k=g.useRef(0),A=g.useRef(null),E=g.useRef("right"),N=g.useRef(0),L=m?nn:g.Fragment,P=m?{as:Ps,allowPinchZoom:!0}:void 0,O=e=>{var t,n;const i=D.current+e,r=w().filter(e=>!e.disabled),o=document.activeElement,a=null==(t=r.find(e=>e.ref.current===o))?void 0:t.textValue,s=function(e,t,n){const i=t.length>1&&Array.from(t).every(e=>e===t[0]),r=i?t[0]:t,o=n?e.indexOf(n):-1;let a=(s=e,l=Math.max(o,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===r.length&&(a=a.filter(e=>e!==n));const u=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}(r.map(e=>e.textValue),i,a),l=null==(n=r.find(e=>e.textValue===s))?void 0:n.ref.current;!function e(t){D.current=t,window.clearTimeout(I.current),""!==t&&(I.current=window.setTimeout(()=>e(""),1e3))}(i),l&&setTimeout(()=>l.focus())};g.useEffect(()=>()=>window.clearTimeout(I.current),[]),ft();const R=g.useCallback(e=>{var t,n;return E.current===(null==(t=A.current)?void 0:t.side)&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:i}=e;let r=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const e=t[o],s=t[a],l=e.x,u=e.y,c=s.x,d=s.y;u>i!=d>i&&n<(c-l)*(i-u)/(d-u)+l&&(r=!r)}return r}(n,t)}(e,null==(n=A.current)?void 0:n.area)},[]);return a.jsx(ks,{scope:n,searchRef:D,onItemEnter:g.useCallback(e=>{R(e)&&e.preventDefault()},[R]),onItemLeave:g.useCallback(e=>{var t;R(e)||(null==(t=M.current)||t.focus(),S(null))},[R]),onTriggerLeave:g.useCallback(e=>{R(e)&&e.preventDefault()},[R]),pointerGraceTimerRef:k,onPointerGraceIntentChange:g.useCallback(e=>{A.current=e},[]),children:a.jsx(L,{...P,children:a.jsx(it,{asChild:!0,trapped:r,onMountAutoFocus:Ie(o,e=>{var t;e.preventDefault(),null==(t=M.current)||t.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:a.jsx(Ke,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,children:a.jsx(is,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:i,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:Ie(u,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(eo,{role:"menu","aria-orientation":"vertical","data-state":ul(y.open),"data-radix-menu-content":"",dir:x.dir,..._,...v,ref:T,style:{outline:"none",...v.style},onKeyDown:Ie(v.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,i=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&i&&O(e.key));const r=M.current;if(e.target!==r)return;if(!ss.includes(e.key))return;e.preventDefault();const o=w().filter(e=>!e.disabled).map(e=>e.ref.current);as.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(o)}),onBlur:Ie(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),D.current="")}),onPointerMove:Ie(e.onPointerMove,hl(e=>{const t=e.target,n=N.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>N.current?"right":"left";E.current=t,N.current=e.clientX}}))})})})})})})});Es.displayName=Ds;var Rs=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(We.div,{role:"group",...i,ref:t})});Rs.displayName="MenuGroup";var Fs=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(We.div,{...i,ref:t})});Fs.displayName="MenuLabel";var zs="MenuItem",Vs="menu.itemSelect",Bs=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...r}=e,o=g.useRef(null),s=bs(zs,e.__scopeMenu),l=As(zs,e.__scopeMenu),u=Ae(t,o),c=g.useRef(!1);return a.jsx(js,{...r,ref:u,disabled:n,onClick:Ie(e.onClick,()=>{const e=o.current;if(!n&&e){const t=new CustomEvent(Vs,{bubbles:!0,cancelable:!0});e.addEventListener(Vs,e=>null==i?void 0:i(e),{once:!0}),He(e,t),t.defaultPrevented?c.current=!1:s.onClose()}}),onPointerDown:t=>{var n;null==(n=e.onPointerDown)||n.call(e,t),c.current=!0},onPointerUp:Ie(e.onPointerUp,e=>{var t;c.current||null==(t=e.currentTarget)||t.click()}),onKeyDown:Ie(e.onKeyDown,e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||os.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Bs.displayName=zs;var js=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:r,...o}=e,s=As(zs,n),l=vs(n),u=g.useRef(null),c=Ae(t,u),[d,h]=g.useState(!1),[p,f]=g.useState("");return g.useEffect(()=>{const e=u.current;e&&f((e.textContent??"").trim())},[o.children]),a.jsx(ds.ItemSlot,{scope:n,disabled:i,textValue:r??p,children:a.jsx(rs,{asChild:!0,...l,focusable:!i,children:a.jsx(We.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...o,ref:c,onPointerMove:Ie(e.onPointerMove,hl(e=>{if(i)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:Ie(e.onPointerLeave,hl(e=>s.onItemLeave(e))),onFocus:Ie(e.onFocus,()=>h(!0)),onBlur:Ie(e.onBlur,()=>h(!1))})})})}),Gs=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...r}=e;return a.jsx($s,{scope:e.__scopeMenu,checked:n,children:a.jsx(Bs,{role:"menuitemcheckbox","aria-checked":cl(n)?"mixed":n,...r,ref:t,"data-state":dl(n),onSelect:Ie(r.onSelect,()=>null==i?void 0:i(!!cl(n)||!n),{checkForDefaultPrevented:!1})})})});Gs.displayName="MenuCheckboxItem";var Ws="MenuRadioGroup",[Hs,Us]=fs(Ws,{value:void 0,onValueChange:()=>{}}),Ys=g.forwardRef((e,t)=>{const{value:n,onValueChange:i,...r}=e,o=Ue(i);return a.jsx(Hs,{scope:e.__scopeMenu,value:n,onValueChange:o,children:a.jsx(Rs,{...r,ref:t})})});Ys.displayName=Ws;var Zs="MenuRadioItem",Xs=g.forwardRef((e,t)=>{const{value:n,...i}=e,r=Us(Zs,e.__scopeMenu),o=n===r.value;return a.jsx($s,{scope:e.__scopeMenu,checked:o,children:a.jsx(Bs,{role:"menuitemradio","aria-checked":o,...i,ref:t,"data-state":dl(o),onSelect:Ie(i.onSelect,()=>{var e;return null==(e=r.onValueChange)?void 0:e.call(r,n)},{checkForDefaultPrevented:!1})})})});Xs.displayName=Zs;var qs="MenuItemIndicator",[$s,Ks]=fs(qs,{checked:!1}),Js=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...r}=e,o=Ks(qs,n);return a.jsx(dt,{present:i||cl(o.checked)||!0===o.checked,children:a.jsx(We.span,{...r,ref:t,"data-state":dl(o.checked)})})});Js.displayName=qs;var Qs=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(We.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});Qs.displayName="MenuSeparator";var el=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=ms(n);return a.jsx(to,{...r,...i,ref:t})});el.displayName="MenuArrow";var tl="MenuSub",[nl,il]=fs(tl),rl=e=>{const{__scopeMenu:t,children:n,open:i=!1,onOpenChange:r}=e,o=xs(tl,t),s=ms(t),[l,u]=g.useState(null),[c,d]=g.useState(null),h=Ue(r);return g.useEffect(()=>(!1===o.open&&h(!1),()=>h(!1)),[o.open,h]),a.jsx(Jr,{...s,children:a.jsx(ys,{scope:t,open:i,onOpenChange:h,content:c,onContentChange:d,children:a.jsx(nl,{scope:t,contentId:Re(),triggerId:Re(),trigger:l,onTriggerChange:u,children:n})})})};rl.displayName=tl;var ol="MenuSubTrigger",al=g.forwardRef((e,t)=>{const n=xs(ol,e.__scopeMenu),i=bs(ol,e.__scopeMenu),r=il(ol,e.__scopeMenu),o=As(ol,e.__scopeMenu),s=g.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,c={__scopeMenu:e.__scopeMenu},d=g.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return g.useEffect(()=>d,[d]),g.useEffect(()=>{const e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),a.jsx(Cs,{asChild:!0,...c,children:a.jsx(js,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ul(n.open),...e,ref:ke(t,r.onTriggerChange),onClick:t=>{var i;null==(i=e.onClick)||i.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ie(e.onPointerMove,hl(t=>{o.onItemEnter(t),t.defaultPrevented||e.disabled||n.open||s.current||(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Ie(e.onPointerLeave,hl(e=>{var t,i;d();const r=null==(t=n.content)?void 0:t.getBoundingClientRect();if(r){const t=null==(i=n.content)?void 0:i.dataset.side,a="right"===t,s=a?-5:5,u=r[a?"left":"right"],c=r[a?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:u,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:u,y:r.bottom}],side:t}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ie(e.onKeyDown,t=>{var r;const a=""!==o.searchRef.current;e.disabled||a&&" "===t.key||ls[i.dir].includes(t.key)&&(n.onOpenChange(!0),null==(r=n.content)||r.focus(),t.preventDefault())})})})});al.displayName=ol;var sl="MenuSubContent",ll=g.forwardRef((e,t)=>{const n=Ts(Ds,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,o=xs(Ds,e.__scopeMenu),s=bs(Ds,e.__scopeMenu),l=il(sl,e.__scopeMenu),u=g.useRef(null),c=Ae(t,u);return a.jsx(ds.Provider,{scope:e.__scopeMenu,children:a.jsx(dt,{present:i||o.open,children:a.jsx(ds.Slot,{scope:e.__scopeMenu,children:a.jsx(Os,{id:l.contentId,"aria-labelledby":l.triggerId,...r,ref:c,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;s.isUsingKeyboardRef.current&&(null==(t=u.current)||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:Ie(e.onFocusOutside,e=>{e.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ie(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:Ie(e.onKeyDown,e=>{var t;const n=e.currentTarget.contains(e.target),i=us[s.dir].includes(e.key);n&&i&&(o.onOpenChange(!1),null==(t=l.trigger)||t.focus(),e.preventDefault())})})})})})});function ul(e){return e?"open":"closed"}function cl(e){return"indeterminate"===e}function dl(e){return cl(e)?"indeterminate":e?"checked":"unchecked"}function hl(e){return t=>"mouse"===t.pointerType?e(t):void 0}ll.displayName=sl;var pl=ws,fl=Cs,gl=Is,ml=Es,vl=Rs,yl=Fs,xl=Bs,_l=Gs,bl=Ys,wl=Xs,Cl=Js,Sl=Qs,Ml=el,Tl=rl,Il=al,Dl=ll,kl="DropdownMenu",[Al]=Ee(kl,[gs]),El=gs(),[Nl,Ll]=Al(kl),Pl=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,u=El(t),c=g.useRef(null),[d,h]=ze({prop:r,defaultProp:o??!1,onChange:s,caller:kl});return a.jsx(Nl,{scope:t,triggerId:Re(),triggerRef:c,contentId:Re(),open:d,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(e=>!e),[h]),modal:l,children:a.jsx(pl,{...u,open:d,onOpenChange:h,dir:i,modal:l,children:n})})};Pl.displayName=kl;var Ol="DropdownMenuTrigger",Rl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...r}=e,o=Ll(Ol,n),s=El(n);return a.jsx(fl,{asChild:!0,...s,children:a.jsx(We.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:ke(t,o.triggerRef),onPointerDown:Ie(e.onPointerDown,e=>{i||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:Ie(e.onKeyDown,e=>{i||(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Rl.displayName=Ol;var Fl=e=>{const{__scopeDropdownMenu:t,...n}=e,i=El(t);return a.jsx(gl,{...i,...n})};Fl.displayName="DropdownMenuPortal";var zl="DropdownMenuContent",Vl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Ll(zl,n),o=El(n),s=g.useRef(!1);return a.jsx(ml,{id:r.contentId,"aria-labelledby":r.triggerId,...o,...i,ref:t,onCloseAutoFocus:Ie(e.onCloseAutoFocus,e=>{var t;s.current||null==(t=r.triggerRef.current)||t.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:Ie(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,i=2===t.button||n;r.modal&&!i||(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Vl.displayName=zl;g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(vl,{...r,...i,ref:t})}).displayName="DropdownMenuGroup";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(yl,{...r,...i,ref:t})}).displayName="DropdownMenuLabel";var Bl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(xl,{...r,...i,ref:t})});Bl.displayName="DropdownMenuItem";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(_l,{...r,...i,ref:t})}).displayName="DropdownMenuCheckboxItem";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(bl,{...r,...i,ref:t})}).displayName="DropdownMenuRadioGroup";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(wl,{...r,...i,ref:t})}).displayName="DropdownMenuRadioItem";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(Cl,{...r,...i,ref:t})}).displayName="DropdownMenuItemIndicator";var jl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(Sl,{...r,...i,ref:t})});jl.displayName="DropdownMenuSeparator";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(Ml,{...r,...i,ref:t})}).displayName="DropdownMenuArrow";var Gl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(Il,{...r,...i,ref:t})});Gl.displayName="DropdownMenuSubTrigger";var Wl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=El(n);return a.jsx(Dl,{...r,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wl.displayName="DropdownMenuSubContent";var Hl=Pl,Ul=Rl,Yl=Fl,Zl=Vl,Xl=Bl,ql=jl,$l=e=>{const{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:r,defaultOpen:o}=e,s=El(t),[l,u]=ze({prop:i,defaultProp:o??!1,onChange:r,caller:"DropdownMenuSub"});return a.jsx(Tl,{...s,open:l,onOpenChange:u,children:n})},Kl=Gl,Jl=Wl;const Ql=s.forwardRef(function(e,t){const{itemSource:n,beforeClose:i,minWidth:r="150px",fixPosition:o,noPadding:l=!1,disableCloseOnClickBackdrop:u=!1,onOpen:c,onClose:d,slots:h}=e,[p,f]=s.useState(!1),[g,m]=s.useState(null),v=s.useCallback(async()=>{i&&await i(),f(!1),null==d||d()},[i,d]),y=s.useCallback((e,t)=>{"function"==typeof e&&m(e(t)),f(!0),null==c||c()},[c]);s.useImperativeHandle(t,()=>({open:y,close:v,toggle:()=>p?v():y(),state:p}));const x=g??n??[];return a.jsxs(Hl,{open:p,onOpenChange:e=>{!e&&u||(e?(f(!0),null==c||c()):v())},children:[o&&a.jsx(Ul,{asChild:!0,children:a.jsx("span",{className:"moz-r-context-menu__trigger",style:{position:"fixed",left:"number"==typeof o.left?`${o.left}px`:o.left,top:"number"==typeof o.top?`${o.top}px`:o.top,width:1,height:1,pointerEvents:"none",visibility:"hidden"}})}),a.jsx(Yl,{children:a.jsx(Zl,{className:k("moz-r-context-menu-content",{"is-no-padding":l}),style:{minWidth:r},side:"bottom",align:"start",sideOffset:0,alignOffset:0,avoidCollisions:!0,children:a.jsx(eu,{items:x,close:v,slots:h})})})]})});function eu({items:e,close:t,slots:n}){return a.jsx(a.Fragment,{children:e.map((e,i)=>{if(e.hidden)return null;if(e.separator)return a.jsx(ql,{className:"moz-r-context-menu__separator"},`sep-${i}`);const r="function"==typeof e.disabled?e.disabled():Boolean(e.disabled),o=!!(e.children&&e.children.length>0);return e.template&&(null==n?void 0:n[e.template])?a.jsx("div",{className:"moz-r-context-menu-item-template",children:n[e.template]({item:e,close:t})},`tmpl-${i}`):o?a.jsxs($l,{children:[a.jsxs(Kl,{className:k("moz-r-context-menu-item",{"is-disabled":r}),disabled:r,children:[a.jsx("span",{className:"moz-r-context-menu-item__label",children:e.text}),a.jsx("span",{className:"moz-r-context-menu-item__arrow"})]}),a.jsx(Yl,{children:a.jsx(Jl,{className:"moz-r-context-menu-content",sideOffset:2,children:a.jsx(eu,{items:e.children,close:t,slots:n})})})]},`sub-${i}`):a.jsx(Xl,{className:k("moz-r-context-menu-item",{"is-disabled":r}),disabled:r,onSelect:n=>{var i;n.preventDefault(),r||(null==(i=e.function)||i.call(e),t())},children:a.jsx("span",{className:"moz-r-context-menu-item__label",children:e.text})},`itm-${i}`)})})}const tu=s.forwardRef(function(e,t){const{config:n={},onOpenFilter:i,onOpenColumnPicker:r,onToggleGroupPanel:o,onOpenBulkEditor:l}=e,u=_(),c=Y(),d=ya(),h=s.useRef(null),[p,f]=s.useState([]),g=s.useRef(null),m=Oa(n,{onOpenFilter:i,onOpenColumnPicker:r,onToggleGroupPanel:o,onOpenBulkEditor:l});s.useEffect(()=>{var e;if(m.setGrid(c),!c)return;const t=c,n=null==(e=t.on)?void 0:e.call(t,"contextmenu",e=>{v(e)});return()=>{null==n||n()}},[c]);const v=s.useCallback(e=>{if(!c)return;if(e.originalEvent.preventDefault(),"header"===e.area&&e.groupId){const t={area:"header",rowIndex:-1,columnId:"",groupId:e.groupId,field:null,cellValue:null,rowData:null};return g.current=t,m.show(e.originalEvent,t),void requestAnimationFrame(()=>x(()=>T(t)))}if("cell"!==e.area||e.structural)return;if(void 0===e.rowIndex&&void 0===e.rowId)return;const t=y(e);t&&(g.current=t,m.show(e.originalEvent,t),requestAnimationFrame(()=>{const e=w();x(()=>I(t,e))}))},[c,m]),y=s.useCallback(e=>{var t,n,i,r;if(!c)return null;const o=e.columnId??"",a=e.rowIndex??-1,s=e.rowId;if(!o)return null;if(a<0&&void 0===s)return null;const l=c,u=((null==(t=l.getFields)?void 0:t.call(l))??[]).find(e=>e.id===o)??null;let d=null;try{void 0!==s&&(d=(null==(r=null==(i=null==(n=l.rows)?void 0:n.getById)?void 0:i.call(n,s))?void 0:r.data)??null)}catch{}return{area:"cell",rowIndex:a,rowId:s,columnId:o,field:u,cellValue:e.value??null,rowData:d}},[c]),x=s.useCallback(e=>{var t;null==(t=h.current)||t.open(e)},[]),b=s.useCallback(()=>{var e;null==(e=h.current)||e.close(),m.hide()},[m]);s.useImperativeHandle(t,()=>({open:(e,t)=>{g.current=e,m.show({preventDefault:()=>{},clientX:t.left,clientY:t.top},e),requestAnimationFrame(()=>{x(()=>I(e,[])),w().then(t=>{x(()=>I(e,t))})})},close:b}),[m,x,b]);const w=s.useCallback(async()=>{var e,t;if(!c)return[];try{const n=await(null==(t=null==(e=c.rows)?void 0:e.selectionAggregates)?void 0:t.call(e)),i=(null==n?void 0:n.columns)??[];return f(i),i}catch{return f([]),[]}},[c]),C=e=>{const t=u.Grid;return{sum:t.contextSum??"합계",avg:t.contextAvg??"평균",min:t.contextMin??"최소",max:t.contextMax??"최대",count:t.contextCount??"개수",first:t.contextFirst??"첫번째",last:t.contextLast??"마지막"}[e]??e},S=s.useCallback(e=>{d&&e.field&&d.showCustomCellHandler(e.field)},[d]),M=(e,t)=>e.replace("{column}",t).replace("{name}",t),T=s.useCallback(e=>{const t=[],i=u.Grid;return t.push({text:i.contextGroupToggle??"그룹 접기/펼치기",function:()=>{m.executeCommand("GROUP_TOGGLE"),b()}}),t.push({text:i.contextGroupCollapseAll??"모든 그룹 접기",function:()=>{m.executeCommand("GROUP_COLLAPSE_ALL"),b()}}),t.push({text:i.contextGroupExpandAll??"모든 그룹 펼치기",function:()=>{m.executeCommand("GROUP_EXPAND_ALL"),b()}}),t.push({separator:!0}),t.push({text:i.contextColumnPicker,function:()=>{m.executeCommand("COLUMN_VIEW_SELECT"),b()}}),!1!==n.useAutoSizeColumns&&t.push({text:i.contextAutoSizeColumns,function:()=>{m.executeCommand("AUTO_SIZE_COLUMNS"),b()}}),iu(t)},[n.useAutoSizeColumns,m,u,b]),I=s.useCallback((e,t)=>{var i,r,o;const a=[],s=n,l=u.Grid,h=(null==(i=e.field)?void 0:i.header)??"",p=!1!==s.useFilter,f=!1!==s.useSort;if(p||f){const t=[];p&&(t.push({text:M(l.contextAddFilter??"'{column}' 열에 필터 추가",h),function:()=>{m.executeCommand("ADD_FLT"),b()}}),t.push({text:l.contextSelectFilter??"선택 값으로 필터",disabled:()=>e.rowIndex<0&&void 0===e.rowId||null===e.cellValue||void 0===e.cellValue||""===e.cellValue,function:()=>{m.executeCommand("SEL_FLT"),b()}}),t.push({text:M(l.contextResetColumnFilter??"'{column}' 열 필터 초기화",h),disabled:()=>!m.hasColumnFilter(e.columnId),function:()=>{m.executeCommand("RST_COL_FLT"),b()}})),f&&t.push({text:M(l.contextResetColumnSort??"'{column}' 열 정렬 초기화",h),disabled:()=>!m.hasColumnSort(e.columnId),function:()=>{m.executeCommand("RST_COL_SORT"),b()}}),p&&f&&t.push({text:M(l.contextResetColumnAll??"'{column}' 열 필터/정렬 초기화",h),disabled:()=>!m.hasColumnFilter(e.columnId)&&!m.hasColumnSort(e.columnId),function:()=>{m.executeCommand("RST_COL_ALL"),b()}}),t.length>0&&a.push({order:10,item:{text:l.contextFilterAndSort??"필터 및 정렬",children:t}})}s.useCustomCell&&d&&a.push({order:15,item:{text:l.customCellStyle??"셀 스타일 지정",function:()=>{S(e),b()}}}),!1!==s.useDataCopy&&a.push({order:20,item:{text:l.contextDataCopy??"선택 데이터 복사",function:()=>{m.executeCommand("DATA_COPY"),b()}}}),!1!==s.useDataWithHeaderCopy&&a.push({order:21,item:{text:l.contextDataWithHeaderCopy??"헤더 포함 복사",function:()=>{m.executeCommand("DATA_HEADER_COPY"),b()}}});const g=(null==(o=null==(r=null==c?void 0:c.headers)?void 0:r.hasGroups)?void 0:o.call(r))??!1;if(!1===s.useFixedColumn||g||a.push({order:30,item:{text:l.contextPin??"컬럼 고정/해제",function:()=>{m.executeCommand("PIN_UNPIN"),b()}}}),!1!==s.useViewSelectColumn&&a.push({order:31,item:{text:l.contextColumnPicker??"열 표시/숨김 설정",function:()=>{m.executeCommand("COLUMN_VIEW_SELECT"),b()}}}),g||a.push({order:32,item:{text:l.contextMoveColumnFirst??"첫 번째 열로 보내기",function:()=>{m.executeCommand("MOVE_TO_FIRST"),b()}}}),g&&(a.push({order:33,item:{text:l.contextGroupCollapseAll??"모든 그룹 접기",function:()=>{m.executeCommand("GROUP_COLLAPSE_ALL"),b()}}}),a.push({order:34,item:{text:l.contextGroupExpandAll??"모든 그룹 펼치기",function:()=>{m.executeCommand("GROUP_EXPAND_ALL"),b()}}})),!1!==s.useGroupColumn&&a.push({order:35,item:{text:l.contextGroupPanel??"그룹 패널",function:()=>{m.executeCommand("GROUP_PANEL"),b()}}}),s.useBulkEditColumn&&a.push({order:45,item:{text:M(l.contextBulkEdit??"데이터 일괄변경 [{name}]",h),function:()=>{m.executeCommand("BULK_EDIT"),b()}}}),!1!==s.useAutoSizeColumns&&a.push({order:60,item:{text:l.contextAutoSizeColumns??"열 너비 자동 조정",function:()=>{m.executeCommand("AUTO_SIZE_COLUMNS"),b()}}}),s.customMenu&&s.customMenu.length>0)for(const n of s.customMenu)a.push({order:n.order??50,item:nu(n,b)});a.sort((e,t)=>e.order-t.order);const v=[];let y=-1;for(const n of a){const e=Math.floor(n.order/10);y>=0&&e!==y&&v.push({separator:!0}),v.push(n.item),y=e}return t.length>0&&(v.push({separator:!0}),v.push({text:"",template:"aggregate-columns"})),iu(v)},[n,u,m,c,d,S,b]),D=s.useMemo(()=>({"aggregate-columns":()=>a.jsx(a.Fragment,{children:p.map((e,t)=>{return a.jsxs("div",{className:["moz-r-grid-context-menu-aggregate",p.length>=2?"moz-r-grid-context-menu-aggregate--compact":""].filter(Boolean).join(" "),children:[a.jsxs("span",{className:"moz-r-grid-context-menu-aggregate__label",children:[e.header," ",C(e.aggregate)]}),a.jsx("span",{className:"moz-r-grid-context-menu-aggregate__value",children:(n=e.value,i=e.formattedValue,i||(Number.isNaN(n)?String(n):n.toLocaleString(void 0,{maximumFractionDigits:2})))})]},t);var n,i})})}),[p]);return a.jsx(Ql,{ref:h,minWidth:"200px",fixPosition:{left:m.position.x,top:m.position.y},slots:D,onClose:m.hide})});function nu(e,t){return{text:e.label,disabled:e.disabled??!1,function:e.handler?()=>{var n;null==(n=e.handler)||n.call(e),t()}:void 0,children:e.children?e.children.map(e=>nu(e,t)):void 0}}function iu(e){var t,n,i,r;if(!e||0===e.length)return e;const o=[...e];for(;o.length>0&&(null==(t=o[0])?void 0:t.separator);)o.shift();for(;o.length>0&&(null==(n=o[o.length-1])?void 0:n.separator);)o.pop();for(let a=0;a<o.length-1;a++)(null==(i=o[a])?void 0:i.separator)&&(null==(r=o[a+1])?void 0:r.separator)&&(o.splice(a,1),a--);return o}function ru({visible:e=!1}){const t=_(),n=Y(),i=t.Grid.groupPanelPlaceholder??"열을 드래그 앤 드롭하여 그룹을 만듭니다.",[r,o]=s.useState([]),[l,u]=s.useState(-1),[c,d]=s.useState(!1),h=e=>{var t;if(!n)return e;try{const i=((null==(t=n.getFields)?void 0:t.call(n))??[]).find(t=>t.id===e);return(null==i?void 0:i.header)??e}catch{return e}};if(s.useEffect(()=>{if(!(null==n?void 0:n.select))return;const e=n.select(e=>e.viewState.groups),t=()=>{const t=e.getSnapshot();o(((null==t?void 0:t.columnIds)??[]).map(e=>({id:e,header:h(e)})))};t();const i=e.subscribe(t);return()=>i()},[n]),!e)return null;const p=e=>{var t;(null==(t=null==n?void 0:n.group)?void 0:t.groupBy)&&(o(e.map(e=>({id:e,header:h(e)}))),n.rowGroup.groupBy(e))},f=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move")},g=()=>u(-1);return a.jsx("div",{className:["moz-group-panel",c?"drag-over":""].filter(Boolean).join(" "),onDragOver:e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),d(!0)},onDragLeave:()=>d(!1),onDrop:e=>{e.preventDefault(),d(!1);const t=l;if(u(-1),t>=0){const e=r.map(e=>e.id),[n]=e.splice(t,1);return e.push(n),void p(e)}const i=(e=>{var t,n;const i=null==(t=e.dataTransfer)?void 0:t.getData("application/x-grid-drag");if(i)try{const e=JSON.parse(i);if("group"===e.type&&Array.isArray(e.leafFieldIds)&&e.leafFieldIds.length>0)return{columnId:e.leafFieldIds[0],label:e.label}}catch{}const r=null==(n=e.dataTransfer)?void 0:n.getData("text/plain");return r?{columnId:r}:null})(e);if(!i||!n)return;const{columnId:o}=i;if(!(e=>{var t;return!!n&&(!e.startsWith("_")&&((null==(t=n.getFields)?void 0:t.call(n))??[]).some(t=>t.id===e))})(o))return;if(r.some(e=>e.id===o))return;const a=r.map(e=>e.id);a.push(o),p(a)},children:0===r.length?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"moz-group-panel__drag-icon"}),a.jsx("span",{className:"moz-group-panel__placeholder",children:i})]}):r.map((e,t)=>a.jsxs("div",{className:["moz-group-panel__chip",l===t?"chip-dragging":""].filter(Boolean).join(" "),draggable:!0,onDragStart:e=>((e,t)=>{u(t),e.dataTransfer&&(e.dataTransfer.setData("text/plain",r[t].id),e.dataTransfer.effectAllowed="move")})(e,t),onDragOver:f,onDrop:e=>((e,t)=>{e.preventDefault(),e.stopPropagation(),d(!1);const n=l;if(n<0||n===t)return void u(-1);const i=r.map(e=>e.id),[o]=i.splice(n,1);i.splice(t,0,o),u(-1),p(i)})(e,t),onDragEnd:g,children:[a.jsx("span",{className:"moz-group-panel__chip-icon"}),a.jsx("span",{className:"moz-group-panel__chip-label",children:e.header}),a.jsx("button",{type:"button",className:"moz-group-panel__chip-remove",onClick:()=>(e=>{const t=r.filter(t=>t.id!==e).map(e=>e.id);p(t)})(e.id),children:"×"})]},e.id))})}const ou="data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3crect%20x='106.5'%20y='49.5'%20width='51'%20height='28'%20rx='7.5'%20fill='%23F6F8FA'%20stroke='%238B919C'/%3e%3cellipse%20cx='90'%20cy='136'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M34.5%2066C34.5%2061.8579%2037.8579%2058.5%2042%2058.5H143C147.142%2058.5%20150.5%2061.8579%20150.5%2066V115C150.5%20119.694%20146.694%20123.5%20142%20123.5H42C37.8579%20123.5%2034.5%20120.142%2034.5%20116V66Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2328_1616)'%3e%3crect%20x='32'%20y='56'%20width='116'%20height='65'%20rx='8'%20fill='white'/%3e%3crect%20x='32.5'%20y='56.5'%20width='115'%20height='64'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='126'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='132'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='138'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='40'%20y='74'%20width='100'%20height='26'%20rx='2'%20fill='%23E4E6EB'/%3e%3crect%20x='44'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='44'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='116'%20y='104'%20width='24'%20height='9'%20rx='2'%20fill='%23868C98'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M147%2070H33V69H147V70Z'%20fill='%23D6DAE2'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2328_1616'%20x='32'%20y='56'%20width='118'%20height='67'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2328_1616'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2328_1616'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",au={custom_empty:ou,data_empty:"data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3cellipse%20cx='88'%20cy='141'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M32.5%2059C32.5%2054.8579%2035.8579%2051.5%2040%2051.5H141C145.142%2051.5%20148.5%2054.8579%20148.5%2059V120C148.5%20124.694%20144.694%20128.5%20140%20128.5H40C35.8579%20128.5%2032.5%20125.142%2032.5%20121V59Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2357_2211)'%3e%3crect%20x='30'%20y='49'%20width='116'%20height='77'%20rx='8'%20fill='white'/%3e%3crect%20x='30.5'%20y='49.5'%20width='115'%20height='76'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='124'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='130'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='136'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='38.5'%20y='90.5'%20width='99'%20height='27'%20rx='1.5'%20stroke='%238B919C'%20stroke-dasharray='2%202'/%3e%3crect%20x='59'%20y='71'%20width='49'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='59'%20y='77'%20width='79'%20height='6'%20fill='%23CBCFD7'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M145%2063H31V62H145V63Z'%20fill='%23D6DAE2'/%3e%3cg%20clip-path='url(%23clip0_2357_2211)'%3e%3cg%20clip-path='url(%23clip1_2357_2211)'%3e%3cpath%20d='M88%2098.2857V109.714'%20stroke='%238B919C'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3cpath%20d='M82.2856%20104H93.7142'%20stroke='%238B919C'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3c/g%3e%3c/g%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M46%2084C49.866%2084%2053%2080.866%2053%2077C53%2073.134%2049.866%2070%2046%2070C42.134%2070%2039%2073.134%2039%2077C39%2080.866%2042.134%2084%2046%2084ZM45.5333%2073.8667C45.5333%2073.5353%2045.802%2073.2667%2046.1333%2073.2667H46.3333C46.6647%2073.2667%2046.9333%2073.5353%2046.9333%2073.8667V77.8C46.9333%2078.1314%2046.6647%2078.4%2046.3333%2078.4H46.1333C45.802%2078.4%2045.5333%2078.1314%2045.5333%2077.8V73.8667ZM45.5333%2079.9333C45.5333%2079.602%2045.802%2079.3333%2046.1333%2079.3333H46.3333C46.6647%2079.3333%2046.9333%2079.602%2046.9333%2079.9333V80.1333C46.9333%2080.4647%2046.6647%2080.7333%2046.3333%2080.7333H46.1333C45.802%2080.7333%2045.5333%2080.4647%2045.5333%2080.1333V79.9333Z'%20fill='%23868C98'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2357_2211'%20x='30'%20y='49'%20width='118'%20height='79'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2357_2211'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2357_2211'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_2357_2211'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(80%2096)'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_2357_2211'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='translate(80%2096)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",result_empty:"data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3crect%20x='106.5'%20y='49.5'%20width='51'%20height='28'%20rx='7.5'%20fill='%23F6F8FA'%20stroke='%238B919C'/%3e%3cellipse%20cx='90'%20cy='136'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M34.5%2066C34.5%2061.8579%2037.8579%2058.5%2042%2058.5H143C147.142%2058.5%20150.5%2061.8579%20150.5%2066V115C150.5%20119.694%20146.694%20123.5%20142%20123.5H42C37.8579%20123.5%2034.5%20120.142%2034.5%20116V66Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2328_1616)'%3e%3crect%20x='32'%20y='56'%20width='116'%20height='65'%20rx='8'%20fill='white'/%3e%3crect%20x='32.5'%20y='56.5'%20width='115'%20height='64'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='126'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='132'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='138'%20cy='63'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='40'%20y='74'%20width='100'%20height='26'%20rx='2'%20fill='%23E4E6EB'/%3e%3crect%20x='44'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='80'%20width='27'%20height='4'%20fill='%23CBCFD7'/%3e%3crect%20x='44'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='92'%20y='86'%20width='44'%20height='8'%20fill='%23CBCFD7'/%3e%3crect%20x='116'%20y='104'%20width='24'%20height='9'%20rx='2'%20fill='%23868C98'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M147%2070H33V69H147V70Z'%20fill='%23D6DAE2'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2328_1616'%20x='32'%20y='56'%20width='118'%20height='67'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2328_1616'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2328_1616'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",search_empty:"data:image/svg+xml,%3csvg%20width='180'%20height='180'%20viewBox='0%200%20180%20180'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='90'%20cy='90'%20r='90'%20fill='%23F6F8FA'/%3e%3cellipse%20cx='88'%20cy='141'%20rx='37'%20ry='2'%20fill='%23C2CBD3'/%3e%3cpath%20d='M32.5%2059C32.5%2054.8579%2035.8579%2051.5%2040%2051.5H141C145.142%2051.5%20148.5%2054.8579%20148.5%2059V120C148.5%20124.694%20144.694%20128.5%20140%20128.5H40C35.8579%20128.5%2032.5%20125.142%2032.5%20121V59Z'%20fill='white'%20stroke='%238B919C'/%3e%3cg%20filter='url(%23filter0_d_2357_2190)'%3e%3crect%20x='30'%20y='49'%20width='116'%20height='77'%20rx='8'%20fill='white'/%3e%3crect%20x='30.5'%20y='49.5'%20width='115'%20height='76'%20rx='7.5'%20stroke='%238B919C'/%3e%3c/g%3e%3ccircle%20cx='124'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='130'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3ccircle%20cx='136'%20cy='56'%20r='2'%20fill='%23E2E4E9'/%3e%3crect%20x='38.5'%20y='70.5'%20width='99'%20height='47'%20rx='1.5'%20stroke='%238B919C'%20stroke-dasharray='2%202'/%3e%3crect%20x='50'%20y='81'%20width='27.54'%20height='4'%20rx='2'%20fill='%23A6ABB3'/%3e%3crect%20x='50'%20y='97'%20width='27.54'%20height='4'%20rx='2'%20fill='%23A6ABB3'/%3e%3crect%20x='50'%20y='87'%20width='51'%20height='4'%20rx='2'%20fill='%23CBCFD7'/%3e%3crect%20x='50'%20y='103'%20width='51'%20height='4'%20rx='2'%20fill='%23CBCFD7'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M145%2063H31V62H145V63Z'%20fill='%23D6DAE2'/%3e%3cpath%20d='M123.553%20101.582L119.095%2097.1196C117.866%2097.9205%20116.394%2098.3781%20114.808%2098.2923C111.421%2098.135%20108.521%2095.4892%20108.064%2092.1283C107.435%2087.3372%20111.564%2083.2899%20116.394%2084.1051C119.18%2084.577%20121.495%2086.7509%20122.11%2089.5111C122.581%2091.5991%20122.124%2093.5441%20121.11%2095.0887L125.582%2099.5651C126.139%20100.123%20126.139%20101.024%20125.582%20101.582C125.025%20102.139%20124.11%20102.139%20123.553%20101.582ZM119.438%2091.1558C119.438%2088.796%20117.509%2086.8653%20115.151%2086.8653C112.793%2086.8653%20110.864%2088.796%20110.864%2091.1558C110.864%2093.5155%20112.793%2095.4463%20115.151%2095.4463C117.509%2095.4463%20119.438%2093.5155%20119.438%2091.1558Z'%20fill='%23868C98'/%3e%3cdefs%3e%3cfilter%20id='filter0_d_2357_2190'%20x='30'%20y='49'%20width='118'%20height='79'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.886275%200%200%200%200%200.894118%200%200%200%200%200.913725%200%200%200%201%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_2357_2190'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_2357_2190'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e"};function su(e){const{isReadOnly:t=!0,isCustomState:n=!1,headerMsg:i,contentMsg:r,filterdRowCount:o=0,totalRowCount:l=0,useImg:u=!0,selectImg:c,messages:d,customState:h}=e,p=_(),f=s.useMemo(()=>{if(c&&(0===l||0===o))switch(c){case"Custom":return"custom_empty";case"Result":return"result_empty";case"Data":return"data_empty";case"Search":return"search_empty"}return n?"custom_empty":0===l?t?"result_empty":"data_empty":0===o?"search_empty":""},[c,l,o,n,t]);if(!f)return null;const g=e=>(null==d?void 0:d[e])||p.EmptyState[e]||"",m=i??g({custom_empty:"customEmptyHeader",data_empty:"dataEmptyHeader",result_empty:"resultEmptyHeader",search_empty:"searchEmptyHeader"}[f]||"customEmptyHeader"),v=r??g({custom_empty:"customEmptyContent",data_empty:"dataEmptyContent",result_empty:"resultEmptyContent",search_empty:"searchEmptyContent"}[f]||"customEmptyContent"),y=au[f]||ou;return a.jsxs("div",{className:"moz-r-empty-state",children:[u&&a.jsx("img",{src:y,alt:"Empty state",className:"moz-r-empty-state__img"}),a.jsx("div",{className:"moz-r-empty-state__heading",children:m}),a.jsx("div",{className:"moz-r-empty-state__content",dangerouslySetInnerHTML:{__html:v.replace(/\n/g,"<br />")}}),h&&a.jsx("div",{className:"moz-r-empty-state__content",children:h})]})}function lu(e){const{itemsSource:t,label:n,width:i=200,required:r=!1,readonly:o=!1,disabled:l=!1,keyProp:u="id",displayProp:c="text",disabledProp:d="disabled",useSelectAll:h=!0,useFilter:p=!1,headerFormat:f,listBoxWidth:g=0,useSpecificSelect:m=!0,autoSelectNewItems:v=!1,selectAllWhenEmpty:y=!1,invalidMessage:x="",value:b,onChange:w,onClose:C,listItemSlot:S,emptySlot:M}=e,T=_(),[I,D]=s.useState(!1),[E,L]=s.useState(""),[P,O]=s.useState(""),[R,F]=s.useState(null),z=s.useRef(t),V=s.useCallback(e=>"function"==typeof c?c(e):String((null==e?void 0:e[c])??""),[c]),B=s.useCallback(e=>null==e?void 0:e[u],[u]),j=s.useCallback(e=>Boolean(null==e?void 0:e[d]),[d]);s.useEffect(()=>{if(!v)return void(z.current=t);const e=new Set(z.current.map(B)),n=t.filter(t=>!e.has(B(t)));if(n.length>0){const e=n.map(B);w([...b,...e])}z.current=t},[t,v,B,w,b]),s.useEffect(()=>{y&&0===b.length&&t.length>0&&w(t.filter(e=>!j(e)).map(B))},[]),s.useEffect(()=>{const e=window.setTimeout(()=>O(E),300);return()=>window.clearTimeout(e)},[E]),s.useEffect(()=>{!I&&E&&L(""),I||null==C||C()},[I,E,C]);const G=s.useMemo(()=>{if(!p||!P)return t;const e=P.toLowerCase();return t.filter(t=>V(t).toLowerCase().includes(e))},[t,P,p,V]),W=s.useMemo(()=>new Set(b),[b]),H=Wo({count:G.length,getScrollElement:()=>R,estimateSize:()=>24,overscan:5}),U=s.useMemo(()=>G.filter(e=>!j(e)).map(B),[G,B,j]),Y=U.length>0&&U.every(e=>W.has(e)),Z=U.some(e=>W.has(e))&&!Y,X=e=>{if(j(e))return;const t=B(e);W.has(t)?w(b.filter(e=>e!==t)):w([...b,t])},q=()=>{if(Y)w(b.filter(e=>!U.includes(e)));else{const e=U.filter(e=>!W.has(e));w([...b,...e])}},$=s.useMemo(()=>N(f??T.MultiSelect.headerFormat,{count:b.length}),[f,T,b.length]),K={width:"number"==typeof i?`${A(i)}rem`:i},J=g&&0!==g?{minWidth:"number"==typeof g?`${A(g)}rem`:g}:{width:"var(--radix-popover-trigger-width)",minWidth:"var(--radix-popover-trigger-width)"},Q=!!x;return a.jsxs("div",{className:k("moz-r-multi-select",{"is-disabled":l,"is-invalid":Q,"is-open":I}),style:K,children:[n&&a.jsxs("label",{className:k("moz-r-multi-select__label",{"is-disabled":l}),children:[n,r&&a.jsx("span",{className:"moz-r-multi-select__required",children:"*"})]}),a.jsxs(So,{open:I,onOpenChange:e=>!l&&!o&&D(e),children:[a.jsx(Mo,{asChild:!0,children:a.jsxs("button",{type:"button",className:k("moz-r-multi-select__input-container",{"is-disabled":l}),disabled:l,children:[a.jsx("span",{className:k("moz-r-multi-select__value",{"is-placeholder":0===b.length}),children:$}),a.jsx(cu,{isOpen:I})]})}),a.jsx(To,{children:a.jsxs(Io,{className:"moz-r-multi-select__list-box",sideOffset:2,style:J,children:[p&&a.jsx("div",{className:"moz-r-multi-select__filter-input",children:a.jsx("input",{className:"moz-r-multi-select__filter-input-field",placeholder:T.MultiSelect.search,value:E,onChange:e=>L(e.target.value),autoFocus:!0})}),h&&a.jsx("div",{className:"moz-r-multi-select__select-all",onClick:q,children:a.jsx(la,{checked:Y,indeterminate:Z,label:P?T.MultiSelect.selectFiltered:T.MultiSelect.selectAll,onChange:q})}),a.jsx("div",{ref:F,className:"moz-r-multi-select__list-box-container",children:0===G.length?a.jsx("div",{className:"moz-r-multi-select__empty",children:M??T.MultiSelect.noData}):a.jsx("div",{style:{height:`${H.getTotalSize()}px`,position:"relative"},children:H.getVirtualItems().map(e=>{const t=G[e.index],n=B(t),i=V(t),r=W.has(n),o=j(t);return a.jsxs("div",{className:k("moz-r-multi-select__list-box-item",{"is-selected":r,"is-disabled":o}),style:{position:"absolute",top:0,left:0,width:"100%",height:`${e.size}px`,transform:`translateY(${e.start}px)`},onClick:()=>X(t),children:[a.jsx(la,{checked:r,disabled:o,onChange:()=>X(t)}),a.jsx("span",{className:"moz-r-multi-select__list-text",children:S?S({item:t,text:i}):a.jsx(uu,{text:i,highlight:P})}),m&&!o&&a.jsx("button",{type:"button",className:"moz-r-multi-select__only-btn",onClick:e=>{e.stopPropagation(),(e=>{j(e)||w([B(e)])})(t)},children:T.MultiSelect.specificSelect})]},e.key)})})})]})})]}),x&&a.jsx("span",{className:"moz-r-multi-select__invalid-message",children:x})]})}function uu({text:e,highlight:t}){if(!t)return a.jsx(a.Fragment,{children:e});const n=e.toLowerCase().indexOf(t.toLowerCase());return n<0?a.jsx(a.Fragment,{children:e}):a.jsxs(a.Fragment,{children:[e.slice(0,n),a.jsx("strong",{className:"moz-r-multi-select__match-highlight",children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}function cu({isOpen:e}){return a.jsx("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",style:{transition:"transform 0.15s",transform:e?"rotate(180deg)":"rotate(0deg)"},children:a.jsx("path",{d:"M1 1L5 5L9 1",stroke:"#8998b5",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const du=1,hu=2,pu=3,fu=4,gu=new Set(["+","-","*","/"]),mu=new Set(["=","!=","<",">","<=",">="]),vu=new Set(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"]),yu=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),xu=new Set(["AND","OR","NOT"]),_u=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],bu=[{type:"operator",value:"=",displayText:"=",description:"같음"},{type:"operator",value:"!=",displayText:"!=",description:"같지 않음"},{type:"operator",value:"<",displayText:"<",description:"미만"},{type:"operator",value:">",displayText:">",description:"초과"},{type:"operator",value:"<=",displayText:"<=",description:"이하"},{type:"operator",value:">=",displayText:">=",description:"이상"},{type:"operator",value:"+",displayText:"+",description:"더하기"},{type:"operator",value:"-",displayText:"-",description:"빼기"},{type:"operator",value:"*",displayText:"*",description:"곱하기"},{type:"operator",value:"/",displayText:"/",description:"나누기"},{type:"operator",value:"CONTAINS",displayText:"CONTAINS",description:"포함"},{type:"operator",value:"NOT_CONTAINS",displayText:"NOT_CONTAINS",description:"포함하지 않음"},{type:"operator",value:"STARTS_WITH",displayText:"STARTS_WITH",description:"시작"},{type:"operator",value:"ENDS_WITH",displayText:"ENDS_WITH",description:"끝남"},{type:"operator",value:"IS_EMPTY",displayText:"IS_EMPTY",description:"비어있음"},{type:"operator",value:"IS_NOT_EMPTY",displayText:"IS_NOT_EMPTY",description:"비어있지 않음"},{type:"operator",value:"LIKE",displayText:"LIKE",description:"SQL 패턴 매칭"}],wu=[{type:"logical",value:"AND",displayText:"AND",description:"그리고"},{type:"logical",value:"OR",displayText:"OR",description:"또는"}];function Cu(e){const t=e.toUpperCase();return e.startsWith("[")&&e.endsWith("]")?"ColumnRef":gu.has(e)?"ArithmeticOp":mu.has(e)?"ComparisonOp":vu.has(t)?"StringOp":yu.has(t)?"PostfixOp":xu.has(t)?"LogicalOp":/^-?\d+(\.\d+)?$/.test(e)?"Number":e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?"String":e.startsWith("#")&&e.endsWith("#")?"Date":"TRUE"===t||"FALSE"===t?"Boolean":"("===e?"OpenParen":")"===e?"CloseParen":"Unknown"}function Su(e){let t="";for(const n of e){const e=n.charCodeAt(0);if(e>=44032&&e<=55203){const n=Math.floor((e-44032)/588);t+=_u[n]??""}else/[ㄱ-ㅎ]/.test(n)&&(t+=n)}return t}function Mu(e,t){if(!e||0===e.trim().length)return!0;const n=e.toLowerCase().trim();return t.some(e=>e.header.toLowerCase().startsWith(n)||e.header.toLowerCase().includes(n))}function Tu(e,t,n){if(!e||t<0)return!1;const i=e.substring(t).trim();if(0===i.length)return!0;const r=i.toLowerCase();return n.some(e=>{const t=e.header.toLowerCase();return t===r||t.startsWith(r)||t.includes(r)})}function Iu(e,t,n,i){const r=e.lastIndexOf("["),o=e.lastIndexOf("]");if(-1!==r&&(-1===o||r>o)){return{token:e.substring(r+1),startPosition:r}}if(-1!==r&&-1!==o&&r<o&&t>r&&t<=o+1){return{token:e.substring(r+1),startPosition:r}}const a=function(e){const t=e.toUpperCase(),n=t.lastIndexOf(" AND "),i=t.lastIndexOf(" OR "),r=Math.max(n,i);if(-1===r)return null;const o="AND"===t.substring(r+1,r+4)?5:4;return e.substring(r+o)}(e);if(null!==a&&Mu(a,i)){return{token:a,startPosition:e.length-a.length}}if(-1!==o){const t=e.substring(o+1),n=t.lastIndexOf(" ");if(-1!==n){const t=o+1+n,r=e.lastIndexOf(" ",t-1),a=-1===r?o+1:r+1,s=e.substring(a);if(s.length>0&&Tu(e,a,i))return{token:s,startPosition:a};return{token:e.substring(t+1),startPosition:t+1}}return{token:t,startPosition:o+1}}const s=e.lastIndexOf(" ");if(-1===s)return{token:e,startPosition:0};let l=s+1;const u=e.lastIndexOf(" ",s-1),c=-1===u?0:u+1;return e.substring(c).length>0&&Tu(e,c,i)&&(l=c),{token:e.substring(l),startPosition:l}}function Du(e,t){const n=t.indexOf(e);switch(e.type){case"ColumnRef":if(n>=1){const e=t[n-1];if("ArithmeticOp"===e.type)return"after_arithmetic_expr";if("ComparisonOp"===e.type)return"after_value";if("StringOp"===e.type)return"after_value"}return"after_column";case"ArithmeticOp":return"after_arithmetic_op";case"ComparisonOp":return"after_comparison_op";case"StringOp":return"after_string_op";case"PostfixOp":return"after_postfix_op";case"LogicalOp":default:return"start";case"Number":case"String":case"Date":case"Boolean":if(n>=1){if("ArithmeticOp"===t[n-1].type)return"after_arithmetic_expr"}return"after_value"}}function ku(e,t,n,i){const r=e.trimEnd(),o=e.length>r.length;if(0===r.length)return"start";const a=e.lastIndexOf("\n"),s=-1===a?0:a+1,l=t===s,u=0===e.substring(s).trim().length;if(l||u)return"start";const c=r.lastIndexOf("["),d=r.lastIndexOf("]");if(-1!==c&&(-1===d||c>d))return"in_column";if(-1!==c&&-1!==d&&c<d&&t>c&&t<=d+1)return"in_column";const h=n.length>t?n.substring(0,t+1):e,p=function(e,t){const n=[],i=void 0!==t?Math.min(e.length,t):e.length;let r=0;for(;r<i;){const t=e[r];if(/\s/.test(t))r++;else{if("["===t){const t=r;for(r++;r<i&&"]"!==e[r];)r++;r<i&&r++,n.push({type:"ColumnRef",value:e.substring(t,r),start:t,end:r});continue}if('"'===t||"'"===t){const o=t,a=r;for(r++;r<i&&e[r]!==o;)"\\"===e[r]&&r+1<i?r+=2:r++;r<i&&r++,n.push({type:"String",value:e.substring(a,r),start:a,end:r});continue}if("#"===t){const t=r;for(r++;r<i&&"#"!==e[r];)r++;r<i&&r++,n.push({type:"Date",value:e.substring(t,r),start:t,end:r});continue}if("("!==t&&")"!==t){if(r+1<i){const t=e.substring(r,r+2);if(mu.has(t)){n.push({type:"ComparisonOp",value:t,start:r,end:r+2}),r+=2;continue}}if(gu.has(t)||mu.has(t))n.push({type:gu.has(t)?"ArithmeticOp":"ComparisonOp",value:t,start:r,end:r+1}),r++;else{if(/[a-zA-Z0-9_\-.]/.test(t)){const t=r;for(;r<i&&/[a-zA-Z0-9_\-.]/.test(e[r]);)r++;const o=e.substring(t,r);n.push({type:Cu(o),value:o,start:t,end:r});continue}r++}}else n.push({type:"("===t?"OpenParen":"CloseParen",value:t,start:r,end:r+1}),r++}}return n}(h,h.length);if(0===p.length)return"start";const f=p[p.length-1],g=function(e,t){for(const n of e)if(n.start<=t&&n.end>=t)return n;return null}(p,Math.min(t,h.length-1)),m=function(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].end<=t)return e[n];return null}(p,t);if(o&&m)return Du(m,p);if(g){if(function(e){const t=e.toUpperCase();return bu.some(e=>e.value.toUpperCase().startsWith(t)&&e.value.toUpperCase()!==t&&t.length>0)}(g.value))return"in_operator";if(p.length>=2){const e=p[p.length-2];if("ArithmeticOp"===e.type||"ComparisonOp"===e.type||"StringOp"===e.type)return"in_value"}if(Mu(g.value,i))return"start"}return Du(f,p)}function Au(e){const t=[];let n="",i=!1,r=!1,o="";for(let a=0;a<e.length;a++){const s=e[a];r?(n+=s,s===o&&(r=!1,t.push(n),n="")):'"'!==s&&"'"!==s?"["!==s?"]"!==s?i?n+=s:/\s/.test(s)?n&&(t.push(n),n=""):n+=s:(n+=s,i=!1,t.push(n),n=""):(n&&t.push(n),n=s,i=!0):(n&&t.push(n),n=s,r=!0,o=s)}return n&&t.push(n),t}function Eu(e){return e.startsWith("[")&&e.endsWith("]")?e.substring(1,e.length-1):null}function Nu(e,t){const n=Au(e);for(let i=n.length-1;i>=0;i--){const e=Eu(n[i]);if(e){const n=t.find(t=>t.header===e);if(n)return n.dataType}}}function Lu(e,t){const n=e.trim();if(n.startsWith("[")&&n.endsWith("]")){const e=Eu(n);if(e){const n=t.find(t=>t.header===e);return{type:"column",dataType:null==n?void 0:n.dataType}}}return/^-?\d+(\.\d+)?$/.test(n)?{type:"number"}:n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")?{type:"string"}:n.startsWith("#")&&n.endsWith("#")?{type:"date"}:"true"===n.toLowerCase()||"false"===n.toLowerCase()?{type:"boolean"}:function(e){const t=e.toUpperCase();return bu.some(e=>e.value.toUpperCase()===t)}(n)?{type:"operator"}:["AND","OR","NOT"].includes(n.toUpperCase())?{type:"logical"}:{type:"unknown"}}function Pu(e,t,n){const i=Au(e);if(0===i.length)return null;let r=i.length-1;if(t&&i[r]===t&&(r=i.length-2),r<0)return null;const o=i[r];return{...Lu(o,n),token:o}}function Ou(e,t){const n=t.map(e=>({type:"column",value:e.header,displayText:e.header,description:`${e.binding}`,insertText:`[${e.header}]`})),i=(e.currentToken??"").trim(),r=i.toLowerCase(),o=i?Su(i):"";if((i.startsWith('"')||i.startsWith("'")||i.startsWith("#"))&&["after_comparison_op","after_string_op","in_value"].includes(e.contextState))return[];let a=[];switch(e.contextState){case"start":a=[...n,{type:"logical",value:"NOT",displayText:"NOT",description:"부정"}];break;case"in_column":a=t.map(e=>({type:"column",value:e.header,displayText:e.header,description:`${e.binding}`,insertText:`[${e.header}]`}));break;case"after_column":case"in_operator":a=function(e){if(!e)return bu;const t=[];for(const n of bu){const i=n.value.toUpperCase();switch(e){case du:(["=","!="].includes(i)||["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(i)||["IS_EMPTY","IS_NOT_EMPTY"].includes(i))&&t.push(n);break;case hu:(["=","!=","<",">","<=",">="].includes(i)||["+","-","*","/"].includes(i)||["IS_EMPTY","IS_NOT_EMPTY"].includes(i))&&t.push(n);break;case fu:(["=","!=","<",">","<=",">="].includes(i)||["IS_EMPTY","IS_NOT_EMPTY"].includes(i))&&t.push(n);break;case pu:(["=","!="].includes(i)||["IS_EMPTY","IS_NOT_EMPTY"].includes(i))&&t.push(n);break;default:t.push(n)}}return t.length>0?t:bu}(Nu(e.currentFullText,t));break;case"after_arithmetic_op":a=[{type:"value",value:"123",displayText:"숫자",description:"숫자 값"},...n];break;case"after_comparison_op":{const i=Nu(e.currentFullText,t),r=[];i&&i!==du||r.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),i&&i!==hu||r.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),i&&i!==fu||r.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),i&&i!==pu||(r.push({type:"value",value:"true",displayText:"true",description:"참"}),r.push({type:"value",value:"false",displayText:"false",description:"거짓"})),a=[...r,...n];break}case"after_string_op":a=[{type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'},...n];break;case"after_postfix_op":case"after_value":a=[...wu];break;case"after_arithmetic_expr":a=[...bu.filter(e=>["+","-","*","/","=","!=","<",">","<=",">="].includes(e.value.toUpperCase())),...wu];break;case"after_operator":{const i=Pu(e.currentFullText,e.currentToken,t),r=Nu(e.currentFullText,t);let o="any";if("operator"===(null==i?void 0:i.type)){const e=i.token.toUpperCase();["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(e)?o="string":["+","-","*","/"].includes(e)?o="number":["=","!=","<",">","<=",">="].includes(e)&&(r===du?o="string":r===hu?o="number":r===fu?o="date":r===pu&&(o="boolean"))}const s=[];"any"!==o&&"string"!==o||s.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),"any"!==o&&"number"!==o||s.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),"any"!==o&&"date"!==o||s.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),"any"!==o&&"boolean"!==o||(s.push({type:"value",value:"true",displayText:"true",description:"참"}),s.push({type:"value",value:"false",displayText:"false",description:"거짓"})),a=[...s,...n];break}case"in_value":{const i=Pu(e.currentFullText,e.currentToken,t),r=Nu(e.currentFullText,t);let o="any";if("operator"===(null==i?void 0:i.type)){const e=i.token.toUpperCase();["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(e)?o="string":["+","-","*","/"].includes(e)?o="number":["=","!=","<",">","<=",">="].includes(e)&&(r===du?o="string":r===hu?o="number":r===fu?o="date":r===pu&&(o="boolean"))}const s=[];"any"!==o&&"string"!==o||s.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),"any"!==o&&"number"!==o||s.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),"any"!==o&&"date"!==o||s.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),"any"!==o&&"boolean"!==o||(s.push({type:"value",value:"true",displayText:"true",description:"참"}),s.push({type:"value",value:"false",displayText:"false",description:"거짓"})),a=[...s,...n];break}default:a=[...n]}let s=a;return r&&!["after_column","after_value","after_arithmetic_expr","after_postfix_op"].includes(e.contextState)&&(s=a.filter(e=>{const t=e.value.toLowerCase(),n=e.displayText.toLowerCase(),i=(e.description||"").toLowerCase();if("column"===e.type){const n=e.displayText,a=n.toLowerCase().includes(r)||t.includes(r)||!!i&&i.includes(r);let s=!1;if(o){const e=Su(n);e&&(s=e.startsWith(o)||e.includes(o))}return a||s}return t.includes(r)||n.includes(r)||!!i&&i.includes(r)})),0===s.length?[...n,{type:"logical",value:"NOT",displayText:"NOT",description:"부정"}]:s}function Ru(e){const[t,n]=s.useState({contextState:"start",currentToken:"",tokenStartPosition:0,currentFullText:""}),i=s.useRef(t);i.current=t;const r=s.useCallback((t,i)=>{const r=function(e,t,n){const i=e.substring(0,t),r=Iu(e.substring(0,Math.min(t+1,e.length)),t,0,n);return{contextState:ku(i,t,e,n),currentToken:r.token,tokenStartPosition:r.startPosition,currentFullText:i}}(t,i,e);n(r)},[e]),o=s.useCallback((e,t,n)=>function(e,t,n,i){if("in_column"===i.contextState){const i=t.lastIndexOf("[");if(-1!==i){const r=t.substring(n),o=r.startsWith("]");let a=e.value;e.insertText&&e.insertText.startsWith("[")&&e.insertText.endsWith("]")&&(a=e.insertText.substring(1,e.insertText.length-1));const s=t.substring(0,i+1);return{newText:`${s+a}]${o?r.substring(1):r}`,newCursorPosition:s.length+a.length+1}}}if("start"===i.contextState&&"column"===e.type){const i=e.insertText||`[${e.value}]`,r=t.substring(0,n),o=r.lastIndexOf("\n"),a=-1===o?0:o+1,s=r.substring(a).toUpperCase(),l=s.lastIndexOf(" AND "),u=s.lastIndexOf(" OR "),c=s.lastIndexOf(" NOT "),d=Math.max(l,u,c);let h=a;-1!==d&&(h=a+d+(d===l?" AND ":d===u?" OR ":" NOT ").length);const p=t.substring(0,h),f=t.substring(n),g=f.length>0&&!f.startsWith(" ");return{newText:p+i+(g?" ":"")+f,newCursorPosition:p.length+i.length+(g?1:0)}}const r=e.insertText||e.value,o=(i.currentToken||"").trim(),a=mu.has(o)||gu.has(o)||["!=","<=",">="].includes(o),s=["after_comparison_op","after_operator","in_value","after_arithmetic_op","after_string_op"].includes(i.contextState)&&a&&("column"===e.type||"value"===e.type);let l=i.tokenStartPosition;s&&(l=i.tokenStartPosition+i.currentToken.length);const u=t.substring(0,l),c=s?t.substring(l):t.substring(n),d=c.length>0&&!c.startsWith(" "),h=u+r+(d?" ":"")+c;let p=u.length+r.length+(d?1:0);if("value"===e.type){const t=e.insertText??e.value;('""'===t||"string"==typeof t&&t.length>=2&&t.startsWith("#")&&t.endsWith("#"))&&(p=u.length+1)}return{newText:h,newCursorPosition:p}}(e,t,n,i.current),[]),a=s.useMemo(()=>Ou(t,e),[t,e]);return{contextState:t.contextState,currentToken:t.currentToken,suggestions:a,analyzeContext:r,getInsertText:o}}const Fu=new Set(["!=","<=",">=","=","<",">"]),zu=new Set(["+","-","*","/"]),Vu=new Set(["AND","OR","NOT"]),Bu=new Set(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"]),ju=new Set(["IS_EMPTY","IS_NOT_EMPTY"]);function Gu(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Wu(e){if(!e)return"";const t=function(e){const t=[];let n=0;for(;n<e.length;){const i=e[n];if(/\s/.test(i)){let i="";for(;n<e.length&&/\s/.test(e[n]);)i+=e[n],n++;t.push({type:"text",value:i});continue}if("["===i){let i="[";for(n++;n<e.length&&"]"!==e[n];)i+=e[n],n++;n<e.length&&(i+="]",n++),t.push({type:"column",value:i});continue}if('"'===i||"'"===i){const r=i;let o=r;for(n++;n<e.length&&e[n]!==r;)"\\"===e[n]&&n+1<e.length?(o+=e[n]+e[n+1],n+=2):(o+=e[n],n++);n<e.length&&(o+=r,n++),t.push({type:"string",value:o});continue}if("#"===i){let i="#";for(n++;n<e.length&&"#"!==e[n];)i+=e[n],n++;n<e.length&&(i+="#",n++),t.push({type:"date",value:i});continue}if("("!==i&&")"!==i){if(n+1<e.length){const i=e.substring(n,n+2);if(Fu.has(i)){t.push({type:"comparison",value:i}),n+=2;continue}}if(zu.has(i))t.push({type:"arithmetic",value:i}),n++;else if(Fu.has(i))t.push({type:"comparison",value:i}),n++;else{if(/[a-zA-Z0-9_\-.]/.test(i)){let i="";for(;n<e.length&&/[a-zA-Z0-9_\-.]/.test(e[n]);)i+=e[n],n++;const r=i.toUpperCase();Vu.has(r)?t.push({type:"logical",value:i}):Bu.has(r)?t.push({type:"stringOp",value:i}):ju.has(r)?t.push({type:"postfixOp",value:i}):"TRUE"===r||"FALSE"===r?t.push({type:"boolean",value:i}):/^-?\d+(\.\d+)?$/.test(i)?t.push({type:"number",value:i}):t.push({type:"text",value:i});continue}t.push({type:"text",value:i}),n++}}else t.push({type:"paren",value:i}),n++}return t}(e);let n="";for(const i of t){const e=Gu(i.value);switch(i.type){case"column":n+=`<span class="hl-column">${e}</span>`;break;case"number":n+=`<span class="hl-number">${e}</span>`;break;case"string":n+=`<span class="hl-string">${e}</span>`;break;case"date":n+=`<span class="hl-date">${e}</span>`;break;case"boolean":n+=`<span class="hl-boolean">${e}</span>`;break;case"logical":n+=`<span class="hl-logical">${e}</span>`;break;case"comparison":n+=`<span class="hl-comparison">${e}</span>`;break;case"arithmetic":n+=`<span class="hl-arithmetic">${e}</span>`;break;case"stringOp":n+=`<span class="hl-string-op">${e}</span>`;break;case"postfixOp":n+=`<span class="hl-postfix-op">${e}</span>`;break;case"paren":n+=`<span class="hl-paren">${e}</span>`;break;default:n+=e}}return`${n}\n`}const Hu={start:"컬럼 선택",in_column:"컬럼 선택",after_column:"연산자 선택",in_operator:"연산자 선택",after_arithmetic_op:"숫자/컬럼 입력",after_comparison_op:"값/컬럼 입력",after_string_op:"문자열 입력",after_postfix_op:"논리 연산자",after_arithmetic_expr:"연산자 선택",after_operator:"값 입력",in_value:"값 입력 중",after_value:"논리 연산자"};const Uu=s.forwardRef(function({value:e,onChange:t,onBlur:n,columns:i,placeholder:r='예: [컬럼명] > 100 AND [컬럼명2] = "텍스트"',hasError:o=!1,rows:l=3,disabled:u=!1,showSuggestionsOnFocus:d=!0},h){const p=s.useRef(null),f=s.useRef(null),g=s.useRef(null),m=s.useRef(null),v=s.useRef(null),[y,x]=s.useState(!1),[_,b]=s.useState(!1),[w,C]=s.useState(0),[S,M]=s.useState({top:0,left:0}),[T,I]=s.useState(!1),[D,k]=s.useState(""),A=s.useRef(!1),E=s.useRef(0);s.useImperativeHandle(h,()=>({focus:()=>{var e;return null==(e=f.current)?void 0:e.focus()}}),[]);const{contextState:N,currentToken:L,suggestions:P,analyzeContext:O,getInsertText:R}=Ru(i),F=s.useRef(P);F.current=P;const z=s.useRef(w);z.current=w;const V=s.useRef(_);V.current=_;const B=s.useMemo(()=>Wu(T?D:e||""),[e,T,D]),j=s.useCallback(()=>{if(!f.current)return;const e=f.current.getBoundingClientRect(),t=function(e){const t=e.selectionStart,n=document.createElement("div"),i=getComputedStyle(e),r=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent","whiteSpace","wordWrap","wordBreak","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","border","borderWidth","boxSizing"];for(const u of r)n.style[u]=i[u];n.style.position="absolute",n.style.visibility="hidden",n.style.width=`${e.clientWidth}px`,n.style.height="auto",n.style.overflow="hidden";const o=e.value.substring(0,t);n.textContent=o;const a=document.createElement("span");a.textContent="|",n.appendChild(a),document.body.appendChild(n);const s=a.getBoundingClientRect(),l=n.getBoundingClientRect();return document.body.removeChild(n),{top:s.top-l.top-e.scrollTop,left:s.left-l.left-e.scrollLeft}}(f.current);let n=e.top+t.top+20,i=e.left+t.left;const r=window.innerHeight,o=window.innerWidth;n+300>r&&(n=e.top+t.top-300-5),i+350>o&&(i=o-350-10),n=Math.max(10,n),i=Math.max(10,i),M({top:n,left:i})},[]),G=s.useCallback(()=>{if(!f.current)return;const t=f.current.selectionStart;E.current=t,O(e||"",t),C(0),requestAnimationFrame(()=>{j(),b(F.current.length>0)})},[O,e,j]),W=s.useCallback(()=>{f.current&&g.current&&(g.current.scrollTop=f.current.scrollTop,g.current.scrollLeft=f.current.scrollLeft)},[]),H=s.useCallback(n=>{if(!f.current)return;const{newText:i,newCursorPosition:r}=R(n,e,E.current);t(i),b(!1),requestAnimationFrame(()=>{f.current&&(A.current=!0,f.current.focus(),f.current.setSelectionRange(r,r),E.current=r)})},[R,t,e]),U=s.useCallback(n=>{if(!f.current)return;const i=f.current,r=i.selectionStart,o=i.selectionEnd,a=e;if("["===n.key&&!n.ctrlKey&&!n.metaKey&&!n.altKey){n.preventDefault();const e=a.substring(0,r),s=a.substring(o);if(s.startsWith("]"))return void requestAnimationFrame(()=>{i.focus(),i.setSelectionRange(r+1,r+1),E.current=r+1});const l=`${e}[]${s}`;return t(l),void requestAnimationFrame(()=>{i.focus(),i.setSelectionRange(r+1,r+1),E.current=r+1,O(l,r+1)})}if(!('"'!==n.key&&"'"!==n.key||n.ctrlKey||n.metaKey||n.altKey)){n.preventDefault();const e=n.key,s=a.substring(0,r),l=a.substring(o);if(l.startsWith(e))return void requestAnimationFrame(()=>{i.focus(),i.setSelectionRange(r+1,r+1),E.current=r+1});const u=s+e+e+l;return t(u),void requestAnimationFrame(()=>{i.focus(),i.setSelectionRange(r+1,r+1),E.current=r+1,O(u,r+1)})}if("Space"!==n.code||n.ctrlKey||n.metaKey||n.altKey||requestAnimationFrame(()=>{if(!f.current)return;const t=f.current.selectionStart;E.current=t,O(e||"",t),C(0),V.current?j():G()}),V.current&&0!==F.current.length)switch(n.key){case"ArrowDown":n.preventDefault(),C(e=>(e+1)%F.current.length);break;case"ArrowUp":n.preventDefault(),C(e=>(e-1+F.current.length)%F.current.length);break;case"Enter":case"Tab":F.current.length>0&&(n.preventDefault(),H(F.current[z.current]));break;case"Escape":n.preventDefault(),n.stopPropagation(),b(!1)}else n.ctrlKey&&"Space"===n.code&&(n.preventDefault(),G())},[e,O,t,G,H,j]);s.useEffect(()=>{if(!v.current)return;const e=v.current.children[w];e&&e.scrollIntoView({block:"nearest"})},[w]);const Y=s.useCallback(()=>{if(!f.current)return;const e=f.current.value;t(e),T&&k(e),E.current=f.current.selectionStart,O(e,E.current),C(0),V.current?j():d&&G()},[O,T,t,G,d,j]),Z=s.useCallback(()=>{if(x(!0),!f.current)return;const t=f.current.selectionStart;E.current=t,O(e||"",t),C(0),A.current?A.current=!1:d&&G()},[O,G,d,e]),X=s.useCallback(()=>{x(!1),setTimeout(()=>b(!1),150),null==n||n()},[n]),q=s.useCallback(()=>{if(!f.current)return;const t=f.current.selectionStart;t!==E.current&&(E.current=t,O(e||"",t)),d?G():V.current&&(C(0),requestAnimationFrame(()=>j()))},[O,G,d,j,e]),$=s.useCallback(()=>{V.current&&requestAnimationFrame(()=>j()),W()},[W,j]),K=s.useCallback(()=>{I(!0),f.current&&k(f.current.value)},[]),J=s.useCallback(()=>{if(!f.current)return;const e=f.current.value;k(e),E.current=f.current.selectionStart,O(e,E.current),d&&requestAnimationFrame(()=>{f.current&&(j(),b(F.current.length>0))})},[O,d,j]),Q=s.useCallback(()=>{I(!1),k(""),requestAnimationFrame(()=>{f.current&&(E.current=f.current.selectionStart,O(e,E.current))})},[O,e]);s.useEffect(()=>{if(!_)return;const e=e=>{var t,n;const i=e.target;(null==(t=p.current)?void 0:t.contains(i))||(null==(n=m.current)?void 0:n.contains(i))||b(!1)},t=()=>{V.current&&j()};return document.addEventListener("mousedown",e),window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[_,j]),s.useEffect(()=>{requestAnimationFrame(()=>W())},[e,W]);const ee=s.useCallback(e=>{const t=L.toLowerCase();if(!t)return[{text:e,highlight:!1}];const n=[],i=e.toLowerCase();let r=0,o=i.indexOf(t);for(;-1!==o;)o>r&&n.push({text:e.substring(r,o),highlight:!1}),n.push({text:e.substring(o,o+t.length),highlight:!0}),r=o+t.length,o=i.indexOf(t,r);return r<e.length&&n.push({text:e.substring(r),highlight:!1}),n.length>0?n:[{text:e,highlight:!1}]},[L]),te={position:"fixed",top:`${S.top}px`,left:`${S.left}px`,zIndex:9999};return a.jsxs("div",{ref:p,className:["formula-input-container",y?"is-focused":"",o?"is-invalid":""].filter(Boolean).join(" "),children:[a.jsxs("div",{className:"formula-input-wrapper",children:[a.jsx("div",{ref:g,className:["formula-highlight-overlay",u?"disabled":""].filter(Boolean).join(" "),dangerouslySetInnerHTML:{__html:B}}),a.jsx("textarea",{ref:f,className:"formula-textarea",value:e,placeholder:r,disabled:u,rows:l,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:()=>Y(),onKeyDown:U,onFocus:Z,onBlur:X,onScroll:$,onClick:q,onCompositionStart:K,onCompositionUpdate:J,onCompositionEnd:Q})]}),_&&P.length>0&&c.createPortal(a.jsxs("div",{ref:m,className:"formula-suggestions-dropdown",style:te,onPointerDown:e=>e.stopPropagation(),children:[a.jsx("div",{className:"suggestions-header",children:a.jsx("span",{className:["context-badge",N].join(" "),children:Hu[N]??""})}),a.jsx("div",{className:"suggestions-list",ref:v,children:P.map((e,t)=>a.jsxs("div",{className:["suggestion-item",t===w?"is-selected":"",`type-${e.type}`].filter(Boolean).join(" "),onMouseDown:t=>{t.preventDefault(),H(e)},onMouseEnter:()=>C(t),children:[a.jsx("span",{className:"suggestion-text",children:ee(e.displayText).map((e,t)=>a.jsx("span",{className:e.highlight?"highlight":"",children:e.text},t))}),e.description&&a.jsx("span",{className:"suggestion-description",children:e.description})]},e.value+t))}),a.jsxs("div",{className:"suggestions-footer",children:[a.jsx("span",{className:"hint",children:"↑↓ 탐색"}),a.jsx("span",{className:"hint",children:"Enter 선택"}),a.jsx("span",{className:"hint",children:"Esc 닫기"})]})]}),document.body)]})}),Yu=1,Zu=2,Xu=3,qu=4,$u=e=>{if("number"==typeof e)return e;switch(e){case"number":return Zu;case"boolean":return Xu;case"date":return qu;default:return Yu}},Ku=e=>"∅"===e||"●"===e,Ju=[{name:"red-light",hex:"#FFEBE1"},{name:"blue-light",hex:"#D8E8FB"},{name:"green-light",hex:"#D8FBE9"},{name:"yellow-light",hex:"#FCF5D0"},{name:"purple-light",hex:"#E5E1FF"}],Qu=[{name:"red",hex:"#F28270"},{name:"blue",hex:"#618FF9"},{name:"green",hex:"#229889"},{name:"yellow",hex:"#AC991B"},{name:"purple",hex:"#A768D6"}],ec=e=>Ju[e%Ju.length].hex,tc=e=>Qu[e%Qu.length].hex,nc=(e,t)=>{const n=e.replace("#","").trim();if(6!==n.length)return`rgba(69, 104, 224, ${t})`;return`rgba(${Number.parseInt(n.slice(0,2),16)}, ${Number.parseInt(n.slice(2,4),16)}, ${Number.parseInt(n.slice(4,6),16)}, ${t})`},ic=e=>{var t,n;const i=null==(t=e.getFields)?void 0:t.call(e);if(i&&i.length>0)return i;const r=null==(n=e.getPivotFields)?void 0:n.call(e);return r?[...r.rowFields,...r.columnFields,...r.valueFields,...r.filterFields]:[]};function rc({visible:e,onVisibleChange:t,dateFormat:n="YYYY-MM-DD"}){const i=_(),r=Y(),o=ya(),[l,u]=s.useState([]),[p,f]=s.useState([]),[g,m]=s.useState([]),[v,y]=s.useState(!1),[x,b]=s.useState(null),w=s.useRef(new Map),C=s.useRef(new Map),S=s.useRef(new ka),M=s.useRef(0),T=()=>(M.current+=1,`rule-set-${Date.now()}-${M.current}`),I=s.useCallback((e,t)=>{const n=`${t}-color`;e?C.current.set(n,e):C.current.delete(n)},[]),D=s.useMemo(()=>({"=":i.Grid.symbolEqual,"≠":i.Grid.symbolNotEqual,"%":i.Grid.symbolContains,"!%":i.Grid.symbolNotContains,"<":i.Grid.symbolLessThan,">":i.Grid.symbolGreaterThan,"≤":i.Grid.symbolLessOrEqual,"≥":i.Grid.symbolGreaterOrEqual,"∅":i.Grid.symbolEmpty,"●":i.Grid.symbolNotEmpty}),[i]),k=e=>e.map(e=>({symbol:e,desc:D[e]})),A=s.useMemo(()=>k(["%","!%","=","≠","∅","●"]),[D]),E=s.useMemo(()=>k(["=","≠","<",">","≤","≥","∅","●"]),[D]),N=s.useMemo(()=>k(["=","≠","∅","●"]),[D]),L=[{key:"AND",value:"AND"},{key:"OR",value:"OR"}],P=e=>{switch(e){case Yu:return A[0];case Zu:case qu:return E[0];case Xu:return N[0];default:return A[0]}},O=(e,t)=>{return{sequence:e,header:t.header,binding:t.binding,logical:"AND",comparison:(n=t.dataType,n===Yu?"%":"="),comparisonObj:P(t.dataType),type:t.dataType,variable:null};var n},R=s.useCallback(()=>{if(r)try{const e=ic(r),t={string:1,number:2,boolean:3,date:4};S.current.setColumns(e.map(e=>({header:e.header??e.id,binding:e.id,dataType:t[e.dataType]??1})))}catch{}},[r]),F=s.useCallback(e=>(R(),S.current.validate(e)),[R]),z=s.useCallback(()=>{if(!r)return{cols:[],info:[]};try{const e=ic(r).map(e=>({header:e.header??e.id,binding:e.id,dataType:$u(e.dataType)})),t=e.map(e=>"_RID"===e.binding?{header:"",binding:""}:{header:e.header,binding:e.binding}).filter(e=>e.header.length>0);return{cols:e,info:t}}catch{return{cols:[],info:[]}}},[r]),V=e=>e.map(e=>e.binding).filter(Boolean),B=s.useCallback(e=>{if(!o)return;const t=e.map(e=>({id:e.id,name:e.name,priority:e.priority,mode:e.mode,formula:e.formula,formulaError:e.formulaError,backgroundColor:e.backgroundColor,textColor:e.textColor,targetColumns:e.targetColumns??[],enabled:e.enabled??!0,rules:e.rules.map(e=>({sequence:e.sequence,header:e.header,binding:e.binding,logical:e.logical,comparison:e.comparison,type:e.type,variable:e.variable}))}));o.setCustomCell({ruleSets:t})},[o]),j=s.useMemo(()=>h.debounce(e=>B(e),100),[B]),G=s.useCallback(e=>{v&&j(e)},[v,j]),W=s.useCallback(e=>{m(t=>{const n=e(t);return G(n),n})},[G]),H=s.useCallback(()=>{if(l.length>0)return{cols:l,info:p};const e=z();return e.info.length>0&&(u(e.cols),f(e.info)),e},[l,p,z]),U=()=>{const{cols:e,info:t}=H(),n=(null==o?void 0:o.hitColumn)?{header:o.hitColumn.header??o.hitColumn.id,binding:o.hitColumn.id,dataType:$u(o.hitColumn.dataType)}:e[0];n&&m(e=>{const r=e.length,o={id:T(),name:`${i.Grid.formulaConditionSet} (${r+1})`,priority:r,mode:"formula",rules:[O(0,n)],formula:"",formulaError:"",backgroundColor:ec(r),textColor:tc(r),targetColumns:V(t),enabled:!0},a=[...e,o];return G(a),a})},Z=(e,t)=>{m(n=>{const i="up"===t?e-1:e+1;if(i<0||i>=n.length)return n;const r=[...n];return[r[e],r[i]]=[r[i],r[e]],r.forEach((e,t)=>{e.priority=t}),G(r),r})},X=(e,t,n)=>{W(i=>i.map((i,r)=>{if(r!==e)return i;const o=i.rules.map((e,i)=>i===t?{...e,...n}:e);return{...i,rules:o}}))},q=(e,t)=>{W(n=>n.map((n,i)=>i===e?{...n,...t}:n))},$=s.useMemo(()=>h.debounce(e=>{m(t=>{const n=t[e];if(!n)return t;let i="";if(n.formula&&n.formula.trim().length>0){const e=F(n.formula);e.success||(i=e.error||"유효하지 않은 수식")}if(n.formulaError===i)return t;const r=t.map((t,n)=>n===e?{...t,formulaError:i}:t);return G(r),r})},150),[F,G]),K=(e,t)=>("background"===t?Ju:Qu).some(t=>t.hex.toLowerCase()===e.toLowerCase()),Q=(e,t,n)=>{const i=g[e];if(!i)return!1;return(("background"===t?i.backgroundColor:i.textColor)||"").toLowerCase()===n.toLowerCase()},ee=(e,t)=>{const n=g[e];return n&&("background"===t?n.backgroundColor:n.textColor)||""},te=(e,t)=>{const n=ee(e,t);return!!n&&!K(n,t)},ne=(e,t)=>{const n=`${e}-${t}`;return w.current.has(n)?w.current.get(n):"background"===t?"#4568e0":"#e2e7fa"},ie=(e,t)=>"text"===e?nc(t,.5):(e=>{const t=Ju.findIndex(t=>t.hex.toLowerCase()===e.toLowerCase());if(t<0)return nc(e,.5);const n=Qu[t%Qu.length].hex;return nc(n,.5)})(t),re=(e,t,n)=>{if(Q(e,t,n))return{borderColor:ie(t,n),borderWidth:"2px"}},oe=(e,t)=>{if(te(e,t))return{borderColor:ie(t,ee(e,t)),borderWidth:"2px"}},ae=(e,t,n)=>{q(e,"background"===t?{backgroundColor:n}:{textColor:n})},se=(e,t,n)=>{w.current.set(`${e}-${t}`,n),q(e,"background"===t?{backgroundColor:n}:{textColor:n})},le=s.useMemo(()=>l.filter(e=>e.binding&&"_RID"!==e.binding),[l]),ue=s.useMemo(()=>{if(!x)return{};const e=`${x.setIndex}-color`,t=C.current.get(e);if(!t)return{};const n=t.getBoundingClientRect();return{position:"fixed",top:`${n.bottom+4}px`,left:`${n.left}px`,zIndex:10001}},[x]),ce=()=>{if(null==o||o.setCustomCell({ruleSets:[]}),l.length>0){const e=V(p),t={id:T(),name:`${i.Grid.formulaConditionSet} (1)`,priority:0,mode:"formula",rules:[O(0,l[0])],formula:"",formulaError:"",backgroundColor:ec(0),textColor:tc(0),targetColumns:e,enabled:!0};m([t])}};s.useEffect(()=>{if(!e||!r||!o)return;(()=>{const{cols:e,info:t}=z();if(0===t.length)return!1;u(e),f(t);const n=r.select;if(n)try{const e=n(e=>e.totalRowCount??0).getSnapshot();y(e<1e5)}catch{}const a=o.getCustomCell();if(a&&a.ruleSets.length>0){const e=a.ruleSets.map(e=>{const n=e.rules.map(e=>{const t={...e};return t.type!==qu||t.dummy||(t.dummy=d(t.variable)),(e=>{let t;switch(e.type){case Yu:t=A.find(t=>t.symbol===e.comparison);break;case Zu:t=E.find(t=>t.symbol===e.comparison);break;case Xu:t=N.find(t=>t.symbol===e.comparison);break;default:t=A.find(t=>t.symbol===e.comparison)}return{...e,comparisonObj:t??P(e.type)}})(t)});return{...e,name:e.name??"",rules:n,mode:e.mode||"formula",formula:e.formula||"",formulaError:"",targetColumns:e.targetColumns&&e.targetColumns.length>0?e.targetColumns:V(t)}});m(e),a.ruleSets.forEach((e,t)=>{e.backgroundColor&&!K(e.backgroundColor,"background")&&w.current.set(`${t}-background`,e.backgroundColor),e.textColor&&!K(e.textColor,"text")&&w.current.set(`${t}-text`,e.textColor)})}else{const n=o.hitColumn?{header:o.hitColumn.header??o.hitColumn.id,binding:o.hitColumn.id,dataType:$u(o.hitColumn.dataType)}:e[0];if(n){const e=V(t);m([{id:T(),name:`${i.Grid.formulaConditionSet} (1)`,priority:0,mode:"formula",rules:[O(0,n)],formula:"",formulaError:"",backgroundColor:ec(0),textColor:tc(0),targetColumns:e,enabled:!0}])}}})()},[e]);const de=s.useCallback(()=>{const e=(e=>{const t=e.filter(e=>"formula"===e.mode?!(!e.formula||!e.formula.trim()):(e.rules=e.rules.filter(e=>{if(Ku(e.comparison))return!0;const t=e.variable;return null!=t&&""!==t}),e.rules.length>0));return t.forEach((e,t)=>{e.priority=t}),t})([...g]);B(e),t(!1)},[g,B,t]);return s.useEffect(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&e.stopPropagation()};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]),a.jsxs(a.Fragment,{children:[a.jsx(Zn,{visible:e,onVisibleChange:e=>e?t(!0):de(),title:i.Grid.customCellStyle,width:561,height:720,resizeable:!1,preset:"no-footer",className:"moz-r-custom-cell-popup",footerSlot:()=>a.jsxs("div",{className:"moz-custom-cell-footer",children:[a.jsx(la,{checked:v,onChange:e=>{y(e),e&&B(g)},label:i.Grid.immediateApply??"바로 적용"}),a.jsxs("div",{className:"add-row",children:[a.jsxs("div",{className:"reset-all-rule-button",onClick:ce,children:[a.jsx(_e,{size:"12",color:"#4568e0"}),a.jsx("div",{children:i.Grid.resetCustomCell})]}),a.jsxs("div",{className:"add-rule-group-button",onClick:U,children:[a.jsx(pe,{size:"12",color:"#4568e0"}),a.jsx("div",{children:i.Grid.addFormulaConditionSet})]})]})]}),children:a.jsx("div",{className:"moz-custom-cell-wrapper",children:a.jsx("div",{className:"rule-sets-container",children:g.map((e,r)=>a.jsxs("div",{className:"rule-set-section",children:[a.jsxs("div",{className:"rule-set-header",children:[a.jsxs("div",{className:"rule-set-title",children:[a.jsx("span",{className:"priority-badge",children:r+1}),a.jsx(Zo,{value:e.name,onChange:e=>q(r,{name:e}),placeholder:i.Grid.customCellRuleNamePlaceholder,width:"100%"})]}),a.jsx("div",{className:"rule-set-divider"}),a.jsxs("div",{className:"rule-set-actions",children:[a.jsx(J,{type:"text",disabled:0===r,onClick:()=>Z(r,"up"),children:a.jsx(ve,{size:"12",color:0===r?"#d3d5e5":"#8998B5"})}),a.jsx(J,{type:"text",disabled:r===g.length-1,onClick:()=>Z(r,"down"),children:a.jsx(ye,{size:"12",color:r===g.length-1?"#d3d5e5":"#8998B5"})}),a.jsx(J,{type:"text",onClick:()=>(e=>{m(n=>{const i=n.filter((t,n)=>n!==e);return 0===i.length?(null==o||o.setCustomCell({ruleSets:[]}),setTimeout(()=>t(!1),0),[]):(i.forEach((e,t)=>{e.priority=t}),G(i),i)})})(r),children:a.jsx(he,{size:"12",color:"#8998B5"})})]})]}),a.jsxs("div",{className:"rule-set-content",children:["formula"===e.mode?a.jsxs("div",{className:"formula-section",children:[a.jsxs("div",{className:"formula-input-wrapper",children:[a.jsx(Uu,{value:e.formula??"",onChange:e=>((e,t)=>{q(e,{formula:t}),$(e)})(r,e),columns:le,hasError:!!e.formulaError,placeholder:"예: [수요수량] > [재고수량] AND [우선순위] < 3",rows:3}),a.jsx("div",{className:"formula-validation-slot",children:e.formulaError?a.jsx("div",{className:"formula-error",children:e.formulaError}):e.formula&&e.formula.trim()?a.jsxs("div",{className:"formula-valid",children:[a.jsx("div",{className:"decide-icon",children:a.jsx(Se,{})}),a.jsx("span",{children:"유효한 수식"})]}):a.jsx("div",{className:"formula-hint",children:"컬럼을 선택하거나 값을 입력해 수식을 작성하세요."})})]}),a.jsxs("div",{className:"formula-help",children:[a.jsxs("div",{className:"formula-help-title",children:[a.jsx(we,{size:"12"}),a.jsx("div",{children:"수식 도움말"})]}),a.jsx("div",{className:"formula-help-content",children:[["컬럼 참조","[컬럼명]"],["비교","=, !=, <, >, <=, >="],["산술","+, -, *, /"],["논리","AND, OR, NOT"],["문자열","CONTAINS, STARTS_WITH, ENDS_WITH"],["NULL 체크","IS_EMPTY, IS_NOT_EMPTY"],["값",'"문자열", 123, #2025-01-01#']].map(([e,t])=>a.jsxs("div",{className:"formula-help-item",children:[a.jsx("span",{className:"formula-help-label",children:e}),a.jsx("code",{children:t})]},e))})]})]}):a.jsxs("div",{className:"rules-section",children:[e.rules.map((t,i)=>a.jsxs("div",{className:["moz-custom-cell-row",e.rules.length<=1?"minify-width":""].filter(Boolean).join(" "),children:[0!==i?a.jsx(Ho,{value:t.logical,onChange:e=>X(r,i,{logical:e}),itemsSource:L,keyProp:"key",displayProp:"value",width:"100%"}):e.rules.length>1&&a.jsx("div",{className:"spacer"}),a.jsx(Ho,{value:t.header,onChange:(e,t)=>((e,t,n)=>{const i=l.find(e=>e.header===n);if(!i)return;const r=P(i.dataType);X(e,t,{header:n,binding:i.binding,type:i.dataType,variable:null,comparison:r.symbol,comparisonObj:r})})(r,i,(null==t?void 0:t.header)??""),itemsSource:p,keyProp:"header",displayProp:"header",width:"100%"}),a.jsx(Ho,{value:t.comparisonObj,onChange:(e,t)=>((e,t,n)=>{X(e,t,{comparison:n.symbol,comparisonObj:n})})(r,i,t),itemsSource:t.type===Zu||t.type===qu?E:t.type===Xu?N:A,keyProp:"symbol",displayProp:"symbol",useObjBinding:!0,useFilter:!1,listWidth:172,width:"100%"}),t.type===Zu?a.jsx(qo,{value:Number(t.variable??0),onChange:e=>X(r,i,{variable:e}),disabled:Ku(t.comparison),step:1,nullable:!0,width:0===i&&e.rules.length<=1?"256px":"173px"}):t.type===Xu?a.jsx(Ho,{value:t.variable,onChange:e=>X(r,i,{variable:e}),itemsSource:[{key:!0,value:"TRUE"},{key:!1,value:"FALSE"}],displayProp:"value",keyProp:"key",disabled:Ku(t.comparison),width:0===i&&e.rules.length<=1?"256px":"173px"}):t.type===qu?a.jsx(ta,{value:t.variable?d(t.variable):null,onChange:e=>X(r,i,{variable:e?d(e).format("YYYY-MM-DD"):null}),disabled:Ku(t.comparison),format:n,width:0===i&&e.rules.length<=1?"256px":"173px"}):a.jsx(Zo,{value:String(t.variable??""),onChange:e=>X(r,i,{variable:e}),disabled:Ku(t.comparison),width:0===i&&e.rules.length<=1?"256px":"173px"}),a.jsx("span",{className:"remove-row",tabIndex:0,onClick:()=>((e,t)=>{m(n=>{const i=n[e];if(!i)return n;const r=i.rules.filter((e,n)=>n!==t);if(0===r.length){if(n.length>1){const t=n.filter((t,n)=>n!==e);return t.forEach((e,t)=>{e.priority=t}),G(t),t}return n}const o=n.map((t,n)=>n===e?{...t,rules:r}:t);return G(o),o})})(r,i),children:a.jsx(he,{})})]},t.sequence)),a.jsxs("div",{className:"add-rule-button",onClick:()=>(e=>{const{cols:t}=H(),n=(null==o?void 0:o.hitColumn)?{header:o.hitColumn.header??o.hitColumn.id,binding:o.hitColumn.id,dataType:$u(o.hitColumn.dataType)}:t[0];n&&W(t=>t.map((t,i)=>{if(i!==e)return t;const r=t.rules.length>0?t.rules[t.rules.length-1].sequence+1:0;return{...t,rules:[...t.rules,O(r,n)]}}))})(r),children:[a.jsx(pe,{size:"12",color:"#4568e0"}),a.jsx("span",{children:i.Grid.addFormulaCondition})]})]}),a.jsxs("div",{className:"rule-set-styling",children:[a.jsxs("div",{className:"color-section-row",children:[a.jsx("div",{className:"color-section-row-label",children:"적용 컬럼"}),a.jsx(lu,{value:e.targetColumns??[],onChange:e=>q(r,{targetColumns:e}),itemsSource:p,keyProp:"binding",displayProp:"header",useFilter:!0,useSelectAll:!0,width:"100%",onClose:()=>{e.targetColumns&&0!==e.targetColumns.length||q(r,{targetColumns:V(p)})}})]}),a.jsxs("div",{className:"color-pickers",children:[a.jsx("div",{className:"color-picker-item-divider"}),a.jsxs("div",{className:"color-picker-item",children:[a.jsx("span",{children:"색상"}),a.jsx("div",{className:"color-picker-dropdown-wrapper",children:a.jsx("div",{className:"color-preview-trigger color-combined-trigger",ref:e=>I(e,r),style:{backgroundColor:e.backgroundColor},onClick:()=>(e=>{b(t=>(null==t?void 0:t.setIndex)===e?null:{setIndex:e})})(r),children:a.jsx("span",{className:"color-combined-trigger-a",style:{color:e.textColor},children:"A"})})})]})]})]})]})]},e.id))})})}),e&&null!==x&&c.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"color-dropdown-overlay",onClick:()=>b(null)}),a.jsxs("div",{className:"color-dropdown-teleport",style:ue,children:[a.jsxs("div",{className:"color-dropdown-section",children:[a.jsx("div",{className:"color-dropdown-title",children:"텍스트 색상"}),a.jsxs("div",{className:"color-default-presets",children:[Qu.map(e=>{const t=Q(x.setIndex,"text",e.hex);return a.jsx("div",{className:["color-option",t?"selected-color":""].filter(Boolean).join(" "),onClick:()=>ae(x.setIndex,"text",e.hex),children:a.jsx("div",{className:"color-swatch color-swatch-text",style:{color:e.hex,"--border-color":ie("text",e.hex),...re(x.setIndex,"text",e.hex)??{}},children:"A"})},e.name)}),a.jsxs("label",{className:["color-option","color-custom-swatch",te(x.setIndex,"text")?"selected-color":""].filter(Boolean).join(" "),onClick:e=>e.stopPropagation(),children:[a.jsx("input",{type:"color",className:"color-custom-input",value:ne(x.setIndex,"text"),onChange:e=>se(x.setIndex,"text",e.target.value)}),a.jsx("div",{className:"color-swatch color-swatch-custom",style:oe(x.setIndex,"text"),children:a.jsx(Ce,{color:te(x.setIndex,"text")?void 0:"#8998B5"})})]})]})]}),a.jsxs("div",{className:"color-dropdown-section",children:[a.jsx("div",{className:"color-dropdown-title",children:"배경 색상"}),a.jsxs("div",{className:"color-default-presets",children:[Ju.map(e=>{const t=Q(x.setIndex,"background",e.hex);return a.jsx("div",{className:["color-option",t?"selected-color":""].filter(Boolean).join(" "),onClick:()=>ae(x.setIndex,"background",e.hex),children:a.jsx("div",{className:"color-swatch",style:{backgroundColor:e.hex,"--border-color":ie("background",e.hex),...re(x.setIndex,"background",e.hex)??{}}})},e.name)}),a.jsxs("label",{className:["color-option","color-custom-swatch",te(x.setIndex,"background")?"selected-color":""].filter(Boolean).join(" "),onClick:e=>e.stopPropagation(),children:[a.jsx("input",{type:"color",className:"color-custom-input",value:ne(x.setIndex,"background"),onChange:e=>se(x.setIndex,"background",e.target.value)}),a.jsx("div",{className:"color-swatch color-swatch-custom",style:oe(x.setIndex,"background"),children:a.jsx(Ce,{color:te(x.setIndex,"background")?void 0:"#8998B5"})})]})]})]})]})]}),document.body)]})}const oc=s.forwardRef(function(e,t){var n;const{useToolBox:i=!0,useToolBoxSetting:r=!0,useExtendFooter:o=!0,useSort:l=!0,useCustomCell:u=!0,useContextMenu:c=!0,contextMenuConfig:d,loading:h=!1,emptyState:p,keyFields:f,onReady:g,...m}=e,[v,y]=s.useState(!0),[x,_]=s.useState(o),[b,w]=s.useState(!1),[C,S]=s.useState(!1),[M,T]=s.useState(!1),[I,D]=s.useState(null),k=s.useRef(null),A=Aa(),E=s.useCallback(e=>{D(e),null==g||g(e)},[g]),N=s.useCallback(()=>S(!0),[]),P=s.useCallback(()=>w(e=>!e),[]),O=s.useCallback(e=>{T(!0)},[]);return a.jsx(L.Provider,{value:I,children:a.jsx(V.Provider,{value:A,children:a.jsxs("div",{className:"moz-r-grid",children:[i&&a.jsx(xa,{useToolBoxSetting:r,useSort:l,useCustomCell:u,itemsLength:(null==(n=m.data)?void 0:n.length)??0,expanded:v,onExpandedChange:y,toolbarVisible:v,footerVisible:x,groupPanelVisible:b,onToolbarVisibleChange:y,onFooterVisibleChange:_,onGroupPanelVisibleChange:w,onClickColumnPicker:N,toolBottom:a.jsx(ru,{visible:b})}),a.jsxs("div",{className:"moz-r-grid__body",children:[a.jsx(q,{...m,keyFields:f,onReady:E,ref:t,children:c&&a.jsx(tu,{ref:k,config:d,onOpenFilter:O,onOpenColumnPicker:N,onToggleGroupPanel:P})}),p&&a.jsx("div",{className:"moz-r-grid__empty-overlay",children:a.jsx(su,{isCustomState:p.isCustomState,headerMsg:p.headerMsg,contentMsg:p.contentMsg,useImg:p.useImg??!0,selectImg:p.selectImg})})]}),o&&x&&a.jsx(Fa,{}),a.jsx(_a,{visible:C,onVisibleChange:S,keyFields:f}),a.jsx(ca,{visible:M,onVisibleChange:T}),u&&a.jsx(rc,{visible:A.showCustomCell,onVisibleChange:e=>e?A.showCustomCellHandler():A.hideCustomCellHandler()})]})})})});oc.displayName="MozGridReact";const ac=new class{constructor(){i(this,"listeners",new Set)}emit(e){this.listeners.forEach(t=>t(e))}on(e){return this.listeners.add(e),()=>this.listeners.delete(e)}};function sc({groupSize:e,panelElement:t,styleProp:n}){let i;const[r,o]=function(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}(n);switch(o){case"%":i=r/100*e;break;case"px":i=r;break;case"rem":i=function(e,t){const n=getComputedStyle(e.ownerDocument.body);return t*parseFloat(n.fontSize)}(t,r);break;case"em":i=function(e,t){const n=getComputedStyle(e);return t*parseFloat(n.fontSize)}(t,r);break;case"vh":i=function(e){return e/100*window.innerHeight}(r);break;case"vw":i=function(e){return e/100*window.innerWidth}(r)}return i}function lc(e){return parseFloat(e.toFixed(3))}function uc({group:e}){const{orientation:t,panels:n}=e;return n.reduce((e,n)=>e+="horizontal"===t?n.element.offsetWidth:n.element.offsetHeight,0)}function cc(e){const{panels:t}=e,n=uc({group:e});return 0===n?t.map(e=>({groupResizeBehavior:e.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:!0===e.panelConstraints.collapsible,defaultSize:void 0,disabled:e.panelConstraints.disabled,minSize:0,maxSize:100,panelId:e.id})):t.map(e=>{const{element:t,panelConstraints:i}=e;let r,o=0;if(void 0!==i.collapsedSize){o=lc(sc({groupSize:n,panelElement:t,styleProp:i.collapsedSize})/n*100)}if(void 0!==i.defaultSize){r=lc(sc({groupSize:n,panelElement:t,styleProp:i.defaultSize})/n*100)}let a=0;if(void 0!==i.minSize){a=lc(sc({groupSize:n,panelElement:t,styleProp:i.minSize})/n*100)}let s=100;if(void 0!==i.maxSize){s=lc(sc({groupSize:n,panelElement:t,styleProp:i.maxSize})/n*100)}return{groupResizeBehavior:i.groupResizeBehavior,collapsedSize:o,collapsible:!0===i.collapsible,defaultSize:r,disabled:i.disabled,minSize:a,maxSize:s,panelId:e.id}})}function dc(e,t="Assertion error"){if(!e)throw Error(t)}function hc(e,t){return Array.from(t).sort("horizontal"===e?pc:fc)}function pc(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return 0!==n?n:e.element.offsetWidth-t.element.offsetWidth}function fc(e,t){const n=e.element.offsetTop-t.element.offsetTop;return 0!==n?n:e.element.offsetHeight-t.element.offsetHeight}function gc(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function mc(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function vc({orientation:e,rects:t,targetRect:n}){const i={x:n.x+n.width/2,y:n.y+n.height/2};let r,o=Number.MAX_VALUE;for(const a of t){const{x:t,y:n}=mc(i,a),s="horizontal"===e?t:n;s<o&&(o=s,r=a)}return dc(r,"No rect found"),r}let yc;function xc(){return void 0===yc&&(yc="function"==typeof matchMedia&&!!matchMedia("(pointer:coarse)").matches),yc}function _c(e){const{element:t,orientation:n,panels:i,separators:r}=e,o=hc(n,Array.from(t.children).filter(gc).map(e=>({element:e}))).map(({element:e})=>e),a=[];let s,l=!1,u=!1,c=-1,d=-1,h=0,p=[];{let e=-1;for(const t of o)t.hasAttribute("data-panel")&&(e++,t.hasAttribute("data-disabled")||(h++,-1===c&&(c=e),d=e))}if(h>1){let t=-1;for(const h of o)if(h.hasAttribute("data-panel")){t++;const r=i.find(e=>e.element===h);if(r){if(s){const i=s.element.getBoundingClientRect(),o=h.getBoundingClientRect();let f;if(u){const e="horizontal"===n?new DOMRect(i.right,i.top,0,i.height):new DOMRect(i.left,i.bottom,i.width,0),t="horizontal"===n?new DOMRect(o.left,o.top,0,o.height):new DOMRect(o.left,o.top,o.width,0);switch(p.length){case 0:f=[e,t];break;case 1:{const r=p[0],a=vc({orientation:n,rects:[i,o],targetRect:r.element.getBoundingClientRect()});f=[r,a===i?t:e];break}default:f=p}}else f=p.length?p:["horizontal"===n?new DOMRect(i.right,o.top,o.left-i.right,o.height):new DOMRect(o.left,i.bottom,o.width,o.top-i.bottom)];for(const n of f){let i="width"in n?n:n.element.getBoundingClientRect();const o=xc()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(i.width<o){const e=o-i.width;i=new DOMRect(i.x-e/2,i.y,i.width+e,i.height)}if(i.height<o){const e=o-i.height;i=new DOMRect(i.x,i.y-e/2,i.width,i.height+e)}!l&&!(t<=c||t>d)&&a.push({group:e,groupSize:uc({group:e}),panels:[s,r],separator:"width"in n?void 0:n,rect:i}),l=!1}}u=!1,s=r,p=[]}}else if(h.hasAttribute("data-separator")){null!==h.ariaDisabled&&(l=!0);const e=r.find(e=>e.element===h);e?p.push(e):(s=void 0,p=[])}else u=!0}return a}class bc{constructor(){var t,i,r;t=this,r={},(i=e).has(t)?n("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(t):i.set(t,r)}addListener(t,n){const i=o(this,e)[t];return void 0===i?o(this,e)[t]=[n]:i.includes(n)||i.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const i=o(this,e)[t];if(void 0!==i)if(1===i.length)i[0].call(null,n);else{let e=!1,t=null;const o=Array.from(i);for(let i=0;i<o.length;i++){const a=o[i];try{a.call(null,n)}catch(r){null===t&&(e=!0,t=r)}}if(e)throw t}}removeAllListeners(){var t,n,i,o;i={},r(t=this,n=e,"write to private field"),o?o.call(t,i):n.set(t,i)}removeListener(t,n){const i=o(this,e)[t];if(void 0!==i){const e=i.indexOf(n);e>=0&&i.splice(e,1)}}}e=new WeakMap;let wc=new Map;const Cc=new bc;function Sc(e,t){for(const[n]of wc)if(n.id===e)return n}function Mc(e,t){for(const[n,i]of wc)if(n.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Tc(){return wc}function Ic(e,t){return Cc.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function Dc(e,t){const n=wc.get(e);wc=new Map(wc),wc.set(e,t),Cc.emit("groupChange",{group:e,prev:n,next:t})}const kc=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Ac(e){const t=getComputedStyle(e);return!!("fixed"===t.position||"auto"!==t.zIndex&&("static"!==t.position||function(e){const t=getComputedStyle(Pc(e)??e).display;return"flex"===t||"inline-flex"===t}(e))||+t.opacity<1||"transform"in t&&"none"!==t.transform||"webkitTransform"in t&&"none"!==t.webkitTransform||"mixBlendMode"in t&&"normal"!==t.mixBlendMode||"filter"in t&&"none"!==t.filter||"webkitFilter"in t&&"none"!==t.webkitFilter||"isolation"in t&&"isolate"===t.isolation||kc.test(t.willChange)||"touch"===t.webkitOverflowScrolling)}function Ec(e){let t=e.length;for(;t--;){const n=e[t];if(dc(n,"Missing node"),Ac(n))return n}return null}function Nc(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Lc(e){const t=[];for(;e;)t.push(e),e=Pc(e);return t}function Pc(e){const{parentNode:t}=e;return function(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}(t)?t.host:t}function Oc(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Rc({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!gc(n)||n.contains(e)||e.contains(n))return!0;if(function(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Lc(e),b:Lc(t)};let i;for(;n.a.at(-1)===n.b.at(-1);)i=n.a.pop(),n.b.pop();dc(i,"Stacking order can only be calculated for elements with a common ancestor");const r=Nc(Ec(n.a)),o=Nc(Ec(n.b));if(r===o){const e=i.childNodes,t={a:n.a.at(-1),b:n.b.at(-1)};let r=e.length;for(;r--;){const n=e[r];if(n===t.a)return 1;if(n===t.b)return-1}}return Math.sign(r-o)}(n,e)>0){let i=n;for(;i;){if(i.contains(e))return!0;if(Oc(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function Fc(e,t){const n=[];return t.forEach((t,i)=>{if(i.disabled)return;const r=_c(i),o=function(e,t,n){let i,r={x:1/0,y:1/0};for(const o of t){const t=mc(n,o.rect);switch(e){case"horizontal":t.x<=r.x&&(i=o,r=t);break;case"vertical":t.y<=r.y&&(i=o,r=t)}}return i?{distance:r,hitRegion:i}:void 0}(i.orientation,r,{x:e.clientX,y:e.clientY});o&&o.distance.x<=0&&o.distance.y<=0&&Rc({groupElement:i.element,hitRegion:o.hitRegion.rect,pointerEventTarget:e.target})&&n.push(o.hitRegion)}),n}function zc(e,t,n=0){return Math.abs(lc(e)-lc(t))<=n}function Vc(e,t){return zc(e,t)?0:e>t?1:-1}function Bc({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:i}){const{collapsedSize:r=0,collapsible:o,disabled:a,maxSize:s=100,minSize:l=0}=t;if(a&&!e)return n;if(Vc(i,l)<0)if(o){i=Vc(i,(r+l)/2)<0?r:l}else i=l;return i=lc(i=Math.min(s,i))}function jc({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:i,prevLayout:r,trigger:o}){if(zc(e,0))return t;const a="imperative-api"===o,s=Object.values(t),l=Object.values(r),u=[...s],[c,d]=i;dc(null!=c,"Invalid first pivot index"),dc(null!=d,"Invalid second pivot index");let h=0;switch(o){case"keyboard":{const t=e<0?d:c,i=n[t];dc(i,`Panel constraints not found for index ${t}`);const{collapsedSize:r=0,collapsible:o,minSize:a=0}=i;if(o){const n=s[t];if(dc(null!=n,`Previous layout not found for panel index ${t}`),zc(n,r)){const t=a-n;Vc(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{const t=e<0?c:d,i=n[t];dc(i,`No panel constraints found for index ${t}`);const{collapsedSize:r=0,collapsible:o,minSize:a=0}=i;if(o){const n=s[t];if(dc(null!=n,`Previous layout not found for panel index ${t}`),zc(n,a)){const t=n-r;Vc(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{const t=e<0?d:c,i=n[t];dc(i,`Panel constraints not found for index ${t}`);const r=s[t],{collapsible:o,collapsedSize:a,minSize:l}=i;if(o&&Vc(r,l)<0)if(e>0){const t=l-a,n=t/2;Vc(r+e,l)<0&&(e=Vc(e,n)<=0?0:t)}else{const t=l-a,n=100-t/2;Vc(r-e,l)<0&&(e=Vc(100+e,n)>0?0:-t)}break}}{const t=e<0?1:-1;let i=e<0?d:c,r=0;for(;;){const e=s[i];dc(null!=e,`Previous layout not found for panel index ${i}`);if(r+=Bc({overrideDisabledPanels:a,panelConstraints:n[i],prevSize:e,size:100})-e,i+=t,i<0||i>=n.length)break}const o=Math.min(Math.abs(e),Math.abs(r));e=e<0?0-o:o}{let t=e<0?c:d;for(;t>=0&&t<n.length;){const i=Math.abs(e)-Math.abs(h),r=s[t];dc(null!=r,`Previous layout not found for panel index ${t}`);const o=r-i,l=Bc({overrideDisabledPanels:a,panelConstraints:n[t],prevSize:r,size:o});if(!zc(r,l)&&(h+=r-l,u[t]=l,h.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?t--:t++}}if(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}(l,u))return r;{const t=e<0?d:c,i=s[t];dc(null!=i,`Previous layout not found for panel index ${t}`);const r=i+h,o=Bc({overrideDisabledPanels:a,panelConstraints:n[t],prevSize:i,size:r});if(u[t]=o,!zc(o,r)){let t=r-o,i=e<0?d:c;for(;i>=0&&i<n.length;){const r=u[i];dc(null!=r,`Previous layout not found for panel index ${i}`);const o=r+t,s=Bc({overrideDisabledPanels:a,panelConstraints:n[i],prevSize:r,size:o});if(zc(r,s)||(t-=s-r,u[i]=s),zc(t,0))break;e>0?i--:i++}}}if(!zc(Object.values(u).reduce((e,t)=>t+e,0),100,.1))return r;const p=Object.keys(r);return u.reduce((e,t,n)=>(e[p[n]]=t,e),{})}function Gc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(void 0===t[n]||0!==Vc(e[n],t[n]))return!1;return!0}function Wc({layout:e,panelConstraints:t}){const n=Object.values(e),i=[...n],r=i.reduce((e,t)=>e+t,0);if(i.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${i.map(e=>`${e}%`).join(", ")}`);if(!zc(r,100)&&i.length>0)for(let s=0;s<t.length;s++){const e=i[s];dc(null!=e,`No layout data found for index ${s}`);const t=100/r*e;i[s]=t}let o=0;for(let s=0;s<t.length;s++){const e=n[s];dc(null!=e,`No layout data found for index ${s}`);const r=i[s];dc(null!=r,`No layout data found for index ${s}`);const a=Bc({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:e,size:r});r!=a&&(o+=r-a,i[s]=a)}if(!zc(o,0))for(let s=0;s<t.length;s++){const e=i[s];dc(null!=e,`No layout data found for index ${s}`);const n=e+o,r=Bc({overrideDisabledPanels:!0,panelConstraints:t[s],prevSize:e,size:n});if(e!==r&&(o-=r-e,i[s]=r,zc(o,0)))break}const a=Object.keys(e);return i.reduce((e,t,n)=>(e[a[n]]=t,e),{})}function Hc({groupId:e,panelId:t}){const n=()=>{const t=Tc();for(const[n,{defaultLayoutDeferred:i,derivedPanelConstraints:r,layout:o,groupSize:a,separatorToPanels:s}]of t)if(n.id===e)return{defaultLayoutDeferred:i,derivedPanelConstraints:r,group:n,groupSize:a,layout:o,separatorToPanels:s};throw Error(`Group ${e} not found`)},i=()=>{const e=n().derivedPanelConstraints.find(e=>e.panelId===t);if(void 0!==e)return e;throw Error(`Panel constraints not found for Panel ${t}`)},r=()=>{const e=n().group.panels.find(e=>e.id===t);if(void 0!==e)return e;throw Error(`Layout not found for Panel ${t}`)},o=()=>{const e=n().layout[t];if(void 0!==e)return e;throw Error(`Layout not found for Panel ${t}`)},a=e=>{if(e===o())return;const{defaultLayoutDeferred:i,derivedPanelConstraints:r,group:a,groupSize:s,layout:l,separatorToPanels:u}=n(),c=(({nextSize:e,panels:n,prevLayout:i,derivedPanelConstraints:r})=>{const a=o(),s=n.findIndex(e=>e.id===t),l=0===s,u=s===n.length-1;if(u&&e<a&&(l||n.slice(0,s).every((e,t)=>{const n=r[t];return(null==n?void 0:n.collapsible)&&zc(n.collapsedSize,i[n.panelId])}))){const e=n.slice(0,s).reduce((e,t)=>e+i[t.id],0);return{...i,[t]:lc(100-e)}}return jc({delta:u?a-e:e-a,initialLayout:i,panelConstraints:r,pivotIndices:u?[s-1,s]:[s,s+1],prevLayout:i,trigger:"imperative-api"})})({nextSize:e,panels:a.panels,prevLayout:l,derivedPanelConstraints:r}),d=Wc({layout:c,panelConstraints:r});Gc(l,d)||Dc(a,{defaultLayoutDeferred:i,derivedPanelConstraints:r,groupSize:s,layout:d,separatorToPanels:u})};return{collapse:()=>{const{collapsible:e,collapsedSize:t}=i(),{mutableValues:n}=r(),s=o();e&&s!==t&&(n.expandToSize=s,a(t))},expand:()=>{const{collapsible:e,collapsedSize:t,minSize:n}=i(),{mutableValues:s}=r(),l=o();if(e&&l===t){let e=s.expandToSize??n;0===e&&(e=1),a(e)}},getSize:()=>{const{group:e}=n(),t=o(),{element:i}=r();return{asPercentage:t,inPixels:"horizontal"===e.orientation?i.offsetWidth:i.offsetHeight}},isCollapsed:()=>{const{collapsible:e,collapsedSize:t}=i(),n=o();return e&&zc(t,n)},resize:e=>{const{group:t}=n(),{element:i}=r(),o=uc({group:t}),s=lc(sc({groupSize:o,panelElement:i,styleProp:e})/o*100);a(s)}}}function Uc(e){if(e.defaultPrevented)return;const t=Tc();Fc(e,t).forEach(t=>{if(t.separator&&!t.separator.disableDoubleClick){const n=t.panels.find(e=>void 0!==e.panelConstraints.defaultSize);if(n){const i=n.panelConstraints.defaultSize,r=Hc({groupId:t.group.id,panelId:n.id});r&&void 0!==i&&(r.resize(i),e.preventDefault())}}})}function Yc(e){const t=Tc();for(const[n]of t)if(n.separators.some(t=>t.element===e))return n;throw Error("Could not find parent Group for separator element")}function Zc({groupId:e}){const t=()=>{const t=Tc();for(const[n,i]of t)if(n.id===e)return{group:n,...i};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:e,layout:n}=t();return e?{}:n},setLayout(e){const{defaultLayoutDeferred:n,derivedPanelConstraints:i,group:r,groupSize:o,layout:a,separatorToPanels:s}=t(),l=Wc({layout:e,panelConstraints:i});return n?a:(Gc(a,l)||Dc(r,{defaultLayoutDeferred:n,derivedPanelConstraints:i,groupSize:o,layout:l,separatorToPanels:s}),l)}}}function Xc(e,t){const n=Yc(e),i=Mc(n.id,!0),r=n.separators.find(t=>t.element===e);dc(r,"Matching separator not found");const o=i.separatorToPanels.get(r);dc(o,"Matching panels not found");const a=o.map(e=>n.panels.indexOf(e)),s=Zc({groupId:n.id}).getLayout(),l=Wc({layout:jc({delta:t,initialLayout:s,panelConstraints:i.derivedPanelConstraints,pivotIndices:a,prevLayout:s,trigger:"keyboard"}),panelConstraints:i.derivedPanelConstraints});Gc(s,l)||Dc(n,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:l,separatorToPanels:i.separatorToPanels})}function qc(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Yc(t);if(!n.disabled)switch(e.key){case"ArrowDown":e.preventDefault(),"vertical"===n.orientation&&Xc(t,5);break;case"ArrowLeft":e.preventDefault(),"horizontal"===n.orientation&&Xc(t,-5);break;case"ArrowRight":e.preventDefault(),"horizontal"===n.orientation&&Xc(t,5);break;case"ArrowUp":e.preventDefault(),"vertical"===n.orientation&&Xc(t,-5);break;case"End":e.preventDefault(),Xc(t,100);break;case"Enter":{e.preventDefault();const n=Yc(t),i=Mc(n.id,!0),{derivedPanelConstraints:r,layout:o,separatorToPanels:a}=i,s=n.separators.find(e=>e.element===t);dc(s,"Matching separator not found");const l=a.get(s);dc(l,"Matching panels not found");const u=l[0],c=r.find(e=>e.panelId===u.id);if(dc(c,"Panel metadata not found"),c.collapsible){const e=o[u.id],i=c.collapsedSize===e?n.mutableState.expandedPanelSizes[u.id]??c.minSize:c.collapsedSize;Xc(t,i-e)}break}case"F6":{e.preventDefault();const n=Yc(t).separators.map(e=>e.element),i=Array.from(n).findIndex(t=>t===e.currentTarget);dc(null!==i,"Index not found");n[e.shiftKey?i>0?i-1:n.length-1:i+1<n.length?i+1:0].focus({preventScroll:!0});break}case"Home":e.preventDefault(),Xc(t,-100)}}let $c={cursorFlags:0,state:"inactive"};const Kc=new bc;function Jc(){return $c}function Qc(e){const t=$c;$c=e,Kc.emit("change",{prev:t,next:e})}function ed(e){if(e.defaultPrevented)return;if("mouse"===e.pointerType&&e.button>0)return;const t=Tc(),n=Fc(e,t),i=new Map;let r=!1;n.forEach(e=>{e.separator&&(r||(r=!0,e.separator.element.focus({focusVisible:!1,preventScroll:!0})));const n=t.get(e.group);n&&i.set(e.group,n.layout)}),Qc({cursorFlags:0,hitRegions:n,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}const td=e=>e,nd=()=>{};let id;function rd(){return void 0===id&&(id=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(id=!0)),id}const od=new WeakMap;function ad(e){if(null===e.defaultView||void 0===e.defaultView)return;let{prevStyle:t,styleSheet:n}=od.get(e)??{};void 0===n&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&(Object.isExtensible(e.adoptedStyleSheets)?e.adoptedStyleSheets.push(n):e.adoptedStyleSheets=[...e.adoptedStyleSheets,n]));const i=Jc();switch(i.state){case"active":case"hover":{const e=function({cursorFlags:e,groups:t,state:n}){let i=0,r=0;switch(n){case"active":case"hover":t.forEach(e=>{if(!e.mutableState.disableCursor)switch(e.orientation){case"horizontal":i++;break;case"vertical":r++}})}if(0!==i||0!==r){if("active"===n&&e&&rd()){const t=!!(4&e),n=!!(8&e);if(1&e)return t?"se-resize":n?"ne-resize":"e-resize";if(2&e)return t?"sw-resize":n?"nw-resize":"w-resize";if(t)return"s-resize";if(n)return"n-resize"}return rd()?i>0&&r>0?"move":i>0?"ew-resize":"ns-resize":i>0&&r>0?"grab":i>0?"col-resize":"row-resize"}}({cursorFlags:i.cursorFlags,groups:i.hitRegions.map(e=>e.group),state:i.state}),r=`*, *:hover {cursor: ${e} !important; }`;if(t===r)return;t=r,e?0===n.cssRules.length?n.insertRule(r):n.replaceSync(r):1===n.cssRules.length&&n.deleteRule(0);break}case"inactive":t=void 0,1===n.cssRules.length&&n.deleteRule(0)}od.set(e,{prevStyle:t,styleSheet:n})}function sd({document:e,event:t,hitRegions:n,initialLayoutMap:i,mountedGroups:r,pointerDownAtPoint:o,prevCursorFlags:a}){let s=0;n.forEach(e=>{const{group:n,groupSize:a}=e,{orientation:l,panels:u}=n,{disableCursor:c}=n.mutableState;let d=0;d=o?"horizontal"===l?(t.clientX-o.x)/a*100:(t.clientY-o.y)/a*100:"horizontal"===l?t.clientX<0?-100:100:t.clientY<0?-100:100;const h=i.get(n),p=r.get(n);if(!h||!p)return;const{defaultLayoutDeferred:f,derivedPanelConstraints:g,groupSize:m,layout:v,separatorToPanels:y}=p;if(g&&v&&y){const t=jc({delta:d,initialLayout:h,panelConstraints:g,pivotIndices:e.panels.map(e=>u.indexOf(e)),prevLayout:v,trigger:"mouse-or-touch"});if(Gc(t,v)){if(0!==d&&!c)switch(l){case"horizontal":s|=d<0?1:2;break;case"vertical":s|=d<0?4:8}}else Dc(e.group,{defaultLayoutDeferred:f,derivedPanelConstraints:g,groupSize:m,layout:t,separatorToPanels:y})}});let l=0;0===t.movementX?l|=3&a:l|=3&s,0===t.movementY?l|=12&a:l|=12&s,function(e){const t=$c,n={...$c};n.cursorFlags=e,$c=n,Kc.emit("change",{prev:t,next:n})}(l),ad(e)}function ld(e){const t=Tc(),n=Jc();if("active"===n.state)sd({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function ud(e){var t,n;if(e.defaultPrevented)return;const i=Jc(),r=Tc();switch(i.state){case"active":if(0===e.buttons)return Qc({cursorFlags:0,state:"inactive"}),void i.hitRegions.forEach(e=>{const t=Mc(e.group.id,!0);Dc(e.group,t)});for(const r of i.hitRegions)if(r.separator){const{element:i}=r.separator;(null==(t=i.hasPointerCapture)?void 0:t.call(i,e.pointerId))||null==(n=i.setPointerCapture)||n.call(i,e.pointerId)}sd({document:e.currentTarget,event:e,hitRegions:i.hitRegions,initialLayoutMap:i.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:i.pointerDownAtPoint,prevCursorFlags:i.cursorFlags});break;default:{const t=Fc(e,r);0===t.length?"inactive"!==i.state&&Qc({cursorFlags:0,state:"inactive"}):Qc({cursorFlags:0,hitRegions:t,state:"hover"}),ad(e.currentTarget);break}}}function cd(e){if(e.relatedTarget instanceof HTMLIFrameElement&&"hover"===Jc().state)Qc({cursorFlags:0,state:"inactive"})}function dd(e){if(e.defaultPrevented)return;if("mouse"===e.pointerType&&e.button>0)return;const t=Jc();if("active"===t.state)Qc({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(ad(e.currentTarget),t.hitRegions.forEach(e=>{const t=Mc(e.group.id,!0);Dc(e.group,t)}),e.preventDefault())}function hd(e){let t=0,n=0;const i={};for(const o of e)if(void 0!==o.defaultSize){t++;const e=lc(o.defaultSize);n+=e,i[o.panelId]=e}else i[o.panelId]=void 0;const r=e.length-t;if(0!==r){const t=lc((100-n)/r);for(const n of e)void 0===n.defaultSize&&(i[n.panelId]=t)}return i}function pd(e,t,n){if(!n[0])return;const i=e.panels.find(e=>e.element===t);if(!i||!i.onResize)return;const r=uc({group:e}),o="horizontal"===e.orientation?i.element.offsetWidth:i.element.offsetHeight,a=i.mutableValues.prevSize,s={asPercentage:lc(o/r*100),inPixels:o};i.mutableValues.prevSize=s,i.onResize(s,i.id,a)}function fd(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function gd({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:i}){if(n<=0||t<=0||n===t)return i;let r=0,o=0,a=!1;const s=new Map,l=[];for(const d of e.panels){const e=i[d.id]??0;switch(d.panelConstraints.groupResizeBehavior){case"preserve-pixel-size":{a=!0;const i=lc(e/100*n/t*100);s.set(d.id,i),r+=i;break}default:l.push(d.id),o+=e}}if(!a||0===l.length)return i;const u=100-r,c={...i};if(s.forEach((e,t)=>{c[t]=e}),o>0)for(const d of l){const e=i[d]??0;c[d]=lc(e/o*u)}else{const e=lc(u/l.length);for(const t of l)c[t]=e}return c}const md=new Map;function vd(e){let t=!0;dc(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,i=new Set,r=new Set,o=new n(n=>{for(const i of n){const{borderBoxSize:n,target:r}=i;if(r===e.element){if(t){const t=uc({group:e});if(0===t)return;const n=Mc(e.id);if(!n)return;const i=cc(e),r=n.defaultLayoutDeferred?hd(i):n.layout,o=Wc({layout:gd({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:r}),panelConstraints:i});if(!n.defaultLayoutDeferred&&Gc(n.layout,o)&&fd(n.derivedPanelConstraints,i)&&n.groupSize===t)return;Dc(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:i,groupSize:t,layout:o,separatorToPanels:n.separatorToPanels})}}else pd(e,r,n)}});o.observe(e.element),e.panels.forEach(e=>{dc(!i.has(e.id),`Panel ids must be unique; id "${e.id}" was used more than once`),i.add(e.id),e.onResize&&o.observe(e.element)});const a=uc({group:e}),s=cc(e),l=e.panels.map(({id:e})=>e).join(",");let u=e.mutableState.defaultLayout;u&&(function(e,t){const n=e.map(e=>e.id),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(!i.includes(r))return!1;return!0}(e.panels,u)||(u=void 0));const c=Wc({layout:e.mutableState.layouts[l]??u??hd(s),panelConstraints:s}),d=e.element.ownerDocument;md.set(d,(md.get(d)??0)+1);const h=new Map;return _c(e).forEach(e=>{e.separator&&h.set(e.separator,e.panels)}),Dc(e,{defaultLayoutDeferred:0===a,derivedPanelConstraints:s,groupSize:a,layout:c,separatorToPanels:h}),e.separators.forEach(e=>{dc(!r.has(e.id),`Separator ids must be unique; id "${e.id}" was used more than once`),r.add(e.id),e.element.addEventListener("keydown",qc)}),1===md.get(d)&&(d.addEventListener("dblclick",Uc,!0),d.addEventListener("pointerdown",ed,!0),d.addEventListener("pointerleave",ld),d.addEventListener("pointermove",ud),d.addEventListener("pointerout",cd),d.addEventListener("pointerup",dd,!0)),function(){t=!1,md.set(d,Math.max(0,(md.get(d)??0)-1)),function(e){wc=new Map(wc),wc.delete(e)}(e),e.separators.forEach(e=>{e.element.removeEventListener("keydown",qc)}),md.get(d)||(d.removeEventListener("dblclick",Uc,!0),d.removeEventListener("pointerdown",ed,!0),d.removeEventListener("pointerleave",ld),d.removeEventListener("pointermove",ud),d.removeEventListener("pointerout",cd),d.removeEventListener("pointerup",dd,!0)),o.disconnect()}}function yd(e){const t=s.useId();return`${e??t}`}const xd=typeof window<"u"?s.useLayoutEffect:s.useEffect;function _d(e){const t=s.useRef(e);return xd(()=>{t.current=e},[e]),s.useCallback((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[t])}function bd(...e){return _d(t=>{e.forEach(e=>{if(e)switch(typeof e){case"function":e(t);break;case"object":e.current=t}})})}function wd(e){const t=s.useRef({...e});return xd(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const Cd=s.createContext(null);function Sd({children:e,className:t,defaultLayout:n,disableCursor:i,disabled:r,elementRef:o,groupRef:l,id:u,onLayoutChange:c,onLayoutChanged:d,orientation:h="horizontal",resizeTargetMinimumSize:p={coarse:20,fine:10},style:f,...g}){const m=s.useRef({onLayoutChange:{},onLayoutChanged:{}}),v=_d(e=>{Gc(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,null==c||c(e))}),y=_d(e=>{Gc(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,null==d||d(e))}),x=yd(u),_=s.useRef(null),[b,w]=function(){const[e,t]=s.useState({});return[e,s.useCallback(()=>t({}),[])]}(),C=s.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),S=bd(_,o);!function(e,t){const n=s.useRef({getLayout:()=>({}),setLayout:td});s.useImperativeHandle(t,()=>n.current,[]),xd(()=>{Object.assign(n.current,Zc({groupId:e}))})}(x,l);const M=_d((e,t)=>{const i=Jc(),r=Sc(e),o=Mc(e);if(o){let e=!1;if("active"===i.state)e=i.hitRegions.some(e=>e.group===r);return{flexGrow:o.layout[t]??1,pointerEvents:e?"none":void 0}}if(null==n?void 0:n[t])return{flexGrow:null==n?void 0:n[t]}}),T=wd({defaultLayout:n,disableCursor:i}),I=s.useMemo(()=>({get disableCursor(){return!!T.disableCursor},getPanelStyles:M,id:x,orientation:h,registerPanel:e=>{const t=C.current;return t.panels=hc(h,[...t.panels,e]),w(),()=>{t.panels=t.panels.filter(t=>t!==e),w()}},registerSeparator:e=>{const t=C.current;return t.separators=hc(h,[...t.separators,e]),w(),()=>{t.separators=t.separators.filter(t=>t!==e),w()}},updatePanelProps:(e,{disabled:t})=>{const n=C.current.panels.find(t=>t.id===e);n&&(n.panelConstraints.disabled=t);const i=Sc(x),r=Mc(x);i&&r&&Dc(i,{...r,derivedPanelConstraints:cc(i)})},updateSeparatorProps:(e,{disabled:t,disableDoubleClick:n})=>{const i=C.current.separators.find(t=>t.id===e);i&&(i.disabled=t,i.disableDoubleClick=n)}}),[M,x,w,h,T]),D=s.useRef(null);return xd(()=>{const e=_.current;if(null===e)return;const t=C.current;let n;if(void 0!==T.defaultLayout&&Object.keys(T.defaultLayout).length===t.panels.length){n={};for(const e of t.panels){const t=T.defaultLayout[e.id];void 0!==t&&(n[e.id]=t)}}const i={disabled:!!r,element:e,id:x,mutableState:{defaultLayout:n,disableCursor:!!T.disableCursor,expandedPanelSizes:C.current.lastExpandedPanelSizes,layouts:C.current.layouts},orientation:h,panels:t.panels,resizeTargetMinimumSize:t.resizeTargetMinimumSize,separators:t.separators};D.current=i;const o=vd(i),{defaultLayoutDeferred:a,derivedPanelConstraints:s,layout:l}=Mc(i.id,!0);!a&&s.length>0&&(v(l),y(l));const u=Ic(x,e=>{const{defaultLayoutDeferred:t,derivedPanelConstraints:n,layout:r}=e.next;if(t||0===n.length)return;const o=i.panels.map(({id:e})=>e).join(",");i.mutableState.layouts[o]=r,n.forEach(t=>{if(t.collapsible){const{layout:n}=e.prev??{};if(n){const e=zc(t.collapsedSize,r[t.panelId]),o=zc(t.collapsedSize,n[t.panelId]);e&&!o&&(i.mutableState.expandedPanelSizes[t.panelId]=n[t.panelId])}}});const a="active"!==Jc().state;v(r),a&&y(r)});return()=>{D.current=null,o(),u()}},[r,x,y,v,h,b,T]),s.useEffect(()=>{const e=D.current;e&&(e.mutableState.defaultLayout=n,e.mutableState.disableCursor=!!i)}),a.jsx(Cd.Provider,{value:I,children:a.jsx("div",{...g,className:t,"data-group":!0,"data-testid":x,id:x,ref:S,style:{height:"100%",width:"100%",overflow:"hidden",...f,display:"flex",flexDirection:"horizontal"===h?"row":"column",flexWrap:"nowrap",touchAction:"horizontal"===h?"pan-y":"pan-x"},children:e})})}function Md(){const e=s.useContext(Cd);return dc(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Td({children:e,className:t,collapsedSize:n="0%",collapsible:i=!1,defaultSize:r,disabled:o,elementRef:l,groupResizeBehavior:u="preserve-relative-size",id:c,maxSize:d="100%",minSize:h="0%",onResize:p,panelRef:f,style:g,...m}){const v=!!c,y=yd(c),x=wd({disabled:o}),_=s.useRef(null),b=bd(_,l),{getPanelStyles:w,id:C,orientation:S,registerPanel:M,updatePanelProps:T}=Md(),I=null!==p,D=_d((e,t,n)=>{null==p||p(e,c,n)});xd(()=>{const e=_.current;if(null!==e){const t={element:e,id:y,idIsStable:v,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:I?D:void 0,panelConstraints:{groupResizeBehavior:u,collapsedSize:n,collapsible:i,defaultSize:r,disabled:x.disabled,maxSize:d,minSize:h}};return M(t)}},[u,n,i,r,I,y,v,d,h,D,M,x]),s.useEffect(()=>{T(y,{disabled:o})},[o,y,T]),function(e,t){const{id:n}=Md(),i=s.useRef({collapse:nd,expand:nd,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:nd});s.useImperativeHandle(t,()=>i.current,[]),xd(()=>{Object.assign(i.current,Hc({groupId:n,panelId:e}))})}(y,f);const k=()=>{const e=w(C,y);if(e)return JSON.stringify(e)},A=s.useSyncExternalStore(e=>Ic(C,e),k,k);let E;return E=A?JSON.parse(A):void 0!==r?{flexGrow:void 0,flexShrink:void 0,flexBasis:r}:{flexGrow:1},a.jsx("div",{...m,"data-disabled":o||void 0,"data-panel":!0,"data-testid":y,id:y,ref:b,style:{...Id,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...E},children:a.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...g,touchAction:"horizontal"===S?"pan-y":"pan-x"},children:e})})}Sd.displayName="Group",Td.displayName="Panel";const Id={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Dd({children:e,className:t,disabled:n,disableDoubleClick:i,elementRef:r,id:o,style:l,...u}){const c=yd(o),d=wd({disabled:n,disableDoubleClick:i}),[h,p]=s.useState({}),[f,g]=s.useState("inactive"),[m,v]=s.useState(!1),y=s.useRef(null),x=bd(y,r),{disableCursor:_,id:b,orientation:w,registerSeparator:C,updateSeparatorProps:S}=Md(),M="horizontal"===w?"vertical":"horizontal";let T,I;if(xd(()=>{const e=y.current;if(null!==e){const t={disabled:d.disabled,disableDoubleClick:d.disableDoubleClick,element:e,id:c},n=C(t),i=function(e){return Kc.addListener("change",e)}(e=>{g("inactive"!==e.next.state&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:"inactive")}),r=Ic(b,e=>{const{derivedPanelConstraints:n,layout:i,separatorToPanels:r}=e.next,o=r.get(t);if(o){const e=o[0],t=o.indexOf(e);p(function({layout:e,panelConstraints:t,panelId:n,panelIndex:i}){let r,o;const a=e[n],s=t.find(e=>e.panelId===n);if(s){const l=s.maxSize,u=[i,i+1];o=Wc({layout:jc({delta:(s.collapsible?s.collapsedSize:s.minSize)-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],r=Wc({layout:jc({delta:l-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:r,valueMin:o,valueNow:a}}({layout:i,panelConstraints:n,panelId:e.id,panelIndex:t}))}});return()=>{i(),r(),n()}}},[b,c,C,d]),s.useEffect(()=>{S(c,{disabled:n,disableDoubleClick:i})},[n,i,c,S]),n&&!_&&(T="not-allowed"),n)I="disabled";else if("active"===f)I="active";else I=m?"focus":f;return a.jsx("div",{...u,"aria-controls":h.valueControls,"aria-disabled":n||void 0,"aria-orientation":M,"aria-valuemax":h.valueMax,"aria-valuemin":h.valueMin,"aria-valuenow":h.valueNow,children:e,className:t,"data-separator":I,"data-testid":c,id:c,onBlur:()=>v(!1),onFocus:()=>v(!0),ref:x,role:"separator",style:{flexBasis:"auto",cursor:T,...l,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}function kd(e){const{useToolBoxSetting:t=!0,useFilter:n=!0,useSort:i=!0,useCustomCell:r=!0,useChart:o=!1,chartActive:l=!1,itemsLength:u=0,optionModalState:c,filterCount:d,sortCount:h,customCellCount:p,filterPopupVisible:f,onFilterPopupVisibleChange:g,toolLeft:m,toolItems:v,toolItemsRight:y,optionPopup:x,onClickSetting:b,onClickFilter:w,onClickSort:C,onClickCustomCell:S,onClickResetAll:M,onClickChart:T}=e,I=_(),D=Y(),k=ya(),[A,E]=s.useState(!0),[N,L]=s.useState(!1),[P,O]=s.useState(!1),R=f??P,F=e=>{g?g(e):O(e)},[z,V]=s.useState(!1),[B,j]=s.useState(!1),G=D,W=s.useMemo(()=>{if(!(null==G?void 0:G.select))return null;try{return G.select(e=>{var t;return(null==(t=e.viewState)?void 0:t.filters)??[]})}catch{return null}},[G]),H=s.useMemo(()=>{if(!(null==G?void 0:G.select))return null;try{return G.select(e=>{var t;return(null==(t=e.viewState)?void 0:t.sorts)??[]})}catch{return null}},[G]),U=s.useRef([]),Z=s.useSyncExternalStore(e=>(null==W?void 0:W.subscribe(e))??(()=>{}),()=>(null==W?void 0:W.getSnapshot())??U.current),X=s.useSyncExternalStore(e=>(null==H?void 0:H.subscribe(e))??(()=>{}),()=>(null==H?void 0:H.getSnapshot())??U.current),q=d??Z.length,$=h??X.length,K=p??(null==k?void 0:k.config.ruleSets.length)??0,J=c??N,Q=(e,t=!1)=>u||t?e?"#4568E0":"#8998B5":"#A7B1BC",ee=s.useMemo(()=>u?0===q&&0===$&&0===K?"#A7B1BC":B?"#4568E0":"#8998B5":"#A7B1BC",[u,q,$,K,B]),te=b??(()=>L(e=>!e)),le=w??(()=>{u&&F(!0)}),ue=C??(()=>{u&&V(!0)}),ce=S??(()=>{u&&(null==k||k.showCustomCellHandler())}),de=M??(()=>{var e,t;const n=D;null==(e=null==n?void 0:n.filter)||e.call(n,[]),null==(t=null==n?void 0:n.sort)||t.call(n,[]),null==k||k.clearCustomCell()}),he=({titleText:e,disabled:t,isActive:n,hasItem:i,onClick:r,children:o,extraInnerProps:s,className:l})=>a.jsx("div",{className:["extend-grid-tool-items-wrapper",l??"",t?"disabled":""].filter(Boolean).join(" "),title:e,children:a.jsx("div",{className:["extend-grid-tool-badge-item-wrapper",t?"extend-grid-tool-disabled":"",n?"is-active":"",i?"has-item":""].filter(Boolean).join(" "),onClick:t?void 0:r,onMouseDown:null==s?void 0:s.onMouseDown,onMouseUp:null==s?void 0:s.onMouseUp,onMouseLeave:null==s?void 0:s.onMouseLeave,children:o})}),pe={display:A?void 0:"none"};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"extend-pivot-grid-tool-container",style:pe,children:[a.jsx("div",{className:"extend-grid-tool-left-section",children:m}),a.jsxs("div",{className:"extend-grid-tool-setup-wrapper",children:[a.jsxs("div",{className:"extend-grid-tool-badge-wrapper",children:[v,t&&a.jsx("div",{className:"extend-grid-tool-items-wrapper",title:I.Grid.layoutSetting,children:a.jsx(fa,{open:N,onOpenChange:L,trigger:a.jsx("div",{className:["extend-grid-tool-badge-item-wrapper","pivot-grid-setting-btn",J?"is-active":""].filter(Boolean).join(" "),onClick:te,children:a.jsx(oe,{color:Q(J,!0),size:"16"})}),children:"function"==typeof x?x({close:()=>L(!1)}):x})}),n&&he({titleText:I.Grid.filter,disabled:!u,hasItem:q>0,onClick:le,children:a.jsx(ie,{color:Q(q),size:"16"})}),i&&he({titleText:I.Grid.sort,disabled:!u,hasItem:$>0,onClick:ue,children:a.jsx(ae,{color:Q($),size:"16"})}),r&&he({titleText:I.Grid.customCellStyle,disabled:!u,hasItem:K>0,onClick:ce,children:a.jsx(se,{color:Q(K),size:"16"})}),o&&he({titleText:"차트",disabled:!u,isActive:l,onClick:T,children:a.jsx(be,{color:Q(l),size:"16"})}),(n||i)&&he({titleText:I.Grid.reset,disabled:!(u&&(q>0||$>0||K>0)),onClick:de,className:"toolbox-reset-all",extraInnerProps:{onMouseDown:()=>u&&(q>0||$>0||K>0)&&j(!0),onMouseUp:()=>j(!1),onMouseLeave:()=>j(!1)},children:a.jsx(re,{color:ee,size:"16"})}),y]}),t&&a.jsx("div",{className:"extend-grid-tool-separator"}),a.jsx(Te,{className:"extend-grid-tool-search",placeholder:I.Grid.searchFilter,isDisabled:!u}),a.jsx("div",{className:"extend-grid-tool-toggle-icon-wrapper",onClick:()=>E(!1),title:I.Grid.close,children:a.jsx(ne,{})})]})]}),!A&&a.jsx("div",{className:"extend-grid-tool-toggle",onClick:()=>E(!0),children:a.jsx(ne,{style:{transform:"rotate(180deg)"}})}),a.jsx(ca,{visible:R,onVisibleChange:F}),a.jsx(da,{visible:z,onVisibleChange:V})]})}function Ad(e,t){return e&&t?"subtotals":t?"grandTotals":"none"}function Ed(e){switch(e){case"none":return{sub:!1,grand:!1};case"grandTotals":return{sub:!1,grand:!0};case"subtotals":return{sub:!0,grand:!0}}}Dd.displayName="Separator";const Nd={general:{decimalFormat:void 0,useThousandsSeparator:!0},integer:{decimalFormat:{maximumFractionDigits:0},useThousandsSeparator:!0},float:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0},currency:{decimalFormat:{maximumFractionDigits:0},useThousandsSeparator:!0,formatter:e=>null!=e?`₩${Number(e).toLocaleString()}`:""},percentage:{decimalFormat:{maximumFractionDigits:0},useThousandsSeparator:!1,formatter:e=>null!=e?`${Number(e)}%`:""},percentageDot2:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!1,formatter:e=>null!=e?`${Number(e).toFixed(2)}%`:""},thousands:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0,formatter:e=>null!=e?`${(Number(e)/1e3).toFixed(2)}K`:""},millions:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0,formatter:e=>null!=e?`${(Number(e)/1e6).toFixed(2)}M`:""},billions:{decimalFormat:{minimumFractionDigits:2,maximumFractionDigits:2},useThousandsSeparator:!0,formatter:e=>null!=e?`${(Number(e)/1e9).toFixed(2)}B`:""}};function Ld(e){if(!e)return"general";const t=e.mask;if("function"===(null==t?void 0:t.type))return"general";const n=e.decimalFormat,i=e.useThousandsSeparator,r=null==n?void 0:n.maximumFractionDigits,o=(null==n?void 0:n.minimumFractionDigits)??0;return 0===r&&!1!==i?"integer":null!=r&&o===r&&!1!==i?"float":"general"}function Pd(e){var t,n,i,r,o;const{valueFields:l=[],rowFields:u=[],columnFields:c=[],showRowSubTotals:d=!1,showRowGrandTotals:h=!0,showColumnSubTotals:f=!1,showColumnGrandTotals:g=!0,rowSubTotalFields:m,columnSubTotalFields:v,totalsBeforeData:y=!1,showZeros:x=!1,footerVisible:b=!0,onFooterVisibleChange:w,onClose:C,onClickFieldPanel:S,onUpdateGridSettings:M,onUpdateValueField:T}=e,I=_(),D=I.GridPivot,[k,A]=s.useState("Main"),[E,N]=s.useState(Ad(d,h)),[L,P]=s.useState(Ad(f,g)),O=s.useMemo(()=>u.slice(0,-1).map(e=>e.field),[u]),R=s.useMemo(()=>c.slice(0,-1).map(e=>e.field),[c]),F=void 0===m?O:m,z=void 0===v?R:v,V=F.join(""),B=z.join(""),[j,G]=s.useState(()=>[...F]),[W,H]=s.useState(()=>[...z]),[U,Y]=s.useState(y),[Z,X]=s.useState(x);s.useEffect(()=>{N(Ad(d,h))},[d,h]),s.useEffect(()=>{P(Ad(f,g))},[f,g]),s.useEffect(()=>{G(F.length>0?[...F]:[])},[V]),s.useEffect(()=>{H(z.length>0?[...z]:[])},[B]),s.useEffect(()=>Y(y),[y]),s.useEffect(()=>X(x),[x]);const q=O.length>0&&j.length===O.length,$=R.length>0&&W.length===R.length;s.useEffect(()=>{if(E===Ad(d,h)&&L===Ad(f,g)&&U===y&&Z===x&&j.join(" ")===F.join(" ")&&W.join(" ")===z.join(" "))return;const e=Ed(E),t=Ed(L);null==M||M({showRowSubTotals:e.sub,showRowGrandTotals:e.grand,showColumnSubTotals:t.sub,showColumnGrandTotals:t.grand,rowSubTotalFields:q?void 0:[...j],columnSubTotalFields:$?void 0:[...W],totalsBeforeData:U,showZeros:Z})},[E,L,j,W,U,Z]);const K=l.length>0,Q=e=>p.getValueFieldKey(e,l),[ee,te]=s.useState(l[0]?Q(l[0]):""),[ne,ie]=s.useState((null==(t=l[0])?void 0:t.aggregate)??"sum"),[re,oe]=s.useState((null==(n=l[0])?void 0:n.showValueAs)??"none"),[ae,se]=s.useState(Ld(l[0])),[le,ue]=s.useState((null==(r=null==(i=l[0])?void 0:i.decimalFormat)?void 0:r.mode)??"round"),[ce,de]=s.useState((null==(o=l[0])?void 0:o.showOriginalValue)??!1),pe=e=>{var t;e&&(te(Q(e)),ie(e.aggregate??"sum"),oe(e.showValueAs??"none"),se(Ld(e)),ue((null==(t=e.decimalFormat)?void 0:t.mode)??"round"),de(e.showOriginalValue??!1))};s.useEffect(()=>{if(0===l.length)return;const e=l.find(e=>Q(e)===ee);pe(e??l[0])},[l]);s.useEffect(()=>{var e;if(!ee)return;const t=l.find(e=>Q(e)===ee);if(t){const n=t;if(ne===(t.aggregate??"sum")&&re===(n.showValueAs??"none")&&ae===Ld(t)&&le===((null==(e=n.decimalFormat)?void 0:e.mode)??"round")&&ce===(n.showOriginalValue??!1))return}const n=Nd[ae],i={aggregate:ne,showValueAs:re,showOriginalValue:"none"!==re&&ce};n&&(n.decimalFormat?i.decimalFormat={...n.decimalFormat,mode:le}:i.decimalFormat=n.decimalFormat,i.useThousandsSeparator=n.useThousandsSeparator,n.formatter?i.mask={type:"function",formatter:n.formatter}:i.mask=void 0),null==T||T({field:ee,changes:i})},[ne,re,ae,le,ce]);const fe=s.useMemo(()=>[{itemValue:"none",itemName:D.none??"없음"},{itemValue:"grandTotals",itemName:D.grandtotal??"합계"},{itemValue:"subtotals",itemName:D.subtotal??"부분합"}],[D]),ve=s.useMemo(()=>u.slice(0,-1).map(e=>({itemValue:e.field,itemName:e.header??e.field})),[u]),ye=s.useMemo(()=>c.slice(0,-1).map(e=>({itemValue:e.field,itemName:e.header??e.field})),[c]),xe=s.useMemo(()=>l.map(e=>({itemValue:Q(e),itemName:e.header??e.field})),[l]),_e=s.useMemo(()=>[{itemValue:"sum",itemName:D.sum??"합계"},{itemValue:"count",itemName:D.count??"개수"},{itemValue:"avg",itemName:D.average??"평균"},{itemValue:"max",itemName:D.max??"최대값"},{itemValue:"min",itemName:D.min??"최소값"},{itemValue:"range",itemName:D.range??"범위"},{itemValue:"stdev",itemName:D.std??"표준 편차"},{itemValue:"variance",itemName:D.var??"분산"},{itemValue:"stdevPop",itemName:D.stdPop??"모집단 표준 편차"},{itemValue:"variancePop",itemName:D.varPop??"모집단 분산"},{itemValue:"countNumbers",itemName:D.cntAll??"숫자 개수"},{itemValue:"first",itemName:D.showFirstValue??"첫번째 값"},{itemValue:"last",itemName:D.showLastValue??"마지막 값"}],[D]),be=s.useMemo(()=>[{itemValue:"none",itemName:D.noCalculation??"계산 없음"},{itemValue:"differenceFromPrevRow",itemName:D.diffRow??"이전 행과의 차이"},{itemValue:"percentDifferenceFromPrevRow",itemName:D.diffRowPct??"이전 행과의 차이(%)"},{itemValue:"differenceFromPrevCol",itemName:D.diffCol??"이전 열과의 차이"},{itemValue:"percentDifferenceFromPrevCol",itemName:D.diffColPct??"이전 열과의 차이(%)"},{itemValue:"percentOfGrandTotal",itemName:D.grandtotalPct??"총 합계(%)"},{itemValue:"percentOfRowTotal",itemName:D.rowTotalPct??"행 합계(%)"},{itemValue:"percentOfColumnTotal",itemName:D.colTotalPct??"열 합계(%)"},{itemValue:"percentOfPrevRow",itemName:D.prevRowPct??"이전 행(%)"},{itemValue:"percentOfPrevCol",itemName:D.prevColPct??"이전 열(%)"},{itemValue:"runningTotal",itemName:D.runTot??"누적 합계"},{itemValue:"percentOfRunningTotal",itemName:D.runTotPct??"누적 합계(%)"},{itemValue:"percentOfParentRow",itemName:D.parentRowPct??"상위 행 그룹(%)"},{itemValue:"percentOfParentCol",itemName:D.parentColPct??"상위 열 그룹(%)"},{itemValue:"rankAsc",itemName:D.rankAsc??"오름차순 순위"},{itemValue:"rankDesc",itemName:D.rankDesc??"내림차순 순위"},{itemValue:"index",itemName:D.index??"인덱스"}],[D]),we=s.useMemo(()=>[{itemValue:"round",itemName:D.roundingRound??"반올림"},{itemValue:"floor",itemName:D.roundingFloor??"내림"},{itemValue:"ceil",itemName:D.roundingCeil??"올림"},{itemValue:"truncate",itemName:D.roundingTruncate??"절삭"}],[D]),Ce=s.useMemo(()=>[{itemValue:"general",itemName:D.generalFormat??"일반"},{itemValue:"integer",itemName:D.int??"정수"},{itemValue:"float",itemName:D.float??"소수"},{itemValue:"currency",itemName:D.currency??"통화"},{itemValue:"percentage",itemName:D.percentage??"백분율"},{itemValue:"percentageDot2",itemName:D.percentageDot2??"백분율(소수점 2)"},{itemValue:"thousands",itemName:D.thousands??"천 단위"},{itemValue:"millions",itemName:D.millions??"백만 단위"},{itemValue:"billions",itemName:D.billions??"10억 단위"}],[D]),Se="Main"===k?I.Grid.layoutSetting??"레이아웃 설정":"Grid"===k?D.gridSetting??"그리드 설정":D.fieldSetting??"값 필드 설정";return a.jsxs("div",{className:"moz-r-pivot-option-modal",children:[a.jsxs("div",{className:"moz-r-pivot-option-modal__title-wrapper",children:[a.jsx("div",{className:"moz-r-pivot-option-modal__title",children:Se}),a.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:["Main"!==k&&a.jsxs(a.Fragment,{children:[a.jsx(J,{type:"icon",className:"moz-r-pivot-option-modal__btn",onClick:()=>A("Main"),children:a.jsx(me,{size:"12"})}),a.jsx("div",{style:{width:1,height:10,backgroundColor:"rgba(186, 198, 212, 1)"}})]}),a.jsx(J,{type:"icon",className:"moz-r-pivot-option-modal__btn",onClick:()=>null==C?void 0:C(),children:a.jsx(he,{size:"12"})})]})]}),a.jsx("div",{className:"moz-r-pivot-option-modal__separator"}),"Main"===k&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"moz-r-pivot-option-modal__item pivot-field-panel-btn",onClick:()=>null==S?void 0:S(),children:[a.jsx("span",{children:D.setting??"필드 설정"}),a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:[a.jsx("path",{d:"M3 4h10M3 8h10M3 12h10",stroke:"#8998B5",strokeWidth:"1.4",strokeLinecap:"round"}),a.jsx("circle",{cx:"6",cy:"4",r:"1.5",fill:"#4568E0"}),a.jsx("circle",{cx:"10",cy:"8",r:"1.5",fill:"#4568E0"}),a.jsx("circle",{cx:"6",cy:"12",r:"1.5",fill:"#4568E0"})]})]}),a.jsx("div",{className:"moz-r-pivot-option-modal__separator"}),a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>null==w?void 0:w(!b),children:[a.jsx("span",{children:I.Grid.viewFooter}),a.jsx("div",{onClick:e=>e.stopPropagation(),children:a.jsx(ha,{value:b,onChange:e=>null==w?void 0:w(e)})})]}),a.jsx("div",{className:"moz-r-pivot-option-modal__separator"}),a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>A("Grid"),children:[a.jsx("span",{children:D.gridSetting??"그리드 설정"}),a.jsx(ge,{size:"14"})]}),K&&a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>A("Field"),children:[a.jsx("span",{children:D.fieldSetting??"값 필드 설정"}),a.jsx(ge,{size:"14"})]})]}),"Grid"===k&&a.jsxs("div",{className:"moz-r-pivot-option-modal__section",children:[a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.showRowTotals??"행 합계 표시",a.jsx(Ho,{width:160,value:E,onChange:e=>N(e),itemsSource:fe,keyProp:"itemValue",displayProp:"itemName"})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.showColumnTotals??"열 합계 표시",a.jsx(Ho,{width:160,value:L,onChange:e=>P(e),itemsSource:fe,keyProp:"itemValue",displayProp:"itemName"})]}),a.jsx("div",{className:"moz-r-pivot-option-modal__separator"}),"subtotals"===E&&ve.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.subtotalCriteria??"소계 기준",a.jsx(lu,{width:160,value:j,onChange:e=>G(e),itemsSource:ve,keyProp:"itemValue",displayProp:"itemName",useSelectAll:!1})]}),a.jsx("div",{className:"moz-r-pivot-option-modal__separator"})]}),"subtotals"===L&&ye.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.columnSubtotalCriteria??"열 소계 기준",a.jsx(lu,{width:160,value:W,onChange:e=>H(e),itemsSource:ye,keyProp:"itemValue",displayProp:"itemName",useSelectAll:!1})]}),a.jsx("div",{className:"moz-r-pivot-option-modal__separator"})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>Y(e=>!e),children:[D.totalsBeforeData??"합계 데이터 앞에 표시",a.jsx("div",{onClick:e=>e.stopPropagation(),children:a.jsx(ha,{value:U,onChange:Y})})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>X(e=>!e),children:[D.showZeros??"0값 표시",a.jsx("div",{onClick:e=>e.stopPropagation(),children:a.jsx(ha,{value:Z,onChange:X})})]})]}),"Field"===k&&a.jsxs("div",{className:"moz-r-pivot-option-modal__section",children:[a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.fieldName??"필드 이름",a.jsx(Ho,{width:120,value:ee,onChange:e=>{const t=e;te(t);const n=l.find(e=>Q(e)===t);n&&pe(n)},itemsSource:xe,keyProp:"itemValue",displayProp:"itemName"})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.fieldAggregate??"집계",a.jsx(Ho,{width:120,value:ne,onChange:e=>ie(e),itemsSource:_e,keyProp:"itemValue",displayProp:"itemName"})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.fieldFormat??"형식",a.jsx(Ho,{width:120,value:ae,onChange:e=>se(e),itemsSource:Ce,keyProp:"itemValue",displayProp:"itemName"})]}),"general"!==ae&&a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.roundingMode??"반올림 모드",a.jsx(Ho,{width:120,value:le,onChange:e=>ue(e),itemsSource:we,keyProp:"itemValue",displayProp:"itemName"})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.fieldShowAs??"표시 방식",a.jsx(Ho,{width:120,value:re,onChange:e=>oe(e),itemsSource:be,keyProp:"itemValue",displayProp:"itemName"})]}),"none"!==re&&a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>de(e=>!e),children:[D.showOriginalValue??"원본값 병기",a.jsx("div",{onClick:e=>e.stopPropagation(),children:a.jsx(ha,{value:ce,onChange:de})})]})]})]})}const Od={sum:"Sum",avg:"Avg",count:"Cnt",min:"Min",max:"Max"};function Rd(e){const{field:t,header:n,area:i,aggregate:r,settingsActive:o,onRemove:l,onOpenSettings:u}=e,c=s.useMemo(()=>r?Od[r]??r:"",[r]);return"value"===i?a.jsxs("div",{className:"pivot-field-chip pivot-field-chip--value",children:[a.jsxs("div",{className:"pivot-field-chip__left",children:[a.jsx(xe,{color:"#4568e0",style:{marginRight:2}}),r&&a.jsx("span",{className:"pivot-field-chip__summary",children:c}),a.jsx("span",{className:"pivot-field-chip__label",children:n||t})]}),a.jsx("div",{className:"pivot-field-chip__settings",onClick:e=>{e.stopPropagation(),null==u||u()},children:a.jsx(Me,{color:o?"#4568e0":"#8998b5",size:"12"})})]}):a.jsxs("div",{className:"pivot-field-chip",children:[a.jsx(xe,{size:"10"}),a.jsx("span",{className:"pivot-field-chip__label",children:n||t}),a.jsx("span",{className:"pivot-field-chip__remove",onClick:e=>{e.stopPropagation(),null==l||l()},children:a.jsx(he,{size:"10"})})]})}function Fd(e){const{area:t,label:n,fields:i,onFieldsChange:r,placeholder:o,settingsActiveField:l,onFieldRemoved:u,onItemDropped:c,onOpenSettings:d}=e,[h,p]=s.useState(null),[f,g]=s.useState(null);return a.jsxs("div",{className:"pivot-drop-zone",children:[a.jsx("div",{className:"pivot-drop-zone__label",children:n}),a.jsx("div",{className:"pivot-drop-zone__content",children:a.jsxs("div",{className:"pivot-drop-zone__area dragging-container",onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move",0===i.length&&g(null)},onDragLeave:e=>{const t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||g(null)},onDrop:e=>{e.preventDefault();const n=(e=>{const t=e.dataTransfer.getData("application/json");if(!t)return null;try{const e=JSON.parse(t);return"pivot-fields"!==(null==e?void 0:e.name)?null:e}catch{return null}})(e),o=f;if(p(null),g(null),!n)return;const a=n.item.field,s=n.componentId===`pivot-zone-${t}`,l=o?o.before?o.index:o.index+1:i.length;if(s){const e=i.findIndex(e=>e.field===a);if(e<0)return;if(e===l||e===l-1)return;const t=[...i],[n]=t.splice(e,1);return t.splice(e<l?l-1:l,0,n),void r(t)}if(i.some(e=>e.field===a))return;const u=(()=>{const e={field:a,header:n.item.header};return"value"===t?{...e,aggregate:"sum"}:"filter"===t?{...e,values:[]}:e})(),d=[...i];d.splice(l,0,u),r(d),null==c||c({field:a,header:n.item.header})},children:[0===i.length&&o&&a.jsx("div",{className:"pivot-drop-zone__placeholder",children:o}),i.map((e,n)=>{const o=[(null==f?void 0:f.index)===n&&f.before?"is-drop-before":"",(null==f?void 0:f.index)===n&&!f.before?"is-drop-after":""].filter(Boolean).join(" ");return a.jsx("div",{className:["pivot-drop-zone__chip-wrap",o].filter(Boolean).join(" "),draggable:!0,onDragStart:e=>((e,n)=>{const r=i[n];p(n);const o={name:"pivot-fields",componentId:`pivot-zone-${t}`,item:{field:r.field,header:r.header}};e.dataTransfer.setData("application/json",JSON.stringify(o)),e.dataTransfer.effectAllowed="move"})(e,n),onDragOver:e=>((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move";const n=e.currentTarget.getBoundingClientRect(),i=e.clientY<n.top+n.height/2;g({index:t,before:i})})(e,n),onDragEnd:()=>{p(null),g(null)},style:{opacity:h===n?.4:1},children:a.jsx(Rd,{field:e.field,header:e.header,area:t,aggregate:e.aggregate,settingsActive:l===e.field,onRemove:()=>(e=>{r(i.filter(t=>t.field!==e.field)),null==u||u(e.field)})(e),onOpenSettings:()=>"value"===t&&(null==d?void 0:d(e))})},e.field)})]})})]})}const zd=s.forwardRef(function(e,t){const{availableFields:n,rowFields:i=[],columnFields:r=[],valueFields:o=[],filterFields:l=[],totalRowCount:u=0,onUpdateConfig:c}=e,d=_(),h=d.GridPivot,[p,f]=s.useState(!1),[g,m]=s.useState(""),v=u<1e5,[y,x]=s.useState(v),[b,w]=s.useState({rowFields:[],columnFields:[],valueFields:[],filterFields:[]}),[C,S]=s.useState(null),[M,T]=s.useState(!1),I=s.useCallback(()=>{w({rowFields:[...i],columnFields:[...r],valueFields:[...o],filterFields:[...l]})},[i,r,o,l]);s.useEffect(()=>{I()},[I]);const D=s.useMemo(()=>{const e=g.toLowerCase();return e?n.filter(t=>t.field.toLowerCase().includes(e)||t.header.toLowerCase().includes(e)):n},[g,n]),k=b.rowFields.length>=1&&b.valueFields.length>=1,A=s.useCallback(e=>b.rowFields.some(t=>t.field===e)||b.columnFields.some(t=>t.field===e)||b.valueFields.some(t=>t.field===e)||b.filterFields.some(t=>t.field===e),[b]),E=s.useCallback(e=>{var t;return(null==(t=n.find(t=>t.field===e))?void 0:t.dataType)??null},[n]),N=s.useCallback(e=>{switch(e){case"number":default:return["sum","avg","min","max","count","countAll","countNumbers","first","last","range","stdev","stdevPop","variance","variancePop"];case"date":return["min","max","count","countAll","first","last"];case"string":return["count","countAll","min","max","first","last"];case"boolean":case"array":return["count","countAll","first","last"]}},[]),L=s.useCallback(e=>"number"===e?"sum":"count",[]),P=s.useCallback(e=>{null==c||c({rowFields:[...e.rowFields],columnFields:[...e.columnFields],valueFields:[...e.valueFields],filterFields:[...e.filterFields]})},[c]),O=s.useCallback(e=>{y&&P(e)},[y,P]),R=e=>{w(e),O(e)},F=(e,t)=>({rowFields:e.rowFields.filter(e=>e.field!==t),columnFields:e.columnFields.filter(e=>e.field!==t),valueFields:e.valueFields.filter(e=>e.field!==t),filterFields:e.filterFields.filter(e=>e.field!==t)});s.useEffect(()=>{if(!C)return;b.valueFields.some(e=>e.field===C.field)||(T(!1),S(null))},[b.valueFields,C]);const z=s.useMemo(()=>({sum:h.sum??"합계",count:h.count??"개수",countAll:h.cntAll??"전체 개수",countNumbers:"숫자 개수",avg:h.average??"평균",min:h.min??"최소값",max:h.max??"최대값",range:h.range??"범위",stdev:h.std??"표준 편차",stdevPop:h.stdPop??"모표준 편차",variance:h.var??"분산",variancePop:h.varPop??"모분산",first:h.showFirstValue??"첫 번째 값",last:h.showLastValue??"마지막 값"}),[h]),V=s.useMemo(()=>{const e=C?E(C.field):null;return N(e).map(e=>({value:e,label:z[e]??e}))},[z,C,E,N]),B=s.useMemo(()=>{if(!C)return;const e=E(C.field),t=N(e),n=C.aggregate;return n&&t.includes(n)?n:L(e)},[C,E,N,L]),j=s.useRef({show:()=>{},hide:()=>{}});j.current.show=()=>{I(),x(v),f(!0)},j.current.hide=()=>{f(!1),T(!1)},s.useImperativeHandle(t,()=>({show:()=>j.current.show(),hide:()=>j.current.hide()}),[]);const G=M?null==C?void 0:C.field:void 0;return a.jsxs(a.Fragment,{children:[a.jsx(Zn,{visible:p,onVisibleChange:f,title:h.setting??"필드 설정",width:520,height:670,preset:"no-footer",footerSlot:()=>a.jsxs("div",{className:"pivot-field-panel__footer",children:[a.jsx(la,{checked:y,onChange:x,label:d.Grid.immediateApply}),!y&&a.jsx(J,{disabled:!k,onClick:()=>P(b),text:h.update??"업데이트"})]}),children:a.jsxs("div",{className:"pivot-field-panel",children:[a.jsxs("div",{className:"pivot-field-panel__list",onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},onDrop:e=>{var t;e.preventDefault();const n=e.dataTransfer.getData("application/json");if(!n)return;let i;try{i=JSON.parse(n)}catch{return}if("pivot-fields"!==i.name)return;const r=null==(t=i.item)?void 0:t.field;if(!r)return;if(!A(r))return;const o=F(b,r);R(o)},children:[a.jsx("div",{className:"pivot-field-panel__heading",children:h.selectFieldForReport??"보고서에 추가할 필드 선택:"}),a.jsxs("div",{className:"pivot-field-panel__field-items",children:[a.jsx(Zo,{value:g,onChange:m,placeholder:h.searchFieldPlaceholder??"필드 검색...",width:"100%"}),D.map(e=>a.jsxs("div",{className:"pivot-field-panel__field-item",draggable:!0,onDragStart:t=>((e,t)=>{const i=n.find(e=>e.field===t),r={name:"pivot-fields",componentId:"pivot-available-fields",item:{field:t,header:(null==i?void 0:i.header)??t}};e.dataTransfer.setData("application/json",JSON.stringify(r)),e.dataTransfer.effectAllowed="move"})(t,e.field),children:[a.jsx(la,{checked:A(e.field),onChange:t=>((e,t)=>{let i;if(t){const t=n.find(t=>t.field===e);if(!t)return;i="number"===t.dataType?{...b,valueFields:[...b.valueFields,{field:e,header:t.header,aggregate:"sum"}]}:{...b,rowFields:[...b.rowFields,{field:e,header:t.header}]}}else i=F(b,e);R(i)})(e.field,t),label:e.header}),a.jsx("span",{className:"pivot-field-panel__field-type",children:e.dataType})]},e.field))]})]}),a.jsxs("div",{className:"pivot-field-panel__zones",children:[a.jsx("div",{className:"pivot-field-panel__heading",children:h.dragFieldsBetweenAreas??"필드를 영역으로 드래그하세요:"}),a.jsx(Fd,{area:"row",label:h.row??"행",fields:b.rowFields,onFieldsChange:e=>(e=>{const t={...b,rowFields:e,columnFields:b.columnFields.filter(t=>!e.some(e=>e.field===t.field)),valueFields:b.valueFields.filter(t=>!e.some(e=>e.field===t.field)),filterFields:b.filterFields.filter(t=>!e.some(e=>e.field===t.field))};R(t)})(e),placeholder:h.dropZoneRowPlaceholder??"행 축 필드를 드래그하세요"}),a.jsx(Fd,{area:"column",label:h.column??"열",fields:b.columnFields,onFieldsChange:e=>(e=>{const t={...b,columnFields:e,rowFields:b.rowFields.filter(t=>!e.some(e=>e.field===t.field)),valueFields:b.valueFields.filter(t=>!e.some(e=>e.field===t.field)),filterFields:b.filterFields.filter(t=>!e.some(e=>e.field===t.field))};R(t)})(e),placeholder:h.dropZoneColumnPlaceholder??"열 축 필드를 드래그하세요"}),a.jsx(Fd,{area:"value",label:h.value??"값",fields:b.valueFields,onFieldsChange:e=>(e=>{const t=e.map(e=>{const t=E(e.field),n=N(t),i="aggregate"in e?e.aggregate:void 0;return i&&n.includes(i)?e:{...e,aggregate:L(t)}}),n={...b,valueFields:t,rowFields:b.rowFields.filter(e=>!t.some(t=>t.field===e.field)),columnFields:b.columnFields.filter(e=>!t.some(t=>t.field===e.field)),filterFields:b.filterFields.filter(e=>!t.some(t=>t.field===e.field))};R(n)})(e),placeholder:h.dropZoneValuePlaceholder??"값 필드를 드래그하세요",settingsActiveField:G,onOpenSettings:e=>{(null==C?void 0:C.field)===e.field&&M?T(!1):(S(e),requestAnimationFrame(()=>T(!0)))}})]})]})}),C&&M&&a.jsx(Zn,{visible:M,onVisibleChange:T,title:`${h.fieldSetting??"값 필드 설정"} : ${C.header??C.field}`,width:300,preset:"no-footer",closeOnOutsideClick:!1,className:"pivot-value-field-option-modal",children:a.jsxs("div",{className:"pivot-value-field-option-item",children:[a.jsx("span",{children:h.valueSummaryCriteria??"집계 기준"}),a.jsx(Ho,{value:B,onChange:e=>{if(!C)return;const t=b.valueFields.findIndex(e=>e.field===C.field);if(t<0)return;const n=E(C.field),i="string"==typeof e?e:"",r=N(n).includes(i)?i:L(n),o={...b.valueFields[t],aggregate:r},a=[...b.valueFields];a[t]=o;const s={...b,valueFields:a};w(s),S(o),O(s)},itemsSource:V,keyProp:"value",displayProp:"label",width:"100%"})]})})]})});let Vd={showPopup:!1,activeGrid:null,defaultImportOptions:{}};const Bd=new Set;function jd(){Bd.forEach(e=>e())}function Gd(e){return Bd.add(e),()=>Bd.delete(e)}function Wd(){return Vd}function Hd(){return{...s.useSyncExternalStore(Gd,Wd,Wd),show(e,t={}){Vd={showPopup:!0,activeGrid:e,defaultImportOptions:t},jd()},hide(){Vd={...Vd,showPopup:!1},jd()}}}let Ud=0;async function Yd(e,t={}){const n=e.io;return(null==n?void 0:n.exportXlsx)?n.exportXlsx({fileName:t.fileName??"export.xlsx",includeHeader:t.includeHeader??!0,visibleOnly:t.visibleOnly??!1}):null}async function Zd(e,t={}){const n=e.io;return(null==n?void 0:n.exportCsv)?n.exportCsv({fileName:t.fileName??"export.csv",delimiter:t.csvDelimiter??",",includeHeader:t.includeHeader??!0,visibleOnly:t.visibleOnly??!1,withBom:t.withBom??!0}):null}const Xd=s.forwardRef(function({config:e={},onOpenFilter:t,onOpenColumnPicker:n,onToggleGroupPanel:i,onOpenBulkEditor:r},o){const l=_(),u=Y(),c=Hd(),d=s.useRef(null),[h,p]=s.useState([]),f=s.useRef(null),g=Oa(e,{onOpenFilter:t,onOpenColumnPicker:n,onToggleGroupPanel:i,onOpenBulkEditor:r});s.useEffect(()=>{var e;if(g.setGrid(u),!u)return;const t=u,n=null==(e=t.on)?void 0:e.call(t,"contextmenu",e=>{m(e)});return()=>{null==n||n()}},[u]);const m=s.useCallback(e=>{if(!u)return;if(e.originalEvent.preventDefault(),"cell"!==(e.area??"cell"))return;const t=v(e);t&&(f.current=t,g.show(e.originalEvent,t),requestAnimationFrame(()=>{const e=b();y(()=>S(t,e))}))},[u,g]),v=s.useCallback(e=>{var t,n,i,r;if(!u)return null;const o=e.columnId??"";if(!o)return null;const a=u,s=null==(t=a.getPivotFields)?void 0:t.call(a),l=s?[...s.rowFields,...s.columnFields,...s.valueFields,...s.filterFields]:[];let c=((null==(n=a.getFields)?void 0:n.call(a))??l).find(e=>e.id===o)??null;if(!c){const e=null==(r=null==(i=a.columns)?void 0:i.getAll)?void 0:r.call(i).find(e=>e.id===o);if(e){const t=e.pivotValueField;c=(t?l.find(e=>e.id===t)??null:null)??{id:e.id,header:e.header??e.label??e.id,dataType:e.type??"string",hidden:e.hidden??!1}}}return{area:"cell",rowIndex:e.rowIndex??-1,columnId:o,field:c,cellValue:e.value??null,rowData:null}},[u]),y=s.useCallback(e=>{var t;null==(t=d.current)||t.open(e)},[]),x=s.useCallback(()=>{var e;null==(e=d.current)||e.close(),g.hide()},[g]);s.useImperativeHandle(o,()=>({open:(e,t)=>{f.current=e,g.show({preventDefault:()=>{},clientX:t.left,clientY:t.top},e),requestAnimationFrame(()=>{y(()=>S(e,[])),b().then(t=>{f.current===e&&y(()=>S(e,t))})})},close:x}),[g,y,x]);const b=s.useCallback(async()=>{var e,t;if(!u)return[];try{const n=await(null==(t=null==(e=u.rows)?void 0:e.selectionAggregates)?void 0:t.call(e)),i=(null==n?void 0:n.columns)??[];return p(i),i}catch{return p([]),[]}},[u]),w=e=>{const t=l.Grid;return{sum:t.contextSum??"합계",avg:t.contextAvg??"평균",min:t.contextMin??"최소",max:t.contextMax??"최대",count:t.contextCount??"개수",first:t.contextFirst??"첫번째",last:t.contextLast??"마지막"}[e]??e},C=(e,t)=>e.replace("{column}",t).replace("{name}",t),S=s.useCallback((t,n)=>{var i,r;const o=[];if(!u)return o;const a=l.Grid,s=(null==(i=t.field)?void 0:i.header)??"",d=null==(r=u.select)?void 0:r.call(u,e=>{const t=e;return{t:t.totalRowCount??0,v:t.visibleRowCount??0}}).getSnapshot(),h=!!d&&(d.t>0||d.v>0);!1!==e.useFilter&&(o.push({text:C(a.contextAddFilter??"'{column}' 열에 필터 추가",s),disabled:!t.field||!h,function:()=>{g.executeCommand("ADD_FLT"),x()}}),o.push({text:a.contextSelectFilter??"선택값으로 필터링",disabled:!t.field||!h||null===t.cellValue||void 0===t.cellValue||""===t.cellValue,function:()=>{g.executeCommand("SEL_FLT"),x()}}),o.push({text:C(a.contextResetColumnFilter??"'{column}' 열 필터 초기화",s),disabled:()=>{var e;return!g.hasColumnFilter((null==(e=t.field)?void 0:e.id)??t.columnId)},function:()=>{g.executeCommand("RST_COL_FLT"),x()}}),o.push({separator:!0})),!1!==e.useDataCopy&&o.push({text:a.contextDataCopy??"데이터 복사",disabled:!h,function:()=>{g.executeCommand("DATA_COPY"),x()}}),!1!==e.useDataWithHeaderCopy&&o.push({text:a.contextDataWithHeaderCopy??"헤더를 포함한 데이터 복사",disabled:!h,function:()=>{g.executeCommand("DATA_HEADER_COPY"),x()}});const p=[];e.useClientExcelImport&&p.push({text:a.contextImportExcelFileClient??"파일에서 가져오기 (클라이언트)",function:()=>{u&&c.show(u,e.clientImportOptions??{}),x()}}),e.useExportImport&&e.onImportExcel&&p.push({text:a.contextImportExcelOverwriteServer??"엑셀 가져오기 - 덮어쓰기 (서버)",function:()=>{var n;null==(n=e.onImportExcel)||n.call(e,{grid:u,field:t.field}),x()}}),e.useExportImport&&e.onImportExcelAppend&&p.push({text:a.contextImportExcelAppendServer??"엑셀 가져오기 - 추가 (서버)",function:()=>{var n;null==(n=e.onImportExcelAppend)||n.call(e,{grid:u,field:t.field}),x()}}),p.length>0&&(o.push({separator:!0}),o.push({text:a.contextImport??"가져오기",children:p}));const f=[];return e.useClientExcelExport&&(f.push({text:a.contextExportXlsxClient??"XLSX (클라이언트)",function:async()=>{u&&await Yd(u,{fileName:e.exportFileName??"export",...e.clientExportOptions??{}}),x()}}),f.push({text:a.contextExportCsvClient??"CSV (클라이언트)",function:async()=>{u&&await Zd(u,{fileName:e.exportFileName??"export",...e.clientExportOptions??{}}),x()}})),(e.useExportExcel||e.onExportOriginalData)&&e.onExportOriginalData&&(f.push({text:a.contextExportXlsxServer??"XLSX (서버)",function:()=>{var t;null==(t=e.onExportOriginalData)||t.call(e,"excel"),x()}}),f.push({text:a.contextExportCsvServer??"CSV (서버)",function:()=>{var t;null==(t=e.onExportOriginalData)||t.call(e,"csv"),x()}})),f.length>0&&o.push({text:a.contextExport??"내보내기",children:f}),n.length>0&&(o.push({separator:!0}),o.push({text:"",template:"aggregate-columns"})),function(e){var t,n,i,r;if(!e||0===e.length)return e;const o=[...e];for(;o.length>0&&(null==(t=o[0])?void 0:t.separator);)o.shift();for(;o.length>0&&(null==(n=o[o.length-1])?void 0:n.separator);)o.pop();for(let a=0;a<o.length-1;a++)(null==(i=o[a])?void 0:i.separator)&&(null==(r=o[a+1])?void 0:r.separator)&&(o.splice(a,1),a--);return o}(o)},[u,e,l,g,x,c]),M=s.useMemo(()=>({"aggregate-columns":()=>a.jsx(a.Fragment,{children:h.map((e,t)=>{return a.jsxs("div",{className:["moz-r-pivot-context-menu-aggregate",h.length>=2?"moz-r-pivot-context-menu-aggregate--compact":""].filter(Boolean).join(" "),children:[a.jsxs("span",{className:"moz-r-pivot-context-menu-aggregate__label",children:[e.header," ",w(e.aggregate)]}),a.jsx("span",{className:"moz-r-pivot-context-menu-aggregate__value",children:(n=e.value,i=e.formattedValue,i||(Number.isNaN(n)?String(n):n.toLocaleString(void 0,{maximumFractionDigits:2})))})]},t);var n,i})})}),[h]);return a.jsx(Ql,{ref:d,minWidth:"200px",fixPosition:{left:g.position.x,top:g.position.y},slots:M,onClose:g.hide})});function qd(e){const{chartType:t,rowFields:n,columnFields:i,valueFields:r,selectedRowField:o,selectedColumnField:l,selectedValueFields:u,showBack:c=!1,onUpdateChartType:d,onUpdateSelectedRowField:h,onUpdateSelectedColumnField:p,onUpdateSelectedValueFields:f,onBack:g,onClose:m}=e,v=_().GridPivot,y=s.useMemo(()=>[{key:"bar",value:v.barChart??"막대 차트"},{key:"line",value:v.lineChart??"꺾은선 차트"},{key:"lineSymbols",value:v.lineSymbolChart??"기호 꺾은선 차트"},{key:"area",value:v.areaChart??"영역 차트"}],[v]),x=s.useMemo(()=>n.map(e=>({key:e.field,value:e.header??e.field})),[n]),b=s.useMemo(()=>[{key:"all",value:"전체"},...i.map((e,t)=>({key:String(t),value:e.header??e.field}))],[i]),w=s.useMemo(()=>r.map(e=>({key:e.field,value:e.header??e.field})),[r]);return a.jsxs("div",{className:"moz-chart-controller",children:[a.jsxs("div",{className:"moz-chart-input-wrapper",children:[a.jsx(Ho,{value:t,itemsSource:y,displayProp:"value",keyProp:"key",label:v.chartType??"차트 유형",width:200,useFilter:!1,onChange:e=>d(e)}),i.length>1&&a.jsx(Ho,{value:l,itemsSource:b,displayProp:"value",keyProp:"key",label:v.chartXAxis??"X축 범주",width:200,useFilter:!1,onChange:e=>p(String(e??""))}),n.length>1&&a.jsx(Ho,{value:o,itemsSource:x,displayProp:"value",keyProp:"key",label:v.chartYAxis??"Y축 범주",width:200,useFilter:!1,onChange:e=>h(String(e??""))}),r.length>1&&a.jsx(lu,{value:u,itemsSource:w,displayProp:"value",keyProp:"key",label:v.categoryName??"카테고리",useSelectAll:!0,useFilter:!0,headerFormat:"{count} ITEMS",width:200,onChange:e=>f(e.map(String)),onClose:()=>{u.length||f(w.map(e=>e.key))}})]}),a.jsxs("div",{className:"moz-actions",children:[c&&a.jsxs(a.Fragment,{children:[a.jsx(J,{type:"icon",className:"moz-chart-button",onClick:g,children:a.jsx(me,{size:"14",color:"#8998B5"})}),a.jsx("div",{className:"moz-spacer"})]}),a.jsx(J,{type:"icon",className:"moz-chart-button",onClick:m,children:a.jsx(he,{size:"14",color:"#8998B5"})})]})]})}
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var $d=function(e,t){return($d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Kd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}$d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Jd=function(){return function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}}(),Qd=new(function(){return function(){this.browser=new Jd,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window}}());"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(Qd.wxa=!0,Qd.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Qd.worker=!0:!Qd.hasGlobalWindow||"Deno"in window?(Qd.node=!0,Qd.svgSupported=!0):function(e,t){var n=t.browser,i=e.match(/Firefox\/([\d.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),o=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Qd);var eh="sans-serif",th="12px "+eh;var nh=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var i=String.fromCharCode(n+32),r=(e.charCodeAt(n)-20)/100;t[i]=r}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),ih={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,i){if(!e){var r=ih.createCanvas();e=r&&r.getContext("2d")}if(e)return t!==i&&(t=e.font=i||th),e.measureText(n);n=n||"";var o=/((?:\d+)?\.?\d*)px/.exec(i=i||th),a=o&&+o[1]||12,s=0;if(i.indexOf("mono")>=0)s=a*n.length;else for(var l=0;l<n.length;l++){var u=nh[n[l]];s+=null==u?a:u*a}return{width:s}}}(),loadImage:function(e,t,n){var i=new Image;return i.onload=t,i.onerror=n,i.src=e,i}},rh=Dh(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),oh=Dh(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),ah=Object.prototype.toString,sh=Array.prototype,lh=sh.forEach,uh=sh.filter,ch=sh.slice,dh=sh.map,hh=function(){}.constructor,ph=hh?hh.prototype:null,fh="__proto__",gh=2311;function mh(){return gh++}function vh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function yh(e){if(null==e||"object"!=typeof e)return e;var t=e,n=ah.call(e);if("[object Array]"===n){if(!ep(e)){t=[];for(var i=0,r=e.length;i<r;i++)t[i]=yh(e[i])}}else if(oh[n]){if(!ep(e)){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(i=0,r=e.length;i<r;i++)t[i]=e[i]}}}else if(!rh[n]&&!ep(e)&&!jh(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==fh&&(t[a]=yh(e[a]));return t}function xh(e,t,n){if(!zh(t)||!zh(e))return n?yh(t):e;for(var i in t)if(t.hasOwnProperty(i)&&i!==fh){var r=e[i],o=t[i];!zh(o)||!zh(r)||Lh(o)||Lh(r)||jh(o)||jh(r)||Vh(o)||Vh(r)||ep(o)||ep(r)?!n&&i in e||(e[i]=yh(t[i])):xh(r,o,n)}return e}function _h(e,t){for(var n=e[0],i=1,r=e.length;i<r;i++)n=xh(n,e[i],t);return n}function bh(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==fh&&(e[n]=t[n]);return e}function wh(e,t,n){for(var i=Ah(t),r=0,o=i.length;r<o;r++){var a=i[r];(n?null!=t[a]:null==e[a])&&(e[a]=t[a])}return e}function Ch(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1}function Sh(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(t),r=0;r<i.length;r++){var o=i[r];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else wh(e,t,n)}function Mh(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function Th(e,t,n){if(e&&t)if(e.forEach&&e.forEach===lh)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function Ih(e,t,n){if(!e)return[];if(!t)return Xh(e);if(e.map&&e.map===dh)return e.map(t,n);for(var i=[],r=0,o=e.length;r<o;r++)i.push(t.call(n,e[r],r,e));return i}function Dh(e,t,n,i){if(e&&t){for(var r=0,o=e.length;r<o;r++)n=t.call(i,n,e[r],r,e);return n}}function kh(e,t,n){if(!e)return[];if(!t)return Xh(e);if(e.filter&&e.filter===uh)return e.filter(t,n);for(var i=[],r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e)&&i.push(e[r]);return i}function Ah(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var Eh=ph&&Ph(ph.bind)?ph.call.bind(ph.bind):function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return e.apply(t,n.concat(ch.call(arguments)))}};function Nh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(ch.call(arguments)))}}function Lh(e){return Array.isArray?Array.isArray(e):"[object Array]"===ah.call(e)}function Ph(e){return"function"==typeof e}function Oh(e){return"string"==typeof e}function Rh(e){return"[object String]"===ah.call(e)}function Fh(e){return"number"==typeof e}function zh(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Vh(e){return!!rh[ah.call(e)]}function Bh(e){return!!oh[ah.call(e)]}function jh(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function Gh(e){return null!=e.colorStops}function Wh(e){return"[object RegExp]"===ah.call(e)}function Hh(e){return e!=e}function Uh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,i=e.length;n<i;n++)if(null!=e[n])return e[n]}function Yh(e,t){return null!=e?e:t}function Zh(e,t,n){return null!=e?e:null!=t?t:n}function Xh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ch.apply(e,t)}function qh(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function $h(e,t){if(!e)throw new Error(t)}function Kh(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Jh="__ec_primitive__";function Qh(e){e[Jh]=!0}function ep(e){return e[Jh]}var tp=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return Ah(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),np="function"==typeof Map;var ip=function(){function e(t){var n=Lh(t);this.data=np?new Map:new tp;var i=this;function r(e,t){n?i.set(e,t):i.set(t,e)}t instanceof e?t.each(r):t&&Th(t,r)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,i){e.call(t,n,i)})},e.prototype.keys=function(){var e=this.data.keys();return np?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function rp(e){return new ip(e)}function op(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var r=e.length;for(i=0;i<t.length;i++)n[i+r]=t[i];return n}function ap(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&bh(n,t),n}function sp(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function lp(e,t){return e.hasOwnProperty(t)}function up(){}var cp=180/Math.PI;function dp(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function hp(e,t){return e[0]=t[0],e[1]=t[1],e}function pp(e){return[e[0],e[1]]}function fp(e,t,n){return e[0]=t,e[1]=n,e}function gp(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function mp(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e}function vp(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function yp(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}function xp(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function _p(e,t){var n=yp(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function bp(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var wp=bp;var Cp=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function Sp(e,t,n,i){return e[0]=t[0]+i*(n[0]-t[0]),e[1]=t[1]+i*(n[1]-t[1]),e}function Mp(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r+n[4],e[1]=n[1]*i+n[3]*r+n[5],e}function Tp(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Ip(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Dp=function(){return function(e,t){this.target=e,this.topTarget=t&&t.topTarget}}(),kp=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Dp(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,r=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(r,o,e),this.handler.dispatchToElement(new Dp(t,e),"drag",e.event);var a=this.handler.findHover(n,i,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new Dp(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new Dp(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Dp(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Dp(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Ap=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof t&&(i=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),r[e]||(r[e]=[]);for(var a=0;a<r[e].length;a++)if(r[e][a].h===n)return this;var s={h:n,query:t,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},l=r[e].length-1,u=r[e][l];return u&&u.callAtLast?r[e].splice(l,0,s):r[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],r=0,o=n[e].length;r<o;r++)n[e][r].h!==t&&i.push(n[e][r]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],r=this._$eventProcessor;if(i)for(var o=t.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(e,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],r=this._$eventProcessor;if(i)for(var o=t.length,a=t[o-1],s=i.length,l=0;l<s;l++){var u=i[l];if(!r||!r.filter||null==u.query||r.filter(e,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,o-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),Ep=Math.log(2);function Np(e,t,n,i,r,o){var a=i+"-"+r,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~r)/Ep);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var d=0,h=0,p=0;h<s;h++){var f=1<<h;f&r||(d+=(p%2?-1:1)*e[n][h]*Np(e,t-1,c,u,r|f,o),p++)}return o[a]=d,d}function Lp(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},r=Np(n,8,0,0,0,i);if(0!==r){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Np(n,7,0===a?1:0,1<<a,1<<s,i)/r*t[a];return function(e,t,n){var i=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/i,e[1]=(t*o[3]+n*o[4]+o[5])/i}}}var Pp="___zrEVENTSAVED",Op=[];function Rp(e,t,n,i,r){if(t.getBoundingClientRect&&Qd.domSupported&&!Fp(t)){var o=t[Pp]||(t[Pp]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),s=function(e,t,n){for(var i=n?"invTrans":"trans",r=t[i],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&o&&h===o[d]&&p===o[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&r?r:(t.srcCoords=a,t[i]=n?Lp(s,a):Lp(a,s))}(a,o,r);if(s)return s(e,n,i),!0}return!1}function Fp(e){return"CANVAS"===e.nodeName.toUpperCase()}var zp=/([&<>"'])/g,Vp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Bp(e){return null==e?"":(e+"").replace(zp,function(e,t){return Vp[t]})}var jp=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gp=[],Wp=Qd.browser.firefox&&+Qd.browser.version.split(".")[0]<39;function Hp(e,t,n,i){return n=n||{},i?Up(e,t,n):Wp&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Up(e,t,n),n}function Up(e,t,n){if(Qd.domSupported&&e.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Fp(e)){var o=e.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Rp(Gp,e,i,r))return n.zrX=Gp[0],void(n.zrY=Gp[1])}n.zrX=n.zrY=0}function Yp(e){return e||window.event}function Zp(e,t,n){if(null!=(t=Yp(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];r&&Hp(e,r,t,n)}else{Hp(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,i=e.deltaY;if(null==n||null==i)return t;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&jp.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Xp(e,t,n,i){e.addEventListener(t,n,i)}function qp(e,t,n,i){e.removeEventListener(t,n,i)}var $p=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Kp(e){return 2===e.which||3===e.which}var Jp=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var r={points:[],touches:[],target:t,event:e},o=0,a=i.length;o<a;o++){var s=i[o],l=Hp(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},e.prototype._recognize=function(e){for(var t in ef)if(ef.hasOwnProperty(t)){var n=ef[t](this._track,e);if(n)return n}},e}();function Qp(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var ef={pinch:function(e,t){var n=e.length;if(n){var i,r=(e[n-1]||{}).points,o=(e[n-2]||{}).points||r;if(o&&o.length>1&&r&&r.length>1){var a=Qp(r)/Qp(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function tf(){return[1,0,0,1,0,0]}function nf(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function rf(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function of(e,t,n){var i=t[0]*n[0]+t[2]*n[1],r=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=r,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function af(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function sf(e,t,n,i){void 0===i&&(i=[0,0]);var r=t[0],o=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=r*d+s*c,e[1]=-r*c+s*d,e[2]=o*d+l*c,e[3]=-o*c+d*l,e[4]=d*(a-i[0])+c*(u-i[1])+i[0],e[5]=d*(u-i[1])-c*(a-i[0])+i[1],e}function lf(e,t,n){var i=n[0],r=n[1];return e[0]=t[0]*i,e[1]=t[1]*r,e[2]=t[2]*i,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*r,e}function uf(e,t){var n=t[0],i=t[2],r=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*i;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-a*r)*l,e[5]=(o*r-n*s)*l,e):null}var cf=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},e.lerp=function(e,t,n,i){var r=1-i;e.x=r*t.x+i*n.x,e.y=r*t.y+i*n.y},e}(),df=Math.min,hf=Math.max,pf=new cf,ff=new cf,gf=new cf,mf=new cf,vf=new cf,yf=new cf,xf=function(){function e(e,t,n,i){n<0&&(e+=n,n=-n),i<0&&(t+=i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}return e.prototype.union=function(e){var t=df(e.x,this.x),n=df(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=hf(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=hf(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,i=e.height/t.height,r=[1,0,0,1,0,0];return af(r,r,[-t.x,-t.y]),lf(r,r,[n,i]),af(r,r,[e.x,e.y]),r},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(o<l||u<r||s<c||d<a);if(n){var p=1/0,f=0,g=Math.abs(o-l),m=Math.abs(u-r),v=Math.abs(s-c),y=Math.abs(d-a),x=Math.min(g,m),_=Math.min(v,y);o<l||u<r?x>f&&(f=x,g<m?cf.set(yf,-g,0):cf.set(yf,m,0)):x<p&&(p=x,g<m?cf.set(vf,g,0):cf.set(vf,-m,0)),s<c||d<a?_>f&&(f=_,v<y?cf.set(yf,0,-v):cf.set(yf,0,y)):x<p&&(p=x,v<y?cf.set(vf,0,v):cf.set(vf,0,-y))}return n&&cf.copy(n,h?vf:yf),h},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return t.x=n.x*r+a,t.y=n.y*o+s,t.width=n.width*r,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}pf.x=gf.x=n.x,pf.y=mf.y=n.y,ff.x=mf.x=n.x+n.width,ff.y=gf.y=n.y+n.height,pf.transform(i),mf.transform(i),ff.transform(i),gf.transform(i),t.x=df(pf.x,ff.x,gf.x,mf.x),t.y=df(pf.y,ff.y,gf.y,mf.y);var l=hf(pf.x,ff.x,gf.x,mf.x),u=hf(pf.y,ff.y,gf.y,mf.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),_f="silent";function bf(){$p(this.event)}var wf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Kd(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ap),Cf=function(){return function(e,t){this.x=e,this.y=t}}(),Sf=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Mf=new xf(0,0,0,0),Tf=function(e){function t(t,n,i,r,o){var a=e.call(this)||this;return a._hovered=new Cf(0,0),a.storage=t,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new wf,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new kp(a),a}return Kd(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Th(Sf,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,i=kf(this,t,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new Cf(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new Cf(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var r="on"+t,o=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:bf}}(t,e,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(t,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[r]&&e[r].call(e,o),e.trigger&&e.trigger(t,o)}))}},t.prototype.findHover=function(e,t,n){var i=this.storage.getDisplayList(),r=new Cf(e,t);if(Df(i,r,e,t,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new xf(e-s,t-s,a,a),u=i.length-1;u>=0;u--){var c=i[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(Mf.copy(c.getBoundingRect()),c.transform&&Mf.applyTransform(c.transform),Mf.intersect(l)&&o.push(c))}if(o.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<h;f+=d){if(Df(o,r,e+p*Math.cos(f),t+p*Math.sin(f),n),r.target)return r}}return r},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new Jp);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var r=i.type;e.gestureEvent=r;var o=new Cf;o.target=i.target,this.dispatchToElement(o,r,i.event)}},t}(Ap);function If(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i=e,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(t,n))return!1}i.silent&&(r=!0);var s=i.__hostTarget;i=s||i.parent}return!r||_f}return!1}function Df(e,t,n,i,r){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==r&&!a.ignore&&(s=If(a,n,i))&&(!t.topTarget&&(t.topTarget=a),s!==_f)){t.target=a;break}}}function kf(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}Th(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Tf.prototype[e]=function(t){var n,i,r=t.zrX,o=t.zrY,a=kf(this,r,o);if("mouseup"===e&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||wp(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});function Af(e,t,n,i){var r=t+1;if(r===n)return 1;if(i(e[r++],e[t])<0){for(;r<n&&i(e[r],e[r-1])<0;)r++;!function(e,t,n){n--;for(;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,r)}else for(;r<n&&i(e[r],e[r-1])>=0;)r++;return r-t}function Ef(e,t,n,i,r){for(i===t&&i++;i<n;i++){for(var o,a=e[i],s=t,l=i;s<l;)r(a,e[o=s+l>>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function Nf(e,t,n,i,r,o){var a=0,s=0,l=1;if(o(e,t[n+r])>0){for(s=i-r;l<s&&o(e,t[n+r+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(e,t[n+r-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function Lf(e,t,n,i,r,o){var a=0,s=0,l=1;if(o(e,t[n+r])<0){for(s=r+1;l<s&&o(e,t[n+r-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l<s&&o(e,t[n+r+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])<0?l=c:a=c+1}return l}function Pf(e,t){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],d=i[s+1];i[s]=u+d,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var h=Lf(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=Nf(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,i,o,s){var l=0;for(l=0;l<i;l++)a[l]=e[n+l];var u=0,c=o,d=n;if(e[d++]=e[c++],0===--s){for(l=0;l<i;l++)e[d+l]=a[u+l];return}if(1===i){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=a[u])}var h,p,f,g=r;for(;;){h=0,p=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],p++,h=0,0===--s){f=!0;break}}else if(e[d++]=a[u++],h++,p=0,1===--i){f=!0;break}}while((h|p)<g);if(f)break;do{if(0!==(h=Lf(e[c],a,u,i,0,t))){for(l=0;l<h;l++)e[d+l]=a[u+l];if(d+=h,u+=h,(i-=h)<=1){f=!0;break}}if(e[d++]=e[c++],0===--s){f=!0;break}if(0!==(p=Nf(a[u],e,c,s,0,t))){for(l=0;l<p;l++)e[d+l]=e[c+l];if(d+=p,c+=p,0===(s-=p)){f=!0;break}}if(e[d++]=a[u++],1===--i){f=!0;break}g--}while(h>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=a[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)e[d+l]=a[u+l]}}(l,u,c,d):function(n,i,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+i-1,c=s-1,d=o+s-1,h=0,p=0;if(e[d--]=e[u--],0===--i){for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l];return}if(1===s){for(p=(d-=i)+1,h=(u-=i)+1,l=i-1;l>=0;l--)e[p+l]=e[h+l];return void(e[d]=a[c])}var f=r;for(;;){var g=0,m=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],g++,m=0,0===--i){v=!0;break}}else if(e[d--]=a[c--],m++,g=0,1===--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=i-Lf(a[c],e,n,i,i-1,t))){for(i-=g,p=(d-=g)+1,h=(u-=g)+1,l=g-1;l>=0;l--)e[p+l]=e[h+l];if(0===i){v=!0;break}}if(e[d--]=a[c--],1===--s){v=!0;break}if(0!==(m=s-Nf(e[u],a,0,s,s-1,t))){for(s-=m,p=(d-=m)+1,h=(c-=m)+1,l=0;l<m;l++)e[p+l]=a[h+l];if(s<=1){v=!0;break}}if(e[d--]=e[u--],0===--i){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(p=(d-=i)+1,h=(u-=i)+1,l=i-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l<s;l++)e[h+l]=a[l]}}(l,u,c,d))}return n=[],i=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,i[o]=t,o+=1}}}function Of(e,t,n,i){n||(n=0),i||(i=e.length);var r=i-n;if(!(r<2)){var o=0;if(r<32)Ef(e,n,i,n+(o=Af(e,n,i,t)),t);else{var a=Pf(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(r);do{if((o=Af(e,n,i,t))<s){var l=r;l>s&&(l=s),Ef(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var Rf=!1;function Ff(){Rf||(Rf=!0)}function zf(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Vf,Bf=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=zf}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,r=t.length;i<r;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,Of(n,zf)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath();if(e.ignoreClip)t=null;else if(i){t=t?t.slice():[];for(var r=i,o=e;r;)r.parent=o,r.updateTransform(),t.push(r),o=r,r=r.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=1),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(Ff(),u.z=0),isNaN(u.z2)&&(Ff(),u.z2=0),isNaN(u.zlevel)&&(Ff(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var i=Ch(this._roots,e);i>=0&&this._roots.splice(i,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}();Vf=Qd.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var jf={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,i=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=i*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-jf.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*jf.bounceIn(2*e):.5*jf.bounceOut(2*e-1)+.5}},Gf=Math.pow,Wf=Math.sqrt,Hf=1e-8,Uf=1e-4,Yf=Wf(3),Zf=1/3,Xf=dp(),qf=dp(),$f=dp();function Kf(e){return e>-1e-8&&e<Hf}function Jf(e){return e>Hf||e<-1e-8}function Qf(e,t,n,i,r){var o=1-r;return o*o*(o*e+3*r*t)+r*r*(r*i+3*o*n)}function eg(e,t,n,i,r){var o=1-r;return 3*(((t-e)*o+2*(n-t)*r)*o+(i-n)*r*r)}function tg(e,t,n,i,r,o){var a=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-r,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(Kf(c)&&Kf(d)){if(Kf(s))o[0]=0;else(S=-l/s)>=0&&S<=1&&(o[p++]=S)}else{var f=d*d-4*c*h;if(Kf(f)){var g=d/c,m=-g/2;(S=-s/a+g)>=0&&S<=1&&(o[p++]=S),m>=0&&m<=1&&(o[p++]=m)}else if(f>0){var v=Wf(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(S=(-s-((y=y<0?-Gf(-y,Zf):Gf(y,Zf))+(x=x<0?-Gf(-x,Zf):Gf(x,Zf))))/(3*a))>=0&&S<=1&&(o[p++]=S)}else{var _=(2*c*s-3*a*d)/(2*Wf(c*c*c)),b=Math.acos(_)/3,w=Wf(c),C=Math.cos(b),S=(-s-2*w*C)/(3*a),M=(m=(-s+w*(C+Yf*Math.sin(b)))/(3*a),(-s+w*(C-Yf*Math.sin(b)))/(3*a));S>=0&&S<=1&&(o[p++]=S),m>=0&&m<=1&&(o[p++]=m),M>=0&&M<=1&&(o[p++]=M)}}return p}function ng(e,t,n,i,r){var o=6*n-12*t+6*e,a=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(Kf(a)){if(Jf(o))(c=-s/o)>=0&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if(Kf(u))r[0]=-o/(2*a);else if(u>0){var c,d=Wf(u),h=(-o-d)/(2*a);(c=(-o+d)/(2*a))>=0&&c<=1&&(r[l++]=c),h>=0&&h<=1&&(r[l++]=h)}}return l}function ig(e,t,n,i,r,o){var a=(t-e)*r+e,s=(n-t)*r+t,l=(i-n)*r+n,u=(s-a)*r+a,c=(l-s)*r+s,d=(c-u)*r+u;o[0]=e,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=i}function rg(e,t,n,i,r,o,a,s,l,u,c){var d,h,p,f,g,m=.005,v=1/0;Xf[0]=l,Xf[1]=u;for(var y=0;y<1;y+=.05)qf[0]=Qf(e,n,r,a,y),qf[1]=Qf(t,i,o,s,y),(f=Cp(Xf,qf))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Uf);x++)h=d-m,p=d+m,qf[0]=Qf(e,n,r,a,h),qf[1]=Qf(t,i,o,s,h),f=Cp(qf,Xf),h>=0&&f<v?(d=h,v=f):($f[0]=Qf(e,n,r,a,p),$f[1]=Qf(t,i,o,s,p),g=Cp($f,Xf),p<=1&&g<v?(d=p,v=g):m*=.5);return c&&(c[0]=Qf(e,n,r,a,d),c[1]=Qf(t,i,o,s,d)),Wf(v)}function og(e,t,n,i,r,o,a,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,g=Qf(e,n,r,a,f),m=Qf(t,i,o,s,f),v=g-u,y=m-c;d+=Math.sqrt(v*v+y*y),u=g,c=m}return d}function ag(e,t,n,i){var r=1-i;return r*(r*e+2*i*t)+i*i*n}function sg(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))}function lg(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i}function ug(e,t,n,i,r){var o=(t-e)*i+e,a=(n-t)*i+t,s=(a-o)*i+o;r[0]=e,r[1]=o,r[2]=s,r[3]=s,r[4]=a,r[5]=n}function cg(e,t,n,i,r,o,a,s,l){var u,c=.005,d=1/0;Xf[0]=a,Xf[1]=s;for(var h=0;h<1;h+=.05){qf[0]=ag(e,n,r,h),qf[1]=ag(t,i,o,h),(m=Cp(Xf,qf))<d&&(u=h,d=m)}d=1/0;for(var p=0;p<32&&!(c<Uf);p++){var f=u-c,g=u+c;qf[0]=ag(e,n,r,f),qf[1]=ag(t,i,o,f);var m=Cp(qf,Xf);if(f>=0&&m<d)u=f,d=m;else{$f[0]=ag(e,n,r,g),$f[1]=ag(t,i,o,g);var v=Cp($f,Xf);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=ag(e,n,r,u),l[1]=ag(t,i,o,u)),Wf(d)}function dg(e,t,n,i,r,o,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=ag(e,n,r,h),f=ag(t,i,o,h),g=p-s,m=f-l;u+=Math.sqrt(g*g+m*m),s=p,l=f}return u}var hg=/cubic-bezier\(([0-9,\.e ]+)\)/;function pg(e){var t=e&&hg.exec(e);if(t){var n=t[1].split(","),i=+Kh(n[0]),r=+Kh(n[1]),o=+Kh(n[2]),a=+Kh(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:tg(0,i,o,1,e,s)&&Qf(0,r,a,1,s[0])}}}var fg=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||up,this.ondestroy=e.ondestroy||up,this.onrestart=e.onrestart||up,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,i=e-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Ph(e)?e:jf[e]||pg(e)},e}(),gg=function(){return function(e){this.value=e}}(),mg=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new gg(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),vg=function(){function e(e){this._list=new mg,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,i=this._map,r=null;if(null==i[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new gg(t),a.key=e,n.insertEntry(a),i[e]=a}return r},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),yg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function xg(e){return(e=Math.round(e))<0?0:e>255?255:e}function _g(e){return e<0?0:e>1?1:e}function bg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?xg(parseFloat(t)/100*255):xg(parseInt(t,10))}function wg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?_g(parseFloat(t)/100):_g(parseFloat(t))}function Cg(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Sg(e,t,n){return e+(t-e)*n}function Mg(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function Tg(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ig=new vg(20),Dg=null;function kg(e,t){Dg&&Tg(Dg,t),Dg=Ig.put(e,Dg||t.slice())}function Ag(e,t){if(e){t=t||[];var n=Ig.get(e);if(n)return Tg(t,n);var i=(e+="").replace(/ /g,"").toLowerCase();if(i in yg)return Tg(t,yg[i]),kg(e,t),t;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Mg(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),kg(e,t),t):void Mg(t,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Mg(t,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),kg(e,t),t):void Mg(t,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Mg(t,+u[0],+u[1],+u[2],1):Mg(t,0,0,0,1);c=wg(u.pop());case"rgb":return u.length>=3?(Mg(t,bg(u[0]),bg(u[1]),bg(u[2]),3===u.length?c:wg(u[3])),kg(e,t),t):void Mg(t,0,0,0,1);case"hsla":return 4!==u.length?void Mg(t,0,0,0,1):(u[3]=wg(u[3]),Eg(u,t),kg(e,t),t);case"hsl":return 3!==u.length?void Mg(t,0,0,0,1):(Eg(u,t),kg(e,t),t);default:return}}Mg(t,0,0,0,1)}}function Eg(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=wg(e[1]),r=wg(e[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Mg(t=t||[],xg(255*Cg(a,o,n+1/3)),xg(255*Cg(a,o,n)),xg(255*Cg(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Ng(e,t){var n=Ag(e);if(n){for(var i=0;i<3;i++)n[i]=t<0?n[i]*(1-t)|0:(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return Rg(n,4===n.length?"rgba":"rgb")}}function Lg(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),r=Math.floor(i),o=Math.ceil(i),a=t[r],s=t[o],l=i-r;return n[0]=xg(Sg(a[0],s[0],l)),n[1]=xg(Sg(a[1],s[1],l)),n[2]=xg(Sg(a[2],s[2],l)),n[3]=_g(Sg(a[3],s[3],l)),n}}function Pg(e,t,n,i){var r=Ag(e);if(e)return r=function(e){if(e){var t,n,i=e[0]/255,r=e[1]/255,o=e[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-i)/6+l/2)/l,d=((s-r)/6+l/2)/l,h=((s-o)/6+l/2)/l;i===s?t=h-d:r===s?t=1/3+c-h:o===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(r),null!=t&&(r[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(r[1]=wg(n)),null!=i&&(r[2]=wg(i)),Rg(Eg(r),"rgba")}function Og(e,t){var n=Ag(e);if(n&&null!=t)return n[3]=_g(t),Rg(n,"rgba")}function Rg(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}function Fg(e,t){var n=Ag(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var zg=new vg(100);function Vg(e){if(Oh(e)){var t=zg.get(e);return t||(t=Ng(e,-.1),zg.put(e,t)),t}if(Gh(e)){var n=bh({},e);return n.colorStops=Ih(e.colorStops,function(e){return{offset:e.offset,color:Ng(e.color,-.1)}}),n}return e}var Bg=Math.round;function jg(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=Ag(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var Gg=1e-4;function Wg(e){return e<Gg&&e>-1e-4}function Hg(e){return Bg(1e3*e)/1e3}function Ug(e){return Bg(1e4*e)/1e4}var Yg={left:"start",right:"end",center:"middle",middle:"middle"};function Zg(e){return e&&!!e.image}function Xg(e){return Zg(e)||function(e){return e&&!!e.svgElement}(e)}function qg(e){return"linear"===e.type}function $g(e){return"radial"===e.type}function Kg(e){return e&&("linear"===e.type||"radial"===e.type)}function Jg(e){return"url(#"+e+")"}function Qg(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function em(e){var t=e.x||0,n=e.y||0,i=(e.rotation||0)*cp,r=Yh(e.scaleX,1),o=Yh(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+Bg(a*cp)+"deg, "+Bg(s*cp)+"deg)"),l.join(" ")}var tm=Qd.hasGlobalWindow&&Ph(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!=typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return"production"!==process.env.NODE_ENV&&vh("Base64 isn't natively supported in the current environment."),null},nm=Array.prototype.slice;function im(e,t,n){return(t-e)*n+e}function rm(e,t,n,i){for(var r=t.length,o=0;o<r;o++)e[o]=im(t[o],n[o],i);return e}function om(e,t,n,i){for(var r=t.length,o=0;o<r;o++)e[o]=t[o]+n[o]*i;return e}function am(e,t,n,i){for(var r=t.length,o=r&&t[0].length,a=0;a<r;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*i}return e}function sm(e,t){for(var n=e.length,i=t.length,r=n>i?t:e,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,i);s++)r.push({offset:a.offset,color:a.color.slice()})}function lm(e,t,n){var i=e,r=t;if(i.push&&r.push){var o=i.length,a=r.length;if(o!==a)if(o>a)i.length=a;else for(var s=o;s<a;s++)i.push(1===n?r[s]:nm.call(r[s]));var l=i[0]&&i[0].length;for(s=0;s<i.length;s++)if(1===n)isNaN(i[s])&&(i[s]=r[s]);else for(var u=0;u<l;u++)isNaN(i[s][u])&&(i[s][u]=r[s][u])}}function um(e){if(Mh(e)){var t=e.length;if(Mh(e[0])){for(var n=[],i=0;i<t;i++)n.push(nm.call(e[i]));return n}return nm.call(e)}return e}function cm(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function dm(e){return 4===e||5===e}function hm(e){return 1===e||2===e}var pm=[0,0,0,0],fm=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=t;if(Mh(t)){var l=function(e){return Mh(e&&e[0])?2:1}(t);a=l,(1===l&&!Fh(t[0])||2===l&&!Fh(t[0][0]))&&(o=!0)}else if(Fh(t)&&!Hh(t))a=0;else if(Oh(t))if(isNaN(+t)){var u=Ag(t);u&&(s=u,a=3)}else a=0;else if(Gh(t)){var c=bh({},s);c.colorStops=Ih(t.colorStops,function(e){return{offset:e.offset,color:Ag(e.color)}}),qg(t)?a=4:$g(t)&&(a=5),s=c}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Ph(n)?n:jf[n]||pg(n)),i.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=hm(i),l=dm(i),u=0;u<r;u++){var c=n[u],d=c.value,h=o.value;c.percent=c.time/e,a||(s&&u!==r-1?lm(d,h,i):l&&sm(d.colorStops,h.colorStops))}if(!a&&5!==i&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;var p=n[0].value;for(u=0;u<r;u++)0===i?n[u].additiveValue=n[u].value-p:3===i?n[u].additiveValue=om([],n[u].value,p,-1):hm(i)&&(n[u].additiveValue=1===i?om([],n[u].value,p,-1):am([],n[u].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,i,r,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,h=this._lastFr,p=Math.min;if(1===u)i=r=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=p(h+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;n<u&&!(l[n].percent>t);n++);n=p(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=t;var f=r.percent-i.percent,g=0===f?1:p((t-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var m=o?this._additiveValue:d?pm:e[c];if(!hm(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[c]=g<1?i.rawValue:r.rawValue;else if(hm(s))1===s?rm(m,i[a],r[a],g):function(e,t,n,i){for(var r=t.length,o=r&&t[0].length,a=0;a<r;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=im(t[a][s],n[a][s],i)}}(m,i[a],r[a],g);else if(dm(s)){var v=i[a],y=r[a],x=4===s;e[c]={type:x?"linear":"radial",x:im(v.x,y.x,g),y:im(v.y,y.y,g),colorStops:Ih(v.colorStops,function(e,t){var n=y.colorStops[t];return{offset:im(e.offset,n.offset,g),color:cm(rm([],e.color,n.color,g))}}),global:y.global},x?(e[c].x2=im(v.x2,y.x2,g),e[c].y2=im(v.y2,y.y2,g)):e[c].r=im(v.r,y.r,g)}else if(d)rm(m,i[a],r[a],g),o||(e[c]=cm(m));else{var _=im(i[a],r[a],g);o?this._additiveValue=_:e[c]=_}o&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;0===t?e[n]=e[n]+i:3===t?(Ag(e[n],pm),om(pm,pm,i,1),e[n]=cm(pm)):1===t?om(e[n],e[n],i,1):2===t&&am(e[n],e[n],i,1)},e}(),gm=function(){function e(e,t,n,i){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i?vh("Can' use additive animation on looped animation."):(this._additiveAnimators=i,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Ah(t),n)},e.prototype.whenWithKeys=function(e,t,n,i){for(var r=this._tracks,o=0;o<n.length;o++){var a=n[o],s=r[a];if(!s){s=r[a]=new fm(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=cm(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,um(l),i),this._trackKeys.push(a)}s.addKeyframe(e,um(t[a]),i)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var r=n[i].getTrack(e);r&&(t=r)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,r=0;r<this._trackKeys.length;r++){var o=this._trackKeys[r],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(i,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new fg({life:i,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var i=t._additiveAnimators;if(i){for(var r=!1,o=0;o<i.length;o++)if(i[o]._clip){r=!0;break}r||(t._additiveAnimators=null)}for(o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return Ih(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,r=0;r<e.length;r++){var o=n[e[r]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(r=0;r<i.length;r++)if(!n[i[r]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var r=t[i],o=this._tracks[r];if(o&&!o.isFinished()){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[r]=um(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||Ah(e);for(var n=0;n<t.length;n++){var i=t[n],r=this._tracks[i];if(r){var o=r.keyframes;if(o.length>1){var a=o.pop();r.addKeyframe(a.time,e[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},e}();function mm(){return(new Date).getTime()}var vm,ym,xm=function(e){function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return Kd(t,e),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=mm()-this._pausedTime,n=t-this._time,i=this._head;i;){var r=i.next;i.step(t,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,Vf(function t(){e._running&&(Vf(t),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=mm(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=mm(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=mm()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return null==this._head},t.prototype.animate=function(e,t){t=t||{},this.start();var n=new gm(e,t.loop);return this.addAnimator(n),n},t}(Ap),_m=Qd.domSupported,bm=(ym={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:vm=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Ih(vm,function(e){var t=e.replace("mouse","pointer");return ym.hasOwnProperty(t)?t:e})}),wm=["mousemove","mouseup"],Cm=["pointermove","pointerup"],Sm=!1;function Mm(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Tm(e){e&&(e.zrByTouch=!0)}function Im(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}var Dm=function(){return function(e,t){this.stopPropagation=up,this.stopImmediatePropagation=up,this.preventDefault=up,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}}(),km={mousedown:function(e){e=Zp(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Zp(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Zp(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Im(this,(e=Zp(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Sm=!0,e=Zp(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Sm||(e=Zp(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Tm(e=Zp(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),km.mousemove.call(this,e),km.mousedown.call(this,e)},touchmove:function(e){Tm(e=Zp(this.dom,e)),this.handler.processGesture(e,"change"),km.mousemove.call(this,e)},touchend:function(e){Tm(e=Zp(this.dom,e)),this.handler.processGesture(e,"end"),km.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&km.click.call(this,e)},pointerdown:function(e){km.mousedown.call(this,e)},pointermove:function(e){Mm(e)||km.mousemove.call(this,e)},pointerup:function(e){km.mouseup.call(this,e)},pointerout:function(e){Mm(e)||km.mouseout.call(this,e)}};Th(["click","dblclick","contextmenu"],function(e){km[e]=function(t){t=Zp(this.dom,t),this.trigger(e,t)}});var Am={pointermove:function(e){Mm(e)||Am.mousemove.call(this,e)},pointerup:function(e){Am.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Em(e,t){var n=t.domHandlers;Qd.pointerEventsSupported?Th(bm.pointer,function(i){Lm(t,i,function(t){n[i].call(e,t)})}):(Qd.touchEventsSupported&&Th(bm.touch,function(i){Lm(t,i,function(r){n[i].call(e,r),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}(t)})}),Th(bm.mouse,function(i){Lm(t,i,function(r){r=Yp(r),t.touching||n[i].call(e,r)})}))}function Nm(e,t){function n(n){Lm(t,n,function(i){i=Yp(i),Im(e,i.target)||(i=function(e,t){return Zp(e.dom,new Dm(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))},{capture:!0})}Qd.pointerEventsSupported?Th(Cm,n):Qd.touchEventsSupported||Th(wm,n)}function Lm(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Xp(e.domTarget,t,n,i)}function Pm(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&qp(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Om=function(){return function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}}(),Rm=function(e){function t(t,n){var i=e.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=n,i._localHandlerScope=new Om(t,km),_m&&(i._globalHandlerScope=new Om(document,Am)),Em(i,i._localHandlerScope),i}return Kd(t,e),t.prototype.dispose=function(){Pm(this._localHandlerScope),_m&&Pm(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,_m&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Nm(this,t):Pm(t)}},t}(Ap),Fm=1;Qd.hasGlobalWindow&&(Fm=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var zm=Fm,Vm="#333",Bm="#ccc",jm=nf,Gm=5e-5;function Wm(e){return e>Gm||e<-5e-5}var Hm=[],Um=[],Ym=[1,0,0,1,0,0],Zm=Math.abs,Xm=function(){function e(){}var t;return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Wm(this.rotation)||Wm(this.x)||Wm(this.y)||Wm(this.scaleX-1)||Wm(this.scaleY-1)||Wm(this.skewX)||Wm(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):jm(n),e&&(t?of(n,e,n):rf(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(jm(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Hm);var n=Hm[0]<0?-1:1,i=Hm[1]<0?-1:1,r=((Hm[0]-n)*t+n)/Hm[0]||0,o=((Hm[1]-i)*t+i)/Hm[1]||0;e[0]*=r,e[1]*=r,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],uf(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),r=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(r),t=Math.sqrt(t),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],of(Um,e.invTransform,t),t=Um);var n=this.originX,i=this.originY;(n||i)&&(Ym[4]=n,Ym[5]=i,of(Um,t,Ym),Um[4]-=n,Um[5]-=i,t=Um),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&Mp(n,n,i),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Mp(n,n,i),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Zm(e[0]-1)>1e-10&&Zm(e[3]-1)>1e-10?Math.sqrt(Zm(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){$m(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,r=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||i||a||s){var p=n+a,f=i+s;t[4]=-p*r-d*f*o,t[5]=-f*o-h*p*r}else t[4]=t[5]=0;return t[0]=r,t[3]=o,t[1]=h*r,t[2]=d*o,l&&sf(t,t,l),t[4]+=n+u,t[5]+=i+c,t},e.initDefaultProps=((t=e.prototype).scaleX=t.scaleY=t.globalScaleRatio=1,void(t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0)),e}(),qm=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function $m(e,t){for(var n=0;n<qm.length;n++){var i=qm[n];e[i]=t[i]}}var Km={};function Jm(e,t){var n=Km[t=t||th];n||(n=Km[t]=new vg(500));var i=n.get(e);return null==i&&(i=ih.measureText(e,t).width,n.put(e,i)),i}function Qm(e,t,n,i){var r=Jm(e,t),o=iv(t),a=tv(0,r,n),s=nv(0,o,i);return new xf(a,s,r,o)}function ev(e,t,n,i){var r=((e||"")+"").split("\n");if(1===r.length)return Qm(r[0],t,n,i);for(var o=new xf(0,0,0,0),a=0;a<r.length;a++){var s=Qm(r[a],t,n,i);0===a?o.copy(s):o.union(s)}return o}function tv(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function nv(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function iv(e){return Jm("国",e)}function rv(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function ov(e,t,n){var i=t.position||"inside",r=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",d="top";if(i instanceof Array)l+=rv(i[0],n.width),u+=rv(i[1],n.height),c=null,d=null;else switch(i){case"left":l-=r,u+=s,c="right",d="middle";break;case"right":l+=r+a,u+=s,d="middle";break;case"top":l+=a/2,u-=r,c="center",d="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=r,u+=s,d="middle";break;case"insideRight":l+=a-r,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",d="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,d="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var av="__zr_normal__",sv=qm.concat(["ignore"]),lv=Dh(qm,function(e,t){return e[t]=!0,e},{ignore:!1}),uv={},cv=new xf(0,0,0,0),dv=function(){function e(e){this.id=mh(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=t.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(t),null!=n.position){var u=cv;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(uv,n,u):ov(uv,n,u),r.x=uv.x,r.y=uv.y,o=uv.align,a=uv.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=rv(c[0],u.width),h=rv(c[1],u.height)),l=!0,r.originX=-r.x+d+(i?0:u.x),r.originY=-r.y+h+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var p=n.offset;p&&(r.x+=p[0],r.y+=p[1],l||(r.originX=-p[0],r.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=n.insideFill,v=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=n.outsideFill,v=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Bm:Vm},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Ag(t);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,Rg(n,"rgba")},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},bh(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(zh(e))for(var n=Ah(e),i=0;i<n.length;i++){var r=n[i];this.attrKV(r,e[r])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],r=i.__fromStateTransition;if(!(i.getLoop()||r&&r!==av)){var o=i.targetName,a=o?t[o]:t;i.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,sv)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var i=0;i<n.length;i++){var r=n[i];null==e[r]||r in t||(t[r]=this[r])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(av,!1,e)},e.prototype.useState=function(e,t,n,i){var r=e===av;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(Ch(o,e)>=0)||!t&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),r?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}vh("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s<o;s++)if(e[s]!==r[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&i.push(u)}var c=i[o-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=Ch(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),r=Ch(i,e),o=Ch(i,t)>=0;r>=0?o?i.splice(r,1):i[r]=t:n&&!o&&i.push(t),this.useStates(i)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},i=0;i<e.length;i++){var r=e[i];bh(n,r),r.textConfig&&bh(t=t||{},r.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,i,r,o){var a=!(t&&i);t&&t.textConfig?(this.textConfig=bh({},i?this.textConfig:n.textConfig),bh(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<sv.length;u++){var c=sv[u],d=r&&lv[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!r)for(u=0;u<this.animators.length;u++){var h=this.animators[u],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if(!e.__zr||e.__hostTarget){if(e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}else if("production"!==process.env.NODE_ENV)throw new Error("Recursive component attachment.")}else if("production"!==process.env.NODE_ENV)throw new Error("Text element has been added to zrender.")},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),"production"!==process.env.NODE_ENV&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new Xm,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),bh(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var i=e?this[e]:this;if("production"===process.env.NODE_ENV||i){var r=new gm(i,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r}vh('Property "'+e+'" is not existed in element '+this.id)},e.prototype.addAnimator=function(e,t){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,n=Ch(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,r=[],o=0;o<i;o++){var a=n[o];e&&e!==a.scope?r.push(a):a.stop(t)}return this.animators=r,this},e.prototype.animateTo=function(e,t,n){hv(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){hv(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,i){for(var r=hv(this,t,n,i),o=0;o<r.length;o++)r[o].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1;var n={};function i(e,t,i){n[e+t+i]||(n[e+t+i]=!0)}function r(e,n,r,o){function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){("production"!==process.env.NODE_ENV&&i(e,r,o),this[n])||a(this,this[n]=[]);return this[n]},set:function(t){"production"!==process.env.NODE_ENV&&i(e,r,o),this[r]=t[0],this[o]=t[1],this[n]=t,a(this,t)}})}Object.defineProperty&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),e}();function hv(e,t,n,i,r){var o=[];gv(e,"",e,t,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during(function(e,t){n.during(t)});for(var h=0;h<o.length;h++){var p=o[h];c&&p.done(c),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function pv(e,t,n){for(var i=0;i<n;i++)e[i]=t[i]}function fv(e,t,n){if(Mh(t[n]))if(Mh(e[n])||(e[n]=[]),Bh(t[n])){var i=t[n].length;e[n].length!==i&&(e[n]=new t[n].constructor(i),pv(e[n],t[n],i))}else{var r=t[n],o=e[n],a=r.length;if(Mh(r[0]))for(var s=r[0].length,l=0;l<a;l++)o[l]?pv(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else pv(o,r,a);o.length=r.length}else e[n]=t[n]}function gv(e,t,n,i,r,o,a,s){for(var l=Ah(i),u=r.duration,c=r.delay,d=r.additive,h=r.setToFinal,p=!zh(o),f=e.animators,g=[],m=0;m<l.length;m++){var v=l[m],y=i[v];if(null!=y&&null!=n[v]&&(p||o[v]))if(!zh(y)||Mh(y)||Gh(y))g.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}gv(e,v,n[v],y,r,o&&o[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),g.push(v))}var x=g.length;if(!d&&x)for(var _=0;_<f.length;_++){if((w=f[_]).targetName===t)if(w.stopTracks(g)){var b=Ch(f,w);f.splice(b,1)}}if(r.force||(g=kh(g,function(e){return t=i[e],r=n[e],!(t===r||Mh(t)&&Mh(r)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}(t,r));var t,r}),x=g.length),x>0||r.force&&!a.length){var w,C=void 0,S=void 0,M=void 0;if(s){S={},h&&(C={});for(_=0;_<x;_++){S[v=g[_]]=n[v],h?C[v]=i[v]:n[v]=i[v]}}else if(h){M={};for(_=0;_<x;_++){M[v=g[_]]=um(n[v]),fv(n,i,v)}}(w=new gm(n,!1,!1,d?kh(f,function(e){return e.targetName===t}):null)).targetName=t,r.scope&&(w.scope=r.scope),h&&C&&w.whenWithKeys(0,C,g),M&&w.whenWithKeys(0,M,g),w.whenWithKeys(null==u?500:u,s?S:i,g).delay(c||0),e.addAnimator(w,t),a.push(w)}}Sh(dv,Ap),Sh(dv,Xm);var mv=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return Kd(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),"production"!==process.env.NODE_ENV&&e.__hostTarget))throw"This elemenet has been used as an attachment";return this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,i=n.indexOf(t);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Ch(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,i=n[t];if(e&&e!==this&&e.parent!==this&&e!==i){n[t]=e,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,i=Ch(n,e);return i<0||(n.splice(i,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var i=e[n];t&&i.removeSelfFromZr(t),i.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];e.call(t,r,i)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n],r=e.call(t,i);i.isGroup&&!r&&i.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new xf(0,0,0,0),n=e||this._children,i=[],r=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(i);l?(xf.applyTransform(t,s,l),(r=r||t.clone()).union(t)):(r=r||s.clone()).union(s)}}return r||t},t}(dv);mv.prototype.type="group";
|
|
16
|
-
/*!
|
|
17
|
-
* ZRender, a high performance 2d drawing library.
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) 2013, Baidu Inc.
|
|
20
|
-
* All rights reserved.
|
|
21
|
-
*
|
|
22
|
-
* LICENSE
|
|
23
|
-
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
24
|
-
*/
|
|
25
|
-
var vv={},yv={};var xv,_v=function(){function e(e,t,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var r=new Bf,o=n.renderer||"canvas";if(vv[o]||(o=Ah(vv)[0]),"production"!==process.env.NODE_ENV&&!vv[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new vv[o](t,r,n,e),s=n.ssr||a.ssrOnly;this.storage=r,this.painter=a;var l,u=Qd.node||Qd.worker||s?null:new Rm(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Qd.touchEventsSupported:!!c)&&(l=Yh(n.pointerSize,44)),this.handler=new Tf(r,a,u,a.root,l),this.animation=new xm({stage:{update:s?null:function(){return i._flush(!0)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(!e)return!1;if("string"==typeof e)return Fg(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,i=t.length,r=0;r<i;r++)n+=Fg(t[r].color,1);return(n/=i)<.4}return!1}(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=mm();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=mm();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof mv&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){var e;this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,e=this.id,delete yv[e])},e}();function bv(e,t){var n=new _v(mh(),e,t);return yv[n.id]=n,n}var wv=1e-4;function Cv(e,t,n,i){var r=t[0],o=t[1],a=n[0],s=n[1],l=o-r,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(i)if(l>0){if(e<=r)return a;if(e>=o)return s}else{if(e>=r)return a;if(e<=o)return s}else{if(e===r)return a;if(e===o)return s}return(e-r)/l*u+a}function Sv(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Oh(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Mv(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Tv(e){return e.sort(function(e,t){return e-t}),e}function Iv(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return Dv(e)}function Dv(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),i=n>0?+t.slice(n+1):0,r=n>0?n:t.length,o=t.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function kv(e,t){var n=Math.log,i=Math.LN10,r=Math.floor(n(e[1]-e[0])/i),o=Math.round(n(Math.abs(t[1]-t[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Av(e,t){var n=Math.max(Iv(e),Iv(t)),i=e+t;return n>20?i:Mv(i,n)}var Ev=9007199254740991;function Nv(e){var t=2*Math.PI;return(e%t+t)%t}function Lv(e){return e>-1e-4&&e<wv}var Pv=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ov(e){if(e instanceof Date)return e;if(Oh(e)){var t=Pv.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return null==e?new Date(NaN):new Date(Math.round(e))}function Rv(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}function Fv(e,t){var n=Rv(e),i=Math.pow(10,n),r=e/i;return e=(r<1.5?1:r<2.5?2:r<4?3:r<7?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e}function zv(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],o=n-i;return o?r+o*(e[i]-r):r}function Vv(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,i=0;i<e.length;){for(var r=e[i].interval,o=e[i].close,a=0;a<2;a++)r[a]<=t&&(r[a]=t,o[a]=a?1:1-n),t=r[a],n=o[a];r[0]===r[1]&&o[0]*o[1]!==1?e.splice(i,1):i++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function Bv(e){var t=parseFloat(e);return t==e&&(0!==t||!Oh(e)||e.indexOf("x")<=0)?t:NaN}function jv(e){return!isNaN(Bv(e))}function Gv(){return Math.round(9*Math.random())}function Wv(e,t){return 0===t?e:Wv(t,e%t)}function Hv(e,t){return null==e?t:null==t?e:e*t/Wv(e,t)}var Uv={},Yv="undefined"!=typeof console&&console.warn&&console.log;function Zv(e,t,n){if(Yv&&n){if(Uv[t])return;Uv[t]=!0}}function Xv(e,t){Zv(0,e,t)}function qv(e,t){Zv(0,e,t)}function $v(e){"production"!==process.env.NODE_ENV&&Zv(0,"DEPRECATED: "+e,!0)}function Kv(e,t,n){"production"!==process.env.NODE_ENV&&$v((n?"["+n+"]":"")+e+" is deprecated, use "+t+" instead.")}function Jv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="";if("production"!==process.env.NODE_ENV){var i=function(e){return void 0===e?"undefined":e===1/0?"Infinity":e===-1/0?"-Infinity":Hh(e)?"NaN":e instanceof Date?"Date("+e.toISOString()+")":Ph(e)?"function () { ... }":Wh(e)?e+"":null};n=Ih(e,function(e){if(Oh(e))return e;var t=i(e);if(null!=t)return t;if("undefined"==typeof JSON||!JSON.stringify)return"?";try{return JSON.stringify(e,function(e,t){var n=i(t);return null==n?t:n})}catch(_1){return"?"}}).join(" ")}return n}function Qv(e){throw new Error(e)}function ey(e,t,n){return(t-e)*n+e}var ty="series\0",ny="\0_ec_\0";function iy(e){return e instanceof Array?e:null==e?[]:[e]}function ry(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var oy=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function ay(e){return!zh(e)||Lh(e)||e instanceof Date?e:e.value}function sy(e){return zh(e)&&!(e instanceof Array)}function ly(e,t,n){var i="normalMerge"===n,r="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=rp();Th(t,function(e,n){zh(e)?"production"!==process.env.NODE_ENV&&(null==e.id||py(e.id)||hy(e.id),null==e.name||py(e.name)||hy(e.name)):t[n]=null});var s,l,u=function(e,t,n){var i=[];if("replaceAll"===n)return i;for(var r=0;r<e.length;r++){var o=e[r];o&&null!=o.id&&t.set(o.id,r),i.push({existing:"replaceMerge"===n||gy(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(e,a,n);return(i||r)&&function(e,t,n,i){Th(i,function(r,o){if(r&&null!=r.id){var a=cy(r.id),s=n.get(a);if(null!=s){var l=e[s];$h(!l.newOption,'Duplicated option on id "'+a+'".'),l.newOption=r,l.existing=t[s],i[o]=null}}})}(u,e,a,t),i&&function(e,t){Th(t,function(n,i){if(n&&null!=n.name)for(var r=0;r<e.length;r++){var o=e[r].existing;if(!e[r].newOption&&o&&(null==o.id||null==n.id)&&!gy(n)&&!gy(o)&&uy("name",o,n))return e[r].newOption=n,void(t[i]=null)}})}(u,t),i||r?function(e,t,n){Th(t,function(t){if(t){for(var i,r=0;(i=e[r])&&(i.newOption||gy(i.existing)||i.existing&&null!=t.id&&!uy("id",t,i.existing));)r++;i?(i.newOption=t,i.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),r++}})}(u,t,r):o&&function(e,t){Th(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}(u,t),s=u,l=rp(),Th(s,function(e){var t=e.existing;t&&l.set(t.id,e)}),Th(s,function(e){var t=e.newOption;$h(!t||null==t.id||!l.get(t.id)||l.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&l.set(t.id,e),!e.keyInfo&&(e.keyInfo={})}),Th(s,function(e,t){var n=e.existing,i=e.newOption,r=e.keyInfo;if(zh(i)){if(r.name=null!=i.name?cy(i.name):n?n.name:ty+t,n)r.id=cy(n.id);else if(null!=i.id)r.id=cy(i.id);else{var o=0;do{r.id="\0"+r.name+"\0"+o++}while(l.get(r.id))}l.set(r.id,e)}}),u}function uy(e,t,n){var i=dy(t[e],null),r=dy(n[e],null);return null!=i&&null!=r&&i===r}function cy(e){if("production"!==process.env.NODE_ENV&&null==e)throw new Error;return dy(e,"")}function dy(e,t){return null==e?t:Oh(e)?e:Fh(e)||Rh(e)?e+"":t}function hy(e){"production"!==process.env.NODE_ENV&&Xv("`"+e+"` is invalid id or name. Must be a string or number.")}function py(e){return Rh(e)||jv(e)}function fy(e){var t=e.name;return!(!t||!t.indexOf(ty))}function gy(e){return e&&null!=e.id&&0===cy(e.id).indexOf(ny)}function my(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Lh(t.dataIndex)?Ih(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?Lh(t.name)?Ih(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function vy(){var e="__ec_inner_"+yy++;return function(t){return t[e]||(t[e]={})}}var yy=Gv();function xy(e,t,n){var i=_y(t,n),r=i.mainTypeSpecified,o=i.queryOptionMap,a=i.others,s=n?n.defaultMainType:null;return!r&&s&&o.set(s,{}),o.each(function(t,i){var r=Cy(e,i,t,{useDefault:s===i,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[i+"Models"]=r.models,a[i+"Model"]=r.models[0]}),a}function _y(e,t){var n;if(Oh(e)){var i={};i[e+"Index"]=0,n=i}else n=e;var r=rp(),o={},a=!1;return Th(n,function(e,n){if("dataIndex"!==n&&"dataIndexInside"!==n){var i=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=i[1],l=(i[2]||"").toLowerCase();if(s&&l&&!(t&&t.includeMainTypes&&Ch(t.includeMainTypes,s)<0))a=a||!!s,(r.get(s)||r.set(s,{}))[l]=e}else o[n]=e}),{mainTypeSpecified:a,queryOptionMap:r,others:o}}var by={useDefault:!0,enableAll:!1,enableNone:!1},wy={useDefault:!1,enableAll:!0,enableNone:!0};function Cy(e,t,n,i){i=i||by;var r=n.index,o=n.id,a=n.name,s={models:null,specified:null!=r||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=i.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===r||!1===r?($h(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===r&&($h(i.enableAll,'`"all"` is not a valid value on index option.'),r=o=a=null),s.models=e.queryComponents({mainType:t,index:r,id:o,name:a}),s)}function Sy(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function My(e,t){var n=rp(),i=[];return Th(e,function(e){var r=t(e);(n.get(r)||(i.push(r),n.set(r,[]))).push(e)}),{keys:i,buckets:n}}function Ty(e,t,n,i,r){var o=null==t||"auto"===t;if(null==i)return i;if(Fh(i))return Mv(f=ey(n||0,i,r),o?Math.max(Iv(n||0),Iv(i)):t);if(Oh(i))return r<1?n:i;for(var a=[],s=n,l=i,u=Math.max(s?s.length:0,l.length),c=0;c<u;++c){var d=e.getDimensionInfo(c);if(d&&"ordinal"===d.type)a[c]=(r<1&&s?s:l)[c];else{var h=s&&s[c]?s[c]:0,p=l[c],f=ey(h,p,r);a[c]=Mv(f,o?Math.max(Iv(h),Iv(p)):t)}}return a}var Iy="___EC__COMPONENT__CONTAINER___",Dy="___EC__EXTENDED_CLASS___";function ky(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function Ay(e,t){e.$constructor=e,e.extend=function(e){"production"!==process.env.NODE_ENV&&Th(t,function(t){e[t]});var n,i,r=this;return Ph(i=r)&&/^class\s/.test(Function.prototype.toString.call(i))?n=function(e){function t(){return e.apply(this,arguments)||this}return Kd(t,e),t}(r):(n=function(){(e.$constructor||r).apply(this,arguments)},function(e,t){var n=e.prototype;function i(){}for(var r in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(r)&&(e.prototype[r]=n[r]);e.prototype.constructor=e,e.superClass=t}(n,this)),bh(n.prototype,e),n[Dy]=!0,n.extend=this.extend,n.superCall=Ly,n.superApply=Py,n.superClass=r,n}}function Ey(e,t){e.extend=t.extend}var Ny=Math.round(10*Math.random());function Ly(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[t].apply(e,n)}function Py(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Oy(e){var t={};e.registerClass=function(e){var n,i=e.type||e.prototype.type;if(i){$h(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=i),'componentType "'+n+'" illegal'),e.prototype.type=i;var r=ky(i);if(r.sub){if(r.sub!==Iy){var o=function(e){var n=t[e.main];n&&n[Iy]||((n=t[e.main]={})[Iy]=!0);return n}(r);o[r.sub]=e}}else"production"!==process.env.NODE_ENV&&t[r.main],t[r.main]=e}return e},e.getClass=function(e,n,i){var r=t[e];if(r&&r[Iy]&&(r=n?r[n]:null),i&&!r)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return r},e.getClassesByMainType=function(e){var n=ky(e),i=[],r=t[n.main];return r&&r[Iy]?Th(r,function(e,t){t!==Iy&&i.push(e)}):i.push(r),i},e.hasClass=function(e){var n=ky(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return Th(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=ky(e),i=t[n.main];return i&&i[Iy]}}function Ry(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,i,r){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(i&&Ch(i,s)>=0||r&&Ch(r,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var Fy=Ry([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),zy=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Fy(this,e,t)},e}(),Vy=new vg(50);function By(e){if("string"==typeof e){var t=Vy.get(e);return t&&t.image}return e}function jy(e,t,n,i,r){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=Vy.get(e),a={hostEl:n,cb:i,cbPayload:r};return o?!Wy(t=o.image)&&o.pending.push(a):((t=ih.loadImage(e,Gy,Gy)).__zrImageSrc=e,Vy.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function Gy(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Wy(e){return e&&e.width&&e.height}var Hy=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Uy(e,t,n,i,r,o){if(!n)return e.text="",void(e.isTruncated=!1);var a=(t+"").split("\n");o=Yy(n,i,r,o);for(var s=!1,l={},u=0,c=a.length;u<c;u++)Zy(l,a[u],o),a[u]=l.textLine,s=s||l.isTruncated;e.text=a.join("\n"),e.isTruncated=s}function Yy(e,t,n,i){var r=bh({},i=i||{});r.font=t,n=Yh(n,"..."),r.maxIterations=Yh(i.maxIterations,2);var o=r.minChar=Yh(i.minChar,0);r.cnCharWidth=Jm("国",t);var a=r.ascCharWidth=Jm("a",t);r.placeholder=Yh(i.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Jm(n,t);return u>s&&(n="",u=0),s=e-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=e,r}function Zy(e,t,n){var i=n.containerWidth,r=n.font,o=n.contentWidth;if(!i)return e.textLine="",void(e.isTruncated=!1);var a=Jm(t,r);if(a<=i)return e.textLine=t,void(e.isTruncated=!1);for(var s=0;;s++){if(a<=o||s>=n.maxIterations){t+=n.ellipsis;break}var l=0===s?Xy(t,o,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Jm(t=t.substr(0,l),r)}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Xy(e,t,n,i){for(var r=0,o=0,a=e.length;o<a&&r<t;o++){var s=e.charCodeAt(o);r+=0<=s&&s<=127?n:i}return o}var qy=function(){return function(){}}(),$y=function(){return function(e){this.tokens=[],e&&(this.tokens=e)}}(),Ky=function(){return function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}}();function Jy(e,t,n,i,r){var o,a,s=""===t,l=r&&n.rich[r]||{},u=e.lines,c=l.font||n.font,d=!1;if(i){var h=l.padding,p=h?h[1]+h[3]:0;if(null!=l.width&&"auto"!==l.width){var f=rv(l.width,i.width)+p;u.length>0&&f+i.accumWidth>i.width&&(o=t.split("\n"),d=!0),i.accumWidth=f}else{var g=tx(t,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}else o=t.split("\n");for(var m=0;m<o.length;m++){var v=o[m],y=new qy;if(y.styleName=r,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Jm(v,c),m||d)u.push(new $y([y]));else{var x=(u[u.length-1]||(u[0]=new $y)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var Qy=Dh(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function ex(e){return!function(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!Qy[e]}function tx(e,t,n,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,d=0;d<e.length;d++){var h=e.charAt(d);if("\n"!==h){var p=Jm(h,t),f=!i&&!ex(h);(o.length?c+p>n:r+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=h,s="",c=u+=p):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=h,c=p)):f?(o.push(l),a.push(u),l=h,u=p):(o.push(h),a.push(p)):(c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=r),{accumWidth:c,lines:o,linesWidths:a}}var nx="__zr_style_"+Math.round(10*Math.random()),ix={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},rx={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ix[nx]=!0;var ox=["z","z2","invisible"],ax=["invisible"],sx=function(e){function t(t){return e.call(this,t)||this}var n;return Kd(t,e),t.prototype._init=function(t){for(var n=Ah(t),i=0;i<n.length;i++){var r=n[i];"style"===r?this.useStyle(t[r]):e.prototype.attrKV.call(this,r,t[r])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,i){var r=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){lx.copy(e.getBoundingRect()),e.transform&&lx.applyTransform(e.transform);return ux.width=t,ux.height=n,!lx.intersect(ux)}(this,e,t)||r&&!r[0]&&!r[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(i&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),i=this.style,r=i.shadowBlur||0,o=i.shadowOffsetX||0,a=i.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new xf(0,0,0,0)),t?xf.applyTransform(e,n,t):e.copy(n),(r||o||a)&&(e.width+=2*r+Math.abs(o),e.height+=2*r+Math.abs(a),e.x=Math.min(e.x,e.x+o-r),e.y=Math.min(e.y,e.y+a-r));var s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+2*s),e.height=Math.ceil(e.height+1+2*s))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new xf(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:bh(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(2&this.__dirty)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return ap(ix,e)},t.prototype.useStyle=function(e){e[nx]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[nx]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,ox)},t.prototype._applyStateObj=function(t,n,i,r,o,a){e.prototype._applyStateObj.call(this,t,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.style?o?r?s=n.style:(s=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),r?this.style:i.style),this._mergeStyle(s,n.style)):l&&(s=i.style),s)if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=Ah(u),d=0;d<c.length;d++){(p=c[d])in s&&(s[p]=s[p],this.style[p]=u[p])}var h=Ah(s);for(d=0;d<h.length;d++){var p=h[d];this.style[p]=this.style[p]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s);var f=this.__inHover?ax:ox;for(d=0;d<f.length;d++){p=f[d];n&&null!=n[p]?this[p]=n[p]:l&&null!=i[p]&&(this[p]=i[p])}},t.prototype._mergeStates=function(t){for(var n,i=e.prototype._mergeStates.call(this,t),r=0;r<t.length;r++){var o=t[r];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(i.style=n),i},t.prototype._mergeStyle=function(e,t){return bh(e,t),e},t.prototype.getAnimationStyleProps=function(){return rx},t.initDefaultProps=((n=t.prototype).type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,void(n.__dirty=3)),t}(dv),lx=new xf(0,0,0,0),ux=new xf(0,0,0,0);var cx=Math.min,dx=Math.max,hx=Math.sin,px=Math.cos,fx=2*Math.PI,gx=dp(),mx=dp(),vx=dp();function yx(e,t,n){if(0!==e.length){for(var i=e[0],r=i[0],o=i[0],a=i[1],s=i[1],l=1;l<e.length;l++)i=e[l],r=cx(r,i[0]),o=dx(o,i[0]),a=cx(a,i[1]),s=dx(s,i[1]);t[0]=r,t[1]=a,n[0]=o,n[1]=s}}function xx(e,t,n,i,r,o){r[0]=cx(e,n),r[1]=cx(t,i),o[0]=dx(e,n),o[1]=dx(t,i)}var _x=[],bx=[];function Cx(e,t,n,i,r,o,a,s,l,u){var c=ng,d=Qf,h=c(e,n,r,a,_x);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var p=0;p<h;p++){var f=d(e,n,r,a,_x[p]);l[0]=cx(f,l[0]),u[0]=dx(f,u[0])}h=c(t,i,o,s,bx);for(p=0;p<h;p++){var g=d(t,i,o,s,bx[p]);l[1]=cx(g,l[1]),u[1]=dx(g,u[1])}l[0]=cx(e,l[0]),u[0]=dx(e,u[0]),l[0]=cx(a,l[0]),u[0]=dx(a,u[0]),l[1]=cx(t,l[1]),u[1]=dx(t,u[1]),l[1]=cx(s,l[1]),u[1]=dx(s,u[1])}function Sx(e,t,n,i,r,o,a,s){var l=lg,u=ag,c=dx(cx(l(e,n,r),1),0),d=dx(cx(l(t,i,o),1),0),h=u(e,n,r,c),p=u(t,i,o,d);a[0]=cx(e,r,h),a[1]=cx(t,o,p),s[0]=dx(e,r,h),s[1]=dx(t,o,p)}function Mx(e,t,n,i,r,o,a,s,l){var u=Tp,c=Ip,d=Math.abs(r-o);if(d%fx<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(gx[0]=px(r)*n+e,gx[1]=hx(r)*i+t,mx[0]=px(o)*n+e,mx[1]=hx(o)*i+t,u(s,gx,mx),c(l,gx,mx),(r%=fx)<0&&(r+=fx),(o%=fx)<0&&(o+=fx),r>o&&!a?o+=fx:r<o&&a&&(r+=fx),a){var h=o;o=r,r=h}for(var p=0;p<o;p+=Math.PI/2)p>r&&(vx[0]=px(p)*n+e,vx[1]=hx(p)*i+t,u(s,vx,s),c(l,vx,l))}var Tx={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ix=[],Dx=[],kx=[],Ax=[],Ex=[],Nx=[],Lx=Math.min,Px=Math.max,Ox=Math.cos,Rx=Math.sin,Fx=Math.abs,zx=Math.PI,Vx=2*zx,Bx="undefined"!=typeof Float32Array,jx=[];function Gx(e){return Math.round(e/zx*1e8)/1e8%2*zx}function Wx(e,t){var n=Gx(e[0]);n<0&&(n+=Vx);var i=n-e[0],r=e[1];r+=i,!t&&r-n>=Vx?r=n+Vx:t&&n-r>=Vx?r=n-Vx:!t&&n>r?r=n+(Vx-Gx(n-r)):t&&n<r&&(r=n-(Vx-Gx(r-n))),e[0]=n,e[1]=r}var Hx=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}var t;return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=Fx(n/zm/e)||0,this._uy=Fx(n/zm/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Tx.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Fx(e-this._xi),i=Fx(t-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Tx.L,e,t),this._ctx&&r&&this._ctx.lineTo(e,t),r)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(e,t,n,i,r,o){return this._drawPendingPt(),this.addData(Tx.C,e,t,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,r,o),this._xi=r,this._yi=o,this},e.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(Tx.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},e.prototype.arc=function(e,t,n,i,r,o){this._drawPendingPt(),jx[0]=i,jx[1]=r,Wx(jx,o),i=jx[0];var a=(r=jx[1])-i;return this.addData(Tx.A,e,t,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,r,o),this._xi=Ox(r)*n+e,this._yi=Rx(r)*n+t,this},e.prototype.arcTo=function(e,t,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,r),this},e.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(Tx.R,e,t,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Tx.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!Bx||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},e.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,r=0;r<t;r++)n+=e[r].len();Bx&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<t;r++)for(var o=e[r].data,a=0;a<o.length;a++)this.data[i++]=o[a];this._len=i},e.prototype.addData=function(e,t,n,i,r,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var c=0;c<arguments.length;c++)u[this._len++]=arguments[c]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,Bx&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){kx[0]=kx[1]=Ex[0]=Ex[1]=Number.MAX_VALUE,Ax[0]=Ax[1]=Nx[0]=Nx[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,i=0,r=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(r=n=t[e],o=i=t[e+1]),a){case Tx.M:n=r=t[e++],i=o=t[e++],Ex[0]=r,Ex[1]=o,Nx[0]=r,Nx[1]=o;break;case Tx.L:xx(n,i,t[e],t[e+1],Ex,Nx),n=t[e++],i=t[e++];break;case Tx.C:Cx(n,i,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Ex,Nx),n=t[e++],i=t[e++];break;case Tx.Q:Sx(n,i,t[e++],t[e++],t[e],t[e+1],Ex,Nx),n=t[e++],i=t[e++];break;case Tx.A:var l=t[e++],u=t[e++],c=t[e++],d=t[e++],h=t[e++],p=t[e++]+h;e+=1;var f=!t[e++];s&&(r=Ox(h)*c+l,o=Rx(h)*d+u),Mx(l,u,c,d,h,p,f,Ex,Nx),n=Ox(p)*c+l,i=Rx(p)*d+u;break;case Tx.R:xx(r=n=t[e++],o=i=t[e++],r+t[e++],o+t[e++],Ex,Nx);break;case Tx.Z:n=r,i=o}Tp(kx,kx,Ex),Ip(Ax,Ax,Nx)}return 0===e&&(kx[0]=kx[1]=Ax[0]=Ax[1]=0),new xf(kx[0],kx[1],Ax[0]-kx[0],Ax[1]-kx[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,i=this._uy,r=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,c=0,d=0;d<t;){var h=e[d++],p=1===d;p&&(a=r=e[d],s=o=e[d+1]);var f=-1;switch(h){case Tx.M:r=a=e[d++],o=s=e[d++];break;case Tx.L:var g=e[d++],m=(x=e[d++])-o;(Fx(k=g-r)>n||Fx(m)>i||d===t-1)&&(f=Math.sqrt(k*k+m*m),r=g,o=x);break;case Tx.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=og(r,o,v,y,g,x,_,b,10),r=_,o=b;break;case Tx.Q:f=dg(r,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),r=g,o=x;break;case Tx.A:var w=e[d++],C=e[d++],S=e[d++],M=e[d++],T=e[d++],I=e[d++],D=I+T;d+=1,p&&(a=Ox(T)*S+w,s=Rx(T)*M+C),f=Px(S,M)*Lx(Vx,Math.abs(I)),r=Ox(D)*S+w,o=Rx(D)*M+C;break;case Tx.R:a=r=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case Tx.Z:var k=a-r;m=s-o;f=Math.sqrt(k*k+m*m),r=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,i,r,o,a,s,l,u,c,d,h=this.data,p=this._ux,f=this._uy,g=this._len,m=t<1,v=0,y=0,x=0;if(!m||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var _=0;_<g;){var b=h[_++],w=1===_;switch(w&&(n=r=h[_],i=o=h[_+1]),b!==Tx.L&&x>0&&(e.lineTo(c,d),x=0),b){case Tx.M:n=r=h[_++],i=o=h[_++],e.moveTo(r,o);break;case Tx.L:a=h[_++],s=h[_++];var C=Fx(a-r),S=Fx(s-o);if(C>p||S>f){if(m){if(v+(X=l[y++])>u){var M=(u-v)/X;e.lineTo(r*(1-M)+a*M,o*(1-M)+s*M);break e}v+=X}e.lineTo(a,s),r=a,o=s,x=0}else{var T=C*C+S*S;T>x&&(c=a,d=s,x=T)}break;case Tx.C:var I=h[_++],D=h[_++],k=h[_++],A=h[_++],E=h[_++],N=h[_++];if(m){if(v+(X=l[y++])>u){ig(r,I,k,E,M=(u-v)/X,Ix),ig(o,D,A,N,M,Dx),e.bezierCurveTo(Ix[1],Dx[1],Ix[2],Dx[2],Ix[3],Dx[3]);break e}v+=X}e.bezierCurveTo(I,D,k,A,E,N),r=E,o=N;break;case Tx.Q:I=h[_++],D=h[_++],k=h[_++],A=h[_++];if(m){if(v+(X=l[y++])>u){ug(r,I,k,M=(u-v)/X,Ix),ug(o,D,A,M,Dx),e.quadraticCurveTo(Ix[1],Dx[1],Ix[2],Dx[2]);break e}v+=X}e.quadraticCurveTo(I,D,k,A),r=k,o=A;break;case Tx.A:var L=h[_++],P=h[_++],O=h[_++],R=h[_++],F=h[_++],z=h[_++],V=h[_++],B=!h[_++],j=O>R?O:R,G=Fx(O-R)>.001,W=F+z,H=!1;if(m)v+(X=l[y++])>u&&(W=F+z*(u-v)/X,H=!0),v+=X;if(G&&e.ellipse?e.ellipse(L,P,O,R,V,F,W,B):e.arc(L,P,j,F,W,B),H)break e;w&&(n=Ox(F)*O+L,i=Rx(F)*R+P),r=Ox(W)*O+L,o=Rx(W)*R+P;break;case Tx.R:n=r=h[_],i=o=h[_+1],a=h[_++],s=h[_++];var U=h[_++],Y=h[_++];if(m){if(v+(X=l[y++])>u){var Z=u-v;e.moveTo(a,s),e.lineTo(a+Lx(Z,U),s),(Z-=U)>0&&e.lineTo(a+U,s+Lx(Z,Y)),(Z-=Y)>0&&e.lineTo(a+Px(U-Z,0),s+Y),(Z-=U)>0&&e.lineTo(a,s+Px(Y-Z,0));break e}v+=X}e.rect(a,s,U,Y);break;case Tx.Z:if(m){var X;if(v+(X=l[y++])>u){M=(u-v)/X;e.lineTo(r*(1-M)+n*M,o*(1-M)+i*M);break e}v+=X}e.closePath(),r=n,o=i}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Tx,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();function Ux(e,t,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>t+s&&a>i+s||a<t-s&&a<i-s||o>e+s&&o>n+s||o<e-s&&o<n-s)return!1;if(e===n)return Math.abs(o-e)<=s/2;var u=(l=(t-i)/(e-n))*o-a+(e*i-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}function Yx(e,t,n,i,r,o,a,s,l,u,c){if(0===l)return!1;var d=l;return!(c>t+d&&c>i+d&&c>o+d&&c>s+d||c<t-d&&c<i-d&&c<o-d&&c<s-d||u>e+d&&u>n+d&&u>r+d&&u>a+d||u<e-d&&u<n-d&&u<r-d&&u<a-d)&&rg(e,t,n,i,r,o,a,s,u,c,null)<=d/2}function Zx(e,t,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;return!(l>t+u&&l>i+u&&l>o+u||l<t-u&&l<i-u&&l<o-u||s>e+u&&s>n+u&&s>r+u||s<e-u&&s<n-u&&s<r-u)&&cg(e,t,n,i,r,o,s,l,null)<=u/2}var Xx=2*Math.PI;function qx(e){return(e%=Xx)<0&&(e+=Xx),e}var $x=2*Math.PI;function Kx(e,t,n,i,r,o,a,s,l){if(0===a)return!1;var u=a;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-r)%$x<1e-4)return!0;if(o){var d=i;i=qx(r),r=qx(d)}else i=qx(i),r=qx(r);i>r&&(r+=$x);var h=Math.atan2(l,s);return h<0&&(h+=$x),h>=i&&h<=r||h+$x>=i&&h+$x<=r}function Jx(e,t,n,i,r,o){if(o>t&&o>i||o<t&&o<i)return 0;if(i===t)return 0;var a=(o-t)/(i-t),s=i<t?1:-1;1!==a&&0!==a||(s=i<t?.5:-.5);var l=a*(n-e)+e;return l===r?1/0:l>r?s:0}var Qx=Hx.CMD,e_=2*Math.PI;var t_=[-1,-1,-1],n_=[-1,-1];function i_(){var e=n_[0];n_[0]=n_[1],n_[1]=e}function r_(e,t,n,i,r,o,a,s,l,u){if(u>t&&u>i&&u>o&&u>s||u<t&&u<i&&u<o&&u<s)return 0;var c=tg(t,i,o,s,u,t_);if(0===c)return 0;for(var d=0,h=-1,p=void 0,f=void 0,g=0;g<c;g++){var m=t_[g],v=0===m||1===m?.5:1;Qf(e,n,r,a,m)<l||(h<0&&(h=ng(t,i,o,s,n_),n_[1]<n_[0]&&h>1&&i_(),p=Qf(t,i,o,s,n_[0]),h>1&&(f=Qf(t,i,o,s,n_[1]))),2===h?m<n_[0]?d+=p<t?v:-v:m<n_[1]?d+=f<p?v:-v:d+=s<f?v:-v:m<n_[0]?d+=p<t?v:-v:d+=s<p?v:-v)}return d}function o_(e,t,n,i,r,o,a,s){if(s>t&&s>i&&s>o||s<t&&s<i&&s<o)return 0;var l=function(e,t,n,i,r){var o=e-2*t+n,a=2*(t-e),s=e-i,l=0;if(Kf(o))Jf(a)&&(c=-s/a)>=0&&c<=1&&(r[l++]=c);else{var u=a*a-4*o*s;if(Kf(u))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,d=Wf(u),h=(-a-d)/(2*o);(c=(-a+d)/(2*o))>=0&&c<=1&&(r[l++]=c),h>=0&&h<=1&&(r[l++]=h)}}return l}(t,i,o,s,t_);if(0===l)return 0;var u=lg(t,i,o);if(u>=0&&u<=1){for(var c=0,d=ag(t,i,o,u),h=0;h<l;h++){var p=0===t_[h]||1===t_[h]?.5:1;ag(e,n,r,t_[h])<a||(t_[h]<u?c+=d<t?p:-p:c+=o<d?p:-p)}return c}p=0===t_[0]||1===t_[0]?.5:1;return ag(e,n,r,t_[0])<a?0:o<t?p:-p}function a_(e,t,n,i,r,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);t_[0]=-l,t_[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=e_-1e-4){i=0,r=e_;var c=o?1:-1;return a>=t_[0]+e&&a<=t_[1]+e?c:0}if(i>r){var d=i;i=r,r=d}i<0&&(i+=e_,r+=e_);for(var h=0,p=0;p<2;p++){var f=t_[p];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=e_+g),(g>=i&&g<=r||g+e_>=i&&g+e_<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),h+=c)}}return h}function s_(e,t,n,i,r){for(var o,a,s,l,u=e.data,c=e.len(),d=0,h=0,p=0,f=0,g=0,m=0;m<c;){var v=u[m++],y=1===m;switch(v===Qx.M&&m>1&&(n||(d+=Jx(h,p,f,g,i,r))),y&&(f=h=u[m],g=p=u[m+1]),v){case Qx.M:h=f=u[m++],p=g=u[m++];break;case Qx.L:if(n){if(Ux(h,p,u[m],u[m+1],t,i,r))return!0}else d+=Jx(h,p,u[m],u[m+1],i,r)||0;h=u[m++],p=u[m++];break;case Qx.C:if(n){if(Yx(h,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,i,r))return!0}else d+=r_(h,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],i,r)||0;h=u[m++],p=u[m++];break;case Qx.Q:if(n){if(Zx(h,p,u[m++],u[m++],u[m],u[m+1],t,i,r))return!0}else d+=o_(h,p,u[m++],u[m++],u[m],u[m+1],i,r)||0;h=u[m++],p=u[m++];break;case Qx.A:var x=u[m++],_=u[m++],b=u[m++],w=u[m++],C=u[m++],S=u[m++];m+=1;var M=!!(1-u[m++]);o=Math.cos(C)*b+x,a=Math.sin(C)*w+_,y?(f=o,g=a):d+=Jx(h,p,o,a,i,r);var T=(i-x)*w/b+x;if(n){if(Kx(x,_,w,C,C+S,M,t,T,r))return!0}else d+=a_(x,_,w,C,C+S,M,T,r);h=Math.cos(C+S)*b+x,p=Math.sin(C+S)*w+_;break;case Qx.R:if(f=h=u[m++],g=p=u[m++],o=f+u[m++],a=g+u[m++],n){if(Ux(f,g,o,g,t,i,r)||Ux(o,g,o,a,t,i,r)||Ux(o,a,f,a,t,i,r)||Ux(f,a,f,g,t,i,r))return!0}else d+=Jx(o,g,o,a,i,r),d+=Jx(f,a,f,g,i,r);break;case Qx.Z:if(n){if(Ux(h,p,f,g,t,i,r))return!0}else d+=Jx(h,p,f,g,i,r);h=f,p=g}}return n||(s=p,l=g,Math.abs(s-l)<1e-4)||(d+=Jx(h,p,f,g,i,r)||0),0!==d}var l_=wh({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ix),u_={style:wh({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},rx.style)},c_=qm.concat(["invisible","culling","z","z2","zlevel","parent"]),d_=function(e){function t(t){return e.call(this,t)||this}var n;return Kd(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new t;r.buildPath===t.prototype.buildPath&&(r.buildPath=function(e){n.buildPath(e,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s<c_.length;++s)r[c_[s]]=this[c_[s]];r.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Ah(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var r=0;r<n.length;r++){var o=n[r],a=t[o];"style"===o?this.style?bh(this.style,a):this.useStyle(a):"shape"===o?bh(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(Oh(e)){var t=Fg(e,0);return t>.5?Vm:t>.2?"#eee":Bm}if(e)return Bm}return Vm},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Oh(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Fg(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Hx(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),e=r.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){o.copy(e);var a=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),r=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,i){return s_(e,t,!0,n,i)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return s_(e,0,!1,t,n)}(o,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:bh(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return ap(l_,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=bh({},this.shape))},t.prototype._applyStateObj=function(t,n,i,r,o,a){e.prototype._applyStateObj.call(this,t,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=bh({},i.shape),bh(s,n.shape)):(s=bh({},r?this.shape:i.shape),bh(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=bh({},this.shape);for(var u={},c=Ah(s),d=0;d<c.length;d++){var h=c[d];"object"==typeof s[h]?this.shape[h]=s[h]:u[h]=s[h]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()},t.prototype._mergeStates=function(t){for(var n,i=e.prototype._mergeStates.call(this,t),r=0;r<t.length;r++){var o=t[r];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(i.shape=n),i},t.prototype.getAnimationStyleProps=function(){return u_},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){function n(n){var i=t.call(this,n)||this;return e.init&&e.init.call(i,n),i}return Kd(n,t),n.prototype.getDefaultStyle=function(){return yh(e.style)},n.prototype.getDefaultShape=function(){return yh(e.shape)},n}(t);for(var i in e)"function"==typeof e[i]&&(n.prototype[i]=e[i]);return n},t.initDefaultProps=((n=t.prototype).type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,void(n.__dirty=7)),t}(sx),h_=wh({strokeFirst:!0,font:th,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},l_),p_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return ap(h_,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;null!=t?t+="":t="";var n=ev(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var i=e.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(sx);p_.prototype.type="tspan";var f_=wh({x:0,y:0},ix),g_={style:wh({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},rx.style)};var m_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.createStyle=function(e){return ap(f_,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var i,r=(i=t.image)&&"string"!=typeof i&&i.width&&i.height?t.image:this.__image;if(!r)return 0;var o="width"===e?"height":"width",a=t[o];return null==a?r[e]:r[e]/r[o]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return g_},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new xf(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(sx);m_.prototype.type="image";var v_=Math.round;function y_(e,t,n){if(t){var i=t.x1,r=t.x2,o=t.y1,a=t.y2;e.x1=i,e.x2=r,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s?(v_(2*i)===v_(2*r)&&(e.x1=e.x2=__(i,s,!0)),v_(2*o)===v_(2*a)&&(e.y1=e.y2=__(o,s,!0)),e):e}}function x_(e,t,n){if(t){var i=t.x,r=t.y,o=t.width,a=t.height;e.x=i,e.y=r,e.width=o,e.height=a;var s=n&&n.lineWidth;return s?(e.x=__(i,s,!0),e.y=__(r,s,!0),e.width=Math.max(__(i+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(__(r+a,s,!1)-e.y,0===a?0:1),e):e}}function __(e,t,n){if(!t)return e;var i=v_(2*e);return(i+v_(t))%2==0?i/2:(i+(n?1:-1))/2}var b_=function(){return function(){this.x=0,this.y=0,this.width=0,this.height=0}}(),w_={},C_=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new b_},t.prototype.buildPath=function(e,t){var n,i,r,o;if(this.subPixelOptimize){var a=x_(w_,t,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=t.r,t=a}else n=t.x,i=t.y,r=t.width,o=t.height;t.r?function(e,t){var n,i,r,o,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=i=r=o=d:d instanceof Array?1===d.length?n=i=r=o=d[0]:2===d.length?(n=r=d[0],i=o=d[1]):3===d.length?(n=d[0],i=o=d[1],r=d[2]):(n=d[0],i=d[1],r=d[2],o=d[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>c&&(i*=c/(a=i+r),r*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-i,l),0!==i&&e.arc(s+u-i,l+i,i,-Math.PI/2,0),e.lineTo(s+u,l+c-r),0!==r&&e.arc(s+u-r,l+c-r,r,0,Math.PI/2),e.lineTo(s+o,l+c),0!==o&&e.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,i,r,o)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(d_);C_.prototype.type="rect";var S_={fill:"#000"},M_={style:wh({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},rx.style)},T_=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=S_,n.attr(t),n}return Kd(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){var e;this._childCursor=0,L_(e=this.style),Th(e.rich,L_),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new xf(0,0,0,0),t=this._children,n=[],i=null,r=0;r<t.length;r++){var o=t[r],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(i=i||e.clone()).union(e)):(i=i||a.clone()).union(a)}this._rect=i||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||S_},t.prototype.setTextContent=function(e){if("production"!==process.env.NODE_ENV)throw new Error("Can't attach text on another text")},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,i=e.rich||n&&{};return bh(e,t),n&&i?(this._mergeRich(i,n),e.rich=i):i&&(e.rich=i),e},t.prototype._mergeRich=function(e,t){for(var n=Ah(t),i=0;i<n.length;i++){var r=n[i];e[r]=e[r]||{},bh(e[r],t[r])}},t.prototype.getAnimationStyleProps=function(){return M_},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||th,n=e.padding,i=function(e,t){null!=e&&(e+="");var n,i=t.overflow,r=t.padding,o=t.font,a="truncate"===i,s=iv(o),l=Yh(t.lineHeight,s),u=!!t.backgroundColor,c="truncate"===t.lineOverflow,d=!1,h=t.width,p=(n=null==h||"break"!==i&&"breakAll"!==i?e?e.split("\n"):[]:e?tx(e,t.font,h,"breakAll"===i,0).lines:[]).length*l,f=Yh(t.height,p);if(p>f&&c){var g=Math.floor(f/l);d=d||n.length>g,n=n.slice(0,g)}if(e&&a&&null!=h)for(var m=Yy(h,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v={},y=0;y<n.length;y++)Zy(v,n[y],m),n[y]=v.textLine,d=d||v.isTruncated;var x=f,_=0;for(y=0;y<n.length;y++)_=Math.max(Jm(n[y],o),_);null==h&&(h=_);var b=_;return r&&(x+=r[0]+r[2],b+=r[1]+r[3],h+=r[1]+r[3]),u&&(b=h),{lines:n,height:f,outerWidth:b,outerHeight:x,lineHeight:l,calculatedLineHeight:s,contentWidth:_,contentHeight:p,width:h,isTruncated:d}}(F_(e),e),r=z_(e),o=!!e.backgroundColor,a=i.outerHeight,s=i.outerWidth,l=i.contentWidth,u=i.lines,c=i.lineHeight,d=this._defaultStyle;this.isTruncated=!!i.isTruncated;var h=e.x||0,p=e.y||0,f=e.align||d.align||"left",g=e.verticalAlign||d.verticalAlign||"top",m=h,v=nv(p,i.contentHeight,g);if(r||n){var y=tv(h,s,f),x=nv(p,a,g);r&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=R_(h,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(O_("fill"in e?e.fill:(b=!0,d.fill))),C=(P_("stroke"in e?e.stroke:o||d.autoStroke&&!b?null:(_=2,d.stroke))),S=e.textShadowBlur>0,M=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),T=i.calculatedLineHeight,I=0;I<u.length;I++){var D=this._getOrCreateChild(p_),k=D.createStyle();D.useStyle(k),k.text=u[I],k.x=m,k.y=v,k.textAlign=f,k.textBaseline="middle",k.opacity=e.opacity,k.strokeFirst=!0,S&&(k.shadowBlur=e.textShadowBlur||0,k.shadowColor=e.textShadowColor||"transparent",k.shadowOffsetX=e.textShadowOffsetX||0,k.shadowOffsetY=e.textShadowOffsetY||0),k.stroke=C,k.fill=w,C&&(k.lineWidth=e.lineWidth||_,k.lineDash=e.lineDash,k.lineDashOffset=e.lineDashOffset||0),k.font=t,E_(k,e),v+=c,M&&D.setBoundingRect(new xf(tv(k.x,l,k.textAlign),nv(k.y,T,k.textBaseline),l,T))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new Ky;if(null!=e&&(e+=""),!e)return n;for(var i,r=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==r?null:{width:r,accumWidth:0,breakAll:"breakAll"===a},l=Hy.lastIndex=0;null!=(i=Hy.exec(e));){var u=i.index;u>l&&Jy(n,e.substring(l,u),t,s),Jy(n,i[2],t,s,i[1]),l=Hy.lastIndex}l<e.length&&Jy(n,e.substring(l,e.length),t,s);var c=[],d=0,h=0,p=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow,m={};function v(e,t,n){e.width=t,e.lineHeight=n,d+=n,h=Math.max(h,t)}e:for(var y=0;y<n.lines.length;y++){for(var x=n.lines[y],_=0,b=0,w=0;w<x.tokens.length;w++){var C=(P=x.tokens[w]).styleName&&t.rich[P.styleName]||{},S=P.textPadding=C.padding,M=S?S[1]+S[3]:0,T=P.font=C.font||t.font;P.contentHeight=iv(T);var I=Yh(C.height,P.contentHeight);if(P.innerHeight=I,S&&(I+=S[0]+S[2]),P.height=I,P.lineHeight=Zh(C.lineHeight,t.lineHeight,I),P.align=C&&C.align||t.align,P.verticalAlign=C&&C.verticalAlign||"middle",g&&null!=o&&d+P.lineHeight>o){var D=n.lines.length;w>0?(x.tokens=x.tokens.slice(0,w),v(x,b,_),n.lines=n.lines.slice(0,y+1)):n.lines=n.lines.slice(0,y),n.isTruncated=n.isTruncated||n.lines.length<D;break e}var k=C.width,A=null==k||"auto"===k;if("string"==typeof k&&"%"===k.charAt(k.length-1))P.percentWidth=k,c.push(P),P.contentWidth=Jm(P.text,T);else{if(A){var E=C.backgroundColor,N=E&&E.image;N&&Wy(N=By(N))&&(P.width=Math.max(P.width,N.width*I/N.height))}var L=f&&null!=r?r-b:null;null!=L&&L<P.width?!A||L<M?(P.text="",P.width=P.contentWidth=0):(Uy(m,P.text,L-M,T,t.ellipsis,{minChar:t.truncateMinChar}),P.text=m.text,n.isTruncated=n.isTruncated||m.isTruncated,P.width=P.contentWidth=Jm(P.text,T)):P.contentWidth=Jm(P.text,T)}P.width+=M,b+=P.width,C&&(_=Math.max(_,P.lineHeight))}v(x,b,_)}for(n.outerWidth=n.width=Yh(r,h),n.outerHeight=n.height=Yh(o,d),n.contentHeight=d,n.contentWidth=h,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]),y=0;y<c.length;y++){var P,O=(P=c[y]).percentWidth;P.width=parseInt(O,10)/100*n.width}return n}(F_(e),e),n=t.width,i=t.outerWidth,r=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,l=this._defaultStyle,u=e.align||l.align,c=e.verticalAlign||l.verticalAlign;this.isTruncated=!!t.isTruncated;var d=tv(a,i,u),h=nv(s,r,c),p=d,f=h;o&&(p+=o[3],f+=o[0]);var g=p+n;z_(e)&&this._renderBackground(e,e,d,h,i,r);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,_=x.length,b=y.lineHeight,w=y.width,C=0,S=p,M=g,T=_-1,I=void 0;C<_&&(!(I=x[C]).align||"left"===I.align);)this._placeToken(I,e,b,f,S,"left",m),w-=I.width,S+=I.width,C++;for(;T>=0&&"right"===(I=x[T]).align;)this._placeToken(I,e,b,f,M,"right",m),w-=I.width,M-=I.width,T--;for(S+=(n-(S-p)-(g-M)-w)/2;C<=T;)I=x[C],this._placeToken(I,e,b,f,S+I.width/2,"center",m),S+=I.width,C++;f+=b}},t.prototype._placeToken=function(e,t,n,i,r,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=i+n/2;"top"===l?u=i+e.height/2:"bottom"===l&&(u=i+n-e.height/2),!e.isLineHolder&&z_(s)&&this._renderBackground(s,t,"right"===o?r-e.width:"center"===o?r-e.width/2:r,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(r=R_(r,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(p_),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=O_("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=P_("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!g?null:(m=2,f.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=r,p.y=u,x&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=o,p.textBaseline="middle",p.font=e.font||th,p.opacity=Zh(s.opacity,t.opacity,1),E_(p,s),y&&(p.lineWidth=Zh(s.lineWidth,t.lineWidth,m),p.lineDash=Yh(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var _=e.contentWidth,b=e.contentHeight;h.setBoundingRect(new xf(tv(p.x,_,p.textAlign),nv(p.y,b,p.textBaseline),_,b))},t.prototype._renderBackground=function(e,t,n,i,r,o){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,g=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(C_)).useStyle(a.createStyle()),a.style.fill=null;var m=a.shape;m.x=n,m.y=i,m.width=r,m.height=o,m.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=Yh(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(m_)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Yh(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Zh(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return N_(e)&&(t=[e.fontStyle,e.fontWeight,A_(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Kh(t)||e.textFont||e.font},t}(sx),I_={left:!0,right:1,center:1},D_={top:1,bottom:1,middle:1},k_=["fontStyle","fontWeight","fontSize","fontFamily"];function A_(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function E_(e,t){for(var n=0;n<k_.length;n++){var i=k_[n],r=t[i];null!=r&&(e[i]=r)}}function N_(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function L_(e){if(e){e.font=T_.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||I_[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||D_[n]?n:"top",e.padding&&(e.padding=qh(e.padding))}}function P_(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function O_(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function R_(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function F_(e){var t=e.text;return null!=t&&(t+=""),t}function z_(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var V_=vy(),B_=function(e,t,n,i){if(i){var r=V_(i);r.dataIndex=n,r.dataType=t,r.seriesIndex=e,r.ssrType="chart","group"===i.type&&i.traverse(function(i){var r=V_(i);r.seriesIndex=e,r.dataIndex=n,r.dataType=t,r.ssrType="chart"})}},j_=1,G_={},W_=vy(),H_=vy(),U_=["emphasis","blur","select"],Y_=["normal","emphasis","blur","select"],Z_=10,X_="highlight",q_="downplay",$_="select",K_="unselect",J_="toggleSelect";function Q_(e){return null!=e&&"none"!==e}function eb(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function tb(e){eb(e,"emphasis",2)}function nb(e){2===e.hoverState&&eb(e,"normal",0)}function ib(e){eb(e,"blur",1)}function rb(e){1===e.hoverState&&eb(e,"normal",0)}function ob(e){e.selected=!0}function ab(e){e.selected=!1}function sb(e,t,n){t(e,n)}function lb(e,t,n){sb(e,t,n),e.isGroup&&e.traverse(function(e){sb(e,t,n)})}function ub(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function cb(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,i){var r=n&&Ch(n,"select")>=0,o=!1;if(e instanceof d_){var a=W_(e),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Q_(s)||Q_(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=bh({},i),(u=bh({},u)).fill=s):!Q_(u.fill)&&Q_(s)?(o=!0,i=bh({},i),(u=bh({},u)).fill=Vg(s)):!Q_(u.stroke)&&Q_(l)&&(o||(i=bh({},i),u=bh({},u)),u.stroke=Vg(l)),i.style=u}}if(i&&null==i.z2){o||(i=bh({},i));var c=e.z2EmphasisLift;i.z2=e.z2+(null!=c?c:Z_)}return i}(this,0,t,n);if("blur"===e)return function(e,t,n){var i=Ch(e.currentStates,t)>=0,r=e.style.opacity,o=i?null:function(e,t,n,i){for(var r=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=r[s];o[s]=null==l?i&&i[s]:l}for(a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),a=(n=n||{}).style||{};return null==a.opacity&&(n=bh({},n),a=bh({opacity:i?r:.1*o.opacity},a),n.style=a),n}(this,e,n);if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=bh({},n);var i=e.z2SelectLift;n.z2=e.z2+(null!=i?i:9)}return n}(this,0,n)}return n}function db(e){e.stateProxy=cb;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=cb),n&&(n.stateProxy=cb)}function hb(e,t){!_b(e,t)&&!e.__highByOuter&&lb(e,tb)}function pb(e,t){!_b(e,t)&&!e.__highByOuter&&lb(e,nb)}function fb(e,t){e.__highByOuter|=1<<(t||0),lb(e,tb)}function gb(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&lb(e,nb)}function mb(e){lb(e,ib)}function vb(e){lb(e,rb)}function yb(e){lb(e,ob)}function xb(e){lb(e,ab)}function _b(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function bb(e){var t=e.getModel(),n=[],i=[];t.eachComponent(function(t,r){var o=H_(r),a="series"===t,s=a?e.getViewOfSeriesModel(r):e.getViewOfComponentModel(r);!a&&i.push(s),o.isBlured&&(s.group.traverse(function(e){rb(e)}),a&&n.push(r)),o.isBlured=!1}),Th(i,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function wb(e,t,n,i){var r=i.getModel();function o(e,t){for(var n=0;n<t.length;n++){var i=e.getItemGraphicEl(t[n]);i&&vb(i)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=r.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];r.eachSeries(function(e){var r=a===e,u=e.coordinateSystem;if(u&&u.master&&(u=u.master),!("series"===n&&!r||"coordinateSystem"===n&&!(u&&s?u===s:r)||"series"===t&&r)){if(i.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&r&&"self"===t||ib(e)}),Mh(t))o(e.getData(),t);else if(zh(t))for(var c=Ah(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),H_(e).isBlured=!0}}),r.eachComponent(function(e,t){if("series"!==e){var n=i.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,r)}})}}function Cb(e,t,n){if(null!=e&&null!=t){var i=n.getModel().getComponent(e,t);if(i){H_(i).isBlured=!0;var r=n.getViewOfComponentModel(i);r&&r.focusBlurEnabled&&r.group.traverse(function(e){ib(e)})}}}function Sb(e,t,n,i){var r={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return r;var o=i.getModel().getComponent(e,t);if(!o)return r;var a=i.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return r;for(var s,l=a.findHighDownDispatchers(n),u=0;u<l.length;u++)if("production"===process.env.NODE_ENV||Pb(l[u])||qv("param should be highDownDispatcher"),"self"===V_(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Mb(e){Th(e.getAllData(),function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,i)?yb(t):xb(t)})})}function Tb(e){var t=[];return e.eachSeries(function(e){Th(e.getAllData(),function(n){n.data;var i=n.type,r=e.getSelectedDataIndices();if(r.length>0){var o={dataIndex:r,seriesIndex:e.seriesIndex};null!=i&&(o.dataType=i),t.push(o)}})}),t}function Ib(e,t,n){Lb(e,!0),lb(e,db),kb(e,t,n)}function Db(e,t,n,i){i?function(e){Lb(e,!1)}(e):Ib(e,t,n)}function kb(e,t,n){var i=V_(e);null!=t?(i.focus=t,i.blurScope=n):i.focus&&(i.focus=null)}var Ab=["emphasis","blur","select"],Eb={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Nb(e,t,n,i){n=n||"itemStyle";for(var r=0;r<Ab.length;r++){var o=Ab[r],a=t.getModel([o,n]);e.ensureState(o).style=i?i(a):a[Eb[n]]()}}function Lb(e,t){var n=!1===t,i=e;e.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=e.highDownSilentOnTouch),n&&!i.__highDownDispatcher||(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!n)}function Pb(e){return!(!e||!e.__highDownDispatcher)}function Ob(e){var t=e.type;return t===$_||t===K_||t===J_}function Rb(e){var t=e.type;return t===X_||t===q_}var Fb=Hx.CMD,zb=[[],[],[]],Vb=Math.sqrt,Bb=Math.atan2;function jb(e,t){if(t){var n,i,r,o,a,s,l=e.data,u=e.len(),c=Fb.M,d=Fb.C,h=Fb.L,p=Fb.R,f=Fb.A,g=Fb.Q;for(r=0,o=0;r<u;){switch(n=l[r++],o=r,i=0,n){case c:case h:i=1;break;case d:i=3;break;case g:i=2;break;case f:var m=t[4],v=t[5],y=Vb(t[0]*t[0]+t[1]*t[1]),x=Vb(t[2]*t[2]+t[3]*t[3]),_=Bb(-t[1]/x,t[0]/y);l[r]*=y,l[r++]+=m,l[r]*=x,l[r++]+=v,l[r++]*=y,l[r++]*=x,l[r++]+=_,l[r++]+=_,o=r+=2;break;case p:s[0]=l[r++],s[1]=l[r++],Mp(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],Mp(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<i;a++){var b=zb[a];b[0]=l[r++],b[1]=l[r++],Mp(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}var Gb=Math.sqrt,Wb=Math.sin,Hb=Math.cos,Ub=Math.PI;function Yb(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Zb(e,t){return(e[0]*t[0]+e[1]*t[1])/(Yb(e)*Yb(t))}function Xb(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Zb(e,t))}function qb(e,t,n,i,r,o,a,s,l,u,c){var d=l*(Ub/180),h=Hb(d)*(e-n)/2+Wb(d)*(t-i)/2,p=-1*Wb(d)*(e-n)/2+Hb(d)*(t-i)/2,f=h*h/(a*a)+p*p/(s*s);f>1&&(a*=Gb(f),s*=Gb(f));var g=(r===o?-1:1)*Gb((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,m=g*a*p/s,v=g*-s*h/a,y=(e+n)/2+Hb(d)*m-Wb(d)*v,x=(t+i)/2+Wb(d)*m+Hb(d)*v,_=Xb([1,0],[(h-m)/a,(p-v)/s]),b=[(h-m)/a,(p-v)/s],w=[(-1*h-m)/a,(-1*p-v)/s],C=Xb(b,w);if(Zb(b,w)<=-1&&(C=Ub),Zb(b,w)>=1&&(C=0),C<0){var S=Math.round(C/Ub*1e6)/1e6;C=2*Ub+S%2*Ub}c.addData(u,y,x,a,s,_,C,d,o)}var $b=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Kb=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Jb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.applyTransform=function(e){},t}(d_);function Qb(e){return null!=e.setData}function ew(e,t){var n=function(e){var t=new Hx;if(!e)return t;var n,i=0,r=0,o=i,a=r,s=Hx.CMD,l=e.match($b);if(!l)return t;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),h=void 0,p=c.match(Kb)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,C=void 0,S=i,M=r,T=void 0,I=void 0;switch(d){case"l":i+=p[m++],r+=p[m++],h=s.L,t.addData(h,i,r);break;case"L":i=p[m++],r=p[m++],h=s.L,t.addData(h,i,r);break;case"m":i+=p[m++],r+=p[m++],h=s.M,t.addData(h,i,r),o=i,a=r,d="l";break;case"M":i=p[m++],r=p[m++],h=s.M,t.addData(h,i,r),o=i,a=r,d="L";break;case"h":i+=p[m++],h=s.L,t.addData(h,i,r);break;case"H":i=p[m++],h=s.L,t.addData(h,i,r);break;case"v":r+=p[m++],h=s.L,t.addData(h,i,r);break;case"V":r=p[m++],h=s.L,t.addData(h,i,r);break;case"C":h=s.C,t.addData(h,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),i=p[m-2],r=p[m-1];break;case"c":h=s.C,t.addData(h,p[m++]+i,p[m++]+r,p[m++]+i,p[m++]+r,p[m++]+i,p[m++]+r),i+=p[m-2],r+=p[m-1];break;case"S":v=i,y=r,T=t.len(),I=t.data,n===s.C&&(v+=i-I[T-4],y+=r-I[T-3]),h=s.C,S=p[m++],M=p[m++],i=p[m++],r=p[m++],t.addData(h,v,y,S,M,i,r);break;case"s":v=i,y=r,T=t.len(),I=t.data,n===s.C&&(v+=i-I[T-4],y+=r-I[T-3]),h=s.C,S=i+p[m++],M=r+p[m++],i+=p[m++],r+=p[m++],t.addData(h,v,y,S,M,i,r);break;case"Q":S=p[m++],M=p[m++],i=p[m++],r=p[m++],h=s.Q,t.addData(h,S,M,i,r);break;case"q":S=p[m++]+i,M=p[m++]+r,i+=p[m++],r+=p[m++],h=s.Q,t.addData(h,S,M,i,r);break;case"T":v=i,y=r,T=t.len(),I=t.data,n===s.Q&&(v+=i-I[T-4],y+=r-I[T-3]),i=p[m++],r=p[m++],h=s.Q,t.addData(h,v,y,i,r);break;case"t":v=i,y=r,T=t.len(),I=t.data,n===s.Q&&(v+=i-I[T-4],y+=r-I[T-3]),i+=p[m++],r+=p[m++],h=s.Q,t.addData(h,v,y,i,r);break;case"A":x=p[m++],_=p[m++],b=p[m++],w=p[m++],C=p[m++],qb(S=i,M=r,i=p[m++],r=p[m++],w,C,x,_,b,h=s.A,t);break;case"a":x=p[m++],_=p[m++],b=p[m++],w=p[m++],C=p[m++],qb(S=i,M=r,i+=p[m++],r+=p[m++],w,C,x,_,b,h=s.A,t)}}"z"!==d&&"Z"!==d||(h=s.Z,t.addData(h),i=o,r=a),n=h}return t.toStatic(),t}(e),i=bh({},t);return i.buildPath=function(e){if(Qb(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},i.applyTransform=function(e){jb(n,e),this.dirtyShape()},i}function tw(e,t){return new Jb(ew(e,t))}function nw(e,t){t=t||{};var n=new d_;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?jb(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var iw=function(){return function(){this.cx=0,this.cy=0,this.r=0}}(),rw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new iw},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},t}(d_);rw.prototype.type="circle";var ow=function(){return function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}}(),aw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new ow},t.prototype.buildPath=function(e,t){var n=.5522848,i=t.cx,r=t.cy,o=t.rx,a=t.ry,s=o*n,l=a*n;e.moveTo(i-o,r),e.bezierCurveTo(i-o,r-l,i-s,r-a,i,r-a),e.bezierCurveTo(i+s,r-a,i+o,r-l,i+o,r),e.bezierCurveTo(i+o,r+l,i+s,r+a,i,r+a),e.bezierCurveTo(i-s,r+a,i-o,r+l,i-o,r),e.closePath()},t}(d_);aw.prototype.type="ellipse";var sw=Math.PI,lw=2*sw,uw=Math.sin,cw=Math.cos,dw=Math.acos,hw=Math.atan2,pw=Math.abs,fw=Math.sqrt,gw=Math.max,mw=Math.min,vw=1e-4;function yw(e,t,n,i,r,o,a){var s=e-n,l=t-i,u=(a?o:-o)/fw(s*s+l*l),c=u*l,d=-u*s,h=e+c,p=t+d,f=n+c,g=i+d,m=(h+f)/2,v=(p+g)/2,y=f-h,x=g-p,_=y*y+x*x,b=r-o,w=h*g-f*p,C=(x<0?-1:1)*fw(gw(0,b*b*_-w*w)),S=(w*x-y*C)/_,M=(-w*y-x*C)/_,T=(w*x+y*C)/_,I=(-w*y+x*C)/_,D=S-m,k=M-v,A=T-m,E=I-v;return D*D+k*k>A*A+E*E&&(S=T,M=I),{cx:S,cy:M,x0:-c,y0:-d,x1:S*(r/b-1),y1:M*(r/b-1)}}function xw(e,t){var n,i=gw(t.r,0),r=gw(t.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,h=pw(l-s),p=h>lw&&h%lw;if(p>vw&&(h=p),i>vw)if(h>lw-vw)e.moveTo(u+i*cw(s),c+i*uw(s)),e.arc(u,c,i,s,l,!d),r>vw&&(e.moveTo(u+r*cw(l),c+r*uw(l)),e.arc(u,c,r,l,s,d));else{var f=void 0,g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0,C=void 0,S=void 0,M=void 0,T=void 0,I=void 0,D=void 0,k=void 0,A=i*cw(s),E=i*uw(s),N=r*cw(l),L=r*uw(l),P=h>vw;if(P){var O=t.cornerRadius;O&&(f=(n=function(e){var t;if(Lh(e)){var n=e.length;if(!n)return e;t=1===n?[e[0],e[0],0,0]:2===n?[e[0],e[0],e[1],e[1]]:3===n?e.concat(e[2]):e}else t=[e,e,e,e];return t}(O))[0],g=n[1],m=n[2],v=n[3]);var R=pw(i-r)/2;if(y=mw(R,m),x=mw(R,v),_=mw(R,f),b=mw(R,g),S=w=gw(y,x),M=C=gw(_,b),(w>vw||C>vw)&&(T=i*cw(l),I=i*uw(l),D=r*cw(s),k=r*uw(s),h<sw)){var F=function(e,t,n,i,r,o,a,s){var l=n-e,u=i-t,c=a-r,d=s-o,h=d*l-c*u;if(!(h*h<vw))return[e+(h=(c*(t-o)-d*(e-r))/h)*l,t+h*u]}(A,E,D,k,T,I,N,L);if(F){var z=A-F[0],V=E-F[1],B=T-F[0],j=I-F[1],G=1/uw(dw((z*B+V*j)/(fw(z*z+V*V)*fw(B*B+j*j)))/2),W=fw(F[0]*F[0]+F[1]*F[1]);S=mw(w,(i-W)/(G+1)),M=mw(C,(r-W)/(G-1))}}}if(P)if(S>vw){var H=mw(m,S),U=mw(v,S),Y=yw(D,k,A,E,i,H,d),Z=yw(T,I,N,L,i,U,d);e.moveTo(u+Y.cx+Y.x0,c+Y.cy+Y.y0),S<w&&H===U?e.arc(u+Y.cx,c+Y.cy,S,hw(Y.y0,Y.x0),hw(Z.y0,Z.x0),!d):(H>0&&e.arc(u+Y.cx,c+Y.cy,H,hw(Y.y0,Y.x0),hw(Y.y1,Y.x1),!d),e.arc(u,c,i,hw(Y.cy+Y.y1,Y.cx+Y.x1),hw(Z.cy+Z.y1,Z.cx+Z.x1),!d),U>0&&e.arc(u+Z.cx,c+Z.cy,U,hw(Z.y1,Z.x1),hw(Z.y0,Z.x0),!d))}else e.moveTo(u+A,c+E),e.arc(u,c,i,s,l,!d);else e.moveTo(u+A,c+E);if(r>vw&&P)if(M>vw){H=mw(f,M),Y=yw(N,L,T,I,r,-(U=mw(g,M)),d),Z=yw(A,E,D,k,r,-H,d);e.lineTo(u+Y.cx+Y.x0,c+Y.cy+Y.y0),M<C&&H===U?e.arc(u+Y.cx,c+Y.cy,M,hw(Y.y0,Y.x0),hw(Z.y0,Z.x0),!d):(U>0&&e.arc(u+Y.cx,c+Y.cy,U,hw(Y.y0,Y.x0),hw(Y.y1,Y.x1),!d),e.arc(u,c,r,hw(Y.cy+Y.y1,Y.cx+Y.x1),hw(Z.cy+Z.y1,Z.cx+Z.x1),d),H>0&&e.arc(u+Z.cx,c+Z.cy,H,hw(Z.y1,Z.x1),hw(Z.y0,Z.x0),!d))}else e.lineTo(u+N,c+L),e.arc(u,c,r,l,s,d);else e.lineTo(u+N,c+L)}else e.moveTo(u,c);e.closePath()}}}var _w=function(){return function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}}(),bw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new _w},t.prototype.buildPath=function(e,t){xw(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(d_);bw.prototype.type="sector";var ww=function(){return function(){this.cx=0,this.cy=0,this.r=0,this.r0=0}}(),Cw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new ww},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,r=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,r,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,r,!0)},t}(d_);function Sw(e,t,n){var i=t.smooth,r=t.points;if(r&&r.length>=2){if(i){var o=function(e,t,n,i){var r,o,a,s,l=[],u=[],c=[],d=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;h<p;h++)Tp(a,a,e[h]),Ip(s,s,e[h]);Tp(a,a,i[0]),Ip(s,s,i[1])}for(h=0,p=e.length;h<p;h++){var f=e[h];if(n)r=e[h?h-1:p-1],o=e[(h+1)%p];else{if(0===h||h===p-1){l.push(pp(e[h]));continue}r=e[h-1],o=e[h+1]}vp(u,o,r),xp(u,u,t);var g=bp(f,r),m=bp(f,o),v=g+m;0!==v&&(g/=v,m/=v),xp(c,u,-g),xp(d,u,m);var y=gp([],f,c),x=gp([],f,d);i&&(Ip(y,y,a),Tp(y,y,s),Ip(x,x,a),Tp(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(r,i,n,t.smoothConstraint);e.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=r[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(r[0][0],r[0][1]);s=1;for(var d=r.length;s<d;s++)e.lineTo(r[s][0],r[s][1])}n&&e.closePath()}}Cw.prototype.type="ring";var Mw=function(){return function(){this.points=null,this.smooth=0,this.smoothConstraint=null}}(),Tw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new Mw},t.prototype.buildPath=function(e,t){Sw(e,t,!0)},t}(d_);Tw.prototype.type="polygon";var Iw=function(){return function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}}(),Dw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Iw},t.prototype.buildPath=function(e,t){Sw(e,t,!1)},t}(d_);Dw.prototype.type="polyline";var kw={},Aw=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}(),Ew=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Aw},t.prototype.buildPath=function(e,t){var n,i,r,o;if(this.subPixelOptimize){var a=y_(kw,t,this.style);n=a.x1,i=a.y1,r=a.x2,o=a.y2}else n=t.x1,i=t.y1,r=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,i),s<1&&(r=n*(1-s)+r*s,o=i*(1-s)+o*s),e.lineTo(r,o))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(d_);Ew.prototype.type="line";var Nw=[],Lw=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}}();function Pw(e,t,n){var i=e.cpx2,r=e.cpy2;return null!=i||null!=r?[(n?eg:Qf)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?eg:Qf)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?sg:ag)(e.x1,e.cpx1,e.x2,t),(n?sg:ag)(e.y1,e.cpy1,e.y2,t)]}var Ow=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Lw},t.prototype.buildPath=function(e,t){var n=t.x1,i=t.y1,r=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,i),null==l||null==u?(c<1&&(ug(n,a,r,c,Nw),a=Nw[1],r=Nw[2],ug(i,s,o,c,Nw),s=Nw[1],o=Nw[2]),e.quadraticCurveTo(a,s,r,o)):(c<1&&(ig(n,a,l,r,c,Nw),a=Nw[1],l=Nw[2],r=Nw[3],ig(i,s,u,o,c,Nw),s=Nw[1],u=Nw[2],o=Nw[3]),e.bezierCurveTo(a,s,l,u,r,o)))},t.prototype.pointAt=function(e){return Pw(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Pw(this.shape,e,!0);return _p(t,t)},t}(d_);Ow.prototype.type="bezier-curve";var Rw=function(){return function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}}(),Fw=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Rw},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,r=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=t.clockwise,l=Math.cos(o),u=Math.sin(o);e.moveTo(l*r+n,u*r+i),e.arc(n,i,r,o,a,!s)},t}(d_);Fw.prototype.type="arc";var zw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return Kd(t,e),t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),d_.prototype.getBoundingRect.call(this)},t}(d_),Vw=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Bw=function(e){function t(t,n,i,r,o,a){var s=e.call(this,o)||this;return s.x=null==t?0:t,s.y=null==n?0:n,s.x2=null==i?1:i,s.y2=null==r?0:r,s.type="linear",s.global=a||!1,s}return Kd(t,e),t}(Vw),jw=function(e){function t(t,n,i,r,o){var a=e.call(this,r)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==i?.5:i,a.type="radial",a.global=o||!1,a}return Kd(t,e),t}(Vw),Gw=[0,0],Ww=[0,0],Hw=new cf,Uw=new cf,Yw=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new cf;for(n=0;n<2;n++)this._axes[n]=new cf;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,i=this._axes,r=e.x,o=e.y,a=r+e.width,s=o+e.height;if(n[0].set(r,o),n[1].set(a,o),n[2].set(a,s),n[3].set(r,s),t)for(var l=0;l<4;l++)n[l].transform(t);cf.sub(i[0],n[1],n[0]),cf.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(l=0;l<2;l++)this._origin[l]=i[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,i=!t;return Hw.set(1/0,1/0),Uw.set(0,0),!this._intersectCheckOneSide(this,e,Hw,Uw,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,Hw,Uw,i,-1)&&(n=!1,i)||i||cf.copy(t,n?Hw:Uw),n},e.prototype._intersectCheckOneSide=function(e,t,n,i,r,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,Gw),this._getProjMinMaxOnAxis(s,t._corners,Ww),Gw[1]<Ww[0]||Gw[0]>Ww[1]){if(a=!1,r)return a;var u=Math.abs(Ww[0]-Gw[1]),c=Math.abs(Gw[0]-Ww[1]);Math.min(u,c)>i.len()&&(u<c?cf.scale(i,l,-u*o):cf.scale(i,l,c*o))}else if(n){u=Math.abs(Ww[0]-Gw[1]),c=Math.abs(Gw[0]-Ww[1]);Math.min(u,c)<n.len()&&(u<c?cf.scale(n,l,u*o):cf.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var i=this._axes[e],r=this._origin,o=t[0].dot(i)+r[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(i)+r[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}(),Zw=[],Xw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return Kd(t,e),t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new xf(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Zw)),e.union(i)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(e,t))return!0}return!1},t}(sx),qw=vy();function $w(e,t,n,i,r){var o;if(t&&t.ecModel){var a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s="update"===e;if(t&&t.isAnimationEnabled()){var l=void 0,u=void 0,c=void 0;return i?(l=Yh(i.duration,200),u=Yh(i.easing,"cubicOut"),c=0):(l=t.getShallow(s?"animationDurationUpdate":"animationDuration"),u=t.getShallow(s?"animationEasingUpdate":"animationEasing"),c=t.getShallow(s?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(l=o.duration),null!=o.easing&&(u=o.easing),null!=o.delay&&(c=o.delay)),Ph(c)&&(c=c(n,r)),Ph(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}function Kw(e,t,n,i,r,o,a){var s,l=!1;Ph(r)?(a=o,o=r,r=null):zh(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=$w(e,i,r,u?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,r):null);if(c&&c.duration>0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),o&&o()}function Jw(e,t,n,i,r,o){Kw("update",e,t,n,i,r,o)}function Qw(e,t,n,i,r,o){Kw("enter",e,t,n,i,r,o)}function eC(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++){if("leave"===e.animators[t].scope)return!0}return!1}function tC(e,t,n,i,r,o){eC(e)||Kw("leave",e,t,n,i,r,o)}function nC(e,t,n,i){e.removeTextContent(),e.removeTextGuideLine(),tC(e,{style:{opacity:0}},t,n,i)}function iC(e,t,n){function i(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||nC(e,t,n,i)}):nC(e,t,n,i)}function rC(e){qw(e).oldStyle=e.style}var oC=Math.max,aC=Math.min,sC={};var lC=function(e,t){var n=ew(e,t);return function(e){function t(t){var i=e.call(this,t)||this;return i.applyTransform=n.applyTransform,i.buildPath=n.buildPath,i}return Kd(t,e),t}(Jb)};function uC(e,t){sC[e]=t}function cC(e){if(sC.hasOwnProperty(e))return sC[e]}function dC(e,t,n,i){var r=tw(e,t);return n&&("center"===i&&(n=pC(n,r.getBoundingRect())),gC(r,n)),r}function hC(e,t,n){var i=new m_({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var r={width:e.width,height:e.height};i.setStyle(pC(t,r))}}});return i}function pC(e,t){var n,i=t.width/t.height,r=e.height*i;return n=r<=e.width?e.height:(r=e.width)/i,{x:e.x+e.width/2-r/2,y:e.y+e.height/2-n/2,width:r,height:n}}var fC=function(e,t){for(var n=[],i=e.length,r=0;r<i;r++){var o=e[r];n.push(o.getUpdatedPathProxy(!0))}var a=new d_(t);return a.createPathProxy(),a.buildPath=function(e){if(Qb(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function gC(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function mC(e,t){return y_(e,e,{lineWidth:t}),e}var vC=__;function yC(e,t){for(var n=nf([]);e&&e!==t;)of(n,e.getLocalTransform(),n),e=e.parent;return n}function xC(e,t,n){return t&&!Mh(t)&&(t=Xm.getLocalTransform(t)),n&&(t=uf([],t)),Mp([],e,t)}function _C(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),r=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-i:"right"===e?i:0,"top"===e?-r:"bottom"===e?r:0];return o=xC(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function bC(e){return!e.isGroup}function wC(e,t,n){if(e&&t){var i,r=(i={},e.traverse(function(e){bC(e)&&e.anid&&(i[e.anid]=e)}),i);t.traverse(function(e){if(bC(e)&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),Jw(e,i,n,V_(e).dataIndex)}}})}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=bh({},e.shape)),t}}function CC(e,t){return Ih(e,function(e){var n=e[0];n=oC(n,t.x),n=aC(n,t.x+t.width);var i=e[1];return i=oC(i,t.y),[n,i=aC(i,t.y+t.height)]})}function SC(e,t,n){var i=bh({rectHover:!0},t),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(r.image=e.slice(8),wh(r,n),new m_(i)):dC(e.replace("path://",""),i,n,"center")}function MC(e,t,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(TC(e,t,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function TC(e,t,n,i,r,o,a,s){var l,u=n-e,c=i-t,d=a-r,h=s-o,p=IC(d,h,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-r,g=t-o,m=IC(f,g,u,c)/p;if(m<0||m>1)return!1;var v=IC(f,g,d,h)/p;return!(v<0||v>1)}function IC(e,t,n,i){return e*i-n*t}function DC(e){var t=e.itemTooltipOption,n=e.componentModel,i=e.itemName,r=Oh(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&Th(Ah(l),function(e){lp(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=V_(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:wh({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function kC(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function AC(e,t){if(e)if(Lh(e))for(var n=0;n<e.length;n++)kC(e[n],t);else kC(e,t)}uC("circle",rw),uC("ellipse",aw),uC("sector",bw),uC("ring",Cw),uC("polygon",Tw),uC("polyline",Dw),uC("rect",C_),uC("line",Ew),uC("bezierCurve",Ow),uC("arc",Fw);const EC=Object.freeze(Object.defineProperty({__proto__:null,Arc:Fw,BezierCurve:Ow,BoundingRect:xf,Circle:rw,CompoundPath:zw,Ellipse:aw,Group:mv,Image:m_,IncrementalDisplayable:Xw,Line:Ew,LinearGradient:Bw,OrientedBoundingRect:Yw,Path:d_,Point:cf,Polygon:Tw,Polyline:Dw,RadialGradient:jw,Rect:C_,Ring:Cw,Sector:bw,Text:T_,applyTransform:xC,clipPointsByRect:CC,clipRectByRect:function(e,t){var n=oC(e.x,t.x),i=aC(e.x+e.width,t.x+t.width),r=oC(e.y,t.y),o=aC(e.y+e.height,t.y+t.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}},createIcon:SC,extendPath:function(e,t){return lC(e,t)},extendShape:function(e){return d_.extend(e)},getShapeClass:cC,getTransform:yC,groupTransition:wC,initProps:Qw,isElementRemoved:eC,lineLineIntersect:TC,linePolygonIntersect:MC,makeImage:hC,makePath:dC,mergePath:fC,registerShape:uC,removeElement:tC,removeElementWithFadeOut:iC,resizePath:gC,setTooltipConfig:DC,subPixelOptimize:vC,subPixelOptimizeLine:mC,subPixelOptimizeRect:function(e){return x_(e.shape,e.shape,e.style),e},transformDirection:_C,traverseElements:AC,updateProps:Jw},Symbol.toStringTag,{value:"Module"}));var NC={};function LC(e,t){for(var n=0;n<U_.length;n++){var i=U_[n],r=t[i],o=e.ensureState(i);o.style=o.style||{},o.style.text=r}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}function PC(e,t,n){var i,r=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;r&&(i=r.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==i&&(i=Ph(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:i},u=0;u<U_.length;u++){var c=U_[u],d=t[c];l[c]=Yh(r?r.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,i)}return l}function OC(e,t,n,i){n=n||NC;for(var r=e instanceof T_,o=!1,a=0;a<Y_.length;a++){if((h=t[Y_[a]])&&h.getShallow("show")){o=!0;break}}var s=r?e:e.getTextContent();if(o){r||(s||(s=new T_,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=PC(n,t),u=t.normal,c=!!u.getShallow("show"),d=FC(u,i&&i.normal,n,!1,!r);d.text=l.normal,r||e.setTextConfig(zC(u,n,!1));for(a=0;a<U_.length;a++){var h,p=U_[a];if(h=t[p]){var f=s.ensureState(p),g=!!Yh(h.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=FC(h,i&&i[p],n,!0,!r),f.style.text=l[p],!r)e.ensureState(p).textConfig=zC(h,n,!0)}}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(d.x=s.style.x),null!=s.style.y&&(d.y=s.style.y),s.ignore=!c,s.useStyle(d),s.dirty(),n.enableTextSetter&&(HC(s).setLabelText=function(e){var i=PC(n,t,e);LC(s,i)})}else s&&(s.ignore=!0);e.dirty()}function RC(e,t){t=t||"label";for(var n={normal:e.getModel(t)},i=0;i<U_.length;i++){var r=U_[i];n[r]=e.getModel([r,t])}return n}function FC(e,t,n,i,r){var o={};return function(e,t,n,i,r){n=n||NC;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||NC).rich;if(n){t=t||{};for(var i=Ah(n),r=0;r<i.length;r++){t[i[r]]=1}}e=e.parentModel}return t}(t);if(l)for(var u in o={},l)if(l.hasOwnProperty(u)){var c=t.getModel(["rich",u]);GC(o[u]={},c,s,n,i,r,!1,!0)}o&&(e.rich=o);var d=t.get("overflow");d&&(e.overflow=d);var h=t.get("minMargin");null!=h&&(e.margin=h);GC(e,t,s,n,i,r,!0,!1)}(o,e,n,i,r),t&&bh(o,t),o}function zC(e,t,n){t=t||{};var i,r={},o=e.getShallow("rotate"),a=Yh(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(i=e.getShallow("position")||(n?null:"inside"))&&(i=t.defaultOutsidePosition||"top"),null!=i&&(r.position=i),null!=s&&(r.offset=s),null!=o&&(o*=Math.PI/180,r.rotation=o),null!=a&&(r.distance=a),r.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",r}var VC=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],BC=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],jC=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function GC(e,t,n,i,r,o,a,s){n=!r&&n||NC;var l=i&&i.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Yh(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||("production"!==process.env.NODE_ENV&&"auto"===u&&Kv("color: 'auto'","color: 'inherit'"),u=l||null),"inherit"!==c&&"auto"!==c||("production"!==process.env.NODE_ENV&&"auto"===c&&Kv("color: 'auto'","color: 'inherit'"),c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var h=Yh(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=Yh(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=Yh(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),r||null!=d||s||(d=i&&i.defaultOpacity),null!=d&&(e.opacity=d),r||o||null==e.fill&&i.inheritColor&&(e.fill=i.inheritColor);for(var g=0;g<VC.length;g++){var m=VC[g];null!=(y=Yh(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<BC.length;g++){m=BC[g];null!=(y=t.getShallow(m))&&(e[m]=y)}if(null==e.verticalAlign){var v=t.getShallow("baseline");null!=v&&(e.verticalAlign=v)}if(!a||!i.disableBox){for(g=0;g<jC.length;g++){var y;m=jC[g];null!=(y=t.getShallow(m))&&(e[m]=y)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!l||("production"!==process.env.NODE_ENV&&"auto"===e.backgroundColor&&Kv("backgroundColor: 'auto'","backgroundColor: 'inherit'"),e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||("production"!==process.env.NODE_ENV&&"auto"===e.borderColor&&Kv("borderColor: 'auto'","borderColor: 'inherit'"),e.borderColor=l)}}function WC(e,t){var n=t&&t.getModel("textStyle");return Kh([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var HC=vy();function UC(e,t,n,i){if(e){var r=HC(e);r.prevValue=r.value,r.value=n;var o=t.normal;r.valueAnimation=o.get("valueAnimation"),r.valueAnimation&&(r.precision=o.get("precision"),r.defaultInterpolatedText=i,r.statesModels=t)}}function YC(e,t,n,i,r){var o=HC(e);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=Yh(o.interpolatedValue,o.prevValue),l=o.value;e.percent=0,(null==o.prevValue?Qw:Jw)(e,{percent:1},i,t,null,function(i){var u=Ty(n,o.precision,s,l,i);o.interpolatedValue=1===i?null:u;var c=PC({labelDataIndex:t,labelFetcher:r,defaultText:a?a(u):u+""},o.statesModels,u);LC(e,c)})}}var ZC,XC,qC=["textStyle","color"],$C=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],KC=new T_,JC=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(qC):null)},e.prototype.getFont=function(){return WC({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<$C.length;n++)t[$C[n]]=this.getShallow($C[n]);return KC.useStyle(t),KC.update(),KC.getBoundingRect()},e}(),QC=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],eS=Ry(QC),tS=function(){function e(){}return e.prototype.getLineStyle=function(e){return eS(this,e)},e}(),nS=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],iS=Ry(nS),rS=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return iS(this,e,t)},e}(),oS=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){xh(this.option,e,!0)},e.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,i=null==n?n:n[e];if(null==i&&!t){var r=this.parentModel;r&&(i=r.getShallow(e))}return i},e.prototype.getModel=function(t,n){var i=null!=t,r=i?this.parsePath(t):null;return new e(i?this._doGet(r):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new(0,this.constructor)(yh(this.option))},e.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!Qd.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&(!e[i]||null!=(n=n&&"object"==typeof n?n[e[i]]:null));i++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();Ay(oS),ZC=oS,XC=["__\0is_clz",Ny++].join("_"),ZC.prototype[XC]=!0,"production"!==process.env.NODE_ENV&&$h(!ZC.isInstance,'The method "is" can not be defined.'),ZC.isInstance=function(e){return!(!e||!e[XC])},Sh(oS,tS),Sh(oS,rS),Sh(oS,zy),Sh(oS,JC);var aS=Math.round(10*Math.random());function sS(e){return[e||"",aS++].join("_")}function lS(e,t){return xh(xh({},e,!0),t,!0)}var uS="ZH",cS="EN",dS=cS,hS={},pS={},fS=Qd.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||dS).toUpperCase().indexOf(uS)>-1?uS:dS;function gS(e,t){e=e.toUpperCase(),pS[e]=new oS(t),hS[e]=t}function mS(e){return pS[e]}gS(cS,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),gS(uS,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var vS=1e3,yS=6e4,xS=36e5,_S=864e5,bS=31536e6,wS={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},CS="{yyyy}-{MM}-{dd}",SS={year:"{yyyy}",month:"{yyyy}-{MM}",day:CS,hour:CS+" "+wS.hour,minute:CS+" "+wS.minute,second:CS+" "+wS.second,millisecond:wS.none},MS=["year","month","day","hour","minute","second","millisecond"],TS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function IS(e,t){return"0000".substr(0,t-(e+="").length)+e}function DS(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function kS(e){return e===DS(e)}function AS(e,t,n,i){var r=Ov(e),o=r[LS(n)](),a=r[PS(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[OS(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[RS(n)](),d=(c-1)%12+1,h=r[FS(n)](),p=r[zS(n)](),f=r[VS(n)](),g=c>=12?"pm":"am",m=g.toUpperCase(),v=(i instanceof oS?i:mS(i||fS)||pS[dS]).getModel("time"),y=v.get("month"),x=v.get("monthAbbr"),_=v.get("dayOfWeek"),b=v.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,m+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,IS(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,IS(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,IS(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,IS(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,IS(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,IS(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,IS(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,IS(f,3)).replace(/{S}/g,f+"")}function ES(e,t){var n=Ov(e),i=n[PS(t)]()+1,r=n[OS(t)](),o=n[RS(t)](),a=n[FS(t)](),s=n[zS(t)](),l=0===n[VS(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===o,h=d&&1===r;return h&&1===i?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function NS(e,t,n){var i=Fh(e)?Ov(e):e;switch(t=t||ES(e,n)){case"year":return i[LS(n)]();case"half-year":return i[PS(n)]()>=6?1:0;case"quarter":return Math.floor((i[PS(n)]()+1)/4);case"month":return i[PS(n)]();case"day":return i[OS(n)]();case"half-day":return i[RS(n)]()/24;case"hour":return i[RS(n)]();case"minute":return i[FS(n)]();case"second":return i[zS(n)]();case"millisecond":return i[VS(n)]()}}function LS(e){return e?"getUTCFullYear":"getFullYear"}function PS(e){return e?"getUTCMonth":"getMonth"}function OS(e){return e?"getUTCDate":"getDate"}function RS(e){return e?"getUTCHours":"getHours"}function FS(e){return e?"getUTCMinutes":"getMinutes"}function zS(e){return e?"getUTCSeconds":"getSeconds"}function VS(e){return e?"getUTCMilliseconds":"getMilliseconds"}function BS(e){return e?"setUTCFullYear":"setFullYear"}function jS(e){return e?"setUTCMonth":"setMonth"}function GS(e){return e?"setUTCDate":"setDate"}function WS(e){return e?"setUTCHours":"setHours"}function HS(e){return e?"setUTCMinutes":"setMinutes"}function US(e){return e?"setUTCSeconds":"setSeconds"}function YS(e){return e?"setUTCMilliseconds":"setMilliseconds"}function ZS(e){if(!jv(e))return Oh(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function XS(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var qS=qh;function $S(e,t,n){function i(e){return e&&Kh(e)?e:"-"}function r(e){return!(null==e||isNaN(e)||!isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?Ov(e):e;if(!isNaN(+s))return AS(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Rh(e)?i(e):Fh(e)&&r(e)?e+"":"-";var l=Bv(e);return r(l)?ZS(l):Rh(e)?i(e):"boolean"==typeof e?e+"":"-"}var KS=["a","b","c","d","e","f","g"],JS=function(e,t){return"{"+e+(null==t?"":t)+"}"};function QS(e,t,n){Lh(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],o=0;o<r.length;o++){var a=KS[o];e=e.replace(JS(a),JS(a,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=t[s][r[l]];e=e.replace(JS(KS[l],s),n?Bp(u):u)}return e}function eM(e,t){return t=t||"transparent",Oh(e)?e:zh(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function tM(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var nM=Th,iM=["left","right","top","bottom","width","height"],rM=[["width","left","right"],["height","top","bottom"]];function oM(e,t,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;t.eachChild(function(l,u){var c,d,h=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=h.width+(f?-f.x+h.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var m=h.height+(f?-f.y+h.y:0);(d=a+m)>r||l.newline?(o+=s+n,a=0,d=m,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=d+n)})}var aM=oM;function sM(e,t,n){n=qS(n||0);var i=t.width,r=t.height,o=Sv(e.left,i),a=Sv(e.top,r),s=Sv(e.right,i),l=Sv(e.bottom,r),u=Sv(e.width,i),c=Sv(e.height,r),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=i-s-h-o),isNaN(c)&&(c=r-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=i-s-u-h),isNaN(a)&&(a=r-l-c-d),e.left||e.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-h}switch(e.top||e.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-d}o=o||0,a=a||0,isNaN(u)&&(u=i-h-o-(s||0)),isNaN(c)&&(c=r-d-a-(l||0));var f=new xf(o+n[3],a+n[0],u,c);return f.margin=n,f}function lM(e,t,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||e).x=e.x,o.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new xf(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=sM(wh({width:a.width,height:a.height},t),n,i),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(o.x=h,o.y=p):(o.x+=h,o.y+=p),o===e&&e.markRedraw(),!0}function uM(e){var t=e.layoutMode||e.constructor.layoutMode;return zh(t)?t:t?{type:t}:null}function cM(e,t,n){var i=n&&n.ignoreSize;!Lh(i)&&(i=[i,i]);var r=a(rM[0],0),o=a(rM[1],1);function a(n,r){var o={},a=0,u={},c=0;if(nM(n,function(t){u[t]=e[t]}),nM(n,function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++}),i[r])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return o;for(var d=0;d<n.length;d++){var h=n[d];if(!s(o,h)&&s(e,h)){o[h]=e[h];break}}return o}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){nM(e,function(e){t[e]=n[e]})}u(rM[0],e,r),u(rM[1],e,o)}function dM(e){return hM({},e)}function hM(e,t){return t&&e&&nM(iM,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}Nh(oM,"vertical"),Nh(oM,"horizontal");var pM=vy(),fM=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.uid=sS("ec_cpt_model"),r}var n;return Kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=uM(this),i=n?dM(e):{};xh(e,t.getTheme().get(this.mainType)),xh(e,this.getDefaultOption()),n&&cM(e,i,n)},t.prototype.mergeOption=function(e,t){xh(this.option,e,!0);var n=uM(this);n&&cM(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Dy])}(e))return e.defaultOption;var t=pM(this);if(!t.defaultOption){for(var n=[],i=e;i;){var r=i.prototype.defaultOption;r&&n.push(r),i=i.superClass}for(var o={},a=n.length-1;a>=0;a--)o=xh(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",i=e+"Id";return Cy(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=((n=t.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),t}(oS);Ey(fM,oS),Oy(fM),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var i=ky(e);t[i.main]=n},e.determineSubType=function(n,i){var r=i.type;if(!r){var o=ky(n).main;e.hasSubTypes(n)&&t[o]&&(r=t[o](i))}return r}}(fM),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,r,o){if(e.length){var a=function(e){var i={},r=[];return Th(e,function(o){var a=n(i,o),s=function(e,t){var n=[];return Th(e,function(e){Ch(t,e)>=0&&n.push(e)}),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&r.push(o),Th(s,function(e){Ch(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(i,e);Ch(t.successor,e)<0&&t.successor.push(o)})}),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(Th(e,function(e){u[e]=!0});l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(r.call(o,c,d.originalDeps.slice()),delete u[c]),Th(d.successor,h?f:p)}Th(u,function(){var t="";throw"production"!==process.env.NODE_ENV&&(t=Jv("Circular dependency may exists: ",u,e,i)),new Error(t)})}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(fM,function(e){var t=[];Th(fM.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Ih(t,function(e){return ky(e).main}),"dataset"!==e&&Ch(t,"dataset")<=0&&t.unshift("dataset");return t});var gM="";"undefined"!=typeof navigator&&(gM=navigator.platform||"");var mM="rgba(0, 0, 0, 0.2)";const vM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:mM,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:mM,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:mM,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:mM,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:mM,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:mM,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:gM.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var yM=rp(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),xM="original",_M="arrayRows",bM="objectRows",wM="keyedColumns",CM="typedArray",SM="unknown",MM="column",TM="row",IM=1,DM=2,kM=3,AM=vy();function EM(e,t,n){var i={},r=LM(t);if(!r||!e)return i;var o,a,s=[],l=[],u=t.ecModel,c=AM(u).datasetMap,d=r.uid+"_"+n.seriesLayoutBy;Th(e=e.slice(),function(t,n){var r=zh(t)?t:e[n]={name:t};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]});var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function f(e){var t=e.dimsDef;return t?t.length:1}return Th(e,function(e,t){var n=e.name,r=f(e);if(null==o){var a=h.valueWayDim;p(i[n],a,r),p(l,a,r),h.valueWayDim+=r}else if(o===t)p(i[n],0,r),p(s,0,r);else{a=h.categoryWayDim;p(i[n],a,r),p(l,a,r),h.categoryWayDim+=r}}),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i}function NM(e,t,n){var i={};if(!LM(e))return i;var r,o=t.sourceFormat,a=t.dimensionsDefine;o!==bM&&o!==wM||Th(a,function(e,t){"name"===(zh(e)?e.name:e)&&(r=t)});var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=OM(t.data,o,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var d=c===kM;if(d&&null==e.v&&l!==r&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===kM)&&(e.n=l),h(e)&&s[e.n]!==kM)return e;d||(c===DM&&null==i.v&&l!==r&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function h(e){return null!=e.v&&null!=e.n}return h(e)?e:h(i)?i:null}();if(s){i.value=[s.v];var l=null!=r?r:s.n;i.itemName=[l],i.seriesName=[l]}return i}function LM(e){if(!e.get("data",!0))return Cy(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},by).models[0]}function PM(e,t){return OM(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function OM(e,t,n,i,r,o){var a,s,l;if(Bh(e))return kM;if(i){var u=i[o];zh(u)?(s=u.name,l=u.type):Oh(u)&&(s=u)}if(null!=l)return"ordinal"===l?IM:kM;if(t===_M){var c=e;if(n===TM){for(var d=c[o],h=0;h<(d||[]).length&&h<5;h++)if(null!=(a=y(d[r+h])))return a}else for(h=0;h<c.length&&h<5;h++){var p=c[r+h];if(p&&null!=(a=y(p[o])))return a}}else if(t===bM){var f=e;if(!s)return kM;for(h=0;h<f.length&&h<5;h++){if((m=f[h])&&null!=(a=y(m[s])))return a}}else if(t===wM){if(!s)return kM;if(!(d=e[s])||Bh(d))return kM;for(h=0;h<d.length&&h<5;h++)if(null!=(a=y(d[h])))return a}else if(t===xM){var g=e;for(h=0;h<g.length&&h<5;h++){var m,v=ay(m=g[h]);if(!Lh(v))return kM;if(null!=(a=y(v[o])))return a}}function y(e){var t=Oh(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?DM:kM:t&&"-"!==e?IM:void 0}return kM}var RM=rp();var FM,zM,VM,BM=vy(),jM=vy(),GM=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var i=iy(this.get("color",!0)),r=this.get("colorLayer",!0);return HM(this,BM,i,r,e,t,n)},e.prototype.clearColorPalette=function(){var e,t;(t=BM)(e=this).paletteIdx=0,t(e).paletteNameMap={}},e}();function WM(e,t,n,i){var r=iy(e.get(["aria","decal","decals"]));return HM(e,jM,r,null,t,n,i)}function HM(e,t,n,i,r,o,a){var s=t(o=o||e),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=null!=a&&i?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(i,a):n;if((c=c||n)&&c.length){var d=c[l];return r&&(u[r]=d),s.paletteIdx=(l+1)%c.length,d}}var UM="\0_ec_inner",YM={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},ZM={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},XM={};var qM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.init=function(e,t,n,i,r,o){i=i||{},this.option=null,this._theme=new oS(i),this._locale=new oS(r),this._optionManager=o},t.prototype.setOption=function(e,t,n){"production"!==process.env.NODE_ENV&&($h(null!=e,"option is null/undefined"),$h(1!==e[UM],"please use chart.getOption()"));var i=JM(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,t){return this._resetOption(e,JM(t))},t.prototype._resetOption=function(e,t){var n=!1,i=this._optionManager;if(!e||"recreate"===e){var r=i.mountOption("recreate"===e);"production"!==process.env.NODE_ENV&&Th(r,function(e,t){if(!fM.hasClass(t)){var n=YM[t];n&&!XM[n]&&(qv("Component "+t+" is used but not imported.\nimport { "+n+" } from 'echarts/components';\necharts.use(["+n+"]);"),XM[n]=!0)}}),this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(r,t)):VM(this,r),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=i.getMediaOption(this);a.length&&Th(a,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=rp(),s=t&&t.replaceMergeMainTypeMap;AM(this).datasetMap=rp(),Th(e,function(e,t){null!=e&&(fM.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?yh(e):xh(n[t],e,!0))}),s&&s.each(function(e,t){fM.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))}),fM.topologicalTravel(o,fM.getAllClassMainTypes(),function(t){var o=function(e,t,n){var i=RM.get(t);if(!i)return n;var r=i(e);if(!r)return n;if("production"!==process.env.NODE_ENV)for(var o=0;o<r.length;o++)$h(gy(r[o]));return n.concat(r)}(this,t,iy(e[t])),a=i.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=ly(a,o,l);(function(e,t,n){Th(e,function(e){var i=e.newOption;zh(i)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,i){return t.type?t.type:n?n.subType:i.determineSubType(e,t)}(t,i,e.existing,n))})})(u,t,fM),n[t]=null,i.set(t,null),r.set(t,0);var c,d,h=[],p=[],f=0;Th(u,function(e,n){var i=e.existing,r=e.newOption;if(r){var o="series"===t,a=fM.getClass(t,e.keyInfo.subType,!o);if(!a){if("production"!==process.env.NODE_ENV){var s=e.keyInfo.subType,l=ZM[s];XM[s]||(XM[s]=!0,qv(l?"Series "+s+" is used but not imported.\nimport { "+l+" } from 'echarts/charts';\necharts.use(["+l+"]);":"Unknown series "+s))}return}if("tooltip"===t){if(c)return void("production"!==process.env.NODE_ENV&&(d||(Xv("Currently only one tooltip component is allowed."),d=!0)));c=!0}if(i&&i.constructor===a)i.name=e.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var u=bh({componentIndex:n},e.keyInfo);bh(i=new a(r,this,this,u),u),e.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),p.push(i),f++):(h.push(void 0),p.push(void 0))},this),n[t]=h,i.set(t,p),r.set(t,f),"series"===t&&FM(this)},this),this._seriesIndices||FM(this)},t.prototype.getOption=function(){var e=yh(this.option);return Th(e,function(t,n){if(fM.hasClass(n)){for(var i=iy(t),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!gy(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,e[n]=i}}),delete e[UM],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var i=n[t||0];if(i)return i;if(null==t)for(var r=0;r<n.length;r++)if(n[r])return n[r]}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n,i=e.index,r=e.id,o=e.name,a=this._componentsMap.get(t);return a&&a.length?(null!=i?(n=[],Th(iy(i),function(e){a[e]&&n.push(a[e])})):n=null!=r?$M("id",r,a):null!=o?$M("name",o,a):kh(a,function(e){return!!e}),KM(n,e)):[]},t.prototype.findComponents=function(e){var t,n,i,r,o,a=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",r=s+"Name",!(t=a)||null==t[n]&&null==t[i]&&null==t[r]?null:{mainType:s,index:t[n],id:t[i],name:t[r]}),u=l?this.queryComponents(l):kh(this._componentsMap.get(s),function(e){return!!e});return o=KM(u,e),e.filter?kh(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var i=this._componentsMap;if(Ph(e)){var r=t,o=e;i.each(function(e,t){for(var n=0;e&&n<e.length;n++){var i=e[n];i&&o.call(r,t,i,i.componentIndex)}})}else for(var a=Oh(e)?i.get(e):zh(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var l=a[s];l&&t.call(n,l,l.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=dy(e,null);return kh(this._componentsMap.get("series"),function(e){return!!e&&null!=t&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return kh(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return kh(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){zM(this),Th(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)},this)},t.prototype.eachRawSeries=function(e,t){Th(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){zM(this),Th(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];r.subType===e&&t.call(n,r,i)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return Th(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return zM(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){zM(this);var n=[];Th(this._seriesIndices,function(i){var r=this._componentsMap.get("series")[i];e.call(t,r,i)&&n.push(i)},this),this._seriesIndices=n,this._seriesIndicesMap=rp(n)},t.prototype.restoreData=function(e){FM(this);var t=this._componentsMap,n=[];t.each(function(e,t){fM.hasClass(t)&&n.push(t)}),fM.topologicalTravel(n,fM.getAllClassMainTypes(),function(n){Th(t.get(n),function(t){!t||"series"===n&&function(e,t){if(t){var n=t.seriesIndex,i=t.seriesId,r=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=r&&e.name!==r}}(t,e)||t.restoreData()})})},t.internalField=(FM=function(e){var t=e._seriesIndices=[];Th(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=rp(t)},zM=function(e){if("production"!==process.env.NODE_ENV&&!e._seriesIndices)throw new Error("Option should contains series.")},void(VM=function(e,t){e.option={},e.option[UM]=1,e._componentsMap=rp({series:[]}),e._componentsCount=rp();var n,i,r,o=t.aria;zh(o)&&null==o.enabled&&(o.enabled=!0),n=t,i=e._theme.option,r=n.color&&!n.colorLayer,Th(i,function(e,t){"colorLayer"===t&&r||fM.hasClass(t)||("object"==typeof e?n[t]=n[t]?xh(n[t],e,!1):yh(e):null==n[t]&&(n[t]=e))}),xh(t,vM,!1),e._mergeOption(t,null)})),t}(oS);function $M(e,t,n){if(Lh(t)){var i=rp();return Th(t,function(e){null!=e&&(null!=dy(e,null)&&i.set(e,!0))}),kh(n,function(t){return t&&i.get(t[e])})}var r=dy(t,null);return kh(n,function(t){return t&&null!=r&&t[e]===r})}function KM(e,t){return t.hasOwnProperty("subType")?kh(e,function(e){return e&&e.subType===t.subType}):e}function JM(e){var t=rp();return e&&Th(iy(e.replaceMerge),function(e){"production"!==process.env.NODE_ENV&&$h(fM.hasClass(e),'"'+e+'" is not valid component main type in "replaceMerge"'),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Sh(qM,GM);var QM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],eT=function(){return function(e){Th(QM,function(t){this[t]=Eh(e[t],e)},this)}}(),tT={},nT=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];Th(tT,function(i,r){var o=i.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){Th(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){tT[e]=t},e.get=function(e){return tT[e]},e}(),iT=/^(min|max)?(.+)$/,rT=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(Th(iy(e.series),function(e){e&&e.data&&Bh(e.data)&&Qh(e.data)}),Th(iy(e.dataset),function(e){e&&e.source&&Bh(e.source)&&Qh(e.source)})),e=yh(e);var i=this._optionBackup,r=function(e,t,n){var i,r,o=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(r=a).timeline||(r.timeline=s):((d||c)&&(e.options=e.media=null),r=e);c&&(Lh(u)?Th(u,function(e){"production"!==process.env.NODE_ENV&&e&&!e.option&&zh(e.query)&&zh(e.query.option)&&qv("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),e&&e.option&&(e.query?o.push(e):i||(i=e))}):"production"!==process.env.NODE_ENV&&qv("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }"));function h(e){Th(t,function(t){t(e,n)})}return h(r),Th(l,function(e){return h(e)}),Th(o,function(e){return h(e.option)}),{baseOption:r,timelineOptions:l||[],mediaDefault:i,mediaList:o}}(e,t,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],yh(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=yh(n[i.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,i=this._api.getWidth(),r=this._api.getHeight(),o=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!o.length&&!a)return l;for(var u=0,c=o.length;u<c;u++)oT(o[u].query,i,r)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=Ih(s,function(e){return yh(-1===e?a.option:o[e].option)})),this._currentMediaIndices=s,l},e}();function oT(e,t,n){var i={width:t,height:n,aspectratio:t/n},r=!0;return Th(e,function(e,t){var n=t.match(iT);if(n&&n[1]&&n[2]){var o=n[1],a=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(i[a],e,o)||(r=!1)}}),r}var aT=Th,sT=zh,lT=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function uT(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=lT.length;n<i;n++){var r=lT[n],o=t.normal,a=t.emphasis;o&&o[r]&&("production"!==process.env.NODE_ENV&&Kv("itemStyle.normal."+r,r),e[r]=e[r]||{},e[r].normal?xh(e[r].normal,o[r]):e[r].normal=o[r],o[r]=null),a&&a[r]&&("production"!==process.env.NODE_ENV&&Kv("itemStyle.emphasis."+r,"emphasis."+r),e[r]=e[r]||{},e[r].emphasis?xh(e[r].emphasis,a[r]):e[r].emphasis=a[r],a[r]=null)}}function cT(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,r=e[t].emphasis;i&&("production"!==process.env.NODE_ENV&&$v("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),n?(e[t].normal=e[t].emphasis=null,wh(e[t],i)):e[t]=i),r&&("production"!==process.env.NODE_ENV&&$v(t+".emphasis has been changed to emphasis."+t+" since 4.0"),e.emphasis=e.emphasis||{},e.emphasis[t]=r,r.focus&&(e.emphasis.focus=r.focus),r.blurScope&&(e.emphasis.blurScope=r.blurScope))}}function dT(e){cT(e,"itemStyle"),cT(e,"lineStyle"),cT(e,"areaStyle"),cT(e,"label"),cT(e,"labelLine"),cT(e,"upperLabel"),cT(e,"edgeLabel")}function hT(e,t){var n=sT(e)&&e[t],i=sT(n)&&n.textStyle;if(i){"production"!==process.env.NODE_ENV&&$v("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var r=0,o=oy.length;r<o;r++){var a=oy[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}}function pT(e){e&&(dT(e),hT(e,"label"),e.emphasis&&hT(e.emphasis,"label"))}function fT(e){return Lh(e)?e:e?[e]:[]}function gT(e){return(Lh(e)?e[0]:e)||{}}function mT(e,t){aT(fT(e.series),function(e){sT(e)&&function(e){if(sT(e)){uT(e),dT(e),hT(e,"label"),hT(e,"upperLabel"),hT(e,"edgeLabel"),e.emphasis&&(hT(e.emphasis,"label"),hT(e.emphasis,"upperLabel"),hT(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(uT(t),pT(t));var n=e.markLine;n&&(uT(n),pT(n));var i=e.markArea;i&&pT(i);var r=e.data;if("graph"===e.type){r=r||e.nodes;var o=e.links||e.edges;if(o&&!Bh(o))for(var a=0;a<o.length;a++)pT(o[a]);Th(e.categories,function(e){dT(e)})}if(r&&!Bh(r))for(a=0;a<r.length;a++)pT(r[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)pT(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)Lh(l[a])?(pT(l[a][0]),pT(l[a][1])):pT(l[a])}"gauge"===e.type?(hT(e,"axisLabel"),hT(e,"title"),hT(e,"detail")):"treemap"===e.type?(cT(e.breadcrumb,"itemStyle"),Th(e.levels,function(e){dT(e)})):"tree"===e.type&&dT(e.leaves)}}(e)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),aT(n,function(t){aT(fT(e[t]),function(e){e&&(hT(e,"axisLabel"),hT(e.axisPointer,"label"))})}),aT(fT(e.parallel),function(e){var t=e&&e.parallelAxisDefault;hT(t,"axisLabel"),hT(t&&t.axisPointer,"label")}),aT(fT(e.calendar),function(e){cT(e,"itemStyle"),hT(e,"dayLabel"),hT(e,"monthLabel"),hT(e,"yearLabel")}),aT(fT(e.radar),function(e){hT(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name,"production"!==process.env.NODE_ENV&&$v("name property in radar component has been changed to axisName")),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap,"production"!==process.env.NODE_ENV&&$v("nameGap property in radar component has been changed to axisNameGap")),"production"!==process.env.NODE_ENV&&aT(e.indicator,function(e){e.text&&Kv("text","name","radar.indicator")})}),aT(fT(e.geo),function(e){sT(e)&&(pT(e),aT(fT(e.regions),function(e){pT(e)}))}),aT(fT(e.timeline),function(e){pT(e),cT(e,"label"),cT(e,"itemStyle"),cT(e,"controlStyle",!0);var t=e.data;Lh(t)&&Th(t,function(e){zh(e)&&(cT(e,"label"),cT(e,"itemStyle"))})}),aT(fT(e.toolbox),function(e){cT(e,"iconStyle"),aT(e.feature,function(e){cT(e,"iconStyle")})}),hT(gT(e.axisPointer),"label"),hT(gT(e.tooltip).axisPointer,"label")}function vT(e){e&&Th(yT,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var yT=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],xT=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],_T=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function bT(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<_T.length;n++){var i=_T[n][1],r=_T[n][0];null!=t[i]&&(t[r]=t[i],"production"!==process.env.NODE_ENV&&Kv(i,r))}}function wT(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&("production"!==process.env.NODE_ENV&&Kv("label.margin","label.edgeDistance","pie"),e.edgeDistance=e.margin)}function CT(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,"production"!==process.env.NODE_ENV&&Kv("downplay","blur","sunburst"))}function ST(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&ST(e[n].children,t)}function MT(e,t){mT(e,t),e.series=iy(e.series),Th(e.series,function(e){if(zh(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow,"production"!==process.env.NODE_ENV&&Kv("clipOverflow","clip","line"));else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise,"production"!==process.env.NODE_ENV&&Kv("clockWise","clockwise")),wT(e.label),(r=e.data)&&!Bh(r))for(var n=0;n<r.length;n++)wT(r[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&("production"!==process.env.NODE_ENV&&Kv("hoverOffset","emphasis.scaleSize"),e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===t){var i=function(e,t){for(var n=t.split(","),i=e,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(e,"pointer.color");null!=i&&function(e,t,n){for(var i,r=t.split(","),o=e,a=0;a<r.length-1;a++)null==o[i=r[a]]&&(o[i]={}),o=o[i];null==o[r[a]]&&(o[r[a]]=n)}(e,"itemStyle.color",i)}else if("bar"===t){var r;if(bT(e),bT(e.backgroundStyle),bT(e.emphasis),(r=e.data)&&!Bh(r))for(n=0;n<r.length;n++)"object"==typeof r[n]&&(bT(r[n]),bT(r[n]&&r[n].emphasis))}else if("sunburst"===t){var o=e.highlightPolicy;o&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=o,"production"!==process.env.NODE_ENV&&Kv("highlightPolicy","emphasis.focus","sunburst"))),CT(e),ST(e.data,CT)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&("production"!==process.env.NODE_ENV&&Kv("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&("production"!==process.env.NODE_ENV&&Kv("mapType","map","map"),e.map=e.mapType),e.mapLocation&&("production"!==process.env.NODE_ENV&&$v("`mapLocation` is not used anymore."),wh(e,e.mapLocation)));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&("production"!==process.env.NODE_ENV&&Kv("hoverAnimation","emphasis.scale"),e.emphasis.scale=e.hoverAnimation)),vT(e)}}),e.dataRange&&(e.visualMap=e.dataRange),Th(xT,function(t){var n=e[t];n&&(Lh(n)||(n=[n]),Th(n,function(e){vT(e)}))})}function TT(e){Th(e,function(t,n){var i=[],r=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(o,u,c){var d,h,p=a.get(t.stackedDimension,c);if(isNaN(p))return r;s?h=a.getRawIndex(c):d=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(h=m.data.rawIndexOf(m.stackedByDimension,d)),h>=0){var v=m.data.getByRawIndex(m.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=Av(p,v),f=v;break}}}return i[0]=p,i[1]=f,i})})}var IT,DT,kT,AT,ET,NT=function(){return function(e){this.data=e.data||(e.sourceFormat===wM?{}:[]),this.sourceFormat=e.sourceFormat||SM,this.seriesLayoutBy=e.seriesLayoutBy||MM,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var i=t[n];null==i.type&&PM(this,n)===IM&&(i.type="ordinal")}}}();function LT(e){return e instanceof NT}function PT(e,t,n){n=n||RT(e);var i=t.seriesLayoutBy,r=function(e,t,n,i,r){var o,a;if(!e)return{dimensionsDefine:FT(r),startIndex:a,dimensionsDetectedCount:o};if(t===_M){var s=e;"auto"===i||null==i?zT(function(e){null!=e&&"-"!==e&&(Oh(e)?null==a&&(a=1):a=0)},n,s,10):a=Fh(i)?i:i?1:0,r||1!==a||(r=[],zT(function(e,t){r[t]=null!=e?e+"":""},n,s,1/0)),o=r?r.length:n===TM?s.length:s[0]?s[0].length:null}else if(t===bM)r||(r=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return Ah(t)}(e));else if(t===wM)r||(r=[],Th(e,function(e,t){r.push(t)}));else if(t===xM){var l=ay(e[0]);o=Lh(l)&&l.length||1}else t===CM&&"production"!==process.env.NODE_ENV&&$h(!!r,"dimensions must be given if data is TypedArray.");return{startIndex:a,dimensionsDefine:FT(r),dimensionsDetectedCount:o}}(e,n,i,t.sourceHeader,t.dimensions);return new NT({data:e,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:yh(t)})}function OT(e){return new NT({data:e,sourceFormat:Bh(e)?CM:xM})}function RT(e){var t=SM;if(Bh(e))t=CM;else if(Lh(e)){0===e.length&&(t=_M);for(var n=0,i=e.length;n<i;n++){var r=e[n];if(null!=r){if(Lh(r)||Bh(r)){t=_M;break}if(zh(r)){t=bM;break}}}}else if(zh(e))for(var o in e)if(lp(e,o)&&Mh(e[o])){t=wM;break}return t}function FT(e){if(e){var t=rp();return Ih(e,function(e,n){var i={name:(e=zh(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var r=t.get(i.name);return r?i.name+="-"+r.count++:t.set(i.name,{count:1}),i})}}function zT(e,t,n,i){if(t===TM)for(var r=0;r<n.length&&r<i;r++)e(n[r]?n[r][0]:null,r);else{var o=n[0]||[];for(r=0;r<o.length&&r<i;r++)e(o[r],r)}}function VT(e){var t=e.sourceFormat;return t===bM||t===wM}var BT=function(){function e(e,t){var n=LT(e)?e:OT(e);this._source=n;var i=this._data=n.data;if(n.sourceFormat===CM){if("production"!==process.env.NODE_ENV&&null==t)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=t,this._data=i}ET(this,i,n)}var t;return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=((t=e.prototype).pure=!1,void(t.persistent=!0)),e.internalField=function(){var e;ET=function(e,r,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine,c=AT[$T(a,s)];if("production"!==process.env.NODE_ENV&&$h(c,"Invalide sourceFormat: "+a),bh(e,c),a===CM)e.getItem=t,e.count=i,e.fillStorage=n;else{var d=WT(a,s);e.getItem=Eh(d,null,r,l,u);var h=YT(a,s);e.count=Eh(h,null,r,l,u)}};var t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,i=this._dimSize,r=i*e,o=0;o<i;o++)t[o]=n[r+o];return t},n=function(e,t,n,i){for(var r=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],c=t-e,d=n[a],h=0;h<c;h++){var p=r[h*o+a];d[e+h]=p,p<l&&(l=p),p>u&&(u=p)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[_M+"_"+MM]={pure:!0,appendData:r},e[_M+"_"+TM]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[bM]={pure:!0,appendData:r},e[wM]={pure:!0,appendData:function(e){var t=this._data;Th(e,function(e,n){for(var i=t[n]||(t[n]=[]),r=0;r<(e||[]).length;r++)i.push(e[r])})}},e[xM]={appendData:r},e[CM]={persistent:!1,pure:!0,appendData:function(e){"production"!==process.env.NODE_ENV&&$h(Bh(e),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},AT=e}(),e}(),jT=function(e,t,n,i){return e[i]},GT=((IT={})[_M+"_"+MM]=function(e,t,n,i){return e[i+t]},IT[_M+"_"+TM]=function(e,t,n,i,r){i+=t;for(var o=r||[],a=e,s=0;s<a.length;s++){var l=a[s];o[s]=l?l[i]:null}return o},IT[bM]=jT,IT[wM]=function(e,t,n,i,r){for(var o=r||[],a=0;a<n.length;a++){var s=n[a].name;if("production"!==process.env.NODE_ENV&&null==s)throw new Error;var l=e[s];o[a]=l?l[i]:null}return o},IT[xM]=jT,IT);function WT(e,t){var n=GT[$T(e,t)];return"production"!==process.env.NODE_ENV&&$h(n,'Do not support get item on "'+e+'", "'+t+'".'),n}var HT=function(e,t,n){return e.length},UT=((DT={})[_M+"_"+MM]=function(e,t,n){return Math.max(0,e.length-t)},DT[_M+"_"+TM]=function(e,t,n){var i=e[0];return i?Math.max(0,i.length-t):0},DT[bM]=HT,DT[wM]=function(e,t,n){var i=n[0].name;if("production"!==process.env.NODE_ENV&&null==i)throw new Error;var r=e[i];return r?r.length:0},DT[xM]=HT,DT);function YT(e,t){var n=UT[$T(e,t)];return"production"!==process.env.NODE_ENV&&$h(n,'Do not support count on "'+e+'", "'+t+'".'),n}var ZT=function(e,t,n){return e[t]},XT=((kT={})[_M]=ZT,kT[bM]=function(e,t,n){return e[n]},kT[wM]=ZT,kT[xM]=function(e,t,n){var i=ay(e);return i instanceof Array?i[t]:i},kT[CM]=ZT,kT);function qT(e){var t=XT[e];return"production"!==process.env.NODE_ENV&&$h(t,'Do not support get value on "'+e+'".'),t}function $T(e,t){return e===_M?e+"_"+t:e}function KT(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var r=e.getStore(),o=r.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=r.getDimensionProperty(a);return qT(o)(i,a,s)}var l=i;return o===xM&&(l=ay(i)),l}}}var JT=/\{@(.+?)\}/g,QT=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),r=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=n.getItemVisual(e,"style"),l=s&&s[n.getItemVisual(e,"drawType")||"fill"],u=s&&s.stroke,c=this.mainType,d="series"===c,h=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:o,dataIndex:r,data:a,dataType:t,value:i,color:l,borderColor:u,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},e.prototype.getFormattedLabel=function(e,t,n,i,r,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);(o&&(s.value=o.interpolatedValue),null!=i&&Lh(s.value)&&(s.value=s.value[i]),r)||(r=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Ph(r)?(s.status=t,s.dimensionIndex=i,r(s)):Oh(r)?QS(r,s).replace(JT,function(t,n){var i=n.length,r=n;"["===r.charAt(0)&&"]"===r.charAt(i-1)&&(r=+r.slice(1,i-1),"production"!==process.env.NODE_ENV&&isNaN(r)&&qv("Invalide label formatter: @"+n+", only support @[0], @[1], @[2], ..."));var s=KT(a,e,r);if(o&&Lh(o.interpolatedValue)){var l=a.getDimensionIndex(r);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return KT(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function eI(e){var t,n;return zh(e)?e.type?n=e:process.env.NODE_ENV:t=e,{text:t,frag:n}}function tI(e){return new nI(e)}var nI=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(n?("production"!==process.env.NODE_ENV&&$h(null!=n._outputDueEnd),this._dueEnd=n._outputDueEnd):("production"!==process.env.NODE_ENV&&$h(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!i&&(o||h<p)){var f=this._progress;if(Lh(f))for(var g=0;g<f.length;g++)this._doProgress(f[g],h,p,l,u);else this._doProgress(f,h,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;"production"!==process.env.NODE_ENV&&$h(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,i,r){iI.reset(t,n,i,r),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:iI.next},this.context)},e.prototype._doReset=function(e){var t,n;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),Lh(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){"production"!==process.env.NODE_ENV&&$h(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),iI=function(){var e,t,n,i,r,o={reset:function(l,u,c,d){t=l,e=u,n=c,i=d,r=Math.ceil(i/n),o.next=n>1&&i>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%r*n+Math.ceil(t/r),a=t>=e?null:o<i?o:t;return t++,a}}();function rI(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Fh(e)||null==e||"-"===e||(e=+Ov(e)),null==e||""===e?NaN:Number(e))}var oI=rp({number:function(e){return parseFloat(e)},time:function(e){return+Ov(e)},trim:function(e){return Oh(e)?Kh(e):e}});function aI(e){return oI.get(e)}var sI={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},lI=function(){function e(e,t){if(!Fh(t)){var n="";"production"!==process.env.NODE_ENV&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Qv(n)}this._opFn=sI[e],this._rvalFloat=Bv(t)}return e.prototype.evaluate=function(e){return Fh(e)?this._opFn(e,this._rvalFloat):this._opFn(Bv(e),this._rvalFloat)},e}(),uI=function(){function e(e,t){var n="desc"===e;this._resultLT=n?1:-1,null==t&&(t=n?"min":"max"),this._incomparable="min"===t?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=Fh(e)?e:Bv(e),i=Fh(t)?t:Bv(t),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=Oh(e),s=Oh(t);a&&(n=s?e:0),s&&(i=a?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}(),cI=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Bv(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=Bv(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function dI(e,t){return"eq"===e||"ne"===e?new cI("eq"===e,t):lp(sI,e)?new lI(e,t):null}var hI=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return rI(e,t)},e}();function pI(e){var t=e.sourceFormat;if(!xI(t)){var n="";"production"!==process.env.NODE_ENV&&(n="`getRawData` is not supported in source format "+t),Qv(n)}return e.data}function fI(e){var t=e.sourceFormat,n=e.data;if(!xI(t)){var i="";"production"!==process.env.NODE_ENV&&(i="`cloneRawData` is not supported in source format "+t),Qv(i)}if(t===_M){for(var r=[],o=0,a=n.length;o<a;o++)r.push(n[o].slice());return r}if(t===bM){for(r=[],o=0,a=n.length;o<a;o++)r.push(bh({},n[o]));return r}}function gI(e,t,n){if(null!=n)return Fh(n)||!isNaN(n)&&!lp(t,n)?e[n]:lp(t,n)?t[n]:void 0}function mI(e){return yh(e)}var vI=rp();function yI(e,t,n,i){var r="";t.length||("production"!==process.env.NODE_ENV&&(r="Must have at least one upstream dataset."),Qv(r)),zh(e)||("production"!==process.env.NODE_ENV&&(r="transform declaration must be an object rather than "+typeof e+"."),Qv(r));var o=e.type,a=vI.get(o);a||("production"!==process.env.NODE_ENV&&(r='Can not find transform on type "'+o+'".'),Qv(r));var s,l=Ih(t,function(e){return function(e,t){var n=new hI,i=e.data,r=n.sourceFormat=e.sourceFormat,o=e.startIndex,a="";e.seriesLayoutBy!==MM&&("production"!==process.env.NODE_ENV&&(a='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Qv(a));var s=[],l={},u=e.dimensionsDefine;if(u)Th(u,function(e,t){var n=e.name,i={index:t,name:n,displayName:e.displayName};if(s.push(i),null!=n){var r="";lp(l,n)&&("production"!==process.env.NODE_ENV&&(r='dimension name "'+n+'" duplicated.'),Qv(r)),l[n]=i}});else for(var c=0;c<e.dimensionsDetectedCount;c++)s.push({index:c});var d=WT(r,MM);t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(i,o,s,e)},n.getRawData=Eh(pI,null,e)),n.cloneRawData=Eh(fI,null,e);var h=YT(r,MM);n.count=Eh(h,null,i,o,s);var p=qT(r);n.retrieveValue=function(e,t){var n=d(i,o,s,e);return f(n,t)};var f=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=s[t];return n?p(e,t,n.name):void 0}};return n.getDimensionInfo=Eh(gI,null,s,l),n.cloneAllDimensionInfo=Eh(mI,null,s),n}(e,a)}),u=iy(a.transform({upstream:l[0],upstreamList:l,config:yh(e.config)}));if("production"!==process.env.NODE_ENV&&e.print){var c=Ih(u,function(e){var t=null!=i?" === pipe index: "+i:"";return["=== dataset index: "+n.datasetIndex+t+" ===","- transform result data:",Jv(e.data),"- transform result dimensions:",Jv(e.dimensions)].join("\n")}).join("\n");Zv(0,c,s)}return Ih(u,function(e,n){var i,r="";zh(e)||("production"!==process.env.NODE_ENV&&(r="A transform should not return some empty results."),Qv(r)),e.data||("production"!==process.env.NODE_ENV&&(r="Transform result data should be not be null or undefined"),Qv(r)),xI(RT(e.data))||("production"!==process.env.NODE_ENV&&(r="Transform result data should be array rows or object rows."),Qv(r));var o=t[0];if(o&&0===n&&!e.dimensions){var a=o.startIndex;a&&(e.data=o.data.slice(0,a).concat(e.data)),i={seriesLayoutBy:MM,sourceHeader:a,dimensions:o.metaRawOption.dimensions}}else i={seriesLayoutBy:MM,sourceHeader:0,dimensions:e.dimensions};return PT(e.data,i,null)})}function xI(e){return e===_M||e===bM}var _I,bI="undefined",wI=typeof Uint32Array===bI?Array:Uint32Array,CI=typeof Uint16Array===bI?Array:Uint16Array,SI=typeof Int32Array===bI?Array:Int32Array,MI=typeof Float64Array===bI?Array:Float64Array,TI={float:MI,int:SI,ordinal:Array,number:Array,time:MI};function II(e){return e>65535?wI:CI}function DI(){return[1/0,-1/0]}function kI(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function AI(e,t,n,i,r){var o=TI[n||"float"];if(r){var a=e[t],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(i)}var EI=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=rp()}return e.prototype.initData=function(e,t,n){"production"!==process.env.NODE_ENV&&$h(Ph(e.getItem)&&Ph(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),r=this.defaultDimValueGetter=_I[i.sourceFormat];this._dimValueGetter=n||r,this._rawExtent=[];var o=VT(i);this._dimensions=Ih(t,function(e){return"production"!==process.env.NODE_ENV&&o&&$h(null!=e.property),{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,i=this._dimensions,r=n.get(e);if(null!=r){if(i[r].type===t)return r}else r=i.length;return i[r]={type:t},n.set(e,r),this._chunks[r]=new TI[t||"float"](this._rawCount),this._rawExtent[r]=[1/0,-1/0],r},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],i=this._dimensions[e],r=this._rawExtent,o=i.ordinalOffset||0,a=n.length;0===o&&(r[e]=[1/0,-1/0]);for(var s=r[e],l=o;l<a;l++){var u=n[l]=t.parseAndCollect(n[l]);isNaN(u)||(s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1]))}i.ordinalMeta=t,i.ordinalOffset=a,i.type="ordinal"},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){"production"!==process.env.NODE_ENV&&$h(!this._indices,"appendData can only be called on raw data.");var t=this._provider,n=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,i=this._dimensions,r=i.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<r;l++){AI(n,l,(p=i[l]).type,s,!0)}for(var u=[],c=a;c<s;c++)for(var d=c-a,h=0;h<r;h++){var p=i[h],f=_I.arrayRows.call(this,e[d]||u,p.property,d,h);n[h][c]=f;var g=o[h];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=Ih(o,function(e){return e.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=DI()),AI(r,u,c.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,r,s);else for(var d=[],h=e;h<t;h++){d=i.getItem(h,d);for(var p=0;p<a;p++){var f=r[p],g=this._dimValueGetter(d,l[p],h,p);f[h]=g;var m=s[p];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],i=[];if(null==t){t=e,e=[];for(var r=0;r<this._dimensions.length;r++)i.push(r)}else i=e;r=0;for(var o=i.length;r<o;r++)n.push(this.get(i[r],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,i=this.count();n<i;n++){var r=this.get(e,n);isNaN(r)||(t+=r)}return t},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)});var n=t.sort(function(e,t){return e-t}),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,r=this._count-1;i<=r;){var o=(i+r)/2|0;if(t[o]<e)i=o+1;else{if(!(t[o]>e))return o;r=o-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks[e],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var c=t-i[this.getRawIndex(l)],d=Math.abs(c);d<=n&&((d<o||d===o&&c>=0&&a<0)&&(o=d,a=c,s=0),c===a&&(r[s++]=l))}return r.length=s,r},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var r=0;r<i;r++)e[r]=t[r]}else e=new n(t.buffer,0,i)}else{e=new(n=II(this._rawCount))(this.count());for(r=0;r<e.length;r++)e[r]=r}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),i=n.count(),r=new(II(n._rawCount))(i),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<i;c++){var d=void 0,h=n.getRawIndex(c);if(0===a)d=t(c);else if(1===a){d=t(u[l][h],c)}else{for(var p=0;p<a;p++)o[p]=u[e[p]][h];o[p]=c,d=t.apply(null,o)}d&&(r[s++]=h)}return s<i&&(n._indices=r),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var i=Ah(e),r=i.length;if(!r)return this;var o=t.count(),a=new(II(t._rawCount))(o),s=0,l=i[0],u=e[l][0],c=e[l][1],d=t._chunks,h=!1;if(!t._indices){var p=0;if(1===r){for(var f=d[i[0]],g=0;g<n;g++){((x=f[g])>=u&&x<=c||isNaN(x))&&(a[s++]=p),p++}h=!0}else if(2===r){f=d[i[0]];var m=d[i[1]],v=e[i[1]][0],y=e[i[1]][1];for(g=0;g<n;g++){var x=f[g],_=m[g];(x>=u&&x<=c||isNaN(x))&&(_>=v&&_<=y||isNaN(_))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===r)for(g=0;g<o;g++){var b=t.getRawIndex(g);((x=d[i[0]][b])>=u&&x<=c||isNaN(x))&&(a[s++]=b)}else for(g=0;g<o;g++){for(var w=!0,C=(b=t.getRawIndex(g),0);C<r;C++){var S=i[C];((x=d[S][b])<e[S][0]||x>e[S][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(g))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var i=e._chunks,r=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=DI();for(var c=0;c<a;c++){for(var d=e.getRawIndex(c),h=0;h<o;h++)s[h]=i[t[h]][d];s[o]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(u=0;u<p.length;u++){var f=t[u],g=p[u],m=l[f],v=i[f];v&&(v[d]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,i,r,o=this.clone([e],!0),a=o._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(II(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;h<s-1;h+=u){for(var p=Math.min(h+u,s-1),f=Math.min(h+2*u,s),g=(f+p)/2,m=0,v=p;v<f;v++){var y=a[M=this.getRawIndex(v)];isNaN(y)||(m+=y)}m/=f-p;var x=h,_=Math.min(h+u,s),b=h-1,w=a[c];n=-1,r=x;var C=-1,S=0;for(v=x;v<_;v++){var M;y=a[M=this.getRawIndex(v)];isNaN(y)?(S++,C<0&&(C=M)):(i=Math.abs((b-g)*(y-w)-(b-v)*(m-w)))>n&&(n=i,r=M)}S>0&&S<_-x&&(d[l++]=Math.min(C,r),r=Math.max(C,r)),d[l++]=r,c=r}return d[l++]=this.getRawIndex(s-1),o._count=l,o._indices=d,o.getRawIndex=this._getRawIdx,o},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),i=n._chunks,r=Math.floor(1/t),o=i[e],a=this.count(),s=new(II(this._rawCount))(2*Math.ceil(a/r)),l=0,u=0;u<a;u+=r){var c=u,d=o[this.getRawIndex(c)],h=u,p=o[this.getRawIndex(h)],f=r;u+r>a&&(f=a-u);for(var g=0;g<f;g++){var m=o[this.getRawIndex(u+g)];m<d&&(d=m,c=u+g),m>p&&(p=m,h=u+g)}var v=this.getRawIndex(c),y=this.getRawIndex(h);c<h?(s[l++]=v,s[l++]=y):(s[l++]=y,s[l++]=v)}return n._count=l,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,i){for(var r=this.clone([e],!0),o=r._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=r._rawExtent[e]=[1/0,-1/0],d=new(II(this._rawCount))(Math.ceil(u/s)),h=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(p+f);a[f]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(p+i(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),d[h++]=v}return r._count=h,r._indices=d,r._updateGetRawIdx(),r},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,r=0,o=this.count();r<o;r++){var a=this.getRawIndex(r);switch(n){case 0:t(r);break;case 1:t(i[e[0]][a],r);break;case 2:t(i[e[0]][a],i[e[1]][a],r);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[e[s]][a];l[s]=r,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var o=(i=n)[0],a=i[1],s=0;s<r;s++){var l=t[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return i=[o,a],this._extent[e]=i,i},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,r=0;r<i.length;r++)n.push(i[r][t]);return n},e.prototype.clone=function(t,n){var i=new e,r=this._chunks,o=t&&Dh(t,function(e,t){return e[t]=!0,e},{});if(o)for(var a=0;a<r.length;a++)i._chunks[a]=o[a]?kI(r[a]):r[a];else i._chunks=r;return this._copyCommonProps(i),n||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=yh(this._extent),e._rawExtent=yh(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var i=0;i<n;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,i){return rI(e[i],this._dimensions[i])}_I={arrayRows:e,objectRows:function(e,t,n,i){return rI(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var r=e&&(null==e.value?e:e.value);return rI(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),NI=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(PI(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=Bh(a=o.get("data",!0))?CM:xM,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=Yh(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=Yh(c.sourceHeader,d.sourceHeader),f=Yh(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[PT(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var g=n;if(r){var m=this._applyTransform(i);e=m.sourceList,t=m.upstreamSignList}else{e=[PT(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}"production"!==process.env.NODE_ENV&&$h(e&&t),this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if("production"!==process.env.NODE_ENV&&$h(null!=r||null!=i),null!=r){var o="";1!==e.length&&("production"!==process.env.NODE_ENV&&(o="When using `fromTransformResult`, there should be only one upstream dataset"),OI(o))}var a,s=[],l=[];return Th(e,function(e){e.prepareSource();var t=e.getSource(r||0),n="";null==r||t||("production"!==process.env.NODE_ENV&&(n="Can not retrieve result by `fromTransformResult`: "+r),OI(n)),s.push(t),l.push(e._getVersionSign())}),i?t=function(e,t,n){var i=iy(e),r=i.length,o="";r||("production"!==process.env.NODE_ENV&&(o="If `transform` declared, it should at least contain one transform."),Qv(o));for(var a=0,s=r;a<s;a++)t=yI(i[a],t,n,1===r?null:a),a!==s-1&&(t.length=Math.max(t.length,1));return t}(i,s,{datasetIndex:n.componentIndex}):null!=r&&(t=[(a=s[0],new NT({data:a.data,sourceFormat:a.sourceFormat,seriesLayoutBy:a.seriesLayoutBy,dimensionsDefine:yh(a.dimensionsDefine),startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){"production"!==process.env.NODE_ENV&&$h(PI(this._sourceHost),"Can only call getDataStore on series source manager.");var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var i=this._storeList,r=i[0];r||(r=i[0]={});var o=r[n];if(!o){var a=this._getUpstreamSourceManagers()[0];PI(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new EI).initData(new BT(t,e.length),e),r[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(PI(e)){var t=LM(e);return t?[t.getSourceManager()]:[]}return Ih(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?Cy(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},by).models:[]}(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,i=this._sourceHost;if(PI(i))e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var r=i;e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function LI(e){e.option.transform&&Qh(e.option.transform)}function PI(e){return"series"===e.mainType}function OI(e){throw new Error(e)}function RI(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+Bp(t+"")+"px"}function FI(e,t){var n=e.color||"#6e7079",i=e.fontSize||12,r=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+Bp(i+"")+"px;color:"+Bp(n)+";font-weight:"+Bp(r+""),valueStyle:"font-size:"+Bp(a+"")+"px;color:"+Bp(o)+";font-weight:"+Bp(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:r},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var zI=[0,10,20,30],VI=["","\n","\n\n","\n\n\n"];function BI(e,t){return t.type=e,t}function jI(e){return"section"===e.type}function GI(e){return jI(e)?HI:UI}function WI(e){if(jI(e)){var t=0,n=e.blocks.length,i=n>1||n>0&&!e.noHeader;return Th(e.blocks,function(e){var n=WI(e);n>=t&&(t=n+ +(i&&(!n||jI(e)&&!e.noHeader)))}),t}return 0}function HI(e,t,n,i){var r,o=t.noHeader,a=(r=WI(t),{html:zI[r],richText:VI[r]}),s=[],l=t.blocks||[];$h(!l||Lh(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(lp(c,u)){var d=new uI(c[u],null);l.sort(function(e,t){return d.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}Th(l,function(n,r){var o=t.valueFormatter,l=GI(n)(o?bh(bh({},e),{valueFormatter:o}):e,n,r>0?a.html:0,i);null!=l&&s.push(l)});var h="richText"===e.renderMode?s.join(a.richText):ZI(i,s.join(""),o?n:a.html);if(o)return h;var p=$S(t.header,"ordinal",e.useUTC),f=FI(i,e.renderMode).nameStyle,g=RI(i);return"richText"===e.renderMode?XI(e,p,f)+a.richText+h:ZI(i,'<div style="'+f+";"+g+';">'+Bp(p)+"</div>"+h,n)}function UI(e,t,n,i){var r=e.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return Ih(e=Lh(e)?e:[e],function(e,t){return $S(e,Lh(p)?p[t]:p,u)})};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),h=o?"":$S(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!s||!o,m=!s&&o,v=FI(i,r),y=v.nameStyle,x=v.valueStyle;return"richText"===r?(s?"":d)+(o?"":XI(e,h,y))+(a?"":function(e,t,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Lh(t)?t.join(" "):t,o)}(e,f,g,m,x)):ZI(i,(s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+Bp(e)+"</span>"}(h,!s,y))+(a?"":function(e,t,n,i){var r=n?"10px":"20px",o=t?"float:right;margin-left:"+r:"";return e=Lh(e)?e:[e],'<span style="'+o+";"+i+'">'+Ih(e,function(e){return Bp(e)}).join(" ")+"</span>"}(f,g,m,x)),n)}}function YI(e,t,n,i,r,o){if(e)return GI(e)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function ZI(e,t,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+RI(e)+';">'+t+'<div style="clear:both"></div></div>'}function XI(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function qI(e,t){return eM(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function $I(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var KI=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Gv()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var i="richText"===n?this._generateStyleName():null,r=function(e,t){var n=Oh(e)?{color:e,extraCssText:t}:e||{},i=n.color,r=n.type;t=n.extraCssText;var o=n.renderMode||"html";return i?"html"===o?"subItem"===r?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Bp(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Bp(i)+";"+(t||"")+'"></span>':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}({color:t,type:e,renderMode:n,markerId:i});return Oh(r)?r:("production"!==process.env.NODE_ENV&&$h(i),this.richTextStyles[i]=r.style,r.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Lh(t)?Th(t,function(e){return bh(n,e)}):bh(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}();function JI(e){var t,n,i,r,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=o.getRawValue(a),h=Lh(d),p=qI(o,a);if(c>1||h&&!c){var f=function(e,t,n,i,r){var o=t.getData(),a=Dh(e,function(e,t,n){var i=o.getDimensionInfo(n);return e||i&&!1!==i.tooltip&&null!=i.displayName},!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(BI("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return i.length?Th(i,function(e){c(KT(o,n,e),e)}):Th(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,o,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);r=t=KT(l,a,u[0]),n=g.type}else r=t=h?d[0]:d;var m=fy(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return BI("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[BI("nameValue",{markerType:"item",markerColor:p,name:x,noName:!Kh(x),value:t,valueType:n,dataIndex:a})].concat(i||[])})}var QI=vy();function eD(e,t){return e.getName(t)||e.getId(t)}var tD="__universalTransitionEnabled",nD=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return Kd(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=tI({count:rD,reset:oD}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(QI(this).sourceManager=new NI(this)).prepareSource();var i=this.getInitialData(e,n);sD(i,this),this.dataTask.context.data=i,"production"!==process.env.NODE_ENV&&$h(i,"getInitialData returned invalid data."),QI(this).dataBeforeProcessed=i,iD(this),this._initSelectedMapFromData(i)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=uM(this),i=n?dM(e):{},r=this.subType;fM.hasClass(r)&&(r+="Series"),xh(e,t.getTheme().get(this.subType)),xh(e,this.getDefaultOption()),ry(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&cM(e,i,n)},t.prototype.mergeOption=function(e,t){e=xh(this.option,e,!0),this.fillDataTextStyle(e.data);var n=uM(this);n&&cM(this.option,e,n);var i=QI(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(e,t);sD(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,QI(this).dataBeforeProcessed=r,iD(this),this._initSelectedMapFromData(r)},t.prototype.fillDataTextStyle=function(e){if(e&&!Bh(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&ry(e[n],"label",t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=uD(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return QI(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=uD(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}QI(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return rp(e)},t.prototype.getSourceManager=function(){return QI(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return QI(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get("colorBy")||"series"},t.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,t,n){return JI({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Qd.node&&(!e||!e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var i=this.ecModel,r=GM.prototype.getColorFromPalette.call(this,e,t,n);return r||(r=i.getColorFromPalette(e,t,n)),r},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(t);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<e.length;o++){var a=eD(r,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],i=0;i<e.length;i++)n[0]=e[i],this.isSelected(e[i],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Ah(e),n=[],i=0;i<t.length;i++){var r=e[t[i]];r>=0&&n.push(r)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(t);return("all"===n||n[eD(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[tD])return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,i,r=this.option,o=r.selectedMode,a=t.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){zh(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l<a;l++){var u=t[l];s[d=eD(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=eD(e,c);r.selectedMap=((n={})[d]=!0,n),this._selectedDataIndicesMap=((i={})[d]=e.getRawIndex(c),i)}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var i=e.getRawDataItem(n);i&&i.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return fM.registerClass(e)},t.protoInitialize=((n=t.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),t}(fM);function iD(e){var t=e.name;fy(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),i=[];return Th(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)}),i.join(" ")}(e)||t)}function rD(e){return e.model.getRawData().count()}function oD(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),aD}function aD(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function sD(e,t){Th(op(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Nh(lD,t))})}function lD(e,t){var n=uD(e);return n&&n.setOutputEnd((t||this).count()),t}function uD(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(e.uid))}return i}}Sh(nD,QT),Sh(nD,GM),Ey(nD,fM);var cD=function(){function e(){this.group=new mv,this.uid=sS("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){},e.prototype.updateLayout=function(e,t,n,i){},e.prototype.updateVisual=function(e,t,n,i){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();function dD(){var e=vy();return function(t){var n=e(t),i=t.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Ay(cD),Oy(cD);var hD=vy(),pD=dD(),fD=function(){function e(){this.group=new mv,this.uid=sS("viewChart"),this.renderTask=tI({plan:vD,reset:yD}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){if("production"!==process.env.NODE_ENV)throw new Error("render method must been implemented")},e.prototype.highlight=function(e,t,n,i){var r=e.getData(i&&i.dataType);r?mD(r,i,"emphasis"):"production"!==process.env.NODE_ENV&&qv("Unknown dataType "+i.dataType)},e.prototype.downplay=function(e,t,n,i){var r=e.getData(i&&i.dataType);r?mD(r,i,"normal"):"production"!==process.env.NODE_ENV&&qv("Unknown dataType "+i.dataType)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},e.prototype.eachRendered=function(e){AC(this.group,e)},e.markUpdateMethod=function(e,t){hD(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function gD(e,t,n){e&&Pb(e)&&("emphasis"===t?fb:gb)(e,n)}function mD(e,t,n){var i=my(e,t),r=t&&null!=t.highlightKey?function(e){var t=G_[e];return null==t&&j_<=32&&(t=G_[e]=j_++),t}(t.highlightKey):null;null!=i?Th(iy(i),function(t){gD(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(e){gD(e,n,r)})}function vD(e){return pD(e.model)}function yD(e){var t=e.model,n=e.ecModel,i=e.api,r=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=r&&hD(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,i,r),xD[l]}Ay(fD,["dispose"]),Oy(fD);var xD={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},_D="\0__throttleOriginMethod",bD="\0__throttleRate",wD="\0__throttleType";function CD(e,t,n){var i,r,o,a,s,l=0,u=0,c=null;function d(){u=(new Date).getTime(),c=null,e.apply(o,a||[])}t=t||0;var h=function(){for(var e=[],h=0;h<arguments.length;h++)e[h]=arguments[h];i=(new Date).getTime(),o=this,a=e;var p=s||t,f=s||n;s=null,r=i-(f?l:u)-p,clearTimeout(c),f?c=setTimeout(d,p):r>=0?d():c=setTimeout(d,-r),l=i};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function SD(e,t,n,i){var r=e[t];if(r){var o=r[_D]||r,a=r[wD];if(r[bD]!==n||a!==i){if(null==n||!i)return e[t]=o;(r=e[t]=CD(o,n,"debounce"===i))[_D]=o,r[wD]=i,r[bD]=n}return r}}function MD(e,t){var n=e[t];n&&n[_D]&&(n.clear&&n.clear(),e[t]=n[_D])}var TD=vy(),ID={itemStyle:Ry(nS,!0),lineStyle:Ry(QC,!0)},DD={lineStyle:"stroke",itemStyle:"fill"};function kD(e,t){var n=e.visualStyleMapper||ID[t];return n||ID.itemStyle}function AD(e,t){var n=e.visualDrawType||DD[t];return n||"fill"}var ED={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=e.getModel(i),o=kD(e,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=AD(e,i),l=o[s],u=Ph(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=d,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Ph(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||Ph(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var i=e.getDataParams(n),r=bh({},o);r[s]=u(i),t.setItemVisual(n,"style",r)}}}},ND=new oS,LD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=kD(e,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){ND.option=n[i];var a=r(ND);bh(e.ensureUniqueItemVisual(t,"style"),a),ND.option.decal&&(e.setItemVisual(t,"decal",ND.option.decal),ND.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},PD={performRawSeries:!0,overallReset:function(e){var t=rp();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,r=t.get(i);r||(r={},t.set(i,r)),TD(e).scope=r}}),e.eachSeries(function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),i={},r=t.getData(),o=TD(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=AD(t,a);r.each(function(e){var t=r.getRawIndex(e);i[t]=e}),n.each(function(e){var a=i[e];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}})}})}},OD=Math.PI;var RD=function(){function e(e,t,n,i){this._stageTaskMap=rp(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,r=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),r=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,o=e.get("large")&&i>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=rp();e.eachSeries(function(e){var i=e.getProgressive(),r=e.uid;n.set(r,{id:r,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;Th(this._allHandlers,function(i){var r=e.get(i.uid)||e.set(i.uid,{}),o="";"production"!==process.env.NODE_ENV&&(o='"reset" and "overallReset" must not be both specified.'),$h(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,t,n),i.overallReset&&this._createOverallStageTask(i,r,t,n)},this)},e.prototype.prepareView=function(e,t,n,i){var r=e.renderTask,o=r.context;o.model=t,o.ecModel=n,o.api=i,r.__block=!e.incrementalPrepareRender,this._pipe(t,r)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,i){i=i||{};var r=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}Th(e,function(e,s){if(!i.visualType||i.visualType===e.visualType){var l=o._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each(function(e){a(i,e)&&(e.dirty(),d=!0)}),d&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);h.each(function(e){e.perform(p)}),c.perform(p)&&(r=!0)}else u&&u.each(function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)})}}),this.unfinished=r||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,i){var r=this,o=t.seriesTaskMap,a=t.seriesTaskMap=rp(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||tI({plan:jD,reset:GD,count:UD}));l.context={model:t,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:r},r._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},e.prototype._createOverallStageTask=function(e,t,n,i){var r=this,o=t.overallTask=t.overallTask||tI({reset:FD});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=rp(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1,h="";function p(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,tI({reset:zD,onDirty:BD})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,r._pipe(e,n)}"production"!==process.env.NODE_ENV&&(h='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),$h(!e.createOnAllSeries,h),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(c=!1,Th(n.getSeries(),p)),d&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},e.wrapStageHandler=function(e,t){return Ph(e)&&(e={overallReset:e,seriesType:YD(e)}),e.uid=sS("stageHandler"),t&&(e.visualType=t),e},e}();function FD(e){e.overallReset(e.ecModel,e.api,e.payload)}function zD(e){return e.overallProgress&&VD}function VD(){this.agent.dirty(),this.getDownstream().dirty()}function BD(){this.agent&&this.agent.dirty()}function jD(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function GD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=iy(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Ih(t,function(e,t){return HD(t)}):WD}var WD=HD(0);function HD(e){return function(t,n){var i=n.data,r=n.resetDefines[e];if(r&&r.dataEach)for(var o=t.start;o<t.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(t,i)}}function UD(e){return e.data.count()}function YD(e){ZD=null;try{e(XD,qD)}catch(t){}return ZD}var ZD,XD={},qD={};function $D(e,t){for(var n in t.prototype)e[n]=up}$D(XD,qM),$D(qD,eT),XD.eachSeriesByType=XD.eachRawSeriesByType=function(e){ZD=e},XD.eachComponent=function(e){"series"===e.mainType&&e.subType&&(ZD=e.subType)};var KD=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const JD={color:KD,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],KD]};var QD="#B9B8CE",ek="#100C2A",tk=function(){return{axisLine:{lineStyle:{color:QD}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},nk=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],ik={darkMode:!0,color:nk,backgroundColor:ek,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:QD},pageTextStyle:{color:QD}},textStyle:{color:QD},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:QD}},dataZoom:{borderColor:"#71708A",textStyle:{color:QD},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:QD}},timeline:{lineStyle:{color:QD},label:{color:QD},controlStyle:{color:QD,borderColor:QD}},calendar:{itemStyle:{color:ek},dayLabel:{color:QD},monthLabel:{color:QD},yearLabel:{color:QD}},timeAxis:tk(),logAxis:tk(),valueAxis:tk(),categoryAxis:tk(),line:{symbol:"circle"},graph:{color:nk},gauge:{title:{color:QD},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:QD},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};ik.categoryAxis.splitLine.show=!1;var rk=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},i={};if(Oh(e)){var r=ky(e);t.mainType=r.main||null,t.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};Th(e,function(e,r){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=r.lastIndexOf(u);if(c>0&&c===r.length-u.length){var d=r.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(r)&&(n[r]=e,s=!0),s||(i[r]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,i,r));function u(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),ok=["symbol","symbolSize","symbolRotate","symbolOffset"],ak=ok.concat(["symbolKeepAspect"]),sk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a<ok.length;a++){var s=ok[a],l=e.get(s);Ph(l)?(o=!0,r[s]=l):i[s]=l}if(i.symbol=i.symbol||e.defaultSymbol,n.setVisual(bh({legendIcon:e.legendIcon||i.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(e)){var u=Ah(r);return{dataEach:o?function(t,n){for(var i=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,r[s](i,o))}}:null}}}}},lk={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),i=0;i<ak.length;i++){var r=ak[i],o=n.getShallow(r,!0);null!=o&&e.setItemVisual(t,r,o)}}:null}}};function uk(e,t,n){switch(n){case"color":return e.getItemVisual(t,"style")[e.getVisual("drawType")];case"opacity":return e.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getItemVisual(t,n);default:process.env.NODE_ENV}}function ck(e,t){switch(t){case"color":return e.getVisual("style")[e.getVisual("drawType")];case"opacity":return e.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return e.getVisual(t);default:process.env.NODE_ENV}}function dk(e,t,n,i){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=i,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,i);break;default:process.env.NODE_ENV}}function hk(e,t){function n(t,n){var i=[];return t.eachComponent({mainType:"series",subType:e,query:n},function(e){i.push(e.seriesIndex)}),i}Th([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(e){t(e[0],function(t,i,r){t=bh({},t),"production"!==process.env.NODE_ENV&&Kv(t.type,e[1]),r.dispatchAction(bh(t,{type:e[1],seriesIndex:n(i,t)}))})})}function pk(e,t,n,i,r){var o=e+t;n.isSilent(o)||("production"!==process.env.NODE_ENV&&$v("event "+o+" is deprecated."),i.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,i=e.option.selectedMap,a=r.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=my(l,r.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:Lh(u)?l.getName(u[0]):l.getName(u),selected:Oh(i)?i:bh({},i)})}}))}function fk(e,t,n){for(var i;e&&(!t(e)||(i=e,!n));)e=e.__hostTarget||e.parent;return i}var gk=Math.round(9*Math.random()),mk="function"==typeof Object.defineProperty,vk=function(){function e(){this._id="__ec_inner_"+gk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return mk?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},e}(),yk=d_.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=t.width/2,o=t.height/2;e.moveTo(n,i-o),e.lineTo(n+r,i+o),e.lineTo(n-r,i+o),e.closePath()}}),xk=d_.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=t.width/2,o=t.height/2;e.moveTo(n,i-o),e.lineTo(n+r,i),e.lineTo(n,i+o),e.lineTo(n-r,i),e.closePath()}}),_k=d_.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,r=t.width/5*3,o=Math.max(r,t.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,d=Math.sin(u),h=Math.cos(u),p=.6*a,f=.7*a;e.moveTo(n-c,l+s),e.arc(n,l,a,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-d*p,l+s+h*p,n,i-f,n,i),e.bezierCurveTo(n,i-f,n-c+d*p,l+s+h*p,n-c,l+s),e.closePath()}}),bk=d_.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,r=t.x,o=t.y,a=i/3*2;e.moveTo(r,o),e.lineTo(r+a,o+n),e.lineTo(r,o+n/4*3),e.lineTo(r-a,o+n),e.lineTo(r,o),e.closePath()}}),wk={line:function(e,t,n,i,r){r.x1=e,r.y1=t+i/2,r.x2=e+n,r.y2=t+i/2},rect:function(e,t,n,i,r){r.x=e,r.y=t,r.width=n,r.height=i},roundRect:function(e,t,n,i,r){r.x=e,r.y=t,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(e,t,n,i,r){var o=Math.min(n,i);r.x=e,r.y=t,r.width=o,r.height=o},circle:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.r=Math.min(n,i)/2},diamond:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.width=n,r.height=i},pin:function(e,t,n,i,r){r.x=e+n/2,r.y=t+i/2,r.width=n,r.height=i},arrow:function(e,t,n,i,r){r.x=e+n/2,r.y=t+i/2,r.width=n,r.height=i},triangle:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.width=n,r.height=i}},Ck={};Th({line:Ew,rect:C_,roundRect:C_,square:C_,circle:rw,diamond:xk,pin:_k,arrow:bk,triangle:yk},function(e,t){Ck[t]=new e});var Sk=d_.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=ov(e,t,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===t.position&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var r=Ck[i];r||(r=Ck[i="rect"]),wk[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,n)}}});function Mk(e,t){if("image"!==this.type){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw()}}function Tk(e,t,n,i,r,o,a){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?hC(e.slice(8),new xf(t,n,i,r),a?"center":"cover"):0===e.indexOf("path://")?dC(e.slice(7),{},new xf(t,n,i,r),a?"center":"cover"):new Sk({shape:{symbolType:e,x:t,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=Mk,o&&s.setColor(o),s}function Ik(e){return Lh(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Dk(e,t){if(null!=e)return Lh(e)||(e=[e,e]),[Sv(e[0],t[0])||0,Sv(Yh(e[1],e[0]),t[1])||0]}function kk(e){return isFinite(e)}function Ak(e,t,n){for(var i="radial"===t.type?function(e,t,n){var i=n.width,r=n.height,o=Math.min(i,r),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(a=a*i+n.x,s=s*r+n.y,l*=o),a=kk(a)?a:.5,s=kk(s)?s:.5,l=l>=0&&kk(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var i=null==t.x?0:t.x,r=null==t.x2?1:t.x2,o=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=kk(i)?i:0,r=kk(r)?r:1,o=kk(o)?o:0,a=kk(a)?a:0,e.createLinearGradient(i,o,r,a)}(e,t,n),r=t.colorStops,o=0;o<r.length;o++)i.addColorStop(r[o].offset,r[o].color);return i}function Ek(e){return parseInt(e,10)}function Nk(e,t,n){var i=["width","height"][t],r=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[i]&&"auto"!==n[i])return parseFloat(n[i]);var s=document.defaultView.getComputedStyle(e);return(e[r]||Ek(s[i])||Ek(e.style[i]))-(Ek(s[o])||0)-(Ek(s[a])||0)|0}function Lk(e){var t,n,i=e.style,r=i.lineDash&&i.lineWidth>0&&(t=i.lineDash,n=i.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:Fh(t)?[t]:Lh(t)?t:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(r=Ih(r,function(e){return e/a}),o/=a)}return[r,o]}var Pk=new Hx(!0);function Ok(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function Rk(e){return"string"==typeof e&&"none"!==e}function Fk(e){var t=e.fill;return null!=t&&"none"!==t}function zk(e,t){if(null!=t.fillOpacity&&1!==t.fillOpacity){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Vk(e,t){if(null!=t.strokeOpacity&&1!==t.strokeOpacity){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Bk(e,t,n){var i=jy(t.image,t.__image,n);if(Wy(i)){var r=e.createPattern(i,t.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*cp),o.scaleSelf(t.scaleX||1,t.scaleY||1),r.setTransform(o)}return r}}var jk=["shadowBlur","shadowOffsetX","shadowOffsetY"],Gk=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Wk(e,t,n,i,r){var o=!1;if(!i&&t===(n=n||{}))return!1;if(i||t.opacity!==n.opacity){Yk(e,r),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?ix.opacity:a}(i||t.blend!==n.blend)&&(o||(Yk(e,r),o=!0),e.globalCompositeOperation=t.blend||ix.blend);for(var s=0;s<jk.length;s++){var l=jk[s];(i||t[l]!==n[l])&&(o||(Yk(e,r),o=!0),e[l]=e.dpr*(t[l]||0))}return(i||t.shadowColor!==n.shadowColor)&&(o||(Yk(e,r),o=!0),e.shadowColor=t.shadowColor||ix.shadowColor),o}function Hk(e,t,n,i,r){var o=Zk(t,r.inHover),a=i?null:n&&Zk(n,r.inHover)||{};if(o===a)return!1;var s=Wk(e,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Yk(e,r),s=!0),Rk(o.fill)&&(e.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(Yk(e,r),s=!0),Rk(o.stroke)&&(e.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(Yk(e,r),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==l&&(s||(Yk(e,r),s=!0),e.lineWidth=l)}for(var u=0;u<Gk.length;u++){var c=Gk[u],d=c[0];(i||o[d]!==a[d])&&(s||(Yk(e,r),s=!0),e[d]=o[d]||c[1])}return s}function Uk(e,t){var n=t.transform,i=e.dpr||1;n?e.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):e.setTransform(i,0,0,i,0,0)}function Yk(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function Zk(e,t){return t&&e.__hoverStyle||e.style}function Xk(e,t){qk(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function qk(e,t,n,i){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return t.__dirty&=-2,void(t.__isRendered=!1);var o=t.__clipPaths,a=n.prevElClipPaths,s=!1,l=!1;if(a&&!function(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,a)||(a&&a.length&&(Yk(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(Yk(e,n),e.save(),function(e,t,n){for(var i=!1,r=0;r<e.length;r++){var o=e[r];i=i||o.isZeroArea(),Uk(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=i}(o,e,n),s=!0),n.prevElClipPaths=o),n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=n.prevEl;u||(l=s=!0);var c,d,h=t instanceof d_&&t.autoBatch&&function(e){var t=Fk(e),n=Ok(e);return!(e.lineDash||!(+t^+n)||t&&"string"!=typeof e.fill||n&&"string"!=typeof e.stroke||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}(t.style);s||(c=r,d=u.transform,c&&d?c[0]!==d[0]||c[1]!==d[1]||c[2]!==d[2]||c[3]!==d[3]||c[4]!==d[4]||c[5]!==d[5]:c||d)?(Yk(e,n),Uk(e,t)):h||Yk(e,n);var p=Zk(t,n.inHover);t instanceof d_?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),Hk(e,t,u,l,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,i){var r,o=Ok(n),a=Fk(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||Pk,d=t.__dirty;if(!i){var h=n.fill,p=n.stroke,f=a&&!!h.colorStops,g=o&&!!p.colorStops,m=a&&!!h.image,v=o&&!!p.image,y=void 0,x=void 0,_=void 0,b=void 0,w=void 0;(f||g)&&(w=t.getBoundingRect()),f&&(y=d?Ak(e,h,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?Ak(e,p,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?Bk(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?Bk(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),f?e.fillStyle=y:m&&(_?e.fillStyle=_:a=!1),g?e.strokeStyle=x:v&&(b?e.strokeStyle=b:o=!1)}var C,S,M=t.getGlobalScale();c.setScale(M[0],M[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(C=(r=Lk(t))[0],S=r[1]);var T=!0;(u||4&d)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),T=!1),c.reset(),t.buildPath(c,t.shape,i),c.toStatic(),t.pathUpdated()),T&&c.rebuildPath(e,l?s:1),C&&(e.setLineDash(C),e.lineDashOffset=S),i||(n.strokeFirst?(o&&Vk(e,n),a&&zk(e,n)):(a&&zk(e,n),o&&Vk(e,n))),C&&e.setLineDash([])}(e,t,p,h),h&&(n.batchFill=p.fill||"",n.batchStroke=p.stroke||"")):t instanceof p_?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),Hk(e,t,u,l,n),function(e,t,n){var i,r=n.text;if(null!=r&&(r+=""),r){e.font=n.font||th,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(i=Lk(t))[0],a=i[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(Ok(n)&&e.strokeText(r,n.x,n.y),Fk(n)&&e.fillText(r,n.x,n.y)):(Fk(n)&&e.fillText(r,n.x,n.y),Ok(n)&&e.strokeText(r,n.x,n.y)),o&&e.setLineDash([])}}(e,t,p)):t instanceof m_?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,i,r){Wk(e,Zk(t,r.inHover),n&&Zk(n,r.inHover),i,r)}(e,t,u,l,n),function(e,t,n){var i=t.__image=jy(n.image,t.__image,t,t.onload);if(i&&Wy(i)){var r=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(i,u,c,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var d=a-(u=n.sx),h=s-(c=n.sy);e.drawImage(i,u,c,d,h,r,o,a,s)}else e.drawImage(i,r,o,a,s)}}(e,t,p)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(e,t,n){var i=t.getDisplayables(),r=t.getTemporalDisplayables();e.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=t.getCursor(),a=i.length;o<a;o++){(c=i[o]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),qk(e,c,s,o===a-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}for(var l=0,u=r.length;l<u;l++){var c;(c=r[l]).beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),qk(e,c,s,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),s.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),h&&i&&Yk(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var $k=new vk,Kk=new vg(100),Jk=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Qk(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),i=t.getZr(),r="svg"===i.painter.type;e.dirty&&$k.delete(e);var o=$k.get(e);if(o)return o;var a=wh(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var s={repeat:"repeat"};return function(e){for(var t,o=[n],s=!0,l=0;l<Jk.length;++l){var u=a[Jk[l]];if(null!=u&&!Lh(u)&&!Oh(u)&&!Fh(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(r?"-svg":"");var c=Kk.get(t);c&&(r?e.svgElement=c:e.image=c)}var d,h=tA(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Fh(e)){var t=Math.ceil(e);return[t,t]}var n=Ih(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),f=eA(a.symbol),g=(_=h,Ih(_,function(e){return nA(e)})),m=nA(p),v=!r&&ih.createCanvas(),y=r&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=Hv(e,g[t]);var i=1;for(t=0,n=f.length;t<n;++t)i=Hv(i,f[t].length);e*=i;var r=m*g.length*f.length;if("production"!==process.env.NODE_ENV){var o=function(e){};e>a.maxTileWidth&&o("maxTileWidth"),r>a.maxTileHeight&&o("maxTileHeight")}return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(r,a.maxTileHeight))}}();var _;v&&(v.width=x.width*n,v.height=x.height*n,d=v.getContext("2d"));(function(){d&&(d.clearRect(0,0,v.width,v.height),a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(e<=0)return;var o=-m,s=0,l=0,u=0;for(;o<x.height;){if(s%2==0){for(var c=l/2%f.length,g=0,_=0,b=0;g<2*x.width;){var w=0;for(t=0;t<h[u].length;++t)w+=h[u][t];if(w<=0)break;if(_%2==0){var C=.5*(1-a.symbolSize),S=g+h[u][_]*C,M=o+p[s]*C,T=h[u][_]*a.symbolSize,I=p[s]*a.symbolSize,D=b/2%f[c].length;k(S,M,T,I,f[c][D])}g+=h[u][_],++b,++_===h[u].length&&(_=0)}++u===h.length&&(u=0)}o+=p[s],++l,++s===p.length&&(s=0)}function k(e,t,o,s,l){var u=r?1:n,c=Tk(l,e*u,t*u,o*u,s*u,a.color,a.symbolKeepAspect);if(r){var h=i.painter.renderOneToVNode(c);h&&y.children.push(h)}else Xk(d,c)}})(),s&&Kk.put(t,v||y);e.image=v,e.svgElement=y,e.svgWidth=x.width,e.svgHeight=x.height}(s),s.rotation=a.rotation,s.scaleX=s.scaleY=r?1:1/n,$k.set(e,s),e.dirty=!1,s}function eA(e){if(!e||0===e.length)return[["rect"]];if(Oh(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!Oh(e[n])){t=!1;break}if(t)return eA([e]);var i=[];for(n=0;n<e.length;++n)Oh(e[n])?i.push([e[n]]):i.push(e[n]);return i}function tA(e){if(!e||0===e.length)return[[0,0]];if(Fh(e))return[[r=Math.ceil(e),r]];for(var t=!0,n=0;n<e.length;++n)if(!Fh(e[n])){t=!1;break}if(t)return tA([e]);var i=[];for(n=0;n<e.length;++n)if(Fh(e[n])){var r=Math.ceil(e[n]);i.push([r,r])}else{(r=Ih(e[n],function(e){return Math.ceil(e)})).length%2==1?i.push(r.concat(r)):i.push(r)}return i}function nA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var iA=new Ap,rA={};var oA=2e3,aA=4500,sA={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:oA,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:aA,ARIA:6e3,DECAL:7e3}},lA="__flagInMainProcess",uA="__pendingUpdate",cA="__needsUpdateStatus",dA=/^[a-zA-Z0-9_]+$/,hA="__connectUpdateStatus";function pA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return gA(this,e,t);VA(this.id)}}function fA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return gA(this,e,t)}}function gA(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),Ap.prototype[t].apply(e,n)}var mA,vA,yA,xA,_A,bA,wA,CA,SA,MA,TA,IA,DA,kA,AA,EA,NA,LA,PA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t}(Ap),OA=PA.prototype;OA.on=fA("on"),OA.off=fA("off");var RA=function(e){function t(t,n,i){var r=e.call(this,new rk)||this;r._chartsViews=[],r._chartsMap={},r._componentsViews=[],r._componentsMap={},r._pendingActions=[],i=i||{},Oh(n)&&(n=UA[n]),r._dom=t;var o="canvas",a="auto",s=!1;if("production"!==process.env.NODE_ENV){var l=Qd.hasGlobalWindow?window:global;l&&(o=Yh(l.__ECHARTS__DEFAULT__RENDERER__,o),a=Yh(l.__ECHARTS__DEFAULT__COARSE_POINTER,a),s=Yh(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,s))}i.ssr&&(xv=function(e){var t=V_(e),n=t.dataIndex;if(null!=n){var i=rp();return i.set("series_index",t.seriesIndex),i.set("data_index",n),t.ssrType&&i.set("ssr_type",t.ssrType),i}});var u=r._zr=bv(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Yh(i.useDirtyRect,s),useCoarsePointer:Yh(i.useCoarsePointer,a),pointerSize:i.pointerSize});r._ssr=i.ssr,r._throttledZrFlush=CD(Eh(u.flush,u),17),(n=yh(n))&&MT(n,!0),r._theme=n,r._locale=function(e){if(Oh(e)){var t=hS[e.toUpperCase()]||{};return e===uS||e===cS?yh(t):xh(yh(t),yh(hS[dS]),!1)}return xh(yh(e),yh(hS[dS]),!1)}(i.locale||fS),r._coordSysMgr=new nT;var c=r._api=AA(r);function d(e,t){return e.__prio-t.__prio}return Of(HA,d),Of(GA,d),r._scheduler=new RD(r,c,GA,HA),r._messageCenter=new PA,r._initEvents(),r.resize=Eh(r.resize,r),u.animation.on("frame",r._onframe,r),MA(u,r),TA(u,r),Qh(r),r}return Kd(t,e),t.prototype._onframe=function(){if(!this._disposed){LA(this);var e=this._scheduler;if(this[uA]){var t=this[uA].silent;this[lA]=!0;try{mA(this),xA.update.call(this,null,this[uA].updateParams)}catch(a){throw this[lA]=!1,this[uA]=null,a}this._zr.flush(),this[lA]=!1,this[uA]=null,CA.call(this,t),SA.call(this,t)}else if(e.unfinished){var n=1,i=this._model,r=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),bA(this,i),e.performVisualTasks(i),kA(this,this._model,r,"remain",{}),n-=+new Date-o}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(this[lA])"production"!==process.env.NODE_ENV&&qv("`setOption` should not be called during main process.");else if(this._disposed)VA(this.id);else{var i,r,o;if(zh(t)&&(n=t.lazyUpdate,i=t.silent,r=t.replaceMerge,o=t.transition,t=t.notMerge),this[lA]=!0,!this._model||t){var a=new rT(this._api),s=this._theme,l=this._model=new qM;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:r},WA);var u={seriesTransition:o,optionChanged:!0};if(n)this[uA]={silent:i,updateParams:u},this[lA]=!1,this.getZr().wakeUp();else{try{mA(this),xA.update.call(this,null,u)}catch(c){throw this[uA]=null,this[lA]=!1,c}this._ssr||this._zr.flush(),this[uA]=null,this[lA]=!1,CA.call(this,i),SA.call(this,i)}}},t.prototype.setTheme=function(){$v("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Qd.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return"production"!==process.env.NODE_ENV&&Kv("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;if("production"!==process.env.NODE_ENV&&"canvas"!==t.type)throw new Error("renderToCanvas can only be used in the canvas renderer.");return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;if("production"!==process.env.NODE_ENV&&"svg"!==t.type)throw new Error("renderToSVGString can only be used in the svg renderer.");return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Qd.svgSupported){var e=this._zr;return Th(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],r=this;Th(t,function(e){n.eachComponent({mainType:e},function(e){var t=r._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return Th(i,function(e){e.group.ignore=!1}),o}VA(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(XA[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();Th(ZA,function(o,d){if(o.group===n){var h=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(yh(e)),p=o.getDom().getBoundingClientRect();a=i(p.left,a),s=i(p.top,s),l=r(p.right,l),u=r(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}});var h=(l*=d)-(a*=d),p=(u*=d)-(s*=d),f=ih.createCanvas(),g=bv(f,{renderer:t?"svg":"canvas"});if(g.resize({width:h,height:p}),t){var m="";return Th(c,function(e){var t=e.left-a,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"}),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new C_({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),Th(c,function(e){var t=new m_({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}VA(this.id)},t.prototype.convertToPixel=function(e,t){return _A(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return _A(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return Th(xy(this._model,e),function(e,i){i.indexOf("Models")>=0&&Th(e,function(e){var r=e.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(t);else if("seriesModels"===i){var o=this._chartsMap[e.__viewId];o&&o.containPoint?n=n||o.containPoint(t,e):"production"!==process.env.NODE_ENV&&Xv(i+": "+(o?"The found component do not support containPoint.":"No view mapping to the found component."))}else"production"!==process.env.NODE_ENV&&Xv(i+": containPoint is not supported")},this)},this),!!n;VA(this.id)},t.prototype.getVisual=function(e,t){var n=xy(this._model,e,{defaultMainType:"series"}),i=n.seriesModel;"production"!==process.env.NODE_ENV&&(i||Xv("There is no specified series model"));var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?uk(r,o,t):ck(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,i=this;Th(zA,function(e){var t=function(t){var n,r=i.getModel(),o=t.target,a="globalout"===e;if(a?n={}:o&&fk(o,function(e){var t=V_(e);if(t&&null!=t.dataIndex){var i=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return n=i&&i.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return n=bh({},t.eventData),!0},!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),c=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];"production"!==process.env.NODE_ENV&&(a||u&&c||Xv("model or view can not be found by params")),n.event=t,n.type=e,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:c},i.trigger(e,n)}};t.zrEventfulCallAtLast=!0,i._zr.on(e,t,i)}),Th(jA,function(e,t){i._messageCenter.on(t,function(e){this.trigger(t,e)},i)}),Th(["selectchanged"],function(e){i._messageCenter.on(e,function(t){this.trigger(e,t)},i)}),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",function(e){var i=n.getModel();e.isFromClick?(pk("map","selectchanged",t,i,e),pk("pie","selectchanged",t,i,e)):"select"===e.fromAction?(pk("map","selected",t,i,e),pk("pie","selected",t,i,e)):"unselect"===e.fromAction&&(pk("map","unselected",t,i,e),pk("pie","unselected",t,i,e))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?VA(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)VA(this.id);else{this._disposed=!0,this.getDom()&&Sy(this.getDom(),$A,"");var e=this,t=e._api,n=e._model;Th(e._componentsViews,function(e){e.dispose(n,t)}),Th(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete ZA[e.id]}},t.prototype.resize=function(e){if(this[lA])"production"!==process.env.NODE_ENV&&qv("`resize` should not be called during main process.");else if(this._disposed)VA(this.id);else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[uA]&&(null==i&&(i=this[uA].silent),n=!0,this[uA]=null),this[lA]=!0;try{n&&mA(this),xA.update.call(this,{type:"resize",animation:bh({duration:0},e&&e.animation)})}catch(r){throw this[lA]=!1,r}this[lA]=!1,CA.call(this,i),SA.call(this,i)}}},t.prototype.showLoading=function(e,t){if(this._disposed)VA(this.id);else if(zh(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),YA[e]){var n=YA[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}else"production"!==process.env.NODE_ENV&&Xv("Loading effects "+e+" not exists.")},t.prototype.hideLoading=function(){this._disposed?VA(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=bh({},e);return t.type=jA[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)VA(this.id);else if(zh(t)||(t={silent:!!t}),BA[e.type]&&this._model)if(this[lA])this._pendingActions.push(e);else{var n=t.silent;wA.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&Qd.browser.weChat&&this._throttledZrFlush(),CA.call(this,n),SA.call(this,n)}},t.prototype.updateLabelLayout=function(){iA.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)VA(this.id);else{var t=e.seriesIndex,n=this.getModel().getSeriesByIndex(t);"production"!==process.env.NODE_ENV&&$h(e.data&&n),n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(e){for(var t=[],n=e.currentStates,i=0;i<n.length;i++){var r=n[i];"emphasis"!==r&&"blur"!==r&&"select"!==r&&t.push(r)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,r=e.get("zlevel")||0;t.eachRendered(function(e){return i(e,n,r,-1/0),!0})}}function i(e,t,n,r){var o=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),l=0;l<s.length;l++)r=Math.max(i(s[l],t,n,r),r);else e.z=t,e.zlevel=n,r=Math.max(e.z2,r);if(o&&(o.z=t,o.zlevel=n,isFinite(r)&&(o.z2=r+2)),a){var u=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(u&&u.showAbove?1:-1))}return r}function r(e,t){t.eachRendered(function(e){if(!eC(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null)}})}function o(e,n){var i=e.getModel("stateAnimation"),r=e.isAnimationEnabled(),o=i.get("duration"),a=o>0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis){if(eC(e))return;if(e instanceof d_&&function(e){var t=W_(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}})}mA=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),vA(e,!0),vA(e,!1),t.plan()},vA=function(e,t){for(var n=e._model,i=e._scheduler,r=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<r.length;l++)r[l].__alive=!1;function u(e){var l=e.__requireNewView;e.__requireNewView=!1;var u="_ec_"+e.id+"_"+e.type,c=!l&&o[u];if(!c){var d=ky(e.type),h=t?cD.getClass(d.main,d.sub):fD.getClass(d.sub);"production"!==process.env.NODE_ENV&&$h(h,d.sub+" does not exist."),(c=new h).init(n,s),o[u]=c,r.push(c),a.add(c.group)}e.__viewId=c.__id=u,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&i.prepareView(c,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&u(t)}):n.eachSeries(u);for(l=0;l<r.length;){var c=r[l];c.__alive?l++:(!t&&c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),r.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},yA=function(e,t,n,i,r){var o=e._model;if(o.setUpdatePayload(n),i){var a={};a[i+"Id"]=n[i+"Id"],a[i+"Index"]=n[i+"Index"],a[i+"Name"]=n[i+"Name"];var s={mainType:i,query:a};r&&(s.subType=r);var l,u=n.excludeSeriesId;null!=u&&(l=rp(),Th(iy(u),function(e){var t=dy(e,null);null!=t&&l.set(t,!0)})),o&&o.eachComponent(s,function(t){if(!(l&&null!=l.get(t.id)))if(Rb(n))if(t instanceof nD)n.type!==X_||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var i=e.seriesIndex,r=e.getData(t.dataType);if(r){var o=my(r,t);o=(Lh(o)?o[0]:o)||0;var a=r.getItemGraphicEl(o);if(!a)for(var s=r.count(),l=0;!a&&l<s;)a=r.getItemGraphicEl(l++);if(a){var u=V_(a);wb(i,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&wb(i,c,d,n)}}else"production"!==process.env.NODE_ENV&&qv("Unknown dataType "+t.dataType)}(t,n,e._api);else{var i=Sb(t.mainType,t.componentIndex,n.name,e._api),r=i.focusSelf,o=i.dispatchers;n.type===X_&&r&&!n.notBlur&&Cb(t.mainType,t.componentIndex,e._api),o&&Th(o,function(e){n.type===X_?fb(e):gb(e)})}else Ob(n)&&t instanceof nD&&(!function(e,t){if(Ob(t)){var n=t.dataType,i=my(e.getData(n),t);Lh(i)||(i=[i]),e[t.type===J_?"toggleSelect":t.type===$_?"select":"unselect"](i,n)}}(t,n,e._api),Mb(t),NA(e))},e),o&&o.eachComponent(s,function(t){l&&null!=l.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else Th([].concat(e._componentsViews).concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}},xA={prepareAndUpdate:function(e){mA(this),xA.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var i=this._model,r=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(i){i.setUpdatePayload(t),s.restoreData(i,t),s.performSeriesTasks(i),a.create(i,r),s.performDataProcessorTasks(i,t),bA(this,i),a.update(i,r),e(i),s.performVisualTasks(i,t),IA(this,i,r,t,n);var l=i.get("backgroundColor")||"transparent",u=i.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),iA.trigger("afterupdate",i,r)}},updateTransform:function(t){var n=this,i=this._model,r=this._api;if(i){i.setUpdatePayload(t);var o=[];i.eachComponent(function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(a,i,r,t);l&&l.update&&o.push(s)}else o.push(s)}});var a=rp();i.eachSeries(function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,i,r,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)}),e(i),this._scheduler.performVisualTasks(i,t,{setDirty:!0,dirtyMap:a}),kA(this,i,r,t,{},a),iA.trigger("afterupdate",i,r)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),fD.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),IA(this,n,this._api,t,{}),iA.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,i=this._model;i&&(i.setUpdatePayload(t),i.eachSeries(function(e){e.getData().clearAllVisual()}),fD.markUpdateMethod(t,"updateVisual"),e(i),this._scheduler.performVisualTasks(i,t,{visualType:"visual",setDirty:!0}),i.eachComponent(function(e,r){if("series"!==e){var o=n.getViewOfComponentModel(r);o&&o.__alive&&o.updateVisual(r,i,n._api,t)}}),i.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,i,n._api,t)}),iA.trigger("afterupdate",i,this._api))},updateLayout:function(e){xA.update.call(this,e)}},_A=function(e,t,n,i){if(e._disposed)VA(e.id);else{for(var r,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=xy(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(r=u[t](o,s,i)))return r}"production"!==process.env.NODE_ENV&&Xv("No coordinate system that supports "+t+" found by the given finder.")}},bA=function(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries(function(e){i.updateStreamModes(e,n[e.__viewId])})},wA=function(e,t){var n=this,i=this.getModel(),r=e.type,o=e.escapeConnect,a=BA[r],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&ky(l[0]);this[lA]=!0;var d=[e],h=!1;e.batch&&(h=!0,d=Ih(e.batch,function(t){return(t=wh(bh({},t),e)).batch=null,t}));var p,f=[],g=Ob(e),m=Rb(e);if(m&&bb(this._api),Th(d,function(t){if((p=(p=a.action(t,n._model,n._api))||bh({},t)).type=s.event||p.type,f.push(p),m){var i=_y(e),r=i.queryOptionMap,o=i.mainTypeSpecified?r.keys()[0]:"series";yA(n,u,t,o),NA(n)}else g?(yA(n,u,t,"series"),NA(n)):c&&yA(n,u,t,c.main,c.sub)}),"none"!==u&&!m&&!g&&!c)try{this[uA]?(mA(this),xA.update.call(this,e),this[uA]=null):xA[u].call(this,e)}catch(x){throw this[lA]=!1,x}if(p=h?{type:s.event||r,escapeConnect:o,batch:f}:f[0],this[lA]=!1,!t){var v=this._messageCenter;if(v.trigger(p.type,p),g){var y={type:"selectchanged",escapeConnect:o,selected:Tb(i),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},CA=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();wA.call(this,n,e)}},SA=function(e){!e&&this.trigger("updated")},MA=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[uA]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},TA=function(e,t){e.on("mouseover",function(e){var n=fk(e.target,Pb);n&&(!function(e,t,n){"production"===process.env.NODE_ENV||Pb(e)||qv("param should be highDownDispatcher");var i=V_(e),r=Sb(i.componentMainType,i.componentIndex,i.componentHighDownName,n),o=r.dispatchers,a=r.focusSelf;o?(a&&Cb(i.componentMainType,i.componentIndex,n),Th(o,function(e){return hb(e,t)})):(wb(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&Cb(i.componentMainType,i.componentIndex,n),hb(e,t))}(n,e,t._api),NA(t))}).on("mouseout",function(e){var n=fk(e.target,Pb);n&&(!function(e,t,n){"production"===process.env.NODE_ENV||Pb(e)||qv("param should be highDownDispatcher"),bb(n);var i=V_(e),r=Sb(i.componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers;r?Th(r,function(e){return pb(e,t)}):pb(e,t)}(n,e,t._api),NA(t))}).on("click",function(e){var n=fk(e.target,function(e){return null!=V_(e).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",r=V_(n);t._api.dispatchAction({type:i,dataType:r.dataType,dataIndexInside:r.dataIndex,seriesIndex:r.seriesIndex,isFromClick:!0})}})},IA=function(e,t,n,i,r){!function(e){var t=[],n=[],i=!1;if(e.eachComponent(function(e,r){var o=r.get("zlevel")||0,a=r.get("z")||0,s=r.getZLevelKey();i=i||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:r.componentIndex,type:e,key:s})}),i){var r,o,a=t.concat(n);Of(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),Th(a,function(t){var n=e.getComponent(t.type,t.idx),i=t.zlevel,a=t.key;null!=r&&(i=Math.max(r,i)),a?(i===r&&a!==o&&i++,o=a):o&&(i===r&&i++,o=""),r=i,n.setZLevel(i)})}}(t),DA(e,t,n,i,r),Th(e._chartsViews,function(e){e.__alive=!1}),kA(e,t,n,i,r),Th(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},DA=function(e,t,i,a,s,l){Th(l||e._componentsViews,function(e){var s=e.__model;r(s,e),e.render(s,t,i,a),n(s,e),o(s,e)})},kA=function(e,t,i,a,s,l){var u=e._scheduler;s=bh(s||{},{updatedSeries:t.getSeries()}),iA.trigger("series:beforeupdate",t,i,s);var c=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;u.updatePayload(i,a),r(t,n),l&&l.get(t.uid)&&i.dirty(),i.perform(u.getPerformArgs(i))&&(c=!0),n.group.silent=!!t.get("silent"),function(e,t){var n=e.get("blendMode")||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}(t,n),Mb(t)}),u.unfinished=c||u.unfinished,iA.trigger("series:layoutlabels",t,i,s),iA.trigger("series:transition",t,i,s),t.eachSeries(function(t){var i=e._chartsMap[t.__viewId];n(t,i),o(t,i)}),function(e,t){var n=e._zr,i=n.storage,r=0;i.traverse(function(e){e.isGroup||r++}),r>t.get("hoverLayerThreshold")&&!Qd.node&&!Qd.worker&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}})}(e,t),iA.trigger("series:afterupdate",t,i,s)},NA=function(e){e[cA]=!0,e.getZr().wakeUp()},LA=function(e){e[cA]&&(e.getZr().storage.traverse(function(e){eC(e)||t(e)}),e[cA]=!1)},AA=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Kd(n,t),n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){fb(t,n),NA(e)},n.prototype.leaveEmphasis=function(t,n){gb(t,n),NA(e)},n.prototype.enterBlur=function(t){mb(t),NA(e)},n.prototype.leaveBlur=function(t){vb(t),NA(e)},n.prototype.enterSelect=function(t){yb(t),NA(e)},n.prototype.leaveSelect=function(t){xb(t),NA(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n}(eT))(e)},EA=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][hA]=t}}Th(jA,function(n,i){e._messageCenter.on(i,function(n){if(XA[e.group]&&0!==e[hA]){if(n&&n.escapeConnect)return;var i=e.makeActionFromEvent(n),r=[];Th(ZA,function(t){t!==e&&t.group===e.group&&r.push(t)}),t(r,0),Th(r,function(e){1!==e[hA]&&e.dispatchAction(i)}),t(r,2)}})})}}(),t}(Ap),FA=RA.prototype;FA.on=pA("on"),FA.off=pA("off"),FA.one=function(e,t,n){var i=this;$v("ECharts#one is deprecated."),this.on.call(this,e,function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];t&&t.apply&&t.apply(this,r),i.off(e,n)},n)};var zA=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function VA(e){"production"!==process.env.NODE_ENV&&Xv("Instance "+e+" has been disposed")}var BA={},jA={},GA=[],WA=[],HA=[],UA={},YA={},ZA={},XA={},qA=+new Date-0,$A="_echarts_instance_";function KA(e,t,n){if("production"!==process.env.NODE_ENV&&!e)throw new Error("Initialize failed: invalid dom.");var i=function(e){return ZA[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,$A)]}(e);if(i)return"production"!==process.env.NODE_ENV&&Xv("There is a chart instance already initialized on the dom."),i;"production"!==process.env.NODE_ENV&&(!jh(e)||"CANVAS"===e.nodeName.toUpperCase()||(e.clientWidth||n)&&(e.clientHeight||n)||Xv("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload."));var r=new RA(e,t,n);return r.id="ec_"+qA++,ZA[r.id]=r,Sy(e,$A,r.id),EA(r),iA.trigger("afterinit",r),r}function JA(e,t){UA[e]=t}function QA(e){Ch(WA,e)<0&&WA.push(e)}function eE(e,t){oE(GA,e,t,2e3)}function tE(e,t){iA.on(e,t)}function nE(e,t,n){Ph(t)&&(n=t,t="");var i=zh(e)?e.type:[e,e={event:t}][0];e.event=(e.event||i).toLowerCase(),t=e.event,jA[t]||($h(dA.test(i)&&dA.test(t)),BA[i]||(BA[i]={action:n,actionInfo:e}),jA[t]=i)}function iE(e,t){oE(HA,e,t,3e3,"visual")}var rE=[];function oE(e,t,n,i,r){if((Ph(t)||zh(t))&&(n=t,t=i),"production"!==process.env.NODE_ENV){if(isNaN(t)||null==t)throw new Error("Illegal priority");Th(e,function(e){$h(e.__raw!==n)})}if(!(Ch(rE,n)>=0)){rE.push(n);var o=RD.wrapStageHandler(n,r);o.__prio=t,o.__raw=n,e.push(o)}}function aE(e,t){YA[e]=t}var sE=function(e){var t=(e=yh(e)).type,n="";t||("production"!==process.env.NODE_ENV&&(n="Must have a `type` when `registerTransform`."),Qv(n));var i=t.split(":");2!==i.length&&("production"!==process.env.NODE_ENV&&(n='Name must include namespace like "ns:regression".'),Qv(n));var r=!1;"echarts"===i[0]&&(t=i[1],r=!0),e.__isBuiltIn=r,vI.set(t,e)};iE(oA,ED),iE(aA,LD),iE(aA,PD),iE(oA,sk),iE(aA,lk),iE(7e3,function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(e){var n=i.getItemVisual(e,"decal");n&&(i.ensureUniqueItemVisual(e,"style").decal=Qk(n,t))});var r=i.getVisual("decal");if(r)i.getVisual("style").decal=Qk(r,t)}})}),QA(MT),eE(900,function(e){var t=rp();e.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),r=e.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:e};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),t.each(TT)}),aE("default",function(e,t){wh(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new mv,i=new C_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var r,o=new T_({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new C_({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((r=new Fw({shape:{startAngle:-OD/2,endAngle:-OD/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*OD/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*OD/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}),nE({type:X_,event:X_,update:X_},up),nE({type:q_,event:q_,update:q_},up),nE({type:$_,event:$_,update:$_},up),nE({type:K_,event:K_,update:K_},up),nE({type:J_,event:J_,update:J_},up),JA("light",JD),JA("dark",ik);var lE=[],uE={registerPreprocessor:QA,registerProcessor:eE,registerPostInit:function(e){tE("afterinit",e)},registerPostUpdate:function(e){tE("afterupdate",e)},registerUpdateLifecycle:tE,registerAction:nE,registerCoordinateSystem:function(e,t){nT.register(e,t)},registerLayout:function(e,t){oE(HA,e,t,1e3,"layout")},registerVisual:iE,registerTransform:sE,registerLoading:aE,registerMap:function(e,t,n){var i,r=(i="registerMap","production"!==process.env.NODE_ENV&&(rA[i]||qv("Implementation of "+i+" doesn't exists.")),rA[i]);r&&r(e,t,n)},registerImpl:function(e,t){"production"!==process.env.NODE_ENV&&rA[e]&&qv("Already has an implementation of "+e+"."),rA[e]=t},PRIORITY:sA,ComponentModel:fM,ComponentView:cD,SeriesModel:nD,ChartView:fD,registerComponentModel:function(e){fM.registerClass(e)},registerComponentView:function(e){cD.registerClass(e)},registerSeriesModel:function(e){nD.registerClass(e)},registerChartView:function(e){fD.registerClass(e)},registerSubTypeDefaulter:function(e,t){fM.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,vv[e]=n}};function cE(e){Lh(e)?Th(e,function(e){cE(e)}):Ch(lE,e)>=0||(lE.push(e),Ph(e)&&(e={install:e}),e.install(uE))}function dE(e){return null==e?0:e.length||1}function hE(e){return e}var pE=function(){function e(e,t,n,i,r,o){this._old=e,this._new=t,this._oldKeyGetter=n||hE,this._newKeyGetter=i||hE,this.context=r,this._diffModeMultiple="multiple"===o}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),r=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,r,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=i[o],s=n[a],l=dE(s);if(l>1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},r=[],o=[];this._initIndexMap(e,n,r,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var a=0;a<r.length;a++){var s=r[a],l=n[s],u=i[s],c=dE(l),d=dE(u);if(c>1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),i[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var h=0;h<c;h++)this._remove&&this._remove(l[h]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],r=t[i],o=dE(r);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(r[a]);else 1===o&&this._add&&this._add(r);t[i]=null}},e.prototype._initIndexMap=function(e,t,n,i){for(var r=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[i](e[o],o);if(r||(n[o]=a),t){var s=t[a],l=dE(s);0===l?(t[a]=o,r&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),fE=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function gE(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function mE(e){return"category"===e?"ordinal":"time"===e?"time":"float"}var vE=function(){return function(e){this.otherDims={},null!=e&&bh(this,e)}}(),yE=vy(),xE={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},_E=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=CE(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Yh(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=VT(this.source),n=!SE(e),i="",r=[],o=0,a=0;o<e;o++){var s=void 0,l=void 0,u=void 0,c=this.dimensions[a];if(c&&c.storeDimIndex===o)s=t?c.name:null,l=c.type,u=c.ordinalMeta,a++;else{var d=this.getSourceDimension(o);d&&(s=t?d.name:null,l=d.type)}r.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(i+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),i+="$",i+=xE[l]||"f",u&&(i+=u.uid),i+="$"}var h=this.source;return{dimensions:r,hash:[h.seriesLayoutBy,h.startIndex,i].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var i=void 0,r=this.dimensions[n];if(r&&r.storeDimIndex===t)r.isCalculationCoord||(i=r.name),n++;else{var o=this.getSourceDimension(t);o&&(i=o.name)}e.push(i)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function bE(e){return e instanceof _E}function wE(e){for(var t=rp(),n=0;n<(e||[]).length;n++){var i=e[n],r=zh(i)?i.name:i;null!=r&&null==t.get(r)&&t.set(r,n)}return t}function CE(e){var t=yE(e);return t.dimNameMap||(t.dimNameMap=wE(e.dimensionsDefine))}function SE(e){return e>30}var ME,TE,IE,DE,kE,AE,EE,NE=zh,LE=Ih,PE="undefined"==typeof Int32Array?Array:Int32Array,OE=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],RE=["_approximateExtent"],FE=function(){function e(e,t){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i=!1;bE(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],d=Oh(c)?new vE({name:c}):c instanceof vE?c:new vE(c),h=d.name;d.type=d.type||"float",d.coordDim||(d.coordDim=h,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};o.push(h),r[h]=d,null!=l[h]&&(s=!0),d.createInvertedIndices&&(a[h]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.itemId&&(this._idDimIdx=u),"production"!==process.env.NODE_ENV&&$h(i||d.storeDimIndex>=0),i&&(d.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=r,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=rp();Th(o,function(e){f.set(r[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(null==t)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(null!=n)return n;var i=this._schema.getSourceDimension(t);return i?i.name:void 0},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(null!=t)return t;if(null==e)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(Fh(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if("production"!==process.env.NODE_ENV&&null==t)throw new Error("Unknown dimension "+e);return t},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var i,r=this;if(e instanceof EI&&(i=e),!i){var o=this.dimensions,a=LT(e)||Mh(e)?new BT(e,o.length):e;i=new EI;var s=LE(o,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(a,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=function(e,t){var n={},i=n.encode={},r=rp(),o=[],a=[],s={};Th(e.dimensions,function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){"production"!==process.env.NODE_ENV&&$h(null==yM.get(u));var c=l.coordDimIndex;gE(i,u)[c]=t,l.isExtraCoord||(r.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),gE(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}yM.each(function(e,t){var n=gE(i,t),r=l.otherDims[t];null!=r&&!1!==r&&(n[r]=l.name)})});var l=[],u={};r.each(function(e,t){var n=i[t];u[t]=n[0],l=l.concat(n)}),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=Ih(l,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(o=c.slice());var d=i.tooltip;return d&&d.length?a=d.slice():a.length||(a=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=a,n.userOutput=new fE(s,t),n}(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),i=n.start,r=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=i;a<r;a++){var s=a-i;this._nameList[a]=t[s],o&&EE(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var i=this._dimInfos[t[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==CM&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===xM&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&sy(s)&&(this.hasItemOption=!0),s){var l=s.name;null==i[a]&&null!=l&&(i[a]=dy(l,null));var u=s.id;null==r[a]&&null!=u&&(r[a]=dy(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)EE(this,a);ME(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){NE(e)?bh(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return null==n&&null!=this._nameDimIdx&&(n=IE(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},e.prototype.getId=function(e){return TE(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,i=this._store;return Lh(e)?i.getValues(LE(e,function(e){return n._getStoreDimIndex(e)}),t):i.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e];if("production"!==process.env.NODE_ENV&&!n)throw new Error("Do not supported yet");var i=n&&n[t];return null==i||isNaN(i)?-1:i},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){Ph(e)&&(n=t,t=e,e=[]);var i=n||this,r=LE(DE(e),this._getStoreDimIndex,this);this._store.each(r,i?Eh(t,i):t)},e.prototype.filterSelf=function(e,t,n){Ph(e)&&(n=t,t=e,e=[]);var i=n||this,r=LE(DE(e),this._getStoreDimIndex,this);return this._store=this._store.filter(r,i?Eh(t,i):t),this},e.prototype.selectRange=function(e){var t=this,n={};return Th(Ah(e),function(i){var r=t._getStoreDimIndex(i);n[r]=e[i]}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){Ph(e)&&(n=t,t=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},n),i},e.prototype.map=function(e,t,n,i){var r=n||i||this,o=LE(DE(e),this._getStoreDimIndex,this),a=AE(this);return a._store=this._store.map(o,r?Eh(t,r):t),a},e.prototype.modify=function(e,t,n,i){var r=this,o=n||i||this;"production"!==process.env.NODE_ENV&&Th(DE(e),function(e){r.getDimensionInfo(e).isCalculationCoord});var a=LE(DE(e),this._getStoreDimIndex,this);this._store.modify(a,o?Eh(t,o):t)},e.prototype.downSample=function(e,t,n,i){var r=AE(this);return r._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),r},e.prototype.minmaxDownSample=function(e,t){var n=AE(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=AE(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new oS(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new pE(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return TE(e,t)},function(e){return TE(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},NE(e)?bh(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],i=n&&n[t];return null==i?this.getVisual(t):i},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var r=i[t];return null==r&&(Lh(r=this.getVisual(t))?r=r.slice():NE(r)&&(r=bh({},r)),i[t]=r),r},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,NE(t)?bh(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){NE(e)?bh(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?bh(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;B_(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){Th(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:LE(this.dimensions,this._getDimInfo,this),this.hostModel)),kE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Ph(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Xh(arguments)))})},e.internalField=(ME=function(e){var t=e._invertedIndicesMap;Th(t,function(n,i){var r=e._dimInfos[i],o=r.ordinalMeta,a=e._store;if(o){n=t[i]=new PE(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(r.storeDimIndex,s)]=s}})},IE=function(e,t,n){return dy(e._getCategory(t,n),null)},TE=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=IE(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},DE=function(e){return Lh(e)||(e=null!=e?[e]:[]),e},AE=function(t){var n=new e(t._schema?t._schema:LE(t.dimensions,t._getDimInfo,t),t.hostModel);return kE(n,t),n},kE=function(e,t){Th(OE.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,Th(RE,function(n){e[n]=yh(t[n])}),e._calculationInfo=bh({},t._calculationInfo)},void(EE=function(e,t){var n=e._nameList,i=e._idList,r=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=i[t];if(null==a&&null!=r&&(n[t]=a=IE(e,r,t)),null==s&&null!=o&&(i[t]=s=IE(e,o,t)),null==s&&null!=a){var l=e._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[t]=s}})),e}();function zE(e,t){LT(e)||(e=OT(e));var n=(t=t||{}).coordDimensions||[],i=t.dimensionsDefine||e.dimensionsDefine||[],r=rp(),o=[],a=function(e,t,n,i){var r=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,i||0);return Th(t,function(e){var t;zh(e)&&(t=e.dimsDef)&&(r=Math.max(r,t.length))}),r}(e,n,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&SE(a),l=i===e.dimensionsDefine,u=l?CE(e):wE(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=rp(c),h=new SI(a),p=0;p<h.length;p++)h[p]=-1;function f(e){var t=h[e];if(t<0){var n=i[e],r=zh(n)?n:{name:n},a=new vE,s=r.name;null!=s&&null!=u.get(s)&&(a.name=a.displayName=s),null!=r.type&&(a.type=r.type),null!=r.displayName&&(a.displayName=r.displayName);var l=o.length;return h[e]=l,a.storeDimIndex=e,o.push(a),a}return o[t]}if(!s)for(p=0;p<a;p++)f(p);d.each(function(e,t){var n=iy(e).slice();if(1===n.length&&!Oh(n[0])&&n[0]<0)d.set(t,!1);else{var i=d.set(t,[]);Th(n,function(e,n){var r=Oh(e)?u.get(e):e;null!=r&&r<a&&(i[n]=r,m(f(r),t,n))})}});var g=0;function m(e,t,n){null!=yM.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,r.set(t,!0))}Th(n,function(e){var t,n,i,r;if(Oh(e))t=e,r={};else{t=(r=e).name;var o=r.ordinalMeta;r.ordinalMeta=null,(r=bh({},r)).ordinalMeta=o,n=r.dimsDef,i=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null}var s=d.get(t);if(!1!==s){if(!(s=iy(s)).length)for(var u=0;u<(n&&n.length||1);u++){for(;g<a&&null!=f(g).coordDim;)g++;g<a&&s.push(g++)}Th(s,function(e,o){var a=f(e);if(l&&null!=r.type&&(a.type=r.type),m(wh(a,r),t,o),null==a.name&&n){var s=n[o];!zh(s)&&(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}i&&wh(a.otherDims,i)})}});var v=t.generateCoord,y=t.generateCoordCount,x=null!=y;y=v?y||1:0;var _=v||"value";function b(e){null==e.name&&(e.name=e.coordDim)}if(s)Th(o,function(e){b(e)}),o.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var w=0;w<a;w++){var C=f(w);null==C.coordDim&&(C.coordDim=VE(_,r,x),C.coordDimIndex=0,(!v||y<=0)&&(C.isExtraCoord=!0),y--),b(C),null!=C.type||PM(e,w)!==IM&&(!C.isExtraCoord||null==C.otherDims.itemName&&null==C.otherDims.seriesName)||(C.type="ordinal")}return function(e){for(var t=rp(),n=0;n<e.length;n++){var i=e[n],r=i.name,o=t.get(r)||0;o>0&&(i.name=r+(o-1)),o++,t.set(r,o)}}(o),new _E({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function VE(e,t,n){if(n||t.hasKey(e)){for(var i=0;t.hasKey(e+i);)i++;e+=i}return t.set(e,!0),e}var BE=function(){return function(e){this.coordSysDims=[],this.axisMap=rp(),this.categoryAxisMap=rp(),this.coordSysName=e}}();var jE={cartesian2d:function(e,t,n,i){var r=e.getReferringComponents("xAxis",by).models[0],o=e.getReferringComponents("yAxis",by).models[0];if("production"!==process.env.NODE_ENV){if(!r)throw new Error('xAxis "'+Uh(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!o)throw new Error('yAxis "'+Uh(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),GE(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),GE(o)&&(i.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var r=e.getReferringComponents("singleAxis",by).models[0];if("production"!==process.env.NODE_ENV&&!r)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],n.set("single",r),GE(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var r=e.getReferringComponents("polar",by).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");if("production"!==process.env.NODE_ENV){if(!a)throw new Error("angleAxis option not found");if(!o)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),GE(o)&&(i.set("radius",o),t.firstCategoryDimIndex=0),GE(a)&&(i.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var r=e.ecModel,o=r.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();Th(o.parallelAxisIndex,function(e,o){var s=r.getComponent("parallelAxis",e),l=a[o];n.set(l,s),GE(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))})}};function GE(e){return"category"===e.get("type")}function WE(e,t,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!bE(e.schema)}(t)?(r=t.schema,i=r.dimensions,o=t.store):i=t;var l,u,c,d,h=!(!e||!e.get("stack"));if(Th(i,function(e,t){Oh(e)&&(i[t]=e={name:e}),h&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))}),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,g=0;Th(i,function(e){e.coordDim===p&&g++});var m={name:c,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:d,coordDim:d,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(m.storeDimIndex=o.ensureCalculationDimension(d,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),r.appendCalculationDimension(m),r.appendCalculationDimension(v)):(i.push(m),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function HE(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function UE(e,t){return HE(e,t)?e.getCalculationInfo("stackResultDimension"):t}function YE(e,t,n){n=n||{};var i,r=t.getSourceManager(),o=!1;e?(o=!0,i=OT(e)):o=(i=r.getSource()).sourceFormat===xM;var a=function(e){var t=e.get("coordinateSystem"),n=new BE(t),i=jE[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,i=e.get("coordinateSystem"),r=nT.get(i);return t&&t.coordSysDims&&(n=Ih(t.coordSysDims,function(e){var n={name:e},i=t.axisMap.get(e);if(i){var r=i.get("type");n.type=mE(r)}return n})),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=Ph(l)?l:l?Nh(EM,s,t):null,c=zE(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),d=function(e,t,n){var i,r;return n&&Th(e,function(e,o){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(r=!0)}),r||null==i||(e[i].otherDims.itemName=0),i}(c.dimensions,n.createInvertedIndices,a),h=o?null:r.getSharedDataStore(c),p=WE(t,{schema:c,store:h}),f=new FE(c,t);f.setCalculationInfo(p);var g=null!=d&&function(e){if(e.sourceFormat===xM){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return!Lh(ay(t))}}(i)?function(e,t,n,i){return i===d?n:this.defaultDimValueGetter(e,t,n,i)}:null;return f.hasItemOption=!1,f.initData(o?i:h,null,g),f}var ZE=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();Oy(ZE);var XE=0,qE=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++XE}return e.createByAxisModel=function(t){var n=t.option,i=n.data,r=i&&Ih(i,$E);return new e({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Oh(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=rp(this.categories))},e}();function $E(e){return zh(e)&&null!=e.value?e.value:e+""}function KE(e){return"interval"===e.type||"log"===e.type}function JE(e,t,n,i){var r={},o=e[1]-e[0],a=r.interval=Fv(o/t);null!=n&&a<n&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalPrecision=eN(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),tN(e,0,t),tN(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(r.niceTickExtent=[Mv(Math.ceil(e[0]/a)*a,s),Mv(Math.floor(e[1]/a)*a,s)],e),r}function QE(e){var t=Math.pow(10,Rv(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Mv(n*t)}function eN(e){return Iv(e)+2}function tN(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function nN(e,t){return e>=t[0]&&e<=t[1]}function iN(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function rN(e,t){return e*(t[1]-t[0])+t[0]}var oN=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new qE({})),Lh(i)&&(i=new qE({categories:Ih(i,function(e){return zh(e)?e.value:e})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return Kd(t,e),t.prototype.parse=function(e){return null==e?NaN:Oh(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return nN(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return iN(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(rN(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);r<a;++r){var s=t[r];n[r]=s,i[s]=r}for(var l=0;r<o;++r){for(;null!=i[l];)l++;n.push(l),i[l]=r}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return null==n?"":n+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(ZE);ZE.registerClass(oN);var aN=Mv,sN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return Kd(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return nN(e,this._extent)},t.prototype.normalize=function(e){return iN(e,this._extent)},t.prototype.scale=function(e){return rN(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=eN(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!t)return o;n[0]<i[0]&&(e?o.push({value:aN(i[0]-t,r)}):o.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(o.push({value:a}),(a=aN(a+t,r))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(e?o.push({value:aN(s+t,r)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<t.length;r++){for(var o=t[r],a=t[r-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=aN(a.value+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},t.prototype.getLabel=function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=Iv(e.value)||0:"auto"===n&&(n=this._intervalPrecision),ZS(aN(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var o=JE(i,e,t,n);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var i=t[1]-t[0];isFinite(i)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=aN(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=aN(Math.ceil(t[1]/r)*r))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(ZE);ZE.registerClass(sN);var lN="undefined"!=typeof Float32Array,uN=lN?Float32Array:Array;function cN(e){return Lh(e)?lN?new Float32Array(e):e:new uN(e)}var dN="__ec_stack_";function hN(e){return e.get("stack")||dN+e.seriesIndex}function pN(e){return e.dim+e.index}function fN(e,t){var n=[];return t.eachSeriesByType(e,function(e){xN(e)&&n.push(e)}),n}function gN(e){var t=function(e){var t={};Th(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),r=n.dim+"_"+n.index,o=i.getDimensionIndex(i.mapDimension(n.dim)),a=i.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[r]?t[r].push(u):t[r]=[u]}});var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];if(r){r.sort(function(e,t){return e-t});for(var o=null,a=1;a<r.length;++a){var s=r[a]-r[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(e),n=[];return Th(e,function(e){var i,r=e.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=t[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var d=e.getData();i=Math.abs(o[1]-o[0])/d.count()}var h=Sv(e.get("barWidth"),i),p=Sv(e.get("barMaxWidth"),i),f=Sv(e.get("barMinWidth")||(_N(e)?.5:1),i),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:pN(r),stackId:hN(e)})}),mN(n)}function mN(e){var t={};Th(e,function(e,n){var i=e.axisKey,r=e.bandWidth,o=t[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[i]=o;var s=e.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(o.gap=d);var h=e.barCategoryGap;null!=h&&(o.categoryGap=h)});var n={};return Th(t,function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,o=e.categoryGap;if(null==o){var a=Ah(i).length;o=Math.max(35-4*a,15)+"%"}var s=Sv(o,r),l=Sv(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),Th(i,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,u-=i+l*i,c--}else{var i=d;t&&t<i&&(i=Math.min(t,u)),n&&n>i&&(i=n),i!==d&&(e.width=i,u-=i+l*i,c--)}}),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h,p=0;Th(i,function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)}),h&&(p-=h.width*l);var f=-p/2;Th(i,function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function vN(e,t){var n=fN(e,t),i=gN(n);Th(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),r=hN(e),o=i[pN(n)][r],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function yN(e){return{seriesType:e,plan:dD(),reset:function(e){if(xN(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(r.dim)),a=t.getDimensionIndex(t.mapDimension(i.dim)),s=e.get("showBackground",!0),l=t.mapDimension(r.dim),u=t.getCalculationInfo("stackResultDimension"),c=HE(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),d=r.isHorizontal(),h=function(e,t){var n=t.model.get("startValue");n||(n=0);return t.toGlobalCoord(t.dataToCoord("log"===t.type?n>0?n:1:n))}(0,r),p=_N(e),f=e.get("barMinHeight")||0,g=u&&t.getDimensionIndex(u),m=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var i,r=e.count,l=p&&cN(3*r),u=p&&s&&cN(3*r),y=p&&cN(r),x=n.master.getRect(),_=d?x.width:x.height,b=t.getStore(),w=0;null!=(i=e.next());){var C=b.get(c?g:o,i),S=b.get(a,i),M=h,T=void 0;c&&(T=+C-b.get(o,i));var I=void 0,D=void 0,k=void 0,A=void 0;if(d){var E=n.dataToPoint([C,S]);if(c)M=n.dataToPoint([T,S])[0];I=M,D=E[1]+v,k=E[0]-M,A=m,Math.abs(k)<f&&(k=(k<0?-1:1)*f)}else{E=n.dataToPoint([S,C]);if(c)M=n.dataToPoint([S,T])[1];I=E[0]+v,D=M,k=m,A=E[1]-M,Math.abs(A)<f&&(A=(A<=0?-1:1)*f)}p?(l[w]=I,l[w+1]=D,l[w+2]=d?k:A,u&&(u[w]=d?x.x:I,u[w+1]=d?D:x.y,u[w+2]=_),y[i]=i):t.setItemLayout(i,{x:I,y:D,width:k,height:A}),w+=3}p&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:u,valueAxisHorizontal:d})}}}}}}function xN(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function _N(e){return e.pipelineContext&&e.pipelineContext.large}var bN=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return Kd(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return AS(e.value,SS[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(DS(this._minLevelUnit))]||SS.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var i=this.getSetting("useUTC");return function(e,t,n,i,r){var o=null;if(Oh(n))o=n;else if(Ph(n))o=n(e.value,t,{level:e.level});else{var a=bh({},wS);if(e.level>0)for(var s=0;s<MS.length;++s)a[MS[s]]="{primary|"+a[MS[s]]+"}";var l=n?!1===n.inherit?n:wh(n,a):a,u=ES(e.value,r);if(l[u])o=l[u];else if(l.inherit){for(s=TS.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Lh(o)){var c=null==e.level?0:e.level>=0?e.level:o.length+e.level;o=o[c=Math.min(c,o.length-1)]}}return AS(new Date(e.value),o,r,i)}(e,t,n,this.getSetting("locale"),i)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var i=this.getSetting("useUTC"),r=function(e,t,n,i){var r=1e4,o=TS,a=0;function s(e,t,n,r,o,a,s){for(var l=new Date(t),u=t,c=l[r]();u<n&&u<=i[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})}function l(e,r,o){var a=[],l=!r.length;if(!function(e,t,n,i){var r=Ov(t),o=Ov(n),a=function(e){return NS(r,e,i)===NS(o,e,i)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},d=function(){return c()&&a("minute")},h=function(){return d()&&a("second")},p=function(){return h()&&a("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return d();case"second":return h();case"millisecond":return p()}}(DS(e),i[0],i[1],n)){l&&(r=[{value:DN(new Date(i[0]),e,n)},{value:i[1]}]);for(var u=0;u<r.length-1;u++){var c=r[u].value,d=r[u+1].value;if(c!==d){var h=void 0,p=void 0,f=void 0,g=!1;switch(e){case"year":h=Math.max(1,Math.round(t/_S/365)),p=LS(n),f=BS(n);break;case"half-year":case"quarter":case"month":h=SN(t),p=PS(n),f=jS(n);break;case"week":case"half-week":case"day":h=CN(t),p=OS(n),f=GS(n),g=!0;break;case"half-day":case"quarter-day":case"hour":h=MN(t),p=RS(n),f=WS(n);break;case"minute":h=TN(t,!0),p=FS(n),f=HS(n);break;case"second":h=TN(t,!1),p=zS(n),f=US(n);break;case"millisecond":h=IN(t),p=VS(n),f=YS(n)}s(h,c,d,p,f,g,a),"year"===e&&o.length>1&&0===u&&o.unshift({value:o[0].value-h})}}for(u=0;u<a.length;u++)o.push(a[u]);return a}}for(var u=[],c=[],d=0,h=0,p=0;p<o.length&&a++<r;++p){var f=DS(o[p]);if(kS(o[p]))if(l(o[p],u[u.length-1]||[],c),f!==(o[p+1]?DS(o[p+1]):null)){if(c.length){h=d,c.sort(function(e,t){return e.value-t.value});for(var g=[],m=0;m<c.length;++m){var v=c[m].value;0!==m&&c[m-1].value===v||(g.push(c[m]),v>=i[0]&&v<=i[1]&&d++)}var y=(i[1]-i[0])/t;if(d>1.5*y&&h>y/1.5)break;if(u.push(g),d>y||e===o[p])break}c=[]}}"production"!==process.env.NODE_ENV&&a>=r&&Xv("Exceed safe limit.");var x=kh(Ih(u,function(e){return kh(e,function(e){return e.value>=i[0]&&e.value<=i[1]&&!e.notAdd})}),function(e){return e.length>0}),_=[],b=x.length-1;for(p=0;p<x.length;++p)for(var w=x[p],C=0;C<w.length;++C)_.push({value:w[C].value,level:b-p});_.sort(function(e,t){return e.value-t.value});var S=[];for(p=0;p<_.length;++p)0!==p&&_[p].value===_[p-1].value||S.push(_[p]);return S}(this._minLevelUnit,this._approxInterval,i,t);return(n=n.concat(r)).push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=_S,t[1]+=_S),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-_S}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var i=this._extent,r=i[1]-i[0];this._approxInterval=r/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=wN.length,a=Math.min(function(e,t,n,i){for(;n<i;){var r=n+i>>>1;e[r][1]<t?n=r+1:i=r}return n}(wN,this._approxInterval,0,o),o-1);this._interval=wN[a][1],this._minLevelUnit=wN[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Fh(e)?e:+Ov(e)},t.prototype.contain=function(e){return nN(this.parse(e),this._extent)},t.prototype.normalize=function(e){return iN(this.parse(e),this._extent)},t.prototype.scale=function(e){return rN(e,this._extent)},t.type="time",t}(sN),wN=[["second",vS],["minute",yS],["hour",xS],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",bS/2],["year",bS]];function CN(e,t){return(e/=_S)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function SN(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function MN(e){return(e/=xS)>12?12:e>6?6:e>3.5?4:e>2?2:1}function TN(e,t){return(e/=t?yS:vS)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function IN(e){return Fv(e)}function DN(e,t,n){var i=new Date(e);switch(DS(t)){case"year":case"month":i[jS(n)](0);case"day":i[GS(n)](1);case"hour":i[WS(n)](0);case"minute":i[HS(n)](0);case"second":i[US(n)](0),i[YS(n)](0)}return i.getTime()}ZE.registerClass(bN);var kN=ZE.prototype,AN=sN.prototype,EN=Mv,NN=Math.floor,LN=Math.ceil,PN=Math.pow,ON=Math.log,RN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new sN,t._interval=0,t}return Kd(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Ih(AN.getTicks.call(this,e),function(e){var t=e.value,r=Mv(PN(this.base,t));return r=t===n[0]&&this._fixMin?zN(r,i[0]):r,{value:r=t===n[1]&&this._fixMax?zN(r,i[1]):r}},this)},t.prototype.setExtent=function(e,t){var n=ON(this.base);e=ON(Math.max(0,e))/n,t=ON(Math.max(0,t))/n,AN.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=kN.getExtent.call(this);t[0]=PN(e,t[0]),t[1]=PN(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=zN(t[0],n[0])),this._fixMax&&(t[1]=zN(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=ON(e[0])/ON(t),e[1]=ON(e[1])/ON(t),kN.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var i,r=(i=n,Math.pow(10,Rv(i)));for(e/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var o=[Mv(LN(t[0]/r)*r),Mv(NN(t[1]/r)*r)];this._interval=r,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){AN.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return nN(e=ON(e)/ON(this.base),this._extent)},t.prototype.normalize=function(e){return iN(e=ON(e)/ON(this.base),this._extent)},t.prototype.scale=function(e){return e=rN(e,this._extent),PN(this.base,e)},t.type="log",t}(ZE),FN=RN.prototype;function zN(e,t){return EN(e,Iv(t))}FN.getMinorTicks=AN.getMinorTicks,FN.getLabel=AN.getLabel,ZE.registerClass(RN);var VN=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var r=t.get("min",!0);null==r&&(r=t.get("startValue",!0));var o=this._modelMinRaw=r;Ph(o)?this._modelMinNum=WN(e,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=WN(e,o));var a=this._modelMaxRaw=t.get("max",!0);if(Ph(a)?this._modelMaxNum=WN(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=WN(e,a)),i)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=Lh(s)?s:[s||0,s||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?(process.env.NODE_ENV,this._boundaryGapInner=[0,0]):this._boundaryGapInner=[rv(l[0],1),rv(l[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,i=this._axisDataLen,r=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=e?i?0:NaN:t-r[0]*o),null==s&&(s=e?i?i-1:NaN:n+r[1]*o),(null==a||!isFinite(a))&&(a=NaN),(null==s||!isFinite(s))&&(s=NaN);var c=Hh(a)||Hh(s)||e&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){"production"!==process.env.NODE_ENV&&$h(!this.frozen),this[jN[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=BN[e];"production"!==process.env.NODE_ENV&&$h(!this.frozen&&null==this[n]),this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),BN={min:"_determinedMin",max:"_determinedMax"},jN={min:"_dataMin",max:"_dataMax"};function GN(e,t,n){var i=e.rawExtentInfo;return i||(i=new VN(e,t,n),e.rawExtentInfo=i,i)}function WN(e,t){return null==t?null:Hh(t)?NaN:e.parse(t)}function HN(e,t){var n=e.type,i=GN(e,t,e.getExtent()).calculate();e.setBlank(i.isBlank);var r=i.min,o=i.max,a=t.ecModel;if(a&&"time"===n){var s=fN("bar",a),l=!1;if(Th(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u=gN(s),c=function(e,t,n,i){var r=n.axis.getExtent(),o=Math.abs(r[1]-r[0]),a=function(e,t){if(e&&t)return e[pN(t)]}(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;Th(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;Th(a,function(e){l=Math.max(e.offset+e.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/o)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(r,o,t,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function UN(e,t){var n=t,i=HN(e,n),r=i.extent,o=n.get("splitNumber");e instanceof RN&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(r[0],r[1]),e.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function YN(e,t){if(t=t||e.get("type"))switch(t){case"category":return new oN({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new bN({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(ZE.getClass(t)||sN)}}function ZN(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(t){return function(n,i){return e.scale.getFormattedLabel(n,i,t)}}(t):Oh(t)?function(t){return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")}}(t):Ph(t)?function(t){return function(i,r){return null!=n&&(r=i.value-n),t(XN(e,i),r,null!=i.level?{level:i.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function XN(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function qN(e,t){var n=t*Math.PI/180,i=e.width,r=e.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new xf(e.x,e.y,o,a)}function $N(e){var t=e.get("interval");return null==t?"auto":t}function KN(e){return"category"===e.type&&0===$N(e.getLabelModel())}function JN(e,t){var n={};return Th(e.mapDimensionsAll(t),function(t){n[UE(e,t)]=!0}),Ah(n)}var QN=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}();function eL(e,t){return Math.abs(e-t)<1e-8}function tL(e,t,n){var i=0,r=e[0];if(!r)return!1;for(var o=1;o<e.length;o++){var a=e[o];i+=Jx(r[0],r[1],a[0],a[1],t,n),r=a}var s=e[0];return eL(r[0],s[0])&&eL(r[1],s[1])||(i+=Jx(r[0],r[1],s[0],s[1],t,n)),0!==i}var nL=[];function iL(e,t){for(var n=0;n<e.length;n++)Mp(e[n],e[n],t)}function rL(e,t,n,i){for(var r=0;r<e.length;r++){var o=e[r];i&&(o=i.project(o)),o&&isFinite(o[0])&&isFinite(o[1])&&(Tp(t,t,o),Ip(n,n,o))}}var oL=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},e}(),aL=function(){return function(e,t){this.type="polygon",this.exterior=e,this.interiors=t}}(),sL=function(){return function(e){this.type="linestring",this.points=e}}(),lL=function(e){function t(t,n,i){var r=e.call(this,t)||this;return r.type="geoJSON",r.geometries=n,r._center=i&&[i[0],i[1]],r}return Kd(t,e),t.prototype.calcCenter=function(){for(var e,t=this.geometries,n=0,i=0;i<t.length;i++){var r=t[i],o=r.exterior,a=o&&o.length;a>n&&(e=r,n=a)}if(e)return function(e){for(var t=0,n=0,i=0,r=e.length,o=e[r-1][0],a=e[r-1][1],s=0;s<r;s++){var l=e[s][0],u=e[s][1],c=o*u-l*a;t+=c,n+=(o+l)*c,i+=(a+u)*c,o=l,a=u}return t?[n/t/3,i/t/3,t]:[e[0][0]||0,e[0][1]||0]}(e.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],i=[-1/0,-1/0];return Th(this.geometries,function(t){"polygon"===t.type?rL(t.exterior,n,i,e):Th(t.points,function(t){rL(t,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),t=new xf(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,r=n.length;i<r;i++){var o=n[i];if("polygon"===o.type){var a=o.exterior,s=o.interiors;if(tL(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(tL(s[l],e[0],e[1]))continue e;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,i){var r=this.getBoundingRect(),o=r.width/r.height;n?i||(i=n/o):n=o*i;for(var a=new xf(e,t,n,i),s=r.calculateTransform(a),l=this.geometries,u=0;u<l.length;u++){var c=l[u];"polygon"===c.type?(iL(c.exterior,s),Th(c.interiors,function(e){iL(e,s)})):Th(c.points,function(e){iL(e,s)})}(r=this._rect).copy(a),this._center=[r.x+r.width/2,r.y+r.height/2]},t.prototype.cloneShallow=function(e){null==e&&(e=this.name);var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(oL),uL=function(e){function t(t,n){var i=e.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return Kd(t,e),t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],i=nf(nL),r=e;r&&!r.isGeoSVGGraphicRoot;)of(i,r.getLocalTransform(),i),r=r.parent;return uf(i,i),Mp(n,n,i),n},t}(oL);function cL(e,t,n){for(var i=0;i<e.length;i++)e[i]=dL(e[i],t[i],n)}function dL(e,t,n){for(var i=[],r=t[0],o=t[1],a=0;a<e.length;a+=2){var s=e.charCodeAt(a)-64,l=e.charCodeAt(a+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function hL(e,t){return Ih(kh((e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;return null==n&&(n=1024),Th(t.features,function(e){var t=e.geometry,i=t.encodeOffsets,r=t.coordinates;if(i)switch(t.type){case"LineString":t.coordinates=dL(r,i,n);break;case"Polygon":case"MultiLineString":cL(r,i,n);break;case"MultiPolygon":Th(r,function(e,t){return cL(e,i[t],n)})}}),t.UTF8Encoding=!1,t}(e)).features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,i=e.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new aL(o[0],o.slice(1)));break;case"MultiPolygon":Th(i.coordinates,function(e){e[0]&&r.push(new aL(e[0],e.slice(1)))});break;case"LineString":r.push(new sL([i.coordinates]));break;case"MultiLineString":r.push(new sL(i.coordinates))}var a=new lL(n[t||"name"],r,n.cp);return a.properties=n,a})}var pL=vy();function fL(e,t){var n=Ih(t,function(t){return e.scale.parse(t)});return"time"===e.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function gL(e){var t=e.getLabelModel().get("customValues");if(t){var n=ZN(e),i=e.scale.getExtent();return{labels:Ih(kh(fL(e,t),function(e){return e>=i[0]&&e<=i[1]}),function(t){var i={value:t};return{formattedLabel:n(i),rawLabel:e.scale.getLabel(i),tickValue:t}})}}return"category"===e.type?function(e){var t=e.getLabelModel(),n=vL(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=ZN(e);return{labels:Ih(t,function(t,i){return{level:t.level,formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t.value}})}}(e)}function mL(e,t){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent();return{ticks:kh(fL(e,n),function(e){return e>=i[0]&&e<=i[1]})}}return"category"===e.type?function(e,t){var n,i,r=yL(e,"ticks"),o=$N(t),a=xL(r,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ph(o))n=wL(e,o,!0);else if("auto"===o){var s=vL(e,e.getLabelModel());i=s.labelCategoryInterval,n=Ih(s.labels,function(e){return e.tickValue})}else n=bL(e,i=o,!0);return _L(r,o,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:Ih(e.scale.getTicks(),function(e){return e.value})}}function vL(e,t){var n,i,r=yL(e,"labels"),o=$N(t),a=xL(r,o);return a||(Ph(o)?n=wL(e,o):(i="auto"===o?function(e){var t=pL(e).autoInterval;return null!=t?t:pL(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=bL(e,i)),_L(r,o,{labels:n,labelCategoryInterval:i}))}function yL(e,t){return pL(e)[t]||(pL(e)[t]=[])}function xL(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function _L(e,t,n){return e.push({key:t,value:n}),n}function bL(e,t,n){var i=ZN(e),r=e.scale,o=r.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=r.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=KN(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(e){var t={value:e};s.push(n?e:{formattedLabel:i(t),rawLabel:r.getLabel(t),tickValue:e})}return p&&f-l!==o[1]&&g(o[1]),s}function wL(e,t,n){var i=e.scale,r=ZN(e),o=[];return Th(i.getTicks(),function(e){var a=i.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:r(e),rawLabel:a,tickValue:s})}),o}var CL=[0,1],SL=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return kv(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&ML(n=n.slice(),i.count()),Cv(e,CL,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&ML(n=n.slice(),i.count());var r=Cv(e,n,CL,t);return this.scale.scale(r)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=Ih(mL(this,t).ticks,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return function(e,t,n,i){var r=t.length;if(!e.onBand||n||!r)return;var o,a,s=e.getExtent();if(1===r)t[0].coord=s[0],o=t[1]={coord:s[1],tickValue:t[0].tickValue};else{var l=t[r-1].tickValue-t[0].tickValue,u=(t[r-1].coord-t[0].coord)/l;Th(t,function(e){e.coord-=u/2});var c=e.scale.getExtent();a=1+c[1]-t[r-1].tickValue,o={coord:t[r-1].coord+u*a,tickValue:c[1]+1},t.push(o)}var d=s[0]>s[1];h(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift());i&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]});h(s[1],o.coord)&&(i?o.coord=s[1]:t.pop());i&&h(o.coord,s[1])&&t.push({coord:s[1]});function h(e,t){return e=Mv(e),t=Mv(t),d?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},e.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return e>0&&e<100||(e=5),Ih(this.scale.getMinorTicks(e),function(e){return Ih(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){return gL(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=ZN(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,r=e.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),d=Math.abs(u*Math.sin(i)),h=0,p=0;l<=o[1];l+=s){var f,g,m=ev(n({value:l}),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,h=Math.max(h,f,7),p=Math.max(p,g,7)}var v=h/c,y=p/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=pL(e.model),b=e.getExtent(),w=_.lastAutoInterval,C=_.lastTickCount;return null!=w&&null!=C&&Math.abs(w-x)<=1&&Math.abs(C-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},e}();function ML(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var TL=2*Math.PI,IL=Hx.CMD,DL=["top","right","bottom","left"];function kL(e,t,n,i,r){var o=n.width,a=n.height;switch(e){case"top":i.set(n.x+o/2,n.y-t),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+t),r.set(0,1);break;case"left":i.set(n.x-t,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+t,n.y+a/2),r.set(1,0)}}function AL(e,t,n,i,r,o,a,s,l){a-=e,s-=t;var u=Math.sqrt(a*a+s*s),c=(a/=u)*n+e,d=(s/=u)*n+t;if(Math.abs(i-r)%TL<1e-4)return l[0]=c,l[1]=d,u-n;if(o){var h=i;i=qx(r),r=qx(h)}else i=qx(i),r=qx(r);i>r&&(r+=TL);var p=Math.atan2(s,a);if(p<0&&(p+=TL),p>=i&&p<=r||p+TL>=i&&p+TL<=r)return l[0]=c,l[1]=d,u-n;var f=n*Math.cos(i)+e,g=n*Math.sin(i)+t,m=n*Math.cos(r)+e,v=n*Math.sin(r)+t,y=(f-a)*(f-a)+(g-s)*(g-s),x=(m-a)*(m-a)+(v-s)*(v-s);return y<x?(l[0]=f,l[1]=g,Math.sqrt(y)):(l[0]=m,l[1]=v,Math.sqrt(x))}function EL(e,t,n,i,r,o,a,s){var l=r-e,u=o-t,c=n-e,d=i-t,h=Math.sqrt(c*c+d*d),p=(l*(c/=h)+u*(d/=h))/h;s&&(p=Math.min(Math.max(p,0),1)),p*=h;var f=a[0]=e+p*c,g=a[1]=t+p*d;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function NL(e,t,n,i,r,o,a){n<0&&(e+=n,n=-n),i<0&&(t+=i,i=-i);var s=e+n,l=t+i,u=a[0]=Math.min(Math.max(r,e),s),c=a[1]=Math.min(Math.max(o,t),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var LL=[];function PL(e,t,n){var i=NL(t.x,t.y,t.width,t.height,e.x,e.y,LL);return n.set(LL[0],LL[1]),i}function OL(e,t,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=t.data,d=e.x,h=e.y,p=0;p<c.length;){var f=c[p++];1===p&&(s=o=c[p],l=a=c[p+1]);var g=u;switch(f){case IL.M:o=s=c[p++],a=l=c[p++];break;case IL.L:g=EL(o,a,c[p],c[p+1],d,h,LL,!0),o=c[p++],a=c[p++];break;case IL.C:g=rg(o,a,c[p++],c[p++],c[p++],c[p++],c[p],c[p+1],d,h,LL),o=c[p++],a=c[p++];break;case IL.Q:g=cg(o,a,c[p++],c[p++],c[p],c[p+1],d,h,LL),o=c[p++],a=c[p++];break;case IL.A:var m=c[p++],v=c[p++],y=c[p++],x=c[p++],_=c[p++],b=c[p++];p+=1;var w=!!(1-c[p++]);i=Math.cos(_)*y+m,r=Math.sin(_)*x+v,p<=1&&(s=i,l=r),g=AL(m,v,x,_,_+b,w,(d-m)*x/y+m,h,LL),o=Math.cos(_+b)*y+m,a=Math.sin(_+b)*x+v;break;case IL.R:g=NL(s=o=c[p++],l=a=c[p++],c[p++],c[p++],d,h,LL);break;case IL.Z:g=EL(o,a,s,l,d,h,LL,!0),o=s,a=l}g<u&&(u=g,n.set(LL[0],LL[1]))}return u}var RL=new cf,FL=new cf,zL=new cf,VL=new cf,BL=new cf;function jL(e,t){if(e){var n=e.getTextGuideLine(),i=e.getTextContent();if(i&&n){var r=e.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||DL,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,c=e.getComputedTransform(),d=c&&uf([],c),h=t.get("length2")||0;u&&zL.copy(u);for(var p=0;p<a.length;p++){kL(a[p],0,s,RL,VL),cf.scaleAndAdd(FL,RL,VL,h),FL.transform(d);var f=e.getBoundingRect(),g=u?u.distance(FL):e instanceof d_?OL(FL,e.path,zL):PL(FL,f,zL);g<l&&(l=g,FL.transform(c),zL.transform(c),zL.toArray(o[0]),FL.toArray(o[1]),RL.toArray(o[2]))}HL(o,t.get("minTurnAngle")),n.setShape({points:o})}}}var GL=[],WL=new cf;function HL(e,t){if(t<=180&&t>0){t=t/180*Math.PI,RL.fromArray(e[0]),FL.fromArray(e[1]),zL.fromArray(e[2]),cf.sub(VL,RL,FL),cf.sub(BL,zL,FL);var n=VL.len(),i=BL.len();if(!(n<.001||i<.001)){VL.scale(1/n),BL.scale(1/i);var r=VL.dot(BL);if(Math.cos(t)<r){var o=EL(FL.x,FL.y,zL.x,zL.y,RL.x,RL.y,GL,!1);WL.fromArray(GL),WL.scaleAndAdd(BL,o/Math.tan(Math.PI-t));var a=zL.x!==FL.x?(WL.x-FL.x)/(zL.x-FL.x):(WL.y-FL.y)/(zL.y-FL.y);if(isNaN(a))return;a<0?cf.copy(WL,FL):a>1&&cf.copy(WL,zL),WL.toArray(e[1])}}}}function UL(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,RL.fromArray(e[0]),FL.fromArray(e[1]),zL.fromArray(e[2]),cf.sub(VL,FL,RL),cf.sub(BL,zL,FL);var i=VL.len(),r=BL.len();if(!(i<.001||r<.001))if(VL.scale(1/i),BL.scale(1/r),VL.dot(t)<Math.cos(n)){var o=EL(FL.x,FL.y,zL.x,zL.y,RL.x,RL.y,GL,!1);WL.fromArray(GL);var a=Math.PI/2,s=a+Math.acos(BL.dot(t))-n;if(s>=a)cf.copy(WL,zL);else{WL.scaleAndAdd(BL,o/Math.tan(Math.PI/2-s));var l=zL.x!==FL.x?(WL.x-FL.x)/(zL.x-FL.x):(WL.y-FL.y)/(zL.y-FL.y);if(isNaN(l))return;l<0?cf.copy(WL,FL):l>1&&cf.copy(WL,zL)}WL.toArray(e[1])}}}function YL(e,t,n,i){var r="normal"===n,o=r?e:e.ensureState(n);o.ignore=t;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?e.useStyle(s):o.style=s}function ZL(e,t){var n=t.smooth,i=t.points;if(i)if(e.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=wp(i[0],i[1]),o=wp(i[1],i[2]);if(!r||!o)return e.lineTo(i[1][0],i[1][1]),void e.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Sp([],i[1],i[0],a/r),l=Sp([],i[1],i[2],a/o),u=Sp([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c<i.length;c++)e.lineTo(i[c][0],i[c][1])}function XL(e,t,n){var i=e.getTextGuideLine(),r=e.getTextContent();if(r){for(var o=t.normal,a=o.get("show"),s=r.ignore,l=0;l<Y_.length;l++){var u=Y_[l],c=t[u],d="normal"===u;if(c){var h=c.get("show");if((d?s:Yh(r.states[u]&&r.states[u].ignore,s))||!Yh(h,a)){var p=d?i:i&&i.states[u];p&&(p.ignore=!0),i&&YL(i,!0,u,c);continue}i||(i=new Dw,e.setTextGuideLine(i),d||!s&&a||YL(i,!0,"normal",t.normal),e.stateProxy&&(i.stateProxy=e.stateProxy)),YL(i,!1,u,c)}}if(i){wh(i.style,n),i.style.fill=null;var f=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,i.buildPath=ZL}}else i&&e.removeTextGuideLine()}function qL(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},i=0;i<U_.length;i++){var r=U_[i];n[r]=e.getModel([r,t])}return n}function $L(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];if(!i.defaultAttr.ignore){var r=i.label,o=r.getComputedTransform(),a=r.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=r.style.margin||0,u=a.clone();u.applyTransform(o),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new Yw(a,o):null;t.push({label:r,labelLine:i.labelLine,rect:u,localRect:a,obb:c,priority:i.priority,defaultAttr:i.defaultAttr,layoutOption:i.computedLayoutOption,axisAligned:s,transform:o})}}return t}function KL(e,t,n,i,r,o){var a=e.length;if(!(a<2)){e.sort(function(e,n){return e.rect[t]-n.rect[t]});for(var s,l=0,u=!1,c=0;c<a;c++){var d=e[c],h=d.rect;(s=h[t]-l)<0&&(h[t]-=s,d.label[t]-=s,u=!0),l=h[t]+h[n]}var p,f,g=e[0],m=e[a-1];return v(),p<0&&_(-p,.8),f<0&&_(f,.8),v(),y(p,f,1),y(f,p,-1),v(),p<0&&b(-p),f<0&&b(f),u}function v(){p=g.rect[t]-i,f=r-m.rect[t]-m.rect[n]}function y(e,t,n){if(e<0){var i=Math.min(t,-e);if(i>0){x(i*n,0,a);var r=i+e;r<0&&_(-r*n,1)}else _(-e*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o<r;o++){var a=e[o];a.rect[t]+=n,a.label[t]+=n}}function _(i,r){for(var o=[],s=0,l=1;l<a;l++){var u=e[l-1].rect,c=Math.max(e[l].rect[t]-u[t]-u[n],0);o.push(c),s+=c}if(s){var d=Math.min(Math.abs(i)/s,r);if(i>0)for(l=0;l<a-1;l++){x(o[l]*d,0,l+1)}else for(l=a-1;l>0;l--){x(-(o[l-1]*d),l,a)}}}function b(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),i=0;i<a-1;i++)if(t>0?x(n,0,i+1):x(-n,a-i-1,a),(e-=n)<=0)return}}function JL(e,t,n,i){return KL(e,"y","height",t,n)}function QL(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new xf(0,0,0,0);function i(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var r=0;r<e.length;r++){var o=e[r],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,c=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=o.obb,h=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)){if(a&&f.axisAligned){h=!0;break}if(f.obb||(f.obb=new Yw(f.localRect,f.transform)),d||(d=new Yw(s,l)),d.intersect(f.obb)){h=!0;break}}}h?(i(u),c&&i(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}function eP(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function tP(e,t){var n=e.label,i=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:eP(i&&i.shape.points)}}var nP=["align","verticalAlign","width","height","fontSize"],iP=new Xm,rP=vy(),oP=vy();function aP(e,t,n){for(var i=0;i<n.length;i++){var r=n[i];null!=t[r]&&(e[r]=t[r])}}var sP=["x","y","rotation"],lP=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,i,r){var o=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();xf.applyTransform(l,l,s),s?iP.setLocalTransform(s):(iP.x=iP.y=iP.rotation=iP.originX=iP.originY=0,iP.scaleX=iP.scaleY=1),iP.rotation=qx(iP.rotation);var u,c=i.__hostTarget;if(c){u=c.getBoundingRect().plain();var d=c.getComputedTransform();xf.applyTransform(u,u,d)}var h=u&&c.getTextGuideLine();this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:e,dataType:t,layoutOption:r,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:iP.x,y:iP.y,scaleX:iP.scaleX,scaleY:iP.scaleY,rotation:iP.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(Ph(i)||Ah(i).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var r=e.getTextContent(),o=V_(e);r&&!r.disableLabelLayout&&t._addLabel(o.dataIndex,o.dataType,n,r,i)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function i(e,t){return function(){jL(e,t)}}for(var r=0;r<this._labelList.length;r++){var o=this._labelList[r],a=o.label,s=a.__hostTarget,l=o.defaultAttr,u=void 0;u=(u=Ph(o.layoutOption)?o.layoutOption(tP(o,s)):o.layoutOption)||{},o.computedLayoutOption=u;var c=Math.PI/180;s&&s.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:l.attachedPos,rotation:null!=u.rotate?u.rotate*c:l.attachedRot,offset:[u.dx||0,u.dy||0]});var d=!1;if(null!=u.x?(a.x=Sv(u.x,t),a.setStyle("x",0),d=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=Sv(u.y,n),a.setStyle("y",0),d=!0):(a.y=l.y,a.setStyle("y",l.style.y)),u.labelLinePoints){var h=s.getTextGuideLine();h&&(h.setShape({points:u.labelLinePoints}),d=!1)}rP(a).needsUpdateLabelLine=d,a.rotation=null!=u.rotate?u.rotate*c:l.rotation,a.scaleX=l.scaleX,a.scaleY=l.scaleY;for(var p=0;p<nP.length;p++){var f=nP[p];a.setStyle(f,null!=u[f]?u[f]:l.style[f])}if(u.draggable){if(a.draggable=!0,a.cursor="move",s){var g=o.seriesModel;if(null!=o.dataIndex)g=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex);a.on("drag",i(s,g.getModel("labelLine")))}}else a.off("drag"),a.cursor=l.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),i=$L(this._labelList),r=kh(i,function(e){return"shiftX"===e.layoutOption.moveOverlap}),o=kh(i,function(e){return"shiftY"===e.layoutOption.moveOverlap});KL(r,"x","width",0,t),JL(o,0,n),QL(kh(i,function(e){return e.layoutOption.hideOverlap}))},e.prototype.processLabelsOverall=function(){var e=this;Th(this._chartViewList,function(t){var n=t.__model,i=t.ignoreLabelLineUpdate,r=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var o=!i,a=t.getTextContent();!o&&a&&(o=rP(a).needsUpdateLabelLine),o&&e._updateLabelLine(t,n),r&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),i=V_(e),r=i.dataIndex;if(n&&null!=r){var o=t.getData(i.dataType),a=o.getItemModel(r),s={},l=o.getItemVisual(r,"style");if(l){var u=o.getVisual("drawType");s.stroke=l[u]}var c=a.getModel("labelLine");XL(e,qL(a),s),jL(e,c)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!eC(e))){var r=(p=rP(n)).oldLayout,o=V_(e),a=o.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(o.dataType);if(r){n.attr(r);var u=e.prevStates;u&&(Ch(u,"select")>=0&&n.attr(p.oldLayoutSelect),Ch(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),Jw(n,s,t,a)}else if(n.attr(s),!HC(n).valueAnimation){var c=Yh(n.style.opacity,1);n.style.opacity=0,Qw(n,{style:{opacity:c}},t,a)}if(p.oldLayout=s,n.states.select){var d=p.oldLayoutSelect={};aP(d,s,sP),aP(d,n.states.select,sP)}if(n.states.emphasis){var h=p.oldLayoutEmphasis={};aP(h,s,sP),aP(h,n.states.emphasis,sP)}YC(n,a,l,t,t)}if(i&&!i.ignore&&!i.invisible){r=(p=oP(i)).oldLayout;var p,f={points:i.shape.points};r?(i.attr({shape:r}),Jw(i,{shape:f},t)):(i.setShape(f),i.style.strokePercent=0,Qw(i,{style:{strokePercent:1}},t)),p.oldLayout=f}},e}(),uP=vy();var cP=Math.sin,dP=Math.cos,hP=Math.PI,pP=2*Math.PI,fP=180/hP,gP=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},e.prototype.moveTo=function(e,t){this._add("M",e,t)},e.prototype.lineTo=function(e,t){this._add("L",e,t)},e.prototype.bezierCurveTo=function(e,t,n,i,r,o){this._add("C",e,t,n,i,r,o)},e.prototype.quadraticCurveTo=function(e,t,n,i){this._add("Q",e,t,n,i)},e.prototype.arc=function(e,t,n,i,r,o){this.ellipse(e,t,n,n,0,i,r,o)},e.prototype.ellipse=function(e,t,n,i,r,o,a,s){var l=a-o,u=!s,c=Math.abs(l),d=Wg(c-pP)||(u?l>=pP:-l>=pP),h=l>0?l%pP:l%pP+pP,p=!1;p=!!d||!Wg(c)&&h>=hP==!!u;var f=e+n*dP(o),g=t+i*cP(o);this._start&&this._add("M",f,g);var m=Math.round(r*fP);if(d){var v=1/this._p,y=(u?1:-1)*(pP-v);this._add("A",n,i,m,1,+u,e+n*dP(o+y),t+i*cP(o+y)),v>.01&&this._add("A",n,i,m,0,+u,f,g)}else{var x=e+n*dP(a),_=t+i*cP(a);this._add("A",n,i,m,+p,+u,x,_)}},e.prototype.rect=function(e,t,n,i){this._add("M",e,t),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},e.prototype.closePath=function(){this._d.length>0&&this._add("Z")},e.prototype._add=function(e,t,n,i,r,o,a,s,l){for(var u=[],c=this._p,d=1;d<arguments.length;d++){var h=arguments[d];if(isNaN(h))return void(this._invalid=!0);u.push(Math.round(h*c)/c)}this._d.push(e+u.join(" ")),this._start="Z"===e},e.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),mP="none",vP=Math.round;var yP=["lineCap","miterLimit","lineJoin"],xP=Ih(yP,function(e){return"stroke-"+e.toLowerCase()});function _P(e,t,n,i){var r=null==t.opacity?1:t.opacity;if(n instanceof m_)e("opacity",r);else{if(function(e){var t=e.fill;return null!=t&&t!==mP}(t)){var o=jg(t.fill);e("fill",o.color);var a=null!=t.fillOpacity?t.fillOpacity*o.opacity*r:o.opacity*r;a<1&&e("fill-opacity",a)}else e("fill",mP);if(function(e){var t=e.stroke;return null!=t&&t!==mP}(t)){var s=jg(t.stroke);e("stroke",s.color);var l=t.strokeNoScale?n.getLineScale():1,u=l?(t.lineWidth||0)/l:0,c=null!=t.strokeOpacity?t.strokeOpacity*s.opacity*r:s.opacity*r,d=t.strokeFirst;if(1!==u&&e("stroke-width",u),d&&e("paint-order",d?"stroke":"fill"),c<1&&e("stroke-opacity",c),t.lineDash){var h=Lk(n),p=h[0],f=h[1];p&&(f=vP(f||0),e("stroke-dasharray",p.join(",")),(f||i)&&e("stroke-dashoffset",f))}for(var g=0;g<yP.length;g++){var m=yP[g];if(t[m]!==l_[m]){var v=t[m]||l_[m];v&&e(xP[g],v)}}}}}var bP="http://www.w3.org/2000/svg",wP="http://www.w3.org/1999/xlink",CP="ecmeta_";function SP(e){return document.createElementNS(bP,e)}function MP(e,t,n,i,r){return{tag:e,attrs:n||{},children:i,text:r,key:t}}function TP(e,t){var n=(t=t||{}).newline?"\n":"";return function e(t){var i=t.children,r=t.tag,o=t.attrs,a=t.text;return function(e,t){var n=[];if(t)for(var i in t){var r=t[i],o=i;!1!==r&&(!0!==r&&null!=r&&(o+='="'+r+'"'),n.push(o))}return"<"+e+" "+n.join(" ")+">"}(r,o)+("style"!==r?Bp(a):a||"")+(i?""+n+Ih(i,function(t){return e(t)}).join(n)+n:"")+("</"+r+">")}(e)}function IP(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function DP(e,t,n,i){return MP("svg","root",{width:e,height:t,xmlns:bP,"xmlns:xlink":wP,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+e+" "+t},n)}var kP=0;function AP(){return kP++}var EP={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},NP="transform-origin";function LP(e,t,n){var i=bh({},e.shape);bh(i,t),e.buildPath(n,i);var r=new gP;return r.reset(Qg(e)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function PP(e,t){var n=t.originX,i=t.originY;(n||i)&&(e[NP]=n+"px "+i+"px")}var OP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function RP(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function FP(e){return Oh(e)?EP[e]?"cubic-bezier("+EP[e]+")":pg(e)?e:"":""}function zP(e,t,n,i){var r=e.animators,o=r.length,a=[];if(e instanceof zw){var s=function(e,t,n){var i,r,o=e.shape.paths,a={};if(Th(o,function(e){var t=IP(n.zrId);t.animation=!0,zP(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=Ah(o),u=l.length;if(u){var c=o[r=l[u-1]];for(var d in c){var h=c[d];a[d]=a[d]||{d:""},a[d].d+=h.d||""}for(var p in s){var f=s[p].animation;f.indexOf(r)>=0&&(i=f)}}}),i){t.d=!1;var s=RP(a,n);return i.replace(r,s)}}(e,t,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u<o;u++){var c=r[u],d=[c.getMaxTime()/1e3+"s"],h=FP(c.getClip().easing),p=c.getDelay();h?d.push(h):d.push("linear"),p&&d.push(p/1e3+"s"),c.getLoop()&&d.push("infinite");var f=d.join(" ");l[f]=l[f]||[f,[]],l[f][1].push(c)}function g(r){var o,a=r[1],s=a.length,l={},u={},c={},d="animation-timing-function";function h(e,t,n){for(var i=e.getTracks(),r=e.getMaxTime(),o=0;o<i.length;o++){var a=i[o];if(a.needsAnimate()){var s=a.keyframes,l=a.propName;if(n&&(l=n(l)),l)for(var u=0;u<s.length;u++){var c=s[u],h=Math.round(c.time/r*100)+"%",p=FP(c.easing),f=c.rawValue;(Oh(f)||Fh(f))&&(t[h]=t[h]||{},t[h][l]=c.rawValue,p&&(t[h][d]=p))}}}}for(var p=0;p<s;p++){(C=(w=a[p]).targetName)?"shape"===C&&h(w,u):!i&&h(w,l)}for(var f in l){var g={};$m(g,e),bh(g,l[f]);var m=em(g),v=l[f][d];c[f]=m?{transform:m}:{},PP(c[f],g),v&&(c[f][d]=v)}var y=!0;for(var f in u){c[f]=c[f]||{};var x=!o;v=u[f][d];x&&(o=new Hx);var _=o.len();o.reset(),c[f].d=LP(e,u[f],o);var b=o.len();if(!x&&_!==b){y=!1;break}v&&(c[f][d]=v)}if(!y)for(var f in c)delete c[f].d;if(!i)for(p=0;p<s;p++){var w,C;"style"===(C=(w=a[p]).targetName)&&h(w,c,function(e){return OP[e]})}var S,M=Ah(c),T=!0;for(p=1;p<M.length;p++){var I=M[p-1],D=M[p];if(c[I][NP]!==c[D][NP]){T=!1;break}S=c[I][NP]}if(T&&S){for(var f in c)c[f][NP]&&delete c[f][NP];t[NP]=S}if(kh(M,function(e){return Ah(c[e]).length>0}).length)return RP(c,n)+" "+r[0]+" both"}for(var m in l){(s=g(l[m]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+AP();n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}function VP(e,t,n,i){var r=JSON.stringify(e),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+AP(),n.cssStyleCache[r]=o,n.cssNodes["."+o+":hover"]=e),t.class=t.class?t.class+" "+o:o}var BP=Math.round;function jP(e){return e&&Oh(e.src)}function GP(e){return e&&Ph(e.toDataURL)}function WP(e,t,n,i){_P(function(r,o){var a="fill"===r||"stroke"===r;a&&Kg(o)?eO(t,e,r,i):a&&Xg(o)?tO(n,e,r,i):e[r]=o,a&&i.ssr&&"none"===o&&(e["pointer-events"]="visible")},t,n,!1),function(e,t,n){var i=e.style;if(function(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}(i)){var r=function(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),o=n.shadowCache,a=o[r];if(!a){var s=e.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=i.shadowOffsetX||0,d=i.shadowOffsetY||0,h=i.shadowBlur,p=jg(i.shadowColor),f=p.opacity,g=p.color,m=h/2/l+" "+h/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=MP("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[MP("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[r]=a}t.filter=Jg(a)}}(n,e,i)}function HP(e,t){var n=function(e){if("function"==typeof xv)return xv(e)}(t);n&&(n.each(function(t,n){null!=t&&(e[(CP+n).toLowerCase()]=t+"")}),t.isSilent()&&(e[CP+"silent"]="true"))}function UP(e){return Wg(e[0]-1)&&Wg(e[1])&&Wg(e[2])&&Wg(e[3]-1)}function YP(e,t,n){if(t&&(!function(e){return Wg(e[4])&&Wg(e[5])}(t)||!UP(t))){var i=1e4;e.transform=UP(t)?"translate("+BP(t[4]*i)/i+" "+BP(t[5]*i)/i+")":function(e){return"matrix("+Hg(e[0])+","+Hg(e[1])+","+Hg(e[2])+","+Hg(e[3])+","+Ug(e[4])+","+Ug(e[5])+")"}(t)}}function ZP(e,t,n){for(var i=e.points,r=[],o=0;o<i.length;o++)r.push(BP(i[o][0]*n)/n),r.push(BP(i[o][1]*n)/n);t.points=r.join(" ")}function XP(e){return!e.smooth}var qP,$P,KP={circle:[(qP=["cx","cy","r"],$P=Ih(qP,function(e){return"string"==typeof e?[e,e]:e}),function(e,t,n){for(var i=0;i<$P.length;i++){var r=$P[i],o=e[r[0]];null!=o&&(t[r[1]]=BP(o*n)/n)}})],polyline:[ZP,XP],polygon:[ZP,XP]};function JP(e,t){var n=e.style,i=e.shape,r=KP[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&Qg(e)||4;if(!r||t.willUpdate||r[1]&&!r[1](i)||a&&function(e){for(var t=e.animators,n=0;n<t.length;n++)if("shape"===t[n].targetName)return!0;return!1}(e)||l<1){var c=!e.path||e.shapeChanged();e.path||e.createPathProxy();var d=e.path;c&&(d.beginPath(),e.buildPath(d,e.shape),e.pathUpdated());var h=d.getVersion(),p=e,f=p.__svgPathBuilder;p.__svgPathVersion===h&&f&&l===p.__svgPathStrokePercent||(f||(f=p.__svgPathBuilder=new gP),f.reset(u),d.rebuildPath(f,l),f.generateStr(),p.__svgPathVersion=h,p.__svgPathStrokePercent=l),o.d=f.getStr()}else{s=e.type;var g=Math.pow(10,u);r[0](i,o,g)}return YP(o,e.transform),WP(o,n,e,t),HP(o,e),t.animation&&zP(e,o,t),t.emphasis&&function(e,t,n){if(!e.ignore)if(e.isSilent())VP(u={"pointer-events":"none"},t,n);else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},r=i.fill;if(!r){var o=e.style&&e.style.fill,a=e.states.select&&e.states.select.style&&e.states.select.style.fill,s=e.currentStates.indexOf("select")>=0&&a||o;s&&(r=Vg(s))}var l=i.lineWidth;l&&(l/=!i.strokeNoScale&&e.transform?e.transform[0]:1);var u={cursor:"pointer"};r&&(u.fill=r),i.stroke&&(u.stroke=i.stroke),l&&(u["stroke-width"]=l),VP(u,t,n)}}(e,o,t),MP(s,e.id+"",o)}function QP(e,t){return e instanceof d_?JP(e,t):e instanceof m_?function(e,t){var n=e.style,i=n.image;if(i&&!Oh(i)&&(jP(i)?i=i.src:GP(i)&&(i=i.toDataURL())),i){var r=n.x||0,o=n.y||0,a={href:i,width:n.width,height:n.height};return r&&(a.x=r),o&&(a.y=o),YP(a,e.transform),WP(a,n,e,t),HP(a,e),t.animation&&zP(e,a,t),MP("image",e.id+"",a)}}(e,t):e instanceof p_?function(e,t){var n=e.style,i=n.text;if(null!=i&&(i+=""),i&&!isNaN(n.x)&&!isNaN(n.y)){var r=n.font||th,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,iv(r),n.textBaseline),s={"dominant-baseline":"central","text-anchor":Yg[n.textAlign]||n.textAlign};if(N_(n)){var l="",u=n.fontStyle,c=A_(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||eh,h=n.fontWeight;l+="font-size:"+c+";font-family:"+d+";",u&&"normal"!==u&&(l+="font-style:"+u+";"),h&&"normal"!==h&&(l+="font-weight:"+h+";"),s.style=l}else s.style="font: "+r;return i.match(/\s/)&&(s["xml:space"]="preserve"),o&&(s.x=o),a&&(s.y=a),YP(s,e.transform),WP(s,n,e,t),HP(s,e),t.animation&&zP(e,s,t),MP("text",e.id+"",s,void 0,i)}}(e,t):void 0}function eO(e,t,n,i){var r,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(qg(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!$g(o))return void("production"!==process.env.NODE_ENV&&vh("Illegal gradient type."));r="radialGradient",a.cx=Yh(o.x,.5),a.cy=Yh(o.y,.5),a.r=Yh(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Ug(s[u].offset)+"%",h=jg(s[u].color),p=h.color,f=h.opacity,g={offset:d};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),l.push(MP("stop",u+"",g))}var m=TP(MP(r,"",a,l)),v=i.gradientCache,y=v[m];y||(y=i.zrId+"-g"+i.gradientIdx++,v[m]=y,a.id=y,i.defs[y]=MP(r,y,a,l)),t[n]=Jg(y)}function tO(e,t,n,i){var r,o=e.style[n],a=e.getBoundingRect(),s={},l=o.repeat,u="no-repeat"===l,c="repeat-x"===l,d="repeat-y"===l;if(Zg(o)){var h=o.imageWidth,p=o.imageHeight,f=void 0,g=o.image;if(Oh(g)?f=g:jP(g)?f=g.src:GP(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";$h(h,m),$h(p,m)}else if(null==h||null==p){var v=function(e,t){if(e){var n=e.elm,i=h||t.width,r=p||t.height;"pattern"===e.tag&&(c?(r=1,i/=a.width):d&&(i=1,r/=a.height)),e.attrs.width=i,e.attrs.height=r,n&&(n.setAttribute("width",i),n.setAttribute("height",r))}},y=jy(f,null,e,function(e){u||v(w,e),v(r,e)});y&&y.width&&y.height&&(h=h||y.width,p=p||y.height)}r=MP("image","img",{href:f,width:h,height:p}),s.width=h,s.height=p}else o.svgElement&&(r=yh(o.svgElement),s.width=o.svgWidth,s.height=o.svgHeight);if(r){var x,_;u?x=_=1:c?(_=1,x=s.width/a.width):d?(x=1,_=s.height/a.height):s.patternUnits="userSpaceOnUse",null==x||isNaN(x)||(s.width=x),null==_||isNaN(_)||(s.height=_);var b=em(o);b&&(s.patternTransform=b);var w=MP("pattern","",s,[r]),C=TP(w),S=i.patternCache,M=S[C];M||(M=i.zrId+"-p"+i.patternIdx++,S[C]=M,s.id=M,w=i.defs[M]=MP("pattern",M,s,[r])),t[n]=Jg(M)}}function nO(e,t,n){var i=n.clipPathCache,r=n.defs,o=i[e.id];if(!o){var a={id:o=n.zrId+"-c"+n.clipPathIdx++};i[e.id]=o,r[o]=MP("clipPath",o,a,[JP(e,n)])}t["clip-path"]=Jg(o)}function iO(e){return document.createTextNode(e)}function rO(e,t,n){e.insertBefore(t,n)}function oO(e,t){e.removeChild(t)}function aO(e,t){e.appendChild(t)}function sO(e){return e.parentNode}function lO(e){return e.nextSibling}function uO(e,t){e.textContent=t}var cO=MP("","");function dO(e){return void 0===e}function hO(e){return void 0!==e}function pO(e,t,n){for(var i={},r=t;r<=n;++r){var o=e[r].key;void 0!==o&&("production"!==process.env.NODE_ENV&&i[o],i[o]=r)}return i}function fO(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function gO(e){var t,n=e.children,i=e.tag;if(hO(i)){var r=e.elm=SP(i);if(yO(cO,e),Lh(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&aO(r,gO(o))}else hO(e.text)&&!zh(e.text)&&aO(r,iO(e.text))}else e.elm=iO(e.text);return e.elm}function mO(e,t,n,i,r){for(;i<=r;++i){var o=n[i];null!=o&&rO(e,gO(o),t)}}function vO(e,t,n,i){for(;n<=i;++n){var r=t[n];if(null!=r)if(hO(r.tag))oO(sO(r.elm),r.elm);else oO(e,r.elm)}}function yO(e,t){var n,i=t.elm,r=e&&e.attrs||{},o=t.attrs||{};if(r!==o){for(n in o){var a=o[n];r[n]!==a&&(!0===a?i.setAttribute(n,""):!1===a?i.removeAttribute(n):"style"===n?i.style.cssText=a:120!==n.charCodeAt(0)?i.setAttribute(n,a):"xmlns:xlink"===n||"xmlns"===n?i.setAttributeNS("http://www.w3.org/2000/xmlns/",n,a):58===n.charCodeAt(3)?i.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,a):58===n.charCodeAt(5)?i.setAttributeNS(wP,n,a):i.setAttribute(n,a))}for(n in r)n in o||i.removeAttribute(n)}}function xO(e,t){var n=t.elm=e.elm,i=e.children,r=t.children;e!==t&&(yO(e,t),dO(t.text)?hO(i)&&hO(r)?i!==r&&function(e,t,n){for(var i,r,o,a=0,s=0,l=t.length-1,u=t[0],c=t[l],d=n.length-1,h=n[0],p=n[d];a<=l&&s<=d;)null==u?u=t[++a]:null==c?c=t[--l]:null==h?h=n[++s]:null==p?p=n[--d]:fO(u,h)?(xO(u,h),u=t[++a],h=n[++s]):fO(c,p)?(xO(c,p),c=t[--l],p=n[--d]):fO(u,p)?(xO(u,p),rO(e,u.elm,lO(c.elm)),u=t[++a],p=n[--d]):fO(c,h)?(xO(c,h),rO(e,c.elm,u.elm),c=t[--l],h=n[++s]):(dO(i)&&(i=pO(t,a,l)),dO(r=i[h.key])||(o=t[r]).tag!==h.tag?rO(e,gO(h),u.elm):(xO(o,h),t[r]=void 0,rO(e,o.elm,u.elm)),h=n[++s]);(a<=l||s<=d)&&(a>l?mO(e,null==n[d+1]?null:n[d+1].elm,n,s,d):vO(e,t,a,l))}(n,i,r):hO(r)?(hO(e.text)&&uO(n,""),mO(n,null,r,0,r.length-1)):hO(i)?vO(n,i,0,i.length-1):hO(e.text)&&uO(n,""):e.text!==t.text&&(hO(i)&&vO(n,i,0,i.length-1),uO(n,t.text)))}var _O=0,bO=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=wO("refreshHover"),this.configLayer=wO("configLayer"),this.storage=t,this._opts=n=bh({},n),this.root=e,this._id="zr"+_O++,this._oldVNode=DP(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=SP("svg");yO(null,this._oldVNode),i.appendChild(r),e.appendChild(i)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",function(e,t){if(fO(e,t))xO(e,t);else{var n=e.elm,i=sO(n);gO(t),null!==i&&(rO(i,t.elm,lO(n)),vO(i,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return QP(e,IP(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=IP(this._id);r.animation=e.animation,r.willUpdate=e.willUpdate,r.compress=e.compress,r.emphasis=e.emphasis,r.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(e,t,n,i){var r;if(n&&"none"!==n)if(r=MP("rect","bg",{width:e,height:t,x:"0",y:"0"}),Kg(n))eO({fill:n},r.attrs,"fill",i);else if(Xg(n))tO({style:{fill:n},dirty:up,getBoundingRect:function(){return{width:e,height:t}}},r.attrs,"fill",i);else{var o=jg(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=e.compress?null:this._mainVNode=MP("g","main",{},[]);this._paintList(t,r,s?s.children:o),s&&o.push(s);var l=Ih(Ah(r.defs),function(e){return r.defs[e]});if(l.length&&o.push(MP("defs","defs",{},l)),e.animation){var u=function(e,t,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=Ih(Ah(e),function(t){return t+r+Ih(Ah(e[t]),function(n){return n+":"+e[t][n]+";"}).join(i)+o}).join(i),s=Ih(Ah(t),function(e){return"@keyframes "+e+r+Ih(Ah(t[e]),function(n){return n+r+Ih(Ah(t[e][n]),function(i){var r=t[e][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"}).join(i)+o}).join(i)+o}).join(i);return a||s?["<![CDATA[",a,s,"]]>"].join(i):""}(r.cssNodes,r.cssAnims,{newline:!0});if(u){var c=MP("style","stl",{},[],u);o.push(c)}}return DP(n,i,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},TP(this.renderToVNode({animation:Yh(e.cssAnimation,!0),emphasis:Yh(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Yh(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var i,r,o=e.length,a=[],s=0,l=0,u=0;u<o;u++){var c=e[u];if(!c.invisible){var d=c.__clipPaths,h=d&&d.length||0,p=r&&r.length||0,f=void 0;for(f=Math.max(h-1,p-1);f>=0&&(!d||!r||d[f]!==r[f]);f--);for(var g=p-1;g>f;g--)i=a[--s-1];for(var m=f+1;m<h;m++){var v={};nO(d[m],v,t);var y=MP("g","clip-g-"+l++,v,[]);(i?i.children:n).push(y),a[s++]=y,i=y}r=d;var x=QP(c,t);x&&(i?i.children:n).push(x)}}},e.prototype.resize=function(e,t){var n=this._opts,i=this.root,r=this._viewport;if(null!=e&&(n.width=e),null!=t&&(n.height=t),i&&r&&(r.style.display="none",e=Nk(i,0,n),t=Nk(i,1,n),r.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,r){var o=r.style;o.width=e+"px",o.height=t+"px"}if(Xg(this._backgroundColor))this.refresh();else{var a=this._svgDom;a&&(a.setAttribute("width",e),a.setAttribute("height",t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute("width",e),s.setAttribute("height",t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=tm(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();function wO(e){return function(){"production"!==process.env.NODE_ENV&&vh('In SVG mode painter not support method "'+e+'"')}}function CO(e,t,n){var i=ih.createCanvas(),r=t.getWidth(),o=t.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",e)),i.width=r*n,i.height=o*n,i}var SO=function(e){function t(t,n,i){var r,o=e.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||zm,"string"==typeof t?r=CO(t,n,i):zh(t)&&(t=(r=t).id),o.id=t,o.dom=r;var a=r.style;return a&&(sp(r),r.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=i,o}return Kd(t,e),t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=CO("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new xf(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new xf(0,0,0,0)).copy(e),o.push(t)}else{for(var t,n=!1,i=1/0,r=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var d=new xf(0,0,0,0);d.copy(c),d.union(e),o[u]=d,n=!0;break}if(s){l.copy(e),l.union(c);var h=e.width*e.height,p=c.width*c.height,f=l.width*l.height-h-p;f<i&&(i=f,r=u)}}if(s&&(o[r].union(e),n=!0),!n)(t=new xf(0,0,0,0)).copy(e),o.push(t);s||(s=o.length>=a)}}for(var c=this.__startIndex;c<this.__endIndex;++c){if(p=e[c]){var d=p.shouldBePainted(n,i,!0,!0);(f=p.__isRendered&&(1&p.__dirty||!d)?p.getPrevPaintRect():null)&&u(f);var h=d&&(1&p.__dirty||!p.__isRendered)?p.getPaintRect():null;h&&u(h)}}for(c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var p,f;d=(p=t[c])&&p.shouldBePainted(n,i,!0,!0);if(p&&(!d||!p.__zr)&&p.__isRendered)(f=p.getPrevPaintRect())&&u(f)}do{r=!1;for(c=0;c<o.length;)if(o[c].isZero())o.splice(c,1);else{for(var g=c+1;g<o.length;)o[c].intersect(o[g])?(r=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(r);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=e+"px",r.height=t+"px"),i.width=e*n,i.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var i=this.dom,r=this.ctx,o=i.width,a=i.height;t=t||this.clearColor;var s=this.motionBlur&&!e,l=this.lastFrameAlpha,u=this.dpr,c=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,o/u,a/u));var d=this.domBack;function h(e,n,i,o){if(r.clearRect(e,n,i,o),t&&"transparent"!==t){var a=void 0;if(Gh(t))a=(t.global||t.__width===i&&t.__height===o)&&t.__canvasGradient||Ak(r,t,{x:0,y:0,width:i,height:o}),t.__canvasGradient=a,t.__width=i,t.__height=o;else null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=Bk(r,t,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));r.save(),r.fillStyle=a||t,r.fillRect(e,n,i,o),r.restore()}s&&(r.save(),r.globalAlpha=l,r.drawImage(d,e,n,i,o),r.restore())}!n||s?h(0,0,o,a):n.length&&Th(n,function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(Ap),MO=1e5,TO=314159,IO=.01;var DO=function(){function e(e,t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=bh({},n||{}),this.dpr=n.devicePixelRatio||zm,this._singleCanvas=r,this.root=e,e.style&&(sp(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(r){var s=e,l=s.width,u=s.height;null!=n.width&&(l=n.width),null!=n.height&&(u=n.height),this.dpr=n.devicePixelRatio||1,s.width=l*this.dpr,s.height=u*this.dpr,this._width=l,this._height=u;var c=new SO(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=TO,o.push(TO),this._domRoot=e}else{this._width=Nk(e,0,n),this._height=Nk(e,1,n);var d=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(d)}}return e.prototype.getType=function(){return"canvas"},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var r=0;r<i.length;r++){var o=i[r],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===r?this._backgroundColor:null;a.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var i,r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n||(n=this._hoverlayer=this.getLayer(MO)),i||(i=n.ctx).save(),qk(i,a,r,o===t-1))}i&&i.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(MO)},e.prototype.paintOne=function(e,t){Xk(e,t)},e.prototype._paintList=function(e,t,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var r=this._doPaintList(e,t,n),o=r.finished,a=r.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;Vf(function(){s._paintList(e,t,n,i)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(TO).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var i=this,r=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a],l=this._layers[s];l.__builtin__&&l!==this._hoverlayer&&(l.__dirty||n)&&r.push(l)}for(var u=!0,c=!1,d=function(a){var s,l=r[a],d=l.ctx,p=o&&l.createRepaintRects(e,t,h._width,h._height),f=n?l.__startIndex:l.__drawIndex,g=!n&&l.incremental&&Date.now,m=g&&Date.now(),v=l.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,v,p);else if(f===l.__startIndex){var y=e[f];y.incremental&&y.notClear&&!n||l.clear(!1,v,p)}-1===f&&(f=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(s=f;s<l.__endIndex;s++){var r=e[s];if(r.__inHover&&(c=!0),i._doPaintEl(r,l,o,t,n,s===l.__endIndex-1),g)if(Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var _=h.dpr,b=0;b<p.length;++b){var w=p[b];d.save(),d.beginPath(),d.rect(w.x*_,w.y*_,w.width*_,w.height*_),d.clip(),x(w),d.restore()}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)},h=this,p=0;p<r.length;p++)d(p);return Qd.wxa&&Th(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,i,r,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!i||s&&s.intersect(i))&&(qk(a,e,r,o),e.setPrevPaintRect(s))}else qk(a,e,r,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=TO);var n=this._layers[e];return n||((n=new SO("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?xh(n,this._layerConfig[e],!0):this._layerConfig[e-IO]&&xh(n,this._layerConfig[e-IO],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,i=this._zlevelList,r=i.length,o=this._domRoot,a=null,s=-1;if(n[e])"production"!==process.env.NODE_ENV&&vh("ZLevel "+e+" has been used already");else if(function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(r>0&&e>i[0]){for(s=0;s<r-1&&!(i[s]<e&&i[s+1]>e);s++);a=n[i[s]]}if(i.splice(s+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(t.dom,l.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}else"production"!==process.env.NODE_ENV&&vh("Layer of zlevel "+e+" is not valid")},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i];e.call(t,this._layers[r],r)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__&&e.call(t,o,r)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__||e.call(t,o,r)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){function t(e){o&&(o.__endIndex!==e&&(o.__dirty=!0),o.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n=1;n<e.length;n++){if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var i,r,o=null,a=0;for(r=0;r<e.length;r++){var s,l=(s=e[r]).zlevel,u=void 0;i!==l&&(i=l,a=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):u=this.getLayer(l+(a>0?IO:0),this._needsManuallyCompositing),u.__builtin__||vh("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,t(r),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}t(r),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,Th(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?xh(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===e||r===e+IO)xh(this._layers[r],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(Ch(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,r=this.root;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=Nk(r,0,i),t=Nk(r,1,i),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(TO).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new SO("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,r=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,i,r):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];qk(n,u,o,s===l-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();var kO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Kd(t,e),t.prototype.getInitialData=function(e){if("production"!==process.env.NODE_ENV){var t=e.coordinateSystem;if("polar"!==t&&"cartesian2d"!==t)throw new Error("Line not support coordinateSystem besides cartesian and polar")}return YE(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new mv,n=Tk("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),r=this.getData().getVisual("symbolRotate"),o="none"===i?"circle":i,a=.8*e.itemHeight,s=Tk(o,(e.itemWidth-a)/2,(e.itemHeight-a)/2,a,a,e.itemStyle.fill);t.add(s),s.setStyle(e.itemStyle);var l="inherit"===e.iconRotate?r:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),t},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(nD);function AO(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=KT(e,t,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a<n.length;a++)o.push(KT(e,t,n[a]));return o.join(" ")}}function EO(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Lh(t))return t+"";for(var i=[],r=0;r<n.length;r++){var o=e.getDimensionIndex(n[r]);o>=0&&i.push(t[o])}return i.join(" ")}var NO=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.updateData(t,n,i,r),o}return Kd(t,e),t.prototype._createSymbol=function(e,t,n,i,r){this.removeAll();var o=Tk(e,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=LO,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){fb(this.childAt(0))},t.prototype.downplay=function(){gb(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},t.prototype.updateData=function(e,n,i,r){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):Jw(h,d,a,n),rC(h)}if(this._updateCommon(e,n,s,i,r),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Qw(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,i,r){var o,a,s,l,u,c,d,h,p,f=this.childAt(0),g=e.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,d=i.labelStatesModels,h=i.hoverScale,p=i.cursorStyle,c=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(t),v=m.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=m.getModel(["select","itemStyle"]).getItemStyle(),a=m.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=RC(m),h=v.getShallow("scale"),p=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=Dk(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var _=e.getItemVisual(t,"style"),b=_.fill;if(f instanceof m_){var w=f.style;f.useStyle(bh({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(bh({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var C=e.getItemVisual(t,"liftZ"),S=this._z2;null!=C?null==S&&(this._z2=f.z2,f.z2+=C):null!=S&&(f.z2=S,this._z2=null);var M=r&&r.useNameLabel;OC(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return M?e.getName(t):AO(e,t)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=f.ensureState("emphasis");T.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var I=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;T.scaleX=this._sizeX*I,T.scaleY=this._sizeY*I,this.setSymbolScale(1),Db(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var i=this.childAt(0),r=V_(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&tC(a,{style:{opacity:0}},t,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();tC(i,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:r,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Ik(e.getItemVisual(t,"symbolSize"))},t}(mv);function LO(e,t){this.parent.drift(e,t)}function PO(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function OO(e){return null==e||zh(e)||(e={isIgnore:e}),e||{}}function RO(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:RC(t),cursorStyle:t.get("cursor")}}var FO=function(){function e(e){this.group=new mv,this._SymbolCtor=e||NO}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=OO(t);var n=this.group,i=e.hostModel,r=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=RO(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};r||n.removeAll(),e.diff(r).add(function(i){var r=u(i);if(PO(e,r,i,t)){var a=new o(e,i,s,l);a.setPosition(r),e.setItemGraphicEl(i,a),n.add(a)}}).update(function(c,d){var h=r.getItemGraphicEl(d),p=u(c);if(PO(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==f)n.remove(h),(h=new o(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var m={x:p[0],y:p[1]};a?h.attr(m):Jw(h,m,i)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)}).remove(function(e){var t=r.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},i)}).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var i=e._getSymbolPoint(n);t.setPosition(i),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=RO(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=OO(n);for(var r=e.start;r<e.end;r++){var o=t.getItemLayout(r);if(PO(t,o,r,n)){var a=new this._SymbolCtor(t,r,this._seriesScope);a.traverse(i),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(r,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){AC(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function zO(e,t,n){var i=e.getBaseAxis(),r=e.getOtherAxis(i),o=function(e,t){var n=0,i=e.scale.getExtent();"start"===t?n=i[0]:"end"===t?n=i[1]:Fh(t)&&!isNaN(t)?n=t:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=Ih(e.dimensions,function(e){return t.mapDimension(e)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return HE(t,d[0])&&(h=!0,d[0]=p),HE(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function VO(e,t,n,i){var r=NaN;e.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,i),a[1-o]=r,t.dataToPoint(a)}var BO=Math.min,jO=Math.max;function GO(e,t){return isNaN(e)||isNaN(t)}function WO(e,t,n,i,r,o,a,s,l){for(var u,c,d,h,p,f,g=n,m=0;m<i;m++){var v=t[2*g],y=t[2*g+1];if(g>=r||g<0)break;if(GO(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var x=v-u,_=y-c;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],C=t[2*b+1];w===v&&C===y&&m<i;)m++,g+=o,w=t[2*(b+=o)],C=t[2*b+1],x=(v=t[2*g])-u,_=(y=t[2*g+1])-c;var S=m+1;if(l)for(;GO(w,C)&&S<i;)S++,w=t[2*(b+=o)],C=t[2*b+1];var M=.5,T=0,I=0,D=void 0,k=void 0;if(S>=i||GO(w,C))p=v,f=y;else{T=w-u,I=C-c;var A=v-u,E=w-v,N=y-c,L=C-y,P=void 0,O=void 0;if("x"===s){var R=T>0?1:-1;p=v-R*(P=Math.abs(A))*a,f=y,D=v+R*(O=Math.abs(E))*a,k=y}else if("y"===s){var F=I>0?1:-1;p=v,f=y-F*(P=Math.abs(N))*a,D=v,k=y+F*(O=Math.abs(L))*a}else P=Math.sqrt(A*A+N*N),p=v-T*a*(1-(M=(O=Math.sqrt(E*E+L*L))/(O+P))),f=y-I*a*(1-M),k=y+I*a*M,D=BO(D=v+T*a*M,jO(w,v)),k=BO(k,jO(C,y)),D=jO(D,BO(w,v)),f=y-(I=(k=jO(k,BO(C,y)))-y)*P/O,p=BO(p=v-(T=D-v)*P/O,jO(u,v)),f=BO(f,jO(c,y)),D=v+(T=v-(p=jO(p,BO(u,v))))*O/P,k=y+(I=y-(f=jO(f,BO(c,y))))*O/P}e.bezierCurveTo(d,h,p,f,v,y),d=D,h=k}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var HO=function(){return function(){this.smooth=0,this.smoothConstraint=!0}}(),UO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new HO},t.prototype.buildPath=function(e,t){var n=t.points,i=0,r=n.length/2;if(t.connectNulls){for(;r>0&&GO(n[2*r-2],n[2*r-1]);r--);for(;i<r&&GO(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=WO(e,n,i,r,r,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,r=this.path.data,o=Hx.CMD,a="x"===t,s=[],l=0;l<r.length;){var u=void 0,c=void 0,d=void 0,h=void 0,p=void 0,f=void 0,g=void 0;switch(r[l++]){case o.M:n=r[l++],i=r[l++];break;case o.L:if(u=r[l++],c=r[l++],(g=a?(e-n)/(u-n):(e-i)/(c-i))<=1&&g>=0){var m=a?(c-i)*g+i:(u-n)*g+n;return a?[e,m]:[m,e]}n=u,i=c;break;case o.C:u=r[l++],c=r[l++],d=r[l++],h=r[l++],p=r[l++],f=r[l++];var v=a?tg(n,u,d,p,e,s):tg(i,c,h,f,e,s);if(v>0)for(var y=0;y<v;y++){var x=s[y];if(x<=1&&x>=0){m=a?Qf(i,c,h,f,x):Qf(n,u,d,p,x);return a?[e,m]:[m,e]}}n=p,i=f}}},t}(d_),YO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t}(HO),ZO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new YO},t.prototype.buildPath=function(e,t){var n=t.points,i=t.stackedOnPoints,r=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&GO(n[2*o-2],n[2*o-1]);o--);for(;r<o&&GO(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=WO(e,n,r,o,o,1,t.smooth,a,t.connectNulls);WO(e,i,r+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),r+=s+1,e.closePath()}},t}(d_);function XO(e,t,n,i,r){var o=e.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||0;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var d=new C_({shape:{x:a,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var g=Ph(r)?function(e){r(e,d)}:null;Qw(d,{shape:{width:l,height:u,x:a,y:s}},n,null,i,g)}return d}function qO(e,t,n){var i=e.getArea(),r=Mv(i.r0,1),o=Mv(i.r,1),a=new bw({shape:{cx:Mv(e.cx,1),cy:Mv(e.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=r,Qw(a,{shape:{endAngle:i.endAngle,r:o}},n));return a}function $O(e,t,n,i,r){return e?"polar"===e.type?qO(e,t,n):"cartesian2d"===e.type?XO(e,t,n,i,r):null:null}function KO(e,t){return e.type===t}function JO(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function QO(e){for(var t=1/0,n=1/0,i=-1/0,r=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),r=Math.max(s,r))}return[[t,n],[i,r]]}function eR(e,t){var n=QO(e),i=n[0],r=n[1],o=QO(t),a=o[0],s=o[1];return Math.max(Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]),Math.abs(r[0]-s[0]),Math.abs(r[1]-s[1]))}function tR(e){return Fh(e)?e:e?.5:0}function nR(e,t,n,i,r){var o=n.getBaseAxis(),a="x"===o.dim||"radius"===o.dim?0:1,s=[],l=0,u=[],c=[],d=[],h=[];if(r){for(l=0;l<e.length;l+=2){var p=t||e;isNaN(p[l])||isNaN(p[l+1])||h.push(e[l],e[l+1])}e=h}for(l=0;l<e.length-2;l+=2)switch(d[0]=e[l+2],d[1]=e[l+3],c[0]=e[l],c[1]=e[l+1],s.push(c[0],c[1]),i){case"end":u[a]=d[a],u[1-a]=c[1-a],s.push(u[0],u[1]);break;case"middle":var f=(c[a]+d[a])/2,g=[];u[a]=g[a]=f,u[1-a]=c[1-a],g[1-a]=d[1-a],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[a]=c[a],u[1-a]=d[1-a],s.push(u[0],u[1])}return s.push(e[l++],e[l++]),s}function iR(e,t){var n,i,r=[],o=e.length;function a(e,t,n){var i=e.coord;return{coord:n,color:function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),r=Math.floor(i),o=Math.ceil(i),a=Ag(t[r]),s=Ag(t[o]),l=i-r,u=Rg([xg(Sg(a[0],s[0],l)),xg(Sg(a[1],s[1],l)),xg(Sg(a[2],s[2],l)),_g(Sg(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}((n-i)/(t.coord-i),[e.color,t.color])}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else{if(u>t){i?r.push(a(i,l,t)):n&&r.push(a(n,l,0),a(n,l,t));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}function rR(e,t,n){var i=e.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var r=t.count(),o=Math.max(1,Math.round(r/5)),a=0;a<r;a+=o)if(1.5*NO.getSymbolSize(t,a)[e.isHorizontal()?1:0]>i)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return Th(o.getViewLabels(),function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function oR(e,t){return isNaN(e)||isNaN(t)}function aR(e,t){return[e[2*t],e[2*t+1]]}function sR(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<U_.length;t++)if(e.get([U_[t],"endLabel","show"]))return!0;return!1}function lR(e,t,n,i){if(KO(t,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=sR(i)?function(n,i){e._endLabelOnDuring(n,i,a,s,o,r,t)}:null,u=t.getBaseAxis().isHorizontal(),c=XO(t,n,i,function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},l);if(!i.get("clip",!0)){var d=c.shape,h=Math.max(d.width,d.height);u?(d.y-=h,d.height+=2*h):(d.x-=h,d.width+=2*h)}return l&&l(1,c),c}return"production"!==process.env.NODE_ENV&&i.get(["endLabel","show"]),qO(t,n,i)}var uR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.init=function(){var e=new mv,t=new FO;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Eh(this._changePolyState,this)},t.prototype.render=function(e,t,n){var i=e.coordinateSystem,r=this.group,o=e.getData(),a=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=o.getLayout("points")||[],u="polar"===i.type,c=this._coordSys,d=this._symbolDraw,h=this._polyline,p=this._polygon,f=this._lineGroup,g=!t.ssr&&e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=zO(i,o,v),x=m&&function(e,t,n){if(!n.valueDim)return[];for(var i=t.count(),r=cN(2*i),o=0;o<i;o++){var a=VO(n,e,t,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}(i,o,y),_=e.get("showSymbol"),b=e.get("connectNulls"),w=_&&!u&&rR(e,o,i),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(r.remove(e),C.setItemGraphicEl(t,null))}),_||d.remove(),r.add(f);var S,M=!u&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(S=i.getArea()).width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r+=.5)),this._clipShapeForSymbol=S;var T=function(e,t,n){var i=e.getVisual("visualMeta");if(i&&i.length&&e.count())if("cartesian2d"===t.type){for(var r,o,a=i.length-1;a>=0;a--){var s=e.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=t.getAxis(r),u=Ih(o.stops,function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}}),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=iR(u,"x"===r?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,g=h[p-1].coord+10,m=g-f;if(m<.001)return"transparent";Th(h,function(e){e.offset=(e.coord-f)/m}),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new Bw(0,0,0,0,h,!0);return v[r]=f,v[r+"2"]=g,v}process.env.NODE_ENV}else process.env.NODE_ENV}(o,i,n)||o.getVisual("style")[o.getVisual("drawType")];if(h&&c.type===i.type&&M===this._step){m&&!p?p=this._newPolygon(l,x):p&&!m&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,i,eM(T));var I=f.getClipPath();if(I)Qw(I,{shape:lR(this,i,!1,e).shape},e);else f.setClipPath(lR(this,i,!0,e));_&&d.updateData(o,{isIgnore:w,clipShape:S,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),JO(this._stackedOnPoints,x)&&JO(this._points,l)||(g?this._doUpdateAnimation(o,x,i,n,M,v,b):(M&&(x&&(x=nR(x,l,i,M,b)),l=nR(l,null,i,M,b)),h.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:x})))}else _&&d.updateData(o,{isIgnore:w,clipShape:S,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),g&&this._initSymbolLabelAnimation(o,i,S),M&&(x&&(x=nR(x,l,i,M,b)),l=nR(l,null,i,M,b)),h=this._newPolyline(l),m?p=this._newPolygon(l,x):p&&(f.remove(p),p=this._polygon=null),u||this._initOrUpdateEndLabel(e,i,eM(T)),f.setClipPath(lR(this,i,!0,e));var D=e.getModel("emphasis"),k=D.get("focus"),A=D.get("blurScope"),E=D.get("disabled");(h.useStyle(wh(a.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),Nb(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);V_(h).seriesIndex=e.seriesIndex,Db(h,k,A,E);var N=tR(e.get("smooth")),L=e.get("smoothMonotone");if(h.setShape({smooth:N,smoothMonotone:L,connectNulls:b}),p){var P=o.getCalculationInfo("stackedOnSeries"),O=0;p.useStyle(wh(s.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),P&&(O=tR(P.get("smooth"))),p.setShape({smooth:N,stackedOnSmooth:O,smoothMonotone:L,connectNulls:b}),Nb(p,e,"areaStyle"),V_(p).seriesIndex=e.seriesIndex,Db(p,k,A,E)}var R=this._changePolyState;o.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=R)}),this._polyline.onHoverStateChange=R,this._data=o,this._coordSys=i,this._stackedOnPoints=x,this._points=l,this._step=M,this._valueOrigin=v,e.get("triggerLineEvent")&&(this.packEventData(e,h),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){V_(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,i){var r=e.getData(),o=my(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new NO(r,o)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else fD.prototype.highlight.call(this,e,t,n,i)},t.prototype.downplay=function(e,t,n,i){var r=e.getData(),o=my(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else fD.prototype.downplay.call(this,e,t,n,i)},t.prototype._changePolyState=function(e){var t=this._polygon;ub(this._polyline,e),t&&ub(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new UO({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ZO({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var i,r,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(i=o.isHorizontal(),r=!1):"polar"===t.type&&(i="angle"===o.dim,r=!0);var s=e.hostModel,l=s.get("animationDuration");Ph(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Ph(u)?u(null):u;e.eachItemGraphicEl(function(e,o){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(r){var g=n,m=t.pointToCoord(d);i?(h=g.startAngle,p=g.endAngle,f=-m[1]/180*Math.PI):(h=g.r0,p=g.r,f=m[0])}else{var v=n;i?(h=v.x,p=v.x+v.width,f=e.x):(h=v.y+v.height,p=v.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var x=Ph(u)?u(o):l*y+c,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var i=e.getModel("endLabel");if(sR(e)){var r=e.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new T_({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t=e.length/2;t>0&&oR(e[2*t-2],e[2*t-1]);t--);return t-1}(a);l>=0&&(OC(o,RC(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?EO(r,n):AO(r,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:e.get("align")||o,verticalAlign:e.get("verticalAlign")||a}}}(i,t)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,d=c.get("connectNulls"),h=o.get("precision"),p=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),m=f.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?p:0)*(m?-1:1),_=(g?0:-p)*(m?-1:1),b=g?"x":"y",w=function(e,t,n){for(var i,r,o=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(r=e[2*u+a],!isNaN(r)&&!isNaN(e[2*u+1-a]))if(0!==u){if(i<=t&&r>=t||i>=t&&r<=t){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(t-i)/(r-i)}}(u,y,b),C=w.range,S=C[1]-C[0],M=void 0;if(S>=1){if(S>1&&!d){var T=aR(u,C[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(M=c.getRawValue(C[0]))}else{(T=l.getPointOn(y,b))&&s.attr({x:T[0]+x,y:T[1]+_});var I=c.getRawValue(C[0]),D=c.getRawValue(C[1]);r&&(M=Ty(n,h,I,D,w.t))}i.lastFrameIndex=C[0]}else{var k=1===e||i.lastFrameIndex>0?C[0]:0;T=aR(u,k);r&&(M=c.getRawValue(k)),s.attr({x:T[0]+x,y:T[1]+_})}if(r){var A=HC(s);"function"==typeof A.setLabelText&&A.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,t,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,i,r,o,a){for(var s=function(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:"+",idx:e})}).update(function(e,t){n.push({cmd:"=",idx:t,idx1:e})}).remove(function(e){n.push({cmd:"-",idx:e})}).execute(),n}(e,t),l=[],u=[],c=[],d=[],h=[],p=[],f=[],g=zO(r,t,a),m=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y<s.length;y++){var x=s[y],_=!0,b=void 0,w=void 0;switch(x.cmd){case"=":b=2*x.idx,w=2*x.idx1;var C=m[b],S=m[b+1],M=v[w],T=v[w+1];(isNaN(C)||isNaN(S))&&(C=M,S=T),l.push(C,S),u.push(M,T),c.push(n[b],n[b+1]),d.push(i[w],i[w+1]),f.push(t.getRawIndex(x.idx1));break;case"+":var I=x.idx,D=g.dataDimsForPoint,k=r.dataToPoint([t.get(D[0],I),t.get(D[1],I)]);w=2*I,l.push(k[0],k[1]),u.push(v[w],v[w+1]);var A=VO(g,r,t,I);c.push(A[0],A[1]),d.push(i[w],i[w+1]),f.push(t.getRawIndex(I));break;case"-":_=!1}_&&(h.push(x),p.push(p.length))}p.sort(function(e,t){return f[e]-f[t]});var E=l.length,N=cN(E),L=cN(E),P=cN(E),O=cN(E),R=[];for(y=0;y<p.length;y++){var F=p[y],z=2*y,V=2*F;N[z]=l[V],N[z+1]=l[V+1],L[z]=u[V],L[z+1]=u[V+1],P[z]=c[V],P[z+1]=c[V+1],O[z]=d[V],O[z+1]=d[V+1],R[y]=h[F]}return{current:N,next:L,stackedOnCurrent:P,stackedOnNext:O,status:R}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin),d=c.current,h=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(r&&(h=nR(c.stackedOnCurrent,c.current,n,r,a),d=nR(c.current,null,n,r,a),f=nR(c.stackedOnNext,c.next,n,r,a),p=nR(c.next,null,n,r,a)),eR(d,p)>3e3||l&&eR(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var g={shape:{points:p}};c.current!==d&&(g.shape.__points=c.next),s.stopAnimation(),Jw(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),Jw(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var m=[],v=c.status,y=0;y<v.length;y++){if("="===v[y].cmd){var x=e.getItemGraphicEl(v[y].idx1);x&&m.push({el:x,ptIdx:y})}}s.animators&&s.animators.length&&s.animators[0].during(function(){l&&l.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,i=2*m[t].ptIdx;n.x=e[i],n.y=e[i+1],n.markRedraw()}})},t.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,i){e.__temp&&(t.remove(e),n.setItemGraphicEl(i,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(fD);function cR(e,t){return{seriesType:e,plan:dD(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,r=e.pipelineContext,o=t||r.large;if(i){var a=Ih(i.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");HE(n,a[0])&&(a[0]=l),HE(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),d=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,r=o&&cN(n*s),a=[],l=[],h=e.start,p=0;h<e.end;h++){var f=void 0;if(1===s){var g=u.get(c,h);f=i.dataToPoint(g,null,l)}else a[0]=u.get(c,h),a[1]=u.get(d,h),f=i.dataToPoint(a,null,l);o?(r[p++]=f[0],r[p++]=f[1]):t.setItemLayout(h,f.slice())}o&&t.setLayout("points",r)}}}}}}var dR={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)isNaN(e[i])||(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},hR=function(e){return Math.round(e.length/2)};function pR(e){return{seriesType:e,reset:function(e,t,n){var i=e.getData(),r=e.get("sampling"),o=e.coordinateSystem,a=i.count();if(a>10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===r?e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/h)):"minmax"===r&&e.setData(i.minmaxDownSample(i.mapDimension(l.dim),1/h));var p=void 0;Oh(r)?p=dR[r]:Ph(r)&&(p=r),p&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,p,hR))}}}}}var fR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){return YE(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(e),o=i.dataToPoint(r);if(n)Th(i.getAxes(),function(e,n){if("category"===e.type&&null!=t){var i=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=r[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(o[n]=e.toGlobalCoord(e.getExtent()[l?1:0]));for(var u=void 0,c=void 0,d=1,h=0;h<i.length;h++){var p=i[h].coord,f=h===i.length-1?i[h-1].tickValue+d:i[h].tickValue;if(f===s){c=p;break}if(f<s)u=p;else if(null!=u&&f>s){c=(p+u)/2;break}1===h&&(d=f-i[0].tickValue)}null==c&&(u?u&&(c=i[i.length-1].coord):c=i[0].coord),o[n]=e.toGlobalCoord(c)}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=i.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(nD);nD.registerClass(fR);var gR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.getInitialData=function(){return YE(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=lS(fR.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(fR),mR=function(){return function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}}(),vR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new mR},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,r=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-r),s=r+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-l<d:l-u<d;h||(l=u-(c?d:-d));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);h?(e.moveTo(p*r+n,f*r+i),e.arc(p*s+n,f*s+i,a,-Math.PI+l,l,!c)):e.moveTo(p*o+n,f*o+i),e.arc(n,i,o,l,u,!c),e.arc(g*s+n,m*s+i,a,u-2*Math.PI,u-Math.PI,!c),0!==r&&e.arc(n,i,r,u,l,c)},t}(d_);function yR(e,t,n){return t*Math.sin(e)*(n?-1:1)}function xR(e,t,n){return t*Math.cos(e)*(n?1:-1)}function _R(e,t,n){var i=e.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;Lh(i)||(i=[i,i,i,i]);var r=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Ih(i,function(e){return rv(e,r)})}}var bR=Math.max,wR=Math.min;var CR=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return Kd(t,e),t.prototype.render=function(e,t,n,i){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var r=e.get("coordinateSystem");"cartesian2d"===r||"polar"===r?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,i)):"production"!==process.env.NODE_ENV&&Xv("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){AC(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,i){var r,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),i=t.getBaseAxis();"production"!==process.env.NODE_ENV&&n&&("category"!==i.type&&Xv("`realtimeSort` will not work because this bar series is not based on a category axis."),"cartesian2d"!==t.type&&Xv("`realtimeSort` will not work because this bar series is not on cartesian2d."));if(n&&"category"===i.type&&"cartesian2d"===t.type)return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(KO(e,"cartesian2d")){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var r=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var f=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,_=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(e){var t=ER[l.type](a,e),n=function(e,t,n){var i="polar"===e.type?bw:C_;return new i({shape:zR(t,n,e),silent:!0,z2:0})}(l,r,t);return n.useStyle(m.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add(function(t){var n=a.getItemModel(t),i=ER[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&AR[l.type](i)){var s=!1;h&&(s=SR[l.type](p,i));var m=MR[l.type](e,a,t,i,r,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),LR(m,a,t,n,i,e,r,"polar"===l.type),_?m.attr({shape:i}):d?TR(d,c,m,i,t,r,!1,!1):Qw(m,{shape:i},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}}).update(function(t,n){var i=a.getItemModel(t),C=ER[l.type](a,t,i);if(g){var S=void 0;0===x.length?S=w(n):((S=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?S.setShape("r",v):S.setShape("cornerRadius",v),y[t]=S);var M=ER[l.type](a,t);Jw(S,{shape:zR(r,M,l)},c,t)}var T=s.getItemGraphicEl(n);if(a.hasValue(t)&&AR[l.type](C)){var I=!1;if(h&&(I=SR[l.type](p,C))&&o.remove(T),T?rC(T):T=MR[l.type](e,a,t,C,r,c,u.model,!!T,f),d&&(T.forceLabelAnimation=!0),b){var D=T.getTextContent();if(D){var k=HC(D);null!=k.prevValue&&(k.prevValue=k.value)}}else LR(T,a,t,i,C,e,r,"polar"===l.type);_?T.attr({shape:C}):d?TR(d,c,T,C,t,r,!0,b):Jw(T,{shape:C},e,t,null),a.setItemGraphicEl(t,T),T.ignore=I,o.add(T)}else o.remove(T)}).remove(function(t){var n=s.getItemGraphicEl(t);n&&iC(n,e,t)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new mv);C.removeAll();for(var S=0;S<y.length;++S)C.add(y[S]);o.add(C),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),RR(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),RR(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&$O(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var i=this;if(t.count()){var r=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),i=n&&n.shape;return i&&Math.abs(r.isHorizontal()?i.height:i.width)||0};this._onRendered=function(){i._updateSortWithinSameData(t,o,r,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var i=[];return e.each(e.mapDimension(t.dim),function(e,t){var r=n(t);r=null==r?NaN:r,i.push({dataIndex:t,mappedValue:r,ordinalNumber:e})}),i.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:Ih(i,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var i=n.scale,r=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(r,i.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(e.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,i){if(this._isOrderChangedWithinSameData(e,t,n)){var r=this._dataSort(e,n,t);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},t.prototype._dispatchInitSort=function(e,t,n){var i=t.baseAxis,r=this._dataSort(e,i,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){iC(t,e,V_(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(fD),SR={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var r=e.x+e.width,o=e.y+e.height,a=bR(t.x,e.x),s=wR(t.x+t.width,r),l=bR(t.y,e.y),u=wR(t.y+t.height,o),c=s<a,d=u<l;return t.x=c&&a>r?s:a,t.y=d&&l>o?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}var r=wR(t.r,e.r),o=bR(t.r0,e.r0);t.r=r,t.r0=o;var a=r-o<0;if(n<0){i=t.r;t.r=t.r0,t.r0=i}return a}},MR={cartesian2d:function(e,t,n,i,r,o,a,s,l){var u=new C_({shape:bh({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(e,t,n,i,r,o,a,s,l){var u=!r&&l?vR:bw,c=new u({shape:i,z2:1});c.name="item";var d,h,p=NR(r);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===vR}||{}).isRoundCap,function(e,t,n){var i=t.position;if(!i||i instanceof Array)return ov(e,t,n);var r=d(i),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,g=a.endAngle,m=(f+g)/2,v=h?Math.abs(u-c)/2:0,y=Math.cos,x=Math.sin,_=s+u*y(f),b=l+u*x(f),w="left",C="top";switch(r){case"startArc":_=s+(c-o)*y(m),b=l+(c-o)*x(m),w="center",C="top";break;case"insideStartArc":_=s+(c+o)*y(m),b=l+(c+o)*x(m),w="center",C="bottom";break;case"startAngle":_=s+p*y(f)+yR(f,o+v,!1),b=l+p*x(f)+xR(f,o+v,!1),w="right",C="middle";break;case"insideStartAngle":_=s+p*y(f)+yR(f,-o+v,!1),b=l+p*x(f)+xR(f,-o+v,!1),w="left",C="middle";break;case"middle":_=s+p*y(m),b=l+p*x(m),w="center",C="middle";break;case"endArc":_=s+(u+o)*y(m),b=l+(u+o)*x(m),w="center",C="bottom";break;case"insideEndArc":_=s+(u-o)*y(m),b=l+(u-o)*x(m),w="center",C="top";break;case"endAngle":_=s+p*y(g)+yR(g,o+v,!0),b=l+p*x(g)+xR(g,o+v,!0),w="left",C="middle";break;case"insideEndAngle":_=s+p*y(g)+yR(g,-o+v,!0),b=l+p*x(g)+xR(g,-o+v,!0),w="right",C="middle";break;default:return ov(e,t,n)}return(e=e||{}).x=_,e.y=b,e.align=w,e.verticalAlign=C,e}),o){var f=r?"r":"endAngle",g={};c.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?Jw:Qw)(c,{shape:g},o)}return c}};function TR(e,t,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?Jw:Qw)(n,{shape:l},t,r,null),(a?Jw:Qw)(n,{shape:u},t?e.baseAxis.model:null,r)}function IR(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var DR=["x","y","width","height"],kR=["cx","cy","r","startAngle","endAngle"],AR={cartesian2d:function(e){return!IR(e,DR)},polar:function(e){return!IR(e,kR)}},ER={cartesian2d:function(e,t,n){var i=e.getItemLayout(t),r=n?function(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var i=e.get(["itemStyle","borderWidth"])||0,r=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),o=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,r,o)}(n,i):0,o=i.width>0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function NR(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function LR(e,t,n,i,r,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;bh(u,_R(i.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=i.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=i.getShallow("cursor");d&&e.attr("cursor",d);var h=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",p=RC(i);OC(e,p,{labelFetcher:o,labelDataIndex:n,defaultText:AO(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(s&&f){var g=i.get(["label","position"]);e.textConfig.inside="middle"===g||null,function(e,t,n,i){if(Fh(i))e.setTextConfig({rotation:i});else if(Lh(t))e.setTextConfig({rotation:0});else{var r,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-r;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===g?h:g,NR(a),i.get(["label","rotate"]))}UC(f,p,o.getRawValue(n),function(e){return EO(t,e)});var m=i.getModel(["emphasis"]);Db(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Nb(e,i),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(r)&&(e.style.fill="none",e.style.stroke="none",Th(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var PR=function(){return function(){}}(),OR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new PR},t.prototype.buildPath=function(e,t){for(var n=t.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[i]=s,a[r]=n[l+2],o[i]=n[l+i],o[r]=n[l+r],e.rect(o[0],o[1],a[0],a[1])},t}(d_);function RR(e,t,n,i){var r=e.getData(),o=r.getLayout("valueAxisHorizontal")?1:0,a=r.getLayout("largeDataIndices"),s=r.getLayout("size"),l=e.getModel("backgroundStyle"),u=r.getLayout("largeBackgroundPoints");if(u){var c=new OR({shape:{points:u},incremental:!!i,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var d=new OR({shape:{points:r.getLayout("largePoints")},incremental:!!i,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=a,d.barWidth=s,t.add(d),d.useStyle(r.getVisual("style")),d.style.stroke=null,V_(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",FR),d.on("mousemove",FR)),n&&n.push(d)}var FR=CD(function(e){var t=function(e,t,n){for(var i=e.baseDimIdx,r=1-i,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,d=o.length/3;c<d;c++){var h=3*c;if(l[i]=u,l[r]=o[h+2],s[i]=o[h+i],s[r]=o[h+r],l[r]<0&&(s[r]+=l[r],l[r]=-l[r]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,e.offsetX,e.offsetY);V_(this).dataIndex=t>=0?t:null},30,!1);function zR(e,t,n){if(KO(n,"cartesian2d")){var i=t,r=n.getArea();return{x:e?i.x:r.x,y:e?r.y:i.y,width:e?i.width:r.width,height:e?r.height:i.height}}var o=t;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:e?r.r0:o.r0,r:e?r.r:o.r,startAngle:e?o.startAngle:0,endAngle:e?o.endAngle:2*Math.PI}}var VR=2*Math.PI,BR=Math.PI/180;function jR(e,t){return sM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function GR(e,t){var n=jR(e,t),i=e.get("center"),r=e.get("radius");Lh(r)||(r=[0,r]);var o,a,s=Sv(n.width,t.getWidth()),l=Sv(n.height,t.getHeight()),u=Math.min(s,l),c=Sv(r[0],u/2),d=Sv(r[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(i);o=p[0]||0,a=p[1]||0}else Lh(i)||(i=[i,i]),o=Sv(i[0],s)+n.x,a=Sv(i[1],l)+n.y;return{cx:o,cy:a,r0:c,r:d}}function WR(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),i=t.mapDimension("value"),r=jR(e,n),o=GR(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*BR,d=e.get("endAngle"),h=e.get("padAngle")*BR;d="auto"===d?c-VR:-d*BR;var p=e.get("minAngle")*BR+h,f=0;t.each(i,function(e){!isNaN(e)&&f++});var g=t.getSum(i),m=Math.PI/(g||f)*2,v=e.get("clockwise"),y=e.get("roseType"),x=e.get("stillShowZeroSum"),_=t.getDataExtent(i);_[0]=0;var b=v?1:-1,w=[c,d],C=b*h/2;Wx(w,!v),c=w[0],d=w[1];var S=HR(e);S.startAngle=c,S.endAngle=d,S.clockwise=v;var M=Math.abs(d-c),T=M,I=0,D=c;if(t.setLayout({viewRect:r,r:l}),t.each(i,function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});else{(i="area"!==y?0===g&&x?m:e*m:M/f)<p?(i=p,T-=p):I+=e;var r=D+b*i,o=0,c=0;h>i?c=o=D+b*i/2:(o=D+C,c=r-C),t.setItemLayout(n,{angle:i,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?Cv(e,_,[u,l]):l}),D=r}}),T<VR&&f)if(T<=.001){var k=M/f;t.each(i,function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n);i.angle=k;var r=0,o=0;k<h?o=r=c+b*(n+.5)*k:(r=c+b*n*k+C,o=c+b*(n+1)*k-C),i.startAngle=r,i.endAngle=o}})}else m=T/I,D=c,t.each(i,function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n),r=i.angle===p?p:e*m,o=0,a=0;r<h?a=o=D+b*r/2:(o=D+C,a=D+b*r-C),i.startAngle=o,i.endAngle=a,D+=b*r}})})}var HR=vy();function UR(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var i=e.getData();i.filterSelf(function(e){for(var t=i.getName(e),r=0;r<n.length;r++)if(!n[r].isSelected(t))return!1;return!0})}}}}var YR=Math.PI/180;function ZR(e,t,n,i,r,o,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;d<c;d++)if("outer"===e[d].position&&"labelLine"===e[d].labelAlignTo){var h=e[d].label.x-u;e[d].linePoints[1][0]+=h,e[d].label.x=u}JL(e,l,l+a)&&function(e){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;s<e.length;s++)if("none"===e[s].labelAlignTo){var l=e[s],u=l.label.y>n?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*r,h=i+l.len,f=Math.abs(d)<h?Math.sqrt(c*c/(1-d*d/h/h)):h;u.rB=f,u.maxY=c}u.list.push(l)}p(o),p(a)}(e)}function p(e){for(var o=e.rB,a=o*o,s=0;s<e.list.length;s++){var l=e.list[s],u=Math.abs(l.label.y-n),c=i+l.len,d=c*c,h=Math.sqrt(Math.abs((1-u*u/a)*d)),p=t+(h+l.len2)*r,f=p-l.label.x;XR(l,l.targetTextWidth-f*r,!0),l.label.x=p}}}function XR(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var i=e.label,r=i.style,o=e.rect,a=r.backgroundColor,s=r.padding,l=s?s[1]+s[3]:0,u=r.overflow,c=o.width+(a?0:l);if(t<c||n){var d=o.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",t-l);var h=i.getBoundingRect();i.setStyle("width",Math.ceil(h.width)),i.setStyle("backgroundColor",a)}else{var p=t-l,f=t<c?p:n?p>e.unconstrainedWidth?null:p:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var m=(i.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-d)/2}}}function qR(e){return"center"===e.position}function $R(e){var t,n,i=e.getData(),r=[],o=!1,a=(e.get("minShowLabelAngle")||0)*YR,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}i.each(function(e){var s=i.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(e),m=g.getModel("label"),v=m.get("position")||g.get(["emphasis","label","position"]),y=m.get("distanceToLabelLine"),x=m.get("alignTo"),_=Sv(m.get("edgeDistance"),u),b=m.get("bleedMargin"),w=g.getModel("labelLine"),C=w.get("length");C=Sv(C,u);var S=w.get("length2");if(S=Sv(S,u),Math.abs(d.endAngle-d.startAngle)<a)return Th(h.states,p),h.ignore=!0,void(f&&(Th(f.states,p),f.ignore=!0));if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(h)){var M,T,I,D,k=(d.startAngle+d.endAngle)/2,A=Math.cos(k),E=Math.sin(k);t=d.cx,n=d.cy;var N="inside"===v||"inner"===v;if("center"===v)M=d.cx,T=d.cy,D="center";else{var L=(N?(d.r+d.r0)/2*A:d.r*A)+t,P=(N?(d.r+d.r0)/2*E:d.r*E)+n;if(M=L+3*A,T=P+3*E,!N){var O=L+A*(C+l-d.r),R=P+E*(C+l-d.r),F=O+(A<0?-1:1)*S;M="edge"===x?A<0?c+_:c+u-_:F+(A<0?-y:y),T=R,I=[[L,P],[O,R],[F,R]]}D=N?"center":"edge"===x?A>0?"right":"left":A>0?"left":"right"}var z=Math.PI,V=0,B=m.get("rotate");if(Fh(B))V=B*(z/180);else if("center"===v)V=0;else if("radial"===B||!0===B){V=A<0?-k+z:-k}else if("tangential"===B&&"outside"!==v&&"outer"!==v){var j=Math.atan2(A,E);j<0&&(j=2*z+j),E>0&&(j=z+j),V=j-z}if(o=!!V,h.x=M,h.y=T,h.rotation=V,h.setStyle({verticalAlign:"middle"}),N){h.setStyle({align:D});var G=h.states.select;G&&(G.x+=h.x,G.y+=h.y)}else{var W=h.getBoundingRect().clone();W.applyTransform(h.getComputedTransform());var H=(h.style.margin||0)+2.1;W.y-=H/2,W.height+=H,r.push({label:h,labelLine:f,position:v,len:C,len2:S,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new cf(A,E),linePoints:I,textAlign:D,labelDistance:y,labelAlignTo:x,edgeDistance:_,bleedMargin:b,rect:W,unconstrainedWidth:W.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:N})}}),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,i,r,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h<e.length;h++){var p=e[h].label;qR(e[h])||(p.x<t?(c=Math.min(c,p.x),l.push(e[h])):(d=Math.max(d,p.x),u.push(e[h])))}for(h=0;h<e.length;h++)if(!qR(m=e[h])&&m.linePoints){if(null!=m.labelStyleWidth)continue;p=m.label;var f=m.linePoints,g=void 0;g="edge"===m.labelAlignTo?p.x<t?f[2][0]-m.labelDistance-a-m.edgeDistance:a+r-m.edgeDistance-f[2][0]-m.labelDistance:"labelLine"===m.labelAlignTo?p.x<t?c-a-m.bleedMargin:a+r-d-m.bleedMargin:p.x<t?p.x-a-m.bleedMargin:a+r-p.x-m.bleedMargin,m.targetTextWidth=g,XR(m,g)}for(ZR(u,t,n,i,1,0,o,0,s,d),ZR(l,t,n,i,-1,0,o,0,s,c),h=0;h<e.length;h++){var m;if(!qR(m=e[h])&&m.linePoints){p=m.label,f=m.linePoints;var v="edge"===m.labelAlignTo,y=p.style.padding,x=y?y[1]+y[3]:0,_=p.style.backgroundColor?0:x,b=m.rect.width+_,w=f[1][0]-f[2][0];v?p.x<t?f[2][0]=a+m.edgeDistance+b+m.labelDistance:f[2][0]=a+r-m.edgeDistance-b-m.labelDistance:(p.x<t?f[2][0]=p.x+m.labelDistance:f[2][0]=p.x-m.labelDistance,f[1][0]=f[2][0]+w),f[1][1]=f[2][1]=p.y}}}(r,t,n,l,u,h,c,d);for(var f=0;f<r.length;f++){var g=r[f],m=g.label,v=g.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),y&&(Th(m.states,p),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(v){var _=g.linePoints;y||!_?(Th(v.states,p),v.ignore=!0):(HL(_,g.minTurnAngle),UL(_,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:_}),m.__hostTarget.textGuideLineConfig={anchor:new cf(_[0][0],_[0][1])})}}}var KR=function(e){function t(t,n,i){var r=e.call(this)||this;r.z2=2;var o=new T_;return r.setTextContent(o),r.updateData(t,n,i,!0),r}return Kd(t,e),t.prototype.updateData=function(e,t,n,i){var r=this,o=e.hostModel,a=e.getItemModel(t),s=a.getModel("emphasis"),l=e.getItemLayout(t),u=bh(_R(a.getModel("itemStyle"),l,!0),l);if(isNaN(u.startAngle))r.setShape(u);else{if(i){r.setShape(u);var c=o.getShallow("animationType");o.ecModel.ssr?(Qw(r,{scaleX:0,scaleY:0},o,{dataIndex:t,isFrom:!0}),r.originX=u.cx,r.originY=u.cy):"scale"===c?(r.shape.r=l.r0,Qw(r,{shape:{r:l.r}},o,t)):null!=n?(r.setShape({startAngle:n,endAngle:n}),Qw(r,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},o,t)):(r.shape.endAngle=l.startAngle,Jw(r,{shape:{endAngle:l.endAngle}},o,t))}else rC(r),Jw(r,{shape:u},o,t);r.useStyle(e.getItemVisual(t,"style")),Nb(r,a);var d=(l.startAngle+l.endAngle)/2,h=o.get("selectedOffset"),p=Math.cos(d)*h,f=Math.sin(d)*h,g=a.getShallow("cursor");g&&r.attr("cursor",g),this._updateLabel(o,e,t),r.ensureState("emphasis").shape=bh({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},_R(s.getModel("itemStyle"),l)),bh(r.ensureState("select"),{x:p,y:f,shape:_R(a.getModel(["select","itemStyle"]),l)}),bh(r.ensureState("blur"),{shape:_R(a.getModel(["blur","itemStyle"]),l)});var m=r.getTextGuideLine(),v=r.getTextContent();m&&bh(m.ensureState("select"),{x:p,y:f}),bh(v.ensureState("select"),{x:p,y:f}),Db(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))}},t.prototype._updateLabel=function(e,t,n){var i=this,r=t.getItemModel(n),o=r.getModel("labelLine"),a=t.getItemVisual(n,"style"),s=a&&a.fill,l=a&&a.opacity;OC(i,RC(r),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:l,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var u=i.getTextContent();i.setTextConfig({position:null,rotation:null}),u.attr({z2:10});var c=e.get(["label","position"]);if("outside"!==c&&"outer"!==c)i.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Dw,this.setTextGuideLine(d)),XL(this,qL(r),{stroke:s,opacity:Zh(o.get(["lineStyle","opacity"]),l,1)})}},t}(bw),JR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return Kd(t,e),t.prototype.render=function(e,t,n,i){var r,o=e.getData(),a=this._data,s=this.group;if(!a&&o.count()>0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<o.count();++u)l=o.getItemLayout(u);l&&(r=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===o.count()&&e.get("showEmptyCircle")){var c=HR(e),d=new bw({shape:bh(GR(e,n),c)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,s.add(d)}o.diff(a).add(function(e){var t=new KR(o,e,r);o.setItemGraphicEl(e,t),s.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(o,e,r),n.off("click"),s.add(n),o.setItemGraphicEl(e,n)}).remove(function(t){iC(a.getItemGraphicEl(t),e,t)}).execute(),$R(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,r=e[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},t.type="pie",t}(fD);function QR(e,t,n){t=Lh(t)&&{coordDimensions:t}||bh({encodeDefine:e.getEncode()},t);var i=e.getSource(),r=zE(i,t).dimensions,o=new FE(r,e);return o.initData(i,n),o}var eF=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),tF=vy(),nF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new eF(Eh(this.getData,this),Eh(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return QR(this,{coordDimensions:["value"],encodeDefaulter:Nh(NM,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),i=tF(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),function(e){o.push(e)}),r=i.seats=function(e,t){var n=Dh(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var i=Math.pow(10,t),r=Ih(e,function(e){return(isNaN(e)?0:e)/n*i*100}),o=100*i,a=Ih(r,function(e){return Math.floor(e)}),s=Dh(a,function(e,t){return e+t},0),l=Ih(r,function(e,t){return e-a[t]});s<o;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,h=l.length;d<h;++d)l[d]>u&&(u=l[d],c=d);++a[c],l[c]=0,++s}return Ih(a,function(e){return e/i})}(o,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=r[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){ry(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(nD);var iF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){return YE(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(nD),rF=function(){return function(){}}(),oF=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new rF},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,i=t.points,r=t.size,o=this.symbolProxy,a=o.shape,s=e.getContext?e.getContext():e,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n<i.length;){var c=i[n++],d=i[n++];isNaN(c)||isNaN(d)||(u&&!u.contain(c,d)||(a.x=c-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],o.buildPath(e,a,!0)))}this.incremental&&(this._off=n,this.notClear=!0)}},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,i=t.size,r=this._ctx,o=this.softClipShape;if(r){for(e=this._off;e<n.length;){var a=n[e++],s=n[e++];isNaN(a)||isNaN(s)||(o&&!o.contain(a,s)||r.fillRect(a-i[0]/2,s-i[1]/2,i[0],i[1]))}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,i=n.points,r=n.size,o=Math.max(r[0],4),a=Math.max(r[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-o/2,c=i[l+1]-a/2;if(e>=u&&t>=c&&e<=u+o&&t<=c+a)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect();return e=n[0],t=n[1],i.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,i=t.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c<n.length;){var d=n[c++],h=n[c++];a=Math.min(d,a),l=Math.max(d,l),s=Math.min(h,s),u=Math.max(h,u)}e=this._rect=new xf(a-r/2,s-o/2,l-a+r,u-s+o)}return e},t}(d_),aF=function(){function e(){this.group=new mv}return e.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),i=4*e.startIndex*2;t=new Float32Array(t.buffer,i,n)}e.setShape("points",t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var i=this._newAdded[0],r=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var a=o.length,s=new Float32Array(a+r.length);s.set(o),s.set(r,a),i.endIndex=e.end,i.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:r}),this._setCommon(l,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new oF({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var i=t.hostModel;n=n||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=n.clipShape||null,e.symbolProxy=Tk(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),s=a&&a.fill;s&&e.setColor(s);var l=V_(e);l.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){l.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(l.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),sF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=cR("").reset(e,t,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var t=e.coordinateSystem;return t&&t.getArea&&t.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,i=t.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new aF:new FO,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(fD),lF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(fM),uF=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",by).models[0]},t.type="cartesian2dAxis",t}(fM);Sh(uF,QN);var cF={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},dF=xh({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},cF),hF=xh({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},cF);const pF={category:dF,value:hF,time:xh({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},hF),log:wh({logBase:10},hF)};var fF={value:1,category:1,time:1,log:1};function gF(e,t,n,i){Th(fF,function(r,o){var a=xh(xh({},pF[o],!0),i,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return Kd(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=uM(this),i=n?dM(e):{};xh(e,t.getTheme().get(o+"Axis")),xh(e,this.getDefaultOption()),e.type=mF(e),n&&cM(e,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=qE.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=t+"Axis."+o,n.defaultOption=a,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",mF)}function mF(e){return e.type||(e.data?"category":"value")}var vF=function(){function e(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return Ih(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),kh(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),yF=["x","y"];function xF(e){return"interval"===e.type||"time"===e.type}var _F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=yF,t}return Kd(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(xF(e)&&xF(t)){var n=e.getExtent(),i=t.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,c=r[0]-n[0]*l,d=r[1]-i[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=uf([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),i=this.dataToPoint(t),r=this.getArea(),o=new xf(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var i=e[0],r=e[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return Mp(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,t)),n[1]=a.toGlobalCoord(a.dataToCoord(r,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return Mp(n,e,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),t),n[1]=r.coordToData(r.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},t.prototype.getArea=function(e){e=e||0;var t=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1])-e,r=Math.min(n[0],n[1])-e,o=Math.max(t[0],t[1])-i+e,a=Math.max(n[0],n[1])-r+e;return new xf(i,r,o,a)},t}(vF),bF=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return Kd(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(SL);function wF(e,t,n){n=n||{};var i=e.coordinateSystem,r=t.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Uh(n.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var m=t.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-m:m,o.z2=1,o}function CF(e){return"cartesian2d"===e.get("coordinateSystem")}function SF(e){var t={xAxisModel:null,yAxisModel:null};return Th(t,function(n,i){var r=i.replace(/Model$/,""),o=e.getReferringComponents(r,by).models[0];if("production"!==process.env.NODE_ENV&&!o)throw new Error(r+' "'+Zh(e.get(r+"Index"),e.get(r+"Id"),0)+'" not found');t[i]=o}),t}var MF=Math.log;function TF(e,t,n){var i=sN.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=HN(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=MF(e.base);u=[MF(u[0])/h,MF(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=i.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=i.getInterval.call(e),g=u[0],m=u[1];if(c&&d)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=QE(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=QE(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=QE(f));var v=f*a;(g=Mv((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=Mv(v)):m>0&&u[1]<=0&&(m=0,g=-Mv(v))}var y,x,_,b=(r[0].value-o[0].value)/s,w=(r[a].value-o[a].value)/s;if(i.setExtent.call(e,g+f*b,m+f*w),i.setInterval.call(e,f),(b||w)&&i.setNiceExtent.call(e,g+f,m-f),"production"!==process.env.NODE_ENV){var C=i.getTicks.call(e);C[1]&&(y=f,x=Math.pow(10,Rv(Math.abs(y))),0!==(_=Math.abs(y/x))&&1!==_&&2!==_&&3!==_&&5!==_||Dv(C[1].value)>Dv(f))&&Xv("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var IF=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=yF,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;function i(e){var t,n=Ah(e),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;KE(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(UN(l,s),KE(l)&&(t=a))}r.length&&(t||UN((t=r.pop()).scale,t.model),Th(r,function(e){TF(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),i(n.x),i(n.y);var r={};Th(n.x,function(e){kF(n,"y",e,r)}),Th(n.y,function(e){kF(n,"x",e,r)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),r=!n&&e.get("containLabel"),o=sM(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){Th(a,function(e){var t=e.isHorizontal(),n=t?[0,o.width]:[0,o.height],i=e.inverse?1:0;e.setExtent(n[i],n[1-i]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?o.x:o.y)})}s(),r&&(Th(a,function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof oN?n.count():(i=n.getTicks()).length;var a,s=e.getLabelModel(),l=ZN(e),u=1;r>40&&(u=Math.ceil(r/40));for(var c=0;c<r;c+=u){var d=l(i?i[c]:{value:o[0]+c},c),h=qN(s.getTextRect(d),s.get("rotate")||0);a?a.union(h):a=h}return a}}(e);if(t){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+i,"top"===e.position?o.y+=t.height+i:"left"===e.position&&(o.x+=t.width+i)}}}),s()),Th(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}zh(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===e||r[i].getAxis("y").index===t)return r[i]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,i=e.seriesModel,r=e.xAxisModel||i&&i.getReferringComponents("xAxis",by).models[0],o=e.yAxisModel||i&&i.getReferringComponents("yAxis",by).models[0],a=e.gridModel,s=this._coordsList;if(i)Ch(s,t=i.coordinateSystem)<0&&(t=null);else if(r&&o)t=this.getCartesian(r.componentIndex,o.componentIndex);else if(r)n=this.getAxis("x",r.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(a){a.coordinateSystem===this&&(t=this._coordsList[0])}return{cartesian:t,axis:n}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var i=this,r=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};if(t.eachComponent("xAxis",l("x"),this),t.eachComponent("yAxis",l("y"),this),!s.x||!s.y)return this._axesMap={},void(this._axesList=[]);function l(t){return function(n,i){if(DF(n,e)){var l=n.get("position");"x"===t?"top"!==l&&"bottom"!==l&&(l=o.bottom?"top":"bottom"):"left"!==l&&"right"!==l&&(l=o.left?"right":"left"),o[l]=!0;var u=new bF(t,YN(n),[0,0],n.get("type"),l),c="category"===u.type;u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),n.axis=u,u.model=n,u.grid=r,u.index=i,r._axesList.push(u),a[t][i]=u,s[t]++}}}this._axesMap=a,Th(a.x,function(t,n){Th(a.y,function(r,o){var a="x"+n+"y"+o,s=new _F(a);s.master=i,s.model=e,i._coordsMap[a]=s,i._coordsList.push(s),s.addAxis(t),s.addAxis(r)})})},e.prototype._updateScale=function(e,t){function n(e,t){Th(JN(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}Th(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),"category"===e.type){var t=e.model.get("categorySortInfo");e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(CF(e)){var i=SF(e),r=i.xAxisModel,o=i.yAxisModel;if(!DF(r,t)||!DF(o,t))return;var a=this.getCartesian(r.componentIndex,o.componentIndex),s=e.getData(),l=a.getAxis("x"),u=a.getAxis("y");n(s,l),n(s,u)}},this)},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return Th(this.getCartesians(),function(i){var r=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(r);Ch(t,r)<0&&t.push(r),Ch(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var i=[];return t.eachComponent("grid",function(r,o){var a=new e(r,t,n);a.name="grid_"+o,a.resize(r,n,!0),r.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if(CF(e)){var t=SF(e),n=t.xAxisModel,i=t.yAxisModel,r=n.getCoordSysModel();if("production"!==process.env.NODE_ENV){if(!r)throw new Error('Grid "'+Zh(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==i.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var o=r.coordinateSystem;e.coordinateSystem=o.getCartesian(n.componentIndex,i.componentIndex)}}),i},e.dimensions=yF,e}();function DF(e,t){return e.getCoordSysModel()===t}function kF(e,t,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)AF(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&AF(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(e){return e.dim+"_"+e.index}}function AF(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)}(e)}var EF=Math.PI,NF=function(){function e(e,t){this.group=new mv,this.opt=t,this.axisModel=e,wh(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new mv({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!LF[e]},e.prototype.add=function(e){LF[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var i,r,o=Nv(t-e);return Lv(o)?(r=n>0?"top":"bottom",i="center"):Lv(o-EF)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o<EF?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},e}(),LF={axisLine:function(e,t,n,i){var r=t.get(["axisLine","show"]);if("auto"===r&&e.handleAutoShown&&(r=e.handleAutoShown("axisLine")),r){var o=t.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Mp(s,s,a),Mp(l,l,a));var c=bh({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new Ew({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});mC(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);Oh(h)&&(h=[h,h]),(Oh(p)||Fh(p))&&(p=[p,p]);var f=Dk(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];Th([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(t,i){if("none"!==h[i]&&null!=h[i]){var r=Tk(h[i],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;r.attr({rotation:t.rotate,x:a[0]+o*Math.cos(e.rotation),y:a[1]-o*Math.sin(e.rotation),silent:!0,z2:11}),n.add(r)}})}}},axisTickLabel:function(e,t,n,i){var r=function(e,t,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=FF(r.getTicksCoords(),t.transform,l,wh(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}(n,i,t,e),o=function(e,t,n,i){var r=n.axis,o=Uh(i.axisLabelShow,n.get(["axisLabel","show"]));if(!o||r.scale.isBlank())return;var a=n.getModel("axisLabel"),s=a.get("margin"),l=r.getViewLabels(),u=(Uh(i.labelRotate,a.get("rotate"))||0)*EF/180,c=NF.innerTextLayout(i.rotation,u,i.labelDirection),d=n.getCategories&&n.getCategories(!0),h=[],p=NF.isLabelSilent(n),f=n.get("triggerEvent");return Th(l,function(o,u){var g="ordinal"===r.scale.type?r.scale.getRawOrdinalNumber(o.tickValue):o.tickValue,m=o.formattedLabel,v=o.rawLabel,y=a;if(d&&d[g]){var x=d[g];zh(x)&&x.textStyle&&(y=new oS(x.textStyle,a,n.ecModel))}var _=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),b=r.dataToCoord(g),w=y.getShallow("align",!0)||c.textAlign,C=Yh(y.getShallow("alignMinLabel",!0),w),S=Yh(y.getShallow("alignMaxLabel",!0),w),M=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||c.textVerticalAlign,T=Yh(y.getShallow("verticalAlignMinLabel",!0),M),I=Yh(y.getShallow("verticalAlignMaxLabel",!0),M),D=new T_({x:b,y:i.labelOffset+i.labelDirection*s,rotation:c.rotation,silent:p,z2:10+(o.level||0),style:FC(y,{text:m,align:0===u?C:u===l.length-1?S:w,verticalAlign:0===u?T:u===l.length-1?I:M,fill:Ph(_)?_("category"===r.type?v:"value"===r.type?g+"":g,u):_})});if(D.anid="label_"+g,DC({el:D,componentModel:n,itemName:m,formatterParamsExtra:{isTruncated:function(){return D.isTruncated},value:v,tickIndex:u}}),f){var k=NF.makeAxisEventDataBase(n);k.targetType="axisLabel",k.value=v,k.tickIndex=u,"category"===r.type&&(k.dataIndex=g),V_(D).eventData=k}t.add(D),D.updateTransform(),h.push(D),e.add(D),D.decomposeTransform()}),h}(n,i,t,e);(function(e,t,n){if(KN(e.axis))return;var i=e.get(["axisLabel","showMinLabel"]),r=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var o=t[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],d=n[n.length-1],h=n[n.length-2];!1===i?(PF(o),PF(u)):OF(o,a)&&(i?(PF(a),PF(c)):(PF(o),PF(u)));!1===r?(PF(s),PF(d)):OF(l,s)&&(r?(PF(l),PF(h)):(PF(s),PF(d)))}(t,o,r),function(e,t,n,i){var r=n.axis,o=n.getModel("minorTick");if(!o.get("show")||r.scale.isBlank())return;var a=r.getMinorTicksCoords();if(!a.length)return;for(var s=o.getModel("lineStyle"),l=i*o.get("length"),u=wh(s.getLineStyle(),wh(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=FF(a[c],t.transform,l,u,"minorticks_"+c),h=0;h<d.length;h++)e.add(d[h])}(n,i,t,e.tickDirection),t.get(["axisLabel","hideOverlap"]))&&QL($L(Ih(o,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,i){var r=Uh(e.axisName,t.get("name"));if(r){var o,a,s=t.get("nameLocation"),l=e.nameDirection,u=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,d=t.axis.getExtent(),h=d[0]>d[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,RF(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*EF/180),RF(s)?o=NF.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,i){var r,o,a=Nv(n-e),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;Lv(a-EF/2)?(o=l?"bottom":"top",r="center"):Lv(a-1.5*EF)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*EF&&a>EF/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),m=t.get("nameTruncate",!0)||{},v=m.ellipsis,y=Uh(e.nameTruncateMaxWidth,m.maxWidth,a),x=new T_({x:p[0],y:p[1],rotation:o.rotation,silent:NF.isLabelSilent(t),style:FC(u,{text:r,font:g,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(DC({el:x,componentModel:t,itemName:r}),x.__fullText=r,x.anid="name",t.get("triggerEvent")){var _=NF.makeAxisEventDataBase(t);_.targetType="axisName",_.name=r,V_(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function PF(e){e&&(e.ignore=!0)}function OF(e,t){var n=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(n&&i){var r=nf([]);return sf(r,r,-e.rotation),n.applyTransform(of([],r,e.getLocalTransform())),i.applyTransform(of([],r,t.getLocalTransform())),n.intersect(i)}}function RF(e){return"middle"===e||"center"===e}function FF(e,t,n,i,r){for(var o=[],a=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;a[0]=u,a[1]=0,s[0]=u,s[1]=n,t&&(Mp(a,a,t),Mp(s,s,t));var c=new Ew({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});mC(c.shape,c.style.lineWidth),c.anid=r+"_"+e[l].tickValue,o.push(c)}return o}function zF(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),r=t.getComponent("axisPointer"),o=r.get("link",!0)||[],a=[];Th(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=GF(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(Th(n.getAxes(),Nh(p,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),d="cross"===u.get(["axisPointer","type"]),h=n.getTooltipAxes(u.get(["axisPointer","axis"]));(c||d)&&Th(h.baseAxes,Nh(p,!d||"cross",c)),d&&Th(h.otherAxes,Nh(p,"cross",!1))}}function p(i,s,c){var d=c.model.getModel("axisPointer",r),h=d.get("show");if(h&&("auto"!==h||i||jF(d))){null==s&&(s=d.get("triggerTooltip")),d=i?function(e,t,n,i,r,o){var a=t.getModel("axisPointer"),s={};Th(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=yh(a.get(e))}),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&wh(l,c.textStyle)}}return e.model.getModel("axisPointer",new oS(s,n,i))}(c,u,r,t,i,s):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),g=GF(c.model),m=s||p||"category"===c.type,v=e.axesInfo[g]={key:g,axis:c,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:jF(d),seriesModels:[],linkGroup:null};l[g]=v,e.seriesInvolved=e.seriesInvolved||m;var y=function(e,t){for(var n=t.model,i=t.dim,r=0;r<e.length;r++){var o=e[r]||{};if(VF(o[i+"AxisId"],n.id)||VF(o[i+"AxisIndex"],n.componentIndex)||VF(o[i+"AxisName"],n.name))return r}}(o,c);if(null!=y){var x=a[y]||(a[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=o[y].mapper,v.linkGroup=x}}}})}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),r=t.get(["tooltip","show"],!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==r&&!1!==t.get(["axisPointer","show"],!0)&&Th(e.coordSysAxesInfo[GF(n.model)],function(e){var i=e.axis;n.getAxis(i.dim)===i&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())})})}(n,e),n}function VF(e,t){return"all"===e||Lh(e)&&Ch(e,t)>=0||e===t}function BF(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[GF(e)]}function jF(e){return!!e.get(["handle","show"])}function GF(e){return e.type+"||"+e.id}var WF={},HF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(t,n,i,r){this.axisPointerClass&&function(e){var t=BF(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=jF(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),r.value=a,s&&(r.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},t.prototype.updateAxisPointer=function(e,t,n,i){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var r=t.getAxisPointerClass(this.axisPointerClass);if(r){var o=function(e){var t=BF(e);return t&&t.axisPointerModel}(e);o?(this._axisPointer||(this._axisPointer=new r)).render(e,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){if("production"!==process.env.NODE_ENV&&WF[e])throw new Error("axisPointer "+e+" exists");WF[e]=t},t.getAxisPointerClass=function(e){return e&&WF[e]},t.type="axis",t}(cD),UF=vy();function YF(e,t,n,i){var r=n.axis;if(!r.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=i.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,d=UF(e).splitAreaColors,h=rp(),p=0;if(d)for(var f=0;f<u.length;f++){var g=d.get(u[f].tickValue);if(null!=g){p=(g+(c-1)*f)%c;break}}var m=r.toGlobalCoord(u[0].coord),v=a.getAreaStyle();s=Lh(s)?s:[s];for(f=1;f<u.length;f++){var y=r.toGlobalCoord(u[f].coord),x=void 0,_=void 0,b=void 0,w=void 0;r.isHorizontal()?(x=m,_=l.y,b=y-x,w=l.height,m=x+b):(x=l.x,_=m,b=l.width,m=_+(w=y-_));var C=u[f-1].tickValue;null!=C&&h.set(C,p),t.add(new C_({anid:null!=C?"area_"+C:null,shape:{x:x,y:_,width:b,height:w},style:wh({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%c}UF(e).splitAreaColors=h}}}function ZF(e){UF(e).splitAreaColors=null}var XF=["axisLine","axisTickLabel","axisName"],qF=["splitArea","splitLine","minorSplitLine"],$F=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return Kd(t,e),t.prototype.render=function(t,n,i,r){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new mv,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=wF(a,t),l=new NF(t,bh({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),i=0;i<n.length;i++)if(KE(n[i].getOtherAxis(t.axis).scale))return!0;return!1}},s));Th(XF,l.add,l),this._axisGroup.add(l.getGroup()),Th(qF,function(e){t.get([e,"show"])&&KF[e](this,this._axisGroup,t,a)},this),r&&"changeAxisOrder"===r.type&&r.isInitSort||wC(o,this._axisGroup,t),e.prototype.render.call(this,t,n,i,r)}},t.prototype.remove=function(){ZF(this)},t.type="cartesianAxis",t}(HF),KF={splitLine:function(e,t,n,i){var r=n.axis;if(!r.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color"),l=!1!==o.get("showMinLine"),u=!1!==o.get("showMaxLine");s=Lh(s)?s:[s];for(var c=i.coordinateSystem.getRect(),d=r.isHorizontal(),h=0,p=r.getTicksCoords({tickModel:o}),f=[],g=[],m=a.getLineStyle(),v=0;v<p.length;v++){var y=r.toGlobalCoord(p[v].coord);if((0!==v||l)&&(v!==p.length-1||u)){var x=p[v].tickValue;d?(f[0]=y,f[1]=c.y,g[0]=y,g[1]=c.y+c.height):(f[0]=c.x,f[1]=y,g[0]=c.x+c.width,g[1]=y);var _=h++%s.length,b=new Ew({anid:null!=x?"line_"+x:null,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:wh({stroke:s[_]},m),silent:!0});mC(b.shape,m.lineWidth),t.add(b)}}}},minorSplitLine:function(e,t,n,i){var r=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=i.coordinateSystem.getRect(),s=r.isHorizontal(),l=r.getMinorTicksCoords();if(l.length)for(var u=[],c=[],d=o.getLineStyle(),h=0;h<l.length;h++)for(var p=0;p<l[h].length;p++){var f=r.toGlobalCoord(l[h][p].coord);s?(u[0]=f,u[1]=a.y,c[0]=f,c[1]=a.y+a.height):(u[0]=a.x,u[1]=f,c[0]=a.x+a.width,c[1]=f);var g=new Ew({anid:"minor_line_"+l[h][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:d,silent:!0});mC(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,i){YF(e,t,n,i)}},JF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="xAxis",t}($F),QF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=JF.type,t}return Kd(t,e),t.type="yAxis",t}($F),ez=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return Kd(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new C_({shape:e.coordinateSystem.getRect(),style:wh({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(cD),tz={offset:0};function nz(e){e.registerComponentView(ez),e.registerComponentModel(lF),e.registerCoordinateSystem("cartesian2d",IF),gF(e,"x",uF,tz),gF(e,"y",uF,tz),e.registerComponentView(JF),e.registerComponentView(QF),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function iz(e){e.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var r=i.getIndicatorAxes();Th(r,function(e,o){t.each(t.mapDimension(r[o].dim),function(e,t){n[t]=n[t]||[];var r=i.dataToPoint(e,o);n[t][o]=rz(r)?r:oz(i)})}),t.each(function(e){var r=function(e,t,n){if(e&&t)for(var i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i,e))return e[i]}(n[e],function(e){return rz(e)})||oz(i);n[e].push(r.slice()),t.setItemLayout(e,n[e])})}})}function rz(e){return!isNaN(e[0])&&!isNaN(e[1])}function oz(e){return[e.cx,e.cy]}function az(e){var t=e.polar;if(t){Lh(t)||(t=[t]);var n=[];Th(t,function(t,i){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Lh(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}Th(e.series,function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}var sz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=e.coordinateSystem,r=this.group,o=e.getData(),a=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle";if("none"!==n){var i=Ik(e.getItemVisual(t,"symbolSize")),r=Tk(n,-1,-1,2,2),o=e.getItemVisual(t,"symbolRotate")||0;return r.attr({style:{strokeNoScale:!0},z2:100,scaleX:i[0]/2,scaleY:i[1]/2,rotation:o*Math.PI/180||0}),r}}function l(t,n,i,r,o,a){i.removeAll();for(var l=0;l<n.length-1;l++){var u=s(r,o);u&&(u.__dimIdx=l,t[l]?(u.setPosition(t[l]),EC[a?"initProps":"updateProps"](u,{x:n[l][0],y:n[l][1]},e,o)):u.setPosition(n[l]),i.add(u))}}function u(e){return Ih(e,function(e){return[i.cx,i.cy]})}o.diff(a).add(function(t){var n=o.getItemLayout(t);if(n){var i=new Tw,r=new Dw,a={shape:{points:n}};i.shape.points=u(n),r.shape.points=u(n),Qw(i,a,e,t),Qw(r,a,e,t);var s=new mv,c=new mv;s.add(r),s.add(i),s.add(c),l(r.shape.points,n,c,o,t,!0),o.setItemGraphicEl(t,s)}}).update(function(t,n){var i=a.getItemGraphicEl(n),r=i.childAt(0),s=i.childAt(1),u=i.childAt(2),c={shape:{points:o.getItemLayout(t)}};c.shape.points&&(l(r.shape.points,c.shape.points,u,o,t,!1),rC(s),rC(r),Jw(r,c,e),Jw(s,c,e),o.setItemGraphicEl(t,i))}).remove(function(e){r.remove(a.getItemGraphicEl(e))}).execute(),o.eachItemGraphicEl(function(e,t){var n=o.getItemModel(t),i=e.childAt(0),a=e.childAt(1),s=e.childAt(2),l=o.getItemVisual(t,"style"),u=l.fill;r.add(e),i.useStyle(wh(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),Nb(i,n,"lineStyle"),Nb(a,n,"areaStyle");var c=n.getModel("areaStyle"),d=c.isEmpty()&&c.parentModel.isEmpty();a.ignore=d,Th(["emphasis","select","blur"],function(e){var t=n.getModel([e,"areaStyle"]),i=t.isEmpty()&&t.parentModel.isEmpty();a.ensureState(e).ignore=i&&d}),a.useStyle(wh(c.getAreaStyle(),{fill:u,opacity:.7,decal:l.decal}));var h=n.getModel("emphasis"),p=h.getModel("itemStyle").getItemStyle();s.eachChild(function(e){if(e instanceof m_){var i=e.style;e.useStyle(bh({image:i.image,x:i.x,y:i.y,width:i.width,height:i.height},l))}else e.useStyle(l),e.setColor(u),e.style.strokeNoScale=!0;e.ensureState("emphasis").style=yh(p);var r=o.getStore().get(o.getDimensionIndex(e.__dimIdx),t);(null==r||isNaN(r))&&(r=""),OC(e,RC(n),{labelFetcher:o.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:r,inheritColor:u,defaultOpacity:l.opacity})}),Db(e,h.get("focus"),h.get("blurScope"),h.get("disabled"))}),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.type="radar",t}(fD),lz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new eF(Eh(this.getData,this),Eh(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return QR(this,{generateCoord:"indicator_",generateCoordCount:1/0})},t.prototype.formatTooltip=function(e,t,n){var i=this.getData(),r=this.coordinateSystem.getIndicatorAxes(),o=this.getData().getName(e),a=""===o?this.name:o,s=qI(this,e);return BI("section",{header:a,sortBlocks:!0,blocks:Ih(r,function(t){var n=i.get(i.mapDimension(t.dim),e);return BI("nameValue",{markerType:"subItem",markerColor:s,name:t.name,value:n,sortParam:n})})})},t.prototype.getTooltipPosition=function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,i=t.getValues(Ih(n.dimensions,function(e){return t.mapDimension(e)}),e),r=0,o=i.length;r<o;r++)if(!isNaN(i[r])){var a=n.getIndicatorAxes();return n.coordToPoint(a[r].dataToCoord(i[r]),r)}},t.type="series.radar",t.dependencies=["radar"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},t}(nD),uz=pF.value;function cz(e,t){return wh({show:t},e)}var dz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.optionUpdated=function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),r=this.get("axisTick"),o=this.get("axisLabel"),a=this.get("axisName"),s=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),u=this.get("axisNameGap"),c=this.get("triggerEvent"),d=Ih(this.get("indicator")||[],function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var h=a;null!=d.color&&(h=wh({color:d.color},a));var p=xh(yh(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:d.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:h,triggerEvent:c},!1);if(Oh(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else Ph(l)&&(p.name=l(p.name,p));var g=new oS(p,null,this.ecModel);return Sh(g,QN.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:xh({lineStyle:{color:"#bbb"}},uz.axisLine),axisLabel:cz(uz.axisLabel,!1),axisTick:cz(uz.axisTick,!1),splitLine:cz(uz.splitLine,!0),splitArea:cz(uz.splitArea,!0),indicator:[]},t}(fM),hz=["axisLine","axisTickLabel","axisName"],pz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var t=e.coordinateSystem;Th(Ih(t.getIndicatorAxes(),function(e){var n=e.model.get("showName")?e.name:"";return new NF(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){Th(hz,e.add,e),this.group.add(e.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var i=e.get("shape"),r=e.getModel("splitLine"),o=e.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),c=a.get("color"),d=s.get("color"),h=Lh(c)?c:[c],p=Lh(d)?d:[d],f=[],g=[];if("circle"===i)for(var m=n[0].getTicksCoords(),v=t.cx,y=t.cy,x=0;x<m.length;x++){if(l)f[I(f,h,x)].push(new rw({shape:{cx:v,cy:y,r:m[x].coord}}));if(u&&x<m.length-1)g[I(g,p,x)].push(new Cw({shape:{cx:v,cy:y,r0:m[x].coord,r:m[x+1].coord}}))}else{var _,b=Ih(n,function(e,n){var i=e.getTicksCoords();return _=null==_?i.length-1:Math.min(i.length-1,_),Ih(i,function(e){return t.coordToPoint(e.coord,n)})}),w=[];for(x=0;x<=_;x++){for(var C=[],S=0;S<n.length;S++)C.push(b[S][x]);if(C[0]?C.push(C[0].slice()):process.env.NODE_ENV,l)f[I(f,h,x)].push(new Dw({shape:{points:C}}));if(u&&w)g[I(g,p,x-1)].push(new Tw({shape:{points:C.concat(w)}}));w=C.slice().reverse()}}var M=a.getLineStyle(),T=s.getAreaStyle();Th(g,function(e,t){this.group.add(fC(e,{style:wh({stroke:"none",fill:p[t%p.length]},T),silent:!0}))},this),Th(f,function(e,t){this.group.add(fC(e,{style:wh({fill:"none",stroke:h[t%h.length]},M),silent:!0}))},this)}function I(e,t,n){var i=n%t.length;return e[i]=e[i]||[],i}},t.type="radar",t}(cD),fz=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.type="value",r.angle=0,r.name="",r}return Kd(t,e),t}(SL),gz=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=Ih(e.getIndicatorModels(),function(e,t){var n="indicator_"+t,i=new fz(n,new sN);return i.name=e.get("name"),i.model=e,e.axis=i,this.dimensions.push(n),i},this),this.resize(e,n)}return e.prototype.getIndicatorAxes=function(){return this._indicatorAxes},e.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},e.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},e.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var r,o=Math.atan2(-n,t),a=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(o-u.angle);c<a&&(r=u,s=l,a=c)}return[s,+(r&&r.coordToData(i))]},e.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),r=t.getHeight(),o=Math.min(i,r)/2;this.cx=Sv(n[0],i),this.cy=Sv(n[1],r),this.startAngle=e.get("startAngle")*Math.PI/180;var a=e.get("radius");(Oh(a)||Fh(a))&&(a=[0,a]),this.r0=Sv(a[0],o),this.r=Sv(a[1],o),Th(this._indicatorAxes,function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n},this)},e.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;Th(n,function(e){e.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(t,r){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===i){var o=t.getData();Th(n,function(e){e.scale.unionExtentFromData(o,o.mapDimension(e.dim))})}},this);var r=i.get("splitNumber"),o=new sN;o.setExtent(0,r),o.setInterval(1),Th(n,function(e,t){TF(e.scale,e.model,o)})},e.prototype.convertToPixel=function(e,t,n){return null},e.prototype.convertFromPixel=function(e,t,n){return null},e.prototype.containPoint=function(e){return!1},e.create=function(t,n){var i=[];return t.eachComponent("radar",function(r){var o=new e(r,t,n);i.push(o),r.coordinateSystem=o}),t.eachSeriesByType("radar",function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("radarIndex")||0])}),i},e.dimensions=[],e}();function mz(e){e.registerCoordinateSystem("radar",gz),e.registerComponentModel(dz),e.registerComponentView(pz),e.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(e){t.setItemVisual(e,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}var vz="\0_ec_interaction_mutex";function yz(e,t){return!!xz(e)[t]}function xz(e){return e[vz]||(e[vz]={})}nE({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},up);var _z=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var i=Eh(n._mousedownHandler,n),r=Eh(n._mousemoveHandler,n),o=Eh(n._mouseupHandler,n),a=Eh(n._mousewheelHandler,n),s=Eh(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=wh(yh(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",r),t.on("mouseup",o)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",i),t.off("mousemove",r),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return Kd(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!Kp(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,i)&&(this._x=n,this._y=i,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&Cz("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!yz(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,i=this._x,r=this._y,o=t-i,a=n-r;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&$p(e.event),wz(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:i,oldY:r,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Kp(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=Cz("zoomOnMouseWheel",e,this._opt),n=Cz("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,r=Math.abs(i),o=e.offsetX,a=e.offsetY;if(0!==i&&(t||n)){if(t){var s=r>3?1.4:r>1?1.2:1.1;bz(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);bz(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){yz(this._zr,"globalPan")||bz(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Ap);function bz(e,t,n,i,r){e.pointerChecker&&e.pointerChecker(i,r.originX,r.originY)&&($p(i.event),wz(e,t,n,i,r))}function wz(e,t,n,i,r){r.isAvailableBehavior=Eh(Cz,null,n,i),e.trigger(t,r)}function Cz(e,t,n){var i=n[e];return!e||i&&(!Oh(i)||t.event[i+"Key"])}function Sz(e,t,n){var i=e.target;i.x+=t,i.y+=n,i.dirty()}function Mz(e,t,n,i){var r=e.target,o=e.zoomLimit,a=e.zoom=e.zoom||1;if(a*=t,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/e.zoom;e.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var Tz,Iz={axisPointer:1,tooltip:1,brush:1};function Dz(e,t,n){var i=t.getComponentByElement(e.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!Iz.hasOwnProperty(i.mainType)&&r&&r.model!==n}function kz(e){Oh(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));var t=e;for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}var Az={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Ez=Ah(Az),Nz={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Lz=Ah(Nz),Pz=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=kz(e);if("production"!==process.env.NODE_ENV&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var i=new mv;this._root=i;var r=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),s=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),Bz(n,i,null,!0,!1);for(var l,u,c=n.firstChild;c;)this._parseNode(c,i,r,null,!1,!1),c=c.nextSibling;if(function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i[0].style[i[1]]=e[i[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],o){var d=Hz(o);d.length>=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&null!=a&&null!=s&&(u=qz(l,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var h=i;(i=new mv).add(h),h.scaleX=h.scaleY=u.scale,h.x=u.x,h.y=u.y}return t.ignoreRootClip||null==a||null==s||i.setClipPath(new C_({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},e.prototype._parseNode=function(e,t,n,i,r,o){var a,s=e.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=t;else{if(!r){var u=Tz[s];if(u&&lp(Tz,s)){a=u.call(this,e,t);var c=e.getAttribute("name");if(c){var d={name:c,namedFrom:null,svgNodeTagLower:s,el:a};n.push(d),"g"===s&&(l=d)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});t.add(a)}}var h=Oz[s];if(h&&lp(Oz,s)){var p=h.call(this,e),f=e.getAttribute("id");f&&(this._defs[f]=p)}}if(a&&a.isGroup)for(var g=e.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},e.prototype._parseText=function(e,t){var n=new p_({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),function(e,t){var n=t.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",e.style.textBaseline=r}var o=t.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),e.style.textAlign=s)}}(n,t);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=void(Tz={g:function(e,t){var n=new mv;return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new C_;return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new rw;return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new Ew;return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new aw;return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n,i=e.getAttribute("points");i&&(n=Vz(i));var r=new Tw({shape:{points:n||[]},silent:!0});return zz(t,r),Bz(e,r,this._defsUsePending,!1,!1),r},polyline:function(e,t){var n,i=e.getAttribute("points");i&&(n=Vz(i));var r=new Dw({shape:{points:n||[]},silent:!0});return zz(t,r),Bz(e,r,this._defsUsePending,!1,!1),r},image:function(e,t){var n=new m_;return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",r=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new mv;return zz(t,a),Bz(e,a,this._defsUsePending,!1,!0),a},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",a=new mv;return zz(t,a),Bz(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(e,t){var n=tw(e.getAttribute("d")||"");return zz(t,n),Bz(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),Oz={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||"0",10),n=parseInt(e.getAttribute("y1")||"0",10),i=parseInt(e.getAttribute("x2")||"10",10),r=parseInt(e.getAttribute("y2")||"0",10),o=new Bw(t,n,i,r);return Rz(e,o),Fz(e,o),o},radialgradient:function(e){var t=parseInt(e.getAttribute("cx")||"0",10),n=parseInt(e.getAttribute("cy")||"0",10),i=parseInt(e.getAttribute("r")||"0",10),r=new jw(t,n,i);return Rz(e,r),Fz(e,r),r}};function Rz(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function Fz(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};Xz(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function zz(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),wh(t.__inheritedStyle,e.__inheritedStyle))}function Vz(e){for(var t=Hz(e),n=[],i=0;i<t.length;i+=2){var r=parseFloat(t[i]),o=parseFloat(t[i+1]);n.push([r,o])}return n}function Bz(e,t,n,i,r){var o=t,a=o.__inheritedStyle=o.__inheritedStyle||{},s={};1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=[],r=null;n.replace(Uz,function(e,t,n){return i.push(t,n),""});for(var o=i.length-1;o>0;o-=2){var a=i[o],s=i[o-1],l=Hz(a);switch(r=r||tf(),s){case"translate":af(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":lf(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":sf(r,r,-parseFloat(l[0])*Yz,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":of(r,[1,0,Math.tan(parseFloat(l[0])*Yz),1,0,0],r);break;case"skewY":of(r,[1,Math.tan(parseFloat(l[0])*Yz),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}t.setLocalTransform(r)}}(e,t),Xz(e,a,s),i||function(e,t,n){for(var i=0;i<Ez.length;i++){var r=Ez[i];null!=(o=e.getAttribute(r))&&(t[Az[r]]=o)}for(i=0;i<Lz.length;i++){var o;r=Lz[i];null!=(o=e.getAttribute(r))&&(n[Nz[r]]=o)}}(e,a,s)),o.style=o.style||{},null!=a.fill&&(o.style.fill=Gz(o,"fill",a.fill,n)),null!=a.stroke&&(o.style.stroke=Gz(o,"stroke",a.stroke,n)),Th(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(e){null!=a[e]&&(o.style[e]=parseFloat(a[e]))}),Th(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(e){null!=a[e]&&(o.style[e]=a[e])}),r&&(o.__selfStyle=s),a.lineDash&&(o.style.lineDash=Ih(Hz(a.lineDash),function(e){return parseFloat(e)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(o.invisible=!0),"none"===a.display&&(o.ignore=!0)}var jz=/^url\(\s*#(.*?)\)/;function Gz(e,t,n,i){var r=n&&n.match(jz);if(!r)return"none"===n&&(n=null),n;var o=Kh(r[1]);i.push([e,t,o])}var Wz=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Hz(e){return e.match(Wz)||[]}var Uz=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Yz=Math.PI/180;var Zz=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Xz(e,t,n){var i,r=e.getAttribute("style");if(r)for(Zz.lastIndex=0;null!=(i=Zz.exec(r));){var o=i[1],a=lp(Az,o)?Az[o]:null;a&&(t[a]=i[2]);var s=lp(Nz,o)?Nz[o]:null;s&&(n[s]=i[2])}}function qz(e,t){var n=t.width/e.width,i=t.height/e.height,r=Math.min(n,i);return{scale:r,x:-(e.x+e.width/2)*r+(t.x+t.width/2),y:-(e.y+e.height/2)*r+(t.y+t.height/2)}}var $z=rp(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Kz=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=rp(),this._freedGraphics=[],this._mapName=e,this._parsedXML=kz(t)}return e.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=function(e){var t=[],n=rp();return Th(e,function(e){if(null==e.namedFrom){var i=new uL(e.name,e.el);t.push(i),n.set(e.name,i)}}),{regions:t,regionsMap:n}}(e.named),n=t.regions,i=t.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},e.prototype._buildGraphic=function(e){var t,n,i,r;try{$h(null!=(n=(t=e&&(i=e,r={ignoreViewBox:!0,ignoreRootClip:!0},(new Pz).parse(i,r))||{}).root))}catch(v){throw new Error("Invalid svg format\n"+v.message)}var o=new mv;o.add(n),o.isGeoSVGGraphicRoot=!0;var a=t.width,s=t.height,l=t.viewBoxRect,u=this._boundingRect;if(!u){var c=void 0,d=void 0,h=void 0,p=void 0;if(null!=a?(c=0,h=a):l&&(c=l.x,h=l.width),null!=s?(d=0,p=s):l&&(d=l.y,p=l.height),null==c||null==d){var f=n.getBoundingRect();null==c&&(c=f.x,h=f.width),null==d&&(d=f.y,p=f.height)}u=this._boundingRect=new xf(c,d,h,p)}if(l){var g=qz(l,u);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}o.setClipPath(new C_({shape:u.plain()}));var m=[];return Th(t.named,function(e){var t;null!=$z.get(e.svgNodeTagLower)&&(m.push(e),(t=e.el).silent=!1,t.isGroup&&t.traverse(function(e){e.silent=!1}))}),{root:o,boundingRect:u,named:m}},e.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},e.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},e}();for(var Jz=[126,25],Qz="南海诸岛",eV=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],tV=0;tV<eV.length;tV++)for(var nV=0;nV<eV[tV].length;nV++)eV[tV][nV][0]/=10.5,eV[tV][nV][1]/=-14,eV[tV][nV][0]+=Jz[0],eV[tV][nV][1]+=Jz[1];var iV={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var rV=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var oV=function(){function e(e,t,n){var i;this.type="geoJSON",this._parsedMap=rp(),this._mapName=e,this._specialAreas=n,this._geoJSON=Oh(i=t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(i):new Function("return ("+i+");")():i}return e.prototype.load=function(e,t){t=t||"name";var n=this._parsedMap.get(t);if(!n){var i=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:i,boundingRect:aV(i)})}var r=rp(),o=[];return Th(n.regions,function(t){var n=t.name;e&&lp(e,n)&&(t=t.cloneShallow(n=e[n])),o.push(t),r.set(n,t)}),{regions:o,boundingRect:n.boundingRect||new xf(0,0,0,0),regionsMap:r}},e.prototype._parseToRegions=function(e){var t,n=this._mapName,i=this._geoJSON;try{t=i?hL(i,e):[]}catch(r){throw new Error("Invalid geoJson format\n"+r.message)}return function(e,t){if("china"===e){for(var n=0;n<t.length;n++)if(t[n].name===Qz)return;t.push(new lL(Qz,Ih(eV,function(e){return{type:"polygon",exterior:e}}),Jz))}}(n,t),Th(t,function(e){var t=e.name;!function(e,t){if("china"===e){var n=iV[t.name];if(n){var i=t.getCenter();i[0]+=n[0]/10.5,i[1]+=-n[1]/14,t.setCenter(i)}}}(n,e),function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:rV[0]})}(n,e);var i=this._specialAreas&&this._specialAreas[t];i&&e.transformTo(i.left,i.top,i.width,i.height)},this),t},e.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},e}();function aV(e){for(var t,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return t}var sV=rp();const lV=function(e,t,n){if(t.svg){var i=new Kz(e,t.svg);sV.set(e,i)}else{var r=t.geoJson||t.geoJSON;r&&!t.features?n=t.specialAreas:r=t;i=new oV(e,r,n);sV.set(e,i)}},uV=function(e){return sV.get(e)},cV=function(e){var t=sV.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},dV=function(e,t,n){var i=sV.get(e);if(i)return i.load(t,n);process.env.NODE_ENV};var hV=["rect","circle","line","ellipse","polygon","polyline","path"],pV=rp(hV),fV=rp(hV.concat(["g"])),gV=rp(hV.concat(["g"])),mV=vy();function vV(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function yV(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var xV=function(){function e(e){var t=new mv;this.uid=sS("ec_map_draw"),this._controller=new _z(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new mv),t.add(this._svgGroup=new mv)}return e.prototype.draw=function(e,t,n,i,r){var o="geo"===e.mainType,a=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(t){a||t.getHostGeoModel()!==e||(a=t.getData())});var s=e.coordinateSystem,l=this._regionsGroup,u=this.group,c=s.getTransformInfo(),d=c.raw,h=c.roam;!l.childAt(0)||r?(u.x=h.x,u.y=h.y,u.scaleX=h.scaleX,u.scaleY=h.scaleY,u.dirty()):Jw(u,h,e);var p=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0,f={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:p,isGeo:o,transformInfoRaw:d};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,i)},e.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=rp(),n=rp(),i=this._regionsGroup,r=e.transformInfoRaw,o=e.mapOrGeoModel,a=e.data,s=e.geo.projection,l=s&&s.stream;function u(e,t){return t&&(e=t(e)),e&&[e[0]*r.scaleX+r.x,e[1]*r.scaleY+r.y]}function c(e){for(var t=[],n=!l&&s&&s.project,i=0;i<e.length;++i){var r=u(e[i],n);r&&t.push(r)}return t}function d(e){return{shape:{points:c(e)}}}i.removeAll(),Th(e.geo.regions,function(r){var c=r.name,h=t.get(c),p=n.get(c)||{},f=p.dataIdx,g=p.regionModel;if(!h){h=t.set(c,new mv),i.add(h),f=a?a.indexOfName(c):null;var m=(g=e.isGeo?o.getRegionModel(c):a?a.getItemModel(f):null).get("silent",!0);null!=m&&(h.silent=m),n.set(c,{dataIdx:f,regionModel:g})}var v=[],y=[];Th(r.geometries,function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);l&&(t=MV(t,l)),Th(t,function(e){v.push(new Tw(d(e)))})}else{var n=e.points;l&&(n=MV(n,l,!0)),Th(n,function(e){y.push(new Dw(d(e)))})}});var x=u(r.getCenter(),s&&s.project);function _(t,n){if(t.length){var i=new zw({culling:!0,segmentIgnoreThreshold:1,shape:{paths:t}});h.add(i),_V(e,i,f,g),bV(e,i,c,g,o,f,x),n&&(yV(i),Th(i.states,yV))}}_(v),_(y,!0)}),t.each(function(t,i){var r=n.get(i),a=r.dataIdx,s=r.regionModel;wV(e,t,i,s,o,a),CV(e,t,i,s,o),SV(e,t,i,s,o)},this)},e.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=rp(),r=!1;Th(this._svgGraphicRecord.named,function(t){var n=t.name,o=e.mapOrGeoModel,a=e.data,s=t.svgNodeTagLower,l=t.el,u=a?a.indexOfName(n):null,c=o.getRegionModel(n);null!=pV.get(s)&&l instanceof sx&&_V(e,l,u,c),l instanceof sx&&(l.culling=!0);var d=c.get("silent",!0);(null!=d&&(l.silent=d),l.z2EmphasisLift=0,t.namedFrom)||(null!=gV.get(s)&&bV(e,l,n,c,o,u,null),wV(e,l,n,c,o,u),CV(e,l,n,c,o),null!=fV.get(s)&&("self"===SV(e,l,n,c,o)&&(r=!0),(i.get(n)||i.set(n,[])).push(l)))},this),this._enableBlurEntireSVG(r,e)},e.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(function(e){if(!e.isGroup){db(e);var t=e.ensureState("blur").style||{};null==t.opacity&&null!=n&&(t.opacity=n),e.ensureState("emphasis")}})}},e.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},e.prototype.findHighDownDispatchers=function(e,t){if(null==e)return[];var n=t.coordinateSystem;if("geoJSON"===n.resourceType){var i=this._regionsGroupByName;if(i){var r=i.get(e);return r?[r]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},e.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},e.prototype._useSVG=function(e){var t=uV(e);if(t&&"geoSVG"===t.type){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},e.prototype._freeSVG=function(){var e=this._svgMapName;if(null!=e){var t=uV(e);t&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},e.prototype._updateController=function(e,t,n){var i=e.coordinateSystem,r=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=i.getZoom(),r.enable(e.get("roam")||!1);var a=e.mainType;function s(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=e.id,t}r.off("pan").on("pan",function(e){this._mouseDownFlag=!1,Sz(o,e.dx,e.dy),n.dispatchAction(bh(s(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))},this),r.off("zoom").on("zoom",function(e){this._mouseDownFlag=!1,Mz(o,e.scale,e.originX,e.originY),n.dispatchAction(bh(s(),{totalZoom:o.zoom,zoom:e.scale,originX:e.originX,originY:e.originY,animation:{duration:0}}))},this),r.setPointerChecker(function(t,r,o){return i.containPoint([r,o])&&!Dz(t,n,e)})},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=mV(t).ignore)})},e.prototype._updateMapSelectHandler=function(e,t,n,i){var r=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){r._mouseDownFlag=!0}),t.on("click",function(e){r._mouseDownFlag&&(r._mouseDownFlag=!1)}))},e}();function _V(e,t,n,i){var r=i.getModel("itemStyle"),o=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=vV(r),u=vV(o),c=vV(s),d=vV(a),h=e.data;if(h){var p=h.getItemVisual(n,"style"),f=h.getItemVisual(n,"decal");e.isVisualEncodedByVisualMap&&p.fill&&(l.fill=p.fill),f&&(l.decal=Qk(f,e.api))}t.setStyle(l),t.style.strokeNoScale=!0,t.ensureState("emphasis").style=u,t.ensureState("select").style=c,t.ensureState("blur").style=d,db(t)}function bV(e,t,n,i,r,o,a){var s=e.data,l=e.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),o)),c=s&&s.getItemLayout(o);if(l||u||c&&c.showLabel){var d=l?n:o,h=void 0;(!s||o>=0)&&(h=r);var p=a?{normal:{align:"center",verticalAlign:"middle"}}:null;OC(t,RC(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=t.getTextContent();if(f&&(mV(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function wV(e,t,n,i,r,o){e.data?e.data.setItemGraphicEl(o,t):V_(t).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function CV(e,t,n,i,r){e.data||DC({el:t,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function SV(e,t,n,i,r){t.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return Db(t,a,o.get("blurScope"),o.get("disabled")),e.isGeo&&function(e,t,n){var i=V_(e);i.componentMainType=t.mainType,i.componentIndex=t.componentIndex,i.componentHighDownName=n}(t,r,n),a}function MV(e,t,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),Th(e,function(e){s.lineStart();for(var t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()}),!n&&s.polygonEnd(),r}var TV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!e.getHostGeoModel()){if(this._mapDraw&&i&&"geoRoam"===i.type&&this._mapDraw.resetForLabelLayout(),i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===e.id)(o=this._mapDraw)&&r.add(o.group);else if(e.needsDrawMap){var o=this._mapDraw||new xV(n);r.add(o.group),o.draw(e,t,n,this,i),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},t.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e,t,n){var i=e.originalData,r=this.group;i.each(i.mapDimension("value"),function(t,n){if(!isNaN(t)){var o=i.getItemLayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new rw({style:{fill:e.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var u=e.mainSeries.getData(),c=i.getName(n),d=u.indexOfName(c),h=i.getItemModel(n),p=h.getModel("label"),f=u.getItemGraphicEl(d);OC(l,RC(h),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:c}),l.disableLabelAnimation=!0,p.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(e){ub(l,e)}}r.add(l)}}})},t.type="map",t}(fD),IV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,i=n.getRegion(t);return i&&n.dataToPoint(i.getCenter())}},n}return Kd(t,e),t.prototype.getInitialData=function(e){for(var t=QR(this,{coordDimensions:["value"],encodeDefaulter:Nh(NM,this)}),n=rp(),i=[],r=0,o=t.count();r<o;r++){var a=t.getName(r);n.set(a,r)}return Th(dV(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(e){var r,o=e.name,a=n.get(o),s=e.properties&&e.properties.echartsStyle;null==a?(r={name:o},i.push(r)):r=t.getRawDataItem(a),s&&xh(r,s)}),t.appendData(i),t},t.prototype.getHostGeoModel=function(){var e=this.option.geoIndex;return null!=e?this.ecModel.getComponent("geo",e):null},t.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},t.prototype.getRawValue=function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},t.prototype.getRegionModel=function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},t.prototype.formatTooltip=function(e,t,n){for(var i=this.getData(),r=this.getRawValue(e),o=i.getName(e),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(o),c=i.mapDimension("value");isNaN(a[l].originalData.get(c,u))||s.push(a[l].name)}return BI("section",{header:s.join(", "),noHeader:!s.length,blocks:[BI("nameValue",{name:o,value:r})]})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.getLegendIcon=function(e){var t=e.icon||"roundRect",n=Tk(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke="none",t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(nD);function DV(e){var t={};e.eachSeriesByType("map",function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)}),Th(t,function(e,t){for(var n,i,r,o=(n=Ih(e,function(e){return e.getData()}),i=e[0].get("mapValueCalculation"),r={},Th(n,function(e){e.each(e.mapDimension("value"),function(t,n){var i="ec-"+e.getName(n);r[i]=r[i]||[],isNaN(t)||r[i].push(t)})}),n[0].map(n[0].mapDimension("value"),function(e,t){for(var o="ec-"+n[0].getName(t),a=0,s=1/0,l=-1/0,u=r[o].length,c=0;c<u;c++)s=Math.min(s,r[o][c]),l=Math.max(l,r[o][c]),a+=r[o][c];return 0===u?NaN:"min"===i?s:"max"===i?l:"average"===i?a/u:a})),a=0;a<e.length;a++)e[a].originalData=e[a].getData();for(a=0;a<e.length;a++)e[a].seriesGroup=e,e[a].needsDrawMap=0===a&&!e[a].getHostGeoModel(),e[a].setData(o.cloneShallow()),e[a].mainSeries=e[0]})}function kV(e){var t={};e.eachSeriesByType("map",function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!t[i]){var r={};Th(n.seriesGroup,function(t){var n=t.coordinateSystem,i=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&i.each(i.mapDimension("value"),function(e,t){var o=i.getName(t),a=n.getRegion(o);if(a&&!isNaN(e)){var s=r[o]||0,l=n.dataToPoint(a.getCenter());r[o]=s+1,i.setItemLayout(t,{point:l,offset:s})}})});var o=n.getData();o.each(function(e){var t=o.getName(e),n=o.getItemLayout(e)||{};n.showLabel=!r[t],o.setItemLayout(e,n)}),t[i]=!0}})}var AV=Mp,EV=function(e){function t(t){var n=e.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Xm,n._rawTransformable=new Xm,n.name=t,n}return Kd(t,e),t.prototype.setBoundingRect=function(e,t,n,i){return this._rect=new xf(e,t,n,i),this._rect},t.prototype.getBoundingRect=function(){return this._rect},t.prototype.setViewRect=function(e,t,n,i){this._transformTo(e,t,n,i),this._viewRect=new xf(e,t,n,i)},t.prototype._transformTo=function(e,t,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new xf(e,t,n,i));var a=o.parent;o.parent=null,o.decomposeTransform(),o.parent=a,this._updateTransform()},t.prototype.setCenter=function(e,t){e&&(this._center=[Sv(e[0],t.getWidth()),Sv(e[1],t.getHeight())],this._updateCenterAndZoom())},t.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},t.prototype.getDefaultCenter=function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},t.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},t.prototype.getZoom=function(){return this._zoom||1},t.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},t.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),r=this.getZoom();i=Mp([],i,e),n=Mp([],n,e),t.originX=i[0],t.originY=i[1],t.x=n[0]-i[0],t.y=n[1]-i[1],t.scaleX=t.scaleY=r,this._updateTransform()},t.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),rf(this.transform||(this.transform=[]),t.transform||[1,0,0,1,0,0]),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],uf(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new Xm;return n.transform=t.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},t.prototype.getViewRect=function(){return this._viewRect},t.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},t.prototype.dataToPoint=function(e,t,n){var i=t?this._rawTransform:this.transform;return n=n||[],i?AV(n,e,i):hp(n,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?AV([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,n){var i=NV(t);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var i=NV(t);return i===this?i.pointToData(n):null},t.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},t.dimensions=["x","y"],t}(Xm);function NV(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var LV={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},PV=["lng","lat"],OV=function(e){function t(t,n,i){var r=e.call(this,t)||this;r.dimensions=PV,r.type="geo",r._nameCoordMap=rp(),r.map=n;var o,a=i.projection,s=dV(n,i.nameMap,i.nameProperty),l=uV(n),u=r.resourceType=l?l.type:null,c=r.regions=s.regions,d=LV[l.type];if(r._regionsMap=s.regionsMap,r.regions=s.regions,"production"!==process.env.NODE_ENV&&a&&("geoSVG"===u&&("production"!==process.env.NODE_ENV&&Xv("Map "+n+" with SVG source can't use projection. Only GeoJSON source supports projection."),a=null),a.project&&a.unproject||("production"!==process.env.NODE_ENV&&Xv("project and unproject must be both provided in the projeciton."),a=null)),r.projection=a,a)for(var h=0;h<c.length;h++){var p=c[h].getBoundingRect(a);(o=o||p.clone()).union(p)}else o=s.boundingRect;return r.setBoundingRect(o.x,o.y,o.width,o.height),r.aspectScale=a?1:Yh(i.aspectScale,d.aspectScale),r._invertLongitute=!a&&d.invertLongitute,r}return Kd(t,e),t.prototype._transformTo=function(e,t,n,i){var r=this.getBoundingRect(),o=this._invertLongitute;r=r.clone(),o&&(r.y=-r.y-r.height);var a=this._rawTransformable;a.transform=r.calculateTransform(new xf(e,t,n,i));var s=a.parent;a.parent=null,a.decomposeTransform(),a.parent=s,o&&(a.scaleY=-a.scaleY),this._updateTransform()},t.prototype.getRegion=function(e){return this._regionsMap.get(e)},t.prototype.getRegionByCoord=function(e){for(var t=this.regions,n=0;n<t.length;n++){var i=t[n];if("geoJSON"===i.type&&i.contain(e))return t[n]}},t.prototype.addGeoCoord=function(e,t){this._nameCoordMap.set(e,t)},t.prototype.getGeoCoord=function(e){var t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()},t.prototype.dataToPoint=function(e,t,n){if(Oh(e)&&(e=this.getGeoCoord(e)),e){var i=this.projection;return i&&(e=i.project(e)),e&&this.projectedToPoint(e,t,n)}},t.prototype.pointToData=function(e){var t=this.projection;return t&&(e=t.unproject(e)),e&&this.pointToProjected(e)},t.prototype.pointToProjected=function(t){return e.prototype.pointToData.call(this,t)},t.prototype.projectedToPoint=function(t,n,i){return e.prototype.dataToPoint.call(this,t,n,i)},t.prototype.convertToPixel=function(e,t,n){var i=RV(t);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var i=RV(t);return i===this?i.pointToData(n):null},t}(EV);function RV(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",by).models[0]||{}).coordinateSystem:null}function FV(e,t){var n=e.get("boundingCoords");if(null!=n){var i=n[0],r=n[1];if(isFinite(i[0])&&isFinite(i[1])&&isFinite(r[0])&&isFinite(r[1])){var o=this.projection;if(o){var a=i[0],s=i[1],l=r[0],u=r[1];i=[1/0,1/0],r=[-1/0,-1/0];var c=function(e,t,n,a){for(var s=n-e,l=a-t,u=0;u<=100;u++){var c=u/100,d=o.project([e+s*c,t+l*c]);Tp(i,i,d),Ip(r,r,d)}};c(a,s,l,s),c(l,s,l,u),c(l,u,a,u),c(a,u,l,s)}this.setBoundingRect(i[0],i[1],r[0]-i[0],r[1]-i[1])}else process.env.NODE_ENV}var d,h,p,f=this.getBoundingRect(),g=e.get("layoutCenter"),m=e.get("layoutSize"),v=t.getWidth(),y=t.getHeight(),x=f.width/f.height*this.aspectScale,_=!1;if(g&&m&&(d=[Sv(g[0],v),Sv(g[1],y)],h=Sv(m,Math.min(v,y)),isNaN(d[0])||isNaN(d[1])||isNaN(h)?process.env.NODE_ENV:_=!0),_)p={},x>1?(p.width=h,p.height=h/x):(p.height=h,p.width=h*x),p.y=d[1]-p.height/2,p.x=d[0]-p.width/2;else{var b=e.getBoxLayoutParams();b.aspect=x,p=sM(b,{width:v,height:y})}this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center"),t),this.setZoom(e.get("zoom"))}Sh(OV,EV);var zV=function(){function e(){this.dimensions=PV}return e.prototype.create=function(e,t){var n=[];function i(e){return{nameProperty:e.get("nameProperty"),aspectScale:e.get("aspectScale"),projection:e.get("projection")}}e.eachComponent("geo",function(e,r){var o=e.get("map"),a=new OV(o+r,o,bh({nameMap:e.get("nameMap")},i(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=FV,a.resize(e,t)}),e.eachSeries(function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}});var r={};return e.eachSeriesByType("map",function(e){if(!e.getHostGeoModel()){var t=e.getMapType();r[t]=r[t]||[],r[t].push(e)}}),Th(r,function(e,r){var o=Ih(e,function(e){return e.get("nameMap")}),a=new OV(r,r,bh({nameMap:_h(o)},i(e[0])));a.zoomLimit=Uh.apply(null,Ih(e,function(e){return e.get("scaleLimit")})),n.push(a),a.resize=FV,a.resize(e[0],t),Th(e,function(e){e.coordinateSystem=a,function(e,t){Th(t.get("geoCoord"),function(t,n){e.addGeoCoord(n,t)})}(a,e)})}),n},e.prototype.getFilledRegions=function(e,t,n,i){for(var r=(e||[]).slice(),o=rp(),a=0;a<r.length;a++)o.set(r[a].name,r[a]);return Th(dV(t,n,i).regions,function(e){var t=e.name,n=o.get(t),i=e.properties&&e.properties.echartsStyle;n||(n={name:t},r.push(n)),i&&xh(n,i)}),r},e}(),VV=new zV,BV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(e,t,n){var i=uV(e.map);if(i&&"geoJSON"===i.type){var r=e.itemStyle=e.itemStyle||{};"color"in r||(r.color="#eee")}this.mergeDefaultAndTheme(e,n),ry(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=VV.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=Dh(t.regions||[],function(t,i){var r=i.name;return r&&(t.set(r,new oS(i,e,e.ecModel)),i.selected&&(n[r]=!0)),t},rp()),t.selectedMap||(t.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new oS(null,this,this.ecModel)},t.prototype.getFormattedLabel=function(e,t){var n=this.getRegionModel(e),i="normal"===t?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),r={name:e};return Ph(i)?(r.status=t,i(r)):Oh(i)?i.replace("{a}",null!=e?e:""):void 0},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.select=function(e){var t=this.option,n=t.selectedMode;n&&("multiple"!==n&&(t.selectedMap=null),(t.selectedMap||(t.selectedMap={}))[e]=!0)},t.prototype.unSelect=function(e){var t=this.option.selectedMap;t&&(t[e]=!1)},t.prototype.toggleSelected=function(e){this[this.isSelected(e)?"unSelect":"select"](e)},t.prototype.isSelected=function(e){var t=this.option.selectedMap;return!(!t||!t[e])},t.type="geo",t.layoutMode="box",t.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},t}(fM);function jV(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function GV(e,t,n,i){var r=e.getZoom(),o=e.getCenter(),a=t.zoom,s=e.projectedToPoint?e.projectedToPoint(o):e.dataToPoint(o);if(null!=t.dx&&null!=t.dy&&(s[0]-=t.dx,s[1]-=t.dy,e.setCenter(jV(e,s),i)),null!=a){if(n){var l=n.min||0,u=n.max||1/0;a=Math.max(Math.min(r*a,u),l)/r}e.scaleX*=a,e.scaleY*=a;var c=(t.originX-e.x)*(a-1),d=(t.originY-e.y)*(a-1);e.x-=c,e.y-=d,e.updateTransform(),e.setCenter(jV(e,s),i),e.setZoom(a*r)}return{center:e.getCenter(),zoom:e.getZoom()}}var WV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return Kd(t,e),t.prototype.init=function(e,t){this._api=t},t.prototype.render=function(e,t,n,i){if(this._model=e,!e.get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new xV(n));var r=this._mapDraw;r.draw(e,t,n,this,i),r.group.on("click",this._handleRegionClick,this),r.group.silent=e.get("silent"),this.group.add(r.group),this.updateSelectStatus(e,t,n)},t.prototype._handleRegionClick=function(e){var t;fk(e.target,function(e){return null!=(t=V_(e).eventData)},!0),t&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:t.name})},t.prototype.updateSelectStatus=function(e,t,n){var i=this;this._mapDraw.group.traverse(function(e){var t=V_(e).eventData;if(t)return i._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0})},t.prototype.findHighDownDispatchers=function(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)},t.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},t.type="geo",t}(cD);function HV(e,t,n){lV(e,t,n)}function UV(e){function t(t,n){n.update="geo:updateSelectStatus",e.registerAction(n,function(e,n){var i={},r=[];return n.eachComponent({mainType:"geo",query:e},function(n){n[t](e.name),Th(n.coordinateSystem.regions,function(e){i[e.name]=n.isSelected(e.name)||!1});var o=[];Th(i,function(e,t){i[t]&&o.push(t)}),r.push({geoIndex:n.componentIndex,name:o})}),{selected:i,allSelected:r,name:e.name}})}e.registerCoordinateSystem("geo",VV),e.registerComponentModel(BV),e.registerComponentView(WV),e.registerImpl("registerMap",HV),e.registerImpl("getMap",function(e){return cV(e)}),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(e,t,n){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},function(t){var r=t.coordinateSystem;if("geo"===r.type){var o=GV(r,e,t.get("scaleLimit"),n);t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom),"series"===i&&Th(t.seriesGroup,function(e){e.setCenter(o.center),e.setZoom(o.zoom)})}})})}function YV(e,t){var n=e.isExpand?e.children:[],i=e.parentNode.children,r=e.hierNode.i?i[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,i=0,r=0;for(;--n>=0;){var o=t[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(e);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(e.hierNode.prelim=r.hierNode.prelim+t(e,r),e.hierNode.modifier=e.hierNode.prelim-o):e.hierNode.prelim=o}else r&&(e.hierNode.prelim=r.hierNode.prelim+t(e,r));e.parentNode.hierNode.defaultAncestor=function(e,t,n,i){if(t){for(var r=e,o=e,a=o.parentNode.children[0],s=t,l=r.hierNode.modifier,u=o.hierNode.modifier,c=a.hierNode.modifier,d=s.hierNode.modifier;s=$V(s),o=KV(o),s&&o;){r=$V(r),a=KV(a),r.hierNode.ancestor=e;var h=s.hierNode.prelim+d-o.hierNode.prelim-u+i(s,o);h>0&&(QV(JV(s,e,n),e,h),u+=h,l+=h),d+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,c+=a.hierNode.modifier}s&&!$V(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=d-l),o&&!KV(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=e)}return n}(e,r,e.parentNode.hierNode.defaultAncestor||i[0],t)}function ZV(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function XV(e){return arguments.length?e:eB}function qV(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function $V(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function KV(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function JV(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function QV(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function eB(e,t){return e.parentNode===t.parentNode?1:2}var tB=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),nB=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new tB},t.prototype.buildPath=function(e,t){var n=t.childPoints,i=n.length,r=t.parentPoint,o=n[0],a=n[i-1];if(1===i)return e.moveTo(r[0],r[1]),void e.lineTo(o[0],o[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=Sv(t.forkPosition,1),d=[];d[l]=r[l],d[u]=r[u]+(a[u]-r[u])*c,e.moveTo(r[0],r[1]),e.lineTo(d[0],d[1]),e.moveTo(o[0],o[1]),d[l]=o[l],e.lineTo(d[0],d[1]),d[l]=a[l],e.lineTo(d[0],d[1]),e.lineTo(a[0],a[1]);for(var h=1;h<i-1;h++){var p=n[h];e.moveTo(p[0],p[1]),d[l]=p[l],e.lineTo(d[0],d[1])}},t}(d_),iB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new mv,n}return Kd(t,e),t.prototype.init=function(e,t){this._controller=new _z(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,t,n){var i=e.getData(),r=e.layoutInfo,o=this._mainGroup;"radial"===e.get("layout")?(o.x=r.x+r.width/2,o.y=r.y+r.height/2):(o.x=r.x,o.y=r.y),this._updateViewCoordSys(e,n),this._updateController(e,t,n);var a=this._data;i.diff(a).add(function(t){rB(i,t)&&oB(i,t,null,o,e)}).update(function(t,n){var r=a.getItemGraphicEl(n);rB(i,t)?oB(i,t,r,o,e):r&&lB(a,n,r,o,e)}).remove(function(t){var n=a.getItemGraphicEl(t);n&&lB(a,t,n,o,e)}).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===e.get("expandAndCollapse")&&i.eachItemGraphicEl(function(t,i){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:i})})}),this._data=i},t.prototype._updateViewCoordSys=function(e,t){var n=e.getData(),i=[];n.each(function(e){var t=n.getItemLayout(e);!t||isNaN(t.x)||isNaN(t.y)||i.push([+t.x,+t.y])});var r=[],o=[];yx(i,r,o);var a=this._min,s=this._max;o[0]-r[0]===0&&(r[0]=a?a[0]:r[0]-1,o[0]=s?s[0]:o[0]+1),o[1]-r[1]===0&&(r[1]=a?a[1]:r[1]-1,o[1]=s?s[1]:o[1]+1);var l=e.coordinateSystem=new EV;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(r[0],r[1],o[0]-r[0],o[1]-r[1]),l.setCenter(e.get("center"),t),l.setZoom(e.get("zoom")),this.group.attr({x:l.x,y:l.y,scaleX:l.scaleX,scaleY:l.scaleY}),this._min=r,this._max=o},t.prototype._updateController=function(e,t,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker(function(t,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!Dz(t,n,e)}),r.enable(e.get("roam")),o.zoomLimit=e.get("scaleLimit"),o.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(t){Sz(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Mz(o,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),i._updateNodeAndLinkScale(e),n.updateLabelLayout()})},t.prototype._updateNodeAndLinkScale=function(e){var t=e.getData(),n=this._getNodeGlobalScale(e);t.eachItemGraphicEl(function(e,t){e.setSymbolScale(n)})},t.prototype._getNodeGlobalScale=function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,i=t.scaleX||1;return((t.getZoom()-1)*n+1)/i},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},t.type="tree",t}(fD);function rB(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function oB(e,t,n,i,r){var o=!n,a=e.tree.getNodeByDataIndex(t),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",c=e.tree.root,d=a.parentNode===c?a:a.parentNode||a,h=e.getItemGraphicEl(d.dataIndex),p=d.getLayout(),f=h?{x:h.__oldX,y:h.__oldY,rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:p,g=a.getLayout();o?((n=new NO(e,t,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,n.y=f.y):n.updateData(e,t,null,{symbolInnerColor:u,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=g.rawX,n.__radialRawY=g.rawY,i.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,Jw(n,{x:g.x,y:g.y},r);var m=n.getSymbolPath();if("radial"===r.get("layout")){var v=c.children[0],y=v.getLayout(),x=v.children.length,_=void 0,b=void 0;if(g.x===y.x&&!0===a.isExpand&&v.children.length){var w={x:(v.children[0].getLayout().x+v.children[x-1].getLayout().x)/2,y:(v.children[0].getLayout().y+v.children[x-1].getLayout().y)/2};(_=Math.atan2(w.y-y.y,w.x-y.x))<0&&(_=2*Math.PI+_),(b=w.x<y.x)&&(_-=Math.PI)}else(_=Math.atan2(g.y-y.y,g.x-y.x))<0&&(_=2*Math.PI+_),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(b=g.x<y.x)&&(_-=Math.PI):(b=g.x>y.x)||(_-=Math.PI);var C=b?"left":"right",S=s.getModel("label"),M=S.get("rotate"),T=M*(Math.PI/180),I=m.getTextContent();I&&(m.setTextConfig({position:S.get("position")||C,rotation:null==M?-_:T,origin:"center"}),I.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),k="relative"===D?op(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;k&&(V_(n).focus=k),function(e,t,n,i,r,o,a,s){var l=t.getModel(),u=e.get("edgeShape"),c=e.get("layout"),d=e.getOrient(),h=e.get(["lineStyle","curveness"]),p=e.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(g||(g=i.__edge=new Ow({shape:uB(c,d,h,r,r)})),Jw(g,{shape:uB(c,d,h,o,a)},e));else if("polyline"===u)if("orthogonal"===c){if(t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var m=t.children,v=[],y=0;y<m.length;y++){var x=m[y].getLayout();v.push([x.x,x.y])}g||(g=i.__edge=new nB({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),Jw(g,{shape:{parentPoint:[a.x,a.y],childPoints:v}},e)}}else if("production"!==process.env.NODE_ENV)throw new Error("The polyline edgeShape can only be used in orthogonal layout");g&&("polyline"!==u||t.isExpand)&&(g.useStyle(wh({strokeNoScale:!0,fill:null},f)),Nb(g,l,"lineStyle"),db(g),s.add(g))}(r,a,c,n,f,p,g,i),n.__edge&&(n.onHoverStateChange=function(t){if("blur"!==t){var i=a.parentNode&&e.getItemGraphicEl(a.parentNode.dataIndex);i&&1===i.hoverState||ub(n.__edge,t)}})}function aB(e,t,n,i,r){var o=sB(t.tree.root,e),a=o.source,s=o.sourceLayout,l=t.getItemGraphicEl(e.dataIndex);if(l){var u=t.getItemGraphicEl(a.dataIndex).__edge,c=l.__edge||(!1===a.isExpand||1===a.children.length?u:void 0),d=i.get("edgeShape"),h=i.get("layout"),p=i.get("orient"),f=i.get(["lineStyle","curveness"]);c&&("curve"===d?tC(c,{shape:uB(h,p,f,s,s),style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:r}):"polyline"===d&&"orthogonal"===i.get("layout")&&tC(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:r}))}}function sB(e,t){for(var n,i=t.parentNode===e?t:t.parentNode||t;null==(n=i.getLayout());)i=i.parentNode===e?i:i.parentNode||i;return{source:i,sourceLayout:n}}function lB(e,t,n,i,r){var o=e.tree.getNodeByDataIndex(t),a=sB(e.tree.root,o).sourceLayout,s={duration:r.get("animationDurationUpdate"),easing:r.get("animationEasingUpdate")};tC(n,{x:a.x+1,y:a.y+1},r,{cb:function(){i.remove(n),e.setItemGraphicEl(t,null)},removeOpt:s}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:s}),o.children.forEach(function(t){aB(t,e,i,r,s)}),aB(o,e,i,r,s)}function uB(e,t,n,i,r){var o,a,s,l,u,c,d,h;if("radial"===e){u=i.rawX,d=i.rawY,c=r.rawX,h=r.rawY;var p=qV(u,d),f=qV(u,d+(h-d)*n),g=qV(c,h+(d-h)*n),m=qV(c,h);return{x1:p.x||0,y1:p.y||0,x2:m.x||0,y2:m.y||0,cpx1:f.x||0,cpy1:f.y||0,cpx2:g.x||0,cpy2:g.y||0}}return u=i.x,d=i.y,c=r.x,h=r.y,"LR"!==t&&"RL"!==t||(o=u+(c-u)*n,a=d,s=c+(u-c)*n,l=h),"TB"!==t&&"BT"!==t||(o=u,a=d+(h-d)*n,s=c,l=h+(d-h)*n),{x1:u,y1:d,x2:c,y2:h,cpx1:o,cpy1:a,cpx2:s,cpy2:l}}var cB=vy();function dB(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,vB(t,n,e),Th(n,function(n){Th(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Nh(hB,e))})}),t.wrapMethod("cloneShallow",Nh(fB,e)),Th(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Nh(pB,e))}),$h(n[t.dataType]===t)}function hB(e,t){if(cB(i=this).mainData===i){var n=bh({},cB(this).datas);n[this.dataType]=t,vB(t,n,e)}else yB(t,this.dataType,cB(this).mainData,e);var i;return t}function pB(e,t){return e.struct&&e.struct.update(),t}function fB(e,t){return Th(cB(t).datas,function(n,i){n!==t&&yB(n.cloneShallow(),i,t,e)}),t}function gB(e){var t=cB(this).mainData;return null==e||null==t?t:cB(t).datas[e]}function mB(){var e=cB(this).mainData;return null==e?[{data:e}]:Ih(Ah(cB(e).datas),function(t){return{type:t,data:cB(e).datas[t]}})}function vB(e,t,n){cB(e).datas={},Th(t,function(t,i){yB(t,i,e,n)})}function yB(e,t,n,i){cB(n).datas[t]=e,cB(e).mainData=n,e.dataType=t,i.struct&&(e[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=e),e.getLinkedData=gB,e.getLinkedDataAll=mB}var xB=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){Ph(e)&&(n=t,t=e,e=null),Oh(e=e||{})&&(e={order:e});var i,r=e.order||"preorder",o=this[e.attr||"children"];"preorder"===r&&(i=t.call(n,this));for(var a=0;!i&&a<o.length;a++)o[a].eachNode(e,t,n);"postorder"===r&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var r=n[t].getNodeById(e);if(r)return r}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var r=n[t].contains(e);if(r)return r}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),_B=function(){function e(e){this.type="tree",this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,i){var r=new e(n),o=[],a=1;!function e(t,n){var i=t.value;a=Math.max(a,Lh(i)?i.length:1),o.push(t);var s=new xB(dy(t.name,""),r);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(s,n):r.root=s,r._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(t),r.root.updateDepthAndHeight(0);var s=zE(o,{coordDimensions:["value"],dimensionsCount:a}).dimensions,l=new FE(s,n);return l.initData(o),i&&i(l),dB({mainData:l,struct:r,structAttr:"tree"}),r.update(),r},e}();function bB(e,t,n){if(e&&Ch(t,e.type)>=0){var i=n.getData().tree.root,r=e.targetNode;if(Oh(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=e.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function wB(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function CB(e,t){return Ch(wB(e),t)>=0}function SB(e,t){for(var n=[];e;){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}var MB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return Kd(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new oS(n,this,this.ecModel),r=_B.createTree(t,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=r.getNodeByDataIndex(t);return n&&n.children.length&&n.isExpand||(e.parentModel=i),e})});var o=0;r.eachNode("preorder",function(e){e.depth>o&&(o=e.depth)});var a=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:o;return r.root.eachNode("preorder",function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=a}),r.data},t.prototype.getOrient=function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,t,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(e),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return BI("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=SB(i,this),n.collapsed=!i.isExpand,n},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(nD);function TB(e,t){for(var n,i=[e];n=i.pop();)if(t(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function IB(e,t){e.eachSeriesByType("tree",function(e){!function(e,t){var n=function(e,t){return sM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var i=e.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=XV(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(r=n.width,o=n.height,a=XV());var s=e.getData().tree.root,l=s.children[0];if(l){!function(e){var t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[t];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(e,t,n){for(var i,r=[e],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)r.push(a[s])}for(;i=o.pop();)t(i,n)}(l,YV,a),s.hierNode.modifier=-l.hierNode.prelim,TB(l,ZV);var u=l,c=l,d=l;TB(l,function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>d.depth&&(d=e)});var h=u===c?1:a(u,c)/2,p=h-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=r/(c.getLayout().x+h+p),g=o/(d.depth-1||1),TB(l,function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=qV(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)});else{var y=e.getOrient();"RL"===y||"LR"===y?(g=o/(c.getLayout().x+h+p),f=r/(d.depth-1||1),TB(l,function(e){v=(e.getLayout().x+p)*g,m="LR"===y?(e.depth-1)*f:r-(e.depth-1)*f,e.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(f=r/(c.getLayout().x+h+p),g=o/(d.depth-1||1),TB(l,function(e){m=(e.getLayout().x+p)*f,v="TB"===y?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)}))}}}(e,t)})}function DB(e){e.eachSeriesByType("tree",function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();bh(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)})})}var kB=["treemapZoomToNode","treemapRender","treemapMove"];function AB(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var i=t;i&&i.depth>1;)i=i.parentNode;var r=WM(e.ecModel,i.name||i.dataIndex+"",n);t.setVisual("decal",r)})}var EB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};NB(n);var i=e.levels||[],r=this.designatedVisualItemStyle={},o=new oS({itemStyle:r},this,t);i=e.levels=function(e,t){var n,i,r=iy(t.get("color")),o=iy(t.get(["aria","decal","decals"]));if(!r)return;e=e||[],Th(e,function(e){var t=new oS(e),r=t.get("color"),o=t.get("decal");(t.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(t.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)});var a=e[0]||(e[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return e}(i,t);var a=Ih(i||[],function(e){return new oS(e,o,t)},this),s=_B.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=s.getNodeByDataIndex(t),i=n?a[n.depth]:null;return e.parentModel=i||o,e})});return s.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var i=this.getData(),r=this.getRawValue(e);return BI("nameValue",{name:i.getName(e),value:r})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=SB(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},bh(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=rp(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){AB(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},t}(nD);function NB(e){var t=0;Th(e.children,function(e){NB(e);var n=e.value;Lh(n)&&(n=n[0]),t+=n});var n=e.value;Lh(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Lh(e.value)?e.value[0]=n:e.value=n}var LB=function(){function e(e){this.group=new mv,e.add(this.group)}return e.prototype.render=function(e,t,n,i){var r=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),c={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,c,l),this._renderContent(e,c,a,s,l,u,i),lM(o,c.pos,c.box)}},e.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var r=dy(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:i,text:r,width:a})}},e.prototype._renderContent=function(e,t,n,i,r,o,a){for(var s,l,u,c,d,h,p,f,g,m=0,v=t.emptyItemWidth,y=e.get(["breadcrumb","height"]),x=(s=t.pos,l=t.box,c=l.width,d=l.height,h=Sv(s.left,c),p=Sv(s.top,d),f=Sv(s.right,c),g=Sv(s.bottom,d),(isNaN(h)||isNaN(parseFloat(s.left)))&&(h=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=c),(isNaN(p)||isNaN(parseFloat(s.top)))&&(p=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=d),u=qS(u||0),{width:Math.max(f-h-u[1]-u[3],0),height:Math.max(g-p-u[0]-u[2],0)}),_=t.totalWidth,b=t.renderList,w=i.getModel("itemStyle").getItemStyle(),C=b.length-1;C>=0;C--){var S=b[C],M=S.node,T=S.width,I=S.text;_>x.width&&(_-=T-v,T=v,I=null);var D=new Tw({shape:{points:PB(m,0,T,y,C===b.length-1,0===C)},style:wh(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new T_({style:FC(r,{text:I})}),textConfig:{position:"inside"},z2:1e5,onclick:Nh(a,M)});D.disableLabelAnimation=!0,D.getTextContent().ensureState("emphasis").style=FC(o,{text:I}),D.ensureState("emphasis").style=w,Db(D,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(D),OB(D,e,M),m+=T+8}},e.prototype.remove=function(){this.group.removeAll()},e}();function PB(e,t,n,i,r,o){var a=[[r?e:e-5,t],[e+n,t],[e+n,t+i],[r?e:e-5,t+i]];return!o&&a.splice(2,0,[e+n+5,t+i/2]),!r&&a.push([e,t+i/2]),a}function OB(e,t,n){V_(e).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&SB(n,t)}}var RB=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,i,r){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:r}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){--t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,r=this._storage.length;i<r;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},e}();var FB=mv,zB=C_,VB="label",BB="upperLabel",jB=Ry([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),GB=function(e){var t=jB(e);return t.stroke=t.fill=t.lineWidth=null,t},WB=vy(),HB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._state="ready",n._storage={nodeGroup:[],background:[],content:[]},n}return Kd(t,e),t.prototype.render=function(e,t,n,i){if(!(Ch(t.findComponents({mainType:"series",subType:"treemap",query:i}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var r=bB(i,["treemapZoomToNode","treemapRootToNode"],e),o=i&&i.type,a=e.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===o&&r&&l?{rootNodeGroup:l.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,c=this._giveContainerGroup(a),d=e.get("animation"),h=this._doRender(c,e,u);!d||s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?h.renderFinally():this._doAnimation(c,h,e,u),this._resetController(n),this._renderBreadcrumb(e,n,r)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new FB,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var i=t.getData().tree,r=this._oldTree,o={nodeGroup:[],background:[],content:[]},a={nodeGroup:[],background:[],content:[]},s=this._storage,l=[];function u(e,i,r,u){return function(e,t,n,i,r,o,a,s,l,u){if(!a)return;var c=a.getLayout(),d=e.getData(),h=a.getModel();if(d.setItemGraphicEl(a.dataIndex,null),!c||!c.isInView)return;var p=c.width,f=c.height,g=c.borderWidth,m=c.invisible,v=a.getRawIndex(),y=s&&s.getRawIndex(),x=a.viewChildren,_=c.upperHeight,b=x&&x.length,w=h.getModel("itemStyle"),C=h.getModel(["emphasis","itemStyle"]),S=h.getModel(["blur","itemStyle"]),M=h.getModel(["select","itemStyle"]),T=w.get("borderRadius")||0,I=j("nodeGroup",FB);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),WB(I).nodeWidth=p,WB(I).nodeHeight=f,c.isAboveViewRoot)return I;var D=j("background",zB,u,20);D&&R(I,D,b&&c.upperLabelHeight);var k=h.getModel("emphasis"),A=k.get("focus"),E=k.get("blurScope"),N=k.get("disabled"),L="ancestor"===A?a.getAncestorsIndices():"descendant"===A?a.getDescendantIndices():A;if(b)Pb(I)&&Lb(I,!1),D&&(Lb(D,!N),d.setItemGraphicEl(a.dataIndex,D),kb(D,L,E));else{var P=j("content",zB,u,30);P&&F(I,P),D.disableMorphing=!0,D&&Pb(D)&&Lb(D,!1),Lb(I,!N),d.setItemGraphicEl(a.dataIndex,I);var O=h.getShallow("cursor");O&&P.attr("cursor",O),kb(I,L,E)}return I;function R(t,n,i){var r=V_(n);if(r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:T}),m)z(n);else{n.invisible=!1;var o=a.getVisual("style"),s=o.stroke,l=GB(w);l.fill=s;var u=jB(C);u.fill=C.get("borderColor");var c=jB(S);c.fill=S.get("borderColor");var d=jB(M);if(d.fill=M.get("borderColor"),i){var h=p-2*g;V(n,s,o.opacity,{x:g,y:0,width:h,height:_})}else n.removeTextContent();n.setStyle(l),n.ensureState("emphasis").style=u,n.ensureState("blur").style=c,n.ensureState("select").style=d,db(n)}t.add(n)}function F(t,n){var i=V_(n);i.dataIndex=a.dataIndex,i.seriesIndex=e.seriesIndex;var r=Math.max(p-2*g,0),o=Math.max(f-2*g,0);if(n.culling=!0,n.setShape({x:g,y:g,width:r,height:o,r:T}),m)z(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=GB(w);u.fill=l,u.decal=s.decal;var c=jB(C),d=jB(S),h=jB(M);V(n,l,s.opacity,null),n.setStyle(u),n.ensureState("emphasis").style=c,n.ensureState("blur").style=d,n.ensureState("select").style=h,db(n)}t.add(n)}function z(e){!e.invisible&&o.push(e)}function V(t,n,i,r){var o=h.getModel(r?BB:VB),s=dy(h.get("name"),null),l=o.getShallow("show");OC(t,RC(h,r?BB:VB),{defaultText:l?s:null,inheritColor:n,defaultOpacity:i,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var d=u.style,p=qh(d.padding||0);r&&(t.setTextConfig({layoutRect:r}),u.disableLabelLayout=!0),u.beforeUpdate=function(){var e=Math.max((r?r.width:t.shape.width)-p[1]-p[3],0),n=Math.max((r?r.height:t.shape.height)-p[0]-p[2],0);d.width===e&&d.height===n||u.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow="truncate",B(d,r,c);var f=u.getState("emphasis");B(f?f.style:null,r,c)}}function B(t,n,i){var r=t?t.text:null;if(!n&&i.isLeafRoot&&null!=r){var o=e.get("drillDownIcon",!0);t.text=o?o+" "+r:r}}function j(e,i,o,a){var s=null!=y&&n[e][y],l=r[e];return s?(n[e][y]=null,G(l,s)):m||((s=new i)instanceof sx&&(s.z2=function(e,t){return 100*e+t}(o,a)),W(l,s)),t[e][v]=s}function G(e,t){var n=e[v]={};t instanceof FB?(n.oldX=t.x,n.oldY=t.y):n.oldShape=bh({},t.shape)}function W(e,t){var n=e[v]={},o=a.parentNode,s=t instanceof mv;if(o&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=r.background[o.getRawIndex()];!i&&c&&c.oldShape&&(l=c.oldShape.width,u=c.oldShape.height),s?(n.oldX=0,n.oldY=u):n.oldShape={x:l,y:u,width:0,height:0}}n.fadein=!s}}(t,a,s,n,o,l,e,i,r,u)}!function e(t,n,i,r,o){r?(n=t,Th(t,function(e,t){!e.isRemoved()&&s(t,t)})):new pE(n,t,a,a).add(s).update(s).remove(Nh(s,null)).execute();function a(e){return e.getId()}function s(a,s){var l=null!=a?t[a]:null,c=null!=s?n[s]:null,d=u(l,c,i,o);d&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],d,r,o+1)}}(i.root?[i.root]:[],r&&r.root?[r.root]:[],e,i===r||!r,0);var c,d,h=(d={nodeGroup:[],background:[],content:[]},(c=s)&&Th(c,function(e,t){var n=d[t];Th(e,function(e){e&&(n.push(e),WB(e).willDelete=!0)})}),d);if(this._oldTree=i,this._storage=a,this._controllerHost){var p=this.seriesModel.layoutInfo,f=i.root.getLayout();f.width===p.width&&f.height===p.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:o,willDeleteEls:h,renderFinally:function(){Th(h,function(e){Th(e,function(e){e.parent&&e.parent.remove(e)})}),Th(l,function(e){e.invisible=!0,e.dirty()})}}},t.prototype._doAnimation=function(e,t,n,i){var r=n.get("animationDurationUpdate"),o=n.get("animationEasing"),a=(Ph(r)?0:r)||0,s=(Ph(o)?null:o)||"cubicOut",l=new RB;Th(t.willDeleteEls,function(e,t){Th(e,function(e,n){if(!e.invisible){var r,o=e.parent,u=WB(o);if(i&&"drillDown"===i.direction)r=o===i.rootNodeGroup?{shape:{x:0,y:0,width:u.nodeWidth,height:u.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var c=0,d=0;u.willDelete||(c=u.nodeWidth/2,d=u.nodeHeight/2),r="nodeGroup"===t?{x:c,y:d,style:{opacity:0}}:{shape:{x:c,y:d,width:0,height:0},style:{opacity:0}}}r&&l.add(e,r,a,0,s)}})}),Th(this._storage,function(e,n){Th(e,function(e,i){var r=t.lastsForAnimation[n][i],o={};r&&(e instanceof mv?null!=r.oldX&&(o.x=e.x,o.y=e.y,e.x=r.oldX,e.y=r.oldY):(r.oldShape&&(o.shape=bh({},e.shape),e.setShape(r.oldShape)),r.fadein?(e.setStyle("opacity",0),o.style={opacity:1}):1!==e.style.opacity&&(o.style={opacity:1})),l.add(e,o,a,0,s))})},this),this._state="animating",l.finished(Eh(function(){this._state="ready",t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this._controller,n=this._controllerHost;n||(this._controllerHost={target:this.group},n=this._controllerHost),t||((t=this._controller=new _z(e.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),t.on("pan",Eh(this._onPan,this)),t.on("zoom",Eh(this._onZoom,this)));var i=new xf(0,0,e.getWidth(),e.getHeight());t.setPointerChecker(function(e,t,n){return i.contain(t,n)})},t.prototype._clearController=function(){var e=this._controller;this._controllerHost=null,e&&(e.dispose(),e=null)},t.prototype._onPan=function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,i=e.scale;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var a,s=new xf(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=i,a){var c=a.min||0,d=a.max||1/0;u=Math.max(Math.min(d,u),c)}var h=u/l.zoom;l.zoom=u;var p=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];af(f,f,[-(t-=p.x),-(n-=p.y)]),lf(f,f,[h,h]),af(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on("click",function(e){if("ready"===t._state){var n=t.seriesModel.get("nodeClick",!0);if(n){var i=t.findTarget(e.offsetX,e.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)t._rootToNode(i);else if("zoomToNode"===n)t._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&tM(a,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var i=this;n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new LB(this.group))).render(e,t,n.node,function(t){"animating"!==i._state&&(CB(e.getViewRoot(),t)?i._rootToNode({node:t}):i._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(e,t),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}},this),n},t.type="treemap",t}(fD);var UB=Th,YB=zh,ZB=-1,XB=function(){function e(t){var n=t.mappingMethod,i=t.type,r=this.option=yh(t);this.type=i,this.mappingMethod=n,this._normalizeData=rj[n];var o=e.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(qB(r),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,Th(t,function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)})}(r)):"category"===n?r.categories?function(e){var t=e.categories,n=e.categoryMap={},i=e.visual;if(UB(t,function(e,t){n[e]=t}),!Lh(i)){var r=[];zh(i)?UB(i,function(e,t){var i=n[t];r[null!=i?i:ZB]=e}):r[-1]=i,i=ij(e,r)}for(var o=t.length-1;o>=0;o--)null==i[o]&&(delete n[t[o]],t.pop())}(r):qB(r,!0):($h("linear"!==n||r.dataExtent),qB(r))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Eh(this._normalizeData,this)},e.listVisualTypes=function(){return Ah(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){zh(e)?Th(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,i){var r,o=Lh(t)?[]:zh(t)?{}:(r=!0,null);return e.eachVisual(t,function(e,t){var a=n.call(i,e,t);r?o=a:o[t]=a}),o},e.retrieveVisuals=function(t){var n,i={};return t&&UB(e.visualHandlers,function(e,r){t.hasOwnProperty(r)&&(i[r]=t[r],n=!0)}),n?i:null},e.prepareVisualTypes=function(e){if(Lh(e))e=e.slice();else{if(!YB(e))return[];var t=[];UB(e,function(e,n){t.push(n)}),e=t}return e.sort(function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1}),e},e.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var i,r=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||Oh(s)&&s===e+"")return o;n&&d(s,o)}}for(o=0,a=t.length;o<a;o++){var l=t[o],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(oj(c[1],e,u[1]))return o}else if(u[1]===1/0){if(oj(c[0],u[0],e))return o}else if(oj(c[0],u[0],e)&&oj(c[1],e,u[1]))return o;n&&d(u[0],o),n&&d(u[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function d(t,n){var o=Math.abs(t-e);o<r&&(r=o,i=n)}},e.visualHandlers={color:{applyVisual:JB("color"),getColorMapper:function(){var e=this.option;return Eh("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),QB.call(this,e)}:function(t,n,i){var r=!!i;return!n&&(t=this._normalizeData(t)),i=Lg(t,e.parsedVisual,i),r?i:Rg(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Rg(Lg(e,this.option.parsedVisual),"rgba")},category:QB,piecewise:function(e,t){var n=nj.call(this,t);return null==n&&(n=Rg(Lg(e,this.option.parsedVisual),"rgba")),n},fixed:ej}},colorHue:$B(function(e,t){return Pg(e,t)}),colorSaturation:$B(function(e,t){return Pg(e,null,t)}),colorLightness:$B(function(e,t){return Pg(e,null,null,t)}),colorAlpha:$B(function(e,t){return Og(e,t)}),decal:{applyVisual:JB("decal"),_normalizedToVisual:{linear:null,category:QB,piecewise:null,fixed:null}},opacity:{applyVisual:JB("opacity"),_normalizedToVisual:tj([0,1])},liftZ:{applyVisual:JB("liftZ"),_normalizedToVisual:{linear:ej,category:ej,piecewise:ej,fixed:ej}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:KB,category:QB,piecewise:function(e,t){var n=nj.call(this,t);return null==n&&(n=KB.call(this,e)),n},fixed:ej}},symbolSize:{applyVisual:JB("symbolSize"),_normalizedToVisual:tj([0,1])}},e}();function qB(e,t){var n=e.visual,i=[];zh(n)?UB(n,function(e){i.push(e)}):null!=n&&i.push(n);t||1!==i.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(i[1]=i[0]),ij(e,i)}function $B(e){return{applyVisual:function(t,n,i){var r=this.mapValueToVisual(t);i("color",e(n("color"),r))},_normalizedToVisual:tj([0,1])}}function KB(e){var t=this.option.visual;return t[Math.round(Cv(e,[0,1],[0,t.length-1],!0))]||{}}function JB(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function QB(e){var t=this.option.visual;return t[this.option.loop&&e!==ZB?e%t.length:e]}function ej(){return this.option.visual[0]}function tj(e){return{linear:function(t){return Cv(t,e,this.option.visual,!0)},category:QB,piecewise:function(t,n){var i=nj.call(this,n);return null==i&&(i=Cv(t,e,this.option.visual,!0)),i},fixed:ej}}function nj(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=n[XB.findPieceIndex(e,n)];if(i&&i.visual)return i.visual[this.type]}}function ij(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Ih(t,function(e){var t=Ag(e);return t||"production"===process.env.NODE_ENV||Xv("'"+e+"' is an illegal color, fallback to '#000000'",!0),t||[0,0,0,1]})),t}var rj={linear:function(e){return Cv(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=XB.findPieceIndex(e,t,!0);if(null!=n)return Cv(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?ZB:t},fixed:up};function oj(e,t,n){return e?t<=n:t<n}var aj=vy();const sj={seriesType:"treemap",reset:function(e){var t=e.getData().tree.root;t.isRemoved()||lj(t,{},e.getViewRoot().getAncestors(),e)}};function lj(e,t,n,i){var r=e.getModel(),o=e.getLayout(),a=e.hostTree.data;if(o&&!o.invisible&&o.isInView){var s,l=r.getModel("itemStyle"),u=function(e,t,n){var i=bh({},t),r=n.designatedVisualItemStyle;return Th(["color","colorAlpha","colorSaturation"],function(n){r[n]=t[n];var o=e.get(n);r[n]=null,null!=o&&(i[n]=o)}),i}(l,t,i),c=a.ensureUniqueItemVisual(e.dataIndex,"style"),d=l.get("borderColor"),h=l.get("borderColorSaturation");null!=h&&(d=function(e,t){return null!=t?Pg(t,null,null,e):null}(h,s=uj(u))),c.stroke=d;var p=e.viewChildren;if(p&&p.length){var f=function(e,t,n,i,r,o){if(!o||!o.length)return;var a=dj(t,"color")||null!=r.color&&"none"!==r.color&&(dj(t,"colorAlpha")||dj(t,"colorSaturation"));if(!a)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),d={type:a.name,dataExtent:u,visual:a.range};"color"!==d.type||"index"!==c&&"id"!==c?d.mappingMethod="linear":(d.mappingMethod="category",d.loop=!0);var h=new XB(d);return aj(h).drColorMappingBy=c,h}(0,r,o,0,u,p);Th(p,function(e,t){if(e.depth>=n.length||e===n[e.depth]){var o=function(e,t,n,i,r,o){var a=bh({},t);if(r){var s=r.type,l="color"===s&&aj(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,e,t,f,i);lj(e,o,n,i)}})}else s=uj(u),c.fill=s}}function uj(e){var t=cj(e,"color");if(t){var n=cj(e,"colorAlpha"),i=cj(e,"colorSaturation");return i&&(t=Pg(t,null,null,i)),n&&(t=Og(t,n)),t}}function cj(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function dj(e,t){var n=e.get(t);return Lh(n)&&n.length?{name:t,range:n}:null}var hj=Math.max,pj=Math.min,fj=Uh,gj=Th,mj=["itemStyle","borderWidth"],vj=["itemStyle","gapWidth"],yj=["upperLabel","show"],xj=["upperLabel","height"];const _j={seriesType:"treemap",reset:function(e,t,n,i){var r=n.getWidth(),o=n.getHeight(),a=e.option,s=sM(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Sv(fj(s.width,l[0]),r),c=Sv(fj(s.height,l[1]),o),d=i&&i.type,h=bB(i,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===d||"treemapMove"===d?i.rootRect:null,f=e.getViewRoot(),g=wB(f);if("treemapMove"!==d){var m="treemapZoomToNode"===d?function(e,t,n,i,r){var o,a=(t||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*e.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var c=0,d=o.children,h=0,p=d.length;h<p;h++)c+=d[h].getValue();var f=a.getValue();if(0===f)return s;u*=c/f;var g=o.getModel(),m=g.get(mj);(u+=4*m*m+(3*m+Math.max(m,Mj(g)))*Math.pow(u,.5))>Ev&&(u=Ev),a=o}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,r*v]}(e,h,f,u,c):p?[p.width,p.height]:[u,c],v=a.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:a.squareRatio,sort:v,leafDepth:a.leafDepth};f.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(x),bj(f,y,!1,0),x=f.getLayout(),gj(g,function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(bh({dataExtent:[n,n],borderWidth:0,upperHeight:0},x))})}var _=e.getData().tree.root;_.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!n)return i;var r=n.node,o=r.getLayout();if(!o)return i;var a=[o.width/2,o.height/2],s=r;for(;s;){var l=s.getLayout();a[0]+=l.x,a[1]+=l.y,s=s.parentNode}return{x:e.width/2-a[0],y:e.height/2-a[1]}}(s,p,h),!0),e.setLayoutInfo(s),Sj(_,new xf(-s.x,-s.y,r,o),g,f,0)}};function bj(e,t,n,i){var r,o;if(!e.isRemoved()){var a=e.getLayout();r=a.width,o=a.height;var s=e.getModel(),l=s.get(mj),u=s.get(vj)/2,c=Mj(s),d=Math.max(l,c),h=l-u,p=d-u;e.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var f=(r=hj(r-2*h,0))*(o=hj(o-h-p,0)),g=function(e,t,n,i,r,o){var a=e.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=o;if(r&&!l)return e.viewChildren=[];a=kh(a,function(e){return!e.isRemoved()}),function(e,t){t&&e.sort(function(e,n){var i="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===i?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i})}(a,s);var u=function(e,t,n){for(var i=0,r=0,o=t.length;r<o;r++)i+=t[r].getValue();var a,s=e.get("visualDimension");t&&t.length?"value"===s&&n?(a=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],gj(t,function(e){var t=e.getValue(s);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})):a=[NaN,NaN];return{sum:i,dataExtent:a}}(t,a,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,i,r){if(!i)return n;for(var o=e.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*t<o&&(s=l,n-=u)}return"asc"===i?r.splice(0,a-s):r.splice(s,a-s),n}(t,n,u.sum,s,a),0===u.sum)return e.viewChildren=[];for(var c=0,d=a.length;c<d;c++){var h=a[c].getValue()/u.sum*n;a[c].setLayout({area:h})}l&&(a.length&&e.setLayout({isLeafRoot:!0},!0),a.length=0);return e.viewChildren=a,e.setLayout({dataExtent:u.dataExtent},!0),a}(e,s,f,t,n,i);if(g.length){var m={x:h,y:p,width:r,height:o},v=pj(r,o),y=1/0,x=[];x.area=0;for(var _=0,b=g.length;_<b;){var w=g[_];x.push(w),x.area+=w.getLayout().area;var C=wj(x,v,t.squareRatio);C<=y?(_++,y=C):(x.area-=x.pop().getLayout().area,Cj(x,v,m,u,!1),v=pj(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&Cj(x,v,m,u,!0),!n){var S=s.get("childrenVisibleMin");null!=S&&f<S&&(n=!0)}for(_=0,b=g.length;_<b;_++)bj(g[_],t,n,i+1)}}}function wj(e,t,n){for(var i=0,r=1/0,o=0,a=void 0,s=e.length;o<s;o++)(a=e[o].getLayout().area)&&(a<r&&(r=a),a>i&&(i=a));var l=e.area*e.area,u=t*t*n;return l?hj(u*i/l,l/(u*r)):1/0}function Cj(e,t,n,i,r){var o=t===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],c=t?e.area/t:0;(r||c>n[l[a]])&&(c=n[l[a]]);for(var d=0,h=e.length;d<h;d++){var p=e[d],f={},g=c?p.getLayout().area/c:0,m=f[l[a]]=hj(c-2*i,0),v=n[s[o]]+n[l[o]]-u,y=d===h-1||v<g?v:g,x=f[l[o]]=hj(y-2*i,0);f[s[a]]=n[s[a]]+pj(i,m/2),f[s[o]]=u+pj(i,x/2),u+=y,p.setLayout(f,!0)}n[s[a]]+=c,n[l[a]]-=c}function Sj(e,t,n,i,r){var o=e.getLayout(),a=n[r],s=a&&a===e;if(!(a&&!s||r===n.length&&e!==i)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(o),isAboveViewRoot:s},!0);var l=new xf(t.x-o.x,t.y-o.y,t.width,t.height);gj(e.viewChildren||[],function(e){Sj(e,l,n,i,r+1)})}}function Mj(e){return e.get(yj)?e.get(xj):0}function Tj(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),i=e.getGraph().data,r=n.mapArray(n.getName);i.filterSelf(function(e){var n=i.getItemModel(e).getShallow("category");if(null!=n){Fh(n)&&(n=r[n]);for(var o=0;o<t.length;o++)if(!t[o].isSelected(n))return!1}return!0})})}function Ij(e){var t={};e.eachSeriesByType("graph",function(e){var n=e.getCategoriesData(),i=e.getData(),r={};n.each(function(i){var o=n.getName(i);r["ec-"+o]=i;var a=n.getItemModel(i),s=a.getModel("itemStyle").getItemStyle();s.fill||(s.fill=e.getColorFromPalette(o,t)),n.setItemVisual(i,"style",s);for(var l=["symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=a.getShallow(l[u],!0);null!=c&&n.setItemVisual(i,l[u],c)}}),n.count()&&i.each(function(e){var t=i.getItemModel(e).getShallow("category");if(null!=t){Oh(t)&&(t=r["ec-"+t]);var o=n.getItemVisual(t,"style");bh(i.ensureUniqueItemVisual(e,"style"),o);for(var a=["symbol","symbolSize","symbolKeepAspect"],s=0;s<a.length;s++)i.setItemVisual(e,a[s],n.getItemVisual(t,a[s]))}})})}function Dj(e){return e instanceof Array||(e=[e,e]),e}function kj(e){e.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),i=Dj(e.get("edgeSymbol")),r=Dj(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",r&&r[0]),n.setVisual("toSymbolSize",r&&r[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(e){var i=n.getItemModel(e),r=t.getEdgeByIndex(e),o=Dj(i.getShallow("symbol",!0)),a=Dj(i.getShallow("symbolSize",!0)),s=i.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(e,"style");switch(bh(l,s),l.stroke){case"source":var u=r.node1.getVisual("style");l.stroke=u&&u.fill;break;case"target":u=r.node2.getVisual("style");l.stroke=u&&u.fill}o[0]&&r.setVisual("fromSymbol",o[0]),o[1]&&r.setVisual("toSymbol",o[1]),a[0]&&r.setVisual("fromSymbolSize",a[0]),a[1]&&r.setVisual("toSymbolSize",a[1])})})}var Aj="--\x3e",Ej=function(e){return e.get("autoCurveness")||null},Nj=function(e,t){var n=Ej(e),i=20,r=[];if(Fh(n))i=n;else if(Lh(n))return void(e.__curvenessList=n);t>i&&(i=t);var o=i%2?i+2:i+3;r=[];for(var a=0;a<o;a++)r.push((a%2?a+1:a)/10*(a%2?-1:1));e.__curvenessList=r},Lj=function(e,t,n){var i=[e.id,e.dataIndex].join("."),r=[t.id,t.dataIndex].join(".");return[n.uid,i,r].join(Aj)},Pj=function(e){var t=e.split(Aj);return[t[0],t[2],t[1]].join(Aj)},Oj=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function Rj(e,t,n,i){var r=Ej(t),o=Lh(r);if(!r)return null;var a=function(e,t){var n=Lj(e.node1,e.node2,t);return t.__edgeMap[n]}(e,t);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var u=function(e,t){return Oj(Lj(e.node1,e.node2,t),t)+Oj(Lj(e.node2,e.node1,t),t)}(e,t);Nj(t,u),e.lineStyle=e.lineStyle||{};var c=Lj(e.node1,e.node2,t),d=t.__curvenessList,h=o||u%2?0:1;if(a.isForward)return d[h+s];var p=Pj(c),f=Oj(p,t),g=d[s+f+h];return i?o?r&&0===r[0]?(f+h)%2?g:-g:((f%2?0:1)+h)%2?g:-g:(f+h)%2?g:-g:d[s+f+h]}function Fj(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])}),zj(n,e)}}function zj(e,t){e.eachEdge(function(e,n){var i=Zh(e.getModel().get(["lineStyle","curveness"]),-Rj(e,t,n,!0),0),r=pp(e.node1.getLayout()),o=pp(e.node2.getLayout()),a=[r,o];+i&&a.push([(r[0]+o[0])/2-(r[1]-o[1])*i,(r[1]+o[1])/2-(o[0]-r[0])*i]),e.setLayout(a)})}function Vj(e,t){e.eachSeriesByType("graph",function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var i=e.getData(),r=[];Th(n.dimensions,function(e){r=r.concat(i.mapDimensionsAll(e))});for(var o=0;o<i.count();o++){for(var a=[],s=!1,l=0;l<r.length;l++){var u=i.get(r[l],o);isNaN(u)||(s=!0),a.push(u)}s?i.setItemLayout(o,n.dataToPoint(a)):i.setItemLayout(o,[NaN,NaN])}zj(i.graph,e)}else t&&"none"!==t||Fj(e)})}function Bj(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,i=t.scaleX;return((t.getZoom()-1)*n+1)/i}function jj(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var Gj=Math.PI,Wj=[];function Hj(e,t,n,i){var r=e.coordinateSystem;if(!r||"view"===r.type){var o=r.getBoundingRect(),a=e.getData(),s=a.graph,l=o.width/2+o.x,u=o.height/2+o.y,c=Math.min(o.width,o.height)/2,d=a.count();if(a.setLayout({cx:l,cy:u}),d){if(n){var h=r.pointToData(i),p=h[0],f=h[1],g=[p-l,f-u];_p(g,g),xp(g,g,c),n.setLayout([l+g[0],u+g[1]],!0),Yj(n,e.get(["circular","rotateLabel"]),l,u)}Uj[t](e,s,a,c,l,u,d),s.eachEdge(function(t,n){var i,r=Zh(t.getModel().get(["lineStyle","curveness"]),Rj(t,e,n),0),o=pp(t.node1.getLayout()),a=pp(t.node2.getLayout()),s=(o[0]+a[0])/2,c=(o[1]+a[1])/2;+r&&(i=[l*(r*=3)+s*(1-r),u*r+c*(1-r)]),t.setLayout([o,a,i])})}}}var Uj={value:function(e,t,n,i,r,o,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);t.eachNode(function(e){var t=e.getValue("value"),n=u*(l?t:1)/2;s+=n,e.setLayout([i*Math.cos(s)+r,i*Math.sin(s)+o]),s+=n})},symbolSize:function(e,t,n,i,r,o,a){var s=0;Wj.length=a;var l=Bj(e);t.eachNode(function(e){var t=jj(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=l;var n=Math.asin(t/2/i);isNaN(n)&&(n=Gj/2),Wj[e.dataIndex]=n,s+=2*n});var u=(2*Gj-s)/a/2,c=0;t.eachNode(function(e){var t=u+Wj[e.dataIndex];c+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([i*Math.cos(c)+r,i*Math.sin(c)+o]),c+=t})}};function Yj(e,t,n,i){var r=e.getGraphicEl();if(r){var o=e.getModel().get(["label","rotate"])||0,a=r.getSymbolPath();if(t){var s=e.getLayout(),l=Math.atan2(s[1]-i,s[0]-n);l<0&&(l=2*Math.PI+l);var u=s[0]<n;u&&(l-=Math.PI);var c=u?"left":"right";a.setTextConfig({rotation:-l,position:c,origin:"center"});var d=a.ensureState("emphasis");bh(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:o*=Math.PI/180})}}function Zj(e){e.eachSeriesByType("graph",function(e){"circular"===e.get("layout")&&Hj(e,"symbolSize")})}var Xj=mp;function qj(e){e.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!t||"view"===t.type)if("force"===e.get("layout")){var n=e.preservedPoints||{},i=e.getGraph(),r=i.data,o=i.edgeData,a=e.getModel("force"),s=a.get("initLayout");e.preservedPoints?r.each(function(e){var t=r.getId(e);r.setItemLayout(e,n[t]||[NaN,NaN])}):s&&"none"!==s?"circular"===s&&Hj(e,"value"):Fj(e);var l=r.getDataExtent("value"),u=o.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),h=Lh(c)?c:[c,c],p=Lh(d)?d:[d,d];p=[p[1],p[0]];var f=r.mapArray("value",function(e,t){var n=r.getItemLayout(t),i=Cv(e,l,h);return isNaN(i)&&(i=(h[0]+h[1])/2),{w:i,rep:i,fixed:r.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),g=o.mapArray("value",function(t,n){var r=i.getEdgeByIndex(n),o=Cv(t,u,p);isNaN(o)&&(o=(p[0]+p[1])/2);var a=r.getModel(),s=Zh(r.getModel().get(["lineStyle","curveness"]),-Rj(r,e,n,!0),0);return{n1:f[r.node1.dataIndex],n2:f[r.node2.dataIndex],d:o,curveness:s,ignoreForceLayout:a.get("ignoreForceLayout")}}),m=t.getBoundingRect(),v=function(e,t,n){for(var i=e,r=t,o=n.rect,a=o.width,s=o.height,l=[o.x+a/2,o.y+s/2],u=null==n.gravity?.1:n.gravity,c=0;c<i.length;c++){var d=i[c];d.p||(d.p=dp(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=pp(d.p),d.edges=null}var h,p,f=null==n.friction?.6:n.friction,g=f;return{warmUp:function(){g=.8*f},setFixed:function(e){i[e].fixed=!0},setUnfixed:function(e){i[e].fixed=!1},beforeStep:function(e){h=e},afterStep:function(e){p=e},step:function(e){h&&h(i,r);for(var t=[],n=i.length,o=0;o<r.length;o++){var a=r[o];if(!a.ignoreForceLayout){var s=a.n1;vp(t,(m=a.n2).p,s.p);var c=yp(t)-a.d,d=m.w/(s.w+m.w);isNaN(d)&&(d=0),_p(t,t),!s.fixed&&Xj(s.p,s.p,t,d*c*g),!m.fixed&&Xj(m.p,m.p,t,-(1-d)*c*g)}}for(o=0;o<n;o++)(x=i[o]).fixed||(vp(t,l,x.p),Xj(x.p,x.p,t,u*g));for(o=0;o<n;o++){s=i[o];for(var f=o+1;f<n;f++){var m;vp(t,(m=i[f]).p,s.p),0===(c=yp(t))&&(fp(t,Math.random()-.5,Math.random()-.5),c=1);var v=(s.rep+m.rep)/c/c;!s.fixed&&Xj(s.pp,s.pp,t,v),!m.fixed&&Xj(m.pp,m.pp,t,-v)}}var y=[];for(o=0;o<n;o++){var x;(x=i[o]).fixed||(vp(y,x.p,x.pp),Xj(x.p,x.p,y,g),hp(x.pp,x.p))}var _=(g*=.992)<.01;p&&p(i,r,_),e&&e(_)}}}(f,g,{rect:m,gravity:a.get("gravity"),friction:a.get("friction")});v.beforeStep(function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].fixed&&hp(e[n].p,i.getNodeByIndex(n).getLayout())}),v.afterStep(function(e,t,o){for(var a=0,s=e.length;a<s;a++)e[a].fixed||i.getNodeByIndex(a).setLayout(e[a].p),n[r.getId(a)]=e[a].p;for(a=0,s=t.length;a<s;a++){var l=t[a],u=i.getEdgeByIndex(a),c=l.n1.p,d=l.n2.p,h=u.getLayout();(h=h?h.slice():[])[0]=h[0]||[],h[1]=h[1]||[],hp(h[0],c),hp(h[1],d),+l.curveness&&(h[2]=[(c[0]+d[0])/2-(c[1]-d[1])*l.curveness,(c[1]+d[1])/2-(d[0]-c[0])*l.curveness]),u.setLayout(h)}}),e.forceLayout=v,e.preservedPoints=n,v.step()}else e.forceLayout=null})}function $j(e,t){var n=[];return e.eachSeriesByType("graph",function(e){var i=e.get("coordinateSystem");if(!i||"view"===i){var r=e.getData(),o=[],a=[];yx(r.mapArray(function(e){var t=r.getItemModel(e);return[+t.get("x"),+t.get("y")]}),o,a),a[0]-o[0]===0&&(a[0]+=1,o[0]-=1),a[1]-o[1]===0&&(a[1]+=1,o[1]-=1);var s=(a[0]-o[0])/(a[1]-o[1]),l=function(e,t,n){return sM(bh(e.getBoxLayoutParams(),{aspect:n}),{width:t.getWidth(),height:t.getHeight()})}(e,t,s);isNaN(s)&&(o=[l.x,l.y],a=[l.x+l.width,l.y+l.height]);var u=a[0]-o[0],c=a[1]-o[1],d=l.width,h=l.height,p=e.coordinateSystem=new EV;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(o[0],o[1],u,c),p.setViewRect(l.x,l.y,d,h),p.setCenter(e.get("center"),t),p.setZoom(e.get("zoom")),n.push(p)}}),n}var Kj=Ew.prototype,Jj=Ow.prototype,Qj=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}();function eG(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Kd(t,e)}(Qj);var tG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return Kd(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Qj},t.prototype.buildPath=function(e,t){eG(t)?Kj.buildPath.call(this,e,t):Jj.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return eG(this.shape)?Kj.pointAt.call(this,e):Jj.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=eG(t)?[t.x2-t.x1,t.y2-t.y1]:Jj.tangentAt.call(this,e);return _p(n,n)},t}(d_),nG=["fromSymbol","toSymbol"];function iG(e){return"_"+e+"Type"}function rG(e,t,n){var i=t.getItemVisual(n,e);if(!i||"none"===i)return i;var r=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=Ik(r);return i+l+Dk(a||0,l)+(o||"")+(s||"")}function oG(e,t,n){var i=t.getItemVisual(n,e);if(i&&"none"!==i){var r=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=Ik(r),u=Dk(a||0,l),c=Tk(i,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,c.name=e,c}}function aG(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var sG=function(e){function t(t,n,i){var r=e.call(this)||this;return r._createLine(t,n,i),r}return Kd(t,e),t.prototype._createLine=function(e,t,n){var i=e.hostModel,r=function(e){var t=new tG({name:"line",subPixelOptimize:!0});return aG(t.shape,e),t}(e.getItemLayout(t));r.shape.percent=0,Qw(r,{shape:{percent:1}},i,t),this.add(r),Th(nG,function(n){var i=oG(n,e,t);this.add(i),this[iG(n)]=rG(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var i=e.hostModel,r=this.childOfName("line"),o=e.getItemLayout(t),a={shape:{}};aG(a.shape,o),Jw(r,a,i,t),Th(nG,function(n){var i=rG(n,e,t),r=iG(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=oG(n,e,t);this.add(o)}this[r]=i},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var i=e.hostModel,r=this.childOfName("line"),o=n&&n.emphasisLineStyle,a=n&&n.blurLineStyle,s=n&&n.selectLineStyle,l=n&&n.labelStatesModels,u=n&&n.emphasisDisabled,c=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var h=e.getItemModel(t),p=h.getModel("emphasis");o=p.getModel("lineStyle").getLineStyle(),a=h.getModel(["blur","lineStyle"]).getLineStyle(),s=h.getModel(["select","lineStyle"]).getLineStyle(),u=p.get("disabled"),c=p.get("focus"),d=p.get("blurScope"),l=RC(h)}var f=e.getItemVisual(t,"style"),g=f.stroke;r.useStyle(f),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,Th(nG,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<U_.length;n++){var i=U_[n],o=r.getState(i);if(o){var a=o.style||{},s=t.ensureState(i),l=s.style||(s.style={});null!=a.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=a.stroke),null!=a.opacity&&(l.opacity=a.opacity)}}t.markRedraw()}},this);var m=i.getRawValue(t);OC(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return i.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:f.opacity,defaultText:(null==m?e.getName(t):isFinite(m)?Mv(m):m)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var x=y.get("distance");Lh(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),Db(this,c,d,u)},t.prototype.highlight=function(){fb(this)},t.prototype.downplay=function(){gb(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");aG(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),i=e.getTextContent();if(t||n||i&&!i.ignore){for(var r=1,o=this.parent;o;)o.scaleX&&(r/=o.scaleX),o=o.parent;var a=e.childOfName("line");if(this.__dirty||a.__dirty){var s=a.shape.percent,l=a.pointAt(0),u=a.pointAt(s),c=vp([],u,l);if(_p(c,c),t&&(t.setPosition(l),C(t,0),t.scaleX=t.scaleY=r*s,t.markRedraw()),n&&(n.setPosition(u),C(n,1),n.scaleX=n.scaleY=r*s,n.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var d=void 0,h=void 0,p=i.__labelDistance,f=p[0]*r,g=p[1]*r,m=s/2,v=a.tangentAt(m),y=[v[1],-v[0]],x=a.pointAt(m);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var _=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0]<l[0]&&(b=Math.PI+b),i.rotation=b}var w=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-g,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=g,h="top";break;default:w=0,h="middle"}switch(i.__position){case"end":i.x=c[0]*f+u[0],i.y=c[1]*g+u[1],d=c[0]>.8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":i.x=-c[0]*f+l[0],i.y=-c[1]*g+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+w,d=v[0]<0?"right":"left",i.originX=-f*_,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+w,d="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+w,d=v[0]>=0?"right":"left",i.originX=f*_,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||h,align:i.__align||d})}}}function C(e,t){var n=e.__specifiedRotation;if(null==n){var i=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else e.attr("rotation",n)}},t}(mv),lG=function(){function e(e){this.group=new mv,this._LineCtor=e||sG}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=e,r||i.removeAll();var o=uG(e);e.diff(r).add(function(n){t._doAdd(e,n,o)}).update(function(n,i){t._doUpdate(r,e,i,n,o)}).remove(function(e){i.remove(r.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=uG(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=e.start;i<e.end;i++){if(dG(t.getItemLayout(i))){var r=new this._LineCtor(t,i,this._seriesScope);r.traverse(n),this.group.add(r),t.setItemGraphicEl(i,r),this._progressiveEls.push(r)}}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){AC(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(dG(e.getItemLayout(t))){var i=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,i),this.group.add(i)}},e.prototype._doUpdate=function(e,t,n,i,r){var o=e.getItemGraphicEl(n);dG(t.getItemLayout(i))?(o?o.updateData(t,i,r):o=new this._LineCtor(t,i,r),t.setItemGraphicEl(i,o),this.group.add(o)):this.group.remove(o)},e}();function uG(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:RC(t)}}function cG(e){return isNaN(e[0])||isNaN(e[1])}function dG(e){return e&&!cG(e[0])&&!cG(e[1])}var hG=[],pG=[],fG=[],gG=ag,mG=Cp,vG=Math.abs;function yG(e,t,n){for(var i,r=e[0],o=e[1],a=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){hG[0]=gG(r[0],o[0],a[0],c),hG[1]=gG(r[1],o[1],a[1],c),(p=vG(mG(hG,t)-l))<s&&(s=p,i=c)}for(var d=0;d<32;d++){var h=i+u;pG[0]=gG(r[0],o[0],a[0],i),pG[1]=gG(r[1],o[1],a[1],i),fG[0]=gG(r[0],o[0],a[0],h),fG[1]=gG(r[1],o[1],a[1],h);var p=mG(pG,t)-l;if(vG(p)<.01)break;var f=mG(fG,t)-l;u/=2,p<0?f>=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function xG(e,t){var n=[],i=ug,r=[[],[],[]],o=[[],[]],a=[];t/=2,e.eachEdge(function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[pp(l[0]),pp(l[1])],l[2]&&l.__original.push(pp(l[2])));var d=l.__original;if(null!=l[2]){if(hp(r[0],d[0]),hp(r[1],d[2]),hp(r[2],d[1]),u&&"none"!==u){var h=jj(e.node1),p=yG(r,d[0],h*t);i(r[0][0],r[1][0],r[2][0],p,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],p,n),r[0][1]=n[3],r[1][1]=n[4]}if(c&&"none"!==c){h=jj(e.node2),p=yG(r,d[1],h*t);i(r[0][0],r[1][0],r[2][0],p,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],p,n),r[1][1]=n[1],r[2][1]=n[2]}hp(l[0],r[0]),hp(l[1],r[2]),hp(l[2],r[1])}else{if(hp(o[0],d[0]),hp(o[1],d[1]),vp(a,o[1],o[0]),_p(a,a),u&&"none"!==u){h=jj(e.node1);mp(o[0],o[0],a,h*t)}if(c&&"none"!==c){h=jj(e.node2);mp(o[1],o[1],a,-h*t)}hp(l[0],o[0]),hp(l[1],o[1])}})}function _G(e){return"view"===e.type}var bG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(e,t){var n=new FO,i=new lG,r=this.group;this._controller=new _z(t.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},t.prototype.render=function(e,t,n){var i=this,r=e.coordinateSystem;this._model=e;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(_G(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):Jw(s,l,e)}xG(e.getGraph(),Bj(e));var u=e.getData();o.updateData(u);var c=e.getEdgeData();a.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,h=e.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,h);var p=e.get("layout");u.graph.eachNode(function(t){var n=t.dataIndex,r=t.getGraphicEl(),o=t.getModel();if(r){r.off("drag").off("dragend");var a=o.get("draggable");a&&r.on("drag",function(o){switch(p){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,h),d.setFixed(n),u.setItemLayout(n,[r.x,r.y]);break;case"circular":u.setItemLayout(n,[r.x,r.y]),t.setLayout({fixed:!0},!0),Hj(e,"symbolSize",t,[o.offsetX,o.offsetY]),i.updateLayout(e);break;default:u.setItemLayout(n,[r.x,r.y]),zj(e.getGraph(),e),i.updateLayout(e)}}).on("dragend",function(){d&&d.setUnfixed(n)}),r.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(V_(r).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(V_(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var f="circular"===e.get("layout")&&e.get(["circular","rotateLabel"]),g=u.getLayout("cx"),m=u.getLayout("cy");u.graph.eachNode(function(e){Yj(e,f,g,m)}),this._firstRender=!1},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,t){var n=this;!function i(){e.step(function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(i,16):i())})}()},t.prototype._updateController=function(e,t,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker(function(t,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!Dz(t,n,e)}),_G(e.coordinateSystem)?(r.enable(e.get("roam")),o.zoomLimit=e.get("scaleLimit"),o.zoom=e.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",function(t){Sz(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Mz(o,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),i._updateNodeAndLinkScale(),xG(e.getGraph(),Bj(e)),i._lineDraw.updateLayout(),n.updateLabelLayout()})):r.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Bj(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){xG(e.getGraph(),Bj(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},t.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},t.type="graph",t}(fD);function wG(e){return"_EC_"+e}var CG=function(){function e(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[wG(e)]){var i=new SG(e,t);return i.hostGraph=this,this.nodes.push(i),n[wG(e)]=i,i}process.env.NODE_ENV},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[wG(e)]},e.prototype.addEdge=function(e,t,n){var i=this._nodesMap,r=this._edgesMap;if(Fh(e)&&(e=this.nodes[e]),Fh(t)&&(t=this.nodes[t]),e instanceof SG||(e=i[wG(e)]),t instanceof SG||(t=i[wG(t)]),e&&t){var o=e.id+"-"+t.id,a=new MG(e,t,n);return a.hostGraph=this,this._directed&&(e.outEdges.push(a),t.inEdges.push(a)),e.edges.push(a),e!==t&&t.edges.push(a),this.edges.push(a),r[o]=a,a}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof SG&&(e=e.id),t instanceof SG&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,i=n.length,r=0;r<i;r++)n[r].dataIndex>=0&&e.call(t,n[r],r)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,r=0;r<i;r++)n[r].dataIndex>=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&e.call(t,n[r],r)},e.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof SG||(t=this._nodesMap[wG(t)]),t){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,t,null))for(var a=[t];a.length;){var s=a.shift(),l=s[r];for(o=0;o<l.length;o++){var u=l[o],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(i,c,s))return;a.push(c),c.__visited=!0}}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,r=0,o=n.length;r<o;r++)n[r].dataIndex=-1;for(r=0,o=e.count();r<o;r++)n[e.getRawIndex(r)].dataIndex=r;t.filterSelf(function(e){var n=i[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(r=0,o=i.length;r<o;r++)i[r].dataIndex=-1;for(r=0,o=t.count();r<o;r++)i[t.getRawIndex(r)].dataIndex=r},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,i=this.edges,r=0;r<n.length;r++)t.addNode(n[r].id,n[r].dataIndex);for(r=0;r<i.length;r++){var o=i[r];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},e}(),SG=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==e?"":e,this.dataIndex=null==t?-1:t}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=rp(),t=rp(),n=0;n<this.edges.length;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var r=[i.node1],o=[i.node2],a=0;a<r.length;){var s=r[a];a++,t.set(s.dataIndex,!0);for(var l=0;l<s.inEdges.length;l++)e.set(s.inEdges[l].dataIndex,!0),r.push(s.inEdges[l].node1)}for(a=0;a<o.length;){var u=o[a];a++,t.set(u.dataIndex,!0);for(l=0;l<u.outEdges.length;l++)e.set(u.outEdges[l].dataIndex,!0),o.push(u.outEdges[l].node2)}}}return{edge:e.keys(),node:t.keys()}},e}(),MG=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=rp(),t=rp();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],r=0;r<n.length;){var o=n[r];r++,t.set(o.dataIndex,!0);for(var a=0;a<o.inEdges.length;a++)e.set(o.inEdges[a].dataIndex,!0),n.push(o.inEdges[a].node1)}for(r=0;r<i.length;){var s=i[r];r++,t.set(s.dataIndex,!0);for(a=0;a<s.outEdges.length;a++)e.set(s.outEdges[a].dataIndex,!0),i.push(s.outEdges[a].node2)}return{edge:e.keys(),node:t.keys()}},e}();function TG(e,t){return{getValue:function(n){var i=this[e][t];return i.getStore().get(i.getDimensionIndex(n||"value"),this.dataIndex)},setVisual:function(n,i){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}function IG(e,t,n,i,r){for(var o=new CG(i),a=0;a<e.length;a++)o.addNode(Uh(e[a].id,e[a].name,a),a);var s=[],l=[],u=0;for(a=0;a<t.length;a++){var c=t[a],d=c.source,h=c.target;o.addEdge(d,h,u)&&(l.push(c),s.push(Uh(dy(c.id,null),d+" > "+h)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=YE(e,n);else{var g=nT.get(f),m=g&&g.dimensions||[];Ch(m,"value")<0&&m.concat(["value"]);var v=zE(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(p=new FE(v,n)).initData(e)}var y=new FE(["value"],n);return y.initData(l,s),r&&r(p,y),dB({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}Sh(SG,TG("hostGraph","data")),Sh(MG,TG("hostGraph","edgeData"));var DG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new eF(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),ry(t,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,t){var n,i=e.edges||e.links||[],r=e.data||e.nodes||[],o=this;if(r&&i){Ej(n=this)&&(n.__curvenessList=[],n.__edgeMap={},Nj(n));var a=IG(r,i,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e){var t=o._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=oS.prototype.getModel;function i(e,t){var i=n.call(this,e,t);return i.resolveParentPath=r,i}function r(e){if(e&&("label"===e[0]||"label"===e[1])){var t=e.slice();return"label"===e[0]?t[0]="edgeLabel":"label"===e[1]&&(t[1]="edgeLabel"),t}return e}t.wrapMethod("getItemModel",function(e){return e.resolveParentPath=r,e.getModel=i,e})});return Th(a.edges,function(e){!function(e,t,n,i){if(Ej(n)){var r=Lj(e,t,n),o=n.__edgeMap,a=o[Pj(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(e.node1,e.node2,this,e.dataIndex)},this),a.data}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(e,n),o=i.graph.getEdgeByIndex(e),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),BI("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return JI({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=Ih(this.option.categories||[],function(e){return null!=e.value?e:bh({value:0},e)}),t=new FE(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(nD),kG={type:"graphRoam",event:"graphRoam",update:"none"};var AG=function(){return function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}}(),EG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new AG},t.prototype.buildPath=function(e,t){var n=Math.cos,i=Math.sin,r=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=r/3?1:2),l=t.y-i(a)*o*(o>=r/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*o,t.y+i(a)*o),e.lineTo(t.x+n(t.angle)*r,t.y+i(t.angle)*r),e.lineTo(t.x-n(a)*o,t.y-i(a)*o),e.lineTo(s,l)},t}(d_);function NG(e,t){var n=null==e?"":e+"";return t&&(Oh(t)?n=t.replace("{value}",n):Ph(t)&&(n=t(e))),n}var LG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),r=function(e,t){var n=e.get("center"),i=t.getWidth(),r=t.getHeight(),o=Math.min(i,r);return{cx:Sv(n[0],t.getWidth()),cy:Sv(n[1],t.getHeight()),r:Sv(e.get("radius"),o/2)}}(e,n);this._renderMain(e,t,n,i,r),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,i,r){var o=this.group,a=e.get("clockwise"),s=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,u=e.getModel("axisLine"),c=u.get("roundCap")?vR:bw,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];Wx(f,!a);for(var g=(l=f[1])-(s=f[0]),m=s,v=[],y=0;d&&y<i.length;y++){var x=new c({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(i[y][0],0),1),cx:r.cx,cy:r.cy,clockwise:a,r0:r.r-p,r:r.r},silent:!0});x.setStyle({fill:i[y][1]}),x.setStyle(h.getLineStyle(["color","width"])),v.push(x),m=l}v.reverse(),Th(v,function(e){return o.add(e)});var _=function(e){if(e<=0)return i[0][1];var t;for(t=0;t<i.length;t++)if(i[t][0]>=e&&(0===t?0:i[t-1][0])<e)return i[t][1];return i[t-1][1]};this._renderTicks(e,t,n,_,r,s,l,a,p),this._renderTitleAndDetail(e,t,n,_,r),this._renderAnchor(e,r),this._renderPointer(e,t,n,_,r,s,l,a,p)},t.prototype._renderTicks=function(e,t,n,i,r,o,a,s,l){for(var u,c,d=this.group,h=r.cx,p=r.cy,f=r.r,g=+e.get("min"),m=+e.get("max"),v=e.getModel("splitLine"),y=e.getModel("axisTick"),x=e.getModel("axisLabel"),_=e.get("splitNumber"),b=y.get("splitNumber"),w=Sv(v.get("length"),f),C=Sv(y.get("length"),f),S=o,M=(a-o)/_,T=M/b,I=v.getModel("lineStyle").getLineStyle(),D=y.getModel("lineStyle").getLineStyle(),k=v.get("distance"),A=0;A<=_;A++){if(u=Math.cos(S),c=Math.sin(S),v.get("show")){var E=new Ew({shape:{x1:u*(f-(N=k?k+l:l))+h,y1:c*(f-N)+p,x2:u*(f-w-N)+h,y2:c*(f-w-N)+p},style:I,silent:!0});"auto"===I.stroke&&E.setStyle({stroke:i(A/_)}),d.add(E)}if(x.get("show")){var N=x.get("distance")+k,L=NG(Mv(A/_*(m-g)+g),x.get("formatter")),P=i(A/_),O=u*(f-w-N)+h,R=c*(f-w-N)+p,F=x.get("rotate"),z=0;"radial"===F?(z=-S+2*Math.PI)>Math.PI/2&&(z+=Math.PI):"tangential"===F?z=-S-Math.PI/2:Fh(F)&&(z=F*Math.PI/180),0===z?d.add(new T_({style:FC(x,{text:L,x:O,y:R,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:P}),silent:!0})):d.add(new T_({style:FC(x,{text:L,x:O,y:R,verticalAlign:"middle",align:"center"},{inheritColor:P}),silent:!0,originX:O,originY:R,rotation:z}))}if(y.get("show")&&A!==_){N=(N=y.get("distance"))?N+l:l;for(var V=0;V<=b;V++){u=Math.cos(S),c=Math.sin(S);var B=new Ew({shape:{x1:u*(f-N)+h,y1:c*(f-N)+p,x2:u*(f-C-N)+h,y2:c*(f-C-N)+p},silent:!0,style:D});"auto"===D.stroke&&B.setStyle({stroke:i((A+V/b)/_)}),d.add(B),S+=T}S-=T}else S+=M}},t.prototype._renderPointer=function(e,t,n,i,r,o,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),g=f.get("show"),m=e.getData(),v=m.mapDimension("value"),y=+e.get("min"),x=+e.get("max"),_=[y,x],b=[o,a];function w(t,n){var i,o=m.getItemModel(t).getModel("pointer"),a=Sv(o.get("width"),r.r),s=Sv(o.get("length"),r.r),l=e.get(["pointer","icon"]),u=o.get("offsetCenter"),c=Sv(u[0],r.r),d=Sv(u[1],r.r),h=o.get("keepAspect");return(i=l?Tk(l,c-a/2,d-s,a,s,null,h):new EG({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function C(e,t){var n=f.get("roundCap")?vR:bw,i=f.get("overlap"),a=i?f.get("width"):l/m.count(),u=i?r.r-a:r.r-(e+1)*a,c=i?r.r:r.r-e*a,d=new n({shape:{startAngle:o,endAngle:t,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:c}});return i&&(d.z2=Cv(m.get(v,e),[y,x],[100,0],!0)),d}(g||p)&&(m.diff(c).add(function(t){var n=m.get(v,t);if(p){var i=w(t,o);Qw(i,{rotation:-((isNaN(+n)?b[0]:Cv(n,_,b,!0))+Math.PI/2)},e),u.add(i),m.setItemGraphicEl(t,i)}if(g){var r=C(t,o),a=f.get("clip");Qw(r,{shape:{endAngle:Cv(n,_,b,a)}},e),u.add(r),B_(e.seriesIndex,m.dataType,t,r),h[t]=r}}).update(function(t,n){var i=m.get(v,t);if(p){var r=c.getItemGraphicEl(n),a=r?r.rotation:o,s=w(t,a);s.rotation=a,Jw(s,{rotation:-((isNaN(+i)?b[0]:Cv(i,_,b,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(g){var l=d[n],y=C(t,l?l.shape.endAngle:o),x=f.get("clip");Jw(y,{shape:{endAngle:Cv(i,_,b,x)}},e),u.add(y),B_(e.seriesIndex,m.dataType,t,y),h[t]=y}}).execute(),m.each(function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(p){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof m_){var c=s.style;s.useStyle(bh({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Cv(m.get(v,e),_,[0,1],!0))),s.z2EmphasisLift=0,Nb(s,t),Db(s,r,o,a)}if(g){var d=h[e];d.useStyle(m.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,Nb(d,t),Db(d,r,o,a)}}),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Tk(r,t.cx-i/2+Sv(o[0],t.r),t.cy-i/2+Sv(o[1],t.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,i,r){var o=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new mv,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){d[e]=new T_({silent:!0}),h[e]=new T_({silent:!0})}).update(function(e,t){d[e]=o._titleEls[t],h[e]=o._detailEls[t]}).execute(),a.each(function(t){var n=a.getItemModel(t),o=a.get(s,t),g=new mv,m=i(Cv(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=r.cx+Sv(y[0],r.r),_=r.cy+Sv(y[1],r.r);(D=d[t]).attr({z2:f?0:2,style:FC(v,{x:x,y:_,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(D)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),C=r.cx+Sv(w[0],r.r),S=r.cy+Sv(w[1],r.r),M=Sv(b.get("width"),r.r),T=Sv(b.get("height"),r.r),I=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,D=h[t],k=b.get("formatter");D.attr({z2:f?0:2,style:FC(b,{x:C,y:S,text:NG(o,k),width:isNaN(M)?null:M,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:I})}),UC(D,{normal:b},o,function(e){return NG(e,k)}),p&&YC(D,t,a,e,{getFormattedLabel:function(e,t,n,i,r,a){return NG(a?a.interpolatedValue:o,k)}}),g.add(D)}c.add(g)}),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(fD),PG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return Kd(t,e),t.prototype.getInitialData=function(e,t){return QR(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(nD);var OG=["itemStyle","opacity"],RG=function(e){function t(t,n){var i=e.call(this)||this,r=i,o=new Dw,a=new T_;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return Kd(t,e),t.prototype.updateData=function(e,t,n){var i=this,r=e.hostModel,o=e.getItemModel(t),a=e.getItemLayout(t),s=o.getModel("emphasis"),l=o.get(OG);l=null==l?1:l,n||rC(i),i.useStyle(e.getItemVisual(t,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Qw(i,{style:{opacity:l}},r,t)):Jw(i,{style:{opacity:l},shape:{points:a.points}},r,t),Nb(i,o),this._updateLabel(e,t),Db(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=e.hostModel,a=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"style"),u=l.fill;OC(r,RC(a),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:l.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var c=s.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new cf(c[0][0],c[0][1]):null},Jw(r,{style:{x:s.x,y:s.y}},o,t),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),XL(n,qL(a),{stroke:u})},t}(Tw),FG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this._data,o=this.group;i.diff(r).add(function(e){var t=new RG(i,e);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=r.getItemGraphicEl(t);n.updateData(i,e),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){iC(r.getItemGraphicEl(t),e,t)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(fD),zG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new eF(Eh(this.getData,this),Eh(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return QR(this,{coordDimensions:["value"],encodeDefaulter:Nh(NM,this)})},t.prototype._defaultLabelLine=function(e){ry(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),i=e.prototype.getDataParams.call(this,t),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(nD);function VG(e,t){e.eachSeriesByType("funnel",function(e){var n=e.getData(),i=n.mapDimension("value"),r=e.get("sort"),o=function(e,t){return sM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),a=e.get("orient"),s=o.width,l=o.height,u=function(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,function(e){return e}),r=[],o="ascending"===t,a=0,s=e.count();a<s;a++)r[a]=a;return Ph(t)?r.sort(t):"none"!==t&&r.sort(function(e,t){return o?i[e]-i[t]:i[t]-i[e]}),r}(n,r),c=o.x,d=o.y,h="horizontal"===a?[Sv(e.get("minSize"),l),Sv(e.get("maxSize"),l)]:[Sv(e.get("minSize"),s),Sv(e.get("maxSize"),s)],p=n.getDataExtent(i),f=e.get("min"),g=e.get("max");null==f&&(f=Math.min(p[0],0)),null==g&&(g=p[1]);var m=e.get("funnelAlign"),v=e.get("gap"),y=(("horizontal"===a?s:l)-v*(n.count()-1))/n.count(),x=function(e,t){if("horizontal"===a){var r=Cv(n.get(i,e)||0,[f,g],h,!0),o=void 0;switch(m){case"top":o=d;break;case"center":o=d+(l-r)/2;break;case"bottom":o=d+(l-r)}return[[t,o],[t,o+r]]}var u,p=Cv(n.get(i,e)||0,[f,g],h,!0);switch(m){case"left":u=c;break;case"center":u=c+(s-p)/2;break;case"right":u=c+s-p}return[[u,t],[u+p,t]]};"ascending"===r&&(y=-y,v=-v,"horizontal"===a?c+=s:d+=l,u=u.reverse());for(var _=0;_<u.length;_++){var b=u[_],w=u[_+1],C=n.getItemModel(b);if("horizontal"===a){var S=C.get(["itemStyle","width"]);null==S?S=y:(S=Sv(S,s),"ascending"===r&&(S=-S));var M=x(b,c),T=x(w,c+S);c+=S+v,n.setItemLayout(b,{points:M.concat(T.slice().reverse())})}else{var I=C.get(["itemStyle","height"]);null==I?I=y:(I=Sv(I,l),"ascending"===r&&(I=-I));M=x(b,d),T=x(w,d+I);d+=I+v,n.setItemLayout(b,{points:M.concat(T.slice().reverse())})}}!function(e){var t=e.hostModel.get("orient");e.each(function(n){var i,r,o,a,s=e.getItemModel(n),l=s.getModel("label").get("position"),u=s.getModel("labelLine"),c=e.getItemLayout(n),d=c.points,h="inner"===l||"inside"===l||"center"===l||"insideLeft"===l||"insideRight"===l;if(h)"insideLeft"===l?(r=(d[0][0]+d[3][0])/2+5,o=(d[0][1]+d[3][1])/2,i="left"):"insideRight"===l?(r=(d[1][0]+d[2][0])/2-5,o=(d[1][1]+d[2][1])/2,i="right"):(r=(d[0][0]+d[1][0]+d[2][0]+d[3][0])/4,o=(d[0][1]+d[1][1]+d[2][1]+d[3][1])/4,i="center"),a=[[r,o],[r,o]];else{var p=void 0,f=void 0,g=void 0,m=void 0,v=u.get("length");"production"!==process.env.NODE_ENV&&("vertical"===t&&["top","bottom"].indexOf(l)>-1&&(l="left"),"horizontal"===t&&["left","right"].indexOf(l)>-1&&(l="bottom")),"left"===l?(p=(d[3][0]+d[0][0])/2,f=(d[3][1]+d[0][1])/2,r=(g=p-v)-5,i="right"):"right"===l?(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,r=(g=p+v)+5,i="left"):"top"===l?(p=(d[3][0]+d[0][0])/2,o=(m=(f=(d[3][1]+d[0][1])/2)-v)-5,i="center"):"bottom"===l?(p=(d[1][0]+d[2][0])/2,o=(m=(f=(d[1][1]+d[2][1])/2)+v)+5,i="center"):"rightTop"===l?(p="horizontal"===t?d[3][0]:d[1][0],f="horizontal"===t?d[3][1]:d[1][1],"horizontal"===t?(o=(m=f-v)-5,i="center"):(r=(g=p+v)+5,i="top")):"rightBottom"===l?(p=d[2][0],f=d[2][1],"horizontal"===t?(o=(m=f+v)+5,i="center"):(r=(g=p+v)+5,i="bottom")):"leftTop"===l?(p=d[0][0],f="horizontal"===t?d[0][1]:d[1][1],"horizontal"===t?(o=(m=f-v)-5,i="center"):(r=(g=p-v)-5,i="right")):"leftBottom"===l?(p="horizontal"===t?d[1][0]:d[3][0],f="horizontal"===t?d[1][1]:d[2][1],"horizontal"===t?(o=(m=f+v)+5,i="center"):(r=(g=p-v)-5,i="right")):(p=(d[1][0]+d[2][0])/2,f=(d[1][1]+d[2][1])/2,"horizontal"===t?(o=(m=f+v)+5,i="center"):(r=(g=p+v)+5,i="left")),"horizontal"===t?r=g=p:o=m=f,a=[[p,f],[g,m]]}c.label={linePoints:a,x:r,y:o,verticalAlign:"middle",textAlign:i,inside:h}})}(n)})}var BG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new mv,n._initialized=!1,n}return Kd(t,e),t.prototype.init=function(){this.group.add(this._dataGroup)},t.prototype.render=function(e,t,n,i){this._progressiveEls=null;var r=this._dataGroup,o=e.getData(),a=this._data,s=e.coordinateSystem,l=s.dimensions,u=WG(e);if(o.diff(a).add(function(e){HG(GG(o,r,e,l,s),o,e,u)}).update(function(t,n){var i=a.getItemGraphicEl(n),r=jG(o,t,l,s);o.setItemGraphicEl(t,i),Jw(i,{shape:{points:r}},e,t),rC(i),HG(i,o,t,u)}).remove(function(e){var t=a.getItemGraphicEl(e);r.remove(t)}).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var i=e.model,r=e.getRect(),o=new C_({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),a="horizontal"===i.get("layout")?"width":"height";return o.setShape(a,0),Qw(o,{shape:{width:r.width,height:r.height}},t,n),o}(s,e,function(){setTimeout(function(){r.removeClipPath()})});r.setClipPath(c)}this._data=o},t.prototype.incrementalPrepareRender=function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},t.prototype.incrementalRender=function(e,t,n){for(var i=t.getData(),r=t.coordinateSystem,o=r.dimensions,a=WG(t),s=this._progressiveEls=[],l=e.start;l<e.end;l++){var u=GG(i,this._dataGroup,l,o,r);u.incremental=!0,HG(u,i,l,a),s.push(u)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(fD);function jG(e,t,n,i){for(var r=[],o=0;o<n.length;o++){var a=n[o],s=e.get(e.mapDimension(a),t);UG(s,i.getAxis(a).type)||r.push(i.dataToPoint(s,a))}return r}function GG(e,t,n,i,r){var o=jG(e,n,i,r),a=new Dw({shape:{points:o},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function WG(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),Hh(t=Bv(t))&&(t=0),{smooth:t}}function HG(e,t,n,i){e.useStyle(t.getItemVisual(n,"style")),e.style.fill=null,e.setShape("smooth",i.smooth);var r=t.getItemModel(n),o=r.getModel("emphasis");Nb(e,r,"lineStyle"),Db(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function UG(e,t){return"category"===t?null==e:null==e||isNaN(e)}var YG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Kd(t,e),t.prototype.getInitialData=function(e,t){return YE(null,this,{useEncodeDefaulter:Eh(ZG,null,this)})},t.prototype.getRawIndicesByActiveState=function(e){var t=this.coordinateSystem,n=this.getData(),i=[];return t.eachActiveState(n,function(t,r){e===t&&i.push(n.getRawIndex(r))}),i},t.type="series.parallel",t.dependencies=["parallel"],t.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},t}(nD);function ZG(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var n={};return Th(t.dimensions,function(e){var t=+e.replace("dim","");n[e]=t}),n}}var XG=["lineStyle","opacity"],qG={seriesType:"parallel",reset:function(e,t){var n=e.coordinateSystem,i={normal:e.get(["lineStyle","opacity"]),active:e.get("activeOpacity"),inactive:e.get("inactiveOpacity")};return{progress:function(e,t){n.eachActiveState(t,function(e,n){var r=i[e];if("normal"===e&&t.hasItemOption){var o=t.getItemModel(n).get(XG,!0);null!=o&&(r=o)}t.ensureUniqueItemVisual(n,"style").opacity=r},e.start,e.end)}}}};function $G(e){!function(e){if(e.parallel)return;var t=!1;Th(e.series,function(e){e&&"parallel"===e.type&&(t=!0)}),t&&(e.parallel=[{}])}(e),function(e){var t=iy(e.parallelAxis);Th(t,function(t){if(zh(t)){var n=t.parallelIndex||0,i=iy(e.parallel)[n];i&&i.parallelAxisDefault&&xh(t,i.parallelAxisDefault,!1)}})}(e)}var KG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},Th(JG,function(e,t){n.getZr().on(t,this._handlers[t]=Eh(e,this))},this)),SD(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){MD(this,"_throttledDispatchExpand"),Th(this._handlers,function(e,n){t.getZr().off(n,e)}),this._handlers=null},t.prototype._throttledDispatchExpand=function(e){this._dispatchExpand(e)},t.prototype._dispatchExpand=function(e){e&&this._api.dispatchAction(bh({type:"parallelAxisExpand"},e))},t.type="parallel",t}(cD),JG={mousedown:function(e){QG(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(QG(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&QG(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function QG(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var eW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&xh(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){Th(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];Th(kh(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(e){return(e.get("parallelIndex")||0)===this.componentIndex},this),function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(fM),tW=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return Kd(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(SL);function nW(e,t,n,i,r,o){e=e||0;var a=n[1]-n[0];if(null!=r&&(r=rW(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=rW(s,[0,a]),r=o=rW(s,[r,o]),i=0}t[0]=rW(t[0],n),t[1]=rW(t[1],n);var l=iW(t,i);t[i]+=e;var u,c=r||0,d=n.slice();return l.sign<0?d[0]+=c:d[1]-=c,t[i]=rW(t[i],d),u=iW(t,i),null!=r&&(u.sign!==l.sign||u.span<r)&&(t[1-i]=t[i]+l.sign*r),u=iW(t,i),null!=o&&u.span>o&&(t[1-i]=t[i]+u.sign*o),t}function iW(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function rW(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var oW=Th,aW=Math.min,sW=Math.max,lW=Math.floor,uW=Math.ceil,cW=Mv,dW=Math.PI,hW=function(){function e(e,t,n){this.type="parallel",this._axesMap=rp(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var i=e.dimensions,r=e.parallelAxisIndex;oW(i,function(e,n){var i=r[n],o=t.getComponent("parallelAxis",i),a=this._axesMap.set(e,new tW(e,YN(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this},this)},e.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,r=t.pixelDimIndex,o=e[1-r],a=e[r];return o>=n&&o<=n+t.axisLength&&a>=i&&a<=i+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var i=n.getData();oW(this.dimensions,function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),UN(t.scale,t.model)},this)}},this)},e.prototype.resize=function(e,t){this._rect=sM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e,t=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=t.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,c=pW(t.get("axisExpandWidth"),l),d=pW(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>d&&d>1&&c>0&&s>0,p=t.get("axisExpandWindow");p?(e=pW(p[1]-p[0],l),p[1]=p[0]+e):(e=pW(c*(d-1),l),(p=[c*(t.get("axisExpandCenter")||lW(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-d);f<3&&(f=0);var g=[lW(cW(p[0]/c,1))+1,uW(cW(p[1]/c,1))-1],m=f/c*p[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;t.each(function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])}),oW(n,function(t,n){var o=(i.axisExpandable?gW:fW)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:dW/2,vertical:0},l=[a[r].x+e.x,a[r].y+e.y],u=s[r],c=[1,0,0,1,0,0];sf(c,c,u),af(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];Th(o,function(t){a.push(e.mapDimension(t)),s.push(r.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var c=void 0;if(l){c="active";for(var d=e.getValues(a,u),h=0,p=o.length;h<p;h++){if("inactive"===s[h].getActiveState(d[h])){c="inactive";break}}}else c="normal";t(c,u)}},e.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,r=e.length;i<r;i++)"normal"!==t.get(e[i]).model.getActiveState()&&(n=!0);return n},e.prototype.axisCoordToPoint=function(e,t){return xC([e,0],this._axesLayout[t].transform)},e.prototype.getAxisLayout=function(e){return yh(this._axesLayout[e])},e.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),r=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var a,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),d=null!=c[0];if(u)d&&u&&s<r*c[0]?(l="jump",a=s-r*c[2]):d&&u&&s>r*(1-c[0])?(l="jump",a=s-r*(1-c[2])):(a=s-r*c[1])>=0&&(a=s-r*(1-c[1]))<=0&&(a=0),(a*=t.axisExpandWidth/u)?nW(a,i,o,"all"):l="none";else{var h=i[1]-i[0];(i=[sW(0,o[1]*s/h-h/2)])[1]=aW(o[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:l}},e}();function pW(e,t){return aW(sW(e,t[0]),t[1])}function fW(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function gW(e,t){var n,i,r=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,i=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*o-t.axisExpandWindow[0],u=o,c=!0):(n=r-(a-1-e)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}var mW={create:function(e,t){var n=[];return e.eachComponent("parallel",function(i,r){var o=new hW(i,e,t);o.name="parallel_"+r,o.resize(i,t),i.coordinateSystem=o,o.model=i,n.push(o)}),e.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var t=e.getReferringComponents("parallel",by).models[0];e.coordinateSystem=t.coordinateSystem}}),n}},vW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return Kd(t,e),t.prototype.getAreaSelectStyle=function(){return Ry([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=yh(e);if(t)for(var n=t.length-1;n>=0;n--)Tv(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(+e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,r=t.length;i<r;i++)if(t[i][0]<=e&&e<=t[i][1])return"active";return"inactive"},t}(fM);Sh(vW,QN);var yW=!0,xW=Math.min,_W=Math.max,bW=Math.pow,wW="globalPan",CW={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},SW={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},MW={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},TW=0,IW=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},"production"!==process.env.NODE_ENV&&$h(t),n._zr=t,n.group=new mv,n._uid="brushController_"+TW++,Th(eH,function(e,t){this._handlers[t]=Eh(e,this)},n),n}return Kd(t,e),t.prototype.enableBrush=function(e){return"production"!==process.env.NODE_ENV&&$h(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t=this._zr;this._enableGlobalPan||function(e,t,n){xz(e)[t]=n}(t,wW,this._uid),Th(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=xh(yh(MW),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var i=xz(e);i[t]===n&&(i[t]=null)}(e,wW,this._uid),Th(this._handlers,function(t,n){e.off(n,t)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};Th(e,function(e){t[e.panelId]=yh(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},"production"!==process.env.NODE_ENV&&(this._mounted=!0),this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){"production"!==process.env.NODE_ENV&&$h(this._mounted),e=Ih(e,function(e){return xh(yh(MW),e,!0)});var t=this._covers,n=this._covers=[],i=this,r=this._creatingCover;return new pE(t,e,function(e,t){return o(e.__brushOption,t)},o).add(a).update(a).remove(function(e){t[e]!==r&&i.group.remove(t[e])}).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function a(o,a){var s=e[o];if(null!=a&&t[a]===r)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):kW(i,DW(i,s));NW(i,l)}}},t.prototype.unmount=function(){if("production"===process.env.NODE_ENV||this._mounted)return this.enableBrush(!1),RW(this),this._zr.remove(this.group),"production"!==process.env.NODE_ENV&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Ap);function DW(e,t){var n=nH[t.brushType].createCover(e,t);return n.__brushOption=t,EW(n,t),e.group.add(n),n}function kW(e,t){var n=LW(t);return n.endCreating&&(n.endCreating(e,t),EW(t,t.__brushOption)),t}function AW(e,t){var n=t.__brushOption;LW(t).updateCoverShape(e,t,n.range,n)}function EW(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function NW(e,t){LW(t).updateCommon(e,t),AW(e,t)}function LW(e){return nH[e.__brushOption.brushType]}function PW(e,t,n){var i,r=e._panels;if(!r)return yW;var o=e._transform;return Th(r,function(e){e.isTargetByCursor(t,n,o)&&(i=e)}),i}function OW(e,t){var n=e._panels;if(!n)return yW;var i=t.__brushOption.panelId;return null!=i?n[i]:yW}function RW(e){var t=e._covers,n=t.length;return Th(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function FW(e,t){var n=Ih(e._covers,function(e){var t=e.__brushOption,n=yh(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function zW(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function VW(e,t,n,i){var r=new mv;return r.add(new C_({name:"main",style:WW(n),silent:!0,draggable:!0,cursor:"move",drift:Nh(YW,e,t,r,["n","s","w","e"]),ondragend:Nh(FW,t,{isEnd:!0})})),Th(i,function(n){r.add(new C_({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Nh(YW,e,t,r,n),ondragend:Nh(FW,t,{isEnd:!0})}))}),r}function BW(e,t,n,i){var r=i.brushStyle.lineWidth||0,o=_W(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,c=n[0][1],d=n[1][1],h=c-o+r/2,p=d-o+r/2,f=c-a,g=d-s,m=f+r,v=g+r;GW(e,t,"main",a,s,f,g),i.transformable&&(GW(e,t,"w",l,u,o,v),GW(e,t,"e",h,u,o,v),GW(e,t,"n",l,u,m,o),GW(e,t,"s",l,p,m,o),GW(e,t,"nw",l,u,o,o),GW(e,t,"ne",h,u,o,o),GW(e,t,"sw",l,p,o,o),GW(e,t,"se",h,p,o,o))}function jW(e,t){var n=t.__brushOption,i=n.transformable,r=t.childAt(0);r.useStyle(WW(n)),r.attr({silent:!i,cursor:i?"move":"default"}),Th([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var r=t.childOfName(n.join("")),o=1===n.length?UW(e,n[0]):function(e,t){var n=[UW(e,t[0]),UW(e,t[1])];return("e"===n[0]||"w"===n[0])&&n.reverse(),n.join("")}(e,n);r&&r.attr({silent:!i,invisible:!i,cursor:i?SW[o]+"-resize":null})})}function GW(e,t,n,i,r,o,a){var s,l,u,c,d,h=t.childOfName(n);h&&h.setShape((s=qW(e,t,[[i,r],[i+o,r+a]]),l=xW(s[0][0],s[1][0]),u=xW(s[0][1],s[1][1]),c=_W(s[0][0],s[1][0]),d=_W(s[0][1],s[1][1]),{x:l,y:u,width:c-l,height:d-u}))}function WW(e){return wh({strokeNoScale:!0},e.brushStyle)}function HW(e,t,n,i){var r=[xW(e,n),xW(t,i)],o=[_W(e,n),_W(t,i)];return[[r[0],o[0]],[r[1],o[1]]]}function UW(e,t){var n=_C({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return yC(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function YW(e,t,n,i,r,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=XW(t,r,o);Th(i,function(e){var t=CW[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(HW(s[0][0],s[1][0],s[0][1],s[1][1])),NW(t,n),FW(t,{isEnd:!1})}function ZW(e,t,n,i){var r=t.__brushOption.range,o=XW(e,n,i);Th(r,function(e){e[0]+=o[0],e[1]+=o[1]}),NW(e,t),FW(e,{isEnd:!1})}function XW(e,t,n){var i=e.group,r=i.transformCoordToLocal(t,n),o=i.transformCoordToLocal(0,0);return[r[0]-o[0],r[1]-o[1]]}function qW(e,t,n){var i=OW(e,t);return i&&i!==yW?i.clipPath(n,e._transform):yh(n)}function $W(e){var t=e.event;t.preventDefault&&t.preventDefault()}function KW(e,t,n){return e.childOfName("main").contain(t,n)}function JW(e,t,n,i){var r,o=e._creatingCover,a=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],i=t[0],r=n[0]-i[0],o=n[1]-i[1];return bW(r*r+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&RW(e);var l=yh(s);l.brushType=QW(l.brushType,a),l.panelId=a===yW?null:a.panelId,o=e._creatingCover=DW(e,l),e._covers.push(o)}if(o){var u=nH[QW(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(qW(e,o,e._track)),i&&(kW(e,o),u.updateCommon(e,o)),AW(e,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&PW(e,t,n)&&RW(e)&&(r={isEnd:i,removeOnClick:!0});return r}function QW(e,t){return"auto"===e?("production"!==process.env.NODE_ENV&&$h(t&&t.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),t.defaultBrushType):e}var eH={mousedown:function(e){if(this._dragging)tH(this,e);else if(!e.target||!e.target.draggable){$W(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=PW(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,i=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var i=e._zr;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}(e,t.offsetX,t.offsetY)){var i=e._zr,r=e._covers,o=PW(e,t,n);if(!e._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(o===yW||s.panelId===o.panelId)&&nH[s.brushType].contain(r[a],n[0],n[1]))return}o&&i.setCursorStyle("crosshair")}}(this,e,i),this._dragging){$W(e);var r=JW(this,e,i,!1);r&&FW(this,r)}},mouseup:function(e){tH(this,e)}};function tH(e,t){if(e._dragging){$W(t);var n=t.offsetX,i=t.offsetY,r=e.group.transformCoordToLocal(n,i),o=JW(e,t,r,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&FW(e,o)}}var nH={lineX:iH(0),lineY:iH(1),rect:{createCover:function(e,t){function n(e){return e}return VW({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=zW(e);return HW(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){BW(e,t,n,i)},updateCommon:jW,contain:KW},polygon:{createCover:function(e,t){var n=new mv;return n.add(new Dw({name:"main",style:WW(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Tw({name:"main",draggable:!0,drift:Nh(ZW,e,t),ondragend:Nh(FW,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:qW(e,t,n)})},updateCommon:jW,contain:KW}};function iH(e){return{createCover:function(t,n){return VW({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=zW(t);return[xW(n[0][e],n[1][e]),_W(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,r){var o,a=OW(t,n);if(a!==yW&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(e);else{var s=t._zr;o=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[i,o];e&&l.reverse(),BW(t,n,l,r)},updateCommon:jW,contain:KW}}function rH(e){return e=sH(e),function(t){return CC(t,e)}}function oH(e,t){return e=sH(e),function(n){var i=null!=t?t:n,r=i?e.width:e.height,o=i?e.x:e.y;return[o,o+(r||0)]}}function aH(e,t,n){var i=sH(e);return function(e,r){return i.contain(r[0],r[1])&&!Dz(e,t,n)}}function sH(e){return xf.create(e)}var lH=["axisLine","axisTickLabel","axisName"],uH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new IW(n.getZr())).on("brush",Eh(this._onBrush,this))},t.prototype.render=function(e,t,n,i){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,i)){this.axisModel=e,this.api=n,this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new mv,this.group.add(this._axisGroup),e.get("show")){var o=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),a=o.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=bh({strokeContainThreshold:l},a.getAxisLayout(u)),d=new NF(e,c);Th(lH,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,e,o,l,n),wC(r,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,i,r,o){var a=n.axis.getExtent(),s=a[1]-a[0],l=Math.min(30,.1*Math.abs(s)),u=xf.create({x:a[0],y:-r/2,width:s,height:r});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:rH(u),isTargetByCursor:aH(u,o,i),getLinearBrushOtherExtent:oH(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return Ih(e.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,i=n.axis,r=Ih(t,function(e){return[i.coordToData(e.range[0],!0),i.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:r})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(cD);var cH={type:"axisAreaSelect",event:"axisAreaSelected"};var dH={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function hH(e){e.registerComponentView(KG),e.registerComponentModel(eW),e.registerCoordinateSystem("parallel",mW),e.registerPreprocessor($G),e.registerComponentModel(vW),e.registerComponentView(uH),gF(e,"parallel",vW,dH),function(e){e.registerAction(cH,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})})}(e)}var pH=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}}(),fH=function(e){function t(t){return e.call(this,t)||this}return Kd(t,e),t.prototype.getDefaultShape=function(){return new pH},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){fb(this)},t.prototype.downplay=function(){gb(this)},t}(d_),gH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=this,r=e.getGraph(),o=this.group,a=e.layoutInfo,s=a.width,l=a.height,u=e.getData(),c=e.getData("edge"),d=e.get("orient");this._model=e,o.removeAll(),o.x=a.x,o.y=a.y,r.eachEdge(function(t){var n=new fH,i=V_(n);i.dataIndex=t.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var r,a,u,h,p,f,g,m,v=t.getModel(),y=v.getModel("lineStyle"),x=y.get("curveness"),_=t.node1.getLayout(),b=t.node1.getModel(),w=b.get("localX"),C=b.get("localY"),S=t.node2.getLayout(),M=t.node2.getModel(),T=M.get("localX"),I=M.get("localY"),D=t.getLayout();n.shape.extent=Math.max(1,D.dy),n.shape.orient=d,"vertical"===d?(r=(null!=w?w*s:_.x)+D.sy,a=(null!=C?C*l:_.y)+_.dy,u=(null!=T?T*s:S.x)+D.ty,p=r,f=a*(1-x)+(h=null!=I?I*l:S.y)*x,g=u,m=a*x+h*(1-x)):(r=(null!=w?w*s:_.x)+_.dx,a=(null!=C?C*l:_.y)+D.sy,p=r*(1-x)+(u=null!=T?T*s:S.x)*x,f=a,g=r*x+u*(1-x),m=h=(null!=I?I*l:S.y)+D.ty),n.setShape({x1:r,y1:a,x2:u,y2:h,cpx1:p,cpy1:f,cpx2:g,cpy2:m}),n.useStyle(y.getItemStyle()),mH(n.style,d,t);var k=""+v.get("value"),A=RC(v,"edgeLabel");OC(n,A,{labelFetcher:{getFormattedLabel:function(t,n,i,r,o,a){return e.getFormattedLabel(t,n,"edge",r,Zh(o,A.normal&&A.normal.get("formatter"),k),a)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:"inside"});var E=v.getModel("emphasis");Nb(n,v,"lineStyle",function(e){var n=e.getItemStyle();return mH(n,d,t),n}),o.add(n),c.setItemGraphicEl(t.dataIndex,n);var N=E.get("focus");Db(n,"adjacency"===N?t.getAdjacentDataIndices():"trajectory"===N?t.getTrajectoryDataIndices():N,E.get("blurScope"),E.get("disabled"))}),r.eachNode(function(t){var n=t.getLayout(),i=t.getModel(),r=i.get("localX"),a=i.get("localY"),c=i.getModel("emphasis"),d=i.get(["itemStyle","borderRadius"])||0,h=new C_({shape:{x:null!=r?r*s:n.x,y:null!=a?a*l:n.y,width:n.dx,height:n.dy,r:d},style:i.getModel("itemStyle").getItemStyle(),z2:10});OC(h,RC(i),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,"node")}},labelDataIndex:t.dataIndex,defaultText:t.id}),h.disableLabelAnimation=!0,h.setStyle("fill",t.getVisual("color")),h.setStyle("decal",t.getVisual("style").decal),Nb(h,i),o.add(h),u.setItemGraphicEl(t.dataIndex,h),V_(h).dataType="node";var p=c.get("focus");Db(h,"adjacency"===p?t.getAdjacentDataIndices():"trajectory"===p?t.getTrajectoryDataIndices():p,c.get("blurScope"),c.get("disabled"))}),u.eachItemGraphicEl(function(t,r){u.getItemModel(r).get("draggable")&&(t.drift=function(t,o){i._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=o,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(r),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){i._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&e.isAnimationEnabled()&&o.setClipPath(function(e,t,n){var i=new C_({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Qw(i,{shape:{width:e.width+20}},t,n),i}(o.getBoundingRect(),e,function(){o.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){},t.type="sankey",t}(fD);function mH(e,t,n){switch(e.fill){case"source":e.fill=n.node1.getVisual("color"),e.decal=n.node1.getVisual("style").decal;break;case"target":e.fill=n.node2.getVisual("color"),e.decal=n.node2.getVisual("style").decal;break;case"gradient":var i=n.node1.getVisual("color"),r=n.node2.getVisual("color");Oh(i)&&Oh(r)&&(e.fill=new Bw(0,0,+("horizontal"===t),+("vertical"===t),[{color:i,offset:0},{color:r,offset:1}]))}}var vH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],i=e.data||e.nodes||[],r=e.levels||[];this.levelModels=[];for(var o=this.levelModels,a=0;a<r.length;a++)if(null!=r[a].depth&&r[a].depth>=0)o[r[a].depth]=new oS(r[a],this,t);else if("production"!==process.env.NODE_ENV)throw new Error("levels[i].depth is mandatory and should be natural number");return IG(i,n,this,!0,function(e,t){e.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,i=n.getData().getItemLayout(t);if(i){var r=i.depth,o=n.levelModels[r];o&&(e.parentModel=o)}return e}),t.wrapMethod("getItemModel",function(e,t){var n=e.parentModel,i=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(e.parentModel=o)}return e})}).data},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function i(e){return isNaN(e)||null==e}if("edge"===n){var r=this.getDataParams(e,n),o=r.data,a=r.value;return BI("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,l=this.getDataParams(e,n).data.name;return BI("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var i=e.prototype.getDataParams.call(this,t,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=r}return i},t.type="series.sankey",t.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},t}(nD);function yH(e,t){e.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),r=function(e,t){return sM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=r;var o=r.width,a=r.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){Th(e,function(e){var t=DH(e.outEdges,IH),n=DH(e.inEdges,IH),i=e.getValue()||0,r=Math.max(t,n,i);e.setLayout({value:r},!0)})}(l),function(e,t,n,i,r,o,a,s,l){(function(e,t,n,i,r,o,a){for(var s=[],l=[],u=[],c=[],d=0,h=0;h<t.length;h++)s[h]=1;for(h=0;h<e.length;h++)l[h]=e[h].inEdges.length,0===l[h]&&u.push(e[h]);var p=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:d},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y];s[t.indexOf(x)]=0;var _=x.node2;0===--l[e.indexOf(_)]&&c.indexOf(_)<0&&c.push(_)}}++d,u=c,c=[]}for(h=0;h<s.length;h++)if(1===s[h])throw new Error("Sankey is a DAG, the original data has cycle!");var b=p>d-1?p:d-1;a&&"left"!==a&&function(e,t,n,i){if("right"===t){for(var r=[],o=e,a=0;o.length;){for(var s=0;s<o.length;s++){var l=o[s];l.setLayout({skNodeHeight:a},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];r.indexOf(c.node1)<0&&r.push(c.node1)}}o=r,r=[],++a}Th(e,function(e){xH(e)||e.setLayout({depth:Math.max(0,i-e.getLayout().skNodeHeight)},!0)})}else"justify"===t&&function(e,t){Th(e,function(e){xH(e)||e.outEdges.length||e.setLayout({depth:t},!0)})}(e,i)}(e,a,0,b);var w="vertical"===o?(r-n)/b:(i-n)/b;!function(e,t,n){Th(e,function(e){var i=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:i},!0):e.setLayout({x:i},!0)})}(e,w,o)})(e,t,n,r,o,s,l),function(e,t,n,i,r,o,a){var s=function(e,t){var n=[],i="vertical"===t?"y":"x",r=My(e,function(e){return e.getLayout()[i]});return r.keys.sort(function(e,t){return e-t}),Th(r.keys,function(e){n.push(r.buckets.get(e))}),n}(e,a);(function(e,t,n,i,r,o){var a=1/0;Th(e,function(e){var t=e.length,s=0;Th(e,function(e){s+=e.getLayout().value});var l="vertical"===o?(i-(t-1)*r)/s:(n-(t-1)*r)/s;l<a&&(a=l)}),Th(e,function(e){Th(e,function(e,t){var n=e.getLayout().value*a;"vertical"===o?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),Th(t,function(e){var t=+e.getValue()*a;e.setLayout({dy:t},!0)})})(s,t,n,i,r,a),_H(s,r,n,i,a);for(var l=1;o>0;o--)bH(s,l*=.99,a),_H(s,r,n,i,a),kH(s,l,a),_H(s,r,n,i,a)}(e,t,o,r,i,a,s),function(e,t){var n="vertical"===t?"x":"y";Th(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),Th(e,function(e){var t=0,n=0;Th(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),Th(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}(e,s)}(l,u,n,i,o,a,0!==kh(l,function(e){return 0===e.getLayout().value}).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))})}function xH(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function _H(e,t,n,i,r){var o="vertical"===r?"x":"y";Th(e,function(e){var a,s,l;e.sort(function(e,t){return e.getLayout()[o]-t.getLayout()[o]});for(var u=0,c=e.length,d="vertical"===r?"dx":"dy",h=0;h<c;h++)(l=u-(s=e[h]).getLayout()[o])>0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[d]+t;if((l=u-t-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(h=c-2;h>=0;--h)(l=(s=e[h]).getLayout()[o]+s.getLayout()[d]+t-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}})}function bH(e,t,n){Th(e.slice().reverse(),function(e){Th(e,function(e){if(e.outEdges.length){var i=DH(e.outEdges,wH,n)/DH(e.outEdges,IH);if(isNaN(i)){var r=e.outEdges.length;i=r?DH(e.outEdges,CH,n)/r:0}if("vertical"===n){var o=e.getLayout().x+(i-TH(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(i-TH(e,n))*t;e.setLayout({y:a},!0)}}})})}function wH(e,t){return TH(e.node2,t)*e.getValue()}function CH(e,t){return TH(e.node2,t)}function SH(e,t){return TH(e.node1,t)*e.getValue()}function MH(e,t){return TH(e.node1,t)}function TH(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function IH(e){return e.getValue()}function DH(e,t,n){for(var i=0,r=e.length,o=-1;++o<r;){var a=+t(e[o],n);isNaN(a)||(i+=a)}return i}function kH(e,t,n){Th(e,function(e){Th(e,function(e){if(e.inEdges.length){var i=DH(e.inEdges,SH,n)/DH(e.inEdges,IH);if(isNaN(i)){var r=e.inEdges.length;i=r?DH(e.inEdges,MH,n)/r:0}if("vertical"===n){var o=e.getLayout().x+(i-TH(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(i-TH(e,n))*t;e.setLayout({y:a},!0)}}})})}function AH(e){e.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,i=t.edges;if(n.length){var r=1/0,o=-1/0;Th(n,function(e){var t=e.getLayout().value;t<r&&(r=t),t>o&&(o=t)}),Th(n,function(t){var n=new XB({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),i=t.getModel().get(["itemStyle","color"]);null!=i?(t.setVisual("color",i),t.setVisual("style",{fill:i})):(t.setVisual("color",n),t.setVisual("style",{fill:n}))})}i.length&&Th(i,function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)})})}var EH=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&null!=t.get(e)},e.prototype.getInitialData=function(e,t){var n,i,r=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(e.layout="horizontal",n=r.getOrdinalMeta(),i=!this._hasEncodeRule("x")):"category"===s?(e.layout="vertical",n=o.getOrdinalMeta(),i=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],d=l[1-u],h=[r,o],p=h[u].get("type"),f=h[1-u].get("type"),g=e.data;if(g&&i){var m=[];Th(g,function(e,t){var n;Lh(e)?(n=e.slice(),e.unshift(t)):Lh(e.value)?((n=bh({},e)).value=n.value.slice(),e.value.unshift(t)):n=e,m.push(n)}),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:mE(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:mE(f),dimsDef:v.slice()}];return QR(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Nh(EM,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),NH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return Kd(t,e),t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},t}(nD);Sh(NH,EH,!0);var LH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===e.get("layout")?1:0;i.diff(o).add(function(e){if(i.hasValue(e)){var t=RH(i.getItemLayout(e),i,e,a,!0);i.setItemGraphicEl(e,t),r.add(t)}}).update(function(e,t){var n=o.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?(rC(n),FH(s,n,i,e)):n=RH(s,i,e,a),r.add(n),i.setItemGraphicEl(e,n)}else r.remove(n)}).remove(function(e){var t=o.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=i},t.prototype.remove=function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})},t.type="boxplot",t}(fD),PH=function(){return function(){}}(),OH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new PH},t.prototype.buildPath=function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])},t}(d_);function RH(e,t,n,i,r){var o=e.ends,a=new OH({shape:{points:r?zH(o,i,e):o}});return FH(e,a,t,n,r),a}function FH(e,t,n,i,r){var o=n.hostModel;(0,EC[r?"initProps":"updateProps"])(t,{shape:{points:e.ends}},o,i),t.useStyle(n.getItemVisual(i,"style")),t.style.strokeNoScale=!0,t.z2=100;var a=n.getItemModel(i),s=a.getModel("emphasis");Nb(t,a),Db(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function zH(e,t,n){return Ih(e,function(e){return(e=e.slice())[t]=n.initBaseline,e})}var VH=Th;function BH(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",function(e){var i=e.getBaseAxis(),r=Ch(n,i);r<0&&(r=n.length,n[r]=i,t[r]={axis:i,seriesModels:[]}),t[r].seriesModels.push(e)}),t}(e);VH(t,function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n=e.axis,i=e.seriesModels,r=i.length,o=e.boxWidthList=[],a=e.boxOffsetList=[],s=[];if("category"===n.type)t=n.getBandWidth();else{var l=0;VH(i,function(e){l=Math.max(l,e.getData().count())});var u=n.getExtent();t=Math.abs(u[1]-u[0])/l}VH(i,function(e){var n=e.get("boxWidth");Lh(n)||(n=[n,n]),s.push([Sv(n[0],t)||0,Sv(n[1],t)||0])});var c=.8*t-2,d=c/r*.3,h=(c-d*(r-1))/r,p=h/2-c/2;VH(i,function(e,t){a.push(p),p+=d+h,o.push(Math.min(Math.max(h,s[t][0]),s[t][1]))})}(e),VH(t,function(t,n){!function(e,t,n){var i=e.coordinateSystem,r=e.getData(),o=n/2,a="horizontal"===e.get("layout")?0:1,s=1-a,l=["x","y"],u=r.mapDimension(l[a]),c=r.mapDimensionsAll(l[s]);if(null==u||c.length<5)return;for(var d=0;d<r.count();d++){var h=r.get(u,d),p=x(h,c[2],d),f=x(h,c[0],d),g=x(h,c[1],d),m=x(h,c[3],d),v=x(h,c[4],d),y=[];_(y,g,!1),_(y,m,!0),y.push(f,g,v,m),b(y,f),b(y,v),b(y,p),r.setItemLayout(d,{initBaseline:p[s],ends:y})}function x(e,n,o){var l,u=r.get(n,o),c=[];return c[a]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[a]+=t,l}function _(e,t,n){var i=t.slice(),r=t.slice();i[a]+=o,r[a]-=o,n?e.push(i,r):e.push(r,i)}function b(e,t){var n=t.slice(),i=t.slice();n[a]-=o,i[a]+=o,e.push(n,i)}}(t,e.boxOffsetList[n],e.boxWidthList[n])}))})}var jH={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==_M){var n="";"production"!==process.env.NODE_ENV&&(n=Jv("source data is not applicable for this boxplot transform. Expect number[][].")),Qv(n)}var i=function(e,t){for(var n=[],i=[],r=(t=t||{}).boundIQR,o="none"===r||0===r,a=0;a<e.length;a++){var s=Tv(e[a].slice()),l=zv(s,.25),u=zv(s,.5),c=zv(s,.75),d=s[0],h=s[s.length-1],p=(null==r?1.5:r)*(c-l),f=o?d:Math.max(d,l-p),g=o?h:Math.min(h,c+p),m=t.itemNameFormatter,v=Ph(m)?m({value:a}):Oh(m)?m.replace("{value}",a+""):a+"";n.push([v,f,l,u,c,g]);for(var y=0;y<s.length;y++){var x=s[y];if(x<f||x>g){var _=[v,x];i.push(_)}}}return{boxData:n,outliers:i}}(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var GH=["itemStyle","borderColor"],WH=["itemStyle","borderColor0"],HH=["itemStyle","borderColorDoji"],UH=["itemStyle","color"],YH=["itemStyle","color0"];function ZH(e,t){return t.get(e>0?UH:YH)}function XH(e,t){return t.get(0===e?HH:e>0?GH:WH)}var qH={seriesType:"candlestick",plan:dD(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;null!=(n=e.next());){var i=t.getItemModel(n),r=t.getItemLayout(n).sign,o=i.getItemStyle();o.fill=ZH(r,i),o.stroke=XH(r,i)||o.fill,bh(t.ensureUniqueItemVisual(n,"style"),o)}}}}},$H=["color","borderColor"],KH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){AC(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e){var t=e.getData(),n=this._data,i=this.group,r=t.getLayout("isSimpleBox"),o=e.get("clip",!0),a=e.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),t.diff(n).add(function(n){if(t.hasValue(n)){var a=t.getItemLayout(n);if(o&&tU(s,a))return;var l=eU(a,n,!0);Qw(l,{shape:{points:a.ends}},e,n),nU(l,t,n,r),i.add(l),t.setItemGraphicEl(n,l)}}).update(function(a,l){var u=n.getItemGraphicEl(l);if(t.hasValue(a)){var c=t.getItemLayout(a);o&&tU(s,c)?i.remove(u):(u?(Jw(u,{shape:{points:c.ends}},e,a),rC(u)):u=eU(c),nU(u,t,a,r),i.add(u),t.setItemGraphicEl(a,u))}else i.remove(u)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),aU(e,this.group);var t=e.get("clip",!0)?$O(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,t){for(var n,i=t.getData(),r=i.getLayout("isSimpleBox");null!=(n=e.next());){var o=eU(i.getItemLayout(n));nU(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){aU(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(fD),JH=function(){return function(){}}(),QH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new JH},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(d_);function eU(e,t,n){var i=e.ends;return new QH({shape:{points:n?iU(i,e):i},z2:100})}function tU(e,t){for(var n=!0,i=0;i<t.ends.length;i++)if(e.contain(t.ends[i][0],t.ends[i][1])){n=!1;break}return n}function nU(e,t,n,i){var r=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=i,Nb(e,r);var o=t.getItemLayout(n).sign;Th(e.states,function(e,t){var n=r.getModel(t),i=ZH(o,n),a=XH(o,n)||i,s=e.style||(e.style={});i&&(s.fill=i),a&&(s.stroke=a)});var a=r.getModel("emphasis");Db(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function iU(e,t){return Ih(e,function(e){return(e=e.slice())[1]=t.initBaseline,e})}var rU=function(){return function(){}}(),oU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeCandlestickBox",n}return Kd(t,e),t.prototype.getDefaultShape=function(){return new rU},t.prototype.buildPath=function(e,t){for(var n=t.points,i=0;i<n.length;)if(this.__sign===n[i++]){var r=n[i++];e.moveTo(r,n[i++]),e.lineTo(r,n[i++])}else i+=3},t}(d_);function aU(e,t,n,i){var r=e.getData().getLayout("largePoints"),o=new oU({shape:{points:r},__sign:1,ignoreCoarsePointer:!0});t.add(o);var a=new oU({shape:{points:r},__sign:-1,ignoreCoarsePointer:!0});t.add(a);var s=new oU({shape:{points:r},__sign:0,ignoreCoarsePointer:!0});t.add(s),sU(1,o,e),sU(-1,a,e),sU(0,s,e),i&&(o.incremental=!0,a.incremental=!0),n&&n.push(o,a)}function sU(e,t,n,i){var r=XH(e,n)||ZH(e,n),o=n.getModel("itemStyle").getItemStyle($H);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var lU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return Kd(t,e),t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(nD);function uU(e){e&&Lh(e.series)&&Th(e.series,function(e){zh(e)&&"k"===e.type&&(e.type="candlestick")})}Sh(lU,EH,!0);var cU={seriesType:"candlestick",plan:dD(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),i=function(e,t){var n,i=e.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),o=Sv(Yh(e.get("barMaxWidth"),r),r),a=Sv(Yh(e.get("barMinWidth"),1),r),s=e.get("barWidth");return null!=s?Sv(s,r):Math.max(Math.min(r/2,o),a)}(e,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=Ih(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],c=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:e.pipelineContext.large?function(n,i){var r,a,d=cN(4*n.count),h=0,p=[],f=[],g=i.getStore(),m=!!e.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var v=g.get(o,a),y=g.get(s,a),x=g.get(l,a),_=g.get(u,a),b=g.get(c,a);isNaN(v)||isNaN(_)||isNaN(b)?(d[h++]=NaN,h+=3):(d[h++]=dU(g,a,y,x,l,m),p[0]=v,p[1]=_,r=t.dataToPoint(p,null,f),d[h++]=r?r[0]:NaN,d[h++]=r?r[1]:NaN,p[1]=b,r=t.dataToPoint(p,null,f),d[h++]=r?r[1]:NaN)}i.setLayout("largePoints",d)}:function(e,n){var r,a=n.getStore();for(;null!=(r=e.next());){var d=a.get(o,r),h=a.get(s,r),p=a.get(l,r),f=a.get(u,r),g=a.get(c,r),m=Math.min(h,p),v=Math.max(h,p),y=S(m,d),x=S(v,d),_=S(f,d),b=S(g,d),w=[];M(w,x,0),M(w,y,1),w.push(I(b),I(x),I(_),I(y));var C=!!n.getItemModel(r).get(["itemStyle","borderColorDoji"]);n.setItemLayout(r,{sign:dU(a,r,h,p,l,C),initBaseline:h>p?x[1]:y[1],ends:w,brushRect:T(f,g,d)})}function S(e,n){var i=[];return i[0]=n,i[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function M(e,t,n){var r=t.slice(),o=t.slice();r[0]=vC(r[0]+i/2,1,!1),o[0]=vC(o[0]-i/2,1,!0),n?e.push(r,o):e.push(o,r)}function T(e,t,n){var r=S(e,n),o=S(t,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function I(e){return e[0]=vC(e[0],1),e}}}}};function dU(e,t,n,i,r,o){return n>i?-1:n<i?1:o?0:t>0?e.get(r,t-1)<=i?1:-1:1}function hU(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})})}var pU=function(e){function t(t,n){var i=e.call(this)||this,r=new NO(t,n),o=new mv;return i.add(r),i.add(o),i.updateData(t,n),i}return Kd(t,e),t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=e.rippleNumber,r=this.childAt(1),o=0;o<i;o++){var a=Tk(t,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-o/i*e.period+e.effectOffset;a.animate("",!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),r.add(a)}hU(r,e)},t.prototype.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],r=0;r<i.length;r++){var o=i[r];if(t[o]!==e[o])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}hU(n,e)},t.prototype.highlight=function(){fb(this)},t.prototype.downplay=function(){gb(this)},t.prototype.getSymbolType=function(){var e=this.childAt(0);return e&&e.getSymbolType()},t.prototype.updateData=function(e,t){var n=this,i=e.hostModel;this.childAt(0).updateData(e,t);var r=this.childAt(1),o=e.getItemModel(t),a=e.getItemVisual(t,"symbol"),s=Ik(e.getItemVisual(t,"symbolSize")),l=e.getItemVisual(t,"style"),u=l&&l.fill,c=o.getModel("emphasis");r.setScale(s),r.traverse(function(e){e.setStyle("fill",u)});var d=Dk(e.getItemVisual(t,"symbolOffset"),s);d&&(r.x=d[0],r.y=d[1]);var h=e.getItemVisual(t,"symbolRotate");r.rotation=(h||0)*Math.PI/180||0;var p={};p.showEffectOn=i.get("showEffectOn"),p.rippleScale=o.get(["rippleEffect","scale"]),p.brushType=o.get(["rippleEffect","brushType"]),p.period=1e3*o.get(["rippleEffect","period"]),p.effectOffset=t/e.count(),p.z=i.getShallow("z")||0,p.zlevel=i.getShallow("zlevel")||0,p.symbolType=a,p.color=u,p.rippleEffectColor=o.get(["rippleEffect","color"]),p.rippleNumber=o.get(["rippleEffect","number"]),"render"===p.showEffectOn?(this._effectCfg?this.updateEffectAnimation(p):this.startEffectAnimation(p),this._effectCfg=p):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(e){"emphasis"===e?"render"!==p.showEffectOn&&n.startEffectAnimation(p):"normal"===e&&"render"!==p.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=p,Db(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(mv),fU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(){this._symbolDraw=new FO(pU)},t.prototype.render=function(e,t,n){var i=e.getData(),r=this._symbolDraw;r.updateData(i,{clipShape:this._getClipShape(e)}),this.group.add(r.group)},t.prototype._getClipShape=function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},t.prototype.updateTransform=function(e,t,n){var i=e.getData();this.group.dirty();var r=cR("").reset(e,t,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},t.prototype._updateGroupTransform=function(e){var t,n,i=e.coordinateSystem;i&&i.getRoamTransform&&(this.group.transform=(t=i.getRoamTransform(),rf(n=[1,0,0,1,0,0],t),n),this.group.decomposeTransform())},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)},t.type="effectScatter",t}(fD),gU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){return YE(null,this,{useEncodeDefaulter:!0})},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.type="series.effectScatter",t.dependencies=["grid","polar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},t}(nD);var mU=function(e){function t(t,n,i){var r=e.call(this)||this;return r.add(r.createLine(t,n,i)),r._updateEffectSymbol(t,n),r}return Kd(t,e),t.prototype.createLine=function(e,t,n){return new sG(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");Lh(i)||(i=[i,i]);var o=e.getItemVisual(t,"style"),a=n.get("color")||o&&o.stroke,s=this.childAt(1);this._symbolType!==r&&(this.remove(s),(s=Tk(r,-.5,-.5,1,1,a)).z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle("shadowColor",a),s.setStyle(n.getItemStyle(["color"])),s.scaleX=i[0],s.scaleY=i[1],s.setColor(a),this._symbolType=r,this._symbolScale=i,this._updateEffectAnimation(e,n,t))},t.prototype._updateEffectAnimation=function(e,t,n){var i=this.childAt(1);if(i){var r=e.getItemLayout(n),o=1e3*t.get("period"),a=t.get("loop"),s=t.get("roundTrip"),l=t.get("constantSpeed"),u=Uh(t.get("delay"),function(t){return t/e.count()*o/3});if(i.ignore=!0,this._updateAnimationPoints(i,r),l>0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var c=void 0;c=Ph(u)?u(n):u,i.__t>0&&(c=-o*i.__t),this._animateSymbol(i,o,c,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,i,r){if(t>0){e.__t=0;var o=this,a=e.animate("",i).when(r?2*t:t,{__t:r?2:1}).delay(n).during(function(){o._updateSymbolPosition(e)});i||a.done(function(){o.remove(e)}),a.start()}},t.prototype._getLineLength=function(e){return wp(e.__p1,e.__cp1)+wp(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,r=e.__t<1?e.__t:2-e.__t,o=[e.x,e.y],a=o.slice(),s=ag,l=sg;o[0]=s(t[0],i[0],n[0],r),o[1]=s(t[1],i[1],n[1],r);var u=e.__t<1?l(t[0],i[0],n[0],r):l(n[0],i[0],t[0],1-r),c=e.__t<1?l(t[1],i[1],n[1],r):l(n[1],i[1],t[1],1-r);e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==e.__lastT&&e.__lastT<e.__t?(e.scaleY=1.05*wp(a,o),1===r&&(o[0]=a[0]+(o[0]-a[0])/2,o[1]=a[1]+(o[1]-a[1])/2)):1===e.__lastT?e.scaleY=2*wp(t,o):e.scaleY=this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=o[0],e.y=o[1]},t.prototype.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},t}(mv),vU=function(e){function t(t,n,i){var r=e.call(this)||this;return r._createPolyline(t,n,i),r}return Kd(t,e),t.prototype._createPolyline=function(e,t,n){var i=e.getItemLayout(t),r=new Dw({shape:{points:i}});this.add(r),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var i=e.hostModel;Jw(this.childAt(0),{shape:{points:e.getItemLayout(t)}},i,t),this._updateCommonStl(e,t,n)},t.prototype._updateCommonStl=function(e,t,n){var i=this.childAt(0),r=e.getItemModel(t),o=n&&n.emphasisLineStyle,a=n&&n.focus,s=n&&n.blurScope,l=n&&n.emphasisDisabled;if(!n||e.hasItemOption){var u=r.getModel("emphasis");o=u.getModel("lineStyle").getLineStyle(),l=u.get("disabled"),a=u.get("focus"),s=u.get("blurScope")}i.useStyle(e.getItemVisual(t,"style")),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=o,Db(this,a,s,l)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},t}(mv),yU=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return Kd(t,e),t.prototype.createLine=function(e,t,n){return new vU(e,t,n)},t.prototype._updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],i=0,r=1;r<t.length;r++){var o=t[r-1],a=t[r];i+=wp(o,a),n.push(i)}if(0!==i){for(r=0;r<n.length;r++)n[r]/=i;this._offsets=n,this._length=i}else this._length=0},t.prototype._getLineLength=function(){return this._length},t.prototype._updateSymbolPosition=function(e){var t=e.__t<1?e.__t:2-e.__t,n=this._points,i=this._offsets,r=n.length;if(i){var o,a=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(a+1,r-1);o>=0&&!(i[o]<=t);o--);o=Math.min(o,r-2)}else{for(o=a;o<r&&!(i[o]>t);o++);o=Math.min(o-1,r-2)}var s=(t-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];e.x=l[0]*(1-s)+s*u[0],e.y=l[1]*(1-s)+s*u[1];var c=e.__t<1?u[0]-l[0]:l[0]-u[0],d=e.__t<1?u[1]-l[1]:l[1]-u[1];e.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(mU),xU=function(){return function(){this.polyline=!1,this.curveness=0,this.segs=[]}}(),_U=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Kd(t,e),t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new xU},t.prototype.buildPath=function(e,t){var n,i=t.segs,r=t.curveness;if(t.polyline)for(n=this._off;n<i.length;){var o=i[n++];if(o>0){e.moveTo(i[n++],i[n++]);for(var a=1;a<o;a++)e.lineTo(i[n++],i[n++])}}else for(n=this._off;n<i.length;){var s=i[n++],l=i[n++],u=i[n++],c=i[n++];if(e.moveTo(s,l),r>0){var d=(s+u)/2-(l-c)*r,h=(l+c)/2-(u-s)*r;e.quadraticCurveTo(d,h,u,c)}else e.lineTo(u,c)}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<i.length;){var l=i[s++];if(l>0)for(var u=i[s++],c=i[s++],d=1;d<l;d++){if(Ux(u,c,h=i[s++],p=i[s++],o,e,t))return a}a++}else for(a=0,s=0;s<i.length;){u=i[s++],c=i[s++];var h=i[s++],p=i[s++];if(r>0){if(Zx(u,c,(u+h)/2-(c-p)*r,(c+p)/2-(h-u)*r,h,p,o,e,t))return a}else if(Ux(u,c,h,p,o,e,t))return a;a++}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect();return e=n[0],t=n[1],i.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a<t.length;){var s=t[a++],l=t[a++];n=Math.min(s,n),r=Math.max(s,r),i=Math.min(l,i),o=Math.max(l,o)}e=this._rect=new xf(n,i,r,o)}return e},t}(d_),bU=function(){function e(){this.group=new mv}return e.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},e.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},e.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],i=t.getLayout("linesPoints"),r=n&&n.shape.segs;if(r&&r.length<2e4){var o=r.length,a=new Float32Array(o+i.length);a.set(r),a.set(i,o),n.setShape({segs:a})}else{this._newAdded=[];var s=this._create();s.incremental=!0,s.setShape({segs:i}),this._setCommon(s,t),s.__startIndex=e.start}},e.prototype.remove=function(){this._clear()},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new _U({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},e.prototype._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var r=t.getVisual("style");r&&r.stroke&&e.setStyle("stroke",r.stroke),e.setStyle("fill",null);var o=V_(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(t){o.dataIndex=null;var n=e.hoverDataIdx;n>0&&(o.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),wU={seriesType:"lines",plan:dD(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,c=r.start;c<r.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var d=0,h=[];for(c=r.start;c<r.end;c++){var p=e.getLineCoords(c,a);n&&(s[d++]=p);for(var f=0;f<p;f++)h=t.dataToPoint(a[f],!1,h),s[d++]=h[0],s[d++]=h[1]}o.setLayout("linesPoints",s)}else for(c=r.start;c<r.end;c++){var g=o.getItemModel(c),m=(p=e.getLineCoords(c,a),[]);if(n)for(var v=0;v<p;v++)m.push(t.dataToPoint(a[v]));else{m[0]=t.dataToPoint(a[0]),m[1]=t.dataToPoint(a[1]);var y=g.get(["lineStyle","curveness"]);+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setItemLayout(c,m)}}}}"production"!==process.env.NODE_ENV&&qv("The lines series must have a coordinate system.")}},CU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this._updateLineDraw(i,e),o=e.get("zlevel"),a=e.get(["effect","trailLength"]),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&a>0&&(l?process.env.NODE_ENV:s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=e.get("clip",!0)&&$O(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var i=e.getData();this._updateLineDraw(i,e).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var i=e.getData(),r=e.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=wU.reset(e,t,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,i=this._showEffect(t),r=!!t.get("polyline"),o=t.pipelineContext.large;return process.env.NODE_ENV,n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new bU:new lG(r?i?yU:vU:i?mU:sG),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type="lines",t}(fD),SU="undefined"==typeof Uint32Array?Array:Uint32Array,MU="undefined"==typeof Float64Array?Array:Float64Array;function TU(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV,e.data=Ih(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),_h([t,e[0],e[1]])}))}var IU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Kd(t,e),t.prototype.init=function(t){t.data=t.data||[],TU(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(TU(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=op(this._flatCoords,t.flatCoords),this._flatCoordsOffset=op(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e),n=t.option instanceof Array?t.option:t.getShallow("coords");if("production"!==process.env.NODE_ENV&&!(n instanceof Array&&n.length>0&&n[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(n)+". Lines must have 2d coords array in data item.");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],r=0;r<i;r++)t[r]=t[r]||[],t[r][0]=this._flatCoords[n+2*r],t[r][1]=this._flatCoords[n+2*r+1];return i}var o=this._getCoordsFromItemModel(e);for(r=0;r<o.length;r++)t[r]=t[r]||[],t[r][0]=o[r][0],t[r][1]=o[r][1];return o.length},t.prototype._processFlatCoordsArray=function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),Fh(e[0])){for(var n=e.length,i=new SU(n),r=new MU(n),o=0,a=0,s=0,l=0;l<n;){s++;var u=e[l++];i[a++]=o+t,i[a++]=u;for(var c=0;c<u;c++){var d=e[l++],h=e[l++];if(r[o++]=d,r[o++]=h,l>n&&"production"!==process.env.NODE_ENV)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},t.prototype.getInitialData=function(e,t){if("production"!==process.env.NODE_ENV&&!nT.get(e.coordinateSystem))throw new Error("Unknown coordinate system "+e.coordinateSystem);var n=new FE(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],function(e,t,i,r){if(e instanceof Array)return NaN;n.hasItemOption=!0;var o=e.value;return null!=o?o instanceof Array?o[r]:o:void 0}),n},t.prototype.formatTooltip=function(e,t,n){var i=this.getData().getItemModel(e),r=i.get("name");if(r)return r;var o=i.get("fromName"),a=i.get("toName"),s=[];return null!=o&&s.push(o),null!=a&&s.push(a),BI("nameValue",{name:s.join(" > ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),t=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&t>0?t+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t}(nD);function DU(e){return e instanceof Array||(e=[e,e]),e}var kU={seriesType:"lines",reset:function(e){var t=DU(e.get("symbol")),n=DU(e.get("symbolSize")),i=e.getData();return i.setVisual("fromSymbol",t&&t[0]),i.setVisual("toSymbol",t&&t[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(e,t){var n=e.getItemModel(t),i=DU(n.getShallow("symbol",!0)),r=DU(n.getShallow("symbolSize",!0));i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),r[0]&&e.setItemVisual(t,"fromSymbolSize",r[0]),r[1]&&e.setItemVisual(t,"toSymbolSize",r[1])}:null}}};var AU=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ih.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p<h;++p){var f=e[p],g=f[0],m=f[1],v=i(f[2]);d.globalAlpha=v,d.drawImage(a,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=d.getImageData(0,0,c.width,c.height),x=y.data,_=0,b=x.length,w=this.minOpacity,C=this.maxOpacity-w;_<b;){v=x[_+3]/256;var S=4*Math.floor(255*v);if(v>0){var M=o(v)?s:l;v>0&&(v=v*C+w),x[_++]=M[S],x[_++]=M[S+1],x[_++]=M[S+2],x[_++]=M[S+3]*v*256}else _+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ih.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},e}();function EU(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var NU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i;if(t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(i=t)})}),"production"!==process.env.NODE_ENV&&!i)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var r=e.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):EU(r)&&this._renderOnGeo(r,e,i,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,i){var r=t.coordinateSystem;r&&(EU(r)?this.render(t,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){AC(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,i,r){var o,a,s,l,u=e.coordinateSystem,c=KO(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");if("production"!==process.env.NODE_ENV){if("category"!==d.type||"category"!==h.type)throw new Error("Heatmap on cartesian must have two category axes");if(!d.onBand||!h.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}o=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),m=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),x=RC(e),_=e.getModel("emphasis"),b=_.get("focus"),w=_.get("blurScope"),C=_.get("disabled"),S=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;M<i;M++){var T=void 0,I=f.getItemVisual(M,"style");if(c){var D=f.get(S[0],M),k=f.get(S[1],M);if(isNaN(f.get(S[2],M))||isNaN(D)||isNaN(k)||D<s[0]||D>s[1]||k<l[0]||k>l[1])continue;var A=u.dataToPoint([D,k]);T=new C_({shape:{x:A[0]-o/2,y:A[1]-a/2,width:o,height:a},style:I})}else{if(isNaN(f.get(S[1],M)))continue;T=new C_({z2:1,shape:u.dataToRect([f.get(S[0],M)]).contentShape,style:I})}if(f.hasItemOption){var E=f.getItemModel(M),N=E.getModel("emphasis");g=N.getModel("itemStyle").getItemStyle(),m=E.getModel(["blur","itemStyle"]).getItemStyle(),v=E.getModel(["select","itemStyle"]).getItemStyle(),y=E.get(["itemStyle","borderRadius"]),b=N.get("focus"),w=N.get("blurScope"),C=N.get("disabled"),x=RC(E)}T.shape.r=y;var L=e.getRawValue(M),P="-";L&&null!=L[2]&&(P=L[2]+""),OC(T,x,{labelFetcher:e,labelDataIndex:M,defaultOpacity:I.opacity,defaultText:P}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=m,T.ensureState("select").style=v,Db(T,b,w,C),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),p.add(T),f.setItemGraphicEl(M,T),this._progressiveEls&&this._progressiveEls.push(T)}},t.prototype._renderOnGeo=function(e,t,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new AU;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,i.getWidth()),p=Math.min(l.height+l.y,i.getHeight()),f=h-c,g=p-d,m=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(m,function(t,n,i){var r=e.dataToPoint([t,n]);return r[0]-=c,r[1]-=d,r.push(i),r}),y=n.getExtent(),x="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var i=e[1]-e[0],r=(t=Ih(t,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,o=0;return function(e){var i;for(i=o;i<r;i++)if((a=t[i].interval)[0]<=e&&e<=a[1]){o=i;break}if(i===r)for(i=o-1;i>=0;i--){var a;if((a=t[i].interval)[0]<=e&&e<=a[1]){o=i;break}}return i>=0&&i<r&&n[i]}}(y,n.getPieceList(),n.option.selected);s.update(v,f,g,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new m_({style:{width:f,height:g,x:c,y:d,image:s.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t}(fD),LU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){return YE(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=nT.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},t}(nD);var PU=["itemStyle","borderWidth"],OU=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],RU=new rw,FU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=this.group,r=e.getData(),o=this._data,a=e.coordinateSystem,s=a.getBaseAxis().isHorizontal(),l=a.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:a,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:OU[+s],categoryDim:OU[1-+s]};r.diff(o).add(function(e){if(r.hasValue(e)){var t=UU(r,e),n=zU(r,e,t,u),o=XU(r,u,n);r.setItemGraphicEl(e,o),i.add(o),QU(o,u,n)}}).update(function(e,t){var n=o.getItemGraphicEl(t);if(r.hasValue(e)){var a=UU(r,e),s=zU(r,e,a,u),l=$U(r,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),r.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var i=n.animationModel,r=n.dataIndex,o=e.__pictorialBundle;Jw(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?jU(e,t,n,!0):GU(e,t,n,!0);WU(e,n,!0),HU(e,t,n,!0)}(n,u,s):n=XU(r,u,s,!0),r.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),QU(n,u,s)}else i.remove(n)}).remove(function(e){var t=o.getItemGraphicEl(e);t&&qU(o,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var c=e.get("clip",!0)?$O(e.coordinateSystem,!1,e):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=r,this.group},t.prototype.remove=function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(t){qU(i,V_(t).dataIndex,e,t)}):n.removeAll()},t.type="pictorialBar",t}(fD);function zU(e,t,n,i){var r=e.getItemLayout(t),o=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),d={dataIndex:t,layout:r,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",style:e.getItemVisual(t,"style"),symbolClip:a,symbolRepeat:o,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverScale:c&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(e,t,n,i,r){var o,a=i.valueDim,s=e.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[a.wh]<=0);if(Lh(s)){var d=[VU(l,s[0])-u,VU(l,s[1])-u];d[1]<d[0]&&d.reverse(),o=d[c]}else o=null!=s?VU(l,s)-u:t?i.coordSysExtent[a.index][c]-u:n[a.wh];r.boundingLength=o,t&&(r.repeatCutLength=n[a.wh]);var h="x"===a.xy,p=l.inverse;r.pxSign=h&&!p||!h&&p?o>=0?1:-1:o>0?1:-1}(n,o,r,i,d),function(e,t,n,i,r,o,a,s,l,u){var c,d=l.valueDim,h=l.categoryDim,p=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");c=Lh(f)?f.slice():null==f?["100%","100%"]:[f,f];c[h.index]=Sv(c[h.index],p),c[d.index]=Sv(c[d.index],i?p:Math.abs(o)),u.symbolSize=c;var g=u.symbolScale=[c[0]/s,c[1]/s];g[d.index]*=(l.isHorizontal?-1:1)*a}(e,t,r,o,0,d.boundingLength,d.pxSign,u,i,d),function(e,t,n,i,r){var o=e.get(PU)||0;o&&(RU.attr({scaleX:t[0],scaleY:t[1],rotation:n}),RU.updateTransform(),o/=RU.getLineScale(),o*=t[i.valueDim.index]);r.valueLineWidth=o||0}(n,d.symbolScale,l,i,d);var h=d.symbolSize,p=Dk(n.get("symbolOffset"),h);return function(e,t,n,i,r,o,a,s,l,u,c,d){var h=c.categoryDim,p=c.valueDim,f=d.pxSign,g=Math.max(t[p.index]+s,0),m=g;if(i){var v=Math.abs(l),y=Uh(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=Sv(y,t[p.index]),b=Math.max(g+2*_,0),w=x?0:2*_,C=jv(i),S=C?i:eY((v+w)/b);b=g+2*(_=(v-S*g)/2/(x?S:Math.max(S-1,1))),w=x?0:2*_,C||"fixed"===i||(S=u?eY((Math.abs(u)+w)/b):0),m=S*b-w,d.repeatTimes=S,d.symbolMargin=_}var M=f*(m/2),T=d.pathPosition=[];T[h.index]=n[h.wh]/2,T[p.index]="start"===a?M:"end"===a?l-M:l/2,o&&(T[0]+=o[0],T[1]+=o[1]);var I=d.bundlePosition=[];I[h.index]=n[h.xy],I[p.index]=n[p.xy];var D=d.barRectShape=bh({},n);D[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(T[p.index]+M)),D[h.wh]=n[h.wh];var k=d.clipShape={};k[h.xy]=-n[h.xy],k[h.wh]=c.ecSize[h.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}(n,h,r,o,0,p,s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,i,d),d}function VU(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function BU(e){var t=e.symbolPatternSize,n=Tk(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function jU(e,t,n,i){var r=e.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,d=o[t.valueDim.index]+a+2*n.symbolMargin;for(KU(e,function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?JU(e,null,f(c),n,i):JU(e,null,{scaleX:0,scaleY:0},n,i,function(){r.remove(e)}),c++});c<u;c++){var h=BU(n);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,r.add(h);var p=f(c);JU(h,{x:p.x,y:p.y,scaleX:0,scaleY:0},{scaleX:p.scaleX,scaleY:p.scaleY,rotation:p.rotation},n,i)}function f(e){var t=s.slice(),i=n.pxSign,r=e;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(r=u-1-e),t[l.index]=d*(r-u/2+.5)+s[l.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function GU(e,t,n,i){var r=e.__pictorialBundle,o=e.__pictorialMainPath;o?JU(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=e.__pictorialMainPath=BU(n),r.add(o),JU(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function WU(e,t,n){var i=bh({},t.barRectShape),r=e.__pictorialBarRect;r?JU(r,null,{shape:i},t,n):((r=e.__pictorialBarRect=new C_({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(r))}function HU(e,t,n,i){if(n.symbolClip){var r=e.__pictorialClipPath,o=bh({},n.clipShape),a=t.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Jw(r,{shape:o},s,l);else{o[a.wh]=0,r=new C_({shape:o}),e.__pictorialBundle.setClipPath(r),e.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],EC[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function UU(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=YU,n.isAnimationEnabled=ZU,n}function YU(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function ZU(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function XU(e,t,n,i){var r=new mv,o=new mv;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?jU(r,t,n):GU(r,0,n),WU(r,n,i),HU(r,t,n,i),r.__pictorialShapeStr=$U(e,n),r.__pictorialSymbolMeta=n,r}function qU(e,t,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];KU(i,function(e){o.push(e)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),Th(o,function(e){tC(e,{scaleX:0,scaleY:0},n,t,function(){i.parent&&i.parent.remove(i)})}),e.setItemGraphicEl(t,null)}function $U(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function KU(e,t,n){Th(e.__pictorialBundle.children(),function(i){i!==e.__pictorialBarRect&&t.call(n,i)})}function JU(e,t,n,i,r,o){t&&e.attr(t),i.symbolClip&&!r?n&&e.attr(n):n&&EC[r?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,o)}function QU(e,t,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),d=o.get("blurScope"),h=o.get("scale");KU(e,function(e){if(e instanceof m_){var t=e.style;e.useStyle(bh({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var i=e.ensureState("emphasis");i.style=a,h&&(i.scaleX=1.1*e.scaleX,i.scaleY=1.1*e.scaleY),e.ensureState("blur").style=s,e.ensureState("select").style=l,u&&(e.cursor=u),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],f=e.__pictorialBarRect;f.ignoreClip=!0,OC(f,RC(r),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:AO(t.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Db(e,c,d,o.get("disabled"))}function eY(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var tY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return Kd(t,e),t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=lS(fR.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(fR);var nY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=e.getData(),r=this,o=this.group,a=e.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function c(e){return e.name}o.x=0,o.y=l.y+u[0];var d=new pE(this._layersSeries||[],a,c,c),h=[];function p(t,n,s){var l=r._layers;if("remove"!==t){for(var u,c,d=[],p=[],f=a[n].indices,g=0;g<f.length;g++){var m=i.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push(v,y),p.push(v,y+x),u=i.getItemVisual(f[g],"style")}var _=i.getItemLayout(f[0]),b=e.getModel("label").get("margin"),w=e.getModel("emphasis");if("add"===t){var C=h[n]=new mv;c=new ZO({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),C.add(c),o.add(C),e.isAnimationEnabled()&&c.setClipPath(function(e,t,n){var i=new C_({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Qw(i,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),i}(c.getBoundingRect(),e,function(){c.removeClipPath()}))}else{C=l[s];c=C.childAt(0),o.add(C),h[n]=C,Jw(c,{shape:{points:d,stackedOnPoints:p}},e),rC(c)}OC(c,RC(e),{labelDataIndex:f[g-1],defaultText:i.getName(f[g-1]),inheritColor:u.fill},{normal:{verticalAlign:"middle"}}),c.setTextConfig({position:null,local:!0});var S=c.getTextContent();S&&(S.x=_.x-b,S.y=_.y0+_.y/2),c.useStyle(u),i.setItemGraphicEl(n,c),Nb(c,e),Db(c,w.get("focus"),w.get("blurScope"),w.get("disabled"))}else o.remove(l[n])}d.add(Eh(p,this,"add")).update(Eh(p,this,"update")).remove(Eh(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},t.type="themeRiver",t}(fD);var iY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new eF(Eh(this.getData,this),Eh(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},i=My(e,function(e){return n.hasOwnProperty(e[0]+"")||(n[e[0]+""]=-1),e[2]}),r=[];i.buckets.each(function(e,t){r.push({name:t,dataList:e})});for(var o=r.length,a=0;a<o;++a){for(var s=r[a].name,l=0;l<r[a].dataList.length;++l){var u=r[a].dataList[l][0]+"";n[u]=a}for(var u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,e[t]=[u,0,s],t++)}return e},t.prototype.getInitialData=function(e,t){for(var n=this.getReferringComponents("singleAxis",by).models[0].get("type"),i=kh(e.data,function(e){return void 0!==e[2]}),r=this.fixData(i||[]),o=[],a=this.nameMap=rp(),s=0,l=0;l<r.length;++l)o.push(r[l][2]),a.get(r[l][2])||(a.set(r[l][2],s),s++);var u=zE(r,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:mE(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new FE(u,this);return c.initData(r),c},t.prototype.getLayerSeries=function(){for(var e=this.getData(),t=e.count(),n=[],i=0;i<t;++i)n[i]=i;var r=e.mapDimension("single"),o=My(n,function(t){return e.get("name",t)}),a=[];return o.buckets.each(function(t,n){t.sort(function(t,n){return e.get(r,t)-e.get(r,n)}),a.push({name:n,indices:t})}),a},t.prototype.getAxisTooltipData=function(e,t,n){Lh(e)||(e=e?[e]:[]);for(var i,r=this.getData(),o=this.getLayerSeries(),a=[],s=o.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,d=o[l].indices.length,h=0;h<d;++h){var p=r.get(e[0],o[l].indices[h]),f=Math.abs(p-t);f<=u&&(i=p,u=f,c=o[l].indices[h])}a.push(c)}return{dataIndices:a,nestestValue:i}},t.prototype.formatTooltip=function(e,t,n){var i=this.getData();return BI("nameValue",{name:i.getName(e),value:i.get(i.mapDimension("value"),e)})},t.type="series.themeRiver",t.dependencies=["singleAxis"],t.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},t}(nD);function rY(e,t){e.eachSeriesByType("themeRiver",function(e){var t=e.getData(),n=e.coordinateSystem,i={},r=n.getRect();i.rect=r;var o=e.get("boundaryGap"),a=n.getAxis();(i.boundaryGap=o,"horizontal"===a.orient)?(o[0]=Sv(o[0],r.height),o[1]=Sv(o[1],r.height),oY(t,e,r.height-o[0]-o[1])):(o[0]=Sv(o[0],r.width),o[1]=Sv(o[1],r.width),oY(t,e,r.width-o[0]-o[1]));t.setLayout("layoutInfo",i)})}function oY(e,t,n){if(e.count())for(var i,r=t.coordinateSystem,o=t.getLayerSeries(),a=e.mapDimension("single"),s=e.mapDimension("value"),l=Ih(o,function(t){return Ih(t.indices,function(t){var n=r.dataToPoint(e.get(a,t));return n[1]=e.get(s,t),n})}),u=function(e){for(var t=e.length,n=e[0].length,i=[],r=[],o=0,a=0;a<n;++a){for(var s=0,l=0;l<t;++l)s+=e[l][a][1];s>o&&(o=s),i.push(s)}for(var u=0;u<n;++u)r[u]=(o-i[u])/2;o=0;for(var c=0;c<n;++c){var d=i[c]+r[c];d>o&&(o=d)}return{y0:r,max:o}}(l),c=u.y0,d=n/u.max,h=o.length,p=o[0].indices.length,f=0;f<p;++f){i=c[f]*d,e.setItemLayout(o[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:i,y:l[0][f][1]*d});for(var g=1;g<h;++g)i+=l[g-1][f][1]*d,e.setItemLayout(o[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:i,y:l[g][f][1]*d})}}var aY=function(e){function t(t,n,i,r){var o=e.call(this)||this;o.z2=2,o.textConfig={inside:!0},V_(o).seriesIndex=n.seriesIndex;var a=new T_({z2:4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,t,n,i,r),o}return Kd(t,e),t.prototype.updateData=function(e,t,n,i,r){this.node=t,t.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var o=this;V_(o).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),u=bh({},l);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var d=t.getVisual("decal");d&&(c.decal=Qk(d,r));var h=_R(a.getModel("itemStyle"),u,!0);bh(u,h),Th(U_,function(e){var t=o.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var i=_R(n,u);i&&(t.shape=i)}),e?(o.setShape(u),o.shape.r=l.r0,Qw(o,{shape:{r:l.r}},n,t.dataIndex)):(Jw(o,{shape:u},n),rC(o)),o.useStyle(c),this._updateLabel(n);var p=a.getShallow("cursor");p&&o.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var f=s.get("focus");Db(this,"relative"===f?op(t.getAncestorsIndices(),t.getDescendantIndices()):"ancestor"===f?t.getAncestorsIndices():"descendant"===f?t.getDescendantIndices():f,s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),i=n.getModel("label"),r=this.node.getLayout(),o=r.endAngle-r.startAngle,a=(r.startAngle+r.endAngle)/2,s=Math.cos(a),l=Math.sin(a),u=this,c=u.getTextContent(),d=this.node.dataIndex,h=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(null!=h&&Math.abs(o)<h);function f(e,t){var n=e.get(t);return null==n?i.get(t):n}c.ignore=!p,Th(Y_,function(i){var h="normal"===i?n.getModel("label"):n.getModel([i,"label"]),p="normal"===i,g=p?c:c.ensureState(i),m=e.getFormattedLabel(d,i);p&&(m=m||t.node.name),g.style=FC(h,{},null,"normal"!==i,!0),m&&(g.style.text=m);var v=h.get("show");null==v||p||(g.ignore=!v);var y,x=f(h,"position"),_=p?u:u.states[i],b=_.style.fill;_.textConfig={outsideFill:"inherit"===h.get("color")?b:null,inside:"outside"!==x};var w=f(h,"distance")||0,C=f(h,"align"),S=f(h,"rotate"),M=.5*Math.PI,T=1.5*Math.PI,I=qx("tangential"===S?Math.PI/2-a:a),D=I>M&&!Lv(I-M)&&I<T;"outside"===x?(y=r.r+w,C=D?"right":"left"):C&&"center"!==C?"left"===C?(y=r.r0+w,C=D?"right":"left"):"right"===C&&(y=r.r-w,C=D?"left":"right"):(y=o===2*Math.PI&&0===r.r0?0:(r.r+r.r0)/2,C="center"),g.style.align=C,g.style.verticalAlign=f(h,"verticalAlign")||"middle",g.x=y*s+r.cx,g.y=y*l+r.cy;var k=0;"radial"===S?k=qx(-a)+(D?Math.PI:0):"tangential"===S?k=qx(Math.PI/2-a)+(D?Math.PI:0):Fh(S)&&(k=S*Math.PI/180),g.rotation=qx(k)}),c.dirtyStyle()},t}(bw),sY="sunburstRootToNode",lY="sunburstHighlight";var uY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n,i){var r=this;this.seriesModel=e,this.api=n,this.ecModel=t;var o=e.getData(),a=o.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode(function(e){c.push(e)});var d,h,p=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(e){return e.getId()}function c(s,c){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,e,t,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(r);else if(i){var s=new aY(i,e,t,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==c?null:r[c])}new pE(r,i,s,s).add(c).update(c).remove(Nh(c,null)).execute()}(c,p),d=a,(h=s).depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,d,e,t,n):(r.virtualPiece=new aY(d,e,t,n),l.add(r.virtualPiece)),h.piece.off("click"),r.virtualPiece.on("click",function(e){r._rootToNode(h.parentNode)})):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null),this._initEvents(),this._oldChildren=c},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(i){if(!n&&i.piece&&i.piece===t.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)e._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)tM(a,o.get("target",!0)||"_blank")}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:sY,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,r=e[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},t.type="sunburst",t}(fD),cY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return Kd(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};dY(n);var i=this._levelModels=Ih(e.levels||[],function(e){return new oS(e,this,t)},this),r=_B.createTree(n,this,function(e){e.wrapMethod("getItemModel",function(e,t){var n=r.getNodeByDataIndex(t),o=i[n.depth];return o&&(e.parentModel=o),e})});return r.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=SB(i,this),n},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){AB(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t}(nD);function dY(e){var t=0;Th(e.children,function(e){dY(e);var n=e.value;Lh(n)&&(n=n[0]),t+=n});var n=e.value;Lh(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Lh(e.value)?e.value[0]=n:e.value=n}var hY=Math.PI/180;function pY(e,t,n){t.eachSeriesByType(e,function(e){var t=e.get("center"),i=e.get("radius");Lh(i)||(i=[0,i]),Lh(t)||(t=[t,t]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=Sv(t[0],r),l=Sv(t[1],o),u=Sv(i[0],a/2),c=Sv(i[1],a/2),d=-e.get("startAngle")*hY,h=e.get("minAngle")*hY,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&fY(f,m);var v=0;Th(f.children,function(e){!isNaN(e.getValue())&&v++});var y=f.getValue(),x=Math.PI/(y||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(c-u)/(b||1),C=e.get("clockwise"),S=e.get("stillShowZeroSum"),M=C?1:-1,T=function(t,n){if(t){var i=n;if(t!==p){var r=t.getValue(),o=0===y&&S?x:r*x;o<h&&(o=h),i=n+M*o;var c=t.depth-g-(_?-1:1),d=u+w*c,f=u+w*(c+1),m=e.getLevelModel(t);if(m){var v=m.get("r0",!0),b=m.get("r",!0),I=m.get("radius",!0);null!=I&&(v=I[0],b=I[1]),null!=v&&(d=Sv(v,a/2)),null!=b&&(f=Sv(b,a/2))}t.setLayout({angle:o,startAngle:n,endAngle:i,clockwise:C,cx:s,cy:l,r0:d,r:f})}if(t.children&&t.children.length){var D=0;Th(t.children,function(e){D+=T(e,n+D)})}return i-n}};if(_){var I=u,D=u+w,k=2*Math.PI;p.setLayout({angle:k,startAngle:d,endAngle:d+k,clockwise:C,cx:s,cy:l,r0:I,r:D})}T(f,d)})}function fY(e,t){var n=e.children||[];e.children=function(e,t){if(Ph(t)){var n=Ih(e,function(e,t){var n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:function(){return n}},index:t}});return n.sort(function(e,n){return t(e.params,n.params)}),Ih(n,function(t){return e[t.index]})}var i="asc"===t;return e.sort(function(e,t){var n=(e.getValue()-t.getValue())*(i?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(i?-1:1):n})}(n,t),n.length&&Th(e.children,function(e){fY(e,t)})}function gY(e){var t={};e.eachSeriesByType("sunburst",function(e){var n=e.getData(),i=n.tree;i.eachNode(function(r){var o=r.getModel().getModel("itemStyle").getItemStyle();o.fill||(o.fill=function(e,n,i){for(var r=e;r&&r.depth>1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",t);return e.depth>1&&Oh(o)&&(o=Ng(o,(e.depth-1)/(i-1)*.5)),o}(r,e,i.root.height)),bh(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)})})}var mY={color:"fill",borderColor:"stroke"},vY={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},yY=vy(),xY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return YE(null,this)},t.prototype.getDataParams=function(t,n,i){var r=e.prototype.getDataParams.call(this,t,n);return i&&(r.info=yY(i).info),r},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(nD);function _Y(e,t){return t=t||[0,0],Ih(["x","y"],function(n,i){var r=this.getAxis(n),o=t[i],a=e[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))},this)}function bY(e,t){return t=t||[0,0],Ih([0,1],function(n){var i=t[n],r=e[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function wY(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,r=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function CY(e,t){return t=t||[0,0],Ih(["Radius","Angle"],function(n,i){var r=this["get"+n+"Axis"](),o=t[i],a=e[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}var SY={};function MY(e,t,n,i){return e&&(e.legacy||!1!==e.legacy&&!n&&!i&&"tspan"!==t&&("text"===t||lp(e,"text")))}function TY(e,t,n){var i,r,o,a=e;if("text"===t)o=a;else{o={},lp(a,"text")&&(o.text=a.text),lp(a,"rich")&&(o.rich=a.rich),lp(a,"textFill")&&(o.fill=a.textFill),lp(a,"textStroke")&&(o.stroke=a.textStroke),lp(a,"fontFamily")&&(o.fontFamily=a.fontFamily),lp(a,"fontSize")&&(o.fontSize=a.fontSize),lp(a,"fontStyle")&&(o.fontStyle=a.fontStyle),lp(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=lp(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),lp(a,"textPosition")&&(i.position=a.textPosition),lp(a,"textOffset")&&(i.offset=a.textOffset),lp(a,"textRotation")&&(i.rotation=a.textRotation),lp(a,"textDistance")&&(i.distance=a.textDistance)}return IY(o,e),Th(o.rich,function(e){IY(e,e)}),{textConfig:i,textContent:r}}function IY(e,t){t&&(t.font=t.textFont||t.font,lp(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),lp(t,"textAlign")&&(e.align=t.textAlign),lp(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),lp(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),lp(t,"textWidth")&&(e.width=t.textWidth),lp(t,"textHeight")&&(e.height=t.textHeight),lp(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),lp(t,"textPadding")&&(e.padding=t.textPadding),lp(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),lp(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),lp(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),lp(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),lp(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),lp(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),lp(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function DY(e,t,n){var i=e;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=e.fill||"#000";kY(i,t);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=e.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=t.text,i.rich=t.rich,Th(t.rich,function(e){kY(e,e)}),i}function kY(e,t){t&&(lp(t,"fill")&&(e.textFill=t.fill),lp(t,"stroke")&&(e.textStroke=t.fill),lp(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),lp(t,"font")&&(e.font=t.font),lp(t,"fontStyle")&&(e.fontStyle=t.fontStyle),lp(t,"fontWeight")&&(e.fontWeight=t.fontWeight),lp(t,"fontSize")&&(e.fontSize=t.fontSize),lp(t,"fontFamily")&&(e.fontFamily=t.fontFamily),lp(t,"align")&&(e.textAlign=t.align),lp(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),lp(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),lp(t,"width")&&(e.textWidth=t.width),lp(t,"height")&&(e.textHeight=t.height),lp(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),lp(t,"padding")&&(e.textPadding=t.padding),lp(t,"borderColor")&&(e.textBorderColor=t.borderColor),lp(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),lp(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),lp(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),lp(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),lp(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),lp(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),lp(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),lp(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),lp(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),lp(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}function AY(e,t){if("production"!==process.env.NODE_ENV){var n=e+"^_^"+t;SY[n]||(SY[n]=!0)}}var EY={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},NY=Ah(EY),LY=Dh(qm,function(e,t){return e[t]=1,e},{}),PY=qm.join(", "),OY=["","style","shape","extra"],RY=vy();function FY(e,t,n,i,r){var o=e+"Animation",a=$w(e,i,r)||{},s=RY(t).userDuring;return a.duration>0&&(a.during=s?Eh(YY,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),bh(a,n[o]),a}function zY(e,t,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=RY(e),u=t.style;l.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var i=0;i<NY.length;i++){var r=NY[i],o=EY[r],a=t[r];a&&(n[o[0]]=a[0],n[o[1]]=a[1])}for(i=0;i<qm.length;i++){var s=qm[i];null!=t[s]&&(n[s]=t[s])}}(0,t,d),XY("shape",t,d),XY("extra",t,d),!o&&s&&(function(e,t,n){for(var i=t.transition,r=jY(i)?qm:iy(i||[]),o=0;o<r.length;o++){var a=r[o];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];"production"!==process.env.NODE_ENV&&GY(a,"el.transition"),n[a]=s}}}(e,t,c),ZY("shape",e,t,c),ZY("extra",e,t,c),function(e,t,n,i){if(!n)return;var r,o=e.style;if(o){var a=n.transition,s=t.transition;if(a&&!jY(a)){var l=iy(a);!r&&(r=i.style={});for(var u=0;u<l.length;u++){var c=o[f=l[u]];r[f]=c}}else if(e.getAnimationStyleProps&&(jY(s)||jY(a)||Ch(s,"style")>=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!r&&(r=i.style={});var p=Ah(n);for(u=0;u<p.length;u++){var f;if(h[f=p[u]]){c=o[f];r[f]=c}}}}}}(e,t,u,c)),d.style=u,function(e,t,n){var i=t.style;if(!e.isGroup&&i){if(n){e.useStyle({});for(var r=e.animators,o=0;o<r.length;o++){var a=r[o];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(i)}t&&(t.style=null,t&&e.attr(t),t.style=i)}(e,d,a),function(e,t){lp(t,"silent")&&(e.silent=t.silent),lp(t,"ignore")&&(e.ignore=t.ignore),e instanceof sx&&lp(t,"invisible")&&(e.invisible=t.invisible);e instanceof d_&&lp(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}(e,t),s)if(o){var h={};Th(OY,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(h[e]=h[e]||{}),bh(e?h[e]:h,n.enterFrom))});var p=FY("enter",e,t,n,r);p.duration>0&&e.animateFrom(h,p)}else!function(e,t,n,i,r){if(r){var o=FY("update",e,t,i,n);o.duration>0&&e.animateFrom(r,o)}}(e,t,r||0,n,c);VY(e,t),u?e.dirty():e.markRedraw()}function VY(e,t){for(var n=RY(e).leaveToProps,i=0;i<OY.length;i++){var r=OY[i],o=r?t[r]:t;o&&o.leaveTo&&(n||(n=RY(e).leaveToProps={}),r&&(n[r]=n[r]||{}),bh(r?n[r]:n,o.leaveTo))}}function BY(e,t,n,i){if(e){var r=e.parent,o=RY(e).leaveToProps;if(o){var a=FY("update",e,t,n,0);a.done=function(){r.remove(e)},e.animateTo(o,a)}else r.remove(e)}}function jY(e){return"all"===e}var GY,WY={},HY={setTransform:function(e,t){return"production"!==process.env.NODE_ENV&&$h(lp(LY,e),"Only "+PY+" available in `setTransform`."),WY.el[e]=t,this},getTransform:function(e){return"production"!==process.env.NODE_ENV&&$h(lp(LY,e),"Only "+PY+" available in `getTransform`."),WY.el[e]},setShape:function(e,t){"production"!==process.env.NODE_ENV&&UY(e);var n=WY.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){"production"!==process.env.NODE_ENV&&UY(e);var t=WY.el.shape;if(t)return t[e]},setStyle:function(e,t){"production"!==process.env.NODE_ENV&&UY(e);var n=WY.el,i=n.style;return i&&("production"!==process.env.NODE_ENV&&Hh(t)&&Xv("style."+e+" must not be assigned with NaN."),i[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){"production"!==process.env.NODE_ENV&&UY(e);var t=WY.el.style;if(t)return t[e]},setExtra:function(e,t){return"production"!==process.env.NODE_ENV&&UY(e),(WY.el.extra||(WY.el.extra={}))[e]=t,this},getExtra:function(e){"production"!==process.env.NODE_ENV&&UY(e);var t=WY.el.extra;if(t)return t[e]}};function UY(e){if("production"!==process.env.NODE_ENV&&("transition"===e||"enterFrom"===e||"leaveTo"===e))throw new Error('key must not be "'+e+'"')}function YY(){var e=this,t=e.el;if(t){var n=RY(t).userDuring,i=e.userDuring;n===i?(WY.el=t,i(HY)):e.el=e.userDuring=null}}function ZY(e,t,n,i){var r=n[e];if(r){var o,a=t[e];if(a){var s=n.transition,l=r.transition;if(l)if(!o&&(o=i[e]={}),jY(l))bh(o,a);else for(var u=iy(l),c=0;c<u.length;c++){var d=a[p=u[c]];o[p]=d}else if(jY(s)||Ch(s,e)>=0){!o&&(o=i[e]={});var h=Ah(a);for(c=0;c<h.length;c++){var p;d=a[p=h[c]];qY(r[p],d)&&(o[p]=d)}}}}}function XY(e,t,n){var i=t[e];if(i)for(var r=n[e]={},o=Ah(i),a=0;a<o.length;a++){var s=o[a];r[s]=um(i[s])}}function qY(e,t){return Mh(e)?e!==t:null!=e&&isFinite(e)}"production"!==process.env.NODE_ENV&&(GY=function(e,t){lp(LY,e)||Xv("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+Ah(LY).join("`, `")+"` are permitted.")});var $Y=vy(),KY=["percent","easing","shape","style","extra"];function JY(e){e.stopAnimation("keyframe"),e.attr($Y(e))}function QY(e,t,n){if(n.isAnimationEnabled()&&t)if(Lh(t))Th(t,function(t){QY(e,t,n)});else{var i=t.keyframes,r=t.duration;if(n&&null==r){var o=$w("enter",n,0);r=o&&o.duration}if(i&&r){var a=$Y(e);Th(OY,function(n){if(!n||e[n]){var o,s=!1;i.sort(function(e,t){return e.percent-t.percent}),Th(i,function(i){var l=e.animators,u=n?i[n]:i;if("production"!==process.env.NODE_ENV&&i.percent>=1&&(s=!0),u){var c=Ah(u);if(n||(c=kh(c,function(e){return Ch(KY,e)<0})),c.length){o||((o=e.animate(n,t.loop,!0)).scope="keyframe");for(var d=0;d<l.length;d++)l[d]!==o&&l[d].targetName===o.targetName&&l[d].stopTracks(c);n&&(a[n]=a[n]||{});var h=n?a[n]:a;Th(c,function(t){h[t]=((n?e[n]:e)||{})[t]}),o.whenWithKeys(r*i.percent,u,c,i.easing)}}}),o&&("production"!==process.env.NODE_ENV&&(s||Xv("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),o.delay(t.delay||0).duration(r).start(t.easing))}})}}}var eZ="emphasis",tZ="normal",nZ="blur",iZ="select",rZ=[tZ,eZ,nZ,iZ],oZ={normal:["itemStyle"],emphasis:[eZ,"itemStyle"],blur:[nZ,"itemStyle"],select:[iZ,"itemStyle"]},aZ={normal:["label"],emphasis:[eZ,"label"],blur:[nZ,"label"],select:[iZ,"label"]},sZ=["x","y"],lZ={normal:{},emphasis:{},blur:{},select:{}},uZ={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Eh(_Y,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Eh(bY,e)}}},single:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Eh(wY,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=t.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=e.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:Eh(CY,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function cZ(e){return e instanceof d_}function dZ(e){return e instanceof sx}var hZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n,i){this._progressiveEls=null;var r=this._data,o=e.getData(),a=this.group,s=vZ(e,o,t,n);r||a.removeAll(),o.diff(r).add(function(t){xZ(n,null,t,s(t,i),e,a,o)}).remove(function(t){var n=r.getItemGraphicEl(t);n&&BY(n,yY(n).option,e)}).update(function(t,l){var u=r.getItemGraphicEl(l);xZ(n,u,t,s(t,i),e,a,o)}).execute();var l=e.get("clip",!0)?$O(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,i,r){var o=t.getData(),a=vZ(t,o,n,i),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u<e.end;u++){var c=xZ(null,null,u,a(u,r),t,this.group,o);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){AC(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,i){var r=t.element;if(null==r||n.name===r)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===r)return!0;return!1},t.type="custom",t}(fD);function pZ(e){var t,n=e.type;if("path"===n){var i=e.shape,r=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,o=kZ(i);t=dC(o,null,r,i.layout||"center"),yY(t).customPathData=o}else if("image"===n)t=new m_({}),yY(t).customImagePath=e.style.image;else if("text"===n)t=new T_({});else if("group"===n)t=new mv;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=cC(n);if(!a){var s="";"production"!==process.env.NODE_ENV&&(s='graphic type "'+n+'" can not be found.'),Qv(s)}t=new a}return yY(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function fZ(e,t,n,i,r,o,a){JY(t);var s=r&&r.normal.cfg;s&&t.setTextConfig(s),i&&null==i.transition&&(i.transition=sZ);var l=i&&i.style;if(l){if("text"===t.type){var u=l;lp(u,"textFill")&&(u.fill=u.textFill),lp(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=cZ(t)?l.decal:null;e&&d&&(d.dirty=!0,c=Qk(d,e)),l.__decalPattern=c}dZ(t)&&(l&&(c=l.__decalPattern)&&(l.decal=c));zY(t,i,o,{dataIndex:n,isInit:a,clearStyle:!0}),QY(t,i.keyframeAnimation,o)}function gZ(e,t,n,i,r){var o=t.isGroup?null:t,a=r&&r[e].cfg;if(o){var s=o.ensureState(e);if(!1===i){var l=o.getState(e);l&&(l.style=null)}else s.style=i||null;a&&(s.textConfig=a),db(o)}}function mZ(e,t,n){var i=n===tZ,r=i?t:CZ(t,n),o=r?r.z2:null;null!=o&&((i?e:e.ensureState(n)).z2=o||0)}function vZ(e,t,n,i){var r=e.get("renderItem"),o=e.coordinateSystem,a={};o&&("production"!==process.env.NODE_ENV&&($h(r,"series.render is required."),$h(o.prepareCustoms||uZ[o.type],"This coordSys does not support custom series.")),a=o.prepareCustoms?o.prepareCustoms(o):uZ[o.type](o));for(var s,l,u=wh({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,i){"production"!==process.env.NODE_ENV&&AY("api.style","Please write literal style directly instead.");null==i&&(i=s);var r=t.getItemVisual(i,"style"),o=r&&r.fill,a=r&&r.opacity,l=y(i,tZ).getItemStyle();null!=o&&(l.fill=o),null!=a&&(l.opacity=a);var u={inheritColor:Oh(o)?o:"#000"},c=x(i,tZ),d=FC(c,null,u,!1,!0);d.text=c.getShallow("show")?Yh(e.getFormattedLabel(i,tZ),AO(t,i)):null;var h=zC(c,u,!1);return b(n,l),l=DY(l,d,h),n&&_(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=s),e=e||0;var i=t.getDimensionInfo(e);if(!i){var r=t.getDimensionIndex(e);return r>=0?t.getStore().get(r,n):void 0}var o=t.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){"production"!==process.env.NODE_ENV&&AY("api.styleEmphasis","Please write literal style directly instead.");null==i&&(i=s);var r=y(i,eZ).getItemStyle(),o=x(i,eZ),a=FC(o,null,null,!0,!0);a.text=o.getShallow("show")?Zh(e.getFormattedLabel(i,eZ),e.getFormattedLabel(i,tZ),AO(t,i)):null;var l=zC(o,null,!0);return b(n,r),r=DY(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(e,n){if(null==n&&(n=s),lp(mY,e)){var i=t.getItemVisual(n,"style");return i?i[mY[e]]:null}if(lp(vY,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===o.type){return function(e){var t=[],n=e.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o<e.count;o++)t.push(wh({bandWidth:r,axisKey:i,stackId:dN+o},e));var a=mN(t),s=[];for(o=0;o<e.count;o++){var l=a[i][dN+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(wh({axis:o.getBaseAxis()},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return WC(e,n)}},a.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:a.coordSys,dataInsideLength:t.count(),encode:yZ(e.getData())},d={},h={},p={},f={},g=0;g<rZ.length;g++){var m=rZ[g];p[m]=e.getModel(oZ[m]),f[m]=e.getModel(aZ[m])}function v(e){return e===s?l||(l=t.getItemModel(e)):t.getItemModel(e)}function y(e,n){return t.hasItemOption?e===s?d[n]||(d[n]=v(e).getModel(oZ[n])):v(e).getModel(oZ[n]):p[n]}function x(e,n){return t.hasItemOption?e===s?h[n]||(h[n]=v(e).getModel(aZ[n])):v(e).getModel(aZ[n]):f[n]}return function(e,n){return s=e,l=null,d={},h={},r&&r(wh({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},c),u)};function _(e,t){for(var n in t)lp(t,n)&&(e[n]=t[n])}function b(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function yZ(e){var t={};return Th(e.dimensions,function(n){var i=e.getDimensionInfo(n);if(!i.isExtraCoord){var r=i.coordDim;(t[r]=t[r]||[])[i.coordDimIndex]=e.getDimensionIndex(n)}}),t}function xZ(e,t,n,i,r,o,a){if(i){var s=_Z(e,t,n,i,r,o);return s&&a.setItemGraphicEl(n,s),s&&Db(s,i.focus,i.blurScope,i.emphasisDisabled),s}o.remove(t)}function _Z(e,t,n,i,r,o){"production"!==process.env.NODE_ENV&&$h(i,"should not have an null/undefined element setting");var a=-1,s=t;t&&bZ(t,i,r)&&(a=Ch(o.childrenRef(),t),t=null);var l,u,c=!t,d=t;d?d.clearStates():(d=pZ(i),s&&(l=s,(u=d).copyTransform(l),dZ(u)&&dZ(l)&&(u.setStyle(l.style),u.z=l.z,u.z2=l.z2,u.zlevel=l.zlevel,u.invisible=l.invisible,u.ignore=l.ignore,cZ(u)&&cZ(l)&&u.setShape(l.shape)))),!1===i.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),lZ.normal.cfg=lZ.normal.conOpt=lZ.emphasis.cfg=lZ.emphasis.conOpt=lZ.blur.cfg=lZ.blur.conOpt=lZ.select.cfg=lZ.select.conOpt=null,lZ.isLegacy=!1,function(e,t,n,i,r,o){if(e.isGroup)return;wZ(n,null,o),wZ(n,eZ,o);var a=o.normal.conOpt,s=o.emphasis.conOpt,l=o.blur.conOpt,u=o.select.conOpt;if(null!=a||null!=s||null!=u||null!=l){var c=e.getTextContent();if(!1===a)c&&e.removeTextContent();else{a=o.normal.conOpt=a||{type:"text"},c?c.clearStates():(c=pZ(a),e.setTextContent(c)),fZ(null,c,t,a,null,i,r);for(var d=a&&a.style,h=0;h<rZ.length;h++){var p=rZ[h];if(p!==tZ){var f=o[p].conOpt;gZ(p,c,0,SZ(a,f,p),null)}}d?c.dirty():c.markRedraw()}}}(d,n,i,r,c,lZ),function(e,t,n,i,r){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var a=e.getClipPath();a&&bZ(a,o,i)&&(a=null),a||(a=pZ(o),"production"!==process.env.NODE_ENV&&$h(cZ(a),"Only any type of `path` can be used in `clipPath`, rather than "+a.type+"."),e.setClipPath(a)),fZ(null,a,t,o,null,i,r)}}(d,n,i,r,c),fZ(e,d,n,i,lZ,r,c),lp(i,"info")&&(yY(d).info=i.info);for(var h=0;h<rZ.length;h++){var p=rZ[h];if(p!==tZ){var f=CZ(i,p);gZ(p,d,0,SZ(i,f,p),lZ)}}return function(e,t,n){if(!e.isGroup){var i=e,r=n.currentZ,o=n.currentZLevel;i.z=r,i.zlevel=o;var a=t.z2;null!=a&&(i.z2=a||0);for(var s=0;s<rZ.length;s++)mZ(i,t,rZ[s])}}(d,i,r),"group"===i.type&&function(e,t,n,i,r){var o=i.children,a=o?o.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!a&&!l&&!u)return;if(l)return c={api:e,oldChildren:t.children()||[],newChildren:o||[],dataIndex:n,seriesModel:r,group:t},void new pE(c.oldChildren,c.newChildren,TZ,TZ,c).add(IZ).update(IZ).remove(DZ).execute();var c;u&&t.removeAll();for(var d=0;d<a;d++){var h=o[d],p=t.childAt(d);h?(null==h.ignore&&(h.ignore=!1),_Z(e,p,n,h,r,t)):("production"!==process.env.NODE_ENV&&$h(p,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),p.ignore=!0)}for(var f=t.childCount()-1;f>=d;f--){var g=t.childAt(f);MZ(t,g,r)}}(e,d,n,i,r),a>=0?o.replaceAt(d,a):o.add(d),d}function bZ(e,t,n){var i,r=yY(e),o=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&(lp(i,"pathData")||lp(i,"d")))&&kZ(a)!==r.customPathData||"image"===o&&lp(s,"image")&&s.image!==r.customImagePath}function wZ(e,t,n){var i=t?CZ(e,t):e,r=t?SZ(e,i,eZ):e.style,o=e.type,a=i?i.textConfig:null,s=e.textContent,l=s?t?CZ(s,t):s:null;if(r&&(n.isLegacy||MY(r,o,!!a,!!l))){n.isLegacy=!0;var u=TY(r,o,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text"),"production"!==process.env.NODE_ENV&&$h("text"===c.type,'textContent.type must be "text"')}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function CZ(e,t){return t?e?e[t]:null:e}function SZ(e,t,n){var i=t&&t.style;return null==i&&n===eZ&&e&&(i=e.styleEmphasis),i}function MZ(e,t,n){t&&BY(t,yY(e).option,n)}function TZ(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function IZ(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null,r=null!=t?n.oldChildren[t]:null;_Z(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function DZ(e){var t=this.context,n=t.oldChildren[e];n&&BY(n,yY(n).option,t.seriesModel)}function kZ(e){return e&&(e.pathData||e.d)}var AZ=vy(),EZ=yh,NZ=Eh,LZ=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,i){var r=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=Nh(PZ,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new mv,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);zZ(a,t,!0),this._renderHandle(r)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,r="category"===i.type,o=t.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=BF(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,i,r){},e.prototype.createPointerEl=function(e,t,n,i){var r=t.pointer;if(r){var o=AZ(e).pointerEl=new EC[r.type](EZ(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var r=AZ(e).labelEl=new T_(EZ(t.label));e.add(r),RZ(r,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=AZ(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,i){var r=AZ(e).labelEl;r&&(r.setStyle(t.label.style),n(r,{x:t.label.x,y:t.label.y}),RZ(r,i))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(t=!0,r=this._handle=SC(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){$p(e.event)},onmousedown:NZ(this._onHandleDragMove,this,0,0),drift:NZ(this._onHandleDragMove,this),ondragend:NZ(this._onHandleDragEnd,this)}),i.add(r)),zZ(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Lh(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,SD(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){PZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,FZ(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(FZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(FZ(i)),AZ(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),MD(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},e}();function PZ(e,t,n,i){OZ(AZ(n).lastProp,i)||(AZ(n).lastProp=i,t?Jw(n,i,e):(n.stopAnimation(),n.attr(i)))}function OZ(e,t){if(zh(e)&&zh(t)){var n=!0;return Th(t,function(t,i){n=n&&OZ(e[i],t)}),!!n}return e===t}function RZ(e,t){e[t.get(["label","show"])?"show":"hide"]()}function FZ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function zZ(e,t,n){var i=t.get("z"),r=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=r&&(e.zlevel=r),e.silent=n)})}function VZ(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle()).fill=null:"shadow"===n&&((t=i.getAreaStyle()).stroke=null),t}function BZ(e,t,n,i,r){var o=jZ(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=qS(a.get("padding")||0),l=a.getFont(),u=ev(o,l),c=r.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=r.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=r.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,i){var r=i.getWidth(),o=i.getHeight();e[0]=Math.min(e[0]+t,r)-t,e[1]=Math.min(e[1]+n,o)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:FC(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function jZ(e,t,n,i,r){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:r.precision}),a=r.formatter;if(a){var s={value:XN(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Th(i,function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,r=t&&t.getDataParams(i);r&&s.seriesData.push(r)}),Oh(a)?o=a.replace("{value}",o):Ph(a)&&(o=a(s))}return o}function GZ(e,t,n){var i=[1,0,0,1,0,0];return sf(i,i,n.rotation),af(i,i,n.position),xC([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function WZ(e,t,n,i,r,o){var a=NF.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),BZ(t,i,r,o,{position:GZ(i.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function HZ(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function UZ(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function YZ(e,t,n,i,r,o){return{cx:e,cy:t,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var ZZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=XZ(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=VZ(i),d=qZ[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}WZ(t,e,wF(a.model,n),n,i,r)},t.prototype.getHandleTransform=function(e,t,n){var i=wF(t.axis.grid.model,t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=GZ(t.axis,e,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=XZ(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(LZ);function XZ(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var qZ={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:HZ([t,n[0]],[t,n[1]],$Z(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:UZ([t-i/2,n[0]],[i,r],$Z(e))}}};function $Z(e){return"x"===e.dim?0:1}var KZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(fM),JZ=vy(),QZ=Th;function eX(e,t,n){if(!Qd.node){var i=t.getZr();JZ(i).records||(JZ(i).records={}),function(e,t){if(JZ(e).initialized)return;function n(n,i){e.on(n,function(n){var r=function(e){var t={showTip:[],hideTip:[]},n=function(i){var r=t[i.type];r?r.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);QZ(JZ(e).records,function(e){e&&i(e,n,r.dispatchAction)}),function(e,t){var n,i=e.showTip.length,r=e.hideTip.length;i?n=e.showTip[i-1]:r&&(n=e.hideTip[r-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(r.pendings,t)})}JZ(e).initialized=!0,n("click",Nh(nX,"click")),n("mousemove",Nh(nX,"mousemove")),n("globalout",tX)}(i,t),(JZ(i).records[e]||(JZ(i).records[e]={})).handler=n}}function tX(e,t,n){e.handler("leave",null,n)}function nX(e,t,n,i){t.handler(e,n,i)}function iX(e,t){if(!Qd.node){var n=t.getZr();(JZ(n).records||{})[e]&&(JZ(n).records[e]=null)}}var rX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),r=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";eX("axisPointer",n,function(e,t,n){"none"!==r&&("leave"===e||r.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){iX("axisPointer",t)},t.prototype.dispose=function(e,t){iX("axisPointer",t)},t.type="axisPointer",t}(cD);function oX(e,t){var n,i=[],r=e.seriesIndex;if(null==r||!(n=t.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=my(o,e);if(null==a||a<0||Lh(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,d=u.dim,h="x"===c||"radius"===c?1:0,p=o.mapDimension(d),f=[];f[h]=o.get(p,a),f[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(Ih(l.dimensions,function(e){return o.mapDimension(e)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var aX=vy();function sX(e,t,n){var i=e.currTrigger,r=[e.x,e.y],o=e,a=e.dispatchAction||Eh(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){hX(r)&&(r=oX({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=hX(r),u=o.axesInfo,c=s.axesInfo,d="leave"===i||hX(r),h={},p={},f={list:[],map:{}},g={showPointer:Nh(uX,p),showTooltip:Nh(cX,f)};Th(s.coordSysMap,function(e,t){var n=l||e.containPoint(r);Th(s.coordSysAxesInfo[t],function(e,t){var i=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(u,e);if(!d&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&lX(e,a,g,!1,h)}})});var m={};return Th(c,function(e,t){var n=e.linkGroup;n&&!p[t]&&Th(n.axesInfo,function(t,i){var r=p[i];if(t!==e&&r){var o=r.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,dX(t),dX(e)))),m[e.key]=o}})}),Th(m,function(e,t){lX(c[t],e,g,!0,h)}),function(e,t,n){var i=n.axesInfo=[];Th(t,function(t,n){var r=t.axisPointerModel.option,o=e[n];o?(!t.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!t.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:r.value})})}(p,c,h),function(e,t,n,i){if(hX(t)||!e.list.length)return void i({type:"hideTip"});var r=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:e.list})}(f,r,e,a),function(e,t,n){var i=n.getZr(),r="axisPointerLastHighlights",o=aX(i)[r]||{},a=aX(i)[r]={};Th(e,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&Th(n.seriesDataIndices,function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e})});var s=[],l=[];Th(o,function(e,t){!a[t]&&l.push(e)}),Th(a,function(e,t){!o[t]&&s.push(e)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),h}}function lX(e,t,n,i,r){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,i=n.dim,r=e,o=[],a=Number.MAX_VALUE,s=-1;return Th(t.seriesModels,function(t,l){var u,c,d=t.getData().mapDimensionsAll(i);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=a&&((f<a||p>=0&&s<0)&&(a=f,s=p,r=u,o.length=0),Th(c,function(e){o.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:o,snapToValue:r}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&bh(r,s[0]),!i&&e.snap&&o.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function uX(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function cX(e,t,n,i){var r=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=GF(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function dX(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function hX(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function pX(e){HF.registerAxisPointerClass("CartesianAxisPointer",ZZ),e.registerComponentModel(KZ),e.registerComponentView(rX),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Lh(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=zF(e,t)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},sX)}var fX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(t),u=i.get("type");if(u&&"none"!==u){var c=VZ(i),d=gX[u](o,a,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}var h=function(e,t,n,i,r){var o=t.axis,a=o.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,d=i.getRadiusAxis().getExtent();if("radius"===o.dim){var h=[1,0,0,1,0,0];sf(h,h,s),af(h,h,[i.cx,i.cy]),l=xC([a,-r],h);var p=t.getModel("axisLabel").get("rotate")||0,f=NF.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=d[1];l=i.coordToPoint([g+r,a]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,a,i.get(["label","margin"]));BZ(e,n,i,r,h)},t}(LZ);var gX={line:function(e,t,n,i){return"angle"===e.dim?{type:"Line",shape:HZ(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:YZ(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:YZ(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}},mX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(fM),vX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",by).models[0]},t.type="polarAxis",t}(fM);Sh(vX,QN);var yX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="angleAxis",t}(vX),xX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="radiusAxis",t}(vX),_X=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return Kd(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(SL);_X.prototype.dataToRadius=SL.prototype.dataToCoord,_X.prototype.radiusToData=SL.prototype.coordToData;var bX=vy(),wX=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return Kd(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=e.dataToCoord(o+1)-e.dataToCoord(o),s=Math.abs(a),l=ev(null==o?"":o+"",t.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),d=bX(e.model),h=d.lastAutoInterval,p=d.lastTickCount;return null!=h&&null!=p&&Math.abs(h-c)<=1&&Math.abs(p-r)<=1&&h>c?c=h:(d.lastTickCount=r,d.lastAutoInterval=c),c},t}(SL);wX.prototype.dataToAngle=SL.prototype.dataToCoord,wX.prototype.angleToData=SL.prototype.coordToData;var CX=["radius","angle"],SX=function(){function e(e){this.dimensions=CX,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new _X,this._angleAxis=new wX,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){return this["_"+e+"Axis"]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},e.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<o?1:-1;l<o||l>a;)l+=360*u;return[s,l]},e.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),i=Math.PI/180,r=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,o=n*n+i*i,a=this.r,s=this.r0;return a!==s&&o-r<=a*a&&o+r>=s*s}}},e.prototype.convertToPixel=function(e,t,n){return MX(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return MX(t)===this?this.pointToData(n):null},e}();function MX(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function TX(e,t){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),e.eachSeries(function(e){if(e.coordinateSystem===n){var t=e.getData();Th(JN(t,"radius"),function(e){r.scale.unionExtentFromData(t,e)}),Th(JN(t,"angle"),function(e){i.scale.unionExtentFromData(t,e)})}}),UN(i.scale,i.model),UN(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function IX(e,t){var n;if(e.type=t.get("type"),e.scale=YN(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),function(e){return"angleAxis"===e.mainType}(t)){e.inverse=e.inverse!==t.get("clockwise");var i=t.get("startAngle"),r=null!==(n=t.get("endAngle"))&&void 0!==n?n:i+(e.inverse?-360:360);e.setExtent(i,r)}t.axis=e,e.model=t}var DX={dimensions:CX,create:function(e,t){var n=[];return e.eachComponent("polar",function(e,i){var r=new SX(i+"");r.update=TX;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");IX(o,s),IX(a,l),function(e,t,n){var i=t.get("center"),r=n.getWidth(),o=n.getHeight();e.cx=Sv(i[0],r),e.cy=Sv(i[1],o);var a=e.getRadiusAxis(),s=Math.min(r,o)/2,l=t.get("radius");null==l?l=[0,"100%"]:Lh(l)||(l=[0,l]);var u=[Sv(l[0],s),Sv(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,e,t),n.push(r),e.coordinateSystem=r,r.model=e}),e.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var t=e.getReferringComponents("polar",by).models[0];if("production"!==process.env.NODE_ENV&&!t)throw new Error('Polar "'+Uh(e.get("polarIndex"),e.get("polarId"),0)+'" not found');e.coordinateSystem=t.coordinateSystem}}),n}},kX=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function AX(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),r=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function EX(e){return e.getRadiusAxis().inverse?0:1}function NX(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var LX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return Kd(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=Ih(n.getViewLabels(),function(e){e=yh(e);var t=n.scale,i="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(i),e});NX(s),NX(o),Th(kX,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||PX[t](this.group,e,i,o,a,r,s)},this)}},t.type="angleAxis",t}(HF),PX={axisLine:function(e,t,n,i,r,o){var a,s=t.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),d=EX(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===o[h]?new EC[p]({shape:{cx:n.cx,cy:n.cy,r:o[d],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Cw({shape:{cx:n.cx,cy:n.cy,r:o[d],r0:o[h]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,e.add(a)},axisTick:function(e,t,n,i,r,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[EX(n)],u=Ih(i,function(e){return new Ew({shape:AX(n,[l,l+s],e.coord)})});e.add(fC(u,{style:wh(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(e,t,n,i,r,o){if(r.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[EX(n)],c=[],d=0;d<r.length;d++)for(var h=0;h<r[d].length;h++)c.push(new Ew({shape:AX(n,[u,u+l],r[d][h].coord)}));e.add(fC(c,{style:wh(s.getModel("lineStyle").getLineStyle(),wh(a.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(e,t,n,i,r,o,a){var s=t.getCategories(!0),l=t.getModel("axisLabel"),u=l.get("margin"),c=t.get("triggerEvent");Th(a,function(i,r){var a=l,d=i.tickValue,h=o[EX(n)],p=n.coordToPoint([h+u,i.coord]),f=n.cx,g=n.cy,m=Math.abs(p[0]-f)/h<.3?"center":p[0]>f?"left":"right",v=Math.abs(p[1]-g)/h<.3?"middle":p[1]>g?"top":"bottom";if(s&&s[d]){var y=s[d];zh(y)&&y.textStyle&&(a=new oS(y.textStyle,l,l.ecModel))}var x=new T_({silent:NF.isLabelSilent(t),style:FC(a,{x:p[0],y:p[1],fill:a.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:m,verticalAlign:v})});if(e.add(x),c){var _=NF.makeAxisEventDataBase(t);_.targetType="axisLabel",_.value=i.rawLabel,V_(x).eventData=_}},this)},splitLine:function(e,t,n,i,r,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c<i.length;c++){var d=l++%s.length;u[d]=u[d]||[],u[d].push(new Ew({shape:AX(n,o,i[c].coord)}))}for(c=0;c<u.length;c++)e.add(fC(u[c],{style:wh({stroke:s[c%s.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},minorSplitLine:function(e,t,n,i,r,o){if(r.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new Ew({shape:AX(n,o,r[l][u].coord)}));e.add(fC(s,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},splitArea:function(e,t,n,i,r,o){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=Math.PI/180,d=-i[0].coord*c,h=Math.min(o[0],o[1]),p=Math.max(o[0],o[1]),f=t.get("clockwise"),g=1,m=i.length;g<=m;g++){var v=g===m?i[0].coord:i[g].coord,y=l++%s.length;u[y]=u[y]||[],u[y].push(new bw({shape:{cx:n.cx,cy:n.cy,r0:h,r:p,startAngle:d,endAngle:-v*c,clockwise:f},silent:!0})),d=-v*c}for(g=0;g<u.length;g++)e.add(fC(u[g],{style:wh({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}},OX=["axisLine","axisTickLabel","axisName"],RX=["splitLine","splitArea","minorSplitLine"],FX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return Kd(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=this._axisGroup,i=this._axisGroup=new mv;this.group.add(i);var r=e.axis,o=r.polar,a=o.getAngleAxis(),s=r.getTicksCoords(),l=r.getMinorTicksCoords(),u=a.getExtent()[0],c=r.getExtent(),d=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(o,e,u),h=new NF(e,d);Th(OX,h.add,h),i.add(h.getGroup()),wC(n,i,e),Th(RX,function(t){e.get([t,"show"])&&!r.scale.isBlank()&&zX[t](this.group,e,o,u,c,s,l)},this)}},t.type="radiusAxis",t}(HF),zX={splitLine:function(e,t,n,i,r,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0,u=n.getAngleAxis(),c=Math.PI/180,d=u.getExtent(),h=360===Math.abs(d[1]-d[0])?"Circle":"Arc";s=s instanceof Array?s:[s];for(var p=[],f=0;f<o.length;f++){var g=l++%s.length;p[g]=p[g]||[],p[g].push(new EC[h]({shape:{cx:n.cx,cy:n.cy,r:Math.max(o[f].coord,0),startAngle:-d[0]*c,endAngle:-d[1]*c,clockwise:u.inverse}}))}for(f=0;f<p.length;f++)e.add(fC(p[f],{style:wh({stroke:s[f%s.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(e,t,n,i,r,o,a){if(a.length){for(var s=t.getModel("minorSplitLine").getModel("lineStyle"),l=[],u=0;u<a.length;u++)for(var c=0;c<a[u].length;c++)l.push(new rw({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));e.add(fC(l,{style:wh({fill:null},s.getLineStyle()),silent:!0}))}},splitArea:function(e,t,n,i,r,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=o[0].coord,d=1;d<o.length;d++){var h=l++%s.length;u[h]=u[h]||[],u[h].push(new bw({shape:{cx:n.cx,cy:n.cy,r0:c,r:o[d].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),c=o[d].coord}for(d=0;d<u.length;d++)e.add(fC(u[d],{style:wh({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};function VX(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function BX(e,t){return t.dim+e.model.componentIndex}function jX(e,t,n){var i={},r=function(e){var t={};Th(e,function(e,n){var i=e.getData(),r=e.coordinateSystem,o=r.getBaseAxis(),a=BX(r,o),s=o.getExtent(),l="category"===o.type?o.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=t[a]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[a]=u;var d=VX(e);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var h=Sv(e.get("barWidth"),l),p=Sv(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");h&&!c[d].width&&(h=Math.min(u.remainedWidth,h),c[d].width=h,u.remainedWidth-=h),p&&(c[d].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)});var n={};return Th(t,function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,o=Sv(e.categoryGap,r),a=Sv(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),Th(i,function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)}),u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);var c,d=0;Th(i,function(e,t){e.width||(e.width=u),c=e,d+=e.width*(1+a)}),c&&(d-=c.width*a);var h=-d/2;Th(i,function(e,i){n[t][i]=n[t][i]||{offset:h,width:e.width},h+=e.width*(1+a)})}),n}(kh(t.getSeriesByType(e),function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type}));t.eachSeriesByType(e,function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,o=n.getBaseAxis(),a=BX(n,o),s=VX(e),l=r[a][s],u=l.offset,c=l.width,d=n.getOtherAxis(o),h=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=t.mapDimension(d.dim),v=t.mapDimension(o.dim),y=HE(t,m),x="radius"!==o.dim||!e.get("roundCap",!0),_=d.model.get("startValue"),b=d.dataToCoord(_||0),w=0,C=t.count();w<C;w++){var S=t.get(m,w),M=t.get(v,w),T=S>=0?"p":"n",I=b;y&&(i[s][M]||(i[s][M]={p:b,n:b}),I=i[s][M][T]);var D=void 0,k=void 0,A=void 0,E=void 0;if("radius"===d.dim){var N=d.dataToCoord(S)-b,L=o.dataToCoord(M);Math.abs(N)<f&&(N=(N<0?-1:1)*f),D=I,k=I+N,E=(A=L-u)-c,y&&(i[s][M][T]=k)}else{var P=d.dataToCoord(S,x)-b,O=o.dataToCoord(M);Math.abs(P)<g&&(P=(P<0?-1:1)*g),k=(D=O+u)+c,A=I,E=I+P,y&&(i[s][M][T]=E)}t.setItemLayout(w,{cx:h,cy:p,r0:D,r:k,startAngle:-A*Math.PI/180,endAngle:-E*Math.PI/180,clockwise:A>=E})}}})}var GX={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},WX={splitNumber:5},HX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="polar",t}(cD);function UX(e,t){t=t||{};var n=e.coordinateSystem,i=e.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Uh(t.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var c=t.rotate;return null==c&&(c=e.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-c:c,r.z2=1,r}var YX=["axisLine","axisTickLabel","axisName"],ZX=["splitArea","splitLine"],XX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="SingleAxisPointer",n}return Kd(t,e),t.prototype.render=function(t,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new mv;var s=UX(t),l=new NF(t,s);Th(YX,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),Th(ZX,function(e){t.get([e,"show"])&&qX[e](this,this.group,this._axisGroup,t)},this),wC(a,this._axisGroup,t),e.prototype.render.call(this,t,n,i,r)},t.prototype.remove=function(){ZF(this)},t.type="singleAxis",t}(HF),qX={splitLine:function(e,t,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),c=r.isHorizontal(),d=[],h=0,p=r.getTicksCoords({tickModel:o}),f=[],g=[],m=0;m<p.length;++m){var v=r.toGlobalCoord(p[m].coord);c?(f[0]=v,f[1]=u.y,g[0]=v,g[1]=u.y+u.height):(f[0]=u.x,f[1]=v,g[0]=u.x+u.width,g[1]=v);var y=new Ew({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});mC(y.shape,l);var x=h++%s.length;d[x]=d[x]||[],d[x].push(y)}var _=a.getLineStyle(["color"]);for(m=0;m<d.length;++m)t.add(fC(d[m],{style:wh({stroke:s[m%s.length]},_),silent:!0}))}},splitArea:function(e,t,n,i){YF(e,n,i,i)}},$X=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.getCoordSysModel=function(){return this},t.type="singleAxis",t.layoutMode="box",t.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},t}(fM);Sh($X,QN.prototype);var KX=function(e){function t(t,n,i,r,o){var a=e.call(this,t,n,i)||this;return a.type=r||"value",a.position=o||"bottom",a}return Kd(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.pointToData=function(e,t){return this.coordinateSystem.pointToData(e)[0]},t}(SL),JX=["single"],QX=function(){function e(e,t,n){this.type="single",this.dimension="single",this.dimensions=JX,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var i=this.dimension,r=new KX(i,YN(e),[0,0],e.get("type"),e.get("position")),o="category"===r.type;r.onBand=o&&e.get("boundaryGap"),r.inverse=e.get("inverse"),r.orient=e.get("orient"),e.axis=r,r.model=e,r.coordinateSystem=this,this._axis=r},e.prototype.update=function(e,t){e.eachSeries(function(e){if(e.coordinateSystem===this){var t=e.getData();Th(t.mapDimensionsAll(this.dimension),function(e){this._axis.scale.unionExtentFromData(t,e)},this),UN(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(e,t){this._rect=sM({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},e.prototype.getRect=function(){return this._rect},e.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),this._updateAxisTransform(t,n?e.x:e.y)},e.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),i=n[0]+n[1],r=e.isHorizontal();e.toGlobalCoord=r?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord=r?function(e){return e-t}:function(e){return i-e+t}},e.prototype.getAxis=function(){return this._axis},e.prototype.getBaseAxis=function(){return this._axis},e.prototype.getAxes=function(){return[this._axis]},e.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},e.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},e.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[r]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},e.prototype.convertToPixel=function(e,t,n){return eq(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return eq(t)===this?this.pointToData(n):null},e}();function eq(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var tq={create:function(e,t){var n=[];return e.eachComponent("singleAxis",function(i,r){var o=new QX(i,e,t);o.name="single_"+r,o.resize(i,t),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var t=e.getReferringComponents("singleAxis",by).models[0];e.coordinateSystem=t&&t.coordinateSystem}}),n},dimensions:JX},nq=["x","y"],iq=["width","height"],rq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis,a=o.coordinateSystem,s=sq(a,1-aq(o)),l=a.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=VZ(i),d=oq[u](o,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}WZ(t,e,UX(n),n,i,r)},t.prototype.getHandleTransform=function(e,t,n){var i=UX(t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=GZ(t.axis,e,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,i){var r=n.axis,o=r.coordinateSystem,a=aq(r),s=sq(o,a),l=[e.x,e.y];l[a]+=t[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=sq(o,1-a),c=(u[1]+u[0])/2,d=[c,c];return d[a]=l[a],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},t}(LZ),oq={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:HZ([t,n[0]],[t,n[1]],aq(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:UZ([t-i/2,n[0]],[i,r],aq(e))}}};function aq(e){return e.isHorizontal()?0:1}function sq(e,t){var n=e.getRect();return[n[nq[t]],n[nq[t]]+n[iq[t]]]}var lq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="single",t}(cD);var uq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(t,n,i){var r=dM(t);e.prototype.init.apply(this,arguments),cq(t,r)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),cq(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(fM);function cq(e,t){var n,i=e.cellSize;1===(n=Lh(i)?i:e.cellSize=[i,i]).length&&(n[1]=n[0]);var r=Ih([0,1],function(e){return function(e,t){return null!=e[rM[t][0]]||null!=e[rM[t][1]]&&null!=e[rM[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]});cM(e,t,{type:"box",ignoreSize:r})}var dq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){var i=this.group;i.removeAll();var r=e.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,o,i),this._renderLines(e,o,a,i),this._renderYearText(e,o,a,i),this._renderMonthText(e,s,a,i),this._renderWeekText(e,s,o,a,i)},t.prototype._renderDayRect=function(e,t,n){for(var i=e.coordinateSystem,r=e.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new C_({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},t.prototype._renderLines=function(e,t,n,i){var r=this,o=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){h(u.formatedDate),0===c&&(u=o.getDateInfo(t.start.y+"-"+t.start.m));var d=u.date;d.setMonth(d.getMonth()+1),u=o.getDateInfo(d)}function h(t){r._firstDayOfMonth.push(o.getDateInfo(t)),r._firstDayPoints.push(o.dataToRect([t],!1).tl);var l=r._getLinePointsOfOneWeek(e,t,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}h(o.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},t.prototype._getEdgesPoints=function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-t/2,i[1][r]=i[1][r]+t/2,i},t.prototype._drawSplitline=function(e,t,n){var i=new Dw({z2:20,shape:{points:e},style:t});n.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var i=e.coordinateSystem,r=i.getDateInfo(t),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},t.prototype._formatterLabel=function(e,t){return Oh(e)&&e?(n=e,Th(t,function(e,t){n=n.replace("{"+t+"}",e)}),n):Ph(e)?e(t):t.nameMap;var n},t.prototype._yearTextPositionControl=function(e,t,n,i,r){var o=t[0],a=t[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,i){var r=e.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,d={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},h=t.start.y;+t.end.y>+t.start.y&&(h=h+"-"+t.end.y);var p=r.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:h},g=this._formatterLabel(p,f),m=new T_({z2:30,style:FC(r,{text:g}),silent:r.get("silent")});m.attr(this._yearTextPositionControl(m,d[a],n,a,o)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,t,n,i,r){var o="left",a="top",s=e[0],l=e[1];return"horizontal"===n?(l+=r,t&&(o="center"),"start"===i&&(a="bottom")):(s+=r,t&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},t.prototype._renderMonthText=function(e,t,n,i){var r=e.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!Oh(o)||(o&&(t=mS(o)||t),o=t.get(["time","monthAbbr"])||[]);var c="start"===s?0:1,d="horizontal"===n?0:1;a="start"===s?-a:a;for(var h="center"===l,p=r.get("silent"),f=0;f<u[c].length-1;f++){var g=u[c][f].slice(),m=this._firstDayOfMonth[f];if(h){var v=this._firstDayPoints[f];g[d]=(v[d]+u[0][f+1][d])/2}var y=r.get("formatter"),x=o[+m.m-1],_={yyyy:m.y,yy:(m.y+"").slice(2),MM:m.m,M:+m.m,nameMap:x},b=this._formatterLabel(y,_),w=new T_({z2:30,style:bh(FC(r,{text:b}),this._monthTextPositionControl(g,h,n,s,a)),silent:p});i.add(w)}}},t.prototype._weekTextPositionControl=function(e,t,n,i,r){var o="center",a="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+i+(u?1:-1)*r[0]/2,o=u?"right":"left"):(l=l+i+(u?1:-1)*r[1]/2,a=u?"bottom":"top"),{x:s,y:l,align:o,verticalAlign:a}},t.prototype._renderWeekText=function(e,t,n,i,r){var o=e.getModel("dayLabel");if(o.get("show")){var a=e.coordinateSystem,s=o.get("position"),l=o.get("nameMap"),u=o.get("margin"),c=a.getFirstDayOfWeek();if(!l||Oh(l))l&&(t=mS(l)||t),l=t.get(["time","dayOfWeekShort"])||Ih(t.get(["time","dayOfWeekAbbr"]),function(e){return e[0]});var d=a.getNextNDay(n.end.time,7-n.lweek).time,h=[a.getCellWidth(),a.getCellHeight()];u=Sv(u,Math.min(h[1],h[0])),"start"===s&&(d=a.getNextNDay(n.start.time,-(7+n.fweek)).time,u=-u);for(var p=o.get("silent"),f=0;f<7;f++){var g,m=a.getNextNDay(d,f),v=a.dataToRect([m.time],!1).center;g=Math.abs((f+c)%7);var y=new T_({z2:30,style:bh(FC(o,{text:l[g]}),this._weekTextPositionControl(v,i,s,u,h)),silent:p});r.add(y)}}},t.type="calendar",t}(cD),hq=864e5,pq=function(){function e(t,n,i){this.type="calendar",this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t}return e.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){var t=(e=Ov(e)).getFullYear(),n=e.getMonth()+1,i=n<10?"0"+n:""+n,r=e.getDate(),o=r<10?"0"+r:""+r,a=e.getDay();return{y:t+"",m:i,d:o,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},e.prototype.getNextNDay=function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},e.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],r=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];Th([0,1],function(e){u(r,e)&&(o[i[e]]=r[e]*a[e])});var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=sM(o,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}Th([0,1],function(e){u(r,e)||(r[e]=l[i[e]]/a[e])}),this._sw=r[0],this._sh=r[1]},e.prototype.dataToPoint=function(e,t){Lh(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,r=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+hq))return[NaN,NaN];var o=n.day,a=this._getRangeInfo([i.start.time,r]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]:[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},e.prototype.convertToPixel=function(e,t,n){var i=fq(t);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var i=fq(t);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(e){return!1},e.prototype._initRangeOption=function(){var e,t=this._model.get("range");if(Lh(t)&&1===t.length&&(t=t[0]),Lh(t))e=t;else{var n=t.toString();if(/^\d{4}$/.test(n)&&(e=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),r=i.date;r.setMonth(r.getMonth()+1);var o=this.getNextNDay(r,-1);e=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(e=[n,n])}if(!e)return"production"!==process.env.NODE_ENV&&vh("Invalid date range."),t;var a=this._getRangeInfo(e);return a.start.time>a.end.time&&e.reverse(),e},e.prototype._getRangeInfo=function(e){var t,n=[this.getDateInfo(e[0]),this.getDateInfo(e[1])];n[0].time>n[1].time&&(t=!0,n.reverse());var i=Math.floor(n[1].time/hq)-Math.floor(n[0].time/hq)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),c=t?1-u:u-1;return t&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:c,fweek:n[0].day,lweek:n[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var r=7*(e-1)-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},e.create=function(t,n){var i=[];return t.eachComponent("calendar",function(t){var n=new e(t);i.push(n),t.coordinateSystem=n}),t.eachSeries(function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])}),i},e.dimensions=["time","value"],e}();function fq(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function gq(e,t){var n;return Th(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}var mq=["transition","enterFrom","leaveTo"],vq=mq.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function yq(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var i=n?mq:vq,r=0;r<i.length;r++){var o=i[r];null==e[o]&&null!=t[o]&&(e[o]=t[o])}}var xq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return Kd(t,e),t.prototype.mergeOption=function(t,n){var i=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=i},t.prototype.optionUpdated=function(e,t){var n=this.option,i=(t?n:e).elements,r=n.elements=t?[]:n.elements,o=[];this._flatten(i,o,null);var a=ly(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];Th(a,function(e,t){var n=e.newOption;"production"!==process.env.NODE_ENV&&$h(zh(n)||e.existing,"Empty graphic option definition"),n&&(s.push(n),function(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var i=t.parentOption;i?t.parentId=i.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var i=bh({},n),r=e[t],o=n.$action||"merge";if("merge"===o)if(r){if("production"!==process.env.NODE_ENV){var a=n.type;$h(!a||r.type===a,'Please set $action: "replace" to change `type`')}xh(r,i,!0),cM(r,i,{ignoreSize:!0}),hM(n,r),yq(n,r),yq(n,r,"shape"),yq(n,r,"style"),yq(n,r,"extra"),n.clipPath=r.clipPath}else e[t]=i;else"replace"===o?e[t]=i:"remove"===o&&r&&(e[t]=null)}(r,t,n),function(e,t){if(e&&(e.hv=t.hv=[gq(t,["left","right"]),gq(t,["top","bottom"])],"group"===e.type)){var n=e,i=t;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[t],n))},this),n.elements=kh(r,function(e){return e&&delete e.$action,null!=e})},t.prototype._flatten=function(e,t,n){Th(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var i=e.children;i&&i.length&&this._flatten(i,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type="graphic",t.defaultOption={elements:[]},t}(fM),_q={path:null,compoundPath:null,group:mv,image:m_,text:T_},bq=vy(),wq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(){this._elMap=rp()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,i=this.group,r=e.get("z"),o=e.get("zlevel");Th(t,function(t){var a=dy(t.id,null),s=null!=a?n.get(a):null,l=dy(t.parentId,null),u=null!=l?n.get(l):i,c=t.type,d=t.style;"text"===c&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var h=t.textContent,p=t.textConfig;if(d&&MY(d,c,!!p,!!h)){var f=TY(d,c,!0);!p&&f.textConfig&&(p=t.textConfig=f.textConfig),!h&&f.textContent&&(h=f.textContent)}var g=function(e){return e=bh({},e),Th(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(iM),function(t){delete e[t]}),e}(t);"production"!==process.env.NODE_ENV&&s&&$h(u===s.parent,"Changing parent is not supported.");var m=t.$action||"merge",v="merge"===m,y="replace"===m;if(v){var x=s;(T=!s)?x=Sq(a,u,t.type,n):(x&&(bq(x).isNew=!1),JY(x)),x&&(zY(x,g,e,{isInit:T}),Tq(x,t,r,o))}else if(y){Mq(s,t,n,e);var _=Sq(a,u,t.type,n);_&&(zY(_,g,e,{isInit:!0}),Tq(_,t,r,o))}else"remove"===m&&(VY(s,t),Mq(s,t,n,e));var b=n.get(a);if(b&&h)if(v){var w=b.getTextContent();w?w.attr(h):b.setTextContent(new T_(h))}else y&&b.setTextContent(new T_(h));if(b){var C=t.clipPath;if(C){var S=C.type,M=void 0,T=!1;if(v){var I=b.getClipPath();M=(T=!I||bq(I).type!==S)?Cq(S):I}else y&&(T=!0,M=Cq(S));b.setClipPath(M),zY(M,C,e,{isInit:T}),QY(M,C.keyframeAnimation,e)}var D=bq(b);b.setTextConfig(p),D.option=t,function(e,t,n){var i=V_(e).eventData;e.silent||e.ignore||i||(i=V_(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});i&&(i.info=n.info)}(b,e,t),DC({el:b,componentModel:e,itemName:b.name,itemTooltipOption:t.tooltip}),QY(b,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,i=this.group,r=this._elMap,o=t.getWidth(),a=t.getHeight(),s=["x","y"],l=0;l<n.length;l++){if((f=null!=(p=dy((h=n[l]).id,null))?r.get(p):null)&&f.isGroup){var u=(g=f.parent)===i,c=bq(f),d=bq(g);c.width=Sv(c.option.width,u?o:d.width)||0,c.height=Sv(c.option.height,u?a:d.height)||0}}for(l=n.length-1;l>=0;l--){var h,p,f;if(f=null!=(p=dy((h=n[l]).id,null))?r.get(p):null){var g=f.parent,m=(d=bq(g),{}),v=lM(f,h,g===i?{width:o,height:a}:{width:d.width,height:d.height},null,{hv:h.hv,boundingMode:h.bounding},m);if(!bq(f).isNew&&v){for(var y=h.transition,x={},_=0;_<s.length;_++){var b=s[_],w=m[b];y&&(jY(y)||Ch(y,b)>=0)?x[b]=w:f[b]=w}Jw(f,x,e,0)}else f.attr(m)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){Mq(n,bq(n).option,t,e._lastGraphicModel)}),this._elMap=rp()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(cD);function Cq(e){"production"!==process.env.NODE_ENV&&$h(e,"graphic type MUST be set");var t=lp(_q,e)?_q[e]:cC(e);"production"!==process.env.NODE_ENV&&$h(t,"graphic type "+e+" can not be found");var n=new t({});return bq(n).type=e,n}function Sq(e,t,n,i){var r=Cq(n);return t.add(r),i.set(e,r),bq(r).id=e,bq(r).isNew=!0,r}function Mq(e,t,n,i){e&&e.parent&&("group"===e.type&&e.traverse(function(e){Mq(e,t,n,i)}),BY(e,t,i),n.removeKey(bq(e).id))}function Tq(e,t,n,i){e.isGroup||Th([["cursor",sx.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],function(n){var i=n[0];lp(t,i)?e[i]=Yh(t[i],n[1]):null==e[i]&&(e[i]=n[1])}),Th(Ah(t),function(n){if(0===n.indexOf("on")){var i=t[n];e[n]=Ph(i)?i:null}}),lp(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}var Iq=["x","y","radius","angle","single"],Dq=["cartesian2d","polar","singleAxis"];function kq(e){return"production"!==process.env.NODE_ENV&&$h(e),e+"Axis"}function Aq(e,t){var n,i=rp(),r=[],o=rp();e.eachComponent({mainType:"dataZoom",query:t},function(e){o.get(e.uid)||s(e)});do{n=!1,e.eachComponent("dataZoom",a)}while(n);function a(e){!o.get(e.uid)&&function(e){var t=!1;return e.eachTargetAxis(function(e,n){var r=i.get(e);r&&r[n]&&(t=!0)}),t}(e)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),r.push(e),e.eachTargetAxis(function(e,t){(i.get(e)||i.set(e,[]))[t]=!0})}return r}function Eq(e){var t=e.ecModel,n={infoList:[],infoMap:rp()};return e.eachTargetAxis(function(e,i){var r=t.getComponent(kq(e),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}}),n}var Nq=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),Lq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return Kd(t,e),t.prototype.init=function(e,t,n){var i=Pq(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var t=Pq(e);xh(this.option,e,!0),xh(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;Th([["start","startValue"],["end","endValue"]],function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=rp();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return Th(Iq,function(n){var i=this.getReferringComponents(kq(n),wy);if(i.specified){t=!0;var r=new Nq;Th(i.models,function(e){r.add(e.componentIndex)}),e.set(n,r)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,i=!0;if(i){var r="vertical"===t?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}}),"single");function o(t,n){var r=t[0];if(r){var o=new Nq;if(o.add(r.componentIndex),e.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",by).models[0];a&&Th(t,function(e){r.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",by).models[0]&&o.add(e.componentIndex)})}}}i&&Th(Iq,function(t){if(i){var r=n.findComponents({mainType:kq(t),filter:function(e){return"category"===e.get("type",!0)}});if(r[0]){var o=new Nq;o.add(r[0].componentIndex),e.set(t,o),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");Th([["start","startValue"],["end","endValue"]],function(i,r){var o=null!=e[i[0]],a=null!=e[i[1]];o&&!a?t[r]="percent":!o&&a?t[r]="value":n?t[r]=n[r]:o&&(t[r]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(kq(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,i){Th(n.indexList,function(n){e.call(t,i,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){"production"!==process.env.NODE_ENV&&$h(e&&null!=t);var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(kq(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;Th([["start","startValue"],["end","endValue"]],function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;Th(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var r=n[i],o=this._targetAxisInfoMap.get(r),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(r,o.indexList[a]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return"production"!==process.env.NODE_ENV&&$h(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(fM);function Pq(e){var t={};return Th(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Oq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="dataZoom.select",t}(Lq),Rq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(cD),Fq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="dataZoom.select",t}(Rq),zq=Th,Vq=Tv,Bq=function(){function e(e,t,n,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(function(e){var t=e.get("coordinateSystem");return Ch(Dq,t)>=0}(t)){var n=kq(this._dimName),i=t.getReferringComponents(n,by).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return yh(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];zq(["start","end"],function(l,u){var c=e[l],d=e[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),d=i.parse(Cv(c,o,n))):(t=!0,c=Cv(d=null==d?n[u]:i.parse(d),n,o)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?o[u]:c}),Vq(s),Vq(a);var l=this._minMaxSpan;function u(e,t,n,r,o){var a=o?"Span":"ValueSpan";nW(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=Cv(e[s],n,r,!0),o&&(t[s]=i.parse(t[s]))}return t?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var i=[1/0,-1/0];zq(n,function(e){!function(e,t,n){t&&Th(JN(t,n),function(n){var i=t.getApproximateExtent(n);i[0]<e[0]&&(e[0]=i[0]),i[1]>e[1]&&(e[1]=i[1])})}(i,e.getData(),t)});var r=e.getAxisModel(),o=GN(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=e.get("filterMode"),o=this._valueWindow;"none"!==r&&zq(i,function(e){var t=e.getData(),i=t.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=t.getStore(),s=Ih(i,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,r,l=0;l<i.length;l++){var u=a.get(s[l],e),c=!isNaN(u),d=u<o[0],h=u>o[1];if(c&&!d&&!h)return!0;c&&(r=!0),d&&(t=!0),h&&(n=!0)}return r&&t&&n})}else zq(i,function(n){if("empty"===r)e.setData(t=t.map(n,function(e){return function(e){return e>=o[0]&&e<=o[1]}(e)?e:NaN}));else{var i={};i[n]=o,t.selectRange(i)}});zq(i,function(e){t.setApproximateExtent(o,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;zq(["min","max"],function(i){var r=t.get(i+"Span"),o=t.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Cv(n[0]+o,n,[0,100],!0):null!=r&&(o=Cv(r,[0,100],n,!0)-n[0]),e[i+"Span"]=r,e[i+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=kv(n,[0,500]);i=Math.min(i,20);var r=e.axis.scale.rawExtentInfo;0!==t[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==t[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},e}();var jq={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=e.getComponent(kq(i),r);t(i,r,o,n)})})}t(function(e,t,n,i){n.__dzAxisProxy=null});var n=[];t(function(t,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new Bq(t,i,o,e),n.push(r.__dzAxisProxy))});var i=rp();return Th(n,function(e){Th(e.getTargetSeriesModels(),function(e){i.set(e.uid,e)})}),i},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};var Gq=!1;function Wq(e){Gq||(Gq=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,jq),function(e){e.registerAction("dataZoom",function(e,t){Th(Aq(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}(e),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Hq(e){e.registerComponentModel(Oq),e.registerComponentView(Fq),Wq(e)}var Uq=function(){return function(){}}(),Yq={};function Zq(e,t){Yq[e]=t}function Xq(e){return Yq[e]}var qq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;Th(this.option.feature,function(e,n){var i=Xq(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),xh(e,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},t}(fM);function $q(e,t){var n=qS(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new C_({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}var Kq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.render=function(e,t,n,i){var r=this.group;if(r.removeAll(),e.get("show")){var o=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];Th(s,function(e,t){u.push(t)}),new pE(this._featureNames||[],u).add(c).update(c).remove(Nh(c,null)).execute(),this._featureNames=u,function(e,t,n){var i=t.getBoxLayoutParams(),r=t.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=sM(i,o,r);aM(t.get("orient"),e,t.get("itemGap"),a.width,a.height),lM(e,i,o,r)}(r,e,n),r.add($q(r.getBoundingRect(),e)),a||r.eachChild(function(e){var t=e.__title,i=e.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!Ph(l)&&t){var u=l.style||(l.style={}),c=ev(t,T_.makeFont(u)),d=e.x+r.x,h=!1;e.y+r.y+o+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:o+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}})}function c(c,d){var h,p=u[c],f=u[d],g=s[p],m=new oS(g,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(g.title=i.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:m.option.onclick,featureName:p};else{var v=Xq(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=sS("toolbox-feature"),h.model=m,h.ecModel=t,h.api=n;var y=h instanceof Uq;p||!f?!m.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(i,s,l){var u,c,d=i.getModel("iconStyle"),h=i.getModel(["emphasis","iconStyle"]),p=s instanceof Uq&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};Oh(p)?(u={})[l]=p:u=p;Oh(f)?(c={})[l]=f:c=f;var g=i.iconPaths={};Th(u,function(l,u){var p=SC(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new T_({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:WC({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),DC({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",function(){var t=h.getItemStyle(),i=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||i}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()}),("emphasis"===i.get(["iconStatus",u])?fb:gb)(p),r.add(p),p.on("click",Eh(s.onclick,s,t,n,u)),g[u]=p})}(m,h,p),m.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&("emphasis"===t?fb:gb)(i[e])},h instanceof Uq&&h.render&&h.render(m,t,n,i)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,i){Th(this._features,function(e){e instanceof Uq&&e.updateView&&e.updateView(e.model,t,n,i)})},t.prototype.remove=function(e,t){Th(this._features,function(n){n instanceof Uq&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){Th(this._features,function(n){n instanceof Uq&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(cD);var Jq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",r="svg"===t.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=Qd.browser;if("function"!=typeof MouseEvent||!s.newEdge&&(s.ie||s.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=a.split(","),u=l[0].indexOf("base64")>-1,c=r?decodeURIComponent(l[1]):l[1];u&&(c=window.atob(c));var d=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var h=c.length,p=new Uint8Array(h);h--;)p[h]=c.charCodeAt(h);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,d)}else{var g=document.createElement("iframe");document.body.appendChild(g);var m=g.contentWindow,v=m.document;v.open("image/svg+xml","replace"),v.write(c),v.close(),m.focus(),v.execCommand("SaveAs",!0,d),document.body.removeChild(g)}}else{var y=n.get("lang"),x='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(y&&y[0]||"")+'" /></body>',_=window.open();_.document.write(x),_.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=a;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(Uq),Qq="__ec_magicType_stack__",e$=[["line","bar"],["stack"]],t$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return Th(e.get("type"),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var i=this.model,r=i.get(["seriesIndex",n]);if(n$[n]){var o,a={series:[]};Th(e$,function(e){Ch(e,n)>=0&&Th(e,function(e){i.setIconStatus(e,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},function(e){var t=e.subType,r=e.id,o=n$[n](t,r,e,i);o&&(wh(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",c=e.getReferringComponents(u,by).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(o=xh({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},t}(Uq),n$={line:function(e,t,n,i){if("bar"===e)return xh({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(e,t,n,i){if("line"===e)return xh({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(e,t,n,i){var r=n.get("stack")===Qq;if("line"===e||"bar"===e)return i.setIconStatus("stack",r?"normal":"emphasis"),xh({id:t,stack:r?"":Qq},i.get(["option","stack"])||{},!0)}};nE({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var i$=new Array(60).join("-"),r$="\t";function o$(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var a$=new RegExp("[\t]+","g");function s$(e,t){var n=e.split(new RegExp("\n*"+i$+"\n*","g")),i={series:[]};return Th(n,function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(r$)>=0)return!0}(e)){var r=function(e){for(var t=e.split(/\n+/g),n=[],i=Ih(o$(t.shift()).split(a$),function(e){return{name:e,data:[]}}),r=0;r<t.length;r++){var o=o$(t[r]).split(a$);n.push(o.shift());for(var a=0;a<o.length;a++)i[a]&&(i[a].data[r]=o[a])}return{series:i,categories:n}}(e),o=t[n],a=o.axisDim+"Axis";o&&(i[a]=i[a]||[],i[a][o.axisIndex]={data:r.categories},i.series=i.series.concat(r.series))}else{r=function(e){for(var t=e.split(/\n+/g),n=o$(t.shift()),i=[],r=0;r<t.length;r++){var o=o$(t[r]);if(o){var a=o.split(a$),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),i[r]={name:s,value:[]},l=i[r].value):l=i[r]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?i[r].value=l[0]:i[r]=l[0])}}return{name:n,data:i}}(e);i.series.push(r)}}),i}var l$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n=t.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var r=document.createElement("div");r.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",r.style.backgroundColor=i.get("backgroundColor")||"#fff";var o=document.createElement("h4"),a=i.get("lang")||[];o.innerHTML=a[0]||i.get("title"),o.style.cssText="margin:10px 20px",o.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="overflow:auto";var u=i.get("optionToContent"),c=i.get("contentToOption"),d=function(e){var t,n,i,r=function(e){var t={},n=[],i=[];return e.eachRawSeries(function(e){var r=e.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)n.push(e);else{var o=r.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;t[a]||(t[a]={categoryAxis:o,valueAxis:r.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),t[a].series.push(e)}else n.push(e)}}),{seriesGroupByCategoryAxis:t,other:n,meta:i}}(e);return{value:kh([(n=r.seriesGroupByCategoryAxis,i=[],Th(n,function(e,t){var n=e.categoryAxis,r=e.valueAxis.dim,o=[" "].concat(Ih(e.series,function(e){return e.name})),a=[n.model.getCategories()];Th(e.series,function(e){var t=e.getRawData();a.push(e.getRawData().mapArray(t.mapDimension(r),function(e){return e}))});for(var s=[o.join(r$)],l=0;l<a[0].length;l++){for(var u=[],c=0;c<a.length;c++)u.push(a[c][l]);s.push(u.join(r$))}i.push(s.join("\n"))}),i.join("\n\n"+i$+"\n\n")),(t=r.other,Ih(t,function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,function(){for(var e=arguments.length,r=arguments[e-1],o=t.getName(r),a=0;a<e-1;a++)i[a]=arguments[a];n.push((o?o+r$:"")+i.join(r$))}),n.join("\n")}).join("\n\n"+i$+"\n\n"))],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+i$+"\n\n"),meta:r.meta}}(e);if(Ph(u)){var h=u(t.getOption());Oh(h)?s.innerHTML=h:jh(h)&&s.appendChild(h)}else{l.readOnly=i.get("readOnly");var p=l.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=i.get("textColor"),p.borderColor=i.get("textareaBorderColor"),p.backgroundColor=i.get("textareaColor"),l.value=d.value,s.appendChild(l)}var f=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:5px;left:0;right:0";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+i.get("buttonColor"),m+=";color:"+i.get("buttonTextColor");var x=this;function _(){n.removeChild(r),x._dom=null}Xp(v,"click",_),Xp(y,"click",function(){if(null==c&&null!=u||null!=c&&null==u)return"production"!==process.env.NODE_ENV&&Xv("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),void _();var e;try{e=Ph(c)?c(s,t.getOption()):s$(l.value,f)}catch(n){throw _(),new Error("Data view format error "+n)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),_()}),v.innerHTML=a[1],y.innerHTML=a[2],y.style.cssText=v.style.cssText=m,!i.get("readOnly")&&g.appendChild(y),g.appendChild(v),r.appendChild(o),r.appendChild(s),r.appendChild(g),s.style.height=n.clientHeight-80+"px",n.appendChild(r),this._dom=r},t.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},t}(Uq);function u$(e,t){return Ih(e,function(e,n){var i=t&&t[n];if(zh(i)&&!Lh(i)){zh(e)&&!Lh(e)||(e={value:e});var r=null!=i.name&&null==e.name;return e=wh(e,i),r&&delete e.name,e}return e})}nE({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];Th(e.newOption.series,function(e){var i=t.getSeriesByName(e.name)[0];if(i){var r=i.get("data");n.push({name:e.name,data:u$(e.data,r)})}else n.push(bh({type:"scatter"},e))}),t.mergeOption(wh({series:n},e.newOption))});var c$=Th,d$=vy();function h$(e){var t=d$(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var p$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.onclick=function(e,t){!function(e){d$(e).snapshots=null}(e),t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(Uq);nE({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var f$=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],g$=function(){function e(e,t,n){var i=this;this._targetInfoList=[];var r=v$(t,e);Th(y$,function(e,t){(!n||!n.include||Ch(n.include,t)>=0)&&e(r,i._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=b$[e.brushType](0,n,t);e.__rangeOffset={offset:C$[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){Th(e,function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&Th(i.coordSyses,function(i){var r=b$[e.brushType](1,i,e.range,!0);n(e,r.values,i,t)})},this)},e.prototype.setInputRanges=function(e,t){Th(e,function(e){var n,i,r,o,a,s=this.findTargetInfo(e,t);if("production"!==process.env.NODE_ENV&&($h(!s||!0===s||e.coordRange,"coordRange must be specified when coord index specified."),$h(!s||!0!==s||e.range,"range must be specified in global brush.")),e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=b$[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?C$[e.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=M$(n),o=M$(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}},this)},e.prototype.makePanelOpts=function(e,t){return Ih(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:rH(i),isTargetByCursor:aH(i,e,n.coordSysModel),getLinearBrushOtherExtent:oH(i)}})},e.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&Ch(i.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=v$(t,e),r=0;r<n.length;r++){var o=n[r],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<x$.length;s++)if(x$[s](i,o))return o}return!0},e}();function m$(e){return e[0]>e[1]&&e.reverse(),e}function v$(e,t){return xy(e,t,{includeMainTypes:f$})}var y$={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,r=e.gridModels,o=rp(),a={},s={};(n||i||r)&&(Th(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),Th(i,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),Th(r,function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0}),o.each(function(e){var r=e.coordinateSystem,o=[];Th(r.getCartesians(),function(e,t){(Ch(n,e.getAxis("x").model)>=0||Ch(i,e.getAxis("y").model)>=0)&&o.push(e)}),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:_$.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){Th(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:_$.geo})})}},x$=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,r=e.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],_$={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(yC(e)),t}},b$={lineX:Nh(w$,0),lineY:Nh(w$,1),rect:function(e,t,n,i){var r=e?t.pointToData([n[0][0],n[1][0]],i):t.dataToPoint([n[0][0],n[1][0]],i),o=e?t.pointToData([n[0][1],n[1][1]],i):t.dataToPoint([n[0][1],n[1][1]],i),a=[m$([r[0],o[0]]),m$([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:Ih(n,function(n){var o=e?t.pointToData(n,i):t.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o}),xyMinMax:r}}};function w$(e,t,n,i){"production"!==process.env.NODE_ENV&&$h("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var r=n.getAxis(["x","y"][e]),o=m$(Ih([0,1],function(e){return t?r.coordToData(r.toLocalCoord(i[e]),!0):r.toGlobalCoord(r.dataToCoord(i[e]))})),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var C$={lineX:Nh(S$,0),lineY:Nh(S$,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return Ih(e,function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]})}};function S$(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function M$(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var T$,I$,D$=Th,k$=ny+"toolbox-dataZoom_",A$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.render=function(e,t,n,i){this._brushController||(this._brushController=new IW(n.getZr()),this._brushController.on("brush",Eh(this._onBrush,this)).mount()),function(e,t,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new g$(N$(e),t,{include:["grid"]}),s=a.makePanelOpts(r,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",function(e){return h$(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){E$[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new g$(N$(this.model),i,{include:["grid"]}).matchOutputRanges(t,i,function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(r("x",n,t[0]),r("y",n,t[1])):r({lineX:"x",lineY:"y"}[i],n,t)}}),function(e,t){var n=h$(e);c$(t,function(t,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}}),n.push(t)}(i,n),this._dispatchZoomAction(n)}function r(e,t,r){var o=t.getAxis(e),a=o.model,s=function(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},function(n){n.getAxisModel(e,t.componentIndex)&&(i=n)}),i}(e,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=nW(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];D$(e,function(e,n){t.push(yh(e))}),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(Uq),E$={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=h$(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return c$(n,function(e,n){for(var r=t.length-1;r>=0;r--)if(e=t[r][n]){i[n]=e;break}}),i}(this.ecModel))}};function N$(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}T$="dataZoom",I$=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var i=t.getModel(n),r=[],o=xy(e,N$(i));return D$(o.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),D$(o.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),r}function a(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:k$+t+o};a[n]=o,r.push(a)}},$h(null==RM.get(T$)&&I$),RM.set(T$,I$);var L$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(fM);function P$(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function O$(e){if(Qd.domSupported)for(var t=document.documentElement.style,n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n]}var R$=O$(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function F$(e,t){if(!e)return t;t=XS(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var z$=F$(O$(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),V$=F$(R$,"transform"),B$="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Qd.transform3dSupported?"will-change:transform;":"");function j$(e,t,n){var i=e.toFixed(0)+"px",r=t.toFixed(0)+"px";if(!Qd.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=Qd.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+V$+":"+a+";":[["top",0],["left",0],[R$,a]]}function G$(e,t,n){var i=[],r=e.get("transitionDuration"),o=e.get("backgroundColor"),a=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),d=$I(e,"html"),h=l+"px "+u+"px "+a+"px "+s;return i.push("box-shadow:"+h),t&&r&&i.push(function(e,t){var n="cubic-bezier(0.23,1,0.32,1)",i=" "+e/2+"s "+n,r="opacity"+i+",visibility"+i;return t||(i=" "+e+"s "+n,r+=Qd.transformSupported?","+V$+i:",left"+i+",top"+i),z$+":"+r}(r,n)),o&&i.push("background-color:"+o),Th(["width","color","radius"],function(t){var n="border-"+t,r=XS(n),o=e.get(r);null!=o&&i.push(n+":"+o+("color"===t?"":"px"))}),i.push(function(e){var t=[],n=e.get("fontSize"),i=e.getTextColor();i&&t.push("color:"+i),t.push("font:"+e.getFont());var r=Yh(e.get("lineHeight"),Math.round(3*n/2));n&&t.push("line-height:"+r+"px");var o=e.get("textShadowColor"),a=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return o&&a&&t.push("text-shadow:"+s+"px "+l+"px "+a+"px "+o),Th(["decoration","align"],function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)}),t.join(";")}(c)),null!=d&&i.push("padding:"+qS(d).join("px ")+"px"),i.join(";")+";"}function W$(e,t,n,i,r){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,i,r){Rp(Op,t,i,r,!0)&&Rp(e,n,Op[0],Op[1])}(e,a,n,i,r)}else{e[0]=i,e[1]=r;var s=o&&o.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var H$=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Qd.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),r=t.appendTo,o=r&&(Oh(r)?document.querySelector(r):jh(r)?r:Ph(r)&&r(e.getDom()));W$(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var a=this;n.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!a._enterable){var t=i.handler;Zp(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=(o="position",(a=(r=t).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r))?a[o]:null),i=t.style;"absolute"!==i.position&&"absolute"!==n&&(i.position="relative")}var r,o,a,s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,r=this._styleCoord;n.innerHTML?i.cssText=B$+G$(e,!this._firstShow,this._longHide)+j$(r[0],r[1],!0)+"border-color:"+eM(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,i,r){var o=this.el;if(null!=e){var a="";if(Oh(r)&&"item"===n.get("trigger")&&!P$(n)&&(a=function(e,t,n){if(!Oh(n)||"inside"===n)return"";var i=e.get("backgroundColor"),r=e.get("borderWidth");t=eM(t);var o,a,s="left"===(o=n)?"right":"right"===o?"left":"top"===o?"bottom":"top",l=Math.max(1.5*Math.round(r),6),u="",c=V$+":";Ch(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,h=l+r,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+r+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",(u+=";"+s+":-"+Math.round(100*((p-Math.SQRT2*r)/2+Math.SQRT2*r-(p-h)/2))/100+"px")+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+i+";"].join("")+'"></div>'}(n,i,r)),Oh(e))o.innerHTML=e+a;else if(e){o.innerHTML="",Lh(e)||(e=[e]);for(var s=0;s<e.length;s++)jh(e[s])&&e[s].parentNode!==o&&o.appendChild(e[s]);if(a&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=a,o.appendChild(l)}}}else o.innerHTML=""},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(W$(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var i=this.el.style;Th(j$(n[0],n[1]),function(e){i[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Qd.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Eh(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}(),U$=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),X$(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,i,r){var o=this;zh(e)&&Qv("production"!==process.env.NODE_ENV?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new T_({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:$I(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),Th(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),Th(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){o.el.style[e]=a.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on("mouseover",function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on("mouseout",function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=Z$(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var i=this._styleCoord;X$(i,this._zr,e,t),e=i[0],t=i[1];var r=n.style,o=Y$(r.borderWidth||0),a=Z$(r);n.x=e+o+a.left,n.y=t+o+a.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Eh(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function Y$(e){return Math.max(0,e)}function Z$(e){var t=Y$(e.shadowBlur||0),n=Y$(e.shadowOffsetX||0),i=Y$(e.shadowOffsetY||0);return{left:Y$(t-n),right:Y$(t+n),top:Y$(t-i),bottom:Y$(t+i)}}function X$(e,t,n,i){e[0]=n,e[1]=i,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var q$=new C_({shape:{x:-1,y:-1,width:2,height:2}}),$$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(e,t){if(!Qd.node&&t.getDom()){var n,i=e.getComponent("tooltip"),r=this._renderMode="auto"===(n=i.get("renderMode"))?Qd.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===r?new U$(t):new H$(t,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!Qd.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?SD(this,"_updatePosition",50,"fixRate"):MD(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");eX("itemTooltip",this._api,Eh(function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,i=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&r.manuallyShowTip(e,t,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,i){if(i.from!==this.uid&&!Qd.node&&n.getDom()){var r=J$(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(e,t,n){var i=_y(e).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o=Cy(t,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse(function(t){var n=V_(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:r,componentIndex:a.componentIndex,el:s}}(i,t,n);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:i.position,positionDefault:"bottom"},r)}else if(i.tooltip&&null!=i.x&&null!=i.y){var l=q$;l.x=i.x,l.y=i.y,l.update(),V_(l).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:l},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var u=oX(i,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:i.position,positionDefault:"bottom"},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},t.prototype.manuallyHideTip=function(e,t,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(J$(i,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,i){var r=i.seriesIndex,o=i.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=t.getSeriesByIndex(r);if(s)if("axis"===K$([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,e);else if(n){var r,o;if("legend"===V_(n).ssrType)return;this._lastDataByCoordSys=null,fk(n,function(e){return null!=V_(e).dataIndex?(r=e,!0):null!=V_(e).tooltipConfig?(o=e,!0):void 0},!0),r?this._showSeriesItemTooltip(e,r,t):o?this._showComponentItemTooltip(e,o,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=Eh(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,i=this._tooltipModel,r=[t.offsetX,t.offsetY],o=K$([t.tooltipOption],i),a=this._renderMode,s=[],l=BI("section",{blocks:[],noHeader:!0}),u=[],c=new KI;Th(e,function(e){Th(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value;if(t&&null!=r){var o=jZ(r,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=BI("section",{header:o,noHeader:!Kh(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),Th(e.seriesDataIndices,function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=XN(t.axis,{value:r}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",eM(f.color),a);var g=eI(h.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=K$([h],i).get("valueFormatter");d.blocks.push(v?bh({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var d=t.position,h=o.get("order"),p=YI(l,c,a,h,n.get("useUTC"),o.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"<br/>",g=u.join(f);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,d,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],d,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var i=this._ecModel,r=V_(t),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=K$([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new KI;g.marker=m.makeTooltipMarker("item",eM(g.color),d);var v=eI(s.formatTooltip(l,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),_=v.frag,b=_?YI(x?bh({valueFormatter:x},_):_,m,d,y,i.get("useUTC"),p.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,b,g,w,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var i="html"===this._renderMode,r=V_(t),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(Oh(o)){o={content:o,formatter:o},a=!0}a&&i&&o.content&&((o=yh(o)).content=Bp(o.content));var s=[o],l=this._ecModel.getComponent(r.componentMainType,r.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=e.positionDefault,c=K$(s,this._tooltipModel,u?{position:u}:null),d=c.get("content"),h=Math.random()+"",p=new KI;this._showOrMove(c,function(){var n=yh(c.get("formatterParams")||{});this._showTooltipContent(c,d,n,h,e.offsetX,e.offsetY,e.position,t,p)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,i,r,o,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([r,o],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(Oh(c)){var p=e.ecModel.get("useUTC"),f=Lh(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=AS(f.axisValue,d,p)),d=QS(d,n,!0)}else if(Ph(c)){var g=Eh(function(t,i){t===this._ticket&&(u.setContent(i,l,e,h,a),this._updatePosition(e,a,r,o,u,n,s))},this);this._ticket=i,d=c(n,i,g)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,r,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,i){return"axis"===n||Lh(t)?{color:i||("html"===this._renderMode?"#fff":"none")}:Lh(t)?void 0:{color:i||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=r.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),Ph(t)&&(t=t([n,i],o,r.el,h,{viewSize:[s,l],contentSize:u.slice()})),Lh(t))n=Sv(t[0],s),i=Sv(t[1],l);else if(zh(t)){var p=t;p.width=u[0],p.height=u[1];var f=sM(p,{width:s,height:l});n=f.x,i=f.y,c=null,d=null}else if(Oh(t)&&a){var g=function(e,t,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-r/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-r/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-r/2,l=t.y+c+a;break;case"left":s=t.x-r-a,l=t.y+c/2-o/2;break;case"right":s=t.x+u+a,l=t.y+c/2-o/2}return[s,l]}(t,h,u,e.get("borderWidth"));n=g[0],i=g[1]}else{g=function(e,t,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(e+l+o+2>i?e-=l+o:e+=o);null!=a&&(t+u+a>r?t-=u+a:t+=a);return[e,t]}(n,i,r,s,l,c?null:20,d?null:20);n=g[0],i=g[1]}if(c&&(n-=Q$(c)?u[0]/2:"right"===c?u[0]:0),d&&(i-=Q$(d)?u[1]/2:"bottom"===d?u[1]:0),P$(e)){g=function(e,t,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return e=Math.min(e+a,i)-a,t=Math.min(t+s,r)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===e.length;return r&&Th(n,function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&Th(a,function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&Th(a,function(e,t){var n=l[t];r=r&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),i&&Th(e.seriesDataIndices,function(e){var n=e.seriesIndex,o=t[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!r},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Qd.node&&t.getDom()&&(MD(this,"_updatePosition"),this._tooltipContent.dispose(),iX("itemTooltip",t))},t.type="tooltip",t}(cD);function K$(e,t,n){var i,r=t.ecModel;n?(i=new oS(n,r,r),i=new oS(t.option,i,r)):i=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof oS&&(a=a.get("tooltip",!0)),Oh(a)&&(a={formatter:a}),a&&(i=new oS(a,i,r)))}return i}function J$(e,t){return e.dispatchAction||Eh(t.dispatchAction,t)}function Q$(e){return"center"===e||"middle"===e}var eK=["rect","polygon","keep","clear"];function tK(e,t){var n=iy(e?e.brush:[]);if(n.length){var i=[];Th(n,function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))});var r=e&&e.toolbox;Lh(r)&&(r=r[0]),r||(r={feature:{}},e.toolbox=[r]);var o,a,s=r.feature||(r.feature={}),l=s.brush||(s.brush={}),u=l.type||(l.type=[]);u.push.apply(u,i),a={},Th(o=u,function(e){a[e]=1}),o.length=0,Th(a,function(e,t){o.push(t)}),t&&!u.length&&u.push.apply(u,eK)}}var nK=Th;function iK(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function rK(e,t,n){var i={};return nK(t,function(t){var r,o=i[t]=((r=function(){}).prototype.__hidden=r.prototype,new r);nK(e[t],function(e,i){if(XB.isValidType(i)){var r={type:i,visual:e};n&&n(r,t),o[i]=new XB(r),"opacity"===i&&((r=yh(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new XB(r))}})}),i}function oK(e,t,n){var i;Th(n,function(e){t.hasOwnProperty(e)&&iK(t[e])&&(i=!0)}),i&&Th(n,function(n){t.hasOwnProperty(n)&&iK(t[n])?e[n]=yh(t[n]):delete e[n]})}var aK={lineX:sK(0),lineY:sK(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&tL(n.range,e[0],e[1])},rect:function(e,t,n){var i=n.range;if(!e||i.length<=1)return!1;var r=e.x,o=e.y,a=e.width,s=e.height,l=i[0];return!!(tL(i,r,o)||tL(i,r+a,o)||tL(i,r,o+s)||tL(i,r+a,o+s)||xf.create(e).contain(l[0],l[1])||MC(r,o,r+a,o,i)||MC(r,o,r,o+s,i)||MC(r+a,o,r+a,o+s,i)||MC(r,o+s,r+a,o+s,i))||void 0}}};function sK(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var r=i.range;return lK(t[e],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[t[e]],i[t[e]]+i[n[e]]];return s[1]<s[0]&&s.reverse(),lK(s[0],a)||lK(s[1],a)||lK(a[0],s)||lK(a[1],s)}}}}function lK(e,t){return t[0]<=e&&e<=t[1]}var uK=["inBrush","outOfBrush"],cK="__ecBrushSelect",dK="__ecInBrushSelectEvent";function hK(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new g$(t.option,e)).setInputRanges(t.areas,e)})}function pK(e,t,n){var i,r,o=[];e.eachComponent({mainType:"brush"},function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})}),hK(e),e.eachComponent({mainType:"brush"},function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:yh(t.areas),selected:[]};o.push(a);var s=t.option,l=s.brushLink,u=[],c=[],d=[],h=!1;n||(i=s.throttleType,r=s.throttleDelay);var p=Ih(t.areas,function(e){var t=mK[e.brushType],n=wh({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(i){return aK[t].point(i,n,e)},rect:function(i){return aK[t].rect(i,n,e)}};return n}(n),n}),f=rK(t.option,uK,function(e){e.mappingMethod="fixed"});function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}Lh(l)&&Th(l,function(e){u[e]=1}),e.eachSeries(function(n,i){var r=d[i]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;h=h||n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),function(e,t){"active"===e&&(c[t]=1)})}(n,i):function(n,i,r){if(!n.brushSelector||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Lh(n)?Ch(n,t)<0:t!==n)}(t,i))return;if(Th(p,function(i){t.brushTargetManager.controlSeries(i,n,e)&&r.push(i),h=h||m(r)}),g(i)&&m(r)){var o=n.getData();o.each(function(e){gK(n,r,o,e)&&(c[e]=1)})}}(n,i,r)}),e.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};a.selected.push(n);var i=d[t],r=e.getData(),o=g(t)?function(e){return c[e]?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(t){return gK(e,i,r,t)?(n.dataIndex.push(r.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(t)?h:m(i))&&function(e,t,n,i,r){var o,a={};function s(e){return uk(n,o,e)}function l(e,t){dk(n,o,e,t)}Th(e,function(e){var n=XB.prepareVisualTypes(t[e]);a[e]=n}),n.each(function(e,u){o=e;var c=n.getRawDataItem(o);if(!c||!1!==c.visualMap)for(var d=i.call(r,e),h=t[d],p=a[d],f=0,g=p.length;f<g;f++){var m=p[f];h[m]&&h[m].applyVisual(e,s,l)}})}(uK,f,r,o)})}),function(e,t,n,i,r){if(!r)return;var o=e.getZr();if(o[dK])return;o[cK]||(o[cK]=fK);var a=SD(o,cK,n,t);a(e,i)}(t,i,r,o,n)}function fK(e,t){if(!e.isDisposed()){var n=e.getZr();n[dK]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[dK]=!1}}function gK(e,t,n,i){for(var r=0,o=t.length;r<o;r++){var a=t[r];if(e.brushSelector(i,n,a.selectors,a))return!0}}var mK={rect:function(e){return vK(e.range)},polygon:function(e){for(var t,n=e.range,i=0,r=n.length;i<r;i++){t=t||[[1/0,-1/0],[1/0,-1/0]];var o=n[i];o[0]<t[0][0]&&(t[0][0]=o[0]),o[0]>t[0][1]&&(t[0][1]=o[0]),o[1]<t[1][0]&&(t[1][0]=o[1]),o[1]>t[1][1]&&(t[1][1]=o[1])}return t&&vK(t)}};function vK(e){return new xf(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var yK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new IW(t.getZr())).on("brush",Eh(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,i){this.model=e,this._updateController(e,t,n,i)},t.prototype.updateTransform=function(e,t,n,i){hK(t),this._updateController(e,t,n,i)},t.prototype.updateVisual=function(e,t,n,i){this.updateTransform(e,t,n,i)},t.prototype.updateView=function(e,t,n,i){this._updateController(e,t,n,i)},t.prototype._updateController=function(e,t,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:t,areas:yh(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:yh(n),$from:t})},t.type="brush",t}(cD),xK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return Kd(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&oK(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){"production"!==process.env.NODE_ENV&&($h(Lh(e)),Th(e,function(e){$h(e.brushType,"Illegal areas")})),e&&(this.areas=Ih(e,function(e){return _K(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=_K(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},t}(fM);function _K(e,t){return xh({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new oS(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var bK=["rect","polygon","lineX","lineY","keep","clear"],wK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kd(t,e),t.prototype.render=function(e,t,n){var i,r,o;t.eachComponent({mainType:"brush"},function(e){i=e.brushType,r=e.brushOption.brushMode||"single",o=o||!!e.areas.length}),this._brushType=i,this._brushMode=r,Th(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===r:"clear"===t?o:t===i)?"emphasis":"normal")})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return Th(e.get("type",!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var i=this._brushType,r=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},t.getDefaultOption=function(e){return{show:!0,type:bK.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])}},t}(Uq);var CK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Kd(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(fM),SK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,r=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Yh(e.get("textBaseline"),e.get("textVerticalAlign")),l=new T_({style:FC(r,{text:e.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new T_({style:FC(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",function(){tM(h,"_"+e.get("target"))}),p&&d.on("click",function(){tM(p,"_"+e.get("subtarget"))}),V_(l).eventData=V_(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(d);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=sM(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));a||("middle"===(a=e.get("left")||e.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),d.setStyle(y),g=i.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new C_({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},t.type="title",t}(cD);var MK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return Kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e,t=this.option,n=t.data||[],i=t.axisType,r=this._names=[];"category"===i?(e=[],Th(n,function(t,n){var i,o=dy(ay(t),"");zh(t)?(i=yh(t)).value=n:i=n,e.push(i),r.push(o)})):e=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new FE([{name:"value",type:o}],this)).initData(e,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},t}(fM),TK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="timeline.slider",t.defaultOption=lS(MK.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),t}(MK);Sh(TK,QT.prototype);var IK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="timeline",t}(cD),DK=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i)||this;return o.type=r||"value",o}return Kd(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(SL),kK=Math.PI,AK=vy(),EK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(e,t){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,e);e.formatTooltip=function(e){return BI("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},Th(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,r,a,e)},this),this._renderAxisLabel(i,o,a,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n,i,r,o,a=e.get(["label","position"]),s=e.get("orient"),l=function(e,t){return sM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2<t.getHeight()/2?"-":"+":l.x+l.width/2<t.getWidth()/2?"+":"-":Oh(a)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[s][a]:a)>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},d={horizontal:0,vertical:kK/2},h="vertical"===s?l.height:l.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=e.get(["label","rotate"])||0;y=y*kK/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),C=0,S=h;"left"===x||"bottom"===x?(_&&(i=[0,0],C+=v),b&&(r=[C,0],C+=v),w&&(o=[S-g,0],S-=v)):(_&&(i=[S-g,0],S-=v),b&&(r=[0,0],C+=v),w&&(o=[S-g,0],S-=v));var M=[C,S];return e.get("inverse")&&M.reverse(),{viewRect:l,mainLength:h,orient:s,rotation:d[s],labelRotation:y,labelPosOpt:n,labelAlign:e.get(["label","align"])||u[s],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||c[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:M,controlSize:g,controlGap:m}},t.prototype._position=function(e,t){var n=this._mainGroup,i=this._labelGroup,r=e.viewRect;if("vertical"===e.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;af(o,o,[-a,-s]),sf(o,o,-kK/2),af(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=m(r),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),d=[n.x,n.y],h=[i.x,i.y];h[0]=d[0]=l[0][0];var p,f=e.labelPosOpt;null==f||Oh(f)?(v(d,u,l,1,p="+"===f?0:1),v(h,c,l,1,1-p)):(v(d,u,l,1,p=f>=0?0:1),h[1]=d[1]+f);function g(e){e.originX=l[0][0]-e.x,e.originY=l[1][0]-e.y}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,r){e[i]+=n[i][r]-t[i][r]}n.setPosition(d),i.setPosition(h),n.rotation=i.rotation=e.rotation,g(n),g(i)},t.prototype._createAxis=function(e,t){var n=t.getData(),i=t.get("axisType"),r=function(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new oN({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new bN({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new sN}}(t,i);r.getTicks=function(){return n.mapArray(["value"],function(e){return{value:e}})};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new DK("value",r,e.axisExtent,i);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new mv;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new Ew({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:bh({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(o);var a=this._progressLine=new Ew({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:wh({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});t.add(a)}},t.prototype._renderAxisTick=function(e,t,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],Th(a,function(e){var a=n.dataToCoord(e.value),s=o.getItemModel(e.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),c=s.getModel(["progress","itemStyle"]),d={x:a,y:0,onclick:Eh(r._changeTimeline,r,e.value)},h=NK(s,l,t,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),Ib(h);var p=V_(h);s.get("tooltip")?(p.dataIndex=e.value,p.dataModel=i):p.dataIndex=p.dataModel=null,r._tickSymbols.push(h)})},t.prototype._renderAxisLabel=function(e,t,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],Th(a,function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),c=s.getModel(["progress","label"]),d=n.dataToCoord(i.tickValue),h=new T_({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:Eh(r._changeTimeline,r,a),silent:!1,style:FC(l,{text:i.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});h.ensureState("emphasis").style=FC(u),h.ensureState("progress").style=FC(c),t.add(h),Ib(h),AK(h).dataIndex=a,r._tickLabels.push(h)})}},t.prototype._renderControl=function(e,t,n,i){var r=e.controlSize,o=e.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function c(e,n,l,u){if(e){var c=rv(Yh(i.get(["controlStyle",n+"BtnSize"]),r),r),d=function(e,t,n,i){var r=i.style,o=SC(e.get(["controlStyle",t]),i||{},new xf(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-c/2,c,c],{x:e[0],y:e[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});d.ensureState("emphasis").style=s,t.add(d),Ib(d)}}c(e.nextBtnPosition,"next",Eh(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",Eh(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,l?"stop":"play",Eh(this._handlePlayClick,this,!l),!0)},t.prototype._renderCurrentPointer=function(e,t,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=Eh(s._handlePointerDrag,s),e.ondragend=Eh(s._handlePointerDragend,s),LK(e,s._progressLine,o,n,i,!0)},onUpdate:function(e){LK(e,s._progressLine,o,n,i)}};this._currentPointer=NK(a,a,this._mainGroup,{},this._currentPointer,l)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],i=Tv(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();var r=this._progressLine;r&&(r.shape.x2=n,r.dirty());var o=this._findNearestTick(n),a=this.model;(t||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},t.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},t.prototype._toAxisCoord=function(e){return xC(e,this._mainGroup.getLocalTransform(),!0)},t.prototype._findNearestTick=function(e){var t,n=this.model.getData(),i=1/0,r=this._axis;return n.each(["value"],function(n,o){var a=r.dataToCoord(n),s=Math.abs(a-e);s<i&&(i=s,t=o)}),t},t.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},t.prototype._changeTimeline=function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})},t.prototype._updateTicksStatus=function(){var e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(var i=0;i<t.length;i++)t&&t[i]&&t[i].toggleState("progress",i<e);if(n)for(i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",AK(n[i]).dataIndex<=e)},t.type="timeline.slider",t}(IK);function NK(e,t,n,i,r,o){var a=t.get("color");r?(r.setColor(a),n.add(r),o&&o.onUpdate(r)):((r=Tk(e.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(r),o&&o.onCreate(r));var s=t.getItemStyle(["color"]);r.setStyle(s),i=xh({rectHover:!0,z2:100},i,!0);var l=Ik(e.get("symbolSize"));i.scaleX=l[0]/2,i.scaleY=l[1]/2;var u=Dk(e.get("symbolOffset"),l);u&&(i.x=(i.x||0)+u[0],i.y=(i.y||0)+u[1]);var c=e.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,r.attr(i),r.updateTransform(),r}function LK(e,t,n,i,r,o){if(!e.dragging){var a=r.getModel("checkpointStyle"),s=i.dataToCoord(r.getData().get("value",n));if(o||!a.get("animation",!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{var l={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},l),t&&t.animateTo({shape:{x2:s}},l)}}}function PK(e){var t=e&&e.timeline;Lh(t)||(t=t?[t]:[]),Th(t,function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(OK(e),RK(e,"controlPosition")){var i=e.controlStyle||(e.controlStyle={});RK(i,"position")||(i.position=e.controlPosition),"none"!==i.position||RK(i,"show")||(i.show=!1,delete i.position),delete e.controlPosition}Th(e.data||[],function(e){zh(e)&&!Lh(e)&&(!RK(e,"value")&&RK(e,"name")&&(e.value=e.name),OK(e))})}(e)})}function OK(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),i=e.label||e.label||{},r=i.normal||(i.normal={}),o={normal:1,emphasis:1};Th(i,function(e,t){o[t]||RK(r,t)||(r[t]=e)}),n.label&&!RK(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function RK(e,t){return e.hasOwnProperty(t)}function FK(e,t){if(!e)return!1;for(var n=Lh(e)?e:[e],i=0;i<n.length;i++)if(n[i]&&n[i][t])return!0;return!1}function zK(e){ry(e,"label",["show"])}var VK=vy(),BK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return Kd(t,e),t.prototype.init=function(e,t,n){if("production"!==process.env.NODE_ENV&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Qd.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,i){var r=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),o=VK(e)[r];n&&n.data?(o?o._mergeOption(n,t,!0):(i&&zK(n),Th(n.data,function(e){e instanceof Array?(zK(e[0]),zK(e[1])):zK(e)}),bh(o=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),VK(e)[r]=o):VK(e)[r]=null},this)},t.prototype.formatTooltip=function(e,t,n){var i=this.getData(),r=this.getRawValue(e),o=i.getName(e);return BI("section",{header:this.name,blocks:[BI("nameValue",{name:o,value:r,noName:!o,noValue:null==r})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=QT.prototype.getDataParams.call(this,e,t),i=this.__hostSeries;return i&&(n.seriesId=i.id,n.seriesName=i.name,n.seriesType=i.subType),n},t.getMarkerModelFromSeries=function(e,t){return VK(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(fM);Sh(BK,QT.prototype);var jK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,n,i)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(BK);function GK(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function WK(e,t,n,i,r,o){var a=[],s=HE(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=qK(t,s,e),u=t.indicesOfNearest(s,l)[0];a[r]=t.get(n,u),a[o]=t.get(s,u);var c=t.get(i,u),d=Iv(t.get(i,u));return(d=Math.min(d,20))>=0&&(a[o]=+a[o].toFixed(d)),[a,c]}var HK={min:Nh(WK,"min"),max:Nh(WK,"max"),average:Nh(WK,"average"),median:Nh(WK,"median")};function UK(e,t){if(t){var n=e.getData(),i=e.coordinateSystem,r=i&&i.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!Lh(t.coord)&&Lh(r)){var o=YK(t,n,i,e);if((t=yh(t)).type&&HK[t.type]&&o.baseAxis&&o.valueAxis){var a=Ch(r,o.baseAxis.dim),s=Ch(r,o.valueAxis.dim),l=HK[t.type](n,o.baseDataDim,o.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&Lh(r))for(var u=t.coord,c=0;c<2;c++)HK[u[c]]&&(u[c]=qK(n,n.mapDimension(r[c]),u[c]));else t.coord=[];return t}}function YK(e,t,n,i){var r={};return null!=e.valueIndex||null!=e.valueDim?(r.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,r.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=t.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=t.mapDimension(r.baseAxis.dim),r.valueDataDim=t.mapDimension(r.valueAxis.dim)),r}function ZK(e,t){return!(e&&e.containData&&t.coord&&!GK(t))||e.containData(t.coord)}function XK(e,t){return e?function(e,n,i,r){return rI(r<2?e.coord&&e.coord[r]:e.value,t[r])}:function(e,n,i,r){return rI(e.value,t[r])}}function qK(e,t,n){if("average"===n){var i=0,r=0;return e.each(t,function(e,t){isNaN(e)||(i+=e,r++)}),i/r}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var $K=vy(),KK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.init=function(){this.markerGroupMap=rp()},t.prototype.render=function(e,t,n){var i=this,r=this.markerGroupMap;r.each(function(e){$K(e).keep=!1}),t.eachSeries(function(e){var r=BK.getMarkerModelFromSeries(e,i.type);r&&i.renderSeries(e,r,t,n)}),r.each(function(e){!$K(e).keep&&i.group.remove(e.group)})},t.prototype.markKeep=function(e){$K(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;Th(e,function(e){var i=BK.getMarkerModelFromSeries(e,n.type);i&&i.getData().eachItemGraphicEl(function(e){e&&(t?mb(e):vb(e))})})},t.type="marker",t}(cD);function JK(e,t,n){var i=t.coordinateSystem;e.each(function(r){var o,a=e.getItemModel(r),s=Sv(a.get("x"),n.getWidth()),l=Sv(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,r));else if(i){var u=e.get(i.dimensions[0],r),c=e.get(i.dimensions[1],r);o=i.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(r,o)})}var QK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=BK.getMarkerModelFromSeries(e,"markPoint");t&&(JK(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,i){var r=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new FO),u=function(e,t,n){var i;i=e?Ih(e&&e.dimensions,function(e){return bh(bh({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var r=new FE(i,n),o=Ih(n.get("data"),Nh(UK,t));e&&(o=kh(o,Nh(ZK,e)));var a=XK(!!e,i);return r.initData(o,null,a),r}(r,e,t);t.setData(u),JK(t.getData(),e,i),u.each(function(e){var n=u.getItemModel(e),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(Ph(i)||Ph(r)||Ph(o)||Ph(s)){var c=t.getRawValue(e),d=t.getDataParams(e);Ph(i)&&(i=i(c,d)),Ph(r)&&(r=r(c,d)),Ph(o)&&(o=o(c,d)),Ph(s)&&(s=s(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=ck(a,"color");h.fill||(h.fill=p),u.setItemVisual(e,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:h})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(e){e.traverse(function(e){V_(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(KK);var eJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,n,i)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(BK),tJ=vy(),nJ=function(e,t,n,i){var r,o=e.getData();if(Lh(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=t.getAxis(null!=i.yAxis?"y":"x"),l=Uh(i.yAxis,i.xAxis);else{var u=YK(i,o,t,e);s=u.valueAxis,l=qK(o,UE(o,u.valueDataDim),a)}var c="x"===s.dim?0:1,d=1-c,h=yh(i),p={coord:[]};h.type=null,h.coord=[],h.coord[d]=-1/0,p.coord[d]=1/0;var f=n.get("precision");f>=0&&Fh(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[c]=p.coord[c]=l,r=[h,p,{type:a,valueIndex:i.valueIndex,value:l}]}else"production"!==process.env.NODE_ENV&&vh("Invalid markLine data."),r=[]}var g=[UK(e,r[0]),UK(e,r[1]),bh({},r[2])];return g[2].type=g[2].type||null,xh(g[2],g[0]),xh(g[2],g[1]),g};function iJ(e){return!isNaN(e)&&!isFinite(e)}function rJ(e,t,n,i){var r=1-e,o=i.dimensions[e];return iJ(t[r])&&iJ(n[r])&&t[e]===n[e]&&i.getAxis(o).containData(t[e])}function oJ(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(rJ(1,n,i,e)||rJ(0,n,i,e)))return!0}return ZK(e,t[0])&&ZK(e,t[1])}function aJ(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=Sv(s.get("x"),r.getWidth()),u=Sv(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);o=a.dataToPoint([d,h])}if(KO(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;iJ(e.get(c[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):iJ(e.get(c[1],t))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}var sJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=BK.getMarkerModelFromSeries(e,"markLine");if(t){var i=t.getData(),r=tJ(t).from,o=tJ(t).to;r.each(function(t){aJ(r,t,!0,e,n),aJ(o,t,!1,e,n)}),i.each(function(e){i.setItemLayout(e,[r.getItemLayout(e),o.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,i){var r=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new lG);this.group.add(l.group);var u=function(e,t,n){var i;i=e?Ih(e&&e.dimensions,function(e){return bh(bh({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var r=new FE(i,n),o=new FE(i,n),a=new FE([],n),s=Ih(n.get("data"),Nh(nJ,t,e,n));e&&(s=kh(s,Nh(oJ,e)));var l=XK(!!e,i);return r.initData(Ih(s,function(e){return e[0]}),null,l),o.initData(Ih(s,function(e){return e[1]}),null,l),a.initData(Ih(s,function(e){return e[2]})),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,e,t),c=u.from,d=u.to,h=u.line;tJ(t).from=c,tJ(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),g=t.get("symbolRotate"),m=t.get("symbolOffset");function v(t,n,r){var o=t.getItemModel(n);aJ(t,n,r,e,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=ck(a,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Yh(o.get("symbolOffset",!0),m[r?0:1]),symbolRotate:Yh(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:Yh(o.get("symbolSize"),f[r?0:1]),symbol:Yh(o.get("symbol",!0),p[r?0:1]),style:s})}Lh(p)||(p=[p,p]),Lh(f)||(f=[f,f]),Lh(g)||(g=[g,g]),Lh(m)||(m=[m,m]),u.from.each(function(e){v(c,e,!0),v(d,e,!1)}),h.each(function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})}),l.updateData(h),u.line.eachItemGraphicEl(function(e){V_(e).dataModel=t,e.traverse(function(e){V_(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(KK);var lJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,i){return new t(e,n,i)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(BK),uJ=vy(),cJ=function(e,t,n,i){var r=i[0],o=i[1];if(r&&o){var a=UK(e,r),s=UK(e,o),l=a.coord,u=s.coord;l[0]=Uh(l[0],-1/0),l[1]=Uh(l[1],-1/0),u[0]=Uh(u[0],1/0),u[1]=Uh(u[1],1/0);var c=_h([{},a,s]);return c.coord=[a.coord,s.coord],c.x0=a.x,c.y0=a.y,c.x1=s.x,c.y1=s.y,c}};function dJ(e){return!isNaN(e)&&!isFinite(e)}function hJ(e,t,n,i){var r=1-e;return dJ(t[r])&&dJ(n[r])}function pJ(e,t){var n=t.coord[0],i=t.coord[1],r={coord:n,x:t.x0,y:t.y0},o={coord:i,x:t.x1,y:t.y1};return KO(e,"cartesian2d")?!(!n||!i||!hJ(1,n,i)&&!hJ(0,n,i))||function(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!GK(t)&&!GK(n))||e.containZone(t.coord,n.coord)}(e,r,o):ZK(e,r)||ZK(e,o)}function fJ(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=Sv(s.get(n[0]),r.getWidth()),u=Sv(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=e.getValues(["x0","y0"],t),d=e.getValues(["x1","y1"],t),h=a.clampData(c),p=a.clampData(d),f=[];"x0"===n[0]?f[0]=h[0]>p[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],o=i.getMarkerPosition(f,n,!0)}else{var g=[y=e.get(n[0],t),x=e.get(n[1],t)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(KO(a,"cartesian2d")){var m=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),x=e.get(n[1],t);dJ(y)?o[0]=m.toGlobalCoord(m.getExtent()["x0"===n[0]?0:1]):dJ(x)&&(o[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var gJ=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],mJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=BK.getMarkerModelFromSeries(e,"markArea");if(t){var i=t.getData();i.each(function(t){var r=Ih(gJ,function(r){return fJ(i,t,r,e,n)});i.setItemLayout(t,r),i.getItemGraphicEl(t).setShape("points",r)})}},this)},t.prototype.renderSeries=function(e,t,n,i){var r=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new mv});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){var i,r,o=["x0","y0","x1","y1"];if(e){var a=Ih(e&&e.dimensions,function(e){var n=t.getData();return bh(bh({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});r=Ih(o,function(e,t){return{name:e,type:a[t%2].type}}),i=new FE(r,n)}else i=new FE(r=[{name:"value",type:"float"}],n);var s=Ih(n.get("data"),Nh(cJ,t,e,n));e&&(s=kh(s,Nh(pJ,e)));var l=e?function(e,t,n,i){return rI(e.coord[Math.floor(i/2)][i%2],r[i])}:function(e,t,n,i){return rI(e.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,e,t);t.setData(u),u.each(function(t){var n=Ih(gJ,function(n){return fJ(u,t,n,e,i)}),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),d=[o.parse(u.get("x0",t)),o.parse(u.get("x1",t))],h=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];Tv(d),Tv(h);var p=!!(l[0]>d[1]||l[1]<d[0]||c[0]>h[1]||c[1]<h[0]);u.setItemLayout(t,{points:n,allClipped:p});var f=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=ck(a,"color");f.fill||(f.fill=g,Oh(f.fill)&&(f.fill=Og(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(uJ(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new Tw({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var i=uJ(l).data.getItemGraphicEl(n),r=u.getItemLayout(e);r.allClipped?i&&l.group.remove(i):(i?Jw(i,{shape:{points:r.points}},t,e):i=new Tw({shape:{points:r.points}}),u.setItemGraphicEl(e,i),l.group.add(i))}).remove(function(e){var t=uJ(l).data.getItemGraphicEl(e);l.group.remove(t)}).execute(),u.eachItemGraphicEl(function(e,n){var i=u.getItemModel(n),r=u.getItemVisual(n,"style");e.useStyle(u.getItemVisual(n,"style")),OC(e,RC(i),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:Oh(r.fill)?Og(r.fill,1):"#000"}),Nb(e,i),Db(e,null,null,i.get(["emphasis","disabled"])),V_(e).dataModel=t}),uJ(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(KK);var vJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Lh(t)&&Th(t,function(e,i){Oh(e)&&(e={type:e}),t[i]=xh(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),t=!0;break}}!t&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(i){var r,o=i.name;if(n.push(o),i.legendVisualProvider){var a=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(a)),a.length?t=t.concat(a):r=!0}else r=!0;r&&fy(i)&&t.push(i.name)}),this._availableNames=n;var i=this.get("data")||t,r=rp(),o=Ih(i,function(e){return(Oh(e)||Fh(e))&&(e={name:e}),r.get(e.name)?null:(r.set(e.name,!0),new oS(e,this,this.ecModel))},this);this._data=kh(o,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&Th(this._data,function(e){t[e.get("name")]=!1});t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;Th(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;Th(e,function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Ch(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(fM),yJ=Nh,xJ=Th,_J=mv,bJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Kd(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new _J),this.group.add(this._selectorGroup=new _J),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var r=e.get("align"),o=e.get("orient");r&&"auto"!==r||(r="right"===e.get("left")&&"vertical"===o?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=sM(l,u,c),h=this.layoutInner(e,r,d,i,a,s),p=sM(wh({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=$q(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,i,r,o,a){var s=this.getContentGroup(),l=rp(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){!e.get("legendHoverLink")&&c.push(e.id)}),xJ(t.getData(),function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new _J;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(h,a,o,r,t,e,f,m,g,u,i);v.on("click",yJ(wJ,a,null,i,c)).on("mouseover",yJ(SJ,h.name,null,i,c)).on("mouseout",yJ(MJ,h.name,null,i,c)),n.ssr&&v.eachChild(function(e){var t=V_(e);t.seriesIndex=h.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}else n.eachRawSeries(function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),g=Ag(p.fill);g&&0===g[3]&&(g[3]=.2,p=bh(bh({},p),{fill:Rg(g,"rgba")}));var m=this._createItem(s,a,o,r,t,e,{},p,f,u,i);m.on("click",yJ(wJ,null,a,i,c)).on("mouseover",yJ(SJ,null,a,i,c)).on("mouseout",yJ(MJ,null,a,i,c)),n.ssr&&m.eachChild(function(e){var t=V_(e);t.seriesIndex=s.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}},this);"production"!==process.env.NODE_ENV&&l.get(a)}},this),r&&this._createSelector(r,t,i,o,a)},t.prototype._createSelector=function(e,t,n,i,r){var o=this.getSelectorGroup();xJ(e,function(e){var i=e.type,r=new T_({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});o.add(r),OC(r,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Ib(r)})},t.prototype._createItem=function(e,t,n,i,r,o,a,s,l,u,c){var d=e.visualDrawType,h=r.get("itemWidth"),p=r.get("itemHeight"),f=r.isSelected(t),g=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),v=i.get("icon"),y=function(e,t,n,i,r,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),xJ(e,function(n,i){"inherit"===e[i]&&(e[i]=t[i])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=0===e.lastIndexOf("empty",0)?"fill":"stroke",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?Qk(d,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[c]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===p.stroke&&(p.stroke=i.fill),!o){var f=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",i,a,s,d,f,c),x=new _J,_=i.getModel("textStyle");if(!Ph(e.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(function(e){var t=e.icon||"roundRect",n=Tk(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:l,iconRotate:b,itemStyle:y.itemStyle,symbolKeepAspect:m}))}else x.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));var w="left"===o?h+5:-5,C=o,S=r.get("formatter"),M=t;Oh(S)&&S?M=S.replace("{name}",null!=t?t:""):Ph(S)&&(M=S(t));var T=f?_.getTextColor():i.get("inactiveColor");x.add(new T_({style:FC(_,{text:M,x:w,y:p/2,fill:T,align:C,verticalAlign:"middle"},{inheritColor:T})}));var I=new C_({shape:x.getBoundingRect(),style:{fill:"transparent"}}),D=i.getModel("tooltip");return D.get("show")&&DC({el:I,componentModel:r,itemName:t,itemTooltipOption:D.option}),x.add(I),x.eachChild(function(e){e.silent=!0}),I.silent=!u,this.getContentGroup().add(x),Ib(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();aM(e.get("orient"),a,e.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){aM("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===o?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[g]/2-c[g]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+h+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+d[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(cD);function wJ(e,t,n,i){MJ(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),SJ(e,t,n,i)}function CJ(e){for(var t,n=e.getZr().storage.getDisplayList(),i=0,r=n.length;i<r&&!(t=n[i].states.emphasis);)i++;return t&&t.hoverLayer}function SJ(e,t,n,i){CJ(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function MJ(e,t,n,i){CJ(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}function TJ(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function IJ(e,t,n){var i="allSelect"===e||"inverseSelect"===e,r={},o=[];n.eachComponent({mainType:"legend",query:t},function(n){i?n[e]():n[e](t.name),DJ(n,r),o.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(e){Th(r,function(t,n){e[t?"select":"unSelect"](n)}),DJ(e,a)}),i?{selected:a,legendIndex:o}:{name:t.name,selected:a}}function DJ(e,t){var n=t||{};return Th(e.getData(),function(t){var i=t.get("name");if("\n"!==i&&""!==i){var r=e.isSelected(i);lp(n,i)?n[i]=n[i]&&r:n[i]=r}}),n}function kJ(e){e.registerComponentModel(vJ),e.registerComponentView(bJ),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,TJ),e.registerSubTypeDefaulter("legend",function(){return"plain"}),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Nh(IJ,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Nh(IJ,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Nh(IJ,"inverseSelect")),e.registerAction("legendSelect","legendselected",Nh(IJ,"select")),e.registerAction("legendUnSelect","legendunselected",Nh(IJ,"unSelect"))}(e)}var AJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,i){var r=dM(t);e.prototype.init.call(this,t,n,i),EJ(this,t,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),EJ(this,this.option,t)},t.type="legend.scroll",t.defaultOption=lS(vJ.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(vJ);function EJ(e,t,n){var i=[1,1];i[e.getOrient().index]=0,cM(t,n,{type:"box",ignoreSize:!!i})}var NJ=mv,LJ=["width","height"],PJ=["x","y"],OJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return Kd(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new NJ),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new NJ)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,i,r,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,i,r,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),d=Lh(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var i=e+"DataIndex",o=SC(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Eh(l._pageGo,l,i,n,r)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});o.name=e,u.add(o)}u.add(new T_({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,i,r,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=LJ[s],u=PJ[s],c=LJ[1-s],d=PJ[1-s];r&&aM("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=yh(n);r&&(g[l]=n[l]-p[l]-h);var m=this._layoutContentAndController(e,i,g,s,l,c,d,u);if(r){if("end"===o)f[s]+=m[l]+h;else{var v=p[l]+h;f[s]-=v,m[u]-=v}m[l]+=p[l]+h,f[1-s]+=m[d]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[d]=Math.min(m[d],p[d]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,i,r,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;aM(e.get("orient"),l,e.get("itemGap"),i?n.width:null,i?null:n.height),aM("horizontal",c,e.get("pageButtonItemGap",!0));var d=l.getBoundingRect(),h=c.getBoundingRect(),p=this._showController=d[r]>n[r],f=[-d.x,-d.y];t||(f[i]=l[s]);var g=[0,0],m=[-h.x,-h.y],v=Yh(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?m[i]+=n[r]-h[r]:g[i]+=h[r]+v);m[1-i]+=d[o]/2-h[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[r]=p?n[r]:d[r],y[o]=Math.max(d[o],h[o]),y[a]=Math.min(0,h[a]+m[1-i]),u.__rectSize=n[r],p){var x={x:0,y:0};x[r]=Math.max(n[r]-h[r]-v,0),x[o]=y[o],u.setClipPath(new C_({shape:x})),u.__rectSize=x[r]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(e);return null!=_.pageIndex&&Jw(l,{x:_.contentPosition[0],y:_.contentPosition[1]},p?e:null),this._updatePageInfoView(e,_),y},t.prototype._pageGo=function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;Th(["pagePrev","pageNext"],function(i){var r=null!=t[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")});var i=n.childOfName("pageText"),r=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;i&&r&&i.setStyle("text",Oh(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=e.getOrient().index,o=LJ[r],a=PJ[r],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=g.i),++h.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=g.i),++h.pageCount,++h.pageIndex),g=v;return h;function y(e){if(e){var t=e.getBoundingRect(),n=t[a]+e[a];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+i}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild(function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===e&&(t=r)}),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(bJ);function RJ(e){cE(kJ),e.registerComponentModel(AJ),e.registerComponentView(OJ),function(e){e.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(e){e.setScrollDataIndex(n)})})}(e)}var FJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="dataZoom.inside",t.defaultOption=lS(Lq.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Lq),zJ=vy();function VJ(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function BJ(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function jJ(e,t,n,i){return e.coordinateSystem.containPoint([n,i])}function GJ(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=zJ(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=rp());i.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){Th(Eq(e).infoList,function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(e,t){var n={model:t,containsPoint:Nh(jJ,t),dispatchAction:Nh(BJ,e),dataZoomInfoMap:null,controller:null},i=n.controller=new _z(e.getZr());return Th(["pan","zoom","scrollMove"],function(e){i.on(e,function(t){var i=[];n.dataZoomInfoMap.each(function(r){if(t.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[e],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}}),i.length&&n.dispatchAction(i)})}),n}(t,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=rp())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),i.each(function(e){var t,n=e.controller,r=e.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(t=r.get(o))}if(t){var a=function(e){var t,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return e.each(function(e){var o=e.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+t]&&(t=a),r=r&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),SD(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else VJ(i,e)})})}var WJ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Kd(t,e),t.prototype.render=function(t,n,i){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){zJ(e).coordSysRecordMap.each(function(e){var i=e.dataZoomInfoMap.get(t.uid);i&&(i.getRange=n)})}(i,t,{pan:Eh(HJ.pan,this),zoom:Eh(HJ.zoom,this),scrollMove:Eh(HJ.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=zJ(e).coordSysRecordMap,i=n.keys(),r=0;r<i.length;r++){var o=i[r],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||VJ(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Rq),HJ={zoom:function(e,t,n,i){var r=this.range,o=r.slice(),a=e.axisModels[0];if(a){var s=YJ[t](null,[i.originX,i.originY],a,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return nW(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:UJ(function(e,t,n,i,r,o){var a=YJ[i]([o.oldX,o.oldY],[o.newX,o.newY],t,r,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:UJ(function(e,t,n,i,r,o){return YJ[i]([0,0],[o.scrollDelta,o.scrollDelta],t,r,n).signal*(e[1]-e[0])*o.scrollDelta})};function UJ(e){return function(t,n,i,r){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return nW(e(a,s,t,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var YJ={grid:function(e,t,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(e,t,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(a.pixel=t[0]-e[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(e,t,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===o.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function ZJ(e){Wq(e),e.registerComponentModel(FJ),e.registerComponentView(WJ),GJ(e)}var XJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=lS(Lq.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(Lq),qJ=C_,$J="horizontal",KJ="vertical",JJ=["line","bar","candlestick","scatter"],QJ={easing:"cubicOut",duration:100,delay:0},eQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Kd(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Eh(this._onBrush,this),this._onBrushEnd=Eh(this._onBrushEnd,this)},t.prototype.render=function(t,n,i,r){if(e.prototype.render.apply(this,arguments),SD(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){MD(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new mv;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:t.getWidth(),height:t.getHeight()},o=this._orient===$J?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=dM(e.option);Th(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=o[e])});var s=sM(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===KJ&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==$J||r?n===$J&&r?{scaleY:a?1:-1,scaleX:-1}:n!==KJ||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=e.getBoundingRect([o]);e.x=t.x-s.x,e.y=t.y-s.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new qJ({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var r=new qJ({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Eh(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],i=e.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=r.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],g=[],m=p[1]/(r.count()-1),v=0,y=Math.round(r.count()/t[0]);r.each([a],function(e,t){if(y>0&&t%y)v+=m;else{var n=null==e||isNaN(e)||""===e,i=n?0:Cv(e,u,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&d&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,d=n}}),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new mv,i=new Tw({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Dw({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis(function(r,o){Th(e.getAxisProxy(r,o).getTargetSeriesModels(),function(e){if(!(n||!0!==t&&Ch(JJ,e.get("type"))<0)){var a,s=i.getComponent(kq(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:r,otherDim:l,otherAxisInverse:a}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],i=t.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new qJ({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new qJ({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),Th([0,1],function(t){var o=a.get("handleIcon");!Ck[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o,"production"!==process.env.NODE_ENV&&$v("handleIcon now needs 'path://' prefix when using a path string"));var s=Tk(o,-1,0,2,2,null,!0);s.attr({cursor:tQ(this._orient),draggable:!0,drift:Eh(this._onDragMove,this,t),ondragend:Eh(this._onDragEnd,this),onmouseover:Eh(this._showDataInfo,this,!0),onmouseout:Eh(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Sv(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Ib(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[t]=s);var d=a.getModel("textStyle"),h=(a.get("handleLabel")||{}).show||!1;e.add(i[t]=new T_({silent:!0,invisible:!h,style:FC(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=c;if(u){var h=Sv(a.get("moveHandleSize"),o[1]),p=t.moveHandle=new C_({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:h}}),f=.8*h,g=t.moveHandleIcon=Tk(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(h,10));(d=t.moveZone=new C_({invisible:!0,shape:{y:o[1]-m,height:h+m}})).on("mouseover",function(){s.enterEmphasis(p)}).on("mouseout",function(){s.leaveEmphasis(p)}),r.add(p),r.add(g),r.add(d)}d.attr({draggable:!0,cursor:tQ(this._orient),drift:Eh(this._onDragMove,this,"all"),ondragstart:Eh(this._showDataInfo,this,!0),ondragend:Eh(this._onDragEnd,this),onmouseover:Eh(this._showDataInfo,this,!0),onmouseout:Eh(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Cv(e[0],[0,100],t,!0),Cv(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];nW(t,i,r,n.get("zoomLock")?"all":e,null!=o.minSpan?Cv(o.minSpan,a,r,!0):null,null!=o.maxSpan?Cv(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Tv([Cv(i[0],r,a,!0),Cv(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,i=Tv(n.slice()),r=this._size;Th([0,1],function(e){var i=t.handles[e],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:r[1]/2-o/2})},this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=t.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new C_,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:r[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,r=this._orient,o=["",""];if(t.get("showDetail")){var a=t.findRepresentativeAxisProxy();if(a){var s=a.getAxisModel().axis,l=this._range,u=e?a.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:a.getDataValueWindow();o=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=Tv(this._handleEnds.slice());function d(e){var t=yC(n.handles[e].parent,this.group),a=_C(0===e?"right":"left",t),s=this._handleWidth/2+5,l=xC([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],verticalAlign:r===$J?"middle":a,align:r===$J?a:"center",text:o[e]})}d.call(this,0),d.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),r=n.get("labelPrecision");null!=r&&"auto"!==r||(r=t.getPixelPrecision());var o=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(r,20));return Ph(i)?i(e,o):Oh(i)?i.replace("{value}",o):o},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,i=e||this._dragging?n:t,r=this._displayables,o=r.handleLabels;o[0].attr("invisible",!i),o[1].attr("invisible",!i),r.moveHandle&&this.api[i?"enterEmphasis":"leaveEmphasis"](r.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,i){this._dragging=!0,$p(i.event);var r=xC([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,r[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new cf(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Tv([Cv(n.x,i,r,!0),Cv(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&($p(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new qJ({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?QJ:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Eq(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),r=this.api.getHeight();e={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return e},t.type="dataZoom.slider",t}(Rq);function tQ(e){return"vertical"===e?"ns-resize":"ew-resize"}function nQ(e){e.registerComponentModel(XJ),e.registerComponentView(eQ),Wq(e)}var iQ=function(e,t,n){var i=yh((rQ[e]||{})[t]);return n&&Lh(i)?i[i.length-1]:i},rQ={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},oQ=XB.mapVisual,aQ=XB.eachVisual,sQ=Lh,lQ=Th,uQ=Tv,cQ=Cv,dQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return Kd(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&oK(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=Eh(e,this),this.controllerVisuals=rK(this.option.controller,t,e),this.targetVisuals=rK(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries(function(e,n){t.push(n)}):t=iy(e),t},t.prototype.eachTargetSeries=function(e,t){Th(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(t,i)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],Lh(e)&&(e=e.slice(),i=!0);var l=t?e:i?[u(e[0]),u(e[1])]:u(e);return Oh(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):Ph(s)?i?s(e[0],e[1]):s(e):i?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=uQ([e.min,e.max]);this._dataExtent=t},t.prototype.getDataDimensionIndex=function(e){var t=this.option.dimension;if(null!=t)return e.getDimensionIndex(t);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=e.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),r=t.controller||(t.controller={});xh(i,n),xh(r,n);var o=this.isCategory();function a(n){sQ(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,i),a.call(this,r),function(e,t,n){var i=e[t],r=e[n];i&&!r&&(r=e[n]={},lQ(i,function(e,t){if(XB.isValidType(t)){var n=iQ(t,"inactive",o);null!=n&&(r[t]=n,"color"!==t||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}}))}.call(this,i,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";lQ(this.stateList,function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=t&&yh(t)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&yh(n)||(o?s[0]:[s[0],s[0]])),l.symbol=oQ(l.symbol,function(e){return"none"===e?r:e});var u=l.symbolSize;if(null!=u){var c=-1/0;aQ(u,function(e){e>c&&(c=e)}),l.symbolSize=oQ(u,function(e){return cQ(e,[0,c],[0,s[0]],!0)})}},this)}.call(this,r)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(fM),hQ=[20,140],pQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=hQ[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=hQ[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Lh(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),Th(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Tv((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)},this),t.push({seriesId:n.id,dataIndex:i})},this),t},t.prototype.getVisualMeta=function(e){var t=fQ(this,"outOfRange",this.getExtent()),n=fQ(this,"inRange",this.option.range.slice()),i=[];function r(t,n){i.push({value:t,color:e(t,n)})}for(var o=0,a=0,s=n.length,l=t.length;a<l&&(!n.length||t[a]<=n[0]);a++)t[a]<n[o]&&r(t[a],"outOfRange");for(var u=1;o<s;o++,u=0)u&&i.length&&r(n[o],"outOfRange"),r(n[o],"inRange");for(u=1;a<l;a++)(!n.length||n[n.length-1]<t[a])&&(u&&(i.length&&r(i[i.length-1].value,"outOfRange"),u=0),r(t[a],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=lS(dQ.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),t}(dQ);function fQ(e,t,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,r=n[0],o=[],a=0;a<=200&&r<n[1];a++)o.push(r),r+=i;return o.push(n[1]),o}var gQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return Kd(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,i){this.visualMapModel=e,!1!==e.get("show")?this.doRender(e,t,n,i):this.group.removeAll()},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=qS(t.get("padding")||0),i=e.getBoundingRect();e.add(new C_({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var i=(n=n||{}).forceState,r=this.visualMapModel,o={};if("color"===t){var a=r.get("contentColor");o.color=a}function s(e){return o[e]}function l(e,t){o[e]=t}var u=r.controllerVisuals[i||r.getValueState(e)];return Th(XB.prepareVisualTypes(u),function(i){var r=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",r=u.__alphaForOpacity),XB.dependsOn(i,t)&&r&&r.applyVisual(e,s,l)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;lM(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,i){},t.type="visualMap",t}(cD),mQ=[["left","right","width"],["top","bottom","height"]];function vQ(e,t,n){var i=e.option,r=i.align;if(null!=r&&"auto"!==r)return r;for(var o={width:t.getWidth(),height:t.getHeight()},a="horizontal"===i.orient?1:0,s=mQ[a],l=[0,null,10],u={},c=0;c<3;c++)u[mQ[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:i[s[c]];var d=[["x","width",3],["y","height",0]][a],h=sM(u,o,i.padding);return s[(h.margin[d[2]]||0)+h[d[0]]+.5*h[d[1]]<.5*o[d[1]]?0:1]}function yQ(e,t){return Th(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var xQ=Cv,_Q=Th,bQ=Math.min,wQ=Math.max,CQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return Kd(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Eh(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Eh(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var i=t[1-n];i=null!=i?i+"":"";var r=this.visualMapModel,o=r.get("textGap"),a=r.itemSize,s=this._shapes.mainGroup,l=this._applyTransform([a[0]/2,0===n?-o:a[1]+o],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new T_({style:FC(d,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:i})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,i=t.itemSize,r=this._orient,o=this._useHandle,a=vQ(t,this.api,i),s=n.mainGroup=this._createBarGroup(a),l=new mv;s.add(l),l.add(n.outOfRange=SQ()),l.add(n.inRange=SQ(null,o?TQ(this._orient):null,Eh(this._dragHandle,this,"all",!1),Eh(this._dragHandle,this,"all",!0))),l.setClipPath(new C_({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=wQ(u.width,u.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,i,c,r),this._createHandle(t,s,1,i,c,r)),this._createIndicator(t,s,i,c,r),e.add(s)},t.prototype._createHandle=function(e,t,n,i,r,o){var a=Eh(this._dragHandle,this,n,!1),s=Eh(this._dragHandle,this,n,!0),l=rv(e.get("handleSize"),i[0]),u=Tk(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=TQ(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){$p(e.event)}}),u.x=i[0]/2,u.useStyle(e.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),Lb(u,!0),t.add(u);var d=this.visualMapModel.textStyleModel,h=new T_({cursor:c,draggable:!0,drift:a,onmousemove:function(e){$p(e.event)},ondragend:s,style:FC(d,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var p=[l,0],f=this._shapes;f.handleThumbs[n]=u,f.handleLabelPoints[n]=p,f.handleLabels[n]=h},t.prototype._createIndicator=function(e,t,n,i,r){var o=rv(e.get("indicatorSize"),n[0]),a=Tk(e.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel("indicatorStyle").getItemStyle();if(a instanceof m_){var l=a.style;a.useStyle(bh({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},s))}else a.useStyle(s);t.add(a);var u=this.visualMapModel.textStyleModel,c=new T_({silent:!0,invisible:!0,style:FC(u,{x:0,y:0,text:""})});this.group.add(c);var d=[("horizontal"===r?i/2:6)+n[0]/2,0],h=this._shapes;h.indicator=a,h.indicatorLabel=c,h.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,i){if(this._useHandle){if(this._dragging=!t,!t){var r=this._applyTransform([n,i],this._shapes.mainGroup,!0);this._updateInterval(e,r[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():MQ(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[xQ(t[0],n,i,!0),xQ(t[1],n,i,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,i=this._handleEnds,r=[0,n.itemSize[1]];nW(t,i,r,e,0);var o=n.getExtent();this._dataInterval=[xQ(i[0],r,o,!0),xQ(i[1],r,o,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),i=this._shapes,r=[0,t.itemSize[1]],o=e?r:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,r,"outOfRange");i.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),i.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(o,a)},t.prototype._createBarVisual=function(e,t,n,i){var r={forceState:i,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,r),a=[this.getControllerVisual(e[0],"symbolSize",r),this.getControllerVisual(e[1],"symbolSize",r)],s=this._createBarPoints(n,a);return{barColor:new Bw(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],i=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var r=1;r<100;r++){var o=e[0]+i*r;if(o>e[1])break;n.push({color:this.getControllerVisual(o,"color",t),offset:r/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new mv("horizontal"!==t||n?"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"!==t||n?{scaleX:"left"===e?1:-1}:{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent(),l=this._applyTransform("left",n.mainGroup);_Q([0,1],function(u){var c=r[u];c.setStyle("fill",t.handlesColor[u]),c.y=e[u];var d=xQ(e[u],[0,a[1]],s,!0),h=this.getControllerVisual(d,"symbolSize");c.scaleX=c.scaleY=h/a[0],c.x=a[0]-h/2;var p=xC(n.handleLabelPoints[u],yC(c,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(a[0]-h)/2:(a[0]-h)/-2;p[1]+=f}o[u].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[u]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=xQ(e,o,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=xC(l.indicatorLabelPoint,yC(u,this.group)),m=l.indicatorLabel;m.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;m.setStyle({text:(n||"")+r.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var x={x:p,y:h,style:{fill:c}},_={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),m.animateTo(_,b)}else u.attr(x),m.attr(_);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var C=0;C<w.length;C++)this.api.enterBlur(w[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);i[1]=bQ(wQ(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var r=[0,i[1]],o=n.getExtent();e=bQ(wQ(r[0],e),r[1]);var a=function(e,t,n){var i=6,r=e.get("hoverLinkDataSize");r&&(i=xQ(r,t,n,!0)/2);return i}(n,o,r),s=[e-a,e+a],l=xQ(e,r,o,!0),u=[xQ(s[0],r,o,!0),xQ(s[1],r,o,!0)];s[0]<r[0]&&(u[0]=-1/0),s[1]>r[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||MQ(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},i={};return r(e||[],n),r(t||[],i,n),[o(n),o(i)];function r(e,t,n){for(var i=0,r=e.length;i<r;i++){var o=dy(e[i].seriesId,null);if(null==o)return;for(var a=iy(e[i].dataIndex),s=n&&n[o],l=0,u=a.length;l<u;l++){var c=a[l];s&&s[c]?s[c]=null:(t[o]||(t[o]={}))[c]=1}}}function o(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var r=o(e[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}}(c,d);this._dispatchHighDown("downplay",yQ(h[0],n)),this._dispatchHighDown("highlight",yQ(h[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(fk(e.target,function(e){var n=V_(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var r=n.getData(t.dataType),o=r.getStore().get(i.getDataDimensionIndex(r),t.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",yQ(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,i){var r=yC(t,i?null:this.group);return Lh(e)?xC(e,r,n):_C(e,r,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(gQ);function SQ(e,t,n,i){return new Tw({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){$p(e.event)},ondragend:i})}function MQ(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function TQ(e){return"vertical"===e?"ns-resize":"ew-resize"}var IQ={type:"selectDataRange",event:"dataRangeSelected",update:"update"},DQ=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},kQ=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var i,r,o,a,s,l=e.pipelineContext;!t.isTargetSeries(e)||l&&l.large||n.push((i=t.stateList,r=t.targetVisuals,o=Eh(t.getValueState,t),a=t.getDataDimensionIndex(e.getData()),s={},Th(i,function(e){var t=XB.prepareVisualTypes(r[e]);s[e]=t}),{progress:function(e,t){var n,i;function l(e){return uk(t,i,e)}function u(e,n){dk(t,i,e,n)}null!=a&&(n=t.getDimensionIndex(a));for(var c=t.getStore();null!=(i=e.next());){var d=t.getRawDataItem(i);if(!d||!1!==d.visualMap)for(var h=null!=a?c.get(n,i):i,p=o(h),f=r[p],g=s[p],m=0,v=g.length;m<v;m++){var y=g[m];f[y]&&f[y].applyVisual(h,l,u)}}}}))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),i=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var r=t.getVisualMeta(Eh(AQ,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(r.dimension=o,i.push(r))}}),e.getData().setVisual("visualMeta",i)}}];function AQ(e,t,n,i){for(var r=t.targetVisuals[i],o=XB.prepareVisualTypes(r),a={color:ck(e.getData(),"color")},s=0,l=o.length;s<l;s++){var u=o[s],c=r["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,d,h)}return a.color;function d(e){return a[e]}function h(e,t){a[e]=t}}var EQ=Th;function NQ(e){var t=e&&e.visualMap;Lh(t)||(t=t?[t]:[]),EQ(t,function(e){if(e){LQ(e,"splitList")&&!LQ(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Lh(t)&&EQ(t,function(e){zh(e)&&(LQ(e,"start")&&!LQ(e,"min")&&(e.min=e.start),LQ(e,"end")&&!LQ(e,"max")&&(e.max=e.end))})}})}function LQ(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var PQ=!1;function OQ(e){PQ||(PQ=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(IQ,DQ),Th(kQ,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(NQ))}function RQ(e){e.registerComponentModel(pQ),e.registerComponentView(CQ),OQ(e)}var FQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return Kd(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],zQ[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var r=this.option.categories;this.resetVisual(function(e,t){"categories"===i?(e.mappingMethod="category",e.categories=yh(r)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Ih(this._pieceList,function(e){return e=yh(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},i=XB.listVisualTypes(),r=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}Th(t.pieces,function(e){Th(i,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),Th(n,function(e,n){var i=!1;Th(this.stateList,function(e){i=i||o(t,e,n)||o(t.target,e,n)},this),!i&&Th(this.stateList,function(e){(t[e]||(t[e]={}))[n]=iQ(n,"inRange"===e?"active":"inactive",r)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,i=this._pieceList,r=(t?n:e).selected||{};if(n.selected=r,Th(i,function(e,t){var n=this.getSelectedMapKey(e);r.hasOwnProperty(n)||(r[n]=!0)},this),"single"===n.selectedMode){var o=!1;Th(i,function(e,t){var n=this.getSelectedMapKey(e);r[n]&&(o?r[n]=!1:o=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=yh(e)},t.prototype.getValueState=function(e){var t=XB.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(t,i){XB.findPieceIndex(t,n)===e&&r.push(i)},this),t.push({seriesId:i.id,dataIndex:r})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return Th(r,function(e){var t=e.interval;t&&(t[0]>a&&s([a,t[0]],"outOfRange"),s(t.slice()),a=t[1])},this),{stops:t,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=e(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:t.push({value:r[0],color:s},{value:r[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=lS(dQ.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(dQ),zQ={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),i=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a<r;s+=o,a++){var l=a===r-1?i[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[i[1],1/0],close:[0,0]}),Vv(e),Th(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;Th(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),VQ(t,e)},pieces:function(e){var t=this.option;Th(t.pieces,function(t,n){zh(t)||(t={value:t});var i={text:"",index:n};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var r=i.value=t.value;i.interval=[r,r],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var d=[["gte","gt","min"],["lte","lt","max"]][c],h=0;h<3&&null==o[c];h++)o[c]=t[d[h]],a[c]=s[h],u[c]=2===h;null==o[c]&&(o[c]=l[c])}u[0]&&o[1]===1/0&&(a[0]=0),u[1]&&o[0]===-1/0&&(a[1]=0),"production"!==process.env.NODE_ENV&&(o[0],o[1]),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=XB.retrieveVisuals(t),e.push(i)},this),VQ(t,e),Vv(e),Th(e,function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)},this)}};function VQ(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var BQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Kd(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=Uh(t.get("showLabel",!0),!u),d=!t.get("selectedMode");u&&this._renderEndsText(e,u[0],s,c,a),Th(l.viewPieceList,function(i){var l=i.piece,u=new mv;u.onclick=Eh(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]],d),c){var p=this.visualMapModel.getValueState(h);u.add(new T_({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1},silent:d}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],s,c,a),aM(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(e){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:e,batch:yQ(i.findTargetDataIndices(t),i)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return vQ(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,i,r){if(t){var o=new mv,a=this.visualMapModel.textStyleModel;o.add(new T_({style:FC(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=Ih(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),i=e.get("orient"),r=e.get("inverse");return("horizontal"===i?r:!r)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,i){var r=Tk(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color"));r.silent=i,e.add(r)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,i=n.selectedMode;if(i){var r=yh(n.selected),o=t.getSelectedMapKey(e);"single"===i||!0===i?(r[o]=!0,Th(r,function(e,t){r[t]=t===o})):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},t.type="visualMap.piecewise",t}(gQ);function jQ(e){e.registerComponentModel(FQ),e.registerComponentView(BQ),OQ(e)}var GQ={label:{enabled:!0},decal:{show:!1}},WQ=vy(),HQ={};function UQ(e,t){var n=e.getModel("aria");if(n.get("enabled")){var i=yh(GQ);xh(i.label,e.getLocaleModel().get("aria"),!1),xh(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var t=rp();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),WQ(e).scope=n}}),e.eachRawSeries(function(t){if(!e.isSeriesFiltered(t))if(Ph(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var i=WM(t.ecModel,t.name,HQ,e.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=t.getRawData(),a={},s=WQ(t).scope;n.each(function(e){var t=n.getRawIndex(e);a[t]=e});var l=o.count();o.each(function(e){var i=a[e],r=o.getName(e)||e+"",c=WM(t.ecModel,r,s,l),d=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(d,c))})}}function u(e,t){var n=e?bh(bh({},t),e):t;return n.dirty=!0,n}})}}(),function(){var i=t.getZr().dom;if(!i)return;var o=e.getLocaleModel().get("aria"),a=n.getModel("label");if(a.option=wh(a.option,o),!a.get("enabled"))return;if(i.setAttribute("role","img"),a.get("description"))return void i.setAttribute("aria-label",a.get("description"));var s,l=e.getSeriesCount(),u=a.get(["data","maxCount"])||10,c=a.get(["series","maxCount"])||10,d=Math.min(l,c);if(l<1)return;var h=function(){var t=e.get("title");t&&t.length&&(t=t[0]);return t&&t.text}();s=h?r(a.get(["general","withTitle"]),{title:h}):a.get(["general","withoutTitle"]);var p=[];s+=r(l>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:l}),e.eachSeries(function(t,n){if(n<d){var i=void 0,o=t.get("name")?"withName":"withoutName";i=r(i=l>1?a.get(["series","multiple",o]):a.get(["series","single",o]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(_=t.subType,b=e.getLocaleModel().get(["series","typeNames"]),b[_]||b.chart)});var s=t.getData();if(s.count()>u)i+=r(a.get(["data","partialData"]),{displayCnt:u});else i+=a.get(["data","allData"]);for(var c=a.get(["data","separator","middle"]),h=a.get(["data","separator","end"]),f=a.get(["data","excludeDimensionId"]),g=[],m=0;m<s.count();m++)if(m<u){var v=s.getName(m),y=f?kh(s.getValues(m),function(e,t){return-1===Ch(f,t)}):s.getValues(m),x=a.get(["data",v?"withName":"withoutName"]);g.push(r(x,{name:v,value:y.join(c)}))}i+=g.join(c)+h,p.push(i)}var _,b});var f=a.getModel(["series","multiple","separator"]),g=f.get("middle"),m=f.get("end");s+=p.join(g)+m,i.setAttribute("aria-label",s)}()}function r(e,t){if(!Oh(e))return e;var n=e;return Th(t,function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)}),n}}function YQ(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},Th(["description","general","series","data"],function(e){null!=t[e]&&(t.label[e]=t[e])})}}var ZQ={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},XQ=function(){function e(e){if(null==(this._condVal=Oh(e)?new RegExp(e):Wh(e)?e:null)){var t="";"production"!==process.env.NODE_ENV&&(t=Jv("Illegal regexp",e,"in")),Qv(t)}}return e.prototype.evaluate=function(e){var t=typeof e;return Oh(t)?this._condVal.test(e):!!Fh(t)&&this._condVal.test(e+"")},e}(),qQ=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),$Q=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},e}(),KQ=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},e}(),JQ=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),QQ=function(){function e(){}return e.prototype.evaluate=function(){for(var e=!!this.valueParser,t=(0,this.getValue)(this.valueGetterParam),n=e?this.valueParser(t):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(e?n:t))return!1;return!0},e}();function e0(e,t){if(!0===e||!1===e){var n=new qQ;return n.value=e,n}var i="";return n0(e)||("production"!==process.env.NODE_ENV&&(i=Jv("Illegal config. Expect a plain object but actually",e)),Qv(i)),e.and?t0("and",e,t):e.or?t0("or",e,t):e.not?function(e,t){var n=e.not,i="";"production"!==process.env.NODE_ENV&&(i=Jv('"not" condition should only be `not: {}`.',"Illegal condition:",e));n0(n)||Qv(i);var r=new JQ;r.child=e0(n,t),r.child||Qv(i);return r}(e,t):function(e,t){for(var n="",i=t.prepareGetValue(e),r=[],o=Ah(e),a=e.parser,s=a?aI(a):null,l=0;l<o.length;l++){var u=o[l];if("parser"!==u&&!t.valueGetterAttrMap.get(u)){var c=lp(ZQ,u)?ZQ[u]:u,d=e[u],h=s?s(d):d,p=dI(c,h)||"reg"===c&&new XQ(h);p||("production"!==process.env.NODE_ENV&&(n=Jv('Illegal relational operation: "'+u+'" in condition:',e)),Qv(n)),r.push(p)}}r.length||("production"!==process.env.NODE_ENV&&(n=Jv("Relational condition must have at least one operator.","Illegal condition:",e)),Qv(n));var f=new QQ;return f.valueGetterParam=i,f.valueParser=s,f.getValue=t.getValue,f.subCondList=r,f}(e,t)}function t0(e,t,n){var i=t[e],r="";"production"!==process.env.NODE_ENV&&(r=Jv('"and"/"or" condition should only be `'+e+": [...]` and must not be empty array.","Illegal condition:",t)),Lh(i)||Qv(r),i.length||Qv(r);var o="and"===e?new $Q:new KQ;return o.children=Ih(i,function(e){return e0(e,n)}),o.children.length||Qv(r),o}function n0(e){return zh(e)&&!Mh(e)}var i0=function(){function e(e,t){this._cond=e0(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();var r0={type:"echarts:filter",transform:function(e){for(var t,n,i,r=e.upstream,o=(n=e.config,i={valueGetterAttrMap:rp({dimension:!0}),prepareGetValue:function(e){var t="",n=e.dimension;lp(e,"dimension")||("production"!==process.env.NODE_ENV&&(t=Jv('Relation condition must has prop "dimension" specified.',"Illegal condition:",e)),Qv(t));var i=r.getDimensionInfo(n);return i||("production"!==process.env.NODE_ENV&&(t=Jv("Can not find dimension info via: "+n+".\n","Existing dimensions: ",r.cloneAllDimensionInfo(),".\n","Illegal condition:",e,".\n")),Qv(t)),{dimIdx:i.index}},getValue:function(e){return r.retrieveValueFromItem(t,e.dimIdx)}},new i0(n,i)),a=[],s=0,l=r.count();s<l;s++)t=r.getRawDataItem(s),o.evaluate()&&a.push(t);return{data:a}}},o0="";"production"!==process.env.NODE_ENV&&(o0=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var a0={type:"echarts:sort",transform:function(e){var t=e.upstream,n=e.config,i="",r=iy(n);r.length||("production"!==process.env.NODE_ENV&&(i="Empty `config` in sort transform."),Qv(i));var o=[];Th(r,function(e){var n=e.dimension,r=e.order,a=e.parser,s=e.incomparable;if(null==n&&("production"!==process.env.NODE_ENV&&(i='Sort transform config must has "dimension" specified.'+o0),Qv(i)),"asc"!==r&&"desc"!==r&&("production"!==process.env.NODE_ENV&&(i='Sort transform config must has "order" specified.'+o0),Qv(i)),s&&"min"!==s&&"max"!==s){var l="";"production"!==process.env.NODE_ENV&&(l='incomparable must be "min" or "max" rather than "'+s+'".'),Qv(l)}if("asc"!==r&&"desc"!==r){var u="";"production"!==process.env.NODE_ENV&&(u='order must be "asc" or "desc" rather than "'+r+'".'),Qv(u)}var c=t.getDimensionInfo(n);c||("production"!==process.env.NODE_ENV&&(i=Jv("Can not find dimension info via: "+n+".\n","Existing dimensions: ",t.cloneAllDimensionInfo(),".\n","Illegal config:",e,".\n")),Qv(i));var d=a?aI(a):null;a&&!d&&("production"!==process.env.NODE_ENV&&(i=Jv("Invalid parser name "+a+".\n","Illegal config:",e,".\n")),Qv(i)),o.push({dimIdx:c.index,parser:d,comparator:new uI(r,s)})});var a=t.sourceFormat;a!==_M&&a!==bM&&("production"!==process.env.NODE_ENV&&(i='sourceFormat "'+a+'" is not supported yet'),Qv(i));for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(e,n){for(var i=0;i<o.length;i++){var r=o[i],a=t.retrieveValueFromItem(e,r.dimIdx),s=t.retrieveValueFromItem(n,r.dimIdx);r.parser&&(a=r.parser(a),s=r.parser(s));var l=r.comparator.evaluate(a,s);if(0!==l)return l}return 0}),{data:s}}};var s0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return Kd(t,e),t.prototype.init=function(t,n,i){e.prototype.init.call(this,t,n,i),this._sourceManager=new NI(this),LI(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),LI(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:MM},t}(fM),l0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return Kd(t,e),t.type="dataset",t}(cD);var u0=Hx.CMD;function c0(e,t){return Math.abs(e-t)<1e-5}function d0(e){var t,n,i,r,o,a=e.data,s=e.len(),l=[],u=0,c=0,d=0,h=0;function p(e,n){t&&t.length>2&&l.push(t),t=[e,n]}function f(e,n,i,r){c0(e,i)&&c0(n,r)||t.push(e,n,i,r,i,r)}function g(e,n,i,r,o,a){var s=Math.abs(n-e),l=4*Math.tan(s/4)/3,u=n<e?-1:1,c=Math.cos(e),d=Math.sin(e),h=Math.cos(n),p=Math.sin(n),f=c*o+i,g=d*a+r,m=h*o+i,v=p*a+r,y=o*l*u,x=a*l*u;t.push(f-y*d,g+x*c,m+y*p,v-x*h,m,v)}for(var m=0;m<s;){var v=a[m++],y=1===m;switch(y&&(d=u=a[m],h=c=a[m+1],v!==u0.L&&v!==u0.C&&v!==u0.Q||(t=[d,h])),v){case u0.M:u=d=a[m++],c=h=a[m++],p(d,h);break;case u0.L:f(u,c,n=a[m++],i=a[m++]),u=n,c=i;break;case u0.C:t.push(a[m++],a[m++],a[m++],a[m++],u=a[m++],c=a[m++]);break;case u0.Q:n=a[m++],i=a[m++],r=a[m++],o=a[m++],t.push(u+2/3*(n-u),c+2/3*(i-c),r+2/3*(n-r),o+2/3*(i-o),r,o),u=r,c=o;break;case u0.A:var x=a[m++],_=a[m++],b=a[m++],w=a[m++],C=a[m++],S=a[m++]+C;m+=1;var M=!a[m++];n=Math.cos(C)*b+x,i=Math.sin(C)*w+_,y?p(d=n,h=i):f(u,c,n,i),u=Math.cos(S)*b+x,c=Math.sin(S)*w+_;for(var T=(M?-1:1)*Math.PI/2,I=C;M?I>S:I<S;I+=T){g(I,M?Math.max(I+T,S):Math.min(I+T,S),x,_,b,w)}break;case u0.R:d=u=a[m++],h=c=a[m++],n=d+a[m++],i=h+a[m++],p(n,h),f(n,h,n,i),f(n,i,d,i),f(d,i,d,h),f(d,h,n,h);break;case u0.Z:t&&f(u,c,d,h),u=d,c=h}}return t&&t.length>2&&l.push(t),l}function h0(e,t,n,i,r,o,a,s,l,u){if(c0(e,n)&&c0(t,i)&&c0(r,a)&&c0(o,s))l.push(a,s);else{var c=2/u,d=c*c,h=a-e,p=s-t,f=Math.sqrt(h*h+p*p);h/=f,p/=f;var g=n-e,m=i-t,v=r-a,y=o-s,x=g*g+m*m,_=v*v+y*y;if(x<d&&_<d)l.push(a,s);else{var b=h*g+p*m,w=-h*v-p*y;if(x-b*b<d&&b>=0&&_-w*w<d&&w>=0)l.push(a,s);else{var C=[],S=[];ig(e,n,r,a,.5,C),ig(t,i,o,s,.5,S),h0(C[0],S[0],C[1],S[1],C[2],S[2],C[3],S[3],l,u),h0(C[4],S[4],C[5],S[5],C[6],S[6],C[7],S[7],l,u)}}}}function p0(e,t,n){var i=e[t],r=e[1-t],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u<a;u++)l.push(s);var c=n-a*s;if(c>0)for(u=0;u<c;u++)l[u%a]+=1;return l}function f0(e,t,n){for(var i=e.r0,r=e.r,o=e.startAngle,a=e.endAngle,s=Math.abs(a-o),l=s*r,u=r-i,c=l>Math.abs(u),d=p0([l,u],c?0:1,t),h=(c?s:u)/d.length,p=0;p<d.length;p++)for(var f=(c?u:s)/d[p],g=0;g<d[p];g++){var m={};c?(m.startAngle=o+h*p,m.endAngle=o+h*(p+1),m.r0=i+f*g,m.r=i+f*(g+1)):(m.startAngle=o+f*g,m.endAngle=o+f*(g+1),m.r0=i+h*p,m.r=i+h*(p+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,n.push(m)}}function g0(e,t,n,i){return e*i-n*t}function m0(e,t,n,i,r,o,a,s){var l=n-e,u=i-t,c=a-r,d=s-o,h=g0(c,d,l,u);if(Math.abs(h)<1e-6)return null;var p=g0(e-r,t-o,c,d)/h;return p<0||p>1?null:new cf(p*l+e,p*u+t)}function v0(e,t,n){var i=new cf;cf.sub(i,n,t),i.normalize();var r=new cf;return cf.sub(r,e,t),r.dot(i)}function y0(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function x0(e){var t=e.points,n=[],i=[];yx(t,n,i);var r=new xf(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new cf,c=new cf;return o>a?(u.x=c.x=s+o/2,u.y=l,c.y=l+a):(u.y=c.y=l+a/2,u.x=s,c.x=s+o),function(e,t,n){for(var i=e.length,r=[],o=0;o<i;o++){var a=e[o],s=e[(o+1)%i],l=m0(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&r.push({projPt:v0(l,t,n),pt:l,idx:o})}if(r.length<2)return[{points:e},{points:e}];r.sort(function(e,t){return e.projPt-t.projPt});var u=r[0],c=r[r.length-1];if(c.idx<u.idx){var d=u;u=c,c=d}var h=[u.pt.x,u.pt.y],p=[c.pt.x,c.pt.y],f=[h],g=[p];for(o=u.idx+1;o<=c.idx;o++)y0(f,e[o].slice());for(y0(f,p),y0(f,h),o=c.idx+1;o<=u.idx+i;o++)y0(g,e[o%i].slice());return y0(g,h),y0(g,p),[{points:f},{points:g}]}(t,u,c)}function _0(e,t,n,i){if(1===n)i.push(t);else{var r=Math.floor(n/2),o=e(t);_0(e,o[0],r,i),_0(e,o[1],n-r,i)}return i}function b0(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function w0(e,t){var n,i=[],r=e.shape;switch(e.type){case"rect":!function(e,t,n){for(var i=e.width,r=e.height,o=i>r,a=p0([i,r],o?0:1,t),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",c=o?"y":"x",d=e[s]/a.length,h=0;h<a.length;h++)for(var p=e[l]/a[h],f=0;f<a[h];f++){var g={};g[u]=h*d,g[c]=f*p,g[s]=d,g[l]=p,g.x+=e.x,g.y+=e.y,n.push(g)}}(r,t,i),n=C_;break;case"sector":f0(r,t,i),n=bw;break;case"circle":f0({r0:0,r:r.r,startAngle:0,endAngle:2*Math.PI,cx:r.cx,cy:r.cy},t,i),n=bw;break;default:var o=e.getComputedTransform(),a=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=Ih(function(e,t){var n=d0(e),i=[];t=t||1;for(var r=0;r<n.length;r++){var o=n[r],a=[],s=o[0],l=o[1];a.push(s,l);for(var u=2;u<o.length;){var c=o[u++],d=o[u++],h=o[u++],p=o[u++],f=o[u++],g=o[u++];h0(s,l,c,d,h,p,f,g,a,t),s=f,l=g}i.push(a)}return i}(e.getUpdatedPathProxy(),a),function(e){return function(e){for(var t=[],n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}(e)}),l=s.length;if(0===l)_0(x0,{points:s[0]},t,i);else if(l===t)for(var u=0;u<l;u++)i.push({points:s[u]});else{var c=0,d=Ih(s,function(e){var t=[],n=[];yx(e,t,n);var i=(n[1]-t[1])*(n[0]-t[0]);return c+=i,{poly:e,area:i}});d.sort(function(e,t){return t.area-e.area});var h=t;for(u=0;u<l;u++){var p=d[u];if(h<=0)break;var f=u===l-1?h:Math.ceil(p.area/c*t);f<0||(_0(x0,{points:p.poly},f,i),h-=f)}}n=Tw}if(!n)return function(e,t){for(var n=[],i=0;i<t;i++)n.push(nw(e));return n}(e,t);var g=[];for(u=0;u<i.length;u++){var m=new n;m.setShape(i[u]),b0(e,m),g.push(m)}return g}function C0(e,t){var n=e.length,i=t.length;if(n===i)return[e,t];for(var r=[],o=[],a=n<i?e:t,s=Math.min(n,i),l=Math.abs(i-n)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,d=[a[0],a[1]],h=l,p=2;p<s;){var f=a[p-2],g=a[p-1],m=a[p++],v=a[p++],y=a[p++],x=a[p++],_=a[p++],b=a[p++];if(h<=0)d.push(m,v,y,x,_,b);else{for(var w=Math.min(h,c-1)+1,C=1;C<=w;C++){var S=C/w;ig(f,m,y,_,S,r),ig(g,v,x,b,S,o),f=r[3],g=o[3],d.push(r[1],o[1],r[2],o[2],f,g),m=r[5],v=o[5],y=r[6],x=o[6]}h-=w-1}}return a===e?[d,t]:[e,d]}function S0(e,t){for(var n=e.length,i=e[n-2],r=e[n-1],o=[],a=0;a<t.length;)o[a++]=i,o[a++]=r;return o}function M0(e){for(var t=0,n=0,i=0,r=e.length,o=0,a=r-2;o<r;a=o,o+=2){var s=e[a],l=e[a+1],u=e[o],c=e[o+1],d=s*c-u*l;t+=d,n+=(s+u)*d,i+=(l+c)*d}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,i/t/3,t]}function T0(e,t,n,i){for(var r=(e.length-2)/6,o=1/0,a=0,s=e.length,l=s-2,u=0;u<r;u++){for(var c=6*u,d=0,h=0;h<s;h+=2){var p=0===h?c:(c+h-2)%l+2,f=e[p]-n[0],g=e[p+1]-n[1],m=t[h]-i[0]-f,v=t[h+1]-i[1]-g;d+=m*m+v*v}d<o&&(o=d,a=u)}return a}function I0(e){for(var t=[],n=e.length,i=0;i<n;i+=2)t[i]=e[n-i-2],t[i+1]=e[n-i-1];return t}function D0(e){return e.__isCombineMorphing}var k0="__mOriginal_";function A0(e,t,n){var i=k0+t,r=e[i]||e[t];e[i]||(e[i]=e[t]);var o=n.replace,a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=o?o.apply(this,t):r.apply(this,t),a&&a.apply(this,t),e}}function E0(e,t){var n=k0+t;e[n]&&(e[t]=e[n],e[n]=null)}function N0(e,t){for(var n=0;n<e.length;n++)for(var i=e[n],r=0;r<i.length;){var o=i[r],a=i[r+1];i[r++]=t[0]*o+t[2]*a+t[4],i[r++]=t[1]*o+t[3]*a+t[5]}}function L0(e,t){var n=e.getUpdatedPathProxy(),i=t.getUpdatedPathProxy(),r=function(e,t){for(var n,i,r,o=[],a=[],s=0;s<Math.max(e.length,t.length);s++){var l=e[s],u=t[s],c=void 0,d=void 0;l?u?(i=c=(n=C0(l,u))[0],r=d=n[1]):(d=S0(r||l,l),c=l):(c=S0(i||u,u),d=u),o.push(c),a.push(d)}return[o,a]}(d0(n),d0(i)),o=r[0],a=r[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&N0(o,s),l&&N0(a,l),A0(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var u=function(e,t,n,i){for(var r,o=[],a=0;a<e.length;a++){var s=e[a],l=t[a],u=M0(s),c=M0(l);null==r&&(r=u[2]<0!=c[2]<0);var d=[],h=[],p=0,f=1/0,g=[],m=s.length;r&&(s=I0(s));for(var v=6*T0(s,l,u,c),y=m-2,x=0;x<y;x+=2){var _=(v+x)%y+2;d[x+2]=s[_]-u[0],d[x+3]=s[_+1]-u[1]}d[0]=s[v]-u[0],d[1]=s[v+1]-u[1];for(var b=i/n,w=-i/2;w<=i/2;w+=b){var C=Math.sin(w),S=Math.cos(w),M=0;for(x=0;x<s.length;x+=2){var T=d[x],I=d[x+1],D=l[x]-c[0],k=l[x+1]-c[1],A=D*S-k*C,E=D*C+k*S;g[x]=A,g[x+1]=E;var N=A-T,L=E-I;M+=N*N+L*L}if(M<f){f=M,p=w;for(var P=0;P<g.length;P++)h[P]=g[P]}}o.push({from:d,to:h,fromCp:u,toCp:c,rotation:-p})}return o}(o,a,10,Math.PI),c=[];A0(t,"buildPath",{replace:function(e){for(var n=t.__morphT,i=1-n,r=[],o=0;o<u.length;o++){var a=u[o],s=a.from,l=a.to,d=a.rotation*n,h=a.fromCp,p=a.toCp,f=Math.sin(d),g=Math.cos(d);Sp(r,h,p,n);for(var m=0;m<s.length;m+=2){var v=s[m],y=s[m+1],x=v*i+(C=l[m])*n,_=y*i+(S=l[m+1])*n;c[m]=x*g-_*f+r[0],c[m+1]=x*f+_*g+r[1]}var b=c[0],w=c[1];e.moveTo(b,w);for(m=2;m<s.length;){var C=c[m++],S=c[m++],M=c[m++],T=c[m++],I=c[m++],D=c[m++];b===C&&w===S&&M===I&&T===D?e.lineTo(I,D):e.bezierCurveTo(C,S,M,T,I,D),b=I,w=D}}}})}function P0(e,t,n){if(!e||!t)return t;var i=n.done,r=n.during;return L0(e,t),t.__morphT=0,t.animateTo({__morphT:1},wh({during:function(e){t.dirtyShape(),r&&r(e)},done:function(){E0(t,"buildPath"),E0(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),i&&i()}},n)),t}function O0(e,t,n,i,r,o){e=r===n?0:Math.round(32767*(e-n)/(r-n)),t=o===i?0:Math.round(32767*(t-i)/(o-i));for(var a,s=0,l=32768;l>0;l/=2){var u=0,c=0;(e&l)>0&&(u=1),(t&l)>0&&(c=1),s+=l*l*(3*u^c),0===c&&(1===u&&(e=l-1-e,t=l-1-t),a=e,e=t,t=a)}return s}function R0(e){var t=1/0,n=1/0,i=-1/0,r=-1/0,o=Ih(e,function(e){var o=e.getBoundingRect(),a=e.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return t=Math.min(s,t),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]});return Ih(o,function(o,a){return{cp:o,z:O0(o[0],o[1],t,n,i,r),path:e[a]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function F0(e){return w0(e.path,e.count)}function z0(e){return Lh(e[0])}function V0(e,t){for(var n=[],i=e.length,r=0;r<i;r++)n.push({one:e[r],many:[]});for(r=0;r<t.length;r++){var o=t[r].length,a=void 0;for(a=0;a<o;a++)n[a%i].many.push(t[r][a])}var s=0;for(r=i-1;r>=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var B0={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),i=0;i<e.count;i++){var r=nw(e.path);r.setStyle("opacity",n),t.push(r)}return t},split:null};function j0(e,t,n,i,r,o){if(e.length&&t.length){var a=$w("update",i,r);if(a&&a.duration>0){var s,l,u=i.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},a);z0(e)&&(s=e,l=t),z0(t)&&(s=t,l=e);for(var d=s?s===e:e.length>t.length,h=s?V0(l,s):V0(d?t:e,[d?e:t]),p=0,f=0;f<h.length;f++)p+=h[f].many.length;var g=0;for(f=0;f<h.length;f++)m(h[f],d,g,p),g+=h[f].many.length}}function m(e,t,i,r,a){var s=e.many,l=e.one;if(1!==s.length||a)for(var d=wh({dividePath:B0[n],individualDelay:u&&function(e,t,n,o){return u(e+i,r)}},c),h=t?function(e,t,n){var i=[];!function e(t){for(var n=0;n<t.length;n++){var r=t[n];D0(r)?e(r.childrenRef()):r instanceof d_&&i.push(r)}}(e);var r=i.length;if(!r)return{fromIndividuals:[],toIndividuals:[],count:0};var o=(n.dividePath||F0)({path:t,count:r});if(o.length!==r)return{fromIndividuals:[],toIndividuals:[],count:0};i=R0(i),o=R0(o);for(var a=n.done,s=n.during,l=n.individualDelay,u=new Xm,c=0;c<r;c++){var d=i[c],h=o[c];h.parent=t,h.copyTransform(u),l||L0(d,h)}function p(e){for(var t=0;t<o.length;t++)o[t].addSelfToZr(e)}function f(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,E0(t,"addSelfToZr"),E0(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return o},A0(t,"addSelfToZr",{after:function(e){p(e)}}),A0(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<o.length;t++)o[t].removeSelfFromZr(e)}});var g=o.length;if(l){var m=g,v=function(){0===--m&&(f(),a&&a())};for(c=0;c<g;c++){var y=l?wh({delay:(n.delay||0)+l(c,g,i[c],o[c]),done:v},n):n;P0(i[c],o[c],y)}}else t.__morphT=0,t.animateTo({__morphT:1},wh({during:function(e){for(var n=0;n<g;n++){var i=o[n];i.__morphT=t.__morphT,i.dirtyShape()}s&&s(e)},done:function(){f();for(var t=0;t<e.length;t++)E0(e[t],"updateTransform");a&&a()}},n));return t.__zr&&p(t.__zr),{fromIndividuals:i,toIndividuals:o,count:g}}(s,l,d):function(e,t,n){var i=t.length,r=[],o=n.dividePath||F0;if(D0(e)){!function e(t){for(var n=0;n<t.length;n++){var i=t[n];D0(i)?e(i.childrenRef()):i instanceof d_&&r.push(i)}}(e.childrenRef());var a=r.length;if(a<i)for(var s=0,l=a;l<i;l++)r.push(nw(r[s++%a]));r.length=i}else{r=o({path:e,count:i});var u=e.getComputedTransform();for(l=0;l<r.length;l++)r[l].setLocalTransform(u);if(r.length!==i)return{fromIndividuals:[],toIndividuals:[],count:0}}r=R0(r),t=R0(t);var c=n.individualDelay;for(l=0;l<i;l++){var d=c?wh({delay:(n.delay||0)+c(l,i,r[l],t[l])},n):n;P0(r[l],t[l],d)}return{fromIndividuals:r,toIndividuals:t,count:t.length}}(l,s,d),p=h.fromIndividuals,f=h.toIndividuals,g=p.length,v=0;v<g;v++){y=u?wh({delay:u(v,g)},c):c;o(p[v],f[v],t?s[v]:e.one,t?e.one:s[v],y)}else{var y,x=t?s[0]:l,_=t?l:s[0];if(D0(x))m({many:[x],one:_},!0,i,r,!0);else P0(x,_,y=u?wh({delay:u(i,r)},c):c),o(x,_,x,_,y)}}}function G0(e){if(!e)return[];if(Lh(e)){for(var t=[],n=0;n<e.length;n++)t.push(G0(e[n]));return t}var i=[];return e.traverse(function(e){e instanceof d_&&!e.disableMorphing&&!e.invisible&&!e.ignore&&i.push(e)}),i}var W0=vy();function H0(e,t,n,i){var r=function(e,t){for(var n=e.dimensions,i=0;i<n.length;i++){var r=e.getDimensionInfo(n[i]);if(r&&0===r.otherDims[t])return n[i]}}(e,i?"itemChildGroupId":"itemGroupId");if(r){var o=function(e,t,n){var i=e.getDimensionInfo(n),r=i&&i.ordinalMeta;if(i){var o=e.get(i.name,t);return r&&r.categories[o]||o+""}}(e,t,r);return o}var a=e.getRawDataItem(t),s=i?"childGroupId":"groupId";return a&&a[s]?a[s]+"":i?void 0:n||e.getId(t)}function U0(e){var t=[];return Th(e,function(e){var n=e.data,i=e.dataGroupId;if(n.count()>1e4)"production"!==process.env.NODE_ENV&&Xv("Universal transition is disabled on large data > 10k.");else for(var r=n.getIndices(),o=0;o<r.length;o++)t.push({data:n,groupId:H0(n,o,i,!1),childGroupId:H0(n,o,i,!0),divide:e.divide,dataIndex:o})}),t}function Y0(e,t,n){e.traverse(function(e){e instanceof d_&&Qw(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function Z0(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function X0(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function q0(e,t,n){var i=$w("update",n,t);i&&e.traverse(function(e){if(e instanceof sx){var t=function(e){return qw(e).oldStyle}(e);t&&e.animateFrom({style:t},i)}})}function $0(e,t,n){var i=U0(e),r=U0(t);function o(e,t,n,i,r){(n||e)&&t.animateFrom({style:n&&n!==e?bh(bh({},n.style),e.style):e.style},r)}var a=!1,s=0,l=rp(),u=rp();i.forEach(function(e){e.groupId&&l.set(e.groupId,!0),e.childGroupId&&u.set(e.childGroupId,!0)});for(var c=0;c<r.length;c++){var d=r[c].groupId;if(u.get(d)){s=1;break}var h=r[c].childGroupId;if(h&&l.get(h)){s=2;break}}function p(e,t){return function(n){var i=n.data,r=n.dataIndex;return t?i.getId(r):e?1===s?n.childGroupId:n.groupId:2===s?n.childGroupId:n.groupId}}var f=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var i=0;i<n;i++){var r=e[i],o=t[i];if(r.data.getId(r.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}(i,r),g={};if(!f)for(c=0;c<r.length;c++){var m=r[c],v=m.data.getItemGraphicEl(m.dataIndex);v&&(g[v.id]=!0)}function y(e,t){var n=i[t],s=r[e],l=s.data.hostModel,u=n.data.getItemGraphicEl(n.dataIndex),c=s.data.getItemGraphicEl(s.dataIndex);u!==c?u&&g[u.id]||c&&(X0(c),u?(X0(u),Z0(u),a=!0,j0(G0(u),G0(c),s.divide,l,e,o)):Y0(c,l,e)):c&&q0(c,s.dataIndex,l)}new pE(i,r,p(!0,f),p(!1,f),null,"multiple").update(y).updateManyToOne(function(e,t){var n=r[e],s=n.data,l=s.hostModel,u=s.getItemGraphicEl(n.dataIndex),c=kh(Ih(t,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==u&&!g[e.id]});u&&(X0(u),c.length?(Th(c,function(e){X0(e),Z0(e)}),a=!0,j0(G0(c),G0(u),n.divide,l,e,o)):Y0(u,l,n.dataIndex))}).updateOneToMany(function(e,t){var n=i[t],s=n.data.getItemGraphicEl(n.dataIndex);if(!s||!g[s.id]){var l=kh(Ih(e,function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)}),function(e){return e&&e!==s}),u=r[e[0]].data.hostModel;l.length&&(Th(l,function(e){return X0(e)}),s?(X0(s),Z0(s),a=!0,j0(G0(s),G0(l),n.divide,u,e[0],o)):Th(l,function(t){return Y0(t,u,e[0])}))}}).updateManyToMany(function(e,t){new pE(t,e,function(e){return i[e].data.getId(i[e].dataIndex)},function(e){return r[e].data.getId(r[e].dataIndex)}).update(function(n,i){y(e[n],t[i])}).execute()}).execute(),a&&Th(t,function(e){var t=e.data.hostModel,i=t&&n.getViewOfSeriesModel(t),r=$w("update",t,0);i&&t.isAnimationEnabled()&&r&&r.duration>0&&i.group.traverse(function(e){e instanceof d_&&!e.animators.length&&e.animateFrom({style:{opacity:0}},r)})})}function K0(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function J0(e){return Lh(e)?e.sort().join(","):e}function Q0(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function e1(e,t){for(var n=0;n<e.length;n++){if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}}cE([function(e){e.registerPainter("canvas",DO)}]),cE([function(e){e.registerPainter("svg",bO)}]),cE([function(e){e.registerChartView(uR),e.registerSeriesModel(kO),e.registerLayout(cR("line",!0)),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,pR("line"))},function(e){e.registerChartView(CR),e.registerSeriesModel(gR),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Nh(vN,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,yN("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,pR("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})},function(e){e.registerChartView(JR),e.registerSeriesModel(nF),hk("pie",e.registerAction),e.registerLayout(Nh(WR,"pie")),e.registerProcessor(UR("pie")),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension("value"),i=n.get(t,e);return!(Fh(i)&&!isNaN(i)&&i<0)})}})},function(e){cE(nz),e.registerSeriesModel(iF),e.registerChartView(sF),e.registerLayout(cR("scatter"))},function(e){cE(mz),e.registerChartView(sz),e.registerSeriesModel(lz),e.registerLayout(iz),e.registerProcessor(UR("radar")),e.registerPreprocessor(az)},function(e){cE(UV),e.registerChartView(TV),e.registerSeriesModel(IV),e.registerLayout(kV),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,DV),hk("map",e.registerAction)},function(e){e.registerChartView(iB),e.registerSeriesModel(MB),e.registerLayout(IB),e.registerVisual(DB),function(e){e.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var n=e.dataIndex,i=t.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand})}),e.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(t){var i=GV(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)})})}(e)},function(e){e.registerSeriesModel(EB),e.registerChartView(HB),e.registerVisual(sj),e.registerLayout(_j),function(e){for(var t=0;t<kB.length;t++)e.registerAction({type:kB[t],update:"updateView"},up);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},function(t,n){var i=bB(e,["treemapZoomToNode","treemapRootToNode"],t);if(i){var r=t.getViewRoot();r&&(e.direction=CB(r,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})})}(e)},function(e){e.registerChartView(bG),e.registerSeriesModel(DG),e.registerProcessor(Tj),e.registerVisual(Ij),e.registerVisual(kj),e.registerLayout(Vj),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,Zj),e.registerLayout(qj),e.registerCoordinateSystem("graphView",{dimensions:EV.dimensions,create:$j}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},up),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},up),e.registerAction(kG,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(t){var i=GV(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)})})},function(e){e.registerChartView(LG),e.registerSeriesModel(PG)},function(e){e.registerChartView(FG),e.registerSeriesModel(zG),e.registerLayout(VG),e.registerProcessor(UR("funnel"))},function(e){cE(hH),e.registerChartView(BG),e.registerSeriesModel(YG),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,qG)},function(e){e.registerChartView(gH),e.registerSeriesModel(vH),e.registerLayout(yH),e.registerVisual(AH),e.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})})},function(e){e.registerSeriesModel(NH),e.registerChartView(LH),e.registerLayout(BH),e.registerTransform(jH)},function(e){e.registerChartView(KH),e.registerSeriesModel(lU),e.registerPreprocessor(uU),e.registerVisual(qH),e.registerLayout(cU)},function(e){e.registerChartView(fU),e.registerSeriesModel(gU),e.registerLayout(cR("effectScatter"))},function(e){e.registerChartView(CU),e.registerSeriesModel(IU),e.registerLayout(wU),e.registerVisual(kU)},function(e){e.registerChartView(NU),e.registerSeriesModel(LU)},function(e){e.registerChartView(FU),e.registerSeriesModel(tY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Nh(vN,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,yN("pictorialBar"))},function(e){e.registerChartView(nY),e.registerSeriesModel(iY),e.registerLayout(rY),e.registerProcessor(UR("themeRiver"))},function(e){e.registerChartView(uY),e.registerSeriesModel(cY),e.registerLayout(Nh(pY,"sunburst")),e.registerProcessor(Nh(UR,"sunburst")),e.registerVisual(gY),function(e){e.registerAction({type:sY,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t,n){var i=bB(e,[sY],t);if(i){var r=t.getViewRoot();r&&(e.direction=CB(r,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})}),e.registerAction({type:lY,update:"none"},function(e,t,n){e=bh({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){var n=bB(e,[lY],t);n&&(e.dataIndex=n.node.dataIndex)}),"production"!==process.env.NODE_ENV&&Kv("sunburstHighlight","highlight"),n.dispatchAction(bh(e,{type:"highlight"}))}),e.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(e,t,n){e=bh({},e),"production"!==process.env.NODE_ENV&&Kv("sunburstUnhighlight","downplay"),n.dispatchAction(bh(e,{type:"downplay"}))})}(e)},function(e){e.registerChartView(hZ),e.registerSeriesModel(xY)}]),cE(function(e){cE(nz),cE(pX)}),cE(function(e){cE(pX),HF.registerAxisPointerClass("PolarAxisPointer",fX),e.registerCoordinateSystem("polar",DX),e.registerComponentModel(mX),e.registerComponentView(HX),gF(e,"angle",yX,GX),gF(e,"radius",xX,WX),e.registerComponentView(LX),e.registerComponentView(FX),e.registerLayout(Nh(jX,"bar"))}),cE(UV),cE(function(e){cE(pX),HF.registerAxisPointerClass("SingleAxisPointer",rq),e.registerComponentView(lq),e.registerComponentView(XX),e.registerComponentModel($X),gF(e,"single",$X,$X.defaultOption),e.registerCoordinateSystem("single",tq)}),cE(hH),cE(function(e){e.registerComponentModel(uq),e.registerComponentView(dq),e.registerCoordinateSystem("calendar",pq)}),cE(function(e){e.registerComponentModel(xq),e.registerComponentView(wq),e.registerPreprocessor(function(e){var t=e.graphic;Lh(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}),cE(function(e){e.registerComponentModel(qq),e.registerComponentView(Kq),Zq("saveAsImage",Jq),Zq("magicType",t$),Zq("dataView",l$),Zq("dataZoom",A$),Zq("restore",p$),cE(Hq)}),cE(function(e){cE(pX),e.registerComponentModel(L$),e.registerComponentView($$),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},up),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},up)}),cE(pX),cE(function(e){e.registerComponentView(yK),e.registerComponentModel(xK),e.registerPreprocessor(tK),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,pK),e.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},up),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},up),Zq("brush",wK)}),cE(function(e){e.registerComponentModel(CK),e.registerComponentView(SK)}),cE(function(e){e.registerComponentModel(TK),e.registerComponentView(EK),e.registerSubTypeDefaulter("timeline",function(){return"slider"}),function(e){e.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var i=t.getComponent("timeline");return i&&null!=e.currentIndex&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),wh({currentIndex:i.option.currentIndex},e)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)})}(e),e.registerPreprocessor(PK)}),cE(function(e){e.registerComponentModel(jK),e.registerComponentView(QK),e.registerPreprocessor(function(e){FK(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}),cE(function(e){e.registerComponentModel(eJ),e.registerComponentView(sJ),e.registerPreprocessor(function(e){FK(e.series,"markLine")&&(e.markLine=e.markLine||{})})}),cE(function(e){e.registerComponentModel(lJ),e.registerComponentView(mJ),e.registerPreprocessor(function(e){FK(e.series,"markArea")&&(e.markArea=e.markArea||{})})}),cE(function(e){cE(kJ),cE(RJ)}),cE(function(e){cE(ZJ),cE(nQ)}),cE(ZJ),cE(nQ),cE(function(e){cE(RQ),cE(jQ)}),cE(RQ),cE(jQ),cE(function(e){e.registerPreprocessor(YQ),e.registerVisual(e.PRIORITY.VISUAL.ARIA,UQ)}),cE(function(e){e.registerTransform(r0),e.registerTransform(a0)}),cE(function(e){e.registerComponentModel(s0),e.registerComponentView(l0)}),cE(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){Th(iy(n.seriesTransition),function(e){Th(iy(e.to),function(e){for(var t=n.updatedSeries,i=0;i<t.length;i++)(null!=e.seriesIndex&&e.seriesIndex===t[i].seriesIndex||null!=e.seriesId&&e.seriesId===t[i].id)&&(t[i][tD]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(e,t,n){var i=W0(t);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var r=n.seriesTransition;if(r)Th(iy(r),function(e){!function(e,t,n,i){var r=[],o=[];Th(iy(e.from),function(e){var n=e1(t.oldSeries,e);n>=0&&r.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:Q0(t.oldData[n]),groupIdDim:e.dimension})}),Th(iy(e.to),function(e){var i=e1(n.updatedSeries,e);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:t.oldDataGroupIds[i],data:r,divide:Q0(r),groupIdDim:e.dimension})}}),r.length>0&&o.length>0&&$0(r,o,i)}(e,i,n,t)});else{var o=function(e,t){var n=rp(),i=rp(),r=rp();function o(e){n.get(e)&&Xv("Duplicated seriesKey in universalTransition "+e)}return Th(e.oldSeries,function(t,n){var o=e.oldDataGroupIds[n],a=e.oldData[n],s=K0(t),l=J0(s);i.set(l,{dataGroupId:o,data:a}),Lh(s)&&Th(s,function(e){r.set(e,{key:l,dataGroupId:o,data:a})})}),Th(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),a=e.getData(),s=K0(e),l=J0(s),u=i.get(l);if(u)"production"!==process.env.NODE_ENV&&o(l),n.set(l,{oldSeries:[{dataGroupId:u.dataGroupId,divide:Q0(u.data),data:u.data}],newSeries:[{dataGroupId:t,divide:Q0(a),data:a}]});else if(Lh(s)){"production"!==process.env.NODE_ENV&&o(l);var c=[];Th(s,function(e){var t=i.get(e);t.data&&c.push({dataGroupId:t.dataGroupId,divide:Q0(t.data),data:t.data})}),c.length&&n.set(l,{oldSeries:c,newSeries:[{dataGroupId:t,data:a,divide:Q0(a)}]})}else{var d=r.get(s);if(d){var h=n.get(d.key);h||(h={oldSeries:[{dataGroupId:d.dataGroupId,data:d.data,divide:Q0(d.data)}],newSeries:[]},n.set(d.key,h)),h.newSeries.push({dataGroupId:t,data:a,divide:Q0(a)})}}}}),n}(i,n);Th(o.keys(),function(e){var n=o.get(e);$0(n.oldSeries,n.newSeries,t)})}Th(n.updatedSeries,function(e){e[tD]&&(e[tD]=!1)})}for(var a=e.getSeries(),s=i.oldSeries=[],l=i.oldDataGroupIds=[],u=i.oldData=[],c=0;c<a.length;c++){var d=a[c].getData();d.count()<1e4&&(s.push(a[c]),l.push(a[c].get("dataGroupId")),u.push(d))}})}),cE(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var i=uP(t).labelManager;i||(i=uP(t).labelManager=new lP),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var i=uP(t).labelManager;n.updatedSeries.forEach(function(e){i.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})});const t1=s.forwardRef(function({option:e,autoresize:t=!0,style:n,className:i},r){const o=s.useRef(null),l=s.useRef(null),u=s.useRef(null),c=s.useRef(e);c.current=e;const d=()=>{const e=l.current,t=o.current;if(!e||!t)return;const n=t.clientHeight,i=Math.max(2,Math.floor(n/60)),r=c.current,a={...r,yAxis:{...r.yAxis??{},splitNumber:i}};e.setOption(a,{notMerge:!0})};return s.useEffect(()=>{if(!o.current)return;const e=KA(o.current);return l.current=e,d(),t&&(u.current=new ResizeObserver(()=>{e.resize(),d()}),u.current.observe(o.current)),()=>{var t;null==(t=u.current)||t.disconnect(),u.current=null,e.dispose(),l.current=null}},[]),s.useEffect(()=>{d()},[e]),s.useImperativeHandle(r,()=>({get instance(){return l.current}}),[]),a.jsx("div",{ref:o,className:i,style:{width:"100%",height:"100%",...n}})}),n1="#bbc6d9",i1="#96a5be",r1='Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',o1=["#ADDDBC","#89AAF6","#F7B4A9","#CAA4E6","#92D3DC","#FFB3BA","#FFDFBA","#BAFFC9","#BAE1FF","#D8BFD8","#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FECA57"];function a1(e){let t=1,n=0;for(const i of e){const e=i.split("\n");e.length>t&&(t=e.length);for(const t of e)t.length>n&&(n=t.length)}return{maxLines:t,maxLineLen:n}}function s1(e){const t=e.length;if(0===t)return 0;const{maxLineLen:n}=a1(e);return t<=6&&n<=8||t<=12&&n<=3?0:t>=30||n>=20?60:45}function l1(e,t,n){if(0===e)return 100;const i=function(e,t){return Math.max(25,7*e+12*(t-1))}(t,n),r=Math.max(20,Math.floor(u1/i*1.3));return e<=r?100:Math.min(100,r/e*100)}const u1=1800;function c1(e){const{chartType:t,xLabels:n,seriesData:i,showTooltip:r=!0,showLegend:o=!1,showDataZoom:a=!1,mini:s=!1,chartMap:l}=e,u={color:i1,fontFamily:r1,fontSize:11},c=a1(n),d=e.labelLines??c.maxLines,h=l1(n.length,c.maxLineLen,d);return{color:o1,tooltip:r?{trigger:"axis",axisPointer:{type:"cross",lineStyle:{type:"dashed",width:1}},textStyle:{fontFamily:r1,fontSize:12}}:void 0,legend:o?{type:"scroll",top:0,width:"90%",textStyle:{fontFamily:r1,color:i1},pageTextStyle:{color:"#97A6BF"},pageIconSize:16}:void 0,grid:{left:s?5:15,right:s?5:20,top:s?5:o?40:15,bottom:s?5:a?60:10,containLabel:!s},xAxis:{type:"category",data:n,axisLabel:s?{show:!1}:{...u,hideOverlap:!0,rotate:s1(n),width:90,overflow:"truncate"},axisTick:s?{show:!1}:{lineStyle:{color:n1}},axisLine:s?{show:!1}:{show:!0,lineStyle:{color:n1}},splitLine:{show:!1}},yAxis:{type:"value",axisLabel:s?{show:!1}:{...u,formatter:e=>e.toLocaleString()},axisLine:s?{show:!1}:{show:!0,lineStyle:{color:n1}},axisTick:s?{show:!1}:{lineStyle:{color:n1}},splitLine:s?{show:!1}:{show:!0,lineStyle:{color:n1,type:"dashed"}}},dataZoom:a?[{type:"slider",xAxisIndex:0,bottom:10,start:0,end:h},{type:"inside",xAxisIndex:0,start:0,end:h,zoomOnMouseWheel:!1,moveOnMouseWheel:"shift"}]:void 0,series:i.map((e,n)=>{const i=null==l?void 0:l[e.name],r=function(e){switch(e){case"bar":return{type:"bar",symbol:"none",showAllSymbol:!1,z:0};case"line":return{type:"line",symbol:"none",showAllSymbol:!1,connectNulls:!0,z:1};case"lineSymbols":return{type:"line",symbol:"emptyCircle",symbolSize:7,showAllSymbol:!1,connectNulls:!0,z:1};case"area":return{type:"line",symbol:"none",showAllSymbol:!1,connectNulls:!0,areaStyle:{},z:0}}}((null==i?void 0:i.type)??t),o=(null==i?void 0:i.color)??o1[n%o1.length];return{name:e.name,data:e.data,id:e.name,color:o,emphasis:{focus:"series"},itemStyle:{color:o},...r}}),animation:!s}}function d1(e){const{xLabels:t,seriesData:n,chartType:i,labelLines:r}=e,o=s.useMemo(()=>c1({chartType:i,xLabels:t,seriesData:n,showTooltip:!1,showLegend:!1,showDataZoom:!1,mini:!0,labelLines:r}),[i,t,n,r]);return a.jsx(t1,{option:o,autoresize:!0})}function h1(e){const{categories:t,xLabels:n,chartType:i,labelLines:r,onSelect:o}=e,l=s.useRef(null),u=s.useRef([]),[c,d]=s.useState([]),h=t.map(e=>e.name).join("");return s.useEffect(()=>{d(t.map(()=>!1));const e=l.current;if(!e)return;const n=new IntersectionObserver(e=>{for(const t of e)if(t.isIntersecting){const e=Number(t.target.dataset.idx);Number.isNaN(e)||d(t=>{if(t[e])return t;const n=[...t];return n[e]=!0,n})}},{root:e}),i=requestAnimationFrame(()=>{for(const e of u.current)e&&n.observe(e)});return()=>{cancelAnimationFrame(i),n.disconnect()}},[h,i]),a.jsx("div",{ref:l,className:"moz-multiple-chart",children:t.map((e,t)=>a.jsxs("div",{"data-idx":t,ref:e=>{u.current[t]=e},className:"moz-multiple-chart-item"+("Grand Total"===e.name?" total-item":""),onClick:()=>o(e.name),children:[a.jsx("span",{children:e.name}),c[t]&&a.jsx(d1,{xLabels:n,seriesData:e.series,chartType:i,labelLines:r,width:325,height:50})]},e.name))})}function p1(e){const{xLabels:t,seriesData:n,chartType:i,labelLines:r}=e,o=s.useMemo(()=>c1({chartType:i,xLabels:t,seriesData:n,showTooltip:!1,showLegend:!0,showDataZoom:t.length>10,labelLines:r}),[i,t,n,r]);return a.jsx(t1,{option:o,autoresize:!0,style:{flex:1,minHeight:150,marginTop:16,height:"auto"}})}const f1=s.forwardRef(function(e,t){const{grid:n,useMultipleChart:i=!0,includeGrandTotal:r=!1,onClose:o}=e,[l,u]=s.useState("bar"),[c,d]=s.useState(i?"multiple":"detail"),[h,p]=s.useState(""),[f,g]=s.useState([]),[m,v]=s.useState([]),[y,x]=s.useState([]),[_,b]=s.useState(""),[w,C]=s.useState("all"),[S,M]=s.useState([]),[T,I]=s.useState({xLabels:[],categories:[]}),D=s.useRef({rowFields:[],allValueFields:[],selectedRowField:"",selectedColumnField:"all",selectedValueFields:[]});D.current={rowFields:f,allValueFields:y,selectedRowField:_,selectedColumnField:w,selectedValueFields:S};const k=s.useCallback(async()=>{const e=n.pivot.getPivotMeta();if(!e)return;const t=D.current,i=t.rowFields.map(e=>e.field),o=t.allValueFields.map(e=>e.field),a=e.rowFields.map(e=>e.field),s=e.valueFields.map(e=>e.field),l=(e,t)=>e.length===t.length&&e.every(e=>t.includes(e)),u=!l(i,a),c=!l(o,s);g(e.rowFields),v(e.columnFields),x(e.valueFields);const d=u||!a.includes(t.selectedRowField)?a[0]??"":t.selectedRowField;let h;if(t.selectedRowField!==d&&(b(d),t.selectedRowField=d),c||0===t.selectedValueFields.length)h=s;else{const e=t.selectedValueFields.filter(e=>s.includes(e));h=e.length>0?e:s}var p,f;p=t.selectedValueFields,f=h,p.length===f.length&&p.every((e,t)=>e===f[t])||(M(h),t.selectedValueFields=h);let m=t.selectedColumnField;if("all"!==t.selectedColumnField){const n=Number(t.selectedColumnField);(!Number.isFinite(n)||n<0||n>=e.columnFields.length)&&(m="all",C("all"),t.selectedColumnField="all")}const y="all"===m?void 0:Number(m),_=await n.pivot.getSeriesData({categoryField:d||void 0,columnFieldLevel:y,valueFields:h,grandTotals:r?"all":"none"});I(_)},[n,r]);s.useEffect(()=>{if(!n)return;const e=[n.on("data:loaded",()=>{k()}),n.on("filter:changed",()=>{k()}),n.on("sort:changed",()=>{k()})];return()=>{e.forEach(e=>e())}},[n,k]),s.useEffect(()=>{k().then(()=>{"detail"===c&&p(e=>e)})},[_,w,S]),s.useEffect(()=>{if(!("detail"!==c||h&&T.categories.find(e=>e.name===h))){const e=T.categories[0];p((null==e?void 0:e.name)??"")}},[c,T,h]),s.useEffect(()=>{let e=!1;return(async()=>{n.pivot.getResult()||await new Promise(e=>setTimeout(e,100)),e||await k()})(),()=>{e=!0}},[]);const A=s.useMemo(()=>T.categories.find(e=>e.name===h),[T,h]),E=s.useMemo(()=>(null==A?void 0:A.series)??[],[A]),N=s.useMemo(()=>("all"===w?Math.max(1,m.length):1)+(S.length>1?1:0),[w,m.length,S.length]);return s.useImperativeHandle(t,()=>({refresh:k}),[k]),a.jsxs("div",{className:"moz-pivot-chart",children:[a.jsx(qd,{chartType:l,rowFields:f,columnFields:m,valueFields:y,selectedRowField:_,selectedColumnField:w,selectedValueFields:S,showBack:i&&"detail"===c,onUpdateChartType:u,onUpdateSelectedRowField:b,onUpdateSelectedColumnField:C,onUpdateSelectedValueFields:M,onBack:()=>d("multiple"),onClose:o}),i&&"multiple"===c&&a.jsx(h1,{categories:T.categories,xLabels:T.xLabels,chartType:l,labelLines:N,onSelect:e=>{p(e),d("detail")}}),"detail"===c&&a.jsxs("div",{className:"moz-pivot-chart__detail",children:[h&&a.jsxs("div",{className:"moz-detail-chart-title",children:[a.jsx(we,{color:"#4568e0",size:"14"}),h]}),a.jsx(p1,{xLabels:T.xLabels,seriesData:E,chartType:l,labelLines:N})]})]})}),g1=s.forwardRef(function(e,t){var n,i;const{pivotRowFields:r,pivotColumnFields:o,pivotValueFields:l,pivotFilterFields:u,availableFields:c=[],pivotSettings:d,onUpdatePivotSettings:h,onUpdateValueField:p,onUpdateFieldPanelConfig:f,onClickFieldPanel:g,useToolBoxSetting:m=!0,useFilter:v=!0,useSort:y=!0,useCustomCell:x=!0,useChart:_=!1,chartActive:b,onClickChart:w,useMultipleChart:C=!0,chartIncludeGrandTotal:S=!1,contextMenuConfig:M,...T}=e,[I,D]=s.useState(null),[k,A]=s.useState(!0),[E,N]=s.useState({}),[P,O]=s.useState([]);s.useEffect(()=>{if(!I)return;const e=I.select(e=>e.pivotConfig),t=()=>{const t=e.getSnapshot();if(!t)return;O(t.valueFields??[]);const n={showRowSubTotals:t.showRowSubTotals??!1,showRowGrandTotals:t.showRowGrandTotals??!0,showColumnSubTotals:t.showColumnSubTotals??!1,showColumnGrandTotals:t.showColumnGrandTotals??!0,rowSubTotalFields:t.rowSubTotalFields?[...t.rowSubTotalFields]:t.rowSubTotalFields,columnSubTotalFields:t.columnSubTotalFields?[...t.columnSubTotalFields]:t.columnSubTotalFields,totalsBeforeData:"before"===(t.rowGrandTotalPosition??t.rowSubTotalPosition),showZeros:t.showZeros??!1},i=e=>void 0===e?" ALL":e.join(" ");N(e=>e.showRowSubTotals===n.showRowSubTotals&&e.showRowGrandTotals===n.showRowGrandTotals&&e.showColumnSubTotals===n.showColumnSubTotals&&e.showColumnGrandTotals===n.showColumnGrandTotals&&e.totalsBeforeData===n.totalsBeforeData&&e.showZeros===n.showZeros&&i(e.rowSubTotalFields)===i(n.rowSubTotalFields)&&i(e.columnSubTotalFields)===i(n.columnSubTotalFields)?e:n)};return t(),e.subscribe(t)},[I]);const[R,F]=s.useState(!1),z=Aa(),B=s.useRef(null),[j,G]=s.useState(!1),W=void 0!==b,H=W?b:j,U=s.useCallback(()=>{W||G(e=>!e),null==w||w()},[W,w]),Y=s.useRef(null),Z=(null==(n=T.data)?void 0:n.length)??0,X=s.useCallback(async e=>{var t,n,i;null==f||f(e);const r=null==I?void 0:I.pivot;if(!r)return;if(0===e.rowFields.length||0===e.valueFields.length)return;const o=null==(t=r.getConfig)?void 0:t.call(r);try{await(null==(n=r.setConfig)?void 0:n.call(r,{...o??{},rowFields:e.rowFields,columnFields:e.columnFields,valueFields:e.valueFields,filterFields:e.filterFields})),null==(i=Y.current)||i.refresh()}catch{}},[I,f]),$=s.useCallback(()=>{var e;g?g():null==(e=B.current)||e.show()},[g]),K=s.useCallback(e=>{var t;D(e),null==(t=T.onReady)||t.call(T,e)},[T.onReady]),J=s.useCallback(async e=>{var t,n,i,r,o;null==h||h(e);const a=null==I?void 0:I.pivot;if(!a)return;const s=e.totalsBeforeData?"before":"after";try{await(null==(t=a.setSubTotals)?void 0:t.call(a,{showRowSubTotals:e.showRowSubTotals,rowSubTotalFields:e.rowSubTotalFields,rowSubTotalPosition:s,showColumnSubTotals:e.showColumnSubTotals,columnSubTotalFields:e.columnSubTotalFields,columnSubTotalPosition:s})),await(null==(n=a.setGrandTotals)?void 0:n.call(a,{showRowGrandTotals:e.showRowGrandTotals,rowGrandTotalPosition:s,showColumnGrandTotals:e.showColumnGrandTotals,columnGrandTotalPosition:s}));const l=null==(i=a.getConfig)?void 0:i.call(a);l&&l.showZeros!==e.showZeros&&await(null==(r=a.setConfig)?void 0:r.call(a,{...l,showZeros:e.showZeros})),null==(o=Y.current)||o.refresh()}catch{}},[I,h]),Q=s.useRef(l);s.useEffect(()=>{Q.current=P.length>0?P:l},[P,l]),s.useEffect(()=>{if(!I||!d)return;const e=I.pivot;e&&(async()=>{var t,n,i,r,o;const a=d.totalsBeforeData?"before":"after";try{await(null==(t=e.setSubTotals)?void 0:t.call(e,{showRowSubTotals:d.showRowSubTotals,rowSubTotalFields:d.rowSubTotalFields,rowSubTotalPosition:a,showColumnSubTotals:d.showColumnSubTotals,columnSubTotalFields:d.columnSubTotalFields,columnSubTotalPosition:a})),await(null==(n=e.setGrandTotals)?void 0:n.call(e,{showRowGrandTotals:d.showRowGrandTotals,rowGrandTotalPosition:a,showColumnGrandTotals:d.showColumnGrandTotals,columnGrandTotalPosition:a}));const s=null==(i=e.getConfig)?void 0:i.call(e);s&&s.showZeros!==d.showZeros&&void 0!==d.showZeros&&await(null==(r=e.setConfig)?void 0:r.call(e,{...s,showZeros:d.showZeros})),null==(o=Y.current)||o.refresh()}catch{}})()},[I,null==d?void 0:d.showRowSubTotals,null==d?void 0:d.showRowGrandTotals,null==d?void 0:d.showColumnSubTotals,null==d?void 0:d.showColumnGrandTotals,null==d?void 0:d.rowSubTotalFields,null==d?void 0:d.columnSubTotalFields,null==d?void 0:d.totalsBeforeData,null==d?void 0:d.showZeros]);const ee=s.useCallback(async e=>{var t,n;null==p||p(e);const i=null==I?void 0:I.pivot;if(!i)return;const r=Q.current;let o=!1;const a=r.map(t=>{const n=`${t.field}${t.aggregate?"-"+t.aggregate:""}`;return o||n!==e.field&&t.field!==e.field?t:(o=!0,{...t,...e.changes})});Q.current=a;try{await(null==(t=i.setValueFields)?void 0:t.call(i,a)),null==(n=Y.current)||n.refresh()}catch{}},[I,p]);return a.jsx(L.Provider,{value:I,children:a.jsx(V.Provider,{value:z,children:a.jsxs("div",{className:"moz-r-pivot",style:{display:"flex",flexDirection:"column",height:"100%"},children:[a.jsxs(Sd,{orientation:"vertical",style:{flex:1,minHeight:0},children:[a.jsx(Td,{defaultSize:50,minSize:20,children:a.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",height:"100%",border:"1px solid #bbc6d9",boxSizing:"border-box"},children:[a.jsx(kd,{useToolBoxSetting:m,useFilter:v,useSort:y,useCustomCell:x,useChart:_,chartActive:H,itemsLength:(null==(i=T.data)?void 0:i.length)??0,onClickChart:U,filterPopupVisible:R,onFilterPopupVisibleChange:F,optionPopup:({close:e})=>a.jsx(Pd,{valueFields:P.length>0?P:l,rowFields:r,columnFields:o,showRowSubTotals:E.showRowSubTotals,showRowGrandTotals:E.showRowGrandTotals,showColumnSubTotals:E.showColumnSubTotals,showColumnGrandTotals:E.showColumnGrandTotals,rowSubTotalFields:E.rowSubTotalFields,columnSubTotalFields:E.columnSubTotalFields,totalsBeforeData:E.totalsBeforeData,showZeros:E.showZeros,onUpdateGridSettings:J,onUpdateValueField:ee,onClickFieldPanel:()=>{e(),$()},onClose:e,footerVisible:k,onFooterVisibleChange:A})}),a.jsx("div",{className:"moz-r-pivot__body",style:{flex:1,minHeight:0,borderTop:"1px solid #bbc6d9"},children:a.jsx(q,{...T,mode:"pivot",pivotRowFields:r,pivotColumnFields:o,pivotValueFields:l,ref:t,onReady:K})}),k&&a.jsx(Fa,{})]})}),_&&H&&I&&a.jsxs(a.Fragment,{children:[a.jsx(Dd,{className:"moz-r-pivot__resize-handle",style:{height:4,background:"#bbc6d9",cursor:"row-resize"}}),a.jsx(Td,{defaultSize:50,minSize:20,children:a.jsx(f1,{ref:Y,grid:I,useMultipleChart:C,includeGrandTotal:S,onClose:U})})]})]}),x&&a.jsx(rc,{visible:z.showCustomCell,onVisibleChange:e=>e?z.showCustomCellHandler():z.hideCustomCellHandler()}),a.jsx(zd,{ref:B,availableFields:c,rowFields:r,columnFields:o,valueFields:l,filterFields:u??[],totalRowCount:Z,onUpdateConfig:X}),a.jsx(Xd,{config:M??{useFilter:v,useDataCopy:!0,useDataWithHeaderCopy:!0},onOpenFilter:()=>F(!0)})]})})})});function m1(e=".xlsx,.xls,.csv"){return new Promise(t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.style.display="none",n.onchange=()=>{var e;const i=(null==(e=n.files)?void 0:e[0])??null;document.body.removeChild(n),t(i)},n.oncancel=()=>{document.body.removeChild(n),t(null)},document.body.appendChild(n),n.click()})}g1.displayName="MozPivotReact";const v1=s.createContext(null),y1=Symbol("moz-grid-notification"),x1=v1.Provider;Object.defineProperty(exports,"ROW_HEADER_COLUMN_ID",{enumerable:!0,get:()=>p.ROW_HEADER_COLUMN_ID}),Object.defineProperty(exports,"UndoStack",{enumerable:!0,get:()=>p.UndoStack}),Object.defineProperty(exports,"getCornerCell",{enumerable:!0,get:()=>p.getCornerCell}),Object.defineProperty(exports,"getRowHeaderCell",{enumerable:!0,get:()=>p.getRowHeaderCell}),exports.Button=J,exports.CHART_TYPE_OPTIONS=[{value:"bar",label:"막대 차트"},{value:"line",label:"선형 차트"},{value:"lineSymbols",label:"선형 차트 (마커)"},{value:"area",label:"영역 차트"}],exports.CellEditor=class{constructor(e,t){this.fieldId=e,this.component=t}attach(e){return e.register({type:"editor",fieldId:this.fieldId,component:this.component}),()=>e.unregister("editor",this.fieldId)}},exports.CellTemplate=class{constructor(e,t){this.fieldId=e,this.component=t}attach(e){return e.register({type:"cell",fieldId:this.fieldId,component:this.component}),()=>e.unregister("cell",this.fieldId)}},exports.CheckBox=la,exports.ClientExcelUploadPopup=function(){const e=_(),t=Hd(),[n,i]=s.useState(null),[r,o]=s.useState(!1);return a.jsx(Zn,{visible:t.showPopup,onVisibleChange:e=>!e&&t.hide(),title:e.Grid.contextImport,preset:"save-cancel",width:420,height:260,loading:r,disabledConfirmButton:!n,saveText:e.Grid.check,onConfirm:async()=>{var e;if(n&&t.activeGrid){o(!0);try{const r=t.activeGrid.io;await(null==(e=null==r?void 0:r.importXlsx)?void 0:e.call(r,n,t.defaultImportOptions)),t.hide(),i(null)}finally{o(!1)}}},children:a.jsxs("div",{className:"moz-r-client-excel",children:[a.jsx("div",{className:"moz-r-client-excel__dropzone",onClick:async()=>{const e=await m1();i(e)},children:n?n.name:e.Grid.dropHere}),n&&a.jsx(J,{type:"text",text:e.Grid.remove,onClick:()=>i(null)})]})})},exports.ColumnPicker=_a,exports.ContextMenu=Ql,exports.DateInput=ta,exports.DetailTemplate=class{constructor(e){this.component=e}attach(e){return e.register({type:"detail",component:this.component}),()=>e.unregister("detail")}},exports.Dragging=function(e){const t=s.useRef(null);return s.useEffect(()=>{const e=ac.on(e=>{t.current&&(e&&e.visible?(t.current.style.display="block",t.current.textContent=e.label??"","number"==typeof e.x&&(t.current.style.left=`${e.x}px`),"number"==typeof e.y&&(t.current.style.top=`${e.y}px`)):t.current.style.display="none")});return()=>{e()}},[]),a.jsx("div",{ref:t,style:{position:"fixed",top:0,left:0,zIndex:9999,padding:"4px 8px",background:"rgba(69,104,224,0.9)",color:"#fff",borderRadius:4,fontSize:12,pointerEvents:"none",display:"none"}})},exports.EChart=t1,exports.EmptyState=su,exports.GridBulkEditor=function({visible:e,onVisibleChange:t,columnName:n=""}){const i=_(),r=La(),[o,l]=s.useState("");return a.jsx(Zn,{visible:e,onVisibleChange:t,title:N(i.Grid.contextBulkEdit,{name:n}),preset:"ok-cancel",width:420,height:220,onConfirm:async()=>{await r.apply(o),t(!1),l("")},children:a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:a.jsx(Zo,{value:o,onChange:l,placeholder:n})})})},exports.GridBulkEditorModuleContext=B,exports.GridContainerContext=P,exports.GridContextMenu=tu,exports.GridCustomCell=rc,exports.GridCustomCellModuleContext=V,exports.GridFilter=ca,exports.GridFilterModuleContext=F,exports.GridFooter=Fa,exports.GridInstanceContext=L,exports.GridNotificationContext=v1,exports.GridNotificationKey=y1,exports.GridNotificationProvider=x1,exports.GridOptionModal=pa,exports.GridRendererContext=O,exports.GridSearchInput=Te,exports.GridSort=da,exports.GridSortModuleContext=z,exports.GridTemplateRegistryContext=R,exports.GridToolBox=xa,exports.GroupTemplate=class{constructor(e){this.component=e}attach(e){return e.register({type:"group",component:this.component}),()=>e.unregister("group")}},exports.HeaderTemplate=class{constructor(e,t){this.fieldId=e,this.component=t}attach(e){return e.register({type:"header",fieldId:this.fieldId,component:this.component}),()=>e.unregister("header",this.fieldId)}},exports.IconAdd=pe,exports.IconArrowDownWithTail=ye,exports.IconArrowLeft=fe,exports.IconArrowLeftWithTail=me,exports.IconArrowRight=ge,exports.IconArrowUpCenter=ne,exports.IconArrowUpWithTail=ve,exports.IconChart=be,exports.IconClose=he,exports.IconCustomCell=se,exports.IconDownload=ce,exports.IconDragHandler=xe,exports.IconFilter=ie,exports.IconInfoFilled=we,exports.IconReset=_e,exports.IconResetGridToolbar=re,exports.IconSearch=de,exports.IconSetting=oe,exports.IconSort=ae,exports.IconToastWarning=function({size:e="30",color:t="#fa9e23",...n}){const i=te(e,"30");return a.jsx("svg",{width:i.width,height:i.height,viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:a.jsx("path",{d:"M29.5313 23.2669L17.9663 3.29813C17.6654 2.77759 17.2329 2.34536 16.7122 2.04487C16.1914 1.74437 15.6008 1.58618 14.9995 1.58618C14.3983 1.58618 13.8077 1.74437 13.2869 2.04487C12.7662 2.34536 12.3337 2.77759 12.0328 3.29813L0.468764 23.2669C0.166554 23.7878 0.00699555 24.3793 0.00616779 24.9815C0.00534002 25.5838 0.163272 26.1757 0.464049 26.6975C0.764826 27.2193 1.19782 27.6526 1.71941 27.9537C2.24099 28.2549 2.83274 28.4132 3.43501 28.4128H26.565C27.1673 28.4132 27.759 28.2549 28.2806 27.9537C28.8022 27.6526 29.2352 27.2193 29.536 26.6975C29.8368 26.1757 29.9947 25.5838 29.9939 24.9815C29.993 24.3793 29.8335 23.7878 29.5313 23.2669ZM16.4841 23.6044C16.4841 23.702 16.4648 23.7986 16.4273 23.8887C16.3899 23.9788 16.335 24.0606 16.2658 24.1294C16.1967 24.1982 16.1146 24.2527 16.0243 24.2897C15.934 24.3267 15.8373 24.3455 15.7397 24.345H14.2556C14.0593 24.3448 13.8711 24.2666 13.7322 24.1278C13.5934 23.989 13.5153 23.8007 13.515 23.6044V22.1203C13.515 21.9235 13.5929 21.7348 13.7317 21.5953C13.8705 21.4558 14.0589 21.3769 14.2556 21.3759H15.7406C15.8384 21.3758 15.9353 21.395 16.0256 21.4324C16.116 21.4697 16.1981 21.5245 16.2673 21.5937C16.3364 21.6628 16.3912 21.7449 16.4286 21.8353C16.466 21.9257 16.4851 22.0225 16.485 22.1203L16.4841 23.6044ZM16.4841 18.6431C16.4841 18.7407 16.4648 18.8373 16.4273 18.9274C16.3899 19.0175 16.335 19.0993 16.2658 19.1682C16.1967 19.237 16.1146 19.2915 16.0243 19.3285C15.934 19.3655 15.8373 19.3842 15.7397 19.3838H14.2556C14.0593 19.3835 13.8711 19.3054 13.7322 19.1666C13.5934 19.0277 13.5153 18.8395 13.515 18.6431V10.0013C13.515 9.80448 13.5929 9.61571 13.7317 9.47622C13.8705 9.33673 14.0589 9.25787 14.2556 9.25688H15.7406C15.8384 9.25675 15.9353 9.27592 16.0256 9.31329C16.116 9.35065 16.1981 9.40548 16.2673 9.47462C16.3364 9.54377 16.3912 9.62588 16.4286 9.71625C16.466 9.80661 16.4851 9.90346 16.485 10.0013L16.4841 18.6431Z",fill:t})})},exports.Input=Zo,exports.MozConfigProvider=function({locale:e=y,contextWrapper:t,children:n}){return a.jsx(x.Provider,{value:e,children:a.jsx(b.Provider,{value:t??null,children:n})})},exports.MozContextWrapperContext=b,exports.MozGrid=I,exports.MozGridReact=oc,exports.MozGridReactCore=q,exports.MozLocaleContext=x,exports.MozPivotChart=f1,exports.MozPivotReact=g1,exports.MultiSelect=lu,exports.NumberInput=qo,exports.PivotChartDetail=p1,exports.PivotChartMini=d1,exports.PivotChartMultiple=h1,exports.PivotChartToolbar=qd,exports.PivotContextMenu=Xd,exports.PivotFieldPanel=zd,exports.PivotGrid=g1,exports.PivotOptionModal=Pd,exports.PivotToolBox=kd,exports.Popup=Zn,exports.ReactRenderer=v,exports.Select=Ho,exports.Toggle=ha,exports.buildFieldDefs=S,exports.cn=k,exports.createTemplateRegistry=C,exports.downloadBlob=function(e,t){const n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>URL.revokeObjectURL(n),1e3)},exports.draggingEventBus=ac,exports.enUS={Popup:{title:"Popup",save:"Save",cancel:"Cancel",ok:"OK",close:"Close"},Select:{searchPlaceholder:"Search",emptyText:"No data",requiredMessage:"{label} is required"},MultiSelect:{search:"Search",selectAll:"Select All",selectFiltered:"Select Filtered",specificResults:"Only Results",specificSelect:"Only",noData:"No data",required:"{label} is required",headerFormat:"ITEMS ({count})"},TreeSelect:{search:"Search",selectAll:"Select All",selectFiltered:"Select Filtered",specificResults:"Only Results",noData:"No data",showSelectedOnly:"Show selected only",expandAll:"Expand All",collapseAll:"Collapse All",required:"{label} is required",headerFormat:"ITEMS ({count})"},TagInput:{add:"Add"},TimePicker:{hour:"Hour",minute:"Minute",currentTime:"Current Time"},EmptyState:{customEmptyHeader:"No data",customEmptyContent:"There is no data to display.",dataEmptyHeader:"No data to display",dataEmptyContent:"Please enter the required data.",resultEmptyHeader:"No results",resultEmptyContent:"Check the search conditions and try again.",searchEmptyHeader:"No search results",searchEmptyContent:"Please check the filter value and try again."},TableSelect:{searchPlaceholder:"Search",emptyText:"No data",requiredMessage:"{label} is required",footerSelect:"Select",footerNavigate:"Navigate",footerClose:"Close"},Common:{requiredMessage:"{label} is required"},Grid:{layoutSetting:"Layout Settings",filter:"Filter",sort:"Sort",customCellStyle:"Conditional Formatting",reset:"Reset",searchFilter:"Search",newView:"New View",selectAll:"Select All",columnPicker:"Show/Hide Columns",viewToolbar:"Show Toolbar",viewFooter:"Show Footer",viewGroupPanel:"Show Group Panel",resetFilterAndSort:"Reset Filter & Sort",defaultView:"Default View",filterPopup:"Filter Settings",resetFilter:"Reset Filter",addFilter:"Add Filter",sortingPopup:"Sort Settings",ascending:"Ascending",descending:"Descending",resetSort:"Reset Sort",addSort:"Add Sort",symbolEqual:"Equal",symbolNotEqual:"Not Equal",symbolContains:"Contains",symbolNotContains:"Does Not Contain",symbolLessThan:"Less Than",symbolGreaterThan:"Greater Than",symbolLessOrEqual:"Less Or Equal",symbolGreaterOrEqual:"Greater Or Equal",symbolEmpty:"Empty",symbolNotEmpty:"Not Empty",customCellRuleNamePlaceholder:"Enter rule name",addFormulaCondition:"Add Condition",applicationColumn:"Application Column",backgroundColor:"Background Color",fontColor:"Font Color",resetCustomCell:"Reset",addFormulaConditionSet:"Add Rule",customColor:"Custom Color",formulaConditionSet:"New Rule",contextFilterAndSort:"Filter & Sort",contextAddFilter:"Add Filter",contextSelectFilter:"Filter by Selection",contextResetColumnFilter:"Reset Column Filter",contextResetColumnSort:"Reset Column Sort",contextResetColumnAll:"Reset Column Filter/Sort",contextDataCopy:"Copy",contextDataExcelCopy:"Copy for Excel",contextDataWithHeaderCopy:"Copy with Header",contextPin:"Pin Column",contextColumnPicker:"Column Picker",contextMoveColumnFirst:"Move to First Column",contextAutoSizeColumns:"Auto Size Columns",contextGroupPanel:"Group Panel",contextGroupToggle:"Toggle Collapse",contextGroupCollapseAll:"Collapse All Groups",contextGroupExpandAll:"Expand All Groups",groupPanelPlaceholder:"Drag and drop columns here to create groups.",contextBulkEdit:"Bulk Edit {name}",contextImport:"Import",contextImportExcel:"Import Excel (Overwrite)",contextImportExcelAppend:"Import Excel (Append)",contextExport:"Export",contextExportXlsx:"Excel (xlsx)",contextExportCsv:"CSV",contextSum:"Sum",check:"OK",cancel:"Cancel",save:"Save",remove:"Delete",close:"Close",pause:"Pause",add:"Add",immediateApply:"Apply Immediately",warning:"Warning",mozWarning:"Warning",confirmCancel:"Are you sure you want to cancel?",alreadyExcelProgress:"Excel operation is already in progress.",downloadFail:"Download failed.",addDataWithFilterSort:"Add data while filter/sort is applied?",resetAndAdd:"Reset and Add",confirmDeleteGeneral:"Are you sure you want to delete {name}?",toastCopySuccess:"Copied.",toastSaveSuccess:"Saved.",toastSaveError:"Save failed.",toastResetSuccess:"Reset.",toastRequiredVal:"Please enter the required values.",excelInvalidExcel:"Invalid Excel file.",excelInvalidUpload:"Invalid upload data.",downloadFormat:"Download Format",click:"Click",drag:"Drag",overwriteSelected:"Overwrite selected items?",fileOverwrite:"Overwrite the file?",dropHere:"Drop here",dropHerePrefix:"",dropHereMiddle:" here or ",dropHereSuffix:" a file.",withFormatting:"With Formatting",requestTimedOut:"Request timed out.",serverError:"A server error occurred.",total:"Total",correct:"Correct",error:"Error",success:"Success",fail:"Fail",excelExportConfirmLargeData:"Export large data?",footerTotalRowCount:"Total: {totalRowCount}",footerFilteredRowCount:"{filterdRowCount} / {totalRowCount}",aggregateAverage:"Average",aggregateCount:"Count",aggregateMin:"Min",aggregateMax:"Max",aggregateSum:"Sum"},GridPivot:{setting:"Pivot Settings",gridSetting:"Grid Settings",fieldSetting:"Field Settings",showRowTotals:"Show Row Totals",showColumnTotals:"Show Column Totals",subtotalCriteria:"Subtotal Criteria",subtotalAggregateField:"Subtotal Aggregate Field",totalsBeforeData:"Show Totals Before Data",showZeros:"Show Zeros",showOutlineMode:"Outline Mode",collapsibleSubtotal:"Collapsible Subtotal",fieldName:"Field Name",fieldAggregate:"Aggregate",fieldShowAs:"Show As",fieldFormat:"Format",openChart:"Open Chart",selectValueField:"Select Value Field",none:"None",sum:"Sum",count:"Count",average:"Average",max:"Max",min:"Min",range:"Range",std:"Std Dev",var:"Variance",stdPop:"Pop Std Dev",varPop:"Pop Variance",cntAll:"Count All",showFirstValue:"First Value",showLastValue:"Last Value",noCalculation:"No Calculation",diffRow:"Diff from Previous Row",diffRowPct:"Diff from Previous Row (%)",diffCol:"Diff from Previous Column",diffColPct:"Diff from Previous Column (%)",grandtotalPct:"% of Grand Total",rowTotalPct:"% of Row Total",colTotalPct:"% of Column Total",prevRowPct:"% of Previous Row",prevColPct:"% of Previous Column",runTot:"Running Total",runTotPct:"Running Total (%)",generalFormat:"General",int:"Integer",float:"Decimal",currency:"Currency",percentage:"Percentage",percentageDot2:"Percentage (2 decimals)",thousands:"Thousands",millions:"Millions",billions:"Billions",subtotal:"Subtotal",grandtotal:"Grand Total",grandtotalValue:"Grand Total",category:"Category",chartType:"Chart Type",chartXAxis:"X Axis",chartYAxis:"Y Axis",categoryName:"Category Name",barChart:"Bar Chart",lineChart:"Line Chart",lineSymbolChart:"Symbol Line Chart",areaChart:"Area Chart",chartRenderingErrorHeader:"Chart Rendering Error",chartRenderingErrorContent:"Unable to display the chart.",contextPivotExportXlsx:"View Export (xlsx)",contextPivotExportOriginXlsx:"Source Data Export (xlsx)",contextPivotExportOriginCsv:"Source Data Export (csv)",row:"Rows",column:"Columns",value:"Values",filter:"Filters",searchFieldPlaceholder:"Search fields...",dropZoneRowPlaceholder:"Drag row axis fields here",dropZoneColumnPlaceholder:"Drag column axis fields here",dropZoneValuePlaceholder:"Drag value fields here",dropZoneFilterPlaceholder:"Drag filter fields here",update:"Update",selectFieldForReport:"Choose fields to add to report:",dragFieldsBetweenAreas:"Drag fields between areas below:",valueSummaryCriteria:"Summarize Values By"},Gantt:{searchPlaceholder:"Search",columnSize:"Column Size",rowSize:"Row Size"},Chart:{filterPopup:"Filter",resetFilter:"Reset Filter",addFilter:"Add Filter",symbolEqual:"Equal",symbolNotEqual:"Not Equal",symbolContains:"Contains",symbolNotContains:"Not Contains",symbolLessThan:"Less Than",symbolGreaterThan:"Greater Than",symbolLessOrEqual:"Less or Equal",symbolGreaterOrEqual:"Greater or Equal",symbolEmpty:"Empty",symbolNotEmpty:"Not Empty",chartSetting:"Chart Setting",chartCategory:"Chart Category",chartType:"Chart Type",chartUseZoom:"Use Zoom",multiYAxisSetting:"Multi Y-Axis Setting",notUsed:"(Not Used)",chartPopup:"Chart Popup",errorMessage:"An error occurred while loading data.",valueFieldSetting:"Value Field Setting",valueSummaryCriteria:"Value Summary Criteria",selectFieldForReport:"Select fields to add to the report:",column:"Column",row:"Row",value:"Value",sumValue:"∑ Value",count:"Count",sum:"Sum",average:"Average",min:"Min",max:"Max",seriesCategory:"General",pieCategory:"Pie",scatterCategory:"Scatter",treemapCategory:"Treemap",boxplotCategory:"Boxplot",candlestickCategory:"Candlestick",barChart:"Bar Chart",stackBarChart:"Stack Bar Chart",horizontalStackBarChart:"Horizontal Stack Bar Chart",lineChart:"Line Chart",lineSymbolChart:"Line Chart (Symbol)",areaChart:"Area Chart",general:"General",custom:"Custom",axisCategoryLabel:"Axis (Category)",legendSeriesLabel:"Legend (Series)",legendSingleLabel:"Legend (Single)",legendMultiLabel:"Legend (Multiple)",valueSingleLabel:"Value (Single)",xAxisSingleLabel:"X-Axis (Single)",yAxisMultiLabel:"Y-Axis (Multiple)",notSet:"Not Set"}},exports.exportCsv=Zd,exports.formatMessage=N,exports.generateSessionId=function(){return Ud+=1,`excel-${Date.now()}-${Ud}`},exports.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},exports.jaJP={Popup:{title:"ポップアップ",save:"保存",cancel:"キャンセル",ok:"OK",close:"閉じる"},Select:{searchPlaceholder:"検索",emptyText:"データがありません",requiredMessage:"{label} は必須です"},MultiSelect:{search:"検索",selectAll:"すべて選択",selectFiltered:"フィルター結果を選択",specificResults:"結果のみ",specificSelect:"選択のみ",noData:"データがありません",required:"{label} は必須です",headerFormat:"項目 ({count})"},TreeSelect:{search:"検索",selectAll:"すべて選択",selectFiltered:"フィルター結果を選択",specificResults:"結果のみ",noData:"データがありません",showSelectedOnly:"選択項目のみ表示",expandAll:"すべて展開",collapseAll:"すべて折りたたむ",required:"{label} は必須です",headerFormat:"項目 ({count})"},TagInput:{add:"追加"},TimePicker:{hour:"時",minute:"分",currentTime:"現在時刻"},EmptyState:{customEmptyHeader:"データなし",customEmptyContent:"表示するデータがありません。",dataEmptyHeader:"表示するデータがありません",dataEmptyContent:"必要なデータを入力してください。",resultEmptyHeader:"結果なし",resultEmptyContent:"検索条件を確認して再度お試しください。",searchEmptyHeader:"検索結果なし",searchEmptyContent:"フィルター値を確認して再度お試しください。"},TableSelect:{searchPlaceholder:"検索",emptyText:"データがありません",requiredMessage:"{label} は必須です",footerSelect:"選択",footerNavigate:"移動",footerClose:"閉じる"},Common:{requiredMessage:"{label} は必須です"},Grid:{layoutSetting:"レイアウト設定",filter:"フィルター",sort:"ソート",customCellStyle:"条件付き書式設定",reset:"リセット",searchFilter:"検索",newView:"新しいビュー",selectAll:"すべて選択",columnPicker:"列の表示/非表示設定",viewToolbar:"ツールバー表示",viewFooter:"フッター表示",viewGroupPanel:"グループパネル表示",resetFilterAndSort:"フィルター・ソートリセット",defaultView:"デフォルトビュー",filterPopup:"フィルター設定",resetFilter:"フィルターリセット",addFilter:"フィルター追加",sortingPopup:"ソート設定",ascending:"昇順",descending:"降順",resetSort:"ソートリセット",addSort:"ソート追加",symbolEqual:"等しい",symbolNotEqual:"等しくない",symbolContains:"含む",symbolNotContains:"含まない",symbolLessThan:"より小さい",symbolGreaterThan:"より大きい",symbolLessOrEqual:"以下",symbolGreaterOrEqual:"以上",symbolEmpty:"空",symbolNotEmpty:"空でない",customCellRuleNamePlaceholder:"ルール名を入力してください",addFormulaCondition:"条件追加",applicationColumn:"適用列",backgroundColor:"背景色",fontColor:"フォント色",resetCustomCell:"リセット",addFormulaConditionSet:"ルールを追加",customColor:"カスタム色",formulaConditionSet:"新しいルール",contextFilterAndSort:"フィルター・ソート",contextAddFilter:"フィルター追加",contextSelectFilter:"選択値でフィルター",contextResetColumnFilter:"列フィルターリセット",contextResetColumnSort:"列ソートリセット",contextResetColumnAll:"列フィルター/ソートリセット",contextDataCopy:"コピー",contextDataExcelCopy:"Excelコピー",contextDataWithHeaderCopy:"ヘッダー付きコピー",contextPin:"列固定",contextColumnPicker:"列選択",contextMoveColumnFirst:"最初の列に移動",contextAutoSizeColumns:"列幅自動調整",contextGroupPanel:"グループパネル",contextGroupToggle:"グループ折りたたみ/展開",contextGroupCollapseAll:"すべてのグループを折りたたむ",contextGroupExpandAll:"すべてのグループを展開",groupPanelPlaceholder:"列をドラッグ&ドロップしてグループを作成します。",contextBulkEdit:"{name} 一括編集",contextImport:"インポート",contextImportExcel:"Excelインポート(上書き)",contextImportExcelAppend:"Excelインポート(追加)",contextExport:"エクスポート",contextExportXlsx:"Excel (xlsx)",contextExportCsv:"CSV",contextSum:"合計",check:"確認",cancel:"キャンセル",save:"保存",remove:"削除",close:"閉じる",pause:"一時停止",add:"追加",immediateApply:"すぐに適用",warning:"警告",mozWarning:"警告",confirmCancel:"キャンセルしますか?",alreadyExcelProgress:"Excel操作が進行中です。",downloadFail:"ダウンロードに失敗しました。",addDataWithFilterSort:"フィルター/ソート適用中にデータを追加しますか?",resetAndAdd:"リセットして追加",confirmDeleteGeneral:"{name}を削除しますか?",toastCopySuccess:"コピーしました。",toastSaveSuccess:"保存しました。",toastSaveError:"保存に失敗しました。",toastResetSuccess:"リセットしました。",toastRequiredVal:"必須値を入力してください。",excelInvalidExcel:"無効なExcelファイルです。",excelInvalidUpload:"無効なアップロードデータです。",downloadFormat:"フォーマットダウンロード",click:"クリック",drag:"ドラッグ",overwriteSelected:"選択項目を上書きしますか?",fileOverwrite:"ファイルを上書きしますか?",dropHere:"ここにドロップ",dropHerePrefix:"ここを",dropHereMiddle:"またはファイルを",dropHereSuffix:"してください。",withFormatting:"書式付き",requestTimedOut:"リクエストがタイムアウトしました。",serverError:"サーバーエラーが発生しました。",total:"合計",correct:"正常",error:"エラー",success:"成功",fail:"失敗",excelExportConfirmLargeData:"大量データをエクスポートしますか?",footerTotalRowCount:"合計: {totalRowCount}",footerFilteredRowCount:"{filterdRowCount} / {totalRowCount}",aggregateAverage:"平均",aggregateCount:"件数",aggregateMin:"最小値",aggregateMax:"最大値",aggregateSum:"合計"},GridPivot:{setting:"ピボット設定",gridSetting:"グリッド設定",fieldSetting:"フィールド設定",showRowTotals:"行合計表示",showColumnTotals:"列合計表示",subtotalCriteria:"小計基準",subtotalAggregateField:"小計集計フィールド",totalsBeforeData:"データ前に合計表示",showZeros:"ゼロ表示",showOutlineMode:"アウトラインモード",collapsibleSubtotal:"小計折りたたみ",fieldName:"フィールド名",fieldAggregate:"集計",fieldShowAs:"表示方式",fieldFormat:"形式",openChart:"チャートを開く",selectValueField:"値フィールド選択",none:"なし",sum:"合計",count:"個数",average:"平均",max:"最大値",min:"最小値",range:"範囲",std:"標準偏差",var:"分散",stdPop:"母標準偏差",varPop:"母分散",cntAll:"全個数",showFirstValue:"最初の値",showLastValue:"最後の値",noCalculation:"計算なし",diffRow:"前の行との差",diffRowPct:"前の行との差 (%)",diffCol:"前の列との差",diffColPct:"前の列との差 (%)",grandtotalPct:"総計に対する割合",rowTotalPct:"行合計に対する割合",colTotalPct:"列合計に対する割合",prevRowPct:"前の行に対する割合",prevColPct:"前の列に対する割合",runTot:"累計",runTotPct:"累計割合",generalFormat:"一般",int:"整数",float:"小数",currency:"通貨",percentage:"パーセント",percentageDot2:"パーセント(小数2桁)",thousands:"千単位",millions:"百万単位",billions:"十億単位",subtotal:"小計",grandtotal:"総計",grandtotalValue:"総合計",category:"カテゴリ",chartType:"チャートタイプ",chartXAxis:"X軸",chartYAxis:"Y軸",categoryName:"カテゴリ名",barChart:"棒グラフ",lineChart:"折れ線グラフ",lineSymbolChart:"シンボル折れ線グラフ",areaChart:"エリアチャート",chartRenderingErrorHeader:"チャートレンダリングエラー",chartRenderingErrorContent:"チャートを表示できません。",contextPivotExportXlsx:"ビューエクスポート (xlsx)",contextPivotExportOriginXlsx:"元データエクスポート (xlsx)",contextPivotExportOriginCsv:"元データエクスポート (csv)",row:"行",column:"列",value:"値",filter:"フィルター",searchFieldPlaceholder:"フィールド検索...",dropZoneRowPlaceholder:"行軸フィールドをドラッグしてください",dropZoneColumnPlaceholder:"列軸フィールドをドラッグしてください",dropZoneValuePlaceholder:"値フィールドをドラッグしてください",dropZoneFilterPlaceholder:"フィルターフィールドをドラッグしてください",update:"更新",selectFieldForReport:"レポートに追加するフィールドを選択:",dragFieldsBetweenAreas:"下の領域間にフィールドをドラッグしてください:",valueSummaryCriteria:"値の集計方法"},Gantt:{searchPlaceholder:"検索",columnSize:"列サイズ",rowSize:"行サイズ"},Chart:{filterPopup:"フィルター",resetFilter:"フィルターリセット",addFilter:"フィルター追加",symbolEqual:"等しい",symbolNotEqual:"等しくない",symbolContains:"含む",symbolNotContains:"含まない",symbolLessThan:"より小さい",symbolGreaterThan:"より大きい",symbolLessOrEqual:"以下",symbolGreaterOrEqual:"以上",symbolEmpty:"空",symbolNotEmpty:"空でない",chartSetting:"チャート設定",chartCategory:"チャートカテゴリ",chartType:"チャートタイプ",chartUseZoom:"ズーム使用",multiYAxisSetting:"Y軸マルチ設定",notUsed:"(使用しない)",chartPopup:"チャートポップアップ",errorMessage:"データの読み込み中にエラーが発生しました。",valueFieldSetting:"値フィールド設定",valueSummaryCriteria:"値集計基準",selectFieldForReport:"レポートに追加するフィールドを選択:",column:"列",row:"行",value:"値",sumValue:"∑ 値",count:"件数",sum:"合計",average:"平均",min:"最小値",max:"最大値",seriesCategory:"一般",pieCategory:"パイ",scatterCategory:"散布図",treemapCategory:"ツリーマップ",boxplotCategory:"ボックスプロット",candlestickCategory:"ローソク足",barChart:"棒グラフ",stackBarChart:"スタック棒グラフ",horizontalStackBarChart:"横スタック棒グラフ",lineChart:"折れ線グラフ",lineSymbolChart:"折れ線グラフ(シンボル)",areaChart:"エリアチャート",general:"一般",custom:"カスタム",axisCategoryLabel:"軸 (カテゴリ)",legendSeriesLabel:"凡例 (シリーズ)",legendSingleLabel:"凡例 (単一選択)",legendMultiLabel:"凡例 (複数選択可)",valueSingleLabel:"値 (単一選択)",xAxisSingleLabel:"X軸 (単一選択)",yAxisMultiLabel:"Y軸 (複数選択可)",notSet:"未指定"}},exports.koKR=y,exports.pickFile=m1,exports.provideGridNotification=function(e){return e},exports.pxToRem=A,exports.runClientExport=Yd,exports.shallowEqual=function(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0},exports.toEChartsOption=c1,exports.uniqueId=function(e=""){return E+=1,`${e}${E}`},exports.useCellTooltip=function(){return{grid:Y()}},exports.useClientExcelStore=Hd,exports.useContextMenu=Oa,exports.useGridBulkEditor=La,exports.useGridChanges=function(){const e=Y(),[t,n]=s.useState([]);return s.useEffect(()=>{if(!e)return;const t=e.on("cell:change",e=>n(t=>[...t,e]));return()=>t()},[e]),{changes:t,clear:()=>n([])}},exports.useGridColumns=function(){const e=Y(),[t,n]=s.useState([]),i=()=>{var t;if(!e)return;const i=e.columns;n((null==(t=null==i?void 0:i.getStates)?void 0:t.call(i))??[])};return s.useEffect(()=>{if(!e)return;i();const t=["column:resize","column:reorder","column:pin","column:visibility"].map(t=>e.on(t,i));return()=>t.forEach(e=>e())},[e]),{columns:t,refresh:i}},exports.useGridCustomCell=Aa,exports.useGridEvents=function(e){const t=Y();s.useEffect(()=>{if(!t)return;const n=[];for(const[i,r]of Object.entries(e))r&&n.push(t.on(i,r));return()=>n.forEach(e=>e())},[t])},exports.useGridFilter=ma,exports.useGridInstance=Y,exports.useGridNotificationStore=function(){return s.useContext(v1)},exports.useGridSelect=function(){const e=Y();return{selectAll:s.useCallback(()=>{var t;null==(t=null==e?void 0:e.selectAll)||t.call(e)},[e]),deselectAll:s.useCallback(()=>{var t;null==(t=null==e?void 0:e.deselectAll)||t.call(e)},[e]),selectRow:s.useCallback(t=>{var n;null==(n=null==e?void 0:e.selectRow)||n.call(e,t)},[e])}},exports.useGridSelection=function(){const e=Y(),[t,n]=s.useState(null);return s.useEffect(()=>{if(!e)return;const t=e.on("selection:changed",e=>n(e));return()=>t()},[e]),t},exports.useGridSort=va,exports.useGridUndoRedo=function(){const e=Y(),[t,n]=s.useState(!1),[i,r]=s.useState(!1);return s.useEffect(()=>{if(!e)return;const t=e.on("undo:stateChange",e=>{const t=e;n(!!(null==t?void 0:t.canUndo)),r(!!(null==t?void 0:t.canRedo))});return()=>t()},[e]),{canUndo:t,canRedo:i,undo:s.useCallback(()=>{var t;null==(t=null==e?void 0:e.undo)||t.call(e)},[e]),redo:s.useCallback(()=>{var t;null==(t=null==e?void 0:e.redo)||t.call(e)},[e])}},exports.useGridValidation=function(){const e=Y(),[t,n]=s.useState([]);return s.useEffect(()=>{if(!e)return;const t=e.on("validation:changed",e=>{const t=Array.isArray(e)?e:[];n(t)});return()=>t()},[e]),{errors:t,hasErrors:t.length>0}},exports.useMozContextWrapper=w,exports.useMozLocale=_,exports.useSearchHighlight=X,exports.zhCN={Popup:{title:"弹窗",save:"保存",cancel:"取消",ok:"确认",close:"关闭"},Select:{searchPlaceholder:"搜索",emptyText:"暂无数据",requiredMessage:"{label} 为必填项"},MultiSelect:{search:"搜索",selectAll:"全选",selectFiltered:"选择筛选结果",specificResults:"仅结果",specificSelect:"仅选择",noData:"暂无数据",required:"{label} 为必填项",headerFormat:"项目 ({count})"},TreeSelect:{search:"搜索",selectAll:"全选",selectFiltered:"选择筛选结果",specificResults:"仅结果",noData:"暂无数据",showSelectedOnly:"仅显示已选项",expandAll:"全部展开",collapseAll:"全部收起",required:"{label} 为必填项",headerFormat:"项目 ({count})"},TagInput:{add:"添加"},TimePicker:{hour:"时",minute:"分",currentTime:"当前时间"},EmptyState:{customEmptyHeader:"暂无数据",customEmptyContent:"没有可显示的数据。",dataEmptyHeader:"暂无数据",dataEmptyContent:"请输入所需数据。",resultEmptyHeader:"无结果",resultEmptyContent:"请检查搜索条件后重试。",searchEmptyHeader:"无搜索结果",searchEmptyContent:"请检查筛选条件后重试。"},TableSelect:{searchPlaceholder:"搜索",emptyText:"暂无数据",requiredMessage:"{label} 为必填项",footerSelect:"选择",footerNavigate:"移动",footerClose:"关闭"},Common:{requiredMessage:"{label} 为必填项"},Grid:{layoutSetting:"布局设置",filter:"筛选",sort:"排序",customCellStyle:"条件格式设置",reset:"重置",searchFilter:"搜索",newView:"新建视图",selectAll:"全选",columnPicker:"列显示/隐藏设置",viewToolbar:"显示工具栏",viewFooter:"显示页脚",viewGroupPanel:"显示分组面板",resetFilterAndSort:"重置筛选和排序",defaultView:"默认视图",filterPopup:"筛选设置",resetFilter:"重置筛选",addFilter:"添加筛选",sortingPopup:"排序设置",ascending:"升序",descending:"降序",resetSort:"重置排序",addSort:"添加排序",symbolEqual:"等于",symbolNotEqual:"不等于",symbolContains:"包含",symbolNotContains:"不包含",symbolLessThan:"小于",symbolGreaterThan:"大于",symbolLessOrEqual:"小于或等于",symbolGreaterOrEqual:"大于或等于",symbolEmpty:"为空",symbolNotEmpty:"不为空",customCellRuleNamePlaceholder:"请输入规则名称",addFormulaCondition:"添加条件",applicationColumn:"应用列",backgroundColor:"背景色",fontColor:"字体颜色",resetCustomCell:"重置",addFormulaConditionSet:"添加规则",customColor:"自定义颜色",formulaConditionSet:"新建规则",contextFilterAndSort:"筛选和排序",contextAddFilter:"添加筛选",contextSelectFilter:"按选定值筛选",contextResetColumnFilter:"重置列筛选",contextResetColumnSort:"重置列排序",contextResetColumnAll:"重置列筛选/排序",contextDataCopy:"复制",contextDataExcelCopy:"Excel 复制",contextDataWithHeaderCopy:"含表头复制",contextPin:"固定列",contextColumnPicker:"列选择",contextMoveColumnFirst:"移至第一列",contextAutoSizeColumns:"自动调整列宽",contextGroupPanel:"分组面板",contextGroupToggle:"折叠/展开组",contextGroupCollapseAll:"折叠所有组",contextGroupExpandAll:"展开所有组",groupPanelPlaceholder:"将列拖放到此处以创建分组。",contextBulkEdit:"批量编辑 {name}",contextImport:"导入",contextImportExcel:"Excel 导入(覆盖)",contextImportExcelAppend:"Excel 导入(追加)",contextExport:"导出",contextExportXlsx:"Excel (xlsx)",contextExportCsv:"CSV",contextSum:"合计",check:"确认",cancel:"取消",save:"保存",remove:"删除",close:"关闭",pause:"暂停",add:"添加",immediateApply:"立即应用",warning:"警告",mozWarning:"警告",confirmCancel:"确定要取消吗?",alreadyExcelProgress:"Excel 操作正在进行中。",downloadFail:"下载失败。",addDataWithFilterSort:"在筛选/排序状态下添加数据?",resetAndAdd:"重置后添加",confirmDeleteGeneral:"确定要删除 {name} 吗?",toastCopySuccess:"已复制。",toastSaveSuccess:"已保存。",toastSaveError:"保存失败。",toastResetSuccess:"已重置。",toastRequiredVal:"请输入必填值。",excelInvalidExcel:"无效的 Excel 文件。",excelInvalidUpload:"无效的上传数据。",downloadFormat:"下载格式",click:"点击",drag:"拖拽",overwriteSelected:"覆盖选定项?",fileOverwrite:"覆盖文件?",dropHere:"拖放到此处",dropHerePrefix:"",dropHereMiddle:"此处或",dropHereSuffix:"文件。",withFormatting:"包含格式",requestTimedOut:"请求超时。",serverError:"服务器发生错误。",total:"总计",correct:"正常",error:"错误",success:"成功",fail:"失败",excelExportConfirmLargeData:"确定导出大量数据?",footerTotalRowCount:"总计: {totalRowCount}",footerFilteredRowCount:"{filterdRowCount} / {totalRowCount}",aggregateAverage:"平均",aggregateCount:"计数",aggregateMin:"最小值",aggregateMax:"最大值",aggregateSum:"合计"},GridPivot:{setting:"数据透视设置",gridSetting:"网格设置",fieldSetting:"字段设置",showRowTotals:"显示行合计",showColumnTotals:"显示列合计",subtotalCriteria:"小计基准",subtotalAggregateField:"小计汇总字段",totalsBeforeData:"在数据前显示合计",showZeros:"显示零值",showOutlineMode:"大纲模式",collapsibleSubtotal:"可折叠小计",fieldName:"字段名称",fieldAggregate:"汇总",fieldShowAs:"显示方式",fieldFormat:"格式",openChart:"打开图表",selectValueField:"选择值字段",none:"无",sum:"求和",count:"计数",average:"平均值",max:"最大值",min:"最小值",range:"范围",std:"标准差",var:"方差",stdPop:"总体标准差",varPop:"总体方差",cntAll:"全部计数",showFirstValue:"第一个值",showLastValue:"最后一个值",noCalculation:"无计算",diffRow:"与前一行的差",diffRowPct:"与前一行的差 (%)",diffCol:"与前一列的差",diffColPct:"与前一列的差 (%)",grandtotalPct:"占总计百分比",rowTotalPct:"占行合计百分比",colTotalPct:"占列合计百分比",prevRowPct:"占前一行百分比",prevColPct:"占前一列百分比",runTot:"累计",runTotPct:"累计百分比",generalFormat:"常规",int:"整数",float:"小数",currency:"货币",percentage:"百分比",percentageDot2:"百分比(2位小数)",thousands:"千位",millions:"百万位",billions:"十亿位",subtotal:"小计",grandtotal:"总计",grandtotalValue:"总合计",category:"类别",chartType:"图表类型",chartXAxis:"X轴",chartYAxis:"Y轴",categoryName:"类别名称",barChart:"柱状图",lineChart:"折线图",lineSymbolChart:"符号折线图",areaChart:"面积图",chartRenderingErrorHeader:"图表渲染错误",chartRenderingErrorContent:"无法显示图表。",contextPivotExportXlsx:"视图导出 (xlsx)",contextPivotExportOriginXlsx:"原始数据导出 (xlsx)",contextPivotExportOriginCsv:"原始数据导出 (csv)",row:"行",column:"列",value:"值",filter:"筛选",searchFieldPlaceholder:"搜索字段...",dropZoneRowPlaceholder:"拖动行轴字段到这里",dropZoneColumnPlaceholder:"拖动列轴字段到这里",dropZoneValuePlaceholder:"拖动值字段到这里",dropZoneFilterPlaceholder:"拖动筛选字段到这里",update:"更新",selectFieldForReport:"选择要添加到报表的字段:",dragFieldsBetweenAreas:"在下面的区域之间拖动字段:",valueSummaryCriteria:"值汇总依据"},Gantt:{searchPlaceholder:"搜索",columnSize:"列大小",rowSize:"行大小"},Chart:{filterPopup:"筛选",resetFilter:"重置筛选",addFilter:"添加筛选",symbolEqual:"等于",symbolNotEqual:"不等于",symbolContains:"包含",symbolNotContains:"不包含",symbolLessThan:"小于",symbolGreaterThan:"大于",symbolLessOrEqual:"小于等于",symbolGreaterOrEqual:"大于等于",symbolEmpty:"为空",symbolNotEmpty:"不为空",chartSetting:"图表设置",chartCategory:"图表类别",chartType:"图表类型",chartUseZoom:"使用缩放",multiYAxisSetting:"Y轴多轴设置",notUsed:"(未使用)",chartPopup:"图表弹窗",errorMessage:"加载数据时发生错误。",valueFieldSetting:"值字段设置",valueSummaryCriteria:"值汇总基准",selectFieldForReport:"选择要添加到报表的字段:",column:"列",row:"行",value:"值",sumValue:"∑ 值",count:"计数",sum:"合计",average:"平均",min:"最小值",max:"最大值",seriesCategory:"常规",pieCategory:"饼图",scatterCategory:"散点图",treemapCategory:"树状图",boxplotCategory:"箱线图",candlestickCategory:"K线图",barChart:"柱状图",stackBarChart:"堆叠柱状图",horizontalStackBarChart:"水平堆叠柱状图",lineChart:"折线图",lineSymbolChart:"折线图(符号)",areaChart:"面积图",general:"常规",custom:"自定义",axisCategoryLabel:"轴 (类别)",legendSeriesLabel:"图例 (系列)",legendSingleLabel:"图例 (单选)",legendMultiLabel:"图例 (多选)",valueSingleLabel:"值 (单选)",xAxisSingleLabel:"X轴 (单选)",yAxisMultiLabel:"Y轴 (多选)",notSet:"未指定"}};
|
|
1
|
+
"use strict";var e=Object.defineProperty,t=(t,o,n)=>((t,o,n)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[o]=n)(t,"symbol"!=typeof o?o+"":o,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("react"),r=require("@vmscloud/moz-ui-grid-wrapper"),u=require("react-dom/client");class s{constructor(){t(this,"instances",new Map),t(this,"contextWrapper",null),t(this,"lifecycleRoots",new WeakMap)}setContextWrapper(e){this.contextWrapper=e}mount(e,t,o,n={}){let r=this.instances.get(e);if(r&&r.container!==t){const t=r;queueMicrotask(()=>t.root.unmount()),this.instances.delete(e),r=void 0}if(r)return r.component=o,r.props={...n},void this.render(r);r={root:u.createRoot(t),container:t,component:o,props:{...n}},this.instances.set(e,r),this.render(r)}mountInstance(e,t,o){const r=this.lifecycleRoots.get(e);if(r)try{r.unmount()}catch{}const s=u.createRoot(e);this.lifecycleRoots.set(e,s);const i=e=>{const o=n.createElement(t,e);s.render(this.contextWrapper?this.contextWrapper(o):o)};return i(o),{update:e=>i(e),destroy:()=>{queueMicrotask(()=>{this.lifecycleRoots.get(e)===s&&(s.unmount(),this.lifecycleRoots.delete(e))})}}}updateProps(e,t){const o=this.instances.get(e);o&&(o.props={...o.props,...t},this.render(o))}unmount(e){const t=this.instances.get(e);t&&(queueMicrotask(()=>t.root.unmount()),this.instances.delete(e))}unmountByPrefix(e){for(const t of Array.from(this.instances.keys()))t.startsWith(e)&&this.unmount(t)}unmountAll(){for(const[,e]of this.instances)queueMicrotask(()=>e.root.unmount());this.instances.clear()}get size(){return this.instances.size}has(e){return this.instances.has(e)}render(e){const t=n.createElement(e.component,e.props),o=this.contextWrapper?this.contextWrapper(t):t;e.root.render(o)}}const i=n.createContext(null);function c(){return n.useContext(i)}const l=n.createContext(void 0);function a(){return n.useContext(l)}function d(e,t,o){return e.map(e=>{const n={...e},r=t.get("cell",e.id);(null==r?void 0:r.component)&&(n.cellRenderer=function(e,t,o){const n=e=>({value:e.value,rowData:e.rowData,columnId:e.columnId,rowId:e.rowId}),r=(e,r)=>{const u=o.mountInstance(e,t,n(r));return{update:e=>(u.update(n(e)),!0),destroy(){u.destroy()}}};return r.__cellRendererKind="lifecycle",r}(e.id,r.component,o));const u=t.get("header",e.id);(null==u?void 0:u.component)&&(n.headerRenderer=function(e,t,o){return n=>{const r=document.createElement("div");r.style.display="contents";const u=`header:${e}`,s={columnId:n.columnId,header:n.header};return o.mount(u,r,t,s),r}}(e.id,u.component,o));const s=t.get("editor",e.id);return(null==s?void 0:s.component)&&(n.editor=function(e,t,o){return{type:"custom",renderer:n=>{const r=document.createElement("div");r.style.display="contents";const u=`editor:${e}`,s={value:n.value,rowData:n.rowData,columnId:e,onCommit:n.onCommit,onCancel:n.onCancel};return o.mount(u,r,t,s),r},destroy:()=>{o.unmount(`editor:${e}`)}}}(e.id,s.component,o)),n})}const p=[["row:click","onRowClick"],["row:dblclick","onRowDblclick"],["row:pinned","onRowPinned"],["row:unpinned","onRowUnpinned"],["row:reordered","onRowReordered"],["cell:click","onCellClick"],["cell:dblclick","onCellDblclick"],["cell:change","onCellChange"],["cell:beforeEdit","onCellBeforeEdit"],["cell:editCommitting","onCellEditCommitting"],["cell:editCommitted","onCellEditCommitted"],["cell:tooltip","onCellTooltip"],["selection:changed","onSelectionChanged"],["column:resize","onColumnResize"],["column:reorder","onColumnReorder"],["column:pin","onColumnPin"],["column:visibility","onColumnVisibility"],["sort:changed","onSortChanged"],["header:click","onHeaderClick"],["header:sortClick","onHeaderSortClick"],["header:filterClick","onHeaderFilterClick"],["filter:changed","onFilterChanged"],["scroll","onScroll"],["scroll:endReached","onEndReached"],["undo:stateChange","onUndoStateChange"],["clipboard:copy","onClipboardCopy"],["clipboard:paste","onClipboardPaste"],["validation:changed","onValidationChanged"],["columnGroup:toggle","onColumnGroupToggle"],["contextmenu","onContextMenu"],["rowGroup:toggle","onGroupToggle"],["rowGroup:batchToggle","onGroupBatchToggle"]],g=[["tool-left","toolLeft"],["tool-items","toolItems"],["option-popup","optionPopup"],["tool-bottom","toolBottom"],["notification","notification"],["footer","footer"],["empty-state","emptyStateContent"]],m=n.forwardRef(function(e,t){const u=n.useRef(null),i=n.useRef(null),l=n.useRef(null),m=c(),f=n.useRef(m);f.current=m;const h=a(),C=e.locale??h,x=n.useRef(C);x.current=C;const y=n.useRef([]),S=n.useRef({disabled:!0,hasItem:!1}),v=n.useRef(new Set),R=e=>{S.current=e,v.current.forEach(e=>e())},w=n.useRef(e);w.current=e;const M=n.useRef(void 0),T=n.useRef(void 0),b=n.useRef(null),[I,F]=n.useState(0),B=()=>{var e;const t=w.current,o=l.current,n=null==(e=t.coreConfig)?void 0:e.fields;if(o&&n!==M.current){const e=function(){const e=[];function t(e,t){return t?`${e}:${t}`:e}return{register(o){const n=e.findIndex(e=>t(e.type,e.fieldId)===t(o.type,o.fieldId));n>=0?e[n]=o:e.push(o)},unregister(o,n){const r=t(o,n),u=e.findIndex(e=>t(e.type,e.fieldId)===r);u>=0&&e.splice(u,1)},get(o,n){const r=t(o,n);return e.find(e=>t(e.type,e.fieldId)===r)},getAll:t=>e.filter(e=>e.type===t)}}();for(const[o,n]of Object.entries(t.cellTemplates??{}))e.register({type:"cell",fieldId:o,component:n});for(const[o,n]of Object.entries(t.headerTemplates??{}))e.register({type:"header",fieldId:o,component:n});for(const[o,n]of Object.entries(t.editorTemplates??{}))e.register({type:"editor",fieldId:o,component:n});M.current=n,T.current=n?d(n,e,o):void 0}const r={...t.coreConfig??{}},u=T.current;return u&&(r.fields=u),void 0!==x.current&&(r.locale=x.current),r},P=()=>{const e=u.current;if(!e)return;const t=new s;t.setContextWrapper(f.current),l.current=t,M.current=void 0,T.current=void 0;const c=new r.GridChrome(e,B(),(e=>{const t=w.current,r={};for(const[u,s]of g)null!=t[s]&&(r[u]=t=>{const r=`slot:${u}`,i="tool-items"===u?()=>{const[,e]=n.useState(0);n.useEffect(()=>{const t=()=>e(e=>e+1);return v.current.add(t),()=>{v.current.delete(t)}},[]);const t=w.current.toolItems;return o.jsx(o.Fragment,{children:("function"==typeof t?t(S.current):t)??null})}:()=>o.jsx(o.Fragment,{children:w.current[s]??null});return e.mount(r,t,i,{}),()=>e.unmount(r)});return{useToolBox:t.useToolBox,useToolBoxSetting:t.useToolBoxSetting,useExtendFooter:t.useExtendFooter,useSummaryFooter:t.useSummaryFooter,useSort:t.useSort,useCustomCell:t.useCustomCell,useContextMenu:t.useContextMenu,useBuiltinTooltip:t.useBuiltinTooltip,usePivot:t.usePivot,usePivotBar:t.usePivotBar,useRowGroupSettings:t.useRowGroupSettings,useFieldSettings:t.useFieldSettings,useFormatSettings:t.useFormatSettings,useLayoutSettings:t.useLayoutSettings,useAggregateSettings:t.useAggregateSettings,useChart:t.useChart,useMultipleChart:t.useMultipleChart,chartIncludeGrandTotal:t.chartIncludeGrandTotal,chartMap:t.chartMap,loading:t.loading,locale:x.current,sourceFields:t.sourceFields,contextMenuConfig:t.contextMenuConfig,emptyState:t.emptyState,slots:r,onToolItemsPropsChange:e=>R(e)}})(t));i.current=c,c.on("data:loaded",()=>{var e,t;return null==(t=(e=w.current).onDataLoaded)?void 0:t.call(e)});const a=c.on.bind(c);for(const[o,n]of p)a(o,e=>{var t,o;return null==(o=(t=w.current)[n])?void 0:o.call(t,e)});y.current.push(c.onConfigChange(()=>{var e,t;const o=w.current.coreConfig;null==(t=(e=w.current).onCoreConfigChange)||t.call(e,c.getCoreConfig(o))}));const d=b.current;b.current=null,c.ready().then(async()=>{var e,t;d&&await c.restoreReinitState(d),R(c.getToolItemsProps()),null==(t=(e=w.current).onReady)||t.call(e,c.grid,c)})};n.useEffect(()=>{var e;null==(e=l.current)||e.setContextWrapper(m)},[m]),n.useEffect(()=>(P(),()=>{var e,t;for(const o of y.current)try{o()}catch{}y.current=[],null==(e=i.current)||e.destroy(),i.current=null,null==(t=l.current)||t.unmountAll(),l.current=null}),[I]),n.useEffect(()=>{const e=i.current;if(!e)return;const{reinitRequired:t}=e.reconcileCoreConfig(B());t&&(b.current=e.captureReinitState(),F(e=>e+1))}),n.useEffect(()=>{var t;null==(t=i.current)||t.setUIOptions({useToolBox:e.useToolBox,useToolBoxSetting:e.useToolBoxSetting,useExtendFooter:e.useExtendFooter,useSummaryFooter:e.useSummaryFooter,useSort:e.useSort,useCustomCell:e.useCustomCell,useContextMenu:e.useContextMenu,useBuiltinTooltip:e.useBuiltinTooltip,usePivot:e.usePivot,usePivotBar:e.usePivotBar,useRowGroupSettings:e.useRowGroupSettings,useFieldSettings:e.useFieldSettings,useFormatSettings:e.useFormatSettings,useLayoutSettings:e.useLayoutSettings,useAggregateSettings:e.useAggregateSettings,loading:e.loading})},[e.useToolBox,e.useToolBoxSetting,e.useExtendFooter,e.useSummaryFooter,e.useSort,e.useCustomCell,e.useContextMenu,e.useBuiltinTooltip,e.usePivot,e.usePivotBar,e.useRowGroupSettings,e.useFieldSettings,e.useFormatSettings,e.useLayoutSettings,e.useAggregateSettings,e.loading]),n.useEffect(()=>{var t;null==(t=i.current)||t.setContextMenuConfig(e.contextMenuConfig)},[e.contextMenuConfig]),n.useImperativeHandle(t,()=>new Proxy({},{get(e,t){if("chrome"===t)return i.current;const o=i.current;if(!o)return;const n=o[t];return"function"==typeof n?n.bind(o):n},has:(e,t)=>"chrome"===t||!!i.current&&t in i.current}),[]);const E=e.height,k={height:"number"==typeof E?`${E}px`:E??"100%",width:"100%",overflow:"hidden"};return o.jsx("div",{ref:u,className:"moz-grid-chrome",style:k})});exports.MozContextWrapperContext=i,exports.MozGrid=m,exports.MozGridLocaleContext=l,exports.MozGridLocaleProvider=function({locale:e,children:t}){return o.jsx(l.Provider,{value:e,children:t})},exports.useMozContextWrapper=c,exports.useMozGridLocale=a;
|