@vmscloud/moz-ui-grid-react 0.1.19
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 +148 -0
- package/dist/MozGrid.d.ts +136 -0
- package/dist/bridge/ReactRenderer.d.ts +45 -0
- package/dist/bridge/fieldBuilder.d.ts +9 -0
- package/dist/bridge/templateRegistry.d.ts +11 -0
- package/dist/index.cjs +25 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +96086 -0
- package/dist/legacy/components/common/Dragging.d.ts +30 -0
- package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +256 -0
- package/dist/legacy/components/common/custom-cell/FormulaInput.d.ts +25 -0
- package/dist/legacy/components/common/custom-cell/GridCustomCell.d.ts +17 -0
- package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +54 -0
- package/dist/legacy/components/common/excel/ClientExcelUploadPopup.d.ts +6 -0
- package/dist/legacy/components/common/filter/GridFilter.d.ts +13 -0
- package/dist/legacy/components/common/footer/GridFooter.d.ts +17 -0
- package/dist/legacy/components/common/sort/GridSort.d.ts +12 -0
- package/dist/legacy/components/common/toolbar/GridSearchInput.d.ts +26 -0
- package/dist/legacy/components/grid/CellEditor.d.ts +9 -0
- package/dist/legacy/components/grid/CellTemplate.d.ts +21 -0
- package/dist/legacy/components/grid/DetailTemplate.d.ts +8 -0
- package/dist/legacy/components/grid/GroupTemplate.d.ts +8 -0
- package/dist/legacy/components/grid/HeaderTemplate.d.ts +9 -0
- package/dist/legacy/components/grid/MozGridReact.d.ts +12 -0
- package/dist/legacy/components/grid/MozGridReactCore.d.ts +28 -0
- package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.d.ts +11 -0
- package/dist/legacy/components/grid/context-menu/GridContextMenu.d.ts +22 -0
- package/dist/legacy/components/grid/group-panel/GroupPanel.d.ts +5 -0
- package/dist/legacy/components/grid/toolbar/ColumnPicker.d.ts +18 -0
- package/dist/legacy/components/grid/toolbar/GridOptionModal.d.ts +30 -0
- package/dist/legacy/components/grid/toolbar/GridSetupPopover.d.ts +25 -0
- package/dist/legacy/components/grid/toolbar/GridToolBox.d.ts +49 -0
- package/dist/legacy/components/pivot/MozPivotReact.d.ts +47 -0
- package/dist/legacy/components/pivot/PivotContextMenu.d.ts +23 -0
- package/dist/legacy/components/pivot/PivotFieldChip.d.ts +17 -0
- package/dist/legacy/components/pivot/PivotFieldDropZone.d.ts +30 -0
- package/dist/legacy/components/pivot/PivotFieldPanel.d.ts +26 -0
- package/dist/legacy/components/pivot/PivotOptionModal.d.ts +36 -0
- package/dist/legacy/components/pivot/PivotToolBox.d.ts +56 -0
- package/dist/legacy/components/pivot/chart/EChart.d.ts +18 -0
- package/dist/legacy/components/pivot/chart/MozPivotChart.d.ts +23 -0
- package/dist/legacy/components/pivot/chart/PivotChartDetail.d.ts +17 -0
- package/dist/legacy/components/pivot/chart/PivotChartMini.d.ts +19 -0
- package/dist/legacy/components/pivot/chart/PivotChartMultiple.d.ts +16 -0
- package/dist/legacy/components/pivot/chart/PivotChartToolbar.d.ts +32 -0
- package/dist/legacy/components/pivot/chart/chartUtils.d.ts +45 -0
- package/dist/legacy/contexts/index.d.ts +31 -0
- package/dist/legacy/contracts/notification.contract.d.ts +34 -0
- package/dist/legacy/hooks/index.d.ts +16 -0
- package/dist/legacy/hooks/useCellTooltip.d.ts +8 -0
- package/dist/legacy/hooks/useClientExcelExport.d.ts +27 -0
- package/dist/legacy/hooks/useClientExcelStore.d.ts +18 -0
- package/dist/legacy/hooks/useContextMenu.d.ts +62 -0
- package/dist/legacy/hooks/useGridBulkEditor.d.ts +16 -0
- package/dist/legacy/hooks/useGridChanges.d.ts +10 -0
- package/dist/legacy/hooks/useGridColumns.d.ts +11 -0
- package/dist/legacy/hooks/useGridCustomCell.d.ts +32 -0
- package/dist/legacy/hooks/useGridCustomCellModule.d.ts +9 -0
- package/dist/legacy/hooks/useGridEvents.d.ts +13 -0
- package/dist/legacy/hooks/useGridFilter.d.ts +19 -0
- package/dist/legacy/hooks/useGridInstance.d.ts +9 -0
- package/dist/legacy/hooks/useGridSelect.d.ts +10 -0
- package/dist/legacy/hooks/useGridSelection.d.ts +6 -0
- package/dist/legacy/hooks/useGridSort.d.ts +16 -0
- package/dist/legacy/hooks/useGridUndoRedo.d.ts +10 -0
- package/dist/legacy/hooks/useGridValidation.d.ts +9 -0
- package/dist/legacy/hooks/useSearchHighlight.d.ts +9 -0
- package/dist/legacy/icons/index.d.ts +36 -0
- package/dist/legacy/index.d.ts +71 -0
- package/dist/legacy/locale/MozConfigProvider.d.ts +31 -0
- package/dist/legacy/locale/contextWrapper.d.ts +19 -0
- package/dist/legacy/locale/en.d.ts +2 -0
- package/dist/legacy/locale/index.d.ts +8 -0
- package/dist/legacy/locale/ja.d.ts +2 -0
- package/dist/legacy/locale/ko.d.ts +2 -0
- package/dist/legacy/locale/types.d.ts +328 -0
- package/dist/legacy/locale/useMozLocale.d.ts +15 -0
- package/dist/legacy/locale/zh.d.ts +2 -0
- package/dist/legacy/stories/MozGridReact.stories.d.ts +7 -0
- package/dist/legacy/stories/MozPivotReact.stories.d.ts +44 -0
- package/dist/legacy/stories/_helpers/sampleData.d.ts +54 -0
- package/dist/legacy/types/pivot-props.d.ts +62 -0
- package/dist/legacy/types/props.d.ts +118 -0
- package/dist/legacy/types/toolbar.d.ts +117 -0
- package/dist/legacy/ui/button/Button.d.ts +18 -0
- package/dist/legacy/ui/button/index.d.ts +1 -0
- package/dist/legacy/ui/checkbox/CheckBox.d.ts +17 -0
- package/dist/legacy/ui/checkbox/icons.d.ts +9 -0
- package/dist/legacy/ui/checkbox/index.d.ts +1 -0
- package/dist/legacy/ui/context-menu/ContextMenu.d.ts +36 -0
- package/dist/legacy/ui/context-menu/index.d.ts +2 -0
- package/dist/legacy/ui/context-menu/types.d.ts +26 -0
- package/dist/legacy/ui/date-input/DateInput.d.ts +25 -0
- package/dist/legacy/ui/date-input/index.d.ts +1 -0
- package/dist/legacy/ui/empty-state/EmptyState.d.ts +28 -0
- package/dist/legacy/ui/empty-state/index.d.ts +1 -0
- package/dist/legacy/ui/input/Input.d.ts +27 -0
- package/dist/legacy/ui/input/index.d.ts +1 -0
- package/dist/legacy/ui/multi-select/MultiSelect.d.ts +43 -0
- package/dist/legacy/ui/multi-select/index.d.ts +1 -0
- package/dist/legacy/ui/number-input/NumberInput.d.ts +22 -0
- package/dist/legacy/ui/number-input/index.d.ts +1 -0
- package/dist/legacy/ui/popup/Popup.d.ts +50 -0
- package/dist/legacy/ui/popup/index.d.ts +1 -0
- package/dist/legacy/ui/select/Select.d.ts +56 -0
- package/dist/legacy/ui/select/index.d.ts +1 -0
- package/dist/legacy/ui/toggle/Toggle.d.ts +21 -0
- package/dist/legacy/ui/toggle/index.d.ts +1 -0
- package/dist/legacy/utils/cn.d.ts +5 -0
- package/dist/legacy/utils/file.d.ts +17 -0
- package/dist/legacy/utils/index.d.ts +2 -0
- package/dist/legacy/utils/misc.d.ts +17 -0
- package/dist/stories/MozGrid.stories.d.ts +18 -0
- package/dist/style.css +1 -0
- package/dist/types/slots.d.ts +49 -0
- package/docs/manual/examples.md +2385 -0
- package/docs/manual/reference.md +4695 -0
- package/docs/manual/reference_react.md +720 -0
- package/package.json +104 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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,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,loading:e.loading})},[e.useToolBox,e.useToolBoxSetting,e.useExtendFooter,e.useSummaryFooter,e.useSort,e.useCustomCell,e.useContextMenu,e.useBuiltinTooltip,e.usePivot,e.usePivotBar,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),z=s.createContext(null),F=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=["group","columnGroups","rowTemplate"],W=["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"],H={"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 U(){return s.useContext(L)}let Y=!1;function Z(){const e=U();s.useEffect(()=>{if(function(){if(Y)return;Y=!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 X=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),z=s.useRef(N);z.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 F=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)}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,F());for(const e of W){const n=H[e],i=o.on(e,e=>{const t=I.current[n];null==t||t(e)});t.push(i)}null==(n=z.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=z.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(q,{}),d]})})})})});function q(){return Z(),null}function $(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 K(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",$(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(J,{})}):u,(c||n)&&a.jsxs("span",{className:k("moz-r-button__text",{"has-icon-text":y}),children:[n,c]})]})}function J(){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"})})]})}X.displayName="MozGridReactCore";const Q={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 ee(e,t){return"number"==typeof e?{width:e,height:e}:Q[e]??Q[t]}function te({size:e="12",color:t="#8998b5",thin:n=!1,...i}){const r=ee(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 ne({size:e="14",color:t="#8998b5",...n}){const i=ee(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 ie({size:e="14",color:t="#8998b5",...n}){const i=ee(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 re({size:e="14",color:t="#8998b5",...n}){const i=ee(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 oe({size:e="14",color:t="#8998b5",...n}){const i=ee(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 ae({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 se({size:e="16",color:t="#8998B5",...n}){const i=ee(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 le({size:e="16",color:t="#8998B5",...n}){const i=ee(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 ue({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=ee(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 ce({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=ee(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 de({size:e="10",color:t="#8998b5",disabled:n=!1,thin:i=!1,...r}){const o=ee(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 he({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=ee(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 pe({size:e="14",color:t="#A7B1BC",...n}){const i=ee(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 fe({size:e="10",color:t="#8998b5",disabled:n=!1,...i}){const r=ee(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 ge({size:e="12",color:t="#8998b5",disabled:n=!1,...i}){const r=ee(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 me({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 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 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 ye({size:e="10",color:t="#8998b5",...n}){const i=ee(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 xe({size:e="12",color:t="#4568e0",...n}){const i=ee(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 _e({size:e="14",color:t="#8998b5",...n}){const i=ee(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 be({size:e="14",color:t="#8998b5",...n}){const i=ee(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 we({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 Ce({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 Se({size:e="14",color:t="#8998b5",...n}){const i=ee(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 Me=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=U(),[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(K,{type:"icon-accent",className:"search-button spin dec",onClick:k,disabled:0===x||r,icon:a.jsx(pe,{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(ce,{size:"12",color:r?"#a7b1bc":"#8998b5"})}),x>0&&a.jsxs("span",{className:"grid-search-count-popup",children:[b," / ",x]})]}),a.jsx(K,{type:"icon-accent",className:"search-button spin inc",onClick:D,disabled:0===x||r,icon:a.jsx(pe,{color:"currentColor"})})]})]})});function Te(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 Ie(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function De(...e){return t=>{let n=!1;const i=e.map(e=>{const i=Ie(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():Ie(e[t],null)}}}}function ke(...e){return g.useCallback(De(...e),e)}function Ae(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}\``)}]},Ee(i,...t)]}function Ee(...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}Me.displayName="GridSearchInput";var Ne=(null==globalThis?void 0:globalThis.document)?g.useLayoutEffect:()=>{},Le=g[" useId ".trim().toString()]||(()=>{}),Pe=0;function Oe(e){const[t,n]=g.useState(Le());return Ne(()=>{n(e=>e??String(Pe++))},[e]),e||(t?`radix-${t}`:"")}var Re=g[" useInsertionEffect ".trim().toString()]||Ne;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 Re(()=>{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 Fe(e){const t=Ve(e),n=g.forwardRef((e,n)=>{const{children:i,...r}=e,o=g.Children.toArray(i),s=o.find(je);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 Ve(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?De(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 Be=Symbol("radix.slottable");function je(e){return g.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Be}var Ge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Fe(`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 We(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}function He(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 Ue,Ye="dismissableLayer.update",Ze="dismissableLayer.pointerDownOutside",Xe="dismissableLayer.focusOutside",qe=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$e=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:s,onDismiss:l,...u}=e,c=g.useContext(qe),[d,h]=g.useState(null),p=(null==d?void 0:d.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=g.useState({}),m=ke(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=He(e),i=g.useRef(!1),r=g.useRef(()=>{});return g.useEffect(()=>{const e=e=>{if(e.target&&!i.current){let i=function(){Je(Ze,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=He(e),i=g.useRef(!1);return g.useEffect(()=>{const e=e=>{if(e.target&&!i.current){Je(Xe,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=He(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&&(Ue=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ke(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Ue)}},[d,p,n,c]),g.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ke())},[d,c]),g.useEffect(()=>{const e=()=>f({});return document.addEventListener(Ye,e),()=>document.removeEventListener(Ye,e)},[]),a.jsx(Ge.div,{...u,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,C.onPointerDownCapture)})});$e.displayName="DismissableLayer";function Ke(){const e=new CustomEvent(Ye);document.dispatchEvent(e)}function Je(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?We(r,o):r.dispatchEvent(o)}g.forwardRef((e,t)=>{const n=g.useContext(qe),i=g.useRef(null),r=ke(t,i);return g.useEffect(()=>{const e=i.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),a.jsx(Ge.div,{...e,ref:r})}).displayName="DismissableLayerBranch";var Qe="focusScope.autoFocusOnMount",et="focusScope.autoFocusOnUnmount",tt={bubbles:!1,cancelable:!0},nt=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...s}=e,[l,u]=g.useState(null),c=He(r),d=He(o),h=g.useRef(null),p=ke(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:at(h.current,{select:!0})},t=function(e){if(f.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||at(h.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&at(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){st.add(f);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Qe,tt);l.addEventListener(Qe,c),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(at(i,{select:t}),document.activeElement!==n)return}((e=it(l),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&at(l))}return()=>{l.removeEventListener(Qe,c),setTimeout(()=>{const e=new CustomEvent(et,tt);l.addEventListener(et,d),l.dispatchEvent(e),e.defaultPrevented||at(t??document.body,{select:!0}),l.removeEventListener(et,d),st.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=it(e),n=rt(t,e),i=rt(t.reverse(),e);return[n,i]}(t);i&&o?e.shiftKey||r!==o?e.shiftKey&&r===i&&(e.preventDefault(),n&&at(o,{select:!0})):(e.preventDefault(),n&&at(i,{select:!0})):r===t&&e.preventDefault()}},[n,i,f.paused]);return a.jsx(Ge.div,{tabIndex:-1,...s,ref:p,onKeyDown:m})});function it(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 rt(e,t){for(const n of e)if(!ot(n,{upTo:t}))return n}function ot(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 at(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()}}nt.displayName="FocusScope";var st=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=lt(e,t),e.unshift(t)},remove(t){var n;e=lt(e,t),null==(n=e[0])||n.resume()}}}();function lt(e,t){const n=[...e],i=n.indexOf(t);return-1!==i&&n.splice(i,1),n}var ut=g.forwardRef((e,t)=>{var n;const{container:i,...r}=e,[o,s]=g.useState(!1);Ne(()=>s(!0),[]);const l=i||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return l?c.createPortal(a.jsx(Ge.div,{...r,ref:t}),l):null});ut.displayName="Portal";var ct=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=dt(i.current);o.current="mounted"===s?e:"none"},[s]),Ne(()=>{const t=i.current,n=r.current;if(n!==e){const i=o.current,a=dt(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]),Ne(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=o=>{const a=dt(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=dt(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=ke(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 dt(e){return(null==e?void 0:e.animationName)||"none"}ct.displayName="Presence";var ht=0;function pt(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ft()),document.body.insertAdjacentElement("beforeend",e[1]??ft()),ht++,()=>{1===ht&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ht--}},[])}function ft(){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 gt=function(){return gt=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},gt.apply(this,arguments)};function mt(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 vt="right-scroll-bar-position",yt="width-before-scroll-bar";function xt(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var _t="undefined"!=typeof window?g.useLayoutEffect:g.useEffect,bt=new WeakMap;function wt(e,t){var n,i,r,o=(n=null,i=function(t){return e.forEach(function(e){return xt(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 _t(function(){var t=bt.get(o);if(t){var n=new Set(t),i=new Set(e),r=o.current;n.forEach(function(e){i.has(e)||xt(e,null)}),i.forEach(function(e){n.has(e)||xt(e,r)})}bt.set(o,e)},[e]),o}function Ct(e){return e}var St=function(e){var t=e.sideCar,n=mt(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,gt({},n))};St.isSideCarExport=!0;var Mt=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Ct);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=gt({async:!0,ssr:!1},e),t}(),Tt=function(){},It=g.forwardRef(function(e,t){var n=g.useRef(null),i=g.useState({onScrollCapture:Tt,onWheelCapture:Tt,onTouchMoveCapture:Tt}),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=mt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,C=wt([n,t]),S=gt(gt({},b),r);return g.createElement(g.Fragment,null,c&&g.createElement(w,{sideCar:Mt,removeScrollBar:u,shards:d,noRelative:p,noIsolation:f,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:_}),a?g.cloneElement(g.Children.only(s),gt(gt({},S),{ref:C})):g.createElement(x,gt({},S,{className:l,ref:C}),s))});It.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},It.classNames={fullWidth:yt,zeroRight:vt};function Dt(){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 kt=function(){var e=0,t=null;return{add:function(n){var i,r;0==e&&(t=Dt())&&(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)}}},At=function(){var e,t=(e=kt(),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}},Et={left:0,top:0,right:0,gap:0},Nt=function(e){return parseInt(e||"",10)||0},Lt=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Et;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[Nt(n),Nt(i),Nt(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])}},Pt=At(),Ot="data-scroll-locked",Rt=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(Ot,"] {\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(vt," {\n right: ").concat(s,"px ").concat(i,";\n }\n \n .").concat(yt," {\n margin-right: ").concat(s,"px ").concat(i,";\n }\n \n .").concat(vt," .").concat(vt," {\n right: 0 ").concat(i,";\n }\n \n .").concat(yt," .").concat(yt," {\n margin-right: 0 ").concat(i,";\n }\n \n body[").concat(Ot,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},zt=function(){var e=parseInt(document.body.getAttribute(Ot)||"0",10);return isFinite(e)?e:0},Ft=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(Ot,(zt()+1).toString()),function(){var e=zt()-1;e<=0?document.body.removeAttribute(Ot):document.body.setAttribute(Ot,e.toString())}},[]);var o=g.useMemo(function(){return Lt(r)},[r]);return g.createElement(Pt,{styles:Rt(o,!t,r,n?"":"!important")})},Vt=!1;if("undefined"!=typeof window)try{var Bt=Object.defineProperty({},"passive",{get:function(){return Vt=!0,!0}});window.addEventListener("test",Bt,Bt),window.removeEventListener("test",Bt,Bt)}catch(x1){Vt=!1}var jt=!!Vt&&{passive:!1},Gt=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])},Wt=function(e,t){var n=t.ownerDocument,i=t;do{if("undefined"!=typeof ShadowRoot&&i instanceof ShadowRoot&&(i=i.host),Ht(e,i)){var r=Ut(e,i);if(r[1]>r[2])return!0}i=i.parentNode}while(i&&i!==n.body);return!1},Ht=function(e,t){return"v"===e?function(e){return Gt(e,"overflowY")}(t):function(e){return Gt(e,"overflowX")}(t)},Ut=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},Yt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zt=function(e){return[e.deltaX,e.deltaY]},Xt=function(e){return e&&"current"in e?e.current:e},qt=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},$t=0,Kt=[];function Jt(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Qt=(en=function(e){var t=g.useRef([]),n=g.useRef([0,0]),i=g.useRef(),r=g.useState($t++)[0],o=g.useState(At)[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(Xt),!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=Yt(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=Wt(d,c);if(!f)return!0;if(f?r=d:(r="v"===d?"h":"v",f=Wt(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=Ut(e,a),p=h[0],f=h[1]-h[2]-r*p;(p||f)&&Ht(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(Kt.length&&Kt[Kt.length-1]===o){var i="deltaY"in n?Zt(n):Yt(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(Xt).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:Jt(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=Yt(e),i.current=void 0},[]),d=g.useCallback(function(t){u(t.type,Zt(t),t.target,s(t,e.lockRef.current))},[]),h=g.useCallback(function(t){u(t.type,Yt(t),t.target,s(t,e.lockRef.current))},[]);g.useEffect(function(){return Kt.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,jt),document.addEventListener("touchmove",l,jt),document.addEventListener("touchstart",c,jt),function(){Kt=Kt.filter(function(e){return e!==o}),document.removeEventListener("wheel",l,jt),document.removeEventListener("touchmove",l,jt),document.removeEventListener("touchstart",c,jt)}},[]);var p=e.removeScrollBar,f=e.inert;return g.createElement(g.Fragment,null,f?g.createElement(o,{styles:qt(r)}):null,p?g.createElement(Ft,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Mt.useMedium(en),St);var en,tn=g.forwardRef(function(e,t){return g.createElement(It,gt({},e,{ref:t,sideCar:Qt}))});tn.classNames=It.classNames;var nn=new WeakMap,rn=new WeakMap,on={},an=0,sn=function(e){return e&&(e.host||sn(e.parentNode))},ln=function(e,t,n,i){var r=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=sn(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);on[n]||(on[n]=new WeakMap);var o=on[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=(nn.get(e)||0)+1,u=(o.get(e)||0)+1;nn.set(e,l),o.set(e,u),a.push(e),1===l&&r&&rn.set(e,!0),1===u&&e.setAttribute(n,"true"),r||e.setAttribute(i,"true")}catch(d){}})};return c(t),s.clear(),an++,function(){a.forEach(function(e){var t=nn.get(e)-1,r=o.get(e)-1;nn.set(e,t),o.set(e,r),t||(rn.has(e)||e.removeAttribute(i),rn.delete(e)),r||e.removeAttribute(n)}),--an||(nn=new WeakMap,nn=new WeakMap,rn=new WeakMap,on={})}},un=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"))),ln(i,r,n,"aria-hidden")):function(){return null}},cn="Dialog",[dn]=Ae(cn),[hn,pn]=dn(cn),fn=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:cn});return a.jsx(hn,{scope:t,triggerRef:l,contentRef:u,contentId:Oe(),titleId:Oe(),descriptionId:Oe(),open:c,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(e=>!e),[d]),modal:s,children:n})};fn.displayName=cn;var gn="DialogTrigger";g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=pn(gn,n),o=ke(t,r.triggerRef);return a.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Pn(r.open),...i,ref:o,onClick:Te(e.onClick,r.onOpenToggle)})}).displayName=gn;var mn="DialogPortal",[vn,yn]=dn(mn,{forceMount:void 0}),xn=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:r}=e,o=pn(mn,t);return a.jsx(vn,{scope:t,forceMount:n,children:g.Children.map(i,e=>a.jsx(ct,{present:n||o.open,children:a.jsx(ut,{asChild:!0,container:r,children:e})}))})};xn.displayName=mn;var _n="DialogOverlay",bn=g.forwardRef((e,t)=>{const n=yn(_n,e.__scopeDialog),{forceMount:i=n.forceMount,...r}=e,o=pn(_n,e.__scopeDialog);return o.modal?a.jsx(ct,{present:i||o.open,children:a.jsx(Cn,{...r,ref:t})}):null});bn.displayName=_n;var wn=Fe("DialogOverlay.RemoveScroll"),Cn=g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=pn(_n,n);return a.jsx(tn,{as:wn,allowPinchZoom:!0,shards:[r.contentRef],children:a.jsx(Ge.div,{"data-state":Pn(r.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Sn="DialogContent",Mn=g.forwardRef((e,t)=>{const n=yn(Sn,e.__scopeDialog),{forceMount:i=n.forceMount,...r}=e,o=pn(Sn,e.__scopeDialog);return a.jsx(ct,{present:i||o.open,children:o.modal?a.jsx(Tn,{...r,ref:t}):a.jsx(In,{...r,ref:t})})});Mn.displayName=Sn;var Tn=g.forwardRef((e,t)=>{const n=pn(Sn,e.__scopeDialog),i=g.useRef(null),r=ke(t,n.contentRef,i);return g.useEffect(()=>{const e=i.current;if(e)return un(e)},[]),a.jsx(Dn,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,e=>e.preventDefault())})}),In=g.forwardRef((e,t)=>{const n=pn(Sn,e.__scopeDialog),i=g.useRef(!1),r=g.useRef(!1);return a.jsx(Dn,{...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()}})}),Dn=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:r,onCloseAutoFocus:o,...s}=e,l=pn(Sn,n),u=g.useRef(null),c=ke(t,u);return pt(),a.jsxs(a.Fragment,{children:[a.jsx(nt,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx($e,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Pn(l.open),...s,ref:c,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(Fn,{titleId:l.titleId}),a.jsx(Vn,{contentRef:u,descriptionId:l.descriptionId})]})]})}),kn="DialogTitle",An=g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=pn(kn,n);return a.jsx(Ge.h2,{id:r.titleId,...i,ref:t})});An.displayName=kn;var En="DialogDescription";g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=pn(En,n);return a.jsx(Ge.p,{id:r.descriptionId,...i,ref:t})}).displayName=En;var Nn="DialogClose",Ln=g.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,r=pn(Nn,n);return a.jsx(Ge.button,{type:"button",...i,ref:t,onClick:Te(e.onClick,()=>r.onOpenChange(!1))})});function Pn(e){return e?"open":"closed"}Ln.displayName=Nn;var On="DialogTitleWarning",[Rn,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}\``)}]}(On,{contentName:Sn,titleName:kn,docsSlug:"dialog"}),Fn=({titleId:e})=>{const t=zn(On),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},Vn=({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},Bn=fn,jn=xn,Gn=bn,Wn=Mn,Hn=An,Un=Ln;function Yn(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 z=(()=>{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}}})(),F=()=>{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(Bn,{open:t,onOpenChange:n,modal:!0,children:a.jsxs(jn,{children:[a.jsx(Gn,{className:"moz-r-popup-overlay"}),a.jsxs(Wn,{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(Hn,{asChild:!0,children:a.jsx("span",{className:"moz-r-popup__title-text",children:i})}),h&&a.jsx(Un,{asChild:!0,children:a.jsx(K,{type:"icon",className:"moz-r-popup__close-button",icon:a.jsx(Zn,{})})})]}),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(Xn,{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:F,onCancel:V}):a.jsxs(a.Fragment,{children:[z.positive&&a.jsx(K,{className:"moz-r-popup__preset-btn",loading:v,disabled:y,onClick:F,style:{minWidth:80},text:z.positive}),z.negative&&a.jsx(K,{className:"moz-r-popup__preset-btn",type:"outline",disabled:v,onClick:V,style:{minWidth:80},text:z.negative})]})})]})]})})}function Zn(){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 Xn({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 qn=["top","right","bottom","left"],$n=Math.min,Kn=Math.max,Jn=Math.round,Qn=Math.floor,ei=e=>({x:e,y:e}),ti={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(e,t,n){return Kn(e,$n(t,n))}function ii(e,t){return"function"==typeof e?e(t):e}function ri(e){return e.split("-")[0]}function oi(e){return e.split("-")[1]}function ai(e){return"x"===e?"y":"x"}function si(e){return"y"===e?"height":"width"}function li(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ui(e){return ai(li(e))}function ci(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const di=["left","right"],hi=["right","left"],pi=["top","bottom"],fi=["bottom","top"];function gi(e,t,n,i){const r=oi(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?hi:di:t?di:hi;case"left":case"right":return t?pi:fi;default:return[]}}(ri(e),"start"===n,i);return r&&(o=o.map(e=>e+"-"+r),t&&(o=o.concat(o.map(ci)))),o}function mi(e){const t=ri(e);return ti[t]+e.slice(t.length)}function vi(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 yi(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 xi(e,t,n){let{reference:i,floating:r}=e;const o=li(t),a=ui(t),s=si(a),l=ri(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(oi(t)){case"start":p[a]-=h*(n&&u?-1:1);break;case"end":p[a]+=h*(n&&u?-1:1)}return p}async function _i(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}=ii(t,e),f=vi(p),g=s[h?"floating"===d?"reference":"floating":d],m=yi(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},_=yi(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 bi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wi(e){return qn.some(t=>e[t]>=0)}const Ci=new Set(["left","top"]);function Si(){return"undefined"!=typeof window}function Mi(e){return Di(e)?(e.nodeName||"").toLowerCase():"#document"}function Ti(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ii(e){var t;return null==(t=(Di(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Di(e){return!!Si()&&(e instanceof Node||e instanceof Ti(e).Node)}function ki(e){return!!Si()&&(e instanceof Element||e instanceof Ti(e).Element)}function Ai(e){return!!Si()&&(e instanceof HTMLElement||e instanceof Ti(e).HTMLElement)}function Ei(e){return!(!Si()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ti(e).ShadowRoot)}function Ni(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=Gi(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&"inline"!==r&&"contents"!==r}function Li(e){return/^(table|td|th)$/.test(Mi(e))}function Pi(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const Oi=/transform|translate|scale|rotate|perspective|filter/,Ri=/paint|layout|strict|content/,zi=e=>!!e&&"none"!==e;let Fi;function Vi(e){const t=ki(e)?Gi(e):e;return zi(t.transform)||zi(t.translate)||zi(t.scale)||zi(t.rotate)||zi(t.perspective)||!Bi()&&(zi(t.backdropFilter)||zi(t.filter))||Oi.test(t.willChange||"")||Ri.test(t.contain||"")}function Bi(){return null==Fi&&(Fi="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fi}function ji(e){return/^(html|body|#document)$/.test(Mi(e))}function Gi(e){return Ti(e).getComputedStyle(e)}function Wi(e){return ki(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hi(e){if("html"===Mi(e))return e;const t=e.assignedSlot||e.parentNode||Ei(e)&&e.host||Ii(e);return Ei(t)?t.host:t}function Ui(e){const t=Hi(e);return ji(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ai(t)&&Ni(t)?t:Ui(t)}function Yi(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=Ui(e),o=r===(null==(i=e.ownerDocument)?void 0:i.body),a=Ti(r);if(o){const e=Zi(a);return t.concat(a,a.visualViewport||[],Ni(r)?r:[],e&&n?Yi(e):[])}return t.concat(r,Yi(r,[],n))}function Zi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xi(e){const t=Gi(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Ai(e),o=r?e.offsetWidth:n,a=r?e.offsetHeight:i,s=Jn(n)!==o||Jn(i)!==a;return s&&(n=o,i=a),{width:n,height:i,$:s}}function qi(e){return ki(e)?e:e.contextElement}function $i(e){const t=qi(e);if(!Ai(t))return ei(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:o}=Xi(t);let a=(o?Jn(n.width):n.width)/i,s=(o?Jn(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Ki=ei(0);function Ji(e){const t=Ti(e);return Bi()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ki}function Qi(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),o=qi(e);let a=ei(1);t&&(i?ki(i)&&(a=$i(i)):a=$i(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ti(e))&&t}(o,n,i)?Ji(o):ei(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=Ti(o),t=i&&ki(i)?Ti(i):i;let n=e,r=Zi(n);for(;r&&i&&t!==n;){const e=$i(r),t=r.getBoundingClientRect(),i=Gi(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=Ti(r),r=Zi(n)}}return yi({width:c,height:d,x:l,y:u})}function er(e,t){const n=Wi(e).scrollLeft;return t?t.left+n:Qi(Ii(e)).left+n}function tr(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-er(e,n),y:n.top+t.scrollTop}}function nr(e,t,n){let i;if("viewport"===t)i=function(e,t){const n=Ti(e),i=Ii(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=Bi();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}const u=er(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=Ii(e),n=Wi(e),i=e.ownerDocument.body,r=Kn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=Kn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+er(e);const s=-n.scrollTop;return"rtl"===Gi(i).direction&&(a+=Kn(t.clientWidth,i.clientWidth)-r),{width:r,height:o,x:a,y:s}}(Ii(e));else if(ki(t))i=function(e,t){const n=Qi(e,!0,"fixed"===t),i=n.top+e.clientTop,r=n.left+e.clientLeft,o=Ai(e)?$i(e):ei(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=Ji(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yi(i)}function ir(e,t){const n=Hi(e);return!(n===t||!ki(n)||ji(n))&&("fixed"===Gi(n).position||ir(n,t))}function rr(e,t,n){const i=Ai(t),r=Ii(t),o="fixed"===n,a=Qi(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=ei(0);function u(){l.x=er(r)}if(i||!i&&!o)if(("body"!==Mi(t)||Ni(r))&&(s=Wi(t)),i){const e=Qi(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?ei(0):tr(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 or(e){return"static"===Gi(e).position}function ar(e,t){if(!Ai(e)||"fixed"===Gi(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ii(e)===n&&(n=n.ownerDocument.body),n}function sr(e,t){const n=Ti(e);if(Pi(e))return n;if(!Ai(e)){let t=Hi(e);for(;t&&!ji(t);){if(ki(t)&&!or(t))return t;t=Hi(t)}return n}let i=ar(e,t);for(;i&&Li(i)&&or(i);)i=ar(i,t);return i&&ji(i)&&or(i)&&!Vi(i)?n:i||function(e){let t=Hi(e);for(;Ai(t)&&!ji(t);){if(Vi(t))return t;if(Pi(t))return null;t=Hi(t)}return null}(e)||n}const lr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const o="fixed"===r,a=Ii(i),s=!!t&&Pi(t.floating);if(i===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=ei(1);const c=ei(0),d=Ai(i);if((d||!d&&!o)&&(("body"!==Mi(i)||Ni(a))&&(l=Wi(i)),d)){const e=Qi(i);u=$i(i),c.x=e.x+i.clientLeft,c.y=e.y+i.clientTop}const h=!a||d||o?ei(0):tr(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:Ii,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const o=[..."clippingAncestors"===n?Pi(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let i=Yi(e,[],!1).filter(e=>ki(e)&&"body"!==Mi(e)),r=null;const o="fixed"===Gi(e).position;let a=o?Hi(e):e;for(;ki(a)&&!ji(a);){const t=Gi(a),n=Vi(a);n||"fixed"!==t.position||(r=null),(o?!n&&!r:!n&&"static"===t.position&&r&&("absolute"===r.position||"fixed"===r.position)||Ni(a)&&!n&&ir(e,a))?i=i.filter(e=>e!==a):r=t,a=Hi(a)}return t.set(e,i),i}(t,this._c):[].concat(n),i],a=nr(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=nr(t,o[d],r);s=Kn(e.top,s),l=$n(e.right,l),u=$n(e.bottom,u),c=Kn(e.left,c)}return{width:l-c,height:u-s,x:c,y:s}},getOffsetParent:sr,getElementRects:async function(e){const t=this.getOffsetParent||sr,n=this.getDimensions,i=await n(e.floating);return{reference:rr(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}=Xi(e);return{width:t,height:n}},getScale:$i,isElement:ki,isRTL:function(e){return"rtl"===Gi(e).direction}};function ur(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cr(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=qi(e),c=r||o?[...u?Yi(u):[],...t?Yi(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=Ii(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:-Qn(d)+"px "+-Qn(r.clientWidth-(c+h))+"px "+-Qn(r.clientHeight-(d+p))+"px "+-Qn(c)+"px",threshold:Kn(0,$n(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||ur(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?Qi(e):null;return l&&function t(){const i=Qi(e);g&&!ur(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 dr=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=ri(n),s=oi(n),l="y"===li(n),u=Ci.has(a)?-1:1,c=o&&l?-1:1,d=ii(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}}}}},hr=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}=ii(e,t),c={x:n,y:i},d=await o.detectOverflow(t,u),h=li(ri(r)),p=ai(h);let f=c[p],g=c[h];if(a){const e="y"===p?"bottom":"right";f=ni(f+d["y"===p?"top":"left"],f,f-d[e])}if(s){const e="y"===h?"bottom":"right";g=ni(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}}}}}},pr=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}=ii(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const v=ri(r),y=li(s),x=ri(s)===s,_=await(null==l.isRTL?void 0:l.isRTL(u.floating)),b=h||(x||!g?[mi(s)]:function(e){const t=mi(e);return[ci(e),t,ci(t)]}(s)),w="none"!==f;!h&&w&&b.push(...gi(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=oi(e),r=ui(e),o=si(r);let a="x"===r?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=mi(a)),[a,mi(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!==li(t))||T.every(e=>li(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=li(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{}}}},fr=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}=ii(e,t),c=await a.detectOverflow(t,u),d=ri(r),h=oi(r),p="y"===li(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,_=$n(g-c[m],y),b=$n(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=Kn(c.left,0),t=Kn(c.right,0),n=Kn(c.top,0),i=Kn(c.bottom,0);p?S=f-2*(0!==e||0!==t?e+t:Kn(c.left,c.right)):C=g-2*(0!==n||0!==i?n+i:Kn(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}}:{}}}},gr=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:r="referenceHidden",...o}=ii(e,t);switch(r){case"referenceHidden":{const e=bi(await i.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:wi(e)}}}case"escaped":{const e=bi(await i.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:wi(e)}}}default:return{}}}}},mr=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}=ii(e,t)||{};if(null==u)return{};const d=vi(c),h={x:n,y:i},p=ui(r),f=si(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=$n(d[v],M),I=$n(d[y],M),D=T,k=C-g[f]-I,A=C/2-g[f]/2+S,E=ni(D,A,k),N=!l.arrow&&null!=oi(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}}}),vr=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}=ii(e,t),c={x:n,y:i},d=li(r),h=ai(d);let p=c[h],f=c[d];const g=ii(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=Ci.has(ri(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}}}},yr=(e,t,n)=>{const i=new Map,r={platform:lr,...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:_i},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}=xi(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}=xi(u,h,l))),g=-1)}return{x:c,y:d,placement:h,strategy:r,middlewareData:f}})(e,t,{...r,platform:o})};var xr="undefined"!=typeof document?s.useLayoutEffect:function(){};function _r(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(!_r(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)&&!_r(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function br(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wr(e,t){const n=br(e);return Math.round(t*n)/n}function Cr(e){const t=g.useRef(e);return xr(()=>{t.current=e}),t}const Sr=(e,t)=>{const n=dr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mr=(e,t)=>{const n=hr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tr=(e,t)=>({fn:vr(e).fn,options:[e,t]}),Ir=(e,t)=>{const n=pr(e);return{name:n.name,fn:n.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=(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?mr({element:n.current,padding:i}).fn(t):{}:n?mr({element:n,padding:i}).fn(t):{};var r}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Er=g.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...o}=e;return a.jsx(Ge.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"})})});Er.displayName="Arrow";var Nr=Er;var Lr="Popper",[Pr,Or]=Ae(Lr),[Rr,zr]=Pr(Lr),Fr=e=>{const{__scopePopper:t,children:n}=e,[i,r]=g.useState(null);return a.jsx(Rr,{scope:t,anchor:i,onAnchorChange:r,children:n})};Fr.displayName=Lr;var Vr="PopperAnchor",Br=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,o=zr(Vr,n),s=g.useRef(null),l=ke(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(Ge.div,{...r,ref:l})});Br.displayName=Vr;var jr="PopperContent",[Gr,Wr]=Pr(jr),Hr=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(jr,u),[T,I]=g.useState(null),D=ke(t,e=>I(e)),[k,A]=g.useState(null),E=function(e){const[t,n]=g.useState(void 0);return Ne(()=>{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],z=R.length>0,F={padding:O,boundary:R.filter(Xr),altBoundary:z},{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);_r(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=Cr(l),k=Cr(r),A=Cr(u),E=g.useCallback(()=>{if(!S.current||!M.current)return;const e={placement:t,strategy:n,middleware:h};k.current&&(e.platform=k.current),yr(S.current,M.current,e).then(e=>{const t={...e,isPositioned:!1!==A.current};N.current&&!_r(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[h,t,n,k,A]);xr(()=>{!1===u&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);const N=g.useRef(!1);xr(()=>(N.current=!0,()=>{N.current=!1}),[]),xr(()=>{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=wr(P.floating,c.x),i=wr(P.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+i+"px)",...br(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)=>cr(...e,{animationFrame:"always"===w}),elements:{reference:M.anchor},middleware:[Sr({mainAxis:d+L,alignmentAxis:p}),v&&Mr({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?Tr():void 0,...F}),v&&Ir({...F}),Dr({...F,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&&Ar({element:k,padding:f}),qr({arrowWidth:N,arrowHeight:L}),b&&kr({strategy:"referenceHidden",...F})]}),[H,U]=$r(j),Y=He(C);Ne(()=>{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 Ne(()=>{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(Gr,{scope:u,placedSide:H,onArrowChange:A,arrowX:Z,arrowY:X,shouldHideArrow:q,children:a.jsx(Ge.div,{"data-side":H,"data-align":U,...S,ref:D,style:{...S.style,animation:G?void 0:"none"}})})})});Hr.displayName=jr;var Ur="PopperArrow",Yr={top:"bottom",right:"left",bottom:"top",left:"right"},Zr=g.forwardRef(function(e,t){const{__scopePopper:n,...i}=e,r=Wr(Ur,n),o=Yr[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(Nr,{...i,ref:t,style:{...i.style,display:"block"}})})});function Xr(e){return null!==e}Zr.displayName=Ur;var qr=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]=$r(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 $r(e){const[t,n="center"]=e.split("-");return[t,n]}var Kr=Fr,Jr=Br,Qr=Hr,eo=Zr,to="Popover",[no]=Ae(to,[Or]),io=Or(),[ro,oo]=no(to),ao=e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:r,onOpenChange:o,modal:s=!1}=e,l=io(t),u=g.useRef(null),[c,d]=g.useState(!1),[h,p]=ze({prop:i,defaultProp:r??!1,onChange:o,caller:to});return a.jsx(Kr,{...l,children:a.jsx(ro,{scope:t,contentId:Oe(),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})})};ao.displayName=to;var so="PopoverAnchor";g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=oo(so,n),o=io(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=r;return g.useEffect(()=>(s(),()=>l()),[s,l]),a.jsx(Jr,{...o,...i,ref:t})}).displayName=so;var lo="PopoverTrigger",uo=g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=oo(lo,n),o=io(n),s=ke(t,r.triggerRef),l=a.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":wo(r.open),...i,ref:s,onClick:Te(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?l:a.jsx(Jr,{asChild:!0,...o,children:l})});uo.displayName=lo;var co="PopoverPortal",[ho,po]=no(co,{forceMount:void 0}),fo=e=>{const{__scopePopover:t,forceMount:n,children:i,container:r}=e,o=oo(co,t);return a.jsx(ho,{scope:t,forceMount:n,children:a.jsx(ct,{present:n||o.open,children:a.jsx(ut,{asChild:!0,container:r,children:i})})})};fo.displayName=co;var go="PopoverContent",mo=g.forwardRef((e,t)=>{const n=po(go,e.__scopePopover),{forceMount:i=n.forceMount,...r}=e,o=oo(go,e.__scopePopover);return a.jsx(ct,{present:i||o.open,children:o.modal?a.jsx(yo,{...r,ref:t}):a.jsx(xo,{...r,ref:t})})});mo.displayName=go;var vo=Fe("PopoverContent.RemoveScroll"),yo=g.forwardRef((e,t)=>{const n=oo(go,e.__scopePopover),i=g.useRef(null),r=ke(t,i),o=g.useRef(!1);return g.useEffect(()=>{const e=i.current;if(e)return un(e)},[]),a.jsx(tn,{as:vo,allowPinchZoom:!0,children:a.jsx(_o,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:Te(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:Te(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),xo=g.forwardRef((e,t)=>{const n=oo(go,e.__scopePopover),i=g.useRef(!1),r=g.useRef(!1);return a.jsx(_o,{...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()}})}),_o=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=oo(go,n),f=io(n);return pt(),a.jsx(nt,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx($e,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:a.jsx(Qr,{"data-state":wo(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)"}})})})}),bo="PopoverClose";g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=oo(bo,n);return a.jsx(Ge.button,{type:"button",...i,ref:t,onClick:Te(e.onClick,()=>r.onOpenChange(!1))})}).displayName=bo;function wo(e){return e?"open":"closed"}g.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,r=io(n);return a.jsx(eo,{...r,...i,ref:t})}).displayName="PopoverArrow";var Co=ao,So=uo,Mo=fo,To=mo;function Io(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 Do(e,t){if(void 0===e)throw new Error("Unexpected undefined");return e}const ko=(e,t,n)=>{let i;return function(...r){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,r),n)}},Ao=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Eo=e=>e,No=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},Lo=(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(Ao(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(Ao(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Po={passive:!0},Oo="undefined"==typeof window||"onscrollend"in window,Ro=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let r=0;const o=e.options.useScrollendEvent&&Oo?()=>{}:ko(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,Po);const u=e.options.useScrollendEvent&&Oo;return u&&n.addEventListener("scrollend",l,Po),()=>{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"]},Fo=(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 Vo{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:Eo,rangeExtractor:No,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=Io(()=>(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=Io(()=>[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=Io(()=>[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=Io(()=>[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=Bo(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=Io(()=>{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=Io(()=>[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 Do(t[Bo(0,t.length-1,e=>Do(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 Bo=(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 jo="undefined"!=typeof document?g.useLayoutEffect:g.useEffect;function Go(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 Vo(i));return r.setOptions(i),jo(()=>r._didMount(),[]),jo(()=>r._willUpdate()),r}({observeElementRect:Lo,observeElementOffset:Ro,scrollToFn:Fo,...e})}const Wo=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,z]=s.useState(""),F=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=Go({count:j.length,getScrollElement:()=>F.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 z(e),!1}return z(""),!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(Co,{open:D,onOpenChange:e=>!u&&!l&&E(e),children:[a.jsx(So,{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(Uo,{isOpen:D})]})}),a.jsx(Mo,{children:a.jsxs(To,{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:F,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),z(""),E(!1)})(t),children:M?M({item:t,text:n,index:e.index,highlightText:P}):a.jsx(Ho,{text:n,highlight:P})},e.key)})})})]})})]}),X&&a.jsx("span",{className:"moz-r-select__invalid-message",children:X})]})});function Ho({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 Uo({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 Yo=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(Zo,{color:"#dc5a5a"})}),!g&&A&&a.jsx("span",{className:k("moz-r-input__invalid-message",`position-${p}`),children:f})]})})});function Zo({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 Xo(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(K,{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(qo,{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(Ko,{disabled:c})}),a.jsx("button",{type:"button",className:"moz-r-number-input__btn-icon",onClick:x,children:a.jsx(Jo,{disabled:c})})]})]}),!d&&a.jsx(K,{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($o,{disabled:c||u<=p})})]})]})}function qo({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 $o({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 Ko({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 Jo({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 Qo="YYYY-MM-DD";function ea(e){const{label:t,name:n,width:i=200,required:r=!1,disabled:o=!1,readonly:l=!1,format:u=Qo,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(K,{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(ta,{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(ia,{disabled:o})})]}),c&&a.jsx(K,{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(na,{disabled:o||w})})]})]})}function ta({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 na({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 ia({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 ra({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 oa({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 aa({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 sa(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(aa,{className:"moz-r-checkbox__checked-icon",disabled:i}):x?a.jsx(oa,{className:"moz-r-checkbox__checked-icon",disabled:i}):a.jsx(ra,{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 la(e){return"∅"===e||"●"===e}function ua({visible:e,onVisibleChange:t,dateFormat:n="YYYY-MM-DD"}){const i=_(),r=U(),[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,z]=s.useState(null),F=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(Yn,{visible:e,onVisibleChange:e=>e?t(!0):L(),title:i.Grid.filterPopup,width:F,height:V,contentsPadding:"16px 16px 0 16px",showFooterBorder:!1,preset:"no-footer",footerSlot:()=>a.jsxs("div",{className:"moz-filter-footer",children:[a.jsx(sa,{checked:p,onChange:f,label:i.Grid.immediateApply}),a.jsxs("div",{className:"moz-filter-footer-actions",children:[a.jsx(K,{type:"text",onClick:E,icon:a.jsx(xe,{color:"#4568e0"}),text:i.Grid.resetFilter}),a.jsx(K,{type:"text",onClick:A,icon:a.jsx(he,{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)||z(null)},onDrop:e=>{e.preventDefault();const t=R,n=P;if(z(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;z({index:t,before:i})})(e,t),onDragEnd:()=>{O(-1),z(null)},style:{opacity:P===t?.4:1},children:[a.jsx("div",{className:"moz-filter-handler",children:a.jsx(ye,{size:"12"})}),r?a.jsx(Wo,{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(Wo,{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(Wo,{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(Xo,{width:"100%",value:Number(e.variable??0),onChange:t=>k(e,t),disabled:la(e.comparison),nullable:!0}):"boolean"===e.type?a.jsx(Wo,{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(ea,{value:e.variable?d(e.variable):null,onChange:t=>k(e,t?d(t).format("YYYY-MM-DD"):null),disabled:la(e.comparison),format:n,width:"100%"}):a.jsx(Yo,{value:String(e.variable??""),onChange:t=>k(e,t),disabled:la(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(de,{})})]},e.sequence)})})})}function ca({visible:e,onVisibleChange:t,width:n=410}){const i=_(),r=U(),[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,byValue:e.byValue??""}})}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.byValue?{byValue:e.byValue}:{}}));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,byValue:""},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(Yn,{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(sa,{checked:u,onChange:c,label:i.Grid.immediateApply}),a.jsxs("div",{className:"moz-sort-footer-actions",children:[a.jsx(K,{type:"text",onClick:T,icon:a.jsx(xe,{color:o.length>0?"#4568e0":"#a7b1bc"}),text:i.Grid.resetSort,disabled:0===o.length}),a.jsx(K,{type:"text",onClick:M,icon:a.jsx(he,{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(ye,{size:"12"})}),a.jsx(Wo,{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(Wo,{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(Wo,{width:120,itemsSource:P,value:e.byValue,keyProp:"value",displayProp:"label",onChange:t=>((e,t)=>{const n=o.map(n=>n.sequence===e.sequence?{...n,byValue: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(de,{})})]},e.sequence)})})})}function da(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 ha(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(K,{className:"grid-option-modal__close-btn",type:"icon",onClick:()=>null==t?void 0:t(),icon:a.jsx(de,{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(da,{value:w,onChange:M})]}),a.jsxs("div",{className:"context-menu-item",onClick:()=>T(!C),children:[a.jsx("span",{children:f.Grid.viewFooter}),a.jsx(da,{value:C,onChange:T})]}),a.jsxs("div",{className:"context-menu-item",onClick:()=>I(!S),children:[a.jsx("span",{children:f.Grid.viewGroupPanel}),a.jsx(da,{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 pa=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)]})}),fa={"=":"eq","≠":"neq","%":"contains","!%":"notContains",">":"gt","≥":"gte","<":"lt","≤":"lte","∅":"isNull","●":"isNotNull"};function ga(){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:fa[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 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)??"",ascending:(null==e?void 0:e.ascending)??!0,byValue:null==e?void 0:e.byValue}])},[]),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 va(){return s.useContext(V)}function ya(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=U(),D=ga(),k=ma(),A=va(),[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]),z=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]),F=s.useRef([]),V=s.useSyncExternalStore(s.useCallback(e=>(null==R?void 0:R.subscribe(e))??(()=>{}),[R]),s.useCallback(()=>(null==R?void 0:R.getSnapshot())??F.current,[R])),B=s.useSyncExternalStore(s.useCallback(e=>(null==z?void 0:z.subscribe(e))??(()=>{}),[z]),s.useCallback(()=>(null==z?void 0:z.getSnapshot())??F.current,[z])),j=t??0,G=n??V.length,W=i??B.length,H=r??(null==A?void 0:A.config.ruleSets.length)??0,Y=(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),[ce,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})}),Te={display:L?void 0:"none"};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"extend-flex-grid-tool-container",style:Te,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(pa,{open:ce,onOpenChange:de,trigger:a.jsx("div",{ref:Ce,className:["extend-grid-tool-badge-item-wrapper",j?"":"extend-grid-tool-disabled",ce?"is-active":""].filter(Boolean).join(" "),title:T.Grid.layoutSetting,children:a.jsx(re,{color:Y(ce,!0),size:"16"})}),children:a.jsx(ha,{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(ne,{color:Y(G),size:"16"})}),c&&Se({titleText:T.Grid.sort,disabled:!j,hasItem:W>0,onClick:pe,className:"toolbox-sort",children:a.jsx(oe,{color:Y(W),size:"16"})}),d&&Se({titleText:T.Grid.customCellStyle,disabled:!j,hasItem:H>0,onClick:fe,className:"toolbox-custom-cell",children:a.jsx(ae,{color:Y(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(ie,{color:$,size:"16"})}),h&&a.jsxs(a.Fragment,{children:[Se({titleText:"실행 취소",disabled:!me,onClick:_e,className:"toolbox-undo",children:a.jsx(se,{color:me?"#8998B5":"#A7B1BC",size:"16"})}),Se({titleText:"다시 실행",disabled:!ye,onClick:be,className:"toolbox-redo",children:a.jsx(le,{color:ye?"#8998B5":"#A7B1BC",size:"16"})})]}),p&&Se({titleText:"CSV 내보내기",disabled:!j,onClick:()=>{we()},className:"toolbox-export",children:a.jsx(ue,{color:j?"#8998B5":"#A7B1BC",size:"16"})}),M]}),u&&a.jsx("div",{className:"extend-grid-tool-separator"}),a.jsx(Me,{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(te,{})})]})]}),e.toolBottom]}),!L&&a.jsx("div",{className:"extend-grid-tool-toggle",onClick:()=>P(!0),children:a.jsx(te,{style:{transform:"rotate(180deg)"}})}),a.jsx(ua,{visible:K,onVisibleChange:J}),a.jsx(ca,{visible:Q,onVisibleChange:ee})]})}function xa({visible:e,onVisibleChange:t,keyFields:n=[],dataKey:i=[]}){const r=_(),o=U(),[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(Yn,{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(sa,{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(sa,{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 _a=1,ba=2,wa=3,Ca=4,Sa=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(Sa,"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(Sa,"FUNCTIONS",new Set(["ABS","ROUND","FLOOR","CEIL","MIN","MAX","LEN","UPPER","LOWER","TRIM","LEFT","RIGHT","NOW","TODAY","DAYS","IF","COALESCE","CONCAT"]));let Ma=Sa;class Ta{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 Ia{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 _a:return String(e);case ba:if("number"==typeof e)return e;if("string"==typeof e){const t=parseFloat(e.replace(/,/g,""));return isNaN(t)?e:t}return e;case Ca:if(e instanceof Date)return e;if("string"==typeof e){const t=new Date(e);return isNaN(t.getTime())?e:t}return e;case wa: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===_a||r===_a)return!1;if(!("ColumnRef"===e.left.type&&"ColumnRef"===e.right.type)){if(t===ba&&"string"==typeof i)return!1;if(r===ba&&"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 Da{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 Ma(e).tokenize(),n=new Ta(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 Ia(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 Ia(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 ba:return"number";case _a:return"string";case Ca:return"date";case wa: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 ka(){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 Da),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;Aa(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(!Aa(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 Aa(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=Ea(e.rules[0],t);for(let o=1;o<e.rules.length;o++){const n=e.rules[o],i=Ea(n,t);r="OR"===n.logical?r||i:r&&i}return r}function Ea(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 Na(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 La={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 Pa(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({...La,...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=Oa(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 Oa(e,t){for(const n of t){if(n.id===e)return n;if(n.children&&n.children.length>0){const t=Oa(e,n.children);if(t)return t}}}function Ra({filteredRowCount:e,totalRowCount:t,children:n}){const i=_(),r=U(),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",()=>{var e,t;const i=null==(t=null==(e=n.rows)?void 0:e.selectionAggregates)?void 0:t.call(e);(null==i?void 0:i.total)&&i.total.count>0?f(i.total):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]=Ae(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=Fe(u),d=s.forwardRef((e,t)=>{const{scope:n,children:i}=e,r=ke(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=Fe(h),g=s.forwardRef((e,t)=>{const{scope:n,children:i,...r}=e,l=s.useRef(null),u=ke(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 Fa=g.createContext(void 0);function Va(e){const t=g.useContext(Fa);return e||t||"ltr"}var Ba="rovingFocusGroup.onEntryFocus",ja={bubbles:!1,cancelable:!0},Ga="RovingFocusGroup",[Wa,Ha,Ua]=za(Ga),[Ya,Za]=Ae(Ga,[Ua]),[Xa,qa]=Ya(Ga),$a=g.forwardRef((e,t)=>a.jsx(Wa.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Wa.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Ka,{...e,ref:t})})}));$a.displayName=Ga;var Ka=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=ke(t,p),m=Va(o),[v,y]=ze({prop:s,defaultProp:l??null,onChange:u,caller:Ga}),[x,_]=g.useState(!1),b=He(c),w=Ha(n),C=g.useRef(!1),[S,M]=g.useState(0);return g.useEffect(()=>{const e=p.current;if(e)return e.addEventListener(Ba,b),()=>e.removeEventListener(Ba,b)},[b]),a.jsx(Xa,{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(Ge.div,{tabIndex:x||0===S?-1:0,"data-orientation":i,...h,ref:f,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{C.current=!0}),onFocus:Te(e.onFocus,e=>{const t=!C.current;if(e.target===e.currentTarget&&t&&!x){const t=new CustomEvent(Ba,ja);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter(e=>e.focusable);ts([e.find(e=>e.active),e.find(e=>e.id===v),...e].filter(Boolean).map(e=>e.ref.current),d)}}C.current=!1}),onBlur:Te(e.onBlur,()=>_(!1))})})}),Ja="RovingFocusGroupItem",Qa=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:o,children:s,...l}=e,u=Oe(),c=o||u,d=qa(Ja,n),h=d.currentTabStopId===c,p=Ha(n),{onFocusableItemAdd:f,onFocusableItemRemove:m,currentTabStopId:v}=d;return g.useEffect(()=>{if(i)return f(),()=>m()},[i,f,m]),a.jsx(Wa.ItemSlot,{scope:n,id:c,focusable:i,active:r,children:a.jsx(Ge.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Te(e.onMouseDown,e=>{i?d.onItemFocus(c):e.preventDefault()}),onFocus:Te(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Te(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:es[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(()=>ts(r))}var n,i}),children:"function"==typeof s?s({isCurrentTabStop:h,hasTabStop:null!=v}):s})})});Qa.displayName=Ja;var es={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ts(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 ns=$a,is=Qa,rs=["Enter"," "],os=["ArrowUp","PageDown","End"],as=["ArrowDown","PageUp","Home",...os],ss={ltr:[...rs,"ArrowRight"],rtl:[...rs,"ArrowLeft"]},ls={ltr:["ArrowLeft"],rtl:["ArrowRight"]},us="Menu",[cs,ds,hs]=za(us),[ps,fs]=Ae(us,[hs,Or,Za]),gs=Or(),ms=Za(),[vs,ys]=ps(us),[xs,_s]=ps(us),bs=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:o,modal:s=!0}=e,l=gs(t),[u,c]=g.useState(null),d=g.useRef(!1),h=He(o),p=Va(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(Kr,{...l,children:a.jsx(vs,{scope:t,open:n,onOpenChange:h,content:u,onContentChange:c,children:a.jsx(xs,{scope:t,onClose:g.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:p,modal:s,children:i})})})};bs.displayName=us;var ws=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=gs(n);return a.jsx(Jr,{...r,...i,ref:t})});ws.displayName="MenuAnchor";var Cs="MenuPortal",[Ss,Ms]=ps(Cs,{forceMount:void 0}),Ts=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,o=ys(Cs,t);return a.jsx(Ss,{scope:t,forceMount:n,children:a.jsx(ct,{present:n||o.open,children:a.jsx(ut,{asChild:!0,container:r,children:i})})})};Ts.displayName=Cs;var Is="MenuContent",[Ds,ks]=ps(Is),As=g.forwardRef((e,t)=>{const n=Ms(Is,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,o=ys(Is,e.__scopeMenu),s=_s(Is,e.__scopeMenu);return a.jsx(cs.Provider,{scope:e.__scopeMenu,children:a.jsx(ct,{present:i||o.open,children:a.jsx(cs.Slot,{scope:e.__scopeMenu,children:s.modal?a.jsx(Es,{...r,ref:t}):a.jsx(Ns,{...r,ref:t})})})})}),Es=g.forwardRef((e,t)=>{const n=ys(Is,e.__scopeMenu),i=g.useRef(null),r=ke(t,i);return g.useEffect(()=>{const e=i.current;if(e)return un(e)},[]),a.jsx(Ps,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Te(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ns=g.forwardRef((e,t)=>{const n=ys(Is,e.__scopeMenu);return a.jsx(Ps,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ls=Fe("MenuContent.ScrollLock"),Ps=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=ys(Is,n),x=_s(Is,n),_=gs(n),b=ms(n),w=ds(n),[C,S]=g.useState(null),M=g.useRef(null),T=ke(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?tn:g.Fragment,P=m?{as:Ls,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),[]),pt();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(Ds,{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(nt,{asChild:!0,trapped:r,onMountAutoFocus:Te(o,e=>{var t;e.preventDefault(),null==(t=M.current)||t.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:a.jsx($e,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,children:a.jsx(ns,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:i,currentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:Te(u,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Qr,{role:"menu","aria-orientation":"vertical","data-state":ll(y.open),"data-radix-menu-content":"",dir:x.dir,..._,...v,ref:T,style:{outline:"none",...v.style},onKeyDown:Te(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(!as.includes(e.key))return;e.preventDefault();const o=w().filter(e=>!e.disabled).map(e=>e.ref.current);os.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:Te(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(I.current),D.current="")}),onPointerMove:Te(e.onPointerMove,dl(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}}))})})})})})})});As.displayName=Is;var Os=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(Ge.div,{role:"group",...i,ref:t})});Os.displayName="MenuGroup";var Rs=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(Ge.div,{...i,ref:t})});Rs.displayName="MenuLabel";var zs="MenuItem",Fs="menu.itemSelect",Vs=g.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...r}=e,o=g.useRef(null),s=_s(zs,e.__scopeMenu),l=ks(zs,e.__scopeMenu),u=ke(t,o),c=g.useRef(!1);return a.jsx(Bs,{...r,ref:u,disabled:n,onClick:Te(e.onClick,()=>{const e=o.current;if(!n&&e){const t=new CustomEvent(Fs,{bubbles:!0,cancelable:!0});e.addEventListener(Fs,e=>null==i?void 0:i(e),{once:!0}),We(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:Te(e.onPointerUp,e=>{var t;c.current||null==(t=e.currentTarget)||t.click()}),onKeyDown:Te(e.onKeyDown,e=>{const t=""!==l.searchRef.current;n||t&&" "===e.key||rs.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Vs.displayName=zs;var Bs=g.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:r,...o}=e,s=ks(zs,n),l=ms(n),u=g.useRef(null),c=ke(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(cs.ItemSlot,{scope:n,disabled:i,textValue:r??p,children:a.jsx(is,{asChild:!0,...l,focusable:!i,children:a.jsx(Ge.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...o,ref:c,onPointerMove:Te(e.onPointerMove,dl(e=>{if(i)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:Te(e.onPointerLeave,dl(e=>s.onItemLeave(e))),onFocus:Te(e.onFocus,()=>h(!0)),onBlur:Te(e.onBlur,()=>h(!1))})})})}),js=g.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...r}=e;return a.jsx(qs,{scope:e.__scopeMenu,checked:n,children:a.jsx(Vs,{role:"menuitemcheckbox","aria-checked":ul(n)?"mixed":n,...r,ref:t,"data-state":cl(n),onSelect:Te(r.onSelect,()=>null==i?void 0:i(!!ul(n)||!n),{checkForDefaultPrevented:!1})})})});js.displayName="MenuCheckboxItem";var Gs="MenuRadioGroup",[Ws,Hs]=ps(Gs,{value:void 0,onValueChange:()=>{}}),Us=g.forwardRef((e,t)=>{const{value:n,onValueChange:i,...r}=e,o=He(i);return a.jsx(Ws,{scope:e.__scopeMenu,value:n,onValueChange:o,children:a.jsx(Os,{...r,ref:t})})});Us.displayName=Gs;var Ys="MenuRadioItem",Zs=g.forwardRef((e,t)=>{const{value:n,...i}=e,r=Hs(Ys,e.__scopeMenu),o=n===r.value;return a.jsx(qs,{scope:e.__scopeMenu,checked:o,children:a.jsx(Vs,{role:"menuitemradio","aria-checked":o,...i,ref:t,"data-state":cl(o),onSelect:Te(i.onSelect,()=>{var e;return null==(e=r.onValueChange)?void 0:e.call(r,n)},{checkForDefaultPrevented:!1})})})});Zs.displayName=Ys;var Xs="MenuItemIndicator",[qs,$s]=ps(Xs,{checked:!1}),Ks=g.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...r}=e,o=$s(Xs,n);return a.jsx(ct,{present:i||ul(o.checked)||!0===o.checked,children:a.jsx(Ge.span,{...r,ref:t,"data-state":cl(o.checked)})})});Ks.displayName=Xs;var Js=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});Js.displayName="MenuSeparator";var Qs=g.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=gs(n);return a.jsx(eo,{...r,...i,ref:t})});Qs.displayName="MenuArrow";var el="MenuSub",[tl,nl]=ps(el),il=e=>{const{__scopeMenu:t,children:n,open:i=!1,onOpenChange:r}=e,o=ys(el,t),s=gs(t),[l,u]=g.useState(null),[c,d]=g.useState(null),h=He(r);return g.useEffect(()=>(!1===o.open&&h(!1),()=>h(!1)),[o.open,h]),a.jsx(Kr,{...s,children:a.jsx(vs,{scope:t,open:i,onOpenChange:h,content:c,onContentChange:d,children:a.jsx(tl,{scope:t,contentId:Oe(),triggerId:Oe(),trigger:l,onTriggerChange:u,children:n})})})};il.displayName=el;var rl="MenuSubTrigger",ol=g.forwardRef((e,t)=>{const n=ys(rl,e.__scopeMenu),i=_s(rl,e.__scopeMenu),r=nl(rl,e.__scopeMenu),o=ks(rl,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(ws,{asChild:!0,...c,children:a.jsx(Bs,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ll(n.open),...e,ref:De(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:Te(e.onPointerMove,dl(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:Te(e.onPointerLeave,dl(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:Te(e.onKeyDown,t=>{var r;const a=""!==o.searchRef.current;e.disabled||a&&" "===t.key||ss[i.dir].includes(t.key)&&(n.onOpenChange(!0),null==(r=n.content)||r.focus(),t.preventDefault())})})})});ol.displayName=rl;var al="MenuSubContent",sl=g.forwardRef((e,t)=>{const n=Ms(Is,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,o=ys(Is,e.__scopeMenu),s=_s(Is,e.__scopeMenu),l=nl(al,e.__scopeMenu),u=g.useRef(null),c=ke(t,u);return a.jsx(cs.Provider,{scope:e.__scopeMenu,children:a.jsx(ct,{present:i||o.open,children:a.jsx(cs.Slot,{scope:e.__scopeMenu,children:a.jsx(Ps,{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:Te(e.onFocusOutside,e=>{e.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Te(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:Te(e.onKeyDown,e=>{var t;const n=e.currentTarget.contains(e.target),i=ls[s.dir].includes(e.key);n&&i&&(o.onOpenChange(!1),null==(t=l.trigger)||t.focus(),e.preventDefault())})})})})})});function ll(e){return e?"open":"closed"}function ul(e){return"indeterminate"===e}function cl(e){return ul(e)?"indeterminate":e?"checked":"unchecked"}function dl(e){return t=>"mouse"===t.pointerType?e(t):void 0}sl.displayName=al;var hl=bs,pl=ws,fl=Ts,gl=As,ml=Os,vl=Rs,yl=Vs,xl=js,_l=Us,bl=Zs,wl=Ks,Cl=Js,Sl=Qs,Ml=il,Tl=ol,Il=sl,Dl="DropdownMenu",[kl]=Ae(Dl,[fs]),Al=fs(),[El,Nl]=kl(Dl),Ll=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:o,onOpenChange:s,modal:l=!0}=e,u=Al(t),c=g.useRef(null),[d,h]=ze({prop:r,defaultProp:o??!1,onChange:s,caller:Dl});return a.jsx(El,{scope:t,triggerId:Oe(),triggerRef:c,contentId:Oe(),open:d,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(e=>!e),[h]),modal:l,children:a.jsx(hl,{...u,open:d,onOpenChange:h,dir:i,modal:l,children:n})})};Ll.displayName=Dl;var Pl="DropdownMenuTrigger",Ol=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...r}=e,o=Nl(Pl,n),s=Al(n);return a.jsx(pl,{asChild:!0,...s,children:a.jsx(Ge.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:De(t,o.triggerRef),onPointerDown:Te(e.onPointerDown,e=>{i||0!==e.button||!1!==e.ctrlKey||(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:Te(e.onKeyDown,e=>{i||(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Ol.displayName=Pl;var Rl=e=>{const{__scopeDropdownMenu:t,...n}=e,i=Al(t);return a.jsx(fl,{...i,...n})};Rl.displayName="DropdownMenuPortal";var zl="DropdownMenuContent",Fl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Nl(zl,n),o=Al(n),s=g.useRef(!1);return a.jsx(gl,{id:r.contentId,"aria-labelledby":r.triggerId,...o,...i,ref:t,onCloseAutoFocus:Te(e.onCloseAutoFocus,e=>{var t;s.current||null==(t=r.triggerRef.current)||t.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:Te(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)"}})});Fl.displayName=zl;g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(ml,{...r,...i,ref:t})}).displayName="DropdownMenuGroup";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(vl,{...r,...i,ref:t})}).displayName="DropdownMenuLabel";var Vl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(yl,{...r,...i,ref:t})});Vl.displayName="DropdownMenuItem";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(xl,{...r,...i,ref:t})}).displayName="DropdownMenuCheckboxItem";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(_l,{...r,...i,ref:t})}).displayName="DropdownMenuRadioGroup";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(bl,{...r,...i,ref:t})}).displayName="DropdownMenuRadioItem";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(wl,{...r,...i,ref:t})}).displayName="DropdownMenuItemIndicator";var Bl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(Cl,{...r,...i,ref:t})});Bl.displayName="DropdownMenuSeparator";g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(Sl,{...r,...i,ref:t})}).displayName="DropdownMenuArrow";var jl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(Tl,{...r,...i,ref:t})});jl.displayName="DropdownMenuSubTrigger";var Gl=g.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=Al(n);return a.jsx(Il,{...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)"}})});Gl.displayName="DropdownMenuSubContent";var Wl=Ll,Hl=Ol,Ul=Rl,Yl=Fl,Zl=Vl,Xl=Bl,ql=e=>{const{__scopeDropdownMenu:t,children:n,open:i,onOpenChange:r,defaultOpen:o}=e,s=Al(t),[l,u]=ze({prop:i,defaultProp:o??!1,onChange:r,caller:"DropdownMenuSub"});return a.jsx(Ml,{...s,open:l,onOpenChange:u,children:n})},$l=jl,Kl=Gl;const Jl=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(Wl,{open:p,onOpenChange:e=>{!e&&u||(e?(f(!0),null==c||c()):v())},children:[o&&a.jsx(Hl,{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(Ul,{children:a.jsx(Yl,{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(Ql,{items:x,close:v,slots:h})})})]})});function Ql({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(Xl,{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(ql,{children:[a.jsxs($l,{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(Ul,{children:a.jsx(Kl,{className:"moz-r-context-menu-content",sideOffset:2,children:a.jsx(Ql,{items:e.children,close:t,slots:n})})})]},`sub-${i}`):a.jsx(Zl,{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 eu=s.forwardRef(function(e,t){const{config:n={},onOpenFilter:i,onOpenColumnPicker:r,onToggleGroupPanel:o,onOpenBulkEditor:l}=e,u=_(),c=U(),d=va(),h=s.useRef(null),[p,f]=s.useState([]),g=s.useRef(null),m=Pa(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(()=>{const t=w();x(()=>I(e,t))})},close:b}),[m,x,b]);const w=s.useCallback(()=>{var e,t;if(!c)return[];try{const n=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()}}),nu(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:tu(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"})),nu(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(Jl,{ref:h,minWidth:"200px",fixPosition:{left:m.position.x,top:m.position.y},slots:D,onClose:m.hide})});function tu(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=>tu(e,t)):void 0}}function nu(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 iu({visible:e=!1}){const t=_(),n=U(),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 ru="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",ou={custom_empty:ru,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 au(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=ou[f]||ru;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 su(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,z]=s.useState(null),F=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(F.current=t);const e=new Set(F.current.map(B)),n=t.filter(t=>!e.has(B(t)));if(n.length>0){const e=n.map(B);w([...b,...e])}F.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=Go({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(Co,{open:I,onOpenChange:e=>!l&&!o&&D(e),children:[a.jsx(So,{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(uu,{isOpen:I})]})}),a.jsx(Mo,{children:a.jsxs(To,{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(sa,{checked:Y,indeterminate:Z,label:P?T.MultiSelect.selectFiltered:T.MultiSelect.selectAll,onChange:q})}),a.jsx("div",{ref:z,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(sa,{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(lu,{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 lu({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 uu({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 cu=1,du=2,hu=3,pu=4,fu=new Set(["+","-","*","/"]),gu=new Set(["=","!=","<",">","<=",">="]),mu=new Set(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"]),vu=new Set(["IS_EMPTY","IS_NOT_EMPTY"]),yu=new Set(["AND","OR","NOT"]),xu=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],_u=[{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 패턴 매칭"}],bu=[{type:"logical",value:"AND",displayText:"AND",description:"그리고"},{type:"logical",value:"OR",displayText:"OR",description:"또는"}];function wu(e){const t=e.toUpperCase();return e.startsWith("[")&&e.endsWith("]")?"ColumnRef":fu.has(e)?"ArithmeticOp":gu.has(e)?"ComparisonOp":mu.has(t)?"StringOp":vu.has(t)?"PostfixOp":yu.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 Cu(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+=xu[n]??""}else/[ㄱ-ㅎ]/.test(n)&&(t+=n)}return t}function Su(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 Mu(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 Tu(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&&Su(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&&Mu(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&&Mu(e,c,i)&&(l=c),{token:e.substring(l),startPosition:l}}function Iu(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 Du(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(gu.has(t)){n.push({type:"ComparisonOp",value:t,start:r,end:r+2}),r+=2;continue}}if(fu.has(t)||gu.has(t))n.push({type:fu.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:wu(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 Iu(m,p);if(g){if(function(e){const t=e.toUpperCase();return _u.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(Su(g.value,i))return"start"}return Iu(f,p)}function ku(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 Au(e){return e.startsWith("[")&&e.endsWith("]")?e.substring(1,e.length-1):null}function Eu(e,t){const n=ku(e);for(let i=n.length-1;i>=0;i--){const e=Au(n[i]);if(e){const n=t.find(t=>t.header===e);if(n)return n.dataType}}}function Nu(e,t){const n=e.trim();if(n.startsWith("[")&&n.endsWith("]")){const e=Au(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 _u.some(e=>e.value.toUpperCase()===t)}(n)?{type:"operator"}:["AND","OR","NOT"].includes(n.toUpperCase())?{type:"logical"}:{type:"unknown"}}function Lu(e,t,n){const i=ku(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{...Nu(o,n),token:o}}function Pu(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?Cu(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 _u;const t=[];for(const n of _u){const i=n.value.toUpperCase();switch(e){case cu:(["=","!="].includes(i)||["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"].includes(i)||["IS_EMPTY","IS_NOT_EMPTY"].includes(i))&&t.push(n);break;case du:(["=","!=","<",">","<=",">="].includes(i)||["+","-","*","/"].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;case hu:(["=","!="].includes(i)||["IS_EMPTY","IS_NOT_EMPTY"].includes(i))&&t.push(n);break;default:t.push(n)}}return t.length>0?t:_u}(Eu(e.currentFullText,t));break;case"after_arithmetic_op":a=[{type:"value",value:"123",displayText:"숫자",description:"숫자 값"},...n];break;case"after_comparison_op":{const i=Eu(e.currentFullText,t),r=[];i&&i!==cu||r.push({type:"value",value:'"텍스트"',displayText:'"문자열"',description:"따옴표 필수",insertText:'""'}),i&&i!==du||r.push({type:"value",value:"123",displayText:"숫자",description:"숫자 값"}),i&&i!==pu||r.push({type:"value",value:"#2025-01-01#",displayText:"#날짜#",description:"날짜 값 (필수 형식)"}),i&&i!==hu||(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=[...bu];break;case"after_arithmetic_expr":a=[..._u.filter(e=>["+","-","*","/","=","!=","<",">","<=",">="].includes(e.value.toUpperCase())),...bu];break;case"after_operator":{const i=Lu(e.currentFullText,e.currentToken,t),r=Eu(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===cu?o="string":r===du?o="number":r===pu?o="date":r===hu&&(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=Lu(e.currentFullText,e.currentToken,t),r=Eu(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===cu?o="string":r===du?o="number":r===pu?o="date":r===hu&&(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=Cu(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 Ou(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=Tu(e.substring(0,Math.min(t+1,e.length)),t,0,n);return{contextState:Du(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=gu.has(o)||fu.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(()=>Pu(t,e),[t,e]);return{contextState:t.contextState,currentToken:t.currentToken,suggestions:a,analyzeContext:r,getInsertText:o}}const Ru=new Set(["!=","<=",">=","=","<",">"]),zu=new Set(["+","-","*","/"]),Fu=new Set(["AND","OR","NOT"]),Vu=new Set(["CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","LIKE"]),Bu=new Set(["IS_EMPTY","IS_NOT_EMPTY"]);function ju(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Gu(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(Ru.has(i)){t.push({type:"comparison",value:i}),n+=2;continue}}if(zu.has(i))t.push({type:"arithmetic",value:i}),n++;else if(Ru.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();Fu.has(r)?t.push({type:"logical",value:i}):Vu.has(r)?t.push({type:"stringOp",value:i}):Bu.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=ju(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 Wu={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 Hu=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}=Ou(i),z=s.useRef(P);z.current=P;const F=s.useRef(w);F.current=w;const V=s.useRef(_);V.current=_;const B=s.useMemo(()=>Gu(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(z.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!==z.current.length)switch(n.key){case"ArrowDown":n.preventDefault(),C(e=>(e+1)%z.current.length);break;case"ArrowUp":n.preventDefault(),C(e=>(e-1+z.current.length)%z.current.length);break;case"Enter":case"Tab":z.current.length>0&&(n.preventDefault(),H(z.current[F.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(z.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:Wu[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)]})}),Uu=1,Yu=2,Zu=3,Xu=4,qu=e=>{if("number"==typeof e)return e;switch(e){case"number":return Yu;case"boolean":return Zu;case"date":return Xu;default:return Uu}},$u=e=>"∅"===e||"●"===e,Ku=[{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"}],Ju=[{name:"red",hex:"#F28270"},{name:"blue",hex:"#618FF9"},{name:"green",hex:"#229889"},{name:"yellow",hex:"#AC991B"},{name:"purple",hex:"#A768D6"}],Qu=e=>Ku[e%Ku.length].hex,ec=e=>Ju[e%Ju.length].hex,tc=(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})`},nc=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 ic({visible:e,onVisibleChange:t,dateFormat:n="YYYY-MM-DD"}){const i=_(),r=U(),o=va(),[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 Da),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 Uu:return A[0];case Yu:case Xu:return E[0];case Zu: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===Uu?"%":"="),comparisonObj:P(t.dataType),type:t.dataType,variable:null};var n},R=s.useCallback(()=>{if(r)try{const e=nc(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]),z=s.useCallback(e=>(R(),S.current.validate(e)),[R]),F=s.useCallback(()=>{if(!r)return{cols:[],info:[]};try{const e=nc(r).map(e=>({header:e.header??e.id,binding:e.id,dataType:qu(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=F();return e.info.length>0&&(u(e.cols),f(e.info)),e},[l,p,F]),Y=()=>{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:qu(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:Qu(r),textColor:ec(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=z(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),[z,G]),J=(e,t)=>("background"===t?Ku:Ju).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&&!J(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?tc(t,.5):(e=>{const t=Ku.findIndex(t=>t.hex.toLowerCase()===e.toLowerCase());if(t<0)return tc(e,.5);const n=Ju[t%Ju.length].hex;return tc(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:Qu(0),textColor:ec(0),targetColumns:e,enabled:!0};m([t])}};s.useEffect(()=>{if(!e||!r||!o)return;(()=>{const{cols:e,info:t}=F();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!==Xu||t.dummy||(t.dummy=d(t.variable)),(e=>{let t;switch(e.type){case Uu:t=A.find(t=>t.symbol===e.comparison);break;case Yu:t=E.find(t=>t.symbol===e.comparison);break;case Zu: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&&!J(e.backgroundColor,"background")&&w.current.set(`${t}-background`,e.backgroundColor),e.textColor&&!J(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:qu(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:Qu(0),textColor:ec(0),targetColumns:e,enabled:!0}])}}})()},[e]);const pe=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($u(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(Yn,{visible:e,onVisibleChange:e=>e?t(!0):pe(),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(sa,{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(xe,{size:"12",color:"#4568e0"}),a.jsx("div",{children:i.Grid.resetCustomCell})]}),a.jsxs("div",{className:"add-rule-group-button",onClick:Y,children:[a.jsx(he,{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(Yo,{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(K,{type:"text",disabled:0===r,onClick:()=>Z(r,"up"),children:a.jsx(me,{size:"12",color:0===r?"#d3d5e5":"#8998B5"})}),a.jsx(K,{type:"text",disabled:r===g.length-1,onClick:()=>Z(r,"down"),children:a.jsx(ve,{size:"12",color:r===g.length-1?"#d3d5e5":"#8998B5"})}),a.jsx(K,{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(de,{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(Hu,{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(Ce,{})}),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(be,{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(Wo,{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(Wo,{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(Wo,{value:t.comparisonObj,onChange:(e,t)=>((e,t,n)=>{X(e,t,{comparison:n.symbol,comparisonObj:n})})(r,i,t),itemsSource:t.type===Yu||t.type===Xu?E:t.type===Zu?N:A,keyProp:"symbol",displayProp:"symbol",useObjBinding:!0,useFilter:!1,listWidth:172,width:"100%"}),t.type===Yu?a.jsx(Xo,{value:Number(t.variable??0),onChange:e=>X(r,i,{variable:e}),disabled:$u(t.comparison),step:1,nullable:!0,width:0===i&&e.rules.length<=1?"256px":"173px"}):t.type===Zu?a.jsx(Wo,{value:t.variable,onChange:e=>X(r,i,{variable:e}),itemsSource:[{key:!0,value:"TRUE"},{key:!1,value:"FALSE"}],displayProp:"value",keyProp:"key",disabled:$u(t.comparison),width:0===i&&e.rules.length<=1?"256px":"173px"}):t.type===Xu?a.jsx(ea,{value:t.variable?d(t.variable):null,onChange:e=>X(r,i,{variable:e?d(e).format("YYYY-MM-DD"):null}),disabled:$u(t.comparison),format:n,width:0===i&&e.rules.length<=1?"256px":"173px"}):a.jsx(Yo,{value:String(t.variable??""),onChange:e=>X(r,i,{variable:e}),disabled:$u(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(de,{})})]},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:qu(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(he,{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(su,{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:[Ju.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(we,{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:[Ku.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(we,{color:te(x.setIndex,"background")?void 0:"#8998B5"})})]})]})]})]})]}),document.body)]})}const rc=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=ka(),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(ya,{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(iu,{visible:b})}),a.jsxs("div",{className:"moz-r-grid__body",children:[a.jsx(X,{...m,keyFields:f,onReady:E,ref:t,children:c&&a.jsx(eu,{ref:k,config:d,onOpenFilter:O,onOpenColumnPicker:N,onToggleGroupPanel:P})}),p&&a.jsx("div",{className:"moz-r-grid__empty-overlay",children:a.jsx(au,{isCustomState:p.isCustomState,headerMsg:p.headerMsg,contentMsg:p.contentMsg,useImg:p.useImg??!0,selectImg:p.selectImg})})]}),o&&x&&a.jsx(Ra,{}),a.jsx(xa,{visible:C,onVisibleChange:S,keyFields:f}),a.jsx(ua,{visible:M,onVisibleChange:T}),u&&a.jsx(ic,{visible:A.showCustomCell,onVisibleChange:e=>e?A.showCustomCellHandler():A.hideCustomCellHandler()})]})})})});rc.displayName="MozGridReact";const oc=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 ac({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 sc(e){return parseFloat(e.toFixed(3))}function lc({group:e}){const{orientation:t,panels:n}=e;return n.reduce((e,n)=>e+="horizontal"===t?n.element.offsetWidth:n.element.offsetHeight,0)}function uc(e){const{panels:t}=e,n=lc({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=sc(ac({groupSize:n,panelElement:t,styleProp:i.collapsedSize})/n*100)}if(void 0!==i.defaultSize){r=sc(ac({groupSize:n,panelElement:t,styleProp:i.defaultSize})/n*100)}let a=0;if(void 0!==i.minSize){a=sc(ac({groupSize:n,panelElement:t,styleProp:i.minSize})/n*100)}let s=100;if(void 0!==i.maxSize){s=sc(ac({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 cc(e,t="Assertion error"){if(!e)throw Error(t)}function dc(e,t){return Array.from(t).sort("horizontal"===e?hc:pc)}function hc(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return 0!==n?n:e.element.offsetWidth-t.element.offsetWidth}function pc(e,t){const n=e.element.offsetTop-t.element.offsetTop;return 0!==n?n:e.element.offsetHeight-t.element.offsetHeight}function fc(e){return null!==e&&"object"==typeof e&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function gc(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 mc({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}=gc(i,a),s="horizontal"===e?t:n;s<o&&(o=s,r=a)}return cc(r,"No rect found"),r}let vc;function yc(){return void 0===vc&&(vc="function"==typeof matchMedia&&!!matchMedia("(pointer:coarse)").matches),vc}function xc(e){const{element:t,orientation:n,panels:i,separators:r}=e,o=dc(n,Array.from(t.children).filter(fc).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=mc({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=yc()?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:lc({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 _c{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 bc=new Map;const wc=new _c;function Cc(e,t){for(const[n]of bc)if(n.id===e)return n}function Sc(e,t){for(const[n,i]of bc)if(n.id===e)return i;if(t)throw Error(`Could not find data for Group with id ${e}`)}function Mc(){return bc}function Tc(e,t){return wc.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function Ic(e,t){const n=bc.get(e);bc=new Map(bc),bc.set(e,t),wc.emit("groupChange",{group:e,prev:n,next:t})}const Dc=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function kc(e){const t=getComputedStyle(e);return!!("fixed"===t.position||"auto"!==t.zIndex&&("static"!==t.position||function(e){const t=getComputedStyle(Lc(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||Dc.test(t.willChange)||"touch"===t.webkitOverflowScrolling)}function Ac(e){let t=e.length;for(;t--;){const n=e[t];if(cc(n,"Missing node"),kc(n))return n}return null}function Ec(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Nc(e){const t=[];for(;e;)t.push(e),e=Lc(e);return t}function Lc(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 Pc(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 Oc({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!fc(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:Nc(e),b:Nc(t)};let i;for(;n.a.at(-1)===n.b.at(-1);)i=n.a.pop(),n.b.pop();cc(i,"Stacking order can only be calculated for elements with a common ancestor");const r=Ec(Ac(n.a)),o=Ec(Ac(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(Pc(i.getBoundingClientRect(),t))return!1;i=i.parentElement}}return!0}function Rc(e,t){const n=[];return t.forEach((t,i)=>{if(i.disabled)return;const r=xc(i),o=function(e,t,n){let i,r={x:1/0,y:1/0};for(const o of t){const t=gc(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&&Oc({groupElement:i.element,hitRegion:o.hitRegion.rect,pointerEventTarget:e.target})&&n.push(o.hitRegion)}),n}function zc(e,t,n=0){return Math.abs(sc(e)-sc(t))<=n}function Fc(e,t){return zc(e,t)?0:e>t?1:-1}function Vc({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(Fc(i,l)<0)if(o){i=Fc(i,(r+l)/2)<0?r:l}else i=l;return i=sc(i=Math.min(s,i))}function Bc({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;cc(null!=c,"Invalid first pivot index"),cc(null!=d,"Invalid second pivot index");let h=0;switch(o){case"keyboard":{const t=e<0?d:c,i=n[t];cc(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(cc(null!=n,`Previous layout not found for panel index ${t}`),zc(n,r)){const t=a-n;Fc(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{const t=e<0?c:d,i=n[t];cc(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(cc(null!=n,`Previous layout not found for panel index ${t}`),zc(n,a)){const t=n-r;Fc(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}break;default:{const t=e<0?d:c,i=n[t];cc(i,`Panel constraints not found for index ${t}`);const r=s[t],{collapsible:o,collapsedSize:a,minSize:l}=i;if(o&&Fc(r,l)<0)if(e>0){const t=l-a,n=t/2;Fc(r+e,l)<0&&(e=Fc(e,n)<=0?0:t)}else{const t=l-a,n=100-t/2;Fc(r-e,l)<0&&(e=Fc(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];cc(null!=e,`Previous layout not found for panel index ${i}`);if(r+=Vc({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];cc(null!=r,`Previous layout not found for panel index ${t}`);const o=r-i,l=Vc({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];cc(null!=i,`Previous layout not found for panel index ${t}`);const r=i+h,o=Vc({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];cc(null!=r,`Previous layout not found for panel index ${i}`);const o=r+t,s=Vc({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 jc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(void 0===t[n]||0!==Fc(e[n],t[n]))return!1;return!0}function Gc({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];cc(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];cc(null!=e,`No layout data found for index ${s}`);const r=i[s];cc(null!=r,`No layout data found for index ${s}`);const a=Vc({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];cc(null!=e,`No layout data found for index ${s}`);const n=e+o,r=Vc({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 Wc({groupId:e,panelId:t}){const n=()=>{const t=Mc();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]:sc(100-e)}}return Bc({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=Gc({layout:c,panelConstraints:r});jc(l,d)||Ic(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=lc({group:t}),s=sc(ac({groupSize:o,panelElement:i,styleProp:e})/o*100);a(s)}}}function Hc(e){if(e.defaultPrevented)return;const t=Mc();Rc(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=Wc({groupId:t.group.id,panelId:n.id});r&&void 0!==i&&(r.resize(i),e.preventDefault())}}})}function Uc(e){const t=Mc();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 Yc({groupId:e}){const t=()=>{const t=Mc();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=Gc({layout:e,panelConstraints:i});return n?a:(jc(a,l)||Ic(r,{defaultLayoutDeferred:n,derivedPanelConstraints:i,groupSize:o,layout:l,separatorToPanels:s}),l)}}}function Zc(e,t){const n=Uc(e),i=Sc(n.id,!0),r=n.separators.find(t=>t.element===e);cc(r,"Matching separator not found");const o=i.separatorToPanels.get(r);cc(o,"Matching panels not found");const a=o.map(e=>n.panels.indexOf(e)),s=Yc({groupId:n.id}).getLayout(),l=Gc({layout:Bc({delta:t,initialLayout:s,panelConstraints:i.derivedPanelConstraints,pivotIndices:a,prevLayout:s,trigger:"keyboard"}),panelConstraints:i.derivedPanelConstraints});jc(s,l)||Ic(n,{defaultLayoutDeferred:i.defaultLayoutDeferred,derivedPanelConstraints:i.derivedPanelConstraints,groupSize:i.groupSize,layout:l,separatorToPanels:i.separatorToPanels})}function Xc(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Uc(t);if(!n.disabled)switch(e.key){case"ArrowDown":e.preventDefault(),"vertical"===n.orientation&&Zc(t,5);break;case"ArrowLeft":e.preventDefault(),"horizontal"===n.orientation&&Zc(t,-5);break;case"ArrowRight":e.preventDefault(),"horizontal"===n.orientation&&Zc(t,5);break;case"ArrowUp":e.preventDefault(),"vertical"===n.orientation&&Zc(t,-5);break;case"End":e.preventDefault(),Zc(t,100);break;case"Enter":{e.preventDefault();const n=Uc(t),i=Sc(n.id,!0),{derivedPanelConstraints:r,layout:o,separatorToPanels:a}=i,s=n.separators.find(e=>e.element===t);cc(s,"Matching separator not found");const l=a.get(s);cc(l,"Matching panels not found");const u=l[0],c=r.find(e=>e.panelId===u.id);if(cc(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;Zc(t,i-e)}break}case"F6":{e.preventDefault();const n=Uc(t).separators.map(e=>e.element),i=Array.from(n).findIndex(t=>t===e.currentTarget);cc(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(),Zc(t,-100)}}let qc={cursorFlags:0,state:"inactive"};const $c=new _c;function Kc(){return qc}function Jc(e){const t=qc;qc=e,$c.emit("change",{prev:t,next:e})}function Qc(e){if(e.defaultPrevented)return;if("mouse"===e.pointerType&&e.button>0)return;const t=Mc(),n=Rc(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)}),Jc({cursorFlags:0,hitRegions:n,initialLayoutMap:i,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}const ed=e=>e,td=()=>{};let nd;function id(){return void 0===nd&&(nd=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(nd=!0)),nd}const rd=new WeakMap;function od(e){if(null===e.defaultView||void 0===e.defaultView)return;let{prevStyle:t,styleSheet:n}=rd.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=Kc();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&&id()){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 id()?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)}rd.set(e,{prevStyle:t,styleSheet:n})}function ad({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=Bc({delta:d,initialLayout:h,panelConstraints:g,pivotIndices:e.panels.map(e=>u.indexOf(e)),prevLayout:v,trigger:"mouse-or-touch"});if(jc(t,v)){if(0!==d&&!c)switch(l){case"horizontal":s|=d<0?1:2;break;case"vertical":s|=d<0?4:8}}else Ic(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=qc,n={...qc};n.cursorFlags=e,qc=n,$c.emit("change",{prev:t,next:n})}(l),od(e)}function sd(e){const t=Mc(),n=Kc();if("active"===n.state)ad({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}function ld(e){var t,n;if(e.defaultPrevented)return;const i=Kc(),r=Mc();switch(i.state){case"active":if(0===e.buttons)return Jc({cursorFlags:0,state:"inactive"}),void i.hitRegions.forEach(e=>{const t=Sc(e.group.id,!0);Ic(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)}ad({document:e.currentTarget,event:e,hitRegions:i.hitRegions,initialLayoutMap:i.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:i.pointerDownAtPoint,prevCursorFlags:i.cursorFlags});break;default:{const t=Rc(e,r);0===t.length?"inactive"!==i.state&&Jc({cursorFlags:0,state:"inactive"}):Jc({cursorFlags:0,hitRegions:t,state:"hover"}),od(e.currentTarget);break}}}function ud(e){if(e.relatedTarget instanceof HTMLIFrameElement&&"hover"===Kc().state)Jc({cursorFlags:0,state:"inactive"})}function cd(e){if(e.defaultPrevented)return;if("mouse"===e.pointerType&&e.button>0)return;const t=Kc();if("active"===t.state)Jc({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(od(e.currentTarget),t.hitRegions.forEach(e=>{const t=Sc(e.group.id,!0);Ic(e.group,t)}),e.preventDefault())}function dd(e){let t=0,n=0;const i={};for(const o of e)if(void 0!==o.defaultSize){t++;const e=sc(o.defaultSize);n+=e,i[o.panelId]=e}else i[o.panelId]=void 0;const r=e.length-t;if(0!==r){const t=sc((100-n)/r);for(const n of e)void 0===n.defaultSize&&(i[n.panelId]=t)}return i}function hd(e,t,n){if(!n[0])return;const i=e.panels.find(e=>e.element===t);if(!i||!i.onResize)return;const r=lc({group:e}),o="horizontal"===e.orientation?i.element.offsetWidth:i.element.offsetHeight,a=i.mutableValues.prevSize,s={asPercentage:sc(o/r*100),inPixels:o};i.mutableValues.prevSize=s,i.onResize(s,i.id,a)}function pd(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 fd({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=sc(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]=sc(e/o*u)}else{const e=sc(u/l.length);for(const t of l)c[t]=e}return c}const gd=new Map;function md(e){let t=!0;cc(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=lc({group:e});if(0===t)return;const n=Sc(e.id);if(!n)return;const i=uc(e),r=n.defaultLayoutDeferred?dd(i):n.layout,o=Gc({layout:fd({group:e,nextGroupSize:t,prevGroupSize:n.groupSize,prevLayout:r}),panelConstraints:i});if(!n.defaultLayoutDeferred&&jc(n.layout,o)&&pd(n.derivedPanelConstraints,i)&&n.groupSize===t)return;Ic(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:i,groupSize:t,layout:o,separatorToPanels:n.separatorToPanels})}}else hd(e,r,n)}});o.observe(e.element),e.panels.forEach(e=>{cc(!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=lc({group:e}),s=uc(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=Gc({layout:e.mutableState.layouts[l]??u??dd(s),panelConstraints:s}),d=e.element.ownerDocument;gd.set(d,(gd.get(d)??0)+1);const h=new Map;return xc(e).forEach(e=>{e.separator&&h.set(e.separator,e.panels)}),Ic(e,{defaultLayoutDeferred:0===a,derivedPanelConstraints:s,groupSize:a,layout:c,separatorToPanels:h}),e.separators.forEach(e=>{cc(!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",Xc)}),1===gd.get(d)&&(d.addEventListener("dblclick",Hc,!0),d.addEventListener("pointerdown",Qc,!0),d.addEventListener("pointerleave",sd),d.addEventListener("pointermove",ld),d.addEventListener("pointerout",ud),d.addEventListener("pointerup",cd,!0)),function(){t=!1,gd.set(d,Math.max(0,(gd.get(d)??0)-1)),function(e){bc=new Map(bc),bc.delete(e)}(e),e.separators.forEach(e=>{e.element.removeEventListener("keydown",Xc)}),gd.get(d)||(d.removeEventListener("dblclick",Hc,!0),d.removeEventListener("pointerdown",Qc,!0),d.removeEventListener("pointerleave",sd),d.removeEventListener("pointermove",ld),d.removeEventListener("pointerout",ud),d.removeEventListener("pointerup",cd,!0)),o.disconnect()}}function vd(e){const t=s.useId();return`${e??t}`}const yd=typeof window<"u"?s.useLayoutEffect:s.useEffect;function xd(e){const t=s.useRef(e);return yd(()=>{t.current=e},[e]),s.useCallback((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[t])}function _d(...e){return xd(t=>{e.forEach(e=>{if(e)switch(typeof e){case"function":e(t);break;case"object":e.current=t}})})}function bd(e){const t=s.useRef({...e});return yd(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const wd=s.createContext(null);function Cd({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=xd(e=>{jc(m.current.onLayoutChange,e)||(m.current.onLayoutChange=e,null==c||c(e))}),y=xd(e=>{jc(m.current.onLayoutChanged,e)||(m.current.onLayoutChanged=e,null==d||d(e))}),x=vd(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=_d(_,o);!function(e,t){const n=s.useRef({getLayout:()=>({}),setLayout:ed});s.useImperativeHandle(t,()=>n.current,[]),yd(()=>{Object.assign(n.current,Yc({groupId:e}))})}(x,l);const M=xd((e,t)=>{const i=Kc(),r=Cc(e),o=Sc(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=bd({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=dc(h,[...t.panels,e]),w(),()=>{t.panels=t.panels.filter(t=>t!==e),w()}},registerSeparator:e=>{const t=C.current;return t.separators=dc(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=Cc(x),r=Sc(x);i&&r&&Ic(i,{...r,derivedPanelConstraints:uc(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 yd(()=>{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=md(i),{defaultLayoutDeferred:a,derivedPanelConstraints:s,layout:l}=Sc(i.id,!0);!a&&s.length>0&&(v(l),y(l));const u=Tc(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"!==Kc().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(wd.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 Sd(){const e=s.useContext(wd);return cc(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Md({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=vd(c),x=bd({disabled:o}),_=s.useRef(null),b=_d(_,l),{getPanelStyles:w,id:C,orientation:S,registerPanel:M,updatePanelProps:T}=Sd(),I=null!==p,D=xd((e,t,n)=>{null==p||p(e,c,n)});yd(()=>{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}=Sd(),i=s.useRef({collapse:td,expand:td,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:td});s.useImperativeHandle(t,()=>i.current,[]),yd(()=>{Object.assign(i.current,Wc({groupId:n,panelId:e}))})}(y,f);const k=()=>{const e=w(C,y);if(e)return JSON.stringify(e)},A=s.useSyncExternalStore(e=>Tc(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:{...Td,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})})}Cd.displayName="Group",Md.displayName="Panel";const Td={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Id({children:e,className:t,disabled:n,disableDoubleClick:i,elementRef:r,id:o,style:l,...u}){const c=vd(o),d=bd({disabled:n,disableDoubleClick:i}),[h,p]=s.useState({}),[f,g]=s.useState("inactive"),[m,v]=s.useState(!1),y=s.useRef(null),x=_d(y,r),{disableCursor:_,id:b,orientation:w,registerSeparator:C,updateSeparatorProps:S}=Sd(),M="horizontal"===w?"vertical":"horizontal";let T,I;if(yd(()=>{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 $c.addListener("change",e)}(e=>{g("inactive"!==e.next.state&&e.next.hitRegions.some(e=>e.separator===t)?e.next.state:"inactive")}),r=Tc(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=Gc({layout:Bc({delta:(s.collapsible?s.collapsedSize:s.minSize)-a,initialLayout:e,panelConstraints:t,pivotIndices:u,prevLayout:e}),panelConstraints:t})[n],r=Gc({layout:Bc({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 Dd(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=U(),k=va(),[A,E]=s.useState(!0),[N,L]=s.useState(!1),[P,O]=s.useState(!1),R=f??P,z=e=>{g?g(e):O(e)},[F,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]),Y=s.useRef([]),Z=s.useSyncExternalStore(e=>(null==W?void 0:W.subscribe(e))??(()=>{}),()=>(null==W?void 0:W.getSnapshot())??Y.current),X=s.useSyncExternalStore(e=>(null==H?void 0:H.subscribe(e))??(()=>{}),()=>(null==H?void 0:H.getSnapshot())??Y.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]),se=b??(()=>L(e=>!e)),le=w??(()=>{u&&z(!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(pa,{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:se,children:a.jsx(re,{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(ne,{color:Q(q),size:"16"})}),i&&he({titleText:I.Grid.sort,disabled:!u,hasItem:$>0,onClick:ue,children:a.jsx(oe,{color:Q($),size:"16"})}),r&&he({titleText:I.Grid.customCellStyle,disabled:!u,hasItem:K>0,onClick:ce,children:a.jsx(ae,{color:Q(K),size:"16"})}),o&&he({titleText:"차트",disabled:!u,isActive:l,onClick:T,children:a.jsx(_e,{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(ie,{color:ee,size:"16"})}),y]}),t&&a.jsx("div",{className:"extend-grid-tool-separator"}),a.jsx(Me,{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(te,{})})]})]}),!A&&a.jsx("div",{className:"extend-grid-tool-toggle",onClick:()=>E(!0),children:a.jsx(te,{style:{transform:"rotate(180deg)"}})}),a.jsx(ua,{visible:R,onVisibleChange:z}),a.jsx(ca,{visible:F,onVisibleChange:V})]})}function kd(e,t){return e&&t?"subtotals":t?"grandTotals":"none"}function Ad(e){switch(e){case"none":return{sub:!1,grand:!1};case"grandTotals":return{sub:!1,grand:!0};case"subtotals":return{sub:!0,grand:!0}}}Id.displayName="Separator";const Ed={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 Nd(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 Ld(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(kd(d,h)),[L,P]=s.useState(kd(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]),z=void 0===m?O:m,F=void 0===v?R:v,V=z.join(""),B=F.join(""),[j,G]=s.useState(()=>[...z]),[W,H]=s.useState(()=>[...F]),[U,Y]=s.useState(y),[Z,X]=s.useState(x);s.useEffect(()=>{N(kd(d,h))},[d,h]),s.useEffect(()=>{P(kd(f,g))},[f,g]),s.useEffect(()=>{G(z.length>0?[...z]:[])},[V]),s.useEffect(()=>{H(F.length>0?[...F]:[])},[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===kd(d,h)&&L===kd(f,g)&&U===y&&Z===x&&j.join(" ")===z.join(" ")&&W.join(" ")===F.join(" "))return;const e=Ad(E),t=Ad(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 J=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(Nd(l[0])),[le,ue]=s.useState((null==(r=null==(i=l[0])?void 0:i.decimalFormat)?void 0:r.mode)??"round"),[ce,he]=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(Nd(e)),ue((null==(t=e.decimalFormat)?void 0:t.mode)??"round"),he(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===Nd(t)&&le===((null==(e=n.decimalFormat)?void 0:e.mode)??"round")&&ce===(n.showOriginalValue??!1))return}const n=Ed[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 me=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(K,{type:"icon",className:"moz-r-pivot-option-modal__btn",onClick:()=>A("Main"),children:a.jsx(ge,{size:"12"})}),a.jsx("div",{style:{width:1,height:10,backgroundColor:"rgba(186, 198, 212, 1)"}})]}),a.jsx(K,{type:"icon",className:"moz-r-pivot-option-modal__btn",onClick:()=>null==C?void 0:C(),children:a.jsx(de,{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(da,{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(fe,{size:"14"})]}),J&&a.jsxs("div",{className:"moz-r-pivot-option-modal__item",onClick:()=>A("Field"),children:[a.jsx("span",{children:D.fieldSetting??"값 필드 설정"}),a.jsx(fe,{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(Wo,{width:160,value:E,onChange:e=>N(e),itemsSource:me,keyProp:"itemValue",displayProp:"itemName"})]}),a.jsxs("div",{className:"moz-r-pivot-option-modal__option-item",children:[D.showColumnTotals??"열 합계 표시",a.jsx(Wo,{width:160,value:L,onChange:e=>P(e),itemsSource:me,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(su,{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(su,{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(da,{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(da,{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(Wo,{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(Wo,{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(Wo,{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(Wo,{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(Wo,{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:()=>he(e=>!e),children:[D.showOriginalValue??"원본값 병기",a.jsx("div",{onClick:e=>e.stopPropagation(),children:a.jsx(da,{value:ce,onChange:he})})]})]})]})}const Pd={sum:"Sum",avg:"Avg",count:"Cnt",min:"Min",max:"Max"};function Od(e){const{field:t,header:n,area:i,aggregate:r,settingsActive:o,onRemove:l,onOpenSettings:u}=e,c=s.useMemo(()=>r?Pd[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(ye,{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(Se,{color:o?"#4568e0":"#8998b5",size:"12"})})]}):a.jsxs("div",{className:"pivot-field-chip",children:[a.jsx(ye,{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(de,{size:"10"})})]})}function Rd(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(Od,{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)},z=(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 F=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:F[e]??e}))},[F,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(Yn,{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(sa,{checked:y,onChange:x,label:d.Grid.immediateApply}),!y&&a.jsx(K,{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=z(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(Yo,{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(sa,{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=z(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(Rd,{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(Rd,{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(Rd,{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(Yn,{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(Wo,{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 Fd={showPopup:!1,activeGrid:null,defaultImportOptions:{}};const Vd=new Set;function Bd(){Vd.forEach(e=>e())}function jd(e){return Vd.add(e),()=>Vd.delete(e)}function Gd(){return Fd}function Wd(){return{...s.useSyncExternalStore(jd,Gd,Gd),show(e,t={}){Fd={showPopup:!0,activeGrid:e,defaultImportOptions:t},Bd()},hide(){Fd={...Fd,showPopup:!1},Bd()}}}let Hd=0;async function Ud(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 Yd(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 Zd=s.forwardRef(function({config:e={},onOpenFilter:t,onOpenColumnPicker:n,onToggleGroupPanel:i,onOpenBulkEditor:r},o){const l=_(),u=U(),c=Wd(),d=s.useRef(null),[h,p]=s.useState([]),f=s.useRef(null),g=Pa(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(()=>{const t=b();y(()=>S(e,t))})},close:x}),[g,y,x]);const b=s.useCallback(()=>{var e,t;if(!u)return[];try{const n=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 Ud(u,{fileName:e.exportFileName??"export",...e.clientExportOptions??{}}),x()}}),f.push({text:a.contextExportCsvClient??"CSV (클라이언트)",function:async()=>{u&&await Yd(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(Jl,{ref:d,minWidth:"200px",fixPosition:{left:g.position.x,top:g.position.y},slots:M,onClose:g.hide})});function Xd(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(Wo,{value:t,itemsSource:y,displayProp:"value",keyProp:"key",label:v.chartType??"차트 유형",width:200,useFilter:!1,onChange:e=>d(e)}),i.length>1&&a.jsx(Wo,{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(Wo,{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(su,{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(K,{type:"icon",className:"moz-chart-button",onClick:g,children:a.jsx(ge,{size:"14",color:"#8998B5"})}),a.jsx("div",{className:"moz-spacer"})]}),a.jsx(K,{type:"icon",className:"moz-chart-button",onClick:m,children:a.jsx(de,{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 qd=function(e,t){return(qd=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 $d(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}qd(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Kd=function(){return function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}}(),Jd=new(function(){return function(){this.browser=new Kd,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?(Jd.wxa=!0,Jd.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Jd.worker=!0:!Jd.hasGlobalWindow||"Deno"in window?(Jd.node=!0,Jd.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,Jd);var Qd="sans-serif",eh="12px "+Qd;var th=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"),nh={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(){var e,t;return function(n,i){if(!e){var r=nh.createCanvas();e=r&&r.getContext("2d")}if(e)return t!==i&&(t=e.font=i||eh),e.measureText(n);n=n||"";var o=/((?:\d+)?\.?\d*)px/.exec(i=i||eh),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=th[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}},ih=Ih(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),rh=Ih(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),oh=Object.prototype.toString,ah=Array.prototype,sh=ah.forEach,lh=ah.filter,uh=ah.slice,ch=ah.map,dh=function(){}.constructor,hh=dh?dh.prototype:null,ph="__proto__",fh=2311;function gh(){return fh++}function mh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function vh(e){if(null==e||"object"!=typeof e)return e;var t=e,n=oh.call(e);if("[object Array]"===n){if(!Qh(e)){t=[];for(var i=0,r=e.length;i<r;i++)t[i]=vh(e[i])}}else if(rh[n]){if(!Qh(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(!ih[n]&&!Qh(e)&&!Bh(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==ph&&(t[a]=vh(e[a]));return t}function yh(e,t,n){if(!zh(t)||!zh(e))return n?vh(t):e;for(var i in t)if(t.hasOwnProperty(i)&&i!==ph){var r=e[i],o=t[i];!zh(o)||!zh(r)||Nh(o)||Nh(r)||Bh(o)||Bh(r)||Fh(o)||Fh(r)||Qh(o)||Qh(r)?!n&&i in e||(e[i]=vh(t[i])):yh(r,o,n)}return e}function xh(e,t){for(var n=e[0],i=1,r=e.length;i<r;i++)n=yh(n,e[i],t);return n}function _h(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==ph&&(e[n]=t[n]);return e}function bh(e,t,n){for(var i=kh(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 wh(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 Ch(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 bh(e,t,n)}function Sh(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function Mh(e,t,n){if(e&&t)if(e.forEach&&e.forEach===sh)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 Th(e,t,n){if(!e)return[];if(!t)return Zh(e);if(e.map&&e.map===ch)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 Ih(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 Dh(e,t,n){if(!e)return[];if(!t)return Zh(e);if(e.filter&&e.filter===lh)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 kh(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 Ah=hh&&Lh(hh.bind)?hh.call.bind(hh.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(uh.call(arguments)))}};function Eh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(uh.call(arguments)))}}function Nh(e){return Array.isArray?Array.isArray(e):"[object Array]"===oh.call(e)}function Lh(e){return"function"==typeof e}function Ph(e){return"string"==typeof e}function Oh(e){return"[object String]"===oh.call(e)}function Rh(e){return"number"==typeof e}function zh(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Fh(e){return!!ih[oh.call(e)]}function Vh(e){return!!rh[oh.call(e)]}function Bh(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function jh(e){return null!=e.colorStops}function Gh(e){return"[object RegExp]"===oh.call(e)}function Wh(e){return e!=e}function Hh(){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 Uh(e,t){return null!=e?e:t}function Yh(e,t,n){return null!=e?e:null!=t?t:n}function Zh(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return uh.apply(e,t)}function Xh(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 qh(e,t){if(!e)throw new Error(t)}function $h(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Kh="__ec_primitive__";function Jh(e){e[Kh]=!0}function Qh(e){return e[Kh]}var ep=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 kh(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),tp="function"==typeof Map;var np=function(){function e(t){var n=Nh(t);this.data=tp?new Map:new ep;var i=this;function r(e,t){n?i.set(e,t):i.set(t,e)}t instanceof e?t.each(r):t&&Mh(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 tp?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function ip(e){return new np(e)}function rp(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 op(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&_h(n,t),n}function ap(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function sp(e,t){return e.hasOwnProperty(t)}function lp(){}var up=180/Math.PI;function cp(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function dp(e,t){return e[0]=t[0],e[1]=t[1],e}function hp(e){return[e[0],e[1]]}function pp(e,t,n){return e[0]=t,e[1]=n,e}function fp(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function gp(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e}function mp(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function vp(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}function yp(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function xp(e,t){var n=vp(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function _p(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var bp=_p;var wp=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function Cp(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 Sp(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 Mp(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Tp(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Ip=function(){return function(e,t){this.target=e,this.topTarget=t&&t.topTarget}}(),Dp=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 Ip(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 Ip(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 Ip(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new Ip(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Ip(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Ip(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),kp=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}(),Ap=Math.log(2);function Ep(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)/Ap);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]*Ep(e,t-1,c,u,r|f,o),p++)}return o[a]=d,d}function Np(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=Ep(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)*Ep(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 Lp="___zrEVENTSAVED",Pp=[];function Op(e,t,n,i,r){if(t.getBoundingClientRect&&Jd.domSupported&&!Rp(t)){var o=t[Lp]||(t[Lp]={}),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?Np(s,a):Np(a,s))}(a,o,r);if(s)return s(e,n,i),!0}return!1}function Rp(e){return"CANVAS"===e.nodeName.toUpperCase()}var zp=/([&<>"'])/g,Fp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vp(e){return null==e?"":(e+"").replace(zp,function(e,t){return Fp[t]})}var Bp=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,jp=[],Gp=Jd.browser.firefox&&+Jd.browser.version.split(".")[0]<39;function Wp(e,t,n,i){return n=n||{},i?Hp(e,t,n):Gp&&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):Hp(e,t,n),n}function Hp(e,t,n){if(Jd.domSupported&&e.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Rp(e)){var o=e.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Op(jp,e,i,r))return n.zrX=jp[0],void(n.zrY=jp[1])}n.zrX=n.zrY=0}function Up(e){return e||window.event}function Yp(e,t,n){if(null!=(t=Up(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&&Wp(e,r,t,n)}else{Wp(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&&Bp.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Zp(e,t,n,i){e.addEventListener(t,n,i)}function Xp(e,t,n,i){e.removeEventListener(t,n,i)}var qp=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function $p(e){return 2===e.which||3===e.which}var Kp=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=Wp(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 Qp)if(Qp.hasOwnProperty(t)){var n=Qp[t](this._track,e);if(n)return n}},e}();function Jp(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Qp={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=Jp(r)/Jp(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 ef(){return[1,0,0,1,0,0]}function tf(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function nf(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 rf(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 of(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 af(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 sf(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 lf(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 uf=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}(),cf=Math.min,df=Math.max,hf=new uf,pf=new uf,ff=new uf,gf=new uf,mf=new uf,vf=new uf,yf=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=cf(e.x,this.x),n=cf(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=df(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=df(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 of(r,r,[-t.x,-t.y]),sf(r,r,[n,i]),of(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?uf.set(vf,-g,0):uf.set(vf,m,0)):x<p&&(p=x,g<m?uf.set(mf,g,0):uf.set(mf,-m,0)),s<c||d<a?_>f&&(f=_,v<y?uf.set(vf,0,-v):uf.set(vf,0,y)):x<p&&(p=x,v<y?uf.set(mf,0,v):uf.set(mf,0,-y))}return n&&uf.copy(n,h?mf:vf),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))}hf.x=ff.x=n.x,hf.y=gf.y=n.y,pf.x=gf.x=n.x+n.width,pf.y=ff.y=n.y+n.height,hf.transform(i),gf.transform(i),pf.transform(i),ff.transform(i),t.x=cf(hf.x,pf.x,ff.x,gf.x),t.y=cf(hf.y,pf.y,ff.y,gf.y);var l=df(hf.x,pf.x,ff.x,gf.x),u=df(hf.y,pf.y,ff.y,gf.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),xf="silent";function _f(){qp(this.event)}var bf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return $d(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(kp),wf=function(){return function(e,t){this.x=e,this.y=t}}(),Cf=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Sf=new yf(0,0,0,0),Mf=function(e){function t(t,n,i,r,o){var a=e.call(this)||this;return a._hovered=new wf(0,0),a.storage=t,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new bf,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new Dp(a),a}return $d(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Mh(Cf,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=Df(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 wf(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 wf(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:_f}}(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 wf(e,t);if(If(i,r,e,t,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new yf(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||(Sf.copy(c.getBoundingRect()),c.transform&&Sf.applyTransform(c.transform),Sf.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(If(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 Kp);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 wf;o.target=i.target,this.dispatchToElement(o,r,i.event)}},t}(kp);function Tf(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||xf}return!1}function If(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=Tf(a,n,i))&&(!t.topTarget&&(t.topTarget=a),s!==xf)){t.target=a;break}}}function Df(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}Mh(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Mf.prototype[e]=function(t){var n,i,r=t.zrX,o=t.zrY,a=Df(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||bp(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});function kf(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 Af(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 Ef(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 Nf(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 Lf(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=Nf(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=Ef(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=Nf(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=Ef(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-Nf(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-Ef(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 Pf(e,t,n,i){n||(n=0),i||(i=e.length);var r=i-n;if(!(r<2)){var o=0;if(r<32)Af(e,n,i,n+(o=kf(e,n,i,t)),t);else{var a=Lf(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(r);do{if((o=kf(e,n,i,t))<s){var l=r;l>s&&(l=s),Af(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 Of=!1;function Rf(){Of||(Of=!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 Ff,Vf=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,Pf(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)&&(Rf(),u.z=0),isNaN(u.z2)&&(Rf(),u.z2=0),isNaN(u.zlevel)&&(Rf(),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=wh(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}();Ff=Jd.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Bf={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-Bf.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*Bf.bounceIn(2*e):.5*Bf.bounceOut(2*e-1)+.5}},jf=Math.pow,Gf=Math.sqrt,Wf=1e-8,Hf=1e-4,Uf=Gf(3),Yf=1/3,Zf=cp(),Xf=cp(),qf=cp();function $f(e){return e>-1e-8&&e<Wf}function Kf(e){return e>Wf||e<-1e-8}function Jf(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 Qf(e,t,n,i,r){var o=1-r;return 3*(((t-e)*o+2*(n-t)*r)*o+(i-n)*r*r)}function eg(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($f(c)&&$f(d)){if($f(s))o[0]=0;else(S=-l/s)>=0&&S<=1&&(o[p++]=S)}else{var f=d*d-4*c*h;if($f(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=Gf(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(S=(-s-((y=y<0?-jf(-y,Yf):jf(y,Yf))+(x=x<0?-jf(-x,Yf):jf(x,Yf))))/(3*a))>=0&&S<=1&&(o[p++]=S)}else{var _=(2*c*s-3*a*d)/(2*Gf(c*c*c)),b=Math.acos(_)/3,w=Gf(c),C=Math.cos(b),S=(-s-2*w*C)/(3*a),M=(m=(-s+w*(C+Uf*Math.sin(b)))/(3*a),(-s+w*(C-Uf*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 tg(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($f(a)){if(Kf(o))(c=-s/o)>=0&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if($f(u))r[0]=-o/(2*a);else if(u>0){var c,d=Gf(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 ng(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 ig(e,t,n,i,r,o,a,s,l,u,c){var d,h,p,f,g,m=.005,v=1/0;Zf[0]=l,Zf[1]=u;for(var y=0;y<1;y+=.05)Xf[0]=Jf(e,n,r,a,y),Xf[1]=Jf(t,i,o,s,y),(f=wp(Zf,Xf))<v&&(d=y,v=f);v=1/0;for(var x=0;x<32&&!(m<Hf);x++)h=d-m,p=d+m,Xf[0]=Jf(e,n,r,a,h),Xf[1]=Jf(t,i,o,s,h),f=wp(Xf,Zf),h>=0&&f<v?(d=h,v=f):(qf[0]=Jf(e,n,r,a,p),qf[1]=Jf(t,i,o,s,p),g=wp(qf,Zf),p<=1&&g<v?(d=p,v=g):m*=.5);return c&&(c[0]=Jf(e,n,r,a,d),c[1]=Jf(t,i,o,s,d)),Gf(v)}function rg(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=Jf(e,n,r,a,f),m=Jf(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 og(e,t,n,i){var r=1-i;return r*(r*e+2*i*t)+i*i*n}function ag(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))}function sg(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i}function lg(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 ug(e,t,n,i,r,o,a,s,l){var u,c=.005,d=1/0;Zf[0]=a,Zf[1]=s;for(var h=0;h<1;h+=.05){Xf[0]=og(e,n,r,h),Xf[1]=og(t,i,o,h),(m=wp(Zf,Xf))<d&&(u=h,d=m)}d=1/0;for(var p=0;p<32&&!(c<Hf);p++){var f=u-c,g=u+c;Xf[0]=og(e,n,r,f),Xf[1]=og(t,i,o,f);var m=wp(Xf,Zf);if(f>=0&&m<d)u=f,d=m;else{qf[0]=og(e,n,r,g),qf[1]=og(t,i,o,g);var v=wp(qf,Zf);g<=1&&v<d?(u=g,d=v):c*=.5}}return l&&(l[0]=og(e,n,r,u),l[1]=og(t,i,o,u)),Gf(d)}function cg(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=og(e,n,r,h),f=og(t,i,o,h),g=p-s,m=f-l;u+=Math.sqrt(g*g+m*m),s=p,l=f}return u}var dg=/cubic-bezier\(([0-9,\.e ]+)\)/;function hg(e){var t=e&&dg.exec(e);if(t){var n=t[1].split(","),i=+$h(n[0]),r=+$h(n[1]),o=+$h(n[2]),a=+$h(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:eg(0,i,o,1,e,s)&&Jf(0,r,a,1,s[0])}}}var pg=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||lp,this.ondestroy=e.ondestroy||lp,this.onrestart=e.onrestart||lp,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=Lh(e)?e:Bf[e]||hg(e)},e}(),fg=function(){return function(e){this.value=e}}(),gg=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new fg(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}(),mg=function(){function e(e){this._list=new gg,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 fg(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}(),vg={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 yg(e){return(e=Math.round(e))<0?0:e>255?255:e}function xg(e){return e<0?0:e>1?1:e}function _g(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?yg(parseFloat(t)/100*255):yg(parseInt(t,10))}function bg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?xg(parseFloat(t)/100):xg(parseFloat(t))}function wg(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 Cg(e,t,n){return e+(t-e)*n}function Sg(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function Mg(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Tg=new mg(20),Ig=null;function Dg(e,t){Ig&&Mg(Ig,t),Ig=Tg.put(e,Ig||t.slice())}function kg(e,t){if(e){t=t||[];var n=Tg.get(e);if(n)return Mg(t,n);var i=(e+="").replace(/ /g,"").toLowerCase();if(i in vg)return Mg(t,vg[i]),Dg(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?(Sg(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),Dg(e,t),t):void Sg(t,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Sg(t,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),Dg(e,t),t):void Sg(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?Sg(t,+u[0],+u[1],+u[2],1):Sg(t,0,0,0,1);c=bg(u.pop());case"rgb":return u.length>=3?(Sg(t,_g(u[0]),_g(u[1]),_g(u[2]),3===u.length?c:bg(u[3])),Dg(e,t),t):void Sg(t,0,0,0,1);case"hsla":return 4!==u.length?void Sg(t,0,0,0,1):(u[3]=bg(u[3]),Ag(u,t),Dg(e,t),t);case"hsl":return 3!==u.length?void Sg(t,0,0,0,1):(Ag(u,t),Dg(e,t),t);default:return}}Sg(t,0,0,0,1)}}function Ag(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=bg(e[1]),r=bg(e[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Sg(t=t||[],yg(255*wg(a,o,n+1/3)),yg(255*wg(a,o,n)),yg(255*wg(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Eg(e,t){var n=kg(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 Og(n,4===n.length?"rgba":"rgb")}}function Ng(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]=yg(Cg(a[0],s[0],l)),n[1]=yg(Cg(a[1],s[1],l)),n[2]=yg(Cg(a[2],s[2],l)),n[3]=xg(Cg(a[3],s[3],l)),n}}function Lg(e,t,n,i){var r=kg(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]=bg(n)),null!=i&&(r[2]=bg(i)),Og(Ag(r),"rgba")}function Pg(e,t){var n=kg(e);if(n&&null!=t)return n[3]=xg(t),Og(n,"rgba")}function Og(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 Rg(e,t){var n=kg(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var zg=new mg(100);function Fg(e){if(Ph(e)){var t=zg.get(e);return t||(t=Eg(e,-.1),zg.put(e,t)),t}if(jh(e)){var n=_h({},e);return n.colorStops=Th(e.colorStops,function(e){return{offset:e.offset,color:Eg(e.color,-.1)}}),n}return e}var Vg=Math.round;function Bg(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=kg(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 jg=1e-4;function Gg(e){return e<jg&&e>-1e-4}function Wg(e){return Vg(1e3*e)/1e3}function Hg(e){return Vg(1e4*e)/1e4}var Ug={left:"start",right:"end",center:"middle",middle:"middle"};function Yg(e){return e&&!!e.image}function Zg(e){return Yg(e)||function(e){return e&&!!e.svgElement}(e)}function Xg(e){return"linear"===e.type}function qg(e){return"radial"===e.type}function $g(e){return e&&("linear"===e.type||"radial"===e.type)}function Kg(e){return"url(#"+e+")"}function Jg(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 Qg(e){var t=e.x||0,n=e.y||0,i=(e.rotation||0)*up,r=Uh(e.scaleX,1),o=Uh(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("+Vg(a*up)+"deg, "+Vg(s*up)+"deg)"),l.join(" ")}var em=Jd.hasGlobalWindow&&Lh(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&&mh("Base64 isn't natively supported in the current environment."),null},tm=Array.prototype.slice;function nm(e,t,n){return(t-e)*n+e}function im(e,t,n,i){for(var r=t.length,o=0;o<r;o++)e[o]=nm(t[o],n[o],i);return e}function rm(e,t,n,i){for(var r=t.length,o=0;o<r;o++)e[o]=t[o]+n[o]*i;return e}function om(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 am(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 sm(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]:tm.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 lm(e){if(Sh(e)){var t=e.length;if(Sh(e[0])){for(var n=[],i=0;i<t;i++)n.push(tm.call(e[i]));return n}return tm.call(e)}return e}function um(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 cm(e){return 4===e||5===e}function dm(e){return 1===e||2===e}var hm=[0,0,0,0],pm=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(Sh(t)){var l=function(e){return Sh(e&&e[0])?2:1}(t);a=l,(1===l&&!Rh(t[0])||2===l&&!Rh(t[0][0]))&&(o=!0)}else if(Rh(t)&&!Wh(t))a=0;else if(Ph(t))if(isNaN(+t)){var u=kg(t);u&&(s=u,a=3)}else a=0;else if(jh(t)){var c=_h({},s);c.colorStops=Th(t.colorStops,function(e){return{offset:e.offset,color:kg(e.color)}}),Xg(t)?a=4:qg(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=Lh(n)?n:Bf[n]||hg(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=dm(i),l=cm(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?sm(d,h,i):l&&am(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=rm([],n[u].value,p,-1):dm(i)&&(n[u].additiveValue=1===i?rm([],n[u].value,p,-1):om([],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?hm:e[c];if(!dm(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[c]=g<1?i.rawValue:r.rawValue;else if(dm(s))1===s?im(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]=nm(t[a][s],n[a][s],i)}}(m,i[a],r[a],g);else if(cm(s)){var v=i[a],y=r[a],x=4===s;e[c]={type:x?"linear":"radial",x:nm(v.x,y.x,g),y:nm(v.y,y.y,g),colorStops:Th(v.colorStops,function(e,t){var n=y.colorStops[t];return{offset:nm(e.offset,n.offset,g),color:um(im([],e.color,n.color,g))}}),global:y.global},x?(e[c].x2=nm(v.x2,y.x2,g),e[c].y2=nm(v.y2,y.y2,g)):e[c].r=nm(v.r,y.r,g)}else if(d)im(m,i[a],r[a],g),o||(e[c]=um(m));else{var _=nm(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?(kg(e[n],hm),rm(hm,hm,i,1),e[n]=um(hm)):1===t?rm(e[n],e[n],i,1):2===t&&om(e[n],e[n],i,1)},e}(),fm=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?mh("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,kh(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 pm(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=um(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,lm(l),i),this._trackKeys.push(a)}s.addKeyframe(e,lm(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 pg({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 Th(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]=lm(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||kh(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 gm(){return(new Date).getTime()}var mm,vm,ym=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 $d(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=gm()-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,Ff(function t(){e._running&&(Ff(t),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=gm(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=gm(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=gm()-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 fm(e,t.loop);return this.addAnimator(n),n},t}(kp),xm=Jd.domSupported,_m=(vm={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:mm=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Th(mm,function(e){var t=e.replace("mouse","pointer");return vm.hasOwnProperty(t)?t:e})}),bm=["mousemove","mouseup"],wm=["pointermove","pointerup"],Cm=!1;function Sm(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Mm(e){e&&(e.zrByTouch=!0)}function Tm(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 Im=function(){return function(e,t){this.stopPropagation=lp,this.stopImmediatePropagation=lp,this.preventDefault=lp,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}}(),Dm={mousedown:function(e){e=Yp(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Yp(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=Yp(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Tm(this,(e=Yp(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Cm=!0,e=Yp(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Cm||(e=Yp(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Mm(e=Yp(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Dm.mousemove.call(this,e),Dm.mousedown.call(this,e)},touchmove:function(e){Mm(e=Yp(this.dom,e)),this.handler.processGesture(e,"change"),Dm.mousemove.call(this,e)},touchend:function(e){Mm(e=Yp(this.dom,e)),this.handler.processGesture(e,"end"),Dm.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Dm.click.call(this,e)},pointerdown:function(e){Dm.mousedown.call(this,e)},pointermove:function(e){Sm(e)||Dm.mousemove.call(this,e)},pointerup:function(e){Dm.mouseup.call(this,e)},pointerout:function(e){Sm(e)||Dm.mouseout.call(this,e)}};Mh(["click","dblclick","contextmenu"],function(e){Dm[e]=function(t){t=Yp(this.dom,t),this.trigger(e,t)}});var km={pointermove:function(e){Sm(e)||km.mousemove.call(this,e)},pointerup:function(e){km.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 Am(e,t){var n=t.domHandlers;Jd.pointerEventsSupported?Mh(_m.pointer,function(i){Nm(t,i,function(t){n[i].call(e,t)})}):(Jd.touchEventsSupported&&Mh(_m.touch,function(i){Nm(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)})}),Mh(_m.mouse,function(i){Nm(t,i,function(r){r=Up(r),t.touching||n[i].call(e,r)})}))}function Em(e,t){function n(n){Nm(t,n,function(i){i=Up(i),Tm(e,i.target)||(i=function(e,t){return Yp(e.dom,new Im(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))},{capture:!0})}Jd.pointerEventsSupported?Mh(wm,n):Jd.touchEventsSupported||Mh(bm,n)}function Nm(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Zp(e.domTarget,t,n,i)}function Lm(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Xp(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Pm=function(){return function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}}(),Om=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 Pm(t,Dm),xm&&(i._globalHandlerScope=new Pm(document,km)),Am(i,i._localHandlerScope),i}return $d(t,e),t.prototype.dispose=function(){Lm(this._localHandlerScope),xm&&Lm(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,xm&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Em(this,t):Lm(t)}},t}(kp),Rm=1;Jd.hasGlobalWindow&&(Rm=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var zm=Rm,Fm="#333",Vm="#ccc",Bm=tf,jm=5e-5;function Gm(e){return e>jm||e<-5e-5}var Wm=[],Hm=[],Um=[1,0,0,1,0,0],Ym=Math.abs,Zm=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 Gm(this.rotation)||Gm(this.x)||Gm(this.y)||Gm(this.scaleX-1)||Gm(this.scaleY-1)||Gm(this.skewX)||Gm(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):Bm(n),e&&(t?rf(n,e,n):nf(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Bm(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Wm);var n=Wm[0]<0?-1:1,i=Wm[1]<0?-1:1,r=((Wm[0]-n)*t+n)/Wm[0]||0,o=((Wm[1]-i)*t+i)/Wm[1]||0;e[0]*=r,e[1]*=r,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],lf(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],rf(Hm,e.invTransform,t),t=Hm);var n=this.originX,i=this.originY;(n||i)&&(Um[4]=n,Um[5]=i,rf(Hm,t,Um),Hm[4]-=n,Hm[5]-=i,t=Hm),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&&Sp(n,n,i),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Sp(n,n,i),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Ym(e[0]-1)>1e-10&&Ym(e[3]-1)>1e-10?Math.sqrt(Ym(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){qm(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&&af(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}(),Xm=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function qm(e,t){for(var n=0;n<Xm.length;n++){var i=Xm[n];e[i]=t[i]}}var $m={};function Km(e,t){var n=$m[t=t||eh];n||(n=$m[t]=new mg(500));var i=n.get(e);return null==i&&(i=nh.measureText(e,t).width,n.put(e,i)),i}function Jm(e,t,n,i){var r=Km(e,t),o=nv(t),a=ev(0,r,n),s=tv(0,o,i);return new yf(a,s,r,o)}function Qm(e,t,n,i){var r=((e||"")+"").split("\n");if(1===r.length)return Jm(r[0],t,n,i);for(var o=new yf(0,0,0,0),a=0;a<r.length;a++){var s=Jm(r[a],t,n,i);0===a?o.copy(s):o.union(s)}return o}function ev(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function tv(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function nv(e){return Km("国",e)}function iv(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function rv(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+=iv(i[0],n.width),u+=iv(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 ov="__zr_normal__",av=Xm.concat(["ignore"]),sv=Ih(Xm,function(e,t){return e[t]=!0,e},{ignore:!1}),lv={},uv=new yf(0,0,0,0),cv=function(){function e(e){this.id=gh(),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=uv;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(lv,n,u):rv(lv,n,u),r.x=lv.x,r.y=lv.y,o=lv.align,a=lv.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=iv(c[0],u.width),h=iv(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()?Vm:Fm},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&kg(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,Og(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||{},_h(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=kh(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!==ov)){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,av)},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(ov,!1,e)},e.prototype.useState=function(e,t,n,i){var r=e===ov;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(wh(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}mh("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=wh(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=wh(i,e),o=wh(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];_h(n,r),r.textConfig&&_h(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=_h({},i?this.textConfig:n.textConfig),_h(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<av.length;u++){var c=av[u],d=r&&sv[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 Zm,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),_h(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 fm(i,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r}mh('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=wh(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){dv(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){dv(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,i){for(var r=dv(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 dv(e,t,n,i,r){var o=[];fv(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 hv(e,t,n){for(var i=0;i<n;i++)e[i]=t[i]}function pv(e,t,n){if(Sh(t[n]))if(Sh(e[n])||(e[n]=[]),Vh(t[n])){var i=t[n].length;e[n].length!==i&&(e[n]=new t[n].constructor(i),hv(e[n],t[n],i))}else{var r=t[n],o=e[n],a=r.length;if(Sh(r[0]))for(var s=r[0].length,l=0;l<a;l++)o[l]?hv(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else hv(o,r,a);o.length=r.length}else e[n]=t[n]}function fv(e,t,n,i,r,o,a,s){for(var l=kh(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)||Sh(y)||jh(y))g.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}fv(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=wh(f,w);f.splice(b,1)}}if(r.force||(g=Dh(g,function(e){return t=i[e],r=n[e],!(t===r||Sh(t)&&Sh(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[_]]=lm(n[v]),pv(n,i,v)}}(w=new fm(n,!1,!1,d?Dh(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)}}Ch(cv,kp),Ch(cv,Zm);var gv=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return $d(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=wh(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=wh(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 yf(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?(yf.applyTransform(t,s,l),(r=r||t.clone()).union(t)):(r=r||s.clone()).union(s)}}return r||t},t}(cv);gv.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 mv={},vv={};var yv,xv=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 Vf,o=n.renderer||"canvas";if(mv[o]||(o=kh(mv)[0]),"production"!==process.env.NODE_ENV&&!mv[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var a=new mv[o](t,r,n,e),s=n.ssr||a.ssrOnly;this.storage=r,this.painter=a;var l,u=Jd.node||Jd.worker||s?null:new Om(a.getViewportRoot(),a.root),c=n.useCoarsePointer;(null==c||"auto"===c?Jd.touchEventsSupported:!!c)&&(l=Uh(n.pointerSize,44)),this.handler=new Mf(r,a,u,a.root,l),this.animation=new ym({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 Rg(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,i=t.length,r=0;r<i;r++)n+=Rg(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=gm();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=gm();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 gv&&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 vv[e])},e}();function _v(e,t){var n=new xv(gh(),e,t);return vv[n.id]=n,n}var bv=1e-4;function wv(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 Cv(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 Ph(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Sv(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Mv(e){return e.sort(function(e,t){return e-t}),e}function Tv(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 Iv(e)}function Iv(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 Dv(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 kv(e,t){var n=Math.max(Tv(e),Tv(t)),i=e+t;return n>20?i:Sv(i,n)}var Av=9007199254740991;function Ev(e){var t=2*Math.PI;return(e%t+t)%t}function Nv(e){return e>-1e-4&&e<bv}var Lv=/^(?:(\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 Pv(e){if(e instanceof Date)return e;if(Ph(e)){var t=Lv.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 Ov(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 Rv(e,t){var n=Ov(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 Fv(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 Vv(e){var t=parseFloat(e);return t==e&&(0!==t||!Ph(e)||e.indexOf("x")<=0)?t:NaN}function Bv(e){return!isNaN(Vv(e))}function jv(){return Math.round(9*Math.random())}function Gv(e,t){return 0===t?e:Gv(t,e%t)}function Wv(e,t){return null==e?t:null==t?e:e*t/Gv(e,t)}var Hv={},Uv="undefined"!=typeof console&&console.warn&&console.log;function Yv(e,t,n){if(Uv&&n){if(Hv[t])return;Hv[t]=!0}}function Zv(e,t){Yv(0,e,t)}function Xv(e,t){Yv(0,e,t)}function qv(e){"production"!==process.env.NODE_ENV&&Yv(0,"DEPRECATED: "+e,!0)}function $v(e,t,n){"production"!==process.env.NODE_ENV&&qv((n?"["+n+"]":"")+e+" is deprecated, use "+t+" instead.")}function Kv(){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":Wh(e)?"NaN":e instanceof Date?"Date("+e.toISOString()+")":Lh(e)?"function () { ... }":Gh(e)?e+"":null};n=Th(e,function(e){if(Ph(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(x1){return"?"}}).join(" ")}return n}function Jv(e){throw new Error(e)}function Qv(e,t,n){return(t-e)*n+e}var ey="series\0",ty="\0_ec_\0";function ny(e){return e instanceof Array?e:null==e?[]:[e]}function iy(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 ry=["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 oy(e){return!zh(e)||Nh(e)||e instanceof Date?e:e.value}function ay(e){return zh(e)&&!(e instanceof Array)}function sy(e,t,n){var i="normalMerge"===n,r="replaceMerge"===n,o="replaceAll"===n;e=e||[],t=(t||[]).slice();var a=ip();Mh(t,function(e,n){zh(e)?"production"!==process.env.NODE_ENV&&(null==e.id||hy(e.id)||dy(e.id),null==e.name||hy(e.name)||dy(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||fy(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(e,a,n);return(i||r)&&function(e,t,n,i){Mh(i,function(r,o){if(r&&null!=r.id){var a=uy(r.id),s=n.get(a);if(null!=s){var l=e[s];qh(!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){Mh(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)&&!fy(n)&&!fy(o)&&ly("name",o,n))return e[r].newOption=n,void(t[i]=null)}})}(u,t),i||r?function(e,t,n){Mh(t,function(t){if(t){for(var i,r=0;(i=e[r])&&(i.newOption||fy(i.existing)||i.existing&&null!=t.id&&!ly("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){Mh(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}(u,t),s=u,l=ip(),Mh(s,function(e){var t=e.existing;t&&l.set(t.id,e)}),Mh(s,function(e){var t=e.newOption;qh(!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={})}),Mh(s,function(e,t){var n=e.existing,i=e.newOption,r=e.keyInfo;if(zh(i)){if(r.name=null!=i.name?uy(i.name):n?n.name:ey+t,n)r.id=uy(n.id);else if(null!=i.id)r.id=uy(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 ly(e,t,n){var i=cy(t[e],null),r=cy(n[e],null);return null!=i&&null!=r&&i===r}function uy(e){if("production"!==process.env.NODE_ENV&&null==e)throw new Error;return cy(e,"")}function cy(e,t){return null==e?t:Ph(e)?e:Rh(e)||Oh(e)?e+"":t}function dy(e){"production"!==process.env.NODE_ENV&&Zv("`"+e+"` is invalid id or name. Must be a string or number.")}function hy(e){return Oh(e)||Bv(e)}function py(e){var t=e.name;return!(!t||!t.indexOf(ey))}function fy(e){return e&&null!=e.id&&0===uy(e.id).indexOf(ty)}function gy(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Nh(t.dataIndex)?Th(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?Nh(t.name)?Th(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function my(){var e="__ec_inner_"+vy++;return function(t){return t[e]||(t[e]={})}}var vy=jv();function yy(e,t,n){var i=xy(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=wy(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 xy(e,t){var n;if(Ph(e)){var i={};i[e+"Index"]=0,n=i}else n=e;var r=ip(),o={},a=!1;return Mh(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&&wh(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 _y={useDefault:!0,enableAll:!1,enableNone:!1},by={useDefault:!1,enableAll:!0,enableNone:!0};function wy(e,t,n,i){i=i||_y;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?(qh(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):("all"===r&&(qh(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 Cy(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Sy(e,t){var n=ip(),i=[];return Mh(e,function(e){var r=t(e);(n.get(r)||(i.push(r),n.set(r,[]))).push(e)}),{keys:i,buckets:n}}function My(e,t,n,i,r){var o=null==t||"auto"===t;if(null==i)return i;if(Rh(i))return Sv(f=Qv(n||0,i,r),o?Math.max(Tv(n||0),Tv(i)):t);if(Ph(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=Qv(h,p,r);a[c]=Sv(f,o?Math.max(Tv(h),Tv(p)):t)}}return a}var Ty="___EC__COMPONENT__CONTAINER___",Iy="___EC__EXTENDED_CLASS___";function Dy(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function ky(e,t){e.$constructor=e,e.extend=function(e){"production"!==process.env.NODE_ENV&&Mh(t,function(t){e[t]});var n,i,r=this;return Lh(i=r)&&/^class\s/.test(Function.prototype.toString.call(i))?n=function(e){function t(){return e.apply(this,arguments)||this}return $d(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)),_h(n.prototype,e),n[Iy]=!0,n.extend=this.extend,n.superCall=Ny,n.superApply=Ly,n.superClass=r,n}}function Ay(e,t){e.extend=t.extend}var Ey=Math.round(10*Math.random());function Ny(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 Ly(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Py(e){var t={};e.registerClass=function(e){var n,i=e.type||e.prototype.type;if(i){qh(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=i),'componentType "'+n+'" illegal'),e.prototype.type=i;var r=Dy(i);if(r.sub){if(r.sub!==Ty){var o=function(e){var n=t[e.main];n&&n[Ty]||((n=t[e.main]={})[Ty]=!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[Ty]&&(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=Dy(e),i=[],r=t[n.main];return r&&r[Ty]?Mh(r,function(e,t){t!==Ty&&i.push(e)}):i.push(r),i},e.hasClass=function(e){var n=Dy(e);return!!t[n.main]},e.getAllClassMainTypes=function(){var e=[];return Mh(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=Dy(e),i=t[n.main];return i&&i[Ty]}}function Oy(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&&wh(i,s)>=0||r&&wh(r,s)<0)){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var Ry=Oy([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),zy=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Ry(this,e,t)},e}(),Fy=new mg(50);function Vy(e){if("string"==typeof e){var t=Fy.get(e);return t&&t.image}return e}function By(e,t,n,i,r){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var o=Fy.get(e),a={hostEl:n,cb:i,cbPayload:r};return o?!Gy(t=o.image)&&o.pending.push(a):((t=nh.loadImage(e,jy,jy)).__zrImageSrc=e,Fy.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function jy(){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 Gy(e){return e&&e.width&&e.height}var Wy=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Hy(e,t,n,i,r,o){if(!n)return e.text="",void(e.isTruncated=!1);var a=(t+"").split("\n");o=Uy(n,i,r,o);for(var s=!1,l={},u=0,c=a.length;u<c;u++)Yy(l,a[u],o),a[u]=l.textLine,s=s||l.isTruncated;e.text=a.join("\n"),e.isTruncated=s}function Uy(e,t,n,i){var r=_h({},i=i||{});r.font=t,n=Uh(n,"..."),r.maxIterations=Uh(i.maxIterations,2);var o=r.minChar=Uh(i.minChar,0);r.cnCharWidth=Km("国",t);var a=r.ascCharWidth=Km("a",t);r.placeholder=Uh(i.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=Km(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 Yy(e,t,n){var i=n.containerWidth,r=n.font,o=n.contentWidth;if(!i)return e.textLine="",void(e.isTruncated=!1);var a=Km(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?Zy(t,o,n.ascCharWidth,n.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Km(t=t.substr(0,l),r)}""===t&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Zy(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 Xy=function(){return function(){}}(),qy=function(){return function(e){this.tokens=[],e&&(this.tokens=e)}}(),$y=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 Ky(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=iv(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=ex(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 Xy;if(y.styleName=r,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:Km(v,c),m||d)u.push(new qy([y]));else{var x=(u[u.length-1]||(u[0]=new qy)).tokens,_=x.length;1===_&&x[0].isLineHolder?x[0]=y:(v||!_||s)&&x.push(y)}}}var Jy=Ih(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function Qy(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)||!!Jy[e]}function ex(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=Km(h,t),f=!i&&!Qy(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 tx="__zr_style_"+Math.round(10*Math.random()),nx={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ix={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};nx[tx]=!0;var rx=["z","z2","invisible"],ox=["invisible"],ax=function(e){function t(t){return e.call(this,t)||this}var n;return $d(t,e),t.prototype._init=function(t){for(var n=kh(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){sx.copy(e.getBoundingRect()),e.transform&&sx.applyTransform(e.transform);return lx.width=t,lx.height=n,!sx.intersect(lx)}(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 yf(0,0,0,0)),t?yf.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 yf(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:_h(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 op(nx,e)},t.prototype.useStyle=function(e){e[tx]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[tx]},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,rx)},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=kh(u),d=0;d<c.length;d++){(p=c[d])in s&&(s[p]=s[p],this.style[p]=u[p])}var h=kh(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?ox:rx;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 _h(e,t),e},t.prototype.getAnimationStyleProps=function(){return ix},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}(cv),sx=new yf(0,0,0,0),lx=new yf(0,0,0,0);var ux=Math.min,cx=Math.max,dx=Math.sin,hx=Math.cos,px=2*Math.PI,fx=cp(),gx=cp(),mx=cp();function vx(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=ux(r,i[0]),o=cx(o,i[0]),a=ux(a,i[1]),s=cx(s,i[1]);t[0]=r,t[1]=a,n[0]=o,n[1]=s}}function yx(e,t,n,i,r,o){r[0]=ux(e,n),r[1]=ux(t,i),o[0]=cx(e,n),o[1]=cx(t,i)}var xx=[],_x=[];function bx(e,t,n,i,r,o,a,s,l,u){var c=tg,d=Jf,h=c(e,n,r,a,xx);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,xx[p]);l[0]=ux(f,l[0]),u[0]=cx(f,u[0])}h=c(t,i,o,s,_x);for(p=0;p<h;p++){var g=d(t,i,o,s,_x[p]);l[1]=ux(g,l[1]),u[1]=cx(g,u[1])}l[0]=ux(e,l[0]),u[0]=cx(e,u[0]),l[0]=ux(a,l[0]),u[0]=cx(a,u[0]),l[1]=ux(t,l[1]),u[1]=cx(t,u[1]),l[1]=ux(s,l[1]),u[1]=cx(s,u[1])}function Cx(e,t,n,i,r,o,a,s){var l=sg,u=og,c=cx(ux(l(e,n,r),1),0),d=cx(ux(l(t,i,o),1),0),h=u(e,n,r,c),p=u(t,i,o,d);a[0]=ux(e,r,h),a[1]=ux(t,o,p),s[0]=cx(e,r,h),s[1]=cx(t,o,p)}function Sx(e,t,n,i,r,o,a,s,l){var u=Mp,c=Tp,d=Math.abs(r-o);if(d%px<1e-4&&d>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(fx[0]=hx(r)*n+e,fx[1]=dx(r)*i+t,gx[0]=hx(o)*n+e,gx[1]=dx(o)*i+t,u(s,fx,gx),c(l,fx,gx),(r%=px)<0&&(r+=px),(o%=px)<0&&(o+=px),r>o&&!a?o+=px:r<o&&a&&(r+=px),a){var h=o;o=r,r=h}for(var p=0;p<o;p+=Math.PI/2)p>r&&(mx[0]=hx(p)*n+e,mx[1]=dx(p)*i+t,u(s,mx,s),c(l,mx,l))}var Mx={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Tx=[],Ix=[],Dx=[],kx=[],Ax=[],Ex=[],Nx=Math.min,Lx=Math.max,Px=Math.cos,Ox=Math.sin,Rx=Math.abs,zx=Math.PI,Fx=2*zx,Vx="undefined"!=typeof Float32Array,Bx=[];function jx(e){return Math.round(e/zx*1e8)/1e8%2*zx}function Gx(e,t){var n=jx(e[0]);n<0&&(n+=Fx);var i=n-e[0],r=e[1];r+=i,!t&&r-n>=Fx?r=n+Fx:t&&n-r>=Fx?r=n-Fx:!t&&n>r?r=n+(Fx-jx(n-r)):t&&n<r&&(r=n-(Fx-jx(r-n))),e[0]=n,e[1]=r}var Wx=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=Rx(n/zm/e)||0,this._uy=Rx(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(Mx.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=Rx(e-this._xi),i=Rx(t-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Mx.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(Mx.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(Mx.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(),Bx[0]=i,Bx[1]=r,Gx(Bx,o),i=Bx[0];var a=(r=Bx[1])-i;return this.addData(Mx.A,e,t,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,r,o),this._xi=Px(r)*n+e,this._yi=Ox(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(Mx.R,e,t,n,i),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Mx.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||!Vx||(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();Vx&&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,Vx&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Dx[0]=Dx[1]=Ax[0]=Ax[1]=Number.MAX_VALUE,kx[0]=kx[1]=Ex[0]=Ex[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 Mx.M:n=r=t[e++],i=o=t[e++],Ax[0]=r,Ax[1]=o,Ex[0]=r,Ex[1]=o;break;case Mx.L:yx(n,i,t[e],t[e+1],Ax,Ex),n=t[e++],i=t[e++];break;case Mx.C:bx(n,i,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],Ax,Ex),n=t[e++],i=t[e++];break;case Mx.Q:Cx(n,i,t[e++],t[e++],t[e],t[e+1],Ax,Ex),n=t[e++],i=t[e++];break;case Mx.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=Px(h)*c+l,o=Ox(h)*d+u),Sx(l,u,c,d,h,p,f,Ax,Ex),n=Px(p)*c+l,i=Ox(p)*d+u;break;case Mx.R:yx(r=n=t[e++],o=i=t[e++],r+t[e++],o+t[e++],Ax,Ex);break;case Mx.Z:n=r,i=o}Mp(Dx,Dx,Ax),Tp(kx,kx,Ex)}return 0===e&&(Dx[0]=Dx[1]=kx[0]=kx[1]=0),new yf(Dx[0],Dx[1],kx[0]-Dx[0],kx[1]-Dx[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 Mx.M:r=a=e[d++],o=s=e[d++];break;case Mx.L:var g=e[d++],m=(x=e[d++])-o;(Rx(k=g-r)>n||Rx(m)>i||d===t-1)&&(f=Math.sqrt(k*k+m*m),r=g,o=x);break;case Mx.C:var v=e[d++],y=e[d++],x=(g=e[d++],e[d++]),_=e[d++],b=e[d++];f=rg(r,o,v,y,g,x,_,b,10),r=_,o=b;break;case Mx.Q:f=cg(r,o,v=e[d++],y=e[d++],g=e[d++],x=e[d++],10),r=g,o=x;break;case Mx.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=Px(T)*S+w,s=Ox(T)*M+C),f=Lx(S,M)*Nx(Fx,Math.abs(I)),r=Px(D)*S+w,o=Ox(D)*M+C;break;case Mx.R:a=r=e[d++],s=o=e[d++],f=2*e[d++]+2*e[d++];break;case Mx.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!==Mx.L&&x>0&&(e.lineTo(c,d),x=0),b){case Mx.M:n=r=h[_++],i=o=h[_++],e.moveTo(r,o);break;case Mx.L:a=h[_++],s=h[_++];var C=Rx(a-r),S=Rx(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 Mx.C:var I=h[_++],D=h[_++],k=h[_++],A=h[_++],E=h[_++],N=h[_++];if(m){if(v+(X=l[y++])>u){ng(r,I,k,E,M=(u-v)/X,Tx),ng(o,D,A,N,M,Ix),e.bezierCurveTo(Tx[1],Ix[1],Tx[2],Ix[2],Tx[3],Ix[3]);break e}v+=X}e.bezierCurveTo(I,D,k,A,E,N),r=E,o=N;break;case Mx.Q:I=h[_++],D=h[_++],k=h[_++],A=h[_++];if(m){if(v+(X=l[y++])>u){lg(r,I,k,M=(u-v)/X,Tx),lg(o,D,A,M,Ix),e.quadraticCurveTo(Tx[1],Ix[1],Tx[2],Ix[2]);break e}v+=X}e.quadraticCurveTo(I,D,k,A),r=k,o=A;break;case Mx.A:var L=h[_++],P=h[_++],O=h[_++],R=h[_++],z=h[_++],F=h[_++],V=h[_++],B=!h[_++],j=O>R?O:R,G=Rx(O-R)>.001,W=z+F,H=!1;if(m)v+(X=l[y++])>u&&(W=z+F*(u-v)/X,H=!0),v+=X;if(G&&e.ellipse?e.ellipse(L,P,O,R,V,z,W,B):e.arc(L,P,j,z,W,B),H)break e;w&&(n=Px(z)*O+L,i=Ox(z)*R+P),r=Px(W)*O+L,o=Ox(W)*R+P;break;case Mx.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+Nx(Z,U),s),(Z-=U)>0&&e.lineTo(a+U,s+Nx(Z,Y)),(Z-=Y)>0&&e.lineTo(a+Lx(U-Z,0),s+Y),(Z-=U)>0&&e.lineTo(a,s+Lx(Y-Z,0));break e}v+=X}e.rect(a,s,U,Y);break;case Mx.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=Mx,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();function Hx(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 Ux(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)&&ig(e,t,n,i,r,o,a,s,u,c,null)<=d/2}function Yx(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)&&ug(e,t,n,i,r,o,s,l,null)<=u/2}var Zx=2*Math.PI;function Xx(e){return(e%=Zx)<0&&(e+=Zx),e}var qx=2*Math.PI;function $x(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)%qx<1e-4)return!0;if(o){var d=i;i=Xx(r),r=Xx(d)}else i=Xx(i),r=Xx(r);i>r&&(r+=qx);var h=Math.atan2(l,s);return h<0&&(h+=qx),h>=i&&h<=r||h+qx>=i&&h+qx<=r}function Kx(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 Jx=Wx.CMD,Qx=2*Math.PI;var e_=[-1,-1,-1],t_=[-1,-1];function n_(){var e=t_[0];t_[0]=t_[1],t_[1]=e}function i_(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=eg(t,i,o,s,u,e_);if(0===c)return 0;for(var d=0,h=-1,p=void 0,f=void 0,g=0;g<c;g++){var m=e_[g],v=0===m||1===m?.5:1;Jf(e,n,r,a,m)<l||(h<0&&(h=tg(t,i,o,s,t_),t_[1]<t_[0]&&h>1&&n_(),p=Jf(t,i,o,s,t_[0]),h>1&&(f=Jf(t,i,o,s,t_[1]))),2===h?m<t_[0]?d+=p<t?v:-v:m<t_[1]?d+=f<p?v:-v:d+=s<f?v:-v:m<t_[0]?d+=p<t?v:-v:d+=s<p?v:-v)}return d}function r_(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($f(o))Kf(a)&&(c=-s/a)>=0&&c<=1&&(r[l++]=c);else{var u=a*a-4*o*s;if($f(u))(c=-a/(2*o))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,d=Gf(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,e_);if(0===l)return 0;var u=sg(t,i,o);if(u>=0&&u<=1){for(var c=0,d=og(t,i,o,u),h=0;h<l;h++){var p=0===e_[h]||1===e_[h]?.5:1;og(e,n,r,e_[h])<a||(e_[h]<u?c+=d<t?p:-p:c+=o<d?p:-p)}return c}p=0===e_[0]||1===e_[0]?.5:1;return og(e,n,r,e_[0])<a?0:o<t?p:-p}function o_(e,t,n,i,r,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);e_[0]=-l,e_[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Qx-1e-4){i=0,r=Qx;var c=o?1:-1;return a>=e_[0]+e&&a<=e_[1]+e?c:0}if(i>r){var d=i;i=r,r=d}i<0&&(i+=Qx,r+=Qx);for(var h=0,p=0;p<2;p++){var f=e_[p];if(f+e>a){var g=Math.atan2(s,f);c=o?1:-1;g<0&&(g=Qx+g),(g>=i&&g<=r||g+Qx>=i&&g+Qx<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),h+=c)}}return h}function a_(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===Jx.M&&m>1&&(n||(d+=Kx(h,p,f,g,i,r))),y&&(f=h=u[m],g=p=u[m+1]),v){case Jx.M:h=f=u[m++],p=g=u[m++];break;case Jx.L:if(n){if(Hx(h,p,u[m],u[m+1],t,i,r))return!0}else d+=Kx(h,p,u[m],u[m+1],i,r)||0;h=u[m++],p=u[m++];break;case Jx.C:if(n){if(Ux(h,p,u[m++],u[m++],u[m++],u[m++],u[m],u[m+1],t,i,r))return!0}else d+=i_(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 Jx.Q:if(n){if(Yx(h,p,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+1],i,r)||0;h=u[m++],p=u[m++];break;case Jx.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+=Kx(h,p,o,a,i,r);var T=(i-x)*w/b+x;if(n){if($x(x,_,w,C,C+S,M,t,T,r))return!0}else d+=o_(x,_,w,C,C+S,M,T,r);h=Math.cos(C+S)*b+x,p=Math.sin(C+S)*w+_;break;case Jx.R:if(f=h=u[m++],g=p=u[m++],o=f+u[m++],a=g+u[m++],n){if(Hx(f,g,o,g,t,i,r)||Hx(o,g,o,a,t,i,r)||Hx(o,a,f,a,t,i,r)||Hx(f,a,f,g,t,i,r))return!0}else d+=Kx(o,g,o,a,i,r),d+=Kx(f,a,f,g,i,r);break;case Jx.Z:if(n){if(Hx(h,p,f,g,t,i,r))return!0}else d+=Kx(h,p,f,g,i,r);h=f,p=g}}return n||(s=p,l=g,Math.abs(s-l)<1e-4)||(d+=Kx(h,p,f,g,i,r)||0),0!==d}var s_=bh({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},nx),l_={style:bh({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ix.style)},u_=Xm.concat(["invisible","culling","z","z2","zlevel","parent"]),c_=function(e){function t(t){return e.call(this,t)||this}var n;return $d(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<u_.length;++s)r[u_[s]]=this[u_[s]];r.__dirty|=1}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=kh(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?_h(this.style,a):this.useStyle(a):"shape"===o?_h(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(Ph(e)){var t=Rg(e,0);return t>.5?Fm:t>.2?"#eee":Vm}if(e)return Vm}return Fm},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Ph(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Rg(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 Wx(!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 a_(e,t,!0,n,i)}(o,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return a_(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:_h(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return op(s_,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=_h({},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=_h({},i.shape),_h(s,n.shape)):(s=_h({},r?this.shape:i.shape),_h(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=_h({},this.shape);for(var u={},c=kh(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 l_},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 $d(n,t),n.prototype.getDefaultStyle=function(){return vh(e.style)},n.prototype.getDefaultShape=function(){return vh(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}(ax),d_=bh({strokeFirst:!0,font:eh,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},s_),h_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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 op(d_,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=Qm(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}(ax);h_.prototype.type="tspan";var p_=bh({x:0,y:0},nx),f_={style:bh({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ix.style)};var g_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.createStyle=function(e){return op(p_,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 f_},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new yf(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(ax);g_.prototype.type="image";var m_=Math.round;function v_(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?(m_(2*i)===m_(2*r)&&(e.x1=e.x2=x_(i,s,!0)),m_(2*o)===m_(2*a)&&(e.y1=e.y2=x_(o,s,!0)),e):e}}function y_(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=x_(i,s,!0),e.y=x_(r,s,!0),e.width=Math.max(x_(i+o,s,!1)-e.x,0===o?0:1),e.height=Math.max(x_(r+a,s,!1)-e.y,0===a?0:1),e):e}}function x_(e,t,n){if(!t)return e;var i=m_(2*e);return(i+m_(t))%2==0?i/2:(i+(n?1:-1))/2}var __=function(){return function(){this.x=0,this.y=0,this.width=0,this.height=0}}(),b_={},w_=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new __},t.prototype.buildPath=function(e,t){var n,i,r,o;if(this.subPixelOptimize){var a=y_(b_,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}(c_);w_.prototype.type="rect";var C_={fill:"#000"},S_={style:bh({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},ix.style)},M_=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=C_,n.attr(t),n}return $d(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,N_(e=this.style),Mh(e.rich,N_),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 yf(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||C_},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 _h(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=kh(t),i=0;i<n.length;i++){var r=n[i];e[r]=e[r]||{},_h(e[r],t[r])}},t.prototype.getAnimationStyleProps=function(){return S_},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||eh,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=nv(o),l=Uh(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?ex(e,t.font,h,"breakAll"===i,0).lines:[]).length*l,f=Uh(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=Uy(h,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),v={},y=0;y<n.length;y++)Yy(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(Km(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}}(R_(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=tv(p,i.contentHeight,g);if(r||n){var y=ev(h,s,f),x=tv(p,a,g);r&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=O_(h,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var _=0,b=!1,w=(P_("fill"in e?e.fill:(b=!0,d.fill))),C=(L_("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(h_),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,A_(k,e),v+=c,M&&D.setBoundingRect(new yf(ev(k.x,l,k.textAlign),tv(k.y,T,k.textBaseline),l,T))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n=new $y;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=Wy.lastIndex=0;null!=(i=Wy.exec(e));){var u=i.index;u>l&&Ky(n,e.substring(l,u),t,s),Ky(n,i[2],t,s,i[1]),l=Wy.lastIndex}l<e.length&&Ky(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=nv(T);var I=Uh(C.height,P.contentHeight);if(P.innerHeight=I,S&&(I+=S[0]+S[2]),P.height=I,P.lineHeight=Yh(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=Km(P.text,T);else{if(A){var E=C.backgroundColor,N=E&&E.image;N&&Gy(N=Vy(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):(Hy(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=Km(P.text,T)):P.contentWidth=Km(P.text,T)}P.width+=M,b+=P.width,C&&(_=Math.max(_,P.lineHeight))}v(x,b,_)}for(n.outerWidth=n.width=Uh(r,h),n.outerHeight=n.height=Uh(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}(R_(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=ev(a,i,u),h=tv(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=O_(r,o,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(h_),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=P_("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=L_("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||eh,p.opacity=Yh(s.opacity,t.opacity,1),A_(p,s),y&&(p.lineWidth=Yh(s.lineWidth,t.lineWidth,m),p.lineDash=Uh(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 yf(ev(p.x,_,p.textAlign),tv(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(w_)).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=Uh(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(g_)).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=Uh(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=Yh(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return E_(e)&&(t=[e.fontStyle,e.fontWeight,k_(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&$h(t)||e.textFont||e.font},t}(ax),T_={left:!0,right:1,center:1},I_={top:1,bottom:1,middle:1},D_=["fontStyle","fontWeight","fontSize","fontFamily"];function k_(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function A_(e,t){for(var n=0;n<D_.length;n++){var i=D_[n],r=t[i];null!=r&&(e[i]=r)}}function E_(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}function N_(e){if(e){e.font=M_.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||T_[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||I_[n]?n:"top",e.padding&&(e.padding=Xh(e.padding))}}function L_(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function P_(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function O_(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function R_(e){var t=e.text;return null!=t&&(t+=""),t}function z_(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var F_=my(),V_=function(e,t,n,i){if(i){var r=F_(i);r.dataIndex=n,r.dataType=t,r.seriesIndex=e,r.ssrType="chart","group"===i.type&&i.traverse(function(i){var r=F_(i);r.seriesIndex=e,r.dataIndex=n,r.dataType=t,r.ssrType="chart"})}},B_=1,j_={},G_=my(),W_=my(),H_=["emphasis","blur","select"],U_=["normal","emphasis","blur","select"],Y_=10,Z_="highlight",X_="downplay",q_="select",$_="unselect",K_="toggleSelect";function J_(e){return null!=e&&"none"!==e}function Q_(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function eb(e){Q_(e,"emphasis",2)}function tb(e){2===e.hoverState&&Q_(e,"normal",0)}function nb(e){Q_(e,"blur",1)}function ib(e){1===e.hoverState&&Q_(e,"normal",0)}function rb(e){e.selected=!0}function ob(e){e.selected=!1}function ab(e,t,n){t(e,n)}function sb(e,t,n){ab(e,t,n),e.isGroup&&e.traverse(function(e){ab(e,t,n)})}function lb(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 ub(e,t){var n=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,i){var r=n&&wh(n,"select")>=0,o=!1;if(e instanceof c_){var a=G_(e),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(J_(s)||J_(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=_h({},i),(u=_h({},u)).fill=s):!J_(u.fill)&&J_(s)?(o=!0,i=_h({},i),(u=_h({},u)).fill=Fg(s)):!J_(u.stroke)&&J_(l)&&(o||(i=_h({},i),u=_h({},u)),u.stroke=Fg(l)),i.style=u}}if(i&&null==i.z2){o||(i=_h({},i));var c=e.z2EmphasisLift;i.z2=e.z2+(null!=c?c:Y_)}return i}(this,0,t,n);if("blur"===e)return function(e,t,n){var i=wh(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=_h({},n),a=_h({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=_h({},n);var i=e.z2SelectLift;n.z2=e.z2+(null!=i?i:9)}return n}(this,0,n)}return n}function cb(e){e.stateProxy=ub;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=ub),n&&(n.stateProxy=ub)}function db(e,t){!xb(e,t)&&!e.__highByOuter&&sb(e,eb)}function hb(e,t){!xb(e,t)&&!e.__highByOuter&&sb(e,tb)}function pb(e,t){e.__highByOuter|=1<<(t||0),sb(e,eb)}function fb(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&sb(e,tb)}function gb(e){sb(e,nb)}function mb(e){sb(e,ib)}function vb(e){sb(e,rb)}function yb(e){sb(e,ob)}function xb(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function _b(e){var t=e.getModel(),n=[],i=[];t.eachComponent(function(t,r){var o=W_(r),a="series"===t,s=a?e.getViewOfSeriesModel(r):e.getViewOfComponentModel(r);!a&&i.push(s),o.isBlured&&(s.group.traverse(function(e){ib(e)}),a&&n.push(r)),o.isBlured=!1}),Mh(i,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function bb(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&&mb(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||nb(e)}),Sh(t))o(e.getData(),t);else if(zh(t))for(var c=kh(t),d=0;d<c.length;d++)o(e.getData(c[d]),t[c[d]]);l.push(e),W_(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 wb(e,t,n){if(null!=e&&null!=t){var i=n.getModel().getComponent(e,t);if(i){W_(i).isBlured=!0;var r=n.getViewOfComponentModel(i);r&&r.focusBlurEnabled&&r.group.traverse(function(e){nb(e)})}}}function Cb(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||Lb(l[u])||Xv("param should be highDownDispatcher"),"self"===F_(l[u]).focus){s=!0;break}return{focusSelf:s,dispatchers:l}}function Sb(e){Mh(e.getAllData(),function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,i)?vb(t):yb(t)})})}function Mb(e){var t=[];return e.eachSeries(function(e){Mh(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 Tb(e,t,n){Nb(e,!0),sb(e,cb),Db(e,t,n)}function Ib(e,t,n,i){i?function(e){Nb(e,!1)}(e):Tb(e,t,n)}function Db(e,t,n){var i=F_(e);null!=t?(i.focus=t,i.blurScope=n):i.focus&&(i.focus=null)}var kb=["emphasis","blur","select"],Ab={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Eb(e,t,n,i){n=n||"itemStyle";for(var r=0;r<kb.length;r++){var o=kb[r],a=t.getModel([o,n]);e.ensureState(o).style=i?i(a):a[Ab[n]]()}}function Nb(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 Lb(e){return!(!e||!e.__highDownDispatcher)}function Pb(e){var t=e.type;return t===q_||t===$_||t===K_}function Ob(e){var t=e.type;return t===Z_||t===X_}var Rb=Wx.CMD,zb=[[],[],[]],Fb=Math.sqrt,Vb=Math.atan2;function Bb(e,t){if(t){var n,i,r,o,a,s,l=e.data,u=e.len(),c=Rb.M,d=Rb.C,h=Rb.L,p=Rb.R,f=Rb.A,g=Rb.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=Fb(t[0]*t[0]+t[1]*t[1]),x=Fb(t[2]*t[2]+t[3]*t[3]),_=Vb(-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++],Sp(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],Sp(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++],Sp(b,b,t),l[o++]=b[0],l[o++]=b[1]}}e.increaseVersion()}}var jb=Math.sqrt,Gb=Math.sin,Wb=Math.cos,Hb=Math.PI;function Ub(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Yb(e,t){return(e[0]*t[0]+e[1]*t[1])/(Ub(e)*Ub(t))}function Zb(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Yb(e,t))}function Xb(e,t,n,i,r,o,a,s,l,u,c){var d=l*(Hb/180),h=Wb(d)*(e-n)/2+Gb(d)*(t-i)/2,p=-1*Gb(d)*(e-n)/2+Wb(d)*(t-i)/2,f=h*h/(a*a)+p*p/(s*s);f>1&&(a*=jb(f),s*=jb(f));var g=(r===o?-1:1)*jb((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+Wb(d)*m-Gb(d)*v,x=(t+i)/2+Gb(d)*m+Wb(d)*v,_=Zb([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=Zb(b,w);if(Yb(b,w)<=-1&&(C=Hb),Yb(b,w)>=1&&(C=0),C<0){var S=Math.round(C/Hb*1e6)/1e6;C=2*Hb+S%2*Hb}c.addData(u,y,x,a,s,_,C,d,o)}var qb=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,$b=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var Kb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.applyTransform=function(e){},t}(c_);function Jb(e){return null!=e.setData}function Qb(e,t){var n=function(e){var t=new Wx;if(!e)return t;var n,i=0,r=0,o=i,a=r,s=Wx.CMD,l=e.match(qb);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($b)||[],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++],Xb(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++],Xb(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=_h({},t);return i.buildPath=function(e){if(Jb(e)){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},i.applyTransform=function(e){Bb(n,e),this.dirtyShape()},i}function ew(e,t){return new Kb(Qb(e,t))}function tw(e,t){t=t||{};var n=new c_;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?Bb(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 nw=function(){return function(){this.cx=0,this.cy=0,this.r=0}}(),iw=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new nw},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}(c_);iw.prototype.type="circle";var rw=function(){return function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}}(),ow=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new rw},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}(c_);ow.prototype.type="ellipse";var aw=Math.PI,sw=2*aw,lw=Math.sin,uw=Math.cos,cw=Math.acos,dw=Math.atan2,hw=Math.abs,pw=Math.sqrt,fw=Math.max,gw=Math.min,mw=1e-4;function vw(e,t,n,i,r,o,a){var s=e-n,l=t-i,u=(a?o:-o)/pw(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)*pw(fw(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 yw(e,t){var n,i=fw(t.r,0),r=fw(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=hw(l-s),p=h>sw&&h%sw;if(p>mw&&(h=p),i>mw)if(h>sw-mw)e.moveTo(u+i*uw(s),c+i*lw(s)),e.arc(u,c,i,s,l,!d),r>mw&&(e.moveTo(u+r*uw(l),c+r*lw(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*uw(s),E=i*lw(s),N=r*uw(l),L=r*lw(l),P=h>mw;if(P){var O=t.cornerRadius;O&&(f=(n=function(e){var t;if(Nh(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=hw(i-r)/2;if(y=gw(R,m),x=gw(R,v),_=gw(R,f),b=gw(R,g),S=w=fw(y,x),M=C=fw(_,b),(w>mw||C>mw)&&(T=i*uw(l),I=i*lw(l),D=r*uw(s),k=r*lw(s),h<aw)){var z=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<mw))return[e+(h=(c*(t-o)-d*(e-r))/h)*l,t+h*u]}(A,E,D,k,T,I,N,L);if(z){var F=A-z[0],V=E-z[1],B=T-z[0],j=I-z[1],G=1/lw(cw((F*B+V*j)/(pw(F*F+V*V)*pw(B*B+j*j)))/2),W=pw(z[0]*z[0]+z[1]*z[1]);S=gw(w,(i-W)/(G+1)),M=gw(C,(r-W)/(G-1))}}}if(P)if(S>mw){var H=gw(m,S),U=gw(v,S),Y=vw(D,k,A,E,i,H,d),Z=vw(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,dw(Y.y0,Y.x0),dw(Z.y0,Z.x0),!d):(H>0&&e.arc(u+Y.cx,c+Y.cy,H,dw(Y.y0,Y.x0),dw(Y.y1,Y.x1),!d),e.arc(u,c,i,dw(Y.cy+Y.y1,Y.cx+Y.x1),dw(Z.cy+Z.y1,Z.cx+Z.x1),!d),U>0&&e.arc(u+Z.cx,c+Z.cy,U,dw(Z.y1,Z.x1),dw(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>mw&&P)if(M>mw){H=gw(f,M),Y=vw(N,L,T,I,r,-(U=gw(g,M)),d),Z=vw(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,dw(Y.y0,Y.x0),dw(Z.y0,Z.x0),!d):(U>0&&e.arc(u+Y.cx,c+Y.cy,U,dw(Y.y0,Y.x0),dw(Y.y1,Y.x1),!d),e.arc(u,c,r,dw(Y.cy+Y.y1,Y.cx+Y.x1),dw(Z.cy+Z.y1,Z.cx+Z.x1),d),H>0&&e.arc(u+Z.cx,c+Z.cy,H,dw(Z.y1,Z.x1),dw(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 xw=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}}(),_w=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new xw},t.prototype.buildPath=function(e,t){yw(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(c_);_w.prototype.type="sector";var bw=function(){return function(){this.cx=0,this.cy=0,this.r=0,this.r0=0}}(),ww=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new bw},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}(c_);function Cw(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++)Mp(a,a,e[h]),Tp(s,s,e[h]);Mp(a,a,i[0]),Tp(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(hp(e[h]));continue}r=e[h-1],o=e[h+1]}mp(u,o,r),yp(u,u,t);var g=_p(f,r),m=_p(f,o),v=g+m;0!==v&&(g/=v,m/=v),yp(c,u,-g),yp(d,u,m);var y=fp([],f,c),x=fp([],f,d);i&&(Tp(y,y,a),Mp(y,y,s),Tp(x,x,a),Mp(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()}}ww.prototype.type="ring";var Sw=function(){return function(){this.points=null,this.smooth=0,this.smoothConstraint=null}}(),Mw=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new Sw},t.prototype.buildPath=function(e,t){Cw(e,t,!0)},t}(c_);Mw.prototype.type="polygon";var Tw=function(){return function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}}(),Iw=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Tw},t.prototype.buildPath=function(e,t){Cw(e,t,!1)},t}(c_);Iw.prototype.type="polyline";var Dw={},kw=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}(),Aw=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new kw},t.prototype.buildPath=function(e,t){var n,i,r,o;if(this.subPixelOptimize){var a=v_(Dw,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}(c_);Aw.prototype.type="line";var Ew=[],Nw=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 Lw(e,t,n){var i=e.cpx2,r=e.cpy2;return null!=i||null!=r?[(n?Qf:Jf)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Qf:Jf)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?ag:og)(e.x1,e.cpx1,e.x2,t),(n?ag:og)(e.y1,e.cpy1,e.y2,t)]}var Pw=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Nw},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&&(lg(n,a,r,c,Ew),a=Ew[1],r=Ew[2],lg(i,s,o,c,Ew),s=Ew[1],o=Ew[2]),e.quadraticCurveTo(a,s,r,o)):(c<1&&(ng(n,a,l,r,c,Ew),a=Ew[1],l=Ew[2],r=Ew[3],ng(i,s,u,o,c,Ew),s=Ew[1],u=Ew[2],o=Ew[3]),e.bezierCurveTo(a,s,l,u,r,o)))},t.prototype.pointAt=function(e){return Lw(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=Lw(this.shape,e,!0);return xp(t,t)},t}(c_);Pw.prototype.type="bezier-curve";var Ow=function(){return function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}}(),Rw=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Ow},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}(c_);Rw.prototype.type="arc";var zw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return $d(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),c_.prototype.getBoundingRect.call(this)},t}(c_),Fw=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Vw=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 $d(t,e),t}(Fw),Bw=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 $d(t,e),t}(Fw),jw=[0,0],Gw=[0,0],Ww=new uf,Hw=new uf,Uw=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new uf;for(n=0;n<2;n++)this._axes[n]=new uf;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);uf.sub(i[0],n[1],n[0]),uf.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 Ww.set(1/0,1/0),Hw.set(0,0),!this._intersectCheckOneSide(this,e,Ww,Hw,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,Ww,Hw,i,-1)&&(n=!1,i)||i||uf.copy(t,n?Ww:Hw),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,jw),this._getProjMinMaxOnAxis(s,t._corners,Gw),jw[1]<Gw[0]||jw[0]>Gw[1]){if(a=!1,r)return a;var u=Math.abs(Gw[0]-jw[1]),c=Math.abs(jw[0]-Gw[1]);Math.min(u,c)>i.len()&&(u<c?uf.scale(i,l,-u*o):uf.scale(i,l,c*o))}else if(n){u=Math.abs(Gw[0]-jw[1]),c=Math.abs(jw[0]-Gw[1]);Math.min(u,c)<n.len()&&(u<c?uf.scale(n,l,u*o):uf.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}(),Yw=[],Zw=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 $d(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 yf(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(Yw)),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}(ax),Xw=my();function qw(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=Uh(i.duration,200),u=Uh(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)),Lh(c)&&(c=c(n,r)),Lh(l)&&(l=l(n)),{duration:l||0,delay:c,easing:u}}return null}function $w(e,t,n,i,r,o,a){var s,l=!1;Lh(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=qw(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 Kw(e,t,n,i,r,o){$w("update",e,t,n,i,r,o)}function Jw(e,t,n,i,r,o){$w("enter",e,t,n,i,r,o)}function Qw(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 eC(e,t,n,i,r,o){Qw(e)||$w("leave",e,t,n,i,r,o)}function tC(e,t,n,i){e.removeTextContent(),e.removeTextGuideLine(),eC(e,{style:{opacity:0}},t,n,i)}function nC(e,t,n){function i(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||tC(e,t,n,i)}):tC(e,t,n,i)}function iC(e){Xw(e).oldStyle=e.style}var rC=Math.max,oC=Math.min,aC={};var sC=function(e,t){var n=Qb(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 $d(t,e),t}(Kb)};function lC(e,t){aC[e]=t}function uC(e){if(aC.hasOwnProperty(e))return aC[e]}function cC(e,t,n,i){var r=ew(e,t);return n&&("center"===i&&(n=hC(n,r.getBoundingRect())),fC(r,n)),r}function dC(e,t,n){var i=new g_({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(hC(t,r))}}});return i}function hC(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 pC=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 c_(t);return a.createPathProxy(),a.buildPath=function(e){if(Jb(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function fC(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function gC(e,t){return v_(e,e,{lineWidth:t}),e}var mC=x_;function vC(e,t){for(var n=tf([]);e&&e!==t;)rf(n,e.getLocalTransform(),n),e=e.parent;return n}function yC(e,t,n){return t&&!Sh(t)&&(t=Zm.getLocalTransform(t)),n&&(t=lf([],t)),Sp([],e,t)}function xC(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=yC(o,t,n),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function _C(e){return!e.isGroup}function bC(e,t,n){if(e&&t){var i,r=(i={},e.traverse(function(e){_C(e)&&e.anid&&(i[e.anid]=e)}),i);t.traverse(function(e){if(_C(e)&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),Kw(e,i,n,F_(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=_h({},e.shape)),t}}function wC(e,t){return Th(e,function(e){var n=e[0];n=rC(n,t.x),n=oC(n,t.x+t.width);var i=e[1];return i=rC(i,t.y),[n,i=oC(i,t.y+t.height)]})}function CC(e,t,n){var i=_h({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),bh(r,n),new g_(i)):cC(e.replace("path://",""),i,n,"center")}function SC(e,t,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(MC(e,t,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function MC(e,t,n,i,r,o,a,s){var l,u=n-e,c=i-t,d=a-r,h=s-o,p=TC(d,h,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-r,g=t-o,m=TC(f,g,u,c)/p;if(m<0||m>1)return!1;var v=TC(f,g,d,h)/p;return!(v<0||v>1)}function TC(e,t,n,i){return e*i-n*t}function IC(e){var t=e.itemTooltipOption,n=e.componentModel,i=e.itemName,r=Ph(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&&Mh(kh(l),function(e){sp(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=F_(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:bh({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function DC(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function kC(e,t){if(e)if(Nh(e))for(var n=0;n<e.length;n++)DC(e[n],t);else DC(e,t)}lC("circle",iw),lC("ellipse",ow),lC("sector",_w),lC("ring",ww),lC("polygon",Mw),lC("polyline",Iw),lC("rect",w_),lC("line",Aw),lC("bezierCurve",Pw),lC("arc",Rw);const AC=Object.freeze(Object.defineProperty({__proto__:null,Arc:Rw,BezierCurve:Pw,BoundingRect:yf,Circle:iw,CompoundPath:zw,Ellipse:ow,Group:gv,Image:g_,IncrementalDisplayable:Zw,Line:Aw,LinearGradient:Vw,OrientedBoundingRect:Uw,Path:c_,Point:uf,Polygon:Mw,Polyline:Iw,RadialGradient:Bw,Rect:w_,Ring:ww,Sector:_w,Text:M_,applyTransform:yC,clipPointsByRect:wC,clipRectByRect:function(e,t){var n=rC(e.x,t.x),i=oC(e.x+e.width,t.x+t.width),r=rC(e.y,t.y),o=oC(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:CC,extendPath:function(e,t){return sC(e,t)},extendShape:function(e){return c_.extend(e)},getShapeClass:uC,getTransform:vC,groupTransition:bC,initProps:Jw,isElementRemoved:Qw,lineLineIntersect:MC,linePolygonIntersect:SC,makeImage:dC,makePath:cC,mergePath:pC,registerShape:lC,removeElement:eC,removeElementWithFadeOut:nC,resizePath:fC,setTooltipConfig:IC,subPixelOptimize:mC,subPixelOptimizeLine:gC,subPixelOptimizeRect:function(e){return y_(e.shape,e.shape,e.style),e},transformDirection:xC,traverseElements:kC,updateProps:Kw},Symbol.toStringTag,{value:"Module"}));var EC={};function NC(e,t){for(var n=0;n<H_.length;n++){var i=H_[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 LC(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=Lh(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:i},u=0;u<H_.length;u++){var c=H_[u],d=t[c];l[c]=Uh(r?r.getFormattedLabel(o,c,null,a,d&&d.get("formatter")):null,i)}return l}function PC(e,t,n,i){n=n||EC;for(var r=e instanceof M_,o=!1,a=0;a<U_.length;a++){if((h=t[U_[a]])&&h.getShallow("show")){o=!0;break}}var s=r?e:e.getTextContent();if(o){r||(s||(s=new M_,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var l=LC(n,t),u=t.normal,c=!!u.getShallow("show"),d=RC(u,i&&i.normal,n,!1,!r);d.text=l.normal,r||e.setTextConfig(zC(u,n,!1));for(a=0;a<H_.length;a++){var h,p=H_[a];if(h=t[p]){var f=s.ensureState(p),g=!!Uh(h.getShallow("show"),c);if(g!==c&&(f.ignore=!g),f.style=RC(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&&(WC(s).setLabelText=function(e){var i=LC(n,t,e);NC(s,i)})}else s&&(s.ignore=!0);e.dirty()}function OC(e,t){t=t||"label";for(var n={normal:e.getModel(t)},i=0;i<H_.length;i++){var r=H_[i];n[r]=e.getModel([r,t])}return n}function RC(e,t,n,i,r){var o={};return function(e,t,n,i,r){n=n||EC;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||EC).rich;if(n){t=t||{};for(var i=kh(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]);jC(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);jC(e,t,s,n,i,r,!0,!1)}(o,e,n,i,r),t&&_h(o,t),o}function zC(e,t,n){t=t||{};var i,r={},o=e.getShallow("rotate"),a=Uh(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 FC=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],VC=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],BC=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function jC(e,t,n,i,r,o,a,s){n=!r&&n||EC;var l=i&&i.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),d=Uh(t.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||("production"!==process.env.NODE_ENV&&"auto"===u&&$v("color: 'auto'","color: 'inherit'"),u=l||null),"inherit"!==c&&"auto"!==c||("production"!==process.env.NODE_ENV&&"auto"===c&&$v("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=Uh(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(e.lineWidth=h);var p=Uh(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=Uh(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<FC.length;g++){var m=FC[g];null!=(y=Uh(t.getShallow(m),n[m]))&&(e[m]=y)}for(g=0;g<VC.length;g++){m=VC[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<BC.length;g++){var y;m=BC[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&&$v("backgroundColor: 'auto'","backgroundColor: 'inherit'"),e.backgroundColor=l),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!l||("production"!==process.env.NODE_ENV&&"auto"===e.borderColor&&$v("borderColor: 'auto'","borderColor: 'inherit'"),e.borderColor=l)}}function GC(e,t){var n=t&&t.getModel("textStyle");return $h([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 WC=my();function HC(e,t,n,i){if(e){var r=WC(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 UC(e,t,n,i,r){var o=WC(e);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=Uh(o.interpolatedValue,o.prevValue),l=o.value;e.percent=0,(null==o.prevValue?Jw:Kw)(e,{percent:1},i,t,null,function(i){var u=My(n,o.precision,s,l,i);o.interpolatedValue=1===i?null:u;var c=LC({labelDataIndex:t,labelFetcher:r,defaultText:a?a(u):u+""},o.statesModels,u);NC(e,c)})}}var YC,ZC,XC=["textStyle","color"],qC=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],$C=new M_,KC=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(XC):null)},e.prototype.getFont=function(){return GC({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<qC.length;n++)t[qC[n]]=this.getShallow(qC[n]);return $C.useStyle(t),$C.update(),$C.getBoundingRect()},e}(),JC=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],QC=Oy(JC),eS=function(){function e(){}return e.prototype.getLineStyle=function(e){return QC(this,e)},e}(),tS=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],nS=Oy(tS),iS=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return nS(this,e,t)},e}(),rS=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){yh(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)(vh(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(!Jd.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}();ky(rS),YC=rS,ZC=["__\0is_clz",Ey++].join("_"),YC.prototype[ZC]=!0,"production"!==process.env.NODE_ENV&&qh(!YC.isInstance,'The method "is" can not be defined.'),YC.isInstance=function(e){return!(!e||!e[ZC])},Ch(rS,eS),Ch(rS,iS),Ch(rS,zy),Ch(rS,KC);var oS=Math.round(10*Math.random());function aS(e){return[e||"",oS++].join("_")}function sS(e,t){return yh(yh({},e,!0),t,!0)}var lS="ZH",uS="EN",cS=uS,dS={},hS={},pS=Jd.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||cS).toUpperCase().indexOf(lS)>-1?lS:cS;function fS(e,t){e=e.toUpperCase(),hS[e]=new rS(t),dS[e]=t}function gS(e){return hS[e]}fS(uS,{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:". "}}}}),fS(lS,{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 mS=1e3,vS=6e4,yS=36e5,xS=864e5,_S=31536e6,bS={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}"},wS="{yyyy}-{MM}-{dd}",CS={year:"{yyyy}",month:"{yyyy}-{MM}",day:wS,hour:wS+" "+bS.hour,minute:wS+" "+bS.minute,second:wS+" "+bS.second,millisecond:bS.none},SS=["year","month","day","hour","minute","second","millisecond"],MS=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function TS(e,t){return"0000".substr(0,t-(e+="").length)+e}function IS(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 DS(e){return e===IS(e)}function kS(e,t,n,i){var r=Pv(e),o=r[NS(n)](),a=r[LS(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[PS(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[OS(n)](),d=(c-1)%12+1,h=r[RS(n)](),p=r[zS(n)](),f=r[FS(n)](),g=c>=12?"pm":"am",m=g.toUpperCase(),v=(i instanceof rS?i:gS(i||pS)||hS[cS]).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,TS(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,TS(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,TS(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,TS(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,TS(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,TS(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,TS(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,TS(f,3)).replace(/{S}/g,f+"")}function AS(e,t){var n=Pv(e),i=n[LS(t)]()+1,r=n[PS(t)](),o=n[OS(t)](),a=n[RS(t)](),s=n[zS(t)](),l=0===n[FS(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 ES(e,t,n){var i=Rh(e)?Pv(e):e;switch(t=t||AS(e,n)){case"year":return i[NS(n)]();case"half-year":return i[LS(n)]()>=6?1:0;case"quarter":return Math.floor((i[LS(n)]()+1)/4);case"month":return i[LS(n)]();case"day":return i[PS(n)]();case"half-day":return i[OS(n)]()/24;case"hour":return i[OS(n)]();case"minute":return i[RS(n)]();case"second":return i[zS(n)]();case"millisecond":return i[FS(n)]()}}function NS(e){return e?"getUTCFullYear":"getFullYear"}function LS(e){return e?"getUTCMonth":"getMonth"}function PS(e){return e?"getUTCDate":"getDate"}function OS(e){return e?"getUTCHours":"getHours"}function RS(e){return e?"getUTCMinutes":"getMinutes"}function zS(e){return e?"getUTCSeconds":"getSeconds"}function FS(e){return e?"getUTCMilliseconds":"getMilliseconds"}function VS(e){return e?"setUTCFullYear":"setFullYear"}function BS(e){return e?"setUTCMonth":"setMonth"}function jS(e){return e?"setUTCDate":"setDate"}function GS(e){return e?"setUTCHours":"setHours"}function WS(e){return e?"setUTCMinutes":"setMinutes"}function HS(e){return e?"setUTCSeconds":"setSeconds"}function US(e){return e?"setUTCMilliseconds":"setMilliseconds"}function YS(e){if(!Bv(e))return Ph(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ZS(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 XS=Xh;function qS(e,t,n){function i(e){return e&&$h(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?Pv(e):e;if(!isNaN(+s))return kS(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return Oh(e)?i(e):Rh(e)&&r(e)?e+"":"-";var l=Vv(e);return r(l)?YS(l):Oh(e)?i(e):"boolean"==typeof e?e+"":"-"}var $S=["a","b","c","d","e","f","g"],KS=function(e,t){return"{"+e+(null==t?"":t)+"}"};function JS(e,t,n){Nh(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],o=0;o<r.length;o++){var a=$S[o];e=e.replace(KS(a),KS(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(KS($S[l],s),n?Vp(u):u)}return e}function QS(e,t){return t=t||"transparent",Ph(e)?e:zh(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function eM(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var tM=Mh,nM=["left","right","top","bottom","width","height"],iM=[["width","left","right"],["height","top","bottom"]];function rM(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 oM=rM;function aM(e,t,n){n=XS(n||0);var i=t.width,r=t.height,o=Cv(e.left,i),a=Cv(e.top,r),s=Cv(e.right,i),l=Cv(e.bottom,r),u=Cv(e.width,i),c=Cv(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 yf(o+n[3],a+n[0],u,c);return f.margin=n,f}function sM(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 yf(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=aM(bh({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 lM(e){var t=e.layoutMode||e.constructor.layoutMode;return zh(t)?t:t?{type:t}:null}function uM(e,t,n){var i=n&&n.ignoreSize;!Nh(i)&&(i=[i,i]);var r=a(iM[0],0),o=a(iM[1],1);function a(n,r){var o={},a=0,u={},c=0;if(tM(n,function(t){u[t]=e[t]}),tM(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){tM(e,function(e){t[e]=n[e]})}u(iM[0],e,r),u(iM[1],e,o)}function cM(e){return dM({},e)}function dM(e,t){return t&&e&&tM(nM,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}Eh(rM,"vertical"),Eh(rM,"horizontal");var hM=my(),pM=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.uid=aS("ec_cpt_model"),r}var n;return $d(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=lM(this),i=n?cM(e):{};yh(e,t.getTheme().get(this.mainType)),yh(e,this.getDefaultOption()),n&&uM(e,i,n)},t.prototype.mergeOption=function(e,t){yh(this.option,e,!0);var n=lM(this);n&&uM(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!function(e){return!(!e||!e[Iy])}(e))return e.defaultOption;var t=hM(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=yh(o,n[a],!0);t.defaultOption=o}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",i=e+"Id";return wy(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}(rS);Ay(pM,rS),Py(pM),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var i=Dy(e);t[i.main]=n},e.determineSubType=function(n,i){var r=i.type;if(!r){var o=Dy(n).main;e.hasSubTypes(n)&&t[o]&&(r=t[o](i))}return r}}(pM),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 Mh(e,function(o){var a=n(i,o),s=function(e,t){var n=[];return Mh(e,function(e){wh(t,e)>=0&&n.push(e)}),n}(a.originalDeps=t(o),e);a.entryCount=s.length,0===a.entryCount&&r.push(o),Mh(s,function(e){wh(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(i,e);wh(t.successor,e)<0&&t.successor.push(o)})}),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(Mh(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]),Mh(d.successor,h?f:p)}Mh(u,function(){var t="";throw"production"!==process.env.NODE_ENV&&(t=Kv("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)}}}(pM,function(e){var t=[];Mh(pM.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Th(t,function(e){return Dy(e).main}),"dataset"!==e&&wh(t,"dataset")<=0&&t.unshift("dataset");return t});var fM="";"undefined"!=typeof navigator&&(fM=navigator.platform||"");var gM="rgba(0, 0, 0, 0.2)";const mM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:gM,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:gM,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:gM,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:gM,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:gM,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:gM,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:fM.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 vM=ip(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),yM="original",xM="arrayRows",_M="objectRows",bM="keyedColumns",wM="typedArray",CM="unknown",SM="column",MM="row",TM=1,IM=2,DM=3,kM=my();function AM(e,t,n){var i={},r=NM(t);if(!r||!e)return i;var o,a,s=[],l=[],u=t.ecModel,c=kM(u).datasetMap,d=r.uid+"_"+n.seriesLayoutBy;Mh(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 Mh(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 EM(e,t,n){var i={};if(!NM(e))return i;var r,o=t.sourceFormat,a=t.dimensionsDefine;o!==_M&&o!==bM||Mh(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=PM(t.data,o,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var d=c===DM;if(d&&null==e.v&&l!==r&&(e.v=l),(null==e.n||e.n===e.v||!d&&s[e.n]===DM)&&(e.n=l),h(e)&&s[e.n]!==DM)return e;d||(c===IM&&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 NM(e){if(!e.get("data",!0))return wy(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},_y).models[0]}function LM(e,t){return PM(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function PM(e,t,n,i,r,o){var a,s,l;if(Vh(e))return DM;if(i){var u=i[o];zh(u)?(s=u.name,l=u.type):Ph(u)&&(s=u)}if(null!=l)return"ordinal"===l?TM:DM;if(t===xM){var c=e;if(n===MM){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===_M){var f=e;if(!s)return DM;for(h=0;h<f.length&&h<5;h++){if((m=f[h])&&null!=(a=y(m[s])))return a}}else if(t===bM){if(!s)return DM;if(!(d=e[s])||Vh(d))return DM;for(h=0;h<d.length&&h<5;h++)if(null!=(a=y(d[h])))return a}else if(t===yM){var g=e;for(h=0;h<g.length&&h<5;h++){var m,v=oy(m=g[h]);if(!Nh(v))return DM;if(null!=(a=y(v[o])))return a}}function y(e){var t=Ph(e);return null!=e&&Number.isFinite(Number(e))&&""!==e?t?IM:DM:t&&"-"!==e?TM:void 0}return DM}var OM=ip();var RM,zM,FM,VM=my(),BM=my(),jM=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var i=ny(this.get("color",!0)),r=this.get("colorLayer",!0);return WM(this,VM,i,r,e,t,n)},e.prototype.clearColorPalette=function(){var e,t;(t=VM)(e=this).paletteIdx=0,t(e).paletteNameMap={}},e}();function GM(e,t,n,i){var r=ny(e.get(["aria","decal","decals"]));return WM(e,BM,r,null,t,n,i)}function WM(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 HM="\0_ec_inner",UM={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"},YM={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"},ZM={};var XM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.init=function(e,t,n,i,r,o){i=i||{},this.option=null,this._theme=new rS(i),this._locale=new rS(r),this._optionManager=o},t.prototype.setOption=function(e,t,n){"production"!==process.env.NODE_ENV&&(qh(null!=e,"option is null/undefined"),qh(1!==e[HM],"please use chart.getOption()"));var i=KM(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,t){return this._resetOption(e,KM(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&&Mh(r,function(e,t){if(!pM.hasClass(t)){var n=UM[t];n&&!ZM[n]&&(Xv("Component "+t+" is used but not imported.\nimport { "+n+" } from 'echarts/components';\necharts.use(["+n+"]);"),ZM[n]=!0)}}),this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(r,t)):FM(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&&Mh(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=ip(),s=t&&t.replaceMergeMainTypeMap;kM(this).datasetMap=ip(),Mh(e,function(e,t){null!=e&&(pM.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?vh(e):yh(n[t],e,!0))}),s&&s.each(function(e,t){pM.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))}),pM.topologicalTravel(o,pM.getAllClassMainTypes(),function(t){var o=function(e,t,n){var i=OM.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++)qh(fy(r[o]));return n.concat(r)}(this,t,ny(e[t])),a=i.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=sy(a,o,l);(function(e,t,n){Mh(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,pM),n[t]=null,i.set(t,null),r.set(t,0);var c,d,h=[],p=[],f=0;Mh(u,function(e,n){var i=e.existing,r=e.newOption;if(r){var o="series"===t,a=pM.getClass(t,e.keyInfo.subType,!o);if(!a){if("production"!==process.env.NODE_ENV){var s=e.keyInfo.subType,l=YM[s];ZM[s]||(ZM[s]=!0,Xv(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||(Zv("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=_h({componentIndex:n},e.keyInfo);_h(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&&RM(this)},this),this._seriesIndices||RM(this)},t.prototype.getOption=function(){var e=vh(this.option);return Mh(e,function(t,n){if(pM.hasClass(n)){for(var i=ny(t),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!fy(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,e[n]=i}}),delete e[HM],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=[],Mh(ny(i),function(e){a[e]&&n.push(a[e])})):n=null!=r?qM("id",r,a):null!=o?qM("name",o,a):Dh(a,function(e){return!!e}),$M(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):Dh(this._componentsMap.get(s),function(e){return!!e});return o=$M(u,e),e.filter?Dh(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var i=this._componentsMap;if(Lh(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=Ph(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=cy(e,null);return Dh(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 Dh(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return Dh(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),Mh(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)},this)},t.prototype.eachRawSeries=function(e,t){Mh(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){zM(this),Mh(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 Mh(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=[];Mh(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=ip(n)},t.prototype.restoreData=function(e){RM(this);var t=this._componentsMap,n=[];t.each(function(e,t){pM.hasClass(t)&&n.push(t)}),pM.topologicalTravel(n,pM.getAllClassMainTypes(),function(n){Mh(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=(RM=function(e){var t=e._seriesIndices=[];Mh(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=ip(t)},zM=function(e){if("production"!==process.env.NODE_ENV&&!e._seriesIndices)throw new Error("Option should contains series.")},void(FM=function(e,t){e.option={},e.option[HM]=1,e._componentsMap=ip({series:[]}),e._componentsCount=ip();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,Mh(i,function(e,t){"colorLayer"===t&&r||pM.hasClass(t)||("object"==typeof e?n[t]=n[t]?yh(n[t],e,!1):vh(e):null==n[t]&&(n[t]=e))}),yh(t,mM,!1),e._mergeOption(t,null)})),t}(rS);function qM(e,t,n){if(Nh(t)){var i=ip();return Mh(t,function(e){null!=e&&(null!=cy(e,null)&&i.set(e,!0))}),Dh(n,function(t){return t&&i.get(t[e])})}var r=cy(t,null);return Dh(n,function(t){return t&&null!=r&&t[e]===r})}function $M(e,t){return t.hasOwnProperty("subType")?Dh(e,function(e){return e&&e.subType===t.subType}):e}function KM(e){var t=ip();return e&&Mh(ny(e.replaceMerge),function(e){"production"!==process.env.NODE_ENV&&qh(pM.hasClass(e),'"'+e+'" is not valid component main type in "replaceMerge"'),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}Ch(XM,jM);var JM=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],QM=function(){return function(e){Mh(JM,function(t){this[t]=Ah(e[t],e)},this)}}(),eT={},tT=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];Mh(eT,function(i,r){var o=i.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){Mh(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){eT[e]=t},e.get=function(e){return eT[e]},e}(),nT=/^(min|max)?(.+)$/,iT=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(Mh(ny(e.series),function(e){e&&e.data&&Vh(e.data)&&Jh(e.data)}),Mh(ny(e.dataset),function(e){e&&e.source&&Vh(e.source)&&Jh(e.source)})),e=vh(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&&(Nh(u)?Mh(u,function(e){"production"!==process.env.NODE_ENV&&e&&!e.option&&zh(e.query)&&zh(e.query.option)&&Xv("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&&Xv("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }"));function h(e){Mh(t,function(t){t(e,n)})}return h(r),Mh(l,function(e){return h(e)}),Mh(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=[],vh(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=vh(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++)rT(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=Th(s,function(e){return vh(-1===e?a.option:o[e].option)})),this._currentMediaIndices=s,l},e}();function rT(e,t,n){var i={width:t,height:n,aspectratio:t/n},r=!0;return Mh(e,function(e,t){var n=t.match(nT);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 oT=Mh,aT=zh,sT=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function lT(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=sT.length;n<i;n++){var r=sT[n],o=t.normal,a=t.emphasis;o&&o[r]&&("production"!==process.env.NODE_ENV&&$v("itemStyle.normal."+r,r),e[r]=e[r]||{},e[r].normal?yh(e[r].normal,o[r]):e[r].normal=o[r],o[r]=null),a&&a[r]&&("production"!==process.env.NODE_ENV&&$v("itemStyle.emphasis."+r,"emphasis."+r),e[r]=e[r]||{},e[r].emphasis?yh(e[r].emphasis,a[r]):e[r].emphasis=a[r],a[r]=null)}}function uT(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&&qv("'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,bh(e[t],i)):e[t]=i),r&&("production"!==process.env.NODE_ENV&&qv(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 cT(e){uT(e,"itemStyle"),uT(e,"lineStyle"),uT(e,"areaStyle"),uT(e,"label"),uT(e,"labelLine"),uT(e,"upperLabel"),uT(e,"edgeLabel")}function dT(e,t){var n=aT(e)&&e[t],i=aT(n)&&n.textStyle;if(i){"production"!==process.env.NODE_ENV&&qv("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var r=0,o=ry.length;r<o;r++){var a=ry[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}}function hT(e){e&&(cT(e),dT(e,"label"),e.emphasis&&dT(e.emphasis,"label"))}function pT(e){return Nh(e)?e:e?[e]:[]}function fT(e){return(Nh(e)?e[0]:e)||{}}function gT(e,t){oT(pT(e.series),function(e){aT(e)&&function(e){if(aT(e)){lT(e),cT(e),dT(e,"label"),dT(e,"upperLabel"),dT(e,"edgeLabel"),e.emphasis&&(dT(e.emphasis,"label"),dT(e.emphasis,"upperLabel"),dT(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(lT(t),hT(t));var n=e.markLine;n&&(lT(n),hT(n));var i=e.markArea;i&&hT(i);var r=e.data;if("graph"===e.type){r=r||e.nodes;var o=e.links||e.edges;if(o&&!Vh(o))for(var a=0;a<o.length;a++)hT(o[a]);Mh(e.categories,function(e){cT(e)})}if(r&&!Vh(r))for(a=0;a<r.length;a++)hT(r[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)hT(s[a])}if((n=e.markLine)&&n.data){var l=n.data;for(a=0;a<l.length;a++)Nh(l[a])?(hT(l[a][0]),hT(l[a][1])):hT(l[a])}"gauge"===e.type?(dT(e,"axisLabel"),dT(e,"title"),dT(e,"detail")):"treemap"===e.type?(uT(e.breadcrumb,"itemStyle"),Mh(e.levels,function(e){cT(e)})):"tree"===e.type&&cT(e.leaves)}}(e)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),oT(n,function(t){oT(pT(e[t]),function(e){e&&(dT(e,"axisLabel"),dT(e.axisPointer,"label"))})}),oT(pT(e.parallel),function(e){var t=e&&e.parallelAxisDefault;dT(t,"axisLabel"),dT(t&&t.axisPointer,"label")}),oT(pT(e.calendar),function(e){uT(e,"itemStyle"),dT(e,"dayLabel"),dT(e,"monthLabel"),dT(e,"yearLabel")}),oT(pT(e.radar),function(e){dT(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name,"production"!==process.env.NODE_ENV&&qv("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&&qv("nameGap property in radar component has been changed to axisNameGap")),"production"!==process.env.NODE_ENV&&oT(e.indicator,function(e){e.text&&$v("text","name","radar.indicator")})}),oT(pT(e.geo),function(e){aT(e)&&(hT(e),oT(pT(e.regions),function(e){hT(e)}))}),oT(pT(e.timeline),function(e){hT(e),uT(e,"label"),uT(e,"itemStyle"),uT(e,"controlStyle",!0);var t=e.data;Nh(t)&&Mh(t,function(e){zh(e)&&(uT(e,"label"),uT(e,"itemStyle"))})}),oT(pT(e.toolbox),function(e){uT(e,"iconStyle"),oT(e.feature,function(e){uT(e,"iconStyle")})}),dT(fT(e.axisPointer),"label"),dT(fT(e.tooltip).axisPointer,"label")}function mT(e){e&&Mh(vT,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var vT=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],yT=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],xT=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function _T(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<xT.length;n++){var i=xT[n][1],r=xT[n][0];null!=t[i]&&(t[r]=t[i],"production"!==process.env.NODE_ENV&&$v(i,r))}}function bT(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&("production"!==process.env.NODE_ENV&&$v("label.margin","label.edgeDistance","pie"),e.edgeDistance=e.margin)}function wT(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,"production"!==process.env.NODE_ENV&&$v("downplay","blur","sunburst"))}function CT(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&CT(e[n].children,t)}function ST(e,t){gT(e,t),e.series=ny(e.series),Mh(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&&$v("clipOverflow","clip","line"));else if("pie"===t||"gauge"===t){if(null!=e.clockWise&&(e.clockwise=e.clockWise,"production"!==process.env.NODE_ENV&&$v("clockWise","clockwise")),bT(e.label),(r=e.data)&&!Vh(r))for(var n=0;n<r.length;n++)bT(r[n]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&("production"!==process.env.NODE_ENV&&$v("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(_T(e),_T(e.backgroundStyle),_T(e.emphasis),(r=e.data)&&!Vh(r))for(n=0;n<r.length;n++)"object"==typeof r[n]&&(_T(r[n]),_T(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&&$v("highlightPolicy","emphasis.focus","sunburst"))),wT(e),CT(e.data,wT)}else"graph"===t||"sankey"===t?function(e){e&&null!=e.focusNodeAdjacency&&(e.emphasis=e.emphasis||{},null==e.emphasis.focus&&("production"!==process.env.NODE_ENV&&$v("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),e.emphasis.focus="adjacency"))}(e):"map"===t&&(e.mapType&&!e.map&&("production"!==process.env.NODE_ENV&&$v("mapType","map","map"),e.map=e.mapType),e.mapLocation&&("production"!==process.env.NODE_ENV&&qv("`mapLocation` is not used anymore."),bh(e,e.mapLocation)));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&("production"!==process.env.NODE_ENV&&$v("hoverAnimation","emphasis.scale"),e.emphasis.scale=e.hoverAnimation)),mT(e)}}),e.dataRange&&(e.visualMap=e.dataRange),Mh(yT,function(t){var n=e[t];n&&(Nh(n)||(n=[n]),Mh(n,function(e){mT(e)}))})}function MT(e){Mh(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=kv(p,v),f=v;break}}}return i[0]=p,i[1]=f,i})})}var TT,IT,DT,kT,AT,ET=function(){return function(e){this.data=e.data||(e.sourceFormat===bM?{}:[]),this.sourceFormat=e.sourceFormat||CM,this.seriesLayoutBy=e.seriesLayoutBy||SM,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&&LM(this,n)===TM&&(i.type="ordinal")}}}();function NT(e){return e instanceof ET}function LT(e,t,n){n=n||OT(e);var i=t.seriesLayoutBy,r=function(e,t,n,i,r){var o,a;if(!e)return{dimensionsDefine:RT(r),startIndex:a,dimensionsDetectedCount:o};if(t===xM){var s=e;"auto"===i||null==i?zT(function(e){null!=e&&"-"!==e&&(Ph(e)?null==a&&(a=1):a=0)},n,s,10):a=Rh(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===MM?s.length:s[0]?s[0].length:null}else if(t===_M)r||(r=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t)return kh(t)}(e));else if(t===bM)r||(r=[],Mh(e,function(e,t){r.push(t)}));else if(t===yM){var l=oy(e[0]);o=Nh(l)&&l.length||1}else t===wM&&"production"!==process.env.NODE_ENV&&qh(!!r,"dimensions must be given if data is TypedArray.");return{startIndex:a,dimensionsDefine:RT(r),dimensionsDetectedCount:o}}(e,n,i,t.sourceHeader,t.dimensions);return new ET({data:e,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:vh(t)})}function PT(e){return new ET({data:e,sourceFormat:Vh(e)?wM:yM})}function OT(e){var t=CM;if(Vh(e))t=wM;else if(Nh(e)){0===e.length&&(t=xM);for(var n=0,i=e.length;n<i;n++){var r=e[n];if(null!=r){if(Nh(r)||Vh(r)){t=xM;break}if(zh(r)){t=_M;break}}}}else if(zh(e))for(var o in e)if(sp(e,o)&&Sh(e[o])){t=bM;break}return t}function RT(e){if(e){var t=ip();return Th(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===MM)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 FT(e){var t=e.sourceFormat;return t===_M||t===bM}var VT=function(){function e(e,t){var n=NT(e)?e:PT(e);this._source=n;var i=this._data=n.data;if(n.sourceFormat===wM){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}AT(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;AT=function(e,r,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine,c=kT[qT(a,s)];if("production"!==process.env.NODE_ENV&&qh(c,"Invalide sourceFormat: "+a),_h(e,c),a===wM)e.getItem=t,e.count=i,e.fillStorage=n;else{var d=GT(a,s);e.getItem=Ah(d,null,r,l,u);var h=UT(a,s);e.count=Ah(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={})[xM+"_"+SM]={pure:!0,appendData:r},e[xM+"_"+MM]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[_M]={pure:!0,appendData:r},e[bM]={pure:!0,appendData:function(e){var t=this._data;Mh(e,function(e,n){for(var i=t[n]||(t[n]=[]),r=0;r<(e||[]).length;r++)i.push(e[r])})}},e[yM]={appendData:r},e[wM]={persistent:!1,pure:!0,appendData:function(e){"production"!==process.env.NODE_ENV&&qh(Vh(e),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},kT=e}(),e}(),BT=function(e,t,n,i){return e[i]},jT=((TT={})[xM+"_"+SM]=function(e,t,n,i){return e[i+t]},TT[xM+"_"+MM]=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},TT[_M]=BT,TT[bM]=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},TT[yM]=BT,TT);function GT(e,t){var n=jT[qT(e,t)];return"production"!==process.env.NODE_ENV&&qh(n,'Do not support get item on "'+e+'", "'+t+'".'),n}var WT=function(e,t,n){return e.length},HT=((IT={})[xM+"_"+SM]=function(e,t,n){return Math.max(0,e.length-t)},IT[xM+"_"+MM]=function(e,t,n){var i=e[0];return i?Math.max(0,i.length-t):0},IT[_M]=WT,IT[bM]=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},IT[yM]=WT,IT);function UT(e,t){var n=HT[qT(e,t)];return"production"!==process.env.NODE_ENV&&qh(n,'Do not support count on "'+e+'", "'+t+'".'),n}var YT=function(e,t,n){return e[t]},ZT=((DT={})[xM]=YT,DT[_M]=function(e,t,n){return e[n]},DT[bM]=YT,DT[yM]=function(e,t,n){var i=oy(e);return i instanceof Array?i[t]:i},DT[wM]=YT,DT);function XT(e){var t=ZT[e];return"production"!==process.env.NODE_ENV&&qh(t,'Do not support get value on "'+e+'".'),t}function qT(e,t){return e===xM?e+"_"+t:e}function $T(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 XT(o)(i,a,s)}var l=i;return o===yM&&(l=oy(i)),l}}}var KT=/\{@(.+?)\}/g,JT=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&&Nh(s.value)&&(s.value=s.value[i]),r)||(r=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]));return Lh(r)?(s.status=t,s.dimensionIndex=i,r(s)):Ph(r)?JS(r,s).replace(KT,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)&&Xv("Invalide label formatter: @"+n+", only support @[0], @[1], @[2], ..."));var s=$T(a,e,r);if(o&&Nh(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 $T(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function QT(e){var t,n;return zh(e)?e.type?n=e:process.env.NODE_ENV:t=e,{text:t,frag:n}}function eI(e){return new tI(e)}var tI=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&&qh(null!=n._outputDueEnd),this._dueEnd=n._outputDueEnd):("production"!==process.env.NODE_ENV&&qh(!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(Nh(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&&qh(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){nI.reset(t,n,i,r),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:nI.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),Nh(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&&qh(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}(),nI=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 iI(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||Rh(e)||null==e||"-"===e||(e=+Pv(e)),null==e||""===e?NaN:Number(e))}var rI=ip({number:function(e){return parseFloat(e)},time:function(e){return+Pv(e)},trim:function(e){return Ph(e)?$h(e):e}});function oI(e){return rI.get(e)}var aI={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}},sI=function(){function e(e,t){if(!Rh(t)){var n="";"production"!==process.env.NODE_ENV&&(n='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),Jv(n)}this._opFn=aI[e],this._rvalFloat=Vv(t)}return e.prototype.evaluate=function(e){return Rh(e)?this._opFn(e,this._rvalFloat):this._opFn(Vv(e),this._rvalFloat)},e}(),lI=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=Rh(e)?e:Vv(e),i=Rh(t)?t:Vv(t),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=Ph(e),s=Ph(t);a&&(n=s?e:0),s&&(i=a?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}(),uI=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Vv(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=Vv(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function cI(e,t){return"eq"===e||"ne"===e?new uI("eq"===e,t):sp(aI,e)?new sI(e,t):null}var dI=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 iI(e,t)},e}();function hI(e){var t=e.sourceFormat;if(!yI(t)){var n="";"production"!==process.env.NODE_ENV&&(n="`getRawData` is not supported in source format "+t),Jv(n)}return e.data}function pI(e){var t=e.sourceFormat,n=e.data;if(!yI(t)){var i="";"production"!==process.env.NODE_ENV&&(i="`cloneRawData` is not supported in source format "+t),Jv(i)}if(t===xM){for(var r=[],o=0,a=n.length;o<a;o++)r.push(n[o].slice());return r}if(t===_M){for(r=[],o=0,a=n.length;o<a;o++)r.push(_h({},n[o]));return r}}function fI(e,t,n){if(null!=n)return Rh(n)||!isNaN(n)&&!sp(t,n)?e[n]:sp(t,n)?t[n]:void 0}function gI(e){return vh(e)}var mI=ip();function vI(e,t,n,i){var r="";t.length||("production"!==process.env.NODE_ENV&&(r="Must have at least one upstream dataset."),Jv(r)),zh(e)||("production"!==process.env.NODE_ENV&&(r="transform declaration must be an object rather than "+typeof e+"."),Jv(r));var o=e.type,a=mI.get(o);a||("production"!==process.env.NODE_ENV&&(r='Can not find transform on type "'+o+'".'),Jv(r));var s,l=Th(t,function(e){return function(e,t){var n=new dI,i=e.data,r=n.sourceFormat=e.sourceFormat,o=e.startIndex,a="";e.seriesLayoutBy!==SM&&("production"!==process.env.NODE_ENV&&(a='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),Jv(a));var s=[],l={},u=e.dimensionsDefine;if(u)Mh(u,function(e,t){var n=e.name,i={index:t,name:n,displayName:e.displayName};if(s.push(i),null!=n){var r="";sp(l,n)&&("production"!==process.env.NODE_ENV&&(r='dimension name "'+n+'" duplicated.'),Jv(r)),l[n]=i}});else for(var c=0;c<e.dimensionsDetectedCount;c++)s.push({index:c});var d=GT(r,SM);t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(i,o,s,e)},n.getRawData=Ah(hI,null,e)),n.cloneRawData=Ah(pI,null,e);var h=UT(r,SM);n.count=Ah(h,null,i,o,s);var p=XT(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=Ah(fI,null,s,l),n.cloneAllDimensionInfo=Ah(gI,null,s),n}(e,a)}),u=ny(a.transform({upstream:l[0],upstreamList:l,config:vh(e.config)}));if("production"!==process.env.NODE_ENV&&e.print){var c=Th(u,function(e){var t=null!=i?" === pipe index: "+i:"";return["=== dataset index: "+n.datasetIndex+t+" ===","- transform result data:",Kv(e.data),"- transform result dimensions:",Kv(e.dimensions)].join("\n")}).join("\n");Yv(0,c,s)}return Th(u,function(e,n){var i,r="";zh(e)||("production"!==process.env.NODE_ENV&&(r="A transform should not return some empty results."),Jv(r)),e.data||("production"!==process.env.NODE_ENV&&(r="Transform result data should be not be null or undefined"),Jv(r)),yI(OT(e.data))||("production"!==process.env.NODE_ENV&&(r="Transform result data should be array rows or object rows."),Jv(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:SM,sourceHeader:a,dimensions:o.metaRawOption.dimensions}}else i={seriesLayoutBy:SM,sourceHeader:0,dimensions:e.dimensions};return LT(e.data,i,null)})}function yI(e){return e===xM||e===_M}var xI,_I="undefined",bI=typeof Uint32Array===_I?Array:Uint32Array,wI=typeof Uint16Array===_I?Array:Uint16Array,CI=typeof Int32Array===_I?Array:Int32Array,SI=typeof Float64Array===_I?Array:Float64Array,MI={float:SI,int:CI,ordinal:Array,number:Array,time:SI};function TI(e){return e>65535?bI:wI}function II(){return[1/0,-1/0]}function DI(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function kI(e,t,n,i,r){var o=MI[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 AI=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=ip()}return e.prototype.initData=function(e,t,n){"production"!==process.env.NODE_ENV&&qh(Lh(e.getItem)&&Lh(e.count),"Invalid data provider."),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),r=this.defaultDimValueGetter=xI[i.sourceFormat];this._dimValueGetter=n||r,this._rawExtent=[];var o=FT(i);this._dimensions=Th(t,function(e){return"production"!==process.env.NODE_ENV&&o&&qh(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 MI[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&&qh(!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++){kI(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=xI.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=Th(o,function(e){return e.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=II()),kI(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=TI(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(TI(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=kh(e),r=i.length;if(!r)return this;var o=t.count(),a=new(TI(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]]=II();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(TI(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(TI(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(TI(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&&Ih(t,function(e,t){return e[t]=!0,e},{});if(o)for(var a=0;a<r.length;a++)i._chunks[a]=o[a]?DI(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=vh(this._extent),e._rawExtent=vh(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 iI(e[i],this._dimensions[i])}xI={arrayRows:e,objectRows:function(e,t,n,i){return iI(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var r=e&&(null==e.value?e:e.value);return iI(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),EI=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(LI(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=Vh(a=o.get("data",!0))?wM:yM,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=Uh(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=Uh(c.sourceHeader,d.sourceHeader),f=Uh(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[LT(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=[LT(g.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}"production"!==process.env.NODE_ENV&&qh(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&&qh(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"),PI(o))}var a,s=[],l=[];return Mh(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),PI(n)),s.push(t),l.push(e._getVersionSign())}),i?t=function(e,t,n){var i=ny(e),r=i.length,o="";r||("production"!==process.env.NODE_ENV&&(o="If `transform` declared, it should at least contain one transform."),Jv(o));for(var a=0,s=r;a<s;a++)t=vI(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 ET({data:a.data,sourceFormat:a.sourceFormat,seriesLayoutBy:a.seriesLayoutBy,dimensionsDefine:vh(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&&qh(LI(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];LI(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new AI).initData(new VT(t,e.length),e),r[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(LI(e)){var t=NM(e);return t?[t.getSourceManager()]:[]}return Th(function(e){return e.get("transform",!0)||e.get("fromTransformResult",!0)?wy(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},_y).models:[]}(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,i=this._sourceHost;if(LI(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 NI(e){e.option.transform&&Jh(e.option.transform)}function LI(e){return"series"===e.mainType}function PI(e){throw new Error(e)}function OI(e){var t=e.lineHeight;return null==t?"line-height:1":"line-height:"+Vp(t+"")+"px"}function RI(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:"+Vp(i+"")+"px;color:"+Vp(n)+";font-weight:"+Vp(r+""),valueStyle:"font-size:"+Vp(a+"")+"px;color:"+Vp(o)+";font-weight:"+Vp(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:r},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var zI=[0,10,20,30],FI=["","\n","\n\n","\n\n\n"];function VI(e,t){return t.type=e,t}function BI(e){return"section"===e.type}function jI(e){return BI(e)?WI:HI}function GI(e){if(BI(e)){var t=0,n=e.blocks.length,i=n>1||n>0&&!e.noHeader;return Mh(e.blocks,function(e){var n=GI(e);n>=t&&(t=n+ +(i&&(!n||BI(e)&&!e.noHeader)))}),t}return 0}function WI(e,t,n,i){var r,o=t.noHeader,a=(r=GI(t),{html:zI[r],richText:FI[r]}),s=[],l=t.blocks||[];qh(!l||Nh(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(sp(c,u)){var d=new lI(c[u],null);l.sort(function(e,t){return d.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}Mh(l,function(n,r){var o=t.valueFormatter,l=jI(n)(o?_h(_h({},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):YI(i,s.join(""),o?n:a.html);if(o)return h;var p=qS(t.header,"ordinal",e.useUTC),f=RI(i,e.renderMode).nameStyle,g=OI(i);return"richText"===e.renderMode?ZI(e,p,f)+a.richText+h:YI(i,'<div style="'+f+";"+g+';">'+Vp(p)+"</div>"+h,n)}function HI(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 Th(e=Nh(e)?e:[e],function(e,t){return qS(e,Nh(p)?p[t]:p,u)})};if(!o||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),h=o?"":qS(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!s||!o,m=!s&&o,v=RI(i,r),y=v.nameStyle,x=v.valueStyle;return"richText"===r?(s?"":d)+(o?"":ZI(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(Nh(t)?t.join(" "):t,o)}(e,f,g,m,x)):YI(i,(s?"":d)+(o?"":function(e,t,n){return'<span style="'+n+";"+(t?"margin-left:2px":"")+'">'+Vp(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=Nh(e)?e:[e],'<span style="'+o+";"+i+'">'+Th(e,function(e){return Vp(e)}).join(" ")+"</span>"}(f,g,m,x)),n)}}function UI(e,t,n,i,r,o){if(e)return jI(e)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function YI(e,t,n){return'<div style="'+("margin: "+n+"px 0 0")+";"+OI(e)+';">'+t+'<div style="clear:both"></div></div>'}function ZI(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function XI(e,t){return QS(e.getData().getItemVisual(t,"style")[e.visualDrawType])}function qI(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var $I=function(){function e(){this.richTextStyles={},this._nextStyleNameId=jv()}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=Ph(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:'+Vp(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Vp(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 Ph(r)?r:("production"!==process.env.NODE_ENV&&qh(i),this.richTextStyles[i]=r.style,r.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};Nh(t)?Mh(t,function(e){return _h(n,e)}):_h(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}();function KI(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=Nh(d),p=XI(o,a);if(c>1||h&&!c){var f=function(e,t,n,i,r){var o=t.getData(),a=Ih(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(VI("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return i.length?Mh(i,function(e){c($T(o,n,e),e)}):Mh(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=$T(l,a,u[0]),n=g.type}else r=t=h?d[0]:d;var m=py(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return VI("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[VI("nameValue",{markerType:"item",markerColor:p,name:x,noName:!$h(x),value:t,valueType:n,dataIndex:a})].concat(i||[])})}var JI=my();function QI(e,t){return e.getName(t)||e.getId(t)}var eD="__universalTransitionEnabled",tD=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return $d(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=eI({count:iD,reset:rD}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(JI(this).sourceManager=new EI(this)).prepareSource();var i=this.getInitialData(e,n);aD(i,this),this.dataTask.context.data=i,"production"!==process.env.NODE_ENV&&qh(i,"getInitialData returned invalid data."),JI(this).dataBeforeProcessed=i,nD(this),this._initSelectedMapFromData(i)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=lM(this),i=n?cM(e):{},r=this.subType;pM.hasClass(r)&&(r+="Series"),yh(e,t.getTheme().get(this.subType)),yh(e,this.getDefaultOption()),iy(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&uM(e,i,n)},t.prototype.mergeOption=function(e,t){e=yh(this.option,e,!0),this.fillDataTextStyle(e.data);var n=lM(this);n&&uM(this.option,e,n);var i=JI(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(e,t);aD(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,JI(this).dataBeforeProcessed=r,nD(this),this._initSelectedMapFromData(r)},t.prototype.fillDataTextStyle=function(e){if(e&&!Vh(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&iy(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=lD(this);if(t){var n=t.context.data;return null!=e&&n.getLinkedData?n.getLinkedData(e):n}return JI(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=lD(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}JI(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return ip(e)},t.prototype.getSourceManager=function(){return JI(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return JI(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 KI({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Jd.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=jM.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=QI(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=kh(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[QI(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[eD])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=QI(e,u)]=!0,this._selectedDataIndicesMap[d]=e.getRawIndex(u)}}else if("single"===o||!0===o){var c=t[a-1],d=QI(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 pM.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}(pM);function nD(e){var t=e.name;py(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),i=[];return Mh(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)}),i.join(" ")}(e)||t)}function iD(e){return e.model.getRawData().count()}function rD(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),oD}function oD(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function aD(e,t){Mh(rp(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Eh(sD,t))})}function sD(e,t){var n=lD(e);return n&&n.setOutputEnd((t||this).count()),t}function lD(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}}Ch(tD,JT),Ch(tD,jM),Ay(tD,pM);var uD=function(){function e(){this.group=new gv,this.uid=aS("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 cD(){var e=my();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"}}ky(uD),Py(uD);var dD=my(),hD=cD(),pD=function(){function e(){this.group=new gv,this.uid=aS("viewChart"),this.renderTask=eI({plan:mD,reset:vD}),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?gD(r,i,"emphasis"):"production"!==process.env.NODE_ENV&&Xv("Unknown dataType "+i.dataType)},e.prototype.downplay=function(e,t,n,i){var r=e.getData(i&&i.dataType);r?gD(r,i,"normal"):"production"!==process.env.NODE_ENV&&Xv("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){kC(this.group,e)},e.markUpdateMethod=function(e,t){dD(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function fD(e,t,n){e&&Lb(e)&&("emphasis"===t?pb:fb)(e,n)}function gD(e,t,n){var i=gy(e,t),r=t&&null!=t.highlightKey?function(e){var t=j_[e];return null==t&&B_<=32&&(t=j_[e]=B_++),t}(t.highlightKey):null;null!=i?Mh(ny(i),function(t){fD(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(e){fD(e,n,r)})}function mD(e){return hD(e.model)}function vD(e){var t=e.model,n=e.ecModel,i=e.api,r=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=r&&dD(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,i,r),yD[l]}ky(pD,["dispose"]),Py(pD);var yD={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)}}},xD="\0__throttleOriginMethod",_D="\0__throttleRate",bD="\0__throttleType";function wD(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 CD(e,t,n,i){var r=e[t];if(r){var o=r[xD]||r,a=r[bD];if(r[_D]!==n||a!==i){if(null==n||!i)return e[t]=o;(r=e[t]=wD(o,n,"debounce"===i))[xD]=o,r[bD]=i,r[_D]=n}return r}}function SD(e,t){var n=e[t];n&&n[xD]&&(n.clear&&n.clear(),e[t]=n[xD])}var MD=my(),TD={itemStyle:Oy(tS,!0),lineStyle:Oy(JC,!0)},ID={lineStyle:"stroke",itemStyle:"fill"};function DD(e,t){var n=e.visualStyleMapper||TD[t];return n||TD.itemStyle}function kD(e,t){var n=e.visualDrawType||ID[t];return n||"fill"}var AD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=e.getModel(i),o=DD(e,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=kD(e,i),l=o[s],u=Lh(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||Lh(o.fill)?d:o.fill,o.stroke="auto"===o.stroke||Lh(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=_h({},o);r[s]=u(i),t.setItemVisual(n,"style",r)}}}},ED=new rS,ND={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=DD(e,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){ED.option=n[i];var a=r(ED);_h(e.ensureUniqueItemVisual(t,"style"),a),ED.option.decal&&(e.setItemVisual(t,"decal",ED.option.decal),ED.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},LD={performRawSeries:!0,overallReset:function(e){var t=ip();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)),MD(e).scope=r}}),e.eachSeries(function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),i={},r=t.getData(),o=MD(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=kD(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)}})}})}},PD=Math.PI;var OD=function(){function e(e,t,n,i){this._stageTaskMap=ip(),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=ip();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;Mh(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.'),qh(!(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))}Mh(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=ip(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||eI({plan:BD,reset:jD,count:HD}));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||eI({reset:RD});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ip(),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,eI({reset:zD,onDirty:VD})));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.'),qh(!e.createOnAllSeries,h),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(c=!1,Mh(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 Lh(e)&&(e={overallReset:e,seriesType:UD(e)}),e.uid=aS("stageHandler"),t&&(e.visualType=t),e},e}();function RD(e){e.overallReset(e.ecModel,e.api,e.payload)}function zD(e){return e.overallProgress&&FD}function FD(){this.agent.dirty(),this.getDownstream().dirty()}function VD(){this.agent&&this.agent.dirty()}function BD(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function jD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ny(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Th(t,function(e,t){return WD(t)}):GD}var GD=WD(0);function WD(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 HD(e){return e.data.count()}function UD(e){YD=null;try{e(ZD,XD)}catch(t){}return YD}var YD,ZD={},XD={};function qD(e,t){for(var n in t.prototype)e[n]=lp}qD(ZD,XM),qD(XD,QM),ZD.eachSeriesByType=ZD.eachRawSeriesByType=function(e){YD=e},ZD.eachComponent=function(e){"series"===e.mainType&&e.subType&&(YD=e.subType)};var $D=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const KD={color:$D,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],$D]};var JD="#B9B8CE",QD="#100C2A",ek=function(){return{axisLine:{lineStyle:{color:JD}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},tk=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],nk={darkMode:!0,color:tk,backgroundColor:QD,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:JD},pageTextStyle:{color:JD}},textStyle:{color:JD},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:JD}},dataZoom:{borderColor:"#71708A",textStyle:{color:JD},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:JD}},timeline:{lineStyle:{color:JD},label:{color:JD},controlStyle:{color:JD,borderColor:JD}},calendar:{itemStyle:{color:QD},dayLabel:{color:JD},monthLabel:{color:JD},yearLabel:{color:JD}},timeAxis:ek(),logAxis:ek(),valueAxis:ek(),categoryAxis:ek(),line:{symbol:"circle"},graph:{color:tk},gauge:{title:{color:JD},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:JD},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};nk.categoryAxis.splitLine.show=!1;var ik=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},i={};if(Ph(e)){var r=Dy(e);t.mainType=r.main||null,t.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};Mh(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}(),rk=["symbol","symbolSize","symbolRotate","symbolOffset"],ok=rk.concat(["symbolKeepAspect"]),ak={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<rk.length;a++){var s=rk[a],l=e.get(s);Lh(l)?(o=!0,r[s]=l):i[s]=l}if(i.symbol=i.symbol||e.defaultSymbol,n.setVisual(_h({legendIcon:e.legendIcon||i.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(e)){var u=kh(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}}}}},sk={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<ok.length;i++){var r=ok[i],o=n.getShallow(r,!0);null!=o&&e.setItemVisual(t,r,o)}}:null}}};function lk(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 uk(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 ck(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 dk(e,t){function n(t,n){var i=[];return t.eachComponent({mainType:"series",subType:e,query:n},function(e){i.push(e.seriesIndex)}),i}Mh([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],function(e){t(e[0],function(t,i,r){t=_h({},t),"production"!==process.env.NODE_ENV&&$v(t.type,e[1]),r.dispatchAction(_h(t,{type:e[1],seriesIndex:n(i,t)}))})})}function hk(e,t,n,i,r){var o=e+t;n.isSilent(o)||("production"!==process.env.NODE_ENV&&qv("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=gy(l,r.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:Nh(u)?l.getName(u[0]):l.getName(u),selected:Ph(i)?i:_h({},i)})}}))}function pk(e,t,n){for(var i;e&&(!t(e)||(i=e,!n));)e=e.__hostTarget||e.parent;return i}var fk=Math.round(9*Math.random()),gk="function"==typeof Object.defineProperty,mk=function(){function e(){this._id="__ec_inner_"+fk++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return gk?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}(),vk=c_.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()}}),yk=c_.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()}}),xk=c_.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()}}),_k=c_.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()}}),bk={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}},wk={};Mh({line:Aw,rect:w_,roundRect:w_,square:w_,circle:iw,diamond:yk,pin:xk,arrow:_k,triangle:vk},function(e,t){wk[t]=new e});var Ck=c_.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=rv(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=wk[i];r||(r=wk[i="rect"]),bk[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,n)}}});function Sk(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 Mk(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://")?dC(e.slice(8),new yf(t,n,i,r),a?"center":"cover"):0===e.indexOf("path://")?cC(e.slice(7),{},new yf(t,n,i,r),a?"center":"cover"):new Ck({shape:{symbolType:e,x:t,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=Sk,o&&s.setColor(o),s}function Tk(e){return Nh(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Ik(e,t){if(null!=e)return Nh(e)||(e=[e,e]),[Cv(e[0],t[0])||0,Cv(Uh(e[1],e[0]),t[1])||0]}function Dk(e){return isFinite(e)}function kk(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=Dk(a)?a:.5,s=Dk(s)?s:.5,l=l>=0&&Dk(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=Dk(i)?i:0,r=Dk(r)?r:1,o=Dk(o)?o:0,a=Dk(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 Ak(e){return parseInt(e,10)}function Ek(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]||Ak(s[i])||Ak(e.style[i]))-(Ak(s[o])||0)-(Ak(s[a])||0)|0}function Nk(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]:Rh(t)?[t]:Nh(t)?t:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(r=Th(r,function(e){return e/a}),o/=a)}return[r,o]}var Lk=new Wx(!0);function Pk(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function Ok(e){return"string"==typeof e&&"none"!==e}function Rk(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 Fk(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 Vk(e,t,n){var i=By(t.image,t.__image,n);if(Gy(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)*up),o.scaleSelf(t.scaleX||1,t.scaleY||1),r.setTransform(o)}return r}}var Bk=["shadowBlur","shadowOffsetX","shadowOffsetY"],jk=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Gk(e,t,n,i,r){var o=!1;if(!i&&t===(n=n||{}))return!1;if(i||t.opacity!==n.opacity){Uk(e,r),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?nx.opacity:a}(i||t.blend!==n.blend)&&(o||(Uk(e,r),o=!0),e.globalCompositeOperation=t.blend||nx.blend);for(var s=0;s<Bk.length;s++){var l=Bk[s];(i||t[l]!==n[l])&&(o||(Uk(e,r),o=!0),e[l]=e.dpr*(t[l]||0))}return(i||t.shadowColor!==n.shadowColor)&&(o||(Uk(e,r),o=!0),e.shadowColor=t.shadowColor||nx.shadowColor),o}function Wk(e,t,n,i,r){var o=Yk(t,r.inHover),a=i?null:n&&Yk(n,r.inHover)||{};if(o===a)return!1;var s=Gk(e,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Uk(e,r),s=!0),Ok(o.fill)&&(e.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(Uk(e,r),s=!0),Ok(o.stroke)&&(e.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(Uk(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||(Uk(e,r),s=!0),e.lineWidth=l)}for(var u=0;u<jk.length;u++){var c=jk[u],d=c[0];(i||o[d]!==a[d])&&(s||(Uk(e,r),s=!0),e[d]=o[d]||c[1])}return s}function Hk(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 Uk(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function Yk(e,t){return t&&e.__hoverStyle||e.style}function Zk(e,t){Xk(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Xk(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&&(Uk(e,n),e.restore(),l=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(Uk(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(),Hk(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 c_&&t.autoBatch&&function(e){var t=Rk(e),n=Pk(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)?(Uk(e,n),Hk(e,t)):h||Uk(e,n);var p=Yk(t,n.inHover);t instanceof c_?(1!==n.lastDrawType&&(l=!0,n.lastDrawType=1),Wk(e,t,u,l,n),h&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,i){var r,o=Pk(n),a=Rk(n),s=n.strokePercent,l=s<1,u=!t.path;t.silent&&!l||!u||t.createPathProxy();var c=t.path||Lk,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?kk(e,h,w):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(x=d?kk(e,p,w):t.__canvasStrokeGradient,t.__canvasStrokeGradient=x),m&&(_=d||!t.__canvasFillPattern?Vk(e,h,t):t.__canvasFillPattern,t.__canvasFillPattern=_),v&&(b=d||!t.__canvasStrokePattern?Vk(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=Nk(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&&Fk(e,n),a&&zk(e,n)):(a&&zk(e,n),o&&Fk(e,n))),C&&e.setLineDash([])}(e,t,p,h),h&&(n.batchFill=p.fill||"",n.batchStroke=p.stroke||"")):t instanceof h_?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),Wk(e,t,u,l,n),function(e,t,n){var i,r=n.text;if(null!=r&&(r+=""),r){e.font=n.font||eh,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(i=Nk(t))[0],a=i[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(Pk(n)&&e.strokeText(r,n.x,n.y),Rk(n)&&e.fillText(r,n.x,n.y)):(Rk(n)&&e.fillText(r,n.x,n.y),Pk(n)&&e.strokeText(r,n.x,n.y)),o&&e.setLineDash([])}}(e,t,p)):t instanceof g_?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(e,t,n,i,r){Gk(e,Yk(t,r.inHover),n&&Yk(n,r.inHover),i,r)}(e,t,u,l,n),function(e,t,n){var i=t.__image=By(n.image,t.__image,t,t.onload);if(i&&Gy(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(),Xk(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(),Xk(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&&Uk(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}var qk=new mk,$k=new mg(100),Kk=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Jk(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),i=t.getZr(),r="svg"===i.painter.type;e.dirty&&qk.delete(e);var o=qk.get(e);if(o)return o;var a=bh(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<Kk.length;++l){var u=a[Kk[l]];if(null!=u&&!Nh(u)&&!Ph(u)&&!Rh(u)&&"boolean"!=typeof u){s=!1;break}o.push(u)}if(s){t=o.join(",")+(r?"-svg":"");var c=$k.get(t);c&&(r?e.svgElement=c:e.image=c)}var d,h=eA(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Rh(e)){var t=Math.ceil(e);return[t,t]}var n=Th(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),f=Qk(a.symbol),g=(_=h,Th(_,function(e){return tA(e)})),m=tA(p),v=!r&&nh.createCanvas(),y=r&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=Wv(e,g[t]);var i=1;for(t=0,n=f.length;t<n;++t)i=Wv(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=Mk(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 Zk(d,c)}})(),s&&$k.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,qk.set(e,s),e.dirty=!1,s}function Qk(e){if(!e||0===e.length)return[["rect"]];if(Ph(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!Ph(e[n])){t=!1;break}if(t)return Qk([e]);var i=[];for(n=0;n<e.length;++n)Ph(e[n])?i.push([e[n]]):i.push(e[n]);return i}function eA(e){if(!e||0===e.length)return[[0,0]];if(Rh(e))return[[r=Math.ceil(e),r]];for(var t=!0,n=0;n<e.length;++n)if(!Rh(e[n])){t=!1;break}if(t)return eA([e]);var i=[];for(n=0;n<e.length;++n)if(Rh(e[n])){var r=Math.ceil(e[n]);i.push([r,r])}else{(r=Th(e[n],function(e){return Math.ceil(e)})).length%2==1?i.push(r.concat(r)):i.push(r)}return i}function tA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var nA=new kp,iA={};var rA=2e3,oA=4500,aA={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:rA,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:oA,ARIA:6e3,DECAL:7e3}},sA="__flagInMainProcess",lA="__pendingUpdate",uA="__needsUpdateStatus",cA=/^[a-zA-Z0-9_]+$/,dA="__connectUpdateStatus";function hA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return fA(this,e,t);FA(this.id)}}function pA(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return fA(this,e,t)}}function fA(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),kp.prototype[t].apply(e,n)}var gA,mA,vA,yA,xA,_A,bA,wA,CA,SA,MA,TA,IA,DA,kA,AA,EA,NA,LA=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t}(kp),PA=LA.prototype;PA.on=pA("on"),PA.off=pA("off");var OA=function(e){function t(t,n,i){var r=e.call(this,new ik)||this;r._chartsViews=[],r._chartsMap={},r._componentsViews=[],r._componentsMap={},r._pendingActions=[],i=i||{},Ph(n)&&(n=HA[n]),r._dom=t;var o="canvas",a="auto",s=!1;if("production"!==process.env.NODE_ENV){var l=Jd.hasGlobalWindow?window:global;l&&(o=Uh(l.__ECHARTS__DEFAULT__RENDERER__,o),a=Uh(l.__ECHARTS__DEFAULT__COARSE_POINTER,a),s=Uh(l.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,s))}i.ssr&&(yv=function(e){var t=F_(e),n=t.dataIndex;if(null!=n){var i=ip();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=_v(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:Uh(i.useDirtyRect,s),useCoarsePointer:Uh(i.useCoarsePointer,a),pointerSize:i.pointerSize});r._ssr=i.ssr,r._throttledZrFlush=wD(Ah(u.flush,u),17),(n=vh(n))&&ST(n,!0),r._theme=n,r._locale=function(e){if(Ph(e)){var t=dS[e.toUpperCase()]||{};return e===lS||e===uS?vh(t):yh(vh(t),vh(dS[cS]),!1)}return yh(vh(e),vh(dS[cS]),!1)}(i.locale||pS),r._coordSysMgr=new tT;var c=r._api=kA(r);function d(e,t){return e.__prio-t.__prio}return Pf(WA,d),Pf(jA,d),r._scheduler=new OD(r,c,jA,WA),r._messageCenter=new LA,r._initEvents(),r.resize=Ah(r.resize,r),u.animation.on("frame",r._onframe,r),SA(u,r),MA(u,r),Jh(r),r}return $d(t,e),t.prototype._onframe=function(){if(!this._disposed){NA(this);var e=this._scheduler;if(this[lA]){var t=this[lA].silent;this[sA]=!0;try{gA(this),yA.update.call(this,null,this[lA].updateParams)}catch(a){throw this[sA]=!1,this[lA]=null,a}this._zr.flush(),this[sA]=!1,this[lA]=null,wA.call(this,t),CA.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),_A(this,i),e.performVisualTasks(i),DA(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[sA])"production"!==process.env.NODE_ENV&&Xv("`setOption` should not be called during main process.");else if(this._disposed)FA(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[sA]=!0,!this._model||t){var a=new iT(this._api),s=this._theme,l=this._model=new XM;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:r},GA);var u={seriesTransition:o,optionChanged:!0};if(n)this[lA]={silent:i,updateParams:u},this[sA]=!1,this.getZr().wakeUp();else{try{gA(this),yA.update.call(this,null,u)}catch(c){throw this[lA]=null,this[sA]=!1,c}this._ssr||this._zr.flush(),this[lA]=null,this[sA]=!1,wA.call(this,i),CA.call(this,i)}}},t.prototype.setTheme=function(){qv("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||Jd.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return"production"!==process.env.NODE_ENV&&$v("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(Jd.svgSupported){var e=this._zr;return Mh(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;Mh(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 Mh(i,function(e){e.group.ignore=!1}),o}FA(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(ZA[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();Mh(YA,function(o,d){if(o.group===n){var h=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(vh(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=nh.createCanvas(),g=_v(f,{renderer:t?"svg":"canvas"});if(g.resize({width:h,height:p}),t){var m="";return Mh(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 w_({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),Mh(c,function(e){var t=new g_({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)}FA(this.id)},t.prototype.convertToPixel=function(e,t){return xA(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return xA(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return Mh(yy(this._model,e),function(e,i){i.indexOf("Models")>=0&&Mh(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&&Zv(i+": "+(o?"The found component do not support containPoint.":"No view mapping to the found component."))}else"production"!==process.env.NODE_ENV&&Zv(i+": containPoint is not supported")},this)},this),!!n;FA(this.id)},t.prototype.getVisual=function(e,t){var n=yy(this._model,e,{defaultMainType:"series"}),i=n.seriesModel;"production"!==process.env.NODE_ENV&&(i||Zv("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?lk(r,o,t):uk(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;Mh(zA,function(e){var t=function(t){var n,r=i.getModel(),o=t.target,a="globalout"===e;if(a?n={}:o&&pk(o,function(e){var t=F_(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=_h({},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||Zv("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)}),Mh(BA,function(e,t){i._messageCenter.on(t,function(e){this.trigger(t,e)},i)}),Mh(["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?(hk("map","selectchanged",t,i,e),hk("pie","selectchanged",t,i,e)):"select"===e.fromAction?(hk("map","selected",t,i,e),hk("pie","selected",t,i,e)):"unselect"===e.fromAction&&(hk("map","unselected",t,i,e),hk("pie","unselected",t,i,e))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?FA(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)FA(this.id);else{this._disposed=!0,this.getDom()&&Cy(this.getDom(),qA,"");var e=this,t=e._api,n=e._model;Mh(e._componentsViews,function(e){e.dispose(n,t)}),Mh(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 YA[e.id]}},t.prototype.resize=function(e){if(this[sA])"production"!==process.env.NODE_ENV&&Xv("`resize` should not be called during main process.");else if(this._disposed)FA(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[lA]&&(null==i&&(i=this[lA].silent),n=!0,this[lA]=null),this[sA]=!0;try{n&&gA(this),yA.update.call(this,{type:"resize",animation:_h({duration:0},e&&e.animation)})}catch(r){throw this[sA]=!1,r}this[sA]=!1,wA.call(this,i),CA.call(this,i)}}},t.prototype.showLoading=function(e,t){if(this._disposed)FA(this.id);else if(zh(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),UA[e]){var n=UA[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}else"production"!==process.env.NODE_ENV&&Zv("Loading effects "+e+" not exists.")},t.prototype.hideLoading=function(){this._disposed?FA(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=_h({},e);return t.type=BA[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)FA(this.id);else if(zh(t)||(t={silent:!!t}),VA[e.type]&&this._model)if(this[sA])this._pendingActions.push(e);else{var n=t.silent;bA.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&Jd.browser.weChat&&this._throttledZrFlush(),wA.call(this,n),CA.call(this,n)}},t.prototype.updateLabelLayout=function(){nA.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)FA(this.id);else{var t=e.seriesIndex,n=this.getModel().getSeriesByIndex(t);"production"!==process.env.NODE_ENV&&qh(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(!Qw(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(Qw(e))return;if(e instanceof c_&&function(e){var t=G_(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)}})}gA=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),mA(e,!0),mA(e,!1),t.plan()},mA=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=Dy(e.type),h=t?uD.getClass(d.main,d.sub):pD.getClass(d.sub);"production"!==process.env.NODE_ENV&&qh(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)}},vA=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=ip(),Mh(ny(u),function(e){var t=cy(e,null);null!=t&&l.set(t,!0)})),o&&o.eachComponent(s,function(t){if(!(l&&null!=l.get(t.id)))if(Ob(n))if(t instanceof tD)n.type!==Z_||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var i=e.seriesIndex,r=e.getData(t.dataType);if(r){var o=gy(r,t);o=(Nh(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=F_(a);bb(i,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),d=e.get(["emphasis","blurScope"]);null!=c&&bb(i,c,d,n)}}else"production"!==process.env.NODE_ENV&&Xv("Unknown dataType "+t.dataType)}(t,n,e._api);else{var i=Cb(t.mainType,t.componentIndex,n.name,e._api),r=i.focusSelf,o=i.dispatchers;n.type===Z_&&r&&!n.notBlur&&wb(t.mainType,t.componentIndex,e._api),o&&Mh(o,function(e){n.type===Z_?pb(e):fb(e)})}else Pb(n)&&t instanceof tD&&(!function(e,t){if(Pb(t)){var n=t.dataType,i=gy(e.getData(n),t);Nh(i)||(i=[i]),e[t.type===K_?"toggleSelect":t.type===q_?"select":"unselect"](i,n)}}(t,n,e._api),Sb(t),EA(e))},e),o&&o.eachComponent(s,function(t){l&&null!=l.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else Mh([].concat(e._componentsViews).concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}},yA={prepareAndUpdate:function(e){gA(this),yA.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),_A(this,i),a.update(i,r),e(i),s.performVisualTasks(i,t),TA(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),nA.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=ip();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}),DA(this,i,r,t,{},a),nA.trigger("afterupdate",i,r)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),pD.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),TA(this,n,this._api,t,{}),nA.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()}),pD.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)}),nA.trigger("afterupdate",i,this._api))},updateLayout:function(e){yA.update.call(this,e)}},xA=function(e,t,n,i){if(e._disposed)FA(e.id);else{for(var r,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=yy(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&&Zv("No coordinate system that supports "+t+" found by the given finder.")}},_A=function(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries(function(e){i.updateStreamModes(e,n[e.__viewId])})},bA=function(e,t){var n=this,i=this.getModel(),r=e.type,o=e.escapeConnect,a=VA[r],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),c=null!=l[0]&&Dy(l[0]);this[sA]=!0;var d=[e],h=!1;e.batch&&(h=!0,d=Th(e.batch,function(t){return(t=bh(_h({},t),e)).batch=null,t}));var p,f=[],g=Pb(e),m=Ob(e);if(m&&_b(this._api),Mh(d,function(t){if((p=(p=a.action(t,n._model,n._api))||_h({},t)).type=s.event||p.type,f.push(p),m){var i=xy(e),r=i.queryOptionMap,o=i.mainTypeSpecified?r.keys()[0]:"series";vA(n,u,t,o),EA(n)}else g?(vA(n,u,t,"series"),EA(n)):c&&vA(n,u,t,c.main,c.sub)}),"none"!==u&&!m&&!g&&!c)try{this[lA]?(gA(this),yA.update.call(this,e),this[lA]=null):yA[u].call(this,e)}catch(x){throw this[sA]=!1,x}if(p=h?{type:s.event||r,escapeConnect:o,batch:f}:f[0],this[sA]=!1,!t){var v=this._messageCenter;if(v.trigger(p.type,p),g){var y={type:"selectchanged",escapeConnect:o,selected:Mb(i),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(y.type,y)}}},wA=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();bA.call(this,n,e)}},CA=function(e){!e&&this.trigger("updated")},SA=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[lA]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},MA=function(e,t){e.on("mouseover",function(e){var n=pk(e.target,Lb);n&&(!function(e,t,n){"production"===process.env.NODE_ENV||Lb(e)||Xv("param should be highDownDispatcher");var i=F_(e),r=Cb(i.componentMainType,i.componentIndex,i.componentHighDownName,n),o=r.dispatchers,a=r.focusSelf;o?(a&&wb(i.componentMainType,i.componentIndex,n),Mh(o,function(e){return db(e,t)})):(bb(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&wb(i.componentMainType,i.componentIndex,n),db(e,t))}(n,e,t._api),EA(t))}).on("mouseout",function(e){var n=pk(e.target,Lb);n&&(!function(e,t,n){"production"===process.env.NODE_ENV||Lb(e)||Xv("param should be highDownDispatcher"),_b(n);var i=F_(e),r=Cb(i.componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers;r?Mh(r,function(e){return hb(e,t)}):hb(e,t)}(n,e,t._api),EA(t))}).on("click",function(e){var n=pk(e.target,function(e){return null!=F_(e).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",r=F_(n);t._api.dispatchAction({type:i,dataType:r.dataType,dataIndexInside:r.dataIndex,seriesIndex:r.seriesIndex,isFromClick:!0})}})},TA=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);Pf(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),Mh(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),IA(e,t,n,i,r),Mh(e._chartsViews,function(e){e.__alive=!1}),DA(e,t,n,i,r),Mh(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},IA=function(e,t,i,a,s,l){Mh(l||e._componentsViews,function(e){var s=e.__model;r(s,e),e.render(s,t,i,a),n(s,e),o(s,e)})},DA=function(e,t,i,a,s,l){var u=e._scheduler;s=_h(s||{},{updatedSeries:t.getSeries()}),nA.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),Sb(t)}),u.unfinished=c||u.unfinished,nA.trigger("series:layoutlabels",t,i,s),nA.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")&&!Jd.node&&!Jd.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),nA.trigger("series:afterupdate",t,i,s)},EA=function(e){e[uA]=!0,e.getZr().wakeUp()},NA=function(e){e[uA]&&(e.getZr().storage.traverse(function(e){Qw(e)||t(e)}),e[uA]=!1)},kA=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return $d(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){pb(t,n),EA(e)},n.prototype.leaveEmphasis=function(t,n){fb(t,n),EA(e)},n.prototype.enterBlur=function(t){gb(t),EA(e)},n.prototype.leaveBlur=function(t){mb(t),EA(e)},n.prototype.enterSelect=function(t){vb(t),EA(e)},n.prototype.leaveSelect=function(t){yb(t),EA(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}(QM))(e)},AA=function(e){function t(e,t){for(var n=0;n<e.length;n++){e[n][dA]=t}}Mh(BA,function(n,i){e._messageCenter.on(i,function(n){if(ZA[e.group]&&0!==e[dA]){if(n&&n.escapeConnect)return;var i=e.makeActionFromEvent(n),r=[];Mh(YA,function(t){t!==e&&t.group===e.group&&r.push(t)}),t(r,0),Mh(r,function(e){1!==e[dA]&&e.dispatchAction(i)}),t(r,2)}})})}}(),t}(kp),RA=OA.prototype;RA.on=hA("on"),RA.off=hA("off"),RA.one=function(e,t,n){var i=this;qv("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 FA(e){"production"!==process.env.NODE_ENV&&Zv("Instance "+e+" has been disposed")}var VA={},BA={},jA=[],GA=[],WA=[],HA={},UA={},YA={},ZA={},XA=+new Date-0,qA="_echarts_instance_";function $A(e,t,n){if("production"!==process.env.NODE_ENV&&!e)throw new Error("Initialize failed: invalid dom.");var i=function(e){return YA[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,qA)]}(e);if(i)return"production"!==process.env.NODE_ENV&&Zv("There is a chart instance already initialized on the dom."),i;"production"!==process.env.NODE_ENV&&(!Bh(e)||"CANVAS"===e.nodeName.toUpperCase()||(e.clientWidth||n)&&(e.clientHeight||n)||Zv("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 OA(e,t,n);return r.id="ec_"+XA++,YA[r.id]=r,Cy(e,qA,r.id),AA(r),nA.trigger("afterinit",r),r}function KA(e,t){HA[e]=t}function JA(e){wh(GA,e)<0&&GA.push(e)}function QA(e,t){rE(jA,e,t,2e3)}function eE(e,t){nA.on(e,t)}function tE(e,t,n){Lh(t)&&(n=t,t="");var i=zh(e)?e.type:[e,e={event:t}][0];e.event=(e.event||i).toLowerCase(),t=e.event,BA[t]||(qh(cA.test(i)&&cA.test(t)),VA[i]||(VA[i]={action:n,actionInfo:e}),BA[t]=i)}function nE(e,t){rE(WA,e,t,3e3,"visual")}var iE=[];function rE(e,t,n,i,r){if((Lh(t)||zh(t))&&(n=t,t=i),"production"!==process.env.NODE_ENV){if(isNaN(t)||null==t)throw new Error("Illegal priority");Mh(e,function(e){qh(e.__raw!==n)})}if(!(wh(iE,n)>=0)){iE.push(n);var o=OD.wrapStageHandler(n,r);o.__prio=t,o.__raw=n,e.push(o)}}function oE(e,t){UA[e]=t}var aE=function(e){var t=(e=vh(e)).type,n="";t||("production"!==process.env.NODE_ENV&&(n="Must have a `type` when `registerTransform`."),Jv(n));var i=t.split(":");2!==i.length&&("production"!==process.env.NODE_ENV&&(n='Name must include namespace like "ns:regression".'),Jv(n));var r=!1;"echarts"===i[0]&&(t=i[1],r=!0),e.__isBuiltIn=r,mI.set(t,e)};nE(rA,AD),nE(oA,ND),nE(oA,LD),nE(rA,ak),nE(oA,sk),nE(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=Jk(n,t))});var r=i.getVisual("decal");if(r)i.getVisual("style").decal=Jk(r,t)}})}),JA(ST),QA(900,function(e){var t=ip();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(MT)}),oE("default",function(e,t){bh(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 gv,i=new w_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var r,o=new M_({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 w_({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((r=new Rw({shape:{startAngle:-PD/2,endAngle:-PD/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*PD/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*PD/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}),tE({type:Z_,event:Z_,update:Z_},lp),tE({type:X_,event:X_,update:X_},lp),tE({type:q_,event:q_,update:q_},lp),tE({type:$_,event:$_,update:$_},lp),tE({type:K_,event:K_,update:K_},lp),KA("light",KD),KA("dark",nk);var sE=[],lE={registerPreprocessor:JA,registerProcessor:QA,registerPostInit:function(e){eE("afterinit",e)},registerPostUpdate:function(e){eE("afterupdate",e)},registerUpdateLifecycle:eE,registerAction:tE,registerCoordinateSystem:function(e,t){tT.register(e,t)},registerLayout:function(e,t){rE(WA,e,t,1e3,"layout")},registerVisual:nE,registerTransform:aE,registerLoading:oE,registerMap:function(e,t,n){var i,r=(i="registerMap","production"!==process.env.NODE_ENV&&(iA[i]||Xv("Implementation of "+i+" doesn't exists.")),iA[i]);r&&r(e,t,n)},registerImpl:function(e,t){"production"!==process.env.NODE_ENV&&iA[e]&&Xv("Already has an implementation of "+e+"."),iA[e]=t},PRIORITY:aA,ComponentModel:pM,ComponentView:uD,SeriesModel:tD,ChartView:pD,registerComponentModel:function(e){pM.registerClass(e)},registerComponentView:function(e){uD.registerClass(e)},registerSeriesModel:function(e){tD.registerClass(e)},registerChartView:function(e){pD.registerClass(e)},registerSubTypeDefaulter:function(e,t){pM.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,mv[e]=n}};function uE(e){Nh(e)?Mh(e,function(e){uE(e)}):wh(sE,e)>=0||(sE.push(e),Lh(e)&&(e={install:e}),e.install(lE))}function cE(e){return null==e?0:e.length||1}function dE(e){return e}var hE=function(){function e(e,t,n,i,r,o){this._old=e,this._new=t,this._oldKeyGetter=n||dE,this._newKeyGetter=i||dE,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=cE(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=cE(l),d=cE(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=cE(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=cE(s);0===l?(t[a]=o,r&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),pE=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 fE(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function gE(e){return"category"===e?"ordinal":"time"===e?"time":"float"}var mE=function(){return function(e){this.otherDims={},null!=e&&_h(this,e)}}(),vE=my(),yE={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},xE=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=wE(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Uh(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=FT(this.source),n=!CE(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+=yE[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 _E(e){return e instanceof xE}function bE(e){for(var t=ip(),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 wE(e){var t=vE(e);return t.dimNameMap||(t.dimNameMap=bE(e.dimensionsDefine))}function CE(e){return e>30}var SE,ME,TE,IE,DE,kE,AE,EE=zh,NE=Th,LE="undefined"==typeof Int32Array?Array:Int32Array,PE=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],OE=["_approximateExtent"],RE=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;_E(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=Ph(c)?new mE({name:c}):c instanceof mE?c:new mE(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&&qh(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=ip();Mh(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(Rh(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 AI&&(i=e),!i){var o=this.dimensions,a=NT(e)||Sh(e)?new VT(e,o.length):e;i=new AI;var s=NE(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=ip(),o=[],a=[],s={};Mh(e.dimensions,function(t){var n,l=e.getDimensionInfo(t),u=l.coordDim;if(u){"production"!==process.env.NODE_ENV&&qh(null==vM.get(u));var c=l.coordDimIndex;fE(i,u)[c]=t,l.isExtraCoord||(r.set(u,1),"ordinal"!==(n=l.type)&&"time"!==n&&(o[0]=t),fE(s,u)[c]=e.getDimensionIndex(l.name)),l.defaultTooltip&&a.push(t)}vM.each(function(e,t){var n=fE(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=Th(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 pE(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&&AE(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!==wM&&!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===yM&&!n.pure)for(var o=[],a=e;a<t;a++){var s=n.getItem(a,o);if(!this.hasItemOption&&ay(s)&&(this.hasItemOption=!0),s){var l=s.name;null==i[a]&&null!=l&&(i[a]=cy(l,null));var u=s.id;null==r[a]&&null!=u&&(r[a]=cy(u,null))}}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)AE(this,a);SE(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){EE(e)?_h(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=TE(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 ME(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 Nh(e)?i.getValues(NE(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){Lh(e)&&(n=t,t=e,e=[]);var i=n||this,r=NE(IE(e),this._getStoreDimIndex,this);this._store.each(r,i?Ah(t,i):t)},e.prototype.filterSelf=function(e,t,n){Lh(e)&&(n=t,t=e,e=[]);var i=n||this,r=NE(IE(e),this._getStoreDimIndex,this);return this._store=this._store.filter(r,i?Ah(t,i):t),this},e.prototype.selectRange=function(e){var t=this,n={};return Mh(kh(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){Lh(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=NE(IE(e),this._getStoreDimIndex,this),a=kE(this);return a._store=this._store.map(o,r?Ah(t,r):t),a},e.prototype.modify=function(e,t,n,i){var r=this,o=n||i||this;"production"!==process.env.NODE_ENV&&Mh(IE(e),function(e){r.getDimensionInfo(e).isCalculationCoord});var a=NE(IE(e),this._getStoreDimIndex,this);this._store.modify(a,o?Ah(t,o):t)},e.prototype.downSample=function(e,t,n,i){var r=kE(this);return r._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),r},e.prototype.minmaxDownSample=function(e,t){var n=kE(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=kE(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 rS(n,t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new hE(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return ME(e,t)},function(e){return ME(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||{},EE(e)?_h(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&&(Nh(r=this.getVisual(t))?r=r.slice():EE(r)&&(r=_h({},r)),i[t]=r),r},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,EE(t)?_h(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){EE(e)?_h(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?_h(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;V_(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){Mh(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:NE(this.dimensions,this._getDimInfo,this),this.hostModel)),DE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];Lh(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Zh(arguments)))})},e.internalField=(SE=function(e){var t=e._invertedIndicesMap;Mh(t,function(n,i){var r=e._dimInfos[i],o=r.ordinalMeta,a=e._store;if(o){n=t[i]=new LE(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}})},TE=function(e,t,n){return cy(e._getCategory(t,n),null)},ME=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=TE(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},IE=function(e){return Nh(e)||(e=null!=e?[e]:[]),e},kE=function(t){var n=new e(t._schema?t._schema:NE(t.dimensions,t._getDimInfo,t),t.hostModel);return DE(n,t),n},DE=function(e,t){Mh(PE.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,Mh(OE,function(n){e[n]=vh(t[n])}),e._calculationInfo=_h({},t._calculationInfo)},void(AE=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=TE(e,r,t)),null==s&&null!=o&&(i[t]=s=TE(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){NT(e)||(e=PT(e));var n=(t=t||{}).coordDimensions||[],i=t.dimensionsDefine||e.dimensionsDefine||[],r=ip(),o=[],a=function(e,t,n,i){var r=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,i||0);return Mh(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&&CE(a),l=i===e.dimensionsDefine,u=l?wE(e):bE(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=ip(c),h=new CI(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 mE,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=ny(e).slice();if(1===n.length&&!Ph(n[0])&&n[0]<0)d.set(t,!1);else{var i=d.set(t,[]);Mh(n,function(e,n){var r=Ph(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!=vM.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,r.set(t,!0))}Mh(n,function(e){var t,n,i,r;if(Ph(e))t=e,r={};else{t=(r=e).name;var o=r.ordinalMeta;r.ordinalMeta=null,(r=_h({},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=ny(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++)}Mh(s,function(e,o){var a=f(e);if(l&&null!=r.type&&(a.type=r.type),m(bh(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&&bh(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)Mh(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=FE(_,r,x),C.coordDimIndex=0,(!v||y<=0)&&(C.isExtraCoord=!0),y--),b(C),null!=C.type||LM(e,w)!==TM&&(!C.isExtraCoord||null==C.otherDims.itemName&&null==C.otherDims.seriesName)||(C.type="ordinal")}return function(e){for(var t=ip(),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 xE({source:e,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function FE(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 VE=function(){return function(e){this.coordSysDims=[],this.axisMap=ip(),this.categoryAxisMap=ip(),this.coordSysName=e}}();var BE={cartesian2d:function(e,t,n,i){var r=e.getReferringComponents("xAxis",_y).models[0],o=e.getReferringComponents("yAxis",_y).models[0];if("production"!==process.env.NODE_ENV){if(!r)throw new Error('xAxis "'+Hh(e.get("xAxisIndex"),e.get("xAxisId"),0)+'" not found');if(!o)throw new Error('yAxis "'+Hh(e.get("xAxisIndex"),e.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),jE(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),jE(o)&&(i.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var r=e.getReferringComponents("singleAxis",_y).models[0];if("production"!==process.env.NODE_ENV&&!r)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],n.set("single",r),jE(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var r=e.getReferringComponents("polar",_y).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),jE(o)&&(i.set("radius",o),t.firstCategoryDimIndex=0),jE(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();Mh(o.parallelAxisIndex,function(e,o){var s=r.getComponent("parallelAxis",e),l=a[o];n.set(l,s),jE(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))})}};function jE(e){return"category"===e.get("type")}function GE(e,t,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!_E(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(Mh(i,function(e,t){Ph(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;Mh(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 WE(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function HE(e,t){return WE(e,t)?e.getCalculationInfo("stackResultDimension"):t}function UE(e,t,n){n=n||{};var i,r=t.getSourceManager(),o=!1;e?(o=!0,i=PT(e)):o=(i=r.getSource()).sourceFormat===yM;var a=function(e){var t=e.get("coordinateSystem"),n=new VE(t),i=BE[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,i=e.get("coordinateSystem"),r=tT.get(i);return t&&t.coordSysDims&&(n=Th(t.coordSysDims,function(e){var n={name:e},i=t.axisMap.get(e);if(i){var r=i.get("type");n.type=gE(r)}return n})),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=Lh(l)?l:l?Eh(AM,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&&Mh(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=GE(t,{schema:c,store:h}),f=new RE(c,t);f.setCalculationInfo(p);var g=null!=d&&function(e){if(e.sourceFormat===yM){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return!Nh(oy(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 YE=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}();Py(YE);var ZE=0,XE=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ZE}return e.createByAxisModel=function(t){var n=t.option,i=n.data,r=i&&Th(i,qE);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(!Ph(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=ip(this.categories))},e}();function qE(e){return zh(e)&&null!=e.value?e.value:e+""}function $E(e){return"interval"===e.type||"log"===e.type}function KE(e,t,n,i){var r={},o=e[1]-e[0],a=r.interval=Rv(o/t);null!=n&&a<n&&(a=r.interval=n),null!=i&&a>i&&(a=r.interval=i);var s=r.intervalPrecision=QE(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),eN(e,0,t),eN(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(r.niceTickExtent=[Sv(Math.ceil(e[0]/a)*a,s),Sv(Math.floor(e[1]/a)*a,s)],e),r}function JE(e){var t=Math.pow(10,Ov(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Sv(n*t)}function QE(e){return Tv(e)+2}function eN(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function tN(e,t){return e>=t[0]&&e<=t[1]}function nN(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function iN(e,t){return e*(t[1]-t[0])+t[0]}var rN=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new XE({})),Nh(i)&&(i=new XE({categories:Th(i,function(e){return zh(e)?e.value:e})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return $d(t,e),t.prototype.parse=function(e){return null==e?NaN:Ph(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return tN(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return nN(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(iN(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}(YE);YE.registerClass(rN);var oN=Sv,aN=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 $d(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return tN(e,this._extent)},t.prototype.normalize=function(e){return nN(e,this._extent)},t.prototype.scale=function(e){return iN(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=QE(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:oN(i[0]-t,r)}):o.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(o.push({value:a}),(a=oN(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:oN(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=oN(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=Tv(e.value)||0:"auto"===n&&(n=this._intervalPrecision),YS(oN(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=KE(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]=oN(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=oN(Math.ceil(t[1]/r)*r))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(YE);YE.registerClass(aN);var sN="undefined"!=typeof Float32Array,lN=sN?Float32Array:Array;function uN(e){return Nh(e)?sN?new Float32Array(e):e:new lN(e)}var cN="__ec_stack_";function dN(e){return e.get("stack")||cN+e.seriesIndex}function hN(e){return e.dim+e.index}function pN(e,t){var n=[];return t.eachSeriesByType(e,function(e){yN(e)&&n.push(e)}),n}function fN(e){var t=function(e){var t={};Mh(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 Mh(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=Cv(e.get("barWidth"),i),p=Cv(e.get("barMaxWidth"),i),f=Cv(e.get("barMinWidth")||(xN(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:hN(r),stackId:dN(e)})}),gN(n)}function gN(e){var t={};Mh(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 Mh(t,function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,o=e.categoryGap;if(null==o){var a=kh(i).length;o=Math.max(35-4*a,15)+"%"}var s=Cv(o,r),l=Cv(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),Mh(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;Mh(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;Mh(i,function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function mN(e,t){var n=pN(e,t),i=fN(n);Mh(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),r=dN(e),o=i[hN(n)][r],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function vN(e){return{seriesType:e,plan:cD(),reset:function(e){if(yN(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=WE(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=xN(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&&uN(3*r),u=p&&s&&uN(3*r),y=p&&uN(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 yN(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function xN(e){return e.pipelineContext&&e.pipelineContext.large}var _N=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return $d(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return kS(e.value,CS[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(IS(this._minLevelUnit))]||CS.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(Ph(n))o=n;else if(Lh(n))o=n(e.value,t,{level:e.level});else{var a=_h({},bS);if(e.level>0)for(var s=0;s<SS.length;++s)a[SS[s]]="{primary|"+a[SS[s]]+"}";var l=n?!1===n.inherit?n:bh(n,a):a,u=AS(e.value,r);if(l[u])o=l[u];else if(l.inherit){for(s=MS.indexOf(u)-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Nh(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 kS(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=MS,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=Pv(t),o=Pv(n),a=function(e){return ES(r,e,i)===ES(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()}}(IS(e),i[0],i[1],n)){l&&(r=[{value:IN(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/xS/365)),p=NS(n),f=VS(n);break;case"half-year":case"quarter":case"month":h=CN(t),p=LS(n),f=BS(n);break;case"week":case"half-week":case"day":h=wN(t),p=PS(n),f=jS(n),g=!0;break;case"half-day":case"quarter-day":case"hour":h=SN(t),p=OS(n),f=GS(n);break;case"minute":h=MN(t,!0),p=RS(n),f=WS(n);break;case"second":h=MN(t,!1),p=zS(n),f=HS(n);break;case"millisecond":h=TN(t),p=FS(n),f=US(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=IS(o[p]);if(DS(o[p]))if(l(o[p],u[u.length-1]||[],c),f!==(o[p+1]?IS(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&&Zv("Exceed safe limit.");var x=Dh(Th(u,function(e){return Dh(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]-=xS,t[1]+=xS),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]-xS}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=bN.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}(bN,this._approxInterval,0,o),o-1);this._interval=bN[a][1],this._minLevelUnit=bN[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return Rh(e)?e:+Pv(e)},t.prototype.contain=function(e){return tN(this.parse(e),this._extent)},t.prototype.normalize=function(e){return nN(this.parse(e),this._extent)},t.prototype.scale=function(e){return iN(e,this._extent)},t.type="time",t}(aN),bN=[["second",mS],["minute",vS],["hour",yS],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",_S/2],["year",_S]];function wN(e,t){return(e/=xS)>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function CN(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function SN(e){return(e/=yS)>12?12:e>6?6:e>3.5?4:e>2?2:1}function MN(e,t){return(e/=t?vS:mS)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function TN(e){return Rv(e)}function IN(e,t,n){var i=new Date(e);switch(IS(t)){case"year":case"month":i[BS(n)](0);case"day":i[jS(n)](1);case"hour":i[GS(n)](0);case"minute":i[WS(n)](0);case"second":i[HS(n)](0),i[US(n)](0)}return i.getTime()}YE.registerClass(_N);var DN=YE.prototype,kN=aN.prototype,AN=Sv,EN=Math.floor,NN=Math.ceil,LN=Math.pow,PN=Math.log,ON=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new aN,t._interval=0,t}return $d(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Th(kN.getTicks.call(this,e),function(e){var t=e.value,r=Sv(LN(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=PN(this.base);e=PN(Math.max(0,e))/n,t=PN(Math.max(0,t))/n,kN.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=DN.getExtent.call(this);t[0]=LN(e,t[0]),t[1]=LN(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]=PN(e[0])/PN(t),e[1]=PN(e[1])/PN(t),DN.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,Ov(i)));for(e/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var o=[Sv(NN(t[0]/r)*r),Sv(EN(t[1]/r)*r)];this._interval=r,this._niceExtent=o}},t.prototype.calcNiceExtent=function(e){kN.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 tN(e=PN(e)/PN(this.base),this._extent)},t.prototype.normalize=function(e){return nN(e=PN(e)/PN(this.base),this._extent)},t.prototype.scale=function(e){return e=iN(e,this._extent),LN(this.base,e)},t.type="log",t}(YE),RN=ON.prototype;function zN(e,t){return AN(e,Tv(t))}RN.getMinorTicks=kN.getMinorTicks,RN.getLabel=kN.getLabel,YE.registerClass(ON);var FN=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;Lh(o)?this._modelMinNum=GN(e,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=GN(e,o));var a=this._modelMaxRaw=t.get("max",!0);if(Lh(a)?this._modelMaxNum=GN(e,a({min:n[0],max:n[1]})):"dataMax"!==a&&(this._modelMaxNum=GN(e,a)),i)this._axisDataLen=t.getCategories().length;else{var s=t.get("boundaryGap"),l=Nh(s)?s:[s||0,s||0];"boolean"==typeof l[0]||"boolean"==typeof l[1]?(process.env.NODE_ENV,this._boundaryGapInner=[0,0]):this._boundaryGapInner=[iv(l[0],1),iv(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=Wh(a)||Wh(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&&qh(!this.frozen),this[BN[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=VN[e];"production"!==process.env.NODE_ENV&&qh(!this.frozen&&null==this[n]),this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),VN={min:"_determinedMin",max:"_determinedMax"},BN={min:"_dataMin",max:"_dataMax"};function jN(e,t,n){var i=e.rawExtentInfo;return i||(i=new FN(e,t,n),e.rawExtentInfo=i,i)}function GN(e,t){return null==t?null:Wh(t)?NaN:e.parse(t)}function WN(e,t){var n=e.type,i=jN(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=pN("bar",a),l=!1;if(Mh(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u=fN(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[hN(t)]}(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;Mh(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;Mh(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 HN(e,t){var n=t,i=WN(e,n),r=i.extent,o=n.get("splitNumber");e instanceof ON&&(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 UN(e,t){if(t=t||e.get("type"))switch(t){case"category":return new rN({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new _N({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(YE.getClass(t)||aN)}}function YN(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):Ph(t)?function(t){return function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")}}(t):Lh(t)?function(t){return function(i,r){return null!=n&&(r=i.value-n),t(ZN(e,i),r,null!=i.level?{level:i.level}:null)}}(t):function(t){return e.scale.getLabel(t)}}function ZN(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function XN(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 yf(e.x,e.y,o,a)}function qN(e){var t=e.get("interval");return null==t?"auto":t}function $N(e){return"category"===e.type&&0===qN(e.getLabelModel())}function KN(e,t){var n={};return Mh(e.mapDimensionsAll(t),function(t){n[HE(e,t)]=!0}),kh(n)}var JN=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}();function QN(e,t){return Math.abs(e-t)<1e-8}function eL(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+=Kx(r[0],r[1],a[0],a[1],t,n),r=a}var s=e[0];return QN(r[0],s[0])&&QN(r[1],s[1])||(i+=Kx(r[0],r[1],s[0],s[1],t,n)),0!==i}var tL=[];function nL(e,t){for(var n=0;n<e.length;n++)Sp(e[n],e[n],t)}function iL(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])&&(Mp(t,t,o),Tp(n,n,o))}}var rL=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}(),oL=function(){return function(e,t){this.type="polygon",this.exterior=e,this.interiors=t}}(),aL=function(){return function(e){this.type="linestring",this.points=e}}(),sL=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 $d(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 Mh(this.geometries,function(t){"polygon"===t.type?iL(t.exterior,n,i,e):Mh(t.points,function(t){iL(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 yf(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(eL(a,e[0],e[1])){for(var l=0;l<(s?s.length:0);l++)if(eL(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 yf(e,t,n,i),s=r.calculateTransform(a),l=this.geometries,u=0;u<l.length;u++){var c=l[u];"polygon"===c.type?(nL(c.exterior,s),Mh(c.interiors,function(e){nL(e,s)})):Mh(c.points,function(e){nL(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}(rL),lL=function(e){function t(t,n){var i=e.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return $d(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=tf(tL),r=e;r&&!r.isGeoSVGGraphicRoot;)rf(i,r.getLocalTransform(),i),r=r.parent;return lf(i,i),Sp(n,n,i),n},t}(rL);function uL(e,t,n){for(var i=0;i<e.length;i++)e[i]=cL(e[i],t[i],n)}function cL(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 dL(e,t){return Th(Dh((e=function(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;return null==n&&(n=1024),Mh(t.features,function(e){var t=e.geometry,i=t.encodeOffsets,r=t.coordinates;if(i)switch(t.type){case"LineString":t.coordinates=cL(r,i,n);break;case"Polygon":case"MultiLineString":uL(r,i,n);break;case"MultiPolygon":Mh(r,function(e,t){return uL(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 oL(o[0],o.slice(1)));break;case"MultiPolygon":Mh(i.coordinates,function(e){e[0]&&r.push(new oL(e[0],e.slice(1)))});break;case"LineString":r.push(new aL([i.coordinates]));break;case"MultiLineString":r.push(new aL(i.coordinates))}var a=new sL(n[t||"name"],r,n.cp);return a.properties=n,a})}var hL=my();function pL(e,t){var n=Th(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 fL(e){var t=e.getLabelModel().get("customValues");if(t){var n=YN(e),i=e.scale.getExtent();return{labels:Th(Dh(pL(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=mL(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=YN(e);return{labels:Th(t,function(t,i){return{level:t.level,formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t.value}})}}(e)}function gL(e,t){var n=e.getTickModel().get("customValues");if(n){var i=e.scale.getExtent();return{ticks:Dh(pL(e,n),function(e){return e>=i[0]&&e<=i[1]})}}return"category"===e.type?function(e,t){var n,i,r=vL(e,"ticks"),o=qN(t),a=yL(r,o);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Lh(o))n=bL(e,o,!0);else if("auto"===o){var s=mL(e,e.getLabelModel());i=s.labelCategoryInterval,n=Th(s.labels,function(e){return e.tickValue})}else n=_L(e,i=o,!0);return xL(r,o,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:Th(e.scale.getTicks(),function(e){return e.value})}}function mL(e,t){var n,i,r=vL(e,"labels"),o=qN(t),a=yL(r,o);return a||(Lh(o)?n=bL(e,o):(i="auto"===o?function(e){var t=hL(e).autoInterval;return null!=t?t:hL(e).autoInterval=e.calculateCategoryInterval()}(e):o,n=_L(e,i)),xL(r,o,{labels:n,labelCategoryInterval:i}))}function vL(e,t){return hL(e)[t]||(hL(e)[t]=[])}function yL(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function xL(e,t,n){return e.push({key:t,value:n}),n}function _L(e,t,n){var i=YN(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=$N(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 bL(e,t,n){var i=e.scale,r=YN(e),o=[];return Mh(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 wL=[0,1],CL=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 Dv(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&&SL(n=n.slice(),i.count()),wv(e,wL,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&SL(n=n.slice(),i.count());var r=wv(e,n,wL,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=Th(gL(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;Mh(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=Sv(e),t=Sv(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),Th(this.scale.getMinorTicks(e),function(e){return Th(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){return fL(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=YN(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=Qm(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))),_=hL(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 SL(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var ML=2*Math.PI,TL=Wx.CMD,IL=["top","right","bottom","left"];function DL(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 kL(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)%ML<1e-4)return l[0]=c,l[1]=d,u-n;if(o){var h=i;i=Xx(r),r=Xx(h)}else i=Xx(i),r=Xx(r);i>r&&(r+=ML);var p=Math.atan2(s,a);if(p<0&&(p+=ML),p>=i&&p<=r||p+ML>=i&&p+ML<=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 AL(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 EL(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 NL=[];function LL(e,t,n){var i=EL(t.x,t.y,t.width,t.height,e.x,e.y,NL);return n.set(NL[0],NL[1]),i}function PL(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 TL.M:o=s=c[p++],a=l=c[p++];break;case TL.L:g=AL(o,a,c[p],c[p+1],d,h,NL,!0),o=c[p++],a=c[p++];break;case TL.C:g=ig(o,a,c[p++],c[p++],c[p++],c[p++],c[p],c[p+1],d,h,NL),o=c[p++],a=c[p++];break;case TL.Q:g=ug(o,a,c[p++],c[p++],c[p],c[p+1],d,h,NL),o=c[p++],a=c[p++];break;case TL.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=kL(m,v,x,_,_+b,w,(d-m)*x/y+m,h,NL),o=Math.cos(_+b)*y+m,a=Math.sin(_+b)*x+v;break;case TL.R:g=EL(s=o=c[p++],l=a=c[p++],c[p++],c[p++],d,h,NL);break;case TL.Z:g=AL(o,a,s,l,d,h,NL,!0),o=s,a=l}g<u&&(u=g,n.set(NL[0],NL[1]))}return u}var OL=new uf,RL=new uf,zL=new uf,FL=new uf,VL=new uf;function BL(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||IL,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,c=e.getComputedTransform(),d=c&&lf([],c),h=t.get("length2")||0;u&&zL.copy(u);for(var p=0;p<a.length;p++){DL(a[p],0,s,OL,FL),uf.scaleAndAdd(RL,OL,FL,h),RL.transform(d);var f=e.getBoundingRect(),g=u?u.distance(RL):e instanceof c_?PL(RL,e.path,zL):LL(RL,f,zL);g<l&&(l=g,RL.transform(c),zL.transform(c),zL.toArray(o[0]),RL.toArray(o[1]),OL.toArray(o[2]))}WL(o,t.get("minTurnAngle")),n.setShape({points:o})}}}var jL=[],GL=new uf;function WL(e,t){if(t<=180&&t>0){t=t/180*Math.PI,OL.fromArray(e[0]),RL.fromArray(e[1]),zL.fromArray(e[2]),uf.sub(FL,OL,RL),uf.sub(VL,zL,RL);var n=FL.len(),i=VL.len();if(!(n<.001||i<.001)){FL.scale(1/n),VL.scale(1/i);var r=FL.dot(VL);if(Math.cos(t)<r){var o=AL(RL.x,RL.y,zL.x,zL.y,OL.x,OL.y,jL,!1);GL.fromArray(jL),GL.scaleAndAdd(VL,o/Math.tan(Math.PI-t));var a=zL.x!==RL.x?(GL.x-RL.x)/(zL.x-RL.x):(GL.y-RL.y)/(zL.y-RL.y);if(isNaN(a))return;a<0?uf.copy(GL,RL):a>1&&uf.copy(GL,zL),GL.toArray(e[1])}}}}function HL(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,OL.fromArray(e[0]),RL.fromArray(e[1]),zL.fromArray(e[2]),uf.sub(FL,RL,OL),uf.sub(VL,zL,RL);var i=FL.len(),r=VL.len();if(!(i<.001||r<.001))if(FL.scale(1/i),VL.scale(1/r),FL.dot(t)<Math.cos(n)){var o=AL(RL.x,RL.y,zL.x,zL.y,OL.x,OL.y,jL,!1);GL.fromArray(jL);var a=Math.PI/2,s=a+Math.acos(VL.dot(t))-n;if(s>=a)uf.copy(GL,zL);else{GL.scaleAndAdd(VL,o/Math.tan(Math.PI/2-s));var l=zL.x!==RL.x?(GL.x-RL.x)/(zL.x-RL.x):(GL.y-RL.y)/(zL.y-RL.y);if(isNaN(l))return;l<0?uf.copy(GL,RL):l>1&&uf.copy(GL,zL)}GL.toArray(e[1])}}}function UL(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 YL(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=bp(i[0],i[1]),o=bp(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=Cp([],i[1],i[0],a/r),l=Cp([],i[1],i[2],a/o),u=Cp([],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 ZL(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<U_.length;l++){var u=U_[l],c=t[u],d="normal"===u;if(c){var h=c.get("show");if((d?s:Uh(r.states[u]&&r.states[u].ignore,s))||!Uh(h,a)){var p=d?i:i&&i.states[u];p&&(p.ignore=!0),i&&UL(i,!0,u,c);continue}i||(i=new Iw,e.setTextGuideLine(i),d||!s&&a||UL(i,!0,"normal",t.normal),e.stateProxy&&(i.stateProxy=e.stateProxy)),UL(i,!1,u,c)}}if(i){bh(i.style,n),i.style.fill=null;var f=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,i.buildPath=YL}}else i&&e.removeTextGuideLine()}function XL(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},i=0;i<H_.length;i++){var r=H_[i];n[r]=e.getModel([r,t])}return n}function qL(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 Uw(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 $L(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 KL(e,t,n,i){return $L(e,"y","height",t,n)}function JL(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new yf(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 Uw(f.localRect,f.transform)),d||(d=new Uw(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 QL(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function eP(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:QL(i&&i.shape.points)}}var tP=["align","verticalAlign","width","height","fontSize"],nP=new Zm,iP=my(),rP=my();function oP(e,t,n){for(var i=0;i<n.length;i++){var r=n[i];null!=t[r]&&(e[r]=t[r])}}var aP=["x","y","rotation"],sP=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();yf.applyTransform(l,l,s),s?nP.setLocalTransform(s):(nP.x=nP.y=nP.rotation=nP.originX=nP.originY=0,nP.scaleX=nP.scaleY=1),nP.rotation=Xx(nP.rotation);var u,c=i.__hostTarget;if(c){u=c.getBoundingRect().plain();var d=c.getComputedTransform();yf.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:nP.x,y:nP.y,scaleX:nP.scaleX,scaleY:nP.scaleY,rotation:nP.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");(Lh(i)||kh(i).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var r=e.getTextContent(),o=F_(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(){BL(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=Lh(o.layoutOption)?o.layoutOption(eP(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=Cv(u.x,t),a.setStyle("x",0),d=!0):(a.x=l.x,a.setStyle("x",l.style.x)),null!=u.y?(a.y=Cv(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)}iP(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<tP.length;p++){var f=tP[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=qL(this._labelList),r=Dh(i,function(e){return"shiftX"===e.layoutOption.moveOverlap}),o=Dh(i,function(e){return"shiftY"===e.layoutOption.moveOverlap});$L(r,"x","width",0,t),KL(o,0,n),JL(Dh(i,function(e){return e.layoutOption.hideOverlap}))},e.prototype.processLabelsOverall=function(){var e=this;Mh(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=iP(a).needsUpdateLabelLine),o&&e._updateLabelLine(t,n),r&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),i=F_(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");ZL(e,XL(a),s),BL(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&&!Qw(e))){var r=(p=iP(n)).oldLayout,o=F_(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&&(wh(u,"select")>=0&&n.attr(p.oldLayoutSelect),wh(u,"emphasis")>=0&&n.attr(p.oldLayoutEmphasis)),Kw(n,s,t,a)}else if(n.attr(s),!WC(n).valueAnimation){var c=Uh(n.style.opacity,1);n.style.opacity=0,Jw(n,{style:{opacity:c}},t,a)}if(p.oldLayout=s,n.states.select){var d=p.oldLayoutSelect={};oP(d,s,aP),oP(d,n.states.select,aP)}if(n.states.emphasis){var h=p.oldLayoutEmphasis={};oP(h,s,aP),oP(h,n.states.emphasis,aP)}UC(n,a,l,t,t)}if(i&&!i.ignore&&!i.invisible){r=(p=rP(i)).oldLayout;var p,f={points:i.shape.points};r?(i.attr({shape:r}),Kw(i,{shape:f},t)):(i.setShape(f),i.style.strokePercent=0,Jw(i,{style:{strokePercent:1}},t)),p.oldLayout=f}},e}(),lP=my();var uP=Math.sin,cP=Math.cos,dP=Math.PI,hP=2*Math.PI,pP=180/dP,fP=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=Gg(c-hP)||(u?l>=hP:-l>=hP),h=l>0?l%hP:l%hP+hP,p=!1;p=!!d||!Gg(c)&&h>=dP==!!u;var f=e+n*cP(o),g=t+i*uP(o);this._start&&this._add("M",f,g);var m=Math.round(r*pP);if(d){var v=1/this._p,y=(u?1:-1)*(hP-v);this._add("A",n,i,m,1,+u,e+n*cP(o+y),t+i*uP(o+y)),v>.01&&this._add("A",n,i,m,0,+u,f,g)}else{var x=e+n*cP(a),_=t+i*uP(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}(),gP="none",mP=Math.round;var vP=["lineCap","miterLimit","lineJoin"],yP=Th(vP,function(e){return"stroke-"+e.toLowerCase()});function xP(e,t,n,i){var r=null==t.opacity?1:t.opacity;if(n instanceof g_)e("opacity",r);else{if(function(e){var t=e.fill;return null!=t&&t!==gP}(t)){var o=Bg(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",gP);if(function(e){var t=e.stroke;return null!=t&&t!==gP}(t)){var s=Bg(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=Nk(n),p=h[0],f=h[1];p&&(f=mP(f||0),e("stroke-dasharray",p.join(",")),(f||i)&&e("stroke-dashoffset",f))}for(var g=0;g<vP.length;g++){var m=vP[g];if(t[m]!==s_[m]){var v=t[m]||s_[m];v&&e(yP[g],v)}}}}}var _P="http://www.w3.org/2000/svg",bP="http://www.w3.org/1999/xlink",wP="ecmeta_";function CP(e){return document.createElementNS(_P,e)}function SP(e,t,n,i,r){return{tag:e,attrs:n||{},children:i,text:r,key:t}}function MP(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?Vp(a):a||"")+(i?""+n+Th(i,function(t){return e(t)}).join(n)+n:"")+("</"+r+">")}(e)}function TP(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function IP(e,t,n,i){return SP("svg","root",{width:e,height:t,xmlns:_P,"xmlns:xlink":bP,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+e+" "+t},n)}var DP=0;function kP(){return DP++}var AP={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"},EP="transform-origin";function NP(e,t,n){var i=_h({},e.shape);_h(i,t),e.buildPath(n,i);var r=new fP;return r.reset(Jg(e)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function LP(e,t){var n=t.originX,i=t.originY;(n||i)&&(e[EP]=n+"px "+i+"px")}var PP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function OP(e,t){var n=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function RP(e){return Ph(e)?AP[e]?"cubic-bezier("+AP[e]+")":hg(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(Mh(o,function(e){var t=TP(n.zrId);t.animation=!0,zP(e,{},t,!0);var o=t.cssAnims,s=t.cssNodes,l=kh(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=OP(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=RP(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=RP(c.easing),f=c.rawValue;(Ph(f)||Rh(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={};qm(g,e),_h(g,l[f]);var m=Qg(g),v=l[f][d];c[f]=m?{transform:m}:{},LP(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 Wx);var _=o.len();o.reset(),c[f].d=NP(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 PP[e]})}var S,M=kh(c),T=!0;for(p=1;p<M.length;p++){var I=M[p-1],D=M[p];if(c[I][EP]!==c[D][EP]){T=!1;break}S=c[I][EP]}if(T&&S){for(var f in c)c[f][EP]&&delete c[f][EP];t[EP]=S}if(Dh(M,function(e){return kh(c[e]).length>0}).length)return OP(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-"+kP();n.cssNodes["."+v]={animation:a.join(",")},t.class=v}}function FP(e,t,n,i){var r=JSON.stringify(e),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+kP(),n.cssStyleCache[r]=o,n.cssNodes["."+o+":hover"]=e),t.class=t.class?t.class+" "+o:o}var VP=Math.round;function BP(e){return e&&Ph(e.src)}function jP(e){return e&&Lh(e.toDataURL)}function GP(e,t,n,i){xP(function(r,o){var a="fill"===r||"stroke"===r;a&&$g(o)?QP(t,e,r,i):a&&Zg(o)?eO(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=Bg(i.shadowColor),f=p.opacity,g=p.color,m=h/2/l+" "+h/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=SP("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[SP("feDropShadow","",{dx:c/l,dy:d/u,stdDeviation:m,"flood-color":g,"flood-opacity":f})]),o[r]=a}t.filter=Kg(a)}}(n,e,i)}function WP(e,t){var n=function(e){if("function"==typeof yv)return yv(e)}(t);n&&(n.each(function(t,n){null!=t&&(e[(wP+n).toLowerCase()]=t+"")}),t.isSilent()&&(e[wP+"silent"]="true"))}function HP(e){return Gg(e[0]-1)&&Gg(e[1])&&Gg(e[2])&&Gg(e[3]-1)}function UP(e,t,n){if(t&&(!function(e){return Gg(e[4])&&Gg(e[5])}(t)||!HP(t))){var i=1e4;e.transform=HP(t)?"translate("+VP(t[4]*i)/i+" "+VP(t[5]*i)/i+")":function(e){return"matrix("+Wg(e[0])+","+Wg(e[1])+","+Wg(e[2])+","+Wg(e[3])+","+Hg(e[4])+","+Hg(e[5])+")"}(t)}}function YP(e,t,n){for(var i=e.points,r=[],o=0;o<i.length;o++)r.push(VP(i[o][0]*n)/n),r.push(VP(i[o][1]*n)/n);t.points=r.join(" ")}function ZP(e){return!e.smooth}var XP,qP,$P={circle:[(XP=["cx","cy","r"],qP=Th(XP,function(e){return"string"==typeof e?[e,e]:e}),function(e,t,n){for(var i=0;i<qP.length;i++){var r=qP[i],o=e[r[0]];null!=o&&(t[r[1]]=VP(o*n)/n)}})],polyline:[YP,ZP],polygon:[YP,ZP]};function KP(e,t){var n=e.style,i=e.shape,r=$P[e.type],o={},a=t.animation,s="path",l=e.style.strokePercent,u=t.compress&&Jg(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 fP),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 UP(o,e.transform),GP(o,n,e,t),WP(o,e),t.animation&&zP(e,o,t),t.emphasis&&function(e,t,n){if(!e.ignore)if(e.isSilent())FP(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=Fg(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),FP(u,t,n)}}(e,o,t),SP(s,e.id+"",o)}function JP(e,t){return e instanceof c_?KP(e,t):e instanceof g_?function(e,t){var n=e.style,i=n.image;if(i&&!Ph(i)&&(BP(i)?i=i.src:jP(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),UP(a,e.transform),GP(a,n,e,t),WP(a,e),t.animation&&zP(e,a,t),SP("image",e.id+"",a)}}(e,t):e instanceof h_?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||eh,o=n.x||0,a=function(e,t,n){return"top"===n?e+=t/2:"bottom"===n&&(e-=t/2),e}(n.y||0,nv(r),n.textBaseline),s={"dominant-baseline":"central","text-anchor":Ug[n.textAlign]||n.textAlign};if(E_(n)){var l="",u=n.fontStyle,c=k_(n.fontSize);if(!parseFloat(c))return;var d=n.fontFamily||Qd,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),UP(s,e.transform),GP(s,n,e,t),WP(s,e),t.animation&&zP(e,s,t),SP("text",e.id+"",s,void 0,i)}}(e,t):void 0}function QP(e,t,n,i){var r,o=e[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Xg(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!qg(o))return void("production"!==process.env.NODE_ENV&&mh("Illegal gradient type."));r="radialGradient",a.cx=Uh(o.x,.5),a.cy=Uh(o.y,.5),a.r=Uh(o.r,.5)}for(var s=o.colorStops,l=[],u=0,c=s.length;u<c;++u){var d=100*Hg(s[u].offset)+"%",h=Bg(s[u].color),p=h.color,f=h.opacity,g={offset:d};g["stop-color"]=p,f<1&&(g["stop-opacity"]=f),l.push(SP("stop",u+"",g))}var m=MP(SP(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]=SP(r,y,a,l)),t[n]=Kg(y)}function eO(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(Yg(o)){var h=o.imageWidth,p=o.imageHeight,f=void 0,g=o.image;if(Ph(g)?f=g:BP(g)?f=g.src:jP(g)&&(f=g.toDataURL()),"undefined"==typeof Image){var m="Image width/height must been given explictly in svg-ssr renderer.";qh(h,m),qh(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=By(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=SP("image","img",{href:f,width:h,height:p}),s.width=h,s.height=p}else o.svgElement&&(r=vh(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=Qg(o);b&&(s.patternTransform=b);var w=SP("pattern","",s,[r]),C=MP(w),S=i.patternCache,M=S[C];M||(M=i.zrId+"-p"+i.patternIdx++,S[C]=M,s.id=M,w=i.defs[M]=SP("pattern",M,s,[r])),t[n]=Kg(M)}}function tO(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]=SP("clipPath",o,a,[KP(e,n)])}t["clip-path"]=Kg(o)}function nO(e){return document.createTextNode(e)}function iO(e,t,n){e.insertBefore(t,n)}function rO(e,t){e.removeChild(t)}function oO(e,t){e.appendChild(t)}function aO(e){return e.parentNode}function sO(e){return e.nextSibling}function lO(e,t){e.textContent=t}var uO=SP("","");function cO(e){return void 0===e}function dO(e){return void 0!==e}function hO(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 pO(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function fO(e){var t,n=e.children,i=e.tag;if(dO(i)){var r=e.elm=CP(i);if(vO(uO,e),Nh(n))for(t=0;t<n.length;++t){var o=n[t];null!=o&&oO(r,fO(o))}else dO(e.text)&&!zh(e.text)&&oO(r,nO(e.text))}else e.elm=nO(e.text);return e.elm}function gO(e,t,n,i,r){for(;i<=r;++i){var o=n[i];null!=o&&iO(e,fO(o),t)}}function mO(e,t,n,i){for(;n<=i;++n){var r=t[n];if(null!=r)if(dO(r.tag))rO(aO(r.elm),r.elm);else rO(e,r.elm)}}function vO(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(bP,n,a):i.setAttribute(n,a))}for(n in r)n in o||i.removeAttribute(n)}}function yO(e,t){var n=t.elm=e.elm,i=e.children,r=t.children;e!==t&&(vO(e,t),cO(t.text)?dO(i)&&dO(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]:pO(u,h)?(yO(u,h),u=t[++a],h=n[++s]):pO(c,p)?(yO(c,p),c=t[--l],p=n[--d]):pO(u,p)?(yO(u,p),iO(e,u.elm,sO(c.elm)),u=t[++a],p=n[--d]):pO(c,h)?(yO(c,h),iO(e,c.elm,u.elm),c=t[--l],h=n[++s]):(cO(i)&&(i=hO(t,a,l)),cO(r=i[h.key])||(o=t[r]).tag!==h.tag?iO(e,fO(h),u.elm):(yO(o,h),t[r]=void 0,iO(e,o.elm,u.elm)),h=n[++s]);(a<=l||s<=d)&&(a>l?gO(e,null==n[d+1]?null:n[d+1].elm,n,s,d):mO(e,t,a,l))}(n,i,r):dO(r)?(dO(e.text)&&lO(n,""),gO(n,null,r,0,r.length-1)):dO(i)?mO(n,i,0,i.length-1):dO(e.text)&&lO(n,""):e.text!==t.text&&(dO(i)&&mO(n,i,0,i.length-1),lO(n,t.text)))}var xO=0,_O=function(){function e(e,t,n){if(this.type="svg",this.refreshHover=bO("refreshHover"),this.configLayer=bO("configLayer"),this.storage=t,this._opts=n=_h({},n),this.root=e,this._id="zr"+xO++,this._oldVNode=IP(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=CP("svg");vO(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(pO(e,t))yO(e,t);else{var n=e.elm,i=aO(n);fO(t),null!==i&&(iO(i,t.elm,sO(n)),mO(i,[e],0,0))}}(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return JP(e,TP(this._id))},e.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=TP(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=SP("rect","bg",{width:e,height:t,x:"0",y:"0"}),$g(n))QP({fill:n},r.attrs,"fill",i);else if(Zg(n))eO({style:{fill:n},dirty:lp,getBoundingRect:function(){return{width:e,height:t}}},r.attrs,"fill",i);else{var o=Bg(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=SP("g","main",{},[]);this._paintList(t,r,s?s.children:o),s&&o.push(s);var l=Th(kh(r.defs),function(e){return r.defs[e]});if(l.length&&o.push(SP("defs","defs",{},l)),e.animation){var u=function(e,t,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=Th(kh(e),function(t){return t+r+Th(kh(e[t]),function(n){return n+":"+e[t][n]+";"}).join(i)+o}).join(i),s=Th(kh(t),function(e){return"@keyframes "+e+r+Th(kh(t[e]),function(n){return n+r+Th(kh(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=SP("style","stl",{},[],u);o.push(c)}}return IP(n,i,o,e.useViewBox)},e.prototype.renderToString=function(e){return e=e||{},MP(this.renderToVNode({animation:Uh(e.cssAnimation,!0),emphasis:Uh(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Uh(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={};tO(d[m],v,t);var y=SP("g","clip-g-"+l++,v,[]);(i?i.children:n).push(y),a[s++]=y,i=y}r=d;var x=JP(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=Ek(i,0,n),t=Ek(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(Zg(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=em(t))&&n+"base64,"+t:n+"charset=UTF-8,"+encodeURIComponent(t)},e}();function bO(e){return function(){"production"!==process.env.NODE_ENV&&mh('In SVG mode painter not support method "'+e+'"')}}function wO(e,t,n){var i=nh.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 CO=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=wO(t,n,i):zh(t)&&(t=(r=t).id),o.id=t,o.dom=r;var a=r.style;return a&&(ap(r),r.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=i,o}return $d(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=wO("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 yf(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===o.length){(t=new yf(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 yf(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 yf(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(jh(t))a=(t.global||t.__width===i&&t.__height===o)&&t.__canvasGradient||kk(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=Vk(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&&Mh(n,function(e){h(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(kp),SO=1e5,MO=314159,TO=.01;var IO=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=_h({},n||{}),this.dpr=n.devicePixelRatio||zm,this._singleCanvas=r,this.root=e,e.style&&(ap(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 CO(s,this,this.dpr);c.__builtin__=!0,c.initContext(),a[314159]=c,c.zlevel=MO,o.push(MO),this._domRoot=e}else{this._width=Ek(e,0,n),this._height=Ek(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(SO)),i||(i=n.ctx).save(),Xk(i,a,r,o===t-1))}i&&i.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(SO)},e.prototype.paintOne=function(e,t){Zk(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;Ff(function(){s._paintList(e,t,n,i)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(MO).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 Jd.wxa&&Mh(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))&&(Xk(a,e,r,o),e.setPrevPaintRect(s))}else Xk(a,e,r,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=MO);var n=this._layers[e];return n||((n=new CO("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?yh(n,this._layerConfig[e],!0):this._layerConfig[e-TO]&&yh(n,this._layerConfig[e-TO],!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&&mh("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&&mh("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?TO:0),this._needsManuallyCompositing),u.__builtin__||mh("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,Mh(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?yh(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+TO)yh(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(wh(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=Ek(r,0,i),t=Ek(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(MO).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 CO("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];Xk(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 DO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return $d(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 UE(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new gv,n=Mk("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=Mk(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}(tD);function kO(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=$T(e,t,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a<n.length;a++)o.push($T(e,t,n[a]));return o.join(" ")}}function AO(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Nh(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 EO=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.updateData(t,n,i,r),o}return $d(t,e),t.prototype._createSymbol=function(e,t,n,i,r){this.removeAll();var o=Mk(e,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=NO,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(){pb(this.childAt(0))},t.prototype.downplay=function(){fb(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):Kw(h,d,a,n),iC(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,Jw(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=OC(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=Ik(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 g_){var w=f.style;f.useStyle(_h({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(_h({},_)):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;PC(f,d,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return M?e.getName(t):kO(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),Ib(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=F_(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&eC(a,{style:{opacity:0}},t,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();eC(i,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:r,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return Tk(e.getItemVisual(t,"symbolSize"))},t}(gv);function NO(e,t){this.parent.drift(e,t)}function LO(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 PO(e){return null==e||zh(e)||(e={isIgnore:e}),e||{}}function OO(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:OC(t),cursorStyle:t.get("cursor")}}var RO=function(){function e(e){this.group=new gv,this._SymbolCtor=e||EO}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=PO(t);var n=this.group,i=e.hostModel,r=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=OO(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(LO(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(LO(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):Kw(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=OO(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=PO(n);for(var r=e.start;r<e.end;r++){var o=t.getItemLayout(r);if(LO(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){kC(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]:Rh(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=Th(e.dimensions,function(e){return t.mapDimension(e)}),h=!1,p=t.getCalculationInfo("stackResultDimension");return WE(t,d[0])&&(h=!0,d[0]=p),WE(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 FO(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 VO=Math.min,BO=Math.max;function jO(e,t){return isNaN(e)||isNaN(t)}function GO(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(jO(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(;jO(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||jO(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 z=I>0?1:-1;p=v,f=y-z*(P=Math.abs(N))*a,D=v,k=y+z*(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=VO(D=v+T*a*M,BO(w,v)),k=VO(k,BO(C,y)),D=BO(D,VO(w,v)),f=y-(I=(k=BO(k,VO(C,y)))-y)*P/O,p=VO(p=v-(T=D-v)*P/O,BO(u,v)),f=VO(f,BO(c,y)),D=v+(T=v-(p=BO(p,VO(u,v))))*O/P,k=y+(I=y-(f=BO(f,VO(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 WO=function(){return function(){this.smooth=0,this.smoothConstraint=!0}}(),HO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new WO},t.prototype.buildPath=function(e,t){var n=t.points,i=0,r=n.length/2;if(t.connectNulls){for(;r>0&&jO(n[2*r-2],n[2*r-1]);r--);for(;i<r&&jO(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=GO(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=Wx.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?eg(n,u,d,p,e,s):eg(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?Jf(i,c,h,f,x):Jf(n,u,d,p,x);return a?[e,m]:[m,e]}}n=p,i=f}}},t}(c_),UO=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t}(WO),YO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new UO},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&&jO(n[2*o-2],n[2*o-1]);o--);for(;r<o&&jO(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=GO(e,n,r,o,o,1,t.smooth,a,t.connectNulls);GO(e,i,r+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),r+=s+1,e.closePath()}},t}(c_);function ZO(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 w_({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=Lh(r)?function(e){r(e,d)}:null;Jw(d,{shape:{width:l,height:u,x:a,y:s}},n,null,i,g)}return d}function XO(e,t,n){var i=e.getArea(),r=Sv(i.r0,1),o=Sv(i.r,1),a=new _w({shape:{cx:Sv(e.cx,1),cy:Sv(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,Jw(a,{shape:{endAngle:i.endAngle,r:o}},n));return a}function qO(e,t,n,i,r){return e?"polar"===e.type?XO(e,t,n):"cartesian2d"===e.type?ZO(e,t,n,i,r):null:null}function $O(e,t){return e.type===t}function KO(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function JO(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 QO(e,t){var n=JO(e),i=n[0],r=n[1],o=JO(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 eR(e){return Rh(e)?e:e?.5:0}function tR(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 nR(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=kg(t[r]),s=kg(t[o]),l=i-r,u=Og([yg(Cg(a[0],s[0],l)),yg(Cg(a[1],s[1],l)),yg(Cg(a[2],s[2],l)),xg(Cg(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 iR(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*EO.getSymbolSize(t,a)[e.isHorizontal()?1:0]>i)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return Mh(o.getViewLabels(),function(e){var t=o.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function rR(e,t){return isNaN(e)||isNaN(t)}function oR(e,t){return[e[2*t],e[2*t+1]]}function aR(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<H_.length;t++)if(e.get([H_[t],"endLabel","show"]))return!0;return!1}function sR(e,t,n,i){if($O(t,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=aR(i)?function(n,i){e._endLabelOnDuring(n,i,a,s,o,r,t)}:null,u=t.getBaseAxis().isHorizontal(),c=ZO(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"]),XO(t,n,i)}var lR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.init=function(){var e=new gv,t=new RO;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=Ah(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=uN(2*i),o=0;o<i;o++){var a=FO(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&&iR(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=Th(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=nR(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";Mh(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 Vw(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,QS(T));var I=f.getClipPath();if(I)Jw(I,{shape:sR(this,i,!1,e).shape},e);else f.setClipPath(sR(this,i,!0,e));_&&d.updateData(o,{isIgnore:w,clipShape:S,disableAnimation:!0,getSymbolPoint:function(e){return[l[2*e],l[2*e+1]]}}),KO(this._stackedOnPoints,x)&&KO(this._points,l)||(g?this._doUpdateAnimation(o,x,i,n,M,v,b):(M&&(x&&(x=tR(x,l,i,M,b)),l=tR(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=tR(x,l,i,M,b)),l=tR(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,QS(T)),f.setClipPath(sR(this,i,!0,e));var D=e.getModel("emphasis"),k=D.get("focus"),A=D.get("blurScope"),E=D.get("disabled");(h.useStyle(bh(a.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),Eb(h,e,"lineStyle"),h.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(h.getState("emphasis").style.lineWidth=+h.style.lineWidth+1);F_(h).seriesIndex=e.seriesIndex,Ib(h,k,A,E);var N=eR(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(bh(s.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),P&&(O=eR(P.get("smooth"))),p.setShape({smooth:N,stackedOnSmooth:O,smoothMonotone:L,connectNulls:b}),Eb(p,e,"areaStyle"),F_(p).seriesIndex=e.seriesIndex,Ib(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){F_(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=gy(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 EO(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 pD.prototype.highlight.call(this,e,t,n,i)},t.prototype.downplay=function(e,t,n,i){var r=e.getData(),o=gy(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 pD.prototype.downplay.call(this,e,t,n,i)},t.prototype._changePolyState=function(e){var t=this._polygon;lb(this._polyline,e),t&&lb(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new HO({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 YO({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");Lh(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=Lh(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=Lh(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(aR(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 M_({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(e){for(var t=e.length/2;t>0&&rR(e[2*t-2],e[2*t-1]);t--);return t-1}(a);l>=0&&(PC(o,OC(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?AO(r,n):kO(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=oR(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=My(n,h,I,D,w.t))}i.lastFrameIndex=C[0]}else{var k=1===e||i.lastFrameIndex>0?C[0]:0;T=oR(u,k);r&&(M=c.getRawValue(k)),s.attr({x:T[0]+x,y:T[1]+_})}if(r){var A=WC(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=FO(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=uN(E),L=uN(E),P=uN(E),O=uN(E),R=[];for(y=0;y<p.length;y++){var z=p[y],F=2*y,V=2*z;N[F]=l[V],N[F+1]=l[V+1],L[F]=u[V],L[F+1]=u[V+1],P[F]=c[V],P[F+1]=c[V+1],O[F]=d[V],O[F+1]=d[V+1],R[y]=h[z]}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=tR(c.stackedOnCurrent,c.current,n,r,a),d=tR(c.current,null,n,r,a),f=tR(c.stackedOnNext,c.next,n,r,a),p=tR(c.next,null,n,r,a)),QO(d,p)>3e3||l&&QO(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(),Kw(s,g,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),Kw(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}(pD);function uR(e,t){return{seriesType:e,plan:cD(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,r=e.pipelineContext,o=t||r.large;if(i){var a=Th(i.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");WE(n,a[0])&&(a[0]=l),WE(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&&uN(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 cR={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]}},dR=function(e){return Math.round(e.length/2)};function hR(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;Ph(r)?p=cR[r]:Lh(r)&&(p=r),p&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,p,dR))}}}}}var pR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.getInitialData=function(e,t){return UE(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)Mh(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}(tD);tD.registerClass(pR);var fR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.getInitialData=function(){return UE(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=sS(pR.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}(pR),gR=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}}(),mR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new gR},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}(c_);function vR(e,t,n){return t*Math.sin(e)*(n?-1:1)}function yR(e,t,n){return t*Math.cos(e)*(n?1:-1)}function xR(e,t,n){var i=e.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;Nh(i)||(i=[i,i,i,i]);var r=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Th(i,function(e){return iv(e,r)})}}var _R=Math.max,bR=Math.min;var wR=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return $d(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&&Zv("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){kC(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&&Zv("`realtimeSort` will not work because this bar series is not based on a category axis."),"cartesian2d"!==t.type&&Zv("`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($O(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=AR[l.type](a,e),n=function(e,t,n){var i="polar"===e.type?_w:w_;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=AR[l.type](a,t,n);if(g&&w(t),a.hasValue(t)&&kR[l.type](i)){var s=!1;h&&(s=CR[l.type](p,i));var m=SR[l.type](e,a,t,i,r,c,u.model,!1,f);d&&(m.forceLabelAnimation=!0),NR(m,a,t,n,i,e,r,"polar"===l.type),_?m.attr({shape:i}):d?MR(d,c,m,i,t,r,!1,!1):Jw(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=AR[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=AR[l.type](a,t);Kw(S,{shape:zR(r,M,l)},c,t)}var T=s.getItemGraphicEl(n);if(a.hasValue(t)&&kR[l.type](C)){var I=!1;if(h&&(I=CR[l.type](p,C))&&o.remove(T),T?iC(T):T=SR[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=WC(D);null!=k.prevValue&&(k.prevValue=k.value)}}else NR(T,a,t,i,C,e,r,"polar"===l.type);_?T.attr({shape:C}):d?MR(d,c,T,C,t,r,!0,b):Kw(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&&nC(n,e,t)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new gv);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(),OR(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),OR(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&qO(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:Th(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){nC(t,e,F_(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}(pD),CR={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=_R(t.x,e.x),s=bR(t.x+t.width,r),l=_R(t.y,e.y),u=bR(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=bR(t.r,e.r),o=_R(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}},SR={cartesian2d:function(e,t,n,i,r,o,a,s,l){var u=new w_({shape:_h({},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?mR:_w,c=new u({shape:i,z2:1});c.name="item";var d,h,p=ER(r);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===mR}||{}).isRoundCap,function(e,t,n){var i=t.position;if(!i||i instanceof Array)return rv(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)+vR(f,o+v,!1),b=l+p*x(f)+yR(f,o+v,!1),w="right",C="middle";break;case"insideStartAngle":_=s+p*y(f)+vR(f,-o+v,!1),b=l+p*x(f)+yR(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)+vR(g,o+v,!0),b=l+p*x(g)+yR(g,o+v,!0),w="left",C="middle";break;case"insideEndAngle":_=s+p*y(g)+vR(g,-o+v,!0),b=l+p*x(g)+yR(g,-o+v,!0),w="right",C="middle";break;default:return rv(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?Kw:Jw)(c,{shape:g},o)}return c}};function MR(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?Kw:Jw)(n,{shape:l},t,r,null),(a?Kw:Jw)(n,{shape:u},t?e.baseAxis.model:null,r)}function TR(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var IR=["x","y","width","height"],DR=["cx","cy","r","startAngle","endAngle"],kR={cartesian2d:function(e){return!TR(e,IR)},polar:function(e){return!TR(e,DR)}},AR={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 ER(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 NR(e,t,n,i,r,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape;_h(u,xR(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=OC(i);PC(e,p,{labelFetcher:o,labelDataIndex:n,defaultText:kO(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(Rh(i))e.setTextConfig({rotation:i});else if(Nh(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,ER(a),i.get(["label","rotate"]))}HC(f,p,o.getRawValue(n),function(e){return AO(t,e)});var m=i.getModel(["emphasis"]);Ib(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),Eb(e,i),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(r)&&(e.style.fill="none",e.style.stroke="none",Mh(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var LR=function(){return function(){}}(),PR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new LR},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}(c_);function OR(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 PR({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 PR({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,F_(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",RR),d.on("mousemove",RR)),n&&n.push(d)}var RR=wD(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);F_(this).dataIndex=t>=0?t:null},30,!1);function zR(e,t,n){if($O(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 FR=2*Math.PI,VR=Math.PI/180;function BR(e,t){return aM(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function jR(e,t){var n=BR(e,t),i=e.get("center"),r=e.get("radius");Nh(r)||(r=[0,r]);var o,a,s=Cv(n.width,t.getWidth()),l=Cv(n.height,t.getHeight()),u=Math.min(s,l),c=Cv(r[0],u/2),d=Cv(r[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(i);o=p[0]||0,a=p[1]||0}else Nh(i)||(i=[i,i]),o=Cv(i[0],s)+n.x,a=Cv(i[1],l)+n.y;return{cx:o,cy:a,r0:c,r:d}}function GR(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),i=t.mapDimension("value"),r=BR(e,n),o=jR(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*VR,d=e.get("endAngle"),h=e.get("padAngle")*VR;d="auto"===d?c-FR:-d*VR;var p=e.get("minAngle")*VR+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;Gx(w,!v),c=w[0],d=w[1];var S=WR(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?wv(e,_,[u,l]):l}),D=r}}),T<FR&&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 WR=my();function HR(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 UR=Math.PI/180;function YR(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}KL(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;ZR(l,l.targetTextWidth-f*r,!0),l.label.x=p}}}function ZR(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 XR(e){return"center"===e.position}function qR(e){var t,n,i=e.getData(),r=[],o=!1,a=(e.get("minShowLabelAngle")||0)*UR,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"),_=Cv(m.get("edgeDistance"),u),b=m.get("bleedMargin"),w=g.getModel("labelLine"),C=w.get("length");C=Cv(C,u);var S=w.get("length2");if(S=Cv(S,u),Math.abs(d.endAngle-d.startAngle)<a)return Mh(h.states,p),h.ignore=!0,void(f&&(Mh(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),z=O+(A<0?-1:1)*S;M="edge"===x?A<0?c+_:c+u-_:z+(A<0?-y:y),T=R,I=[[L,P],[O,R],[z,R]]}D=N?"center":"edge"===x?A>0?"right":"left":A>0?"left":"right"}var F=Math.PI,V=0,B=m.get("rotate");if(Rh(B))V=B*(F/180);else if("center"===v)V=0;else if("radial"===B||!0===B){V=A<0?-k+F:-k}else if("tangential"===B&&"outside"!==v&&"outer"!==v){var j=Math.atan2(A,E);j<0&&(j=2*F+j),E>0&&(j=F+j),V=j-F}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 uf(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;XR(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(!XR(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,ZR(m,g)}for(YR(u,t,n,i,1,0,o,0,s,d),YR(l,t,n,i,-1,0,o,0,s,c),h=0;h<e.length;h++){var m;if(!XR(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&&(Mh(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||!_?(Mh(v.states,p),v.ignore=!0):(WL(_,g.minTurnAngle),HL(_,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:_}),m.__hostTarget.textGuideLineConfig={anchor:new uf(_[0][0],_[0][1])})}}}var $R=function(e){function t(t,n,i){var r=e.call(this)||this;r.z2=2;var o=new M_;return r.setTextContent(o),r.updateData(t,n,i,!0),r}return $d(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=_h(xR(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?(Jw(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,Jw(r,{shape:{r:l.r}},o,t)):null!=n?(r.setShape({startAngle:n,endAngle:n}),Jw(r,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},o,t)):(r.shape.endAngle=l.startAngle,Kw(r,{shape:{endAngle:l.endAngle}},o,t))}else iC(r),Kw(r,{shape:u},o,t);r.useStyle(e.getItemVisual(t,"style")),Eb(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=_h({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},xR(s.getModel("itemStyle"),l)),_h(r.ensureState("select"),{x:p,y:f,shape:xR(a.getModel(["select","itemStyle"]),l)}),_h(r.ensureState("blur"),{shape:xR(a.getModel(["blur","itemStyle"]),l)});var m=r.getTextGuideLine(),v=r.getTextContent();m&&_h(m.ensureState("select"),{x:p,y:f}),_h(v.ensureState("select"),{x:p,y:f}),Ib(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;PC(i,OC(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 Iw,this.setTextGuideLine(d)),ZL(this,XL(r),{stroke:s,opacity:Yh(o.get(["lineStyle","opacity"]),l,1)})}},t}(_w),KR=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return $d(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=WR(e),d=new _w({shape:_h(jR(e,n),c)});d.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,s.add(d)}o.diff(a).add(function(e){var t=new $R(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){nC(a.getItemGraphicEl(t),e,t)}).execute(),qR(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}(pD);function JR(e,t,n){t=Nh(t)&&{coordDimensions:t}||_h({encodeDefine:e.getEncode()},t);var i=e.getSource(),r=zE(i,t).dimensions,o=new RE(r,e);return o.initData(i,n),o}var QR=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}(),ez=my(),tz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new QR(Ah(this.getData,this),Ah(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return JR(this,{coordDimensions:["value"],encodeDefaulter:Eh(EM,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),i=ez(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=Ih(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var i=Math.pow(10,t),r=Th(e,function(e){return(isNaN(e)?0:e)/n*i*100}),o=100*i,a=Th(r,function(e){return Math.floor(e)}),s=Ih(a,function(e,t){return e+t},0),l=Th(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 Th(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){iy(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}(tD);var nz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return $d(t,e),t.prototype.getInitialData=function(e,t){return UE(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}(tD),iz=function(){return function(){}}(),rz=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return $d(t,e),t.prototype.getDefaultShape=function(){return new iz},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 yf(a-r/2,s-o/2,l-a+r,u-s+o)}return e},t}(c_),oz=function(){function e(){this.group=new gv}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 rz({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=Mk(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=F_(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}(),az=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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=uR("").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 oz:new RO,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}(pD),sz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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}(pM),lz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",_y).models[0]},t.type="cartesian2dAxis",t}(pM);Ch(lz,JN);var uz={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)"]}}},cz=yh({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},uz),dz=yh({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}}},uz);const hz={category:cz,value:dz,time:yh({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},dz),log:bh({logBase:10},dz)};var pz={value:1,category:1,time:1,log:1};function fz(e,t,n,i){Mh(pz,function(r,o){var a=yh(yh({},hz[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 $d(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=lM(this),i=n?cM(e):{};yh(e,t.getTheme().get(o+"Axis")),yh(e,this.getDefaultOption()),e.type=gz(e),n&&uM(e,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=XE.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",gz)}function gz(e){return e.type||(e.data?"category":"value")}var mz=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 Th(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Dh(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}(),vz=["x","y"];function yz(e){return"interval"===e.type||"time"===e.type}var xz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=vz,t}return $d(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(yz(e)&&yz(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=lf([],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 yf(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 Sp(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 Sp(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 yf(i,r,o,a)},t}(mz),_z=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 $d(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}(CL);function bz(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),Hh(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 wz(e){return"cartesian2d"===e.get("coordinateSystem")}function Cz(e){var t={xAxisModel:null,yAxisModel:null};return Mh(t,function(n,i){var r=i.replace(/Model$/,""),o=e.getReferringComponents(r,_y).models[0];if("production"!==process.env.NODE_ENV&&!o)throw new Error(r+' "'+Yh(e.get(r+"Index"),e.get(r+"Id"),0)+'" not found');t[i]=o}),t}var Sz=Math.log;function Mz(e,t,n){var i=aN.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=WN(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=Sz(e.base);u=[Sz(u[0])/h,Sz(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=JE(f),m=u[0]+f*a;else if(d)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=JE(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=JE(f));var v=f*a;(g=Sv((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=Sv(v)):m>0&&u[1]<=0&&(m=0,g=-Sv(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,Ov(Math.abs(y))),0!==(_=Math.abs(y/x))&&1!==_&&2!==_&&3!==_&&5!==_||Iv(C[1].value)>Iv(f))&&Zv("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var Tz=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=vz,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=kh(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;$E(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(HN(l,s),$E(l)&&(t=a))}r.length&&(t||HN((t=r.pop()).scale,t.model),Mh(r,function(e){Mz(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),i(n.x),i(n.y);var r={};Mh(n.x,function(e){Dz(n,"y",e,r)}),Mh(n.y,function(e){Dz(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=aM(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){Mh(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&&(Mh(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 rN?n.count():(i=n.getTicks()).length;var a,s=e.getLabelModel(),l=YN(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=XN(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()),Mh(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",_y).models[0],o=e.yAxisModel||i&&i.getReferringComponents("yAxis",_y).models[0],a=e.gridModel,s=this._coordsList;if(i)wh(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(Iz(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 _z(t,UN(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,Mh(a.x,function(t,n){Mh(a.y,function(r,o){var a="x"+n+"y"+o,s=new xz(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){Mh(KN(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}Mh(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(wz(e)){var i=Cz(e),r=i.xAxisModel,o=i.yAxisModel;if(!Iz(r,t)||!Iz(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 Mh(this.getCartesians(),function(i){var r=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(r);wh(t,r)<0&&t.push(r),wh(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(wz(e)){var t=Cz(e),n=t.xAxisModel,i=t.yAxisModel,r=n.getCoordSysModel();if("production"!==process.env.NODE_ENV){if(!r)throw new Error('Grid "'+Yh(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=vz,e}();function Iz(e,t){return e.getCoordSysModel()===t}function Dz(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)kz(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&kz(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(e){return e.dim+"_"+e.index}}function kz(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 Az=Math.PI,Ez=function(){function e(e,t){this.group=new gv,this.opt=t,this.axisModel=e,bh(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new gv({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!Nz[e]},e.prototype.add=function(e){Nz[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=Ev(t-e);return Nv(o)?(r=n>0?"top":"bottom",i="center"):Nv(o-Az)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o<Az?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}(),Nz={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&&(Sp(s,s,a),Sp(l,l,a));var c=_h({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new Aw({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});gC(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"]);Ph(h)&&(h=[h,h]),(Ph(p)||Rh(p))&&(p=[p,p]);var f=Ik(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];Mh([{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=Mk(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=Rz(r.getTicksCoords(),t.transform,l,bh(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=Hh(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=(Hh(i.labelRotate,a.get("rotate"))||0)*Az/180,c=Ez.innerTextLayout(i.rotation,u,i.labelDirection),d=n.getCategories&&n.getCategories(!0),h=[],p=Ez.isLabelSilent(n),f=n.get("triggerEvent");return Mh(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 rS(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=Uh(y.getShallow("alignMinLabel",!0),w),S=Uh(y.getShallow("alignMaxLabel",!0),w),M=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||c.textVerticalAlign,T=Uh(y.getShallow("verticalAlignMinLabel",!0),M),I=Uh(y.getShallow("verticalAlignMaxLabel",!0),M),D=new M_({x:b,y:i.labelOffset+i.labelDirection*s,rotation:c.rotation,silent:p,z2:10+(o.level||0),style:RC(y,{text:m,align:0===u?C:u===l.length-1?S:w,verticalAlign:0===u?T:u===l.length-1?I:M,fill:Lh(_)?_("category"===r.type?v:"value"===r.type?g+"":g,u):_})});if(D.anid="label_"+g,IC({el:D,componentModel:n,itemName:m,formatterParamsExtra:{isTruncated:function(){return D.isTruncated},value:v,tickIndex:u}}),f){var k=Ez.makeAxisEventDataBase(n);k.targetType="axisLabel",k.value=v,k.tickIndex=u,"category"===r.type&&(k.dataIndex=g),F_(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($N(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?(Lz(o),Lz(u)):Pz(o,a)&&(i?(Lz(a),Lz(c)):(Lz(o),Lz(u)));!1===r?(Lz(s),Lz(d)):Pz(l,s)&&(r?(Lz(l),Lz(h)):(Lz(s),Lz(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=bh(s.getLineStyle(),bh(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var d=Rz(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"]))&&JL(qL(Th(o,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,i){var r=Hh(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,Oz(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*Az/180),Oz(s)?o=Ez.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(o=function(e,t,n,i){var r,o,a=Ev(n-e),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;Nv(a-Az/2)?(o=l?"bottom":"top",r="center"):Nv(a-1.5*Az)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*Az&&a>Az/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=Hh(e.nameTruncateMaxWidth,m.maxWidth,a),x=new M_({x:p[0],y:p[1],rotation:o.rotation,silent:Ez.isLabelSilent(t),style:RC(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(IC({el:x,componentModel:t,itemName:r}),x.__fullText=r,x.anid="name",t.get("triggerEvent")){var _=Ez.makeAxisEventDataBase(t);_.targetType="axisName",_.name=r,F_(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function Lz(e){e&&(e.ignore=!0)}function Pz(e,t){var n=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(n&&i){var r=tf([]);return af(r,r,-e.rotation),n.applyTransform(rf([],r,e.getLocalTransform())),i.applyTransform(rf([],r,t.getLocalTransform())),n.intersect(i)}}function Oz(e){return"middle"===e||"center"===e}function Rz(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&&(Sp(a,a,t),Sp(s,s,t));var c=new Aw({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});gC(c.shape,c.style.lineWidth),c.anid=r+"_"+e[l].tickValue,o.push(c)}return o}function zz(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=[];Mh(n.getCoordinateSystems(),function(n){if(n.axisPointerEnabled){var s=jz(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(Mh(n.getAxes(),Eh(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)&&Mh(h.baseAxes,Eh(p,!d||"cross",c)),d&&Mh(h.otherAxes,Eh(p,"cross",!1))}}function p(i,s,c){var d=c.model.getModel("axisPointer",r),h=d.get("show");if(h&&("auto"!==h||i||Bz(d))){null==s&&(s=d.get("triggerTooltip")),d=i?function(e,t,n,i,r,o){var a=t.getModel("axisPointer"),s={};Mh(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=vh(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&&bh(l,c.textStyle)}}return e.model.getModel("axisPointer",new rS(s,n,i))}(c,u,r,t,i,s):d;var p=d.get("snap"),f=d.get("triggerEmphasis"),g=jz(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:Bz(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(Fz(o[i+"AxisId"],n.id)||Fz(o[i+"AxisIndex"],n.componentIndex)||Fz(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)&&Mh(e.coordSysAxesInfo[jz(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 Fz(e,t){return"all"===e||Nh(e)&&wh(e,t)>=0||e===t}function Vz(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[jz(e)]}function Bz(e){return!!e.get(["handle","show"])}function jz(e){return e.type+"||"+e.id}var Gz={},Wz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.render=function(t,n,i,r){this.axisPointerClass&&function(e){var t=Vz(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=Bz(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=Vz(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&&Gz[e])throw new Error("axisPointer "+e+" exists");Gz[e]=t},t.getAxisPointerClass=function(e){return e&&Gz[e]},t.type="axis",t}(uD),Hz=my();function Uz(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=Hz(e).splitAreaColors,h=ip(),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=Nh(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 w_({anid:null!=C?"area_"+C:null,shape:{x:x,y:_,width:b,height:w},style:bh({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%c}Hz(e).splitAreaColors=h}}}function Yz(e){Hz(e).splitAreaColors=null}var Zz=["axisLine","axisTickLabel","axisName"],Xz=["splitArea","splitLine","minorSplitLine"],qz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return $d(t,e),t.prototype.render=function(t,n,i,r){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new gv,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=bz(a,t),l=new Ez(t,_h({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),i=0;i<n.length;i++)if($E(n[i].getOtherAxis(t.axis).scale))return!0;return!1}},s));Mh(Zz,l.add,l),this._axisGroup.add(l.getGroup()),Mh(Xz,function(e){t.get([e,"show"])&&$z[e](this,this._axisGroup,t,a)},this),r&&"changeAxisOrder"===r.type&&r.isInitSort||bC(o,this._axisGroup,t),e.prototype.render.call(this,t,n,i,r)}},t.prototype.remove=function(){Yz(this)},t.type="cartesianAxis",t}(Wz),$z={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=Nh(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 Aw({anid:null!=x?"line_"+x:null,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},style:bh({stroke:s[_]},m),silent:!0});gC(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 Aw({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});gC(g.shape,d.lineWidth),t.add(g)}},splitArea:function(e,t,n,i){Uz(e,t,n,i)}},Kz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="xAxis",t}(qz),Jz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=Kz.type,t}return $d(t,e),t.type="yAxis",t}(qz),Qz=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return $d(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new w_({shape:e.coordinateSystem.getRect(),style:bh({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(uD),eF={offset:0};function tF(e){e.registerComponentView(Qz),e.registerComponentModel(sz),e.registerCoordinateSystem("cartesian2d",Tz),fz(e,"x",lz,eF),fz(e,"y",lz,eF),e.registerComponentView(Kz),e.registerComponentView(Jz),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function nF(e){e.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var r=i.getIndicatorAxes();Mh(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]=iF(r)?r:rF(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 iF(e)})||rF(i);n[e].push(r.slice()),t.setItemLayout(e,n[e])})}})}function iF(e){return!isNaN(e[0])&&!isNaN(e[1])}function rF(e){return[e.cx,e.cy]}function oF(e){var t=e.polar;if(t){Nh(t)||(t=[t]);var n=[];Mh(t,function(t,i){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Nh(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}Mh(e.series,function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}var aF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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=Tk(e.getItemVisual(t,"symbolSize")),r=Mk(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]),AC[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 Th(e,function(e){return[i.cx,i.cy]})}o.diff(a).add(function(t){var n=o.getItemLayout(t);if(n){var i=new Mw,r=new Iw,a={shape:{points:n}};i.shape.points=u(n),r.shape.points=u(n),Jw(i,a,e,t),Jw(r,a,e,t);var s=new gv,c=new gv;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),iC(s),iC(r),Kw(r,c,e),Kw(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(bh(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:u})),Eb(i,n,"lineStyle"),Eb(a,n,"areaStyle");var c=n.getModel("areaStyle"),d=c.isEmpty()&&c.parentModel.isEmpty();a.ignore=d,Mh(["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(bh(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 g_){var i=e.style;e.useStyle(_h({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=vh(p);var r=o.getStore().get(o.getDimensionIndex(e.__dimIdx),t);(null==r||isNaN(r))&&(r=""),PC(e,OC(n),{labelFetcher:o.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:r,inheritColor:u,defaultOpacity:l.opacity})}),Ib(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}(pD),sF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return $d(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new QR(Ah(this.getData,this),Ah(this.getRawData,this))},t.prototype.getInitialData=function(e,t){return JR(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=XI(this,e);return VI("section",{header:a,sortBlocks:!0,blocks:Th(r,function(t){var n=i.get(i.mapDimension(t.dim),e);return VI("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(Th(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}(tD),lF=hz.value;function uF(e,t){return bh({show:t},e)}var cF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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=Th(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=bh({color:d.color},a));var p=yh(vh(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(Ph(l)){var f=p.name;p.name=l.replace("{value}",null!=f?f:"")}else Lh(l)&&(p.name=l(p.name,p));var g=new rS(p,null,this.ecModel);return Ch(g,JN.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:yh({lineStyle:{color:"#bbb"}},lF.axisLine),axisLabel:uF(lF.axisLabel,!1),axisTick:uF(lF.axisTick,!1),splitLine:uF(lF.splitLine,!0),splitArea:uF(lF.splitArea,!0),indicator:[]},t}(pM),dF=["axisLine","axisTickLabel","axisName"],hF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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;Mh(Th(t.getIndicatorAxes(),function(e){var n=e.model.get("showName")?e.name:"";return new Ez(e.model,{axisName:n,position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){Mh(dF,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=Nh(c)?c:[c],p=Nh(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 iw({shape:{cx:v,cy:y,r:m[x].coord}}));if(u&&x<m.length-1)g[I(g,p,x)].push(new ww({shape:{cx:v,cy:y,r0:m[x].coord,r:m[x+1].coord}}))}else{var _,b=Th(n,function(e,n){var i=e.getTicksCoords();return _=null==_?i.length-1:Math.min(i.length-1,_),Th(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 Iw({shape:{points:C}}));if(u&&w)g[I(g,p,x-1)].push(new Mw({shape:{points:C.concat(w)}}));w=C.slice().reverse()}}var M=a.getLineStyle(),T=s.getAreaStyle();Mh(g,function(e,t){this.group.add(pC(e,{style:bh({stroke:"none",fill:p[t%p.length]},T),silent:!0}))},this),Mh(f,function(e,t){this.group.add(pC(e,{style:bh({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}(uD),pF=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 $d(t,e),t}(CL),fF=function(){function e(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=Th(e.getIndicatorModels(),function(e,t){var n="indicator_"+t,i=new pF(n,new aN);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=Cv(n[0],i),this.cy=Cv(n[1],r),this.startAngle=e.get("startAngle")*Math.PI/180;var a=e.get("radius");(Ph(a)||Rh(a))&&(a=[0,a]),this.r0=Cv(a[0],o),this.r=Cv(a[1],o),Mh(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;Mh(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();Mh(n,function(e){e.scale.unionExtentFromData(o,o.mapDimension(e.dim))})}},this);var r=i.get("splitNumber"),o=new aN;o.setExtent(0,r),o.setInterval(1),Mh(n,function(e,t){Mz(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 gF(e){e.registerCoordinateSystem("radar",fF),e.registerComponentModel(cF),e.registerComponentView(hF),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 mF="\0_ec_interaction_mutex";function vF(e,t){return!!yF(e)[t]}function yF(e){return e[mF]||(e[mF]={})}tE({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},lp);var xF=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var i=Ah(n._mousedownHandler,n),r=Ah(n._mousemoveHandler,n),o=Ah(n._mouseupHandler,n),a=Ah(n._mousewheelHandler,n),s=Ah(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=bh(vh(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 $d(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(!$p(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&&wF("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!vF(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&&qp(e.event),bF(this,"pan","moveOnMouseMove",e,{dx:o,dy:a,oldX:i,oldY:r,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){$p(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=wF("zoomOnMouseWheel",e,this._opt),n=wF("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;_F(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);_F(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){vF(this._zr,"globalPan")||_F(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(kp);function _F(e,t,n,i,r){e.pointerChecker&&e.pointerChecker(i,r.originX,r.originY)&&(qp(i.event),bF(e,t,n,i,r))}function bF(e,t,n,i,r){r.isAvailableBehavior=Ah(wF,null,n,i),e.trigger(t,r)}function wF(e,t,n){var i=n[e];return!e||i&&(!Ph(i)||t.event[i+"Key"])}function CF(e,t,n){var i=e.target;i.x+=t,i.y+=n,i.dirty()}function SF(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 MF,TF={axisPointer:1,tooltip:1,brush:1};function IF(e,t,n){var i=t.getComponentByElement(e.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!TF.hasOwnProperty(i.mainType)&&r&&r.model!==n}function DF(e){Ph(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 kF={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"},AF=kh(kF),EF={"alignment-baseline":"textBaseline","stop-color":"stopColor"},NF=kh(EF),LF=function(){function e(){this._defs={},this._root=null}return e.prototype.parse=function(e,t){t=t||{};var n=DF(e);if("production"!==process.env.NODE_ENV&&!n)throw new Error("Illegal svg");this._defsUsePending=[];var i=new gv;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),VF(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=WF(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=XF(l,{x:0,y:0,width:a,height:s}),!t.ignoreViewBox)){var h=i;(i=new gv).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 w_({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=MF[s];if(u&&sp(MF,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=PF[s];if(h&&sp(PF,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 h_({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});zF(t,n),VF(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(MF={g:function(e,t){var n=new gv;return zF(t,n),VF(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new w_;return zF(t,n),VF(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 iw;return zF(t,n),VF(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 Aw;return zF(t,n),VF(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 ow;return zF(t,n),VF(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=FF(i));var r=new Mw({shape:{points:n||[]},silent:!0});return zF(t,r),VF(e,r,this._defsUsePending,!1,!1),r},polyline:function(e,t){var n,i=e.getAttribute("points");i&&(n=FF(i));var r=new Iw({shape:{points:n||[]},silent:!0});return zF(t,r),VF(e,r,this._defsUsePending,!1,!1),r},image:function(e,t){var n=new g_;return zF(t,n),VF(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 gv;return zF(t,a),VF(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 gv;return zF(t,a),VF(e,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(e,t){var n=ew(e.getAttribute("d")||"");return zF(t,n),VF(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),e}(),PF={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 Vw(t,n,i,r);return OF(e,o),RF(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 Bw(t,n,i);return OF(e,r),RF(e,r),r}};function OF(e,t){"userSpaceOnUse"===e.getAttribute("gradientUnits")&&(t.global=!0)}function RF(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={};ZF(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function zF(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),bh(t.__inheritedStyle,e.__inheritedStyle))}function FF(e){for(var t=WF(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 VF(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(HF,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=WF(a);switch(r=r||ef(),s){case"translate":of(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":sf(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":af(r,r,-parseFloat(l[0])*UF,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":rf(r,[1,0,Math.tan(parseFloat(l[0])*UF),1,0,0],r);break;case"skewY":rf(r,[1,Math.tan(parseFloat(l[0])*UF),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),ZF(e,a,s),i||function(e,t,n){for(var i=0;i<AF.length;i++){var r=AF[i];null!=(o=e.getAttribute(r))&&(t[kF[r]]=o)}for(i=0;i<NF.length;i++){var o;r=NF[i];null!=(o=e.getAttribute(r))&&(n[EF[r]]=o)}}(e,a,s)),o.style=o.style||{},null!=a.fill&&(o.style.fill=jF(o,"fill",a.fill,n)),null!=a.stroke&&(o.style.stroke=jF(o,"stroke",a.stroke,n)),Mh(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(e){null!=a[e]&&(o.style[e]=parseFloat(a[e]))}),Mh(["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=Th(WF(a.lineDash),function(e){return parseFloat(e)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(o.invisible=!0),"none"===a.display&&(o.ignore=!0)}var BF=/^url\(\s*#(.*?)\)/;function jF(e,t,n,i){var r=n&&n.match(BF);if(!r)return"none"===n&&(n=null),n;var o=$h(r[1]);i.push([e,t,o])}var GF=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function WF(e){return e.match(GF)||[]}var HF=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,UF=Math.PI/180;var YF=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ZF(e,t,n){var i,r=e.getAttribute("style");if(r)for(YF.lastIndex=0;null!=(i=YF.exec(r));){var o=i[1],a=sp(kF,o)?kF[o]:null;a&&(t[a]=i[2]);var s=sp(EF,o)?EF[o]:null;s&&(n[s]=i[2])}}function XF(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 qF=ip(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),$F=function(){function e(e,t){this.type="geoSVG",this._usedGraphicMap=ip(),this._freedGraphics=[],this._mapName=e,this._parsedXML=DF(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=ip();return Mh(e,function(e){if(null==e.namedFrom){var i=new lL(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{qh(null!=(n=(t=e&&(i=e,r={ignoreViewBox:!0,ignoreRootClip:!0},(new LF).parse(i,r))||{}).root))}catch(v){throw new Error("Invalid svg format\n"+v.message)}var o=new gv;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 yf(c,d,h,p)}if(l){var g=XF(l,u);n.scaleX=n.scaleY=g.scale,n.x=g.x,n.y=g.y}o.setClipPath(new w_({shape:u.plain()}));var m=[];return Mh(t.named,function(e){var t;null!=qF.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 KF=[126,25],JF="南海诸岛",QF=[[[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]]],eV=0;eV<QF.length;eV++)for(var tV=0;tV<QF[eV].length;tV++)QF[eV][tV][0]/=10.5,QF[eV][tV][1]/=-14,QF[eV][tV][0]+=KF[0],QF[eV][tV][1]+=KF[1];var nV={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var iV=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var rV=function(){function e(e,t,n){var i;this.type="geoJSON",this._parsedMap=ip(),this._mapName=e,this._specialAreas=n,this._geoJSON=Ph(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:oV(i)})}var r=ip(),o=[];return Mh(n.regions,function(t){var n=t.name;e&&sp(e,n)&&(t=t.cloneShallow(n=e[n])),o.push(t),r.set(n,t)}),{regions:o,boundingRect:n.boundingRect||new yf(0,0,0,0),regionsMap:r}},e.prototype._parseToRegions=function(e){var t,n=this._mapName,i=this._geoJSON;try{t=i?dL(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===JF)return;t.push(new sL(JF,Th(QF,function(e){return{type:"polygon",exterior:e}}),KF))}}(n,t),Mh(t,function(e){var t=e.name;!function(e,t){if("china"===e){var n=nV[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:iV[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 oV(e){for(var t,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return t}var aV=ip();const sV=function(e,t,n){if(t.svg){var i=new $F(e,t.svg);aV.set(e,i)}else{var r=t.geoJson||t.geoJSON;r&&!t.features?n=t.specialAreas:r=t;i=new rV(e,r,n);aV.set(e,i)}},lV=function(e){return aV.get(e)},uV=function(e){var t=aV.get(e);return t&&"geoJSON"===t.type&&t.getMapForUser()},cV=function(e,t,n){var i=aV.get(e);if(i)return i.load(t,n);process.env.NODE_ENV};var dV=["rect","circle","line","ellipse","polygon","polyline","path"],hV=ip(dV),pV=ip(dV.concat(["g"])),fV=ip(dV.concat(["g"])),gV=my();function mV(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function vV(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var yV=function(){function e(e){var t=new gv;this.uid=aS("ec_map_draw"),this._controller=new xF(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new gv),t.add(this._svgGroup=new gv)}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()):Kw(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=ip(),n=ip(),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(),Mh(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 gv),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=[];Mh(r.geometries,function(e){if("polygon"===e.type){var t=[e.exterior].concat(e.interiors||[]);l&&(t=SV(t,l)),Mh(t,function(e){v.push(new Mw(d(e)))})}else{var n=e.points;l&&(n=SV(n,l,!0)),Mh(n,function(e){y.push(new Iw(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),xV(e,i,f,g),_V(e,i,c,g,o,f,x),n&&(vV(i),Mh(i.states,vV))}}_(v),_(y,!0)}),t.each(function(t,i){var r=n.get(i),a=r.dataIdx,s=r.regionModel;bV(e,t,i,s,o,a),wV(e,t,i,s,o),CV(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=ip(),r=!1;Mh(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!=hV.get(s)&&l instanceof ax&&xV(e,l,u,c),l instanceof ax&&(l.culling=!0);var d=c.get("silent",!0);(null!=d&&(l.silent=d),l.z2EmphasisLift=0,t.namedFrom)||(null!=fV.get(s)&&_V(e,l,n,c,o,u,null),bV(e,l,n,c,o,u),wV(e,l,n,c,o),null!=pV.get(s)&&("self"===CV(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){cb(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=lV(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=lV(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,CF(o,e.dx,e.dy),n.dispatchAction(_h(s(),{dx:e.dx,dy:e.dy,animation:{duration:0}}))},this),r.off("zoom").on("zoom",function(e){this._mouseDownFlag=!1,SF(o,e.scale,e.originX,e.originY),n.dispatchAction(_h(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])&&!IF(t,n,e)})},e.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=gV(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 xV(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=mV(r),u=mV(o),c=mV(s),d=mV(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=Jk(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,cb(t)}function _V(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;PC(t,OC(i),{labelFetcher:h,labelDataIndex:d,defaultText:n},p);var f=t.getTextContent();if(f&&(gV(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 bV(e,t,n,i,r,o){e.data?e.data.setItemGraphicEl(o,t):F_(t).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function wV(e,t,n,i,r){e.data||IC({el:t,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function CV(e,t,n,i,r){t.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return Ib(t,a,o.get("blurScope"),o.get("disabled")),e.isGeo&&function(e,t,n){var i=F_(e);i.componentMainType=t.mainType,i.componentIndex=t.componentIndex,i.componentHighDownName=n}(t,r,n),a}function SV(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(),Mh(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 MV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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 yV(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 iw({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);PC(l,OC(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){lb(l,e)}}r.add(l)}}})},t.type="map",t}(pD),TV=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 $d(t,e),t.prototype.getInitialData=function(e){for(var t=JR(this,{coordDimensions:["value"],encodeDefaulter:Eh(EM,this)}),n=ip(),i=[],r=0,o=t.count();r<o;r++){var a=t.getName(r);n.set(a,r)}return Mh(cV(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&&yh(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 VI("section",{header:s.join(", "),noHeader:!s.length,blocks:[VI("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=Mk(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}(tD);function IV(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)}),Mh(t,function(e,t){for(var n,i,r,o=(n=Th(e,function(e){return e.getData()}),i=e[0].get("mapValueCalculation"),r={},Mh(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 DV(e){var t={};e.eachSeriesByType("map",function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!t[i]){var r={};Mh(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 kV=Sp,AV=function(e){function t(t){var n=e.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new Zm,n._rawTransformable=new Zm,n.name=t,n}return $d(t,e),t.prototype.setBoundingRect=function(e,t,n,i){return this._rect=new yf(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 yf(e,t,n,i)},t.prototype._transformTo=function(e,t,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new yf(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=[Cv(e[0],t.getWidth()),Cv(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=Sp([],i,e),n=Sp([],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(),nf(this.transform||(this.transform=[]),t.transform||[1,0,0,1,0,0]),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],lf(this.invTransform,this.transform),this.decomposeTransform()},t.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,n=new Zm;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?kV(n,e,i):dp(n,e)},t.prototype.pointToData=function(e){var t=this.invTransform;return t?kV([],e,t):[e[0],e[1]]},t.prototype.convertToPixel=function(e,t,n){var i=EV(t);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var i=EV(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}(Zm);function EV(e){var t=e.seriesModel;return t?t.coordinateSystem:null}var NV={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},LV=["lng","lat"],PV=function(e){function t(t,n,i){var r=e.call(this,t)||this;r.dimensions=LV,r.type="geo",r._nameCoordMap=ip(),r.map=n;var o,a=i.projection,s=cV(n,i.nameMap,i.nameProperty),l=lV(n),u=r.resourceType=l?l.type:null,c=r.regions=s.regions,d=NV[l.type];if(r._regionsMap=s.regionsMap,r.regions=s.regions,"production"!==process.env.NODE_ENV&&a&&("geoSVG"===u&&("production"!==process.env.NODE_ENV&&Zv("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&&Zv("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:Uh(i.aspectScale,d.aspectScale),r._invertLongitute=!a&&d.invertLongitute,r}return $d(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 yf(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(Ph(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=OV(t);return i===this?i.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var i=OV(t);return i===this?i.pointToData(n):null},t}(AV);function OV(e){var t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents("geo",_y).models[0]||{}).coordinateSystem:null}function RV(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]);Mp(i,i,d),Tp(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=[Cv(g[0],v),Cv(g[1],y)],h=Cv(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=aM(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"))}Ch(PV,AV);var zV=function(){function e(){this.dimensions=LV}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 PV(o+r,o,_h({nameMap:e.get("nameMap")},i(e)));a.zoomLimit=e.get("scaleLimit"),n.push(a),e.coordinateSystem=a,a.model=e,a.resize=RV,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)}}),Mh(r,function(e,r){var o=Th(e,function(e){return e.get("nameMap")}),a=new PV(r,r,_h({nameMap:xh(o)},i(e[0])));a.zoomLimit=Hh.apply(null,Th(e,function(e){return e.get("scaleLimit")})),n.push(a),a.resize=RV,a.resize(e[0],t),Mh(e,function(e){e.coordinateSystem=a,function(e,t){Mh(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=ip(),a=0;a<r.length;a++)o.set(r[a].name,r[a]);return Mh(cV(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&&yh(n,i)}),r},e}(),FV=new zV,VV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(e,t,n){var i=lV(e.map);if(i&&"geoJSON"===i.type){var r=e.itemStyle=e.itemStyle||{};"color"in r||(r.color="#eee")}this.mergeDefaultAndTheme(e,n),iy(e,"label",["show"])},t.prototype.optionUpdated=function(){var e=this,t=this.option;t.regions=FV.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var n={};this._optionModelMap=Ih(t.regions||[],function(t,i){var r=i.name;return r&&(t.set(r,new rS(i,e,e.ecModel)),i.selected&&(n[r]=!0)),t},ip()),t.selectedMap||(t.selectedMap=n)},t.prototype.getRegionModel=function(e){return this._optionModelMap.get(e)||new rS(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 Lh(i)?(r.status=t,i(r)):Ph(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}(pM);function BV(e,t){return e.pointToProjected?e.pointToProjected(t):e.pointToData(t)}function jV(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(BV(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(BV(e,s),i),e.setZoom(a*r)}return{center:e.getCenter(),zoom:e.getZoom()}}var GV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.focusBlurEnabled=!0,n}return $d(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 yV(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;pk(e.target,function(e){return null!=(t=F_(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=F_(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}(uD);function WV(e,t,n){sV(e,t,n)}function HV(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),Mh(n.coordinateSystem.regions,function(e){i[e.name]=n.isSelected(e.name)||!1});var o=[];Mh(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",FV),e.registerComponentModel(VV),e.registerComponentView(GV),e.registerImpl("registerMap",WV),e.registerImpl("getMap",function(e){return uV(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=jV(r,e,t.get("scaleLimit"),n);t.setCenter&&t.setCenter(o.center),t.setZoom&&t.setZoom(o.zoom),"series"===i&&Mh(t.seriesGroup,function(e){e.setCenter(o.center),e.setZoom(o.zoom)})}})})}function UV(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=qV(s),o=$V(o),s&&o;){r=qV(r),a=$V(a),r.hierNode.ancestor=e;var h=s.hierNode.prelim+d-o.hierNode.prelim-u+i(s,o);h>0&&(JV(KV(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&&!qV(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=d-l),o&&!$V(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-c,n=e)}return n}(e,r,e.parentNode.hierNode.defaultAncestor||i[0],t)}function YV(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function ZV(e){return arguments.length?e:QV}function XV(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function qV(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function $V(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function KV(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function JV(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 QV(e,t){return e.parentNode===t.parentNode?1:2}var eB=function(){return function(){this.parentPoint=[],this.childPoints=[]}}(),tB=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new eB},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=Cv(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}(c_),nB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._mainGroup=new gv,n}return $d(t,e),t.prototype.init=function(e,t){this._controller=new xF(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){iB(i,t)&&rB(i,t,null,o,e)}).update(function(t,n){var r=a.getItemGraphicEl(n);iB(i,t)?rB(i,t,r,o,e):r&&sB(a,n,r,o,e)}).remove(function(t){var n=a.getItemGraphicEl(t);n&&sB(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=[];vx(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 AV;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)&&!IF(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){CF(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){SF(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}(pD);function iB(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function rB(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 EO(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,Kw(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?rp(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;k&&(F_(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 Pw({shape:lB(c,d,h,r,r)})),Kw(g,{shape:lB(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 tB({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:d,forkPosition:p}})),Kw(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(bh({strokeNoScale:!0,fill:null},f)),Eb(g,l,"lineStyle"),cb(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||lb(n.__edge,t)}})}function oB(e,t,n,i,r){var o=aB(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?eC(c,{shape:lB(h,p,f,s,s),style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:r}):"polyline"===d&&"orthogonal"===i.get("layout")&&eC(c,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},i,{cb:function(){n.remove(c)},removeOpt:r}))}}function aB(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 sB(e,t,n,i,r){var o=e.tree.getNodeByDataIndex(t),a=aB(e.tree.root,o).sourceLayout,s={duration:r.get("animationDurationUpdate"),easing:r.get("animationEasingUpdate")};eC(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){oB(t,e,i,r,s)}),oB(o,e,i,r,s)}function lB(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=XV(u,d),f=XV(u,d+(h-d)*n),g=XV(c,h+(d-h)*n),m=XV(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 uB=my();function cB(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,mB(t,n,e),Mh(n,function(n){Mh(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Eh(dB,e))})}),t.wrapMethod("cloneShallow",Eh(pB,e)),Mh(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Eh(hB,e))}),qh(n[t.dataType]===t)}function dB(e,t){if(uB(i=this).mainData===i){var n=_h({},uB(this).datas);n[this.dataType]=t,mB(t,n,e)}else vB(t,this.dataType,uB(this).mainData,e);var i;return t}function hB(e,t){return e.struct&&e.struct.update(),t}function pB(e,t){return Mh(uB(t).datas,function(n,i){n!==t&&vB(n.cloneShallow(),i,t,e)}),t}function fB(e){var t=uB(this).mainData;return null==e||null==t?t:uB(t).datas[e]}function gB(){var e=uB(this).mainData;return null==e?[{data:e}]:Th(kh(uB(e).datas),function(t){return{type:t,data:uB(e).datas[t]}})}function mB(e,t,n){uB(e).datas={},Mh(t,function(t,i){vB(t,i,e,n)})}function vB(e,t,n,i){uB(n).datas[t]=e,uB(e).mainData=n,e.dataType=t,i.struct&&(e[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=e),e.getLinkedData=fB,e.getLinkedDataAll=gB}var yB=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){Lh(e)&&(n=t,t=e,e=null),Ph(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}(),xB=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,Nh(i)?i.length:1),o.push(t);var s=new yB(cy(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 RE(s,n);return l.initData(o),i&&i(l),cB({mainData:l,struct:r,structAttr:"tree"}),r.update(),r},e}();function _B(e,t,n){if(e&&wh(t,e.type)>=0){var i=n.getData().tree.root,r=e.targetNode;if(Ph(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 bB(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function wB(e,t){return wh(bB(e),t)>=0}function CB(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 SB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return $d(t,e),t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new rS(n,this,this.ecModel),r=xB.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 VI("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=CB(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}(tD);function MB(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 TB(e,t){e.eachSeriesByType("tree",function(e){!function(e,t){var n=function(e,t){return aM(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=ZV(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(r=n.width,o=n.height,a=ZV());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,UV,a),s.hierNode.modifier=-l.hierNode.prelim,MB(l,YV);var u=l,c=l,d=l;MB(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),MB(l,function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=XV(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),MB(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),MB(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 IB(e){e.eachSeriesByType("tree",function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel("itemStyle").getItemStyle();_h(t.ensureUniqueItemVisual(e.dataIndex,"style"),n)})})}var DB=["treemapZoomToNode","treemapRender","treemapMove"];function kB(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var i=t;i&&i.depth>1;)i=i.parentNode;var r=GM(e.ecModel,i.name||i.dataIndex+"",n);t.setVisual("decal",r)})}var AB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return $d(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};EB(n);var i=e.levels||[],r=this.designatedVisualItemStyle={},o=new rS({itemStyle:r},this,t);i=e.levels=function(e,t){var n,i,r=ny(t.get("color")),o=ny(t.get(["aria","decal","decals"]));if(!r)return;e=e||[],Mh(e,function(e){var t=new rS(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=Th(i||[],function(e){return new rS(e,o,t)},this),s=xB.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 VI("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=CB(i,this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},_h(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=ip(),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(){kB(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}(tD);function EB(e){var t=0;Mh(e.children,function(e){EB(e);var n=e.value;Nh(n)&&(n=n[0]),t+=n});var n=e.value;Nh(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Nh(e.value)?e.value[0]=n:e.value=n}var NB=function(){function e(e){this.group=new gv,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),sM(o,c.pos,c.box)}},e.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var r=cy(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=Cv(s.left,c),p=Cv(s.top,d),f=Cv(s.right,c),g=Cv(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=XS(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 Mw({shape:{points:LB(m,0,T,y,C===b.length-1,0===C)},style:bh(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new M_({style:RC(r,{text:I})}),textConfig:{position:"inside"},z2:1e5,onclick:Eh(a,M)});D.disableLabelAnimation=!0,D.getTextContent().ensureState("emphasis").style=RC(o,{text:I}),D.ensureState("emphasis").style=w,Ib(D,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(D),PB(D,e,M),m+=T+8}},e.prototype.remove=function(){this.group.removeAll()},e}();function LB(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 PB(e,t,n){F_(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&&CB(n,t)}}var OB=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 RB=gv,zB=w_,FB="label",VB="upperLabel",BB=Oy([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),jB=function(e){var t=BB(e);return t.stroke=t.fill=t.lineWidth=null,t},GB=my(),WB=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 $d(t,e),t.prototype.render=function(e,t,n,i){if(!(wh(t.findComponents({mainType:"series",subType:"treemap",query:i}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var r=_B(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 RB,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",RB);if(!I)return;if(l.add(I),I.x=c.x||0,I.y=c.y||0,I.markRedraw(),GB(I).nodeWidth=p,GB(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)Lb(I)&&Nb(I,!1),D&&(Nb(D,!N),d.setItemGraphicEl(a.dataIndex,D),Db(D,L,E));else{var P=j("content",zB,u,30);P&&z(I,P),D.disableMorphing=!0,D&&Lb(D)&&Nb(D,!1),Nb(I,!N),d.setItemGraphicEl(a.dataIndex,I);var O=h.getShallow("cursor");O&&P.attr("cursor",O),Db(I,L,E)}return I;function R(t,n,i){var r=F_(n);if(r.dataIndex=a.dataIndex,r.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:f,r:T}),m)F(n);else{n.invisible=!1;var o=a.getVisual("style"),s=o.stroke,l=jB(w);l.fill=s;var u=BB(C);u.fill=C.get("borderColor");var c=BB(S);c.fill=S.get("borderColor");var d=BB(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,cb(n)}t.add(n)}function z(t,n){var i=F_(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)F(n);else{n.invisible=!1;var s=a.getVisual("style"),l=s.fill,u=jB(w);u.fill=l,u.decal=s.decal;var c=BB(C),d=BB(S),h=BB(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,cb(n)}t.add(n)}function F(e){!e.invisible&&o.push(e)}function V(t,n,i,r){var o=h.getModel(r?VB:FB),s=cy(h.get("name"),null),l=o.getShallow("show");PC(t,OC(h,r?VB:FB),{defaultText:l?s:null,inheritColor:n,defaultOpacity:i,labelFetcher:e,labelDataIndex:a.dataIndex});var u=t.getTextContent();if(u){var d=u.style,p=Xh(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 ax&&(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 RB?(n.oldX=t.x,n.oldY=t.y):n.oldShape=_h({},t.shape)}function W(e,t){var n=e[v]={},o=a.parentNode,s=t instanceof gv;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,Mh(t,function(e,t){!e.isRemoved()&&s(t,t)})):new hE(n,t,a,a).add(s).update(s).remove(Eh(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)&&Mh(c,function(e,t){var n=d[t];Mh(e,function(e){e&&(n.push(e),GB(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(){Mh(h,function(e){Mh(e,function(e){e.parent&&e.parent.remove(e)})}),Mh(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=(Lh(r)?0:r)||0,s=(Lh(o)?null:o)||"cubicOut",l=new OB;Mh(t.willDeleteEls,function(e,t){Mh(e,function(e,n){if(!e.invisible){var r,o=e.parent,u=GB(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)}})}),Mh(this._storage,function(e,n){Mh(e,function(e,i){var r=t.lastsForAnimation[n][i],o={};r&&(e instanceof gv?null!=r.oldX&&(o.x=e.x,o.y=e.y,e.x=r.oldX,e.y=r.oldY):(r.oldShape&&(o.shape=_h({},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(Ah(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 xF(e.getZr())).enable(this.seriesModel.get("roam")),n.zoomLimit=this.seriesModel.get("scaleLimit"),n.zoom=this.seriesModel.get("zoom"),t.on("pan",Ah(this._onPan,this)),t.on("zoom",Ah(this._onZoom,this)));var i=new yf(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 yf(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];of(f,f,[-(t-=p.x),-(n-=p.y)]),sf(f,f,[h,h]),of(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&&eM(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 NB(this.group))).render(e,t,n.node,function(t){"animating"!==i._state&&(wB(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}(pD);var HB=Mh,UB=zh,YB=-1,ZB=function(){function e(t){var n=t.mappingMethod,i=t.type,r=this.option=vh(t);this.type=i,this.mappingMethod=n,this._normalizeData=ij[n];var o=e.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(XB(r),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,Mh(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(HB(t,function(e,t){n[e]=t}),!Nh(i)){var r=[];zh(i)?HB(i,function(e,t){var i=n[t];r[null!=i?i:YB]=e}):r[-1]=i,i=nj(e,r)}for(var o=t.length-1;o>=0;o--)null==i[o]&&(delete n[t[o]],t.pop())}(r):XB(r,!0):(qh("linear"!==n||r.dataExtent),XB(r))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return Ah(this._normalizeData,this)},e.listVisualTypes=function(){return kh(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){zh(e)?Mh(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,i){var r,o=Nh(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&&HB(e.visualHandlers,function(e,r){t.hasOwnProperty(r)&&(i[r]=t[r],n=!0)}),n?i:null},e.prepareVisualTypes=function(e){if(Nh(e))e=e.slice();else{if(!UB(e))return[];var t=[];HB(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||Ph(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(rj(c[1],e,u[1]))return o}else if(u[1]===1/0){if(rj(c[0],u[0],e))return o}else if(rj(c[0],u[0],e)&&rj(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:KB("color"),getColorMapper:function(){var e=this.option;return Ah("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),JB.call(this,e)}:function(t,n,i){var r=!!i;return!n&&(t=this._normalizeData(t)),i=Ng(t,e.parsedVisual,i),r?i:Og(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return Og(Ng(e,this.option.parsedVisual),"rgba")},category:JB,piecewise:function(e,t){var n=tj.call(this,t);return null==n&&(n=Og(Ng(e,this.option.parsedVisual),"rgba")),n},fixed:QB}},colorHue:qB(function(e,t){return Lg(e,t)}),colorSaturation:qB(function(e,t){return Lg(e,null,t)}),colorLightness:qB(function(e,t){return Lg(e,null,null,t)}),colorAlpha:qB(function(e,t){return Pg(e,t)}),decal:{applyVisual:KB("decal"),_normalizedToVisual:{linear:null,category:JB,piecewise:null,fixed:null}},opacity:{applyVisual:KB("opacity"),_normalizedToVisual:ej([0,1])},liftZ:{applyVisual:KB("liftZ"),_normalizedToVisual:{linear:QB,category:QB,piecewise:QB,fixed:QB}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:$B,category:JB,piecewise:function(e,t){var n=tj.call(this,t);return null==n&&(n=$B.call(this,e)),n},fixed:QB}},symbolSize:{applyVisual:KB("symbolSize"),_normalizedToVisual:ej([0,1])}},e}();function XB(e,t){var n=e.visual,i=[];zh(n)?HB(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]),nj(e,i)}function qB(e){return{applyVisual:function(t,n,i){var r=this.mapValueToVisual(t);i("color",e(n("color"),r))},_normalizedToVisual:ej([0,1])}}function $B(e){var t=this.option.visual;return t[Math.round(wv(e,[0,1],[0,t.length-1],!0))]||{}}function KB(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function JB(e){var t=this.option.visual;return t[this.option.loop&&e!==YB?e%t.length:e]}function QB(){return this.option.visual[0]}function ej(e){return{linear:function(t){return wv(t,e,this.option.visual,!0)},category:JB,piecewise:function(t,n){var i=tj.call(this,n);return null==i&&(i=wv(t,e,this.option.visual,!0)),i},fixed:QB}}function tj(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=n[ZB.findPieceIndex(e,n)];if(i&&i.visual)return i.visual[this.type]}}function nj(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Th(t,function(e){var t=kg(e);return t||"production"===process.env.NODE_ENV||Zv("'"+e+"' is an illegal color, fallback to '#000000'",!0),t||[0,0,0,1]})),t}var ij={linear:function(e){return wv(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=ZB.findPieceIndex(e,t,!0);if(null!=n)return wv(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?YB:t},fixed:lp};function rj(e,t,n){return e?t<=n:t<n}var oj=my();const aj={seriesType:"treemap",reset:function(e){var t=e.getData().tree.root;t.isRemoved()||sj(t,{},e.getViewRoot().getAncestors(),e)}};function sj(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=_h({},t),r=n.designatedVisualItemStyle;return Mh(["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?Lg(t,null,null,e):null}(h,s=lj(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=cj(t,"color")||null!=r.color&&"none"!==r.color&&(cj(t,"colorAlpha")||cj(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 ZB(d);return oj(h).drColorMappingBy=c,h}(0,r,o,0,u,p);Mh(p,function(e,t){if(e.depth>=n.length||e===n[e.depth]){var o=function(e,t,n,i,r,o){var a=_h({},t);if(r){var s=r.type,l="color"===s&&oj(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);sj(e,o,n,i)}})}else s=lj(u),c.fill=s}}function lj(e){var t=uj(e,"color");if(t){var n=uj(e,"colorAlpha"),i=uj(e,"colorSaturation");return i&&(t=Lg(t,null,null,i)),n&&(t=Pg(t,n)),t}}function uj(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function cj(e,t){var n=e.get(t);return Nh(n)&&n.length?{name:t,range:n}:null}var dj=Math.max,hj=Math.min,pj=Hh,fj=Mh,gj=["itemStyle","borderWidth"],mj=["itemStyle","gapWidth"],vj=["upperLabel","show"],yj=["upperLabel","height"];const xj={seriesType:"treemap",reset:function(e,t,n,i){var r=n.getWidth(),o=n.getHeight(),a=e.option,s=aM(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Cv(pj(s.width,l[0]),r),c=Cv(pj(s.height,l[1]),o),d=i&&i.type,h=_B(i,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===d||"treemapMove"===d?i.rootRect:null,f=e.getViewRoot(),g=bB(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(gj);(u+=4*m*m+(3*m+Math.max(m,Sj(g)))*Math.pow(u,.5))>Av&&(u=Av),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),_j(f,y,!1,0),x=f.getLayout(),fj(g,function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(_h({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),Cj(_,new yf(-s.x,-s.y,r,o),g,f,0)}};function _j(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(gj),u=s.get(mj)/2,c=Sj(s),d=Math.max(l,c),h=l-u,p=d-u;e.setLayout({borderWidth:l,upperHeight:d,upperLabelHeight:c},!0);var f=(r=dj(r-2*h,0))*(o=dj(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=Dh(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],fj(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=hj(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=bj(x,v,t.squareRatio);C<=y?(_++,y=C):(x.area-=x.pop().getLayout().area,wj(x,v,m,u,!1),v=hj(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&wj(x,v,m,u,!0),!n){var S=s.get("childrenVisibleMin");null!=S&&f<S&&(n=!0)}for(_=0,b=g.length;_<b;_++)_j(g[_],t,n,i+1)}}}function bj(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?dj(u*i/l,l/(u*r)):1/0}function wj(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]]=dj(c-2*i,0),v=n[s[o]]+n[l[o]]-u,y=d===h-1||v<g?v:g,x=f[l[o]]=dj(y-2*i,0);f[s[a]]=n[s[a]]+hj(i,m/2),f[s[o]]=u+hj(i,x/2),u+=y,p.setLayout(f,!0)}n[s[a]]+=c,n[l[a]]-=c}function Cj(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 yf(t.x-o.x,t.y-o.y,t.width,t.height);fj(e.viewChildren||[],function(e){Cj(e,l,n,i,r+1)})}}function Sj(e){return e.get(vj)?e.get(yj):0}function Mj(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){Rh(n)&&(n=r[n]);for(var o=0;o<t.length;o++)if(!t[o].isSelected(n))return!1}return!0})})}function Tj(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){Ph(t)&&(t=r["ec-"+t]);var o=n.getItemVisual(t,"style");_h(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 Ij(e){return e instanceof Array||(e=[e,e]),e}function Dj(e){e.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),i=Ij(e.get("edgeSymbol")),r=Ij(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=Ij(i.getShallow("symbol",!0)),a=Ij(i.getShallow("symbolSize",!0)),s=i.getModel("lineStyle").getLineStyle(),l=n.ensureUniqueItemVisual(e,"style");switch(_h(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 kj="--\x3e",Aj=function(e){return e.get("autoCurveness")||null},Ej=function(e,t){var n=Aj(e),i=20,r=[];if(Rh(n))i=n;else if(Nh(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},Nj=function(e,t,n){var i=[e.id,e.dataIndex].join("."),r=[t.id,t.dataIndex].join(".");return[n.uid,i,r].join(kj)},Lj=function(e){var t=e.split(kj);return[t[0],t[2],t[1]].join(kj)},Pj=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function Oj(e,t,n,i){var r=Aj(t),o=Nh(r);if(!r)return null;var a=function(e,t){var n=Nj(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 Pj(Nj(e.node1,e.node2,t),t)+Pj(Nj(e.node2,e.node1,t),t)}(e,t);Ej(t,u),e.lineStyle=e.lineStyle||{};var c=Nj(e.node1,e.node2,t),d=t.__curvenessList,h=o||u%2?0:1;if(a.isForward)return d[h+s];var p=Lj(c),f=Pj(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 Rj(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=Yh(e.getModel().get(["lineStyle","curveness"]),-Oj(e,t,n,!0),0),r=hp(e.node1.getLayout()),o=hp(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 Fj(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=[];Mh(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||Rj(e)})}function Vj(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 Bj(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var jj=Math.PI,Gj=[];function Wj(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];xp(g,g),yp(g,g,c),n.setLayout([l+g[0],u+g[1]],!0),Uj(n,e.get(["circular","rotateLabel"]),l,u)}Hj[t](e,s,a,c,l,u,d),s.eachEdge(function(t,n){var i,r=Yh(t.getModel().get(["lineStyle","curveness"]),Oj(t,e,n),0),o=hp(t.node1.getLayout()),a=hp(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 Hj={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;Gj.length=a;var l=Vj(e);t.eachNode(function(e){var t=Bj(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=l;var n=Math.asin(t/2/i);isNaN(n)&&(n=jj/2),Gj[e.dataIndex]=n,s+=2*n});var u=(2*jj-s)/a/2,c=0;t.eachNode(function(e){var t=u+Gj[e.dataIndex];c+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([i*Math.cos(c)+r,i*Math.sin(c)+o]),c+=t})}};function Uj(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");_h(d.textConfig||(d.textConfig={}),{position:c})}else a.setTextConfig({rotation:o*=Math.PI/180})}}function Yj(e){e.eachSeriesByType("graph",function(e){"circular"===e.get("layout")&&Wj(e,"symbolSize")})}var Zj=gp;function Xj(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&&Wj(e,"value"):Rj(e);var l=r.getDataExtent("value"),u=o.getDataExtent("value"),c=a.get("repulsion"),d=a.get("edgeLength"),h=Nh(c)?c:[c,c],p=Nh(d)?d:[d,d];p=[p[1],p[0]];var f=r.mapArray("value",function(e,t){var n=r.getItemLayout(t),i=wv(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=wv(t,u,p);isNaN(o)&&(o=(p[0]+p[1])/2);var a=r.getModel(),s=Yh(r.getModel().get(["lineStyle","curveness"]),-Oj(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=cp(a*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),d.pp=hp(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;mp(t,(m=a.n2).p,s.p);var c=vp(t)-a.d,d=m.w/(s.w+m.w);isNaN(d)&&(d=0),xp(t,t),!s.fixed&&Zj(s.p,s.p,t,d*c*g),!m.fixed&&Zj(m.p,m.p,t,-(1-d)*c*g)}}for(o=0;o<n;o++)(x=i[o]).fixed||(mp(t,l,x.p),Zj(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;mp(t,(m=i[f]).p,s.p),0===(c=vp(t))&&(pp(t,Math.random()-.5,Math.random()-.5),c=1);var v=(s.rep+m.rep)/c/c;!s.fixed&&Zj(s.pp,s.pp,t,v),!m.fixed&&Zj(m.pp,m.pp,t,-v)}}var y=[];for(o=0;o<n;o++){var x;(x=i[o]).fixed||(mp(y,x.p,x.pp),Zj(x.p,x.p,y,g),dp(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&&dp(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]||[],dp(h[0],c),dp(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 qj(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=[];vx(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 aM(_h(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 AV;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 $j=Aw.prototype,Kj=Pw.prototype,Jj=function(){return function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}}();function Qj(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}$d(t,e)}(Jj);var eG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return $d(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new Jj},t.prototype.buildPath=function(e,t){Qj(t)?$j.buildPath.call(this,e,t):Kj.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return Qj(this.shape)?$j.pointAt.call(this,e):Kj.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=Qj(t)?[t.x2-t.x1,t.y2-t.y1]:Kj.tangentAt.call(this,e);return xp(n,n)},t}(c_),tG=["fromSymbol","toSymbol"];function nG(e){return"_"+e+"Type"}function iG(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=Tk(r);return i+l+Ik(a||0,l)+(o||"")+(s||"")}function rG(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=Tk(r),u=Ik(a||0,l),c=Mk(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 oG(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 aG=function(e){function t(t,n,i){var r=e.call(this)||this;return r._createLine(t,n,i),r}return $d(t,e),t.prototype._createLine=function(e,t,n){var i=e.hostModel,r=function(e){var t=new eG({name:"line",subPixelOptimize:!0});return oG(t.shape,e),t}(e.getItemLayout(t));r.shape.percent=0,Jw(r,{shape:{percent:1}},i,t),this.add(r),Mh(tG,function(n){var i=rG(n,e,t);this.add(i),this[nG(n)]=iG(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:{}};oG(a.shape,o),Kw(r,a,i,t),Mh(tG,function(n){var i=iG(n,e,t),r=nG(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=rG(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=OC(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,Mh(tG,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<H_.length;n++){var i=H_[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);PC(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)?Sv(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");Nh(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),Ib(this,c,d,u)},t.prototype.highlight=function(){pb(this)},t.prototype.downplay=function(){fb(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");oG(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=mp([],u,l);if(xp(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}(gv),sG=function(){function e(e){this.group=new gv,this._LineCtor=e||aG}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=lG(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=lG(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(cG(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){kC(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(cG(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);cG(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 lG(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:OC(t)}}function uG(e){return isNaN(e[0])||isNaN(e[1])}function cG(e){return e&&!uG(e[0])&&!uG(e[1])}var dG=[],hG=[],pG=[],fG=og,gG=wp,mG=Math.abs;function vG(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){dG[0]=fG(r[0],o[0],a[0],c),dG[1]=fG(r[1],o[1],a[1],c),(p=mG(gG(dG,t)-l))<s&&(s=p,i=c)}for(var d=0;d<32;d++){var h=i+u;hG[0]=fG(r[0],o[0],a[0],i),hG[1]=fG(r[1],o[1],a[1],i),pG[0]=fG(r[0],o[0],a[0],h),pG[1]=fG(r[1],o[1],a[1],h);var p=gG(hG,t)-l;if(mG(p)<.01)break;var f=gG(pG,t)-l;u/=2,p<0?f>=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function yG(e,t){var n=[],i=lg,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=[hp(l[0]),hp(l[1])],l[2]&&l.__original.push(hp(l[2])));var d=l.__original;if(null!=l[2]){if(dp(r[0],d[0]),dp(r[1],d[2]),dp(r[2],d[1]),u&&"none"!==u){var h=Bj(e.node1),p=vG(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=Bj(e.node2),p=vG(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]}dp(l[0],r[0]),dp(l[1],r[2]),dp(l[2],r[1])}else{if(dp(o[0],d[0]),dp(o[1],d[1]),mp(a,o[1],o[0]),xp(a,a),u&&"none"!==u){h=Bj(e.node1);gp(o[0],o[0],a,h*t)}if(c&&"none"!==c){h=Bj(e.node2);gp(o[1],o[1],a,-h*t)}dp(l[0],o[0]),dp(l[1],o[1])}})}function xG(e){return"view"===e.type}var _G=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(e,t){var n=new RO,i=new sG,r=this.group;this._controller=new xF(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(xG(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):Kw(s,l,e)}yG(e.getGraph(),Vj(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),Wj(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"])&&(F_(r).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get(["emphasis","focus"]);t&&"adjacency"===n&&(F_(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){Uj(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)&&!IF(t,n,e)}),xG(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){CF(o,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){SF(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(),yG(e.getGraph(),Vj(e)),i._lineDraw.updateLayout(),n.updateLabelLayout()})):r.disable()},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Vj(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){yG(e.getGraph(),Vj(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}(pD);function bG(e){return"_EC_"+e}var wG=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[bG(e)]){var i=new CG(e,t);return i.hostGraph=this,this.nodes.push(i),n[bG(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[bG(e)]},e.prototype.addEdge=function(e,t,n){var i=this._nodesMap,r=this._edgesMap;if(Rh(e)&&(e=this.nodes[e]),Rh(t)&&(t=this.nodes[t]),e instanceof CG||(e=i[bG(e)]),t instanceof CG||(t=i[bG(t)]),e&&t){var o=e.id+"-"+t.id,a=new SG(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 CG&&(e=e.id),t instanceof CG&&(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 CG||(t=this._nodesMap[bG(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}(),CG=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=ip(),t=ip(),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}(),SG=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=ip(),t=ip();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 MG(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 TG(e,t,n,i,r){for(var o=new wG(i),a=0;a<e.length;a++)o.addNode(Hh(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(Hh(cy(c.id,null),d+" > "+h)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=UE(e,n);else{var g=tT.get(f),m=g&&g.dimensions||[];wh(m,"value")<0&&m.concat(["value"]);var v=zE(e,{coordDimensions:m,encodeDefine:n.getEncode()}).dimensions;(p=new RE(v,n)).initData(e)}var y=new RE(["value"],n);return y.initData(l,s),r&&r(p,y),cB({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}Ch(CG,MG("hostGraph","data")),Ch(SG,MG("hostGraph","edgeData"));var IG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return $d(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new QR(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),iy(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){Aj(n=this)&&(n.__curvenessList=[],n.__edgeMap={},Ej(n));var a=TG(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=rS.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 Mh(a.edges,function(e){!function(e,t,n,i){if(Aj(n)){var r=Nj(e,t,n),o=n.__edgeMap,a=o[Lj(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),VI("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return KI({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=Th(this.option.categories||[],function(e){return null!=e.value?e:_h({value:0},e)}),t=new RE(["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}(tD),DG={type:"graphRoam",event:"graphRoam",update:"none"};var kG=function(){return function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}}(),AG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new kG},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}(c_);function EG(e,t){var n=null==e?"":e+"";return t&&(Ph(t)?n=t.replace("{value}",n):Lh(t)&&(n=t(e))),n}var NG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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:Cv(n[0],t.getWidth()),cy:Cv(n[1],t.getHeight()),r:Cv(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")?mR:_w,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];Gx(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(),Mh(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=Cv(v.get("length"),f),C=Cv(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 Aw({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=EG(Sv(A/_*(m-g)+g),x.get("formatter")),P=i(A/_),O=u*(f-w-N)+h,R=c*(f-w-N)+p,z=x.get("rotate"),F=0;"radial"===z?(F=-S+2*Math.PI)>Math.PI/2&&(F+=Math.PI):"tangential"===z?F=-S-Math.PI/2:Rh(z)&&(F=z*Math.PI/180),0===F?d.add(new M_({style:RC(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 M_({style:RC(x,{text:L,x:O,y:R,verticalAlign:"middle",align:"center"},{inheritColor:P}),silent:!0,originX:O,originY:R,rotation:F}))}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 Aw({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=Cv(o.get("width"),r.r),s=Cv(o.get("length"),r.r),l=e.get(["pointer","icon"]),u=o.get("offsetCenter"),c=Cv(u[0],r.r),d=Cv(u[1],r.r),h=o.get("keepAspect");return(i=l?Mk(l,c-a/2,d-s,a,s,null,h):new AG({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")?mR:_w,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=wv(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);Jw(i,{rotation:-((isNaN(+n)?b[0]:wv(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");Jw(r,{shape:{endAngle:wv(n,_,b,a)}},e),u.add(r),V_(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,Kw(s,{rotation:-((isNaN(+i)?b[0]:wv(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");Kw(y,{shape:{endAngle:wv(i,_,b,x)}},e),u.add(y),V_(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 g_){var c=s.style;s.useStyle(_h({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(wv(m.get(v,e),_,[0,1],!0))),s.z2EmphasisLift=0,Eb(s,t),Ib(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,Eb(d,t),Ib(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=Mk(r,t.cx-i/2+Cv(o[0],t.r),t.cy-i/2+Cv(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 gv,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){d[e]=new M_({silent:!0}),h[e]=new M_({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 gv,m=i(wv(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=r.cx+Cv(y[0],r.r),_=r.cy+Cv(y[1],r.r);(D=d[t]).attr({z2:f?0:2,style:RC(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+Cv(w[0],r.r),S=r.cy+Cv(w[1],r.r),M=Cv(b.get("width"),r.r),T=Cv(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:RC(b,{x:C,y:S,text:EG(o,k),width:isNaN(M)?null:M,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:I})}),HC(D,{normal:b},o,function(e){return EG(e,k)}),p&&UC(D,t,a,e,{getFormattedLabel:function(e,t,n,i,r,a){return EG(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}(pD),LG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return $d(t,e),t.prototype.getInitialData=function(e,t){return JR(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}(tD);var PG=["itemStyle","opacity"],OG=function(e){function t(t,n){var i=e.call(this)||this,r=i,o=new Iw,a=new M_;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return $d(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(PG);l=null==l?1:l,n||iC(i),i.useStyle(e.getItemVisual(t,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Jw(i,{style:{opacity:l}},r,t)):Kw(i,{style:{opacity:l},shape:{points:a.points}},r,t),Eb(i,o),this._updateLabel(e,t),Ib(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;PC(r,OC(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 uf(c[0][0],c[0][1]):null},Kw(r,{style:{x:s.x,y:s.y}},o,t),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),ZL(n,XL(a),{stroke:u})},t}(Mw),RG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreLabelLineUpdate=!0,n}return $d(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 OG(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){nC(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}(pD),zG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new QR(Ah(this.getData,this),Ah(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return JR(this,{coordDimensions:["value"],encodeDefaulter:Eh(EM,this)})},t.prototype._defaultLabelLine=function(e){iy(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}(tD);function FG(e,t){e.eachSeriesByType("funnel",function(e){var n=e.getData(),i=n.mapDimension("value"),r=e.get("sort"),o=function(e,t){return aM(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 Lh(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?[Cv(e.get("minSize"),l),Cv(e.get("maxSize"),l)]:[Cv(e.get("minSize"),s),Cv(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=wv(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=wv(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=Cv(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=Cv(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 VG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._dataGroup=new gv,n._initialized=!1,n}return $d(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=GG(e);if(o.diff(a).add(function(e){WG(jG(o,r,e,l,s),o,e,u)}).update(function(t,n){var i=a.getItemGraphicEl(n),r=BG(o,t,l,s);o.setItemGraphicEl(t,i),Kw(i,{shape:{points:r}},e,t),iC(i),WG(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 w_({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),Jw(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=GG(t),s=this._progressiveEls=[],l=e.start;l<e.end;l++){var u=jG(i,this._dataGroup,l,o,r);u.incremental=!0,WG(u,i,l,a),s.push(u)}},t.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},t.type="parallel",t}(pD);function BG(e,t,n,i){for(var r=[],o=0;o<n.length;o++){var a=n[o],s=e.get(e.mapDimension(a),t);HG(s,i.getAxis(a).type)||r.push(i.dataToPoint(s,a))}return r}function jG(e,t,n,i,r){var o=BG(e,n,i,r),a=new Iw({shape:{points:o},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function GG(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),Wh(t=Vv(t))&&(t=0),{smooth:t}}function WG(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");Eb(e,r,"lineStyle"),Ib(e,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function HG(e,t){return"category"===t?null==e:null==e||isNaN(e)}var UG=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 $d(t,e),t.prototype.getInitialData=function(e,t){return UE(null,this,{useEncodeDefaulter:Ah(YG,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}(tD);function YG(e){var t=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(t){var n={};return Mh(t.dimensions,function(e){var t=+e.replace("dim","");n[e]=t}),n}}var ZG=["lineStyle","opacity"],XG={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(ZG,!0);null!=o&&(r=o)}t.ensureUniqueItemVisual(n,"style").opacity=r},e.start,e.end)}}}};function qG(e){!function(e){if(e.parallel)return;var t=!1;Mh(e.series,function(e){e&&"parallel"===e.type&&(t=!0)}),t&&(e.parallel=[{}])}(e),function(e){var t=ny(e.parallelAxis);Mh(t,function(t){if(zh(t)){var n=t.parallelIndex||0,i=ny(e.parallel)[n];i&&i.parallelAxisDefault&&yh(t,i.parallelAxisDefault,!1)}})}(e)}var $G=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.render=function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},Mh(KG,function(e,t){n.getZr().on(t,this._handlers[t]=Ah(e,this))},this)),CD(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},t.prototype.dispose=function(e,t){SD(this,"_throttledDispatchExpand"),Mh(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(_h({type:"parallelAxisExpand"},e))},t.type="parallel",t}(uD),KG={mousedown:function(e){JG(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(JG(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&&JG(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 JG(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}var QG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(){e.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&yh(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){Mh(["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=[];Mh(Dh(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}(pM),eW=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 $d(t,e),t.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},t}(CL);function tW(e,t,n,i,r,o){e=e||0;var a=n[1]-n[0];if(null!=r&&(r=iW(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=iW(s,[0,a]),r=o=iW(s,[r,o]),i=0}t[0]=iW(t[0],n),t[1]=iW(t[1],n);var l=nW(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]=iW(t[i],d),u=nW(t,i),null!=r&&(u.sign!==l.sign||u.span<r)&&(t[1-i]=t[i]+l.sign*r),u=nW(t,i),null!=o&&u.span>o&&(t[1-i]=t[i]+u.sign*o),t}function nW(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 iW(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var rW=Mh,oW=Math.min,aW=Math.max,sW=Math.floor,lW=Math.ceil,uW=Sv,cW=Math.PI,dW=function(){function e(e,t,n){this.type="parallel",this._axesMap=ip(),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;rW(i,function(e,n){var i=r[n],o=t.getComponent("parallelAxis",i),a=this._axesMap.set(e,new eW(e,UN(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();rW(this.dimensions,function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),HN(t.scale,t.model)},this)}},this)},e.prototype.resize=function(e,t){this._rect=aM(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=hW(t.get("axisExpandWidth"),l),d=hW(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=hW(p[1]-p[0],l),p[1]=p[0]+e):(e=hW(c*(d-1),l),(p=[c*(t.get("axisExpandCenter")||sW(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-d);f<3&&(f=0);var g=[sW(uW(p[0]/c,1))+1,lW(uW(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])}),rW(n,function(t,n){var o=(i.axisExpandable?fW:pW)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:cW/2,vertical:0},l=[a[r].x+e.x,a[r].y+e.y],u=s[r],c=[1,0,0,1,0,0];af(c,c,u),of(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=[];Mh(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 yC([e,0],this._axesLayout[t].transform)},e.prototype.getAxisLayout=function(e){return vh(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)?tW(a,i,o,"all"):l="none";else{var h=i[1]-i[0];(i=[aW(0,o[1]*s/h-h/2)])[1]=oW(o[1],i[0]+h),i[0]=i[1]-h}return{axisExpandWindow:i,behavior:l}},e}();function hW(e,t){return oW(aW(e,t[0]),t[1])}function pW(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function fW(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 gW={create:function(e,t){var n=[];return e.eachComponent("parallel",function(i,r){var o=new dW(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",_y).models[0];e.coordinateSystem=t.coordinateSystem}}),n}},mW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.activeIntervals=[],n}return $d(t,e),t.prototype.getAreaSelectStyle=function(){return Oy([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},t.prototype.setActiveIntervals=function(e){var t=this.activeIntervals=vh(e);if(t)for(var n=t.length-1;n>=0;n--)Mv(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}(pM);Ch(mW,JN);var vW=!0,yW=Math.min,xW=Math.max,_W=Math.pow,bW="globalPan",wW={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CW={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},SW={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},MW=0,TW=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},"production"!==process.env.NODE_ENV&&qh(t),n._zr=t,n.group=new gv,n._uid="brushController_"+MW++,Mh(QW,function(e,t){this._handlers[t]=Ah(e,this)},n),n}return $d(t,e),t.prototype.enableBrush=function(e){return"production"!==process.env.NODE_ENV&&qh(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){yF(e)[t]=n}(t,bW,this._uid),Mh(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=yh(vh(SW),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;!function(e,t,n){var i=yF(e);i[t]===n&&(i[t]=null)}(e,bW,this._uid),Mh(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={};Mh(e,function(e){t[e.panelId]=vh(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&&qh(this._mounted),e=Th(e,function(e){return yh(vh(SW),e,!0)});var t=this._covers,n=this._covers=[],i=this,r=this._creatingCover;return new hE(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]):DW(i,IW(i,s));EW(i,l)}}},t.prototype.unmount=function(){if("production"===process.env.NODE_ENV||this._mounted)return this.enableBrush(!1),OW(this),this._zr.remove(this.group),"production"!==process.env.NODE_ENV&&(this._mounted=!1),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(kp);function IW(e,t){var n=tH[t.brushType].createCover(e,t);return n.__brushOption=t,AW(n,t),e.group.add(n),n}function DW(e,t){var n=NW(t);return n.endCreating&&(n.endCreating(e,t),AW(t,t.__brushOption)),t}function kW(e,t){var n=t.__brushOption;NW(t).updateCoverShape(e,t,n.range,n)}function AW(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function EW(e,t){NW(t).updateCommon(e,t),kW(e,t)}function NW(e){return tH[e.__brushOption.brushType]}function LW(e,t,n){var i,r=e._panels;if(!r)return vW;var o=e._transform;return Mh(r,function(e){e.isTargetByCursor(t,n,o)&&(i=e)}),i}function PW(e,t){var n=e._panels;if(!n)return vW;var i=t.__brushOption.panelId;return null!=i?n[i]:vW}function OW(e){var t=e._covers,n=t.length;return Mh(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function RW(e,t){var n=Th(e._covers,function(e){var t=e.__brushOption,n=vh(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 FW(e,t,n,i){var r=new gv;return r.add(new w_({name:"main",style:GW(n),silent:!0,draggable:!0,cursor:"move",drift:Eh(UW,e,t,r,["n","s","w","e"]),ondragend:Eh(RW,t,{isEnd:!0})})),Mh(i,function(n){r.add(new w_({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Eh(UW,e,t,r,n),ondragend:Eh(RW,t,{isEnd:!0})}))}),r}function VW(e,t,n,i){var r=i.brushStyle.lineWidth||0,o=xW(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;jW(e,t,"main",a,s,f,g),i.transformable&&(jW(e,t,"w",l,u,o,v),jW(e,t,"e",h,u,o,v),jW(e,t,"n",l,u,m,o),jW(e,t,"s",l,p,m,o),jW(e,t,"nw",l,u,o,o),jW(e,t,"ne",h,u,o,o),jW(e,t,"sw",l,p,o,o),jW(e,t,"se",h,p,o,o))}function BW(e,t){var n=t.__brushOption,i=n.transformable,r=t.childAt(0);r.useStyle(GW(n)),r.attr({silent:!i,cursor:i?"move":"default"}),Mh([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var r=t.childOfName(n.join("")),o=1===n.length?HW(e,n[0]):function(e,t){var n=[HW(e,t[0]),HW(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?CW[o]+"-resize":null})})}function jW(e,t,n,i,r,o,a){var s,l,u,c,d,h=t.childOfName(n);h&&h.setShape((s=XW(e,t,[[i,r],[i+o,r+a]]),l=yW(s[0][0],s[1][0]),u=yW(s[0][1],s[1][1]),c=xW(s[0][0],s[1][0]),d=xW(s[0][1],s[1][1]),{x:l,y:u,width:c-l,height:d-u}))}function GW(e){return bh({strokeNoScale:!0},e.brushStyle)}function WW(e,t,n,i){var r=[yW(e,n),yW(t,i)],o=[xW(e,n),xW(t,i)];return[[r[0],o[0]],[r[1],o[1]]]}function HW(e,t){var n=xC({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return vC(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function UW(e,t,n,i,r,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=ZW(t,r,o);Mh(i,function(e){var t=wW[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(WW(s[0][0],s[1][0],s[0][1],s[1][1])),EW(t,n),RW(t,{isEnd:!1})}function YW(e,t,n,i){var r=t.__brushOption.range,o=ZW(e,n,i);Mh(r,function(e){e[0]+=o[0],e[1]+=o[1]}),EW(e,t),RW(e,{isEnd:!1})}function ZW(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 XW(e,t,n){var i=PW(e,t);return i&&i!==vW?i.clipPath(n,e._transform):vh(n)}function qW(e){var t=e.event;t.preventDefault&&t.preventDefault()}function $W(e,t,n){return e.childOfName("main").contain(t,n)}function KW(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 _W(r*r+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&OW(e);var l=vh(s);l.brushType=JW(l.brushType,a),l.panelId=a===vW?null:a.panelId,o=e._creatingCover=IW(e,l),e._covers.push(o)}if(o){var u=tH[JW(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(XW(e,o,e._track)),i&&(DW(e,o),u.updateCommon(e,o)),kW(e,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&LW(e,t,n)&&OW(e)&&(r={isEnd:i,removeOnClick:!0});return r}function JW(e,t){return"auto"===e?("production"!==process.env.NODE_ENV&&qh(t&&t.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),t.defaultBrushType):e}var QW={mousedown:function(e){if(this._dragging)eH(this,e);else if(!e.target||!e.target.draggable){qW(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=LW(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=LW(e,t,n);if(!e._dragging)for(var a=0;a<r.length;a++){var s=r[a].__brushOption;if(o&&(o===vW||s.panelId===o.panelId)&&tH[s.brushType].contain(r[a],n[0],n[1]))return}o&&i.setCursorStyle("crosshair")}}(this,e,i),this._dragging){qW(e);var r=KW(this,e,i,!1);r&&RW(this,r)}},mouseup:function(e){eH(this,e)}};function eH(e,t){if(e._dragging){qW(t);var n=t.offsetX,i=t.offsetY,r=e.group.transformCoordToLocal(n,i),o=KW(e,t,r,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&RW(e,o)}}var tH={lineX:nH(0),lineY:nH(1),rect:{createCover:function(e,t){function n(e){return e}return FW({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 WW(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){VW(e,t,n,i)},updateCommon:BW,contain:$W},polygon:{createCover:function(e,t){var n=new gv;return n.add(new Iw({name:"main",style:GW(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Mw({name:"main",draggable:!0,drift:Eh(YW,e,t),ondragend:Eh(RW,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:XW(e,t,n)})},updateCommon:BW,contain:$W}};function nH(e){return{createCover:function(t,n){return FW({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[yW(n[0][e],n[1][e]),xW(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,r){var o,a=PW(t,n);if(a!==vW&&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(),VW(t,n,l,r)},updateCommon:BW,contain:$W}}function iH(e){return e=aH(e),function(t){return wC(t,e)}}function rH(e,t){return e=aH(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 oH(e,t,n){var i=aH(e);return function(e,r){return i.contain(r[0],r[1])&&!IF(e,t,n)}}function aH(e){return yf.create(e)}var sH=["axisLine","axisTickLabel","axisName"],lH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(t,n){e.prototype.init.apply(this,arguments),(this._brushController=new TW(n.getZr())).on("brush",Ah(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 gv,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=_h({strokeContainThreshold:l},a.getAxisLayout(u)),d=new Ez(e,c);Mh(sH,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,e,o,l,n),bC(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=yf.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:iH(u),isTargetByCursor:oH(u,o,i),getLinearBrushOtherExtent:rH(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return Th(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=Th(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}(uD);var uH={type:"axisAreaSelect",event:"axisAreaSelected"};var cH={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function dH(e){e.registerComponentView($G),e.registerComponentModel(QG),e.registerCoordinateSystem("parallel",gW),e.registerPreprocessor(qG),e.registerComponentModel(mW),e.registerComponentView(lH),fz(e,"parallel",mW,cH),function(e){e.registerAction(uH,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 hH=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}}(),pH=function(e){function t(t){return e.call(this,t)||this}return $d(t,e),t.prototype.getDefaultShape=function(){return new hH},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(){pb(this)},t.prototype.downplay=function(){fb(this)},t}(c_),fH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._focusAdjacencyDisabled=!1,n}return $d(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 pH,i=F_(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()),gH(n.style,d,t);var k=""+v.get("value"),A=OC(v,"edgeLabel");PC(n,A,{labelFetcher:{getFormattedLabel:function(t,n,i,r,o,a){return e.getFormattedLabel(t,n,"edge",r,Yh(o,A.normal&&A.normal.get("formatter"),k),a)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:"inside"});var E=v.getModel("emphasis");Eb(n,v,"lineStyle",function(e){var n=e.getItemStyle();return gH(n,d,t),n}),o.add(n),c.setItemGraphicEl(t.dataIndex,n);var N=E.get("focus");Ib(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 w_({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});PC(h,OC(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),Eb(h,i),o.add(h),u.setItemGraphicEl(t.dataIndex,h),F_(h).dataType="node";var p=c.get("focus");Ib(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 w_({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Jw(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}(pD);function gH(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");Ph(i)&&Ph(r)&&(e.fill=new Vw(0,0,+("horizontal"===t),+("vertical"===t),[{color:i,offset:0},{color:r,offset:1}]))}}var mH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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 rS(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 TG(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 VI("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 VI("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}(tD);function vH(e,t){e.eachSeriesByType("sankey",function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),r=function(e,t){return aM(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){Mh(e,function(e){var t=IH(e.outEdges,TH),n=IH(e.inEdges,TH),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}Mh(e,function(e){yH(e)||e.setLayout({depth:Math.max(0,i-e.getLayout().skNodeHeight)},!0)})}else"justify"===t&&function(e,t){Mh(e,function(e){yH(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){Mh(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=Sy(e,function(e){return e.getLayout()[i]});return r.keys.sort(function(e,t){return e-t}),Mh(r.keys,function(e){n.push(r.buckets.get(e))}),n}(e,a);(function(e,t,n,i,r,o){var a=1/0;Mh(e,function(e){var t=e.length,s=0;Mh(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)}),Mh(e,function(e){Mh(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))})}),Mh(t,function(e){var t=+e.getValue()*a;e.setLayout({dy:t},!0)})})(s,t,n,i,r,a),xH(s,r,n,i,a);for(var l=1;o>0;o--)_H(s,l*=.99,a),xH(s,r,n,i,a),DH(s,l,a),xH(s,r,n,i,a)}(e,t,o,r,i,a,s),function(e,t){var n="vertical"===t?"x":"y";Mh(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]})}),Mh(e,function(e){var t=0,n=0;Mh(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),Mh(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}(e,s)}(l,u,n,i,o,a,0!==Dh(l,function(e){return 0===e.getLayout().value}).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))})}function yH(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function xH(e,t,n,i,r){var o="vertical"===r?"x":"y";Mh(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 _H(e,t,n){Mh(e.slice().reverse(),function(e){Mh(e,function(e){if(e.outEdges.length){var i=IH(e.outEdges,bH,n)/IH(e.outEdges,TH);if(isNaN(i)){var r=e.outEdges.length;i=r?IH(e.outEdges,wH,n)/r:0}if("vertical"===n){var o=e.getLayout().x+(i-MH(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(i-MH(e,n))*t;e.setLayout({y:a},!0)}}})})}function bH(e,t){return MH(e.node2,t)*e.getValue()}function wH(e,t){return MH(e.node2,t)}function CH(e,t){return MH(e.node1,t)*e.getValue()}function SH(e,t){return MH(e.node1,t)}function MH(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function TH(e){return e.getValue()}function IH(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 DH(e,t,n){Mh(e,function(e){Mh(e,function(e){if(e.inEdges.length){var i=IH(e.inEdges,CH,n)/IH(e.inEdges,TH);if(isNaN(i)){var r=e.inEdges.length;i=r?IH(e.inEdges,SH,n)/r:0}if("vertical"===n){var o=e.getLayout().x+(i-MH(e,n))*t;e.setLayout({x:o},!0)}else{var a=e.getLayout().y+(i-MH(e,n))*t;e.setLayout({y:a},!0)}}})})}function kH(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;Mh(n,function(e){var t=e.getLayout().value;t<r&&(r=t),t>o&&(o=t)}),Mh(n,function(t){var n=new ZB({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&&Mh(i,function(e){var t=e.getModel().get("lineStyle");e.setVisual("style",t)})})}var AH=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=[];Mh(g,function(e,t){var n;Nh(e)?(n=e.slice(),e.unshift(t)):Nh(e.value)?((n=_h({},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:gE(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:d,type:gE(f),dimsDef:v.slice()}];return JR(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Eh(AM,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},e}(),EH=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 $d(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}(tD);Ch(EH,AH,!0);var NH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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=OH(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?(iC(n),RH(s,n,i,e)):n=OH(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}(pD),LH=function(){return function(){}}(),PH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="boxplotBoxPath",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new LH},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}(c_);function OH(e,t,n,i,r){var o=e.ends,a=new PH({shape:{points:r?zH(o,i,e):o}});return RH(e,a,t,n,r),a}function RH(e,t,n,i,r){var o=n.hostModel;(0,AC[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");Eb(t,a),Ib(t,s.get("focus"),s.get("blurScope"),s.get("disabled"))}function zH(e,t,n){return Th(e,function(e){return(e=e.slice())[t]=n.initBaseline,e})}var FH=Mh;function VH(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",function(e){var i=e.getBaseAxis(),r=wh(n,i);r<0&&(r=n.length,n[r]=i,t[r]={axis:i,seriesModels:[]}),t[r].seriesModels.push(e)}),t}(e);FH(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;FH(i,function(e){l=Math.max(l,e.getData().count())});var u=n.getExtent();t=Math.abs(u[1]-u[0])/l}FH(i,function(e){var n=e.get("boxWidth");Nh(n)||(n=[n,n]),s.push([Cv(n[0],t)||0,Cv(n[1],t)||0])});var c=.8*t-2,d=c/r*.3,h=(c-d*(r-1))/r,p=h/2-c/2;FH(i,function(e,t){a.push(p),p+=d+h,o.push(Math.min(Math.max(h,s[t][0]),s[t][1]))})}(e),FH(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 BH={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==xM){var n="";"production"!==process.env.NODE_ENV&&(n=Kv("source data is not applicable for this boxplot transform. Expect number[][].")),Jv(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=Mv(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=Lh(m)?m({value:a}):Ph(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 jH=["itemStyle","borderColor"],GH=["itemStyle","borderColor0"],WH=["itemStyle","borderColorDoji"],HH=["itemStyle","color"],UH=["itemStyle","color0"];function YH(e,t){return t.get(e>0?HH:UH)}function ZH(e,t){return t.get(0===e?WH:e>0?jH:GH)}var XH={seriesType:"candlestick",plan:cD(),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=YH(r,i),o.stroke=ZH(r,i)||o.fill,_h(t.ensureUniqueItemVisual(n,"style"),o)}}}}},qH=["color","borderColor"],$H=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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){kC(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&&eU(s,a))return;var l=QH(a,n,!0);Jw(l,{shape:{points:a.ends}},e,n),tU(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&&eU(s,c)?i.remove(u):(u?(Kw(u,{shape:{points:c.ends}},e,a),iC(u)):u=QH(c),tU(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(),oU(e,this.group);var t=e.get("clip",!0)?qO(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=QH(i.getItemLayout(n));tU(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){oU(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}(pD),KH=function(){return function(){}}(),JH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="normalCandlestickBox",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new KH},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}(c_);function QH(e,t,n){var i=e.ends;return new JH({shape:{points:n?nU(i,e):i},z2:100})}function eU(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 tU(e,t,n,i){var r=t.getItemModel(n);e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.__simpleBox=i,Eb(e,r);var o=t.getItemLayout(n).sign;Mh(e.states,function(e,t){var n=r.getModel(t),i=YH(o,n),a=ZH(o,n)||i,s=e.style||(e.style={});i&&(s.fill=i),a&&(s.stroke=a)});var a=r.getModel("emphasis");Ib(e,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function nU(e,t){return Th(e,function(e){return(e=e.slice())[1]=t.initBaseline,e})}var iU=function(){return function(){}}(),rU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeCandlestickBox",n}return $d(t,e),t.prototype.getDefaultShape=function(){return new iU},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}(c_);function oU(e,t,n,i){var r=e.getData().getLayout("largePoints"),o=new rU({shape:{points:r},__sign:1,ignoreCoarsePointer:!0});t.add(o);var a=new rU({shape:{points:r},__sign:-1,ignoreCoarsePointer:!0});t.add(a);var s=new rU({shape:{points:r},__sign:0,ignoreCoarsePointer:!0});t.add(s),aU(1,o,e),aU(-1,a,e),aU(0,s,e),i&&(o.incremental=!0,a.incremental=!0),n&&n.push(o,a)}function aU(e,t,n,i){var r=ZH(e,n)||YH(e,n),o=n.getModel("itemStyle").getItemStyle(qH);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var sU=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 $d(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}(tD);function lU(e){e&&Nh(e.series)&&Mh(e.series,function(e){zh(e)&&"k"===e.type&&(e.type="candlestick")})}Ch(sU,AH,!0);var uU={seriesType:"candlestick",plan:cD(),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=Cv(Uh(e.get("barMaxWidth"),r),r),a=Cv(Uh(e.get("barMinWidth"),1),r),s=e.get("barWidth");return null!=s?Cv(s,r):Math.max(Math.min(r/2,o),a)}(e,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=Th(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=uN(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++]=cU(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:cU(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]=mC(r[0]+i/2,1,!1),o[0]=mC(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]=mC(e[0],1),e}}}}};function cU(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 dU(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 hU=function(e){function t(t,n){var i=e.call(this)||this,r=new EO(t,n),o=new gv;return i.add(r),i.add(o),i.updateData(t,n),i}return $d(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=Mk(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)}dU(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)}dU(n,e)},t.prototype.highlight=function(){pb(this)},t.prototype.downplay=function(){fb(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=Tk(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=Ik(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,Ib(this,c.get("focus"),c.get("blurScope"),c.get("disabled"))},t.prototype.fadeOut=function(e){e&&e()},t}(gv),pU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(){this._symbolDraw=new RO(hU)},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=uR("").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(),nf(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}(pD),fU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return $d(t,e),t.prototype.getInitialData=function(e,t){return UE(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}(tD);var gU=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 $d(t,e),t.prototype.createLine=function(e,t,n){return new aG(e,t,n)},t.prototype._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),i=n.get("symbolSize"),r=n.get("symbol");Nh(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=Mk(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=Hh(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=Lh(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 bp(e.__p1,e.__cp1)+bp(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=og,l=ag;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*bp(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*bp(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}(gv),mU=function(e){function t(t,n,i){var r=e.call(this)||this;return r._createPolyline(t,n,i),r}return $d(t,e),t.prototype._createPolyline=function(e,t,n){var i=e.getItemLayout(t),r=new Iw({shape:{points:i}});this.add(r),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var i=e.hostModel;Kw(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,Ib(this,a,s,l)},t.prototype.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},t}(gv),vU=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return $d(t,e),t.prototype.createLine=function(e,t,n){return new mU(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+=bp(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}(gU),yU=function(){return function(){this.polyline=!1,this.curveness=0,this.segs=[]}}(),xU=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return $d(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 yU},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(Hx(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(Yx(u,c,(u+h)/2-(c-p)*r,(c+p)/2-(h-u)*r,h,p,o,e,t))return a}else if(Hx(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 yf(n,i,r,o)}return e},t}(c_),_U=function(){function e(){this.group=new gv}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 xU({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=F_(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}(),bU={seriesType:"lines",plan:cD(),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&&Xv("The lines series must have a coordinate system.")}},wU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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)&&qO(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=bU.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 _U:new sG(r?i?vU:mU:i?gU:aG),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}(pD),CU="undefined"==typeof Uint32Array?Array:Uint32Array,SU="undefined"==typeof Float64Array?Array:Float64Array;function MU(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(process.env.NODE_ENV,e.data=Th(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),xh([t,e[0],e[1]])}))}var TU=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 $d(t,e),t.prototype.init=function(t){t.data=t.data||[],MU(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(MU(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=rp(this._flatCoords,t.flatCoords),this._flatCoordsOffset=rp(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),Rh(e[0])){for(var n=e.length,i=new CU(n),r=new SU(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&&!tT.get(e.coordinateSystem))throw new Error("Unknown coordinate system "+e.coordinateSystem);var n=new RE(["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),VI("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}(tD);function IU(e){return e instanceof Array||(e=[e,e]),e}var DU={seriesType:"lines",reset:function(e){var t=IU(e.get("symbol")),n=IU(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=IU(n.getShallow("symbol",!0)),r=IU(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 kU=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=nh.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=nh.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 AU(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var EU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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()):AU(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&&(AU(r)?this.render(t,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){kC(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,i,r){var o,a,s,l,u=e.coordinateSystem,c=$O(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=OC(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 w_({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 w_({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=OC(E)}T.shape.r=y;var L=e.getRawValue(M),P="-";L&&null!=L[2]&&(P=L[2]+""),PC(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,Ib(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 kU;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=Th(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 g_({style:{width:f,height:g,x:c,y:d,image:s.canvas},silent:!0});this.group.add(_)},t.type="heatmap",t}(pD),NU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.getInitialData=function(e,t){return UE(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=tT.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}(tD);var LU=["itemStyle","borderWidth"],PU=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],OU=new iw,RU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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:PU[+s],categoryDim:PU[1-+s]};r.diff(o).add(function(e){if(r.hasValue(e)){var t=HU(r,e),n=zU(r,e,t,u),o=ZU(r,u,n);r.setItemGraphicEl(e,o),i.add(o),JU(o,u,n)}}).update(function(e,t){var n=o.getItemGraphicEl(t);if(r.hasValue(e)){var a=HU(r,e),s=zU(r,e,a,u),l=qU(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;Kw(o,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,r),n.symbolRepeat?BU(e,t,n,!0):jU(e,t,n,!0);GU(e,n,!0),WU(e,t,n,!0)}(n,u,s):n=ZU(r,u,s,!0),r.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),JU(n,u,s)}else i.remove(n)}).remove(function(e){var t=o.getItemGraphicEl(e);t&&XU(o,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var c=e.get("clip",!0)?qO(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){XU(i,F_(t).dataIndex,e,t)}):n.removeAll()},t.type="pictorialBar",t}(pD);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(Nh(s)){var d=[FU(l,s[0])-u,FU(l,s[1])-u];d[1]<d[0]&&d.reverse(),o=d[c]}else o=null!=s?FU(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=Nh(f)?f.slice():null==f?["100%","100%"]:[f,f];c[h.index]=Cv(c[h.index],p),c[d.index]=Cv(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(LU)||0;o&&(OU.attr({scaleX:t[0],scaleY:t[1],rotation:n}),OU.updateTransform(),o/=OU.getLineScale(),o*=t[i.valueDim.index]);r.valueLineWidth=o||0}(n,d.symbolScale,l,i,d);var h=d.symbolSize,p=Ik(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=Hh(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1));var _=Cv(y,t[p.index]),b=Math.max(g+2*_,0),w=x?0:2*_,C=Bv(i),S=C?i:QU((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?QU((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=_h({},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 FU(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function VU(e){var t=e.symbolPatternSize,n=Mk(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function BU(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($U(e,function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?KU(e,null,f(c),n,i):KU(e,null,{scaleX:0,scaleY:0},n,i,function(){r.remove(e)}),c++});c<u;c++){var h=VU(n);h.__pictorialAnimationIndex=c,h.__pictorialRepeatTimes=u,r.add(h);var p=f(c);KU(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 jU(e,t,n,i){var r=e.__pictorialBundle,o=e.__pictorialMainPath;o?KU(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=VU(n),r.add(o),KU(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 GU(e,t,n){var i=_h({},t.barRectShape),r=e.__pictorialBarRect;r?KU(r,null,{shape:i},t,n):((r=e.__pictorialBarRect=new w_({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,e.add(r))}function WU(e,t,n,i){if(n.symbolClip){var r=e.__pictorialClipPath,o=_h({},n.clipShape),a=t.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Kw(r,{shape:o},s,l);else{o[a.wh]=0,r=new w_({shape:o}),e.__pictorialBundle.setClipPath(r),e.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],AC[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function HU(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=UU,n.isAnimationEnabled=YU,n}function UU(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function YU(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ZU(e,t,n,i){var r=new gv,o=new gv;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?BU(r,t,n):jU(r,0,n),GU(r,n,i),WU(r,t,n,i),r.__pictorialShapeStr=qU(e,n),r.__pictorialSymbolMeta=n,r}function XU(e,t,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];$U(i,function(e){o.push(e)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),Mh(o,function(e){eC(e,{scaleX:0,scaleY:0},n,t,function(){i.parent&&i.parent.remove(i)})}),e.setItemGraphicEl(t,null)}function qU(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function $U(e,t,n){Mh(e.__pictorialBundle.children(),function(i){i!==e.__pictorialBarRect&&t.call(n,i)})}function KU(e,t,n,i,r,o){t&&e.attr(t),i.symbolClip&&!r?n&&e.attr(n):n&&AC[r?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,o)}function JU(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");$U(e,function(e){if(e instanceof g_){var t=e.style;e.useStyle(_h({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,PC(f,OC(r),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:kO(t.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Ib(e,c,d,o.get("disabled"))}function QU(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var eY=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 $d(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=sS(pR.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}(pR);var tY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._layers=[],n}return $d(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 hE(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 gv;c=new YO({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 w_({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Jw(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,Kw(c,{shape:{points:d,stackedOnPoints:p}},e),iC(c)}PC(c,OC(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),Eb(c,e),Ib(c,w.get("focus"),w.get("blurScope"),w.get("disabled"))}else o.remove(l[n])}d.add(Ah(p,this,"add")).update(Ah(p,this,"update")).remove(Ah(p,this,"remove")).execute(),this._layersSeries=a,this._layers=h},t.type="themeRiver",t}(pD);var nY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new QR(Ah(this.getData,this),Ah(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},i=Sy(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",_y).models[0].get("type"),i=Dh(e.data,function(e){return void 0!==e[2]}),r=this.fixData(i||[]),o=[],a=this.nameMap=ip(),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:gE(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,c=new RE(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=Sy(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){Nh(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 VI("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}(tD);function iY(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]=Cv(o[0],r.height),o[1]=Cv(o[1],r.height),rY(t,e,r.height-o[0]-o[1])):(o[0]=Cv(o[0],r.width),o[1]=Cv(o[1],r.width),rY(t,e,r.width-o[0]-o[1]));t.setLayout("layoutInfo",i)})}function rY(e,t,n){if(e.count())for(var i,r=t.coordinateSystem,o=t.getLayerSeries(),a=e.mapDimension("single"),s=e.mapDimension("value"),l=Th(o,function(t){return Th(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 oY=function(e){function t(t,n,i,r){var o=e.call(this)||this;o.z2=2,o.textConfig={inside:!0},F_(o).seriesIndex=n.seriesIndex;var a=new M_({z2:4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(a),o.updateData(!0,t,n,i,r),o}return $d(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;F_(o).dataIndex=t.dataIndex;var a=t.getModel(),s=a.getModel("emphasis"),l=t.getLayout(),u=_h({},l);u.label=null;var c=t.getVisual("style");c.lineJoin="bevel";var d=t.getVisual("decal");d&&(c.decal=Jk(d,r));var h=xR(a.getModel("itemStyle"),u,!0);_h(u,h),Mh(H_,function(e){var t=o.ensureState(e),n=a.getModel([e,"itemStyle"]);t.style=n.getItemStyle();var i=xR(n,u);i&&(t.shape=i)}),e?(o.setShape(u),o.shape.r=l.r0,Jw(o,{shape:{r:l.r}},n,t.dataIndex)):(Kw(o,{shape:u},n),iC(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");Ib(this,"relative"===f?rp(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,Mh(U_,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=RC(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=Xx("tangential"===S?Math.PI/2-a:a),D=I>M&&!Nv(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=Xx(-a)+(D?Math.PI:0):"tangential"===S?k=Xx(Math.PI/2-a)+(D?Math.PI:0):Rh(S)&&(k=S*Math.PI/180),g.rotation=Xx(k)}),c.dirtyStyle()},t}(_w),aY="sunburstRootToNode",sY="sunburstHighlight";var lY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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 oY(i,e,t,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==c?null:r[c])}new hE(r,i,s,s).add(c).update(c).remove(Eh(c,null)).execute()}(c,p),d=a,(h=s).depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,d,e,t,n):(r.virtualPiece=new oY(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)eM(a,o.get("target",!0)||"_blank")}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:aY,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}(pD),uY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.ignoreStyleOnData=!0,n}return $d(t,e),t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};cY(n);var i=this._levelModels=Th(e.levels||[],function(e){return new rS(e,this,t)},this),r=xB.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=CB(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(){kB(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}(tD);function cY(e){var t=0;Mh(e.children,function(e){cY(e);var n=e.value;Nh(n)&&(n=n[0]),t+=n});var n=e.value;Nh(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Nh(e.value)?e.value[0]=n:e.value=n}var dY=Math.PI/180;function hY(e,t,n){t.eachSeriesByType(e,function(e){var t=e.get("center"),i=e.get("radius");Nh(i)||(i=[0,i]),Nh(t)||(t=[t,t]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=Cv(t[0],r),l=Cv(t[1],o),u=Cv(i[0],a/2),c=Cv(i[1],a/2),d=-e.get("startAngle")*dY,h=e.get("minAngle")*dY,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&pY(f,m);var v=0;Mh(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=Cv(v,a/2)),null!=b&&(f=Cv(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;Mh(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 pY(e,t){var n=e.children||[];e.children=function(e,t){if(Lh(t)){var n=Th(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)}),Th(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&&Mh(e.children,function(e){pY(e,t)})}function fY(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&&Ph(o)&&(o=Eg(o,(e.depth-1)/(i-1)*.5)),o}(r,e,i.root.height)),_h(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)})})}var gY={color:"fill",borderColor:"stroke"},mY={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},vY=my(),yY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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 UE(null,this)},t.prototype.getDataParams=function(t,n,i){var r=e.prototype.getDataParams.call(this,t,n);return i&&(r.info=vY(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}(tD);function xY(e,t){return t=t||[0,0],Th(["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 _Y(e,t){return t=t||[0,0],Th([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 bY(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 wY(e,t){return t=t||[0,0],Th(["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 CY={};function SY(e,t,n,i){return e&&(e.legacy||!1!==e.legacy&&!n&&!i&&"tspan"!==t&&("text"===t||sp(e,"text")))}function MY(e,t,n){var i,r,o,a=e;if("text"===t)o=a;else{o={},sp(a,"text")&&(o.text=a.text),sp(a,"rich")&&(o.rich=a.rich),sp(a,"textFill")&&(o.fill=a.textFill),sp(a,"textStroke")&&(o.stroke=a.textStroke),sp(a,"fontFamily")&&(o.fontFamily=a.fontFamily),sp(a,"fontSize")&&(o.fontSize=a.fontSize),sp(a,"fontStyle")&&(o.fontStyle=a.fontStyle),sp(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=sp(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),sp(a,"textPosition")&&(i.position=a.textPosition),sp(a,"textOffset")&&(i.offset=a.textOffset),sp(a,"textRotation")&&(i.rotation=a.textRotation),sp(a,"textDistance")&&(i.distance=a.textDistance)}return TY(o,e),Mh(o.rich,function(e){TY(e,e)}),{textConfig:i,textContent:r}}function TY(e,t){t&&(t.font=t.textFont||t.font,sp(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),sp(t,"textAlign")&&(e.align=t.textAlign),sp(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),sp(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),sp(t,"textWidth")&&(e.width=t.textWidth),sp(t,"textHeight")&&(e.height=t.textHeight),sp(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),sp(t,"textPadding")&&(e.padding=t.textPadding),sp(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),sp(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),sp(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),sp(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),sp(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),sp(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),sp(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function IY(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";DY(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,Mh(t.rich,function(e){DY(e,e)}),i}function DY(e,t){t&&(sp(t,"fill")&&(e.textFill=t.fill),sp(t,"stroke")&&(e.textStroke=t.fill),sp(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),sp(t,"font")&&(e.font=t.font),sp(t,"fontStyle")&&(e.fontStyle=t.fontStyle),sp(t,"fontWeight")&&(e.fontWeight=t.fontWeight),sp(t,"fontSize")&&(e.fontSize=t.fontSize),sp(t,"fontFamily")&&(e.fontFamily=t.fontFamily),sp(t,"align")&&(e.textAlign=t.align),sp(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),sp(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),sp(t,"width")&&(e.textWidth=t.width),sp(t,"height")&&(e.textHeight=t.height),sp(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),sp(t,"padding")&&(e.textPadding=t.padding),sp(t,"borderColor")&&(e.textBorderColor=t.borderColor),sp(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),sp(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),sp(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),sp(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),sp(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),sp(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),sp(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),sp(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),sp(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),sp(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}function kY(e,t){if("production"!==process.env.NODE_ENV){var n=e+"^_^"+t;CY[n]||(CY[n]=!0)}}var AY={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},EY=kh(AY),NY=Ih(Xm,function(e,t){return e[t]=1,e},{}),LY=Xm.join(", "),PY=["","style","shape","extra"],OY=my();function RY(e,t,n,i,r){var o=e+"Animation",a=qw(e,i,r)||{},s=OY(t).userDuring;return a.duration>0&&(a.during=s?Ah(UY,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),_h(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=OY(e),u=t.style;l.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var i=0;i<EY.length;i++){var r=EY[i],o=AY[r],a=t[r];a&&(n[o[0]]=a[0],n[o[1]]=a[1])}for(i=0;i<Xm.length;i++){var s=Xm[i];null!=t[s]&&(n[s]=t[s])}}(0,t,d),ZY("shape",t,d),ZY("extra",t,d),!o&&s&&(function(e,t,n){for(var i=t.transition,r=BY(i)?Xm:ny(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&&jY(a,"el.transition"),n[a]=s}}}(e,t,c),YY("shape",e,t,c),YY("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&&!BY(a)){var l=ny(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&&(BY(s)||BY(a)||wh(s,"style")>=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!r&&(r=i.style={});var p=kh(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){sp(t,"silent")&&(e.silent=t.silent),sp(t,"ignore")&&(e.ignore=t.ignore),e instanceof ax&&sp(t,"invisible")&&(e.invisible=t.invisible);e instanceof c_&&sp(t,"autoBatch")&&(e.autoBatch=t.autoBatch)}(e,t),s)if(o){var h={};Mh(PY,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(h[e]=h[e]||{}),_h(e?h[e]:h,n.enterFrom))});var p=RY("enter",e,t,n,r);p.duration>0&&e.animateFrom(h,p)}else!function(e,t,n,i,r){if(r){var o=RY("update",e,t,i,n);o.duration>0&&e.animateFrom(r,o)}}(e,t,r||0,n,c);FY(e,t),u?e.dirty():e.markRedraw()}function FY(e,t){for(var n=OY(e).leaveToProps,i=0;i<PY.length;i++){var r=PY[i],o=r?t[r]:t;o&&o.leaveTo&&(n||(n=OY(e).leaveToProps={}),r&&(n[r]=n[r]||{}),_h(r?n[r]:n,o.leaveTo))}}function VY(e,t,n,i){if(e){var r=e.parent,o=OY(e).leaveToProps;if(o){var a=RY("update",e,t,n,0);a.done=function(){r.remove(e)},e.animateTo(o,a)}else r.remove(e)}}function BY(e){return"all"===e}var jY,GY={},WY={setTransform:function(e,t){return"production"!==process.env.NODE_ENV&&qh(sp(NY,e),"Only "+LY+" available in `setTransform`."),GY.el[e]=t,this},getTransform:function(e){return"production"!==process.env.NODE_ENV&&qh(sp(NY,e),"Only "+LY+" available in `getTransform`."),GY.el[e]},setShape:function(e,t){"production"!==process.env.NODE_ENV&&HY(e);var n=GY.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){"production"!==process.env.NODE_ENV&&HY(e);var t=GY.el.shape;if(t)return t[e]},setStyle:function(e,t){"production"!==process.env.NODE_ENV&&HY(e);var n=GY.el,i=n.style;return i&&("production"!==process.env.NODE_ENV&&Wh(t)&&Zv("style."+e+" must not be assigned with NaN."),i[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){"production"!==process.env.NODE_ENV&&HY(e);var t=GY.el.style;if(t)return t[e]},setExtra:function(e,t){return"production"!==process.env.NODE_ENV&&HY(e),(GY.el.extra||(GY.el.extra={}))[e]=t,this},getExtra:function(e){"production"!==process.env.NODE_ENV&&HY(e);var t=GY.el.extra;if(t)return t[e]}};function HY(e){if("production"!==process.env.NODE_ENV&&("transition"===e||"enterFrom"===e||"leaveTo"===e))throw new Error('key must not be "'+e+'"')}function UY(){var e=this,t=e.el;if(t){var n=OY(t).userDuring,i=e.userDuring;n===i?(GY.el=t,i(WY)):e.el=e.userDuring=null}}function YY(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]={}),BY(l))_h(o,a);else for(var u=ny(l),c=0;c<u.length;c++){var d=a[p=u[c]];o[p]=d}else if(BY(s)||wh(s,e)>=0){!o&&(o=i[e]={});var h=kh(a);for(c=0;c<h.length;c++){var p;d=a[p=h[c]];XY(r[p],d)&&(o[p]=d)}}}}}function ZY(e,t,n){var i=t[e];if(i)for(var r=n[e]={},o=kh(i),a=0;a<o.length;a++){var s=o[a];r[s]=lm(i[s])}}function XY(e,t){return Sh(e)?e!==t:null!=e&&isFinite(e)}"production"!==process.env.NODE_ENV&&(jY=function(e,t){sp(NY,e)||Zv("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+kh(NY).join("`, `")+"` are permitted.")});var qY=my(),$Y=["percent","easing","shape","style","extra"];function KY(e){e.stopAnimation("keyframe"),e.attr(qY(e))}function JY(e,t,n){if(n.isAnimationEnabled()&&t)if(Nh(t))Mh(t,function(t){JY(e,t,n)});else{var i=t.keyframes,r=t.duration;if(n&&null==r){var o=qw("enter",n,0);r=o&&o.duration}if(i&&r){var a=qY(e);Mh(PY,function(n){if(!n||e[n]){var o,s=!1;i.sort(function(e,t){return e.percent-t.percent}),Mh(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=kh(u);if(n||(c=Dh(c,function(e){return wh($Y,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;Mh(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||Zv("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),o.delay(t.delay||0).duration(r).start(t.easing))}})}}}var QY="emphasis",eZ="normal",tZ="blur",nZ="select",iZ=[eZ,QY,tZ,nZ],rZ={normal:["itemStyle"],emphasis:[QY,"itemStyle"],blur:[tZ,"itemStyle"],select:[nZ,"itemStyle"]},oZ={normal:["label"],emphasis:[QY,"label"],blur:[tZ,"label"],select:[nZ,"label"]},aZ=["x","y"],sZ={normal:{},emphasis:{},blur:{},select:{}},lZ={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:Ah(xY,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:Ah(_Y,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:Ah(bY,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:Ah(wY,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 uZ(e){return e instanceof c_}function cZ(e){return e instanceof ax}var dZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.render=function(e,t,n,i){this._progressiveEls=null;var r=this._data,o=e.getData(),a=this.group,s=mZ(e,o,t,n);r||a.removeAll(),o.diff(r).add(function(t){yZ(n,null,t,s(t,i),e,a,o)}).remove(function(t){var n=r.getItemGraphicEl(t);n&&VY(n,vY(n).option,e)}).update(function(t,l){var u=r.getItemGraphicEl(l);yZ(n,u,t,s(t,i),e,a,o)}).execute();var l=e.get("clip",!0)?qO(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=mZ(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=yZ(null,null,u,a(u,r),t,this.group,o);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){kC(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}(pD);function hZ(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=DZ(i);t=cC(o,null,r,i.layout||"center"),vY(t).customPathData=o}else if("image"===n)t=new g_({}),vY(t).customImagePath=e.style.image;else if("text"===n)t=new M_({});else if("group"===n)t=new gv;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');var a=uC(n);if(!a){var s="";"production"!==process.env.NODE_ENV&&(s='graphic type "'+n+'" can not be found.'),Jv(s)}t=new a}return vY(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function pZ(e,t,n,i,r,o,a){KY(t);var s=r&&r.normal.cfg;s&&t.setTextConfig(s),i&&null==i.transition&&(i.transition=aZ);var l=i&&i.style;if(l){if("text"===t.type){var u=l;sp(u,"textFill")&&(u.fill=u.textFill),sp(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,d=uZ(t)?l.decal:null;e&&d&&(d.dirty=!0,c=Jk(d,e)),l.__decalPattern=c}cZ(t)&&(l&&(c=l.__decalPattern)&&(l.decal=c));zY(t,i,o,{dataIndex:n,isInit:a,clearStyle:!0}),JY(t,i.keyframeAnimation,o)}function fZ(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),cb(o)}}function gZ(e,t,n){var i=n===eZ,r=i?t:wZ(t,n),o=r?r.z2:null;null!=o&&((i?e:e.ensureState(n)).z2=o||0)}function mZ(e,t,n,i){var r=e.get("renderItem"),o=e.coordinateSystem,a={};o&&("production"!==process.env.NODE_ENV&&(qh(r,"series.render is required."),qh(o.prepareCustoms||lZ[o.type],"This coordSys does not support custom series.")),a=o.prepareCustoms?o.prepareCustoms(o):lZ[o.type](o));for(var s,l,u=bh({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&&kY("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,eZ).getItemStyle();null!=o&&(l.fill=o),null!=a&&(l.opacity=a);var u={inheritColor:Ph(o)?o:"#000"},c=x(i,eZ),d=RC(c,null,u,!1,!0);d.text=c.getShallow("show")?Uh(e.getFormattedLabel(i,eZ),kO(t,i)):null;var h=zC(c,u,!1);return b(n,l),l=IY(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&&kY("api.styleEmphasis","Please write literal style directly instead.");null==i&&(i=s);var r=y(i,QY).getItemStyle(),o=x(i,QY),a=RC(o,null,null,!0,!0);a.text=o.getShallow("show")?Yh(e.getFormattedLabel(i,QY),e.getFormattedLabel(i,eZ),kO(t,i)):null;var l=zC(o,null,!0);return b(n,r),r=IY(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(e,n){if(null==n&&(n=s),sp(gY,e)){var i=t.getItemVisual(n,"style");return i?i[gY[e]]:null}if(sp(mY,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(bh({bandWidth:r,axisKey:i,stackId:cN+o},e));var a=gN(t),s=[];for(o=0;o<e.count;o++){var l=a[i][cN+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(bh({axis:o.getBaseAxis()},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return GC(e,n)}},a.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:a.coordSys,dataInsideLength:t.count(),encode:vZ(e.getData())},d={},h={},p={},f={},g=0;g<iZ.length;g++){var m=iZ[g];p[m]=e.getModel(rZ[m]),f[m]=e.getModel(oZ[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(rZ[n])):v(e).getModel(rZ[n]):p[n]}function x(e,n){return t.hasItemOption?e===s?h[n]||(h[n]=v(e).getModel(oZ[n])):v(e).getModel(oZ[n]):f[n]}return function(e,n){return s=e,l=null,d={},h={},r&&r(bh({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},c),u)};function _(e,t){for(var n in t)sp(t,n)&&(e[n]=t[n])}function b(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function vZ(e){var t={};return Mh(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 yZ(e,t,n,i,r,o,a){if(i){var s=xZ(e,t,n,i,r,o);return s&&a.setItemGraphicEl(n,s),s&&Ib(s,i.focus,i.blurScope,i.emphasisDisabled),s}o.remove(t)}function xZ(e,t,n,i,r,o){"production"!==process.env.NODE_ENV&&qh(i,"should not have an null/undefined element setting");var a=-1,s=t;t&&_Z(t,i,r)&&(a=wh(o.childrenRef(),t),t=null);var l,u,c=!t,d=t;d?d.clearStates():(d=hZ(i),s&&(l=s,(u=d).copyTransform(l),cZ(u)&&cZ(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,uZ(u)&&uZ(l)&&u.setShape(l.shape)))),!1===i.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),sZ.normal.cfg=sZ.normal.conOpt=sZ.emphasis.cfg=sZ.emphasis.conOpt=sZ.blur.cfg=sZ.blur.conOpt=sZ.select.cfg=sZ.select.conOpt=null,sZ.isLegacy=!1,function(e,t,n,i,r,o){if(e.isGroup)return;bZ(n,null,o),bZ(n,QY,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=hZ(a),e.setTextContent(c)),pZ(null,c,t,a,null,i,r);for(var d=a&&a.style,h=0;h<iZ.length;h++){var p=iZ[h];if(p!==eZ){var f=o[p].conOpt;fZ(p,c,0,CZ(a,f,p),null)}}d?c.dirty():c.markRedraw()}}}(d,n,i,r,c,sZ),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&&_Z(a,o,i)&&(a=null),a||(a=hZ(o),"production"!==process.env.NODE_ENV&&qh(uZ(a),"Only any type of `path` can be used in `clipPath`, rather than "+a.type+"."),e.setClipPath(a)),pZ(null,a,t,o,null,i,r)}}(d,n,i,r,c),pZ(e,d,n,i,sZ,r,c),sp(i,"info")&&(vY(d).info=i.info);for(var h=0;h<iZ.length;h++){var p=iZ[h];if(p!==eZ){var f=wZ(i,p);fZ(p,d,0,CZ(i,f,p),sZ)}}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<iZ.length;s++)gZ(i,t,iZ[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 hE(c.oldChildren,c.newChildren,MZ,MZ,c).add(TZ).update(TZ).remove(IZ).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),xZ(e,p,n,h,r,t)):("production"!==process.env.NODE_ENV&&qh(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);SZ(t,g,r)}}(e,d,n,i,r),a>=0?o.replaceAt(d,a):o.add(d),d}function _Z(e,t,n){var i,r=vY(e),o=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&(sp(i,"pathData")||sp(i,"d")))&&DZ(a)!==r.customPathData||"image"===o&&sp(s,"image")&&s.image!==r.customImagePath}function bZ(e,t,n){var i=t?wZ(e,t):e,r=t?CZ(e,i,QY):e.style,o=e.type,a=i?i.textConfig:null,s=e.textContent,l=s?t?wZ(s,t):s:null;if(r&&(n.isLegacy||SY(r,o,!!a,!!l))){n.isLegacy=!0;var u=MY(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&&qh("text"===c.type,'textContent.type must be "text"')}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function wZ(e,t){return t?e?e[t]:null:e}function CZ(e,t,n){var i=t&&t.style;return null==i&&n===QY&&e&&(i=e.styleEmphasis),i}function SZ(e,t,n){t&&VY(t,vY(e).option,n)}function MZ(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function TZ(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null,r=null!=t?n.oldChildren[t]:null;xZ(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function IZ(e){var t=this.context,n=t.oldChildren[e];n&&VY(n,vY(n).option,t.seriesModel)}function DZ(e){return e&&(e.pathData||e.d)}var kZ=my(),AZ=vh,EZ=Ah,NZ=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=Eh(LZ,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new gv,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=Vz(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=kZ(e).pointerEl=new AC[r.type](AZ(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var r=kZ(e).labelEl=new M_(AZ(t.label));e.add(r),OZ(r,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=kZ(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=kZ(e).labelEl;r&&(r.setStyle(t.label.style),n(r,{x:t.label.x,y:t.label.y}),OZ(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=CC(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){qp(e.event)},onmousedown:EZ(this._onHandleDragMove,this,0,0),drift:EZ(this._onHandleDragMove,this),ondragend:EZ(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");Nh(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,CD(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){LZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,RZ(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(RZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(RZ(i)),kZ(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),SD(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 LZ(e,t,n,i){PZ(kZ(n).lastProp,i)||(kZ(n).lastProp=i,t?Kw(n,i,e):(n.stopAnimation(),n.attr(i)))}function PZ(e,t){if(zh(e)&&zh(t)){var n=!0;return Mh(t,function(t,i){n=n&&PZ(e[i],t)}),!!n}return e===t}function OZ(e,t){e[t.get(["label","show"])?"show":"hide"]()}function RZ(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 FZ(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 VZ(e,t,n,i,r){var o=BZ(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=XS(a.get("padding")||0),l=a.getFont(),u=Qm(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:RC(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function BZ(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:ZN(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Mh(i,function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,r=t&&t.getDataParams(i);r&&s.seriesData.push(r)}),Ph(a)?o=a.replace("{value}",o):Lh(a)&&(o=a(s))}return o}function jZ(e,t,n){var i=[1,0,0,1,0,0];return af(i,i,n.rotation),of(i,i,n.position),yC([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function GZ(e,t,n,i,r,o){var a=Ez.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),VZ(t,i,r,o,{position:jZ(i.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function WZ(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function HZ(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function UZ(e,t,n,i,r,o){return{cx:e,cy:t,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var YZ=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=ZZ(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(t,!0));if(s&&"none"!==s){var c=FZ(i),d=XZ[s](o,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}GZ(t,e,bz(a.model,n),n,i,r)},t.prototype.getHandleTransform=function(e,t,n){var i=bz(t.axis.grid.model,t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=jZ(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=ZZ(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}(NZ);function ZZ(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var XZ={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:WZ([t,n[0]],[t,n[1]],qZ(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:HZ([t-i/2,n[0]],[i,r],qZ(e))}}};function qZ(e){return"x"===e.dim?0:1}var $Z=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(pM),KZ=my(),JZ=Mh;function QZ(e,t,n){if(!Jd.node){var i=t.getZr();KZ(i).records||(KZ(i).records={}),function(e,t){if(KZ(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);JZ(KZ(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)})}KZ(e).initialized=!0,n("click",Eh(tX,"click")),n("mousemove",Eh(tX,"mousemove")),n("globalout",eX)}(i,t),(KZ(i).records[e]||(KZ(i).records[e]={})).handler=n}}function eX(e,t,n){e.handler("leave",null,n)}function tX(e,t,n,i){t.handler(e,n,i)}function nX(e,t){if(!Jd.node){var n=t.getZr();(KZ(n).records||{})[e]&&(KZ(n).records[e]=null)}}var iX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),r=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";QZ("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){nX("axisPointer",t)},t.prototype.dispose=function(e,t){nX("axisPointer",t)},t.type="axisPointer",t}(uD);function rX(e,t){var n,i=[],r=e.seriesIndex;if(null==r||!(n=t.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=gy(o,e);if(null==a||a<0||Nh(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(Th(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 oX=my();function aX(e,t,n){var i=e.currTrigger,r=[e.x,e.y],o=e,a=e.dispatchAction||Ah(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){dX(r)&&(r=rX({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=dX(r),u=o.axesInfo,c=s.axesInfo,d="leave"===i||dX(r),h={},p={},f={list:[],map:{}},g={showPointer:Eh(lX,p),showTooltip:Eh(uX,f)};Mh(s.coordSysMap,function(e,t){var n=l||e.containPoint(r);Mh(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&&sX(e,a,g,!1,h)}})});var m={};return Mh(c,function(e,t){var n=e.linkGroup;n&&!p[t]&&Mh(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,cX(t),cX(e)))),m[e.key]=o}})}),Mh(m,function(e,t){sX(c[t],e,g,!0,h)}),function(e,t,n){var i=n.axesInfo=[];Mh(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(dX(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=oX(i)[r]||{},a=oX(i)[r]={};Mh(e,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&Mh(n.seriesDataIndices,function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e})});var s=[],l=[];Mh(o,function(e,t){!a[t]&&l.push(e)}),Mh(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 sX(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 Mh(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),Mh(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&&_h(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 lX(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function uX(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=jz(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 cX(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 dX(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function hX(e){Wz.registerAxisPointerClass("CartesianAxisPointer",YZ),e.registerComponentModel($Z),e.registerComponentView(iX),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Nh(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=zz(e,t)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},aX)}var pX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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=FZ(i),d=fX[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];af(h,h,s),of(h,h,[i.cx,i.cy]),l=yC([a,-r],h);var p=t.getModel("axisLabel").get("rotate")||0,f=Ez.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"]));VZ(e,n,i,r,h)},t}(NZ);var fX={line:function(e,t,n,i){return"angle"===e.dim?{type:"Line",shape:WZ(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:UZ(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:UZ(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}},gX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(pM),mX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",_y).models[0]},t.type="polarAxis",t}(pM);Ch(mX,JN);var vX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="angleAxis",t}(mX),yX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="radiusAxis",t}(mX),xX=function(e){function t(t,n){return e.call(this,"radius",t,n)||this}return $d(t,e),t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},t}(CL);xX.prototype.dataToRadius=CL.prototype.dataToCoord,xX.prototype.radiusToData=CL.prototype.coordToData;var _X=my(),bX=function(e){function t(t,n){return e.call(this,"angle",t,n||[0,360])||this}return $d(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=Qm(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=_X(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}(CL);bX.prototype.dataToAngle=CL.prototype.dataToCoord,bX.prototype.angleToData=CL.prototype.coordToData;var wX=["radius","angle"],CX=function(){function e(e){this.dimensions=wX,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new xX,this._angleAxis=new bX,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 SX(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return SX(t)===this?this.pointToData(n):null},e}();function SX(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function MX(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();Mh(KN(t,"radius"),function(e){r.scale.unionExtentFromData(t,e)}),Mh(KN(t,"angle"),function(e){i.scale.unionExtentFromData(t,e)})}}),HN(i.scale,i.model),HN(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 TX(e,t){var n;if(e.type=t.get("type"),e.scale=UN(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 IX={dimensions:wX,create:function(e,t){var n=[];return e.eachComponent("polar",function(e,i){var r=new CX(i+"");r.update=MX;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");TX(o,s),TX(a,l),function(e,t,n){var i=t.get("center"),r=n.getWidth(),o=n.getHeight();e.cx=Cv(i[0],r),e.cy=Cv(i[1],o);var a=e.getRadiusAxis(),s=Math.min(r,o)/2,l=t.get("radius");null==l?l=[0,"100%"]:Nh(l)||(l=[0,l]);var u=[Cv(l[0],s),Cv(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",_y).models[0];if("production"!==process.env.NODE_ENV&&!t)throw new Error('Polar "'+Hh(e.get("polarIndex"),e.get("polarId"),0)+'" not found');e.coordinateSystem=t.coordinateSystem}}),n}},DX=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function kX(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 AX(e){return e.getRadiusAxis().inverse?0:1}function EX(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 NX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return $d(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=Th(n.getViewLabels(),function(e){e=vh(e);var t=n.scale,i="ordinal"===t.type?t.getRawOrdinalNumber(e.tickValue):e.tickValue;return e.coord=n.dataToCoord(i),e});EX(s),EX(o),Mh(DX,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||LX[t](this.group,e,i,o,a,r,s)},this)}},t.type="angleAxis",t}(Wz),LX={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=AX(n),h=d?0:1,p=360===Math.abs(c[1]-c[0])?"Circle":"Arc";(a=0===o[h]?new AC[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 ww({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[AX(n)],u=Th(i,function(e){return new Aw({shape:kX(n,[l,l+s],e.coord)})});e.add(pC(u,{style:bh(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[AX(n)],c=[],d=0;d<r.length;d++)for(var h=0;h<r[d].length;h++)c.push(new Aw({shape:kX(n,[u,u+l],r[d][h].coord)}));e.add(pC(c,{style:bh(s.getModel("lineStyle").getLineStyle(),bh(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");Mh(a,function(i,r){var a=l,d=i.tickValue,h=o[AX(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 rS(y.textStyle,l,l.ecModel))}var x=new M_({silent:Ez.isLabelSilent(t),style:RC(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 _=Ez.makeAxisEventDataBase(t);_.targetType="axisLabel",_.value=i.rawLabel,F_(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 Aw({shape:kX(n,o,i[c].coord)}))}for(c=0;c<u.length;c++)e.add(pC(u[c],{style:bh({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 Aw({shape:kX(n,o,r[l][u].coord)}));e.add(pC(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 _w({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(pC(u[g],{style:bh({fill:s[g%s.length]},a.getAreaStyle()),silent:!0}))}}},PX=["axisLine","axisTickLabel","axisName"],OX=["splitLine","splitArea","minorSplitLine"],RX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="PolarAxisPointer",n}return $d(t,e),t.prototype.render=function(e,t){if(this.group.removeAll(),e.get("show")){var n=this._axisGroup,i=this._axisGroup=new gv;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 Ez(e,d);Mh(PX,h.add,h),i.add(h.getGroup()),bC(n,i,e),Mh(OX,function(t){e.get([t,"show"])&&!r.scale.isBlank()&&zX[t](this.group,e,o,u,c,s,l)},this)}},t.type="radiusAxis",t}(Wz),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 AC[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(pC(p[f],{style:bh({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 iw({shape:{cx:n.cx,cy:n.cy,r:a[u][c].coord}}));e.add(pC(l,{style:bh({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 _w({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(pC(u[d],{style:bh({fill:s[d%s.length]},a.getAreaStyle()),silent:!0}))}}};function FX(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function VX(e,t){return t.dim+e.model.componentIndex}function BX(e,t,n){var i={},r=function(e){var t={};Mh(e,function(e,n){var i=e.getData(),r=e.coordinateSystem,o=r.getBaseAxis(),a=VX(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=FX(e);c[d]||u.autoWidthCount++,c[d]=c[d]||{width:0,maxWidth:0};var h=Cv(e.get("barWidth"),l),p=Cv(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 Mh(t,function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,o=Cv(e.categoryGap,r),a=Cv(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-o)/(l+(l-1)*a);u=Math.max(u,0),Mh(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;Mh(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;Mh(i,function(e,i){n[t][i]=n[t][i]||{offset:h,width:e.width},h+=e.width*(1+a)})}),n}(Dh(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=VX(n,o),s=FX(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=WE(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 jX={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},GX={splitNumber:5},WX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="polar",t}(uD);function HX(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),Hh(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 UX=["axisLine","axisTickLabel","axisName"],YX=["splitArea","splitLine"],ZX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="SingleAxisPointer",n}return $d(t,e),t.prototype.render=function(t,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new gv;var s=HX(t),l=new Ez(t,s);Mh(UX,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),Mh(YX,function(e){t.get([e,"show"])&&XX[e](this,this.group,this._axisGroup,t)},this),bC(a,this._axisGroup,t),e.prototype.render.call(this,t,n,i,r)},t.prototype.remove=function(){Yz(this)},t.type="singleAxis",t}(Wz),XX={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 Aw({shape:{x1:f[0],y1:f[1],x2:g[0],y2:g[1]},silent:!0});gC(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(pC(d[m],{style:bh({stroke:s[m%s.length]},_),silent:!0}))}},splitArea:function(e,t,n,i){Uz(e,n,i,i)}},qX=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(pM);Ch(qX,JN.prototype);var $X=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 $d(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}(CL),KX=["single"],JX=function(){function e(e,t,n){this.type="single",this.dimension="single",this.dimensions=KX,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 $X(i,UN(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();Mh(t.mapDimensionsAll(this.dimension),function(e){this._axis.scale.unionExtentFromData(t,e)},this),HN(this._axis.scale,this._axis.model)}},this)},e.prototype.resize=function(e,t){this._rect=aM({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 QX(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return QX(t)===this?this.pointToData(n):null},e}();function QX(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}var eq={create:function(e,t){var n=[];return e.eachComponent("singleAxis",function(i,r){var o=new JX(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",_y).models[0];e.coordinateSystem=t&&t.coordinateSystem}}),n},dimensions:KX},tq=["x","y"],nq=["width","height"],iq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o=n.axis,a=o.coordinateSystem,s=aq(a,1-oq(o)),l=a.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=FZ(i),d=rq[u](o,l,s);d.style=c,e.graphicKey=d.type,e.pointer=d}GZ(t,e,HX(n),n,i,r)},t.prototype.getHandleTransform=function(e,t,n){var i=HX(t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=jZ(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=oq(r),s=aq(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=aq(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}(NZ),rq={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:WZ([t,n[0]],[t,n[1]],oq(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:HZ([t-i/2,n[0]],[i,r],oq(e))}}};function oq(e){return e.isHorizontal()?0:1}function aq(e,t){var n=e.getRect();return[n[tq[t]],n[tq[t]]+n[nq[t]]]}var sq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="single",t}(uD);var lq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(t,n,i){var r=cM(t);e.prototype.init.apply(this,arguments),uq(t,r)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),uq(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}(pM);function uq(e,t){var n,i=e.cellSize;1===(n=Nh(i)?i:e.cellSize=[i,i]).length&&(n[1]=n[0]);var r=Th([0,1],function(e){return function(e,t){return null!=e[iM[t][0]]||null!=e[iM[t][1]]&&null!=e[iM[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]});uM(e,t,{type:"box",ignoreSize:r})}var cq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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 w_({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 Iw({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 Ph(e)&&e?(n=e,Mh(t,function(e,t){n=n.replace("{"+t+"}",e)}),n):Lh(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 M_({z2:30,style:RC(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&&!Ph(o)||(o&&(t=gS(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 M_({z2:30,style:_h(RC(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||Ph(l))l&&(t=gS(l)||t),l=t.get(["time","dayOfWeekShort"])||Th(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=Cv(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 M_({z2:30,style:_h(RC(o,{text:l[g]}),this._weekTextPositionControl(v,i,s,u,h)),silent:p});r.add(y)}}},t.type="calendar",t}(uD),dq=864e5,hq=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=Pv(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];Mh([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=aM(o,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}Mh([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){Nh(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+dq))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=pq(t);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){var i=pq(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(Nh(t)&&1===t.length&&(t=t[0]),Nh(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&&mh("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/dq)-Math.floor(n[0].time/dq)+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 pq(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function fq(e,t){var n;return Mh(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}var gq=["transition","enterFrom","leaveTo"],mq=gq.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function vq(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var i=n?gq:mq,r=0;r<i.length;r++){var o=i[r];null==e[o]&&null!=t[o]&&(e[o]=t[o])}}var yq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return $d(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=sy(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];Mh(a,function(e,t){var n=e.newOption;"production"!==process.env.NODE_ENV&&qh(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=_h({},n),r=e[t],o=n.$action||"merge";if("merge"===o)if(r){if("production"!==process.env.NODE_ENV){var a=n.type;qh(!a||r.type===a,'Please set $action: "replace" to change `type`')}yh(r,i,!0),uM(r,i,{ignoreSize:!0}),dM(n,r),vq(n,r),vq(n,r,"shape"),vq(n,r,"style"),vq(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=[fq(t,["left","right"]),fq(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=Dh(r,function(e){return e&&delete e.$action,null!=e})},t.prototype._flatten=function(e,t,n){Mh(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}(pM),xq={path:null,compoundPath:null,group:gv,image:g_,text:M_},_q=my(),bq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(){this._elMap=ip()},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");Mh(t,function(t){var a=cy(t.id,null),s=null!=a?n.get(a):null,l=cy(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&&SY(d,c,!!p,!!h)){var f=MY(d,c,!0);!p&&f.textConfig&&(p=t.textConfig=f.textConfig),!h&&f.textContent&&(h=f.textContent)}var g=function(e){return e=_h({},e),Mh(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(nM),function(t){delete e[t]}),e}(t);"production"!==process.env.NODE_ENV&&s&&qh(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=Cq(a,u,t.type,n):(x&&(_q(x).isNew=!1),KY(x)),x&&(zY(x,g,e,{isInit:T}),Mq(x,t,r,o))}else if(y){Sq(s,t,n,e);var _=Cq(a,u,t.type,n);_&&(zY(_,g,e,{isInit:!0}),Mq(_,t,r,o))}else"remove"===m&&(FY(s,t),Sq(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 M_(h))}else y&&b.setTextContent(new M_(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||_q(I).type!==S)?wq(S):I}else y&&(T=!0,M=wq(S));b.setClipPath(M),zY(M,C,e,{isInit:T}),JY(M,C.keyframeAnimation,e)}var D=_q(b);b.setTextConfig(p),D.option=t,function(e,t,n){var i=F_(e).eventData;e.silent||e.ignore||i||(i=F_(e).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});i&&(i.info=n.info)}(b,e,t),IC({el:b,componentModel:e,itemName:b.name,itemTooltipOption:t.tooltip}),JY(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=cy((h=n[l]).id,null))?r.get(p):null)&&f.isGroup){var u=(g=f.parent)===i,c=_q(f),d=_q(g);c.width=Cv(c.option.width,u?o:d.width)||0,c.height=Cv(c.option.height,u?a:d.height)||0}}for(l=n.length-1;l>=0;l--){var h,p,f;if(f=null!=(p=cy((h=n[l]).id,null))?r.get(p):null){var g=f.parent,m=(d=_q(g),{}),v=sM(f,h,g===i?{width:o,height:a}:{width:d.width,height:d.height},null,{hv:h.hv,boundingMode:h.bounding},m);if(!_q(f).isNew&&v){for(var y=h.transition,x={},_=0;_<s.length;_++){var b=s[_],w=m[b];y&&(BY(y)||wh(y,b)>=0)?x[b]=w:f[b]=w}Kw(f,x,e,0)}else f.attr(m)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){Sq(n,_q(n).option,t,e._lastGraphicModel)}),this._elMap=ip()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(uD);function wq(e){"production"!==process.env.NODE_ENV&&qh(e,"graphic type MUST be set");var t=sp(xq,e)?xq[e]:uC(e);"production"!==process.env.NODE_ENV&&qh(t,"graphic type "+e+" can not be found");var n=new t({});return _q(n).type=e,n}function Cq(e,t,n,i){var r=wq(n);return t.add(r),i.set(e,r),_q(r).id=e,_q(r).isNew=!0,r}function Sq(e,t,n,i){e&&e.parent&&("group"===e.type&&e.traverse(function(e){Sq(e,t,n,i)}),VY(e,t,i),n.removeKey(_q(e).id))}function Mq(e,t,n,i){e.isGroup||Mh([["cursor",ax.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],function(n){var i=n[0];sp(t,i)?e[i]=Uh(t[i],n[1]):null==e[i]&&(e[i]=n[1])}),Mh(kh(t),function(n){if(0===n.indexOf("on")){var i=t[n];e[n]=Lh(i)?i:null}}),sp(t,"draggable")&&(e.draggable=t.draggable),null!=t.name&&(e.name=t.name),null!=t.id&&(e.id=t.id)}var Tq=["x","y","radius","angle","single"],Iq=["cartesian2d","polar","singleAxis"];function Dq(e){return"production"!==process.env.NODE_ENV&&qh(e),e+"Axis"}function kq(e,t){var n,i=ip(),r=[],o=ip();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 Aq(e){var t=e.ecModel,n={infoList:[],infoMap:ip()};return e.eachTargetAxis(function(e,i){var r=t.getComponent(Dq(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 Eq=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}(),Nq=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 $d(t,e),t.prototype.init=function(e,t,n){var i=Lq(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var t=Lq(e);yh(this.option,e,!0),yh(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;Mh([["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=ip();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 Mh(Tq,function(n){var i=this.getReferringComponents(Dq(n),by);if(i.specified){t=!0;var r=new Eq;Mh(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 Eq;if(o.add(r.componentIndex),e.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",_y).models[0];a&&Mh(t,function(e){r.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",_y).models[0]&&o.add(e.componentIndex)})}}}i&&Mh(Tq,function(t){if(i){var r=n.findComponents({mainType:Dq(t),filter:function(e){return"category"===e.get("type",!0)}});if(r[0]){var o=new Eq;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");Mh([["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(Dq(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,i){Mh(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&&qh(e&&null!=t);var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(Dq(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;Mh([["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;Mh(["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&&qh(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}(pM);function Lq(e){var t={};return Mh(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Pq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="dataZoom.select",t}(Nq),Oq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.render=function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(uD),Rq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="dataZoom.select",t}(Oq),zq=Mh,Fq=Mv,Vq=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 wh(Iq,t)>=0}(t)){var n=Dq(this._dimName),i=t.getReferringComponents(n,_y).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 vh(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(wv(c,o,n))):(t=!0,c=wv(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}),Fq(s),Fq(a);var l=this._minMaxSpan;function u(e,t,n,r,o){var a=o?"Span":"ValueSpan";tW(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=wv(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&&Mh(KN(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=jN(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=Th(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=wv(n[0]+o,n,[0,100],!0):null!=r&&(o=wv(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=Dv(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 Bq={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=e.getComponent(Dq(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 Vq(t,i,o,e),n.push(r.__dzAxisProxy))});var i=ip();return Mh(n,function(e){Mh(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 jq=!1;function Gq(e){jq||(jq=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Bq),function(e){e.registerAction("dataZoom",function(e,t){Mh(kq(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 Wq(e){e.registerComponentModel(Pq),e.registerComponentView(Rq),Gq(e)}var Hq=function(){return function(){}}(),Uq={};function Yq(e,t){Uq[e]=t}function Zq(e){return Uq[e]}var Xq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;Mh(this.option.feature,function(e,n){var i=Zq(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),yh(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}(pM);function qq(e,t){var n=XS(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new w_({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 $q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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=[];Mh(s,function(e,t){u.push(t)}),new hE(this._featureNames||[],u).add(c).update(c).remove(Eh(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=aM(i,o,r);oM(t.get("orient"),e,t.get("itemGap"),a.width,a.height),sM(e,i,o,r)}(r,e,n),r.add(qq(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&&!Lh(l)&&t){var u=l.style||(l.style={}),c=Qm(t,M_.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 rS(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=Zq(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=aS("toolbox-feature"),h.model=m,h.ecModel=t,h.api=n;var y=h instanceof Hq;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 Hq&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};Ph(p)?(u={})[l]=p:u=p;Ph(f)?(c={})[l]=f:c=f;var g=i.iconPaths={};Mh(u,function(l,u){var p=CC(l,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new M_({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:GC({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),IC({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])?pb:fb)(p),r.add(p),p.on("click",Ah(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?pb:fb)(i[e])},h instanceof Hq&&h.render&&h.render(m,t,n,i)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,i){Mh(this._features,function(e){e instanceof Hq&&e.updateView&&e.updateView(e.model,t,n,i)})},t.prototype.remove=function(e,t){Mh(this._features,function(n){n instanceof Hq&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){Mh(this._features,function(n){n instanceof Hq&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(uD);var Kq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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=Jd.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}(Hq),Jq="__ec_magicType_stack__",Qq=[["line","bar"],["stack"]],e$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return Mh(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(t$[n]){var o,a={series:[]};Mh(Qq,function(e){wh(e,n)>=0&&Mh(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=t$[n](t,r,e,i);o&&(bh(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,_y).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=yh({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}(Hq),t$={line:function(e,t,n,i){if("bar"===e)return yh({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 yh({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")===Jq;if("line"===e||"bar"===e)return i.setIconStatus("stack",r?"normal":"emphasis"),yh({id:t,stack:r?"":Jq},i.get(["option","stack"])||{},!0)}};tE({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var n$=new Array(60).join("-"),i$="\t";function r$(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var o$=new RegExp("[\t]+","g");function a$(e,t){var n=e.split(new RegExp("\n*"+n$+"\n*","g")),i={series:[]};return Mh(n,function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(i$)>=0)return!0}(e)){var r=function(e){for(var t=e.split(/\n+/g),n=[],i=Th(r$(t.shift()).split(o$),function(e){return{name:e,data:[]}}),r=0;r<t.length;r++){var o=r$(t[r]).split(o$);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=r$(t.shift()),i=[],r=0;r<t.length;r++){var o=r$(t[r]);if(o){var a=o.split(o$),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 s$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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:Dh([(n=r.seriesGroupByCategoryAxis,i=[],Mh(n,function(e,t){var n=e.categoryAxis,r=e.valueAxis.dim,o=[" "].concat(Th(e.series,function(e){return e.name})),a=[n.model.getCategories()];Mh(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(i$)],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(i$))}i.push(s.join("\n"))}),i.join("\n\n"+n$+"\n\n")),(t=r.other,Th(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+i$:"")+i.join(i$))}),n.join("\n")}).join("\n\n"+n$+"\n\n"))],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+n$+"\n\n"),meta:r.meta}}(e);if(Lh(u)){var h=u(t.getOption());Ph(h)?s.innerHTML=h:Bh(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}Zp(v,"click",_),Zp(y,"click",function(){if(null==c&&null!=u||null!=c&&null==u)return"production"!==process.env.NODE_ENV&&Zv("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=Lh(c)?c(s,t.getOption()):a$(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}(Hq);function l$(e,t){return Th(e,function(e,n){var i=t&&t[n];if(zh(i)&&!Nh(i)){zh(e)&&!Nh(e)||(e={value:e});var r=null!=i.name&&null==e.name;return e=bh(e,i),r&&delete e.name,e}return e})}tE({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];Mh(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:l$(e.data,r)})}else n.push(_h({type:"scatter"},e))}),t.mergeOption(bh({series:n},e.newOption))});var u$=Mh,c$=my();function d$(e){var t=c$(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var h$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.onclick=function(e,t){!function(e){c$(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}(Hq);tE({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var p$=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],f$=function(){function e(e,t,n){var i=this;this._targetInfoList=[];var r=m$(t,e);Mh(v$,function(e,t){(!n||!n.include||wh(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=_$[e.brushType](0,n,t);e.__rangeOffset={offset:w$[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){Mh(e,function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&Mh(i.coordSyses,function(i){var r=_$[e.brushType](1,i,e.range,!0);n(e,r.values,i,t)})},this)},e.prototype.setInputRanges=function(e,t){Mh(e,function(e){var n,i,r,o,a,s=this.findTargetInfo(e,t);if("production"!==process.env.NODE_ENV&&(qh(!s||!0===s||e.coordRange,"coordRange must be specified when coord index specified."),qh(!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=_$[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?w$[e.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=S$(n),o=S$(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 Th(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:iH(i),isTargetByCursor:oH(i,e,n.coordSysModel),getLinearBrushOtherExtent:rH(i)}})},e.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&wh(i.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=m$(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<y$.length;s++)if(y$[s](i,o))return o}return!0},e}();function g$(e){return e[0]>e[1]&&e.reverse(),e}function m$(e,t){return yy(e,t,{includeMainTypes:p$})}var v$={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,r=e.gridModels,o=ip(),a={},s={};(n||i||r)&&(Mh(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),Mh(i,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),Mh(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=[];Mh(r.getCartesians(),function(e,t){(wh(n,e.getAxis("x").model)>=0||wh(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:x$.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){Mh(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:x$.geo})})}},y$=[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}],x$={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(vC(e)),t}},_$={lineX:Eh(b$,0),lineY:Eh(b$,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=[g$([r[0],o[0]]),g$([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:Th(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 b$(e,t,n,i){"production"!==process.env.NODE_ENV&&qh("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var r=n.getAxis(["x","y"][e]),o=g$(Th([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 w$={lineX:Eh(C$,0),lineY:Eh(C$,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 Th(e,function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]})}};function C$(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function S$(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var M$,T$,I$=Mh,D$=ty+"toolbox-dataZoom_",k$=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(t,e),t.prototype.render=function(e,t,n,i){this._brushController||(this._brushController=new TW(n.getZr()),this._brushController.on("brush",Ah(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 f$(E$(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 d$(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){A$[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 f$(E$(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=d$(e);u$(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=tW(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=[];I$(e,function(e,n){t.push(vh(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}(Hq),A$={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=d$(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return u$(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 E$(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}M$="dataZoom",T$=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var i=t.getModel(n),r=[],o=yy(e,E$(i));return I$(o.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),I$(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:D$+t+o};a[n]=o,r.push(a)}},qh(null==OM.get(M$)&&T$),OM.set(M$,T$);var N$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(pM);function L$(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function P$(e){if(Jd.domSupported)for(var t=document.documentElement.style,n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n]}var O$=P$(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function R$(e,t){if(!e)return t;t=ZS(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var z$=R$(P$(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),F$=R$(O$,"transform"),V$="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Jd.transform3dSupported?"will-change:transform;":"");function B$(e,t,n){var i=e.toFixed(0)+"px",r=t.toFixed(0)+"px";if(!Jd.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=Jd.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+F$+":"+a+";":[["top",0],["left",0],[O$,a]]}function j$(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=qI(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+=Jd.transformSupported?","+F$+i:",left"+i+",top"+i),z$+":"+r}(r,n)),o&&i.push("background-color:"+o),Mh(["width","color","radius"],function(t){var n="border-"+t,r=ZS(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=Uh(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),Mh(["decoration","align"],function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)}),t.join(";")}(c)),null!=d&&i.push("padding:"+XS(d).join("px ")+"px"),i.join(";")+";"}function G$(e,t,n,i,r){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&function(e,t,n,i,r){Op(Pp,t,i,r,!0)&&Op(e,n,Pp[0],Pp[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 W$=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,Jd.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&&(Ph(r)?document.querySelector(r):Bh(r)?r:Lh(r)&&r(e.getDom()));G$(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;Yp(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=V$+j$(e,!this._firstShow,this._longHide)+B$(r[0],r[1],!0)+"border-color:"+QS(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(Ph(r)&&"item"===n.get("trigger")&&!L$(n)&&(a=function(e,t,n){if(!Ph(n)||"inside"===n)return"";var i=e.get("backgroundColor"),r=e.get("borderWidth");t=QS(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=F$+":";wh(["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)),Ph(e))o.innerHTML=e+a;else if(e){o.innerHTML="",Nh(e)||(e=[e]);for(var s=0;s<e.length;s++)Bh(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(G$(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var i=this.el.style;Mh(B$(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",Jd.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(Ah(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}(),H$=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),Z$(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)&&Jv("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 M_({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:qI(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),Mh(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),Mh(["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=Y$(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;Z$(i,this._zr,e,t),e=i[0],t=i[1];var r=n.style,o=U$(r.borderWidth||0),a=Y$(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(Ah(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function U$(e){return Math.max(0,e)}function Y$(e){var t=U$(e.shadowBlur||0),n=U$(e.shadowOffsetX||0),i=U$(e.shadowOffsetY||0);return{left:U$(t-n),right:U$(t+n),top:U$(t-i),bottom:U$(t+i)}}function Z$(e,t,n,i){e[0]=n,e[1]=i,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var X$=new w_({shape:{x:-1,y:-1,width:2,height:2}}),q$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(e,t){if(!Jd.node&&t.getDom()){var n,i=e.getComponent("tooltip"),r=this._renderMode="auto"===(n=i.get("renderMode"))?Jd.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===r?new H$(t):new W$(t,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!Jd.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")?CD(this,"_updatePosition",50,"fixRate"):SD(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");QZ("itemTooltip",this._api,Ah(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&&!Jd.node&&n.getDom()){var r=K$(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(e,t,n){var i=xy(e).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o=wy(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=F_(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=X$;l.x=i.x,l.y=i.y,l.update(),F_(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=rX(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(K$(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"===$$([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"===F_(n).ssrType)return;this._lastDataByCoordSys=null,pk(n,function(e){return null!=F_(e).dataIndex?(r=e,!0):null!=F_(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=Ah(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=$$([t.tooltipOption],i),a=this._renderMode,s=[],l=VI("section",{blocks:[],noHeader:!0}),u=[],c=new $I;Mh(e,function(e){Mh(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value;if(t&&null!=r){var o=BZ(r,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=VI("section",{header:o,noHeader:!$h(o),sortBlocks:!0,blocks:[]});l.blocks.push(d),Mh(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=ZN(t.axis,{value:r}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",QS(f.color),a);var g=QT(h.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=$$([h],i).get("valueFormatter");d.blocks.push(v?_h({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=UI(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=F_(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=$$([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 $I;g.marker=m.makeTooltipMarker("item",QS(g.color),d);var v=QT(s.formatTooltip(l,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),_=v.frag,b=_?UI(x?_h({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=F_(t),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(Ph(o)){o={content:o,formatter:o},a=!0}a&&i&&o.content&&((o=vh(o)).content=Vp(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=$$(s,this._tooltipModel,u?{position:u}:null),d=c.get("content"),h=Math.random()+"",p=new $I;this._showOrMove(c,function(){var n=vh(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(Ph(c)){var p=e.ecModel.get("useUTC"),f=Nh(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=kS(f.axisValue,d,p)),d=JS(d,n,!0)}else if(Lh(c)){var g=Ah(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||Nh(t)?{color:i||("html"===this._renderMode?"#fff":"none")}:Nh(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),Lh(t)&&(t=t([n,i],o,r.el,h,{viewSize:[s,l],contentSize:u.slice()})),Nh(t))n=Cv(t[0],s),i=Cv(t[1],l);else if(zh(t)){var p=t;p.width=u[0],p.height=u[1];var f=aM(p,{width:s,height:l});n=f.x,i=f.y,c=null,d=null}else if(Ph(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-=J$(c)?u[0]/2:"right"===c?u[0]:0),d&&(i-=J$(d)?u[1]/2:"bottom"===d?u[1]:0),L$(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&&Mh(n,function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&Mh(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)&&Mh(a,function(e,t){var n=l[t];r=r&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),i&&Mh(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){!Jd.node&&t.getDom()&&(SD(this,"_updatePosition"),this._tooltipContent.dispose(),nX("itemTooltip",t))},t.type="tooltip",t}(uD);function $$(e,t,n){var i,r=t.ecModel;n?(i=new rS(n,r,r),i=new rS(t.option,i,r)):i=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof rS&&(a=a.get("tooltip",!0)),Ph(a)&&(a={formatter:a}),a&&(i=new rS(a,i,r)))}return i}function K$(e,t){return e.dispatchAction||Ah(t.dispatchAction,t)}function J$(e){return"center"===e||"middle"===e}var Q$=["rect","polygon","keep","clear"];function eK(e,t){var n=ny(e?e.brush:[]);if(n.length){var i=[];Mh(n,function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))});var r=e&&e.toolbox;Nh(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={},Mh(o=u,function(e){a[e]=1}),o.length=0,Mh(a,function(e,t){o.push(t)}),t&&!u.length&&u.push.apply(u,Q$)}}var tK=Mh;function nK(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function iK(e,t,n){var i={};return tK(t,function(t){var r,o=i[t]=((r=function(){}).prototype.__hidden=r.prototype,new r);tK(e[t],function(e,i){if(ZB.isValidType(i)){var r={type:i,visual:e};n&&n(r,t),o[i]=new ZB(r),"opacity"===i&&((r=vh(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new ZB(r))}})}),i}function rK(e,t,n){var i;Mh(n,function(e){t.hasOwnProperty(e)&&nK(t[e])&&(i=!0)}),i&&Mh(n,function(n){t.hasOwnProperty(n)&&nK(t[n])?e[n]=vh(t[n]):delete e[n]})}var oK={lineX:aK(0),lineY:aK(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])&&eL(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!!(eL(i,r,o)||eL(i,r+a,o)||eL(i,r,o+s)||eL(i,r+a,o+s)||yf.create(e).contain(l[0],l[1])||SC(r,o,r+a,o,i)||SC(r,o,r,o+s,i)||SC(r+a,o,r+a,o+s,i)||SC(r,o+s,r+a,o+s,i))||void 0}}};function aK(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var r=i.range;return sK(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(),sK(s[0],a)||sK(s[1],a)||sK(a[0],s)||sK(a[1],s)}}}}function sK(e,t){return t[0]<=e&&e<=t[1]}var lK=["inBrush","outOfBrush"],uK="__ecBrushSelect",cK="__ecInBrushSelectEvent";function dK(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new f$(t.option,e)).setInputRanges(t.areas,e)})}function hK(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})}),dK(e),e.eachComponent({mainType:"brush"},function(t,n){var a={brushId:t.id,brushIndex:n,brushName:t.name,areas:vh(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=Th(t.areas,function(e){var t=gK[e.brushType],n=bh({boundingRect:t?t(e):void 0},e);return n.selectors=function(e){var t=e.brushType,n={point:function(i){return oK[t].point(i,n,e)},rect:function(i){return oK[t].rect(i,n,e)}};return n}(n),n}),f=iK(t.option,lK,function(e){e.mappingMethod="fixed"});function g(e){return"all"===l||!!u[e]}function m(e){return!!e.length}Nh(l)&&Mh(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&&(Nh(n)?wh(n,t)<0:t!==n)}(t,i))return;if(Mh(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){fK(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 fK(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 lk(n,o,e)}function l(e,t){ck(n,o,e,t)}Mh(e,function(e){var n=ZB.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)}})}(lK,f,r,o)})}),function(e,t,n,i,r){if(!r)return;var o=e.getZr();if(o[cK])return;o[uK]||(o[uK]=pK);var a=CD(o,uK,n,t);a(e,i)}(t,i,r,o,n)}function pK(e,t){if(!e.isDisposed()){var n=e.getZr();n[cK]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[cK]=!1}}function fK(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 gK={rect:function(e){return mK(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&&mK(t)}};function mK(e){return new yf(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var vK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new TW(t.getZr())).on("brush",Ah(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){dK(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:vh(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:t,areas:vh(n),$from:t})},t.type="brush",t}(uD),yK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return $d(t,e),t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&rK(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&&(qh(Nh(e)),Mh(e,function(e){qh(e.brushType,"Illegal areas")})),e&&(this.areas=Th(e,function(e){return xK(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=xK(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}(pM);function xK(e,t){return yh({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new rS(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var _K=["rect","polygon","lineX","lineY","keep","clear"],bK=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $d(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,Mh(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 Mh(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:_K.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}(Hq);var wK=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 $d(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}(pM),CK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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=Uh(e.get("textBaseline"),e.get("textVerticalAlign")),l=new M_({style:RC(r,{text:e.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new M_({style:RC(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(){eM(h,"_"+e.get("target"))}),p&&d.on("click",function(){eM(p,"_"+e.get("subtarget"))}),F_(l).eventData=F_(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=aM(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 w_({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}(uD);var SK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode="box",n}return $d(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=[],Mh(n,function(t,n){var i,o=cy(oy(t),"");zh(t)?(i=vh(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 RE([{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}(pM),MK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="timeline.slider",t.defaultOption=sS(SK.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}(SK);Ch(MK,JT.prototype);var TK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="timeline",t}(uD),IK=function(e){function t(t,n,i,r){var o=e.call(this,t,n,i)||this;return o.type=r||"value",o}return $d(t,e),t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},t}(CL),DK=Math.PI,kK=my(),AK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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 VI("nameValue",{noName:!0,value:a.scale.getLabel({value:e})})},Mh(["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 aM(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?"+":"-":Ph(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:DK/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*DK/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;of(o,o,[-a,-s]),af(o,o,-DK/2),of(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||Ph(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 rN({ordinalMeta:e.getCategories(),extent:[1/0,-1/0]});case"time":return new _N({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new aN}}(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 IK("value",r,e.axisExtent,i);return a.model=t,a},t.prototype._createGroup=function(e){var t=this[e]=new gv;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 Aw({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:_h({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});t.add(o);var a=this._progressLine=new Aw({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:bh({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=[],Mh(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:Ah(r._changeTimeline,r,e.value)},h=EK(s,l,t,d);h.ensureState("emphasis").style=u.getItemStyle(),h.ensureState("progress").style=c.getItemStyle(),Tb(h);var p=F_(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=[],Mh(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 M_({x:d,y:0,rotation:e.labelRotation-e.rotation,onclick:Ah(r._changeTimeline,r,a),silent:!1,style:RC(l,{text:i.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});h.ensureState("emphasis").style=RC(u),h.ensureState("progress").style=RC(c),t.add(h),Tb(h),kK(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=iv(Uh(i.get(["controlStyle",n+"BtnSize"]),r),r),d=function(e,t,n,i){var r=i.style,o=CC(e.get(["controlStyle",t]),i||{},new yf(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),Tb(d)}}c(e.nextBtnPosition,"next",Ah(this._changeTimeline,this,u?"-":"+")),c(e.prevBtnPosition,"prev",Ah(this._changeTimeline,this,u?"+":"-")),c(e.playPosition,l?"stop":"play",Ah(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=Ah(s._handlePointerDrag,s),e.ondragend=Ah(s._handlePointerDragend,s),NK(e,s._progressLine,o,n,i,!0)},onUpdate:function(e){NK(e,s._progressLine,o,n,i)}};this._currentPointer=EK(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=Mv(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 yC(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",kK(n[i]).dataIndex<=e)},t.type="timeline.slider",t}(TK);function EK(e,t,n,i,r,o){var a=t.get("color");r?(r.setColor(a),n.add(r),o&&o.onUpdate(r)):((r=Mk(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=yh({rectHover:!0,z2:100},i,!0);var l=Tk(e.get("symbolSize"));i.scaleX=l[0]/2,i.scaleY=l[1]/2;var u=Ik(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 NK(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 LK(e){var t=e&&e.timeline;Nh(t)||(t=t?[t]:[]),Mh(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(PK(e),OK(e,"controlPosition")){var i=e.controlStyle||(e.controlStyle={});OK(i,"position")||(i.position=e.controlPosition),"none"!==i.position||OK(i,"show")||(i.show=!1,delete i.position),delete e.controlPosition}Mh(e.data||[],function(e){zh(e)&&!Nh(e)&&(!OK(e,"value")&&OK(e,"name")&&(e.value=e.name),PK(e))})}(e)})}function PK(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};Mh(i,function(e,t){o[t]||OK(r,t)||(r[t]=e)}),n.label&&!OK(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function OK(e,t){return e.hasOwnProperty(t)}function RK(e,t){if(!e)return!1;for(var n=Nh(e)?e:[e],i=0;i<n.length;i++)if(n[i]&&n[i][t])return!0;return!1}function zK(e){iy(e,"label",["show"])}var FK=my(),VK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return $d(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(Jd.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=FK(e)[r];n&&n.data?(o?o._mergeOption(n,t,!0):(i&&zK(n),Mh(n.data,function(e){e instanceof Array?(zK(e[0]),zK(e[1])):zK(e)}),_h(o=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),FK(e)[r]=o):FK(e)[r]=null},this)},t.prototype.formatTooltip=function(e,t,n){var i=this.getData(),r=this.getRawValue(e),o=i.getName(e);return VI("section",{header:this.name,blocks:[VI("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=JT.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 FK(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(pM);Ch(VK,JT.prototype);var BK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(VK);function jK(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function GK(e,t,n,i,r,o){var a=[],s=WE(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=XK(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=Tv(t.get(i,u));return(d=Math.min(d,20))>=0&&(a[o]=+a[o].toFixed(d)),[a,c]}var WK={min:Eh(GK,"min"),max:Eh(GK,"max"),average:Eh(GK,"average"),median:Eh(GK,"median")};function HK(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)&&!Nh(t.coord)&&Nh(r)){var o=UK(t,n,i,e);if((t=vh(t)).type&&WK[t.type]&&o.baseAxis&&o.valueAxis){var a=wh(r,o.baseAxis.dim),s=wh(r,o.valueAxis.dim),l=WK[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&&Nh(r))for(var u=t.coord,c=0;c<2;c++)WK[u[c]]&&(u[c]=XK(n,n.mapDimension(r[c]),u[c]));else t.coord=[];return t}}function UK(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 YK(e,t){return!(e&&e.containData&&t.coord&&!jK(t))||e.containData(t.coord)}function ZK(e,t){return e?function(e,n,i,r){return iI(r<2?e.coord&&e.coord[r]:e.value,t[r])}:function(e,n,i,r){return iI(e.value,t[r])}}function XK(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 qK=my(),$K=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.init=function(){this.markerGroupMap=ip()},t.prototype.render=function(e,t,n){var i=this,r=this.markerGroupMap;r.each(function(e){qK(e).keep=!1}),t.eachSeries(function(e){var r=VK.getMarkerModelFromSeries(e,i.type);r&&i.renderSeries(e,r,t,n)}),r.each(function(e){!qK(e).keep&&i.group.remove(e.group)})},t.prototype.markKeep=function(e){qK(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;Mh(e,function(e){var i=VK.getMarkerModelFromSeries(e,n.type);i&&i.getData().eachItemGraphicEl(function(e){e&&(t?gb(e):mb(e))})})},t.type="marker",t}(uD);function KK(e,t,n){var i=t.coordinateSystem;e.each(function(r){var o,a=e.getItemModel(r),s=Cv(a.get("x"),n.getWidth()),l=Cv(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 JK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=VK.getMarkerModelFromSeries(e,"markPoint");t&&(KK(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 RO),u=function(e,t,n){var i;i=e?Th(e&&e.dimensions,function(e){return _h(_h({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var r=new RE(i,n),o=Th(n.get("data"),Eh(HK,t));e&&(o=Dh(o,Eh(YK,e)));var a=ZK(!!e,i);return r.initData(o,null,a),r}(r,e,t);t.setData(u),KK(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(Lh(i)||Lh(r)||Lh(o)||Lh(s)){var c=t.getRawValue(e),d=t.getDataParams(e);Lh(i)&&(i=i(c,d)),Lh(r)&&(r=r(c,d)),Lh(o)&&(o=o(c,d)),Lh(s)&&(s=s(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=uk(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){F_(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}($K);var QK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(VK),eJ=my(),tJ=function(e,t,n,i){var r,o=e.getData();if(Nh(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=Hh(i.yAxis,i.xAxis);else{var u=UK(i,o,t,e);s=u.valueAxis,l=XK(o,HE(o,u.valueDataDim),a)}var c="x"===s.dim?0:1,d=1-c,h=vh(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&&Rh(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&&mh("Invalid markLine data."),r=[]}var g=[HK(e,r[0]),HK(e,r[1]),_h({},r[2])];return g[2].type=g[2].type||null,yh(g[2],g[0]),yh(g[2],g[1]),g};function nJ(e){return!isNaN(e)&&!isFinite(e)}function iJ(e,t,n,i){var r=1-e,o=i.dimensions[e];return nJ(t[r])&&nJ(n[r])&&t[e]===n[e]&&i.getAxis(o).containData(t[e])}function rJ(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(iJ(1,n,i,e)||iJ(0,n,i,e)))return!0}return YK(e,t[0])&&YK(e,t[1])}function oJ(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=Cv(s.get("x"),r.getWidth()),u=Cv(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($O(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;nJ(e.get(c[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):nJ(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 aJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=VK.getMarkerModelFromSeries(e,"markLine");if(t){var i=t.getData(),r=eJ(t).from,o=eJ(t).to;r.each(function(t){oJ(r,t,!0,e,n),oJ(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 sG);this.group.add(l.group);var u=function(e,t,n){var i;i=e?Th(e&&e.dimensions,function(e){return _h(_h({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}];var r=new RE(i,n),o=new RE(i,n),a=new RE([],n),s=Th(n.get("data"),Eh(tJ,t,e,n));e&&(s=Dh(s,Eh(rJ,e)));var l=ZK(!!e,i);return r.initData(Th(s,function(e){return e[0]}),null,l),o.initData(Th(s,function(e){return e[1]}),null,l),a.initData(Th(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;eJ(t).from=c,eJ(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);oJ(t,n,r,e,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=uk(a,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Uh(o.get("symbolOffset",!0),m[r?0:1]),symbolRotate:Uh(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:Uh(o.get("symbolSize"),f[r?0:1]),symbol:Uh(o.get("symbol",!0),p[r?0:1]),style:s})}Nh(p)||(p=[p,p]),Nh(f)||(f=[f,f]),Nh(g)||(g=[g,g]),Nh(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){F_(e).dataModel=t,e.traverse(function(e){F_(e).dataModel=t})}),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}($K);var sJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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}(VK),lJ=my(),uJ=function(e,t,n,i){var r=i[0],o=i[1];if(r&&o){var a=HK(e,r),s=HK(e,o),l=a.coord,u=s.coord;l[0]=Hh(l[0],-1/0),l[1]=Hh(l[1],-1/0),u[0]=Hh(u[0],1/0),u[1]=Hh(u[1],1/0);var c=xh([{},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 cJ(e){return!isNaN(e)&&!isFinite(e)}function dJ(e,t,n,i){var r=1-e;return cJ(t[r])&&cJ(n[r])}function hJ(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 $O(e,"cartesian2d")?!(!n||!i||!dJ(1,n,i)&&!dJ(0,n,i))||function(e,t,n){return!(e&&e.containZone&&t.coord&&n.coord&&!jK(t)&&!jK(n))||e.containZone(t.coord,n.coord)}(e,r,o):YK(e,r)||YK(e,o)}function pJ(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=Cv(s.get(n[0]),r.getWidth()),u=Cv(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($O(a,"cartesian2d")){var m=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),x=e.get(n[1],t);cJ(y)?o[0]=m.toGlobalCoord(m.getExtent()["x0"===n[0]?0:1]):cJ(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 fJ=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],gJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=VK.getMarkerModelFromSeries(e,"markArea");if(t){var i=t.getData();i.each(function(t){var r=Th(fJ,function(r){return pJ(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 gv});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=Th(e&&e.dimensions,function(e){var n=t.getData();return _h(_h({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});r=Th(o,function(e,t){return{name:e,type:a[t%2].type}}),i=new RE(r,n)}else i=new RE(r=[{name:"value",type:"float"}],n);var s=Th(n.get("data"),Eh(uJ,t,e,n));e&&(s=Dh(s,Eh(hJ,e)));var l=e?function(e,t,n,i){return iI(e.coord[Math.floor(i/2)][i%2],r[i])}:function(e,t,n,i){return iI(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=Th(fJ,function(n){return pJ(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))];Mv(d),Mv(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=uk(a,"color");f.fill||(f.fill=g,Ph(f.fill)&&(f.fill=Pg(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(lJ(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new Mw({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var i=lJ(l).data.getItemGraphicEl(n),r=u.getItemLayout(e);r.allClipped?i&&l.group.remove(i):(i?Kw(i,{shape:{points:r.points}},t,e):i=new Mw({shape:{points:r.points}}),u.setItemGraphicEl(e,i),l.group.add(i))}).remove(function(e){var t=lJ(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")),PC(e,OC(i),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:Ph(r.fill)?Pg(r.fill,1):"#000"}),Eb(e,i),Ib(e,null,null,i.get(["emphasis","disabled"])),F_(e).dataModel=t}),lJ(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}($K);var mJ=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 $d(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"]),Nh(t)&&Mh(t,function(e,i){Ph(e)&&(e={type:e}),t[i]=yh(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&&py(i)&&t.push(i.name)}),this._availableNames=n;var i=this.get("data")||t,r=ip(),o=Th(i,function(e){return(Ph(e)||Rh(e))&&(e={name:e}),r.get(e.name)?null:(r.set(e.name,!0),new rS(e,this,this.ecModel))},this);this._data=Dh(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")&&Mh(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;Mh(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;Mh(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])&&wh(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}(pM),vJ=Eh,yJ=Mh,xJ=gv,_J=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return $d(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new xJ),this.group.add(this._selectorGroup=new xJ),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=aM(l,u,c),h=this.layoutInner(e,r,d,i,a,s),p=aM(bh({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=qq(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=ip(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){!e.get("legendHoverLink")&&c.push(e.id)}),yJ(t.getData(),function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new xJ;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",vJ(bJ,a,null,i,c)).on("mouseover",vJ(CJ,h.name,null,i,c)).on("mouseout",vJ(SJ,h.name,null,i,c)),n.ssr&&v.eachChild(function(e){var t=F_(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=kg(p.fill);g&&0===g[3]&&(g[3]=.2,p=_h(_h({},p),{fill:Og(g,"rgba")}));var m=this._createItem(s,a,o,r,t,e,{},p,f,u,i);m.on("click",vJ(bJ,null,a,i,c)).on("mouseover",vJ(CJ,null,a,i,c)).on("mouseout",vJ(SJ,null,a,i,c)),n.ssr&&m.eachChild(function(e){var t=F_(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();yJ(e,function(e){var i=e.type,r=new M_({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});o.add(r),PC(r,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),Tb(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),yJ(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?Jk(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 xJ,_=i.getModel("textStyle");if(!Lh(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=Mk(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;Ph(S)&&S?M=S.replace("{name}",null!=t?t:""):Lh(S)&&(M=S(t));var T=f?_.getTextColor():i.get("inactiveColor");x.add(new M_({style:RC(_,{text:M,x:w,y:p/2,fill:T,align:C,verticalAlign:"middle"},{inheritColor:T})}));var I=new w_({shape:x.getBoundingRect(),style:{fill:"transparent"}}),D=i.getModel("tooltip");return D.get("show")&&IC({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),Tb(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();oM(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){oM("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}(uD);function bJ(e,t,n,i){SJ(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),CJ(e,t,n,i)}function wJ(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 CJ(e,t,n,i){wJ(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function SJ(e,t,n,i){wJ(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}function MJ(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 TJ(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),IJ(n,r),o.push(n.componentIndex)});var a={};return n.eachComponent("legend",function(e){Mh(r,function(t,n){e[t?"select":"unSelect"](n)}),IJ(e,a)}),i?{selected:a,legendIndex:o}:{name:t.name,selected:a}}function IJ(e,t){var n=t||{};return Mh(e.getData(),function(t){var i=t.get("name");if("\n"!==i&&""!==i){var r=e.isSelected(i);sp(n,i)?n[i]=n[i]&&r:n[i]=r}}),n}function DJ(e){e.registerComponentModel(mJ),e.registerComponentView(_J),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,MJ),e.registerSubTypeDefaulter("legend",function(){return"plain"}),function(e){e.registerAction("legendToggleSelect","legendselectchanged",Eh(TJ,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Eh(TJ,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Eh(TJ,"inverseSelect")),e.registerAction("legendSelect","legendselected",Eh(TJ,"select")),e.registerAction("legendUnSelect","legendunselected",Eh(TJ,"unSelect"))}(e)}var kJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,i){var r=cM(t);e.prototype.init.call(this,t,n,i),AJ(this,t,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),AJ(this,this.option,t)},t.type="legend.scroll",t.defaultOption=sS(mJ.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}(mJ);function AJ(e,t,n){var i=[1,1];i[e.getOrient().index]=0,uM(t,n,{type:"box",ignoreSize:!!i})}var EJ=gv,NJ=["width","height"],LJ=["x","y"],PJ=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 $d(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new EJ),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new EJ)},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=Nh(c)?c:[c,c];p("pagePrev",0);var h=n.getModel("pageTextStyle");function p(e,t){var i=e+"DataIndex",o=CC(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:Ah(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 M_({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=NJ[s],u=LJ[s],c=NJ[1-s],d=LJ[1-s];r&&oM("horizontal",a,e.get("selectorItemGap",!0));var h=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=vh(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;oM(e.get("orient"),l,e.get("itemGap"),i?n.width:null,i?null:n.height),oM("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=Uh(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 w_({shape:x})),u.__rectSize=x[r]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(e);return null!=_.pageIndex&&Kw(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;Mh(["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",Ph(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=NJ[r],a=LJ[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}(_J);function OJ(e){uE(DJ),e.registerComponentModel(kJ),e.registerComponentView(PJ),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 RJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="dataZoom.inside",t.defaultOption=sS(Nq.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Nq),zJ=my();function FJ(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function VJ(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function BJ(e,t,n,i){return e.coordinateSystem.containPoint([n,i])}function jJ(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=zJ(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=ip());i.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){Mh(Aq(e).infoList,function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(e,t){var n={model:t,containsPoint:Eh(BJ,t),dispatchAction:Eh(VJ,e),dataZoomInfoMap:null,controller:null},i=n.controller=new xF(e.getZr());return Mh(["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=ip())).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),CD(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else FJ(i,e)})})}var GJ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return $d(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:Ah(WJ.pan,this),zoom:Ah(WJ.zoom,this),scrollMove:Ah(WJ.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||FJ(n,a))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(Oq),WJ={zoom:function(e,t,n,i){var r=this.range,o=r.slice(),a=e.axisModels[0];if(a){var s=UJ[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 tW(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:HJ(function(e,t,n,i,r,o){var a=UJ[i]([o.oldX,o.oldY],[o.newX,o.newY],t,r,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:HJ(function(e,t,n,i,r,o){return UJ[i]([0,0],[o.scrollDelta,o.scrollDelta],t,r,n).signal*(e[1]-e[0])*o.scrollDelta})};function HJ(e){return function(t,n,i,r){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s)return tW(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 UJ={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 YJ(e){Gq(e),e.registerComponentModel(RJ),e.registerComponentView(GJ),jJ(e)}var ZJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=sS(Nq.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}(Nq),XJ=w_,qJ="horizontal",$J="vertical",KJ=["line","bar","candlestick","scatter"],JJ={easing:"cubicOut",duration:100,delay:0},QJ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return $d(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=Ah(this._onBrush,this),this._onBrushEnd=Ah(this._onBrushEnd,this)},t.prototype.render=function(t,n,i,r){if(e.prototype.render.apply(this,arguments),CD(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(){SD(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 gv;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===qJ?{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=cM(e.option);Mh(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=o[e])});var s=aM(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===$J&&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!==qJ||r?n===qJ&&r?{scaleY:a?1:-1,scaleX:-1}:n!==$J||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 XJ({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var r=new XJ({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Ah(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:wv(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 gv,i=new Mw({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Iw({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){Mh(e.getAxisProxy(r,o).getTargetSeriesModels(),function(e){if(!(n||!0!==t&&wh(KJ,e.get("type"))<0)){var a,s=i.getComponent(Dq(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 XJ({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new XJ({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)"}})),Mh([0,1],function(t){var o=a.get("handleIcon");!wk[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o,"production"!==process.env.NODE_ENV&&qv("handleIcon now needs 'path://' prefix when using a path string"));var s=Mk(o,-1,0,2,2,null,!0);s.attr({cursor:eQ(this._orient),draggable:!0,drift:Ah(this._onDragMove,this,t),ondragend:Ah(this._onDragEnd,this),onmouseover:Ah(this._showDataInfo,this,!0),onmouseout:Ah(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Cv(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(),Tb(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 M_({silent:!0,invisible:!h,style:RC(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=Cv(a.get("moveHandleSize"),o[1]),p=t.moveHandle=new w_({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=Mk(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 w_({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:eQ(this._orient),drift:Ah(this._onDragMove,this,"all"),ondragstart:Ah(this._showDataInfo,this,!0),ondragend:Ah(this._onDragEnd,this),onmouseover:Ah(this._showDataInfo,this,!0),onmouseout:Ah(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[wv(e[0],[0,100],t,!0),wv(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];tW(t,i,r,n.get("zoomLock")?"all":e,null!=o.minSpan?wv(o.minSpan,a,r,!0):null,null!=o.maxSpan?wv(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Mv([wv(i[0],r,a,!0),wv(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=Mv(n.slice()),r=this._size;Mh([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 w_,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=Mv(this._handleEnds.slice());function d(e){var t=vC(n.handles[e].parent,this.group),a=xC(0===e?"right":"left",t),s=this._handleWidth/2+5,l=yC([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],verticalAlign:r===qJ?"middle":a,align:r===qJ?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 Lh(i)?i(e,o):Ph(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,qp(i.event);var r=yC([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 uf(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=Mv([wv(n.x,i,r,!0),wv(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&&(qp(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 XJ({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?JJ:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Aq(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}(Oq);function eQ(e){return"vertical"===e?"ns-resize":"ew-resize"}function tQ(e){e.registerComponentModel(ZJ),e.registerComponentView(QJ),Gq(e)}var nQ=function(e,t,n){var i=vh((iQ[e]||{})[t]);return n&&Nh(i)?i[i.length-1]:i},iQ={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]}},rQ=ZB.mapVisual,oQ=ZB.eachVisual,aQ=Nh,sQ=Mh,lQ=Mv,uQ=wv,cQ=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 $d(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&rK(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=Ah(e,this),this.controllerVisuals=iK(this.option.controller,t,e),this.targetVisuals=iK(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=ny(e),t},t.prototype.eachTargetSeries=function(e,t){Mh(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||["<",">"],Nh(e)&&(e=e.slice(),i=!0);var l=t?e:i?[u(e[0]),u(e[1])]:u(e);return Ph(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):Lh(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=lQ([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={});yh(i,n),yh(r,n);var o=this.isCategory();function a(n){aQ(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]={},sQ(i,function(e,t){if(ZB.isValidType(t)){var n=nQ(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";sQ(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&&vh(t)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&vh(n)||(o?s[0]:[s[0],s[0]])),l.symbol=rQ(l.symbol,function(e){return"none"===e?r:e});var u=l.symbolSize;if(null!=u){var c=-1/0;oQ(u,function(e){e>c&&(c=e)}),l.symbolSize=rQ(u,function(e){return uQ(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}(pM),dQ=[20,140],hQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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]=dQ[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=dQ[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Nh(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),Mh(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=Mv((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=pQ(this,"outOfRange",this.getExtent()),n=pQ(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=sS(cQ.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}(cQ);function pQ(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 fQ=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 $d(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=XS(t.get("padding")||0),i=e.getBoundingRect();e.add(new w_({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 Mh(ZB.prepareVisualTypes(u),function(i){var r=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",r=u.__alphaForOpacity),ZB.dependsOn(i,t)&&r&&r.applyVisual(e,s,l)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;sM(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,i){},t.type="visualMap",t}(uD),gQ=[["left","right","width"],["top","bottom","height"]];function mQ(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=gQ[a],l=[0,null,10],u={},c=0;c<3;c++)u[gQ[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=aM(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 vQ(e,t){return Mh(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var yQ=wv,xQ=Mh,_Q=Math.min,bQ=Math.max,wQ=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 $d(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Ah(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Ah(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 M_({style:RC(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=mQ(t,this.api,i),s=n.mainGroup=this._createBarGroup(a),l=new gv;s.add(l),l.add(n.outOfRange=CQ()),l.add(n.inRange=CQ(null,o?MQ(this._orient):null,Ah(this._dragHandle,this,"all",!1),Ah(this._dragHandle,this,"all",!0))),l.setClipPath(new w_({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=bQ(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=Ah(this._dragHandle,this,n,!1),s=Ah(this._dragHandle,this,n,!0),l=iv(e.get("handleSize"),i[0]),u=Mk(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=MQ(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){qp(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(),Nb(u,!0),t.add(u);var d=this.visualMapModel.textStyleModel,h=new M_({cursor:c,draggable:!0,drift:a,onmousemove:function(e){qp(e.event)},ondragend:s,style:RC(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=iv(e.get("indicatorSize"),n[0]),a=Mk(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 g_){var l=a.style;a.useStyle(_h({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 M_({silent:!0,invisible:!0,style:RC(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():SQ(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=[yQ(t[0],n,i,!0),yQ(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]];tW(t,i,r,e,0);var o=n.getExtent();this._dataInterval=[yQ(i[0],r,o,!0),yQ(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 Vw(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 gv("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);xQ([0,1],function(u){var c=r[u];c.setStyle("fill",t.handlesColor[u]),c.y=e[u];var d=yQ(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=yC(n.handleLabelPoints[u],vC(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=yQ(e,o,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var g=yC(l.indicatorLabelPoint,vC(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]=_Q(bQ(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=_Q(bQ(r[0],e),r[1]);var a=function(e,t,n){var i=6,r=e.get("hoverLinkDataSize");r&&(i=yQ(r,t,n,!0)/2);return i}(n,o,r),s=[e-a,e+a],l=yQ(e,r,o,!0),u=[yQ(s[0],r,o,!0),yQ(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||SQ(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=cy(e[i].seriesId,null);if(null==o)return;for(var a=ny(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",vQ(h[0],n)),this._dispatchHighDown("highlight",vQ(h[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(pk(e.target,function(e){var n=F_(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",vQ(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=vC(t,i?null:this.group);return Nh(e)?yC(e,r,n):xC(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}(fQ);function CQ(e,t,n,i){return new Mw({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){qp(e.event)},ondragend:i})}function SQ(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function MQ(e){return"vertical"===e?"ns-resize":"ew-resize"}var TQ={type:"selectDataRange",event:"dataRangeSelected",update:"update"},IQ=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},DQ=[{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=Ah(t.getValueState,t),a=t.getDataDimensionIndex(e.getData()),s={},Mh(i,function(e){var t=ZB.prepareVisualTypes(r[e]);s[e]=t}),{progress:function(e,t){var n,i;function l(e){return lk(t,i,e)}function u(e,n){ck(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(Ah(kQ,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(r.dimension=o,i.push(r))}}),e.getData().setVisual("visualMeta",i)}}];function kQ(e,t,n,i){for(var r=t.targetVisuals[i],o=ZB.prepareVisualTypes(r),a={color:uk(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 AQ=Mh;function EQ(e){var t=e&&e.visualMap;Nh(t)||(t=t?[t]:[]),AQ(t,function(e){if(e){NQ(e,"splitList")&&!NQ(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Nh(t)&&AQ(t,function(e){zh(e)&&(NQ(e,"start")&&!NQ(e,"min")&&(e.min=e.start),NQ(e,"end")&&!NQ(e,"max")&&(e.max=e.end))})}})}function NQ(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var LQ=!1;function PQ(e){LQ||(LQ=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(TQ,IQ),Mh(DQ,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(EQ))}function OQ(e){e.registerComponentModel(hQ),e.registerComponentView(wQ),PQ(e)}var RQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return $d(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=vh(r)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Th(this._pieceList,function(e){return e=vh(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},i=ZB.listVisualTypes(),r=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}Mh(t.pieces,function(e){Mh(i,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),Mh(n,function(e,n){var i=!1;Mh(this.stateList,function(e){i=i||o(t,e,n)||o(t.target,e,n)},this),!i&&Mh(this.stateList,function(e){(t[e]||(t[e]={}))[n]=nQ(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,Mh(i,function(e,t){var n=this.getSelectedMapKey(e);r.hasOwnProperty(n)||(r[n]=!0)},this),"single"===n.selectedMode){var o=!1;Mh(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=vh(e)},t.prototype.getValueState=function(e){var t=ZB.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){ZB.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 Mh(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=sS(cQ.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}(cQ),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]}),Fv(e),Mh(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;Mh(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),FQ(t,e)},pieces:function(e){var t=this.option;Mh(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=ZB.retrieveVisuals(t),e.push(i)},this),FQ(t,e),Fv(e),Mh(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 FQ(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var VQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return $d(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=Hh(t.get("showLabel",!0),!u),d=!t.get("selectedMode");u&&this._renderEndsText(e,u[0],s,c,a),Mh(l.viewPieceList,function(i){var l=i.piece,u=new gv;u.onclick=Ah(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 M_({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),oM(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:vQ(i.findTargetDataIndices(t),i)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return mQ(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 gv,a=this.visualMapModel.textStyleModel;o.add(new M_({style:RC(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=Th(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=Mk(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=vh(n.selected),o=t.getSelectedMapKey(e);"single"===i||!0===i?(r[o]=!0,Mh(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}(fQ);function BQ(e){e.registerComponentModel(RQ),e.registerComponentView(VQ),PQ(e)}var jQ={label:{enabled:!0},decal:{show:!1}},GQ=my(),WQ={};function HQ(e,t){var n=e.getModel("aria");if(n.get("enabled")){var i=vh(jQ);yh(i.label,e.getLocaleModel().get("aria"),!1),yh(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var t=ip();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),GQ(e).scope=n}}),e.eachRawSeries(function(t){if(!e.isSeriesFiltered(t))if(Lh(t.enableAriaDecal))t.enableAriaDecal();else{var n=t.getData();if(t.isColorBySeries()){var i=GM(t.ecModel,t.name,WQ,e.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=t.getRawData(),a={},s=GQ(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=GM(t.ecModel,r,s,l),d=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(d,c))})}}function u(e,t){var n=e?_h(_h({},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=bh(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?Dh(s.getValues(m),function(e,t){return-1===wh(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(!Ph(e))return e;var n=e;return Mh(t,function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)}),n}}function UQ(e){if(e&&e.aria){var t=e.aria;null!=t.show&&(t.enabled=t.show),t.label=t.label||{},Mh(["description","general","series","data"],function(e){null!=t[e]&&(t.label[e]=t[e])})}}var YQ={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},ZQ=function(){function e(e){if(null==(this._condVal=Ph(e)?new RegExp(e):Gh(e)?e:null)){var t="";"production"!==process.env.NODE_ENV&&(t=Kv("Illegal regexp",e,"in")),Jv(t)}}return e.prototype.evaluate=function(e){var t=typeof e;return Ph(t)?this._condVal.test(e):!!Rh(t)&&this._condVal.test(e+"")},e}(),XQ=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),qQ=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}(),$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!0;return!1},e}(),KQ=function(){function e(){}return e.prototype.evaluate=function(){return!this.child.evaluate()},e}(),JQ=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 QQ(e,t){if(!0===e||!1===e){var n=new XQ;return n.value=e,n}var i="";return t0(e)||("production"!==process.env.NODE_ENV&&(i=Kv("Illegal config. Expect a plain object but actually",e)),Jv(i)),e.and?e0("and",e,t):e.or?e0("or",e,t):e.not?function(e,t){var n=e.not,i="";"production"!==process.env.NODE_ENV&&(i=Kv('"not" condition should only be `not: {}`.',"Illegal condition:",e));t0(n)||Jv(i);var r=new KQ;r.child=QQ(n,t),r.child||Jv(i);return r}(e,t):function(e,t){for(var n="",i=t.prepareGetValue(e),r=[],o=kh(e),a=e.parser,s=a?oI(a):null,l=0;l<o.length;l++){var u=o[l];if("parser"!==u&&!t.valueGetterAttrMap.get(u)){var c=sp(YQ,u)?YQ[u]:u,d=e[u],h=s?s(d):d,p=cI(c,h)||"reg"===c&&new ZQ(h);p||("production"!==process.env.NODE_ENV&&(n=Kv('Illegal relational operation: "'+u+'" in condition:',e)),Jv(n)),r.push(p)}}r.length||("production"!==process.env.NODE_ENV&&(n=Kv("Relational condition must have at least one operator.","Illegal condition:",e)),Jv(n));var f=new JQ;return f.valueGetterParam=i,f.valueParser=s,f.getValue=t.getValue,f.subCondList=r,f}(e,t)}function e0(e,t,n){var i=t[e],r="";"production"!==process.env.NODE_ENV&&(r=Kv('"and"/"or" condition should only be `'+e+": [...]` and must not be empty array.","Illegal condition:",t)),Nh(i)||Jv(r),i.length||Jv(r);var o="and"===e?new qQ:new $Q;return o.children=Th(i,function(e){return QQ(e,n)}),o.children.length||Jv(r),o}function t0(e){return zh(e)&&!Sh(e)}var n0=function(){function e(e,t){this._cond=QQ(e,t)}return e.prototype.evaluate=function(){return this._cond.evaluate()},e}();var i0={type:"echarts:filter",transform:function(e){for(var t,n,i,r=e.upstream,o=(n=e.config,i={valueGetterAttrMap:ip({dimension:!0}),prepareGetValue:function(e){var t="",n=e.dimension;sp(e,"dimension")||("production"!==process.env.NODE_ENV&&(t=Kv('Relation condition must has prop "dimension" specified.',"Illegal condition:",e)),Jv(t));var i=r.getDimensionInfo(n);return i||("production"!==process.env.NODE_ENV&&(t=Kv("Can not find dimension info via: "+n+".\n","Existing dimensions: ",r.cloneAllDimensionInfo(),".\n","Illegal condition:",e,".\n")),Jv(t)),{dimIdx:i.index}},getValue:function(e){return r.retrieveValueFromItem(t,e.dimIdx)}},new n0(n,i)),a=[],s=0,l=r.count();s<l;s++)t=r.getRawDataItem(s),o.evaluate()&&a.push(t);return{data:a}}},r0="";"production"!==process.env.NODE_ENV&&(r0=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var o0={type:"echarts:sort",transform:function(e){var t=e.upstream,n=e.config,i="",r=ny(n);r.length||("production"!==process.env.NODE_ENV&&(i="Empty `config` in sort transform."),Jv(i));var o=[];Mh(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.'+r0),Jv(i)),"asc"!==r&&"desc"!==r&&("production"!==process.env.NODE_ENV&&(i='Sort transform config must has "order" specified.'+r0),Jv(i)),s&&"min"!==s&&"max"!==s){var l="";"production"!==process.env.NODE_ENV&&(l='incomparable must be "min" or "max" rather than "'+s+'".'),Jv(l)}if("asc"!==r&&"desc"!==r){var u="";"production"!==process.env.NODE_ENV&&(u='order must be "asc" or "desc" rather than "'+r+'".'),Jv(u)}var c=t.getDimensionInfo(n);c||("production"!==process.env.NODE_ENV&&(i=Kv("Can not find dimension info via: "+n+".\n","Existing dimensions: ",t.cloneAllDimensionInfo(),".\n","Illegal config:",e,".\n")),Jv(i));var d=a?oI(a):null;a&&!d&&("production"!==process.env.NODE_ENV&&(i=Kv("Invalid parser name "+a+".\n","Illegal config:",e,".\n")),Jv(i)),o.push({dimIdx:c.index,parser:d,comparator:new lI(r,s)})});var a=t.sourceFormat;a!==xM&&a!==_M&&("production"!==process.env.NODE_ENV&&(i='sourceFormat "'+a+'" is not supported yet'),Jv(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 a0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return $d(t,e),t.prototype.init=function(t,n,i){e.prototype.init.call(this,t,n,i),this._sourceManager=new EI(this),NI(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),NI(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:SM},t}(pM),s0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return $d(t,e),t.type="dataset",t}(uD);var l0=Wx.CMD;function u0(e,t){return Math.abs(e-t)<1e-5}function c0(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){u0(e,i)&&u0(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!==l0.L&&v!==l0.C&&v!==l0.Q||(t=[d,h])),v){case l0.M:u=d=a[m++],c=h=a[m++],p(d,h);break;case l0.L:f(u,c,n=a[m++],i=a[m++]),u=n,c=i;break;case l0.C:t.push(a[m++],a[m++],a[m++],a[m++],u=a[m++],c=a[m++]);break;case l0.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 l0.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 l0.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 l0.Z:t&&f(u,c,d,h),u=d,c=h}}return t&&t.length>2&&l.push(t),l}function d0(e,t,n,i,r,o,a,s,l,u){if(u0(e,n)&&u0(t,i)&&u0(r,a)&&u0(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=[];ng(e,n,r,a,.5,C),ng(t,i,o,s,.5,S),d0(C[0],S[0],C[1],S[1],C[2],S[2],C[3],S[3],l,u),d0(C[4],S[4],C[5],S[5],C[6],S[6],C[7],S[7],l,u)}}}}function h0(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 p0(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=h0([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 f0(e,t,n,i){return e*i-n*t}function g0(e,t,n,i,r,o,a,s){var l=n-e,u=i-t,c=a-r,d=s-o,h=f0(c,d,l,u);if(Math.abs(h)<1e-6)return null;var p=f0(e-r,t-o,c,d)/h;return p<0||p>1?null:new uf(p*l+e,p*u+t)}function m0(e,t,n){var i=new uf;uf.sub(i,n,t),i.normalize();var r=new uf;return uf.sub(r,e,t),r.dot(i)}function v0(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function y0(e){var t=e.points,n=[],i=[];vx(t,n,i);var r=new yf(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 uf,c=new uf;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=g0(a[0],a[1],s[0],s[1],t.x,t.y,n.x,n.y);l&&r.push({projPt:m0(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++)v0(f,e[o].slice());for(v0(f,p),v0(f,h),o=c.idx+1;o<=u.idx+i;o++)v0(g,e[o%i].slice());return v0(g,h),v0(g,p),[{points:f},{points:g}]}(t,u,c)}function x0(e,t,n,i){if(1===n)i.push(t);else{var r=Math.floor(n/2),o=e(t);x0(e,o[0],r,i),x0(e,o[1],n-r,i)}return i}function _0(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function b0(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=h0([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=w_;break;case"sector":p0(r,t,i),n=_w;break;case"circle":p0({r0:0,r:r.r,startAngle:0,endAngle:2*Math.PI,cx:r.cx,cy:r.cy},t,i),n=_w;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=Th(function(e,t){var n=c0(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++];d0(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)x0(y0,{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=Th(s,function(e){var t=[],n=[];vx(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||(x0(y0,{points:p.poly},f,i),h-=f)}}n=Mw}if(!n)return function(e,t){for(var n=[],i=0;i<t;i++)n.push(tw(e));return n}(e,t);var g=[];for(u=0;u<i.length;u++){var m=new n;m.setShape(i[u]),_0(e,m),g.push(m)}return g}function w0(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;ng(f,m,y,_,S,r),ng(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 C0(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 S0(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 M0(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 T0(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 I0(e){return e.__isCombineMorphing}var D0="__mOriginal_";function k0(e,t,n){var i=D0+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 A0(e,t){var n=D0+t;e[n]&&(e[t]=e[n],e[n]=null)}function E0(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 N0(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=w0(l,u))[0],r=d=n[1]):(d=C0(r||l,l),c=l):(c=C0(i||u,u),d=u),o.push(c),a.push(d)}return[o,a]}(c0(n),c0(i)),o=r[0],a=r[1],s=e.getComputedTransform(),l=t.getComputedTransform();s&&E0(o,s),l&&E0(a,l),k0(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=S0(s),c=S0(l);null==r&&(r=u[2]<0!=c[2]<0);var d=[],h=[],p=0,f=1/0,g=[],m=s.length;r&&(s=T0(s));for(var v=6*M0(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=[];k0(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);Cp(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 L0(e,t,n){if(!e||!t)return t;var i=n.done,r=n.during;return N0(e,t),t.__morphT=0,t.animateTo({__morphT:1},bh({during:function(e){t.dirtyShape(),r&&r(e)},done:function(){A0(t,"buildPath"),A0(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),i&&i()}},n)),t}function P0(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 O0(e){var t=1/0,n=1/0,i=-1/0,r=-1/0,o=Th(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 Th(o,function(o,a){return{cp:o,z:P0(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 R0(e){return b0(e.path,e.count)}function z0(e){return Nh(e[0])}function F0(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 V0={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=tw(e.path);r.setStyle("opacity",n),t.push(r)}return t},split:null};function B0(e,t,n,i,r,o){if(e.length&&t.length){var a=qw("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?F0(l,s):F0(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=bh({dividePath:V0[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];I0(r)?e(r.childrenRef()):r instanceof c_&&i.push(r)}}(e);var r=i.length;if(!r)return{fromIndividuals:[],toIndividuals:[],count:0};var o=(n.dividePath||R0)({path:t,count:r});if(o.length!==r)return{fromIndividuals:[],toIndividuals:[],count:0};i=O0(i),o=O0(o);for(var a=n.done,s=n.during,l=n.individualDelay,u=new Zm,c=0;c<r;c++){var d=i[c],h=o[c];h.parent=t,h.copyTransform(u),l||N0(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,A0(t,"addSelfToZr"),A0(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return o},k0(t,"addSelfToZr",{after:function(e){p(e)}}),k0(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?bh({delay:(n.delay||0)+l(c,g,i[c],o[c]),done:v},n):n;L0(i[c],o[c],y)}}else t.__morphT=0,t.animateTo({__morphT:1},bh({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++)A0(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||R0;if(I0(e)){!function e(t){for(var n=0;n<t.length;n++){var i=t[n];I0(i)?e(i.childrenRef()):i instanceof c_&&r.push(i)}}(e.childrenRef());var a=r.length;if(a<i)for(var s=0,l=a;l<i;l++)r.push(tw(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=O0(r),t=O0(t);var c=n.individualDelay;for(l=0;l<i;l++){var d=c?bh({delay:(n.delay||0)+c(l,i,r[l],t[l])},n):n;L0(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?bh({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(I0(x))m({many:[x],one:_},!0,i,r,!0);else L0(x,_,y=u?bh({delay:u(i,r)},c):c),o(x,_,x,_,y)}}}function j0(e){if(!e)return[];if(Nh(e)){for(var t=[],n=0;n<e.length;n++)t.push(j0(e[n]));return t}var i=[];return e.traverse(function(e){e instanceof c_&&!e.disableMorphing&&!e.invisible&&!e.ignore&&i.push(e)}),i}var G0=my();function W0(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 H0(e){var t=[];return Mh(e,function(e){var n=e.data,i=e.dataGroupId;if(n.count()>1e4)"production"!==process.env.NODE_ENV&&Zv("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:W0(n,o,i,!1),childGroupId:W0(n,o,i,!0),divide:e.divide,dataIndex:o})}),t}function U0(e,t,n){e.traverse(function(e){e instanceof c_&&Jw(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function Y0(e){if(e.parent){var t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function Z0(e){e.stopAnimation(),e.isGroup&&e.traverse(function(e){e.stopAnimation()})}function X0(e,t,n){var i=qw("update",n,t);i&&e.traverse(function(e){if(e instanceof ax){var t=function(e){return Xw(e).oldStyle}(e);t&&e.animateFrom({style:t},i)}})}function q0(e,t,n){var i=H0(e),r=H0(t);function o(e,t,n,i,r){(n||e)&&t.animateFrom({style:n&&n!==e?_h(_h({},n.style),e.style):e.style},r)}var a=!1,s=0,l=ip(),u=ip();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&&(Z0(c),u?(Z0(u),Y0(u),a=!0,B0(j0(u),j0(c),s.divide,l,e,o)):U0(c,l,e)):c&&X0(c,s.dataIndex,l)}new hE(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=Dh(Th(t,function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)}),function(e){return e&&e!==u&&!g[e.id]});u&&(Z0(u),c.length?(Mh(c,function(e){Z0(e),Y0(e)}),a=!0,B0(j0(c),j0(u),n.divide,l,e,o)):U0(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=Dh(Th(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&&(Mh(l,function(e){return Z0(e)}),s?(Z0(s),Y0(s),a=!0,B0(j0(s),j0(l),n.divide,u,e[0],o)):Mh(l,function(t){return U0(t,u,e[0])}))}}).updateManyToMany(function(e,t){new hE(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&&Mh(t,function(e){var t=e.data.hostModel,i=t&&n.getViewOfSeriesModel(t),r=qw("update",t,0);i&&t.isAnimationEnabled()&&r&&r.duration>0&&i.group.traverse(function(e){e instanceof c_&&!e.animators.length&&e.animateFrom({style:{opacity:0}},r)})})}function $0(e){var t=e.getModel("universalTransition").get("seriesKey");return t||e.id}function K0(e){return Nh(e)?e.sort().join(","):e}function J0(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function Q0(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}}uE([function(e){e.registerPainter("canvas",IO)}]),uE([function(e){e.registerPainter("svg",_O)}]),uE([function(e){e.registerChartView(lR),e.registerSeriesModel(DO),e.registerLayout(uR("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,hR("line"))},function(e){e.registerChartView(wR),e.registerSeriesModel(fR),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Eh(mN,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,vN("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,hR("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(KR),e.registerSeriesModel(tz),dk("pie",e.registerAction),e.registerLayout(Eh(GR,"pie")),e.registerProcessor(HR("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!(Rh(i)&&!isNaN(i)&&i<0)})}})},function(e){uE(tF),e.registerSeriesModel(nz),e.registerChartView(az),e.registerLayout(uR("scatter"))},function(e){uE(gF),e.registerChartView(aF),e.registerSeriesModel(sF),e.registerLayout(nF),e.registerProcessor(HR("radar")),e.registerPreprocessor(oF)},function(e){uE(HV),e.registerChartView(MV),e.registerSeriesModel(TV),e.registerLayout(DV),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,IV),dk("map",e.registerAction)},function(e){e.registerChartView(nB),e.registerSeriesModel(SB),e.registerLayout(TB),e.registerVisual(IB),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=jV(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)})})}(e)},function(e){e.registerSeriesModel(AB),e.registerChartView(WB),e.registerVisual(aj),e.registerLayout(xj),function(e){for(var t=0;t<DB.length;t++)e.registerAction({type:DB[t],update:"updateView"},lp);e.registerAction({type:"treemapRootToNode",update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},function(t,n){var i=_B(e,["treemapZoomToNode","treemapRootToNode"],t);if(i){var r=t.getViewRoot();r&&(e.direction=wB(r,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})})}(e)},function(e){e.registerChartView(_G),e.registerSeriesModel(IG),e.registerProcessor(Mj),e.registerVisual(Tj),e.registerVisual(Dj),e.registerLayout(Fj),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,Yj),e.registerLayout(Xj),e.registerCoordinateSystem("graphView",{dimensions:AV.dimensions,create:qj}),e.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},lp),e.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},lp),e.registerAction(DG,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(t){var i=jV(t.coordinateSystem,e,void 0,n);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)})})},function(e){e.registerChartView(NG),e.registerSeriesModel(LG)},function(e){e.registerChartView(RG),e.registerSeriesModel(zG),e.registerLayout(FG),e.registerProcessor(HR("funnel"))},function(e){uE(dH),e.registerChartView(VG),e.registerSeriesModel(UG),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,XG)},function(e){e.registerChartView(fH),e.registerSeriesModel(mH),e.registerLayout(vH),e.registerVisual(kH),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(EH),e.registerChartView(NH),e.registerLayout(VH),e.registerTransform(BH)},function(e){e.registerChartView($H),e.registerSeriesModel(sU),e.registerPreprocessor(lU),e.registerVisual(XH),e.registerLayout(uU)},function(e){e.registerChartView(pU),e.registerSeriesModel(fU),e.registerLayout(uR("effectScatter"))},function(e){e.registerChartView(wU),e.registerSeriesModel(TU),e.registerLayout(bU),e.registerVisual(DU)},function(e){e.registerChartView(EU),e.registerSeriesModel(NU)},function(e){e.registerChartView(RU),e.registerSeriesModel(eY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Eh(mN,"pictorialBar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,vN("pictorialBar"))},function(e){e.registerChartView(tY),e.registerSeriesModel(nY),e.registerLayout(iY),e.registerProcessor(HR("themeRiver"))},function(e){e.registerChartView(lY),e.registerSeriesModel(uY),e.registerLayout(Eh(hY,"sunburst")),e.registerProcessor(Eh(HR,"sunburst")),e.registerVisual(fY),function(e){e.registerAction({type:aY,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t,n){var i=_B(e,[aY],t);if(i){var r=t.getViewRoot();r&&(e.direction=wB(r,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})}),e.registerAction({type:sY,update:"none"},function(e,t,n){e=_h({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){var n=_B(e,[sY],t);n&&(e.dataIndex=n.node.dataIndex)}),"production"!==process.env.NODE_ENV&&$v("sunburstHighlight","highlight"),n.dispatchAction(_h(e,{type:"highlight"}))}),e.registerAction({type:"sunburstUnhighlight",update:"updateView"},function(e,t,n){e=_h({},e),"production"!==process.env.NODE_ENV&&$v("sunburstUnhighlight","downplay"),n.dispatchAction(_h(e,{type:"downplay"}))})}(e)},function(e){e.registerChartView(dZ),e.registerSeriesModel(yY)}]),uE(function(e){uE(tF),uE(hX)}),uE(function(e){uE(hX),Wz.registerAxisPointerClass("PolarAxisPointer",pX),e.registerCoordinateSystem("polar",IX),e.registerComponentModel(gX),e.registerComponentView(WX),fz(e,"angle",vX,jX),fz(e,"radius",yX,GX),e.registerComponentView(NX),e.registerComponentView(RX),e.registerLayout(Eh(BX,"bar"))}),uE(HV),uE(function(e){uE(hX),Wz.registerAxisPointerClass("SingleAxisPointer",iq),e.registerComponentView(sq),e.registerComponentView(ZX),e.registerComponentModel(qX),fz(e,"single",qX,qX.defaultOption),e.registerCoordinateSystem("single",eq)}),uE(dH),uE(function(e){e.registerComponentModel(lq),e.registerComponentView(cq),e.registerCoordinateSystem("calendar",hq)}),uE(function(e){e.registerComponentModel(yq),e.registerComponentView(bq),e.registerPreprocessor(function(e){var t=e.graphic;Nh(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}),uE(function(e){e.registerComponentModel(Xq),e.registerComponentView($q),Yq("saveAsImage",Kq),Yq("magicType",e$),Yq("dataView",s$),Yq("dataZoom",k$),Yq("restore",h$),uE(Wq)}),uE(function(e){uE(hX),e.registerComponentModel(N$),e.registerComponentView(q$),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},lp),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},lp)}),uE(hX),uE(function(e){e.registerComponentView(vK),e.registerComponentModel(yK),e.registerPreprocessor(eK),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,hK),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"},lp),e.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},lp),Yq("brush",bK)}),uE(function(e){e.registerComponentModel(wK),e.registerComponentView(CK)}),uE(function(e){e.registerComponentModel(MK),e.registerComponentView(AK),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)}),bh({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(LK)}),uE(function(e){e.registerComponentModel(BK),e.registerComponentView(JK),e.registerPreprocessor(function(e){RK(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}),uE(function(e){e.registerComponentModel(QK),e.registerComponentView(aJ),e.registerPreprocessor(function(e){RK(e.series,"markLine")&&(e.markLine=e.markLine||{})})}),uE(function(e){e.registerComponentModel(sJ),e.registerComponentView(gJ),e.registerPreprocessor(function(e){RK(e.series,"markArea")&&(e.markArea=e.markArea||{})})}),uE(function(e){uE(DJ),uE(OJ)}),uE(function(e){uE(YJ),uE(tQ)}),uE(YJ),uE(tQ),uE(function(e){uE(OQ),uE(BQ)}),uE(OQ),uE(BQ),uE(function(e){e.registerPreprocessor(UQ),e.registerVisual(e.PRIORITY.VISUAL.ARIA,HQ)}),uE(function(e){e.registerTransform(i0),e.registerTransform(o0)}),uE(function(e){e.registerComponentModel(a0),e.registerComponentView(s0)}),uE(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){Mh(ny(n.seriesTransition),function(e){Mh(ny(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][eD]=!0)})})}),e.registerUpdateLifecycle("series:transition",function(e,t,n){var i=G0(t);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var r=n.seriesTransition;if(r)Mh(ny(r),function(e){!function(e,t,n,i){var r=[],o=[];Mh(ny(e.from),function(e){var n=Q0(t.oldSeries,e);n>=0&&r.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:J0(t.oldData[n]),groupIdDim:e.dimension})}),Mh(ny(e.to),function(e){var i=Q0(n.updatedSeries,e);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:t.oldDataGroupIds[i],data:r,divide:J0(r),groupIdDim:e.dimension})}}),r.length>0&&o.length>0&&q0(r,o,i)}(e,i,n,t)});else{var o=function(e,t){var n=ip(),i=ip(),r=ip();function o(e){n.get(e)&&Zv("Duplicated seriesKey in universalTransition "+e)}return Mh(e.oldSeries,function(t,n){var o=e.oldDataGroupIds[n],a=e.oldData[n],s=$0(t),l=K0(s);i.set(l,{dataGroupId:o,data:a}),Nh(s)&&Mh(s,function(e){r.set(e,{key:l,dataGroupId:o,data:a})})}),Mh(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get("dataGroupId"),a=e.getData(),s=$0(e),l=K0(s),u=i.get(l);if(u)"production"!==process.env.NODE_ENV&&o(l),n.set(l,{oldSeries:[{dataGroupId:u.dataGroupId,divide:J0(u.data),data:u.data}],newSeries:[{dataGroupId:t,divide:J0(a),data:a}]});else if(Nh(s)){"production"!==process.env.NODE_ENV&&o(l);var c=[];Mh(s,function(e){var t=i.get(e);t.data&&c.push({dataGroupId:t.dataGroupId,divide:J0(t.data),data:t.data})}),c.length&&n.set(l,{oldSeries:c,newSeries:[{dataGroupId:t,data:a,divide:J0(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:J0(d.data)}],newSeries:[]},n.set(d.key,h)),h.newSeries.push({dataGroupId:t,data:a,divide:J0(a)})}}}}),n}(i,n);Mh(o.keys(),function(e){var n=o.get(e);q0(n.oldSeries,n.newSeries,t)})}Mh(n.updatedSeries,function(e){e[eD]&&(e[eD]=!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))}})}),uE(function(e){e.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var i=lP(t).labelManager;i||(i=lP(t).labelManager=new sP),i.clearLabels()}),e.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var i=lP(t).labelManager;n.updatedSeries.forEach(function(e){i.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})});const e1=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=$A(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}})}),t1="#bbc6d9",n1="#96a5be",i1='Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',r1=["#ADDDBC","#89AAF6","#F7B4A9","#CAA4E6","#92D3DC","#FFB3BA","#FFDFBA","#BAFFC9","#BAE1FF","#D8BFD8","#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FECA57"];function o1(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 a1(e){const t=e.length;if(0===t)return 0;const{maxLineLen:n}=o1(e);return t<=6&&n<=8||t<=12&&n<=3?0:t>=30||n>=20?60:45}function s1(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(l1/i*1.3));return e<=r?100:Math.min(100,r/e*100)}const l1=1800;function u1(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:n1,fontFamily:i1,fontSize:11},c=o1(n),d=e.labelLines??c.maxLines,h=s1(n.length,c.maxLineLen,d);return{color:r1,tooltip:r?{trigger:"axis",axisPointer:{type:"cross",lineStyle:{type:"dashed",width:1}},textStyle:{fontFamily:i1,fontSize:12}}:void 0,legend:o?{type:"scroll",top:0,width:"90%",textStyle:{fontFamily:i1,color:n1},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:a1(n),width:90,overflow:"truncate"},axisTick:s?{show:!1}:{lineStyle:{color:t1}},axisLine:s?{show:!1}:{show:!0,lineStyle:{color:t1}},splitLine:{show:!1}},yAxis:{type:"value",axisLabel:s?{show:!1}:{...u,formatter:e=>e.toLocaleString()},axisLine:s?{show:!1}:{show:!0,lineStyle:{color:t1}},axisTick:s?{show:!1}:{lineStyle:{color:t1}},splitLine:s?{show:!1}:{show:!0,lineStyle:{color:t1,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)??r1[n%r1.length];return{name:e.name,data:e.data,id:e.name,color:o,emphasis:{focus:"series"},itemStyle:{color:o},...r}}),animation:!s}}function c1(e){const{xLabels:t,seriesData:n,chartType:i,labelLines:r}=e,o=s.useMemo(()=>u1({chartType:i,xLabels:t,seriesData:n,showTooltip:!1,showLegend:!1,showDataZoom:!1,mini:!0,labelLines:r}),[i,t,n,r]);return a.jsx(e1,{option:o,autoresize:!0})}function d1(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(c1,{xLabels:n,seriesData:e.series,chartType:i,labelLines:r,width:325,height:50})]},e.name))})}function h1(e){const{xLabels:t,seriesData:n,chartType:i,labelLines:r}=e,o=s.useMemo(()=>u1({chartType:i,xLabels:t,seriesData:n,showTooltip:!1,showLegend:!0,showDataZoom:t.length>10,labelLines:r}),[i,t,n,r]);return a.jsx(e1,{option:o,autoresize:!0,style:{flex:1,minHeight:150,marginTop:16,height:"auto"}})}const p1=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(Xd,{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(d1,{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(be,{color:"#4568e0",size:"14"}),h]}),a.jsx(h1,{xLabels:T.xLabels,seriesData:E,chartType:l,labelLines:N})]})]})}),f1=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,z]=s.useState(!1),F=ka(),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,q=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:F,children:a.jsxs("div",{className:"moz-r-pivot",style:{display:"flex",flexDirection:"column",height:"100%"},children:[a.jsxs(Cd,{orientation:"vertical",style:{flex:1,minHeight:0},children:[a.jsx(Md,{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(Dd,{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:z,optionPopup:({close:e})=>a.jsx(Ld,{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(X,{...T,mode:"pivot",pivotRowFields:r,pivotColumnFields:o,pivotValueFields:l,ref:t,onReady:K})}),k&&a.jsx(Ra,{})]})}),_&&H&&I&&a.jsxs(a.Fragment,{children:[a.jsx(Id,{className:"moz-r-pivot__resize-handle",style:{height:4,background:"#bbc6d9",cursor:"row-resize"}}),a.jsx(Md,{defaultSize:50,minSize:20,children:a.jsx(p1,{ref:Y,grid:I,useMultipleChart:C,includeGrandTotal:S,onClose:U})})]})]}),x&&a.jsx(ic,{visible:F.showCustomCell,onVisibleChange:e=>e?F.showCustomCellHandler():F.hideCustomCellHandler()}),a.jsx(zd,{ref:B,availableFields:c,rowFields:r,columnFields:o,valueFields:l,filterFields:u??[],totalRowCount:Z,onUpdateConfig:q}),a.jsx(Zd,{config:M??{useFilter:v,useDataCopy:!0,useDataWithHeaderCopy:!0},onOpenFilter:()=>z(!0)})]})})})});function g1(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()})}f1.displayName="MozPivotReact";const m1=s.createContext(null),v1=Symbol("moz-grid-notification"),y1=m1.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=K,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=sa,exports.ClientExcelUploadPopup=function(){const e=_(),t=Wd(),[n,i]=s.useState(null),[r,o]=s.useState(!1);return a.jsx(Yn,{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 g1();i(e)},children:n?n.name:e.Grid.dropHere}),n&&a.jsx(K,{type:"text",text:e.Grid.remove,onClick:()=>i(null)})]})})},exports.ColumnPicker=xa,exports.ContextMenu=Jl,exports.DateInput=ea,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=oc.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=e1,exports.EmptyState=au,exports.GridBulkEditor=function({visible:e,onVisibleChange:t,columnName:n=""}){const i=_(),r=Na(),[o,l]=s.useState("");return a.jsx(Yn,{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(Yo,{value:o,onChange:l,placeholder:n})})})},exports.GridBulkEditorModuleContext=B,exports.GridContainerContext=P,exports.GridContextMenu=eu,exports.GridCustomCell=ic,exports.GridCustomCellModuleContext=V,exports.GridFilter=ua,exports.GridFilterModuleContext=z,exports.GridFooter=Ra,exports.GridInstanceContext=L,exports.GridNotificationContext=m1,exports.GridNotificationKey=v1,exports.GridNotificationProvider=y1,exports.GridOptionModal=ha,exports.GridRendererContext=O,exports.GridSearchInput=Me,exports.GridSort=ca,exports.GridSortModuleContext=F,exports.GridTemplateRegistryContext=R,exports.GridToolBox=ya,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=he,exports.IconArrowDownWithTail=ve,exports.IconArrowLeft=pe,exports.IconArrowLeftWithTail=ge,exports.IconArrowRight=fe,exports.IconArrowUpCenter=te,exports.IconArrowUpWithTail=me,exports.IconChart=_e,exports.IconClose=de,exports.IconCustomCell=ae,exports.IconDownload=ue,exports.IconDragHandler=ye,exports.IconFilter=ne,exports.IconInfoFilled=be,exports.IconReset=xe,exports.IconResetGridToolbar=ie,exports.IconSearch=ce,exports.IconSetting=re,exports.IconSort=oe,exports.IconToastWarning=function({size:e="30",color:t="#fa9e23",...n}){const i=ee(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=Yo,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=rc,exports.MozGridReactCore=X,exports.MozLocaleContext=x,exports.MozPivotChart=p1,exports.MozPivotReact=f1,exports.MultiSelect=su,exports.NumberInput=Xo,exports.PivotChartDetail=h1,exports.PivotChartMini=c1,exports.PivotChartMultiple=d1,exports.PivotChartToolbar=Xd,exports.PivotContextMenu=Zd,exports.PivotFieldPanel=zd,exports.PivotGrid=f1,exports.PivotOptionModal=Ld,exports.PivotToolBox=Dd,exports.Popup=Yn,exports.ReactRenderer=v,exports.Select=Wo,exports.Toggle=da,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=oc,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=Yd,exports.formatMessage=N,exports.generateSessionId=function(){return Hd+=1,`excel-${Date.now()}-${Hd}`},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=g1,exports.provideGridNotification=function(e){return e},exports.pxToRem=A,exports.runClientExport=Ud,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=u1,exports.uniqueId=function(e=""){return E+=1,`${e}${E}`},exports.useCellTooltip=function(){return{grid:U()}},exports.useClientExcelStore=Wd,exports.useContextMenu=Pa,exports.useGridBulkEditor=Na,exports.useGridChanges=function(){const e=U(),[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=U(),[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=ka,exports.useGridEvents=function(e){const t=U();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=ga,exports.useGridInstance=U,exports.useGridNotificationStore=function(){return s.useContext(m1)},exports.useGridSelect=function(){const e=U();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=U(),[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=ma,exports.useGridUndoRedo=function(){const e=U(),[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=U(),[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=Z,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:"未指定"}};
|