@perses-dev/trace-table-plugin 0.7.0 → 0.8.0
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/__mf/css/async/263.3d4493d2.css +1 -0
- package/__mf/js/TraceTable.845c8aa8.js +5 -0
- package/__mf/js/async/109.0d6c2876.js +22 -0
- package/__mf/js/async/109.0d6c2876.js.LICENSE.txt +25 -0
- package/__mf/js/async/173.085e8c1f.js +2 -0
- package/__mf/js/async/175.ba9a4640.js +147 -0
- package/__mf/js/async/214.0bac5b59.js +1 -0
- package/__mf/js/async/224.51c57ceb.js +1 -0
- package/__mf/js/async/235.be067e8a.js +28 -0
- package/__mf/js/async/238.ccd6c3b2.js +1 -0
- package/__mf/js/async/251.b73e9968.js +7 -0
- package/__mf/js/async/251.b73e9968.js.LICENSE.txt +21 -0
- package/__mf/js/async/292.d26d57c4.js +1 -0
- package/__mf/js/async/409.d01a441f.js +1 -0
- package/__mf/js/async/488.1ae7b913.js +1 -0
- package/__mf/js/async/62.724a7239.js +1 -0
- package/__mf/js/async/651.996aef16.js +1 -0
- package/__mf/js/async/69.0b1487b7.js +2 -0
- package/__mf/js/async/69.0b1487b7.js.LICENSE.txt +24 -0
- package/__mf/js/async/{770.6cac4f4b.js → 694.5d60f324.js} +1 -1
- package/__mf/js/async/738.4eaf0328.js +1 -0
- package/__mf/js/async/740.3195ce93.js +1 -0
- package/__mf/js/async/75.8f589ac7.js +1 -0
- package/__mf/js/async/770.06030c80.js +1 -0
- package/__mf/js/async/812.f87960e5.js +53 -0
- package/__mf/js/async/83.16406283.js +1 -0
- package/__mf/js/async/834.67d500ed.js +2 -0
- package/__mf/js/async/834.67d500ed.js.LICENSE.txt +21 -0
- package/__mf/js/async/863.17535c71.js +2 -0
- package/__mf/js/async/960.3373bed4.js +2 -0
- package/__mf/js/async/964.1165a855.js +2 -0
- package/__mf/js/async/981.92685962.js +2 -0
- package/__mf/js/async/981.92685962.js.LICENSE.txt +8 -0
- package/__mf/js/async/__federation_expose_TraceTable.a8f48497.js +1 -0
- package/__mf/js/async/lib-router.5b98a3da.js +2 -0
- package/__mf/js/main.34c90ec4.js +5 -0
- package/lib/DataTable.d.ts +0 -1
- package/lib/DataTable.d.ts.map +1 -1
- package/lib/DataTable.js +14 -9
- package/lib/DataTable.js.map +1 -1
- package/lib/TraceTablePanel.d.ts +2 -14
- package/lib/TraceTablePanel.d.ts.map +1 -1
- package/lib/TraceTablePanel.js +2 -17
- package/lib/TraceTablePanel.js.map +1 -1
- package/lib/cjs/DataTable.js +14 -9
- package/lib/cjs/TraceTablePanel.js +5 -28
- package/lib/cjs/trace-table-model.js +1 -1
- package/lib/trace-table-model.d.ts +8 -0
- package/lib/trace-table-model.d.ts.map +1 -1
- package/lib/trace-table-model.js +1 -1
- package/lib/trace-table-model.js.map +1 -1
- package/mf-manifest.json +100 -60
- package/mf-stats.json +113 -64
- package/package.json +15 -5
- package/__mf/js/152.20a64e89.js +0 -5
- package/__mf/js/TraceTable.d244402d.js +0 -5
- package/__mf/js/async/156.525f3a44.js +0 -1
- package/__mf/js/async/173.f0db00ba.js +0 -2
- package/__mf/js/async/377.d6e7ba1a.js +0 -2
- package/__mf/js/async/51.a8d0a55c.js +0 -147
- package/__mf/js/async/620.006d05f8.js +0 -2
- package/__mf/js/async/651.4fdbe698.js +0 -1
- package/__mf/js/async/694.3c3c415f.js +0 -1
- package/__mf/js/async/740.fe5d3770.js +0 -1
- package/__mf/js/async/75.c1d82ca8.js +0 -1
- package/__mf/js/async/764.102c33d3.js +0 -7
- package/__mf/js/async/764.102c33d3.js.LICENSE.txt +0 -68
- package/__mf/js/async/902.129cd5da.js +0 -80
- package/__mf/js/async/960.dc16b984.js +0 -2
- package/__mf/js/async/964.01c67113.js +0 -2
- package/__mf/js/async/__federation_expose_TraceTable.0bcb874f.js +0 -1
- package/__mf/js/main.b975eef1.js +0 -1
- /package/__mf/js/async/{173.f0db00ba.js.LICENSE.txt → 173.085e8c1f.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{51.a8d0a55c.js.LICENSE.txt → 175.ba9a4640.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{902.129cd5da.js.LICENSE.txt → 812.f87960e5.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{620.006d05f8.js.LICENSE.txt → 863.17535c71.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{960.dc16b984.js.LICENSE.txt → 960.3373bed4.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{964.01c67113.js.LICENSE.txt → 964.1165a855.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{377.d6e7ba1a.js.LICENSE.txt → lib-router.5b98a3da.js.LICENSE.txt} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 764.102c33d3.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkTraceTable=self.webpackChunkTraceTable||[]).push([["764"],{1205:function(e,t,n){"use strict";let i,r,o;n.r(t),n.d(t,{ErrorAlert:()=>E_,JSONEditor:()=>Gz,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>et2,OptionsEditorGroup:()=>he,DensitySelector:()=>ho,assembleTransform:()=>et0,clearHighlightedSeries:()=>ri,testChartsTheme:()=>enS,ErrorBoundary:()=>EC.ErrorBoundary,SeriesMarker:()=>etO,TimeRangeSelector:()=>etP,ChartsThemeContext:()=>tY,TextOverlay:()=>UW,DEFAULT_COLUMN_HEIGHT:()=>uV,useMousePosition:()=>etU,NoDataOverlay:()=>U$,generateChartsTheme:()=>rm,OptionsEditorGrid:()=>c7,OPTIMIZED_MODE_SERIES_LIMIT:()=>i4,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>etF,DiscardChangesConfirmationDialog:()=>cW,useChartsTheme:()=>tK,EMPHASIZED_SERIES_DESCRIPTION:()=>etj,persesColumnsToTanstackColumns:()=>uj,mockChartsContext:()=>en_,Legend:()=>cs,TOOLTIP_DATE_FORMAT:()=>etW,TOOLTIP_MAX_WIDTH:()=>etL,dateFormatOptionsWithTimeZone:()=>rd,legacyCheckforNearbySeries:()=>et8,ToolbarIconButton:()=>enm,PIN_TOOLTIP_HELP_TEXT:()=>etY,checkforNearbyTimeSeries:()=>et4,getTheme:()=>enj,TooltipHeader:()=>end,TOOLTIP_BG_COLOR_FALLBACK:()=>etH,UNPIN_TOOLTIP_HELP_TEXT:()=>etX,DateTimeRangePicker:()=>etA,handleMoveUp:()=>h8,getClosestTimestamp:()=>rs,getFormattedAxis:()=>i3,formatWithTimeZone:()=>rp,batchDispatchNearbySeriesActions:()=>ro,useTimeZone:()=>rx,ChartsProvider:()=>tq,isWithinPercentageRange:()=>et7,TOOLTIP_MIN_WIDTH:()=>etE,TOOLTIP_LABELS_MAX_WIDTH:()=>etN,getYBuffer:()=>ene,DEFAULT_PINNED_CROSSHAIR:()=>i6,FormatControls:()=>enx,TooltipContent:()=>enp,SHOW_FEWER_SERIES_LIMIT:()=>et3,TimeChartTooltip:()=>enf,getClosestTimestampInFullDataset:()=>rl,getTableCellLayout:()=>uZ,EChart:()=>El,PINNED_CROSSHAIR_SERIES_NAME:()=>i8,SortSelector:()=>Uq,SnackbarProvider:()=>n6,Drawer:()=>d_,AlignSelector:()=>e6,LinksEditor:()=>Uz,TimeZoneContext:()=>rv,ValueMappingsEditor:()=>eiv,ColorPicker:()=>t$,SeriesLabelsStack:()=>etR,useSnackbar:()=>n9,checkCrosshairPinnedStatus:()=>ra,SeriesInfo:()=>etK,Table:()=>cn,InfoTooltip:()=>c4,TimeZoneProvider:()=>ry,LoadingOverlay:()=>UG,typography:()=>enV,Dialog:()=>cH,DropIndicator:()=>ha,TransformsEditor:()=>en1,OptionsEditorControl:()=>c9,TOOLTIP_PADDING:()=>etz,getFormattedAxisLabel:()=>rf,SortSelectorButtons:()=>UY,getTooltipStyles:()=>et1,useChartsContext:()=>tX,RefreshIntervalPicker:()=>en2,enableDataZoom:()=>rt,useDragAndDropMonitor:()=>h1,combineSx:()=>ru,OptionsEditorColumn:()=>cJ,getDateAndTime:()=>rg,ThresholdsEditor:()=>qn,DEFAULT_TOOLTIP_CONFIG:()=>etq,handleMoveDown:()=>h6,DragButton:()=>h9,useId:()=>rc,ContentWithLegend:()=>cu,NEARBY_SERIES_DESCRIPTION:()=>etZ,isLegendItemVisuallySelected:()=>ly,getPointInGrid:()=>rr,EMPTY_TOOLTIP_DATA:()=>etG,legacyGetNearbySeriesData:()=>et9,buildRelativeTimeOption:()=>re,SettingsAutocomplete:()=>hi,FontSizeSelector:()=>Ek,defaultCursorData:()=>et$,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>et5,getNearbySeriesData:()=>et6,TOOLTIP_MAX_HEIGHT:()=>etB,YAxisLabel:()=>enb,FALLBACK_CHART_WIDTH:()=>etV,DragAndDropElement:()=>h2,restoreChart:()=>rn,ModeSelector:()=>Uj,TextField:()=>cd,DEFAULT_COLUMN_WIDTH:()=>uz,FormActions:()=>ED,OptionsColorPicker:()=>rb});var a,s,l,u,c,h,d,p,f,g,m,v,y,x,b,w,S,_,C,M,k,T,D,I,A,P,O,R,E,L,B,N,F,z,V,Z,j,H,W,$,G,U,q,Y,X,K,Q,J,ee,et,en,ei,er,eo,ea,es,el,eu,ec,eh,ed,ep,ef,eg,em,ev,ey,ex,eb,ew,eS,e_,eC,eM,ek,eT,eD,eI,eA,eP,eO,eR,eE,eL,eB,eN,eF={};n.r(eF),n.d(eF,{Arc:()=>_g,BezierCurve:()=>_d,BoundingRect:()=>fh,Circle:()=>SV,CompoundPath:()=>_m,Ellipse:()=>SH,Group:()=>mr,Image:()=>ye,IncrementalDisplayable:()=>_k,Line:()=>_s,LinearGradient:()=>_y,OrientedBoundingRect:()=>_C,Path:()=>v3,Point:()=>fn,Polygon:()=>_e,Polyline:()=>_i,RadialGradient:()=>_x,Rect:()=>yl,Ring:()=>S8,Sector:()=>S5,Text:()=>yS,applyTransform:()=>_W,clipPointsByRect:()=>_U,clipRectByRect:()=>_q,createIcon:()=>_Y,extendPath:()=>_O,extendShape:()=>_A,getShapeClass:()=>_E,getTransform:()=>_H,groupTransition:()=>_G,initProps:()=>xs,isElementRemoved:()=>xl,lineLineIntersect:()=>_K,linePolygonIntersect:()=>_X,makeImage:()=>_B,makePath:()=>_L,mergePath:()=>_F,registerShape:()=>_R,removeElement:()=>xu,removeElementWithFadeOut:()=>xh,resizePath:()=>_z,setTooltipConfig:()=>_Q,subPixelOptimize:()=>_j,subPixelOptimizeLine:()=>_V,subPixelOptimizeRect:()=>_Z,transformDirection:()=>_$,traverseElements:()=>_0,updateProps:()=>xa});var ez=n(4246),eV=n(4538),eZ=n.n(eV),ej=n(496),eH=n(2267),eW=n(6838);function e$(e){return eV.Children.toArray(e).filter(e=>eV.isValidElement(e))}var eG=n(1640),eU=n(2709),eq=n(2319),eY=n(433),eX=n(1751),eK=n(4124),eQ=n(6749);function eJ(e){return(0,eQ.ZP)("MuiButtonGroup",e)}let e0=(0,eK.Z)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]);var e1=n(5720),e2=n(1645);let e5=e=>{let{classes:t,color:n,disabled:i,disableElevation:r,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,a,o&&"fullWidth",r&&"disableElevation",`color${(0,eG.Z)(n)}`],grouped:["grouped",`grouped${(0,eG.Z)(a)}`,`grouped${(0,eG.Z)(s)}`,`grouped${(0,eG.Z)(s)}${(0,eG.Z)(a)}`,`grouped${(0,eG.Z)(s)}${(0,eG.Z)(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,eH.Z)(l,eJ,t)},e3=(0,eU.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${e0.grouped}`]:t.grouped},{[`& .${e0.grouped}`]:t[`grouped${(0,eG.Z)(n.orientation)}`]},{[`& .${e0.grouped}`]:t[`grouped${(0,eG.Z)(n.variant)}`]},{[`& .${e0.grouped}`]:t[`grouped${(0,eG.Z)(n.variant)}${(0,eG.Z)(n.orientation)}`]},{[`& .${e0.grouped}`]:t[`grouped${(0,eG.Z)(n.variant)}${(0,eG.Z)(n.color)}`]},{[`& .${e0.firstButton}`]:t.firstButton},{[`& .${e0.lastButton}`]:t.lastButton},{[`& .${e0.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,eq.Z)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${e0.lastButton},& .${e0.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${e0.lastButton},& .${e0.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${e0.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${e0.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,eY.Z)()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,eW.Fq)(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${e0.lastButton},& .${e0.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${e0.lastButton},& .${e0.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${e0.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${e0.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,eY.Z)(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${e0.firstButton},& .${e0.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${e0.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),e4=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiButtonGroup"}),{children:i,className:r,color:o="primary",component:a="div",disabled:s=!1,disableElevation:l=!1,disableFocusRipple:u=!1,disableRipple:c=!1,fullWidth:h=!1,orientation:d="horizontal",size:p="medium",variant:f="outlined",...g}=n,m={...n,color:o,component:a,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:h,orientation:d,size:p,variant:f},v=e5(m),y=eV.useMemo(()=>({className:v.grouped,color:o,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:h,size:p,variant:f}),[o,s,l,u,c,h,p,f,v.grouped]),x=e$(i),b=x.length,w=e=>{let t=0===e,n=e===b-1;return t&&n?"":t?v.firstButton:n?v.lastButton:v.middleButton};return(0,ez.jsx)(e3,{as:a,role:"group",className:(0,ej.Z)(v.root,r),ref:t,ownerState:m,...g,children:(0,ez.jsx)(e1.Z.Provider,{value:y,children:x.map((e,t)=>(0,ez.jsx)(e2.Z.Provider,{value:w(t),children:e},t))})})});var e8=n(8565);function e6({onChange:e,value:t="left",...n}){let i=t=>{e(t)};return(0,ez.jsxs)(e4,{"aria-label":"Alignement",...n,children:[(0,ez.jsx)(e8.Z,{onClick:()=>i("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,ez.jsx)(e8.Z,{onClick:()=>i("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,ez.jsx)(e8.Z,{onClick:()=>i("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var e9=n(1170),e7=n(4560),te=n(2179),tt=n(3772),tn=n(6798),ti=n(3890),tr=n(2664);let to=(0,tn.Z)(),ta=(0,e7.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function ts(e){return(0,te.Z)({props:e,name:"MuiStack",defaultTheme:to})}let tl=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],tu=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...(0,ti.k9)({theme:t},(0,ti.P$)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let i=(0,tr.hB)(t),r=Object.keys(t.breakpoints.values).reduce((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t),{}),o=(0,ti.P$)({values:e.direction,base:r}),a=(0,ti.P$)({values:e.spacing,base:r});"object"==typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){let i=t>0?o[n[t-1]]:"column";o[e]=i}}),n=(0,e9.Z)(n,(0,ti.k9)({theme:t},a,(t,n)=>e.useFlexGap?{gap:(0,tr.NA)(i,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${tl(n?o[n]:e.direction)}`]:(0,tr.NA)(i,t)}}))}return(0,ti.dt)(t.breakpoints,n)};function tc(e={}){let{createStyledComponent:t=ta,useThemeProps:n=ts,componentName:i="MuiStack"}=e,r=()=>(0,eH.Z)({root:["root"]},e=>(0,eQ.ZP)(i,e),{}),o=t(tu);return eV.forwardRef(function(e,t){let i=n(e),{component:a="div",direction:s="column",spacing:l=0,divider:u,children:c,className:h,useFlexGap:d=!1,...p}=(0,tt.Z)(i),f=r();return(0,ez.jsx)(o,{as:a,ownerState:{direction:s,spacing:l,useFlexGap:d},ref:t,className:(0,ej.Z)(f.root,h),...p,children:u?function(e,t){let n=eV.Children.toArray(e).filter(Boolean);return n.reduce((e,i,r)=>(e.push(i),r<n.length-1&&e.push(eV.cloneElement(t,{key:`separator-${r}`})),e),[])}(c,u):c})})}let th=tc({createStyledComponent:(0,eU.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,eX.i)({props:e,name:"MuiStack"})});var td=n(5094),tp=n(8695);function tf(){return(tf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function tg(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)t.indexOf(n=o[i])>=0||(r[n]=e[n]);return r}function tm(e){var t=(0,eV.useRef)(e),n=(0,eV.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var tv,ty=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},tx=function(e){return"touches"in e},tb=function(e){return e&&e.ownerDocument.defaultView||self},tw=function(e,t,n){var i=e.getBoundingClientRect(),r=tx(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:ty((r.pageX-(i.left+tb(e).pageXOffset))/i.width),top:ty((r.pageY-(i.top+tb(e).pageYOffset))/i.height)}},tS=function(e){tx(e)||e.preventDefault()},t_=eV.memo(function(e){var t=e.onMove,n=e.onKey,i=tg(e,["onMove","onKey"]),r=(0,eV.useRef)(null),o=tm(t),a=tm(n),s=(0,eV.useRef)(null),l=(0,eV.useRef)(!1),u=(0,eV.useMemo)(function(){var e=function(e){tS(e),(tx(e)?e.touches.length>0:e.buttons>0)&&r.current?o(tw(r.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var i=l.current,o=tb(r.current),a=n?o.addEventListener:o.removeEventListener;a(i?"touchmove":"mousemove",e),a(i?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,i=r.current;if(i&&(tS(t),(!l.current||tx(t))&&i)){if(tx(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}i.focus(),o(tw(i,t,s.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]},[a,o]),c=u[0],h=u[1],d=u[2];return(0,eV.useEffect)(function(){return d},[d]),eV.createElement("div",tf({},i,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:r,onKeyDown:h,tabIndex:0,role:"slider"}))}),tC=function(e){return e.filter(Boolean).join(" ")},tM=function(e){var t=e.color,n=e.left,i=e.top,r=tC(["react-colorful__pointer",e.className]);return eV.createElement("div",{className:r,style:{top:100*(void 0===i?.5:i)+"%",left:100*n+"%"}},eV.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},tk=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},tT=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?tk(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?tk(parseInt(e.substring(6,8),16)/255,2):1}},tD=function(e){var t=e.s,n=e.v,i=e.a,r=(200-t)*n/100;return{h:tk(e.h),s:tk(r>0&&r<200?t*n/100/(r<=100?r:200-r)*100:0),l:tk(r/2),a:tk(i,2)}},tI=function(e){var t=tD(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},tA=function(e){var t=e.h,n=e.s,i=e.v,r=e.a;t=t/360*6,n/=100,i/=100;var o=Math.floor(t),a=i*(1-n),s=i*(1-(t-o)*n),l=i*(1-(1-t+o)*n),u=o%6;return{r:tk(255*[i,s,a,a,l,i][u]),g:tk(255*[l,i,i,s,a,a][u]),b:tk(255*[a,a,l,i,i,s][u]),a:tk(r,2)}},tP=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},tO=function(e){var t=e.r,n=e.g,i=e.b,r=e.a,o=r<1?tP(tk(255*r)):"";return"#"+tP(t)+tP(n)+tP(i)+o},tR=function(e){var t=e.r,n=e.g,i=e.b,r=e.a,o=Math.max(t,n,i),a=o-Math.min(t,n,i),s=a?o===t?(n-i)/a:o===n?2+(i-t)/a:4+(t-n)/a:0;return{h:tk(60*(s<0?s+6:s)),s:tk(o?a/o*100:0),v:tk(o/255*100),a:r}},tE=eV.memo(function(e){var t=e.hue,n=e.onChange,i=tC(["react-colorful__hue",e.className]);return eV.createElement("div",{className:i},eV.createElement(t_,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:ty(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":tk(t),"aria-valuemax":"360","aria-valuemin":"0"},eV.createElement(tM,{className:"react-colorful__hue-pointer",left:t/360,color:tI({h:t,s:100,v:100,a:1})})))}),tL=eV.memo(function(e){var t=e.hsva,n=e.onChange,i={backgroundColor:tI({h:t.h,s:100,v:100,a:1})};return eV.createElement("div",{className:"react-colorful__saturation",style:i},eV.createElement(t_,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:ty(t.s+100*e.left,0,100),v:ty(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+tk(t.s)+"%, Brightness "+tk(t.v)+"%"},eV.createElement(tM,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:tI(t)})))}),tB=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},tN="undefined"!=typeof window?eV.useLayoutEffect:eV.useEffect,tF=new Map,tz=function(e){tN(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!tF.has(t)){var i=t.createElement("style");i.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',tF.set(t,i);var r=tv||n.nc;r&&i.setAttribute("nonce",r),t.head.appendChild(i)}},[])},tV=function(e){var t,n,i,r,o,a=e.className,s=e.colorModel,l=e.color,u=void 0===l?s.defaultColor:l,c=e.onChange,h=tg(e,["className","colorModel","color","onChange"]),d=(0,eV.useRef)(null);tz(d);var p=(t=tm(c),i=(n=(0,eV.useState)(function(){return s.toHsva(u)}))[0],r=n[1],o=(0,eV.useRef)({color:u,hsva:i}),(0,eV.useEffect)(function(){if(!s.equal(u,o.current.color)){var e=s.toHsva(u);o.current={hsva:e,color:u},r(e)}},[u,s]),(0,eV.useEffect)(function(){var e;tB(i,o.current.hsva)||s.equal(e=s.fromHsva(i),o.current.color)||(o.current={hsva:i,color:e},t(e))},[i,s,t]),[i,(0,eV.useCallback)(function(e){r(function(t){return Object.assign({},t,e)})},[])]),f=p[0],g=p[1],m=tC(["react-colorful",a]);return eV.createElement("div",tf({},h,{ref:d,className:m}),eV.createElement(tL,{hsva:f,onChange:g}),eV.createElement(tE,{hue:f.h,onChange:g,className:"react-colorful__last-control"}))},tZ={defaultColor:"000",toHsva:function(e){return tR(tT(e))},fromHsva:function(e){return tO(tA({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||tB(tT(e),tT(t))}},tj=function(e){return eV.createElement(tV,tf({},e,{colorModel:tZ}))},tH=n(791),tW=n(354);let t$=({color:e,onChange:t,onClear:n,palette:i})=>{let[r,o]=(0,eV.useState)(e),a=e=>{o(e),t?.(e)};return(0,ez.jsxs)(th,{spacing:1,children:[(0,ez.jsx)(tj,{color:e,onChange:a,style:{width:"100%"}}),(0,ez.jsx)(th,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:i&&i.map((e,t)=>(0,ez.jsx)(td.Z,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>a(e),children:(0,ez.jsx)(tH.default,{})},t))}),(0,ez.jsxs)(th,{direction:"row",gap:1,alignItems:"center",children:[(0,ez.jsx)(tp.Z,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:r,onChange:e=>{let n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);o(`#${n}`),tG(e.target.value)&&t?.(e.target.value)}}),n&&(0,ez.jsx)(td.Z,{onClick:n,children:(0,ez.jsx)(tW.default,{})})]})]})},tG=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),i=n&&n[1]?n[1].length:0;return 3===i||6===i||!!t&&4===i||!!t&&8===i};var tU=n(6714);function tq(e){let{children:t,chartsTheme:n,enablePinning:i=!1,enableSyncGrouping:r=!0}=e,[o,a]=(0,eV.useState)(null),s=(0,eV.useMemo)(()=>({chartsTheme:n,enablePinning:i,lastTooltipPinnedCoords:o,enableSyncGrouping:r,setLastTooltipPinnedCoords:a}),[n,i,r,o,a]);return(0,ez.jsx)(tY.Provider,{value:s,children:t})}let tY=(0,eV.createContext)(void 0);function tX(){let e=(0,eV.useContext)(tY);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function tK(){return tX().chartsTheme}var tQ=n(6085);let tJ=function(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i);else for(n in t)t[n]&&(r&&(r+=" "),r+=n)}return r}(e))&&(i&&(i+=" "),i+=t);return i},t0={data:""},t1=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||t0,t2=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,t5=/\/\*[^]*?\*\/| +/g,t3=/\n+/g,t4=(e,t)=>{let n="",i="",r="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":i+="f"==o[1]?t4(a,o):o+"{"+t4(a,"k"==o[1]?"":t)+"}":"object"==typeof a?i+=t4(a,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=a&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=t4.p?t4.p(o,a):o+":"+a+";")}return n+(t&&r?t+"{"+r+"}":r)+i},t8={},t6=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+t6(e[n]);return t}return e},t9=(e,t,n,i,r)=>{var o;let a=t6(e),s=t8[a]||(t8[a]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(a));if(!t8[s]){let t=a!==e?e:(e=>{let t,n,i=[{}];for(;t=t2.exec(e.replace(t5,""));)t[4]?i.shift():t[3]?(n=t[3].replace(t3," ").trim(),i.unshift(i[0][n]=i[0][n]||{})):i[0][t[1]]=t[2].replace(t3," ").trim();return i[0]})(e);t8[s]=t4(r?{["@keyframes "+s]:t}:t,n?"":"."+s)}let l=n&&t8.g?t8.g:null;return n&&(t8.g=t8[s]),o=t8[s],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=i?o+t.data:t.data+o),s},t7=(e,t,n)=>e.reduce((e,i,r)=>{let o=t[r];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":t4(e,""):!1===e?"":e}return e+i+(null==o?"":o)},"");function ne(e){let t=this||{},n=e.call?e(t.p):e;return t9(n.unshift?n.raw?t7(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,t1(t.target),t.g,t.o,t.k)}function nt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function nn(e,t,n){return t&&nt(e.prototype,t),n&&nt(e,n),e}function ni(){return(ni=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function nr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function no(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}function na(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}ne.bind({g:1}),ne.bind({k:1});var ns=function(){return""},nl=eZ().createContext({enqueueSnackbar:ns,closeSnackbar:ns}),nu="@media (max-width:599.95px)",nc="@media (min-width:600px)",nh=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},nd=function(e){return""+nh(e.vertical)+nh(e.horizontal)},np=function(e){return!!e||0===e},nf="unmounted",ng="exited",nm="entering",nv="entered",ny="exiting",nx=function(e){function t(t){n=e.call(this,t)||this;var n,i,r=t.appear;return n.appearStatus=null,t.in?r?(i=ng,n.appearStatus=nm):i=nv:i=t.unmountOnExit||t.mountOnEnter?nf:ng,n.state={status:i},n.nextCallback=null,n}nr(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===nf?{status:ng}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==nm&&n!==nv&&(t=nm):(n===nm||n===nv)&&(t=ny)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===nm?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===ng&&this.setState({status:nf})},n.performEnter=function(e){var t=this,n=this.props.enter,i=this.getTimeouts();if(!e&&!n){this.safeSetState({status:nv},function(){t.props.onEntered&&t.props.onEntered(t.node,e)});return}this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:nm},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(i.enter,function(){t.safeSetState({status:nv},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();if(!t){this.safeSetState({status:ng},function(){e.props.onExited&&e.props.onExited(e.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:ny},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ng},function(){e.props.onExited&&e.props.onExited(e.node)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;if(!this.node||n){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===nf)return null;var t=this.props;return(0,t.children)(e,no(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},nn(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(eZ().Component);function nb(){}function nw(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function nS(e,t){return(0,eV.useMemo)(function(){return null==e&&null==t?null:function(n){nw(e,n),nw(t,n)}},[e,t])}function n_(e){var t=e.timeout,n=e.style,i=void 0===n?{}:n,r=e.mode;return{duration:"object"==typeof t?t[r]||0:t,easing:i.transitionTimingFunction,delay:i.transitionDelay}}nx.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:nb,onEntering:nb,onEntered:nb,onExit:nb,onExiting:nb,onExited:nb};var nC={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},nM=function(e){e.scrollTop=e.scrollTop},nk=function(e){return Math.round(e)+"ms"};function nT(e,t){void 0===e&&(e=["all"]);var n=t||{},i=n.duration,r=void 0===i?300:i,o=n.easing,a=void 0===o?nC.easeInOut:o,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof r?r:nk(r))+" "+a+" "+("string"==typeof l?l:nk(l))}).join(",")}function nD(e){return(e&&e.ownerDocument||document).defaultView||window}function nI(e,t){if(t){var n=function(e,t){var n,i=t.getBoundingClientRect(),r=nD(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=r.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var a=0,s=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");a=parseInt(l[4],10),s=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(r.innerWidth+a-i.left)+"px)";case"right":return"translateX(-"+(i.left+i.width-a)+"px)";case"up":return"translateY("+(r.innerHeight+s-i.top)+"px)";default:return"translateY(-"+(i.top+i.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var nA=(0,eV.forwardRef)(function(e,t){var n=e.children,i=e.direction,r=void 0===i?"down":i,o=e.in,a=e.style,s=e.timeout,l=void 0===s?0:s,u=e.onEnter,c=e.onEntered,h=e.onExit,d=e.onExited,p=no(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),f=(0,eV.useRef)(null),g=nS(n.ref,f),m=nS(g,t),v=(0,eV.useCallback)(function(){f.current&&nI(r,f.current)},[r]);return(0,eV.useEffect)(function(){if(!o&&"down"!==r&&"right"!==r){var e=function(e,t){var n;function i(){for(var i=this,r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}return void 0===t&&(t=166),i.clear=function(){clearTimeout(n)},i}(function(){f.current&&nI(r,f.current)}),t=nD(f.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[r,o]),(0,eV.useEffect)(function(){o||v()},[o,v]),(0,eV.createElement)(nx,Object.assign({appear:!0,nodeRef:f,onEnter:function(e,t){nI(r,e),nM(e),u&&u(e,t)},onEntered:c,onEntering:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||nC.easeOut,n=n_({timeout:l,mode:"enter",style:ni({},a,{transitionTimingFunction:t})});e.style.webkitTransition=nT("-webkit-transform",n),e.style.transition=nT("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||nC.sharp,n=n_({timeout:l,mode:"exit",style:ni({},a,{transitionTimingFunction:t})});e.style.webkitTransition=nT("-webkit-transform",n),e.style.transition=nT("transform",n),nI(r,e),h&&h(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",d&&d(e)},in:o,timeout:l},p),function(e,t){return(0,eV.cloneElement)(n,ni({ref:m,style:ni({visibility:"exited"!==e||o?void 0:"hidden"},a,{},n.props.style)},t))})});nA.displayName="Slide";var nP=function(e){return eZ().createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},nO={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:eZ().createElement(function(){return eZ().createElement(nP,null,eZ().createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},null),warning:eZ().createElement(function(){return eZ().createElement(nP,null,eZ().createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:eZ().createElement(function(){return eZ().createElement(nP,null,eZ().createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},null),info:eZ().createElement(function(){return eZ().createElement(nP,null,eZ().createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:nA,transitionDuration:{enter:225,exit:195}},nR=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:nO.autoHideDuration},nE=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?ni({},nO.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?ni({},nO.transitionDuration,{},t):nO.transitionDuration};function nL(e){return Object.entries(e).reduce(function(e,t){var n,i=t[0],r=t[1];return ni({},e,((n={})[i]=ne(r),n))},{})}var nB="notistack-CollapseWrapper",nN=nL({root:{height:0},entered:{height:"auto"}}),nF=(0,eV.forwardRef)(function(e,t){var n=e.children,i=e.in,r=e.onExited,o=(0,eV.useRef)(null),a=(0,eV.useRef)(null),s=nS(t,a),l=function(){return o.current?o.current.clientHeight:0};return(0,eV.createElement)(nx,{in:i,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=n_({timeout:175,mode:"enter"}),i=n.duration,r=n.easing;e.style.transitionDuration="string"==typeof i?i:i+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=r||""},onExit:function(e){e.style.height=l()+"px"},onExited:r,onExiting:function(e){nM(e);var t=n_({timeout:175,mode:"exit"}),n=t.duration,i=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=i||""},nodeRef:a,timeout:175},function(e,t){return(0,eV.createElement)("div",Object.assign({ref:s,className:tJ(nN.root,"entered"===e&&nN.entered),style:ni({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:nT("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!i&&{visibility:"hidden"})},t),(0,eV.createElement)("div",{ref:o,className:nB,style:{display:"flex",width:"100%"}},n))})});nF.displayName="Collapse";var nz={right:"left",left:"right",bottom:"up",top:"down"},nV=function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var i;return ni({},t,((i={})[n]=e[n],i))},{})},nZ=function(){};function nj(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var i=arguments.length,r=Array(i),o=0;o<i;o++)r[o]=arguments[o];var a=[].concat(r);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},nZ)}var nH="undefined"!=typeof window?eV.useLayoutEffect:eV.useEffect;function nW(e){var t=(0,eV.useRef)(e);return nH(function(){t.current=e}),(0,eV.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var n$=(0,eV.forwardRef)(function(e,t){var n=e.children,i=e.className,r=e.autoHideDuration,o=e.disableWindowBlurListener,a=void 0!==o&&o,s=e.onClose,l=e.id,u=e.open,c=e.SnackbarProps,h=void 0===c?{}:c,d=(0,eV.useRef)(),p=nW(function(){s&&s.apply(void 0,arguments)}),f=nW(function(e){s&&null!=e&&(d.current&&clearTimeout(d.current),d.current=setTimeout(function(){p(null,"timeout",l)},e))});(0,eV.useEffect)(function(){return u&&f(r),function(){d.current&&clearTimeout(d.current)}},[u,r,f]);var g=function(){d.current&&clearTimeout(d.current)},m=(0,eV.useCallback)(function(){null!=r&&f(.5*r)},[r,f]);return(0,eV.useEffect)(function(){if(!a&&u)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[a,m,u]),(0,eV.createElement)("div",Object.assign({ref:t},h,{className:tJ("notistack-Snackbar",i),onMouseEnter:function(e){h.onMouseEnter&&h.onMouseEnter(e),g()},onMouseLeave:function(e){h.onMouseLeave&&h.onMouseLeave(e),m()}}),n)});n$.displayName="Snackbar";var nG=nL({root:((z={display:"flex",flexWrap:"wrap",flexGrow:1})[nc]={flexGrow:"initial",minWidth:"288px"},z)}),nU=(0,eV.forwardRef)(function(e,t){var n=e.className,i=no(e,["className"]);return eZ().createElement("div",Object.assign({ref:t,className:tJ(nG.root,n)},i))});nU.displayName="SnackbarContent";var nq=nL({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),nY="notistack-snackbar",nX=(0,eV.forwardRef)(function(e,t){var n=e.id,i=e.message,r=e.action,o=e.iconVariant,a=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=o[a],h=r;return"function"==typeof h&&(h=h(n)),eZ().createElement(nU,{ref:t,role:"alert","aria-describedby":nY,style:l,className:tJ("notistack-MuiContent","notistack-MuiContent-"+a,nq.root,nq[a],u,!s&&c&&nq.lessPadding)},eZ().createElement("div",{id:nY,className:nq.message},s?null:c,i),h&&eZ().createElement("div",{className:nq.action},h))});nX.displayName="MaterialDesignContent";var nK=(0,eV.memo)(nX),nQ=nL({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),nJ=function(e){var t,n=(0,eV.useRef)(),i=(0,eV.useState)(!0),r=i[0],o=i[1],a=nj([e.snack.onClose,e.onClose]),s=(0,eV.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,eV.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,u=e.classes,c=e.Component,h=(0,eV.useMemo)(function(){return nV(u)},[u]),d=l.open,p=l.SnackbarProps,f=l.TransitionComponent,g=l.TransitionProps,m=l.transitionDuration,v=l.disableWindowBlurListener,y=l.content,x=no(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),b=ni({direction:"center"!==(t=x.anchorOrigin).horizontal?nz[t.horizontal]:nz[t.vertical],timeout:m},g),w=y;"function"==typeof w&&(w=w(x.id,x.message));var S=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var i;return ni({},t,((i={})[n]=nj([e.snack[n],e[n]],x.id),i))},{});return eZ().createElement(nF,{in:r,onExited:S.onExited},eZ().createElement(n$,{open:d,id:x.id,disableWindowBlurListener:v,autoHideDuration:x.autoHideDuration,className:tJ(nQ.wrappedRoot,h.root,h["anchorOrigin"+nd(x.anchorOrigin)]),SnackbarProps:p,onClose:a},eZ().createElement(f,Object.assign({},b,{appear:!0,in:d,onExit:S.onExit,onExited:s,onEnter:S.onEnter,onEntered:nj([S.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],x.id)}),w||eZ().createElement(void 0===c?nK:c,Object.assign({},x)))))},n0=20,n1=6,n2=2,n5="."+nB,n3=nL({root:((V={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:nT(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[n5]={padding:n1+"px 0px",transition:"padding 300ms ease 0ms"},V.maxWidth="calc(100% - "+2*n0+"px)",V[nu]={width:"100%",maxWidth:"calc(100% - 32px)"},V),rootDense:((Z={})[n5]={padding:n2+"px 0px"},Z),top:{top:n0-n1+"px",flexDirection:"column"},bottom:{bottom:n0-n1+"px",flexDirection:"column-reverse"},left:((j={left:n0+"px"})[nc]={alignItems:"flex-start"},j[nu]={left:"16px"},j),right:((H={right:n0+"px"})[nc]={alignItems:"flex-end"},H[nu]={right:"16px"},H),center:((W={left:"50%",transform:"translateX(-50%)"})[nc]={alignItems:"center"},W)}),n4=(0,eV.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,i=e.anchorOrigin,r=e.dense,o=e.children,a=tJ("notistack-SnackbarContainer",n3[i.vertical],n3[i.horizontal],n3.root,n.containerRoot,n["containerAnchorOrigin"+nd(i)],r&&n3.rootDense);return eZ().createElement("div",{className:a},o)}),n8=function(e){return!("string"==typeof e||(0,eV.isValidElement)(e))},n6=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw Error("enqueueSnackbar called with invalid argument");var i,r=n8(e)?e:t,o=n8(e)?e.message:e,a=r.key,s=r.preventDuplicate,l=no(r,["key","preventDuplicate"]),u=np(a),c=u?a:new Date().getTime()+Math.random(),h=(i=n.props,function(e,t){return(void 0===t&&(t=!1),t)?ni({},nO[e],{},i[e],{},l[e]):"autoHideDuration"===e?nR(l.autoHideDuration,i.autoHideDuration):"transitionDuration"===e?nE(l.transitionDuration,i.transitionDuration):l[e]||i[e]||nO[e]}),d=ni({id:c},l,{message:o,open:!0,entered:!1,requestClose:!1,persist:h("persist"),action:h("action"),content:h("content"),variant:h("variant"),anchorOrigin:h("anchorOrigin"),disableWindowBlurListener:h("disableWindowBlurListener"),autoHideDuration:h("autoHideDuration"),hideIconVariant:h("hideIconVariant"),TransitionComponent:h("TransitionComponent"),transitionDuration:h("transitionDuration"),TransitionProps:h("TransitionProps",!0),iconVariant:h("iconVariant",!0),style:h("style",!0),SnackbarProps:h("SnackbarProps",!0),className:tJ(n.props.className,l.className)});return d.persist&&(d.autoHideDuration=void 0),n.setState(function(e){if(void 0===s&&n.props.preventDuplicate||s){var t=function(e){return u?e.id===c:e.message===o},i=e.queue.findIndex(t)>-1,r=e.snacks.findIndex(t)>-1;if(i||r)return e}return n.handleDisplaySnack(ni({},e,{queue:[].concat(e.queue,[d])}))}),c},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?ni({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,i=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(i=!0);var r=e.snacks.map(function(e){return t||e.persist&&!i?ni({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),ni({},e,{open:!1})):ni({},e,{requestClose:!0})});return ni({},e,{snacks:r})},n.handleEnteredSnack=function(e,t,i){if(!np(i))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===i?ni({},e,{entered:!0}):ni({},e)})}})},n.handleCloseSnack=function(e,t,i){n.props.onClose&&n.props.onClose(e,t,i);var r=void 0===i;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return r||e.id===i?e.entered?ni({},e,{open:!1}):ni({},e,{requestClose:!0}):ni({},e)}),queue:n.filter(function(e){return e.id!==i})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});np(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!np(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var i=n.processQueue(ni({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===i.queue.length?i:n.handleDismissOldest(i)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(na(n)),closeSnackbar:n.closeSnackbar.bind(na(n))}},n}return nr(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,i=n.domRoot,r=n.children,o=n.dense,a=void 0!==o&&o,s=n.Components,l=void 0===s?{}:s,u=n.classes,c=this.state.snacks.reduce(function(e,t){var n,i=nd(t.anchorOrigin),r=e[i]||[];return ni({},e,((n={})[i]=[].concat(r,[t]),n))},{}),h=Object.keys(c).map(function(t){var n=c[t],i=n[0];return eZ().createElement(n4,{key:t,dense:a,anchorOrigin:i.anchorOrigin,classes:u},n.map(function(t){return eZ().createElement(nJ,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:nj([e.handleExitedSnack,e.props.onExited],t.id),onEntered:nj([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return eZ().createElement(nl.Provider,{value:t},r,i?(0,tQ.createPortal)(h,i):h)},nn(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||nO.maxSnack}}]),t}(eV.Component);function n9(){let{enqueueSnackbar:e,closeSnackbar:t}=(0,eV.useContext)(nl),n=n7(e,"error"),i=n7(e,"info"),r=n7(e,"warning"),o=n7(e,"success"),a=(0,eV.useCallback)((e,t)=>n(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:i,warningSnackbar:r,successSnackbar:o,exceptionSnackbar:a}}function n7(e,t){return(0,eV.useCallback)((n,i)=>e(n,{...i,variant:t}),[e,t])}var ie=n(5409),it=n.n(ie),ii="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function ir(){if(q)return U;q=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return U={unformat:function(n,i){let r;let o=is(),a=o.currentDelimiters(),s=o.currentCurrency().symbol,l=o.currentOrdinal(),u=o.getZeroFormat(),c=o.currentAbbreviations();if("string"==typeof n){if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let n=e.split(":");if(3!==n.length)return!1;let i=+n[0],r=+n[1],o=+n[2];return!isNaN(i)&&!isNaN(r)&&!isNaN(o)}(n,a)){let e,t,i;t=+(e=n.split(":"))[0],i=+e[1],r=+e[2]+60*i+3600*t}else r=function(n,i,r="",o,a,s,l){let u;if(""!==n)return n===a?0:function n(i,r,o,a,s,l,u){if(!isNaN(+i))return+i;let c="",h=i.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==i)return -1*n(h,r,o,a,s,l);for(let t=0;t<e.length;t++){let u=e[t];if((c=i.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"))!==i)return n(c,r,o,a,s,l)*u.factor}if((c=i.replace("%",""))!==i)return n(c,r,o,a,s,l)/100;let d=parseFloat(i);if(isNaN(d))return;let p=a(d);if(p&&"."!==p&&(c=i.replace(RegExp(`${t(p)}$`),""))!==i)return n(c,r,o,a,s,l);let f={};Object.keys(l).forEach(e=>{f[l[e]]=e});let g=Object.keys(f).sort().reverse(),m=g.length;for(let e=0;e<m;e++){let t=g[e],u=f[t];if((c=i.replace(t,""))!==i){let e;switch(u){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return n(c,r,o,a,s,l)*e}}}(n.replace(r,"").replace(RegExp(`([0-9])${t(i.thousands)}([0-9])`,"g"),"$1$2").replace(i.decimal,"."),i,r,o,a,s)}(n,a,s,l,u,c)}else{if("number"!=typeof n)return;r=n}if(void 0!==r)return r}}}function io(){if(X)return Y;X=1;let e=ir(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},i={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function r(t){return void 0!==e.unformat(t)}function o(e,t,i,r=!1){let a=Object.keys(e).map(r=>{if(!t[r])return console.error(`${i} Invalid key: ${r}`),!1;let a=e[r],s=t[r];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(a,n,`[Validate ${r}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${i} ${r} type mismatched: "${s.type}" expected, "${typeof a}" provided`),!1;if(s.restrictions&&s.restrictions.length){let t=s.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:o}=s.restrictions[n];if(!t(a,e))return console.error(`${i} ${r} invalid value: ${o}`),!1}}return s.restriction&&!s.restriction(a,e)?(console.error(`${i} ${r} invalid value: ${s.message}`),!1):s.validValues&&-1===s.validValues.indexOf(a)?(console.error(`${i} ${r} invalid value: must be among ${JSON.stringify(s.validValues)}, "${a}" provided`),!1):!s.children||!!o(a,s.children,`[Validate ${r}]`)});return r||a.push(...Object.keys(t).map(n=>{let r=t[n];if("string"==typeof r&&(r={type:r}),r.mandatory){let t=r.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${i} Missing mandatory key "${n}"`),!1}return!0})),a.reduce((e,t)=>e&&t,!0)}function a(e){return o(e,n,"[Validate format]")}return Y={validate:function(e,t){let n=r(e),i=a(t);return n&&i},validateFormat:a,validateInput:r,validateLanguage:function(e){return o(e,i,"[Validate language]")}}}var ia={parseFormat:function(e,t={}){var n,i,r,o,a;let s,l,u,c;return"string"!=typeof e?e:(!function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(l=(i=e=(s=(n=e).match(/^{([^}]*)}/))?(t.prefix=s[1],n.slice(s[0].length)):n).match(/{([^}]*)}$/))?(t.postfix=l[1],i.slice(0,-l[0].length)):i,t),(u=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+u[0]),(c=e.split(".")[0].match(/0+/))&&(t.characteristic=c[0].length),!function(e,t){if(-1!==e.indexOf(".")){let n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),-1!==e.indexOf("a")&&(t.average=!0),-1!==(r=e).indexOf("K")?t.forceAverage="thousand":-1!==r.indexOf("M")?t.forceAverage="million":-1!==r.indexOf("B")?t.forceAverage="billion":-1!==r.indexOf("T")&&(t.forceAverage="trillion"),!function(e,t){let n=e.split(".")[1];if(n){let e=n.match(/0+/);e&&(t.mantissa=e[0].length)}}(e,t),(o=e).match(/\[\.]/)?t.optionalMantissa=!0:o.match(/\./)&&(t.optionalMantissa=!1),!function(e,t){let n=e.split(".")[1];n&&(t.trimMantissa=-1!==n.indexOf("["))}(e,t),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(a=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),a.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t)}};function is(){let e;if(Q)return K;Q=1;let t=G?$:(G=1,$={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),n=io(),i={},r={},o=null,a={};function s(){return r[e]}return i.languages=()=>Object.assign({},r),i.currentLanguage=()=>e,i.currentBytes=()=>s().bytes||{},i.currentCurrency=()=>s().currency,i.currentAbbreviations=()=>s().abbreviations,i.currentDelimiters=()=>s().delimiters,i.currentOrdinal=()=>s().ordinal,i.currentDefaults=()=>Object.assign({},s().defaults,a),i.currentOrdinalDefaultFormat=()=>Object.assign({},i.currentDefaults(),s().ordinalFormat),i.currentByteDefaultFormat=()=>Object.assign({},i.currentDefaults(),s().byteFormat),i.currentPercentageDefaultFormat=()=>Object.assign({},i.currentDefaults(),s().percentageFormat),i.currentCurrencyDefaultFormat=()=>Object.assign({},i.currentDefaults(),s().currencyFormat),i.currentTimeDefaultFormat=()=>Object.assign({},i.currentDefaults(),s().timeFormat),i.setDefaults=e=>{e=ia.parseFormat(e),n.validateFormat(e)&&(a=e)},i.getZeroFormat=()=>o,i.setZeroFormat=e=>o="string"==typeof e?e:null,i.hasZeroFormat=()=>null!==o,i.languageData=e=>{if(e){if(r[e])return r[e];throw Error(`Unknown tag "${e}"`)}return s()},i.registerLanguage=(t,i=!1)=>{if(!n.validateLanguage(t))throw Error("Invalid language data");r[t.languageTag]=t,i&&(e=t.languageTag)},i.setLanguage=(n,i=t.languageTag)=>{if(!r[n]){let t=n.split("-")[0],o=Object.keys(r).find(e=>e.split("-")[0]===t);if(!r[o]){e=i;return}e=o;return}e=n},i.registerLanguage(t),e=t.languageTag,K=i}var il={exports:{}};!function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,r=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",s=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function u(e){for(var t,n,i=1,r=e.length,o=e[0]+"";i<r;){for(n=14-(t=e[i++]+"").length;n--;t="0"+t);o+=t}for(r=o.length;48===o.charCodeAt(--r););return o.slice(0,r+1||1)}function c(e,t){var n,i,r=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=r&&!r[0],i=o&&!o[0],n||i)return n?i?0:-s:a;if(a!=s)return a;if(n=a<0,i=l==u,!r||!o)return i?0:!r^n?1:-1;if(!i)return l>u^n?1:-1;for(a=0,s=(l=r.length)<(u=o.length)?l:u;a<s;a++)if(r[a]!=o[a])return r[a]>o[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function h(e,t,n,i){if(e<t||e>n||e!==r(e))throw Error(o+(i||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function d(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function p(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function f(e,t,n){var i,r;if(t<0){for(r=n+".";++t;r+=n);e=r+e}else if(i=e.length,++t>i){for(r=n,t-=i;--t;r+=n);e+=r}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var g,m,v,y,x,b,w,S,_,C=F.prototype={constructor:F,toString:null,valueOf:null},M=new F(1),k=20,T=4,D=-7,I=21,A=-1e7,P=1e7,O=!1,R=1,E=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz",N=!0;function F(e,t){var i,o,s,l,u,c,d,p,f=this;if(!(f instanceof F))return new F(e,t);if(null==t){if(e&&!0===e._isBigNumber){f.s=e.s,!e.c||e.e>P?f.c=f.e=null:e.e<A?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice());return}if((c="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,u=e;u>=10;u/=10,l++);l>P?f.c=f.e=null:(f.e=l,f.c=[e]);return}p=String(e)}else{if(!n.test(p=String(e)))return _(f,p,c);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(u=p.search(/e/i))>0?(l<0&&(l=u),l+=+p.slice(u+1),p=p.substring(0,u)):l<0&&(l=p.length)}else{if(h(t,2,B.length,"Base"),10==t&&N)return j(f=new F(e),k+f.e+1,T);if(p=String(e),c="number"==typeof e){if(0*e!=0)return _(f,p,c,t);if(f.s=1/e<0?(p=p.slice(1),-1):1,F.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(i=B.slice(0,t),l=u=0,d=p.length;u<d;u++)if(0>i.indexOf(o=p.charAt(u))){if("."==o){if(u>l){l=d;continue}}else if(!s&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){s=!0,u=-1,l=0;continue}return _(f,String(e),c,t)}c=!1,(l=(p=S(p,t,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(u=0;48===p.charCodeAt(u);u++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(u,++d)){if(d-=u,c&&F.DEBUG&&d>15&&(e>0x1fffffffffffff||e!==r(e)))throw Error(a+f.s*e);if((l=l-u-1)>P)f.c=f.e=null;else if(l<A)f.c=[f.e=0];else{if(f.e=l,f.c=[],u=(l+1)%14,l<0&&(u+=14),u<d){for(u&&f.c.push(+p.slice(0,u)),d-=14;u<d;)f.c.push(+p.slice(u,u+=14));u=14-(p=p.slice(u)).length}else u-=d;for(;u--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function z(e,t,n,i){var r,o,a,s,l;if(null==n?n=T:h(n,0,8),!e.c)return e.toString();if(r=e.c[0],a=e.e,null==t)l=u(e.c),l=1==i||2==i&&(a<=D||a>=I)?p(l,a):f(l,a,"0");else if(o=(e=j(new F(e),t,n)).e,s=(l=u(e.c)).length,1==i||2==i&&(t<=o||o<=D)){for(;s<t;l+="0",s++);l=p(l,o)}else if(t-=a,l=f(l,o,"0"),o+1>s){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-s)>0)for(o+1==s&&(l+=".");t--;l+="0");return e.s<0&&r?"-"+l:l}function V(e,t){for(var n,i,r=1,o=new F(e[0]);r<e.length;r++)(i=new F(e[r])).s&&(n=c(o,i))!==t&&(0!==n||o.s!==t)||(o=i);return o}function Z(e,t,n){for(var i=1,r=t.length;!t[--r];t.pop());for(r=t[0];r>=10;r/=10,i++);return(n=i+14*n-1)>P?e.c=e.e=null:n<A?e.c=[e.e=0]:(e.e=n,e.c=t),e}function j(e,t,n,o){var a,l,u,c,h,d,p,f=e.c;if(f){e:{for(a=1,c=f[0];c>=10;c/=10,a++);if((l=t-a)<0)l+=14,u=t,p=r((h=f[d=0])/s[a-u-1]%10);else if((d=i((l+1)/14))>=f.length){if(o){for(;f.length<=d;f.push(0));h=p=0,a=1,l%=14,u=l-14+1}else break e}else{for(a=1,h=c=f[d];c>=10;c/=10,a++);l%=14,p=(u=l-14+a)<0?0:r(h/s[a-u-1]%10)}if(o=o||t<0||null!=f[d+1]||(u<0?h:h%s[a-u-1]),o=n<4?(p||o)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||o||6==n&&(l>0?u>0?h/s[a-u]:0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,o?(t-=e.e+1,f[0]=s[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==l?(f.length=d,c=1,d--):(f.length=d+1,c=s[14-l],f[d]=u>0?r(h/s[a-u]%s[u])*c:0),o)for(;;){if(0==d){for(l=1,u=f[0];u>=10;u/=10,l++);for(u=f[0]+=c,c=1;u>=10;u/=10,c++);l!=c&&(e.e++,1e14==f[0]&&(f[0]=1));break}if(f[d]+=c,1e14!=f[d])break;f[d--]=0,c=1}for(l=f.length;0===f[--l];f.pop());}e.e>P?e.c=e.e=null:e.e<A&&(e.c=[e.e=0])}return e}function H(e){var t,n=e.e;return null===n?e.toString():(t=u(e.c),t=n<=D||n>=I?p(t,n):f(t,n,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,n;if(null!=e){if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(h(n=e[t],0,1e9,t),k=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(h(n=e[t],0,8,t),T=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(h(n[0],-1e9,0,t),h(n[1],0,1e9,t),D=n[0],I=n[1]):(h(n,-1e9,1e9,t),D=-(I=n<0?-n:n))),e.hasOwnProperty(t="RANGE")){if((n=e[t])&&n.pop)h(n[0],-1e9,-1,t),h(n[1],1,1e9,t),A=n[0],P=n[1];else if(h(n,-1e9,1e9,t),n)A=-(P=n<0?-n:n);else throw Error(o+t+" cannot be zero: "+n)}if(e.hasOwnProperty(t="CRYPTO")){if(!!(n=e[t])===n){if(n){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))O=n;else throw O=!n,Error(o+"crypto unavailable")}else O=n}else throw Error(o+t+" not true or false: "+n)}if(e.hasOwnProperty(t="MODULO_MODE")&&(h(n=e[t],0,9,t),R=n),e.hasOwnProperty(t="POW_PRECISION")&&(h(n=e[t],0,1e9,t),E=n),e.hasOwnProperty(t="FORMAT")){if("object"==typeof(n=e[t]))L=n;else throw Error(o+t+" not an object: "+n)}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);N="0123456789"==n.slice(0,10),B=n}}else throw Error(o+"Object expected: "+e)}return{DECIMAL_PLACES:k,ROUNDING_MODE:T,EXPONENTIAL_AT:[D,I],RANGE:[A,P],CRYPTO:O,MODULO_MODE:R,POW_PRECISION:E,FORMAT:L,ALPHABET:B}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,n,i=e.c,a=e.e,s=e.s;e:if("[object Array]"==({}).toString.call(i)){if((1===s||-1===s)&&a>=-1e9&&a<=1e9&&a===r(a)){if(0===i[0]){if(0===a&&1===i.length)return!0;break e}if((t=(a+1)%14)<1&&(t+=14),String(i[0]).length==t){for(t=0;t<i.length;t++)if((n=i[t])<0||n>=1e14||n!==r(n))break e;if(0!==n)return!0}}}else if(null===i&&null===a&&(null===s||1===s||-1===s))return!0;throw Error(o+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return V(arguments,-1)},F.minimum=F.min=function(){return V(arguments,1)},F.random=(g=0x20000000000000*Math.random()&2097151?function(){return r(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},function(e){var t,n,a,l,u,c=0,d=[],p=new F(M);if(null==e?e=k:h(e,0,1e9),l=i(e/14),O){if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));c<l;)(u=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(d.push(u%1e14),c+=2);c=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);c<l;)(u=(31&t[c])*0x1000000000000+0x10000000000*t[c+1]+0x100000000*t[c+2]+0x1000000*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(d.push(u%1e14),c+=7);c=l/7}else throw O=!1,Error(o+"crypto unavailable")}if(!O)for(;c<l;)(u=g())<9e15&&(d[c++]=u%1e14);for(l=d[--c],e%=14,l&&e&&(u=s[14-e],d[c]=r(l/u)*u);0===d[c];d.pop(),c--);if(c<0)d=[a=0];else{for(a=-1;0===d[0];d.splice(0,1),a-=14);for(c=1,u=d[0];u>=10;u/=10,c++);c<14&&(a-=14-c)}return p.e=a,p.c=d,p}),F.sum=function(){for(var e=1,t=arguments,n=new F(t[0]);e<t.length;)n=n.plus(t[e++]);return n},S=function(){var e="0123456789";function t(e,t,n,i){for(var r,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=i.indexOf(e.charAt(s++)),r=0;r<a.length;r++)a[r]>n-1&&(null==a[r+1]&&(a[r+1]=0),a[r+1]+=a[r]/n|0,a[r]%=n)}return a.reverse()}return function(n,i,r,o,a){var s,l,c,h,d,p,g,m,v=n.indexOf("."),y=k,x=T;for(v>=0&&(h=E,E=0,n=n.replace(".",""),p=(m=new F(i)).pow(n.length-v),E=h,m.c=t(f(u(p.c),p.e,"0"),10,r,e),m.e=m.c.length),c=h=(g=t(n,i,r,a?(s=B,e):(s=e,B))).length;0==g[--h];g.pop());if(!g[0])return s.charAt(0);if(v<0?--c:(p.c=g,p.e=c,p.s=o,g=(p=w(p,m,y,x,r)).c,d=p.r,c=p.e),v=g[l=c+y+1],h=r/2,d=d||l<0||null!=g[l+1],d=x<4?(null!=v||d)&&(0==x||x==(p.s<0?3:2)):v>h||v==h&&(4==x||d||6==x&&1&g[l-1]||x==(p.s<0?8:7)),l<1||!g[0])n=d?f(s.charAt(1),-y,s.charAt(0)):s.charAt(0);else{if(g.length=l,d)for(--r;++g[--l]>r;)g[l]=0,l||(++c,g=[1].concat(g));for(h=g.length;!g[--h];);for(v=0,n="";v<=h;n+=s.charAt(g[v++]));n=f(n,c,s.charAt(0))}return n}}(),w=function(){function e(e,t,n){var i,r,o,a,s=0,l=e.length,u=t%1e7,c=t/1e7|0;for(e=e.slice();l--;)i=c*(o=e[l]%1e7)+(a=e[l]/1e7|0)*u,s=((r=u*o+i%1e7*1e7+s)/n|0)+(i/1e7|0)+c*a,e[l]=r%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,i){var r,o;if(n!=i)o=n>i?1:-1;else for(r=o=0;r<n;r++)if(e[r]!=t[r]){o=e[r]>t[r]?1:-1;break}return o}function n(e,t,n,i){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*i+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,o,a,s,u){var c,h,d,p,f,g,m,v,y,x,b,w,S,_,C,M,k,T=i.s==o.s?1:-1,D=i.c,I=o.c;if(!D||!D[0]||!I||!I[0])return new F(i.s&&o.s&&(D?!I||D[0]!=I[0]:I)?D&&0==D[0]||!I?0*T:T/0:NaN);for(y=(v=new F(T)).c=[],T=a+(h=i.e-o.e)+1,u||(u=1e14,h=l(i.e/14)-l(o.e/14),T=T/14|0),d=0;I[d]==(D[d]||0);d++);if(I[d]>(D[d]||0)&&h--,T<0)y.push(1),p=!0;else{for(_=D.length,M=I.length,d=0,T+=2,(f=r(u/(I[0]+1)))>1&&(I=e(I,f,u),D=e(D,f,u),M=I.length,_=D.length),S=M,b=(x=D.slice(0,M)).length;b<M;x[b++]=0);k=[0].concat(k=I.slice()),C=I[0],I[1]>=u/2&&C++;do{if(f=0,(c=t(I,x,M,b))<0){if(w=x[0],M!=b&&(w=w*u+(x[1]||0)),(f=r(w/C))>1)for(f>=u&&(f=u-1),m=(g=e(I,f,u)).length,b=x.length;1==t(g,x,m,b);)f--,n(g,M<m?k:I,m,u),m=g.length,c=1;else 0==f&&(c=f=1),m=(g=I.slice()).length;if(m<b&&(g=[0].concat(g)),n(x,g,b,u),b=x.length,-1==c)for(;1>t(I,x,M,b);)f++,n(x,M<b?k:I,b,u),b=x.length}else 0===c&&(f++,x=[0]);y[d++]=f,x[0]?x[b++]=D[S]||0:(x=[D[S]],b=1)}while((S++<_||null!=x[0])&&T--);p=null!=x[0],y[0]||y.splice(0,1)}if(1e14==u){for(d=1,T=y[0];T>=10;T/=10,d++);j(v,a+(v.e=d+14*h-1)+1,s,p)}else v.e=h,v.r=+p;return v}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,b=/^\s*\+(?=[\w.])|^\s+|\s+$/g,_=function(e,t,n,i){var r,a=n?t:t.replace(b,"");if(x.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(m,function(e,t,n){return r="x"==(n=n.toLowerCase())?16:"b"==n?2:8,i&&i!=r?e:t}),i&&(r=i,a=a.replace(v,"$1").replace(y,"0.$1")),t!=a))return new F(a,r);if(F.DEBUG)throw Error(o+"Not a"+(i?" base "+i:"")+" number: "+t);e.s=null}e.c=e.e=null},C.absoluteValue=C.abs=function(){var e=new F(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return c(this,new F(e,t))},C.decimalPlaces=C.dp=function(e,t){var n,i,r;if(null!=e)return h(e,0,1e9),null==t?t=T:h(t,0,8),j(new F(this),e+this.e+1,t);if(!(n=this.c))return null;if(i=((r=n.length-1)-l(this.e/14))*14,r=n[r])for(;r%10==0;r/=10,i--);return i<0&&(i=0),i},C.dividedBy=C.div=function(e,t){return w(this,new F(e,t),k,T)},C.dividedToIntegerBy=C.idiv=function(e,t){return w(this,new F(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var n,a,s,l,u,c,h,p,f,g=this;if((e=new F(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+H(e));if(null!=t&&(t=new F(t)),c=e.e>14,!g.c||!g.c[0]||1==g.c[0]&&!g.e&&1==g.c.length||!e.c||!e.c[0])return f=new F(Math.pow(+H(g),c?e.s*(2-d(e)):+H(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(a=!h&&g.isInteger()&&t.isInteger())&&(g=g.mod(t))}else{if(e.e>9&&(g.e>0||g.e<-1||(0==g.e?g.c[0]>1||c&&g.c[1]>=24e7:g.c[0]<8e13||c&&g.c[0]<=9999975e7)))return l=g.s<0&&d(e)?-0:0,g.e>-1&&(l=1/l),new F(h?1/l:l);E&&(l=i(E/14+2))}for(c?(n=new F(.5),h&&(e.s=1),p=d(e)):p=(s=Math.abs(+H(e)))%2,f=new F(M);;){if(p){if(!(f=f.times(g)).c)break;l?f.c.length>l&&(f.c.length=l):a&&(f=f.mod(t))}if(s){if(0===(s=r(s/2)))break;p=s%2}else if(j(e=e.times(n),e.e+1,1),e.e>14)p=d(e);else{if(0==(s=+H(e)))break;p=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):a&&(g=g.mod(t))}return a?f:(h&&(f=M.div(f)),t?f.mod(t):l?j(f,E,T,u):f)},C.integerValue=function(e){var t=new F(this);return null==e?e=T:h(e,0,8),j(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===c(this,new F(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return c(this,new F(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=c(this,new F(e,t)))||0===t},C.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return 0>c(this,new F(e,t))},C.isLessThanOrEqualTo=C.lte=function(e,t){return -1===(t=c(this,new F(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var n,i,r,o,a=this.s;if(t=(e=new F(e,t)).s,!a||!t)return new F(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/14,u=e.e/14,c=this.c,h=e.c;if(!s||!u){if(!c||!h)return c?(e.s=-t,e):new F(h?this:NaN);if(!c[0]||!h[0])return h[0]?(e.s=-t,e):new F(c[0]?this:3==T?-0:0)}if(s=l(s),u=l(u),c=c.slice(),a=s-u){for((o=a<0)?(a=-a,r=c):(u=s,r=h),r.reverse(),t=a;t--;r.push(0));r.reverse()}else for(i=(o=(a=c.length)<(t=h.length))?a:t,a=t=0;t<i;t++)if(c[t]!=h[t]){o=c[t]<h[t];break}if(o&&(r=c,c=h,h=r,e.s=-e.s),(t=(i=h.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=1e14-1;i>a;){if(c[--i]<h[i]){for(n=i;n&&!c[--n];c[n]=t);--c[n],c[i]+=1e14}c[i]-=h[i]}for(;0==c[0];c.splice(0,1),--u);return c[0]?Z(e,c,u):(e.s=3==T?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var n,i;return(e=new F(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==R?(i=e.s,e.s=1,n=w(this,e,0,3),e.s=i,n.s*=i):n=w(this,e,0,R),(e=this.minus(n.times(e))).c[0]||1!=R||(e.s=this.s),e):new F(this):new F(NaN)},C.multipliedBy=C.times=function(e,t){var n,i,r,o,a,s,u,c,h,d,p,f,g,m=this.c,v=(e=new F(e,t)).c;if(!m||!v||!m[0]||!v[0])return this.s&&e.s&&(!m||m[0]||v)&&(!v||v[0]||m)?(e.s*=this.s,m&&v?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(i=l(this.e/14)+l(e.e/14),e.s*=this.s,(u=m.length)<(d=v.length)&&(g=m,m=v,v=g,r=u,u=d,d=r),r=u+d,g=[];r--;g.push(0));for(r=d;--r>=0;){for(n=0,p=v[r]%1e7,f=v[r]/1e7|0,o=r+(a=u);o>r;)s=f*(c=m[--a]%1e7)+(h=m[a]/1e7|0)*p,n=((c=p*c+s%1e7*1e7+g[o]+n)/1e14|0)+(s/1e7|0)+f*h,g[o--]=c%1e14;g[o]=n}return n?++i:g.splice(0,1),Z(e,g,i)},C.negated=function(){var e=new F(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,i=this.s;if(t=(e=new F(e,t)).s,!i||!t)return new F(NaN);if(i!=t)return e.s=-t,this.minus(e);var r=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!r||!o){if(!a||!s)return new F(i/0);if(!a[0]||!s[0])return s[0]?e:new F(a[0]?this:0*i)}if(r=l(r),o=l(o),a=a.slice(),i=r-o){for(i>0?(o=r,n=s):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+s[t]+i)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return i&&(a=[i].concat(a),++o),Z(e,a,o)},C.precision=C.sd=function(e,t){var n,i,r;if(null!=e&&!!e!==e)return h(e,1,1e9),null==t?t=T:h(t,0,8),j(new F(this),e,t);if(!(n=this.c))return null;if(i=14*(r=n.length-1)+1,r=n[r]){for(;r%10==0;r/=10,i--);for(r=n[0];r>=10;r/=10,i++);}return e&&this.e+1>i&&(i=this.e+1),i},C.shiftedBy=function(e){return h(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,n,i,r,o=this.c,a=this.s,s=this.e,c=k+4,h=new F("0.5");if(1!==a||!o||!o[0])return new F(!a||a<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(a=Math.sqrt(+H(this)))||a==1/0?(((t=u(o)).length+s)%2==0&&(t+="0"),a=Math.sqrt(+t),s=l((s+1)/2)-(s<0||s%2),n=new F(t=a==1/0?"5e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s)):n=new F(a+""),n.c[0]){for((a=(s=n.e)+c)<3&&(a=0);;)if(r=n,n=h.times(r.plus(w(this,r,c,1))),u(r.c).slice(0,a)===(t=u(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(j(n,n.e+k+2,1),e=!n.times(n).eq(this));break}if(!i&&(j(r,r.e+k+2,0),r.times(r).eq(this))){n=r;break}c+=4,a+=4,i=1}}return j(n,n.e+k+1,T,e)},C.toExponential=function(e,t){return null!=e&&(h(e,0,1e9),e++),z(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(h(e,0,1e9),e=e+this.e+1),z(this,e,t)},C.toFormat=function(e,t,n){var i;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=L;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(i=this.toFixed(e,t),this.c){var r,a=i.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=a[0],h=a[1],d=this.s<0,p=d?c.slice(1):c,f=p.length;if(l&&(r=s,s=l,l=r,f-=r),s>0&&f>0){for(r=f%s||s,c=p.substr(0,r);r<f;r+=s)c+=u+p.substr(r,s);l>0&&(c+=u+p.slice(r)),d&&(c="-"+c)}i=h?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):c}return(n.prefix||"")+i+(n.suffix||"")},C.toFraction=function(e){var t,n,i,r,a,l,c,h,d,p,f,g,m=this.c;if(null!=e&&(!(c=new F(e)).isInteger()&&(c.c||1!==c.s)||c.lt(M)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+H(c));if(!m)return new F(this);for(t=new F(M),d=n=new F(M),i=h=new F(M),g=u(m),a=t.e=g.length-this.e-1,t.c[0]=s[(l=a%14)<0?14+l:l],e=!e||c.comparedTo(t)>0?a>0?t:d:c,l=P,P=1/0,c=new F(g),h.c[0]=0;p=w(c,t,0,1),1!=(r=n.plus(p.times(i))).comparedTo(e);)n=i,i=r,d=h.plus(p.times(r=d)),h=r,t=c.minus(p.times(r=t)),c=r;return r=w(e.minus(n),i,0,1),h=h.plus(r.times(d)),n=n.plus(r.times(i)),h.s=d.s=this.s,a*=2,f=1>w(d,i,a,T).minus(this).abs().comparedTo(w(h,n,a,T).minus(this).abs())?[d,i]:[h,n],P=l,f},C.toNumber=function(){return+H(this)},C.toPrecision=function(e,t){return null!=e&&h(e,1,1e9),z(this,e,t,2)},C.toString=function(e){var t,n=this,i=n.s,r=n.e;return null===r?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=r<=D||r>=I?p(u(n.c),r):f(u(n.c),r,"0"):10===e&&N?t=f(u((n=j(new F(n),k+r+1,T)).c),n.e,"0"):(h(e,2,B.length,"Base"),t=S(f(u(n.c),r,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return H(this)},C._isBigNumber=!0,null!=t&&F.set(t),F}()).default=t.BigNumber=t,il.exports?il.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(ii);var iu=il.exports;let ic=is(),ih=io(),id={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},ip={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:ig,decimalSuffixes:im}=ic.currentBytes(),iv={scale:1024,suffixes:im,marker:"bd"},iy={scale:1024,suffixes:ig,marker:"b"},ix={scale:1e3,suffixes:im,marker:"d"};function ib(e,t,n){let i=t[0],r=Math.abs(e);if(r>=n){for(let o=1;o<t.length;++o){let a=Math.pow(n,o),s=Math.pow(n,o+1);if(r>=a&&r<s){i=t[o],e/=a;break}}i===t[0]&&(e/=Math.pow(n,t.length-1),i=t[t.length-1])}return{value:e,suffix:i}}function iw(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function iS({instance:e,providedFormat:t,state:n=ic,decimalSeparator:i,defaults:r=n.currentDefaults()}){let o=e._value;if(0===o&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(o))return o.toString();let a=Object.assign({},ip,r,t),s=a.totalLength,l=s?0:a.characteristic,u=a.optionalCharacteristic,c=a.forceAverage,h=a.lowPrecision,d=!!s||!!c||a.average,p=s?-1:d&&void 0===t.mantissa?0:a.mantissa,f=!s&&(void 0===t.optionalMantissa?-1===p:a.optionalMantissa),g=a.trimMantissa,m=a.thousandSeparated,v=a.spaceSeparated,y=a.negative,x=a.forceSign,b=a.exponential,w=a.roundingFunction,S="";if(d){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:i,spaceSeparated:r=!1,totalLength:o=0,roundingFunction:a=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&i[t]&&id[t]?(s=i[t],e/=id[t]):l>=id.trillion||n&&1===a(l/id.trillion)?(s=i.trillion,e/=id.trillion):l<id.trillion&&l>=id.billion||n&&1===a(l/id.billion)?(s=i.billion,e/=id.billion):l<id.billion&&l>=id.million||n&&1===a(l/id.million)?(s=i.million,e/=id.million):(l<id.million&&l>=id.thousand||n&&1===a(l/id.thousand))&&(s=i.thousand,e/=id.thousand),s&&(s=(r?" ":"")+s),o){let t=e<0,n=e.toString().split(".")[0];u=Math.max(o-(t?n.length-1:n.length),0)}return{value:e,abbreviation:s,mantissaPrecision:u}}({value:o,forceAverage:c,lowPrecision:h,abbreviations:n.currentAbbreviations(),spaceSeparated:v,roundingFunction:w,totalLength:s});o=e.value,S+=e.abbreviation,s&&(p=e.mantissaPrecision)}if(b){let e=function({value:e,characteristicPrecision:t}){let[n,i]=e.toExponential().split("e"),r=+n;return t&&1<t&&(r*=Math.pow(10,t-1),i=(i=+i-(t-1))>=0?`+${i}`:i),{value:r,abbreviation:`e${i}`}}({value:o,characteristicPrecision:l});o=e.value,S=e.abbreviation+S}let _=function(e,t,n,i,r,o){if(-1===i)return e;let a=function(e,t,n=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[i,r]=n.split("e"),[o,a=""]=i.split(".");if(+r>0)n=o+a+iw(r-a.length);else{let e=".";e=0>+o?`-0${e}`:`0${e}`;let i=(iw(-r-1)+Math.abs(o)+a).substr(0,t);i.length<t&&(i+=iw(t-i.length)),n=e+i}return+r>0&&t>0&&(n+=`.${iw(t)}`),n}(e,t):new iu(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,i,o),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||r))return s;let u=l.match(/0+$/);return r&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(o.toString(),o,f,p,g,w);if(_=function(e,t,n,i,r){let o=i.currentDelimiters(),a=o.thousands;r=r||o.decimal;let s=o.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1],h=t<0&&0===u.indexOf("-");return n&&(h&&(u=u.slice(1)),(function(e,t){let n=[],i=0;for(let r=e;r>0;r--)i===t&&(n.unshift(r),i=0),i++;return n})(u.length,s).forEach((e,t)=>{u=u.slice(0,e+t)+a+u.slice(e+t)}),h&&(u=`-${u}`)),l=c?u+r+c:u}(_=function(e,t,n,i){let r=e,[o,a]=r.toString().split(".");if(o.match(/^-?0$/)&&n)return a?`${o.replace("0","")}.${a}`:o.replace("0","");let s=t<0&&0===o.indexOf("-");if(s&&(o=o.slice(1),r=r.slice(1)),o.length<i){let e=i-o.length;for(let t=0;t<e;t++)r=`0${r}`}return s&&(r=`-${r}`),r.toString()}(_,o,u,l),o,m,n,i),(d||b)&&(_+=S),x||o<0){var C,M;C=_,_=0===(M=o)?C:0==+C?C.replace("-",""):M>0?`+${C}`:"sign"===y?C:`(${C.replace("-","")})`}return _}function i_(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}function iC(e,t,n){let i=new iu(e._value),r=t;return n.isNumbro(t)&&(r=t._value),r=new iu(r),e._value=i.minus(r).toNumber(),e}let iM=is(),ik=io(),iT=ir(),iD=(...e)=>(function(e,t={},n){if("string"==typeof t&&(t=ia.parseFormat(t)),!ih.validateFormat(t))return"ERROR: invalid format";let i=t.prefix||"",r=t.postfix||"",o=function(e,t,n){var i,r;switch(t.output){case"currency":return function(e,t,n){let i;let r=n.currentCurrency(),o=Object.assign({},t),a=Object.assign({},ip,o),s="",l=!!a.totalLength||!!a.forceAverage||a.average,u=o.currencyPosition||r.position,c=o.currencySymbol||r.symbol,h=void 0!==a.spaceSeparatedCurrency?a.spaceSeparatedCurrency:a.spaceSeparated;void 0===o.lowPrecision&&(o.lowPrecision=!1),h&&(s=" "),"infix"===u&&(i=s+c+s);let d=iS({instance:e,providedFormat:o,state:n,decimalSeparator:i});return"prefix"===u&&(d=e._value<0&&"sign"===a.negative?`-${s}${c}${d.slice(1)}`:e._value>0&&a.forceSign?`+${s}${c}${d.slice(1)}`:c+s+d),u&&"postfix"!==u||(d=d+(s=!a.spaceSeparatedAbbreviation&&l?"":s)+c),d}(e,t=i_(t,ic.currentCurrencyDefaultFormat()),ic);case"percent":let o,a,s;return o=(i=t=i_(t,ic.currentPercentageDefaultFormat())).prefixSymbol,a=iS({instance:n(100*e._value),providedFormat:i,state:ic}),s=Object.assign({},ip,i),o?`%${s.spaceSeparated?" ":""}${a}`:`${a}${s.spaceSeparated?" ":""}%`;case"byte":return function(e,t,n,i){let r=t.base||"binary",o=Object.assign({},ip,t),{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes(),l={general:{scale:1024,suffixes:s||im,marker:"bd"},binary:{scale:1024,suffixes:a||ig,marker:"b"},decimal:{scale:1e3,suffixes:s||im,marker:"d"}}[r],{value:u,suffix:c}=ib(e._value,l.suffixes,l.scale),h=iS({instance:i(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${h}${o.spaceSeparated?" ":""}${c}`}(e,t=i_(t,ic.currentByteDefaultFormat()),ic,n);case"time":let l,u,c;return t=i_(t,ic.currentTimeDefaultFormat()),l=Math.floor(e._value/60/60),u=Math.floor((e._value-3600*l)/60),c=Math.round(e._value-3600*l-60*u),`${l}:${u<10?"0":""}${u}:${c<10?"0":""}${c}`;case"ordinal":let h,d,p,f;return r=t=i_(t,ic.currentOrdinalDefaultFormat()),h=ic.currentOrdinal(),d=Object.assign({},ip,r),p=iS({instance:e,providedFormat:r,state:ic}),f=h(e._value),`${p}${d.spaceSeparated?" ":""}${f}`;default:return iS({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(o=i+o)+r})(...e,ij),iI=(...e)=>(function(e){return ib(e._value,iv.suffixes,iv.scale).suffix})(...e,ij),iA=(...e)=>(function(e){return ib(e._value,iy.suffixes,iy.scale).suffix})(...e,ij),iP=(...e)=>(function(e){return ib(e._value,ix.suffixes,ix.scale).suffix})(...e,ij),iO=i_,iR=(e,t)=>{let n,i;return n=new iu(e._value),i=t,ij.isNumbro(t)&&(i=t._value),i=new iu(i),e._value=n.plus(i).toNumber(),e},iE=(e,t)=>iC(e,t,ij),iL=(e,t)=>{let n,i;return n=new iu(e._value),i=t,ij.isNumbro(t)&&(i=t._value),i=new iu(i),e._value=n.times(i).toNumber(),e},iB=(e,t)=>{let n,i;return n=new iu(e._value),i=t,ij.isNumbro(t)&&(i=t._value),i=new iu(i),e._value=n.dividedBy(i).toNumber(),e},iN=(e,t)=>{let n;return n=t,ij.isNumbro(t)&&(n=t._value),e._value=n,e},iF=(e,t)=>{let n;return iC(n=ij(e._value),t,ij),Math.abs(n._value)},iz=iu;class iV{constructor(e){this._value=e}clone(){return ij(this._value)}format(e={}){return iD(this,e)}formatCurrency(e){return"string"==typeof e&&(e=ia.parseFormat(e)),(e=iO(e,iM.currentCurrencyDefaultFormat())).output="currency",iD(this,e)}formatTime(e={}){return e.output="time",iD(this,e)}binaryByteUnits(){return iA(this)}decimalByteUnits(){return iP(this)}byteUnits(){return iI(this)}difference(e){return iF(this,e)}add(e){return iR(this,e)}subtract(e){return iE(this,e)}multiply(e){return iL(this,e)}divide(e){return iB(this,e)}set(e){return iN(this,iZ(e))}value(){return this._value}valueOf(){return this._value}}function iZ(e){let t=e;return ij.isNumbro(e)?t=e._value:"string"==typeof e?t=ij.unformat(e):isNaN(e)&&(t=NaN),t}function ij(e){return new iV(iZ(e))}ij.version="2.5.0",ij.isNumbro=function(e){return e instanceof iV},ij.language=iM.currentLanguage,ij.registerLanguage=iM.registerLanguage,ij.setLanguage=iM.setLanguage,ij.languages=iM.languages,ij.languageData=iM.languageData,ij.zeroFormat=iM.setZeroFormat,ij.defaultFormat=iM.currentDefaults,ij.setDefaults=iM.setDefaults,ij.defaultCurrencyFormat=iM.currentCurrencyDefaultFormat,ij.validate=ik.validate,ij.loadLanguagesInNode=e=>(function(e,t){e.forEach(e=>{let n;try{n=function(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}n&&t.registerLanguage(n)})})(e,ij),ij.unformat=iT.unformat,ij.BigNumber=iz;var iH=ij&&ij.__esModule&&Object.prototype.hasOwnProperty.call(ij,"default")?ij.default:ij;function iW(e){return"number"==typeof e}function i$(e){return e&&(e<0?e=0:e>20&&(e=20)),e}function iG(e,{shortValues:t,decimalPlaces:n}){if(!1===t||1e3>Math.abs(e)){let i={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return iW(n)?(i.minimumFractionDigits=i$(n),i.maximumFractionDigits=i$(n)):!1!==t&&(i.maximumSignificantDigits=3),Intl.NumberFormat("en-US",i).format(e)}return iH(e).format({output:"byte",base:"decimal",spaceSeparated:!0,mantissa:iW(n)?n:2,trimMantissa:!iW(n),optionalMantissa:!iW(n)})}let iU="Percent",iq="Time";var iY=((f={}).milliseconds="millisecond",f.seconds="second",f.minutes="minute",f.hours="hour",f.days="day",f.weeks="week",f.months="month",f.years="year",f);let iX={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001},iK=["years","months","weeks","days","hours","minutes","seconds","milliseconds"],iQ="Throughput",iJ={Time:{label:"Time",decimalPlaces:!0},Percent:{label:"percent",decimalPlaces:!0},Decimal:{label:"Decimal",decimalPlaces:!0,shortValues:!0},Bytes:{label:"Bytes",decimalPlaces:!0,shortValues:!0},Throughput:{label:"Throughput",decimalPlaces:!0}},i0={milliseconds:{group:iq,label:"Milliseconds"},seconds:{group:iq,label:"Seconds"},minutes:{group:iq,label:"Minutes"},hours:{group:iq,label:"Hours"},days:{group:iq,label:"Days"},weeks:{group:iq,label:"Weeks"},months:{group:iq,label:"Months"},years:{group:iq,label:"Years"},percent:{group:iU,label:"Percent (0-100)"},"percent-decimal":{group:iU,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:iU,label:"%"},decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes"},"bits/sec":{group:iQ,label:"Bits/sec"},"bytes/sec":{group:iQ,label:"Bytes/sec"},"counts/sec":{group:iQ,label:"Counts/sec"},"events/sec":{group:iQ,label:"Events/sec"},"messages/sec":{group:iQ,label:"Messages/sec"},"ops/sec":{group:iQ,label:"Ops/sec"},"packets/sec":{group:iQ,label:"Packets/sec"},"reads/sec":{group:iQ,label:"Reads/sec"},"requests/sec":{group:iQ,label:"Requests/sec"},"records/sec":{group:iQ,label:"Records/sec"},"rows/sec":{group:iQ,label:"Rows/sec"},"writes/sec":{group:iQ,label:"Writes/sec"}};function i1(e,t){if(void 0===t)return e.toString();if("Bytes"===i2(t))return iG(e,t);if("Decimal"===i2(t))return function(e,{shortValues:t,decimalPlaces:n}){let i={style:"decimal",useGrouping:!0};return!1!==t&&(i.notation="compact"),iW(n)?(i.minimumFractionDigits=i$(n),i.maximumFractionDigits=i$(n)):!1!==t&&(i.maximumSignificantDigits=3),Intl.NumberFormat("en-US",i).format(e)}(e,t);if("Percent"===i2(t))return function(e,{unit:t,decimalPlaces:n}){let i={style:"percent",useGrouping:!0};return iW(n)?(i.minimumFractionDigits=i$(n),i.maximumFractionDigits=i$(n)):i.maximumSignificantDigits=3,"percent"===t&&(e/=100),Intl.NumberFormat("en-US",i).format(e)}(e,t);if("Time"===i2(t))return function(e,{unit:t,decimalPlaces:n}){var i;if(0===e)return"0s";let r=function(e,t){let n=e*iX[t],i=iK[0]||"years",r=i,o=n/iX[i];for(r of iK)if((o=n/iX[r])>=1)break;return{value:o,unit:r}}(e,t),o={style:"unit",unit:iY[r.unit],unitDisplay:"months"===(i=r.unit)||"years"===i?"long":"narrow"};return iW(n)?(o.minimumFractionDigits=i$(n),o.maximumFractionDigits=i$(n)):o.maximumSignificantDigits=3,Intl.NumberFormat("en-US",o).format(r.value)}(e,t);if("Throughput"===i2(t))return function(e,{unit:t,shortValues:n,decimalPlaces:i}){if("bytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return iG(e,{unit:"bytes",shortValues:n,decimalPlaces:i})+"/"+t}let r={style:"decimal",useGrouping:!0};return!1!==n&&(r.notation="compact"),iW(i)?(r.minimumFractionDigits=i$(i),r.maximumFractionDigits=i$(i)):!1!==n&&(r.maximumSignificantDigits=3),Intl.NumberFormat("en-US",r).format(e)+" "+t}(e,t);throw Error(`Unknown unit options ${t}`)}function i2(e){return i0[e.unit].group}function i5(e){return iJ[i0[e.unit].group]}function i3(e,t){return[it()({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>i1(e,t)}},e)]}let i4=1e3,i8="Pinned Crosshair",i6={name:i8,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var i9=n(9085),i7=n(461);function re(e){return{value:{pastDuration:e},display:`Last ${(0,i7.formatDuration)((0,i9.Ib)(e),{delimiter:", "})}`}}function rt(e){let t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function rn(e){e.dispatchAction({type:"restore"})}function ri(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function rr(e,t,n){if(void 0===n)return null;let i=[e,t];return n.containPixel("grid",i)?n.convertFromPixel("grid",i):null}function ro(e,t,n,i,r,o){let a=o.length>0?o[o.length-1]:r[r.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay",seriesIndex:i}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function ra(e){return e[e.length-1]?.name===i8}function rs(e,t){if(void 0===e||void 0===t)return null;let n=null,i=1/0;for(let[r]of e){let e=Math.abs(r-t);e<i&&(n=r,i=e)}return n}function rl(e,t){if(void 0===t)return null;let n=e.length,i=null;for(let r=0;r<n;r++){let o=n>0?e[r]:null;if(!o)break;i=rs(o.values,t)}return i}function ru(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}function rc(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);let t=(0,eV.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var rh=n(4665);function rd(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function rp(e,t,n){let i=n?.toLowerCase();return n&&"local"!==i&&"browser"!==i?(0,rh.formatInTimeZone)(e,"utc"===i?"UTC":n,t):(0,i7.format)(e,t)}function rf(e){return e>15768e7?"{yyyy}":e>63072e6?"{MMM} {yyyy}":e>432e6&&e<1577664e4?"{MM}/{dd}":e>1728e5&&e<=432e6?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}let rg=e=>{if(!e)return{formattedDate:"",formattedTime:""};let t=new Date(e);return{formattedDate:(0,i7.format)(t,"MMM dd, yyyy - "),formattedTime:(0,i7.format)(t,"HH:mm:ss")}};function rm(e,t){let n=e.palette.text?.primary??"#222",i={title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}};return it()({echartsTheme:i,noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}let rv=(0,eV.createContext)(void 0);function ry(e){let{children:t,timeZone:n}=e;return(0,ez.jsx)(rv.Provider,{value:n,children:t})}function rx(){let e=(0,eV.useContext)(rv);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>rp(t,n,e),dateFormatOptionsWithUserTimeZone:t=>rd(t,e)}}function rb({label:e,color:t,onColorChange:n,onClear:i}){let[r,o]=(0,eV.useState)(null),a=!!r,{thresholds:{defaultColor:s,palette:l}}=tK();return(0,ez.jsxs)(ez.Fragment,{children:[(0,ez.jsx)(rw,{size:"small","aria-label":`change ${e} color`,isSelected:a,iconColor:t,onClick:e=>{o(e.currentTarget)},children:(0,ez.jsx)(tH.default,{})}),(0,ez.jsx)(tU.ZP,{"data-testid":"options color picker",open:a,anchorEl:r,onClose:()=>{o(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,ez.jsx)(t$,{color:t,palette:[s,...l],onChange:n,onClear:i})})]})}let rw=(0,eU.ZP)(td.Z,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var rS=n(4776),r_=n(6372);let rC=["list","table"],rM=["small","medium"],rk={mode:"list",size:"medium"};function rT(e){return e&&rC.includes(e)?e:rk.mode}var rD=Symbol.for("immer-nothing"),rI=Symbol.for("immer-draftable"),rA=Symbol.for("immer-state");function rP(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rO=Object.getPrototypeOf;function rR(e){return!!e&&!!e[rA]}function rE(e){return!!e&&(rB(e)||Array.isArray(e)||!!e[rI]||!!e.constructor?.[rI]||rZ(e)||rj(e))}var rL=Object.prototype.constructor.toString();function rB(e){if(!e||"object"!=typeof e)return!1;let t=rO(e);if(null===t)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===rL}function rN(e,t){0===rF(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,i)=>t(i,n,e))}function rF(e){let t=e[rA];return t?t.type_:Array.isArray(e)?1:rZ(e)?2:3*!!rj(e)}function rz(e,t){return 2===rF(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rV(e,t,n){let i=rF(e);2===i?e.set(t,n):3===i?e.add(n):e[t]=n}function rZ(e){return e instanceof Map}function rj(e){return e instanceof Set}function rH(e){return e.copy_||e.base_}function rW(e,t){if(rZ(e))return new Map(e);if(rj(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=rB(e);if(!0!==t&&("class_only"!==t||n)){let t=rO(e);return null!==t&&n?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[rA];let n=Reflect.ownKeys(t);for(let i=0;i<n.length;i++){let r=n[i],o=t[r];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[r]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[r]})}return Object.create(rO(e),t)}}function r$(e,t=!1){return rU(e)||rR(e)||!rE(e)||(rF(e)>1&&(e.set=e.add=e.clear=e.delete=rG),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>r$(t,!0))),e}function rG(){rP(2)}function rU(e){return Object.isFrozen(e)}var rq={};function rY(e){let t=rq[e];return t||rP(0,e),t}function rX(e,t){t&&(rY("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function rK(e){rQ(e),e.drafts_.forEach(r0),e.drafts_=null}function rQ(e){e===J&&(J=e.parent_)}function rJ(e){return J={drafts_:[],parent_:J,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function r0(e){let t=e[rA];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function r1(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return void 0!==e&&e!==n?(n[rA].modified_&&(rK(t),rP(4)),rE(e)&&(e=r2(t,e),t.parent_||r3(t,e)),t.patches_&&rY("Patches").generateReplacementPatches_(n[rA].base_,e,t.patches_,t.inversePatches_)):e=r2(t,n,[]),rK(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==rD?e:void 0}function r2(e,t,n){if(rU(t))return t;let i=t[rA];if(!i)return rN(t,(r,o)=>r5(e,i,t,r,o,n)),t;if(i.scope_!==e)return t;if(!i.modified_)return r3(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;let t=i.copy_,r=t,o=!1;3===i.type_&&(r=new Set(t),t.clear(),o=!0),rN(r,(r,a)=>r5(e,i,t,r,a,n,o)),r3(e,t,!1),n&&e.patches_&&rY("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function r5(e,t,n,i,r,o,a){if(rR(r)){let a=r2(e,r,o&&t&&3!==t.type_&&!rz(t.assigned_,i)?o.concat(i):void 0);if(rV(n,i,a),!rR(a))return;e.canAutoFreeze_=!1}else a&&n.add(r);if(rE(r)&&!rU(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;r2(e,r),(!t||!t.scope_.parent_)&&"symbol"!=typeof i&&Object.prototype.propertyIsEnumerable.call(n,i)&&r3(e,r)}}function r3(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&r$(t,n)}var r4={get(e,t){if(t===rA)return e;let n=rH(e);if(!rz(n,t))return function(e,t,n){let i=r9(t,n);return i?"value"in i?i.value:i.get?.call(e.draft_):void 0}(e,n,t);let i=n[t];return e.finalized_||!rE(i)?i:i===r6(e.base_,t)?(oe(e),e.copy_[t]=ot(i,e)):i},has:(e,t)=>t in rH(e),ownKeys:e=>Reflect.ownKeys(rH(e)),set(e,t,n){let i=r9(rH(e),t);if(i?.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){let i=r6(rH(e),t),r=i?.[rA];if(r&&r.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if((n===i?0!==n||1/n==1/i:n!=n&&i!=i)&&(void 0!==n||rz(e.base_,t)))return!0;oe(e),r7(e)}return!!(e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=n,e.assigned_[t]=!0,!0)},deleteProperty:(e,t)=>(void 0!==r6(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,oe(e),r7(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let n=rH(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:i.enumerable,value:n[t]}:i},defineProperty(){rP(11)},getPrototypeOf:e=>rO(e.base_),setPrototypeOf(){rP(12)}},r8={};function r6(e,t){let n=e[rA];return(n?rH(n):e)[t]}function r9(e,t){if(!(t in e))return;let n=rO(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=rO(n)}}function r7(e){!e.modified_&&(e.modified_=!0,e.parent_&&r7(e.parent_))}function oe(e){e.copy_||(e.copy_=rW(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function ot(e,t){let n=rZ(e)?rY("MapSet").proxyMap_(e,t):rj(e)?rY("MapSet").proxySet_(e,t):function(e,t){let n=Array.isArray(e),i={type_:+!!n,scope_:t?t.scope_:J,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},r=i,o=r4;n&&(r=[i],o=r8);let{revoke:a,proxy:s}=Proxy.revocable(r,o);return i.draft_=s,i.revoke_=a,s}(e,t);return(t?t.scope_:J).drafts_.push(n),n}rN(r4,(e,t)=>{r8[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),r8.deleteProperty=function(e,t){return r8.set.call(this,e,t,void 0)},r8.set=function(e,t,n){return r4.set.call(this,e[0],t,n,e[0])};var on=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{let i;if("function"==typeof e&&"function"!=typeof t){let n=t;t=e;let i=this;return function(e=n,...r){return i.produce(e,e=>t.call(this,e,...r))}}if("function"!=typeof t&&rP(6),void 0!==n&&"function"!=typeof n&&rP(7),rE(e)){let r=rJ(this),o=ot(e,void 0),a=!0;try{i=t(o),a=!1}finally{a?rK(r):rQ(r)}return rX(r,n),r1(i,r)}if(e&&"object"==typeof e)rP(1,e);else{if(void 0===(i=t(e))&&(i=e),i===rD&&(i=void 0),this.autoFreeze_&&r$(i,!0),n){let t=[],r=[];rY("Patches").generateReplacementPatches_(e,i,t,r),n(t,r)}return i}},this.produceWithPatches=(e,t)=>{let n,i;return"function"==typeof e?(t,...n)=>this.produceWithPatches(t,t=>e(t,...n)):[this.produce(e,t,(e,t)=>{n=e,i=t}),n,i]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;rE(e)||rP(8),rR(e)&&(rR(t=e)||rP(10,t),e=function e(t){let n;if(!rE(t)||rU(t))return t;let i=t[rA];if(i){if(!i.modified_)return i.base_;i.finalized_=!0,n=rW(t,i.scope_.immer_.useStrictShallowCopy_)}else n=rW(t,!0);return rN(n,(t,i)=>{rV(n,t,e(i))}),i&&(i.finalized_=!1),n}(t));let n=rJ(this),i=ot(e,void 0);return i[rA].isManual_=!0,rQ(n),i}finishDraft(e,t){let n=e&&e[rA];n&&n.isManual_||rP(9);let{scope_:i}=n;return rX(i,t),r1(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));let i=rY("Patches").applyPatches_;return rR(e)?i(e,t):this.produce(e,e=>i(e,t))}},oi=on.produce;on.produceWithPatches.bind(on),on.setAutoFreeze.bind(on),on.setUseStrictShallowCopy.bind(on),on.applyPatches.bind(on),on.createDraft.bind(on),on.finishDraft.bind(on);function or(e){e()}function oo(e,t){return n=>e(t(n))}function oa(e){return void 0!==e}function os(){}function ol(e,t){return t(e)}function ou(...e){return e}function oc(e,t){e(0,t)}function oh(e){e(2)}function od(e){return e(4)}function op(e,t){return e(1,e=>t(0,e))}function of(e,t){let n=e(1,e=>{n(),t(e)});return n}function og(e){let t,n;return i=>r=>{t=r,n&&clearTimeout(n),n=setTimeout(()=>{i(t)},e)}}function om(e,t){return e===t}function ov(e=om){let t;return n=>i=>{e(t,i)||(t=i,n(i))}}function oy(e){return t=>n=>{e(n)&&t(n)}}function ox(e){return t=>oo(t,e)}function ob(e){return t=>()=>{t(e)}}function ow(e,...t){let n=function(...e){return t=>e.reduceRight(ol,t)}(...t);return(t,i)=>{switch(t){case 2:oh(e);return;case 1:return e(1,n(i))}}}function oS(e,t){return n=>i=>{n(t=e(t,i))}}function o_(e){return t=>n=>{e>0?e--:t(n)}}function oC(e){let t=null,n;return i=>r=>{t=r,n||(n=setTimeout(()=>{n=void 0,i(t)},e))}}function oM(...e){let t=Array(e.length),n=0,i=null,r=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{let a=Math.pow(2,o);e(1,e=>{let s=n;n|=a,t[o]=e,s!==r&&n===r&&i&&(i(),i=null)})}),e=>o=>{let a=()=>{e([o].concat(t))};n===r?a():i=a}}function ok(e){let t=e,n=oD();return(e,i)=>{switch(e){case 0:t=i;break;case 1:i(t);break;case 4:return t}return n(e,i)}}function oT(e,t){var n;return op(e,n=ok(t)),n}function oD(){let e=[];return(t,n)=>{switch(t){case 0:e.slice().forEach(e=>{e(n)});return;case 2:e.splice(0,e.length);return;case 1:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function oI(e){var t;return op(e,t=oD()),t}function oA(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:oP(),singleton:n}}let oP=()=>Symbol();function oO(...e){let t=oD(),n=Array(e.length),i=0,r=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{let a=Math.pow(2,o);e(1,e=>{n[o]=e,(i|=a)===r&&t(0,n)})}),function(e,o){switch(e){case 2:oh(t);return;case 1:return i===r&&o(n),t(1,o)}}}function oR(e,t=om){return ow(e,ov(t))}function oE(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(or)}}(...e.map(e=>e(1,n)))}}}var oL=((o=oL||{})[o.DEBUG=0]="DEBUG",o[o.INFO=1]="INFO",o[o.WARN=2]="WARN",o[o.ERROR=3]="ERROR",o);let oB={0:"debug",3:"error",1:"log",2:"warn"},oN=()=>typeof globalThis>"u"?window:globalThis,oF=oA(()=>{let e=ok(3);return{log:ok((t,n,i=1)=>{var r;i>=(null!=(r=oN().VIRTUOSO_LOG_LEVEL)?r:od(e))&&console[oB[i]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function oz(e,t,n){return oV(e,t,n).callbackRef}function oV(e,t,n){let i=eV.useRef(null),r=e=>{};if("u">typeof ResizeObserver){let o=eV.useMemo(()=>new ResizeObserver(t=>{let i=()=>{let n=t[0].target;null!==n.offsetParent&&e(n)};n?i():requestAnimationFrame(i)}),[e]);r=e=>{e&&t?(o.observe(e),i.current=e):(i.current&&o.unobserve(i.current),i.current=null)}}return{callbackRef:r,ref:i}}function oZ(e,t,n,i,r,o,a,s,l){return oV(eV.useCallback(n=>{let l=function(e,t,n,i){let r=e.length;if(0===r)return null;let o=[];for(let a=0;a<r;a++){let r=e.item(a);if(void 0===r.dataset.index)continue;let s=parseInt(r.dataset.index),l=parseFloat(r.dataset.knownSize),u=t(r,n);if(0===u&&i("Zero-sized element, this should not happen",{child:r},oL.ERROR),u===l)continue;let c=o[o.length-1];0===o.length||c.size!==u||c.endIndex!==s-1?o.push({endIndex:s,size:u,startIndex:s}):o[o.length-1].endIndex++}return o}(n.children,t,s?"offsetWidth":"offsetHeight",r),u=n.parentElement;for(;!u.dataset.virtuosoScroller;)u=u.parentElement;let c="window"===u.lastElementChild.dataset.viewportType,h=a?s?a.scrollLeft:a.scrollTop:c?s?window.pageXOffset||document.documentElement.scrollLeft:window.pageYOffset||document.documentElement.scrollTop:s?u.scrollLeft:u.scrollTop;i({scrollHeight:a?s?a.scrollWidth:a.scrollHeight:c?s?document.documentElement.scrollWidth:document.documentElement.scrollHeight:s?u.scrollWidth:u.scrollHeight,scrollTop:Math.max(h,0),viewportHeight:a?s?a.offsetWidth:a.offsetHeight:c?s?window.innerWidth:window.innerHeight:s?u.offsetWidth:u.offsetHeight}),null==o||o(s?oj("column-gap",getComputedStyle(n).columnGap,r):oj("row-gap",getComputedStyle(n).rowGap,r)),null!==l&&e(l)},[e,t,r,o,a,i]),n,l)}function oj(e,t,n){return"normal"===t||null!=t&&t.endsWith("px")||n(`${e} was not resolved to pixel value correctly`,t,oL.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}function oH(e,t,n){let i=eV.useRef(null),r=eV.useCallback(n=>{let r,o;if(!(null!=n&&n.offsetParent))return;let a=n.getBoundingClientRect(),s=a.width;if(t){let e=t.getBoundingClientRect(),n=a.top-e.top;o=e.height-Math.max(0,n),r=n+t.scrollTop}else o=window.innerHeight-Math.max(0,a.top),r=a.top+window.pageYOffset;i.current={offsetTop:r,visibleHeight:o,visibleWidth:s},e(i.current)},[e,t]),{callbackRef:o,ref:a}=oV(r,!0,n),s=eV.useCallback(()=>{r(a.current)},[r,a]);return eV.useEffect(()=>{if(!t)return window.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{window.removeEventListener("scroll",s),window.removeEventListener("resize",s)};{t.addEventListener("scroll",s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener("scroll",s),e.unobserve(t)}}},[s,t]),o}let oW=oA(()=>{let e=oD(),t=oD(),n=ok(0),i=oD(),r=ok(0),o=oD(),a=oD(),s=ok(0),l=ok(0),u=ok(0),c=ok(0),h=oD(),d=oD(),p=ok(!1),f=ok(!1),g=ok(!1);return op(ow(e,ox(({scrollTop:e})=>e)),t),op(ow(e,ox(({scrollHeight:e})=>e)),a),op(t,r),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:d,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:h,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:i,statefulScrollTop:r,viewportHeight:o}},[],{singleton:!0}),o$={lvl:0};function oG(e,t){let n=e.length;if(0===n)return[];let{index:i,value:r}=t(e[0]),o=[];for(let a=1;a<n;a++){let{index:n,value:s}=t(e[a]);o.push({end:n-1,start:i,value:r}),i=n,r=s}return o.push({end:1/0,start:i,value:r}),o}function oU(e){return e===o$}function oq(e,t){if(!oU(e))return t===e.k?e.v:t<e.k?oq(e.l,t):oq(e.r,t)}function oY(e,t,n="k"){if(oU(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let i=oY(e.r,t,n);return i[0]===-1/0?[e.k,e.v]:i}return oY(e.l,t,n)}function oX(e,t,n){return oU(e)?o2(t,n,1):t===e.k?o0(e,{k:t,v:n}):t<e.k?o3(o5(o0(e,{l:oX(e.l,t,n)}))):o3(o5(o0(e,{r:oX(e.r,t,n)})))}function oK(e,t,n){if(oU(e))return[];let i=oY(e,t)[0];return oG(function e(t,n,i){if(oU(t))return[];let{k:r,l:o,r:a,v:s}=t,l=[];return r>n&&(l=l.concat(e(o,n,i))),r>=n&&r<=i&&l.push({k:r,v:s}),r<=i&&(l=l.concat(e(a,n,i))),l}(e,i,n),({k:e,v:t})=>({index:e,value:t}))}function oQ(e){return oU(e)?[]:[...oQ(e.l),{k:e.k,v:e.v},...oQ(e.r)]}function oJ(e){let{l:t,lvl:n,r:i}=e;if(i.lvl>=n-1&&t.lvl>=n-1)return e;if(n>i.lvl+1){if(o1(t))return o5(o0(e,{lvl:n-1}));if(!oU(t)&&!oU(t.r))return o0(t.r,{l:o0(t,{r:t.r.l}),lvl:n,r:o0(e,{l:t.r.r,lvl:n-1})});throw Error("Unexpected empty nodes")}if(o1(e))return o3(o0(e,{lvl:n-1}));if(oU(i)||oU(i.l))throw Error("Unexpected empty nodes");{let t=i.l,r=o1(t)?i.lvl-1:i.lvl;return o0(t,{l:o0(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:o3(o0(i,{l:t.r,lvl:r}))})}}function o0(e,t){return o2(void 0!==t.k?t.k:e.k,void 0!==t.v?t.v:e.v,void 0!==t.lvl?t.lvl:e.lvl,void 0!==t.l?t.l:e.l,void 0!==t.r?t.r:e.r)}function o1(e){return oU(e)||e.lvl>e.r.lvl}function o2(e,t,n,i=o$,r=o$){return{k:e,l:i,lvl:n,r,v:t}}function o5(e){let{l:t}=e;return oU(t)||t.lvl!==e.lvl?e:o0(t,{r:o0(e,{l:t.r})})}function o3(e){let{lvl:t,r:n}=e;return oU(n)||oU(n.r)||n.lvl!==t||n.r.lvl!==t?e:o0(n,{l:o0(e,{r:n.l}),lvl:t+1})}function o4(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function o8(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let o6=oA(()=>({recalcInProgress:ok(!1)}),[],{singleton:!0});function o9(e,t,n,i=0){let r=e.length-1;for(;i<=r;){let o=Math.floor((i+r)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(r-i<2)return o-1;r=o-1}else{if(r===i)return o;i=o+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function o7(e,t){return Math.round(e.getBoundingClientRect()[t])}function ae(e){return!oU(e.groupOffsetTree)}function at({index:e},t){return t===e?0:t<e?-1:1}function an({offset:e},t){return t===e?0:t<e?-1:1}function ai(e,t,n){if(0===t.length)return 0;let{index:i,offset:r,size:o}=t[o9(t,e,at)],a=e-i,s=o*a+(a-1)*n+r;return s>0?s+n:s}function ar(e,t){if(!ae(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function ao(e,t,n){if("u">typeof e.groupIndex)return t.groupIndices[e.groupIndex]+1;{let i=ar("LAST"===e.index?n:e.index,t);return Math.max(0,i,Math.min(n,i))}}function aa(e,[t,n,i,r]){t.length>0&&i("received item sizes",t,oL.DEBUG);let o=e.sizeTree,a=o,s=0;if(n.length>0&&oU(o)&&2===t.length){let e=t[0].size,i=t[1].size;a=n.reduce((t,n)=>oX(oX(t,n,e),n+1,i),a)}else[a,s]=function(e,t){let n=oU(e)?0:1/0;for(let i of t){let{endIndex:t,size:r,startIndex:o}=i;if(n=Math.min(n,o),oU(e)){e=oX(e,0,r);continue}let a=oK(e,o-1,t+1);if(a.some(function(e){let{endIndex:t,size:n,startIndex:i}=e;return e=>e.start===i&&(e.end===t||e.end===1/0)&&e.value===n}(i)))continue;let s=!1,l=!1;for(let{end:n,start:i,value:o}of a)s?(t>=i||r===o)&&(e=function e(t,n){if(oU(t))return o$;let{k:i,l:r,r:o}=t;if(n!==i)return n<i?oJ(o0(t,{l:e(r,n)})):oJ(o0(t,{r:e(o,n)}));if(oU(r))return o;if(oU(o))return r;{let[e,n]=function e(t){return oU(t.r)?[t.k,t.v]:e(t.r)}(r);return oJ(o0(t,{k:e,l:function e(t){return oU(t.r)?t.l:oJ(o0(t,{r:e(t.r)}))}(r),v:n}))}}(e,i)):(l=o!==r,s=!0),n>t&&t>=i&&o!==r&&(e=oX(e,t+1,o));l&&(e=oX(e,o,r))}return[e,n]}(a,t);if(a===o)return e;let{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:h}=al(e.offsetTree,s,a,r);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>oX(e,t,ai(t,h,r)),o$),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:h,sizeTree:a}}function as(e,t){let n=0,i=0;for(;n<e;)n+=t[i+1]-t[i]-1,i++;return i-+(n!==e)}function al(e,t,n,i){let r=e,o=0,a=0,s=0,l=0;if(0!==t){l=o9(r,t-1,at),s=r[l].offset;let e=oY(n,t-1);o=e[0],a=e[1],r.length&&r[l].size===oY(n,t)[1]&&(l-=1),r=r.slice(0,l+1)}else r=[];for(let{start:e,value:l}of oK(n,t,1/0)){let t=e-o,n=t*a+s+t*i;r.push({index:e,offset:n,size:l}),o=e,s=n,a=l}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:r}}function au(e){return{index:e.index,value:e}}let ac={offsetHeight:"height",offsetWidth:"width"},ah=oA(([{log:e},{recalcInProgress:t}])=>{let n=oD(),i=oD(),r=oT(i,0),o=oD(),a=oD(),s=ok(0),l=ok([]),u=ok(void 0),c=ok(void 0),h=ok((e,t)=>o7(e,ac[t])),d=ok(void 0),p=ok(0),f={groupIndices:[],groupOffsetTree:o$,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:o$},g=oT(ow(n,oM(l,e,p),oS(aa,f),ov()),f),m=oT(ow(l,ov(),oS((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),ox(({prev:e})=>e)),[]);op(ow(l,oy(e=>e.length>0),oM(g,p),ox(([e,t,n])=>{let i=e.reduce((e,i,r)=>oX(e,i,ai(i,t.offsetTree,n)||r),o$);return{...t,groupIndices:e,groupOffsetTree:i}})),g),op(ow(i,oM(g),oy(([e,{lastIndex:t}])=>e<t),ox(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),op(u,c);let v=oT(ow(u,ox(e=>void 0===e)),!0);op(ow(c,oy(e=>void 0!==e&&oU(od(g).sizeTree)),ox(e=>[{endIndex:0,size:e,startIndex:0}])),n);let y=oI(ow(n,oM(g),oS(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:f}),ox(e=>e.changed)));ow(s,oS((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),ox(e=>e.diff))(1,e=>{let{groupIndices:n}=od(g);if(e>0)t(0,!0),o(0,e+as(e,n));else if(e<0){let t=od(m);t.length>0&&(e-=as(-e,t)),a(0,e)}}),ow(s,oM(e))(1,([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},oL.ERROR)});let x=oI(o);op(ow(o,oM(g),ox(([e,t])=>{let n=t.groupIndices.length>0,i=[],r=t.lastSize;if(n){let n=oq(t.sizeTree,0),o=0,a=0;for(;o<e;){let e=t.groupIndices[a],s=t.groupIndices.length===a+1?1/0:t.groupIndices[a+1]-e-1;i.push({endIndex:e,size:n,startIndex:e}),i.push({endIndex:e+1+s-1,size:r,startIndex:e+1}),a++,o+=s+1}let s=oQ(t.sizeTree);return o!==e&&s.shift(),s.reduce((t,{k:n,v:i})=>{let r=t.ranges;return 0!==t.prevSize&&(r=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:i,ranges:r}},{prevIndex:e,prevSize:0,ranges:i}).ranges}return oQ(t.sizeTree).reduce((t,{k:n,v:i})=>({prevIndex:n+e,prevSize:i,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:r,ranges:[]}).ranges})),n);let b=oI(ow(a,oM(g,p),ox(([e,{offsetTree:t},n])=>ai(-e,t,n))));return op(ow(a,oM(g,p),ox(([e,t,n])=>{if(t.groupIndices.length>0){if(oU(t.sizeTree))return t;let i=o$,r=od(m),o=0,a=0,s=0;for(;o<-e;){s=r[a];let e=r[a+1]-s-1;a++,o+=e+1}return i=oQ(t.sizeTree).reduce((t,{k:n,v:i})=>oX(t,Math.max(0,n+e),i),i),o!==-e&&(i=oX(i,0,oq(t.sizeTree,s)),i=oX(i,1,oY(t.sizeTree,-e+1)[1])),{...t,sizeTree:i,...al(t.offsetTree,0,i,n)}}{let i=oQ(t.sizeTree).reduce((t,{k:n,v:i})=>oX(t,Math.max(0,n+e),i),o$);return{...t,sizeTree:i,...al(t.offsetTree,0,i,n)}}})),g),{beforeUnshiftWith:x,data:d,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,gap:p,groupIndices:l,itemSize:h,listRefresh:y,shiftWith:a,shiftWithOffset:b,sizeRanges:n,sizes:g,statefulTotalCount:r,totalCount:i,trackItemSizes:v,unshiftWith:o}},ou(oF,o6),{singleton:!0});function ad(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let ap=oA(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:i,scrollTop:r}])=>{let o=oD(),a=oD(),s=oI(ow(o,ox(ad)));return op(ow(s,ox(e=>e.totalCount)),n),op(ow(s,ox(e=>e.groupIndices)),e),op(ow(oO(r,t,i),oy(([e,t])=>ae(t)),ox(([e,t,n])=>oY(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),ov(),ox(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},ou(ah,oW)),af=oA(([{log:e}])=>{let t=ok(!1),n=oI(ow(t,oy(e=>e),ov()));return t(1,t=>{t&&od(e)("props updated",{},oL.DEBUG)}),{didMount:n,propsReady:t}},ou(oF),{singleton:!0}),ag="u">typeof document&&"scrollBehavior"in document.documentElement.style;function am(e){let t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&ag||(t.behavior="auto"),t.offset||(t.offset=0),t}let av=oA(([{gap:e,listRefresh:t,sizes:n,totalCount:i},{fixedFooterHeight:r,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:h},{log:d}])=>{let p=oD(),f=oD(),g=ok(0),m=null,v=null,y=null;function x(){m&&(m(),m=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),l(0,!1)}return op(ow(p,oM(n,h,i,g,s,a,d),oM(e,o,r),ox(([[e,n,i,r,o,a,s,u],h,d,g])=>{let b=am(e),{align:w,behavior:S,offset:_}=b,C=r-1,M=ao(b,n,C),k=ai(M,n.offsetTree,h)+a;"end"===w?(k+=d+oY(n.sizeTree,M)[1]-i+g,M===C&&(k+=s)):"center"===w?k+=(d+oY(n.sizeTree,M)[1]-i+g)/2:k-=o,_&&(k+=_);let T=t=>{x(),t?(u("retrying to scroll to",{location:e},oL.DEBUG),p(0,e)):(f(0,!0),u("list did not change, scroll successful",{},oL.DEBUG))};if(x(),"smooth"===S){let e=!1;y=t(1,t=>{e=e||t}),m=of(c,()=>{T(e)})}else m=of(ow(t,e=>{let t=setTimeout(()=>{e(!1)},150);return n=>{n&&(e(!0),clearTimeout(t))}}),T);return v=setTimeout(()=>{x()},1200),l(0,!0),u("scrolling from index to",{behavior:S,index:M,top:k},oL.DEBUG),{behavior:S,top:k}})),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:g}},ou(ah,oW,oF),{singleton:!0});function ay(e,t){0==e?t():requestAnimationFrame(()=>{ay(e-1,t)})}function ax(e,t){return"number"==typeof e?e:"LAST"===e.index?t-1:e.index}let ab=oA(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:i},{scrollTargetReached:r,scrollToIndex:o},{didMount:a}])=>{let s=ok(!0),l=ok(0),u=ok(!0);return op(ow(a,oM(l),oy(([e,t])=>!!t),ob(!1)),s),op(ow(a,oM(l),oy(([e,t])=>!!t),ob(!1)),u),ow(oO(t,a),oM(s,n,e,u),oy(([[,e],t,{sizeTree:n},i,r])=>e&&(!oU(n)||oa(i))&&!t&&!r),oM(l))(1,([,e])=>{of(r,()=>{u(0,!0)}),ay(4,()=>{of(i,()=>{s(0,!0)}),o(0,e)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}},ou(ah,oW,av,af),{singleton:!0});function aw(e,t){return 1.01>Math.abs(e-t)}let aS="down",a_={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},aC=oA(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:i,scrollTop:r,viewportHeight:o}])=>{let a=ok(!1),s=ok(!0),l=oD(),u=oD(),c=ok(4),h=ok(0),d=oT(ow(oE(ow(oR(r),o_(1),ob(!0)),ow(oR(r),o_(1),ob(!1),og(100))),ov()),!1),p=oT(ow(oE(ow(n,ob(!0)),ow(n,ob(!1),og(200))),ov()),!1);op(ow(oO(oR(r),oR(h)),ox(([e,t])=>e<=t),ov()),s),op(ow(s,oC(50)),u);let f=oI(ow(oO(i,oR(o),oR(t),oR(e),oR(c)),oS((e,[{scrollHeight:t,scrollTop:n},i,r,o,a])=>{let s;let l={scrollHeight:t,scrollTop:n,viewportHeight:i};if(n+i-t>-a){let t,i;return n>e.state.scrollTop?(t="SCROLLED_DOWN",i=e.state.scrollTop-n):(t="SIZE_DECREASED",i=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:i,state:l}}return{atBottom:!1,notAtBottomBecause:l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":i<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:l}},a_),ov((e,t)=>e&&e.atBottom===t.atBottom))),g=oT(ow(i,oS((e,{scrollHeight:t,scrollTop:n,viewportHeight:i})=>{if(aw(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{let r=t-(n+i)<1;return e.scrollTop!==n&&r?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),oy(e=>e.changed),ox(e=>e.jump)),0);op(ow(f,ox(e=>e.atBottom)),a),op(ow(a,oC(50)),l);let m=ok(aS);op(ow(i,ox(({scrollTop:e})=>e),ov(),oS((e,t)=>od(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":aS,prevScrollTop:t},{direction:aS,prevScrollTop:0}),ox(e=>e.direction)),m),op(ow(i,oC(50),ob("none")),m);let v=ok(0);return op(ow(d,oy(e=>!e),ob(0)),v),op(ow(r,oC(100),oM(d),oy(([e,t])=>!!t),oS(([e,t],[n])=>[t,n],[0,0]),ox(([e,t])=>t-e)),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:h,isAtBottom:a,isAtTop:s,isScrolling:d,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},ou(oW)),aM="bottom",ak="none";function aT(e,t,n){return"number"==typeof e?"up"===n&&"top"===t||n===aS&&t===aM?e:0:"up"===n?"top"===t?e.main:e.reverse:t===aM?e.main:e.reverse}function aD(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}let aI=oA(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:i,viewportHeight:r}])=>{let o=oD(),a=ok(0),s=ok(0),l=ok(0),u=oT(ow(oO(oR(i),oR(r),oR(n),oR(o,o8),oR(l),oR(a),oR(t),oR(e),oR(s)),ox(([e,t,n,[i,r],o,a,s,l,u])=>{let c=e-l,h=Math.max(n-c,0),d=ak,p=aD(u,"top"),f=aD(u,aM);return i-=l,i+=n+s,r+=n+s,i>e+(a+s)-p&&(d="up"),(r-=l)<e-h+t+f&&(d=aS),d!==ak?[Math.max(c-n-aT(o,"top",d)-p,0),c-h-s+t+aT(o,aM,d)+f]:null}),oy(e=>null!=e),ov(o8)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:u}},ou(oW),{singleton:!0}),aA={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function aP(e,t,n,i,r,o){let{lastIndex:a,lastOffset:s,lastSize:l}=r,u=0,c=0;if(e.length>0){u=e[0].offset;let t=e[e.length-1];c=t.offset+t.size}let h=n-a,d=u,p=s+h*l+(h-1)*i-c;return{bottom:c,firstItemIndex:o,items:aR(e,r,o),offsetBottom:p,offsetTop:u,top:d,topItems:aR(t,r,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function aO(e,t,n,i,r,o){let a=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-a>=e)break;a++}let s=e+a,l=ax(t,s);return aP(Array.from({length:s}).map((e,t)=>({data:o[t+l],index:t+l,offset:0,size:0})),[],s,r,n,i)}function aR(e,t,n){if(0===e.length)return[];if(!ae(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let i=e[0].index,r=e[e.length-1].index,o=[],a=oK(t.groupOffsetTree,i,r),s,l=0;for(let i of e){let e;(!s||s.end<i.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),e=i.index===s.start?{index:l,type:"group"}:{groupIndex:l,index:i.index-(l+1)+n},o.push({...e,data:i.data,offset:i.offset,originalIndex:i.index,size:i.size})}return o}let aE=oA(([{data:e,firstItemIndex:t,gap:n,sizes:i,totalCount:r},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:c},{topListHeight:h},d,{didMount:p},{recalcInProgress:f}])=>{let g=ok([]),m=ok(0),v=oD();op(o.topItemsIndexes,g);let y=oT(ow(oO(p,f,oR(l,o8),oR(r),oR(i),oR(u),c,oR(g),oR(t),oR(n),e),oy(([e,t,,n,,,,,,,i])=>{let r=i&&i.length!==n;return e&&!t&&!r}),ox(([,,[e,t],n,i,r,o,a,s,l,u])=>{var c;let{offsetTree:h,sizeTree:d}=i,p=od(m);if(0===n)return{...aA,totalCount:n};if(0===e&&0===t)return 0===p?{...aA,totalCount:n}:aO(p,r,i,s,l,u||[]);if(oU(d))return p>0?null:aP(function(e,t,n){if(ae(t)){let i=ar(e,t);return[{index:oY(t.groupOffsetTree,i)[0],offset:0,size:0},{data:null==n?void 0:n[0],index:i,offset:0,size:0}]}return[{data:null==n?void 0:n[0],index:e,offset:0,size:0}]}(ax(r,n),i,u),[],n,l,i,s);let f=[];if(a.length>0){let e=a[0],t=a[a.length-1],n=0;for(let i of oK(d,e,t)){let r=i.value,o=Math.max(i.start,e),a=Math.min(i.end,t);for(let e=o;e<=a;e++)f.push({data:null==u?void 0:u[e],index:e,offset:n,size:r}),n+=r}}if(!o)return aP([],f,n,l,i,s);let g=a.length>0?a[a.length-1]+1:0,v=function(e,t,n,i=0){return i>0&&(t=Math.max(t,e[o9(e,i,at)].offset)),oG(function(e,t,n,i){let r=o9(e,t,i),o=o9(e,n,i,r);return e.slice(r,o+1)}(e,t,n,an),au)}(h,e,t,g);if(0===v.length)return null;let y=n-1;return aP(((n=>{for(let i of v){let r=i.value,o=r.offset,a=i.start,s=r.size;if(r.offset<e){let t=(a+=Math.floor((e-r.offset+l)/(s+l)))-i.start;o+=t*s+t*l}a<g&&(o+=(g-a)*s,a=g);let c=Math.min(i.end,y);for(let e=a;e<=c&&!(o>=t);e++)n.push({data:null==u?void 0:u[e],index:e,offset:o,size:s}),o+=s+l}})(c=[]),c),f,n,l,i,s)}),oy(e=>null!==e),ov()),aA);op(ow(e,oy(oa),ox(e=>null==e?void 0:e.length)),r),op(ow(y,ox(e=>e.topListHeight)),h),op(h,s),op(ow(y,ox(e=>[e.top,e.bottom])),a),op(ow(y,ox(e=>e.items)),v);let x=oI(ow(y,oy(({items:e})=>e.length>0),oM(r,e),oy(([{items:e},t])=>e[e.length-1].originalIndex===t-1),ox(([,e,t])=>[e-1,t]),ov(o8),ox(([e])=>e))),b=oI(ow(y,oC(200),oy(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),ox(({items:e})=>e[0].index),ov())),w=oI(ow(y,oy(({items:e})=>e.length>0),ox(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),ov(o4)));return{endReached:x,initialItemCount:m,itemsRendered:v,listState:y,rangeChanged:w,startReached:b,topItemsIndexes:g,...d}},ou(ah,ap,aI,ab,av,aC,af,o6),{singleton:!0}),aL=oA(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:i},{listState:r}])=>{let o=oD(),a=oT(ow(oO(n,e,i,t,r),ox(([e,t,n,i,r])=>e+t+n+i+r.offsetBottom+r.bottom)),0);return op(oR(a),o),{totalListHeight:a,totalListHeightChanged:o}},ou(oW,aE),{singleton:!0}),aB=oA(([{viewportHeight:e},{totalListHeight:t}])=>{let n=ok(!1),i=oT(ow(oO(n,e,t),oy(([e])=>e),ox(([,e,t])=>Math.max(0,e-t)),oC(0),ov()),0);return{alignToBottom:n,paddingTopAddition:i}},ou(oW,aL),{singleton:!0});function aN(e){return!!e&&("smooth"===e?"smooth":"auto")}let aF=(e,t)=>"function"==typeof e?aN(e(t)):t&&aN(e),az=oA(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:i},{scrollToIndex:r},{scrolledToInitialItem:o},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:u}])=>{let c=ok(!1),h=oD(),d=null;function p(e){r(0,{align:"end",behavior:e,index:"LAST"})}function f(e){setTimeout(of(n,t=>{!e||t.atBottom||"SIZE_INCREASED"!==t.notAtBottomBecause||d||(od(l)("scrolling to bottom due to increased size",{},oL.DEBUG),p("auto"))}),100)}return ow(oO(ow(oR(t),o_(1)),a),oM(oR(c),i,o,u),ox(([[e,t],n,i,r,o])=>{let a=t&&r,s="auto";return a&&(s=aF(n,i||o),a=a&&!!s),{followOutputBehavior:s,shouldFollow:a,totalCount:e}}),oy(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:n})=>{d&&(d(),d=null),d=of(e,()=>{od(l)("following output to ",{totalCount:n},oL.DEBUG),p(t),d=null})}),ow(oO(oR(c),t,s),oy(([e,,t])=>e&&t),oS(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),oy(({refreshed:e})=>e),oM(c,t))(1,([,e])=>{od(o)&&f(!1!==e)}),h(1,()=>{f(!1!==od(c))}),oO(oR(c),n)(1,([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&p("auto")}),{autoscrollToBottom:h,followOutput:c}},ou(ah,aC,av,ab,af,oF,oW)),aV=oA(([{data:e,firstItemIndex:t,gap:n,sizes:i},{initialTopMostItemIndex:r},{initialItemCount:o,listState:a},{didMount:s}])=>(op(ow(s,oM(o),oy(([,e])=>0!==e),oM(r,i,t,n,e),ox(([[,e],t,n,i,r,o=[]])=>aO(e,t,n,i,r,o))),a),{}),ou(ah,ab,aE,af),{singleton:!0}),aZ=oA(([{didMount:e},{scrollTo:t},{listState:n}])=>{let i=ok(0);return ow(e,oM(i),oy(([,e])=>0!==e),ox(([,e])=>({top:e})))(1,e=>{of(ow(n,o_(1),oy(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:i}},ou(af,oW,aE),{singleton:!0}),aj=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:i,...r},viewportBottom:o,viewportTop:a})=>t<a?{...r,align:null!=n?n:"start",behavior:i}:e>o?{...r,align:null!=n?n:"end",behavior:i}:null,aH=oA(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:i,fixedHeaderHeight:r,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{let c=oD();return op(ow(c,oM(t,l,n,o,r,i,s),oM(e),ox(([[e,t,n,i,r,o,s,l],u])=>{let{align:c,behavior:h,calculateViewLocation:d=aj,done:p,...f}=e,g=ao(e,t,i-1),m=ai(g,t.offsetTree,u)+r+o,v=d({itemBottom:m+oY(t.sizeTree,g)[1],itemTop:m,locationParams:{align:c,behavior:h,...f},viewportBottom:l+n-s,viewportTop:l+o});return v?p&&of(ow(a,oy(e=>!e),o_(od(a)?1:2)),p):p&&p(),v}),oy(e=>null!==e)),u),{scrollIntoView:c}},ou(ah,oW,av,aE,oF),{singleton:!0}),aW=oA(([{scrollVelocity:e}])=>{let t=ok(!1),n=oD(),i=ok(!1);return op(ow(e,oM(i,t,n),oy(([e,t])=>!!t),ox(([e,t,n,i])=>{let{enter:r,exit:o}=t;if(n){if(o(e,i))return!1}else if(r(e,i))return!0;return n}),ov()),t),ow(oO(t,e,n),oM(i))(1,([[e,t,n],i])=>{e&&i&&i.change&&i.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:i,scrollSeekRangeChanged:n,scrollVelocity:e}},ou(aC),{singleton:!0}),a$=oA(([{scrollContainerState:e,scrollTo:t}])=>{let n=oD(),i=oD(),r=oD(),o=ok(!1),a=ok(void 0);return op(ow(oO(n,i),ox(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:i}])=>({scrollHeight:e,scrollTop:Math.max(0,t-i),viewportHeight:n}))),e),op(ow(t,oM(i),ox(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),r),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:r,windowViewportRect:i}},ou(oW)),aG=oA(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:i},{initialTopMostItemIndex:r},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{let u=oD(),c=ok(void 0),h=ok(null),d=ok(null);return op(s,h),op(l,d),ow(u,oM(t,i,a,h,d,n))(1,([e,t,n,i,r,o,a])=>{let s=oQ(t.sizeTree).map(({k:e,v:t},n,i)=>{let r=i[n+1];return{endIndex:r?r.k-1:1/0,size:t,startIndex:e}});i&&null!==r&&null!==o&&(n=r.scrollTop-o.offsetTop),e({ranges:s,scrollTop:n-=a})}),op(ow(c,oy(oa),ox(aU)),r),op(ow(o,oM(c),oy(([,e])=>void 0!==e),ov(),ox(([,e])=>e.ranges)),e),{getState:u,restoreStateFrom:c}},ou(ah,oW,ab,af,a$));function aU(e){return{align:"start",index:0,offset:e.scrollTop}}let aq=oA(([{topItemsIndexes:e}])=>{let t=ok(0);return op(ow(t,oy(e=>e>=0),ox(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},ou(aE));function aY(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}let aX=aY(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),aK=oA(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:i},{isAtBottom:r,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:h,sizes:d},{log:p},{recalcInProgress:f}])=>{let g=oI(ow(l,oM(a),oS(([,e,t,n],[{bottom:i,items:r,offsetBottom:o,totalCount:a},s])=>{let l=i+o,u=0;return t===a&&e.length>0&&r.length>0&&(0===r[0].originalIndex&&0===e[0].originalIndex||0!=(u=l-n)&&(u+=s)),[u,r,a,l]},[0,[],0,0]),oy(([e])=>0!==e),oM(i,s,n,r,p,f),oy(([,e,t,n,,,i])=>!i&&!n&&0!==e&&"up"===t),ox(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},oL.DEBUG),e))));function m(n){var i,r;n>0?(t(0,{behavior:"auto",top:-n}),i=0,e(0,0)):(r=0,e(0,0),t(0,{behavior:"auto",top:-n}))}return ow(g,oM(e,o))(1,([t,n,i])=>{i&&aX()?e(0,n-t):m(-t)}),ow(oO(oT(o,!1),e,f),oy(([e,t,n])=>!e&&!n&&0!==t),ox(([e,t])=>t),oC(1))(1,m),op(ow(h,ox(e=>({top:-e}))),t),ow(u,oM(d,c),ox(([e,{groupIndices:t,lastSize:n,sizeTree:i},r])=>{if(0===t.length)return e*(n+r);{let o=0,a=oq(i,0),s=0,l=0;for(;s<e;){s++,o+=a;let i=t.length===l+1?1/0:t[l+1]-t[l]-1;s+i>e&&(o-=a,i=e-s+1),s+=i,o+=i*(n+r),l++}return o}}))(1,n=>{e(0,n),requestAnimationFrame(()=>{t(0,{top:n}),requestAnimationFrame(()=>{var t;t=0,e(0,0),f(0,!1)})})}),{deviation:e}},ou(oW,aC,aE,ah,oF,o6)),aQ=oA(([e,t,n,i,r,o,a,s,l,u])=>({...e,...t,...n,...i,...r,...o,...a,...s,...l,...u}),ou(aI,aV,af,aW,aL,aZ,aB,a$,aH,oF)),aJ=oA(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:i,gap:r,groupIndices:o,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:u,totalCount:c,trackItemSizes:h},{initialItemFinalLocationReached:d,initialTopMostItemIndex:p,scrolledToInitialItem:f},g,m,v,{listState:y,topItemsIndexes:x,...b},{scrollToIndex:w},S,{topItemCount:_},{groupCounts:C},M])=>(op(b.rangeChanged,M.scrollSeekRangeChanged),op(ow(M.windowViewportRect,ox(e=>e.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:i,gap:r,groupCounts:C,initialItemFinalLocationReached:d,initialTopMostItemIndex:p,scrolledToInitialItem:f,sizeRanges:s,topItemCount:_,topItemsIndexes:x,totalCount:c,...v,groupIndices:o,itemSize:a,listState:y,scrollToIndex:w,statefulTotalCount:u,trackItemSizes:h,...b,...M,...g,sizes:l,...m}),ou(ah,ab,oW,aG,az,aE,av,aK,aq,ap,aQ)),a0="u">typeof document?eV.useLayoutEffect:eV.useEffect;function a1(e,t,n){let i=Object.keys(t.required||{}),r=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=eV.createContext({});function l(e,n){var o,a,s,l;for(let r of(e.propsReady&&(o=e.propsReady,o(0,!1)),i)){a=e[t.required[r]],a(0,n[r])}for(let i of r){i in n&&(s=e[t.optional[i]],s(0,n[i]))}e.propsReady&&(l=e.propsReady,l(0,!0))}function u(e){return a.reduce((n,i)=>(n[i]=function(e){let t,n;let i=()=>null==t?void 0:t();return function(r,o){switch(r){case 1:return o?n===o?void 0:(i(),n=o,t=e(1,o)):(i(),os);case 2:i(),n=null;return}}}(e[t.events[i]]),n),{})}return{Component:eV.forwardRef((c,h)=>{var d;let{children:p,...f}=c,[g]=eV.useState(()=>{var t;return l(t=function(e){let t=new Map,n=({constructor:e,dependencies:i,id:r,singleton:o})=>{if(o&&t.has(r))return t.get(r);let a=e(i.map(e=>n(e)));return o&&t.set(r,a),a};return n(e)}(e),f),t}),[m]=eV.useState(()=>u(g));return a0(()=>{for(let e of a)e in f&&(0,m[e])(1,f[e]);return()=>{Object.values(m).map(oh)}},[f,m,g]),a0(()=>{l(g,f)}),eV.useImperativeHandle(h,(d=o.reduce((e,n)=>(e[n]=e=>{var i;i=g[t.methods[n]],i(0,e)},e),{}),()=>d)),(0,ez.jsx)(s.Provider,{value:g,children:n?(0,ez.jsx)(n,{...function(e,t){let n={},i={},r=0,o=e.length;for(;r<o;)i[e[r]]=1,r+=1;for(let e in t)Object.hasOwn(i,e)||(n[e]=t[e]);return n}([...i,...r,...a],f),children:p}):p})}),useEmitter:(e,t)=>{let n=eV.useContext(s)[e];a0(()=>n(1,t),[t,n])},useEmitterValue:eV.version.startsWith("18")?e=>{let t=eV.useContext(s)[e],n=eV.useCallback(e=>t(1,e),[t]);return eV.useSyncExternalStore(n,()=>od(t),()=>od(t))}:e=>{let t=eV.useContext(s)[e],[n,i]=eV.useState(()=>od(t));return a0(()=>t(1,e=>{e!==n&&i(()=>e)}),[t,n]),n},usePublisher:e=>{var t;return eV.useCallback((t=eV.useContext(s)[e],e=>(function(e,t){e(0,t)})(t,e)),[e])}}}let a2=eV.createContext(void 0),a5=eV.createContext(void 0),a3="u">typeof document?eV.useLayoutEffect:eV.useEffect;function a4(e,t,n,i=os,r,o){let a=eV.useRef(null),s=eV.useRef(null),l=eV.useRef(null),u=eV.useCallback(n=>{let i=n.target,r=i===window||i===document,a=o?r?window.pageXOffset||document.documentElement.scrollLeft:i.scrollLeft:r?window.pageYOffset||document.documentElement.scrollTop:i.scrollTop,u=o?r?document.documentElement.scrollWidth:i.scrollWidth:r?document.documentElement.scrollHeight:i.scrollHeight,c=o?r?window.innerWidth:i.offsetWidth:r?window.innerHeight:i.offsetHeight,h=()=>{e({scrollHeight:u,scrollTop:Math.max(a,0),viewportHeight:c})};n.suppressFlushSync?h():tQ.flushSync(h),null!==s.current&&(a===s.current||a<=0||a===u-c)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t]);return eV.useEffect(()=>{let e=r||a.current;return i(r||a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{i(null),e.removeEventListener("scroll",u)}},[a,u,n,i,r]),{scrollByCallback:function(e){o&&(e={behavior:e.behavior,left:e.top}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){let i,r,u;let c=a.current;if(!c||(o?"offsetWidth"in c&&0===c.offsetWidth:"offsetHeight"in c&&0===c.offsetHeight))return;let h="smooth"===n.behavior;c===window?(r=Math.max(o7(document.documentElement,o?"width":"height"),o?document.documentElement.scrollWidth:document.documentElement.scrollHeight),i=o?window.innerWidth:window.innerHeight,u=o?document.documentElement.scrollLeft:document.documentElement.scrollTop):(r=c[o?"scrollWidth":"scrollHeight"],i=o7(c,o?"width":"height"),u=c[o?"scrollLeft":"scrollTop"]);let d=r-i;if(n.top=Math.ceil(Math.max(Math.min(d,n.top),0)),aw(i,r)||n.top===u){e({scrollHeight:r,scrollTop:u,viewportHeight:i}),h&&t(!0);return}h?(s.current=n.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,o&&(n={behavior:n.behavior,left:n.top}),c.scrollTo(n)}}}let a8="-webkit-sticky",a6="sticky",a9=aY(()=>{if(typeof document>"u")return a6;let e=document.createElement("div");return e.style.position=a8,e.style.position===a8?a8:a6});function a7(e){return e}let se=oA(()=>{let e=ok(e=>`Item ${e}`),t=ok(null),n=ok(e=>`Group ${e}`),i=ok({}),r=ok(a7),o=ok("div"),a=ok(os),s=(e,t=null)=>oT(ow(i,ox(t=>t[e]),ov()),t);return{components:i,computeItemKey:r,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:n,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),st=oA(([e,t])=>({...e,...t}),ou(aJ,se)),sn=({height:e})=>(0,ez.jsx)("div",{style:{height:e}}),si={overflowAnchor:"none",position:a9(),zIndex:1},sr={overflowAnchor:"none"},so={...sr,display:"inline-block",height:"100%"},sa=eV.memo(function({showTopList:e=!1}){let t=sS("listState"),n=s_("sizeRanges"),i=sS("useWindowScroll"),r=sS("customScrollParent"),o=s_("windowScrollContainerState"),a=s_("scrollContainerState"),s=sS("itemContent"),l=sS("context"),u=sS("groupContent"),c=sS("trackItemSizes"),h=sS("itemSize"),d=sS("log"),p=s_("gap"),f=sS("horizontalDirection"),{callbackRef:g}=oZ(n,h,c,e?os:r||i?o:a,d,p,r,f,sS("skipAnimationFrameInResizeObserver")),[m,v]=eV.useState(0);sw("deviation",e=>{m!==e&&v(e)});let y=sS("EmptyPlaceholder"),x=sS("ScrollSeekPlaceholder")||sn,b=sS("ListComponent"),w=sS("ItemComponent"),S=sS("GroupComponent"),_=sS("computeItemKey"),C=sS("isSeeking"),M=sS("groupIndices").length>0,k=sS("alignToBottom"),T=sS("initialItemFinalLocationReached"),D=e?{}:{boxSizing:"border-box",...f?{display:"inline-block",height:"100%",marginLeft:0!==m?m:k?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==m?m:k?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...T?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&y?(0,ez.jsx)(y,{...sh(y,l)}):(0,ez.jsx)(b,{...sh(b,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:g,style:D,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,i=_(n+t.firstItemIndex,e.data,l);return C?(0,eV.createElement)(x,{...sh(x,l),height:e.size,index:e.index,key:i,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,eV.createElement)(S,{...sh(S,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:i,style:si},u(e.index,l)):(0,eV.createElement)(w,{...sh(w,l),...sd(w,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:i,style:f?so:sr},M?s(e.index,e.groupIndex,e.data,l):s(e.index,e.data,l))})})}),ss={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},sl={outline:"none",overflowX:"auto",position:"relative"},su=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),sc={position:a9(),top:0,width:"100%",zIndex:1};function sh(e,t){if("string"!=typeof e)return{context:t}}function sd(e,t){return{item:"string"==typeof e?void 0:t}}let sp=eV.memo(function(){let e=sS("HeaderComponent"),t=s_("headerHeight"),n=sS("HeaderFooterTag"),i=oz(eV.useMemo(()=>e=>{t(o7(e,"height"))},[t]),!0,sS("skipAnimationFrameInResizeObserver")),r=sS("context");return e?(0,ez.jsx)(n,{ref:i,children:(0,ez.jsx)(e,{...sh(e,r)})}):null}),sf=eV.memo(function(){let e=sS("FooterComponent"),t=s_("footerHeight"),n=sS("HeaderFooterTag"),i=oz(eV.useMemo(()=>e=>{t(o7(e,"height"))},[t]),!0,sS("skipAnimationFrameInResizeObserver")),r=sS("context");return e?(0,ez.jsx)(n,{ref:i,children:(0,ez.jsx)(e,{...sh(e,r)})}):null});function sg({useEmitter:e,useEmitterValue:t,usePublisher:n}){return eV.memo(function({children:i,style:r,...o}){let a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),u=t("scrollerRef"),c=t("context"),h=t("horizontalDirection")||!1,{scrollByCallback:d,scrollerRef:p,scrollToCallback:f}=a4(a,l,s,u,void 0,h);return e("scrollTo",f),e("scrollBy",d),(0,ez.jsx)(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...h?sl:ss,...r},tabIndex:0,...o,...sh(s,c),children:i})})}function sm({useEmitter:e,useEmitterValue:t,usePublisher:n}){return eV.memo(function({children:i,style:r,...o}){let a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),u=t("totalListHeight"),c=t("deviation"),h=t("customScrollParent"),d=t("context"),{scrollByCallback:p,scrollerRef:f,scrollToCallback:g}=a4(a,l,s,os,h);return a3(()=>(f.current=h||window,()=>{f.current=null}),[f,h]),e("windowScrollTo",g),e("scrollBy",p),(0,ez.jsx)(s,{"data-virtuoso-scroller":!0,style:{position:"relative",...r,...0!==u?{height:u+c}:{}},...o,...sh(s,d),children:i})})}let sv=({children:e})=>{let t=eV.useContext(a2),n=s_("viewportHeight"),i=s_("fixedItemHeight"),r=sS("alignToBottom"),o=sS("horizontalDirection"),a=oz(eV.useMemo(()=>oo(n,e=>o7(e,o?"width":"height")),[n,o]),!0,sS("skipAnimationFrameInResizeObserver"));return eV.useEffect(()=>{t&&(n(t.viewportHeight),i(t.itemHeight))},[t,n,i]),(0,ez.jsx)("div",{"data-viewport-type":"element",ref:a,style:su(r),children:e})},sy=({children:e})=>{let t=eV.useContext(a2),n=s_("windowViewportRect"),i=s_("fixedItemHeight"),r=oH(n,sS("customScrollParent"),sS("skipAnimationFrameInResizeObserver")),o=sS("alignToBottom");return eV.useEffect(()=>{t&&(i(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,i]),(0,ez.jsx)("div",{"data-viewport-type":"window",ref:r,style:su(o),children:e})},sx=({children:e})=>{let t=sS("TopItemListComponent")||"div",n=sS("headerHeight"),i={...sc,marginTop:`${n}px`},r=sS("context");return(0,ez.jsx)(t,{style:i,...sh(t,r),children:e})},{Component:sb,useEmitter:sw,useEmitterValue:sS,usePublisher:s_}=a1(st,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{autoscrollToBottom:"autoscrollToBottom",getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupContent:"groupContent",groupCounts:"groupCounts",headerFooterTag:"HeaderFooterTag",horizontalDirection:"horizontalDirection",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},eV.memo(function(e){let t=sS("useWindowScroll"),n=sS("topItemsIndexes").length>0,i=sS("customScrollParent"),r=sS("context"),o=i||t?sM:sC,a=i||t?sy:sv;return(0,ez.jsxs)(o,{...e,...sh(o,r),children:[n&&(0,ez.jsx)(sx,{children:(0,ez.jsx)(sa,{showTopList:!0})}),(0,ez.jsxs)(a,{children:[(0,ez.jsx)(sp,{}),(0,ez.jsx)(sa,{}),(0,ez.jsx)(sf,{})]})]})})),sC=sg({useEmitter:sw,useEmitterValue:sS,usePublisher:s_}),sM=sm({useEmitter:sw,useEmitterValue:sS,usePublisher:s_}),sk=oA(()=>{let e=ok(e=>(0,ez.jsxs)("td",{children:["Item $",e]})),t=ok(null),n=ok(null),i=ok(null),r=ok({}),o=ok(a7),a=ok(os),s=(e,t=null)=>oT(ow(r,ox(t=>t[e]),ov()),t);return{components:r,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:i,fixedHeaderContent:n,itemContent:e,ScrollerComponent:s("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TableBodyComponent:s("TableBody","tbody"),TableComponent:s("Table","table"),TableFooterComponent:s("TableFoot","tfoot"),TableHeadComponent:s("TableHead","thead"),TableRowComponent:s("TableRow","tr")}}),sT=oA(([e,t])=>({...e,...t}),ou(aJ,sk)),sD=({height:e})=>(0,ez.jsx)("tr",{children:(0,ez.jsx)("td",{style:{height:e}})}),sI=({height:e})=>(0,ez.jsx)("tr",{children:(0,ez.jsx)("td",{style:{border:0,height:e,padding:0}})}),sA={overflowAnchor:"none"},sP=eV.memo(function({showTopList:e=!1}){let t=sN("listState"),n=sN("computeItemKey"),i=sN("firstItemIndex"),r=sN("isSeeking"),o=sN("ScrollSeekPlaceholder")||sD,a=sN("context"),s=sN("TableRowComponent"),l=sN("fixedHeaderHeight"),u=sN("itemContent"),c=(e?t.topItems:[]).reduce((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e),[]),h=(e?t.topItems:t.items).map(t=>{let h=t.originalIndex,d=n(h+i,t.data,a),p=e?0===h?0:c[h-1]:0;return r?(0,eV.createElement)(o,{...sh(o,a),height:t.size,index:t.index,key:d,type:t.type||"item"}):(0,eV.createElement)(s,{...sh(s,a),...sd(s,t.data),"data-index":h,"data-item-index":t.index,"data-known-size":t.size,key:d,style:e?{overflowAnchor:"none",position:"sticky",top:l+p,zIndex:2}:sA},u(t.index,t.data,a))});return(0,ez.jsx)(ez.Fragment,{children:h})}),sO=eV.memo(function(){let e=sN("listState"),t=sN("topItemsIndexes").length>0,n=sF("sizeRanges"),i=sN("useWindowScroll"),r=sN("customScrollParent"),o=sF("windowScrollContainerState"),a=sF("scrollContainerState"),s=sN("trackItemSizes"),{callbackRef:l,ref:u}=oZ(n,sN("itemSize"),s,r||i?o:a,sN("log"),void 0,r,!1,sN("skipAnimationFrameInResizeObserver")),[c,h]=eV.useState(0);sB("deviation",e=>{c!==e&&(u.current.style.marginTop=`${e}px`,h(e))});let d=sN("EmptyPlaceholder"),p=sN("FillerRow")||sI,f=sN("TableBodyComponent"),g=sN("paddingTopAddition"),m=sN("statefulTotalCount"),v=sN("context");if(0===m&&d)return(0,ez.jsx)(d,{...sh(d,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),x=e.offsetTop+g+c-y,b=e.offsetBottom,w=x>0?(0,ez.jsx)(p,{context:v,height:x},"padding-top"):null,S=b>0?(0,ez.jsx)(p,{context:v,height:b},"padding-bottom"):null;return(0,ez.jsxs)(f,{"data-testid":"virtuoso-item-list",ref:l,...sh(f,v),children:[w,t&&(0,ez.jsx)(sP,{showTopList:!0}),(0,ez.jsx)(sP,{}),S]})}),sR=({children:e})=>{let t=eV.useContext(a2),n=sF("viewportHeight"),i=sF("fixedItemHeight"),r=oz(eV.useMemo(()=>oo(n,e=>o7(e,"height")),[n]),!0,sN("skipAnimationFrameInResizeObserver"));return eV.useEffect(()=>{t&&(n(t.viewportHeight),i(t.itemHeight))},[t,n,i]),(0,ez.jsx)("div",{"data-viewport-type":"element",ref:r,style:su(!1),children:e})},sE=({children:e})=>{let t=eV.useContext(a2),n=sF("windowViewportRect"),i=sF("fixedItemHeight"),r=oH(n,sN("customScrollParent"),sN("skipAnimationFrameInResizeObserver"));return eV.useEffect(()=>{t&&(i(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,i]),(0,ez.jsx)("div",{"data-viewport-type":"window",ref:r,style:su(!1),children:e})},{Component:sL,useEmitter:sB,useEmitterValue:sN,usePublisher:sF}=a1(sT,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",groupIndices:"groupIndices",isScrolling:"isScrolling",itemsRendered:"itemsRendered",rangeChanged:"rangeChanged",startReached:"startReached",totalListHeightChanged:"totalListHeightChanged"},methods:{getState:"getState",scrollBy:"scrollBy",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{alignToBottom:"alignToBottom",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",defaultItemHeight:"defaultItemHeight",firstItemIndex:"firstItemIndex",fixedFooterContent:"fixedFooterContent",fixedHeaderContent:"fixedHeaderContent",fixedItemHeight:"fixedItemHeight",followOutput:"followOutput",groupCounts:"groupCounts",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",initialTopMostItemIndex:"initialTopMostItemIndex",itemContent:"itemContent",itemSize:"itemSize",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",topItemCount:"topItemCount",totalCount:"totalCount",useWindowScroll:"useWindowScroll"},required:{}},eV.memo(function(e){let t=sN("useWindowScroll"),n=sN("customScrollParent"),i=sF("fixedHeaderHeight"),r=sF("fixedFooterHeight"),o=sN("fixedHeaderContent"),a=sN("fixedFooterContent"),s=sN("context"),l=oz(eV.useMemo(()=>oo(i,e=>o7(e,"height")),[i]),!0,sN("skipAnimationFrameInResizeObserver")),u=oz(eV.useMemo(()=>oo(r,e=>o7(e,"height")),[r]),!0,sN("skipAnimationFrameInResizeObserver")),c=n||t?sV:sz,h=n||t?sE:sR,d=sN("TableComponent"),p=sN("TableHeadComponent"),f=sN("TableFooterComponent"),g=o?(0,ez.jsx)(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...sh(p,s),children:o()},"TableHead"):null,m=a?(0,ez.jsx)(f,{ref:u,style:{bottom:0,position:"sticky",zIndex:1},...sh(f,s),children:a()},"TableFoot"):null;return(0,ez.jsx)(c,{...e,...sh(c,s),children:(0,ez.jsx)(h,{children:(0,ez.jsxs)(d,{style:{borderSpacing:0,overflowAnchor:"none"},...sh(d,s),children:[g,(0,ez.jsx)(sO,{},"TableBody"),m]})})})})),sz=sg({useEmitter:sB,useEmitterValue:sN,usePublisher:sF}),sV=sm({useEmitter:sB,useEmitterValue:sN,usePublisher:sF}),sZ={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},sj={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:sH,floor:sW,max:s$,min:sG,round:sU}=Math;function sq(e,t,n){return Array.from({length:t-e+1}).map((t,i)=>({data:null===n?null:n[i+e],index:i+e}))}function sY(e,t){return e&&e.width===t.width&&e.height===t.height}function sX(e,t){return e&&e.column===t.column&&e.row===t.row}let sK=oA(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:i},{footerHeight:r,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:h},d,p,{didMount:f,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b},w])=>{let S=ok(0),_=ok(0),C=ok(sZ),M=ok({height:0,width:0}),k=ok({height:0,width:0}),T=oD(),D=oD(),I=ok(0),A=ok(null),P=ok({column:0,row:0}),O=oD(),R=oD(),E=ok(!1),L=ok(0),B=ok(!0),N=ok(!1),F=ok(!1);ow(f,oM(L),oy(([e,t])=>!!t))(1,()=>{B(0,!1)}),ow(oO(f,B,k,M,L,N),oy(([e,t,n,i,,r])=>e&&!t&&0!==n.height&&0!==i.height&&!r))(1,([,,,,e])=>{N(0,!0),ay(1,()=>{T(0,e)}),of(ow(u),()=>{t(0,[0,0]),B(0,!0)})}),op(ow(R,oy(e=>null!=e&&e.scrollTop>0),ob(0)),_),ow(f,oM(R),oy(([,e])=>null!=e))(1,([,e])=>{e&&(M(0,e.viewport),k(0,e.item),P(0,e.gap),e.scrollTop>0&&(E(0,!0),of(ow(u,o_(1)),e=>{E(0,!1)}),l(0,{top:e.scrollTop})))}),op(ow(M,ox(({height:e})=>e)),h),op(ow(oO(oR(M,sY),oR(k,sY),oR(P,(e,t)=>e&&e.column===t.column&&e.row===t.row),oR(u)),ox(([e,t,n,i])=>({gap:n,item:t,scrollTop:i,viewport:e}))),O),op(ow(oO(oR(S),i,oR(P,sX),oR(k,sY),oR(M,sY),oR(A),oR(_),oR(E),oR(B),oR(L)),oy(([,,,,,,,e])=>!e),ox(([e,[t,n],i,r,o,a,s,,l,u])=>{let c,h;let{column:d,row:p}=i,{height:f,width:g}=r,{width:m}=o;if(0===s&&(0===e||0===m))return sZ;if(0===g){var v;let t=ax(u,e),n=t+Math.max(s-1,0);return v=sq(t,n,a),{...sj,items:v}}let y=sQ(m,g,d);l?0===t&&0===n&&s>0?(c=0,h=s-1):(c=y*sW((t+p)/(f+p)),h=sG(e-1,s$(h=y*sH((n+p)/(f+p))-1,y-1)),c=sG(h,s$(0,c))):(c=0,h=-1);let x=sq(c,h,a),{bottom:b,top:w}=sJ(o,i,r,x),S=sH(e/y);return{bottom:b,itemHeight:f,items:x,itemWidth:g,offsetBottom:S*f+(S-1)*p-b,offsetTop:w,top:w}})),C),op(ow(A,oy(e=>null!==e),ox(e=>e.length)),S),op(ow(oO(M,k,C,P),oy(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),ox(([e,t,{items:n},i])=>{let{bottom:r,top:o}=sJ(e,i,t,n);return[o,r]}),ov(o8)),t);let z=ok(!1);op(ow(u,oM(z),ox(([e,t])=>t||0!==e)),z);let V=oI(ow(oO(C,S),oy(([{items:e}])=>e.length>0),oM(z),oy(([[e,t],n])=>{let i=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&i}),ox(([[,e]])=>e-1),ov())),Z=oI(ow(oR(C),oy(({items:e})=>e.length>0&&0===e[0].index),ob(0),ov())),j=oI(ow(oR(C),oM(E),oy(([{items:e},t])=>e.length>0&&!t),ox(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),ov(o4),oC(0)));op(j,p.scrollSeekRangeChanged),op(ow(T,oM(M,k,S,P),ox(([e,t,n,i,r])=>{let o=am(e),{align:a,behavior:s,offset:l}=o,u=o.index;"LAST"===u&&(u=i-1);let c=s0(t,r,n,u=s$(0,u,sG(i-1,u)));return"end"===a?c=sU(c-t.height+n.height):"center"===a&&(c=sU(c-t.height/2+n.height/2)),l&&(c+=l),{behavior:s,top:c}})),l);let H=oT(ow(C,ox(e=>e.offsetBottom+e.bottom)),0);return op(ow(b,ox(e=>({height:e.visibleHeight,width:e.visibleWidth}))),M),{customScrollParent:m,data:A,deviation:I,footerHeight:r,gap:P,headerHeight:o,increaseViewportBy:e,initialItemCount:_,itemDimensions:k,overscan:n,restoreStateFrom:R,scrollBy:a,scrollContainerState:s,scrollHeight:D,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:S,useWindowScroll:v,viewportDimensions:M,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b,...p,gridState:C,horizontalDirection:F,initialTopMostItemIndex:L,totalListHeight:H,...d,endReached:V,propsReady:g,rangeChanged:j,startReached:Z,stateChanged:O,stateRestoreInProgress:E,...w}},ou(aI,oW,aC,aW,af,a$,oF));function sQ(e,t,n){return s$(1,sW((e+n)/(sW(t)+n)))}function sJ(e,t,n,i){let{height:r}=n;if(void 0===r||0===i.length)return{bottom:0,top:0};let o=s0(e,t,n,i[0].index);return{bottom:s0(e,t,n,i[i.length-1].index)+r,top:o}}function s0(e,t,n,i){let r=sW(i/sQ(e.width,n.width,t.column)),o=r*n.height+s$(0,r-1)*t.row;return o>0?o+t.row:o}let s1=oA(()=>{let e=ok(e=>`Item ${e}`),t=ok({}),n=ok(null),i=ok("virtuoso-grid-item"),r=ok("virtuoso-grid-list"),o=ok(a7),a=ok("div"),s=ok(os),l=(e,n=null)=>oT(ow(t,ox(t=>t[e]),ov()),n),u=ok(!1),c=ok(!1);return op(oR(c),u),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:i,ItemComponent:l("Item","div"),itemContent:e,listClassName:r,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),s2=oA(([e,t])=>({...e,...t}),ou(sK,s1)),s5=eV.memo(function(){let e=s7("gridState"),t=s7("listClassName"),n=s7("itemClassName"),i=s7("itemContent"),r=s7("computeItemKey"),o=s7("isSeeking"),a=le("scrollHeight"),s=s7("ItemComponent"),l=s7("ListComponent"),u=s7("ScrollSeekPlaceholder"),c=s7("context"),h=le("itemDimensions"),d=le("gap"),p=s7("log"),f=s7("stateRestoreInProgress"),g=le("reportReadyState"),m=oz(eV.useMemo(()=>e=>{a(e.parentElement.parentElement.scrollHeight);let t=e.firstChild;if(t){let{height:e,width:n}=t.getBoundingClientRect();h({height:e,width:n})}d({column:li("column-gap",getComputedStyle(e).columnGap,p),row:li("row-gap",getComputedStyle(e).rowGap,p)})},[a,h,d,p]),!0,!1);return a3(()=>{e.itemHeight>0&&e.itemWidth>0&&g(!0)},[e]),f?null:(0,ez.jsx)(l,{className:t,ref:m,...sh(l,c),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let a=r(t.index,t.data,c);return o?(0,ez.jsx)(u,{...sh(u,c),height:e.itemHeight,index:t.index,width:e.itemWidth},a):(0,eV.createElement)(s,{...sh(s,c),className:n,"data-index":t.index,key:a},i(t.index,t.data,c))})})}),s3=eV.memo(function(){let e=s7("HeaderComponent"),t=le("headerHeight"),n=s7("headerFooterTag"),i=oz(eV.useMemo(()=>e=>{t(o7(e,"height"))},[t]),!0,!1),r=s7("context");return e?(0,ez.jsx)(n,{ref:i,children:(0,ez.jsx)(e,{...sh(e,r)})}):null}),s4=eV.memo(function(){let e=s7("FooterComponent"),t=le("footerHeight"),n=s7("headerFooterTag"),i=oz(eV.useMemo(()=>e=>{t(o7(e,"height"))},[t]),!0,!1),r=s7("context");return e?(0,ez.jsx)(n,{ref:i,children:(0,ez.jsx)(e,{...sh(e,r)})}):null}),s8=({children:e})=>{let t=eV.useContext(a5),n=le("itemDimensions"),i=le("viewportDimensions"),r=oz(eV.useMemo(()=>e=>{i(e.getBoundingClientRect())},[i]),!0,!1);return eV.useEffect(()=>{t&&(i({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,i,n]),(0,ez.jsx)("div",{ref:r,style:su(!1),children:e})},s6=({children:e})=>{let t=eV.useContext(a5),n=le("windowViewportRect"),i=le("itemDimensions"),r=oH(n,s7("customScrollParent"),!1);return eV.useEffect(()=>{t&&(i({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,i]),(0,ez.jsx)("div",{ref:r,style:su(!1),children:e})},{useEmitter:s9,useEmitterValue:s7,usePublisher:le}=a1(s2,{events:{atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",endReached:"endReached",isScrolling:"isScrolling",rangeChanged:"rangeChanged",readyStateChanged:"readyStateChanged",startReached:"startReached",stateChanged:"stateChanged"},methods:{scrollBy:"scrollBy",scrollTo:"scrollTo",scrollToIndex:"scrollToIndex"},optional:{components:"components",computeItemKey:"computeItemKey",context:"context",customScrollParent:"customScrollParent",data:"data",headerFooterTag:"headerFooterTag",increaseViewportBy:"increaseViewportBy",initialItemCount:"initialItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",itemClassName:"itemClassName",itemContent:"itemContent",listClassName:"listClassName",logLevel:"logLevel",overscan:"overscan",restoreStateFrom:"restoreStateFrom",scrollerRef:"scrollerRef",scrollSeekConfiguration:"scrollSeekConfiguration",totalCount:"totalCount",useWindowScroll:"useWindowScroll"}},eV.memo(function({...e}){let t=s7("useWindowScroll"),n=s7("customScrollParent"),i=n||t?ln:lt,r=n||t?s6:s8,o=s7("context");return(0,ez.jsx)(i,{...e,...sh(i,o),children:(0,ez.jsxs)(r,{children:[(0,ez.jsx)(s3,{}),(0,ez.jsx)(s5,{}),(0,ez.jsx)(s4,{})]})})})),lt=sg({useEmitter:s9,useEmitterValue:s7,usePublisher:le}),ln=sm({useEmitter:s9,useEmitterValue:s7,usePublisher:le});function li(e,t,n){return"normal"===t||null!=t&&t.endsWith("px")||n(`${e} was not resolved to pixel value correctly`,t,oL.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var lr=n(3037),lo=n(4544),la=n(6758),ls=n(1183),ll=n(8849);function lu(e){return(0,eQ.ZP)("MuiListItemButton",e)}let lc=(0,eK.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),lh=e=>{let{alignItems:t,classes:n,dense:i,disabled:r,disableGutters:o,divider:a,selected:s}=e,l=(0,eH.Z)({root:["root",i&&"dense",!o&&"gutters",a&&"divider",r&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},lu,n);return{...n,...l}},ld=(0,eU.ZP)(lo.Z,{shouldForwardProp:e=>(0,lr.Z)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,eq.Z)(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${lc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lc.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lc.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${lc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),lp=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:r=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:c,selected:h=!1,className:d,...p}=n,f=eV.useContext(ll.Z),g=eV.useMemo(()=>({dense:s||f.dense||!1,alignItems:i,disableGutters:l}),[i,f.dense,s,l]),m=eV.useRef(null);(0,la.Z)(()=>{r&&m.current&&m.current.focus()},[r]);let v={...n,alignItems:i,dense:g.dense,disableGutters:l,divider:u,selected:h},y=lh(v),x=(0,ls.Z)(m,t);return(0,ez.jsx)(ll.Z.Provider,{value:g,children:(0,ez.jsx)(ld,{ref:x,href:p.href||p.to,component:(p.href||p.to)&&"div"===o?"button":o,focusVisibleClassName:(0,ej.Z)(y.focusVisible,c),ownerState:v,className:(0,ej.Z)(y.root,d),...p,classes:y,children:a})})});var lf=n(2577);let lg=(0,eV.memo)(function({color:e,sx:t,...n}){return(0,ez.jsx)(r_.Z,{...n,sx:ru({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})}),lm=(0,eV.forwardRef)(function({item:e,sx:t,truncateLabel:n,onClick:i,isVisuallySelected:r,onMouseOver:o,onMouseOut:a,index:s,...l},u){let[c,h]=(0,eV.useState)(n);return(0,ez.jsxs)(lp,{...l,role:"listitem",sx:ru({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{i(t,e.id),e.onClick?.(t)},onMouseOver:t=>o?.(t,{id:e.id,index:s}),onMouseOut:t=>a?.(t,{id:e.id,index:s}),selected:r,ref:u,children:[(0,ez.jsx)(r_.Z,{sx:{display:"flex",alignItems:"center"},children:(0,ez.jsx)(lg,{color:e.color})}),(0,ez.jsx)(lf.Z,{primary:e.label,primaryTypographyProps:{noWrap:c},onMouseOver:function(){n&&h(!1)},onMouseOut:function(){n&&h(!0)}})]})}),lv=(0,eV.memo)(lm);function ly(e,t){return"ALL"!==t&&!!t[e.id]}function lx({items:e,height:t,width:n,selectedItems:i,onLegendItemClick:r,onItemMouseOver:o,onItemMouseOut:a}){let s=e.length>5;return(0,ez.jsx)(sb,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,ez.jsx)(lv,{item:t,index:e,truncateLabel:s,isVisuallySelected:ly(t,i),onClick:r,onMouseOver:o,onMouseOut:a,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function lb({height:e,items:t,selectedItems:n,onLegendItemClick:i,onItemMouseOver:r,onItemMouseOut:o}){return(0,ez.jsx)(r_.Z,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map((e,t)=>(0,ez.jsx)(lv,{item:e,index:t,isVisuallySelected:ly(e,n),onMouseOver:r,onMouseOut:o,onClick:i,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id))})}function lw(e,t){return"function"==typeof e?e(t):e}function lS(e,t){return n=>{t.setState(t=>({...t,[e]:lw(n,t[e])}))}}function l_(e){return e instanceof Function}function lC(e,t,n){let i,r=[];return o=>{let a,s;n.key&&n.debug&&(a=Date.now());let l=e(o);if(!(l.length!==r.length||l.some((e,t)=>r[t]!==e)))return i;if(r=l,n.key&&n.debug&&(s=Date.now()),i=t(...l),null==n||null==n.onChange||n.onChange(i),n.key&&n.debug&&null!=n&&n.debug()){let e=Math.round((Date.now()-a)*100)/100,t=Math.round((Date.now()-s)*100)/100,i=t/16,r=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${r(t,5)} /${r(e,5)} ms`,`
|
|
3
|
-
font-size: .6rem;
|
|
4
|
-
font-weight: bold;
|
|
5
|
-
color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return i}}function lM(e,t,n,i){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:i}}let lk="debugHeaders";function lT(e,t,n){var i;let r={id:null!=(i=n.id)?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(r,e)}),r}function lD(e,t,n,i){var r,o;let a=0,s=function(e,t){void 0===t&&(t=1),a=Math.max(a,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;null!=(n=e.columns)&&n.length&&s(e.columns,t+1)},0)};s(e);let l=[],u=(e,t)=>{let r={depth:t,id:[i,`${t}`].filter(Boolean).join("_"),headers:[]},o=[];e.forEach(e=>{let a;let s=[...o].reverse()[0],l=e.column.depth===r.depth,u=!1;if(l&&e.column.parent?a=e.column.parent:(a=e.column,u=!0),s&&(null==s?void 0:s.column)===a)s.subHeaders.push(e);else{let r=lT(n,a,{id:[i,t,a.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:u,placeholderId:u?`${o.filter(e=>e.column===a).length}`:void 0,depth:t,index:o.length});r.subHeaders.push(e),o.push(r)}r.headers.push(e),e.headerGroup=r}),l.push(r),t>0&&u(o,t-1)};u(t.map((e,t)=>lT(n,e,{depth:a,index:t})),a-1),l.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,i=[0];return e.subHeaders&&e.subHeaders.length?(i=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:r}=e;t+=n,i.push(r)})):t=1,n+=Math.min(...i),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(null!=(r=null==(o=l[0])?void 0:o.headers)?r:[]),l}let lI=(e,t,n,i,r,o,a)=>{let s={id:t,index:i,original:n,depth:r,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(null!=n&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,i),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);return null!=n&&n.accessorFn?(n.columnDef.getUniqueValues?s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,i):s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t]):void 0},renderValue:t=>{var n;return null!=(n=s.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=o?o:[],getLeafRows:()=>(function(e,t){let n=[],i=e=>{e.forEach(e=>{n.push(e);let r=t(e);null!=r&&r.length&&i(r)})};return i(e),n})(s.subRows,e=>e.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:lC(()=>[e.getAllLeafColumns()],t=>t.map(t=>(function(e,t,n,i){let r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:()=>{var t;return null!=(t=r.getValue())?t:e.options.renderFallbackValue},getContext:lC(()=>[e,n,t,r],(e,t,n,i)=>({table:e,column:t,row:n,cell:i,getValue:i.getValue,renderValue:i.renderValue}),lM(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{null==i.createCell||i.createCell(r,n,t,e)},{}),r})(e,s,t,t.id)),lM(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:lC(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),lM(e.options,"debugRows","getAllCellsByColumnId"))};for(let t=0;t<e._features.length;t++){let n=e._features[t];null==n||null==n.createRow||n.createRow(s,e)}return s},lA=(e,t,n)=>{var i,r;let o=null==n||null==(i=n.toString())?void 0:i.toLowerCase();return!!(null==(r=e.getValue(t))||null==(r=r.toString())||null==(r=r.toLowerCase())?void 0:r.includes(o))};lA.autoRemove=e=>lV(e);let lP=(e,t,n)=>{var i;return!!(null==(i=e.getValue(t))||null==(i=i.toString())?void 0:i.includes(n))};lP.autoRemove=e=>lV(e);let lO=(e,t,n)=>{var i;return(null==(i=e.getValue(t))||null==(i=i.toString())?void 0:i.toLowerCase())===(null==n?void 0:n.toLowerCase())};lO.autoRemove=e=>lV(e);let lR=(e,t,n)=>{var i;return null==(i=e.getValue(t))?void 0:i.includes(n)};lR.autoRemove=e=>lV(e);let lE=(e,t,n)=>!n.some(n=>{var i;return!(null!=(i=e.getValue(t))&&i.includes(n))});lE.autoRemove=e=>lV(e)||!(null!=e&&e.length);let lL=(e,t,n)=>n.some(n=>{var i;return null==(i=e.getValue(t))?void 0:i.includes(n)});lL.autoRemove=e=>lV(e)||!(null!=e&&e.length);let lB=(e,t,n)=>e.getValue(t)===n;lB.autoRemove=e=>lV(e);let lN=(e,t,n)=>e.getValue(t)==n;lN.autoRemove=e=>lV(e);let lF=(e,t,n)=>{let[i,r]=n,o=e.getValue(t);return o>=i&&o<=r};lF.resolveFilterValue=e=>{let[t,n]=e,i="number"!=typeof t?parseFloat(t):t,r="number"!=typeof n?parseFloat(n):n,o=null===t||Number.isNaN(i)?-1/0:i,a=null===n||Number.isNaN(r)?1/0:r;if(o>a){let e=o;o=a,a=e}return[o,a]},lF.autoRemove=e=>lV(e)||lV(e[0])&&lV(e[1]);let lz={includesString:lA,includesStringSensitive:lP,equalsString:lO,arrIncludes:lR,arrIncludesAll:lE,arrIncludesSome:lL,equals:lB,weakEquals:lN,inNumberRange:lF};function lV(e){return null==e||""===e}function lZ(e,t,n){return!!e&&!!e.autoRemove&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}let lj={sum:(e,t,n)=>n.reduce((t,n)=>{let i=n.getValue(e);return t+("number"==typeof i?i:0)},0),min:(e,t,n)=>{let i;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(i>n||void 0===i&&n>=n)&&(i=n)}),i},max:(e,t,n)=>{let i;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(i<n||void 0===i&&n>=n)&&(i=n)}),i},extent:(e,t,n)=>{let i,r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(void 0===i?n>=n&&(i=r=n):(i>n&&(i=n),r<n&&(r=n)))}),[i,r]},mean:(e,t)=>{let n=0,i=0;if(t.forEach(t=>{let r=t.getValue(e);null!=r&&(r*=1)>=r&&(++n,i+=r)}),n)return i/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!(Array.isArray(n)&&n.every(e=>"number"==typeof e)))return;if(1===n.length)return n[0];let i=Math.floor(n.length/2),r=n.sort((e,t)=>e-t);return n.length%2!=0?r[i]:(r[i-1]+r[i])/2},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},lH=()=>({left:[],right:[]}),lW={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},l$=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),lG=null;function lU(e){return"touchstart"===e.type}function lq(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}let lY=()=>({pageIndex:0,pageSize:10}),lX=()=>({top:[],bottom:[]}),lK=(e,t,n,i,r)=>{var o;let a=r.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),a.getCanSelect()&&(e[t]=!0)):delete e[t],i&&null!=(o=a.subRows)&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(t=>lK(e,t.id,n,i,r))};function lQ(e,t){let n=e.getState().rowSelection,i=[],r={},o=function(e,t){return e.map(e=>{var t;let a=lJ(e,n);if(a&&(i.push(e),r[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:o(e.subRows)}),a)return e}).filter(Boolean)};return{rows:o(t.rows),flatRows:i,rowsById:r}}function lJ(e,t){var n;return null!=(n=t[e.id])&&n}function l0(e,t,n){var i;if(!(null!=(i=e.subRows)&&i.length))return!1;let r=!0,o=!1;return e.subRows.forEach(e=>{if((!o||r)&&(e.getCanSelect()&&(lJ(e,t)?o=!0:r=!1),e.subRows&&e.subRows.length)){let n=l0(e,t);"all"===n?o=!0:("some"===n&&(o=!0),r=!1)}}),r?"all":!!o&&"some"}let l1=/([0-9]+)/gm;function l2(e,t){return e===t?0:e>t?1:-1}function l5(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function l3(e,t){let n=e.split(l1).filter(Boolean),i=t.split(l1).filter(Boolean);for(;n.length&&i.length;){let e=n.shift(),t=i.shift(),r=parseInt(e,10),o=parseInt(t,10),a=[r,o].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return -1;continue}if(isNaN(a[1]))return isNaN(r)?-1:1;if(r>o)return 1;if(o>r)return -1}return n.length-i.length}let l4={alphanumeric:(e,t,n)=>l3(l5(e.getValue(n)).toLowerCase(),l5(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>l3(l5(e.getValue(n)),l5(t.getValue(n))),text:(e,t,n)=>l2(l5(e.getValue(n)).toLowerCase(),l5(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>l2(l5(e.getValue(n)),l5(t.getValue(n))),datetime:(e,t,n)=>{let i=e.getValue(n),r=t.getValue(n);return i>r?1:i<r?-1:0},basic:(e,t,n)=>l2(e.getValue(n),t.getValue(n))},l8=[{createTable:e=>{e.getHeaderGroups=lC(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,r)=>{var o,a;let s=null!=(o=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],l=null!=(a=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[];return lD(t,[...s,...n.filter(e=>!(null!=i&&i.includes(e.id))&&!(null!=r&&r.includes(e.id))),...l],e)},lM(e.options,lk,"getHeaderGroups")),e.getCenterHeaderGroups=lC(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,r)=>lD(t,n=n.filter(e=>!(null!=i&&i.includes(e.id))&&!(null!=r&&r.includes(e.id))),e,"center"),lM(e.options,lk,"getCenterHeaderGroups")),e.getLeftHeaderGroups=lC(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var r;return lD(t,null!=(r=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?r:[],e,"left")},lM(e.options,lk,"getLeftHeaderGroups")),e.getRightHeaderGroups=lC(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var r;return lD(t,null!=(r=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?r:[],e,"right")},lM(e.options,lk,"getRightHeaderGroups")),e.getFooterGroups=lC(()=>[e.getHeaderGroups()],e=>[...e].reverse(),lM(e.options,lk,"getFooterGroups")),e.getLeftFooterGroups=lC(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),lM(e.options,lk,"getLeftFooterGroups")),e.getCenterFooterGroups=lC(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),lM(e.options,lk,"getCenterFooterGroups")),e.getRightFooterGroups=lC(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),lM(e.options,lk,"getRightFooterGroups")),e.getFlatHeaders=lC(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),lM(e.options,lk,"getFlatHeaders")),e.getLeftFlatHeaders=lC(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),lM(e.options,lk,"getLeftFlatHeaders")),e.getCenterFlatHeaders=lC(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),lM(e.options,lk,"getCenterFlatHeaders")),e.getRightFlatHeaders=lC(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),lM(e.options,lk,"getRightFlatHeaders")),e.getCenterLeafHeaders=lC(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),lM(e.options,lk,"getCenterLeafHeaders")),e.getLeftLeafHeaders=lC(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),lM(e.options,lk,"getLeftLeafHeaders")),e.getRightLeafHeaders=lC(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),lM(e.options,lk,"getRightLeafHeaders")),e.getLeafHeaders=lC(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var i,r,o,a,s,l;return[...null!=(i=null==(r=e[0])?void 0:r.headers)?i:[],...null!=(o=null==(a=t[0])?void 0:a.headers)?o:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map(e=>e.getLeafHeaders()).flat()},lM(e.options,lk,"getLeafHeaders"))}},{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:lS("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;let r=e.columns;return null==(n=r.length?r.some(e=>e.getIsVisible()):null==(i=t.getState().columnVisibility)?void 0:i[e.id])||n},e.getCanHide=()=>{var n,i;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(i=t.options.enableHiding)||i)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=lC(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),lM(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=lC(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],lM(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(t,n)=>lC(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),lM(e.options,"debugColumns",t));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},e.toggleAllColumnsVisible=t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(null!=e.getIsVisible&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>null==e.getIsVisible?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}},{getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:lS("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=lC(e=>[lq(t,e)],t=>t.findIndex(t=>t.id===e.id),lM(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var i;return(null==(i=lq(t,n)[0])?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;let r=lq(t,n);return(null==(i=r[r.length-1])?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},e._getOrderColumnsFn=lC(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>i=>{let r=[];if(null!=e&&e.length){let t=[...e],n=[...i];for(;n.length&&t.length;){let e=t.shift(),i=n.findIndex(t=>t.id===e);i>-1&&r.push(n.splice(i,1)[0])}r=[...r,...n]}else r=i;return function(e,t,n){if(!(null!=t&&t.length)||!n)return e;let i=e.filter(e=>!t.includes(e.id));return"remove"===n?i:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...i]}(r,t,n)},lM(e.options,"debugTable","_getOrderColumnsFn"))}},{getInitialState:e=>({columnPinning:lH(),...e}),getDefaultOptions:e=>({onColumnPinningChange:lS("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{let i=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,r,o,a,s,l;return"right"===n?{left:(null!=(o=null==e?void 0:e.left)?o:[]).filter(e=>!(null!=i&&i.includes(e))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter(e=>!(null!=i&&i.includes(e))),...i]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter(e=>!(null!=i&&i.includes(e))),...i],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter(e=>!(null!=i&&i.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=i&&i.includes(e))),right:(null!=(r=null==e?void 0:e.right)?r:[]).filter(e=>!(null!=i&&i.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,i,r;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(i=null!=(r=t.options.enableColumnPinning)?r:t.options.enablePinning)||i)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:i,right:r}=t.getState().columnPinning,o=n.some(e=>null==i?void 0:i.includes(e)),a=n.some(e=>null==r?void 0:r.includes(e));return o?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,i;let r=e.getIsPinned();return r?null!=(n=null==(i=t.getState().columnPinning)||null==(i=i[r])?void 0:i.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=lC(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let i=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!i.includes(e.column.id))},lM(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=lC(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"left"})),lM(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=lC(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:"right"})),lM(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?lH():null!=(n=null==(i=e.initialState)?void 0:i.columnPinning)?n:lH())},e.getIsSomeColumnsPinned=t=>{var n,i,r;let o=e.getState().columnPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(i=o.left)?void 0:i.length)||(null==(r=o.right)?void 0:r.length))},e.getLeftLeafColumns=lC(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),lM(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=lC(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),lM(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=lC(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let i=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!i.includes(e.id))},lM(e.options,"debugColumns","getCenterLeafColumns"))}},{createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},{getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:lS("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0],i=null==n?void 0:n.getValue(e.id);return"string"==typeof i?lz.includesString:"number"==typeof i?lz.inNumberRange:"boolean"==typeof i||null!==i&&"object"==typeof i?lz.equals:Array.isArray(i)?lz.arrIncludes:lz.weakEquals},e.getFilterFn=()=>{var n,i;return l_(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(i=t.options.filterFns)?void 0:i[e.columnDef.filterFn])?n:lz[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,r;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(i=t.options.enableColumnFilters)||i)&&(null==(r=t.options.enableFilters)||r)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return null==(n=t.getState().columnFilters)||null==(n=n.find(t=>t.id===e.id))?void 0:n.value},e.getFilterIndex=()=>{var n,i;return null!=(n=null==(i=t.getState().columnFilters)?void 0:i.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{var i,r;let o=e.getFilterFn(),a=null==t?void 0:t.find(t=>t.id===e.id),s=lw(n,a?a.value:void 0);if(lZ(o,s,e))return null!=(i=null==t?void 0:t.filter(t=>t.id!==e.id))?i:[];let l={id:e.id,value:s};return a?null!=(r=null==t?void 0:t.map(t=>t.id===e.id?l:t))?r:[]:null!=t&&t.length?[...t,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange(e=>{var i;return null==(i=lw(t,e))?void 0:i.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&lZ(t.getFilterFn(),e.value,t))})})},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.columnFilters)?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel)?e.getPreFilteredRowModel():e._getFilteredRowModel()}},{createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:lS("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;let i=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof i||"number"==typeof i}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,r,o;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(i=t.options.enableGlobalFilter)||i)&&(null==(r=t.options.enableFilters)||r)&&(null==(o=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||o)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>lz.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:i}=e.options;return l_(i)?i:"auto"===i?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[i])?t:lz[i]},e.setGlobalFilter=t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:lS("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),i=!1;for(let t of n){let n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return l4.datetime;if("string"==typeof n&&(i=!0,n.split(l1).length>1))return l4.alphanumeric}return i?l4.text:l4.basic},e.getAutoSortDir=()=>{let n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw Error();return l_(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(i=t.options.sortingFns)?void 0:i[e.columnDef.sortingFn])?n:l4[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{let r=e.getNextSortingOrder(),o=null!=n;t.setSorting(a=>{let s;let l=null==a?void 0:a.find(t=>t.id===e.id),u=null==a?void 0:a.findIndex(t=>t.id===e.id),c=[],h=o?n:"desc"===r;if("toggle"!=(s=null!=a&&a.length&&e.getCanMultiSort()&&i?l?"toggle":"add":null!=a&&a.length&&u!==a.length-1?"replace":l?"toggle":"replace")||o||r||(s="remove"),"add"===s){var d;(c=[...a,{id:e.id,desc:h}]).splice(0,c.length-(null!=(d=t.options.maxMultiSortColCount)?d:Number.MAX_SAFE_INTEGER))}else c="toggle"===s?a.map(t=>t.id===e.id?{...t,desc:h}:t):"remove"===s?a.filter(t=>t.id!==e.id):[{id:e.id,desc:h}];return c})},e.getFirstSortDir=()=>{var n,i;return(null!=(n=null!=(i=e.columnDef.sortDescFirst)?i:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var i,r;let o=e.getFirstSortDir(),a=e.getIsSorted();return a?(a===o||null!=(i=t.options.enableSortingRemoval)&&!i||!!n&&null!=(r=t.options.enableMultiRemove)&&!r)&&("desc"===a?"asc":"desc"):o},e.getCanSort=()=>{var n,i;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(i=t.options.enableSorting)||i)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return null!=(n=null!=(i=e.columnDef.enableMultiSort)?i:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;let i=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!i&&(i.desc?"desc":"asc")},e.getSortIndex=()=>{var n,i;return null!=(n=null==(i=t.getState().sorting)?void 0:i.findIndex(t=>t.id===e.id))?n:-1},e.clearSorting=()=>{t.setSorting(t=>null!=t&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return i=>{n&&(null==i.persist||i.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(i))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.sorting)?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel)?e.getPreSortedRowModel():e._getSortedRowModel()}},{getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:lS("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>null!=t&&t.includes(e.id)?t.filter(t=>t!==e.id):[...null!=t?t:[],e.id])},e.getCanGroup=()=>{var n,i;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(i=t.options.enableGrouping)||i)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0],i=null==n?void 0:n.getValue(e.id);return"number"==typeof i?lj.sum:"[object Date]"===Object.prototype.toString.call(i)?lj.extent:void 0},e.getAggregationFn=()=>{var n,i;if(!e)throw Error();return l_(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(i=t.options.aggregationFns)?void 0:i[e.columnDef.aggregationFn])?n:lj[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:null!=(n=null==(i=e.initialState)?void 0:i.grouping)?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel)?e.getPreGroupedRowModel():e._getGroupedRowModel()},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let i=t.getColumn(n);return null!=i&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!(null!=(t=n.subRows)&&t.length)}}},{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:lS("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,r;if(!t){e._queue(()=>{t=!0});return}if(null!=(i=null!=(r=e.options.autoResetAll)?r:e.options.autoResetExpanded)?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{var n,i;e.setExpanded(t?{}:null!=(n=null==(i=e.initialState)?void 0:i.expanded)?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return"boolean"==typeof t?!0===t:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(".");t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel)?e.getPreExpandedRowModel():e._getExpandedRowModel()},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var r;let o=!0===i||!!(null!=i&&i[e.id]),a={};if(!0===i?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=i,n=null!=(r=n)?r:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){let{[e.id]:t,...n}=a;return n}return i})},e.getIsExpanded=()=>{var n;let i=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===i||(null==i?void 0:i[e.id]))},e.getCanExpand=()=>{var n,i,r;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(i=t.options.enableExpanding)||i)&&!!(null!=(r=e.subRows)&&r.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)n=(i=t.getRow(i.parentId,!0)).getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{...lY(),...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:lS("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,r;if(!t){e._queue(()=>{t=!0});return}if(null!=(i=null!=(r=e.options.autoResetAll)?r:e.options.autoResetPageIndex)?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange(e=>lw(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?lY():null!=(n=e.initialState.pagination)?n:lY())},e.setPageIndex=t=>{e.setPagination(n=>{let i=lw(t,n.pageIndex);return i=Math.max(0,Math.min(i,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:i}})},e.resetPageIndex=t=>{var n,i;e.setPageIndex(t?0:null!=(n=null==(i=e.initialState)||null==(i=i.pagination)?void 0:i.pageIndex)?n:0)},e.resetPageSize=t=>{var n,i;e.setPageSize(t?10:null!=(n=null==(i=e.initialState)||null==(i=i.pagination)?void 0:i.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,lw(t,e.pageSize)),i=Math.floor(e.pageSize*e.pageIndex/n);return{...e,pageIndex:i,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var i;let r=lw(t,null!=(i=e.options.pageCount)?i:-1);return"number"==typeof r&&(r=Math.max(-1,r)),{...n,pageCount:r}}),e.getPageOptions=lC(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},lM(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return -1===n||0!==n&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel)?e.getPrePaginationRowModel():e._getPaginationRowModel(),e.getPageCount=()=>{var t;return null!=(t=e.options.pageCount)?t:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var t;return null!=(t=e.options.rowCount)?t:e.getPrePaginationRowModel().rows.length}}},{getInitialState:e=>({rowPinning:lX(),...e}),getDefaultOptions:e=>({onRowPinningChange:lS("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,r)=>{let o=i?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],a=new Set([...r?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],e.id,...o]);t.setRowPinning(e=>{var t,i,r,o,s,l;return"bottom"===n?{top:(null!=(r=null==e?void 0:e.top)?r:[]).filter(e=>!(null!=a&&a.has(e))),bottom:[...(null!=(o=null==e?void 0:e.bottom)?o:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)]}:"top"===n?{top:[...(null!=(s=null==e?void 0:e.top)?s:[]).filter(e=>!(null!=a&&a.has(e))),...Array.from(a)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter(e=>!(null!=a&&a.has(e)))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter(e=>!(null!=a&&a.has(e))),bottom:(null!=(i=null==e?void 0:e.bottom)?i:[]).filter(e=>!(null!=a&&a.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:i,enablePinning:r}=t.options;return"function"==typeof i?i(e):null==(n=null!=i?i:r)||n},e.getIsPinned=()=>{let n=[e.id],{top:i,bottom:r}=t.getState().rowPinning,o=n.some(e=>null==i?void 0:i.includes(e)),a=n.some(e=>null==r?void 0:r.includes(e));return o?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,i;let r=e.getIsPinned();if(!r)return -1;let o=null==(n="top"===r?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(i=null==o?void 0:o.indexOf(e.id))?i:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?lX():null!=(n=null==(i=e.initialState)?void 0:i.rowPinning)?n:lX())},e.getIsSomeRowsPinned=t=>{var n,i,r;let o=e.getState().rowPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(i=o.top)?void 0:i.length)||(null==(r=o.bottom)?void 0:r.length))},e._getPinnedRows=(t,n,i)=>{var r;return(null==(r=e.options.keepPinnedRows)||r?(null!=n?n:[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(null!=n?n:[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:i}))},e.getTopRows=lC(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),lM(e.options,"debugRows","getTopRows")),e.getBottomRows=lC(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),lM(e.options,"debugRows","getBottomRows")),e.getCenterRows=lC(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let i=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!i.has(e.id))},lM(e.options,"debugRows","getCenterRows"))}},{getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:lS("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:null!=(n=e.initialState.rowSelection)?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();let i={...n},r=e.getPreGroupedRowModel().flatRows;return t?r.forEach(e=>{e.getCanSelect()&&(i[e.id]=!0)}):r.forEach(e=>{delete i[e.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let i=void 0!==t?t:!e.getIsAllPageRowsSelected(),r={...n};return e.getRowModel().rows.forEach(t=>{lK(r,t.id,i,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=lC(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?lQ(e,n):{rows:[],flatRows:[],rowsById:{}},lM(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=lC(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?lQ(e,n):{rows:[],flatRows:[],rowsById:{}},lM(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=lC(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?lQ(e,n):{rows:[],flatRows:[],rowsById:{}},lM(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),i=!!(t.length&&Object.keys(n).length);return i&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),i=!!t.length;return i&&t.some(e=>!n[e.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;let n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{let r=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=void 0!==n?n:!r,e.getCanSelect()&&r===n)return o;let s={...o};return lK(s,e.id,n,null==(a=null==i?void 0:i.selectChildren)||a,t),s})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return lJ(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return"some"===l0(e,n)},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return"all"===l0(e,n)},e.getCanSelect=()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},e.getCanSelectSubRows=()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},e.getCanMultiSelect=()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{var i;t&&e.toggleSelected(null==(i=n.target)?void 0:i.checked)}}}},{getDefaultColumnDef:()=>lW,getInitialState:e=>({columnSizing:{},columnSizingInfo:l$(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:lS("columnSizing",e),onColumnSizingInfoChange:lS("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,r;let o=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:lW.minSize,null!=(i=null!=o?o:e.columnDef.size)?i:lW.size),null!=(r=e.columnDef.maxSize)?r:lW.maxSize)},e.getStart=lC(e=>[e,lq(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),lM(t.options,"debugColumns","getStart")),e.getAfter=lC(e=>[e,lq(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),lM(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...i}=t;return i})},e.getCanResize=()=>{var n,i;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(i=t.options.enableColumnResizing)||i)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{if(e.subHeaders.length)e.subHeaders.forEach(n);else{var i;t+=null!=(i=e.column.getSize())?i:0}};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let i=t.getColumn(e.column.id),r=null==i?void 0:i.getCanResize();return o=>{if(!i||!r||(null==o.persist||o.persist(),lU(o)&&o.touches&&o.touches.length>1))return;let a=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[i.id,i.getSize()]],l=lU(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var i,r;let o="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(i=null==e?void 0:e.startOffset)?i:0))*o,s=Math.max(a/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;u[t]=Math.round(100*Math.max(n+n*s,0))/100}),{...e,deltaOffset:a,deltaPercentage:s}}),("onChange"===t.options.columnResizeMode||"end"===e)&&t.setColumnSizing(e=>({...e,...u})))},h=e=>c("move",e),d=e=>{c("end",e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||"undefined"!=typeof document?document:null,f={moveHandler:e=>h(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),d(e.clientX)}},g={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",g.moveHandler),null==p||p.removeEventListener("touchend",g.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(null==(t=e.touches[0])?void 0:t.clientX)}},m=!!function(){if("boolean"==typeof lG)return lG;let e=!1;try{let t=()=>{};window.addEventListener("test",t,{get passive(){return e=!0,!1}}),window.removeEventListener("test",t)}catch(t){e=!1}return lG=e}()&&{passive:!1};lU(o)?(null==p||p.addEventListener("touchmove",g.moveHandler,m),null==p||p.addEventListener("touchend",g.upHandler,m)):(null==p||p.addEventListener("mousemove",f.moveHandler,m),null==p||p.addEventListener("mouseup",f.upHandler,m)),t.setColumnSizingInfo(e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?l$():null!=(n=e.initialState.columnSizingInfo)?n:l$())},e.getTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getLeftTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getCenterTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0},e.getRightTotalSize=()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((e,t)=>e+t.getSize(),0))?t:0}}}];var l6=n(2641);function l9(e){return(0,eQ.ZP)("MuiTableRow",e)}let l7=(0,eK.Z)("MuiTableRow",["root","selected","hover","head","footer"]),ue=e=>{let{classes:t,selected:n,hover:i,head:r,footer:o}=e;return(0,eH.Z)({root:["root",n&&"selected",i&&"hover",r&&"head",o&&"footer"]},l9,t)},ut=(0,eU.ZP)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((0,eq.Z)(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${l7.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${l7.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),un=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTableRow"}),{className:i,component:r="tr",hover:o=!1,selected:a=!1,...s}=n,l=eV.useContext(l6.Z),u={...n,component:r,hover:o,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant},c=ue(u);return(0,ez.jsx)(ut,{as:r,ref:t,className:(0,ej.Z)(c.root,i),role:"tr"===r?null:"row",ownerState:u,...s})});var ui=n(9449);let ur=(0,eV.forwardRef)(function(e,t){return(0,ez.jsx)(un,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,eW.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})});function uo(e){return(0,eQ.ZP)("MuiTableBody",e)}(0,eK.Z)("MuiTableBody",["root"]);let ua=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},uo,t)},us=(0,eU.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),ul={variant:"body"},uu="tbody",uc=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTableBody"}),{className:i,component:r=uu,...o}=n,a={...n,component:r},s=ua(a);return(0,ez.jsx)(l6.Z.Provider,{value:ul,children:(0,ez.jsx)(us,{className:(0,ej.Z)(s.root,i),as:r,ref:t,role:r===uu?null:"rowgroup",ownerState:a,...o})})}),uh=(0,eV.forwardRef)(function(e,t){return(0,ez.jsx)(uc,{...e,ref:t})});var ud=n(2679);function up(e){return(0,eQ.ZP)("MuiTable",e)}(0,eK.Z)("MuiTable",["root","stickyHeader"]);let uf=e=>{let{classes:t,stickyHeader:n}=e;return(0,eH.Z)({root:["root",n&&"stickyHeader"]},up,t)},ug=(0,eU.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((0,eq.Z)(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),um="table",uv=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTable"}),{className:i,component:r=um,padding:o="normal",size:a="medium",stickyHeader:s=!1,...l}=n,u={...n,component:r,padding:o,size:a,stickyHeader:s},c=uf(u),h=eV.useMemo(()=>({padding:o,size:a,stickyHeader:s}),[o,a,s]);return(0,ez.jsx)(ud.Z.Provider,{value:h,children:(0,ez.jsx)(ug,{as:r,role:r===um?null:"table",ref:t,className:(0,ej.Z)(c.root,i),ownerState:u,...l})})}),uy=(0,eU.ZP)(uv)(({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default})),ux={compact:"small",standard:"medium",comfortable:"medium"},ub=(0,eV.forwardRef)(function({density:e,...t},n){return(0,ez.jsx)(uy,{...t,tabIndex:-1,size:ux[e],ref:n,sx:{width:"100%"}})});function uw(e){return(0,eQ.ZP)("MuiTableHead",e)}(0,eK.Z)("MuiTableHead",["root"]);let uS=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},uw,t)},u_=(0,eU.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),uC={variant:"head"},uM="thead",uk=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTableHead"}),{className:i,component:r=uM,...o}=n,a={...n,component:r},s=uS(a);return(0,ez.jsx)(l6.Z.Provider,{value:uC,children:(0,ez.jsx)(u_,{as:r,className:(0,ej.Z)(s.root,i),ref:t,role:r===uM?null:"rowgroup",ownerState:a,...o})})}),uT=(0,eV.forwardRef)(function(e,t){return(0,ez.jsx)(uk,{...e,ref:t})});var uD=n(2054),uI=n(247);let uA=(0,uI.Z)((0,ez.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function uP(e){return(0,eQ.ZP)("MuiTableSortLabel",e)}let uO=(0,eK.Z)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);var uR=n(6351);let uE=e=>{let{classes:t,direction:n,active:i}=e,r={root:["root",i&&"active",`direction${(0,eG.Z)(n)}`],icon:["icon",`iconDirection${(0,eG.Z)(n)}`]};return(0,eH.Z)(r,uP,t)},uL=(0,eU.ZP)(lo.Z,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,eq.Z)(({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${uO.icon}`]:{opacity:.5}},[`&.${uO.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${uO.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),uB=(0,eU.ZP)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,eG.Z)(n.direction)}`]]}})((0,eq.Z)(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]}))),uN=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTableSortLabel"}),{active:i=!1,children:r,className:o,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=uA,slots:u={},slotProps:c={},...h}=n,d={...n,active:i,direction:a,hideSortIcon:s,IconComponent:l},p=uE(d),f={slots:u,slotProps:c},[g,m]=(0,uR.Z)("root",{elementType:uL,externalForwardedProps:f,ownerState:d,className:(0,ej.Z)(p.root,o),ref:t}),[v,y]=(0,uR.Z)("icon",{elementType:uB,externalForwardedProps:f,ownerState:d,className:p.icon});return(0,ez.jsxs)(g,{disableRipple:!0,component:"span",...m,...h,children:[r,s&&!i?null:(0,ez.jsx)(v,{as:l,...y})]})});var uF=n(6205);let uz=150,uV=40;function uZ(e,t,{isHeader:n,isLastColumn:i,isFirstColumn:r,defaultColumnHeight:o}={}){var a,s;let l=e.spacing(1),u=e.spacing(1.25),c=e.spacing(2),h=r?c:u,d=i?c:u,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize;"compact"===t&&(l=e.spacing(.5),u=e.spacing(.5),c=e.spacing(1),h=r?c:u,d=i?c:u,p=e.typography.body2.lineHeight,f=e.typography.body2.fontSize),"comfortable"===t&&(l=e.spacing(2),u=e.spacing(1.5),c=e.spacing(2),h=r?c:u,d=i?c:u,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize);let g=n||!o||"auto"===o?(a=p,s=l,("string"==typeof a?parseInt(a,10):a??0)+2*("string"==typeof s?parseInt(s,10):s)):o;return{padding:`${l} ${d} ${l} ${h}`,height:g,fontSize:f,lineHeight:p}}function uj(e){return e.map(({width:e,align:t,headerDescription:n,cellDescription:i,enableSorting:r,...o})=>({...o,..."auto"===e||void 0===e?{size:0,minSize:0,maxSize:0}:{size:e},enableSorting:!!r,meta:{align:t,headerDescription:n,cellDescription:i}}))}let uH=(0,eU.ZP)(uF.Z)(({theme:e})=>({padding:0,backgroundColor:"inherit","&.MuiTableCell-head":{backgroundColor:e.palette.background.default},"&:focus-visible":{outline:`solid 1px ${e.palette.primary.main}`,outlineOffset:"-1px",borderRadius:0}}));function uW({children:e,density:t,variant:n,width:i,defaultColumnHeight:r,focusState:o="none",onFocusTrigger:a,isFirstColumn:s,isLastColumn:l,description:u,align:c,color:h,backgroundColor:d,...p}){let f=(0,rS.Z)(),g=(0,eV.useRef)(),m="head"===n;(0,eV.useEffect)(()=>{"trigger-focus"===o&&g.current&&g.current.focus()},[o]);let v=e=>{a?.(e)};return(0,ez.jsx)(uH,{...p,tabIndex:"none"!==o?0:-1,onFocus:e=>{let t=e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');t&&t.focus()},onClick:v,onKeyUp:v,style:{width:i},sx:{position:"relative",borderBottom:m?`solid 1px ${f.palette.grey[100]}`:`solid 1px ${f.palette.grey[50]}`,"&:hover #original-cell":{position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:`${d??f.palette.background.default} !important`,outline:`solid 1px ${f.palette.info.main}`,outlineOffset:"-1px"}},ref:g,children:(0,ez.jsx)(r_.Z,{id:"original-cell",sx:{...uZ(f,t,{isHeader:m,isLastColumn:l,isFirstColumn:s,defaultColumnHeight:r}),position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},style:{backgroundColor:d??"inherit",color:h??"inherit"},title:u,"aria-label":u,textAlign:c,children:e})})}function u$({onSort:e,sortDirection:t,nextSortDirection:n,children:i,...r}){let o=!!e,a=(0,ez.jsx)(uD.Z,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:i}),s=!!t;return(0,ez.jsx)(uW,{...r,children:o?(0,ez.jsx)(uN,{onClick:e,direction:s?t:n,active:s,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${uO.icon}`]:{opacity:s?1:.5}}},children:a}):a})}function uG(e){return(0,eQ.ZP)("MuiTableContainer",e)}(0,eK.Z)("MuiTableContainer",["root"]);let uU=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},uG,t)},uq=(0,eU.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),uY=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTableContainer"}),{className:i,component:r="div",...o}=n,a={...n,component:r},s=uU(a);return(0,ez.jsx)(uq,{ref:t,as:r,className:(0,ej.Z)(s.root,i),ownerState:a,...o})}),uX=(0,eV.forwardRef)(function(e,t){return(0,ez.jsx)(uY,{...e,tabIndex:-1,ref:t})}),uK={row:0,column:0},uQ=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];function uJ(e){return(0,eQ.ZP)("MuiTableFooter",e)}(0,eK.Z)("MuiTableFooter",["root"]);let u0=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},uJ,t)},u1=(0,eU.ZP)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),u2={variant:"footer"},u5="tfoot",u3=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTableFooter"}),{className:i,component:r=u5,...o}=n,a={...n,component:r},s=u0(a);return(0,ez.jsx)(l6.Z.Provider,{value:u2,children:(0,ez.jsx)(u1,{as:r,className:(0,ej.Z)(s.root,i),ref:t,role:r===u5?null:"rowgroup",ownerState:a,...o})})}),u4=(0,eV.forwardRef)(function(e,t){return(0,ez.jsx)(u3,{...e,ref:t})});function u8({width:e,height:t,density:n,defaultColumnWidth:i,defaultColumnHeight:r,onRowClick:o,onRowMouseOver:a,onRowMouseOut:s,rows:l,columns:u,headers:c,cellConfigs:h,pagination:d,onPaginationChange:p,rowCount:f}){let g=(0,eV.useRef)(null),m=(0,eV.useRef)({startIndex:0,endIndex:0}),v=function({visibleRange:e,virtualTable:t,maxRows:n,maxColumns:i}){return function({maxRows:e,maxColumns:t,onActiveCellChange:n}){let[i,r]=(0,eV.useState)(uK),[o,a]=(0,eV.useState)(!1);return{activeCell:i,isActive:o,onTableKeyDown:(0,eV.useCallback)(i=>{let o=i.key;(uQ.includes(o)||"Home"===o||"End"===o||"PageDown"===o||"PageUp"===o)&&r(r=>{let a=r.row,s=r.column;"ArrowRight"===o&&s<t-1?(i.preventDefault(),s+=1):"ArrowLeft"===o&&s>0?(i.preventDefault(),s-=1):"ArrowDown"===o&&a<e-1?(i.preventDefault(),a+=1):"ArrowUp"===o&&a>0?(i.preventDefault(),a-=1):"Home"===o?(i.preventDefault(),a=0,s=0):"End"===o&&(i.preventDefault(),a=e-1,s=t-1);let l={column:s,row:a},u=n?.(i,r,l)||l;return u.row===r.row&&u.column===r.column?r:u})},[t,e,n]),onCellFocus:e=>{(e.column!==i.column||e.row!==i.row||!o)&&(a(!0),r(e))}}}({maxRows:n,maxColumns:i,onActiveCellChange:(i,r,o)=>{let a=i.key,s=o&&(r.column!==o.column||r.row!==o.row),l=o?.row??r.row;if("ArrowDown"===a&&s)(l-1<e.current.startIndex||l-1>e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"end"});else if("ArrowUp"===a&&s)(l-1<e.current.startIndex||l-1>e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"start"});else if(s&&("Home"===a||"End"===a))t.current?.scrollToIndex({index:Math.max(l-1,0),align:"start"});else if("PageDown"===a){i.preventDefault();let o=r.row;return o=Math.min(n-1,e.current.endIndex+1),t.current?.scrollToIndex({index:o-1,align:"start"}),{row:o,column:r.column}}else if("PageUp"===a){let n=r.row;return n=Math.max(0,e.current.startIndex-1),t.current?.scrollToIndex({index:n-1,align:"end"}),{row:n,column:r.column}}return o}})}({visibleRange:m,virtualTable:g,maxRows:l.length+1,maxColumns:u.length}),y=e=>e.row===v.activeCell.row&&e.column===v.activeCell.column?v.isActive?"trigger-focus":"focus-next":"none",x=(0,eV.useMemo)(()=>({Scroller:uX,Table:t=>(0,ez.jsx)(ub,{...t,width:e,density:n,onKeyDown:v.onTableKeyDown}),TableHead:uT,TableFoot:u4,TableRow:({item:e,...t})=>{let i=l[t["data-index"]];if(!i)return null;let r={id:i.id,index:i.index};return(0,ez.jsx)(ur,{...t,onClick:e=>o(e,i.id),density:n,onMouseOver:e=>{a?.(e,r)},onMouseOut:e=>{s?.(e,r)}})},TableBody:uh}),[n,v.onTableKeyDown,o,s,a,l,e]),b=(e,t)=>{d&&p&&p({...d,pageIndex:t})},w=e=>{d&&p&&p({pageIndex:0,pageSize:parseInt(e.target.value,10)})};return(0,ez.jsx)(r_.Z,{style:{width:e,height:t},children:(0,ez.jsx)(sL,{ref:g,totalCount:l.length,components:x,rangeChanged:e=>{m.current=e},fixedHeaderContent:()=>(0,ez.jsx)(ez.Fragment,{children:c.map(e=>(0,ez.jsx)(ur,{density:n,children:e.headers.map((e,t,o)=>{var a,s,l,u,c;let h=e.column,d={row:0,column:t},p=h.getIsSorted(),f=h.getNextSortingOrder();return(0,ez.jsx)(u$,{onSort:h.getCanSort()?h.getToggleSortingHandler():void 0,sortDirection:"string"==typeof p?p:void 0,nextSortDirection:"string"==typeof f?f:void 0,width:h.getSize()||i,defaultColumnHeight:r,align:h.columnDef.meta?.align,variant:"head",density:n,description:h.columnDef.meta?.headerDescription,focusState:y(d),onFocusTrigger:()=>v.onCellFocus(d),isFirstColumn:0===t,isLastColumn:t===o.length-1,children:(a=h.columnDef.header,s=e.getContext(),a?"function"==typeof(u=l=a)&&(()=>{let e=Object.getPrototypeOf(u);return e.prototype&&e.prototype.isReactComponent})()||"function"==typeof l||"object"==typeof(c=l)&&"symbol"==typeof c.$$typeof&&["react.memo","react.forward_ref"].includes(c.$$typeof.description)?eV.createElement(a,s):a:null)},e.id)})},e.id))}),fixedFooterContent:d?()=>(0,ez.jsx)(un,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,ez.jsx)(ui.Z,{colSpan:u.length,count:f,page:d.pageIndex,rowsPerPage:d.pageSize,onPageChange:b,onRowsPerPageChange:w})}):void 0,itemContent:e=>{let t=l[e];return t?(0,ez.jsx)(ez.Fragment,{children:t.getVisibleCells().map((t,o,a)=>{let s;let l={row:e+1,column:o},u=t.getContext(),c=h?.[u.cell.id],d=t.column.columnDef.cell,p="function"==typeof d?d(u):null,f=t.column.columnDef.meta?.cellDescription;return"function"==typeof f?s=f(u):f&&"string"==typeof p&&(s=p),(0,ez.jsx)(uW,{"data-testid":t.id,title:s||c?.text||p,width:t.column.getSize()||i,defaultColumnHeight:r,align:t.column.columnDef.meta?.align,density:n,focusState:y(l),onFocusTrigger:()=>v.onCellFocus(l),isFirstColumn:0===o,isLastColumn:o===a.length-1,description:s,color:c?.textColor??void 0,backgroundColor:c?.backgroundColor??void 0,children:c?.text||p},t.id)})}):null}})})}var u6=n(2707);function u9({color:e,density:t,...n}){let i="compact"===t;return(0,ez.jsx)(u6.Z,{size:i?"small":"medium",...n,focusRipple:!1,tabIndex:-1,sx:{color:e,padding:e=>e.spacing(i?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:e},"&.Mui-focusVisible":{background:e?(0,eW.Fq)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:i?16:18}}})}let u7=(e,t)=>`${t}`,ce={},ct=[];function cn({data:e,columns:t,cellConfigs:n,density:i="standard",defaultColumnWidth:r=uz,defaultColumnHeight:o="auto",checkboxSelection:a,onRowSelectionChange:s,onSortingChange:l,getCheckboxColor:u,getRowId:c=u7,rowSelection:h=ce,sorting:d=ct,pagination:p,onPaginationChange:f,rowSelectionVariant:g="standard",...m}){let v=(0,rS.Z)(),y=(0,eV.useCallback)((e,t,n)=>{"standard"===g||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():s?.({[t.id]:!0})},[s,g]),x=(0,eV.useCallback)((e,t,n)=>{let i=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;y(t,n,!!i?.metaKey||!!i?.shiftKey)},[y]),b=(0,eV.useMemo)(()=>({id:"checkboxRowSelect",size:28,header:({table:e})=>(0,ez.jsx)(u9,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),color:v.palette.text.primary,density:i}),cell:({row:e,table:t})=>(0,ez.jsx)(u9,{checked:e.getIsSelected(),indeterminate:e.getIsSomeSelected(),onChange:n=>{x(n,t,e)},color:u?.(e.original),density:i}),enableSorting:!1}),[v.palette.text.primary,i,u,x]),w=function(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=eV.useState(()=>({current:function(e){var t,n;let i=[...l8,...null!=(t=e._features)?t:[]],r={_features:i},o=r._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(r)),{}),a=e=>r.options.mergeOptions?r.options.mergeOptions(o,e):{...o,...e},s={...null!=(n=e.initialState)?n:{}};r._features.forEach(e=>{var t;s=null!=(t=null==e.getInitialState?void 0:e.getInitialState(s))?t:s});let l=[],u=!1,c={_features:i,options:{...o,...e},initialState:s,_queue:e=>{l.push(e),u||(u=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();u=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{r.setState(r.initialState)},setOptions:e=>{let t=lw(e,r.options);r.options=a(t)},getState:()=>r.options.state,setState:e=>{null==r.options.onStateChange||r.options.onStateChange(e)},_getRowId:(e,t,n)=>{var i;return null!=(i=null==r.options.getRowId?void 0:r.options.getRowId(e,t,n))?i:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?r.getPrePaginationRowModel():r.getRowModel()).rowsById[e];if(!n&&!(n=r.getCoreRowModel().rowsById[e]))throw Error();return n},_getDefaultColumnDef:lC(()=>[r.options.defaultColumn],e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null},...r._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},lM(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:lC(()=>[r._getColumnDefs()],e=>{let t=function(e,n,i){return void 0===i&&(i=0),e.map(e=>{let o=function(e,t,n,i){var r,o;let a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=null!=(r=null!=(o=s.id)?o:l?"function"==typeof String.prototype.replaceAll?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)?r:"string"==typeof s.header?s.header:void 0;if(s.accessorFn?a=s.accessorFn:l&&(a=l.includes(".")?e=>{let t=e;for(let e of l.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[s.accessorKey]),!u)throw Error();let c={id:`${String(u)}`,accessorFn:a,parent:i,depth:n,columnDef:s,columns:[],getFlatColumns:lC(()=>[!0],()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},lM(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:lC(()=>[e._getOrderColumnsFn()],e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},lM(e.options,"debugColumns","column.getLeafColumns"))};for(let t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(r,e,i,n);return o.columns=e.columns?t(e.columns,o,i+1):[],o})};return t(e)},lM(e,"debugColumns","getAllColumns")),getAllFlatColumns:lC(()=>[r.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),lM(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:lC(()=>[r.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),lM(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:lC(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),lM(e,"debugColumns","getAllLeafColumns")),getColumn:e=>r._getAllFlatColumnsById()[e]};Object.assign(r,c);for(let e=0;e<r._features.length;e++){let t=r._features[e];null==t||null==t.createTable||t.createTable(r)}return r}(t)})),[i,r]=eV.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...i,...e.state},onStateChange:t=>{r(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:e,columns:(0,eV.useMemo)(()=>{let e=uj(t);return a&&e.unshift(b),e},[b,a,t]),getRowId:c,getCoreRowModel:e=>lC(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},i=function(t,r,o){void 0===r&&(r=0);let a=[];for(let l=0;l<t.length;l++){let u=lI(e,e._getRowId(t[l],l,o),t[l],l,r,void 0,null==o?void 0:o.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var s;u.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=u.originalSubRows)&&s.length&&(u.subRows=i(u.originalSubRows,r+1,u))}}return a};return n.rows=i(t),n},lM(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>lC(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(null!=t&&t.length))return n;let i=e.getState().sorting,r=[],o=i.filter(t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()}),a={};o.forEach(t=>{let n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})});let s=e=>{let t=e.map(e=>({...e}));return t.sort((e,t)=>{for(let i=0;i<o.length;i+=1){var n;let r=o[i],s=a[r.id],l=s.sortUndefined,u=null!=(n=null==r?void 0:r.desc)&&n,c=0;if(l){let n=e.getValue(r.id),i=t.getValue(r.id),o=void 0===n,a=void 0===i;if(o||a){if("first"===l)return o?-1:1;if("last"===l)return o?1:-1;c=o&&a?0:o?l:-l}}if(0===c&&(c=s.sortingFn(e,t,r.id)),0!==c)return u&&(c*=-1),s.invertSorting&&(c*=-1),c}return e.index-t.index}),t.forEach(e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))}),t};return{rows:s(n.rows),flatRows:r,rowsById:n.rowsById}},lM(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:p?e=>lC(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(t,n)=>{let i;if(!n.rows.length)return n;let{pageSize:r,pageIndex:o}=t,{rows:a,flatRows:s,rowsById:l}=n,u=r*o;a=a.slice(u,u+r),(i=e.options.paginateExpandedRows?{rows:a,flatRows:s,rowsById:l}:function(e){let t=[],n=e=>{var i;t.push(e),null!=(i=e.subRows)&&i.length&&e.getIsExpanded()&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}({rows:a,flatRows:s,rowsById:l})).flatRows=[];let c=e=>{i.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return i.rows.forEach(c),i},lM(e.options,"debugTable","getPaginationRowModel")):void 0,manualPagination:!p,enableRowSelection:!!a,onRowSelectionChange:e=>{let t="function"==typeof e?e(h):e;s?.(t)},onSortingChange:e=>{let t="function"==typeof e?e(d):e;l?.(t)},sortDescFirst:!0,state:{rowSelection:h,sorting:d,...p?{pagination:p}:{}}}),S=(0,eV.useCallback)((e,t)=>{let n=w.getRow(t);y(w,n,e.metaKey||e.shiftKey)},[y,w]);return(0,ez.jsx)(u8,{...m,density:i,defaultColumnWidth:r,defaultColumnHeight:o,onRowClick:S,rows:w.getRowModel().rows,columns:w.getAllFlatColumns(),headers:w.getHeaderGroups(),cellConfigs:n,pagination:p,onPaginationChange:f,rowCount:w.getRowCount()})}let ci=[{accessorKey:"label",header:"Name",enableSorting:!0,cell:({getValue:e})=>(0,ez.jsx)("span",{title:e(),children:e()})}],cr=e=>e.id,co=e=>e.color;function ca({items:e,selectedItems:t,onSelectedItemsChange:n,onItemMouseOver:i,onItemMouseOut:r,height:o,width:a,columns:s=[],sorting:l,onSortingChange:u}){let c=(0,eV.useMemo)(()=>"string"!=typeof t?t:e.reduce((e,t,n)=>(e[cr(t,n)]=!0,e),{}),[t,e]),h=(0,eV.useMemo)(()=>[...ci,...s],[s]);return(0,ez.jsx)(cn,{height:o,width:a,rowSelection:c,onRowSelectionChange:n,onRowMouseOver:i,onRowMouseOut:r,sorting:l,onSortingChange:u,data:e,columns:h,density:"compact",defaultColumnWidth:"auto",getRowId:cr,getCheckboxColor:co,checkboxSelection:!0,rowSelectionVariant:"legend"})}function cs({width:e,height:t,options:n,data:i,selectedItems:r,onSelectedItemsChange:o,onItemMouseOver:a,onItemMouseOut:s,tableProps:l}){let u;let c=(e,t)=>{let n=e.metaKey||e.shiftKey;o(oi(r,e=>{if("ALL"===e)return{[t]:!0};let i=!!e[t];return n?(i?delete e[t]:e[t]=!0,e):i?"ALL":{[t]:!0}}))},h=rT(n.mode),d=i.length>=500,p={height:t,items:i,selectedItems:r,onLegendItemClick:c,onItemMouseOver:a,onItemMouseOut:s};return(u="table"===h?(0,ez.jsx)(ca,{...p,onSelectedItemsChange:o,width:e,...l}):"right"===n.position||d?(0,ez.jsx)(lx,{...p,width:e,onLegendItemClick:c}):(0,ez.jsx)(lb,{...p,onLegendItemClick:c}),"right"===n.position)?(0,ez.jsx)(r_.Z,{style:{width:e,height:t},sx:{position:"absolute",top:0,right:0},children:u}):(0,ez.jsx)(r_.Z,{style:{width:e,height:t},sx:{position:"absolute",bottom:0},children:u})}let cl={medium:{bottom:6,right:250},small:{bottom:4,right:150}};function cu({children:e,legendProps:t,width:n,height:i,spacing:r=0,legendSize:o,minChildrenWidth:a=100,minChildrenHeight:s=100}){let{content:l,legend:u,margin:c}=function({width:e,height:t,legendProps:n,legendSize:i,minChildrenHeight:r,minChildrenWidth:o,spacing:a,theme:s}){let l,u;let c=n?.options,h={legend:{show:!1,width:0,height:0},content:{width:e,height:t},margin:{right:0,bottom:0}};if(!c)return h;let{position:d}=c;if("list"===rT(c.mode))l="right"===d?200:e,u=40,"right"===d?u=t:t>=300&&(u=100);else{let r=uZ(s,"compact"),o=(n?.tableProps?.columns||[]).reduce((e,t)=>("number"==typeof t.width&&(e+=t.width),e),0);l="right"===d?cl[i].right+o:e;let a=Math.min(cl[i].bottom,n.data.length+1);u="bottom"===d?a*r.height:t}let p="right"===d?e-l-a:e,f="bottom"===d?t-u-a:t;return"right"===d&&p<o||"bottom"===d&&f<r?h:{legend:{width:l,height:u,show:!0},content:{width:p,height:f},margin:{right:"right"===d?a:0,bottom:"bottom"===d?a:0}}}({width:n,height:i,legendProps:t,minChildrenHeight:s,minChildrenWidth:a,spacing:r,theme:(0,rS.Z)(),legendSize:o&&rM.includes(o)?o:rk.size});return(0,ez.jsxs)(r_.Z,{style:{width:n,height:i},sx:{position:"relative",overflow:"hidden"},children:[(0,ez.jsx)(r_.Z,{style:{width:l.width,height:l.height},sx:{marginRight:`${c.right}px`,marginBottom:`${c.bottom}px`,overflow:"hidden"},children:"function"==typeof e?e({width:l.width,height:l.height}):e}),t&&u.show&&(0,ez.jsx)(cs,{...t,height:u.height,width:u.width})]})}var cc=n(6726),ch=n.n(cc);let cd=(0,eV.forwardRef)(function({debounceMs:e=250,value:t,onChange:n,...i},r){let[o,a]=(0,eV.useState)(t),s=(0,eV.useCallback)(e=>{n?.(e)},[n]),l=(0,eV.useMemo)(()=>ch()(s,e),[e,s]);return(0,ez.jsx)(tp.Z,{ref:r,value:o,onChange:function(e){a(e.target.value),l(e.target.value)},...i})});function cp(e){return(0,eQ.ZP)("MuiDialogTitle",e)}cd.displayName="TextField";let cf=(0,eK.Z)("MuiDialogTitle",["root"]),cg=eV.createContext({}),cm=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},cp,t)},cv=(0,eU.ZP)(uD.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),cy=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiDialogTitle"}),{className:i,id:r,...o}=n,a=cm(n),{titleId:s=r}=eV.useContext(cg);return(0,ez.jsx)(cv,{component:"h2",className:(0,ej.Z)(a.root,i),ownerState:n,ref:t,variant:"h6",id:r??s,...o})});function cx(e){return(0,eQ.ZP)("MuiDialogContent",e)}(0,eK.Z)("MuiDialogContent",["root","dividers"]);let cb=e=>{let{classes:t,dividers:n}=e;return(0,eH.Z)({root:["root",n&&"dividers"]},cx,t)},cw=(0,eU.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,eq.Z)(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${cf.root} + &`]:{paddingTop:0}}}]}))),cS=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiDialogContent"}),{className:i,dividers:r=!1,...o}=n,a={...n,dividers:r},s=cb(a);return(0,ez.jsx)(cw,{className:(0,ej.Z)(s.root,i),ownerState:a,ref:t,...o})});var c_=n(5056),cC=n(58),cM=n(9761),ck=n(8866);function cT(e){return(0,eQ.ZP)("MuiDialog",e)}let cD=(0,eK.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var cI=n(9090);let cA=(0,eU.ZP)(cI.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),cP=e=>{let{classes:t,scroll:n,maxWidth:i,fullWidth:r,fullScreen:o}=e,a={root:["root"],container:["container",`scroll${(0,eG.Z)(n)}`],paper:["paper",`paperScroll${(0,eG.Z)(n)}`,`paperWidth${(0,eG.Z)(String(i))}`,r&&"paperFullWidth",o&&"paperFullScreen"]};return(0,eH.Z)(a,cT,t)},cO=(0,eU.ZP)(cC.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),cR=(0,eU.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${(0,eG.Z)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),cE=(0,eU.ZP)(ck.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,eG.Z)(n.scroll)}`],t[`paperWidth${(0,eG.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,eq.Z)(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${cD.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${cD.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${cD.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),cL=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiDialog"}),i=(0,rS.Z)(),r={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,"aria-modal":s=!0,BackdropComponent:l,BackdropProps:u,children:c,className:h,disableEscapeKeyDown:d=!1,fullScreen:p=!1,fullWidth:f=!1,maxWidth:g="sm",onBackdropClick:m,onClick:v,onClose:y,open:x,PaperComponent:b=ck.Z,PaperProps:w={},scroll:S="paper",slots:_={},slotProps:C={},TransitionComponent:M=cM.Z,transitionDuration:k=r,TransitionProps:T,...D}=n,I={...n,disableEscapeKeyDown:d,fullScreen:p,fullWidth:f,maxWidth:g,scroll:S},A=cP(I),P=eV.useRef(),O=(0,c_.Z)(a),R=eV.useMemo(()=>({titleId:O}),[O]),E={slots:{transition:M,..._},slotProps:{transition:T,paper:w,backdrop:u,...C}},[L,B]=(0,uR.Z)("root",{elementType:cO,shouldForwardComponentProp:!0,externalForwardedProps:E,ownerState:I,className:(0,ej.Z)(A.root,h),ref:t}),[N,F]=(0,uR.Z)("backdrop",{elementType:cA,shouldForwardComponentProp:!0,externalForwardedProps:E,ownerState:I}),[z,V]=(0,uR.Z)("paper",{elementType:cE,shouldForwardComponentProp:!0,externalForwardedProps:E,ownerState:I,className:(0,ej.Z)(A.paper,w.className)}),[Z,j]=(0,uR.Z)("container",{elementType:cR,externalForwardedProps:E,ownerState:I,className:(0,ej.Z)(A.container)}),[H,W]=(0,uR.Z)("transition",{elementType:cM.Z,externalForwardedProps:E,ownerState:I,additionalProps:{appear:!0,in:x,timeout:k,role:"presentation"}});return(0,ez.jsx)(L,{closeAfterTransition:!0,slots:{backdrop:N},slotProps:{backdrop:{transitionDuration:k,as:l,...F}},disableEscapeKeyDown:d,onClose:y,open:x,onClick:e=>{v&&v(e),P.current&&(P.current=null,m&&m(e),y&&y(e,"backdropClick"))},...B,...D,children:(0,ez.jsx)(H,{...W,children:(0,ez.jsx)(Z,{onMouseDown:e=>{P.current=e.target===e.currentTarget},...j,children:(0,ez.jsx)(z,{as:b,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":O,"aria-modal":s,...V,children:(0,ez.jsx)(cg.Provider,{value:R,children:c})})})})})});function cB(e){return(0,eQ.ZP)("MuiDialogActions",e)}(0,eK.Z)("MuiDialogActions",["root","spacing"]);let cN=e=>{let{classes:t,disableSpacing:n}=e;return(0,eH.Z)({root:["root",!n&&"spacing"]},cB,t)},cF=(0,eU.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),cz=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:r=!1,...o}=n,a={...n,disableSpacing:r},s=cN(a);return(0,ez.jsx)(cF,{className:(0,ej.Z)(s.root,i),ownerState:a,ref:t,...o})});var cV=n(763);let cZ=(0,eU.ZP)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),cj=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),cH=({children:e,...t})=>(0,ez.jsx)(cL,{...t,children:e});cH.Header=({children:e,onClose:t,...n})=>(0,ez.jsxs)(ez.Fragment,{children:[(0,ez.jsx)(cy,{style:{textOverflow:"ellipsis",overflow:"hidden"},...n,children:e}),t&&(0,ez.jsx)(td.Z,{"aria-label":"Close",onClick:t,sx:cj,children:(0,ez.jsx)(cV.default,{})})]}),cH.Form=cZ,cH.Content=({children:e,sx:t,...n})=>(0,ez.jsx)(cS,{dividers:!0,...n,sx:ru({minWidth:"500px",textWrap:"balance"},t),children:e}),cH.PrimaryButton=({children:e,...t})=>(0,ez.jsx)(e8.Z,{variant:"contained",type:"submit",...t,children:e}),cH.SecondaryButton=({children:e,...t})=>(0,ez.jsx)(e8.Z,{variant:"outlined",color:"secondary",...t,children:e}),cH.Actions=cz;let cW=e=>{let{description:t,isOpen:n,onCancel:i,onDiscardChanges:r}=e;return(0,ez.jsxs)(cH,{open:n,"aria-labelledby":"discard-dialog",children:[(0,ez.jsx)(cH.Header,{children:"Discard Changes"}),(0,ez.jsx)(cH.Content,{children:t}),(0,ez.jsxs)(cH.Actions,{children:[(0,ez.jsx)(e8.Z,{variant:"contained",onClick:r,children:"Discard Changes"}),(0,ez.jsx)(e8.Z,{variant:"outlined",color:"secondary",onClick:i,children:"Cancel"})]})]})},c$=eV.createContext();function cG(e){return(0,eQ.ZP)("MuiGrid",e)}let cU=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],cq=(0,eK.Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...cU.map(e=>`grid-xs-${e}`),...cU.map(e=>`grid-sm-${e}`),...cU.map(e=>`grid-md-${e}`),...cU.map(e=>`grid-lg-${e}`),...cU.map(e=>`grid-xl-${e}`)]);function cY({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(e=>{""===n&&0!==t[e]&&(n=e)});let i=Object.keys(e).sort((t,n)=>e[t]-e[n]);return i.slice(0,i.indexOf(n))}let cX=(0,eU.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e,{container:i,direction:r,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n,c=[];i&&(c=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];let i=[];return t.forEach(t=>{let r=e[t];Number(r)>0&&i.push(n[`spacing-${t}-${String(r)}`])}),i}(a,u,t));let h=[];return u.forEach(e=>{let i=n[e];i&&h.push(t[`grid-${e}-${String(i)}`])}),[t.root,i&&t.container,o&&t.item,l&&t.zeroMinWidth,...c,"row"!==r&&t[`direction-xs-${String(r)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...h]}})(({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},..."wrap"!==e.wrap&&{flexWrap:e.wrap}}),function({theme:e,ownerState:t}){let n=(0,ti.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,ti.k9)({theme:e},n,e=>{let t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${cq.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){let{container:n,rowSpacing:i}=t,r={};if(n&&0!==i){let t;let n=(0,ti.P$)({values:i,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=cY({breakpoints:e.breakpoints.values,values:n})),r=(0,ti.k9)({theme:e},n,(n,i)=>{let r=e.spacing(n);return"0px"!==r?{marginTop:`calc(-1 * ${r})`,[`& > .${cq.item}`]:{paddingTop:r}}:t?.includes(i)?{}:{marginTop:0,[`& > .${cq.item}`]:{paddingTop:0}}})}return r},function({theme:e,ownerState:t}){let{container:n,columnSpacing:i}=t,r={};if(n&&0!==i){let t;let n=(0,ti.P$)({values:i,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=cY({breakpoints:e.breakpoints.values,values:n})),r=(0,ti.k9)({theme:e},n,(n,i)=>{let r=e.spacing(n);if("0px"!==r){let e=`calc(-1 * ${r})`;return{width:`calc(100% + ${r})`,marginLeft:e,[`& > .${cq.item}`]:{paddingLeft:r}}}return t?.includes(i)?{}:{width:"100%",marginLeft:0,[`& > .${cq.item}`]:{paddingLeft:0}}})}return r},function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((i,r)=>{let o={};if(t[r]&&(n=t[r]),!n)return i;if(!0===n)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{let a=(0,ti.P$)({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[r]:a;if(null==s)return i;let l=`${Math.round(n/s*1e8)/1e6}%`,u={};if(t.container&&t.item&&0!==t.columnSpacing){let n=e.spacing(t.columnSpacing);if("0px"!==n){let e=`calc(${l} + ${n})`;u={flexBasis:e,maxWidth:e}}}o={flexBasis:l,flexGrow:0,maxWidth:l,...u}}return 0===e.breakpoints.values[r]?Object.assign(i,o):i[e.breakpoints.up(r)]=o,i},{})}),cK=e=>{let{classes:t,container:n,direction:i,item:r,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e,u=[];n&&(u=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];let n=[];return t.forEach(t=>{let i=e[t];if(Number(i)>0){let e=`spacing-${t}-${String(i)}`;n.push(e)}}),n}(o,l));let c=[];l.forEach(t=>{let n=e[t];n&&c.push(`grid-${t}-${String(n)}`)});let h={root:["root",n&&"container",r&&"item",s&&"zeroMinWidth",...u,"row"!==i&&`direction-xs-${String(i)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...c]};return(0,eH.Z)(h,cG,t)},cQ=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiGrid"}),{breakpoints:i}=(0,rS.Z)(),r=(0,tt.Z)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:u=!1,direction:c="row",item:h=!1,rowSpacing:d,spacing:p=0,wrap:f="wrap",zeroMinWidth:g=!1,...m}=r,v=eV.useContext(c$),y=u?a||12:v,x={},b={...m};i.keys.forEach(e=>{null!=m[e]&&(x[e]=m[e],delete b[e])});let w={...r,columns:y,container:u,direction:c,item:h,rowSpacing:d||p,columnSpacing:s||p,wrap:f,zeroMinWidth:g,spacing:p,...x,breakpoints:i.keys},S=cK(w);return(0,ez.jsx)(c$.Provider,{value:y,children:(0,ez.jsx)(cX,{ownerState:w,className:(0,ej.Z)(S.root,o),as:l,ref:t,...b})})}),cJ=({children:e})=>(0,ez.jsx)(cQ,{item:!0,xs:4,children:(0,ez.jsx)(th,{spacing:3,children:e})});var c0=n(192),c1=n(3626),c2=n(9398),c5=n(2964),c3=n(7143);let c4=({id:e,title:t,description:n,placement:i,children:r,enterDelay:o,enterNextDelay:a})=>{let s=(0,ez.jsx)("span",{children:r});return(0,ez.jsx)(c6,{arrow:!0,id:e,placement:i??"top",title:(0,ez.jsx)(c8,{title:t,description:n}),enterDelay:o??500,enterNextDelay:a??500,children:s})},c8=({title:e,description:t})=>(0,ez.jsxs)(ez.Fragment,{children:[e&&(0,ez.jsx)(uD.Z,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:e}),(0,ez.jsx)(uD.Z,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:t})]}),c6=(0,eU.ZP)(({className:e,...t})=>(0,ez.jsx)(c5.Z,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${c3.Z.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${c3.Z.arrow}`]:{color:e.palette.background.tooltip}})),c9=({label:e,control:t,description:n})=>{let i=rc("EditorSectionControl"),r=`${i}-control`;return(0,ez.jsx)(c0.Z,{children:(0,ez.jsxs)(th,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,ez.jsxs)(th,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,ez.jsx)(c1.Z,{htmlFor:r,children:e}),n&&(0,ez.jsx)(c4,{description:n,enterDelay:100,children:(0,ez.jsx)(td.Z,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,ez.jsx)(c2.default,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,ez.jsxs)(r_.Z,{sx:{width:"180px",textAlign:"right"},children:[" ",eZ().cloneElement(t,{id:r})]})]})})},c7=({children:e})=>(0,ez.jsx)(cQ,{container:!0,spacing:8,children:e}),he=({title:e,children:t,icon:n})=>(0,ez.jsxs)(r_.Z,{children:[(0,ez.jsxs)(r_.Z,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,ez.jsx)(uD.Z,{variant:"overline",component:"h4",children:e}),n&&(0,ez.jsx)(r_.Z,{sx:{marginLeft:"auto"},children:n})]}),(0,ez.jsx)(th,{spacing:1,children:t})]});var ht=n(1774),hn=n(678);function hi({options:e,renderInput:t=e=>(0,ez.jsx)(tp.Z,{...e}),...n}){let i=e=>e.label??e.id;return(0,ez.jsx)(ht.Z,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:i,options:e,renderInput:t,renderOption:({key:e,...t},n)=>(0,ez.jsx)("li",{...t,children:(0,ez.jsxs)("div",{children:[(0,ez.jsx)(uD.Z,{variant:"body1",component:"div",children:i(n)}),n.description&&(0,ez.jsx)(uD.Z,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:n.description})]})},e),filterOptions:(0,hn.D)({stringify:e=>`${i(e)} ${e.description||""}`}),...n})}let hr=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function ho({onChange:e,value:t="standard"}){return(0,ez.jsx)(c9,{label:"Density",control:(0,ez.jsx)(hi,{value:hr.find(e=>e.id===t),options:hr,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function ha(){return(0,ez.jsxs)(th,{direction:"row",alignItems:"center",children:[(0,ez.jsx)(r_.Z,{sx:{content:'""',width:8,height:8,boxSizing:"border-box",position:"absolute",backgroundColor:e=>e.palette.background.default,border:e=>`2px solid ${e.palette.info.main}`,borderRadius:"50%"}}),(0,ez.jsx)(r_.Z,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}function hs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function hl(e,t){if(e){if("string"==typeof e)return hs(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hs(e,t):void 0}}function hu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){u=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}(e,t)||hl(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var hc=n(501),hh="data-pdnd-honey-pot";function hd(e){return e instanceof Element&&e.hasAttribute(hh)}function hp(e){var t=hu(document.elementsFromPoint(e.x,e.y),2),n=t[0],i=t[1];return n?hd(n)?null!=i?i:null:n:null}var hf=n(1510);function hg(e,t,n){return(t=(0,hf.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function hv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hm(Object(n),!0).forEach(function(t){hg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hy(e){var t,n,i,r,o={x:Math.min((r={x:Math.max((i={x:(n={x:Math.floor((t=e.client).x),y:Math.floor(t.y)}).x-1,y:n.y-1}).x,0),y:Math.max(i.y,0)}).x,window.innerWidth-2),y:Math.min(r.y,window.innerHeight-2)};return DOMRect.fromRect({x:o.x,y:o.y,width:2,height:2})}function hx(e){var t=e.clientRect;return{left:"".concat(t.left,"px"),top:"".concat(t.top,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")}}function hb(e){return function(e){if(Array.isArray(e))return hs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hl(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hw(e){var t=null;return function(){if(!t){for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];t={result:e.apply(this,i)}}return t.result}}var hS=hw(function(){return navigator.userAgent.includes("Firefox")}),h_=hw(function(){var e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}),hC={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function hM(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}!function(){if("undefined"!=typeof window){if(h_()){var e=t();(0,hc.bindAll)(window,[{type:"dragstart",listener:function(){e.enterCount=0,e.isOverWindow=!0}},{type:"drop",listener:n},{type:"dragend",listener:n},{type:"dragenter",listener:function(t){e.isOverWindow||0!==e.enterCount||(t[hC.isEnteringWindow]=!0),e.isOverWindow=!0,e.enterCount++}},{type:"dragleave",listener:function(t){e.enterCount--,e.isOverWindow&&0===e.enterCount&&(t[hC.isLeavingWindow]=!0,e.isOverWindow=!1)}}],{capture:!0})}}function t(){return{enterCount:0,isOverWindow:!1}}function n(){e=t()}}();var hk=(g=function(e){return e()},m=[],v=null,(y=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];m=t,!v&&(v=requestAnimationFrame(function(){v=null,g.apply(void 0,m)}))}).cancel=function(){v&&(cancelAnimationFrame(v),v=null)},y),hT=(x=null,{schedule:function(e){x={frameId:requestAnimationFrame(function(){x=null,e()}),fn:e}},flush:function(){x&&(cancelAnimationFrame(x.frameId),x.fn(),x=null)}}),hD={isActive:!1};function hI(){return!hD.isActive}function hA(e){var t,n=e.event,i=null===(t=e.current[0])||void 0===t?void 0:t.dropEffect;null!=i&&n.dataTransfer&&(n.dataTransfer.dropEffect=i)}var hP=function(e){var t,n,i=e.event,r=e.dragType,o=e.getDropTargetsOver,a=e.dispatchEvent;if(hI()){var s=function(e){var t=e.event,n=e.dragType,i=e.getDropTargetsOver,r=hM(t);if("external"===n.startedFrom)return{input:r,dropTargets:[]};var o=i({input:r,source:n.payload,target:t.target,current:[]});return{input:r,dropTargets:o}}({event:i,dragType:r,getDropTargetsOver:o});hD.isActive=!0;var l={current:s};hA({event:i,current:s.dropTargets});var u=function(e){var t=e.source,n=e.initial,i=e.dispatchEvent,r={dropTargets:[]};function o(e){i(e),r={dropTargets:e.payload.location.current.dropTargets}}return{start:function(e){var i=e.nativeSetDragImage,a={current:n,previous:r,initial:n};o({eventName:"onGenerateDragPreview",payload:{source:t,location:a,nativeSetDragImage:i}}),hT.schedule(function(){o({eventName:"onDragStart",payload:{source:t,location:a}})})},dragUpdate:function(e){var i=e.current;hT.flush(),hk.cancel(),o({eventName:"onDropTargetChange",payload:{source:t,location:{initial:n,previous:r,current:i}}})},drag:function(e){var i=e.current;hk(function(){hT.flush(),o({eventName:"onDrag",payload:{source:t,location:{initial:n,previous:r,current:i}}})})},drop:function(e){var i=e.current,a=e.updatedSourcePayload;hT.flush(),hk.cancel(),o({eventName:"onDrop",payload:{source:null!=a?a:t,location:{current:i,previous:r,initial:n}}})}}}({source:r.payload,dispatchEvent:a,initial:s}),c=(0,hc.bindAll)(window,[{type:"dragover",listener:function(e){d(e),u.drag({current:l.current})}},{type:"dragenter",listener:d},{type:"dragleave",listener:function(e){(function(e){var t=e.dragLeave,n=t.type,i=t.relatedTarget;return"dragleave"===n&&(h_()?!!h_()&&t.hasOwnProperty(hC.isLeavingWindow):null==i||(hS()?"nodeName"in i&&i.ownerDocument!==document:i instanceof HTMLIFrameElement))})({dragLeave:e})&&(h({input:l.current.input,dropTargets:[]}),"external"===r.startedFrom&&p())}},{type:"drop",listener:function(e){if(l.current={dropTargets:l.current.dropTargets,input:hM(e)},!l.current.dropTargets.length){p();return}e.preventDefault(),hA({event:e,current:l.current.dropTargets}),u.drop({current:l.current,updatedSourcePayload:"external"===r.type?r.getDropPayload(e):null}),f()}},{type:"dragend",listener:function(e){l.current={dropTargets:l.current.dropTargets,input:hM(e)},p()}}].concat(hb([{type:"pointermove",listener:(n=0,function(){if(n<20){n++;return}t()})},{type:"pointerdown",listener:t=p}])),{capture:!0});u.start({nativeSetDragImage:i.dataTransfer?i.dataTransfer.setDragImage.bind(i.dataTransfer):null})}function h(e){var t=function(e){var t=e.current,n=e.next;if(t.length!==n.length)return!0;for(var i=0;i<t.length;i++)if(t[i].element!==n[i].element)return!0;return!1}({current:l.current.dropTargets,next:e.dropTargets});l.current=e,t&&u.dragUpdate({current:l.current})}function d(e){var t=hM(e),n=o({target:hd(e.target)?hp({x:t.clientX,y:t.clientY}):e.target,input:t,source:r.payload,current:l.current.dropTargets});n.length&&(e.preventDefault(),hA({event:e,current:n})),h({dropTargets:n,input:t})}function p(){l.current.dropTargets.length&&h({dropTargets:[],input:l.current.input}),u.drop({current:l.current,updatedSourcePayload:null}),f()}function f(){hD.isActive=!1,c()}},hO=new Map;function hR(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){t.forEach(function(e){return e()})}}function hE(e,t){var n=t.attribute,i=t.value;return e.setAttribute(n,i),function(){return e.removeAttribute(n)}}function hL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function hB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hL(Object(n),!0).forEach(function(t){hg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hN(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hF(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hF(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function hF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function hz(e){return e.slice(0).reverse()}function hV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function hZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var hj=hw(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),hH="text/plain",hW=new WeakMap,h$=(b=null,{bindEvents:function(){return b=null,(0,hc.bind)(window,{type:"pointermove",listener:function(e){b={x:e.clientX,y:e.clientY}},options:{capture:!0}})},getOnPostDispatch:function(){var e=null;return function(t){var n=t.eventName,i=t.payload;if("onDragStart"===n){var r,o,a,s,l,u=i.location.initial.input;r=({initial:null!==(l=b)&&void 0!==l?l:{x:u.clientX,y:u.clientY}}).initial,(o=document.createElement("div")).setAttribute(hh,"true"),a=hy({client:r}),Object.assign(o.style,hv(hv({backgroundColor:"transparent",position:"fixed",padding:0,margin:0,boxSizing:"border-box"},hx({clientRect:a})),{},{pointerEvents:"auto",zIndex:0x7fffffff})),document.body.appendChild(o),s=(0,hc.bind)(window,{type:"pointermove",listener:function(e){a=hy({client:{x:e.clientX,y:e.clientY}}),Object.assign(o.style,hx({clientRect:a}))},options:{capture:!0}}),e=function(e){var t,n,i,r=e.current;if(s(),n=(t={client:r,clientRect:a}).client,i=t.clientRect,n.x>=i.x&&n.x<=i.x+i.width&&n.y>=i.y&&n.y<=i.y+i.height){o.remove();return}function l(){u(),o.remove()}var u=(0,hc.bindAll)(window,[{type:"pointerdown",listener:l},{type:"pointermove",listener:l},{type:"focusin",listener:l},{type:"focusout",listener:l},{type:"dragstart",listener:l},{type:"dragenter",listener:l},{type:"dragover",listener:l}],{capture:!0})}}if("onDrop"===n){var c,h=i.location.current.input;null===(c=e)||void 0===c||c({current:{x:h.clientX,y:h.clientY}}),e=null,b=null}}}}),hG=function(e){var t=e.typeKey,n=e.mount,i=e.dispatchEventToSource,r=e.onPostDispatch,o=e.defaultDropEffect,a=function(){var e=new Set,t=null;function n(e){t&&(!e.canMonitor||e.canMonitor(t.canMonitorArgs))&&t.active.add(e)}return{dispatchEvent:function(i){var r=i.eventName,o=i.payload;if("onGenerateDragPreview"===r){t={canMonitorArgs:{initial:o.location.initial,source:o.source},active:new Set};var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return hV(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hV(e,t):void 0}}(e))){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e);try{for(s.s();!(a=s.n()).done;){var l=a.value;n(l)}}catch(e){s.e(e)}finally{s.f()}}if(t){for(var u=Array.from(t.active),c=0;c<u.length;c++){var h,d=u[c];t.active.has(d)&&(null===(h=d[r])||void 0===h||h.call(d,o))}"onDrop"===r&&(t.active.clear(),t=null)}},monitorForConsumers:function(i){var r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hZ(Object(n),!0).forEach(function(t){hg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},i);return e.add(r),n(r),function(){e.delete(r),t&&t.active.delete(r)}}}}(),s=function(e){var t=e.typeKey,n=e.defaultDropEffect,i=new WeakMap,r="data-drop-target-for-".concat(t),o="[".concat(r,"]");function a(e){var t,n=e.eventName,r=e.payload,o=hN(r.location.current.dropTargets);try{for(o.s();!(t=o.n()).done;){var a,s=t.value,l=i.get(s.element),u=hB(hB({},r),{},{self:s});null==l||null===(a=l[n])||void 0===a||a.call(l,u)}}catch(e){o.e(e)}finally{o.f()}}var s={onGenerateDragPreview:a,onDrag:a,onDragStart:a,onDrop:a,onDropTargetChange:function(e){var t,n=e.payload,r=new Set(n.location.current.dropTargets.map(function(e){return e.element})),o=new Set,a=hN(n.location.previous.dropTargets);try{for(a.s();!(t=a.n()).done;){var s,l,u=t.value;o.add(u.element);var c=i.get(u.element),h=r.has(u.element),d=hB(hB({},n),{},{self:u});null==c||null===(s=c.onDropTargetChange)||void 0===s||s.call(c,d),h||null==c||null===(l=c.onDragLeave)||void 0===l||l.call(c,d)}}catch(e){a.e(e)}finally{a.f()}var p,f=hN(n.location.current.dropTargets);try{for(f.s();!(p=f.n()).done;){var g,m,v=p.value;if(!o.has(v.element)){var y=hB(hB({},n),{},{self:v}),x=i.get(v.element);null==x||null===(g=x.onDropTargetChange)||void 0===g||g.call(x,y),null==x||null===(m=x.onDragEnter)||void 0===m||m.call(x,y)}}}catch(e){f.e(e)}finally{f.f()}}};return{dropTargetForConsumers:function(e){return hR(hE(e.element,{attribute:r,value:"true"}),(i.set(e.element,e),function(){return i.delete(e.element)}))},getIsOver:function(e){var t=e.source,r=e.target,a=e.input,s=e.current,l=function e(t){var r,a,s,l,u=t.source,c=t.target,h=t.input,d=t.result,p=void 0===d?[]:d;if(null==c)return p;if(!(c instanceof Element))return c instanceof Node?e({source:u,target:c.parentElement,input:h,result:p}):p;var f=c.closest(o);if(null==f)return p;var g=i.get(f);if(null==g)return p;var m={input:h,source:u,element:g.element};if(g.canDrop&&!g.canDrop(m))return e({source:u,target:g.element.parentElement,input:h,result:p});var v=null!==(r=null===(a=g.getData)||void 0===a?void 0:a.call(g,m))&&void 0!==r?r:{},y=null!==(s=null===(l=g.getDropEffect)||void 0===l?void 0:l.call(g,m))&&void 0!==s?s:n,x={data:v,element:g.element,dropEffect:y,isActiveDueToStickiness:!1};return e({source:u,target:g.element.parentElement,input:h,result:[].concat(hb(p),[x])})}({source:t,target:r,input:a});if(l.length>=s.length)return l;for(var u=hz(s),c=hz(l),h=[],d=0;d<u.length;d++){var p,f=u[d],g=c[d];if(null!=g){h.push(g);continue}var m=h[d-1],v=u[d-1];if((null==m?void 0:m.element)!==(null==v?void 0:v.element))break;var y=i.get(f.element);if(!y)break;var x={input:a,source:t,element:y.element};if(y.canDrop&&!y.canDrop(x)||!(null!==(p=y.getIsSticky)&&void 0!==p&&p.call(y,x)))break;h.push(hB(hB({},f),{},{isActiveDueToStickiness:!0}))}return hz(h)},dispatchEvent:function(e){s[e.eventName](e)}}}({typeKey:t,defaultDropEffect:o});function l(e){null==i||i(e),s.dispatchEvent(e),a.dispatchEvent(e),null==r||r(e)}function u(e){hP({event:e.event,dragType:e.dragType,getDropTargetsOver:s.getIsOver,dispatchEvent:l})}return{registerUsage:function(){var e,i;return i=function(e){var t=e.typeKey,n=e.mount,i=hO.get(t);if(i)return i.usageCount++,i;var r={typeKey:t,unmount:n(),usageCount:1};return hO.set(t,r),r}(e={typeKey:t,mount:function(){return n({canStart:hI,start:u})}}),function(){i.usageCount--,!(i.usageCount>0)&&(i.unmount(),hO.delete(e.typeKey))}},dropTarget:s.dropTargetForConsumers,monitor:a.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return hR(h$.bindEvents(),(0,hc.bind)(document,{type:"dragstart",listener:function(t){if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var n,i,r,o,a,s,l=t.target;if(!(l instanceof HTMLElement))return null;var u=hW.get(l);if(!u)return null;var c=hM(t),h={element:u.element,dragHandle:null!==(n=u.dragHandle)&&void 0!==n?n:null,input:c};if(u.canDrag&&!u.canDrag(h))return t.preventDefault(),null;if(u.dragHandle){var d=hp({x:c.clientX,y:c.clientY});if(!u.dragHandle.contains(d))return t.preventDefault(),null}var p=null!==(i=null===(r=u.getInitialDataForExternal)||void 0===r?void 0:r.call(u,h))&&void 0!==i?i:null;if(p)for(var f=0,g=Object.entries(p);f<g.length;f++){var m=hu(g[f],2),v=m[0],y=m[1];t.dataTransfer.setData(v,null!=y?y:"")}!hj()||t.dataTransfer.types.includes(hH)||t.dataTransfer.types.includes("text/uri-list")||t.dataTransfer.setData(hH,"pdnd:android-fallback"),t.dataTransfer.setData("application/vnd.pdnd","");var x={element:u.element,dragHandle:null!==(o=u.dragHandle)&&void 0!==o?o:null,data:null!==(a=null===(s=u.getInitialData)||void 0===s?void 0:s.call(u,h))&&void 0!==a?a:{}};e.start({event:t,dragType:{type:"element",payload:x,startedFrom:"internal"}})}}}))},dispatchEventToSource:function(e){var t,n,i=e.eventName,r=e.payload;null===(t=hW.get(r.source.element))||void 0===t||null===(n=t[i])||void 0===n||n.call(t,r)},onPostDispatch:h$.getOnPostDispatch()}),hU=hG.dropTarget,hq=hG.monitor;function hY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function hX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hY(Object(n),!0).forEach(function(t){hg(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var hK={top:function(e,t){return Math.abs(t.y-e.top)},right:function(e,t){return Math.abs(e.right-t.x)},bottom:function(e,t){return Math.abs(e.bottom-t.y)},left:function(e,t){return Math.abs(t.x-e.left)}},hQ=Symbol("closestEdge");function hJ(e){var t;return null!==(t=e[hQ])&&void 0!==t?t:null}let h0={type:"idle"};function h1({elements:e,accessKey:t,axis:n="vertical",onChange:i}){return(0,eV.useEffect)(()=>hq({onDrop({location:r,source:o}){var a,s;let l=r.current.dropTargets[0];if(!l)return;let u=o.data,c=l.data,h=e.findIndex(e=>e[t]===u[t]),d=e.findIndex(e=>e[t]===c[t]);!(d<0)&&!(h<0)&&i(function(e){var t=e.list,n=e.startIndex,i=e.finishIndex;if(-1===n||-1===i)return Array.from(t);var r=Array.from(t),o=hu(r.splice(n,1),1)[0];return r.splice(i,0,o),r}({list:(a={list:e,startIndex:h,indexOfTarget:d,closestEdgeOfTarget:hJ(c),axis:n}).list,startIndex:s=a.startIndex,finishIndex:function(e){var t=e.startIndex,n=e.closestEdgeOfTarget,i=e.indexOfTarget,r=e.axis;if(-1===t||-1===i||t===i)return t;if(null==n)return i;var o="vertical"===r&&"bottom"===n||"horizontal"===r&&"right"===n;return t<i?o?i:i-1:o?i+1:i}({closestEdgeOfTarget:a.closestEdgeOfTarget,startIndex:s,indexOfTarget:a.indexOfTarget,axis:a.axis})}))}}),[t,n,e,i])}function h2({children:e,data:t}){let n=(0,eV.useRef)(null),[i,r]=(0,eV.useState)(h0);return(0,eV.useEffect)(()=>{var e;let i=n.current;if(i)return hR((e={element:i,getInitialData:()=>t,onDragStart(){r({type:"is-dragging"})},onDrop(){r(h0)}},hR(hG.registerUsage(),(hW.set(e.element,e),function(){hW.delete(e.element)}),hE(e.element,{attribute:"draggable",value:"true"}))),hU({element:i,canDrop:({source:e})=>e.element!==i,getData:({input:e})=>{var n,r,o,a,s,l,u,c,h;return a=(n={element:i,input:e,allowedEdges:["top","bottom"]}).element,s=n.input,l=n.allowedEdges,u={x:s.clientX,y:s.clientY},c=a.getBoundingClientRect(),h=null!==(r=null===(o=l.map(function(e){return{edge:e,value:hK[e](c,u)}}).sort(function(e,t){return e.value-t.value})[0])||void 0===o?void 0:o.edge)&&void 0!==r?r:null,hX(hX({},t),{},hg({},hQ,h))},getIsSticky:()=>!0,onDragEnter({self:e}){r({type:"is-dragging-over",closestEdge:hJ(e.data)})},onDrag({self:e}){let t=hJ(e.data);r(e=>"is-dragging-over"===e.type&&e.closestEdge===t?e:{type:"is-dragging-over",closestEdge:t})},onDragLeave(){r(h0)},onDrop(){r(h0)}}))},[t]),(0,ez.jsxs)(th,{ref:n,spacing:1,style:{opacity:"is-dragging"===i.type?.5:"unset"},children:["is-dragging-over"===i.type&&"top"===i.closestEdge?(0,ez.jsx)(ha,{}):null,e,"is-dragging-over"===i.type&&"bottom"===i.closestEdge?(0,ez.jsx)(ha,{}):null]})}var h5=n(5549),h3=n(743),h4=n(1682);function h8(e,t){let n=t.indexOf(e);if(0===n)return t;let i=[...t];return i.splice(n,1),i.splice(n-1,0,e),i}function h6(e,t){let n=t.indexOf(e);if(n===t.length-1)return t;let i=[...t];return i.splice(n,1),i.splice(n+1,0,e),i}let h9=(0,eV.forwardRef)(function({onMoveUp:e,onMoveDown:t,onMoveLeft:n,onMoveRight:i,menuSx:r,...o},a){let[s,l]=(0,eV.useState)(null),u=!!s;function c(e){l(null),e?.()}return(0,ez.jsxs)(ez.Fragment,{children:[(0,ez.jsx)(td.Z,{...o,ref:a,"aria-label":"move","aria-haspopup":!0,"aria-expanded":u,size:"small",onClick:function(e){l(e.currentTarget)},children:(0,ez.jsx)(h4.default,{})}),(e||t||n||i)&&(0,ez.jsxs)(h5.Z,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:s,open:u,onClose:()=>c(void 0),sx:r,children:[e&&(0,ez.jsx)(h3.Z,{onClick:()=>c(e),children:"Move Up"}),t&&(0,ez.jsx)(h3.Z,{onClick:()=>c(t),children:"Move Down"}),n&&(0,ez.jsx)(h3.Z,{onClick:()=>c(n),children:"Move Left"}),i&&(0,ez.jsx)(h3.Z,{onClick:()=>c(i),children:"Move Right"}),i&&(0,ez.jsx)(h3.Z,{onClick:()=>c(i),children:"Move Right"})]})]})});var h7=n(6858),de=n(9267),dt=n(4105);let dn={...eV}.useSyncExternalStore;function di(e={}){let{themeId:t}=e;return function(e,n={}){let i=(0,dt.Z)();i&&t&&(i=i[t]||i);let r="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:a=r?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=(0,de.Z)({name:"MuiUseMediaQuery",props:n,theme:i}),u="function"==typeof e?e(i):e;return(void 0!==dn?function(e,t,n,i,r){let o=eV.useCallback(()=>t,[t]),a=eV.useMemo(()=>{if(r&&n)return()=>n(e).matches;if(null!==i){let{matches:t}=i(e);return()=>t}return o},[o,e,i,r,n]),[s,l]=eV.useMemo(()=>{if(null===n)return[o,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[o,n,e]);return dn(l,s,a)}:function(e,t,n,i,r){let[o,a]=eV.useState(()=>r&&n?n(e).matches:i?i(e).matches:t);return(0,h7.Z)(()=>{if(!n)return;let t=n(e),i=()=>{a(t.matches)};return i(),t.addEventListener("change",i),()=>{t.removeEventListener("change",i)}},[e,n]),o})(u=u.replace(/^@media( ?)/m,""),o,a,s,l)}}di();let dr=di({themeId:n(2994).Z});var da=n(6595),ds=n(1825),dl=n(4680),du=n(7999),dc=n(2777),dh=n(4255);function dd(e,t,n){let i=function(e,t,n){let i;let r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),a=(0,dh.Z)(t);if(t.fakeTransform)i=t.fakeTransform;else{let e=a.getComputedStyle(t);i=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(i&&"none"!==i&&"string"==typeof i){let e=i.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-r.left}px)`:`translateX(${a.innerWidth+s-r.left}px)`:"right"===e?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${a.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"==typeof n?n():n);i&&(t.style.webkitTransform=i,t.style.transform=i)}let dp=eV.forwardRef(function(e,t){let n=(0,rS.Z)(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,container:l,direction:u="down",easing:c=i,in:h,onEnter:d,onEntered:p,onEntering:f,onExit:g,onExited:m,onExiting:v,style:y,timeout:x=r,TransitionComponent:b=ds.ZP,...w}=e,S=eV.useRef(null),_=(0,ls.Z)((0,dl.Z)(s),S,t),C=e=>t=>{e&&(void 0===t?e(S.current):e(S.current,t))},M=C((e,t)=>{dd(u,e,l),(0,dc.n)(e),d&&d(e,t)}),k=C((e,t)=>{let i=(0,dc.C)({timeout:x,style:y,easing:c},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...i}),e.style.transition=n.transitions.create("transform",{...i}),e.style.webkitTransform="none",e.style.transform="none",f&&f(e,t)}),T=C(p),D=C(v),I=C(e=>{let t=(0,dc.C)({timeout:x,style:y,easing:c},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),dd(u,e,l),g&&g(e)}),A=C(e=>{e.style.webkitTransition="",e.style.transition="",m&&m(e)}),P=eV.useCallback(()=>{S.current&&dd(u,S.current,l)},[u,l]);return eV.useEffect(()=>{if(h||"down"===u||"right"===u)return;let e=(0,du.Z)(()=>{S.current&&dd(u,S.current,l)}),t=(0,dh.Z)(S.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[u,h,l]),eV.useEffect(()=>{h||P()},[h,P]),(0,ez.jsx)(b,{nodeRef:S,onEnter:M,onEntered:T,onEntering:k,onExit:I,onExited:A,onExiting:D,addEndListener:e=>{o&&o(S.current,e)},appear:a,in:h,timeout:x,...w,children:(e,{ownerState:t,...n})=>eV.cloneElement(s,{ref:_,style:{visibility:"exited"!==e||h?void 0:"hidden",...y,...s.props.style},...n})})});function df(e){return(0,eQ.ZP)("MuiDrawer",e)}(0,eK.Z)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var dg=n(7834);let dm=(e,t)=>{let{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},dv=e=>{let{classes:t,anchor:n,variant:i}=e,r={root:["root",`anchor${(0,eG.Z)(n)}`],docked:[("permanent"===i||"persistent"===i)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,eG.Z)(n)}`,"temporary"!==i&&`paperAnchorDocked${(0,eG.Z)(n)}`]};return(0,eH.Z)(r,df,t)},dy=(0,eU.ZP)(cC.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:dm})((0,eq.Z)(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),dx=(0,eU.ZP)("div",{shouldForwardProp:lr.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:dm})({flex:"0 0 auto"}),db=(0,eU.ZP)(ck.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,eG.Z)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,eG.Z)(n.anchor)}`]]}})((0,eq.Z)(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),dw={left:"right",right:"left",top:"down",bottom:"up"},dS=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiDrawer"}),i=(0,rS.Z)(),r=(0,da.V)(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:u,elevation:c=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:d,...p}={},onClose:f,open:g=!1,PaperProps:m={},SlideProps:v,TransitionComponent:y,transitionDuration:x=o,variant:b="temporary",slots:w={},slotProps:S={},..._}=n,C=eV.useRef(!1);eV.useEffect(()=>{C.current=!0},[]);let M=function({direction:e},t){return"rtl"===e&&["left","right"].includes(t)?dw[t]:t}({direction:r?"rtl":"ltr"},a),k={...n,anchor:a,elevation:c,open:g,variant:b,..._},T=dv(k),D={slots:{transition:y,...w},slotProps:{paper:m,transition:v,...S,backdrop:(0,dg.Z)(S.backdrop||{...s,...d},{transitionDuration:x})}},[I,A]=(0,uR.Z)("root",{ref:t,elementType:dy,className:(0,ej.Z)(T.root,T.modal,u),shouldForwardComponentProp:!0,ownerState:k,externalForwardedProps:{...D,..._,...p},additionalProps:{open:g,onClose:f,hideBackdrop:h,slots:{backdrop:D.slots.backdrop},slotProps:{backdrop:D.slotProps.backdrop}}}),[P,O]=(0,uR.Z)("paper",{elementType:db,shouldForwardComponentProp:!0,className:(0,ej.Z)(T.paper,m.className),ownerState:k,externalForwardedProps:D,additionalProps:{elevation:"temporary"===b?c:0,square:!0}}),[R,E]=(0,uR.Z)("docked",{elementType:dx,ref:t,className:(0,ej.Z)(T.root,T.docked,u),ownerState:k,externalForwardedProps:D,additionalProps:_}),[L,B]=(0,uR.Z)("transition",{elementType:dp,ownerState:k,externalForwardedProps:D,additionalProps:{in:g,direction:dw[M],timeout:x,appear:C.current}}),N=(0,ez.jsx)(P,{...O,children:l});if("permanent"===b)return(0,ez.jsx)(R,{...E,children:N});let F=(0,ez.jsx)(L,{...B,children:N});return"persistent"===b?(0,ez.jsx)(R,{...E,children:F}):(0,ez.jsx)(I,{...A,children:F})}),d_=({anchor:e="right",isOpen:t,onClose:n,PaperProps:i,children:r,...o})=>{let a=dr("(max-width:1080px)");return(0,ez.jsx)(dS,{...o,open:t,onClose:n,anchor:e,PaperProps:{...i,sx:ru({width:a?"100%":"1080px",overflow:"hidden"},i?.sx)},children:r})};var dC=function(e,t){return(dC=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 dM(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}dC(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var dk=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},dT=new function(){this.browser=new dk,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?(dT.wxa=!0,dT.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?dT.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(dT.node=!0,dT.svgSupported=!0):(a=navigator.userAgent,l=(s=dT).browser,u=a.match(/Firefox\/([\d.]+)/),c=a.match(/MSIE\s([\d.]+)/)||a.match(/Trident\/.+?rv:(([\d.]+))/),h=a.match(/Edge?\/([\d.]+)/),d=/micromessenger/i.test(a),u&&(l.firefox=!0,l.version=u[1]),c&&(l.ie=!0,l.version=c[1]),h&&(l.edge=!0,l.version=h[1],l.newEdge=+h[1].split(".")[0]>18),d&&(l.weChat=!0),s.svgSupported="undefined"!=typeof SVGRect,s.touchEventsSupported="ontouchstart"in window&&!l.ie&&!l.edge,s.pointerEventsSupported="onpointerdown"in window&&(l.edge||l.ie&&+l.version>=11),s.domSupported="undefined"!=typeof document,p=document.documentElement.style,s.transform3dSupported=(l.ie&&"transition"in p||l.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in p)&&!("OTransition"in p),s.transformSupported=s.transform3dSupported||l.ie&&+l.version>=9);var dD="12px sans-serif",dI=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"),dA={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!w){var n=dA.createCanvas();w=n&&n.getContext("2d")}if(w)return S!==t&&(S=w.font=t||dD),w.measureText(e);e=e||"",t=t||dD;var i=/(\d+)px/.exec(t),r=i&&+i[1]||12,o=0;if(t.indexOf("mono")>=0)o=r*e.length;else for(var a=0;a<e.length;a++){var s=dI[e[a]];o+=null==s?r:s*r}return{width:o}},loadImage:function(e,t,n){var i=new Image;return i.onload=t,i.onerror=n,i.src=e,i}},dP=dJ(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),dO=dJ(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),dR=Object.prototype.toString,dE=Array.prototype,dL=dE.forEach,dB=dE.filter,dN=dE.slice,dF=dE.map,dz=(function(){}).constructor,dV=dz?dz.prototype:null,dZ="__proto__",dj=2311;function dH(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function dW(e){if(null==e||"object"!=typeof e)return e;var t=e,n=dR.call(e);if("[object Array]"===n){if(!e[ph]){t=[];for(var i=0,r=e.length;i<r;i++)t[i]=dW(e[i])}}else if(dO[n]){if(!e[ph]){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(var i=0,r=e.length;i<r;i++)t[i]=e[i]}}}else{if(!dP[n]&&!e[ph]&&!pn(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==dZ&&(t[a]=dW(e[a]))}return t}function d$(e,t,n){if(!d7(t)||!d7(e))return n?dW(t):e;for(var i in t)if(t.hasOwnProperty(i)&&i!==dZ){var r=e[i],o=t[i];!(d7(o)&&d7(r))||d3(o)||d3(r)||pn(o)||pn(r)||pe(o)||pe(r)||o[ph]||r[ph]?!n&&i in e||(e[i]=dW(t[i])):d$(r,o,n)}return e}function dG(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==dZ&&(e[n]=t[n]);return e}function dU(e,t,n){for(var i=d1(t),r=0;r<i.length;r++){var o=i[r];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function dq(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 dY(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 dU(e,t,n)}function dX(e){return!!e&&"string"!=typeof e&&"number"==typeof e.length}function dK(e,t,n){if(e&&t){if(e.forEach&&e.forEach===dL)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 dQ(e,t,n){if(!e)return[];if(!t)return ps(e);if(e.map&&e.map===dF)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 dJ(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 d0(e,t,n){if(!e)return[];if(!t)return ps(e);if(e.filter&&e.filter===dB)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 d1(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}dA.createCanvas;var d2=dV&&d4(dV.bind)?dV.call.bind(dV.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(dN.call(arguments)))}};function d5(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(dN.call(arguments)))}}function d3(e){return Array.isArray?Array.isArray(e):"[object Array]"===dR.call(e)}function d4(e){return"function"==typeof e}function d8(e){return"string"==typeof e}function d6(e){return"[object String]"===dR.call(e)}function d9(e){return"number"==typeof e}function d7(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function pe(e){return!!dP[dR.call(e)]}function pt(e){return!!dO[dR.call(e)]}function pn(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function pi(e){return null!=e.colorStops}function pr(){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 po(e,t){return null!=e?e:t}function pa(e,t,n){return null!=e?e:null!=t?t:n}function ps(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return dN.apply(e,t)}function pl(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 pu(e,t){if(!e)throw Error(t)}function pc(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var ph="__ec_primitive__",pd=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 d1(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),pp="function"==typeof Map,pf=function(){function e(t){var n=d3(t);this.data=pp?new Map:new pd;var i=this;function r(e,t){n?i.set(e,t):i.set(t,e)}t instanceof e?t.each(r):t&&dK(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 pp?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function pg(e){return new pf(e)}function pm(e,t){var n;if(Object.create)n=Object.create(e);else{var i=function(){};i.prototype=e,n=new i}return t&&dG(n,t),n}function pv(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function py(e,t){return e.hasOwnProperty(t)}function px(){}var pb=180/Math.PI,pw=function(e,t){return(pw=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 pS(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}pw(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function p_(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function pC(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function pM(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function pk(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function pT(e,t){var n,i=Math.sqrt((n=t)[0]*n[0]+n[1]*n[1]);return 0===i?(e[0]=0,e[1]=0):(e[0]=t[0]/i,e[1]=t[1]/i),e}function pD(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var pI=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function pA(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 pP(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 pO(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function pR(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var pE=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},pL=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 pE(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 pE(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 pE(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new pE(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new pE(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new pE(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),pB=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}(),pN=Math.log(2);function pF(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)/pN);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,p=0;d<s;d++){var f=1<<d;!(f&r)&&(h+=(p%2?-1:1)*e[n][d]*pF(e,t-1,c,u,r|f,o),p++)}return o[a]=h,h}function pz(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=pF(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)*pF(n,7,+(0===a),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 pV="___zrEVENTSAVED",pZ=[];function pj(e,t,n,i,r){if(t.getBoundingClientRect&&dT.domSupported&&!pH(t)){var o=t[pV]||(t[pV]={}),a=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(),h=2*u,d=c.left,p=c.top;a.push(d,p),l=l&&o&&d===o[h]&&p===o[h+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&r?r:(t.srcCoords=a,t[i]=n?pz(s,a):pz(a,s))}(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=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),o,r);if(a)return a(e,n,i),!0}return!1}function pH(e){return"CANVAS"===e.nodeName.toUpperCase()}var pW=/([&<>"'])/g,p$={"&":"&","<":"<",">":">",'"':""","'":"'"};function pG(e){return null==e?"":(e+"").replace(pW,function(e,t){return p$[t]})}var pU=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,pq=[],pY=dT.browser.firefox&&39>+dT.browser.version.split(".")[0];function pX(e,t,n,i){return n=n||{},i?pK(e,t,n):pY&&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):pK(e,t,n),n}function pK(e,t,n){if(dT.domSupported&&e.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(pH(e)){var o=e.getBoundingClientRect();n.zrX=i-o.left,n.zrY=r-o.top;return}if(pj(pq,e,i,r)){n.zrX=pq[0],n.zrY=pq[1];return}}n.zrX=n.zrY=0}function pQ(e){return e||window.event}function pJ(e,t,n){if(null!=(t=pQ(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&&pX(e,r,t,n)}else{pX(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,i=e.deltaY;return null==n||null==i?t: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&&pU.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function p0(e,t,n,i){e.addEventListener(t,n,i)}var p1=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function p2(e){return 2===e.which||3===e.which}var p5=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=pX(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 p4)if(p4.hasOwnProperty(t)){var n=p4[t](this._track,e);if(n)return n}},e}();function p3(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var p4={pinch:function(e,t){var n=e.length;if(n){var i=(e[n-1]||{}).points,r=(e[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=p3(i)/p3(r);isFinite(o)||(o=1),t.pinchScale=o;var a=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=a[0],t.pinchY=a[1],{type:"pinch",target:e[0].target,event:t}}}}};function p8(){return[1,0,0,1,0,0]}function p6(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function p9(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 p7(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 fe(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),h=Math.cos(n);return e[0]=r*h+s*c,e[1]=-r*c+s*h,e[2]=o*h+l*c,e[3]=-o*c+h*l,e[4]=h*(a-i[0])+c*(u-i[1])+i[0],e[5]=h*(u-i[1])-c*(a-i[0])+i[1],e}function ft(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}let fn=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}();var fi=Math.min,fr=Math.max,fo=new fn,fa=new fn,fs=new fn,fl=new fn,fu=new fn,fc=new fn;let fh=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=fi(e.x,this.x),n=fi(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=fr(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=fr(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,n,i,r=e.width/this.width,o=e.height/this.height,a=p8();return p7(a,a,[-this.x,-this.y]),n=(t=[r,o])[0],i=t[1],a[0]=a[0]*n,a[1]=a[1]*i,a[2]=a[2]*n,a[3]=a[3]*i,a[4]=a[4]*n,a[5]=a[5]*i,p7(a,a,[e.x,e.y]),a},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var i=this.x,r=this.x+this.width,o=this.y,a=this.y+this.height,s=t.x,l=t.x+t.width,u=t.y,c=t.y+t.height,h=!(r<s||l<i||a<u||c<o);if(n){var d=1/0,p=0,f=Math.abs(r-s),g=Math.abs(l-i),m=Math.abs(a-u),v=Math.abs(c-o),y=Math.min(f,g),x=Math.min(m,v);r<s||l<i?y>p&&(p=y,f<g?fn.set(fc,-f,0):fn.set(fc,g,0)):y<d&&(d=y,f<g?fn.set(fu,f,0):fn.set(fu,-g,0)),a<u||c<o?x>p&&(p=x,m<v?fn.set(fc,0,-m):fn.set(fc,0,v)):y<d&&(d=y,m<v?fn.set(fu,0,m):fn.set(fu,0,-v))}return n&&fn.copy(n,h?fu:fc),h},e.prototype.contain=function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.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){t!==n&&e.copy(t,n);return}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];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),t.height<0&&(t.y+=t.height,t.height=-t.height);return}fo.x=fs.x=n.x,fo.y=fl.y=n.y,fa.x=fl.x=n.x+n.width,fa.y=fs.y=n.y+n.height,fo.transform(i),fl.transform(i),fa.transform(i),fs.transform(i),t.x=fi(fo.x,fa.x,fs.x,fl.x),t.y=fi(fo.y,fa.y,fs.y,fl.y);var l=fr(fo.x,fa.x,fs.x,fl.x),u=fr(fo.y,fa.y,fs.y,fl.y);t.width=l-t.x,t.height=u-t.y},e}();var fd="silent";function fp(){p1(this.event)}var ff=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return pS(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(pB),fg=function(e,t){this.x=e,this.y=t},fm=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],fv=new fh(0,0,0,0),fy=function(e){function t(t,n,i,r,o){var a=e.call(this)||this;return a._hovered=new fg(0,0),a.storage=t,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new ff,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new pL(a),a}return pS(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(dK(fm,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=fb(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 fg(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 fg(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,r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,a={type:t,event:n,target:(i=e).target,topTarget:i.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:fp};r&&(r[o]&&(a.cancelBubble=!!r[o].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););!a.cancelBubble&&(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){"function"==typeof e[o]&&e[o].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var i=this.storage.getDisplayList(),r=new fg(e,t);if(fx(i,r,e,t,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new fh(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||(fv.copy(c.getBoundingRect()),c.transform&&fv.applyTransform(c.transform),fv.intersect(l)&&o.push(c))}if(o.length){for(var h=Math.PI/12,d=2*Math.PI,p=0;p<s;p+=4)for(var f=0;f<d;f+=h)if(fx(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 p5);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 fg;o.target=i.target,this.dispatchToElement(o,r,i.event)}},t}(pB);function fx(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=function(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),i=i.__hostTarget||i.parent}return!r||fd}return!1}(a,n,i))&&(t.topTarget||(t.topTarget=a),s!==fd)){t.target=a;break}}}function fb(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}function fw(e,t,n,i){var r=t+1;if(r===n)return 1;if(0>i(e[r++],e[t])){for(;r<n&&0>i(e[r],e[r-1]);)r++;!function(e,t,n){for(n--;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 fS(e,t,n,i,r){for(i===t&&i++;i<n;i++){for(var o,a=e[i],s=t,l=i;s<l;)0>r(a,e[o=s+l>>>1])?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 f_(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=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&0>=o(e,t[n+r-l]);)a=l,(l=(l<<1)+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 fC(e,t,n,i,r,o){var a=0,s=0,l=1;if(0>o(e,t[n+r])){for(s=r+1;l<s&&0>o(e,t[n+r-l]);)a=l,(l=(l<<1)+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=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a<l;){var c=a+(l-a>>>1);0>o(e,t[n+c])?l=c:a=c+1}return l}function fM(e,t,n,i){n||(n=0),i||(i=e.length);var r=i-n;if(!(r<2)){var o=0;if(r<32){o=fw(e,n,i,t),fS(e,n,i,n+o,t);return}var a=function(e,t){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var d=fC(e[c],e,l,u,0,t);l+=d,0!=(u-=d)&&0!==(h=f_(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,o,s){var l,u,c,h=0;for(h=0;h<i;h++)a[h]=e[n+h];var d=0,p=o,f=n;if(e[f++]=e[p++],0==--s){for(h=0;h<i;h++)e[f+h]=a[d+h];return}if(1===i){for(h=0;h<s;h++)e[f+h]=e[p+h];e[f+s]=a[d];return}for(var g=r;;){l=0,u=0,c=!1;do if(0>t(e[p],a[d])){if(e[f++]=e[p++],u++,l=0,0==--s){c=!0;break}}else if(e[f++]=a[d++],l++,u=0,1==--i){c=!0;break}while((l|u)<g);if(c)break;do{if(0!==(l=fC(e[p],a,d,i,0,t))){for(h=0;h<l;h++)e[f+h]=a[d+h];if(f+=l,d+=l,(i-=l)<=1){c=!0;break}}if(e[f++]=e[p++],0==--s){c=!0;break}if(0!==(u=f_(a[d],e,p,s,0,t))){for(h=0;h<u;h++)e[f+h]=e[p+h];if(f+=u,p+=u,0==(s-=u)){c=!0;break}}if(e[f++]=a[d++],1==--i){c=!0;break}g--}while(l>=7||u>=7);if(c)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(h=0;h<s;h++)e[f+h]=e[p+h];e[f+s]=a[d]}else if(0===i)throw Error();else for(h=0;h<i;h++)e[f+h]=a[d+h]}(l,u,c,h):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,h=o+s-1,d=0,p=0;if(e[h--]=e[u--],0==--i){for(l=0,d=h-(s-1);l<s;l++)e[d+l]=a[l];return}if(1===s){for(h-=i,u-=i,p=h+1,d=u+1,l=i-1;l>=0;l--)e[p+l]=e[d+l];e[h]=a[c];return}for(var f=r;;){var g=0,m=0,v=!1;do if(0>t(a[c],e[u])){if(e[h--]=e[u--],g++,m=0,0==--i){v=!0;break}}else if(e[h--]=a[c--],m++,g=0,1==--s){v=!0;break}while((g|m)<f);if(v)break;do{if(0!=(g=i-fC(a[c],e,n,i,i-1,t))){for(h-=g,u-=g,i-=g,p=h+1,d=u+1,l=g-1;l>=0;l--)e[p+l]=e[d+l];if(0===i){v=!0;break}}if(e[h--]=a[c--],1==--s){v=!0;break}if(0!=(m=s-f_(e[u],a,0,s,s-1,t))){for(h-=m,c-=m,s-=m,p=h+1,d=c+1,l=0;l<m;l++)e[p+l]=a[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--i){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}if((r=f)<1&&(r=1),1===s){for(h-=i,u-=i,p=h+1,d=u+1,l=i-1;l>=0;l--)e[p+l]=e[d+l];e[h]=a[c]}else if(0===s)throw Error();else for(l=0,d=h-(s-1);l<s;l++)e[d+l]=a[l]}(l,u,c,h))}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}}}(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(r);do{if((o=fw(e,n,i,t))<s){var l=r;l>s&&(l=s),fS(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}dK(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){fy.prototype[e]=function(t){var n,i,r=t.zrX,o=t.zrY,a=fb(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||pD(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});var fk=!1;function fT(){!fk&&(fk=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function fD(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var fI=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=fD}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,fM(n,fD)},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 t&&t.length?e.__clipPaths=t:e.__clipPaths&&e.__clipPaths.length>0&&(e.__clipPaths=[]),isNaN(e.z)&&(fT(),e.z=0),isNaN(e.z2)&&(fT(),e.z2=0),isNaN(e.zlevel)&&(fT(),e.zlevel=0),this._displayList[this._displayListLen++]=e;var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,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]);return}var i=dq(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}();ee=dT.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var fA={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*(-Math.pow(2,-10*(e-1))+2)},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(2*Math.PI*(e-t)/.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(2*Math.PI*(e-t)/.4)+1)},elasticInOut: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),(e*=2)<1)?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)):n*Math.pow(2,-10*(e-=1))*Math.sin(2*Math.PI*(e-t)/.4)*.5+1},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){return--e*e*(2.70158*e+1.70158)+1},backInOut:function(e){return(e*=2)<1?e*e*(3.5949095*e-2.5949095)*.5:.5*((e-=2)*e*(3.5949095*e+2.5949095)+2)},bounceIn:function(e){return 1-fA.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*fA.bounceIn(2*e):.5*fA.bounceOut(2*e-1)+.5}},fP=Math.pow,fO=Math.sqrt,fR=fO(3),fE=1/3,fL=p_(),fB=p_(),fN=p_();function fF(e){return e>-1e-8&&e<1e-8}function fz(e){return e>1e-8||e<-1e-8}function fV(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 fZ(e,t,n,i,r){var o=1-r;return 3*(((t-e)*o+2*(n-t)*r)*o+(i-n)*r*r)}function fj(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,h=s*l-9*a*u,d=l*l-3*s*u,p=0;if(fF(c)&&fF(h)){if(fF(s))o[0]=0;else{var f=-l/s;f>=0&&f<=1&&(o[p++]=f)}}else{var g=h*h-4*c*d;if(fF(g)){var m=h/c,f=-s/a+m,v=-m/2;f>=0&&f<=1&&(o[p++]=f),v>=0&&v<=1&&(o[p++]=v)}else if(g>0){var y=fO(g),x=c*s+1.5*a*(-h+y),b=c*s+1.5*a*(-h-y),f=(-s-((x=x<0?-fP(-x,fE):fP(x,fE))+(b=b<0?-fP(-b,fE):fP(b,fE))))/(3*a);f>=0&&f<=1&&(o[p++]=f)}else{var w=Math.acos((2*c*s-3*a*h)/(2*fO(c*c*c)))/3,S=fO(c),_=Math.cos(w),f=(-s-2*S*_)/(3*a),v=(-s+S*(_+fR*Math.sin(w)))/(3*a),C=(-s+S*(_-fR*Math.sin(w)))/(3*a);f>=0&&f<=1&&(o[p++]=f),v>=0&&v<=1&&(o[p++]=v),C>=0&&C<=1&&(o[p++]=C)}}return p}function fH(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(fF(a)){if(fz(o)){var u=-s/o;u>=0&&u<=1&&(r[l++]=u)}}else{var c=o*o-4*a*s;if(fF(c))r[0]=-o/(2*a);else if(c>0){var h=fO(c),u=(-o+h)/(2*a),d=(-o-h)/(2*a);u>=0&&u<=1&&(r[l++]=u),d>=0&&d<=1&&(r[l++]=d)}}return l}function fW(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,h=(c-u)*r+u;o[0]=e,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function f$(e,t,n,i){var r=1-i;return r*(r*e+2*i*t)+i*i*n}function fG(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))}function fU(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i}function fq(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}var fY=/cubic-bezier\(([0-9,\.e ]+)\)/;function fX(e){var t=e&&fY.exec(e);if(t){var n=t[1].split(","),i=+pc(n[0]),r=+pc(n[1]),o=+pc(n[2]),a=+pc(n[3]);if(isNaN(i+r+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:fj(0,i,o,1,e,s)&&fV(0,r,a,1,s[0])}}}var fK=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||px,this.ondestroy=e.ondestroy||px,this.onrestart=e.onrestart||px,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){this._pausedTime+=t;return}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;this._startTime=e-i%n,this._pausedTime=0,this.onrestart()}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=d4(e)?e:fA[e]||fX(e)},e}(),fQ=function(e){this.value=e},fJ=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new fQ(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}(),f0=function(){function e(e){this._list=new fJ,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 fQ(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}(),f1={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 f2(e){return(e=Math.round(e))<0?0:e>255?255:e}function f5(e){return e<0?0:e>1?1:e}function f3(e){return e.length&&"%"===e.charAt(e.length-1)?f2(parseFloat(e)/100*255):f2(parseInt(e,10))}function f4(e){return e.length&&"%"===e.charAt(e.length-1)?f5(parseFloat(e)/100):f5(parseFloat(e))}function f8(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 f6(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function f9(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f7=new f0(20),ge=null;function gt(e,t){ge&&f9(ge,t),ge=f7.put(e,ge||t.slice())}function gn(e,t){if(e){t=t||[];var n=f7.get(e);if(n)return f9(t,n);var i=(e+="").replace(/ /g,"").toLowerCase();if(i in f1)return f9(t,f1[i]),gt(e,t),t;var r=i.length;if("#"===i.charAt(0)){if(4===r||5===r){var o=parseInt(i.slice(1,4),16);if(!(o>=0&&o<=4095)){f6(t,0,0,0,1);return}return f6(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===r?parseInt(i.slice(4),16)/15:1),gt(e,t),t}if(7===r||9===r){var o=parseInt(i.slice(1,7),16);if(!(o>=0&&o<=0xffffff)){f6(t,0,0,0,1);return}return f6(t,(0xff0000&o)>>16,(65280&o)>>8,255&o,9===r?parseInt(i.slice(7),16)/255:1),gt(e,t),t}return}var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===r){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?f6(t,+u[0],+u[1],+u[2],1):f6(t,0,0,0,1);c=f4(u.pop());case"rgb":if(u.length>=3)return f6(t,f3(u[0]),f3(u[1]),f3(u[2]),3===u.length?c:f4(u[3])),gt(e,t),t;f6(t,0,0,0,1);return;case"hsla":if(4!==u.length){f6(t,0,0,0,1);return}return u[3]=f4(u[3]),gi(u,t),gt(e,t),t;case"hsl":if(3!==u.length){f6(t,0,0,0,1);return}return gi(u,t),gt(e,t),t;default:return}}f6(t,0,0,0,1)}}function gi(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=f4(e[1]),r=f4(e[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return f6(t=t||[],f2(255*f8(a,o,n+1/3)),f2(255*f8(a,o,n)),f2(255*f8(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function gr(e,t){var n=gn(e);if(n){for(var i=0;i<3;i++)t<0?n[i]=n[i]*(1-t)|0:n[i]=(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return gl(n,4===n.length?"rgba":"rgb")}}function go(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i,r,o,a,s=e*(t.length-1),l=Math.floor(s),u=Math.ceil(s),c=t[l],h=t[u],d=s-l;return n[0]=f2((i=c[0],i+(h[0]-i)*d)),n[1]=f2((r=c[1],r+(h[1]-r)*d)),n[2]=f2((o=c[2],o+(h[2]-o)*d)),n[3]=f5((a=c[3],a+(h[3]-a)*d)),n}}function ga(e,t,n,i){var r,o=gn(e);if(e)return o=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,h=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l;i===s?t=d-h:r===s?t=1/3+c-d:o===s&&(t=2/3+h-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(o),null!=t&&(o[0]=(r=Math.round(r=t))<0?0:r>360?360:r),null!=n&&(o[1]=f4(n)),null!=i&&(o[2]=f4(i)),gl(gi(o),"rgba")}function gs(e,t){var n=gn(e);if(n&&null!=t)return n[3]=f5(t),gl(n,"rgba")}function gl(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 gu(e,t){var n=gn(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var gc=new f0(100);function gh(e){if(d8(e)){var t=gc.get(e);return t||(t=gr(e,-.1),gc.put(e,t)),t}if(pi(e)){var n=dG({},e);return n.colorStops=dQ(e.colorStops,function(e){return{offset:e.offset,color:gr(e.color,-.1)}}),n}return e}dT.hasGlobalWindow&&d4(window.btoa);var gd=Array.prototype.slice;function gp(e,t,n,i){for(var r,o=t.length,a=0;a<o;a++)e[a]=(r=t[a],(n[a]-r)*i+r);return e}function gf(e,t,n,i){for(var r=t.length,o=0;o<r;o++)e[o]=t[o]+n[o]*i;return e}function gg(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 gm(e){if(dX(e)){var t=e.length;if(dX(e[0])){for(var n=[],i=0;i<t;i++)n.push(gd.call(e[i]));return n}return gd.call(e)}return e}function gv(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 gy(e){return 4===e||5===e}function gx(e){return 1===e||2===e}var gb=[0,0,0,0],gw=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(dX(t)){var l=dX(t&&t[0])?2:1;a=l,(1!==l||d9(t[0]))&&(2!==l||d9(t[0][0]))||(o=!0)}else if(d9(t)&&t==t)a=0;else if(d8(t)){if(isNaN(+t)){var u=gn(t);u&&(s=u,a=3)}else a=0}else if(pi(t)){var c=dG({},s);(c.colorStops=dQ(t.colorStops,function(e){return{offset:e.offset,color:gn(e.color)}}),"linear"===t.type)?a=4:"radial"===t.type&&(a=5),s=c}0===r?this.valType=a:(a!==this.valType||6===a)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:s,rawValue:t,percent:0};return n&&(h.easing=n,h.easingFunc=d4(n)?n:fA[n]||fX(n)),i.push(h),h},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=gx(i),l=gy(i),u=0;u<r;u++){var c=n[u],h=c.value,d=o.value;c.percent=c.time/e,!a&&(s&&u!==r-1?function(e,t,n){if(e.push&&t.push){var i=e.length,r=t.length;if(i!==r){if(i>r)e.length=r;else for(var o=i;o<r;o++)e.push(1===n?t[o]:gd.call(t[o]))}for(var a=e[0]&&e[0].length,o=0;o<e.length;o++)if(1===n)isNaN(e[o])&&(e[o]=t[o]);else for(var s=0;s<a;s++)isNaN(e[o][s])&&(e[o][s]=t[o][s])}}(h,d,i):l&&function(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()})}(h.colorStops,d.colorStops))}if(!a&&5!==i&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,u=0;u<r;u++)0===i?n[u].additiveValue=n[u].value-p:3===i?n[u].additiveValue=gf([],n[u].value,p,-1):gx(i)&&(n[u].additiveValue=1===i?gf([],n[u].value,p,-1):gg([],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,h=3===s,d=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(d+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=d;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:h?gb:e[c];if((gx(s)||h)&&!m&&(m=this._additiveValue=[]),this.discrete)e[c]=g<1?i.rawValue:r.rawValue;else if(gx(s))1===s?gp(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,l=0;l<o;l++)e[a][l]=(s=t[a][l],(n[a][l]-s)*i+s)}return e}(m,i[a],r[a],g);else if(gy(s)){var v,y,x,b,w,S=i[a],_=r[a],C=4===s;(e[c]={type:C?"linear":"radial",x:(v=S.x,(_.x-v)*g+v),y:(y=S.y,(_.y-y)*g+y),colorStops:dQ(S.colorStops,function(e,t){var n,i=_.colorStops[t];return{offset:(n=e.offset,(i.offset-n)*g+n),color:gv(gp([],e.color,i.color,g))}}),global:_.global},C)?(e[c].x2=(x=S.x2,(_.x2-x)*g+x),e[c].y2=(b=S.y2,(_.y2-b)*g+b)):e[c].r=(w=S.r,(_.r-w)*g+w)}else if(h)gp(m,i[a],r[a],g),o||(e[c]=gv(m));else{var M,k=(M=i[a],(r[a]-M)*g+M);o?this._additiveValue=k:e[c]=k}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?(gn(e[n],gb),gf(gb,gb,i,1),e[n]=gv(gb)):1===t?gf(e[n],e[n],i,1):2===t&&gg(e[n],e[n],i,1)},e}(),gS=function(){function e(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){dH("Can' use additive animation on looped animation.");return}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,d1(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 gw(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,h=c[c.length-1];l=h&&h.value,3===u.valType&&l&&(l=gv(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,gm(l),i),this._trackKeys.push(a)}s.addKeyframe(e,gm(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 h=new fK({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(var o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(var o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=h,this.animation&&this.animation.addClip(h),e&&h.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 dQ(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())}for(var a=!0,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]=gm(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||d1(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 g_(){return new Date().getTime()}var gC=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 pS(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=g_()-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}this._time=t,!e&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,ee(function t(){e._running&&(ee(t),e._paused||e.update())})},t.prototype.start=function(){!this._running&&(this._time=g_(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=g_(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=g_()-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 gS(e,t.loop);return this.addAnimator(n),n},t}(pB),gM=dT.domSupported,gk=(C={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},M=dQ(_=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],function(e){var t=e.replace("mouse","pointer");return C.hasOwnProperty(t)?t:e}),{mouse:_,touch:["touchstart","touchend","touchmove"],pointer:M}),gT={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},gD=!1;function gI(e){var t=e.pointerType;return"pen"===t||"touch"===t}function gA(e){e&&(e.zrByTouch=!0)}function gP(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 gO=function(e,t){this.stopPropagation=px,this.stopImmediatePropagation=px,this.preventDefault=px,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},gR={mousedown:function(e){e=pJ(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=pJ(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=pJ(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){gP(this,(e=pJ(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){gD=!0,e=pJ(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){!gD&&(e=pJ(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){gA(e=pJ(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),gR.mousemove.call(this,e),gR.mousedown.call(this,e)},touchmove:function(e){gA(e=pJ(this.dom,e)),this.handler.processGesture(e,"change"),gR.mousemove.call(this,e)},touchend:function(e){gA(e=pJ(this.dom,e)),this.handler.processGesture(e,"end"),gR.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&gR.click.call(this,e)},pointerdown:function(e){gR.mousedown.call(this,e)},pointermove:function(e){gI(e)||gR.mousemove.call(this,e)},pointerup:function(e){gR.mouseup.call(this,e)},pointerout:function(e){gI(e)||gR.mouseout.call(this,e)}};dK(["click","dblclick","contextmenu"],function(e){gR[e]=function(t){t=pJ(this.dom,t),this.trigger(e,t)}});var gE={pointermove:function(e){gI(e)||gE.mousemove.call(this,e)},pointerup:function(e){gE.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 gL(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,p0(e.domTarget,t,n,i)}function gB(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&function(e,t,n,i){e.removeEventListener(t,n,i)}(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var gN=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},gF=function(e){function t(t,n){var i,r,o=e.call(this)||this;return o.__pointerCapturing=!1,o.dom=t,o.painterRoot=n,o._localHandlerScope=new gN(t,gR),gM&&(o._globalHandlerScope=new gN(document,gE)),r=(i=o._localHandlerScope).domHandlers,dT.pointerEventsSupported?dK(gk.pointer,function(e){gL(i,e,function(t){r[e].call(o,t)})}):(dT.touchEventsSupported&&dK(gk.touch,function(e){gL(i,e,function(t){r[e].call(o,t),i.touching=!0,null!=i.touchTimer&&(clearTimeout(i.touchTimer),i.touchTimer=null),i.touchTimer=setTimeout(function(){i.touching=!1,i.touchTimer=null},700)})}),dK(gk.mouse,function(e){gL(i,e,function(t){t=pQ(t),i.touching||r[e].call(o,t)})})),o}return pS(t,e),t.prototype.dispose=function(){gB(this._localHandlerScope),gM&&gB(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,gM&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?function(e,t){dT.pointerEventsSupported?dK(gT.pointer,n):dT.touchEventsSupported||dK(gT.mouse,n);function n(n){gL(t,n,function(i){if(!gP(e,(i=pQ(i)).target)){var r;r=i,i=pJ(e.dom,new gO(e,r),!0),t.domHandlers[n].call(e,i)}},{capture:!0})}}(this,t):gB(t)}},t}(pB),gz=1;dT.hasGlobalWindow&&(gz=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var gV=gz,gZ="#333",gj="#ccc";function gH(e){return e>5e-5||e<-5e-5}var gW=[],g$=[],gG=p8(),gU=Math.abs,gq=function(){var e;function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return gH(this.rotation)||gH(this.x)||gH(this.y)||gH(this.scaleX-1)||gH(this.scaleY-1)||gH(this.skewX)||gH(this.skewY)},t.prototype.updateTransform=function(){var e,t=this.parent&&this.parent.transform,n=this.needLocalTransform(),i=this.transform;if(!(n||t)){i&&(p6(i),this.invTransform=null);return}i=i||p8(),n?this.getLocalTransform(i):p6(i),t&&(n?p9(i,t,i):((e=i)[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5])),this.transform=i,this._resolveGlobalScaleRatio(i)},t.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(gW);var n=gW[0]<0?-1:1,i=gW[1]<0?-1:1,r=((gW[0]-n)*t+n)/gW[0]||0,o=((gW[1]-i)*t+i)/gW[1]||0;e[0]*=r,e[1]*=r,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||p8(),ft(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},t.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}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||p8(),p9(g$,e.invTransform,t),t=g$);var n=this.originX,i=this.originY;(n||i)&&(gG[4]=n,gG[5]=i,p9(g$,t,gG),g$[4]-=n,g$[5]-=i,t=g$),this.setLocalTransform(t)}},t.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[0]=1,e[1]=1),e},t.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&pP(n,n,i),n},t.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&pP(n,n,i),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&gU(e[0]-1)>1e-10&&gU(e[3]-1)>1e-10?Math.sqrt(gU(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){(function(e,t){for(var n=0;n<gY.length;n++){var i=gY[n];e[i]=t[i]}})(this,e)},t.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,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||a||s){var p=n+a,f=i+s;t[4]=-p*r-h*f*o,t[5]=-f*o-d*p*r}else t[4]=t[5]=0;return t[0]=r,t[3]=o,t[1]=d*r,t[2]=h*o,l&&fe(t,t,l),t[4]+=n+u,t[5]+=i+c,t},t.initDefaultProps=void((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0),t}(),gY=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],gX={};function gK(e,t){var n=gX[t=t||dD];n||(n=gX[t]=new f0(500));var i=n.get(e);return null==i&&(i=dA.measureText(e,t).width,n.put(e,i)),i}function gQ(e,t,n,i){var r=gK(e,t),o=g2(t);return new fh(g0(0,r,n),g1(0,o,i),r,o)}function gJ(e,t,n,i){var r=((e||"")+"").split("\n");if(1===r.length)return gQ(r[0],t,n,i);for(var o=new fh(0,0,0,0),a=0;a<r.length;a++){var s=gQ(r[a],t,n,i);0===a?o.copy(s):o.union(s)}return o}function g0(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function g1(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function g2(e){return gK("国",e)}function g5(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function g3(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",h="top";if(i instanceof Array)l+=g5(i[0],n.width),u+=g5(i[1],n.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="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,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=h,e}var g4="__zr_normal__",g8=gY.concat(["ignore"]),g6=dJ(gY,function(e,t){return e[t]=!0,e},{ignore:!1}),g9={},g7=new fh(0,0,0,0),me=function(){function e(e){this.id=dj++,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){n.layoutRect?g7.copy(n.layoutRect):g7.copy(this.getBoundingRect()),i||g7.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(g9,n,g7):g3(g9,n,g7),r.x=g9.x,r.y=g9.y,o=g9.align,a=g9.verticalAlign;var u=n.origin;if(u&&null!=n.rotation){var c=void 0,h=void 0;"center"===u?(c=.5*g7.width,h=.5*g7.height):(c=g5(u[0],g7.width),h=g5(u[1],g7.height)),l=!0,r.originX=-r.x+c+(i?0:g7.x),r.originY=-r.y+h+(i?0:g7.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var p=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,f=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,m=void 0,v=void 0;p&&this.canBeInsideText()?(g=n.insideFill,m=n.insideStroke,(null==g||"auto"===g)&&(g=this.getInsideTextFill()),(null==m||"auto"===m)&&(m=this.getInsideTextStroke(g),v=!0)):(g=n.outsideFill,m=n.outsideStroke,(null==g||"auto"===g)&&(g=this.getOutsideFill()),(null==m||"auto"===m)&&(m=this.getOutsideStroke(g),v=!0)),((g=g||"#000")!==f.fill||m!==f.stroke||v!==f.autoStroke||o!==f.align||a!==f.verticalAlign)&&(s=!0,f.fill=g,f.stroke=m,f.autoStroke=v,f.align=o,f.verticalAlign=a,t.setDefaultTextStyle(f)),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()?gj:gZ},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&gn(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+255*!r*(1-i);return n[3]=1,gl(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||{},dG(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(d7(e))for(var n=d1(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===g4)){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,g8)},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(g4,!1,e)},e.prototype.useState=function(e,t,n,i){var r,o=e===g4;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(dq(a,e)>=0)||!t&&1!==a.length){if(this.stateProxy&&!o&&(r=this.stateProxy(e)),r||(r=this.states&&this.states[e]),!r&&!o){dH("State "+e+" not exists.");return}o||this.saveCurrentToNormalState(r);var l=!!(r&&r.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,r,this._normalState,t,!n&&!this.__inHover&&s&&s.duration>0,s);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(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),r}}},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){for(var 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],h=!!(c&&c.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,h),g&&g.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&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=dq(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=dq(i,e),o=dq(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];dG(n,r),r.textConfig&&dG(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=dG({},i?this.textConfig:n.textConfig),dG(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<g8.length;u++){var c=g8[u],h=r&&g6[c];t&&null!=t[c]?h?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(h?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!r)for(var u=0;u<this.animators.length;u++){var d=this.animators[u],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(t||n)[p]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},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;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new gq,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),dG(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=new gS(e?this[e]:this,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},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=dq(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){mt(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){mt(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,i){for(var r=mt(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;function n(e,n,i,r){Object.defineProperty(t,e,{get:function(){return this[n]||o(this,this[n]=[]),this[n]},set:function(e){this[i]=e[0],this[r]=e[1],this[n]=e,o(this,e)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[r]},set:function(t){e[r]=t}})}}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function mt(e,t,n,i,r){var o=[];!function e(t,n,i,r,o,a,s,l){for(var u=d1(r),c=o.duration,h=o.delay,d=o.additive,p=o.setToFinal,f=!d7(a),g=t.animators,m=[],v=0;v<u.length;v++){var y=u[v],x=r[y];if(null!=x&&null!=i[y]&&(f||a[y])){if(!d7(x)||dX(x)||pi(x))m.push(y);else{if(n){l||(i[y]=x,t.updateDuringAnimation(n));continue}e(t,y,i[y],x,o,a&&a[y],s,l)}}else l||(i[y]=x,t.updateDuringAnimation(n),m.push(y))}var b=m.length;if(!d&&b)for(var w=0;w<g.length;w++){var S=g[w];if(S.targetName===n&&S.stopTracks(m)){var _=dq(g,S);g.splice(_,1)}}if(o.force||(b=(m=d0(m,function(e){var t,n;return!((t=r[e])===(n=i[e])||dX(t)&&dX(n)&&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,n))})).length),b>0||o.force&&!s.length){var C=void 0,M=void 0,k=void 0;if(l){M={},p&&(C={});for(var w=0;w<b;w++){var y=m[w];M[y]=i[y],p?C[y]=r[y]:i[y]=r[y]}}else if(p){k={};for(var w=0;w<b;w++){var y=m[w];k[y]=gm(i[y]),function(e,t,n){if(dX(t[n])){if(dX(e[n])||(e[n]=[]),pt(t[n])){var i=t[n].length;e[n].length!==i&&(e[n]=new t[n].constructor(i),mn(e[n],t[n],i))}else{var r=t[n],o=e[n],a=r.length;if(dX(r[0]))for(var s=r[0].length,l=0;l<a;l++)o[l]?mn(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else mn(o,r,a);o.length=r.length}}else e[n]=t[n]}(i,r,y)}}var S=new gS(i,!1,!1,d?d0(g,function(e){return e.targetName===n}):null);S.targetName=n,o.scope&&(S.scope=o.scope),p&&C&&S.whenWithKeys(0,C,m),k&&S.whenWithKeys(0,k,m),S.whenWithKeys(null==c?500:c,l?M:r,m).delay(h||0),t.addAnimator(S,n),s.push(S)}}(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())},h=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 d=0;d<o.length;d++){var p=o[d];c&&p.done(c),h&&p.aborted(h),n.force&&p.duration(n.duration),p.start(n.easing)}return o}function mn(e,t,n){for(var i=0;i<n;i++)e[i]=t[i]}dY(me,pB),dY(me,gq);var mi=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return pS(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){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),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=dq(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=dq(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 fh(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?(fh.applyTransform(t,s,l),(r=r||t.clone()).union(t)):(r=r||s.clone()).union(s)}}return r||t},t}(me);mi.prototype.type="group";let mr=mi;var mo={},ma={},ms=function(){function e(e,t,n){var i,r=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 o=new fI,a=n.renderer||"canvas";mo[a]||(a=d1(mo)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new mo[a](t,o,n,e),l=n.ssr||s.ssrOnly;this.storage=o,this.painter=s;var u=dT.node||dT.worker||l?null:new gF(s.getViewportRoot(),s.root),c=n.useCoarsePointer;(null==c||"auto"===c?dT.touchEventsSupported:!!c)&&(i=po(n.pointerSize,44)),this.handler=new fy(o,s,u,s.root,i),this.animation=new gC({stage:{update:l?null:function(){return r._flush(!0)}}}),l||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 .4>gu(e,1);if(e.colorStops){for(var t=e.colorStops,n=0,i=t.length,r=0;r<i;r++)n+=gu(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=g_();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=g_();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 mr&&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 ma[e])},e}();function ml(e,t){var n=new ms(dj++,e,t);return ma[n.id]=n,n}function mu(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 mc(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 d8(e)?e.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function mh(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function md(e){return e.sort(function(e,t){return e-t}),e}function mp(e){if(isNaN(e*=1))return 0;if(e>1e-14){for(var t,n,i,r,o,a=1,s=0;s<15;s++,a*=10)if(Math.round(e*a)/a===e)return s}return i=(n=(t=e.toString().toLowerCase()).indexOf("e"))>0?+t.slice(n+1):0,r=n>0?n:t.length,Math.max(0,((o=t.indexOf("."))<0?0:r-1-o)-i)}function mf(e,t){var n=Math.log,i=Math.LN10,r=Math.min(Math.max(-Math.floor(n(e[1]-e[0])/i)+Math.round(n(Math.abs(t[1]-t[0]))/i),0),20);return isFinite(r)?r:20}function mg(e){var t=2*Math.PI;return(e%t+t)%t}function mm(e){return e>-1e-4&&e<1e-4}var mv=/^(?:(\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 my(e){if(e instanceof Date)return e;if(d8(e)){var t=mv.exec(e);if(!t)return new Date(NaN);if(!t[8])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);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 null==e?new Date(NaN):new Date(Math.round(e))}function mx(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 mb(e,t){var n,i=mx(e),r=Math.pow(10,i),o=e/r;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,i>=-20?+e.toFixed(i<0?-i:0):e}function mw(e){e.sort(function(e,t){return!function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]==(i?-1:1)||!i&&e(t,n,1))}(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 mS(e){var t=parseFloat(e);return t==e&&(0!==t||!d8(e)||0>=e.indexOf("x"))?t:NaN}function m_(){return Math.round(9*Math.random())}function mC(e,t){return null==e?t:null==t?e:e*t/function e(t,n){return 0===n?t:e(n,t%n)}(e,t)}var mM="series\0",mk="\0_ec_\0";function mT(e){return e instanceof Array?e:null==e?[]:[e]}function mD(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 mI=["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 mA(e){return!d7(e)||d3(e)||e instanceof Date?e:e.value}function mP(e,t,n){var i=mR(t[e],null),r=mR(n[e],null);return null!=i&&null!=r&&i===r}function mO(e){return mR(e,"")}function mR(e,t){return null==e?t:d8(e)?e:d9(e)||d6(e)?e+"":t}function mE(e){var t=e.name;return!!(t&&t.indexOf(mM))}function mL(e){return e&&null!=e.id&&0===mO(e.id).indexOf(mk)}function mB(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?d3(t.dataIndex)?dQ(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?d3(t.name)?dQ(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function mN(){var e="__ec_inner_"+mF++;return function(t){return t[e]||(t[e]={})}}var mF=m_();function mz(e,t,n){var i=mV(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=mH(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 mV(e,t){if(d8(e)){var n,i={};i[e+"Index"]=0,n=i}else n=e;var r=pg(),o={},a=!1;return dK(n,function(e,n){if("dataIndex"===n||"dataIndexInside"===n){o[n]=e;return}var i=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=i[1],l=(i[2]||"").toLowerCase();!(!s||!l||t&&t.includeMainTypes&&0>dq(t.includeMainTypes,s))&&(a=a||!!s,(r.get(s)||r.set(s,{}))[l]=e)}),{mainTypeSpecified:a,queryOptionMap:r,others:o}}var mZ={useDefault:!0,enableAll:!1,enableNone:!1},mj={useDefault:!1,enableAll:!0,enableNone:!0};function mH(e,t,n,i){i=i||mZ;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?(pu(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[]):("all"===r&&(pu(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 mW(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function m$(e,t,n,i,r){var o=null==t||"auto"===t;if(null==i)return i;if(d9(i)){var a,s=(i-(a=n||0))*r+a;return mh(s,o?Math.max(mp(n||0),mp(i)):t)}if(d8(i))return r<1?n:i;for(var l=[],u=Math.max(n?n.length:0,i.length),c=0;c<u;++c){var h=e.getDimensionInfo(c);if(h&&"ordinal"===h.type)l[c]=(r<1&&n?n:i)[c];else{var d=n&&n[c]?n[c]:0,p=i[c],s=(p-d)*r+d;l[c]=mh(s,o?Math.max(mp(d),mp(p)):t)}}return l}var mG="___EC__COMPONENT__CONTAINER___",mU="___EC__EXTENDED_CLASS___";function mq(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function mY(e,t){e.$constructor=e,e.extend=function(e){var t,n,i=this;return d4(t=i)&&/^class\s/.test(Function.prototype.toString.call(t))?n=function(e){function t(){return e.apply(this,arguments)||this}return dM(t,e),t}(i):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=function(){(e.$constructor||i).apply(this,arguments)},this),dG(n.prototype,e),n[mU]=!0,n.extend=this.extend,n.superCall=mQ,n.superApply=mJ,n.superClass=i,n}}function mX(e,t){e.extend=t.extend}var mK=Math.round(10*Math.random());function mQ(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 mJ(e,t,n){return this.superClass.prototype[t].apply(e,n)}function m0(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){pu(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),e.prototype.type=n;var i,r,o=mq(n);o.sub?o.sub!==mG&&(((r=t[(i=o).main])&&r[mG]||((r=t[i.main]={})[mG]=!0),r)[o.sub]=e):t[o.main]=e}return e},e.getClass=function(e,n,i){var r=t[e];if(r&&r[mG]&&(r=n?r[n]:null),i&&!r)throw Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return r},e.getClassesByMainType=function(e){var n=mq(e),i=[],r=t[n.main];return r&&r[mG]?dK(r,function(e,t){t!==mG&&i.push(e)}):i.push(r),i},e.hasClass=function(e){return!!t[mq(e).main]},e.getAllClassMainTypes=function(){var e=[];return dK(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[mq(e).main];return n&&n[mG]}}function m1(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&&dq(i,s)>=0||r&&0>dq(r,s))){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var m2=m1([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),m5=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return m2(this,e,t)},e}(),m3=new f0(50);function m4(e,t,n,i,r){if(!e)return t;if("string"!=typeof e)return e;if(t&&t.__zrImageSrc===e||!n)return t;var o=m3.get(e),a={hostEl:n,cb:i,cbPayload:r};return o?m6(t=o.image)||o.pending.push(a):((t=dA.loadImage(e,m8,m8)).__zrImageSrc=e,m3.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}function m8(){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 m6(e){return e&&e.width&&e.height}var m9=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function m7(e,t,n,i){var r=dG({},i=i||{});r.font=t,n=po(n,"..."),r.maxIterations=po(i.maxIterations,2);var o=r.minChar=po(i.minChar,0);r.cnCharWidth=gK("国",t);var a=r.ascCharWidth=gK("a",t);r.placeholder=po(i.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=gK(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 ve(e,t){var n=t.containerWidth,i=t.font,r=t.contentWidth;if(!n)return"";var o=gK(e,i);if(o<=n)return e;for(var a=0;;a++){if(o<=r||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?function(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}(e,r,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*r/o):0;o=gK(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}var vt=function(){},vn=function(e){this.tokens=[],e&&(this.tokens=e)},vi=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function vr(e,t,n,i,r){var o,a,s=""===t,l=r&&n.rich[r]||{},u=e.lines,c=l.font||n.font,h=!1;if(i){var d=l.padding,p=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var f=g5(l.width,i.width)+p;u.length>0&&f+i.accumWidth>i.width&&(o=t.split("\n"),h=!0),i.accumWidth=f}else{var g=va(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 vt;if(y.styleName=r,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:gK(v,c),m||h)u.push(new vn([y]));else{var x=(u[u.length-1]||(u[0]=new vn)).tokens,b=x.length;1===b&&x[0].isLineHolder?x[0]=y:(v||!b||s)&&x.push(y)}}}var vo=dJ(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function va(e,t,n,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;h<e.length;h++){var d=e.charAt(h);if("\n"===d){l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0;continue}var p=gK(d,t),f=!i&&!function(e){var t;return(!((t=e.charCodeAt(0))>=32)||!(t<=591))&&(!(t>=880)||!(t<=4351))&&(!(t>=4608)||!(t<=5119))&&(!(t>=7680)||!(t<=8303))||!!vo[e]}(d);if(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+=d,u+=p,s="",c=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=d,c=p)):f?(o.push(l),a.push(u),l=d,u=p):(o.push(d),a.push(p));continue}c+=p,f?(l+=d,u+=p):(l&&(s+=l,l="",u=0),s+=d)}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 vs="__zr_style_"+Math.round(10*Math.random()),vl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},vu={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};vl[vs]=!0;var vc=["z","z2","invisible"],vh=["invisible"],vd=function(e){var t;function n(t){return e.call(this,t)||this}return pS(n,e),n.prototype._init=function(t){for(var n=d1(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({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(e,t,n,i){var r,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(r=this,o=e,a=t,vp.copy(r.getBoundingRect()),r.transform&&vp.applyTransform(r.transform),vf.width=o,vf.height=a,!vp.intersect(vf))||s&&!s[0]&&!s[3])return!1;if(n&&this.__clipPaths){for(var l=0;l<this.__clipPaths.length;++l)if(this.__clipPaths[l].isZeroArea())return!1}if(i&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},n.prototype.contain=function(e,t){return this.rectContain(e,t)},n.prototype.traverse=function(e,t){e.call(t,this)},n.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},n.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 fh(0,0,0,0)),t?fh.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},n.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new fh(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(e){return this.animate("style",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(t,n){"style"!==t?e.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},n.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:dG(this.style,e),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(e){return pm(vl,e)},n.prototype.useStyle=function(e){e[vs]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},n.prototype.isStyleObject=function(e){return e[vs]},n.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,vc)},n.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=d1(u),h=0;h<c.length;h++){var d=c[h];d in s&&(s[d]=s[d],this.style[d]=u[d])}for(var p=d1(s),h=0;h<p.length;h++){var d=p[h];this.style[d]=this.style[d]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s)}for(var f=this.__inHover?vh:vc,h=0;h<f.length;h++){var d=f[h];n&&null!=n[d]?this[d]=n[d]:l&&null!=i[d]&&(this[d]=i[d])}},n.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},n.prototype._mergeStyle=function(e,t){return dG(e,t),e},n.prototype.getAnimationStyleProps=function(){return vu},n.initDefaultProps=void((t=n.prototype).type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=3),n}(me),vp=new fh(0,0,0,0),vf=new fh(0,0,0,0),vg=Math.min,vm=Math.max,vv=Math.sin,vy=Math.cos,vx=2*Math.PI,vb=p_(),vw=p_(),vS=p_();function v_(e,t,n,i,r,o){r[0]=vg(e,n),r[1]=vg(t,i),o[0]=vm(e,n),o[1]=vm(t,i)}var vC=[],vM=[],vk={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},vT=[],vD=[],vI=[],vA=[],vP=[],vO=[],vR=Math.min,vE=Math.max,vL=Math.cos,vB=Math.sin,vN=Math.abs,vF=Math.PI,vz=2*vF,vV="undefined"!=typeof Float32Array,vZ=[];function vj(e){return Math.round(e/vF*1e8)/1e8%2*vF}function vH(e,t){var n=vj(e[0]);n<0&&(n+=vz);var i=n-e[0],r=e[1];r+=i,!t&&r-n>=vz?r=n+vz:t&&n-r>=vz?r=n-vz:!t&&n>r?r=n+(vz-vj(n-r)):t&&n<r&&(r=n-(vz-vj(r-n))),e[0]=n,e[1]=r}var vW=function(){var e;function t(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=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,t,n){(n=n||0)>0&&(this._ux=vN(n/gV/e)||0,this._uy=vN(n/gV/t)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(vk.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},t.prototype.lineTo=function(e,t){var n=vN(e-this._xi),i=vN(t-this._yi),r=n>this._ux||i>this._uy;if(this.addData(vk.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},t.prototype.bezierCurveTo=function(e,t,n,i,r,o){return this._drawPendingPt(),this.addData(vk.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},t.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(vk.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(e,t,n,i,r,o){this._drawPendingPt(),vZ[0]=i,vZ[1]=r,vH(vZ,o),i=vZ[0];var a=(r=vZ[1])-i;return this.addData(vk.A,e,t,n,n,i,a,0,+!o),this._ctx&&this._ctx.arc(e,t,n,i,r,o),this._xi=vL(r)*n+e,this._yi=vB(r)*n+t,this},t.prototype.arcTo=function(e,t,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,r),this},t.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(vk.R,e,t,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(vk.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&vV&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},t.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();vV&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var 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},t.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]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.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}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,vV&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){vI[0]=vI[1]=vP[0]=vP[1]=Number.MAX_VALUE,vA[0]=vA[1]=vO[0]=vO[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&&(n=t[e],i=t[e+1],r=n,o=i),a){case vk.M:n=r=t[e++],i=o=t[e++],vP[0]=r,vP[1]=o,vO[0]=r,vO[1]=o;break;case vk.L:v_(n,i,t[e],t[e+1],vP,vO),n=t[e++],i=t[e++];break;case vk.C:(function(e,t,n,i,r,o,a,s,l,u){var c=fH(e,n,r,a,vC);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<c;h++){var d=fV(e,n,r,a,vC[h]);l[0]=vg(d,l[0]),u[0]=vm(d,u[0])}c=fH(t,i,o,s,vM);for(var h=0;h<c;h++){var p=fV(t,i,o,s,vM[h]);l[1]=vg(p,l[1]),u[1]=vm(p,u[1])}l[0]=vg(e,l[0]),u[0]=vm(e,u[0]),l[0]=vg(a,l[0]),u[0]=vm(a,u[0]),l[1]=vg(t,l[1]),u[1]=vm(t,u[1]),l[1]=vg(s,l[1]),u[1]=vm(s,u[1])})(n,i,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],vP,vO),n=t[e++],i=t[e++];break;case vk.Q:(function(e,t,n,i,r,o,a,s){var l=vm(vg(fU(e,n,r),1),0),u=vm(vg(fU(t,i,o),1),0),c=f$(e,n,r,l),h=f$(t,i,o,u);a[0]=vg(e,r,c),a[1]=vg(t,o,h),s[0]=vm(e,r,c),s[1]=vm(t,o,h)})(n,i,t[e++],t[e++],t[e],t[e+1],vP,vO),n=t[e++],i=t[e++];break;case vk.A:var l=t[e++],u=t[e++],c=t[e++],h=t[e++],d=t[e++],p=t[e++]+d;e+=1;var f=!t[e++];s&&(r=vL(d)*c+l,o=vB(d)*h+u),function(e,t,n,i,r,o,a,s,l){var u=Math.abs(r-o);if(u%vx<1e-4&&u>1e-4){s[0]=e-n,s[1]=t-i,l[0]=e+n,l[1]=t+i;return}if(vb[0]=vy(r)*n+e,vb[1]=vv(r)*i+t,vw[0]=vy(o)*n+e,vw[1]=vv(o)*i+t,pO(s,vb,vw),pR(l,vb,vw),(r%=vx)<0&&(r+=vx),(o%=vx)<0&&(o+=vx),r>o&&!a?o+=vx:r<o&&a&&(r+=vx),a){var c=o;o=r,r=c}for(var h=0;h<o;h+=Math.PI/2)h>r&&(vS[0]=vy(h)*n+e,vS[1]=vv(h)*i+t,pO(s,vS,s),pR(l,vS,l))}(l,u,c,h,d,p,f,vP,vO),n=vL(p)*c+l,i=vB(p)*h+u;break;case vk.R:v_(r=n=t[e++],o=i=t[e++],r+t[e++],o+t[e++],vP,vO);break;case vk.Z:n=r,i=o}pO(vI,vI,vP),pR(vA,vA,vO)}return 0===e&&(vI[0]=vI[1]=vA[0]=vA[1]=0),new fh(vI[0],vI[1],vA[0]-vI[0],vA[1]-vI[1])},t.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,h=0;h<t;){var d=e[h++],p=1===h;p&&(r=e[h],o=e[h+1],a=r,s=o);var f=-1;switch(d){case vk.M:r=a=e[h++],o=s=e[h++];break;case vk.L:var g=e[h++],m=e[h++],v=g-r,y=m-o;(vN(v)>n||vN(y)>i||h===t-1)&&(f=Math.sqrt(v*v+y*y),r=g,o=m);break;case vk.C:var x=e[h++],b=e[h++],g=e[h++],m=e[h++],w=e[h++],S=e[h++];f=function(e,t,n,i,r,o,a,s,l){for(var u=e,c=t,h=0,d=1;d<=10;d++){var p=.1*d,f=fV(e,n,r,a,p),g=fV(t,i,o,s,p),m=f-u,v=g-c;h+=Math.sqrt(m*m+v*v),u=f,c=g}return h}(r,o,x,b,g,m,w,S,10),r=w,o=S;break;case vk.Q:var x=e[h++],b=e[h++],g=e[h++],m=e[h++];f=function(e,t,n,i,r,o,a){for(var s=e,l=t,u=0,c=1;c<=10;c++){var h=.1*c,d=f$(e,n,r,h),p=f$(t,i,o,h),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,x,b,g,m,10),r=g,o=m;break;case vk.A:var _=e[h++],C=e[h++],M=e[h++],k=e[h++],T=e[h++],D=e[h++],I=D+T;h+=1,p&&(a=vL(T)*M+_,s=vB(T)*k+C),f=vE(M,k)*vR(vz,Math.abs(D)),r=vL(I)*M+_,o=vB(I)*k+C;break;case vk.R:a=r=e[h++],s=o=e[h++],f=2*e[h++]+2*e[h++];break;case vk.Z:var v=a-r,y=s-o;f=Math.sqrt(v*v+y*y),r=a,o=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(e,t){var n,i,r,o,a,s,l,u,c,h,d=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))t:for(var b=0;b<g;){var w=d[b++],S=1===b;switch(S&&(r=d[b],o=d[b+1],n=r,i=o),w!==vk.L&&x>0&&(e.lineTo(c,h),x=0),w){case vk.M:n=r=d[b++],i=o=d[b++],e.moveTo(r,o);break;case vk.L:a=d[b++],s=d[b++];var _=vN(a-r),C=vN(s-o);if(_>p||C>f){if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;e.lineTo(r*(1-k)+a*k,o*(1-k)+s*k);break t}v+=M}e.lineTo(a,s),r=a,o=s,x=0}else{var T=_*_+C*C;T>x&&(c=a,h=s,x=T)}break;case vk.C:var D=d[b++],I=d[b++],A=d[b++],P=d[b++],O=d[b++],R=d[b++];if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;fW(r,D,A,O,k,vT),fW(o,I,P,R,k,vD),e.bezierCurveTo(vT[1],vD[1],vT[2],vD[2],vT[3],vD[3]);break t}v+=M}e.bezierCurveTo(D,I,A,P,O,R),r=O,o=R;break;case vk.Q:var D=d[b++],I=d[b++],A=d[b++],P=d[b++];if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;fq(r,D,A,k,vT),fq(o,I,P,k,vD),e.quadraticCurveTo(vT[1],vD[1],vT[2],vD[2]);break t}v+=M}e.quadraticCurveTo(D,I,A,P),r=A,o=P;break;case vk.A:var E=d[b++],L=d[b++],B=d[b++],N=d[b++],F=d[b++],z=d[b++],V=d[b++],Z=!d[b++],j=B>N?B:N,H=vN(B-N)>.001,W=F+z,$=!1;if(m){var M=l[y++];v+M>u&&(W=F+z*(u-v)/M,$=!0),v+=M}if(H&&e.ellipse?e.ellipse(E,L,B,N,V,F,W,Z):e.arc(E,L,j,F,W,Z),$)break t;S&&(n=vL(F)*B+E,i=vB(F)*N+L),r=vL(W)*B+E,o=vB(W)*N+L;break;case vk.R:n=r=d[b],i=o=d[b+1],a=d[b++],s=d[b++];var G=d[b++],U=d[b++];if(m){var M=l[y++];if(v+M>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+vR(q,G),s),(q-=G)>0&&e.lineTo(a+G,s+vR(q,U)),(q-=U)>0&&e.lineTo(a+vE(G-q,0),s+U),(q-=G)>0&&e.lineTo(a,s+vE(U-q,0));break t}v+=M}e.rect(a,s,G,U);break;case vk.Z:if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;e.lineTo(r*(1-k)+n*k,o*(1-k)+i*k);break t}v+=M}e.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=vk,t.initDefaultProps=void((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0),t}();function v$(e,t,n,i,r,o,a){if(0===r)return!1;var s=0,l=e;if(a>t+r&&a>i+r||a<t-r&&a<i-r||o>e+r&&o>n+r||o<e-r&&o<n-r)return!1;if(e===n)return Math.abs(o-e)<=r/2;s=(t-i)/(e-n);var u=s*o-a+(l=(e*i-n*t)/(e-n));return u*u/(s*s+1)<=r/2*r/2}var vG=2*Math.PI;function vU(e){return(e%=vG)<0&&(e+=vG),e}var vq=2*Math.PI;function vY(e,t,n,i,r,o){if(o>t&&o>i||o<t&&o<i||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 vX=vW.CMD,vK=2*Math.PI,vQ=[-1,-1,-1],vJ=[-1,-1];function v0(e,t,n,i,r){for(var o,a,s=e.data,l=e.len(),u=0,c=0,h=0,d=0,p=0,f=0;f<l;){var g,m,v,y,x,b,w,S,_,C,M,k,T,D,I=s[f++],A=1===f;switch(I===vX.M&&f>1&&!n&&(u+=vY(c,h,d,p,i,r)),A&&(c=s[f],h=s[f+1],d=c,p=h),I){case vX.M:d=s[f++],p=s[f++],c=d,h=p;break;case vX.L:if(n){if(v$(c,h,s[f],s[f+1],t,i,r))return!0}else u+=vY(c,h,s[f],s[f+1],i,r)||0;c=s[f++],h=s[f++];break;case vX.C:if(n){if(g=c,m=h,v=s[f++],y=s[f++],x=s[f++],b=s[f++],w=s[f],S=s[f+1],0!==t&&(!(r>m+t)||!(r>y+t)||!(r>b+t)||!(r>S+t))&&(!(r<m-t)||!(r<y-t)||!(r<b-t)||!(r<S-t))&&(!(i>g+t)||!(i>v+t)||!(i>x+t)||!(i>w+t))&&(!(i<g-t)||!(i<v-t)||!(i<x-t)||!(i<w-t))&&function(e,t,n,i,r,o,a,s,l,u,c){var h,d,p,f,g,m=.005,v=1/0;fL[0]=l,fL[1]=u;for(var y=0;y<1;y+=.05)fB[0]=fV(e,n,r,a,y),fB[1]=fV(t,i,o,s,y),(f=pI(fL,fB))<v&&(h=y,v=f);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=h-m,p=h+m,fB[0]=fV(e,n,r,a,d),fB[1]=fV(t,i,o,s,d),f=pI(fB,fL),d>=0&&f<v?(h=d,v=f):(fN[0]=fV(e,n,r,a,p),fN[1]=fV(t,i,o,s,p),g=pI(fN,fL),p<=1&&g<v?(h=p,v=g):m*=.5);return fO(v)}(g,m,v,y,x,b,w,S,i,r,0)<=t/2)return!0}else u+=function(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=fj(t,i,o,s,u,vQ);if(0===c)return 0;for(var h=0,d=-1,p=void 0,f=void 0,g=0;g<c;g++){var m=vQ[g],v=0===m||1===m?.5:1;!(fV(e,n,r,a,m)<l)&&(d<0&&(d=fH(t,i,o,s,vJ),vJ[1]<vJ[0]&&d>1&&function(){var e=vJ[0];vJ[0]=vJ[1],vJ[1]=e}(),p=fV(t,i,o,s,vJ[0]),d>1&&(f=fV(t,i,o,s,vJ[1]))),2===d?m<vJ[0]?h+=p<t?v:-v:m<vJ[1]?h+=f<p?v:-v:h+=s<f?v:-v:m<vJ[0]?h+=p<t?v:-v:h+=s<p?v:-v)}return h}(c,h,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],i,r)||0;c=s[f++],h=s[f++];break;case vX.Q:if(n){if(_=c,C=h,M=s[f++],k=s[f++],T=s[f],D=s[f+1],0!==t&&(!(r>C+t)||!(r>k+t)||!(r>D+t))&&(!(r<C-t)||!(r<k-t)||!(r<D-t))&&(!(i>_+t)||!(i>M+t)||!(i>T+t))&&(!(i<_-t)||!(i<M-t)||!(i<T-t))&&function(e,t,n,i,r,o,a,s,l){var u,c=.005,h=1/0;fL[0]=a,fL[1]=s;for(var d=0;d<1;d+=.05){fB[0]=f$(e,n,r,d),fB[1]=f$(t,i,o,d);var p=pI(fL,fB);p<h&&(u=d,h=p)}h=1/0;for(var f=0;f<32&&!(c<1e-4);f++){var g=u-c,m=u+c;fB[0]=f$(e,n,r,g),fB[1]=f$(t,i,o,g);var p=pI(fB,fL);if(g>=0&&p<h)u=g,h=p;else{fN[0]=f$(e,n,r,m),fN[1]=f$(t,i,o,m);var v=pI(fN,fL);m<=1&&v<h?(u=m,h=v):c*=.5}}return fO(h)}(_,C,M,k,T,D,i,r,0)<=t/2)return!0}else u+=function(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(fF(o)){if(fz(a)){var u=-s/a;u>=0&&u<=1&&(r[l++]=u)}}else{var c=a*a-4*o*s;if(fF(c)){var u=-a/(2*o);u>=0&&u<=1&&(r[l++]=u)}else if(c>0){var h=fO(c),u=(-a+h)/(2*o),d=(-a-h)/(2*o);u>=0&&u<=1&&(r[l++]=u),d>=0&&d<=1&&(r[l++]=d)}}return l}(t,i,o,s,vQ);if(0===l)return 0;var u=fU(t,i,o);if(u>=0&&u<=1){for(var c=0,h=f$(t,i,o,u),d=0;d<l;d++){var p=0===vQ[d]||1===vQ[d]?.5:1,f=f$(e,n,r,vQ[d]);!(f<a)&&(vQ[d]<u?c+=h<t?p:-p:c+=o<h?p:-p)}return c}var p=0===vQ[0]||1===vQ[0]?.5:1,f=f$(e,n,r,vQ[0]);return f<a?0:o<t?p:-p}(c,h,s[f++],s[f++],s[f],s[f+1],i,r)||0;c=s[f++],h=s[f++];break;case vX.A:var P=s[f++],O=s[f++],R=s[f++],E=s[f++],L=s[f++],B=s[f++];f+=1;var N=!!(1-s[f++]);o=Math.cos(L)*R+P,a=Math.sin(L)*E+O,A?(d=o,p=a):u+=vY(c,h,o,a,i,r);var F=(i-P)*E/R+P;if(n){if(function(e,t,n,i,r,o,a,s,l){if(0===a)return!1;var u=Math.sqrt((s-=e)*s+(l-=t)*l);if(u-a>n||u+a<n)return!1;if(Math.abs(i-r)%vq<1e-4)return!0;if(o){var c=i;i=vU(r),r=vU(c)}else i=vU(i),r=vU(r);i>r&&(r+=vq);var h=Math.atan2(l,s);return h<0&&(h+=vq),h>=i&&h<=r||h+vq>=i&&h+vq<=r}(P,O,E,L,L+B,N,t,F,r))return!0}else u+=function(e,t,n,i,r,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);vQ[0]=-l,vQ[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=vK-1e-4){i=0,r=vK;var c=o?1:-1;return a>=vQ[0]+e&&a<=vQ[1]+e?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=vK,r+=vK);for(var d=0,p=0;p<2;p++){var f=vQ[p];if(f+e>a){var g=Math.atan2(s,f),c=o?1:-1;g<0&&(g=vK+g),(g>=i&&g<=r||g+vK>=i&&g+vK<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}(P,O,E,L,L+B,N,F,r);c=Math.cos(L+B)*R+P,h=Math.sin(L+B)*E+O;break;case vX.R:d=c=s[f++],p=h=s[f++];var z=s[f++],V=s[f++];if(o=d+z,a=p+V,n){if(v$(d,p,o,p,t,i,r)||v$(o,p,o,a,t,i,r)||v$(o,a,d,a,t,i,r)||v$(d,a,d,p,t,i,r))return!0}else u+=vY(o,p,o,a,i,r),u+=vY(d,a,d,p,i,r);break;case vX.Z:if(n){if(v$(c,h,d,p,t,i,r))return!0}else u+=vY(c,h,d,p,i,r);c=d,h=p}}return!n&&!(1e-4>Math.abs(h-p))&&(u+=vY(c,h,d,p,i,r)||0),0!==u}var v1=dU({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},vl),v2={style:dU({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},vu.style)},v5=gY.concat(["invisible","culling","z","z2","zlevel","parent"]);let v3=function(e){var t;function n(t){return e.call(this,t)||this}return pS(n,e),n.prototype.update=function(){var t=this;e.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new n;r.buildPath===n.prototype.buildPath&&(r.buildPath=function(e){t.buildPath(e,t.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<v5.length;++s)r[v5[s]]=this[v5[s]];r.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(t){var n=d1(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?dG(this.style,a):this.useStyle(a):"shape"===o?dG(this.shape,a):e.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var e=this.style.fill;if("none"!==e){if(d8(e)){var t=gu(e,0);return t>.5?gZ:t>.2?"#eee":gj}if(e)return gj}return gZ},n.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(d8(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>gu(e,0))return t}},n.prototype.buildPath=function(e,t,n){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(e){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},n.prototype.createPathProxy=function(){this.path=new vW(!1)},n.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0},n.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},n.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},n.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)),v0(o,a/s,!0,e,t)))return!0}if(this.hasFill())return v0(o,0,!1,e,t)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(e){return this.animate("shape",e)},n.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},n.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:dG(n,e),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(e){return pm(v1,e)},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=dG({},this.shape))},n.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=dG({},i.shape),dG(s,n.shape)):(s=dG({},r?this.shape:i.shape),dG(s,n.shape)):l&&(s=i.shape),s){if(o){this.shape=dG({},this.shape);for(var u={},c=d1(s),h=0;h<c.length;h++){var d=c[h];"object"==typeof s[d]?this.shape[d]=s[d]:u[d]=s[d]}this._transitionState(t,{shape:u},a)}else this.shape=s,this.dirtyShape()}},n.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},n.prototype.getAnimationStyleProps=function(){return v2},n.prototype.isZeroArea=function(){return!1},n.extend=function(e){var t=function(t){function n(n){var i=t.call(this,n)||this;return e.init&&e.init.call(i,n),i}return pS(n,t),n.prototype.getDefaultStyle=function(){return dW(e.style)},n.prototype.getDefaultShape=function(){return dW(e.shape)},n}(n);for(var i in e)"function"==typeof e[i]&&(t.prototype[i]=e[i]);return t},n.initDefaultProps=void((t=n.prototype).type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=7),n}(vd);var v4=dU({strokeFirst:!0,font:dD,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},v1),v8=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pS(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 pm(v4,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=gJ(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}(vd);v8.prototype.type="tspan";var v6=dU({x:0,y:0},vl),v9={style:dU({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},vu.style)},v7=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pS(t,e),t.prototype.createStyle=function(e){return pm(v6,e)},t.prototype._getSize=function(e){var t,n=this.style,i=n[e];if(null!=i)return i;var r=(t=n.image)&&"string"!=typeof t&&t.width&&t.height?n.image:this.__image;if(!r)return 0;var o="width"===e?"height":"width",a=n[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 v9},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new fh(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(vd);v7.prototype.type="image";let ye=v7;var yt=Math.round;function yn(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&&(yt(2*i)===yt(2*r)&&(e.x1=e.x2=yr(i,s,!0)),yt(2*o)===yt(2*a)&&(e.y1=e.y2=yr(o,s,!0))),e}}function yi(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=yr(i,s,!0),e.y=yr(r,s,!0),e.width=Math.max(yr(i+o,s,!1)-e.x,+(0!==o)),e.height=Math.max(yr(r+a,s,!1)-e.y,+(0!==a))),e}}function yr(e,t,n){if(!t)return e;var i=yt(2*e);return(i+yt(t))%2==0?i/2:(i+(n?1:-1))/2}var yo=function(){this.x=0,this.y=0,this.width=0,this.height=0},ya={},ys=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultShape=function(){return new yo},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,i,r,o,a,s,l,u,c,h,d,p,f,g,m,v=yi(ya,t,this.style);p=v.x,f=v.y,g=v.width,m=v.height,v.r=t.r,t=v}else p=t.x,f=t.y,g=t.width,m=t.height;t.r?(l=(n=t).x,u=n.y,c=n.width,h=n.height,d=n.r,c<0&&(l+=c,c=-c),h<0&&(u+=h,h=-h),"number"==typeof d?i=r=o=a=d:d instanceof Array?1===d.length?i=r=o=a=d[0]:2===d.length?(i=o=d[0],r=a=d[1]):3===d.length?(i=d[0],r=a=d[1],o=d[2]):(i=d[0],r=d[1],o=d[2],a=d[3]):i=r=o=a=0,i+r>c&&(s=i+r,i*=c/s,r*=c/s),o+a>c&&(s=o+a,o*=c/s,a*=c/s),r+o>h&&(s=r+o,r*=h/s,o*=h/s),i+a>h&&(s=i+a,i*=h/s,a*=h/s),e.moveTo(l+i,u),e.lineTo(l+c-r,u),0!==r&&e.arc(l+c-r,u+r,r,-Math.PI/2,0),e.lineTo(l+c,u+h-o),0!==o&&e.arc(l+c-o,u+h-o,o,0,Math.PI/2),e.lineTo(l+a,u+h),0!==a&&e.arc(l+a,u+h-a,a,Math.PI/2,Math.PI),e.lineTo(l,u+i),0!==i&&e.arc(l+i,u+i,i,Math.PI,1.5*Math.PI)):e.rect(p,f,g,m)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(v3);ys.prototype.type="rect";let yl=ys;var yu={fill:"#000"},yc={style:dU({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},vu.style)},yh=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=yu,n.attr(t),n}return pS(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,ym(e=this.style),dK(e.rich,ym),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 fh(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||yu},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,i=e.rich||n&&{};return dG(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=d1(t),i=0;i<n.length;i++){var r=n[i];e[r]=e[r]||{},dG(e[r],t[r])}},t.prototype.getAnimationStyleProps=function(){return yc},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||dD,n=e.padding,i=function(e,t){null!=e&&(e+="");var n,i=t.overflow,r=t.padding,o=t.font,a=g2(o),s=po(t.lineHeight,a),l=!!t.backgroundColor,u="truncate"===t.lineOverflow,c=t.width,h=(n=null!=c&&("break"===i||"breakAll"===i)?e?va(e,t.font,c,"breakAll"===i,0).lines:[]:e?e.split("\n"):[]).length*s,d=po(t.height,h);if(h>d&&u){var p=Math.floor(d/s);n=n.slice(0,p)}if(e&&"truncate"===i&&null!=c)for(var f=m7(c,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g<n.length;g++)n[g]=ve(n[g],f);for(var m=d,v=0,g=0;g<n.length;g++)v=Math.max(gK(n[g],o),v);null==c&&(c=v);var y=v;return r&&(m+=r[0]+r[2],y+=r[1]+r[3],c+=r[1]+r[3]),l&&(y=c),{lines:n,height:d,outerWidth:y,outerHeight:m,lineHeight:s,calculatedLineHeight:a,contentWidth:v,contentHeight:h,width:c}}(yb(e),e),r=yw(e),o=!!e.backgroundColor,a=i.outerHeight,s=i.outerWidth,l=i.contentWidth,u=i.lines,c=i.lineHeight,h=this._defaultStyle,d=e.x||0,p=e.y||0,f=e.align||h.align||"left",g=e.verticalAlign||h.verticalAlign||"top",m=d,v=g1(p,i.contentHeight,g);if(r||n){var y=g0(d,s,f),x=g1(p,a,g);r&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=yx(d,f,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var b=0,w=!1,S=yy("fill"in e?e.fill:(w=!0,h.fill)),_=yv("stroke"in e?e.stroke:o||h.autoStroke&&!w?null:(b=2,h.stroke)),C=e.textShadowBlur>0,M=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),k=i.calculatedLineHeight,T=0;T<u.length;T++){var D=this._getOrCreateChild(v8),I=D.createStyle();D.useStyle(I),I.text=u[T],I.x=m,I.y=v,f&&(I.textAlign=f),I.textBaseline="middle",I.opacity=e.opacity,I.strokeFirst=!0,C&&(I.shadowBlur=e.textShadowBlur||0,I.shadowColor=e.textShadowColor||"transparent",I.shadowOffsetX=e.textShadowOffsetX||0,I.shadowOffsetY=e.textShadowOffsetY||0),I.stroke=_,I.fill=S,_&&(I.lineWidth=e.lineWidth||b,I.lineDash=e.lineDash,I.lineDashOffset=e.lineDashOffset||0),I.font=t,yg(I,e),v+=c,M&&D.setBoundingRect(new fh(g0(I.x,e.width,I.textAlign),g1(I.y,k,I.textBaseline),l,k))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n,i=new vi;if(null!=e&&(e+=""),!e)return i;for(var r=t.width,o=t.height,a=t.overflow,s=("break"===a||"breakAll"===a)&&null!=r?{width:r,accumWidth:0,breakAll:"breakAll"===a}:null,l=m9.lastIndex=0;null!=(n=m9.exec(e));){var u=n.index;u>l&&vr(i,e.substring(l,u),t,s),vr(i,n[2],t,s,n[1]),l=m9.lastIndex}l<e.length&&vr(i,e.substring(l,e.length),t,s);var c=[],h=0,d=0,p=t.padding,f="truncate"===a,g="truncate"===t.lineOverflow;function m(e,t,n){e.width=t,e.lineHeight=n,h+=n,d=Math.max(d,t)}n:for(var v=0;v<i.lines.length;v++){for(var y=i.lines[v],x=0,b=0,w=0;w<y.tokens.length;w++){var S=y.tokens[w],_=S.styleName&&t.rich[S.styleName]||{},C=S.textPadding=_.padding,M=C?C[1]+C[3]:0,k=S.font=_.font||t.font;S.contentHeight=g2(k);var T=po(_.height,S.contentHeight);if(S.innerHeight=T,C&&(T+=C[0]+C[2]),S.height=T,S.lineHeight=pa(_.lineHeight,t.lineHeight,T),S.align=_&&_.align||t.align,S.verticalAlign=_&&_.verticalAlign||"middle",g&&null!=o&&h+S.lineHeight>o){w>0?(y.tokens=y.tokens.slice(0,w),m(y,b,x),i.lines=i.lines.slice(0,v+1)):i.lines=i.lines.slice(0,v);break n}var D=_.width,I=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))S.percentWidth=D,c.push(S),S.contentWidth=gK(S.text,k);else{if(I){var A=_.backgroundColor,P=A&&A.image;P&&m6(P=function(e){if("string"!=typeof e)return e;var t=m3.get(e);return t&&t.image}(P))&&(S.width=Math.max(S.width,P.width*T/P.height))}var O=f&&null!=r?r-b:null;null!=O&&O<S.width?!I||O<M?(S.text="",S.width=S.contentWidth=0):(S.text=function(e,t,n,i,r){if(!t)return"";var o=(e+"").split("\n");r=m7(t,n,i,r);for(var a=0,s=o.length;a<s;a++)o[a]=ve(o[a],r);return o.join("\n")}(S.text,O-M,k,t.ellipsis,{minChar:t.truncateMinChar}),S.width=S.contentWidth=gK(S.text,k)):S.contentWidth=gK(S.text,k)}S.width+=M,b+=S.width,_&&(x=Math.max(x,S.lineHeight))}m(y,b,x)}i.outerWidth=i.width=po(r,d),i.outerHeight=i.height=po(o,h),i.contentHeight=h,i.contentWidth=d,p&&(i.outerWidth+=p[1]+p[3],i.outerHeight+=p[0]+p[2]);for(var v=0;v<c.length;v++){var S=c[v],R=S.percentWidth;S.width=parseInt(R,10)/100*i.width}return i}(yb(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,h=g0(a,i,u),d=g1(s,r,c),p=h,f=d;o&&(p+=o[3],f+=o[0]);var g=p+n;yw(e)&&this._renderBackground(e,e,h,d,i,r);for(var m=!!e.backgroundColor,v=0;v<t.lines.length;v++){for(var y=t.lines[v],x=y.tokens,b=x.length,w=y.lineHeight,S=y.width,_=0,C=p,M=g,k=b-1,T=void 0;_<b&&(!(T=x[_]).align||"left"===T.align);)this._placeToken(T,e,w,f,C,"left",m),S-=T.width,C+=T.width,_++;for(;k>=0&&"right"===(T=x[k]).align;)this._placeToken(T,e,w,f,M,"right",m),S-=T.width,M-=T.width,k--;for(C+=(n-(C-p)-(g-M)-S)/2;_<=k;)T=x[_],this._placeToken(T,e,w,f,C+T.width/2,"center",m),C+=T.width,_++;f+=w}},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&&yw(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,h=e.textPadding;h&&(r=yx(r,o,h),u-=e.height/2-h[0]-e.innerHeight/2);var d=this._getOrCreateChild(v8),p=d.createStyle();d.useStyle(p);var f=this._defaultStyle,g=!1,m=0,v=yy("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,f.fill)),y=yv("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||dD,p.opacity=pa(s.opacity,t.opacity,1),yg(p,s),y&&(p.lineWidth=pa(s.lineWidth,t.lineWidth,m),p.lineDash=po(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var b=e.contentWidth,w=e.contentHeight;d.setBoundingRect(new fh(g0(p.x,b,p.textAlign),g1(p.y,w,p.textBaseline),b,w))},t.prototype._renderBackground=function(e,t,n,i,r,o){var a,s,l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,h=l&&l.image,d=l&&!h,p=e.borderRadius,f=this;if(d||e.lineHeight||u&&c){(a=this._getOrCreateChild(yl)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=p,a.dirtyShape()}if(d){var m=a.style;m.fill=l||null,m.fillOpacity=po(e.fillOpacity,1)}else if(h){(s=this._getOrCreateChild(ye)).onload=function(){f.dirtyStyle()};var v=s.style;v.image=l.image,v.x=n,v.y=i,v.width=r,v.height=o}if(u&&c){var m=a.style;m.lineWidth=u,m.stroke=c,m.strokeOpacity=po(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(m.strokeFirst=!0,m.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=pa(e.opacity,t.opacity,1)},t.makeFont=function(e){var t,n,i="";return(null!=(t=e).fontSize||t.fontFamily||t.fontWeight)&&(i=[e.fontStyle,e.fontWeight,"string"==typeof(n=e.fontSize)&&(-1!==n.indexOf("px")||-1!==n.indexOf("rem")||-1!==n.indexOf("em"))?n:isNaN(+n)?"12px":n+"px",e.fontFamily||"sans-serif"].join(" ")),i&&pc(i)||e.textFont||e.font},t}(vd),yd={left:!0,right:1,center:1},yp={top:1,bottom:1,middle:1},yf=["fontStyle","fontWeight","fontSize","fontFamily"];function yg(e,t){for(var n=0;n<yf.length;n++){var i=yf[n],r=t[i];null!=r&&(e[i]=r)}}function ym(e){if(e){e.font=yh.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||yd[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||yp[n]?n:"top",e.padding&&(e.padding=pl(e.padding))}}function yv(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function yy(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function yx(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function yb(e){var t=e.text;return null!=t&&(t+=""),t}function yw(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}let yS=yh;var y_=mN(),yC=function(e,t,n,i){if(i){var r=y_(i);r.dataIndex=n,r.dataType=t,r.seriesIndex=e,r.ssrType="chart","group"===i.type&&i.traverse(function(i){var r=y_(i);r.seriesIndex=e,r.dataIndex=n,r.dataType=t,r.ssrType="chart"})}},yM=1,yk={},yT=mN(),yD=mN(),yI=["emphasis","blur","select"],yA=["normal","emphasis","blur","select"],yP="highlight",yO="downplay",yR="select",yE="unselect",yL="toggleSelect";function yB(e){return null!=e&&"none"!==e}function yN(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function yF(e){yN(e,"emphasis",2)}function yz(e){2===e.hoverState&&yN(e,"normal",0)}function yV(e){yN(e,"blur",1)}function yZ(e){1===e.hoverState&&yN(e,"normal",0)}function yj(e){e.selected=!0}function yH(e){e.selected=!1}function yW(e,t,n){t(e,n),e.isGroup&&e.traverse(function(e){t(e,n)})}function y$(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 yG(e,t){var n,i,r,o,a,s=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,i){var r=n&&dq(n,"select")>=0,o=!1;if(e instanceof v3){var a=yT(e),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(yB(s)||yB(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=dG({},i),(u=dG({},u)).fill=s):!yB(u.fill)&&yB(s)?(o=!0,i=dG({},i),(u=dG({},u)).fill=gh(s)):!yB(u.stroke)&&yB(l)&&(o||(i=dG({},i),u=dG({},u)),u.stroke=gh(l)),i.style=u}}if(i&&null==i.z2){o||(i=dG({},i));var c=e.z2EmphasisLift;i.z2=e.z2+(null!=c?c:10)}return i}(this,0,t,s);if("blur"===e)return n=s,i=dq(this.currentStates,e)>=0,r=this.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(var a=0;a<e.animators.length;a++){var u=e.animators[a];u.__fromStateTransition&&0>u.__fromStateTransition.indexOf(n)&&"style"===u.targetName&&u.saveTo(o,t)}return o}(this,["opacity"],e,{opacity:1}),null==(a=(n=n||{}).style||{}).opacity&&(n=dG({},n),a=dG({opacity:i?r:.1*o.opacity},a),n.style=a),n;if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=dG({},n);var i=e.z2SelectLift;n.z2=e.z2+(null!=i?i:9)}return n}(this,0,s)}return s}function yU(e){e.stateProxy=yG;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=yG),n&&(n.stateProxy=yG)}function yq(e,t){yQ(e,t)||e.__highByOuter||yW(e,yF)}function yY(e,t){yQ(e,t)||e.__highByOuter||yW(e,yz)}function yX(e,t){e.__highByOuter|=1<<(t||0),yW(e,yF)}function yK(e,t){(e.__highByOuter&=~(1<<(t||0)))||yW(e,yz)}function yQ(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function yJ(e){var t=e.getModel(),n=[],i=[];t.eachComponent(function(t,r){var o=yD(r),a="series"===t,s=a?e.getViewOfSeriesModel(r):e.getViewOfComponentModel(r);a||i.push(s),o.isBlured&&(s.group.traverse(function(e){yZ(e)}),a&&n.push(r)),o.isBlured=!1}),dK(i,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function y0(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&&yW(i,yZ)}}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;u&&u.master&&(u=u.master);var c=u&&s?u===s:r;if(!("series"===n&&!r||"coordinateSystem"===n&&!c||"series"===t&&r)){if(i.getViewOfSeriesModel(e).group.traverse(function(e){(!e.__highByOuter||!r||"self"!==t)&&yV(e)}),dX(t))o(e.getData(),t);else if(d7(t))for(var h=d1(t),d=0;d<h.length;d++)o(e.getData(h[d]),t[h[d]]);l.push(e),yD(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 y1(e,t,n){if(null!=e&&null!=t){var i=n.getModel().getComponent(e,t);if(i){yD(i).isBlured=!0;var r=n.getViewOfComponentModel(i);r&&r.focusBlurEnabled&&r.group.traverse(function(e){yV(e)})}}}function y2(e,t,n,i){var r,o={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return o;var a=i.getModel().getComponent(e,t);if(!a)return o;var s=i.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return o;for(var l=s.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===y_(l[u]).focus){r=!0;break}return{focusSelf:r,dispatchers:l}}function y5(e){dK(e.getAllData(),function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,i)?yW(t,yj):yW(t,yH)})})}function y3(e,t,n){var i,r,o,a;y7(e,!0),yW(e,yU),i=e,r=t,o=n,a=y_(i),null!=r?(a.focus=r,a.blurScope=o):a.focus&&(a.focus=null)}function y4(e,t,n,i){i?y7(e,!1):y3(e,t,n)}var y8=["emphasis","blur","select"],y6={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function y9(e,t,n,i){n=n||"itemStyle";for(var r=0;r<y8.length;r++){var o=y8[r],a=t.getModel([o,n]);e.ensureState(o).style=i?i(a):a[y6[n]]()}}function y7(e,t){var n=!1===t;e.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||e.__highDownDispatcher)&&(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function xe(e){return!!(e&&e.__highDownDispatcher)}function xt(e){var t=e.type;return t===yR||t===yE||t===yL}function xn(e){var t=e.type;return t===yP||t===yO}var xi=mN();function xr(e,t,n,i,r){if(t&&t.ecModel){var o,a=t.ecModel.getUpdatePayload();o=a&&a.animation}var s=t&&t.isAnimationEnabled(),l="update"===e;if(!s)return null;var u=void 0,c=void 0,h=void 0;return i?(u=po(i.duration,200),c=po(i.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),c=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(u=o.duration),null!=o.easing&&(c=o.easing),null!=o.delay&&(h=o.delay)),d4(h)&&(h=h(n,r)),d4(u)&&(u=u(n)),{duration:u||0,delay:h,easing:c}}function xo(e,t,n,i,r,o,a){var s,l=!1;d4(r)?(a=o,o=r,r=null):d7(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=xr(e,i,r,u?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(t,r):null);if(c&&c.duration>0){var h={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,h):t.animateTo(n,h)}else t.stopAnimation(),l||t.attr(n),a&&a(1),o&&o()}function xa(e,t,n,i,r,o){xo("update",e,t,n,i,r,o)}function xs(e,t,n,i,r,o){xo("enter",e,t,n,i,r,o)}function xl(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 xu(e,t,n,i,r,o){!xl(e)&&xo("leave",e,t,n,i,r,o)}function xc(e,t,n,i){e.removeTextContent(),e.removeTextGuideLine(),xu(e,{style:{opacity:0}},t,n,i)}function xh(e,t,n){function i(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||xc(e,t,n,i)}):xc(e,t,n,i)}function xd(e){xi(e).oldStyle=e.style}var xp={};function xf(e,t){for(var n=0;n<yI.length;n++){var i=yI[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 xg(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=d4(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:i},u=0;u<yI.length;u++){var c=yI[u],h=t[c];l[c]=po(r?r.getFormattedLabel(o,c,null,a,h&&h.get("formatter")):null,i)}return l}function xm(e,t,n,i){n=n||xp;for(var r=e instanceof yS,o=!1,a=0;a<yA.length;a++){var s=t[yA[a]];if(s&&s.getShallow("show")){o=!0;break}}var l=r?e:e.getTextContent();if(o){!r&&(l||(l=new yS,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var u=xg(n,t),c=t.normal,h=!!c.getShallow("show"),d=xy(c,i&&i.normal,n,!1,!r);d.text=u.normal,r||e.setTextConfig(xx(c,n,!1));for(var a=0;a<yI.length;a++){var p=yI[a],s=t[p];if(s){var f=l.ensureState(p),g=!!po(s.getShallow("show"),h);g!==h&&(f.ignore=!g),f.style=xy(s,i&&i[p],n,!0,!r),f.style.text=u[p],r||(e.ensureState(p).textConfig=xx(s,n,!0))}}l.silent=!!c.getShallow("silent"),null!=l.style.x&&(d.x=l.style.x),null!=l.style.y&&(d.y=l.style.y),l.ignore=!h,l.useStyle(d),l.dirty(),n.enableTextSetter&&(xM(l).setLabelText=function(e){var i=xg(n,t,e);xf(l,i)})}else l&&(l.ignore=!0);e.dirty()}function xv(e,t){t=t||"label";for(var n={normal:e.getModel(t)},i=0;i<yI.length;i++){var r=yI[i];n[r]=e.getModel([r,t])}return n}function xy(e,t,n,i,r){var o={};return function(e,t,n,i,r){n=n||xp;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||xp).rich;if(n){t=t||{};for(var i=d1(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]);x_(o[u]={},c,s,n,i,r,!1,!0)}}o&&(e.rich=o);var h=t.get("overflow");h&&(e.overflow=h);var d=t.get("minMargin");null!=d&&(e.margin=d),x_(e,t,s,n,i,r,!0,!1)}(o,e,n,i,r),t&&dG(o,t),o}function xx(e,t,n){t=t||{};var i,r={},o=e.getShallow("rotate"),a=po(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 xb=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],xw=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],xS=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function x_(e,t,n,i,r,o,a,s){n=!r&&n||xp;var l=i&&i.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),h=po(t.getShallow("opacity"),n.opacity);("inherit"===u||"auto"===u)&&(u=l||null),("inherit"===c||"auto"===c)&&(c=l||null),o||(u=u||n.color,c=c||n.textBorderColor),null!=u&&(e.fill=u),null!=c&&(e.stroke=c);var d=po(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=d&&(e.lineWidth=d);var p=po(t.getShallow("textBorderType"),n.textBorderType);null!=p&&(e.lineDash=p);var f=po(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=f&&(e.lineDashOffset=f),r||null!=h||s||(h=i&&i.defaultOpacity),null!=h&&(e.opacity=h),r||o||null!=e.fill||!i.inheritColor||(e.fill=i.inheritColor);for(var g=0;g<xb.length;g++){var m=xb[g],v=po(t.getShallow(m),n[m]);null!=v&&(e[m]=v)}for(var g=0;g<xw.length;g++){var m=xw[g],v=t.getShallow(m);null!=v&&(e[m]=v)}if(null==e.verticalAlign){var y=t.getShallow("baseline");null!=y&&(e.verticalAlign=y)}if(!a||!i.disableBox){for(var g=0;g<xS.length;g++){var m=xS[g],v=t.getShallow(m);null!=v&&(e[m]=v)}var x=t.getShallow("borderType");null!=x&&(e.borderDash=x),("auto"===e.backgroundColor||"inherit"===e.backgroundColor)&&l&&(e.backgroundColor=l),("auto"===e.borderColor||"inherit"===e.borderColor)&&l&&(e.borderColor=l)}}function xC(e,t){var n=t&&t.getModel("textStyle");return pc([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 xM=mN(),xk=["textStyle","color"],xT=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],xD=new yS,xI=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(xk):null)},e.prototype.getFont=function(){return xC({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<xT.length;n++)t[xT[n]]=this.getShallow(xT[n]);return xD.useStyle(t),xD.update(),xD.getBoundingRect()},e}(),xA=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],xP=m1(xA),xO=function(){function e(){}return e.prototype.getLineStyle=function(e){return xP(this,e)},e}(),xR=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],xE=m1(xR),xL=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return xE(this,e,t)},e}(),xB=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r]},e.prototype.mergeOption=function(e,t){d$(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 this.constructor(dW(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(!dT.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}();mY(xB),k=["__\0is_clz",mK++].join("_"),xB.prototype[k]=!0,xB.isInstance=function(e){return!!(e&&e[k])},dY(xB,xO),dY(xB,xL),dY(xB,m5),dY(xB,xI);var xN=Math.round(10*Math.random());function xF(e){return[e||"",xN++].join("_")}function xz(e,t){return d$(d$({},e,!0),t,!0)}var xV={},xZ={},xj=dT.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||"EN").toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function xH(e,t){xZ[e=e.toUpperCase()]=new xB(t),xV[e]=t}xH("EN",{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:". "}}}}),xH("ZH",{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 xW={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}"},x$="{yyyy}-{MM}-{dd}",xG={year:"{yyyy}",month:"{yyyy}-{MM}",day:x$,hour:x$+" "+xW.hour,minute:x$+" "+xW.minute,second:x$+" "+xW.second,millisecond:xW.none},xU=["year","month","day","hour","minute","second","millisecond"],xq=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function xY(e,t){return e+="","0000".substr(0,t-e.length)+e}function xX(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 xK(e,t,n,i){var r=my(e),o=r[x0(n)](),a=r[x1(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[x2(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[x5(n)](),h=(c-1)%12+1,d=r[x3(n)](),p=r[x4(n)](),f=r[x8(n)](),g=(i instanceof xB?i:xZ[i||xj]||xZ.EN).getModel("time"),m=g.get("month"),v=g.get("monthAbbr"),y=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,xY(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,xY(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,xY(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,xY(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,xY(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,xY(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,xY(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,xY(f,3)).replace(/{S}/g,f+"")}function xQ(e,t){var n=my(e),i=n[x1(t)]()+1,r=n[x2(t)](),o=n[x5(t)](),a=n[x3(t)](),s=n[x4(t)](),l=0===n[x8(t)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===r;if(d&&1===i)return"year";if(d)return"month";if(h)return"day";if(c)return"hour";if(u)return"minute";else if(l)return"second";else return"millisecond"}function xJ(e,t,n){var i=d9(e)?my(e):e;switch(t=t||xQ(e,n)){case"year":return i[x0(n)]();case"half-year":return+(i[x1(n)]()>=6);case"quarter":return Math.floor((i[x1(n)]()+1)/4);case"month":return i[x1(n)]();case"day":return i[x2(n)]();case"half-day":return i[x5(n)]()/24;case"hour":return i[x5(n)]();case"minute":return i[x3(n)]();case"second":return i[x4(n)]();case"millisecond":return i[x8(n)]()}}function x0(e){return e?"getUTCFullYear":"getFullYear"}function x1(e){return e?"getUTCMonth":"getMonth"}function x2(e){return e?"getUTCDate":"getDate"}function x5(e){return e?"getUTCHours":"getHours"}function x3(e){return e?"getUTCMinutes":"getMinutes"}function x4(e){return e?"getUTCSeconds":"getSeconds"}function x8(e){return e?"getUTCMilliseconds":"getMilliseconds"}function x6(e){return e?"setUTCMonth":"setMonth"}function x9(e){return e?"setUTCDate":"setDate"}function x7(e){return e?"setUTCHours":"setHours"}function be(e){return e?"setUTCMinutes":"setMinutes"}function bt(e){return e?"setUTCSeconds":"setSeconds"}function bn(e){return e?"setUTCMilliseconds":"setMilliseconds"}function bi(e){if(isNaN(mS(e)))return d8(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function br(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}function bo(e,t,n){function i(e){return e&&pc(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?my(e):e;if(!isNaN(+s))return xK(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return d6(e)?i(e):d9(e)&&r(e)?e+"":"-";var l=mS(e);return r(l)?bi(l):d6(e)?i(e):"boolean"==typeof e?e+"":"-"}var ba=["a","b","c","d","e","f","g"],bs=function(e,t){return"{"+e+(null==t?"":t)+"}"};function bl(e,t,n){d3(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],o=0;o<r.length;o++){var a=ba[o];e=e.replace(bs(a),bs(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(bs(ba[l],s),n?pG(u):u)}return e}function bu(e,t){return t=t||"transparent",d8(e)?e:d7(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function bc(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var bh=["left","right","top","bottom","width","height"],bd=[["width","left","right"],["height","top","bottom"]];function bp(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,h,d=l.getBoundingRect(),p=t.childAt(u+1),f=p&&p.getBoundingRect();if("horizontal"===e){var g=d.width+(f?-f.x+d.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(f?-f.y+d.y:0);(h=a+m)>r||l.newline?(o+=s+n,a=0,h=m,s=d.width):s=Math.max(s,d.width)}!l.newline&&(l.x=o,l.y=a,l.markRedraw(),"horizontal"===e?o=c+n:a=h+n)})}function bf(e,t,n){n=pl(n||0);var i=t.width,r=t.height,o=mc(e.left,i),a=mc(e.top,r),s=mc(e.right,i),l=mc(e.bottom,r),u=mc(e.width,i),c=mc(e.height,r),h=n[2]+n[0],d=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(c)&&(c=r-l-h-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-d),isNaN(a)&&(a=r-l-c-h),e.left||e.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-d}switch(e.top||e.bottom){case"middle":case"center":a=r/2-c/2-n[0];break;case"bottom":a=r-c-h}o=o||0,a=a||0,isNaN(u)&&(u=i-d-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var f=new fh(o+n[3],a+n[0],u,c);return f.margin=n,f}function bg(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 fh(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 h=bf(dU({width:a.width,height:a.height},t),n,i),d=s?h.x-a.x:0,p=l?h.y-a.y:0;return"raw"===u?(o.x=d,o.y=p):(o.x+=d,o.y+=p),o===e&&e.markRedraw(),!0}function bm(e){var t=e.layoutMode||e.constructor.layoutMode;return d7(t)?t:t?{type:t}:null}function bv(e,t,n){var i=n&&n.ignoreSize;d3(i)||(i=[i,i]);var r=a(bd[0],0),o=a(bd[1],1);function a(n,r){var o={},a=0,u={},c=0;if(dK(n,function(t){u[t]=e[t]}),dK(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)return u;if(a>=2)return o;for(var h=0;h<n.length;h++){var d=n[h];if(!s(o,d)&&s(e,d)){o[d]=e[d];break}}return o}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){dK(e,function(e){t[e]=n[e]})}u(bd[0],e,r),u(bd[1],e,o)}function by(e){var t,n;return t={},(n=e)&&t&&dK(bh,function(e){n.hasOwnProperty(e)&&(t[e]=n[e])}),t}d5(bp,"vertical"),d5(bp,"horizontal");var bx=mN(),bb=function(e){var t;function n(t,n,i){var r=e.call(this,t,n,i)||this;return r.uid=xF("ec_cpt_model"),r}return dM(n,e),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=bm(this),i=n?by(e):{};d$(e,t.getTheme().get(this.mainType)),d$(e,this.getDefaultOption()),n&&bv(e,i,n)},n.prototype.mergeOption=function(e,t){d$(this.option,e,!0);var n=bm(this);n&&bv(this.option,e,n)},n.prototype.optionUpdated=function(e,t){},n.prototype.getDefaultOption=function(){var e=this.constructor;if(!(e&&e[mU]))return e.defaultOption;var t=bx(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=d$(o,n[a],!0);t.defaultOption=o}return t.defaultOption},n.prototype.getReferringComponents=function(e,t){return mH(this.ecModel,e,{index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)},t)},n.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(e){this.option.zlevel=e},n.protoInitialize=void((t=n.prototype).type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0),n}(xB);mX(bb,xB),m0(bb),T={},bb.registerSubTypeDefaulter=function(e,t){T[mq(e).main]=t},bb.determineSubType=function(e,t){var n=t.type;if(!n){var i=mq(e).main;bb.hasSubTypes(e)&&T[i]&&(n=T[i](t))}return n},function(e,t){e.topologicalTravel=function(e,i,r,o){if(e.length){var a,s,l,u=(s={},l=[],dK(a=i,function(e){var i,r,o,u=n(s,e),c=(i=u.originalDeps=t(e),r=a,o=[],dK(i,function(e){dq(r,e)>=0&&o.push(e)}),o);u.entryCount=c.length,0===u.entryCount&&l.push(e),dK(c,function(t){0>dq(u.predecessor,t)&&u.predecessor.push(t);var i=n(s,t);0>dq(i.successor,t)&&i.successor.push(e)})}),{graph:s,noEntryList:l}),c=u.graph,h=u.noEntryList,d={};for(dK(e,function(e){d[e]=!0});h.length;){var p=h.pop(),f=c[p],g=!!d[p];g&&(r.call(o,p,f.originalDeps.slice()),delete d[p]),dK(f.successor,g?v:m)}dK(d,function(){throw Error("")})}function m(e){c[e].entryCount--,0===c[e].entryCount&&h.push(e)}function v(e){d[e]=!0,m(e)}};function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}}(bb,function(e){var t=[];return dK(bb.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=dQ(t,function(e){return mq(e).main}),"dataset"!==e&&0>=dq(t,"dataset")&&t.unshift("dataset"),t});var bw="";"undefined"!=typeof navigator&&(bw=navigator.platform||"");var bS="rgba(0, 0, 0, 0.2)";let b_={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:bS,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:bS,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:bS,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:bS,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:bS,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:bS,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:bw.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 bC=pg(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),bM="original",bk="arrayRows",bT="objectRows",bD="keyedColumns",bI="typedArray",bA="unknown",bP="column",bO={Must:1,Might:2,Not:3},bR=mN();function bE(e,t,n){var i,r,o={},a=bB(t);if(!a||!e)return o;var s=[],l=[],u=bR(t.ecModel).datasetMap,c=a.uid+"_"+n.seriesLayoutBy;dK(e=e.slice(),function(t,n){var a=d7(t)?t:e[n]={name:t};"ordinal"===a.type&&null==i&&(i=n,r=p(a)),o[a.name]=[]});var h=u.get(c)||u.set(c,{categoryWayDim:r,valueWayDim:0});function d(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function p(e){var t=e.dimsDef;return t?t.length:1}return dK(e,function(e,t){var n=e.name,r=p(e);if(null==i){var a=h.valueWayDim;d(o[n],a,r),d(l,a,r),h.valueWayDim+=r}else if(i===t)d(o[n],0,r),d(s,0,r);else{var a=h.categoryWayDim;d(o[n],a,r),d(l,a,r),h.categoryWayDim+=r}}),s.length&&(o.itemName=s),l.length&&(o.seriesName=l),o}function bL(e,t,n){var i,r={};if(!bB(e))return r;var o=t.sourceFormat,a=t.dimensionsDefine;(o===bT||o===bD)&&dK(a,function(e,t){(d7(e)?e.name:e)==="name"&&(i=t)});var s=function(){for(var e={},r={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=bF(t.data,o,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var h=c===bO.Not;if(h&&null==e.v&&l!==i&&(e.v=l),null!=e.n&&e.n!==e.v&&(h||s[e.n]!==bO.Not)||(e.n=l),d(e)&&s[e.n]!==bO.Not)return e;h||(c===bO.Might&&null==r.v&&l!==i&&(r.v=l),null!=r.n&&r.n!==r.v||(r.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(r)?r:null}();if(s){r.value=[s.v];var l=null!=i?i:s.n;r.itemName=[l],r.seriesName=[l]}return r}function bB(e){if(!e.get("data",!0))return mH(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},mZ).models[0]}function bN(e,t){return bF(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function bF(e,t,n,i,r,o){var a,s,l;if(pt(e))return bO.Not;if(i){var u=i[o];d7(u)?(s=u.name,l=u.type):d8(u)&&(s=u)}if(null!=l)return"ordinal"===l?bO.Must:bO.Not;if(t===bk){if("row"===n){for(var c=e[o],h=0;h<(c||[]).length&&h<5;h++)if(null!=(a=g(c[r+h])))return a}else for(var h=0;h<e.length&&h<5;h++){var d=e[r+h];if(d&&null!=(a=g(d[o])))return a}}else if(t===bT){if(!s)return bO.Not;for(var h=0;h<e.length&&h<5;h++){var p=e[h];if(p&&null!=(a=g(p[s])))return a}}else if(t===bD){if(!s)return bO.Not;var c=e[s];if(!c||pt(c))return bO.Not;for(var h=0;h<c.length&&h<5;h++)if(null!=(a=g(c[h])))return a}else if(t===bM)for(var h=0;h<e.length&&h<5;h++){var p=e[h],f=mA(p);if(!d3(f))return bO.Not;if(null!=(a=g(f[o])))return a}function g(e){var t=d8(e);return null!=e&&isFinite(e)&&""!==e?t?bO.Might:bO.Not:t&&"-"!==e?bO.Must:void 0}return bO.Not}var bz=pg(),bV=mN();mN();var bZ=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){return function(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 h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}(this,bV,mT(this.get("color",!0)),this.get("colorLayer",!0),e,t,n)},e.prototype.clearColorPalette=function(){var e,t;e=this,(t=bV)(e).paletteIdx=0,t(e).paletteNameMap={}},e}(),bj="\0_ec_inner",bH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.init=function(e,t,n,i,r,o){i=i||{},this.option=null,this._theme=new xB(i),this._locale=new xB(r),this._optionManager=o},t.prototype.setOption=function(e,t,n){var i=bG(t);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,t){return this._resetOption(e,bG(t))},t.prototype._resetOption=function(e,t){var n=!1,i=this._optionManager;if(!e||"recreate"===e){var r=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(r,t)):ei(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&&dK(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=pg(),s=t&&t.replaceMergeMainTypeMap;bR(this).datasetMap=pg(),dK(e,function(e,t){null!=e&&(bb.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?dW(e):d$(n[t],e,!0))}),s&&s.each(function(e,t){bb.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))}),bb.topologicalTravel(o,bb.getAllClassMainTypes(),function(t){var o,a,l,u,c,h,d,p,f,g,m,v,y,x,b,w,S,_,C,M,k=function(e,t,n){var i=bz.get(t);if(!i)return n;var r=i(e);return r?n.concat(r):n}(this,t,mT(e[t])),T=i.get(t),D=T?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",I=(y=T,x=k,b="normalMerge"===D,w="replaceMerge"===D,S="replaceAll"===D,y=y||[],x=(x||[]).slice(),_=pg(),dK(x,function(e,t){if(!d7(e)){x[t]=null;return}}),C=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||mL(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(y,_,D),(b||w)&&(o=C,a=y,l=_,dK(u=x,function(e,t){if(e&&null!=e.id){var n=mO(e.id),i=l.get(n);if(null!=i){var r=o[i];pu(!r.newOption,'Duplicated option on id "'+n+'".'),r.newOption=e,r.existing=a[i],u[t]=null}}})),b&&(c=C,dK(h=x,function(e,t){if(e&&null!=e.name)for(var n=0;n<c.length;n++){var i=c[n].existing;if(!c[n].newOption&&i&&(null==i.id||null==e.id)&&!mL(e)&&!mL(i)&&mP("name",i,e)){c[n].newOption=e,h[t]=null;return}}})),b||w?(d=C,p=x,f=w,dK(p,function(e){if(e){for(var t,n=0;(t=d[n])&&(t.newOption||mL(t.existing)||t.existing&&null!=e.id&&!mP("id",e,t.existing));)n++;t?(t.newOption=e,t.brandNew=f):d.push({newOption:e,brandNew:f,existing:null,keyInfo:null}),n++}})):S&&(g=C,dK(x,function(e){g.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})),m=C,v=pg(),dK(m,function(e){var t=e.existing;t&&v.set(t.id,e)}),dK(m,function(e){var t=e.newOption;pu(!t||null==t.id||!v.get(t.id)||v.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&v.set(t.id,e),e.keyInfo||(e.keyInfo={})}),dK(m,function(e,t){var n=e.existing,i=e.newOption,r=e.keyInfo;if(d7(i)){if(r.name=null!=i.name?mO(i.name):n?n.name:mM+t,n)r.id=mO(n.id);else if(null!=i.id)r.id=mO(i.id);else{var o=0;do r.id="\0"+r.name+"\0"+o++;while(v.get(r.id))}v.set(r.id,e)}}),C);dK(I,function(e){var n,i,r,o,a=e.newOption;d7(a)&&(e.keyInfo.mainType=t,e.keyInfo.subType=(n=t,i=a,r=e.existing,o=bb,i.type?i.type:r?r.subType:o.determineSubType(n,i)))}),n[t]=null,i.set(t,null),r.set(t,0);var A=[],P=[],O=0;dK(I,function(e,n){var i=e.existing,r=e.newOption;if(r){var o="series"===t,a=bb.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(M)return;M=!0}if(i&&i.constructor===a)i.name=e.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=dG({componentIndex:n},e.keyInfo);dG(i=new a(r,this,this,s),s),e.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(A.push(i.option),P.push(i),O++):(A.push(void 0),P.push(void 0))},this),n[t]=A,i.set(t,P),r.set(t,O),"series"===t&&et(this)},this),this._seriesIndices||et(this)},t.prototype.getOption=function(){var e=dW(this.option);return dK(e,function(t,n){if(bb.hasClass(n)){for(var i=mT(t),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!mL(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,e[n]=i}}),delete e[bj],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,n=e.mainType;if(!n)return[];var i=e.index,r=e.id,o=e.name,a=this._componentsMap.get(n);return a&&a.length?(null!=i?(t=[],dK(mT(i),function(e){a[e]&&t.push(a[e])})):t=null!=r?bW("id",r,a):null!=o?bW("name",o,a):d0(a,function(e){return!!e}),b$(t,e)):[]},t.prototype.findComponents=function(e){var t,n,i,r,o,a=e.query,s=e.mainType,l=(t=a,n=s+"Index",i=s+"Id",r=s+"Name",t&&(null!=t[n]||null!=t[i]||null!=t[r])?{mainType:s,index:t[n],id:t[i],name:t[r]}:null);return o=b$(l?this.queryComponents(l):d0(this._componentsMap.get(s),function(e){return!!e}),e),e.filter?d0(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var i=this._componentsMap;if(d4(e))i.each(function(n,i){for(var r=0;n&&r<n.length;r++){var o=n[r];o&&e.call(t,i,o,o.componentIndex)}});else for(var r=d8(e)?i.get(e):d7(e)?this.findComponents(e):null,o=0;r&&o<r.length;o++){var a=r[o];a&&t.call(n,a,a.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=mR(e,null);return d0(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 d0(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return d0(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){en(this),dK(this._seriesIndices,function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)},this)},t.prototype.eachRawSeries=function(e,t){dK(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){en(this),dK(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 dK(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return en(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){en(this);var n=[];dK(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=pg(n)},t.prototype.restoreData=function(e){et(this);var t=this._componentsMap,n=[];t.each(function(e,t){bb.hasClass(t)&&n.push(t)}),bb.topologicalTravel(n,bb.getAllClassMainTypes(),function(n){dK(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=void(et=function(e){var t=e._seriesIndices=[];dK(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=pg(t)},en=function(e){},ei=function(e,t){e.option={},e.option[bj]=1,e._componentsMap=pg({series:[]}),e._componentsCount=pg();var n,i,r,o=t.aria;d7(o)&&null==o.enabled&&(o.enabled=!0),n=t,i=e._theme.option,r=n.color&&!n.colorLayer,dK(i,function(e,t){("colorLayer"!==t||!r)&&(bb.hasClass(t)||("object"==typeof e?n[t]=n[t]?d$(n[t],e,!1):dW(e):null!=n[t]||(n[t]=e)))}),d$(t,b_,!1),e._mergeOption(t,null)}),t}(xB);function bW(e,t,n){if(d3(t)){var i=pg();return dK(t,function(e){null!=e&&null!=mR(e,null)&&i.set(e,!0)}),d0(n,function(t){return t&&i.get(t[e])})}var r=mR(t,null);return d0(n,function(t){return t&&null!=r&&t[e]===r})}function b$(e,t){return t.hasOwnProperty("subType")?d0(e,function(e){return e&&e.subType===t.subType}):e}function bG(e){var t=pg();return e&&dK(mT(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}dY(bH,bZ);var bU=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];let bq=function(e){dK(bU,function(t){this[t]=d2(e[t],e)},this)};var bY={},bX=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];dK(bY,function(i,r){var o=i.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){dK(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){bY[e]=t},e.get=function(e){return bY[e]},e}(),bK=/^(min|max)?(.+)$/,bQ=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(dK(mT(e.series),function(e){e&&e.data&&pt(e.data)&&(e.data[ph]=!0)}),dK(mT(e.dataset),function(e){e&&e.source&&pt(e.source)&&(e.source[ph]=!0)})),e=dW(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,h=!!(l||s||a&&a.timeline);function d(e){dK(t,function(t){t(e,n)})}return a?(r=a).timeline||(r.timeline=s):((h||c)&&(e.options=e.media=null),r=e),c&&d3(u)&&dK(u,function(e){e&&e.option&&(e.query?o.push(e):i||(i=e))}),d(r),dK(l,function(e){return d(e)}),dK(o,function(e){return d(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=[],dW(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=dW(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++)(function(e,t,n){var i={width:t,height:n,aspectratio:t/n},r=!0;return dK(e,function(e,t){var n=t.match(bK);if(n&&n[1]&&n[2]){var o,a,s,l=n[1];o=i[n[2].toLowerCase()],a=e,("min"===(s=l)?o>=a:"max"===s?o<=a:o===a)||(r=!1)}}),r})(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=dQ(s,function(e){return dW(-1===e?a.option:o[e].option)})),this._currentMediaIndices=s,l},e}(),bJ=d7,b0=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function b1(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=b0.length;n<i;n++){var r=b0[n],o=t.normal,a=t.emphasis;o&&o[r]&&(e[r]=e[r]||{},e[r].normal?d$(e[r].normal,o[r]):e[r].normal=o[r],o[r]=null),a&&a[r]&&(e[r]=e[r]||{},e[r].emphasis?d$(e[r].emphasis,a[r]):e[r].emphasis=a[r],a[r]=null)}}function b2(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,r=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,dU(e[t],i)):e[t]=i),r&&(e.emphasis=e.emphasis||{},e.emphasis[t]=r,r.focus&&(e.emphasis.focus=r.focus),r.blurScope&&(e.emphasis.blurScope=r.blurScope))}}function b5(e){b2(e,"itemStyle"),b2(e,"lineStyle"),b2(e,"areaStyle"),b2(e,"label"),b2(e,"labelLine"),b2(e,"upperLabel"),b2(e,"edgeLabel")}function b3(e,t){var n=bJ(e)&&e[t],i=bJ(n)&&n.textStyle;if(i)for(var r=0,o=mI.length;r<o;r++){var a=mI[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}function b4(e){e&&(b5(e),b3(e,"label"),e.emphasis&&b3(e.emphasis,"label"))}function b8(e){return d3(e)?e:e?[e]:[]}function b6(e){return(d3(e)?e[0]:e)||{}}function b9(e){e&&dK(b7,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var b7=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],we=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],wt=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function wn(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<wt.length;n++){var i=wt[n][1],r=wt[n][0];null!=t[i]&&(t[r]=t[i])}}function wi(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function wr(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function wo(e,t){var n;dK(b8(e.series),function(e){bJ(e)&&function(e){if(bJ(e)){b1(e),b5(e),b3(e,"label"),b3(e,"upperLabel"),b3(e,"edgeLabel"),e.emphasis&&(b3(e.emphasis,"label"),b3(e.emphasis,"upperLabel"),b3(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(b1(t),b4(t));var n=e.markLine;n&&(b1(n),b4(n));var i=e.markArea;i&&b4(i);var r=e.data;if("graph"===e.type){r=r||e.nodes;var o=e.links||e.edges;if(o&&!pt(o))for(var a=0;a<o.length;a++)b4(o[a]);dK(e.categories,function(e){b5(e)})}if(r&&!pt(r))for(var a=0;a<r.length;a++)b4(r[a]);if((t=e.markPoint)&&t.data)for(var s=t.data,a=0;a<s.length;a++)b4(s[a]);if((n=e.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)d3(l[a])?(b4(l[a][0]),b4(l[a][1])):b4(l[a]);"gauge"===e.type?(b3(e,"axisLabel"),b3(e,"title"),b3(e,"detail")):"treemap"===e.type?(b2(e.breadcrumb,"itemStyle"),dK(e.levels,function(e){b5(e)})):"tree"===e.type&&b5(e.leaves)}}(e)}),n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"],t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),dK(n,function(t){dK(b8(e[t]),function(e){e&&(b3(e,"axisLabel"),b3(e.axisPointer,"label"))})}),dK(b8(e.parallel),function(e){var t=e&&e.parallelAxisDefault;b3(t,"axisLabel"),b3(t&&t.axisPointer,"label")}),dK(b8(e.calendar),function(e){b2(e,"itemStyle"),b3(e,"dayLabel"),b3(e,"monthLabel"),b3(e,"yearLabel")}),dK(b8(e.radar),function(e){b3(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),dK(b8(e.geo),function(e){bJ(e)&&(b4(e),dK(b8(e.regions),function(e){b4(e)}))}),dK(b8(e.timeline),function(e){b4(e),b2(e,"label"),b2(e,"itemStyle"),b2(e,"controlStyle",!0);var t=e.data;d3(t)&&dK(t,function(e){d7(e)&&(b2(e,"label"),b2(e,"itemStyle"))})}),dK(b8(e.toolbox),function(e){b2(e,"iconStyle"),dK(e.feature,function(e){b2(e,"iconStyle")})}),b3(b6(e.axisPointer),"label"),b3(b6(e.tooltip).axisPointer,"label"),e.series=mT(e.series),dK(e.series,function(e){if(d7(e)){var t,n=e.type;if("line"===n)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===n||"gauge"===n){null!=e.clockWise&&(e.clockwise=e.clockWise),wi(e.label);var i=e.data;if(i&&!pt(i))for(var r=0;r<i.length;r++)wi(i[r]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},e.emphasis.scaleSize=null)}else if("gauge"===n){var o=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!=o&&function(e,t,n,i){for(var r,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[r=o[s]]&&(a[r]={}),a=a[r];null==a[o[s]]&&(a[o[s]]=n)}(e,"itemStyle.color",o)}else if("bar"===n){wn(e),wn(e.backgroundStyle),wn(e.emphasis);var i=e.data;if(i&&!pt(i))for(var r=0;r<i.length;r++)"object"==typeof i[r]&&(wn(i[r]),wn(i[r]&&i[r].emphasis))}else if("sunburst"===n){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),wr(e),function e(t,n){if(t)for(var i=0;i<t.length;i++)n(t[i]),t[i]&&e(t[i].children,n)}(e.data,wr)}else{"graph"===n||"sankey"===n?!(t=e)||null==t.focusNodeAdjacency||(t.emphasis=t.emphasis||{},null!=t.emphasis.focus||(t.emphasis.focus="adjacency")):"map"===n&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&dU(e,e.mapLocation))}null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),b9(e)}}),e.dataRange&&(e.visualMap=e.dataRange),dK(we,function(t){var n=e[t];n&&(d3(n)||(n=[n]),dK(n,function(e){b9(e)}))})}function wa(e){dK(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 h,d,p=a.get(t.stackedDimension,c);if(isNaN(p))return r;s?d=a.getRawIndex(c):h=a.get(t.stackedByDimension,c);for(var f=NaN,g=n-1;g>=0;g--){var m=e[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,h)),d>=0){var v=m.data.getByRawIndex(m.stackResultDimension,d);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=function(e,t){var n=Math.max(mp(e),mp(t)),i=e+t;return n>20?i:mh(i,n)}(p,v),f=v;break}}}return i[0]=p,i[1]=f,i})})}var ws=function(e){this.data=e.data||(e.sourceFormat===bD?{}:[]),this.sourceFormat=e.sourceFormat||bA,this.seriesLayoutBy=e.seriesLayoutBy||bP,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&&bN(this,n)===bO.Must&&(i.type="ordinal")}};function wl(e){return e instanceof ws}function wu(e,t,n){n=n||wh(e);var i=t.seriesLayoutBy,r=function(e,t,n,i,r){if(!e)return{dimensionsDefine:wd(r),startIndex:a,dimensionsDetectedCount:o};if(t===bk){var o,a;"auto"===i||null==i?wp(function(e){null!=e&&"-"!==e&&(d8(e)?null==a&&(a=1):a=0)},n,e,10):a=d9(i)?i:+!!i,r||1!==a||(r=[],wp(function(e,t){r[t]=null!=e?e+"":""},n,e,1/0)),o=r?r.length:"row"===n?e.length:e[0]?e[0].length:null}else if(t===bT)r||(r=function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return d1(t)}(e));else if(t===bD)r||(r=[],dK(e,function(e,t){r.push(t)}));else if(t===bM){var s=mA(e[0]);o=d3(s)&&s.length||1}return{startIndex:a,dimensionsDefine:wd(r),dimensionsDetectedCount:o}}(e,n,i,t.sourceHeader,t.dimensions);return new ws({data:e,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:dW(t)})}function wc(e){return new ws({data:e,sourceFormat:pt(e)?bI:bM})}function wh(e){var t=bA;if(pt(e))t=bI;else if(d3(e)){0===e.length&&(t=bk);for(var n=0,i=e.length;n<i;n++){var r=e[n];if(null!=r){if(d3(r)||pt(r)){t=bk;break}else if(d7(r)){t=bT;break}}}}else if(d7(e)){for(var o in e)if(py(e,o)&&dX(e[o])){t=bD;break}}return t}function wd(e){if(e){var t=pg();return dQ(e,function(e,n){var i={name:(e=d7(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 wp(e,t,n,i){if("row"===t)for(var r=0;r<n.length&&r<i;r++)e(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;r<o.length&&r<i;r++)e(o[r],r)}function wf(e){var t=e.sourceFormat;return t===bT||t===bD}var wg=function(){var e;function t(e,t){var n=wl(e)?e:wc(e);this._source=n;var i=this._data=n.data;n.sourceFormat===bI&&(this._offset=0,this._dimSize=t,this._data=i),el(this,i,n)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,t){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=void((e=t.prototype).pure=!1,e.persistent=!0),t.internalField=function(){el=function(e,r,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(dG(e,es[wk(a,s)]),a===bI)e.getItem=t,e.count=i,e.fillStorage=n;else{var c=function(e,t){return wv[wk(e,t)]}(a,s);e.getItem=d2(c,null,r,l,u);var h=function(e,t){return ww[wk(e,t)]}(a,s);e.count=d2(h,null,r,l,u)}};var e,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,h=n[a],d=0;d<c;d++){var p=r[d*o+a];h[e+d]=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={})[bk+"_"+bP]={pure:!0,appendData:r},e[bk+"_row"]={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[bT]={pure:!0,appendData:r},e[bD]={pure:!0,appendData:function(e){var t=this._data;dK(e,function(e,n){for(var i=t[n]||(t[n]=[]),r=0;r<(e||[]).length;r++)i.push(e[r])})}},e[bM]={appendData:r},e[bI]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},es=e}(),t}(),wm=function(e,t,n,i){return e[i]},wv=((er={})[bk+"_"+bP]=function(e,t,n,i){return e[i+t]},er[bk+"_row"]=function(e,t,n,i,r){i+=t;for(var o=r||[],a=0;a<e.length;a++){var s=e[a];o[a]=s?s[i]:null}return o},er[bT]=wm,er[bD]=function(e,t,n,i,r){for(var o=r||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[i]:null}return o},er[bM]=wm,er);function wy(e,t){return wv[wk(e,t)]}var wb=function(e,t,n){return e.length},ww=((eo={})[bk+"_"+bP]=function(e,t,n){return Math.max(0,e.length-t)},eo[bk+"_row"]=function(e,t,n){var i=e[0];return i?Math.max(0,i.length-t):0},eo[bT]=wb,eo[bD]=function(e,t,n){var i=e[n[0].name];return i?i.length:0},eo[bM]=wb,eo);function wS(e,t){return ww[wk(e,t)]}var w_=function(e,t,n){return e[t]},wC=((ea={})[bk]=w_,ea[bT]=function(e,t,n){return e[n]},ea[bD]=w_,ea[bM]=function(e,t,n){var i=mA(e);return i instanceof Array?i[t]:i},ea[bI]=w_,ea);function wM(e){return wC[e]}function wk(e,t){return e===bk?e+"_"+t:e}function wT(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 wC[o](i,a,s)}var l=i;return o===bM&&(l=mA(i)),l}}}var wD=/\{@(.+?)\}/g,wI=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,h="series"===c,d=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:r,data:a,dataType:t,value:i,color:l,borderColor:u,dimensionNames:d?d.fullDimensions:null,encode:d?d.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);return(o&&(s.value=o.interpolatedValue),null!=i&&d3(s.value)&&(s.value=s.value[i]),r||(r=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"])),d4(r))?(s.status=t,s.dimensionIndex=i,r(s)):d8(r)?bl(r,s).replace(wD,function(t,n){var i=n.length,r=n;"["===r.charAt(0)&&"]"===r.charAt(i-1)&&(r=+r.slice(1,i-1));var s=wT(a,e,r);if(o&&d3(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 wT(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function wA(e){var t,n;return d7(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function wP(e){return new wO(e)}var wO=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,i,r,o=this._upstream,a=e&&e.skip;if(this._dirty&&o){var s=this.context;s.data=s.outputData=o.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!a&&(i=this._plan(this.context));var l=((t=this._modBy)>=1||(t=1),t),u=this._modDataCount||0,c=((n=e&&e.modBy)>=1||(n=1),n),h=e&&e.modDataCount||0;(l!==c||u!==h)&&(i="reset"),(this._dirty||"reset"===i)&&(this._dirty=!1,r=this._doReset(a)),this._modBy=c,this._modDataCount=h;var d=e&&e.step;if(o?this._dueEnd=o._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,f=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!a&&(r||p<f)){var g=this._progress;if(d3(g))for(var m=0;m<g.length;m++)this._doProgress(g[m],p,f,c,h);else this._doProgress(g,p,f,c,h)}this._dueIndex=f;var v=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=v}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){wR.reset(t,n,i,r),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:wR.next},this.context)},e.prototype._doReset=function(e){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),d3(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var t,n,i=this._downstream;return i&&i.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(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}(),wR=function(){var e,t,n,i,r,o={reset:function(l,u,c,h){t=l,e=u,n=c,r=Math.ceil((i=h)/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 wE(e){}function wL(e){throw Error(e)}function wB(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||d9(e)||null==e||"-"===e||(e=+my(e)),null==e||""===e?NaN:+e)}pg({number:function(e){return parseFloat(e)},time:function(e){return+my(e)},trim:function(e){return d8(e)?pc(e):e}});var wN={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}};(function(e,t){d9(t)||wL(""),this._opFn=wN[e],this._rvalFloat=mS(t)}).prototype.evaluate=function(e){return d9(e)?this._opFn(e,this._rvalFloat):this._opFn(mS(e),this._rvalFloat)};var wF=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=d9(e)?e:mS(e),i=d9(t)?t:mS(t),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=d8(e),s=d8(t);a&&(n=s?e:0),s&&(i=a?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},e}();(function(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=mS(t)}).prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&("number"===n||"number"===this._rvalTypeof)&&(t=mS(e)===this._rvalFloat)}return this._isEQ?t:!t};var wz=function(){function e(){}return e.prototype.getRawData=function(){throw Error("not supported")},e.prototype.getRawDataItem=function(e){throw 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 wB(e,t)},e}();function wV(e){return w$(e.sourceFormat)||wL(""),e.data}function wZ(e){var t=e.sourceFormat,n=e.data;if(w$(t)||wL(""),t===bk){for(var i=[],r=0,o=n.length;r<o;r++)i.push(n[r].slice());return i}if(t===bT){for(var i=[],r=0,o=n.length;r<o;r++)i.push(dG({},n[r]));return i}}function wj(e,t,n){return null==n?void 0:!d9(n)&&(isNaN(n)||py(t,n))?py(t,n)?t[n]:void 0:e[n]}function wH(e){return dW(e)}var wW=pg();function w$(e){return e===bk||e===bT}var wG="undefined",wU=typeof Uint32Array===wG?Array:Uint32Array,wq=typeof Uint16Array===wG?Array:Uint16Array,wY=typeof Int32Array===wG?Array:Int32Array,wX=typeof Float64Array===wG?Array:Float64Array,wK={float:wX,int:wY,ordinal:Array,number:Array,time:wX};function wQ(e){return e>65535?wU:wq}function wJ(){return[1/0,-1/0]}function w0(e,t,n,i,r){var o=wK[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 w1=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=pg()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),r=this.defaultDimValueGetter=eu[i.sourceFormat];this._dimValueGetter=n||r,this._rawExtent=[],wf(i),this._dimensions=dQ(t,function(e){return{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 wK[t||"float"](this._rawCount),this._rawExtent[r]=wJ(),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]=wJ());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){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++){var u=i[l];w0(n,l,u.type,s,!0)}for(var c=[],h=a;h<s;h++)for(var d=h-a,p=0;p<r;p++){var u=i[p],f=eu.arrayRows.call(this,e[d]||c,u.property,d,p);n[p][h]=f;var g=o[p];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=dQ(o,function(e){return e.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=wJ()),w0(r,u,c.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,r,s);else for(var h=[],d=e;d<t;d++){h=i.getItem(d,h);for(var p=0;p<a;p++){var f=r[p],g=this._dimValueGetter(h,l[p],d,p);f[d]=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;for(var r=0,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=this._chunks[e],n=0;if(t)for(var i=0,r=this.count();i<r;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},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)],h=Math.abs(c);h<=n&&((h<o||h===o&&c>=0&&a<0)&&(o=h,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{var n=wQ(this._rawCount);e=new n(this.count());for(var 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(wQ(n._rawCount))(i),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<i;c++){var h=void 0,d=n.getRawIndex(c);if(0===a)h=t(c);else if(1===a)h=t(u[l][d],c);else{for(var p=0;p<a;p++)o[p]=u[e[p]][d];o[p]=c,h=t.apply(null,o)}h&&(r[s++]=d)}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=d1(e),r=i.length;if(!r)return this;var o=t.count(),a=new(wQ(t._rawCount))(o),s=0,l=i[0],u=e[l][0],c=e[l][1],h=t._chunks,d=!1;if(!t._indices){var p=0;if(1===r){for(var f=h[i[0]],g=0;g<n;g++){var m=f[g];(m>=u&&m<=c||isNaN(m))&&(a[s++]=p),p++}d=!0}else if(2===r){for(var f=h[i[0]],v=h[i[1]],y=e[i[1]][0],x=e[i[1]][1],g=0;g<n;g++){var m=f[g],b=v[g];(m>=u&&m<=c||isNaN(m))&&(b>=y&&b<=x||isNaN(b))&&(a[s++]=p),p++}d=!0}}if(!d){if(1===r)for(var g=0;g<o;g++){var w=t.getRawIndex(g),m=h[i[0]][w];(m>=u&&m<=c||isNaN(m))&&(a[s++]=w)}else for(var g=0;g<o;g++){for(var S=!0,w=t.getRawIndex(g),_=0;_<r;_++){var C=i[_],m=h[C][w];(m<e[C][0]||m>e[C][1])&&(S=!1)}S&&(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]]=wJ();for(var c=0;c<a;c++){for(var h=e.getRawIndex(c),d=0;d<o;d++)s[d]=i[t[d]][h];s[o]=c;var p=n&&n.apply(null,s);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(var u=0;u<p.length;u++){var f=t[u],g=p[u],m=l[f],v=i[f];v&&(v[h]=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),h=new(wQ(this._rawCount))(Math.min((Math.ceil(s/u)+2)*2,s));h[l++]=c;for(var d=1;d<s-1;d+=u){for(var p=Math.min(d+u,s-1),f=Math.min(d+2*u,s),g=(f+p)/2,m=0,v=p;v<f;v++){var y=this.getRawIndex(v),x=a[y];!isNaN(x)&&(m+=x)}m/=f-p;var b=d,w=Math.min(d+u,s),S=d-1,_=a[c];n=-1,r=b;for(var C=-1,M=0,v=b;v<w;v++){var y=this.getRawIndex(v),x=a[y];if(isNaN(x)){M++,C<0&&(C=y);continue}(i=Math.abs((S-g)*(x-_)-(S-v)*(m-_)))>n&&(n=i,r=y)}M>0&&M<w-b&&(h[l++]=Math.min(C,r),r=Math.max(C,r)),h[l++]=r,c=r}return h[l++]=this.getRawIndex(s-1),o._count=l,o._indices=h,o.getRawIndex=this._getRawIdx,o},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]=wJ(),h=new(wQ(this._rawCount))(Math.ceil(u/s)),d=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),h[d++]=v}return r._count=d,r._indices=h,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,n=this._chunks[e],i=wJ();if(!n)return i;var r=this.count();if(!this._indices)return this._rawExtent[e].slice();if(t=this._extent[e])return t.slice();for(var o=(t=i)[0],a=t[1],s=0;s<r;s++){var l=n[this.getRawIndex(s)];l<o&&(o=l),l>a&&(a=l)}return t=[o,a],this._extent[e]=t,t},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&&dJ(t,function(e,t){return e[t]=!0,e},{});if(o)for(var a=0;a<r.length;a++)i._chunks[a]=o[a]?function(e){var t=e.constructor;return t===Array?e.slice():new t(e)}(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=dW(this._extent),e._rawExtent=dW(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 wB(e[i],this._dimensions[i])}eu={arrayRows:e,objectRows:function(e,t,n,i){return wB(e[t],this._dimensions[i])},keyedColumns:e,original:function(e,t,n,i){var r=e&&(null==e.value?e:e.value);return wB(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(e,t,n,i){return e[i]}}}(),e}(),w2=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(w3(n)){var o=void 0,a=void 0,s=void 0;if(r){var l=i[0];l.prepareSource(),o=(s=l.getSource()).data,a=s.sourceFormat,t=[l._getVersionSign()]}else a=pt(o=n.get("data",!0))?bI:bM,t=[];var u=this._getSourceMetaRawOption()||{},c=s&&s.metaRawOption||{},h=po(u.seriesLayoutBy,c.seriesLayoutBy)||null,d=po(u.sourceHeader,c.sourceHeader),p=po(u.dimensions,c.dimensions);e=h!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p?[wu(o,{seriesLayoutBy:h,sourceHeader:d,dimensions:p},a)]:[]}else if(r){var f=this._applyTransform(i);e=f.sourceList,t=f.upstreamSignList}else e=[wu(n.get("source",!0),this._getSourceMetaRawOption(),null)],t=[];this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n,i=this._sourceHost,r=i.get("transform",!0),o=i.get("fromTransformResult",!0);null!=o&&1!==e.length&&w4("");var a=[],s=[];return(dK(e,function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||w4(""),a.push(t),s.push(e._getVersionSign())}),r)?n=function(e,t,n){var i=mT(e),r=i.length;r||wL("");for(var o=0;o<r;o++)t=function(e,t,n,i){t.length||wL(""),d7(e)||wL("");var r=e.type,o=wW.get(r);o||wL("");var a=dQ(t,function(e){return function(e,t){var n=new wz,i=e.data,r=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==bP&&wL("");var a=[],s={},l=e.dimensionsDefine;if(l)dK(l,function(e,t){var n=e.name,i={index:t,name:n,displayName:e.displayName};a.push(i),null!=n&&(py(s,n)&&wL(""),s[n]=i)});else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=wv[wk(r,bP)];t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(i,o,a,e)},n.getRawData=d2(wV,null,e)),n.cloneRawData=d2(wZ,null,e);var h=ww[wk(r,bP)];n.count=d2(h,null,i,o,a);var d=wC[r];n.retrieveValue=function(e,t){return p(c(i,o,a,e),t)};var p=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=d2(wj,null,a,s),n.cloneAllDimensionInfo=d2(wH,null,a),n}(e,o)});return dQ(mT(o.transform({upstream:a[0],upstreamList:a,config:dW(e.config)})),function(e,n){d7(e)||wL(""),e.data||wL(""),w$(wh(e.data))||wL("");var i,r=t[0];if(r&&0===n&&!e.dimensions){var o=r.startIndex;o&&(e.data=r.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:bP,sourceHeader:o,dimensions:r.metaRawOption.dimensions}}else i={seriesLayoutBy:bP,sourceHeader:0,dimensions:e.dimensions};return wu(e.data,i,null)})}(i[o],t,0,0),o!==r-1&&(t.length=Math.max(t.length,1));return t}(r,a,{datasetIndex:i.componentIndex}):null!=o&&(n=[new ws({data:(t=a[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:dW(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})]),{sourceList:n,upstreamSignList:s}},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){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];w3(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new w1).initData(new wg(t,e.length),e),r[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(w3(e)){var t=bB(e);return t?[t.getSourceManager()]:[]}return dQ(e.get("transform",!0)||e.get("fromTransformResult",!0)?mH(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},mZ).models:[],function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,i=this._sourceHost;return w3(i)?(e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(e=i.get("seriesLayoutBy",!0),t=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function w5(e){e.option.transform&&(e.option.transform[ph]=!0)}function w3(e){return"series"===e.mainType}function w4(e){throw Error(e)}var w8="line-height:1";function w6(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:"+pG(i+"")+"px;color:"+pG(n)+";font-weight:"+pG(r+""),valueStyle:"font-size:"+pG(a+"")+"px;color:"+pG(o)+";font-weight:"+pG(s+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:r},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var w9=[0,10,20,30],w7=["","\n","\n\n","\n\n\n"];function Se(e,t){return t.type=e,t}function St(e){return"section"===e.type}function Sn(e,t,n,i){var r,o=t.noHeader,a={html:w9[r=function e(t){if(St(t)){var n=0,i=t.blocks.length,r=i>1||i>0&&!t.noHeader;return dK(t.blocks,function(t){var i=e(t);i>=n&&(n=i+ +(r&&(!i||St(t)&&!t.noHeader)))}),n}return 0}(t)],richText:w7[r]},s=[],l=t.blocks||[];pu(!l||d3(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(py(c,u)){var h=new wF(c[u],null);l.sort(function(e,t){return h.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}dK(l,function(n,r){var o=t.valueFormatter,l=(St(n)?Sn:Si)(o?dG(dG({},e),{valueFormatter:o}):e,n,r>0?a.html:0,i);null!=l&&s.push(l)});var d="richText"===e.renderMode?s.join(a.richText):So(s.join(""),o?n:a.html);if(o)return d;var p=bo(t.header,"ordinal",e.useUTC),f=w6(i,e.renderMode).nameStyle;return"richText"===e.renderMode?Sa(e,p,f)+a.richText+d:So('<div style="'+f+";"+w8+';">'+pG(p)+"</div>"+d,n)}function Si(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 dQ(e=d3(e)?e:[e],function(e,t){return bo(e,d3(w)?w[t]:w,u)})};if(!o||!a){var h,d,p,f,g,m,v,y,x=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),b=o?"":bo(l,"ordinal",u),w=t.valueType,S=a?[]:c(t.value,t.dataIndex),_=!s||!o,C=!s&&o,M=w6(i,r),k=M.nameStyle,T=M.valueStyle;return"richText"===r?(s?"":x)+(o?"":Sa(e,b,k))+(a?"":(h=e,d=S,p=_,f=C,g=[T],p&&g.push({padding:[0,0,0,f?10:20],align:"right"}),h.markupStyleCreator.wrapRichTextStyle(d3(d)?d.join(" "):d,g))):So((s?"":x)+(o?"":'<span style="'+k+";"+(s?"":"margin-left:2px")+'">'+pG(b)+"</span>")+(a?"":(m=S,v=_,y=C,'<span style="'+(v?"float:right;margin-left:"+(y?"10px":"20px"):"")+";"+T+'">'+dQ(m=d3(m)?m:[m],function(e){return pG(e)}).join(" ")+"</span>")),n)}}function Sr(e,t,n,i,r,o){if(e)return(St(e)?Sn:Si)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function So(e,t){return'<div style="margin: '+t+"px 0 0;"+w8+';">'+e+'<div style="clear:both"></div></div>'}function Sa(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Ss(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var Sl=function(){function e(){this.richTextStyles={},this._nextStyleNameId=m_()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var i,r,o,a,s,l,u="richText"===n?this._generateStyleName():null,c=(a=(o=d8(i={color:t,type:e,renderMode:n,markerId:u})?{color:i,extraCssText:r}:i||{}).color,s=o.type,r=o.extraCssText,l=o.renderMode||"html",a?"html"===l?"subItem"===s?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+pG(a)+";"+(r||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+pG(a)+";"+(r||"")+'"></span>':{renderMode:l,content:"{"+(o.markerId||"markerX")+"|} ",style:"subItem"===s?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}:"");return d8(c)?c:(this.richTextStyles[u]=c.style,c.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};d3(t)?dK(t,function(e){return dG(n,e)}):dG(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},e}(),Su=mN();function Sc(e,t){return e.getName(t)||e.getId(t)}var Sh=function(e){var t;function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return dM(n,e),n.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=wP({count:Sp,reset:Sf}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Su(this).sourceManager=new w2(this)).prepareSource();var i=this.getInitialData(e,n);Sm(i,this),this.dataTask.context.data=i,Su(this).dataBeforeProcessed=i,Sd(this),this._initSelectedMapFromData(i)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=bm(this),i=n?by(e):{},r=this.subType;bb.hasClass(r)&&(r+="Series"),d$(e,t.getTheme().get(this.subType)),d$(e,this.getDefaultOption()),mD(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&bv(e,i,n)},n.prototype.mergeOption=function(e,t){e=d$(this.option,e,!0),this.fillDataTextStyle(e.data);var n=bm(this);n&&bv(this.option,e,n);var i=Su(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(e,t);Sm(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,Su(this).dataBeforeProcessed=r,Sd(this),this._initSelectedMapFromData(r)},n.prototype.fillDataTextStyle=function(e){if(e&&!pt(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&mD(e[n],"label",t)},n.prototype.getInitialData=function(e,t){},n.prototype.appendData=function(e){this.getRawData().appendData(e.data)},n.prototype.getData=function(e){var t=Sy(this);if(!t)return Su(this).data;var n=t.context.data;return null==e?n:n.getLinkedData(e)},n.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},n.prototype.setData=function(e){var t=Sy(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Su(this).data=e},n.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return pg(e)},n.prototype.getSourceManager=function(){return Su(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return Su(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},n.prototype.formatTooltip=function(e,t,n){return function(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,h=o.getRawValue(a),d=d3(h),p=bu(o.getData().getItemVisual(a,"style")[o.visualDrawType]);if(c>1||d&&!c){var f=function(e,t,n,i,r){var o=t.getData(),a=dJ(e,function(e,t,n){var i=o.getDimensionInfo(n);return e=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(Se("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return i.length?dK(i,function(e){c(wT(o,n,e),e)}):dK(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,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=wT(l,a,u[0]),n=g.type}else r=t=d?h[0]:h;var m=mE(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return Se("section",{header:v,noHeader:s||!m,sortParam:r,blocks:[Se("nameValue",{markerType:"item",markerColor:p,name:x,noName:!pc(x),value:t,valueType:n,dataIndex:a})].concat(i||[])})}({series:this,dataIndex:e,multipleSeries:t})},n.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(dT.node&&!(e&&e.ssr))return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(e,t,n){var i=this.ecModel,r=bZ.prototype.getColorFromPalette.call(this,e,t,n);return r||(r=i.getColorFromPalette(e,t,n)),r},n.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},n.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){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<e.length;o++){var a=Sc(r,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.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)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=d1(e),n=[],i=0;i<t.length;i++){var r=e[t[i]];r>=0&&n.push(r)}return n},n.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(t);return("all"===n||n[Sc(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},n.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){d7(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l<a;l++){var u=t[l],c=Sc(e,u);s[c]=!0,this._selectedDataIndicesMap[c]=e.getRawIndex(u)}}else if("single"===o||!0===o){var h=t[a-1],c=Sc(e,h);r.selectedMap=((n={})[c]=!0,n),this._selectedDataIndicesMap=((i={})[c]=e.getRawIndex(h),i)}}},n.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)}},n.registerClass=function(e){return bb.registerClass(e)},n.protoInitialize=void((t=n.prototype).type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"),n}(bb);function Sd(e){var t,n,i,r=e.name;mE(e)||(e.name=(n=(t=e.getRawData()).mapDimensionsAll("seriesName"),i=[],dK(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)}),i.join(" ")||r))}function Sp(e){return e.model.getRawData().count()}function Sf(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Sg}function Sg(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Sm(e,t){dK(function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];for(var r=e.length,i=0;i<t.length;i++)n[i+r]=t[i];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,d5(Sv,t))})}function Sv(e,t){var n=Sy(e);return n&&n.setOutputEnd((t||this).count()),t}function Sy(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}}dY(Sh,wI),dY(Sh,bZ),mX(Sh,bb);var Sx=function(){function e(){this.group=new mr,this.uid=xF("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 Sb(){var e=mN();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"}}mY(Sx),m0(Sx);var Sw=vW.CMD,SS=[[],[],[]],S_=Math.sqrt,SC=Math.atan2,SM=Math.sqrt,Sk=Math.sin,ST=Math.cos,SD=Math.PI;function SI(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function SA(e,t){return(e[0]*t[0]+e[1]*t[1])/(SI(e)*SI(t))}function SP(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(SA(e,t))}function SO(e,t,n,i,r,o,a,s,l,u,c){var h=SD/180*l,d=ST(h)*(e-n)/2+Sk(h)*(t-i)/2,p=-1*Sk(h)*(e-n)/2+ST(h)*(t-i)/2,f=d*d/(a*a)+p*p/(s*s);f>1&&(a*=SM(f),s*=SM(f));var g=(r===o?-1:1)*SM((a*a*(s*s)-a*a*(p*p)-s*s*(d*d))/(a*a*(p*p)+s*s*(d*d)))||0,m=g*a*p/s,v=-(g*s)*d/a,y=(e+n)/2+ST(h)*m-Sk(h)*v,x=(t+i)/2+Sk(h)*m+ST(h)*v,b=SP([1,0],[(d-m)/a,(p-v)/s]),w=[(d-m)/a,(p-v)/s],S=[(-1*d-m)/a,(-1*p-v)/s],_=SP(w,S);if(-1>=SA(w,S)&&(_=SD),SA(w,S)>=1&&(_=0),_<0){var C=Math.round(_/SD*1e6)/1e6;_=2*SD+C%2*SD}c.addData(u,y,x,a,s,b,_,h,o)}var SR=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,SE=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,SL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pS(t,e),t.prototype.applyTransform=function(e){},t}(v3);function SB(e){return null!=e.setData}function SN(e,t){var n=function(e){var t,n=new vW;if(!e)return n;var i=0,r=0,o=0,a=0,s=vW.CMD,l=e.match(SR);if(!l)return n;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),d=void 0,p=c.match(SE)||[],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,b=void 0,w=void 0,S=void 0,_=void 0,C=i,M=r,k=void 0,T=void 0;switch(h){case"l":i+=p[m++],r+=p[m++],d=s.L,n.addData(d,i,r);break;case"L":i=p[m++],r=p[m++],d=s.L,n.addData(d,i,r);break;case"m":i+=p[m++],r+=p[m++],d=s.M,n.addData(d,i,r),o=i,a=r,h="l";break;case"M":i=p[m++],r=p[m++],d=s.M,n.addData(d,i,r),o=i,a=r,h="L";break;case"h":i+=p[m++],d=s.L,n.addData(d,i,r);break;case"H":i=p[m++],d=s.L,n.addData(d,i,r);break;case"v":r+=p[m++],d=s.L,n.addData(d,i,r);break;case"V":r=p[m++],d=s.L,n.addData(d,i,r);break;case"C":d=s.C,n.addData(d,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),i=p[m-2],r=p[m-1];break;case"c":d=s.C,n.addData(d,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,k=n.len(),T=n.data,t===s.C&&(v+=i-T[k-4],y+=r-T[k-3]),d=s.C,C=p[m++],M=p[m++],i=p[m++],r=p[m++],n.addData(d,v,y,C,M,i,r);break;case"s":v=i,y=r,k=n.len(),T=n.data,t===s.C&&(v+=i-T[k-4],y+=r-T[k-3]),d=s.C,C=i+p[m++],M=r+p[m++],i+=p[m++],r+=p[m++],n.addData(d,v,y,C,M,i,r);break;case"Q":C=p[m++],M=p[m++],i=p[m++],r=p[m++],d=s.Q,n.addData(d,C,M,i,r);break;case"q":C=p[m++]+i,M=p[m++]+r,i+=p[m++],r+=p[m++],d=s.Q,n.addData(d,C,M,i,r);break;case"T":v=i,y=r,k=n.len(),T=n.data,t===s.Q&&(v+=i-T[k-4],y+=r-T[k-3]),i=p[m++],r=p[m++],d=s.Q,n.addData(d,v,y,i,r);break;case"t":v=i,y=r,k=n.len(),T=n.data,t===s.Q&&(v+=i-T[k-4],y+=r-T[k-3]),i+=p[m++],r+=p[m++],d=s.Q,n.addData(d,v,y,i,r);break;case"A":x=p[m++],b=p[m++],w=p[m++],S=p[m++],_=p[m++],C=i,M=r,i=p[m++],SO(C,M,i,r=p[m++],S,_,x,b,w,d=s.A,n);break;case"a":x=p[m++],b=p[m++],w=p[m++],S=p[m++],_=p[m++],C=i,M=r,i+=p[m++],SO(C,M,i,r+=p[m++],S,_,x,b,w,d=s.A,n)}}("z"===h||"Z"===h)&&(d=s.Z,n.addData(d),i=o,r=a),t=d}return n.toStatic(),n}(e),i=dG({},t);return i.buildPath=function(e){if(SB(e)){e.setData(n.data);var t=e.getContext();t&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},i.applyTransform=function(e){(function(e,t){if(t){var n,i,r,o,a,s,l=e.data,u=e.len(),c=Sw.M,h=Sw.C,d=Sw.L,p=Sw.R,f=Sw.A,g=Sw.Q;for(r=0,o=0;r<u;){switch(n=l[r++],o=r,i=0,n){case c:case d:i=1;break;case h:i=3;break;case g:i=2;break;case f:var m=t[4],v=t[5],y=S_(t[0]*t[0]+t[1]*t[1]),x=S_(t[2]*t[2]+t[3]*t[3]),b=SC(-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++]+=b,l[r++]+=b,r+=2,o=r;break;case p:s[0]=l[r++],s[1]=l[r++],pP(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[r++],s[1]+=l[r++],pP(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<i;a++){var w=SS[a];w[0]=l[r++],w[1]=l[r++],pP(w,w,t),l[o++]=w[0],l[o++]=w[1]}}e.increaseVersion()}})(n,e),this.dirtyShape()},i}var SF=function(){this.cx=0,this.cy=0,this.r=0},Sz=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultShape=function(){return new SF},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}(v3);Sz.prototype.type="circle";let SV=Sz;var SZ=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Sj=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultShape=function(){return new SZ},t.prototype.buildPath=function(e,t){var n=t.cx,i=t.cy,r=t.rx,o=t.ry,a=.5522848*r,s=.5522848*o;e.moveTo(n-r,i),e.bezierCurveTo(n-r,i-s,n-a,i-o,n,i-o),e.bezierCurveTo(n+a,i-o,n+r,i-s,n+r,i),e.bezierCurveTo(n+r,i+s,n+a,i+o,n,i+o),e.bezierCurveTo(n-a,i+o,n-r,i+s,n-r,i),e.closePath()},t}(v3);Sj.prototype.type="ellipse";let SH=Sj;var SW=Math.PI,S$=2*SW,SG=Math.sin,SU=Math.cos,Sq=Math.acos,SY=Math.atan2,SX=Math.abs,SK=Math.sqrt,SQ=Math.max,SJ=Math.min;function S0(e,t,n,i,r,o,a){var s=e-n,l=t-i,u=(a?o:-o)/SK(s*s+l*l),c=u*l,h=-u*s,d=e+c,p=t+h,f=n+c,g=i+h,m=(d+f)/2,v=(p+g)/2,y=f-d,x=g-p,b=y*y+x*x,w=r-o,S=d*g-f*p,_=(x<0?-1:1)*SK(SQ(0,w*w*b-S*S)),C=(S*x-y*_)/b,M=(-S*y-x*_)/b,k=(S*x+y*_)/b,T=(-S*y+x*_)/b,D=C-m,I=M-v,A=k-m,P=T-v;return D*D+I*I>A*A+P*P&&(C=k,M=T),{cx:C,cy:M,x0:-c,y0:-h,x1:C*(r/w-1),y1:M*(r/w-1)}}var S1=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},S2=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultShape=function(){return new S1},t.prototype.buildPath=function(e,t){!function(e,t){var n,i=SQ(t.r,0),r=SQ(t.r0||0,0),o=i>0,a=r>0;if(o||a){if(o||(i=r,r=0),r>i){var s=i;i=r,r=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,h=t.cy,d=!!t.clockwise,p=SX(u-l),f=p>S$&&p%S$;if(f>1e-4&&(p=f),i>1e-4){if(p>S$-1e-4)e.moveTo(c+i*SU(l),h+i*SG(l)),e.arc(c,h,i,l,u,!d),r>1e-4&&(e.moveTo(c+r*SU(u),h+r*SG(u)),e.arc(c,h,r,u,l,d));else{var g=void 0,m=void 0,v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0,_=void 0,C=void 0,M=void 0,k=void 0,T=void 0,D=void 0,I=void 0,A=void 0,P=i*SU(l),O=i*SG(l),R=r*SU(u),E=r*SG(u),L=p>1e-4;if(L){var B=t.cornerRadius;B&&(g=(n=function(e){var t;if(d3(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}(B))[0],m=n[1],v=n[2],y=n[3]);var N=SX(i-r)/2;if(x=SJ(N,v),b=SJ(N,y),w=SJ(N,g),S=SJ(N,m),M=_=SQ(x,b),k=C=SQ(w,S),(_>1e-4||C>1e-4)&&(T=i*SU(u),D=i*SG(u),I=r*SU(l),A=r*SG(l),p<SW)){var F=function(e,t,n,i,r,o,a,s){var l=n-e,u=i-t,c=a-r,h=s-o,d=h*l-c*u;if(!(d*d<1e-4))return d=(c*(t-o)-h*(e-r))/d,[e+d*l,t+d*u]}(P,O,I,A,T,D,R,E);if(F){var z=P-F[0],V=O-F[1],Z=T-F[0],j=D-F[1],H=1/SG(Sq((z*Z+V*j)/(SK(z*z+V*V)*SK(Z*Z+j*j)))/2),W=SK(F[0]*F[0]+F[1]*F[1]);M=SJ(_,(i-W)/(H+1)),k=SJ(C,(r-W)/(H-1))}}}if(L){if(M>1e-4){var $=SJ(v,M),G=SJ(y,M),U=S0(I,A,P,O,i,$,d),q=S0(T,D,R,E,i,G,d);e.moveTo(c+U.cx+U.x0,h+U.cy+U.y0),M<_&&$===G?e.arc(c+U.cx,h+U.cy,M,SY(U.y0,U.x0),SY(q.y0,q.x0),!d):($>0&&e.arc(c+U.cx,h+U.cy,$,SY(U.y0,U.x0),SY(U.y1,U.x1),!d),e.arc(c,h,i,SY(U.cy+U.y1,U.cx+U.x1),SY(q.cy+q.y1,q.cx+q.x1),!d),G>0&&e.arc(c+q.cx,h+q.cy,G,SY(q.y1,q.x1),SY(q.y0,q.x0),!d))}else e.moveTo(c+P,h+O),e.arc(c,h,i,l,u,!d)}else e.moveTo(c+P,h+O);if(r>1e-4&&L){if(k>1e-4){var $=SJ(g,k),G=SJ(m,k),U=S0(R,E,T,D,r,-G,d),q=S0(P,O,I,A,r,-$,d);e.lineTo(c+U.cx+U.x0,h+U.cy+U.y0),k<C&&$===G?e.arc(c+U.cx,h+U.cy,k,SY(U.y0,U.x0),SY(q.y0,q.x0),!d):(G>0&&e.arc(c+U.cx,h+U.cy,G,SY(U.y0,U.x0),SY(U.y1,U.x1),!d),e.arc(c,h,r,SY(U.cy+U.y1,U.cx+U.x1),SY(q.cy+q.y1,q.cx+q.x1),d),$>0&&e.arc(c+q.cx,h+q.cy,$,SY(q.y1,q.x1),SY(q.y0,q.x0),!d))}else e.lineTo(c+R,h+E),e.arc(c,h,r,u,l,d)}else e.lineTo(c+R,h+E)}}else e.moveTo(c,h);e.closePath()}}}(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(v3);S2.prototype.type="sector";let S5=S2;var S3=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},S4=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultShape=function(){return new S3},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}(v3);S4.prototype.type="ring";let S8=S4;function S6(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=[],h=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=e.length;d<p;d++)pO(a,a,e[d]),pR(s,s,e[d]);pO(a,a,i[0]),pR(s,s,i[1])}for(var d=0,p=e.length;d<p;d++){var f,g=e[d];if(n)r=e[d?d-1:p-1],o=e[(d+1)%p];else{if(0===d||d===p-1){l.push([(f=e[d])[0],f[1]]);continue}r=e[d-1],o=e[d+1]}pM(u,o,r),pk(u,u,t);var m=pD(g,r),v=pD(g,o),y=m+v;0!==y&&(m/=y,v/=y),pk(c,u,-m),pk(h,u,v);var x=pC([],g,c),b=pC([],g,h);i&&(pR(x,x,a),pO(x,x,s),pR(b,b,a),pO(b,b,s)),l.push(x),l.push(b)}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]);for(var s=1,h=r.length;s<h;s++)e.lineTo(r[s][0],r[s][1])}n&&e.closePath()}}var S9=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},S7=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultShape=function(){return new S9},t.prototype.buildPath=function(e,t){S6(e,t,!0)},t}(v3);S7.prototype.type="polygon";let _e=S7;var _t=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},_n=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _t},t.prototype.buildPath=function(e,t){S6(e,t,!1)},t}(v3);_n.prototype.type="polyline";let _i=_n;var _r={},_o=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},_a=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _o},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,i,r,o,a=yn(_r,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}(v3);_a.prototype.type="line";let _s=_a;var _l=[],_u=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function _c(e,t,n){var i=e.cpx2,r=e.cpy2;return null!=i||null!=r?[(n?fZ:fV)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?fZ:fV)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?fG:f$)(e.x1,e.cpx1,e.x2,t),(n?fG:f$)(e.y1,e.cpy1,e.y2,t)]}var _h=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _u},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&&(fq(n,a,r,c,_l),a=_l[1],r=_l[2],fq(i,s,o,c,_l),s=_l[1],o=_l[2]),e.quadraticCurveTo(a,s,r,o)):(c<1&&(fW(n,a,l,r,c,_l),a=_l[1],l=_l[2],r=_l[3],fW(i,s,u,o,c,_l),s=_l[1],u=_l[2],o=_l[3]),e.bezierCurveTo(a,s,l,u,r,o)))},t.prototype.pointAt=function(e){return _c(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=_c(this.shape,e,!0);return pT(t,t)},t}(v3);_h.prototype.type="bezier-curve";let _d=_h;var _p=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},_f=function(e){function t(t){return e.call(this,t)||this}return pS(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _p},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}(v3);_f.prototype.type="arc";let _g=_f,_m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return pS(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),v3.prototype.getBoundingRect.call(this)},t}(v3);var _v=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();let _y=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 pS(t,e),t}(_v),_x=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 pS(t,e),t}(_v);var _b=[0,0],_w=[0,0],_S=new fn,__=new fn;let _C=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new fn;for(var n=0;n<2;n++)this._axes[n]=new fn;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);fn.sub(i[0],n[1],n[0]),fn.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var 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 _S.set(1/0,1/0),__.set(0,0),!this._intersectCheckOneSide(this,e,_S,__,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,_S,__,i,-1)&&(n=!1,i)||i||fn.copy(t,n?_S:__),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,_b),this._getProjMinMaxOnAxis(s,t._corners,_w),_b[1]<_w[0]||_b[0]>_w[1]){if(a=!1,r)return a;var u=Math.abs(_w[0]-_b[1]),c=Math.abs(_b[0]-_w[1]);Math.min(u,c)>i.len()&&(u<c?fn.scale(i,l,-u*o):fn.scale(i,l,c*o))}else if(n){var u=Math.abs(_w[0]-_b[1]),c=Math.abs(_b[0]-_w[1]);Math.min(u,c)<n.len()&&(u<c?fn.scale(n,l,u*o):fn.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}();var _M=[];let _k=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 pS(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(var 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++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new fh(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(_M)),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}(vd);var _T=Math.max,_D=Math.min,_I={};function _A(e){return v3.extend(e)}var _P=function(e,t){var n=SN(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 pS(t,e),t}(SL)};function _O(e,t){return _P(e,t)}function _R(e,t){_I[e]=t}function _E(e){if(_I.hasOwnProperty(e))return _I[e]}function _L(e,t,n,i){var r=new SL(SN(e,t));return n&&("center"===i&&(n=_N(n,r.getBoundingRect())),_z(r,n)),r}function _B(e,t,n){var i=new ye({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(_N(t,r))}}});return i}function _N(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 _F=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 v3(t);return a.createPathProxy(),a.buildPath=function(e){if(SB(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function _z(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function _V(e,t){return yn(e,e,{lineWidth:t}),e}function _Z(e){return yi(e.shape,e.shape,e.style),e}var _j=yr;function _H(e,t){for(var n=p6([]);e&&e!==t;)p9(n,e.getLocalTransform(),n),e=e.parent;return n}function _W(e,t,n){return t&&!dX(t)&&(t=gq.getLocalTransform(t)),n&&(t=ft([],t)),pP([],e,t)}function _$(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 Math.abs((o=_W(o,t,n))[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function _G(e,t,n){if(e&&t){var i,r=(i={},e.traverse(function(e){!e.isGroup&&e.anid&&(i[e.anid]=e)}),i);t.traverse(function(e){if(!e.isGroup&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),xa(e,i,n,y_(e).dataIndex)}}})}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return null!=e.shape&&(t.shape=dG({},e.shape)),t}}function _U(e,t){return dQ(e,function(e){var n=e[0];n=_D(n=_T(n,t.x),t.x+t.width);var i=e[1];return[n,i=_D(i=_T(i,t.y),t.y+t.height)]})}function _q(e,t){var n=_T(e.x,t.x),i=_D(e.x+e.width,t.x+t.width),r=_T(e.y,t.y),o=_D(e.y+e.height,t.y+t.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function _Y(e,t,n){var i=dG({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),dU(r,n),new ye(i)):_L(e.replace("path://",""),i,n,"center")}function _X(e,t,n,i,r){for(var o=0,a=r[r.length-1];o<r.length;o++){var s=r[o];if(_K(e,t,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function _K(e,t,n,i,r,o,a,s){var l,u=n-e,c=i-t,h=a-r,d=s-o,p=h*c-u*d;if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-r,g=t-o,m=(f*c-u*g)/p;if(m<0||m>1)return!1;var v=(f*d-h*g)/p;return!(v<0)&&!(v>1)}function _Q(e){var t=e.itemTooltipOption,n=e.componentModel,i=e.itemName,r=d8(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&&dK(d1(l),function(e){py(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=y_(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:dU({content:i,formatterParams:s},r)}}function _J(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function _0(e,t){if(e){if(d3(e))for(var n=0;n<e.length;n++)_J(e[n],t);else _J(e,t)}}_I.circle=SV,_I.ellipse=SH,_I.sector=S5,_I.ring=S8,_I.polygon=_e,_I.polyline=_i,_I.rect=yl,_I.line=_s,_I.bezierCurve=_d,_I.arc=_g;var _1=mN(),_2=Sb(),_5=function(){function e(){this.group=new mr,this.uid=xF("viewChart"),this.renderTask=wP({plan:_8,reset:_6}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,i){},e.prototype.highlight=function(e,t,n,i){var r=e.getData(i&&i.dataType);r&&_4(r,i,"emphasis")},e.prototype.downplay=function(e,t,n,i){var r=e.getData(i&&i.dataType);r&&_4(r,i,"normal")},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){_0(this.group,e)},e.markUpdateMethod=function(e,t){_1(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function _3(e,t,n){e&&xe(e)&&("emphasis"===t?yX:yK)(e,n)}function _4(e,t,n){var i,r,o=mB(e,t),a=t&&null!=t.highlightKey?(null==(r=yk[i=t.highlightKey])&&yM<=32&&(r=yk[i]=yM++),r):null;null!=o?dK(mT(o),function(t){_3(e.getItemGraphicEl(t),n,a)}):e.eachItemGraphicEl(function(e){_3(e,n,a)})}function _8(e){return _2(e.model)}function _6(e){var t=e.model,n=e.ecModel,i=e.api,r=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=r&&_1(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,i,r),_9[l]}mY(_5,["dispose"]),m0(_5);var _9={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)}}},_7="\0__throttleOriginMethod",Ce="\0__throttleRate",Ct="\0__throttleType";function Cn(e,t,n){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=new Date().getTime(),c=null,e.apply(o,a||[])}t=t||0;var d=function(){for(var e=[],d=0;d<arguments.length;d++)e[d]=arguments[d];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(h,p):r>=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}function Ci(e,t,n,i){var r=e[t];if(r){var o=r[_7]||r,a=r[Ct];if(r[Ce]!==n||a!==i){if(null==n||!i)return e[t]=o;(r=e[t]=Cn(o,n,"debounce"===i))[_7]=o,r[Ct]=i,r[Ce]=n}return r}}function Cr(e,t){var n=e[t];n&&n[_7]&&(n.clear&&n.clear(),e[t]=n[_7])}var Co=mN(),Ca={itemStyle:m1(xR,!0),lineStyle:m1(xA,!0)},Cs={lineStyle:"stroke",itemStyle:"fill"};function Cl(e,t){var n=e.visualStyleMapper||Ca[t];return n||(console.warn("Unknown style type '"+t+"'."),Ca.itemStyle)}function Cu(e,t){var n=e.visualDrawType||Cs[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var Cc=new xB,Ch=Math.PI,Cd=function(){function e(e,t,n,i){this._stageTaskMap=pg(),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,a=null!=o?Math.ceil(o/r):null;return{step:r,modBy:a,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=pg();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;dK(this._allHandlers,function(i){var r=e.get(i.uid)||e.set(i.uid,{});pu(!(i.reset&&i.overallReset),""),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))}dK(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 h,d=c.agentStubMap;d.each(function(e){a(i,e)&&(e.dirty(),h=!0)}),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.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=pg(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||wP({plan:Cv,reset:Cy,count:Cw}));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||wP({reset:Cp});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=pg(),l=e.seriesType,u=e.getTargetSeries,c=!0,h=!1;function d(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(h=!0,wP({reset:Cf,onDirty:Cm})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,r._pipe(e,n)}pu(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(c=!1,dK(n.getSeries(),d)),h&&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 d4(e)&&(e={overallReset:e,seriesType:function(e){ec=null;try{e(CS,C_)}catch(e){}return ec}(e)}),e.uid=xF("stageHandler"),t&&(e.visualType=t),e},e}();function Cp(e){e.overallReset(e.ecModel,e.api,e.payload)}function Cf(e){return e.overallProgress&&Cg}function Cg(){this.agent.dirty(),this.getDownstream().dirty()}function Cm(){this.agent&&this.agent.dirty()}function Cv(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Cy(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=mT(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?dQ(t,function(e,t){return Cb(t)}):Cx}var Cx=Cb(0);function Cb(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 Cw(e){return e.data.count()}var CS={},C_={};function CC(e,t){for(var n in t.prototype)e[n]=px}CC(CS,bH),CC(C_,bq),CS.eachSeriesByType=CS.eachRawSeriesByType=function(e){ec=e},CS.eachComponent=function(e){"series"===e.mainType&&e.subType&&(ec=e.subType)};var CM=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Ck="#B9B8CE",CT="#100C2A",CD=function(){return{axisLine:{lineStyle:{color:Ck}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},CI=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],CA={darkMode:!0,color:CI,backgroundColor:CT,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Ck}},textStyle:{color:Ck},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Ck}},dataZoom:{borderColor:"#71708A",textStyle:{color:Ck},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:Ck}},timeline:{lineStyle:{color:Ck},label:{color:Ck},controlStyle:{color:Ck,borderColor:Ck}},calendar:{itemStyle:{color:CT},dayLabel:{color:Ck},monthLabel:{color:Ck},yearLabel:{color:Ck}},timeAxis:CD(),logAxis:CD(),valueAxis:CD(),categoryAxis:CD(),line:{symbol:"circle"},graph:{color:CI},gauge:{title:{color:Ck},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Ck},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};CA.categoryAxis.splitLine.show=!1;var CP=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},i={};if(d8(e)){var r=mq(e);t.mainType=r.main||null,t.subType=r.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};dK(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 h=r.slice(0,c);"data"!==h&&(t.mainType=h,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}(),CO=["symbol","symbolSize","symbolRotate","symbolOffset"],CR=CO.concat(["symbolKeepAspect"]);function CE(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)}}function CL(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)}}function CB(e,t,n,i,r){var o=e+t;n.isSilent(o)||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=mB(l,r.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:d3(u)?l.getName(u[0]):l.getName(u),selected:d8(i)?i:dG({},i)})}})}function CN(e,t,n){for(var i;e&&(!t(e)||(i=e,!n));)e=e.__hostTarget||e.parent;return i}var CF=Math.round(9*Math.random()),Cz="function"==typeof Object.defineProperty,CV=function(){function e(){this._id="__ec_inner_"+CF++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return Cz?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}(),CZ=v3.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()}}),Cj=v3.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()}}),CH=v3.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,h=Math.sin(u),d=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-h*p,l+s+d*p,n,i-f,n,i),e.bezierCurveTo(n,i-f,n-c+h*p,l+s+d*p,n-c,l+s),e.closePath()}}),CW=v3.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()}}),C$={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}},CG={};dK({line:_s,rect:yl,roundRect:yl,square:yl,circle:SV,diamond:Cj,pin:CH,arrow:CW,triangle:CZ},function(e,t){CG[t]=new e});var CU=v3.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=g3(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=CG[i];r||(r=CG[i="rect"]),C$[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,n)}}});function Cq(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 CY(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://")?_B(e.slice(8),new fh(t,n,i,r),a?"center":"cover"):0===e.indexOf("path://")?_L(e.slice(7),{},new fh(t,n,i,r),a?"center":"cover"):new CU({shape:{symbolType:e,x:t,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=Cq,o&&s.setColor(o),s}function CX(e){return d3(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function CK(e,t){if(null!=e)return d3(e)||(e=[e,e]),[mc(e[0],t[0])||0,mc(po(e[1],e[0]),t[1])||0]}function CQ(e){return isFinite(e)}function CJ(e,t,n){for(var i,r,o,a,s,l,u,c,h,d,p="radial"===t.type?(o=Math.min(i=n.width,r=n.height),a=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r,t.global||(a=a*i+n.x,s=s*r+n.y,l*=o),a=CQ(a)?a:.5,s=CQ(s)?s:.5,l=l>=0&&CQ(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)):(u=null==t.x?0:t.x,c=null==t.x2?1:t.x2,h=null==t.y?0:t.y,d=null==t.y2?0:t.y2,t.global||(u=u*n.width+n.x,c=c*n.width+n.x,h=h*n.height+n.y,d=d*n.height+n.y),u=CQ(u)?u:0,c=CQ(c)?c:1,h=CQ(h)?h:0,d=CQ(d)?d:0,e.createLinearGradient(u,h,c,d)),f=t.colorStops,g=0;g<f.length;g++)p.addColorStop(f[g].offset,f[g].color);return p}function C0(e){return parseInt(e,10)}function C1(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]||C0(s[i])||C0(e.style[i]))-(C0(s[o])||0)-(C0(s[a])||0)|0}function C2(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]:d9(t)?[t]:d3(t)?t:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(r=dQ(r,function(e){return e/a}),o/=a)}return[r,o]}var C5=new vW(!0);function C3(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}function C4(e){return"string"==typeof e&&"none"!==e}function C8(e){var t=e.fill;return null!=t&&"none"!==t}function C6(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 C9(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 C7(e,t,n){var i=m4(t.image,t.__image,n);if(m6(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)*pb),o.scaleSelf(t.scaleX||1,t.scaleY||1),r.setTransform(o)}return r}}var Me=["shadowBlur","shadowOffsetX","shadowOffsetY"],Mt=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Mn(e,t,n,i,r){var o=!1;if(!i&&t===(n=n||{}))return!1;if(i||t.opacity!==n.opacity){Mo(e,r),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?vl.opacity:a}(i||t.blend!==n.blend)&&(o||(Mo(e,r),o=!0),e.globalCompositeOperation=t.blend||vl.blend);for(var s=0;s<Me.length;s++){var l=Me[s];(i||t[l]!==n[l])&&(o||(Mo(e,r),o=!0),e[l]=e.dpr*(t[l]||0))}return(i||t.shadowColor!==n.shadowColor)&&(o||(Mo(e,r),o=!0),e.shadowColor=t.shadowColor||vl.shadowColor),o}function Mi(e,t,n,i,r){var o=Ma(t,r.inHover),a=i?null:n&&Ma(n,r.inHover)||{};if(o===a)return!1;var s=Mn(e,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(Mo(e,r),s=!0),C4(o.fill)&&(e.fillStyle=o.fill)),(i||o.stroke!==a.stroke)&&(s||(Mo(e,r),s=!0),C4(o.stroke)&&(e.strokeStyle=o.stroke)),(i||o.opacity!==a.opacity)&&(s||(Mo(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||(Mo(e,r),s=!0),e.lineWidth=l)}for(var u=0;u<Mt.length;u++){var c=Mt[u],h=c[0];(i||o[h]!==a[h])&&(s||(Mo(e,r),s=!0),e[h]=o[h]||c[1])}return s}function Mr(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 Mo(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function Ma(e,t){return t&&e.__hoverStyle||e.style}function Ms(e,t){Ml(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Ml(e,t,n,i){var r,o,a,s,l,u=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var c=t.__clipPaths,h=n.prevElClipPaths,d=!1,p=!1;if((!h||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}(c,h))&&(h&&h.length&&(Mo(e,n),e.restore(),p=d=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),c&&c.length&&(Mo(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(),Mr(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=i}(c,e,n),d=!0),n.prevElClipPaths=c),n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var f=n.prevEl;f||(p=d=!0);var g=t instanceof v3&&t.autoBatch&&(o=C8(r=t.style),a=C3(r),!(r.lineDash||!(+o^+a)||o&&"string"!=typeof r.fill||a&&"string"!=typeof r.stroke||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1));!d&&(s=f.transform,u&&s?u[0]===s[0]&&u[1]===s[1]&&u[2]===s[2]&&u[3]===s[3]&&u[4]===s[4]&&u[5]===s[5]:u||s?0:1)?g||Mo(e,n):(Mo(e,n),Mr(e,t));var m=Ma(t,n.inHover);t instanceof v3?(1!==n.lastDrawType&&(p=!0,n.lastDrawType=1),Mi(e,t,f,p,n),g&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,i){var r,o,a,s=C3(n),l=C8(n),u=n.strokePercent,c=u<1,h=!t.path;(!t.silent||c)&&h&&t.createPathProxy();var d=t.path||C5,p=t.__dirty;if(!i){var f=n.fill,g=n.stroke,m=l&&!!f.colorStops,v=s&&!!g.colorStops,y=l&&!!f.image,x=s&&!!g.image,b=void 0,w=void 0,S=void 0,_=void 0,C=void 0;(m||v)&&(C=t.getBoundingRect()),m&&(b=p?CJ(e,f,C):t.__canvasFillGradient,t.__canvasFillGradient=b),v&&(w=p?CJ(e,g,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=w),y&&(S=p||!t.__canvasFillPattern?C7(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=S),x&&(_=p||!t.__canvasStrokePattern?C7(e,g,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),m?e.fillStyle=b:y&&(S?e.fillStyle=S:l=!1),v?e.strokeStyle=w:x&&(_?e.strokeStyle=_:s=!1)}var M=t.getGlobalScale();d.setScale(M[0],M[1],t.segmentIgnoreThreshold),e.setLineDash&&n.lineDash&&(o=(r=C2(t))[0],a=r[1]);var k=!0;(h||4&p)&&(d.setDPR(e.dpr),c?d.setContext(null):(d.setContext(e),k=!1),d.reset(),t.buildPath(d,t.shape,i),d.toStatic(),t.pathUpdated()),k&&d.rebuildPath(e,c?u:1),o&&(e.setLineDash(o),e.lineDashOffset=a),!i&&(n.strokeFirst?(s&&C9(e,n),l&&C6(e,n)):(l&&C6(e,n),s&&C9(e,n))),o&&e.setLineDash([])}(e,t,m,g),g&&(n.batchFill=m.fill||"",n.batchStroke=m.stroke||"")):t instanceof v8?(3!==n.lastDrawType&&(p=!0,n.lastDrawType=3),Mi(e,t,f,p,n),function(e,t,n){var i,r=n.text;if(null!=r&&(r+=""),r){e.font=n.font||dD,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(i=C2(t))[0],a=i[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(C3(n)&&e.strokeText(r,n.x,n.y),C8(n)&&e.fillText(r,n.x,n.y)):(C8(n)&&e.fillText(r,n.x,n.y),C3(n)&&e.strokeText(r,n.x,n.y)),o&&e.setLineDash([])}}(e,t,m)):t instanceof ye?(2!==n.lastDrawType&&(p=!0,n.lastDrawType=2),l=p,Mn(e,Ma(t,n.inHover),f&&Ma(f,n.inHover),l,n),function(e,t,n){var i=t.__image=m4(n.image,t.__image,t,t.onload);if(i&&m6(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 u=n.sx,c=n.sy,h=a-u,d=s-c;e.drawImage(i,u,c,h,d,r,o,a,s)}else e.drawImage(i,r,o,a,s)}}(e,t,m)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(p=!0,n.lastDrawType=4),function(e,t,n){var i,r,o=t.getDisplayables(),a=t.getTemporalDisplayables();e.save();var s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(i=t.getCursor(),r=o.length;i<r;i++){var l=o[i];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Ml(e,l,s,i===r-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}for(var u=0,c=a.length;u<c;u++){var l=a[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),Ml(e,l,s,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),s.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}(e,t,n)),g&&i&&Mo(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}var Mu=new CV,Mc=new f0(100),Mh=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Md(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),i=t.getZr(),r="svg"===i.painter.type;e.dirty&&Mu.delete(e);var o=Mu.get(e);if(o)return o;var a=dU(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,s=[n],l=!0,u=0;u<Mh.length;++u){var c=a[Mh[u]];if(null!=c&&!d3(c)&&!d8(c)&&!d9(c)&&"boolean"!=typeof c){l=!1;break}s.push(c)}if(l){t=s.join(",")+(r?"-svg":"");var h=Mc.get(t);h&&(r?e.svgElement=h:e.image=h)}var d=function e(t){if(!t||0===t.length)return[[0,0]];if(d9(t)){var n=Math.ceil(t);return[[n,n]]}for(var i=!0,r=0;r<t.length;++r)if(!d9(t[r])){i=!1;break}if(i)return e([t]);for(var o=[],r=0;r<t.length;++r)if(d9(t[r])){var n=Math.ceil(t[r]);o.push([n,n])}else{var n=dQ(t[r],function(e){return Math.ceil(e)});n.length%2==1?o.push(n.concat(n)):o.push(n)}return o}(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(d9(e)){var t=Math.ceil(e);return[t,t]}var n=dQ(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),f=function e(t){if(!t||0===t.length)return[["rect"]];if(d8(t))return[[t]];for(var n=!0,i=0;i<t.length;++i)if(!d8(t[i])){n=!1;break}if(n)return e([t]);for(var r=[],i=0;i<t.length;++i)d8(t[i])?r.push([t[i]]):r.push(t[i]);return r}(a.symbol),g=dQ(d,function(e){return Mp(e)}),m=Mp(p),v=!r&&dA.createCanvas(),y=r&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=mC(e,g[t]);for(var i=1,t=0,n=f.length;t<n;++t)i=mC(i,f[t].length);e*=i;var r=m*g.length*f.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(r,a.maxTileHeight))}}();v&&(v.width=x.width*n,v.height=x.height*n,o=v.getContext("2d")),function(){o&&(o.clearRect(0,0,v.width,v.height),a.backgroundColor&&(o.fillStyle=a.backgroundColor,o.fillRect(0,0,v.width,v.height)));for(var e=0,t=0;t<p.length;++t)e+=p[t];if(!(e<=0))for(var s=-m,l=0,u=0,c=0;s<x.height;){if(l%2==0){for(var h=u/2%f.length,g=0,b=0,w=0;g<2*x.width;){for(var S=0,t=0;t<d[c].length;++t)S+=d[c][t];if(S<=0)break;if(b%2==0){var _=(1-a.symbolSize)*.5,C=g+d[c][b]*_,M=s+p[l]*_,k=d[c][b]*a.symbolSize,T=p[l]*a.symbolSize,D=w/2%f[h].length;(function(e,t,s,l,u){var c=r?1:n,h=CY(u,e*c,t*c,s*c,l*c,a.color,a.symbolKeepAspect);if(r){var d=i.painter.renderOneToVNode(h);d&&y.children.push(d)}else Ms(o,h)})(C,M,k,T,f[h][D])}g+=d[c][b],++w,++b===d[c].length&&(b=0)}++c===d.length&&(c=0)}s+=p[l],++u,++l===p.length&&(l=0)}}(),l&&Mc.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,Mu.set(e,s),e.dirty=!1,s}function Mp(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var Mf=new pB,Mg={},Mm="__flagInMainProcess",Mv="__pendingUpdate",My="__needsUpdateStatus",Mx=/^[a-zA-Z0-9_]+$/,Mb="__connectUpdateStatus";function Mw(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed()){this.id;return}return M_(this,e,t)}}function MS(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return M_(this,e,t)}}function M_(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),pB.prototype[t].apply(e,n)}var MC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t}(pB),MM=MC.prototype;MM.on=MS("on"),MM.off=MS("off");var Mk=function(e){function t(t,n,i){var r=e.call(this,new CP)||this;r._chartsViews=[],r._chartsMap={},r._componentsViews=[],r._componentsMap={},r._pendingActions=[],i=i||{},d8(n)&&(n=ML[n]),r._dom=t,i.ssr;var o=r._zr=ml(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:po(i.useDirtyRect,!1),useCoarsePointer:po(i.useCoarsePointer,"auto"),pointerSize:i.pointerSize});r._ssr=i.ssr,r._throttledZrFlush=Cn(d2(o.flush,o),17),(n=dW(n))&&wo(n,!0),r._theme=n,r._locale=function(e){if(!d8(e))return d$(dW(e),dW(xV.EN),!1);var t=xV[e.toUpperCase()]||{};return"ZH"===e||"EN"===e?dW(t):d$(dW(t),dW(xV.EN),!1)}(i.locale||xj),r._coordSysMgr=new bX;var a=r._api=eM(r);function s(e,t){return e.__prio-t.__prio}return fM(ME,s),fM(MO,s),r._scheduler=new Cd(r,a,MO,ME),r._messageCenter=new MC,r._initEvents(),r.resize=d2(r.resize,r),o.animation.on("frame",r._onframe,r),eb(o,r),ew(o,r),r[ph]=!0,r}return dM(t,e),t.prototype._onframe=function(){if(!this._disposed){eD(this);var e=this._scheduler;if(this[Mv]){var t=this[Mv].silent;this[Mm]=!0;try{eh(this),ef.update.call(this,null,this[Mv].updateParams)}catch(e){throw this[Mm]=!1,this[Mv]=null,e}this._zr.flush(),this[Mm]=!1,this[Mv]=null,ey.call(this,t),ex.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),em(this,i),e.performVisualTasks(i),eC(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[Mm]){if(this._disposed){this.id;return}if(d7(t)&&(n=t.lazyUpdate,i=t.silent,r=t.replaceMerge,o=t.transition,t=t.notMerge),this[Mm]=!0,!this._model||t){var i,r,o,a=new bQ(this._api),s=this._theme,l=this._model=new bH;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:r},MR);var u={seriesTransition:o,optionChanged:!0};if(n)this[Mv]={silent:i,updateParams:u},this[Mm]=!1,this.getZr().wakeUp();else{try{eh(this),ef.update.call(this,null,u)}catch(e){throw this[Mv]=null,this[Mm]=!1,e}this._ssr||this._zr.flush(),this[Mv]=null,this[Mm]=!1,ey.call(this,i),ex.call(this,i)}}},t.prototype.setTheme=function(){},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||dT.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(dT.svgSupported){var e=this._zr;return dK(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}var t=(e=e||{}).excludeComponents,n=this._model,i=[],r=this;dK(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 dK(i,function(e){e.group.ignore=!1}),o},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(!MF[n])return this.getDataURL(e);var a=o,s=o,l=-o,u=-o,c=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();dK(MN,function(o,h){if(o.group===n){var d=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(dW(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:d,left:p.left,top:p.top})}}),a*=h,s*=h,l*=h,u*=h;var d=l-a,p=u-s,f=dA.createCanvas(),g=ml(f,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:p}),!t)return e.connectedBackgroundColor&&g.add(new yl({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),dK(c,function(e){var t=new ye({style:{x:e.left*h-a,y:e.top*h-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"));var m="";return dK(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()},t.prototype.convertToPixel=function(e,t){return eg(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return eg(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(this._disposed){this.id;return}return dK(mz(this._model,e),function(e,i){i.indexOf("Models")>=0&&dK(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))}},this)},this),!!n},t.prototype.getVisual=function(e,t){var n=mz(this._model,e,{defaultMainType:"series"}),i=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=r?CE(i,r,t):CL(i,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=this;dK(MD,function(t){var n=function(n){var i,r=e.getModel(),o=n.target;if("globalout"===t?i={}:o&&CN(o,function(e){var t=y_(e);if(t&&null!=t.dataIndex){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return i=n&&n.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return i=dG({},t.eventData),!0},!0),i){var a=i.componentType,s=i.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=i.seriesIndex);var l=a&&null!=s&&r.getComponent(a,s),u=l&&e["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=n,i.type=t,e._$eventProcessor.eventInfo={targetEl:o,packedEvent:i,model:l,view:u},e.trigger(t,i)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)}),dK(MP,function(t,n){e._messageCenter.on(n,function(e){this.trigger(n,e)},e)}),dK(["selectchanged"],function(t){e._messageCenter.on(t,function(e){this.trigger(t,e)},e)}),function(e,t,n){e.on("selectchanged",function(e){var i=n.getModel();e.isFromClick?(CB("map","selectchanged",t,i,e),CB("pie","selectchanged",t,i,e)):"select"===e.fromAction?(CB("map","selected",t,i,e),CB("pie","selected",t,i,e)):"unselect"===e.fromAction&&(CB("map","unselected",t,i,e),CB("pie","unselected",t,i,e))})}(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&mW(this.getDom(),MZ,"");var e=this._api,t=this._model;dK(this._componentsViews,function(n){n.dispose(t,e)}),dK(this._chartsViews,function(n){n.dispose(t,e)}),this._zr.dispose(),this._dom=this._model=this._chartsMap=this._componentsMap=this._chartsViews=this._componentsViews=this._scheduler=this._api=this._zr=this._throttledZrFlush=this._theme=this._coordSysMgr=this._messageCenter=null,delete MN[this.id]},t.prototype.resize=function(e){if(!this[Mm]){if(this._disposed){this.id;return}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[Mv]&&(null==i&&(i=this[Mv].silent),n=!0,this[Mv]=null),this[Mm]=!0;try{n&&eh(this),ef.update.call(this,{type:"resize",animation:dG({duration:0},e&&e.animation)})}catch(e){throw this[Mm]=!1,e}this[Mm]=!1,ey.call(this,i),ex.call(this,i)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(d7(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),MB[e]){var n=MB[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=dG({},e);return t.type=MP[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(d7(t)||(t={silent:!!t}),MA[e.type]&&this._model){if(this[Mm]){this._pendingActions.push(e);return}var n=t.silent;ev.call(this,e,n);var i=t.flush;i?this._zr.flush():!1!==i&&dT.browser.weChat&&this._throttledZrFlush(),ey.call(this,n),ex.call(this,n)}},t.prototype.updateLabelLayout=function(){Mf.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).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,i=e.get("zlevel")||0;t.eachRendered(function(e){return function e(t,n,i,r){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)r=Math.max(e(s[l],n,i,r),r);else t.z=n,t.zlevel=i,r=Math.max(t.z2,r);if(o&&(o.z=n,o.zlevel=i,isFinite(r)&&(o.z2=r+2)),a){var u=t.textGuideLineConfig;a.z=n,a.zlevel=i,isFinite(r)&&(a.z2=r+(u&&u.showAbove?1:-1))}return r}(e,n,i,-1/0),!0})}}function i(e,t){t.eachRendered(function(e){if(!xl(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 r(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&&!xl(e)){if(e instanceof v3){var n,i;(n=yT(e)).normalFill=e.style.fill,n.normalStroke=e.style.stroke,i=e.states.select||{},n.selectFill=i.style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null}if(e.__dirty){var o=e.prevStates;o&&e.useStates(o)}if(r){e.stateTransition=a;var s=e.getTextContent(),l=e.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}e.__dirty&&t(e)}})}eh=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),ed(e,!0),ed(e,!1),t.plan()},ed=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 h=mq(e.type);(c=new(t?Sx.getClass(h.main,h.sub):_5.getClass(h.sub))).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(var 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)}},ep=function(e,t,n,i,r){var o,a=e._model;if(a.setUpdatePayload(n),!i){dK([].concat(e._componentsViews).concat(e._chartsViews),c);return}var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};r&&(l.subType=r);var u=n.excludeSeriesId;function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,a,e._api,n)}null!=u&&(o=pg(),dK(mT(u),function(e){var t=mR(e,null);null!=t&&o.set(t,!0)})),a&&a.eachComponent(l,function(t){if(!o||null==o.get(t.id)){if(xn(n)){if(t instanceof Sh)n.type!==yP||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var i=e.seriesIndex,r=e.getData(t.dataType);if(r){var o=mB(r,t);o=(d3(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=y_(a);y0(i,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),h=e.get(["emphasis","blurScope"]);null!=c&&y0(i,c,h,n)}}}(t,n,e._api);else{var i=y2(t.mainType,t.componentIndex,n.name,e._api),r=i.focusSelf,a=i.dispatchers;n.type===yP&&r&&!n.notBlur&&y1(t.mainType,t.componentIndex,e._api),a&&dK(a,function(e){n.type===yP?yX(e):yK(e)})}}else xt(n)&&t instanceof Sh&&(function(e,t,n){if(xt(t)){var i=t.dataType,r=mB(e.getData(i),t);d3(r)||(r=[r]),e[t.type===yL?"toggleSelect":t.type===yR?"select":"unselect"](r,i)}}(t,n,e._api),y5(t),eT(e))}},e),a&&a.eachComponent(l,function(t){(!o||null==o.get(t.id))&&c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])},e)},ef={prepareAndUpdate:function(e){eh(this),ef.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),em(this,i),a.update(i,r),e(i),s.performVisualTasks(i,t),eS(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),Mf.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=pg();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}),eC(this,i,r,t,{},a),Mf.trigger("afterupdate",i,r)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),_5.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),eS(this,n,this._api,t,{}),Mf.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()}),_5.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)}),Mf.trigger("afterupdate",i,this._api))},updateLayout:function(e){ef.update.call(this,e)}},eg=function(e,t,n,i){if(e._disposed){e.id;return}for(var r,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=mz(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(r=u[t](o,s,i)))return r}},em=function(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries(function(e){i.updateStreamModes(e,n[e.__viewId])})},ev=function(e,t){var n,i=this,r=this.getModel(),o=e.type,a=e.escapeConnect,s=MA[o],l=s.actionInfo,u=(l.update||"update").split(":"),c=u.pop(),h=null!=u[0]&&mq(u[0]);this[Mm]=!0;var d=[e],p=!1;e.batch&&(p=!0,d=dQ(e.batch,function(t){return(t=dU(dG({},t),e)).batch=null,t}));var f=[],g=xt(e),m=xn(e);if(m&&yJ(this._api),dK(d,function(t){if((n=(n=s.action(t,i._model,i._api))||dG({},t)).type=l.event||n.type,f.push(n),m){var r=mV(e),o=r.queryOptionMap;ep(i,c,t,r.mainTypeSpecified?o.keys()[0]:"series"),eT(i)}else g?(ep(i,c,t,"series"),eT(i)):h&&ep(i,c,t,h.main,h.sub)}),"none"!==c&&!m&&!g&&!h)try{this[Mv]?(eh(this),ef.update.call(this,e),this[Mv]=null):ef[c].call(this,e)}catch(e){throw this[Mm]=!1,e}if(n=p?{type:l.event||o,escapeConnect:a,batch:f}:f[0],this[Mm]=!1,!t){var v=this._messageCenter;if(v.trigger(n.type,n),g){var y,x={type:"selectchanged",escapeConnect:a,selected:(y=[],r.eachSeries(function(e){dK(e.getAllData(),function(t){t.data;var n=t.type,i=e.getSelectedDataIndices();if(i.length>0){var r={dataIndex:i,seriesIndex:e.seriesIndex};null!=n&&(r.dataType=n),y.push(r)}})}),y),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(x.type,x)}}},ey=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();ev.call(this,n,e)}},ex=function(e){e||this.trigger("updated")},eb=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[Mv]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},ew=function(e,t){e.on("mouseover",function(e){var n,i,r,o,a,s=CN(e.target,xe);s&&(n=t._api,o=(r=y2((i=y_(s)).componentMainType,i.componentIndex,i.componentHighDownName,n)).dispatchers,a=r.focusSelf,o?(a&&y1(i.componentMainType,i.componentIndex,n),dK(o,function(t){return yq(t,e)})):(y0(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&y1(i.componentMainType,i.componentIndex,n),yq(s,e)),eT(t))}).on("mouseout",function(e){var n,i,r,o=CN(e.target,xe);o&&(yJ(n=t._api),(r=y2((i=y_(o)).componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers)?dK(r,function(t){return yY(t,e)}):yY(o,e),eT(t))}).on("click",function(e){var n=CN(e.target,function(e){return null!=y_(e).dataIndex},!0);if(n){var i=n.selected?"unselect":"select",r=y_(n);t._api.dispatchAction({type:i,dataType:r.dataType,dataIndexInside:r.dataIndex,seriesIndex:r.seriesIndex,isFromClick:!0})}})},eS=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);fM(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),dK(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),e_(e,t,n,i,r),dK(e._chartsViews,function(e){e.__alive=!1}),eC(e,t,n,i,r),dK(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},e_=function(e,t,o,a,s,l){dK(l||e._componentsViews,function(e){var s=e.__model;i(s,e),e.render(s,t,o,a),n(s,e),r(s,e)})},eC=function(e,t,o,a,s,l){var u,c,h,d,p=e._scheduler;s=dG(s||{},{updatedSeries:t.getSeries()}),Mf.trigger("series:beforeupdate",t,o,s);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;p.updatePayload(r,a),i(t,n),l&&l.get(t.uid)&&r.dirty(),r.perform(p.getPerformArgs(r))&&(f=!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),y5(t)}),p.unfinished=f||p.unfinished,Mf.trigger("series:layoutlabels",t,o,s),Mf.trigger("series:transition",t,o,s),t.eachSeries(function(t){var i=e._chartsMap[t.__viewId];n(t,i),r(t,i)}),u=e,c=t,h=u._zr.storage,d=0,h.traverse(function(e){!e.isGroup&&d++}),!(d>c.get("hoverLayerThreshold"))||dT.node||dT.worker||c.eachSeries(function(e){if(!e.preventUsingHoverLayer){var t=u._chartsMap[e.__viewId];t.__alive&&t.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}}),Mf.trigger("series:afterupdate",t,o,s)},eT=function(e){e[My]=!0,e.getZr().wakeUp()},eD=function(e){e[My]&&(e.getZr().storage.traverse(function(e){!xl(e)&&t(e)}),e[My]=!1)},eM=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return dM(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){yX(t,n),eT(e)},n.prototype.leaveEmphasis=function(t,n){yK(t,n),eT(e)},n.prototype.enterBlur=function(t){yW(t,yV),eT(e)},n.prototype.leaveBlur=function(t){yW(t,yZ),eT(e)},n.prototype.enterSelect=function(t){yW(t,yj),eT(e)},n.prototype.leaveSelect=function(t){yW(t,yH),eT(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}(bq))(e)},ek=function(e){function t(e,t){for(var n=0;n<e.length;n++)e[n][Mb]=t}dK(MP,function(n,i){e._messageCenter.on(i,function(n){if(MF[e.group]&&0!==e[Mb]&&(!n||!n.escapeConnect)){var i=e.makeActionFromEvent(n),r=[];dK(MN,function(t){t!==e&&t.group===e.group&&r.push(t)}),t(r,0),dK(r,function(e){1!==e[Mb]&&e.dispatchAction(i)}),t(r,2)}})})}}(),t}(pB),MT=Mk.prototype;MT.on=Mw("on"),MT.off=Mw("off"),MT.one=function(e,t,n){var i=this;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 MD=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function MI(e){}var MA={},MP={},MO=[],MR=[],ME=[],ML={},MB={},MN={},MF={},Mz=+new Date-0,MV=+new Date-0,MZ="_echarts_instance_";function Mj(e){0>dq(MR,e)&&MR.push(e)}function MH(e,t){Mq(MO,e,t,2e3)}function MW(e,t){Mf.on(e,t)}function M$(e,t,n){d4(t)&&(n=t,t="");var i=d7(e)?e.type:[e,e={event:t}][0];e.event=(e.event||i).toLowerCase(),!MP[t=e.event]&&(pu(Mx.test(i)&&Mx.test(t)),MA[i]||(MA[i]={action:n,actionInfo:e}),MP[t]=i)}function MG(e,t){Mq(ME,e,t,3e3,"visual")}var MU=[];function Mq(e,t,n,i,r){if((d4(t)||d7(t))&&(n=t,t=i),!(dq(MU,n)>=0)){MU.push(n);var o=Cd.wrapStageHandler(n,r);o.__prio=t,o.__raw=n,e.push(o)}}MG(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=e.getModel(i),o=Cl(e,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=Cu(e,i),l=o[s],u=d4(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var h=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[s]||(o[s]=h,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||d4(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||d4(o.stroke)?h: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=dG({},o);r[s]=u(i),t.setItemVisual(n,"style",r)}}}}),MG(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),i=e.visualStyleAccessPath||"itemStyle",r=Cl(e,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[i]){Cc.option=n[i];var a=r(Cc);dG(e.ensureUniqueItemVisual(t,"style"),a),Cc.option.decal&&(e.setItemVisual(t,"decal",Cc.option.decal),Cc.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}}),MG(4500,{performRawSeries:!0,overallReset:function(e){var t=pg();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)),Co(e).scope=r}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),i={},r=t.getData(),o=Co(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=Cu(t,a);r.each(function(e){i[r.getRawIndex(e)]=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)}})}})}}),MG(2e3,{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<CO.length;a++){var s=CO[a],l=e.get(s);d4(l)?(o=!0,r[s]=l):i[s]=l}if(i.symbol=i.symbol||e.defaultSymbol,n.setVisual(dG({legendIcon:e.legendIcon||i.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(e)){var u=d1(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}}}}}),MG(4500,{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<CR.length;i++){var r=CR[i],o=n.getShallow(r,!0);null!=o&&e.setItemVisual(t,r,o)}}:null}}}),MG(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=Md(n,t))});var r=i.getVisual("decal");r&&(i.getVisual("style").decal=Md(r,t))}})}),Mj(wo),MH(900,function(e){var t=pg();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(wa)}),D=function(e,t){dU(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,i=new mr,r=new yl({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(r);var o=new yS({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 yl({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return i.add(a),t.showSpinner&&((n=new _g({shape:{startAngle:-Ch/2,endAngle:-Ch/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*Ch/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Ch/2}).delay(300).start("circularInOut"),i.add(n)),i.resize=function(){var i=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner&&i?0:5+i/2)+(t.showSpinner?0:i/2)+(i?0:s),u=e.getHeight()/2;t.showSpinner&&n.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i},MB.default=D,M$({type:yP,event:yP,update:yP},px),M$({type:yO,event:yO,update:yO},px),M$({type:yR,event:yR,update:yR},px),M$({type:yE,event:yE,update:yE},px),M$({type:yL,event:yL,update:yL},px),I={color:CM,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],CM]},ML.light=I,ML.dark=CA;var MY=[],MX={registerPreprocessor:Mj,registerProcessor:MH,registerPostInit:function(e){MW("afterinit",e)},registerPostUpdate:function(e){MW("afterupdate",e)},registerUpdateLifecycle:MW,registerAction:M$,registerCoordinateSystem:function(e,t){bX.register(e,t)},registerLayout:function(e,t){Mq(ME,e,t,1e3,"layout")},registerVisual:MG,registerTransform:function(e){var t=(e=dW(e)).type;t||wL("");var n=t.split(":");2!==n.length&&wL("");var i=!1;"echarts"===n[0]&&(t=n[1],i=!0),e.__isBuiltIn=i,wW.set(t,e)},registerLoading:function(e,t){MB[e]=t},registerMap:function(e,t,n){var i=Mg.registerMap;i&&i(e,t,n)},registerImpl:function(e,t){Mg[e]=t},PRIORITY:{PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},ComponentModel:bb,ComponentView:Sx,SeriesModel:Sh,ChartView:_5,registerComponentModel:function(e){bb.registerClass(e)},registerComponentView:function(e){Sx.registerClass(e)},registerSeriesModel:function(e){Sh.registerClass(e)},registerChartView:function(e){_5.registerClass(e)},registerSubTypeDefaulter:function(e,t){bb.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){mo[e]=t}};function MK(e){if(d3(e)){dK(e,function(e){MK(e)});return}!(dq(MY,e)>=0)&&(MY.push(e),d4(e)&&(e={install:e}),e.install(MX))}var MQ=n(6141),MJ=n.n(MQ);function M0(e){return null==e?0:e.length||1}function M1(e){return e}var M2=function(){function e(e,t,n,i,r,o){this._old=e,this._new=t,this._oldKeyGetter=n||M1,this._newKeyGetter=i||M1,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=Array(e.length),r=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=M0(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=M0(l),h=M0(u);if(c>1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),i[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(c>1)for(var d=0;d<c;d++)this._remove&&this._remove(l[d]);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=M0(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=M0(s);0===l?(t[a]=o,r&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),M5=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 M3(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}let M4=function(e){this.otherDims={},null!=e&&dG(this,e)};var M8=mN(),M6={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},M9=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=kt(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return po(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=wf(this.source),n=!(e>30),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 h=this.getSourceDimension(o);h&&(s=t?h.name:null,l=h.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+=M6[l]||"f",u&&(i+=u.uid),i+="$"}var d=this.source;return{dimensions:r,hash:[d.seriesLayoutBy,d.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 M7(e){return e instanceof M9}function ke(e){for(var t=pg(),n=0;n<(e||[]).length;n++){var i=e[n],r=d7(i)?i.name:i;null!=r&&null==t.get(r)&&t.set(r,n)}return t}function kt(e){var t=M8(e);return t.dimNameMap||(t.dimNameMap=ke(e.dimensionsDefine))}var kn=d7,ki="undefined"==typeof Int32Array?Array:Int32Array,kr=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ko=["_approximateExtent"],ka=function(){function e(e,t){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","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;M7(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],h=d8(c)?new M4({name:c}):c instanceof M4?c:new M4(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var p=h.otherDims=h.otherDims||{};o.push(d),r[d]=h,null!=l[d]&&(s=!0),h.createInvertedIndices&&(a[d]=[]),0===p.itemName&&(this._nameDimIdx=u),0===p.itemId&&(this._idDimIdx=u),i&&(h.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=r,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var f=this._dimIdxToName=pg();dK(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);if(i)return i.name},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(d9(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||0>this._schema.getSourceDimensionIndex(e)))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},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,o,a,s,l,u,c,h,d,p,f,g,m=this;if(e instanceof w1&&(g=e),!g){var v=this.dimensions,y=wl(e)||dX(e)?new wg(e,v.length):e;g=new w1;var x=dQ(v,function(e){return{type:m._dimInfos[e].type,property:e}});g.initData(y,x,n)}this._store=g,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,g.count()),this._dimSummary=(i=this,r=this._schema,a=(o={}).encode={},s=pg(),l=[],u=[],c={},dK(i.dimensions,function(e){var t=i.getDimensionInfo(e),n=t.coordDim;if(n){var r,o=t.coordDimIndex;M3(a,n)[o]=e,t.isExtraCoord||(s.set(n,1),"ordinal"!==(r=t.type)&&"time"!==r&&(l[0]=e),M3(c,n)[o]=i.getDimensionIndex(t.name)),t.defaultTooltip&&u.push(e)}bC.each(function(e,n){var i=M3(a,n),r=t.otherDims[n];null!=r&&!1!==r&&(i[r]=t.name)})}),h=[],d={},s.each(function(e,t){var n=a[t];d[t]=n[0],h=h.concat(n)}),o.dataDimsOnCoord=h,o.dataDimIndicesOnCoord=dQ(h,function(e){return i.getDimensionInfo(e).storeDimIndex}),o.encodeFirstDimNotExtra=d,(p=a.label)&&p.length&&(l=p.slice()),(f=a.tooltip)&&f.length?u=f.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,o.userOutput=new M5(c,r),o),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.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&&eL(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!==bI&&!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===bM&&!n.pure)for(var o=[],a=e;a<t;a++){var s,l=n.getItem(a,o);if(!this.hasItemOption&&d7(s=l)&&!(s instanceof Array)&&(this.hasItemOption=!0),l){var u=l.name;null==i[a]&&null!=u&&(i[a]=mR(u,null));var c=l.id;null==r[a]&&null!=c&&(r[a]=mR(c,null))}}if(this._shouldMakeIdFromName())for(var a=e;a<t;a++)eL(this,a);eI(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){kn(e)?dG(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=eP(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 eA(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 d3(e)?i.getValues(dQ(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])[t];return null==n||isNaN(n)?-1:n},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){d4(e)&&(n=t,t=e,e=[]);var i=n||this,r=dQ(eO(e),this._getStoreDimIndex,this);this._store.each(r,i?d2(t,i):t)},e.prototype.filterSelf=function(e,t,n){d4(e)&&(n=t,t=e,e=[]);var i=n||this,r=dQ(eO(e),this._getStoreDimIndex,this);return this._store=this._store.filter(r,i?d2(t,i):t),this},e.prototype.selectRange=function(e){var t=this,n={},i=d1(e),r=[];return dK(i,function(i){var o=t._getStoreDimIndex(i);n[o]=e[i],r.push(o)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){d4(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=dQ(eO(e),this._getStoreDimIndex,this),a=eE(this);return a._store=this._store.map(o,r?d2(t,r):t),a},e.prototype.modify=function(e,t,n,i){var r=n||i||this,o=dQ(eO(e),this._getStoreDimIndex,this);this._store.modify(o,r?d2(t,r):t)},e.prototype.downSample=function(e,t,n,i){var r=eE(this);return r._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),r},e.prototype.lttbDownSample=function(e,t){var n=eE(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;return new xB(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new M2(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return eA(e,t)},function(e){return eA(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||{},kn(e)?dG(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&&(d3(r=this.getVisual(t))?r=r.slice():kn(r)&&(r=dG({},r)),i[t]=r),r},e.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,kn(t)?dG(i,t):i[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){kn(e)?dG(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?dG(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){yC(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){dK(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:dQ(this.dimensions,this._getDimInfo,this),this.hostModel)),eR(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];d4(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(ps(arguments)))})},e.internalField=void(eI=function(e){var t=e._invertedIndicesMap;dK(t,function(n,i){var r=e._dimInfos[i],o=r.ordinalMeta,a=e._store;if(o){n=t[i]=new ki(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(var s=0;s<a.count();s++)n[a.get(r.storeDimIndex,s)]=s}})},eP=function(e,t,n){return mR(e._getCategory(t,n),null)},eA=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=eP(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},eO=function(e){return d3(e)||(e=null!=e?[e]:[]),e},eE=function(t){var n=new e(t._schema?t._schema:dQ(t.dimensions,t._getDimInfo,t),t.hostModel);return eR(n,t),n},eR=function(e,t){dK(kr.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,dK(ko,function(n){e[n]=dW(t[n])}),e._calculationInfo=dG({},t._calculationInfo)},eL=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=eP(e,r,t)),null==s&&null!=o&&(i[t]=s=eP(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 ks(e,t){wl(e)||(e=wc(e));var n,i,r,o,a,s=(t=t||{}).coordDimensions||[],l=t.dimensionsDefine||e.dimensionsDefine||[],u=pg(),c=[],h=(n=e,i=s,r=l,o=t.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,i.length,r.length,o||0),dK(i,function(e){var t;d7(e)&&(t=e.dimsDef)&&(a=Math.max(a,t.length))}),a),d=t.canOmitUnusedDimensions&&h>30,p=l===e.dimensionsDefine,f=p?kt(e):ke(l),g=t.encodeDefine;!g&&t.encodeDefaulter&&(g=t.encodeDefaulter(e,h));for(var m=pg(g),v=new wY(h),y=0;y<v.length;y++)v[y]=-1;function x(e){var t=v[e];if(t<0){var n=l[e],i=d7(n)?n:{name:n},r=new M4,o=i.name;null!=o&&null!=f.get(o)&&(r.name=r.displayName=o),null!=i.type&&(r.type=i.type),null!=i.displayName&&(r.displayName=i.displayName);var a=c.length;return v[e]=a,r.storeDimIndex=e,c.push(r),r}return c[t]}if(!d)for(var y=0;y<h;y++)x(y);m.each(function(e,t){var n=mT(e).slice();if(1===n.length&&!d8(n[0])&&n[0]<0){m.set(t,!1);return}var i=m.set(t,[]);dK(n,function(e,n){var r=d8(e)?f.get(e):e;null!=r&&r<h&&(i[n]=r,w(x(r),t,n))})});var b=0;function w(e,t,n){null!=bC.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,u.set(t,!0))}dK(s,function(e){if(d8(e))t=e,r={};else{t=(r=e).name;var t,n,i,r,o=r.ordinalMeta;r.ordinalMeta=null,(r=dG({},r)).ordinalMeta=o,n=r.dimsDef,i=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null}var a=m.get(t);if(!1!==a){if(!(a=mT(a)).length)for(var s=0;s<(n&&n.length||1);s++){for(;b<h&&null!=x(b).coordDim;)b++;b<h&&a.push(b++)}dK(a,function(e,o){var a=x(e);if(p&&null!=r.type&&(a.type=r.type),w(dU(a,r),t,o),null==a.name&&n){var s=n[o];d7(s)||(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}i&&dU(a.otherDims,i)})}});var S=t.generateCoord,_=t.generateCoordCount,C=null!=_;_=S?_||1:0;var M=S||"value";function k(e){null==e.name&&(e.name=e.coordDim)}if(d)dK(c,function(e){k(e)}),c.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var T=0;T<h;T++){var D=x(T);null==D.coordDim&&(D.coordDim=function(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}(M,u,C),D.coordDimIndex=0,(!S||_<=0)&&(D.isExtraCoord=!0),_--),k(D),null==D.type&&(bN(e,T)===bO.Must||D.isExtraCoord&&(null!=D.otherDims.itemName||null!=D.otherDims.seriesName))&&(D.type="ordinal")}return function(e){for(var t=pg(),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)}}(c),new M9({source:e,dimensions:c,fullDimensionCount:h,dimensionOmitted:d})}var kl=function(e){this.coordSysDims=[],this.axisMap=pg(),this.categoryAxisMap=pg(),this.coordSysName=e},ku={cartesian2d:function(e,t,n,i){var r=e.getReferringComponents("xAxis",mZ).models[0],o=e.getReferringComponents("yAxis",mZ).models[0];t.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),kc(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),kc(o)&&(i.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,i){var r=e.getReferringComponents("singleAxis",mZ).models[0];t.coordSysDims=["single"],n.set("single",r),kc(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var r=e.getReferringComponents("polar",mZ).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),kc(o)&&(i.set("radius",o),t.firstCategoryDimIndex=0),kc(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();dK(o.parallelAxisIndex,function(e,o){var s=r.getComponent("parallelAxis",e),l=a[o];n.set(l,s),kc(s)&&(i.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))})}};function kc(e){return"category"===e.get("type")}function kh(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function kd(e,t){return kh(e,t)?e.getCalculationInfo("stackResultDimension"):t}let kp=function(e,t,n){n=n||{};var i,r,o,a,s,l,u,c,h=t.getSourceManager(),d=!1;e?(d=!0,c=wc(e)):d=(c=h.getSource()).sourceFormat===bM;var p=function(e){var t=e.get("coordinateSystem"),n=new kl(t),i=ku[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t),f=(r=t.get("coordinateSystem"),o=bX.get(r),p&&p.coordSysDims&&(i=dQ(p.coordSysDims,function(e){var t={name:e},n=p.axisMap.get(e);if(n){var i=n.get("type");t.type="category"===i?"ordinal":"time"===i?"time":"float"}return t})),i||(i=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),i),g=n.useEncodeDefaulter,m=d4(g)?g:g?d5(bE,f,t):null,v=ks(c,{coordDimensions:f,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:m,canOmitUnusedDimensions:!d}),y=(a=v.dimensions,s=n.createInvertedIndices,p&&dK(a,function(e,t){var n=e.coordDim,i=p.categoryAxisMap.get(n);i&&(null==l&&(l=t),e.ordinalMeta=i.getOrdinalMeta(),s&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(u=!0)}),u||null==l||(a[l].otherDims.itemName=0),l),x=d?null:h.getSharedDataStore(v),b=function(e,t,n){var i,r,o,a,s,l,u,c=(n=n||{}).byIndex,h=n.stackedCoordDimension;M7(t.schema)?(i=(r=t.schema).dimensions,o=t.store):i=t;var d=!!(e&&e.get("stack"));if(dK(i,function(e,t){d8(e)&&(i[t]=e={name:e}),!d||e.isExtraCoord||(c||a||!e.ordinalMeta||(a=e),s||"ordinal"===e.type||"time"===e.type||h&&h!==e.coordDim||(s=e))}),!s||c||a||(c=!0),s){l="__\0ecstackresult_"+e.id,u="__\0ecstackedover_"+e.id,a&&(a.createInvertedIndices=!0);var p=s.coordDim,f=s.type,g=0;dK(i,function(e){e.coordDim===p&&g++});var m={name:l,coordDim:p,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:u,coordDim:u,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(m.storeDimIndex=o.ensureCalculationDimension(u,f),v.storeDimIndex=o.ensureCalculationDimension(l,f)),r.appendCalculationDimension(m),r.appendCalculationDimension(v)):(i.push(m),i.push(v))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:c,stackedOverDimension:u,stackResultDimension:l}}(t,{schema:v,store:x}),w=new ka(v,t);w.setCalculationInfo(b);var S=null!=y&&function(e){if(e.sourceFormat===bM)return!d3(mA(function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}(c)?function(e,t,n,i){return i===y?n:this.defaultDimValueGetter(e,t,n,i)}:null;return w.hasItemOption=!1,w.initData(d?c:x,null,S),w};var kf=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return dM(t,e),t.prototype.getInitialData=function(e){return kp(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new mr,n=CY("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=CY(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}(Sh);function kg(e,t){var n=e.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=wT(e,t,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a<n.length;a++)o.push(wT(e,t,n[a]));return o.join(" ")}}var km=function(e){function t(t,n,i,r){var o=e.call(this)||this;return o.updateData(t,n,i,r),o}return dM(t,e),t.prototype._createSymbol=function(e,t,n,i,r){this.removeAll();var o=CY(e,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=kv,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(){yX(this.childAt(0))},t.prototype.downplay=function(){yK(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{var h=this.childAt(0);h.silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):xa(h,d,a,n),xd(h)}if(this._updateCommon(e,n,s,i,r),l){var h=this.childAt(0);if(!u){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,xs(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,h,d,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,h=i.labelStatesModels,d=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"),h=xv(m),d=v.getShallow("scale"),p=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var x=CK(e.getItemVisual(t,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),p&&f.attr("cursor",p);var b=e.getItemVisual(t,"style"),w=b.fill;if(f instanceof ye){var S=f.style;f.useStyle(dG({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else f.__isEmptyBrush?f.useStyle(dG({},b)):f.useStyle(b),f.style.decal=null,f.setColor(w,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var _=e.getItemVisual(t,"liftZ"),C=this._z2;null!=_?null==C&&(this._z2=f.z2,f.z2+=_):null!=C&&(f.z2=C,this._z2=null);var M=r&&r.useNameLabel;xm(f,h,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return M?e.getName(t):kg(e,t)},inheritColor:w,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var k=f.ensureState("emphasis");k.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var T=null==d||!0===d?Math.max(1.1,3/this._sizeY):isFinite(d)&&d>0?+d:1;k.scaleX=this._sizeX*T,k.scaleY=this._sizeY*T,this.setSymbolScale(1),y4(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=y_(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&xu(a,{style:{opacity:0}},t,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();xu(i,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:r,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return CX(e.getItemVisual(t,"symbolSize"))},t}(mr);function kv(e,t){this.parent.drift(e,t)}function ky(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 kx(e){return null==e||d7(e)||(e={isIgnore:e}),e||{}}function kb(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:xv(t),cursorStyle:t.get("cursor")}}var kw=function(){function e(e){this.group=new mr,this._SymbolCtor=e||km}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=kx(t);var n=this.group,i=e.hostModel,r=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=kb(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(ky(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,h){var d=r.getItemGraphicEl(h),p=u(c);if(!ky(e,p,c,t)){n.remove(d);return}var f=e.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==f)n.remove(d),(d=new o(e,c,s,l)).setPosition(p);else{d.updateData(e,c,s,l);var m={x:p[0],y:p[1]};a?d.attr(m):xa(d,m,i)}n.add(d),e.setItemGraphicEl(c,d)}).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=kb(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=kx(n);for(var r=e.start;r<e.end;r++){var o=t.getItemLayout(r);if(ky(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){_0(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 kS(e,t,n){var i,r,o,a,s=e.getBaseAxis(),l=e.getOtherAxis(s),u=(i=l,r=n,o=0,a=i.scale.getExtent(),"start"===r?o=a[0]:"end"===r?o=a[1]:d9(r)&&!isNaN(r)?o=r:a[0]>0?o=a[0]:a[1]<0&&(o=a[1]),o),c=s.dim,h=l.dim,d=t.mapDimension(h),p=t.mapDimension(c),f=+("x"===h||"radius"===h),g=dQ(e.dimensions,function(e){return t.mapDimension(e)}),m=!1,v=t.getCalculationInfo("stackResultDimension");return kh(t,g[0])&&(m=!0,g[0]=v),kh(t,g[1])&&(m=!0,g[1]=v),{dataDimsForPoint:g,valueStart:u,valueAxisDim:h,baseAxisDim:c,stacked:!!m,valueDim:d,baseDim:p,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function k_(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 kC="undefined"!=typeof Float32Array,kM=kC?Float32Array:Array;function kk(e){return d3(e)?kC?new Float32Array(e):e:new kM(e)}var kT=Math.min,kD=Math.max;function kI(e,t){return isNaN(e)||isNaN(t)}function kA(e,t,n,i,r,o,a,s,l){for(var u,c,h,d,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(kI(v,y)){if(l){g+=o;continue}break}if(g===n)e[o>0?"moveTo":"lineTo"](v,y),h=v,d=y;else{var x=v-u,b=y-c;if(x*x+b*b<.5){g+=o;continue}if(a>0){for(var w=g+o,S=t[2*w],_=t[2*w+1];S===v&&_===y&&m<i;)m++,w+=o,g+=o,S=t[2*w],_=t[2*w+1],v=t[2*g],y=t[2*g+1],x=v-u,b=y-c;var C=m+1;if(l)for(;kI(S,_)&&C<i;)C++,w+=o,S=t[2*w],_=t[2*w+1];var M=.5,k=0,T=0,D=void 0,I=void 0;if(C>=i||kI(S,_))p=v,f=y;else{k=S-u,T=_-c;var A=v-u,P=S-v,O=y-c,R=_-y,E=void 0,L=void 0;if("x"===s){E=Math.abs(A),L=Math.abs(P);var B=k>0?1:-1;p=v-B*E*a,f=y,D=v+B*L*a,I=y}else if("y"===s){E=Math.abs(O),L=Math.abs(R);var N=T>0?1:-1;p=v,f=y-N*E*a,D=v,I=y+N*L*a}else E=Math.sqrt(A*A+O*O),p=v-k*a*(1-(M=(L=Math.sqrt(P*P+R*R))/(L+E))),f=y-T*a*(1-M),D=v+k*a*M,I=y+T*a*M,D=kT(D,kD(S,v)),I=kT(I,kD(_,y)),D=kD(D,kT(S,v)),I=kD(I,kT(_,y)),k=D-v,T=I-y,p=v-k*E/L,f=y-T*E/L,p=kT(p,kD(u,v)),f=kT(f,kD(c,y)),p=kD(p,kT(u,v)),f=kD(f,kT(c,y)),k=v-p,T=y-f,D=v+k*L/E,I=y+T*L/E}e.bezierCurveTo(h,d,p,f,v,y),h=D,d=I}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var kP=function(){this.smooth=0,this.smoothConstraint=!0},kO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return dM(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new kP},t.prototype.buildPath=function(e,t){var n=t.points,i=0,r=n.length/2;if(t.connectNulls){for(;r>0&&kI(n[2*r-2],n[2*r-1]);r--);for(;i<r&&kI(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=kA(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=vW.CMD,a="x"===t,s=[],l=0;l<r.length;){var u=r[l++],c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,g=void 0,m=void 0;switch(u){case o.M:n=r[l++],i=r[l++];break;case o.L:if(c=r[l++],h=r[l++],(m=a?(e-n)/(c-n):(e-i)/(h-i))<=1&&m>=0){var v=a?(h-i)*m+i:(c-n)*m+n;return a?[e,v]:[v,e]}n=c,i=h;break;case o.C:c=r[l++],h=r[l++],d=r[l++],p=r[l++],f=r[l++],g=r[l++];var y=a?fj(n,c,d,f,e,s):fj(i,h,p,g,e,s);if(y>0)for(var x=0;x<y;x++){var b=s[x];if(b<=1&&b>=0){var v=a?fV(i,h,p,g,b):fV(n,c,d,f,b);return a?[e,v]:[v,e]}}n=f,i=g}}},t}(v3),kR=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t}(kP),kE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return dM(t,e),t.prototype.getDefaultShape=function(){return new kR},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&&kI(n[2*o-2],n[2*o-1]);o--);for(;r<o&&kI(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=kA(e,n,r,o,o,1,t.smooth,a,t.connectNulls);kA(e,i,r+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),r+=s+1,e.closePath()}},t}(v3);function kL(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"])||2;a-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),a!==Math.floor(a)&&(a=Math.floor(a),l++);var h=new yl({shape:{x:a,y:s,width:l,height:u}});if(t){var d=e.getBaseAxis(),p=d.isHorizontal(),f=d.inverse;p?(f&&(h.shape.x+=l),h.shape.width=0):(f||(h.shape.y+=u),h.shape.height=0);var g=d4(r)?function(e){r(e,h)}:null;xs(h,{shape:{width:l,height:u,x:a,y:s}},n,null,i,g)}return h}function kB(e,t,n){var i=e.getArea(),r=mh(i.r0,1),o=mh(i.r,1),a=new S5({shape:{cx:mh(e.cx,1),cy:mh(e.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=r,xs(a,{shape:{endAngle:i.endAngle,r:o}},n)),a}function kN(e,t){return e.type===t}function kF(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function kz(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 kV(e,t){var n=kz(e),i=n[0],r=n[1],o=kz(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 kZ(e){return d9(e)?e:.5*!!e}function kj(e,t,n,i){var r=t.getBaseAxis(),o=+("x"!==r.dim&&"radius"!==r.dim),a=[],s=0,l=[],u=[],c=[],h=[];if(i){for(s=0;s<e.length;s+=2)isNaN(e[s])||isNaN(e[s+1])||h.push(e[s],e[s+1]);e=h}for(s=0;s<e.length-2;s+=2)switch(c[0]=e[s+2],c[1]=e[s+3],u[0]=e[s],u[1]=e[s+1],a.push(u[0],u[1]),n){case"end":l[o]=c[o],l[1-o]=u[1-o],a.push(l[0],l[1]);break;case"middle":var d=(u[o]+c[o])/2,p=[];l[o]=p[o]=d,l[1-o]=u[1-o],p[1-o]=c[1-o],a.push(l[0],l[1]),a.push(p[0],p[1]);break;default:l[o]=u[o],l[1-o]=c[1-o],a.push(l[0],l[1])}return a.push(e[s++],e[s++]),a}function kH(e,t){return[e[2*t],e[2*t+1]]}function kW(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<yI.length;t++)if(e.get([yI[t],"endLabel","show"]))return!0;return!1}function k$(e,t,n,i){if(!kN(t,"cartesian2d"))return kB(t,n,i);var r=i.getModel("endLabel"),o=r.get("valueAnimation"),a=i.getData(),s={lastFrameIndex:0},l=kW(i)?function(n,i){e._endLabelOnDuring(n,i,a,s,o,r,t)}:null,u=t.getBaseAxis().isHorizontal(),c=kL(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 h=c.shape,d=Math.max(h.width,h.height);u?(h.y-=d,h.height+=2*d):(h.x-=d,h.width+=2*d)}return l&&l(1,c),c}var kG=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.init=function(){var e=new mr,t=new kw;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var i,r=this,o=e.coordinateSystem,a=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),c=s.getLayout("points")||[],h="polar"===o.type,d=this._coordSys,p=this._symbolDraw,f=this._polyline,g=this._polygon,m=this._lineGroup,v=!t.ssr&&e.get("animation"),y=!u.isEmpty(),x=u.get("origin"),b=kS(o,s,x),w=y&&function(e,t,n){if(!n.valueDim)return[];for(var i=t.count(),r=kk(2*i),o=0;o<i;o++){var a=k_(n,e,t,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}(o,s,b),S=e.get("showSymbol"),_=e.get("connectNulls"),C=S&&!h&&function(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*km.getSymbolSize(t,a)[+!!e.isHorizontal()]>i)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return dK(o.getViewLabels(),function(e){s[o.scale.getRawOrdinalNumber(e.tickValue)]=1}),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}(e,s,o),M=this._data;M&&M.eachItemGraphicEl(function(e,t){e.__temp&&(a.remove(e),M.setItemGraphicEl(t,null))}),S||p.remove(),a.add(m);var k=!h&&e.get("step");o&&o.getArea&&e.get("clip",!0)&&(null!=(i=o.getArea()).width?(i.x-=.1,i.y-=.1,i.width+=.2,i.height+=.2):i.r0&&(i.r0-=.5,i.r+=.5)),this._clipShapeForSymbol=i;var T=function(e,t,n){var i,r,o=e.getVisual("visualMeta");if(o&&o.length&&e.count()&&"cartesian2d"===t.type){for(var a=o.length-1;a>=0;a--){var s=e.getDimensionInfo(o[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){r=o[a];break}}if(r){var l=t.getAxis(i),u=dQ(r.stops,function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}}),c=u.length,h=r.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=function(e,t){var n,i,r=[],o=e.length;function a(e,t,n){var i=e.coord,r=function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i,r,o,a,s=e*(t.length-1),l=Math.floor(s),u=Math.ceil(s),c=gn(t[l]),h=gn(t[u]),d=s-l;return gl([f2((i=c[0],i+(h[0]-i)*d)),f2((r=c[1],r+(h[1]-r)*d)),f2((o=c[2],o+(h[2]-o)*d)),f5((a=c[3],a+(h[3]-a)*d))],"rgba")}}((n-i)/(t.coord-i),[e.color,t.color]);return{coord:n,color:r}}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}else n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}return r}(u,"x"===i?n.getWidth():n.getHeight()),p=d.length;if(!p&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var f=d[0].coord-10,g=d[p-1].coord+10,m=g-f;if(m<.001)return"transparent";dK(d,function(e){e.offset=(e.coord-f)/m}),d.push({offset:p?d[p-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:p?d[0].offset:.5,color:h[0]||"transparent"});var v=new _y(0,0,0,0,d,!0);return v[i]=f,v[i+"2"]=g,v}}}(s,o,n)||s.getVisual("style")[s.getVisual("drawType")];if(f&&d.type===o.type&&k===this._step){y&&!g?g=this._newPolygon(c,w):g&&!y&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,bu(T));var D=m.getClipPath();D?xs(D,{shape:k$(this,o,!1,e).shape},e):m.setClipPath(k$(this,o,!0,e)),S&&p.updateData(s,{isIgnore:C,clipShape:i,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),kF(this._stackedOnPoints,w)&&kF(this._points,c)||(v?this._doUpdateAnimation(s,w,o,n,k,x,_):(k&&(c=kj(c,o,k,_),w&&(w=kj(w,o,k,_))),f.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:w})))}else S&&p.updateData(s,{isIgnore:C,clipShape:i,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),v&&this._initSymbolLabelAnimation(s,o,i),k&&(c=kj(c,o,k,_),w&&(w=kj(w,o,k,_))),f=this._newPolyline(c),y?g=this._newPolygon(c,w):g&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,bu(T)),m.setClipPath(k$(this,o,!0,e));var I=e.getModel("emphasis"),A=I.get("focus"),P=I.get("blurScope"),O=I.get("disabled");f.useStyle(dU(l.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),y9(f,e,"lineStyle"),f.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"])&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1),y_(f).seriesIndex=e.seriesIndex,y4(f,A,P,O);var R=kZ(e.get("smooth")),E=e.get("smoothMonotone");if(f.setShape({smooth:R,smoothMonotone:E,connectNulls:_}),g){var L=s.getCalculationInfo("stackedOnSeries"),B=0;g.useStyle(dU(u.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),L&&(B=kZ(L.get("smooth"))),g.setShape({smooth:R,stackedOnSmooth:B,smoothMonotone:E,connectNulls:_}),y9(g,e,"areaStyle"),y_(g).seriesIndex=e.seriesIndex,y4(g,A,P,O)}var N=function(e){r._changePolyState(e)};s.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=N)}),this._polyline.onHoverStateChange=N,this._data=s,this._coordSys=o,this._stackedOnPoints=w,this._points=c,this._step=k,this._valueOrigin=x,e.get("triggerLineEvent")&&(this.packEventData(e,f),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,t){y_(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=mB(r,i);if(this._changePolyState("emphasis"),o instanceof Array||null==o||!(o>=0))_5.prototype.highlight.call(this,e,t,n,i);else{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)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,h=e.get("z")||0;(s=new km(r,o)).x=l,s.y=u,s.setZ(c,h);var d=s.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=h,d.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}},t.prototype.downplay=function(e,t,n,i){var r=e.getData(),o=mB(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 _5.prototype.downplay.call(this,e,t,n,i)},t.prototype._changePolyState=function(e){var t=this._polygon;y$(this._polyline,e),t&&y$(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new kO({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 kE({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");d4(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=d4(u)?u(null):u;e.eachItemGraphicEl(function(e,o){if(e){var s=[e.x,e.y],h=void 0,d=void 0,p=void 0;if(n){if(r){var f=t.pointToCoord(s);i?(h=n.startAngle,d=n.endAngle,p=-f[1]/180*Math.PI):(h=n.r0,d=n.r,p=f[0])}else i?(h=n.x,d=n.x+n.width,p=e.x):(h=n.y+n.height,d=n.y,p=e.y)}var g=d===h?0:(p-h)/(d-h);a&&(g=1-g);var m=d4(u)?u(o):l*g+c,v=e.getSymbolPath(),y=v.getTextContent();e.attr({scaleX:0,scaleY:0}),e.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:m}),y&&y.animateFrom({style:{opacity:0}},{duration:300,delay:m}),v.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var i=e.getModel("endLabel");if(kW(e)){var r,o,a,s=e.getData(),l=this._polyline,u=s.getLayout("points");if(!u){l.removeTextContent(),this._endLabel=null;return}var c=this._endLabel;c||((c=this._endLabel=new yS({z2:200})).ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var h=function(e){for(var t,n,i=e.length/2;i>0&&(t=e[2*i-2],n=e[2*i-1],isNaN(t)||isNaN(n));i--);return i-1}(u);h>=0&&(xm(l,xv(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:h,defaultText:function(e,t,n){return null!=n?function(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!d3(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(" ")}(s,n):kg(s,e)},enableTextSetter:!0},(o=(r=t.getBaseAxis()).isHorizontal(),a=r.inverse,{normal:{align:i.get("align")||(o?a?"right":"left":"center"),verticalAlign:i.get("verticalAlign")||(o?"middle":a?"top":"bottom")}})),l.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,h=c.get("connectNulls"),d=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),b=(g?0:-p)*(m?-1:1),w=g?"x":"y",S=function(e,t,n){for(var i,r,o=e.length/2,a=+("x"!==n),s=0,l=-1,u=0;u<o;u++)if(!(isNaN(r=e[2*u+a])||isNaN(e[2*u+1-a]))){if(0===u){i=r;continue}if(i<=t&&r>=t||i>=t&&r<=t){l=u;break}s=u,i=r}return{range:[s,l],t:(t-i)/(r-i)}}(u,y,w),_=S.range,C=_[1]-_[0],M=void 0;if(C>=1){if(C>1&&!h){var k=kH(u,_[0]);s.attr({x:k[0]+x,y:k[1]+b}),r&&(M=c.getRawValue(_[0]))}else{var k=l.getPointOn(y,w);k&&s.attr({x:k[0]+x,y:k[1]+b});var T=c.getRawValue(_[0]),D=c.getRawValue(_[1]);r&&(M=m$(n,d,T,D,S.t))}i.lastFrameIndex=_[0]}else{var I=1===e||i.lastFrameIndex>0?_[0]:0,k=kH(u,I);r&&(M=c.getRawValue(I)),s.attr({x:k[0]+x,y:k[1]+b})}if(r){var A=xM(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,s){for(var l,u=(l=[],t.diff(e).add(function(e){l.push({cmd:"+",idx:e})}).update(function(e,t){l.push({cmd:"=",idx:t,idx1:e})}).remove(function(e){l.push({cmd:"-",idx:e})}).execute(),l),c=[],h=[],d=[],p=[],f=[],g=[],m=[],v=kS(r,t,a),y=e.getLayout("points")||[],x=t.getLayout("points")||[],b=0;b<u.length;b++){var w=u[b],S=!0,_=void 0,C=void 0;switch(w.cmd){case"=":_=2*w.idx,C=2*w.idx1;var M=y[_],k=y[_+1],T=x[C],D=x[C+1];(isNaN(M)||isNaN(k))&&(M=T,k=D),c.push(M,k),h.push(T,D),d.push(n[_],n[_+1]),p.push(i[C],i[C+1]),m.push(t.getRawIndex(w.idx1));break;case"+":var I=w.idx,A=v.dataDimsForPoint,P=r.dataToPoint([t.get(A[0],I),t.get(A[1],I)]);C=2*I,c.push(P[0],P[1]),h.push(x[C],x[C+1]);var O=k_(v,r,t,I);d.push(O[0],O[1]),p.push(i[C],i[C+1]),m.push(t.getRawIndex(I));break;case"-":S=!1}S&&(f.push(w),g.push(g.length))}g.sort(function(e,t){return m[e]-m[t]});for(var R=c.length,E=kk(R),L=kk(R),B=kk(R),N=kk(R),F=[],b=0;b<g.length;b++){var z=g[b],V=2*b,Z=2*z;E[V]=c[Z],E[V+1]=c[Z+1],L[V]=h[Z],L[V+1]=h[Z+1],B[V]=d[Z],B[V+1]=d[Z+1],N[V]=p[Z],N[V+1]=p[Z+1],F[b]=f[z]}return{current:E,next:L,stackedOnCurrent:B,stackedOnNext:N,status:F}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin,0),h=c.current,d=c.stackedOnCurrent,p=c.next,f=c.stackedOnNext;if(r&&(h=kj(c.current,n,r,a),d=kj(c.stackedOnCurrent,n,r,a),p=kj(c.next,n,r,a),f=kj(c.stackedOnNext,n,r,a)),kV(h,p)>3e3||l&&kV(d,f)>3e3){s.stopAnimation(),s.setShape({points:p}),l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f}));return}s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),xa(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:d}),l.stopAnimation(),xa(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}(_5);function kU(e,t){return{seriesType:e,plan:Sb(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,r=e.pipelineContext,o=t||r.large;if(i){var a=dQ(i.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");kh(n,a[0])&&(a[0]=l),kh(n,a[1])&&(a[1]=l);var u=n.getStore(),c=n.getDimensionIndex(a[0]),h=n.getDimensionIndex(a[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,r=o&&kk(n*s),a=[],l=[],d=e.start,p=0;d<e.end;d++){var f=void 0;if(1===s){var g=u.get(c,d);f=i.dataToPoint(g,null,l)}else a[0]=u.get(c,d),a[1]=u.get(h,d),f=i.dataToPoint(a,null,l);o?(r[p++]=f[0],r[p++]=f[1]):t.setItemLayout(d,f.slice())}o&&t.setLayout("points",r)}}}}}}var kq={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},minmax:function(e){for(var t=-1/0,n=-1/0,i=0;i<e.length;i++){var r=e[i],o=Math.abs(r);o>t&&(t=o,n=r)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},kY=function(e){return Math.round(e.length/2)},kX=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},kK=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return dM(t,e),t.prototype.getDefaultShape=function(){return new kX},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}(v3),kQ=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},kJ=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return dM(t,e),t.prototype.getDefaultShape=function(){return new kQ},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=(o-r)*.5,s=r+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=2*Math.PI,d=c?u-l<h:l-u<h;d||(l=u-(c?h:-h));var p=Math.cos(l),f=Math.sin(l),g=Math.cos(u),m=Math.sin(u);d?(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}(v3);function k0(e,t){var n=null==e?"":e+"";return t&&(d8(t)?n=t.replace("{value}",n):d4(t)&&(n=t(e))),n}var k1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var i,r,o=e.get(["axisLine","lineStyle","color"]),a=(i=e.get("center"),r=Math.min(n.getWidth(),n.getHeight()),{cx:mc(i[0],n.getWidth()),cy:mc(i[1],n.getHeight()),r:mc(e.get("radius"),r/2)});this._renderMain(e,t,n,o,a),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")?kJ:S5,h=u.get("show"),d=u.getModel("lineStyle"),p=d.get("width"),f=[s,l];vH(f,!a),s=f[0];for(var g=(l=f[1])-s,m=s,v=[],y=0;h&&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(d.getLineStyle(["color","width"])),v.push(x),m=l}v.reverse(),dK(v,function(e){return o.add(e)});var b=function(e){var t;if(e<=0)return i[0][1];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,b,r,s,l,a,p),this._renderTitleAndDetail(e,t,n,b,r),this._renderAnchor(e,r),this._renderPointer(e,t,n,b,r,s,l,a,p)},t.prototype._renderTicks=function(e,t,n,i,r,o,a,s,l){for(var u,c,h=this.group,d=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"),b=e.get("splitNumber"),w=y.get("splitNumber"),S=mc(v.get("length"),f),_=mc(y.get("length"),f),C=o,M=(a-o)/b,k=M/w,T=v.getModel("lineStyle").getLineStyle(),D=y.getModel("lineStyle").getLineStyle(),I=v.get("distance"),A=0;A<=b;A++){if(u=Math.cos(C),c=Math.sin(C),v.get("show")){var P=I?I+l:l,O=new _s({shape:{x1:u*(f-P)+d,y1:c*(f-P)+p,x2:u*(f-S-P)+d,y2:c*(f-S-P)+p},style:T,silent:!0});"auto"===T.stroke&&O.setStyle({stroke:i(A/b)}),h.add(O)}if(x.get("show")){var P=x.get("distance")+I,R=k0(mh(A/b*(m-g)+g),x.get("formatter")),E=i(A/b),L=u*(f-S-P)+d,B=c*(f-S-P)+p,N=x.get("rotate"),F=0;"radial"===N?(F=-C+2*Math.PI)>Math.PI/2&&(F+=Math.PI):"tangential"===N?F=-C-Math.PI/2:d9(N)&&(F=N*Math.PI/180),0===F?h.add(new yS({style:xy(x,{text:R,x:L,y:B,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):h.add(new yS({style:xy(x,{text:R,x:L,y:B,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:L,originY:B,rotation:F}))}if(y.get("show")&&A!==b){var P=y.get("distance");P=P?P+l:l;for(var z=0;z<=w;z++){var V=new _s({shape:{x1:(u=Math.cos(C))*(f-P)+d,y1:(c=Math.sin(C))*(f-P)+p,x2:u*(f-_-P)+d,y2:c*(f-_-P)+p},silent:!0,style:D});"auto"===D.stroke&&V.setStyle({stroke:i((A+z/w)/b)}),h.add(V),C+=k}C-=k}else C+=M}},t.prototype._renderPointer=function(e,t,n,i,r,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,d=[],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"),b=[y,x],w=[o,a];function S(t,n){var i,o=m.getItemModel(t).getModel("pointer"),a=mc(o.get("width"),r.r),s=mc(o.get("length"),r.r),l=e.get(["pointer","icon"]),u=o.get("offsetCenter"),c=mc(u[0],r.r),h=mc(u[1],r.r),d=o.get("keepAspect");return(i=l?CY(l,c-a/2,h-s,a,s,null,d):new kK({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:h}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function _(e,t){var n=f.get("roundCap")?kJ:S5,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,h=new n({shape:{startAngle:o,endAngle:t,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:c}});return i&&(h.z2=x-m.get(v,e)%x),h}(g||p)&&(m.diff(c).add(function(t){var n=m.get(v,t);if(p){var i=S(t,o);xs(i,{rotation:-((isNaN(+n)?w[0]:mu(n,b,w,!0))+Math.PI/2)},e),u.add(i),m.setItemGraphicEl(t,i)}if(g){var r=_(t,o);xs(r,{shape:{endAngle:mu(n,b,w,f.get("clip"))}},e),u.add(r),yC(e.seriesIndex,m.dataType,t,r),d[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=S(t,a);s.rotation=a,xa(s,{rotation:-((isNaN(+i)?w[0]:mu(i,b,w,!0))+Math.PI/2)},e),u.add(s),m.setItemGraphicEl(t,s)}if(g){var l=h[n],y=_(t,l?l.shape.endAngle:o);xa(y,{shape:{endAngle:mu(i,b,w,f.get("clip"))}},e),u.add(y),yC(e.seriesIndex,m.dataType,t,y),d[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 ye){var c=s.style;s.useStyle(dG({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(mu(m.get(v,e),b,[0,1],!0))),s.z2EmphasisLift=0,y9(s,t),y4(s,r,o,a)}if(g){var h=d[e];h.useStyle(m.getItemVisual(e,"style")),h.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),h.z2EmphasisLift=0,y9(h,t),y4(h,r,o,a)}}),this._progressEls=d)},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=CY(r,t.cx-i/2+mc(o[0],t.r),t.cy-i/2+mc(o[1],t.r),i,i,null,a);s.z2=+!!n.get("showAbove"),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 mr,h=[],d=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){h[e]=new yS({silent:!0}),d[e]=new yS({silent:!0})}).update(function(e,t){h[e]=o._titleEls[t],d[e]=o._detailEls[t]}).execute(),a.each(function(t){var n=a.getItemModel(t),o=a.get(s,t),g=new mr,m=i(mu(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=r.cx+mc(y[0],r.r),b=r.cy+mc(y[1],r.r),w=h[t];w.attr({z2:2*!f,style:xy(v,{x:x,y:b,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:m})}),g.add(w)}var S=n.getModel("detail");if(S.get("show")){var _=S.get("offsetCenter"),C=r.cx+mc(_[0],r.r),M=r.cy+mc(_[1],r.r),k=mc(S.get("width"),r.r),T=mc(S.get("height"),r.r),D=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,w=d[t],I=S.get("formatter");w.attr({z2:2*!f,style:xy(S,{x:C,y:M,text:k0(o,I),width:isNaN(k)?null:k,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:D})}),function(e,t,n,i){if(e){var r=xM(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)}}(w,{normal:S},o,function(e){return k0(e,I)}),p&&function(e,t,n,i,r){var o=xM(e);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=po(o.interpolatedValue,o.prevValue),l=o.value;e.percent=0,(null==o.prevValue?xs:xa)(e,{percent:1},i,t,null,function(i){var u=m$(n,o.precision,s,l,i);o.interpolatedValue=1===i?null:u,xf(e,xg({labelDataIndex:t,labelFetcher:r,defaultText:a?a(u):u+""},o.statesModels,u))})}}(w,t,a,e,{getFormattedLabel:function(e,t,n,i,r,a){return k0(a?a.interpolatedValue:o,I)}}),g.add(w)}c.add(g)}),this.group.add(c),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(_5);function k2(e,t,n){t=d3(t)&&{coordDimensions:t}||dG({encodeDefine:e.getEncode()},t);var i=e.getSource(),r=new ka(ks(i,t).dimensions,e);return r.initData(i,n),r}var k5=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return dM(t,e),t.prototype.getInitialData=function(e,t){return k2(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}(Sh),k3=2*Math.PI,k4=Math.PI/180;function k8(e,t){return bf(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function k6(e,t){var n,i,r=k8(e,t),o=e.get("center"),a=e.get("radius");d3(a)||(a=[0,a]);var s=mc(r.width,t.getWidth()),l=mc(r.height,t.getHeight()),u=Math.min(s,l),c=mc(a[0],u/2),h=mc(a[1],u/2),d=e.coordinateSystem;if(d){var p=d.dataToPoint(o);n=p[0]||0,i=p[1]||0}else d3(o)||(o=[o,o]),n=mc(o[0],s)+r.x,i=mc(o[1],l)+r.y;return{cx:n,cy:i,r0:c,r:h}}function k9(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),i=t.mapDimension("value"),r=k8(e,n),o=k6(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*k4,h=e.get("endAngle"),d=e.get("padAngle")*k4;h="auto"===h?c-k3:-h*k4;var p=e.get("minAngle")*k4+d,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"),b=t.getDataExtent(i);b[0]=0;var w=v?1:-1,S=[c,h],_=w*d/2;vH(S,!v),c=S[0];var C=Math.abs((h=S[1])-c),M=C,k=0,T=c;if(t.setLayout({viewRect:r,r:l}),t.each(i,function(e,n){if(isNaN(e)){t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});return}(i="area"!==y?0===g&&x?m:e*m:C/f)<p?(i=p,M-=p):k+=e;var i,r=T+w*i,o=0,c=0;d>i?c=o=T+w*i/2:(o=T+_,c=r-_),t.setItemLayout(n,{angle:i,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?mu(e,b,[u,l]):l}),T=r}),M<k3&&f){if(M<=.001){var D=C/f;t.each(i,function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n);i.angle=D;var r=0,o=0;D<d?o=r=c+w*(n+.5)*D:(r=c+w*n*D+_,o=c+w*(n+1)*D-_),i.startAngle=r,i.endAngle=o}})}else m=M/k,T=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<d?a=o=T+w*r/2:(o=T+_,a=T+w*r-_),i.startAngle=o,i.endAngle=a,T+=w*r}})}})}function k7(e,t,n,i,r,o,a,s){var l=n-e,u=i-t,c=Math.sqrt(l*l+u*u),h=((r-e)*(l/=c)+(o-t)*(u/=c))/c;s&&(h=Math.min(Math.max(h,0),1)),h*=c;var d=a[0]=e+h*l,p=a[1]=t+h*u;return Math.sqrt((d-r)*(d-r)+(p-o)*(p-o))}vW.CMD;var Te=new fn,Tt=new fn,Tn=new fn,Ti=new fn,Tr=new fn,To=[],Ta=new fn;function Ts(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 Tl(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=pD(i[0],i[1]),o=pD(i[1],i[2]);if(!r||!o){e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]);return}var a=Math.min(r,o)*n,s=pA([],i[1],i[0],a/r),l=pA([],i[1],i[2],a/o),u=pA([],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])}}var Tu=Math.PI/180;function Tc(e,t,n,i,r,o,a,s,l,u){if(!(e.length<2)){for(var c=e.length,h=0;h<c;h++)if("outer"===e[h].position&&"labelLine"===e[h].labelAlignTo){var d=e[h].label.x-u;e[h].linePoints[1][0]+=d,e[h].label.x=u}(function(e,t,n,i,r,o){var a,s,l,u=e.length;if(!(u<2)){e.sort(function(e,t){return e.rect.y-t.rect.y});for(var c=0,h=!1,d=[],p=0,f=0;f<u;f++){var g=e[f],m=g.rect;(a=m[t]-c)<0&&(m[t]-=a,g.label[t]-=a,h=!0);var v=Math.max(-a,0);d.push(v),p+=v,c=m[t]+m[n]}p>0&&o&&S(-p/u,0,u);var y=e[0],x=e[u-1];return b(),s<0&&_(-s,.8),l<0&&_(l,.8),b(),w(s,l,1),w(l,s,-1),b(),s<0&&C(-s),l<0&&C(l),h}function b(){s=y.rect[t]-i,l=r-x.rect[t]-x.rect[n]}function w(e,t,n){if(e<0){var i=Math.min(t,-e);if(i>0){S(i*n,0,u);var r=i+e;r<0&&_(-r*n,1)}else _(-e*n,1)}}function S(n,i,r){0!==n&&(h=!0);for(var o=i;o<r;o++){var a=e[o],s=a.rect;s[t]+=n,a.label[t]+=n}}function _(i,r){for(var o=[],a=0,s=1;s<u;s++){var l=e[s-1].rect,c=Math.max(e[s].rect[t]-l[t]-l[n],0);o.push(c),a+=c}if(a){var h=Math.min(Math.abs(i)/a,r);if(i>0)for(var s=0;s<u-1;s++){var d=o[s]*h;S(d,0,s+1)}else for(var s=u-1;s>0;s--){var d=o[s-1]*h;S(-d,s,u)}}}function C(e){for(var t=e<0?-1:1,n=Math.ceil((e=Math.abs(e))/(u-1)),i=0;i<u-1;i++)if(t>0?S(n,0,i+1):S(-n,u-i-1,u),(e-=n)<=0)return}})(e,"y","height",l,l+a,void 0)&&!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 h=l.label.x-t-l.len2*r,d=i+l.len,f=Math.abs(h)<d?Math.sqrt(c*c/(1-h*h/d/d)):d;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,h=t+(Math.sqrt(c*c*(1-Math.abs(u*u/a)))+l.len2)*r,d=h-l.label.x,p=l.targetTextWidth-d*r;Th(l,p,!0),l.label.x=h}}}function Th(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 h=o.height;if(u&&u.match("break")){i.setStyle("backgroundColor",null),i.setStyle("width",t-l);var d=i.getBoundingRect();i.setStyle("width",Math.ceil(d.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-h)/2}}}function Td(e){return"center"===e.position}function Tp(e,t,n){var i=e.get("borderRadius");if(null==i)return n?{cornerRadius:0}:null;d3(i)||(i=[i,i,i,i]);var r=Math.abs(t.r||0-t.r0||0);return{cornerRadius:dQ(i,function(e){return g5(e,r)})}}var Tf=function(e){function t(t,n,i){var r=e.call(this)||this;r.z2=2;var o=new yS;return r.setTextContent(o),r.updateData(t,n,i,!0),r}return dM(t,e),t.prototype.updateData=function(e,t,n,i){var r=e.hostModel,o=e.getItemModel(t),a=o.getModel("emphasis"),s=e.getItemLayout(t),l=dG(Tp(o.getModel("itemStyle"),s,!0),s);if(isNaN(l.startAngle)){this.setShape(l);return}if(i){this.setShape(l);var u=r.getShallow("animationType");r.ecModel.ssr?(xs(this,{scaleX:0,scaleY:0},r,{dataIndex:t,isFrom:!0}),this.originX=l.cx,this.originY=l.cy):"scale"===u?(this.shape.r=s.r0,xs(this,{shape:{r:s.r}},r,t)):null!=n?(this.setShape({startAngle:n,endAngle:n}),xs(this,{shape:{startAngle:s.startAngle,endAngle:s.endAngle}},r,t)):(this.shape.endAngle=s.startAngle,xa(this,{shape:{endAngle:s.endAngle}},r,t))}else xd(this),xa(this,{shape:l},r,t);this.useStyle(e.getItemVisual(t,"style")),y9(this,o);var c=(s.startAngle+s.endAngle)/2,h=r.get("selectedOffset"),d=Math.cos(c)*h,p=Math.sin(c)*h,f=o.getShallow("cursor");f&&this.attr("cursor",f),this._updateLabel(r,e,t),this.ensureState("emphasis").shape=dG({r:s.r+(a.get("scale")&&a.get("scaleSize")||0)},Tp(a.getModel("itemStyle"),s)),dG(this.ensureState("select"),{x:d,y:p,shape:Tp(o.getModel(["select","itemStyle"]),s)}),dG(this.ensureState("blur"),{shape:Tp(o.getModel(["blur","itemStyle"]),s)});var g=this.getTextGuideLine(),m=this.getTextContent();g&&dG(g.ensureState("select"),{x:d,y:p}),dG(m.ensureState("select"),{x:d,y:p}),y4(this,a.get("focus"),a.get("blurScope"),a.get("disabled"))},t.prototype._updateLabel=function(e,t,n){var i=t.getItemModel(n),r=i.getModel("labelLine"),o=t.getItemVisual(n,"style"),a=o&&o.fill,s=o&&o.opacity;xm(this,xv(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:s,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var l=this.getTextContent();this.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=e.get(["label","position"]);if("outside"!==u&&"outer"!==u)this.removeTextGuideLine();else{var c=this.getTextGuideLine();c||(c=new _i,this.setTextGuideLine(c)),function(e,t,n){var i=e.getTextGuideLine(),r=e.getTextContent();if(!r){i&&e.removeTextGuideLine();return}for(var o=t.normal,a=o.get("show"),s=r.ignore,l=0;l<yA.length;l++){var u=yA[l],c=t[u],h="normal"===u;if(c){var d=c.get("show");if((h?s:po(r.states[u]&&r.states[u].ignore,s))||!po(d,a)){var p=h?i:i&&i.states[u];p&&(p.ignore=!0),i&&Ts(i,!0,u,c);continue}!i&&(i=new _i,e.setTextGuideLine(i),h||!s&&a||Ts(i,!0,"normal",t.normal),e.stateProxy&&(i.stateProxy=e.stateProxy)),Ts(i,!1,u,c)}}if(i){dU(i.style,n),i.style.fill=null;var f=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,i.buildPath=Tl}}(this,function(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},i=0;i<yI.length;i++){var r=yI[i];n[r]=e.getModel([r,t])}return n}(i),{stroke:a,opacity:pa(r.get(["lineStyle","opacity"]),s,1)})}},t}(S5),Tg=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return dM(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=new S5({shape:k6(e,n)});c.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,s.add(c)}o.diff(a).add(function(e){var t=new Tf(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){xh(a.getItemGraphicEl(t),e,t)}).execute(),function(e){var t,n,i=e.getData(),r=[],o=!1,a=(e.get("minShowLabelAngle")||0)*Tu,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,c=s.x,h=s.y,d=s.height;function p(e){e.ignore=!0}i.each(function(e){var s,h,d,f,g=i.getItemGraphicEl(e),m=g.shape,v=g.getTextContent(),y=g.getTextGuideLine(),x=i.getItemModel(e),b=x.getModel("label"),w=b.get("position")||x.get(["emphasis","label","position"]),S=b.get("distanceToLabelLine"),_=b.get("alignTo"),C=mc(b.get("edgeDistance"),u),M=b.get("bleedMargin"),k=x.getModel("labelLine"),T=k.get("length");T=mc(T,u);var D=k.get("length2");if(D=mc(D,u),Math.abs(m.endAngle-m.startAngle)<a){dK(v.states,p),v.ignore=!0,y&&(dK(y.states,p),y.ignore=!0);return}if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(v)){var I=(m.startAngle+m.endAngle)/2,A=Math.cos(I),P=Math.sin(I);t=m.cx,n=m.cy;var O="inside"===w||"inner"===w;if("center"===w)s=m.cx,h=m.cy,f="center";else{var R=(O?(m.r+m.r0)/2*A:m.r*A)+t,E=(O?(m.r+m.r0)/2*P:m.r*P)+n;if(s=R+3*A,h=E+3*P,!O){var L=R+A*(T+l-m.r),B=E+P*(T+l-m.r),N=L+(A<0?-1:1)*D;s="edge"===_?A<0?c+C:c+u-C:N+(A<0?-S:S),h=B,d=[[R,E],[L,B],[N,B]]}f=O?"center":"edge"===_?A>0?"right":"left":A>0?"left":"right"}var F=Math.PI,z=0,V=b.get("rotate");if(d9(V))z=F/180*V;else if("center"===w)z=0;else if("radial"===V||!0===V)z=A<0?-I+F:-I;else if("tangential"===V&&"outside"!==w&&"outer"!==w){var Z=Math.atan2(A,P);Z<0&&(Z=2*F+Z),P>0&&(Z=F+Z),z=Z-F}if(o=!!z,v.x=s,v.y=h,v.rotation=z,v.setStyle({verticalAlign:"middle"}),O){v.setStyle({align:f});var j=v.states.select;j&&(j.x+=v.x,j.y+=v.y)}else{var H=v.getBoundingRect().clone();H.applyTransform(v.getComputedTransform());var W=(v.style.margin||0)+2.1;H.y-=W/2,H.height+=W,r.push({label:v,labelLine:y,position:w,len:T,len2:D,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new fn(A,P),linePoints:d,textAlign:f,labelDistance:S,labelAlignTo:_,edgeDistance:C,bleedMargin:M,rect:H,unconstrainedWidth:H.width,labelStyleWidth:v.style.width})}g.setTextConfig({inside:O})}}),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,i,r,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++){var p=e[d].label;!Td(e[d])&&(p.x<t?(c=Math.min(c,p.x),l.push(e[d])):(h=Math.max(h,p.x),u.push(e[d])))}for(var d=0;d<e.length;d++){var f=e[d];if(!Td(f)&&f.linePoints){if(null!=f.labelStyleWidth)continue;var p=f.label,g=f.linePoints,m=void 0;m="edge"===f.labelAlignTo?p.x<t?g[2][0]-f.labelDistance-a-f.edgeDistance:a+r-f.edgeDistance-g[2][0]-f.labelDistance:"labelLine"===f.labelAlignTo?p.x<t?c-a-f.bleedMargin:a+r-h-f.bleedMargin:p.x<t?p.x-a-f.bleedMargin:a+r-p.x-f.bleedMargin,f.targetTextWidth=m,Th(f,m)}}Tc(u,t,n,i,1,r,o,a,s,h),Tc(l,t,n,i,-1,r,o,a,s,c);for(var d=0;d<e.length;d++){var f=e[d];if(!Td(f)&&f.linePoints){var p=f.label,g=f.linePoints,v="edge"===f.labelAlignTo,y=p.style.padding,x=y?y[1]+y[3]:0,b=p.style.backgroundColor?0:x,w=f.rect.width+b,S=g[1][0]-g[2][0];v?p.x<t?g[2][0]=a+f.edgeDistance+w+f.labelDistance:g[2][0]=a+r-f.edgeDistance-w-f.labelDistance:(p.x<t?g[2][0]=p.x+f.labelDistance:g[2][0]=p.x-f.labelDistance,g[1][0]=g[2][0]+S),g[1][1]=g[2][1]=p.y}}}(r,t,n,l,u,d,c,h);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&&(dK(m.states,p),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(v){var b=g.linePoints;y||!b?(dK(v.states,p),v.ignore=!0):(function(e,t){if(t<=180&&t>0){t=t/180*Math.PI,Te.fromArray(e[0]),Tt.fromArray(e[1]),Tn.fromArray(e[2]),fn.sub(Ti,Te,Tt),fn.sub(Tr,Tn,Tt);var n=Ti.len(),i=Tr.len();if(!(n<.001)&&!(i<.001)&&(Ti.scale(1/n),Tr.scale(1/i),Math.cos(t)<Ti.dot(Tr))){var r=k7(Tt.x,Tt.y,Tn.x,Tn.y,Te.x,Te.y,To,!1);Ta.fromArray(To),Ta.scaleAndAdd(Tr,r/Math.tan(Math.PI-t));var o=Tn.x!==Tt.x?(Ta.x-Tt.x)/(Tn.x-Tt.x):(Ta.y-Tt.y)/(Tn.y-Tt.y);if(isNaN(o))return;o<0?fn.copy(Ta,Tt):o>1&&fn.copy(Ta,Tn),Ta.toArray(e[1])}}}(b,g.minTurnAngle),function(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,Te.fromArray(e[0]),Tt.fromArray(e[1]),Tn.fromArray(e[2]),fn.sub(Ti,Tt,Te),fn.sub(Tr,Tn,Tt);var i=Ti.len(),r=Tr.len();if(!(i<.001)&&!(r<.001)&&(Ti.scale(1/i),Tr.scale(1/r),Ti.dot(t)<Math.cos(n))){var o=k7(Tt.x,Tt.y,Tn.x,Tn.y,Te.x,Te.y,To,!1);Ta.fromArray(To);var a=Math.PI/2,s=a+Math.acos(Tr.dot(t))-n;if(s>=a)fn.copy(Ta,Tn);else{Ta.scaleAndAdd(Tr,o/Math.tan(Math.PI/2-s));var l=Tn.x!==Tt.x?(Ta.x-Tt.x)/(Tn.x-Tt.x):(Ta.y-Tt.y)/(Tn.y-Tt.y);if(isNaN(l))return;l<0?fn.copy(Ta,Tt):l>1&&fn.copy(Ta,Tn)}Ta.toArray(e[1])}}}(b,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new fn(b[0][0],b[0][1])})}}}(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}(_5),Tm=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}(),Tv=mN(),Ty=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new Tm(d2(this.getData,this),d2(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return k2(this,{coordDimensions:["value"],encodeDefaulter:d5(bL,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),i=Tv(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=dJ(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var i=Math.pow(10,t),r=dQ(e,function(e){return(isNaN(e)?0:e)/n*i*100}),o=100*i,a=dQ(r,function(e){return Math.floor(e)}),s=dJ(a,function(e,t){return e+t},0),l=dQ(r,function(e,t){return e-a[t]});s<o;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,d=l.length;h<d;++h)l[h]>u&&(u=l[h],c=h);++a[c],l[c]=0,++s}return dQ(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){mD(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}(Sh),Tx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return dM(t,e),t.prototype.getInitialData=function(e,t){return kp(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}(Sh),Tb=function(){},Tw=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return dM(t,e),t.prototype.getDefaultShape=function(){return new Tb},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;return}for(this._ctx=null,n=this._off;n<i.length;){var c=i[n++],h=i[n++];!(isNaN(c)||isNaN(h))&&(!u||u.contain(c,h))&&(a.x=c-r[0]/2,a.y=h-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 h=n[c++],d=n[c++];a=Math.min(h,a),l=Math.max(h,l),s=Math.min(d,s),u=Math.max(d,u)}e=this._rect=new fh(a-r/2,s-o/2,l-a+r,u-s+o)}return e},t}(v3),TS=function(){function e(){this.group=new mr}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=(e.endIndex-e.startIndex)*2,i=8*e.startIndex;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 Tw({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=CY(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=y_(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}(),T_=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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=kU("").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 TS:new kw,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}(_5),TC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(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}(bb),TM=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),Tk=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",mZ).models[0]},t.type="cartesian2dAxis",t}(bb);dY(Tk,TM);var TT={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,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},TD=d$({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},TT),TI=d$({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}}},TT),TA=d$({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},TI),TP=dU({logBase:10},TI);let TO={category:TD,value:TI,time:TA,log:TP};var TR=0,TE=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++TR}return e.createByAxisModel=function(t){var n=t.option,i=n.data,r=i&&dQ(i,TL);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(!d8(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=pg(this.categories))},e}();function TL(e){return d7(e)&&null!=e.value?e.value:e+""}var TB={value:1,category:1,time:1,log:1};function TN(e,t,n,i){dK(TB,function(r,o){var a=d$(d$({},TO[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 dM(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=bm(this),i=n?by(e):{};d$(e,t.getTheme().get(o+"Axis")),d$(e,this.getDefaultOption()),e.type=TF(e),n&&bv(e,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=TE.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",TF)}function TF(e){return e.type||(e.data?"category":"value")}var Tz=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}();function TV(e){return"interval"===e.type||"log"===e.type}function TZ(e){var t=Math.pow(10,mx(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,mh(n*t)}m0(Tz);function Tj(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function TH(e,t){return e>=t[0]&&e<=t[1]}function TW(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function T$(e,t){return e*(t[1]-t[0])+t[0]}var TG=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new TE({})),d3(i)&&(i=new TE({categories:dQ(i,function(e){return d7(e)?e.value:e})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return dM(t,e),t.prototype.parse=function(e){return null==e?NaN:d8(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return TH(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return TW(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(T$(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){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}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}},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}(Tz);Tz.registerClass(TG);var TU=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 dM(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return TH(e,this._extent)},t.prototype.normalize=function(e){return TW(e,this._extent)},t.prototype.scale=function(e){return T$(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=mp(e)+2},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:mh(i[0]-t,r)}):o.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(o.push({value:a}),(a=mh(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:mh(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=mh(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=mp(e.value)||0:"auto"===n&&(n=this._intervalPrecision),bi(mh(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var i,r,o,a,s,l=this._extent,u=l[1]-l[0];if(isFinite(u)){u<0&&(u=-u,l.reverse());var c,h,d=(i=e,r={},o=l[1]-l[0],a=r.interval=mb(o/i,!0),null!=t&&a<t&&(a=r.interval=t),null!=n&&a>n&&(a=r.interval=n),s=r.intervalPrecision=mp(a)+2,c=r.niceTickExtent=[mh(Math.ceil(l[0]/a)*a,s),mh(Math.floor(l[1]/a)*a,s)],h=l,isFinite(c[0])||(c[0]=h[0]),isFinite(c[1])||(c[1]=h[1]),Tj(c,0,h),Tj(c,1,h),c[0]>c[1]&&(c[0]=c[1]),r);this._intervalPrecision=d.intervalPrecision,this._interval=d.interval,this._niceExtent=d.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}isFinite(t[1]-t[0])||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=mh(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=mh(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(Tz);Tz.registerClass(TU);var Tq="__ec_stack_";function TY(e){return e.dim+e.index}function TX(e){var t={};dK(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 h=e.barGap;null!=h&&(o.gap=h);var d=e.barCategoryGap;null!=d&&(o.categoryGap=d)});var n={};return dK(t,function(e,t){n[t]={};var i,r=e.stacks,o=e.bandWidth,a=e.categoryGap;null==a&&(a=Math.max(35-4*d1(r).length,15)+"%");var s=mc(a,o),l=mc(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),dK(r,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var 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=h;t&&t<i&&(i=Math.min(t,u)),n&&n>i&&(i=n),i!==h&&(e.width=i,u-=i+l*i,c--)}}),h=Math.max(h=(u-s)/(c+(c-1)*l),0);var d=0;dK(r,function(e,t){e.width||(e.width=h),i=e,d+=e.width*(1+l)}),i&&(d-=i.width*l);var p=-d/2;dK(r,function(e,i){n[t][i]=n[t][i]||{bandWidth:o,offset:p,width:e.width},p+=e.width*(1+l)})}),n}var TK=function(e,t,n,i){for(;n<i;){var r=n+i>>>1;e[r][1]<t?n=r+1:i=r}return n},TQ=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return dM(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return xK(e.value,xG[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(xX(this._minLevelUnit))]||xG.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(d8(n))o=n;else if(d4(n))o=n(e.value,t,{level:e.level});else{var a=dG({},xW);if(e.level>0)for(var s=0;s<xU.length;++s)a[xU[s]]="{primary|"+a[xU[s]]+"}";var l=n?!1===n.inherit?n:dU(n,a):a,u=xQ(e.value,r);if(l[u])o=l[u];else if(l.inherit){for(var c=xq.indexOf(u),s=c-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(d3(o)){var h=null==e.level?0:e.level>=0?e.level:o.length+e.level;h=Math.min(h,o.length-1),o=o[h]}}return xK(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){for(var r=0,o=[],a=[],s=0,l=0,u=0;u<xq.length&&r++<1e4;++u){var c,h=xX(xq[u]);if((c=xq[u])===xX(c)&&(function(e,r,o){var a=[],s=!r.length;if(!function(e,t,n,i){var r=my(t),o=my(n),a=function(e){return xJ(r,e,i)===xJ(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")},h=function(){return c()&&a("minute")},d=function(){return h()&&a("second")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return d();case"millisecond":return d()&&a("millisecond")}}(xX(e),i[0],i[1],n)){s&&(r=[{value:function(e,t,n){var i=new Date(e);switch(xX(t)){case"year":case"month":i[x6(n)](0);case"day":i[x9(n)](1);case"hour":i[x7(n)](0);case"minute":i[be(n)](0);case"second":i[bt(n)](0),i[bn(n)](0)}return i.getTime()}(new Date(i[0]),e,n)},{value:i[1]}]);for(var l=0;l<r.length-1;l++){var u,c,h,d=r[l].value,p=r[l+1].value;if(d!==p){var f=void 0,g=void 0,m=void 0,v=!1;switch(e){case"year":f=Math.max(1,Math.round(t/864e5/365)),g=x0(n),m=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":f=(u=t/2592e6)>6?6:u>3?3:u>2?2:1,g=x1(n),m=x6(n);break;case"week":case"half-week":case"day":f=(c=t/864e5)>16?16:c>7.5?7:c>3.5?4:c>1.5?2:1,g=x2(n),m=x9(n);break;case"half-day":case"quarter-day":case"hour":f=(h=t/36e5)>12?12:h>6?6:h>3.5?4:h>2?2:1,g=x5(n),m=x7(n);break;case"minute":f=T0(t,!0),g=x3(n),m=be(n);break;case"second":f=T0(t,!1),g=x4(n),m=bt(n);break;case"millisecond":f=mb(t,!0),g=x8(n),m=bn(n)}(function(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})})(f,d,p,g,m,0,a),"year"===e&&o.length>1&&0===l&&o.unshift({value:o[0].value-f})}}for(var l=0;l<a.length;l++)o.push(a[l])}}(xq[u],o[o.length-1]||[],a),h!==(xq[u+1]?xX(xq[u+1]):null))){if(a.length){l=s,a.sort(function(e,t){return e.value-t.value});for(var d=[],p=0;p<a.length;++p){var f=a[p].value;(0===p||a[p-1].value!==f)&&(d.push(a[p]),f>=i[0]&&f<=i[1]&&s++)}var g=(i[1]-i[0])/t;if(s>1.5*g&&l>g/1.5||(o.push(d),s>g||e===xq[u]))break}a=[]}}for(var m=d0(dQ(o,function(e){return d0(e,function(e){return e.value>=i[0]&&e.value<=i[1]&&!e.notAdd})}),function(e){return e.length>0}),v=[],y=m.length-1,u=0;u<m.length;++u)for(var x=m[u],b=0;b<x.length;++b)v.push({value:x[b].value,level:y-u});v.sort(function(e,t){return e.value-t.value});for(var w=[],u=0;u<v.length;++u)(0===u||v[u].value!==v[u-1].value)&&w.push(v[u]);return w}(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]-=864e5,t[1]+=864e5),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]-864e5}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=TJ.length,a=Math.min(TK(TJ,this._approxInterval,0,o),o-1);this._interval=TJ[a][1],this._minLevelUnit=TJ[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return d9(e)?e:+my(e)},t.prototype.contain=function(e){return TH(this.parse(e),this._extent)},t.prototype.normalize=function(e){return TW(this.parse(e),this._extent)},t.prototype.scale=function(e){return T$(e,this._extent)},t.type="time",t}(TU),TJ=[["second",1e3],["minute",6e4],["hour",36e5],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",15768e6],["year",31536e6]];function T0(e,t){return(e/=t?6e4:1e3)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}Tz.registerClass(TQ);var T1=Tz.prototype,T2=TU.prototype,T5=Math.floor,T3=Math.ceil,T4=Math.pow,T8=Math.log,T6=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new TU,t._interval=0,t}return dM(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return dQ(T2.getTicks.call(this,e),function(e){var t=e.value,r=mh(T4(this.base,t));return r=t===n[0]&&this._fixMin?mh(r,mp(i[0])):r,{value:r=t===n[1]&&this._fixMax?mh(r,mp(i[1])):r}},this)},t.prototype.setExtent=function(e,t){var n=T8(this.base);e=T8(Math.max(0,e))/n,t=T8(Math.max(0,t))/n,T2.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e,t,n=this.base,i=T1.getExtent.call(this);i[0]=T4(n,i[0]),i[1]=T4(n,i[1]);var r=this._originalScale.getExtent();return this._fixMin&&(i[0]=(e=i[0],mh(e,mp(r[0])))),this._fixMax&&(i[1]=(t=i[1],mh(t,mp(r[1])))),i},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=T8(e[0])/T8(t),e[1]=T8(e[1])/T8(t),T1.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=Math.pow(10,mx(n));for(e/n*i<=.5&&(i*=10);!isNaN(i)&&1>Math.abs(i)&&Math.abs(i)>0;)i*=10;var r=[mh(T3(t[0]/i)*i),mh(T5(t[1]/i)*i)];this._interval=i,this._niceExtent=r}},t.prototype.calcNiceExtent=function(e){T2.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 TH(e=T8(e)/T8(this.base),this._extent)},t.prototype.normalize=function(e){return TW(e=T8(e)/T8(this.base),this._extent)},t.prototype.scale=function(e){return e=T$(e,this._extent),T4(this.base,e)},t.type="log",t}(Tz),T9=T6.prototype;T9.getMinorTicks=T2.getMinorTicks,T9.getLabel=T2.getLabel,Tz.registerClass(T6);var T7=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=this._modelMinRaw=t.get("min",!0);d4(r)?this._modelMinNum=Di(e,r({min:n[0],max:n[1]})):"dataMin"!==r&&(this._modelMinNum=Di(e,r));var o=this._modelMaxRaw=t.get("max",!0);if(d4(o)?this._modelMaxNum=Di(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=Di(e,o)),i)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=d3(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[g5(s[0],1),g5(s[1],1)]}},e.prototype.calculate=function(){var e,t,n=this._isOrdinal,i=this._dataMin,r=this._dataMax,o=this._axisDataLen,a=this._boundaryGapInner,s=n?null:r-i||Math.abs(i),l="dataMin"===this._modelMinRaw?i:this._modelMinNum,u="dataMax"===this._modelMaxRaw?r:this._modelMaxNum,c=null!=l,h=null!=u;null==l&&(l=n?o?0:NaN:i-a[0]*s),null==u&&(u=n?o?o-1:NaN:r+a[1]*s),null!=l&&isFinite(l)||(l=NaN),null!=u&&isFinite(u)||(u=NaN);var d=(e=l)!=e||(t=u)!=t||n&&!o;this._needCrossZero&&(l>0&&u>0&&!c&&(l=0),l<0&&u<0&&!h&&(u=0));var p=this._determinedMin,f=this._determinedMax;return null!=p&&(l=p,c=!0),null!=f&&(u=f,h=!0),{min:l,max:u,minFixed:c,maxFixed:h,isBlank:d}},e.prototype.modifyDataMinMax=function(e,t){this[Dt[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[De[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),De={min:"_determinedMin",max:"_determinedMax"},Dt={min:"_dataMin",max:"_dataMax"};function Dn(e,t,n){var i=e.rawExtentInfo;return i||(i=new T7(e,t,n),e.rawExtentInfo=i),i}function Di(e,t){return null==t?null:t!=t?NaN:e.parse(t)}function Dr(e,t){var n=e.type,i=Dn(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=(u=[],a.eachSeriesByType("bar",function(e){var t;(t=e).coordinateSystem&&"cartesian2d"===t.coordinateSystem.type&&u.push(e)}),u),l=!1;if(dK(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u,c,h,d=function(e,t,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=function(e,t,n){if(e&&t)return e[TY(t)]}(i,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;dK(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;dK(a,function(e){l=Math.max(e.offset+e.width,l)});var u=(s=Math.abs(s))+(l=Math.abs(l)),c=t-e,h=c/(1-(s+l)/o)-c;return t+=l/u*h,{min:e-=s/u*h,max:t}}(r,o,t,(c=function(e){var t={};dK(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}(s),h=[],dK(s,function(e){var t,n,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=c[r.dim+"_"+r.index],s=Math.abs(o[1]-o[0]),l=r.scale.getExtent(),u=Math.abs(l[1]-l[0]);i=a?s/u*a:s}else{var d=e.getData();i=Math.abs(o[1]-o[0])/d.count()}var p=mc(e.get("barWidth"),i),f=mc(e.get("barMaxWidth"),i),g=mc(e.get("barMinWidth")||((t=e).pipelineContext&&t.pipelineContext.large?.5:1),i),m=e.get("barGap"),v=e.get("barCategoryGap");h.push({bandWidth:i,barWidth:p,barMaxWidth:f,barMinWidth:g,barGap:m,barCategoryGap:v,axisKey:TY(r),stackId:(n=e).get("stack")||Tq+n.seriesIndex})}),TX(h)));r=d.min,o=d.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function Do(e,t){var n=Dr(e,t),i=n.extent,r=t.get("splitNumber");e instanceof T6&&(e.base=t.get("logBase"));var o=e.type,a=t.get("interval"),s="interval"===o||"time"===o;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:s?t.get("minInterval"):null,maxInterval:s?t.get("maxInterval"):null}),null!=a&&e.setInterval&&e.setInterval(a)}function Da(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(n,i){return e.scale.getFormattedLabel(n,i,t)}:d8(t)?function(n){var i=e.scale.getLabel(n);return t.replace("{value}",null!=i?i:"")}:d4(t)?function(i,r){return null!=n&&(r=i.value-n),t(Ds(e,i),r,null!=i.level?{level:i.level}:null)}:function(t){return e.scale.getLabel(t)}}function Ds(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function Dl(e){var t=e.get("interval");return null==t?"auto":t}function Du(e){return"category"===e.type&&0===Dl(e.getLabelModel())}function Dc(e,t){var n={};return dK(e.mapDimensionsAll(t),function(t){n[kd(e,t)]=!0}),d1(n)}var Dh=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 dQ(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),d0(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}(),Dd=["x","y"];function Dp(e){return"interval"===e.type||"time"===e.type}var Df=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Dd,t}return dM(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(Dp(e)&&Dp(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,h=r[1]-i[0]*u,d=this._transform=[l,0,0,u,c,h];this._invTransform=ft([],d)}}},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 fh(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 pP(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 pP(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 fh(i,r,o,a)},t}(Dh),Dg=mN();function Dm(e,t){var n,i,r,o,a=Dv(e,"labels"),s=Dl(t),l=Dy(a,s);return l||(d4(s)?r=Dw(e,s):(o="auto"===s?null!=(i=Dg(n=e).autoInterval)?i:Dg(n).autoInterval=n.calculateCategoryInterval():s,r=Db(e,o)),Dx(a,s,{labels:r,labelCategoryInterval:o}))}function Dv(e,t){return Dg(e)[t]||(Dg(e)[t]=[])}function Dy(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function Dx(e,t,n){return e.push({key:t,value:n}),n}function Db(e,t,n){var i=Da(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 h=Du(e),d=a.get("showMinLabel")||h,p=a.get("showMaxLabel")||h;d&&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 Dw(e,t,n){var i=e.scale,r=Da(e),o=[];return dK(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 DS=[0,1];function D_(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var DC=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 dM(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)]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(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 mf(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&&D_(n=n.slice(),i.count()),mu(e,DS,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&D_(n=n.slice(),i.count());var r=mu(e,n,DS,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=("category"===this.type?function(e,t){var n,i,r=Dv(e,"ticks"),o=Dl(t),a=Dy(r,o);if(a)return a;if((!t.get("show")||e.scale.isBlank())&&(n=[]),d4(o))n=Dw(e,o,!0);else if("auto"===o){var s=Dm(e,e.getLabelModel());i=s.labelCategoryInterval,n=dQ(s.labels,function(e){return e.tickValue})}else n=Db(e,i=o,!0);return Dx(r,o,{ticks:n,tickCategoryInterval:i})}(this,t):{ticks:dQ(this.scale.getTicks(),function(e){return e.value})}).ticks,i=dQ(n,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,o,a=t.length;if(e.onBand&&!n&&a){var s=e.getExtent();if(1===a)t[0].coord=s[0],r=t[1]={coord:s[1]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;dK(t,function(e){e.coord-=u/2}),o=1+e.scale.getExtent()[1]-t[a-1].tickValue,r={coord:t[a-1].coord+u*o},t.push(r)}var c=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],r.coord)&&(i?r.coord=s[1]:t.pop()),i&&h(r.coord,s[1])&&t.push({coord:s[1]})}function h(e,t){return e=mh(e),t=mh(t),c?e>t:e<t}}(this,i,t.get("alignWithLabel"),e.clamp),i},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),dQ(this.scale.getMinorTicks(e),function(e){return dQ(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){var e,t,n,i,r,o;return("category"===this.type?(e=this,t=e.getLabelModel(),n=Dm(e,t),!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n):(i=this,r=i.scale.getTicks(),o=Da(i),{labels:dQ(r,function(e,t){return{level:e.level,formattedLabel:o(e,t),rawLabel:i.scale.getLabel(e),tickValue:e.value}})})).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;return 0===n&&(n=1),Math.abs(Math.abs(e[1]-e[0]))/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t,n,i=(n=(t=e).getLabelModel(),{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),r=Da(e),o=(i.axisRotate-i.labelRotate)/180*Math.PI,a=e.scale,s=a.getExtent(),l=a.count();if(s[1]-s[0]<1)return 0;var u=1;l>40&&(u=Math.max(1,Math.floor(l/40)));for(var c=s[0],h=e.dataToCoord(c+1)-e.dataToCoord(c),d=Math.abs(h*Math.cos(o)),p=Math.abs(h*Math.sin(o)),f=0,g=0;c<=s[1];c+=u){var m=0,v=0,y=gJ(r({value:c}),i.font,"center","top");m=1.3*y.width,v=1.3*y.height,f=Math.max(f,m,7),g=Math.max(g,v,7)}var x=f/d,b=g/p;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=Dg(e.model),_=e.getExtent(),C=S.lastAutoInterval,M=S.lastTickCount;return null!=C&&null!=M&&1>=Math.abs(C-w)&&1>=Math.abs(M-l)&&C>w&&S.axisExtent0===_[0]&&S.axisExtent1===_[1]?w=C:(S.lastTickCount=l,S.lastAutoInterval=w,S.axisExtent0=_[0],S.axisExtent1=_[1]),w}(this)},e}());function DM(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(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[h[2]-p,h[3]+p]:[h[0]-p,h[1]+p];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[d[l]]:h[0],"x"===u?f[d[l]]:h[3]],o.rotation=Math.PI/2*+("x"!==u),o.labelDirection=o.tickDirection=o.nameDirection=({top:-1,bottom:1,left:-1,right:1})[s],o.labelOffset=a?f[d[s]]-f[d.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),pr(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 Dk(e){return"cartesian2d"===e.get("coordinateSystem")}function DT(e){var t={xAxisModel:null,yAxisModel:null};return dK(t,function(n,i){var r=i.replace(/Model$/,""),o=e.getReferringComponents(r,mZ).models[0];t[i]=o}),t}var DD=Math.log,DI=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Dd,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=d1(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;TV(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(Do(l,s),TV(l)&&(t=a))}r.length&&(t||Do((t=r.pop()).scale,t.model),dK(r,function(e){!function(e,t,n){var i=TU.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=Dr(e,t),u=l.extent,c=l.fixMin,h=l.fixMax;if("log"===e.type){var d=DD(e.base);u=[DD(u[0])/d,DD(u[1])/d]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var p=i.getExtent.call(e);c&&(u[0]=p[0]),h&&(u[1]=p[1]);var f=i.getInterval.call(e),g=u[0],m=u[1];if(c&&h)f=(m-g)/a;else if(c)for(m=u[0]+f*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)f=TZ(f),m=u[0]+f*a;else if(h)for(g=u[1]-f*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)f=TZ(f),g=u[1]-f*a;else{e.getTicks().length-1>a&&(f=TZ(f));var v=f*a;(g=mh((m=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,m=mh(v)):m>0&&u[1]<=0&&(m=0,g=-mh(v))}var y=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setExtent.call(e,g+f*y,m+f*x),i.setInterval.call(e,f),(y||x)&&i.setNiceExtent.call(e,g+f,m-f)}(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),i(n.x),i(n.y);var r={};dK(n.x,function(e){DP(n,"y",e,r)}),dK(n.y,function(e){DP(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=bf(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){dK(a,function(e){var t,n,i,r,a=e.isHorizontal(),s=a?[0,o.width]:[0,o.height],l=+!!e.inverse;e.setExtent(s[l],s[1-l]),t=e,n=a?o.x:o.y,r=(i=t.getExtent())[0]+i[1],t.toGlobalCoord="x"===t.dim?function(e){return e+n}:function(e){return r-e+n},t.toLocalCoord="x"===t.dim?function(e){return e-n}:function(e){return r-e+n}})}s(),r&&(dK(a,function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t,n,i,r=e.model,o=e.scale;if(!(!r.get(["axisLabel","show"])||o.isBlank())){var a=o.getExtent();n=o instanceof TG?o.count():(t=o.getTicks()).length;var s=e.getLabelModel(),l=Da(e),u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;c<n;c+=u){var h=l(t?t[c]:{value:a[0]+c},c),d=function(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 fh(e.x,e.y,o,a)}(s.getTextRect(h),s.get("rotate")||0);i?i.union(d):i=d}return i}}(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()),dK(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]}d7(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",mZ).models[0],o=e.yAxisModel||i&&i.getReferringComponents("yAxis",mZ).models[0],a=e.gridModel,s=this._coordsList;return i?0>dq(s,t=i.coordinateSystem)&&(t=null):r&&o?t=this.getCartesian(r.componentIndex,o.componentIndex):r?n=this.getAxis("x",r.componentIndex):o?n=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(t=this._coordsList[0]),{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){this._axesMap={},this._axesList=[];return}function l(t){return function(n,i){if(DA(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 DC(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new TG({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new TQ({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(Tz.getClass(t)||TU)}}(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,dK(a.x,function(t,n){dK(a.y,function(r,o){var a="x"+n+"y"+o,s=new Df(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){dK(Dc(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}dK(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(Dk(e)){var i=DT(e),r=i.xAxisModel,o=i.yAxisModel;if(DA(r,t)&&DA(o,t)){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 dK(this.getCartesians(),function(i){var r=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(r);0>dq(t,r)&&t.push(r),0>dq(n,o)&&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(Dk(e)){var t=DT(e),n=t.xAxisModel,i=t.yAxisModel,r=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}}),i},e.dimensions=Dd,e}();function DA(e,t){return e.getCoordSysModel()===t}function DP(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)DO(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&DO(o[u])&&!i[c(o[u])]){r=o[u];break}r&&(i[c(r)]=!0)}function c(e){return e.dim+"_"+e.index}}function DO(e){var t,n,i;return e&&"category"!==e.type&&"time"!==e.type&&(n=(t=e.scale.getExtent())[0],i=t[1],!(n>0&&i>0||n<0&&i<0))}var DR=Math.PI,DE=function(){function e(e,t){this.group=new mr,this.opt=t,this.axisModel=e,dU(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new mr({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!DL[e]},e.prototype.add=function(e){DL[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=mg(t-e);return mm(o)?(r=n>0?"top":"bottom",i="center"):mm(o-DR)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o<DR?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}(),DL={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&&(pP(s,s,a),pP(l,l,a));var c=dG({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new _s({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});_V(h.shape,h.style.lineWidth),h.anid="line",n.add(h);var d=t.get(["axisLine","symbol"]);if(null!=d){var p=t.get(["axisLine","symbolSize"]);d8(d)&&(d=[d,d]),(d8(p)||d9(p))&&(p=[p,p]);var f=CK(t.get(["axisLine","symbolOffset"])||0,p),g=p[0],m=p[1];dK([{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"!==d[i]&&null!=d[i]){var r=CY(d[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");if("auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick")),!(!a||r.scale.isBlank())){for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=Dz(r.getTicksCoords(),t.transform,l,dU(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;if(!(!pr(i.axisLabelShow,n.get(["axisLabel","show"]))||r.scale.isBlank())){var o=n.getModel("axisLabel"),a=o.get("margin"),s=r.getViewLabels(),l=(pr(i.labelRotate,o.get("rotate"))||0)*DR/180,u=DE.innerTextLayout(i.rotation,l,i.labelDirection),c=n.getCategories&&n.getCategories(!0),h=[],d=DE.isLabelSilent(n),p=n.get("triggerEvent");return dK(s,function(l,f){var g="ordinal"===r.scale.type?r.scale.getRawOrdinalNumber(l.tickValue):l.tickValue,m=l.formattedLabel,v=l.rawLabel,y=o;if(c&&c[g]){var x=c[g];d7(x)&&x.textStyle&&(y=new xB(x.textStyle,o,n.ecModel))}var b=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=r.dataToCoord(g),S=y.getShallow("align",!0)||u.textAlign,_=po(y.getShallow("alignMinLabel",!0),S),C=po(y.getShallow("alignMaxLabel",!0),S),M=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||u.textVerticalAlign,k=po(y.getShallow("verticalAlignMinLabel",!0),M),T=po(y.getShallow("verticalAlignMaxLabel",!0),M),D=new yS({x:w,y:i.labelOffset+i.labelDirection*a,rotation:u.rotation,silent:d,z2:10+(l.level||0),style:xy(y,{text:m,align:0===f?_:f===s.length-1?C:S,verticalAlign:0===f?k:f===s.length-1?T:M,fill:d4(b)?b("category"===r.type?v:"value"===r.type?g+"":g,f):b})});if(D.anid="label_"+g,p){var I=DE.makeAxisEventDataBase(n);I.targetType="axisLabel",I.value=v,I.tickIndex=f,"category"===r.type&&(I.dataIndex=g),y_(D).eventData=I}t.add(D),D.updateTransform(),h.push(D),e.add(D),D.decomposeTransform()}),h}}(n,i,t,e);(function(e,t,n){if(!Du(e.axis)){var i=e.get(["axisLabel","showMinLabel"]),r=e.get(["axisLabel","showMaxLabel"]);n=n||[];var o=(t=t||[])[0],a=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(DB(o),DB(u)):DN(o,a)&&(i?(DB(a),DB(c)):(DB(o),DB(u))),!1===r?(DB(s),DB(h)):DN(l,s)&&(r?(DB(l),DB(d)):(DB(s),DB(h)))}})(t,o,r),function(e,t,n,i){var r=n.axis,o=n.getModel("minorTick");if(!(!o.get("show")||r.scale.isBlank())){var a=r.getMinorTicksCoords();if(a.length)for(var s=o.getModel("lineStyle"),l=i*o.get("length"),u=dU(s.getLineStyle(),dU(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var h=Dz(a[c],t.transform,l,u,"minorticks_"+c),d=0;d<h.length;d++)e.add(h[d])}}(n,i,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])&&function(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new fh(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 h=o.obb,d=!1,p=0;p<t.length;p++){var f=t[p];if(n.intersect(f.rect)&&(a&&f.axisAligned||(f.obb||(f.obb=new _C(f.localRect,f.transform)),h||(h=new _C(s,l)),h.intersect(f.obb)))){d=!0;break}}d?(i(u),c&&i(c)):(u.attr("ignore",o.defaultAttr.ignore),c&&c.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}(function(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 _C(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}(dQ(o,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,i){var r,o,a=pr(e.axisName,t.get("name"));if(a){var s,l,u,c,h,d,p,f,g,m=t.get("nameLocation"),v=e.nameDirection,y=t.getModel("nameTextStyle"),x=t.get("nameGap")||0,b=t.axis.getExtent(),w=b[0]>b[1]?-1:1,S=["start"===m?b[0]-w*x:"end"===m?b[1]+w*x:(b[0]+b[1])/2,DF(m)?e.labelOffset+v*x:0],_=t.get("nameRotate");null!=_&&(_=_*DR/180),DF(m)?r=DE.innerTextLayout(e.rotation,null!=_?_:e.rotation,v):(s=e.rotation,l=m,u=_||0,c=b,p=mg(u-s),f=c[0]>c[1],g="start"===l&&!f||"start"!==l&&f,mm(p-DR/2)?(d=g?"bottom":"top",h="center"):mm(p-1.5*DR)?(d=g?"top":"bottom",h="center"):(d="middle",h=p<1.5*DR&&p>DR/2?g?"left":"right":g?"right":"left"),r={rotation:p,textAlign:h,textVerticalAlign:d},null!=(o=e.axisNameAvailableWidth)&&(isFinite(o=Math.abs(o/Math.sin(r.rotation)))||(o=null)));var C=y.getFont(),M=t.get("nameTruncate",!0)||{},k=M.ellipsis,T=pr(e.nameTruncateMaxWidth,M.maxWidth,o),D=new yS({x:S[0],y:S[1],rotation:r.rotation,silent:DE.isLabelSilent(t),style:xy(y,{text:a,font:C,overflow:"truncate",width:T,ellipsis:k,fill:y.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:y.get("align")||r.textAlign,verticalAlign:y.get("verticalAlign")||r.textVerticalAlign}),z2:1});if(_Q({el:D,componentModel:t,itemName:a}),D.__fullText=a,D.anid="name",t.get("triggerEvent")){var I=DE.makeAxisEventDataBase(t);I.targetType="axisName",I.name=a,y_(D).eventData=I}i.add(D),D.updateTransform(),n.add(D),D.decomposeTransform()}}};function DB(e){e&&(e.ignore=!0)}function DN(e,t){var n=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(n&&i){var r=p6([]);return fe(r,r,-e.rotation),n.applyTransform(p9([],r,e.getLocalTransform())),i.applyTransform(p9([],r,t.getLocalTransform())),n.intersect(i)}}function DF(e){return"middle"===e||"center"===e}function Dz(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&&(pP(a,a,t),pP(s,s,t));var c=new _s({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});_V(c.shape,c.style.lineWidth),c.anid=r+"_"+e[l].tickValue,o.push(c)}return o}function DV(e,t){return"all"===e||d3(e)&&dq(e,t)>=0||e===t}function DZ(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[DH(e)]}function Dj(e){return!!e.get(["handle","show"])}function DH(e){return e.type+"||"+e.id}var DW={},D$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.render=function(t,n,i,r){this.axisPointerClass&&function(e){var t=DZ(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=Dj(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,o=t.getAxisPointerClass(this.axisPointerClass);if(o){var a=(r=DZ(e))&&r.axisPointerModel;a?(this._axisPointer||(this._axisPointer=new o)).render(e,a,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){DW[e]=t},t.getAxisPointerClass=function(e){return e&&DW[e]},t.type="axis",t}(Sx),DG=mN(),DU=["axisLine","axisTickLabel","axisName"],Dq=["splitArea","splitLine","minorSplitLine"],DY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return dM(t,e),t.prototype.render=function(t,n,i,r){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new mr,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=DM(a,t),l=new DE(t,dG({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),i=0;i<n.length;i++)if(TV(n[i].getOtherAxis(t.axis).scale))return!0;return!1}},s));dK(DU,l.add,l),this._axisGroup.add(l.getGroup()),dK(Dq,function(e){t.get([e,"show"])&&DX[e](this,this._axisGroup,t,a)},this),r&&"changeAxisOrder"===r.type&&r.isInitSort||_G(o,this._axisGroup,t),e.prototype.render.call(this,t,n,i,r)}},t.prototype.remove=function(){DG(this).splitAreaColors=null},t.type="cartesianAxis",t}(D$),DX={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");s=d3(s)?s:[s];for(var l=i.coordinateSystem.getRect(),u=r.isHorizontal(),c=0,h=r.getTicksCoords({tickModel:o}),d=[],p=[],f=a.getLineStyle(),g=0;g<h.length;g++){var m=r.toGlobalCoord(h[g].coord);u?(d[0]=m,d[1]=l.y,p[0]=m,p[1]=l.y+l.height):(d[0]=l.x,d[1]=m,p[0]=l.x+l.width,p[1]=m);var v=c++%s.length,y=new _s({anid:null!=h[g].tickValue?"line_"+h[g].tickValue:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:dU({stroke:s[v]},f),silent:!0});_V(y.shape,f.lineWidth),t.add(y)}}},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=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var p=0;p<l[d].length;p++){var f=r.toGlobalCoord(l[d][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 _s({anid:"minor_line_"+l[d][p].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:h,silent:!0});_V(g.shape,h.lineWidth),t.add(g)}},splitArea:function(e,t,n,i){!function(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,h=DG(e).splitAreaColors,d=pg(),p=0;if(h)for(var f=0;f<u.length;f++){var g=h.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=d3(s)?s:[s];for(var f=1;f<u.length;f++){var y=r.toGlobalCoord(u[f].coord),x=void 0,b=void 0,w=void 0,S=void 0;r.isHorizontal()?(x=m,b=l.y,w=y-x,S=l.height,m=x+w):(x=l.x,b=m,w=l.width,S=y-b,m=b+S);var _=u[f-1].tickValue;null!=_&&d.set(_,p),t.add(new yl({anid:null!=_?"area_"+_:null,shape:{x:x,y:b,width:w,height:S},style:dU({fill:s[p]},v),autoBatch:!0,silent:!0})),p=(p+1)%c}DG(e).splitAreaColors=d}}}(e,t,n,i)}},DK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.type="xAxis",t}(DY),DQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=DK.type,t}return dM(t,e),t.type="yAxis",t}(DY),DJ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return dM(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new yl({shape:e.coordinateSystem.getRect(),style:dU({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Sx),D0={offset:0};function D1(e){e.registerComponentView(DJ),e.registerComponentModel(TC),e.registerCoordinateSystem("cartesian2d",DI),TN(e,"x",Tk,D0),TN(e,"y",Tk,D0),e.registerComponentView(DK),e.registerComponentView(DQ),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var D2={color:"fill",borderColor:"stroke"},D5={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},D3=mN(),D4=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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 kp(null,this)},t.prototype.getDataParams=function(t,n,i){var r=e.prototype.getDataParams.call(this,t,n);return i&&(r.info=D3(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}(Sh);function D8(e,t){return t=t||[0,0],dQ(["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 D6(e,t){return t=t||[0,0],dQ([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 D9(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 D7(e,t){return t=t||[0,0],dQ(["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)}function Ie(e,t){t&&(t.font=t.textFont||t.font,py(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),py(t,"textAlign")&&(e.align=t.textAlign),py(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),py(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),py(t,"textWidth")&&(e.width=t.textWidth),py(t,"textHeight")&&(e.height=t.textHeight),py(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),py(t,"textPadding")&&(e.padding=t.textPadding),py(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),py(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),py(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),py(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),py(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),py(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),py(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function It(e,t,n){e.textPosition=e.textPosition||n.position||"inside",null!=n.offset&&(e.textOffset=n.offset),null!=n.rotation&&(e.textRotation=n.rotation),null!=n.distance&&(e.textDistance=n.distance);var i=e.textPosition.indexOf("inside")>=0,r=e.fill||"#000";In(e,t);var o=null==e.textFill;return i?o&&(e.textFill=n.insideFill||"#fff",!e.textStroke&&n.insideStroke&&(e.textStroke=n.insideStroke),e.textStroke||(e.textStroke=r),null==e.textStrokeWidth&&(e.textStrokeWidth=2)):(o&&(e.textFill=e.fill||n.outsideFill||"#000"),!e.textStroke&&n.outsideStroke&&(e.textStroke=n.outsideStroke)),e.text=t.text,e.rich=t.rich,dK(t.rich,function(e){In(e,e)}),e}function In(e,t){t&&(py(t,"fill")&&(e.textFill=t.fill),py(t,"stroke")&&(e.textStroke=t.fill),py(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),py(t,"font")&&(e.font=t.font),py(t,"fontStyle")&&(e.fontStyle=t.fontStyle),py(t,"fontWeight")&&(e.fontWeight=t.fontWeight),py(t,"fontSize")&&(e.fontSize=t.fontSize),py(t,"fontFamily")&&(e.fontFamily=t.fontFamily),py(t,"align")&&(e.textAlign=t.align),py(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),py(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),py(t,"width")&&(e.textWidth=t.width),py(t,"height")&&(e.textHeight=t.height),py(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),py(t,"padding")&&(e.textPadding=t.padding),py(t,"borderColor")&&(e.textBorderColor=t.borderColor),py(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),py(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),py(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),py(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),py(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),py(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),py(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),py(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),py(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),py(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var Ii={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Ir=d1(Ii);dJ(gY,function(e,t){return e[t]=1,e},{}),gY.join(", ");var Io=["","style","shape","extra"],Ia=mN();function Is(e,t,n,i,r){var o=e+"Animation",a=xr(e,i,r)||{},s=Ia(t).userDuring;return a.duration>0&&(a.during=s?d2(Id,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),dG(a,n[o]),a}function Il(e,t,n,i){if(e){var r=e.parent,o=Ia(e).leaveToProps;if(o){var a=Is("update",e,t,n,0);a.done=function(){r.remove(e),i&&i()},e.animateTo(o,a)}else r.remove(e),i&&i()}}function Iu(e){return"all"===e}var Ic={},Ih={setTransform:function(e,t){return Ic.el[e]=t,this},getTransform:function(e){return Ic.el[e]},setShape:function(e,t){var n=Ic.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=Ic.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=Ic.el,i=n.style;return i&&(i[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=Ic.el.style;if(t)return t[e]},setExtra:function(e,t){return(Ic.el.extra||(Ic.el.extra={}))[e]=t,this},getExtra:function(e){var t=Ic.el.extra;if(t)return t[e]}};function Id(){var e=this.el;if(e){var t=Ia(e).userDuring,n=this.userDuring;if(t!==n){this.el=this.userDuring=null;return}Ic.el=e,n(Ih)}}function Ip(e,t,n,i){var r,o=n[e];if(o){var a=t[e];if(a){var s=n.transition,l=o.transition;if(l){if(r||(r=i[e]={}),Iu(l))dG(r,a);else for(var u=mT(l),c=0;c<u.length;c++){var h=u[c],d=a[h];r[h]=d}}else if(Iu(s)||dq(s,e)>=0){r||(r=i[e]={});for(var p=d1(a),c=0;c<p.length;c++){var f,g,h=p[c],d=a[h];f=o[h],g=d,(dX(f)?f!==g:null!=f&&isFinite(f))&&(r[h]=d)}}}}}function If(e,t,n){var i=t[e];if(i)for(var r=n[e]={},o=d1(i),a=0;a<o.length;a++){var s=o[a];r[s]=gm(i[s])}}var Ig=mN(),Im=["percent","easing","shape","style","extra"],Iv="emphasis",Iy="normal",Ix="blur",Ib="select",Iw=[Iy,Iv,Ix,Ib],IS={normal:["itemStyle"],emphasis:[Iv,"itemStyle"],blur:[Ix,"itemStyle"],select:[Ib,"itemStyle"]},I_={normal:["label"],emphasis:[Iv,"label"],blur:[Ix,"label"],select:[Ib,"label"]},IC=["x","y"],IM={normal:{},emphasis:{},blur:{},select:{}},Ik={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:d2(D8,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:d2(D6,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:d2(D9,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:d2(D7,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 IT(e){return e instanceof v3}function ID(e){return e instanceof vd}var II=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.render=function(e,t,n,i){this._progressiveEls=null;var r=this._data,o=e.getData(),a=this.group,s=IR(e,o,t,n);r||a.removeAll(),o.diff(r).add(function(t){IE(n,null,t,s(t,i),e,a,o)}).remove(function(t){var n=r.getItemGraphicEl(t);n&&Il(n,D3(n).option,e)}).update(function(t,l){IE(n,r.getItemGraphicEl(l),t,s(t,i),e,a,o)}).execute();var l=e.get("clip",!0)?function(e,t,n,i,r){if(e){if("polar"===e.type)return kB(e,t,n);if("cartesian2d"===e.type)return kL(e,t,n,void 0,void 0)}return null}(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=IR(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=IE(null,null,u,a(u,r),t,this.group,o);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){_0(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}(_5);function IA(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=IH(i);D3(t=_L(o,null,r,i.layout||"center")).customPathData=o}else if("image"===n)D3(t=new ye({})).customImagePath=e.style.image;else if("text"===n)t=new yS({});else if("group"===n)t=new mr;else if("compoundPath"===n)throw Error('"compoundPath" is not supported yet.');else{var a=_E(n);a||wL(""),t=new a}return D3(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function IP(e,t,n,i,r,o,a){t.stopAnimation("keyframe"),t.attr(Ig(t));var s=r&&r.normal.cfg;s&&t.setTextConfig(s),i&&null==i.transition&&(i.transition=IC);var l=i&&i.style;if(l){"text"===t.type&&(py(l,"textFill")&&(l.fill=l.textFill),py(l,"textStroke")&&(l.stroke=l.textStroke));var u=void 0,c=IT(t)?l.decal:null;e&&c&&(c.dirty=!0,u=Md(c,e)),l.__decalPattern=u}if(ID(t)&&l){var u=l.__decalPattern;u&&(l.decal=u)}!function(e,t,n,i){var r,o,a=(i=i||{}).dataIndex,s=i.isInit,l=i.clearStyle,u=n.isAnimationEnabled(),c=Ia(e),h=t.style;c.userDuring=t.during;var d={},p={};if(function(e,t,n){for(var i=0;i<Ir.length;i++){var r=Ir[i],o=Ii[r],a=t[r];a&&(n[o[0]]=a[0],n[o[1]]=a[1])}for(var i=0;i<gY.length;i++){var s=gY[i];null!=t[s]&&(n[s]=t[s])}}(0,t,p),If("shape",t,p),If("extra",t,p),!s&&u&&(function(e,t,n){for(var i=t.transition,r=Iu(i)?gY:mT(i||[]),o=0;o<r.length;o++){var a=r[o];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];n[a]=s}}}(e,t,d),Ip("shape",e,t,d),Ip("extra",e,t,d),function(e,t,n,i){if(n){var r,o=e.style;if(o){var a=n.transition,s=t.transition;if(a&&!Iu(a)){var l=mT(a);r||(r=i.style={});for(var u=0;u<l.length;u++){var c=l[u],h=o[c];r[c]=h}}else if(e.getAnimationStyleProps&&(Iu(s)||Iu(a)||dq(s,"style")>=0)){var d=e.getAnimationStyleProps(),p=d?d.style:null;if(p){r||(r=i.style={});for(var f=d1(n),u=0;u<f.length;u++){var c=f[u];if(p[c]){var h=o[c];r[c]=h}}}}}}}(e,t,h,d)),p.style=h,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,p,l),r=e,py(o=t,"silent")&&(r.silent=o.silent),py(o,"ignore")&&(r.ignore=o.ignore),r instanceof vd&&py(o,"invisible")&&(r.invisible=o.invisible),r instanceof v3&&py(o,"autoBatch")&&(r.autoBatch=o.autoBatch),u){if(s){var f={};dK(Io,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(f[e]=f[e]||{}),dG(e?f[e]:f,n.enterFrom))});var g=Is("enter",e,t,n,a);g.duration>0&&e.animateFrom(f,g)}else(function(e,t,n,i,r){if(r){var o=Is("update",e,t,i,n);o.duration>0&&e.animateFrom(r,o)}})(e,t,a||0,n,d)}(function(e,t){for(var n=Ia(e).leaveToProps,i=0;i<Io.length;i++){var r=Io[i],o=r?t[r]:t;o&&o.leaveTo&&(n||(n=Ia(e).leaveToProps={}),r&&(n[r]=n[r]||{}),dG(r?n[r]:n,o.leaveTo))}})(e,t),h?e.dirty():e.markRedraw()}(t,i,o,{dataIndex:n,isInit:a,clearStyle:!0}),function e(t,n,i){if(i.isAnimationEnabled()&&n){if(d3(n)){dK(n,function(n){e(t,n,i)});return}var r=n.keyframes,o=n.duration;if(i&&null==o){var a=xr("enter",i,0);o=a&&a.duration}if(r&&o){var s=Ig(t);dK(Io,function(e){var i;if(!e||t[e])r.sort(function(e,t){return e.percent-t.percent}),dK(r,function(r){var a=t.animators,l=e?r[e]:r;if(l){var u=d1(l);if(e||(u=d0(u,function(e){return 0>dq(Im,e)})),u.length){i||((i=t.animate(e,n.loop,!0)).scope="keyframe");for(var c=0;c<a.length;c++)a[c]!==i&&a[c].targetName===i.targetName&&a[c].stopTracks(u);e&&(s[e]=s[e]||{});var h=e?s[e]:s;dK(u,function(n){h[n]=((e?t[e]:t)||{})[n]}),i.whenWithKeys(o*r.percent,l,u,r.easing)}}}),i&&i.delay(n.delay||0).duration(o).start(n.easing)})}}}(t,i.keyframeAnimation,o)}function IO(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),yU(o)}}function IR(e,t,n,i){var r,o,a,s,l=e.get("renderItem"),u=e.coordinateSystem,c={};u&&(c=u.prepareCustoms?u.prepareCustoms(u):Ik[u.type](u));for(var h=dU({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(e,n){return null==n&&(n=a),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,i){null==i&&(i=a);var r=t.getItemVisual(i,"style"),o=r&&r.fill,s=r&&r.opacity,l=b(i,Iy).getItemStyle();null!=o&&(l.fill=o),null!=s&&(l.opacity=s);var u={inheritColor:d8(o)?o:"#000"},c=w(i,Iy),h=xy(c,null,u,!1,!0);h.text=c.getShallow("show")?po(e.getFormattedLabel(i,Iy),kg(t,i)):null;var d=xx(c,u,!1);return _(n,l),l=It(l,h,d),n&&S(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=a),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),s=i&&i.ordinalMeta;return s?s.categories[o]:o},styleEmphasis:function(n,i){null==i&&(i=a);var r=b(i,Iv).getItemStyle(),o=w(i,Iv),s=xy(o,null,null,!0,!0);s.text=o.getShallow("show")?pa(e.getFormattedLabel(i,Iv),e.getFormattedLabel(i,Iy),kg(t,i)):null;var l=xx(o,null,!0);return _(n,r),r=It(r,s,l),n&&S(r,n),r.legacy=!0,r},visual:function(e,n){if(null==n&&(n=a),py(D2,e)){var i=t.getItemVisual(n,"style");return i?i[D2[e]]:null}if(py(D5,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===u.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(dU({bandWidth:r,axisKey:i,stackId:Tq+o},e));for(var a=TX(t),s=[],o=0;o<e.count;o++){var l=a[i][Tq+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(dU({axis:u.getBaseAxis()},e))},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return xC(e,n)}},c.api||{}),d={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:c.coordSys,dataInsideLength:t.count(),encode:(r=e.getData(),o={},dK(r.dimensions,function(e){var t=r.getDimensionInfo(e);if(!t.isExtraCoord){var n=t.coordDim;(o[n]=o[n]||[])[t.coordDimIndex]=r.getDimensionIndex(e)}}),o)},p={},f={},g={},m={},v=0;v<Iw.length;v++){var y=Iw[v];g[y]=e.getModel(IS[y]),m[y]=e.getModel(I_[y])}function x(e){return e===a?s||(s=t.getItemModel(e)):t.getItemModel(e)}function b(e,n){return t.hasItemOption?e===a?p[n]||(p[n]=x(e).getModel(IS[n])):x(e).getModel(IS[n]):g[n]}function w(e,n){return t.hasItemOption?e===a?f[n]||(f[n]=x(e).getModel(I_[n])):x(e).getModel(I_[n]):m[n]}return function(e,n){return a=e,s=null,p={},f={},l&&l(dU({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},d),h)};function S(e,t){for(var n in t)py(t,n)&&(e[n]=t[n])}function _(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function IE(e,t,n,i,r,o,a){if(!i){o.remove(t);return}var s=IL(e,t,n,i,r,o);return s&&a.setItemGraphicEl(n,s),s&&y4(s,i.focus,i.blurScope,i.emphasisDisabled),s}function IL(e,t,n,i,r,o){var a,s=-1,l=t;t&&IB(t,i,r)&&(s=dq(o.childrenRef(),t),t=null);var u=!t,c=t;c?c.clearStates():(c=IA(i),l&&((a=c).copyTransform(l),ID(a)&&ID(l)&&(a.setStyle(l.style),a.z=l.z,a.z2=l.z2,a.zlevel=l.zlevel,a.invisible=l.invisible,a.ignore=l.ignore,IT(a)&&IT(l)&&a.setShape(l.shape)))),!1===i.morph?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),IM.normal.cfg=IM.normal.conOpt=IM.emphasis.cfg=IM.emphasis.conOpt=IM.blur.cfg=IM.blur.conOpt=IM.select.cfg=IM.select.conOpt=null,IM.isLegacy=!1,function(e,t,n,i,r,o){if(!e.isGroup){IN(n,null,o),IN(n,Iv,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=IA(a),e.setTextContent(c)),IP(null,c,t,a,null,i,r);for(var h=a&&a.style,d=0;d<Iw.length;d++){var p=Iw[d];if(p!==Iy){var f=o[p].conOpt;IO(p,c,f,Iz(a,f,p),null)}}h?c.dirty():c.markRedraw()}}}}(c,n,i,r,u,IM),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&&IB(a,o,i)&&(a=null),!a&&(a=IA(o),e.setClipPath(a)),IP(null,a,t,o,null,i,r)}}(c,n,i,r,u),IP(e,c,n,i,IM,r,u),py(i,"info")&&(D3(c).info=i.info);for(var h=0;h<Iw.length;h++){var d=Iw[h];if(d!==Iy){var p=IF(i,d),f=Iz(i,p,d);IO(d,c,p,f,IM)}}return!function(e,t,n){if(!e.isGroup){var i=n.currentZ,r=n.currentZLevel;e.z=i,e.zlevel=r;var o=t.z2;null!=o&&(e.z2=o||0);for(var a=0;a<Iw.length;a++)(function(e,t,n){var i=n===Iy,r=i?t:IF(t,n),o=r?r.z2:null;null!=o&&((i?e:e.ensureState(n)).z2=o||0)})(e,t,Iw[a])}}(c,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){if(l){(function(e){new M2(e.oldChildren,e.newChildren,IV,IV,e).add(IZ).update(IZ).remove(Ij).execute()})({api:e,oldChildren:t.children()||[],newChildren:o||[],dataIndex:n,seriesModel:r,group:t});return}u&&t.removeAll();for(var c=0;c<a;c++){var h=o[c],d=t.childAt(c);h?(null==h.ignore&&(h.ignore=!1),IL(e,d,n,h,r,t)):d.ignore=!0}for(var p=t.childCount()-1;p>=c;p--){var f,g,m,v=t.childAt(p);f=t,g=v,m=r,g&&Il(g,D3(f).option,m)}}}(e,c,n,i,r),s>=0?o.replaceAt(c,s):o.add(c),c}function IB(e,t,n){var i,r=D3(e),o=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&(i=a)&&(py(i,"pathData")||py(i,"d"))&&IH(a)!==r.customPathData||"image"===o&&py(s,"image")&&s.image!==r.customImagePath}function IN(e,t,n){var i,r,o=t?IF(e,t):e,a=t?Iz(e,o,Iv):e.style,s=e.type,l=o?o.textConfig:null,u=e.textContent,c=u?t?IF(u,t):u:null;if(a&&(n.isLegacy||(i=!!l,r=!!c,a&&(a.legacy||!1!==a.legacy&&!i&&!r&&"tspan"!==s&&("text"===s||py(a,"text")))))){n.isLegacy=!0;var h=function(e,t,n){var i,r,o;if("text"===t)o=e;else{o={},py(e,"text")&&(o.text=e.text),py(e,"rich")&&(o.rich=e.rich),py(e,"textFill")&&(o.fill=e.textFill),py(e,"textStroke")&&(o.stroke=e.textStroke),py(e,"fontFamily")&&(o.fontFamily=e.fontFamily),py(e,"fontSize")&&(o.fontSize=e.fontSize),py(e,"fontStyle")&&(o.fontStyle=e.fontStyle),py(e,"fontWeight")&&(o.fontWeight=e.fontWeight),r={type:"text",style:o,silent:!0},i={};var a=py(e,"textPosition");n?i.position=a?e.textPosition:"inside":a&&(i.position=e.textPosition),py(e,"textPosition")&&(i.position=e.textPosition),py(e,"textOffset")&&(i.offset=e.textOffset),py(e,"textRotation")&&(i.rotation=e.textRotation),py(e,"textDistance")&&(i.distance=e.textDistance)}return Ie(o,e),dK(o.rich,function(e){Ie(e,e)}),{textConfig:i,textContent:r}}(a,s,!t);!l&&h.textConfig&&(l=h.textConfig),!c&&h.textContent&&(c=h.textContent)}if(!t&&c){var d=c;d.type||(d.type="text")}var p=t?n[t]:n.normal;p.cfg=l,p.conOpt=c}function IF(e,t){return t?e?e[t]:null:e}function Iz(e,t,n){var i=t&&t.style;return null==i&&n===Iv&&e&&(i=e.styleEmphasis),i}function IV(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function IZ(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null,r=null!=t?n.oldChildren[t]:null;IL(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function Ij(e){var t=this.context,n=t.oldChildren[e];n&&Il(n,D3(n).option,t.seriesModel)}function IH(e){return e&&(e.pathData||e.d)}var IW=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=dA.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,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var p=0;p<d;++p){var f=e[p],g=f[0],m=f[1],v=i(f[2]);h.globalAlpha=v,h.drawImage(a,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=h.getImageData(0,0,c.width,c.height),x=y.data,b=0,w=x.length,S=this.minOpacity,_=this.maxOpacity-S;b<w;){var v=x[b+3]/256,C=4*Math.floor(255*v);if(v>0){var M=o(v)?s:l;v>0&&(v=v*_+S),x[b++]=M[C],x[b++]=M[C+1],x[b++]=M[C+2],x[b++]=M[C+3]*v*256}else b+=4}return h.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=dA.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 I$(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var IG=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.render=function(e,t,n){t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(i=t)})}),this._progressiveEls=null,this.group.removeAll();var i,r=e.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):I$(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&&(I$(r)?this.render(t,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){_0(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,i,r){var o,a,s,l,u=e.coordinateSystem,c=kN(u,"cartesian2d");if(c){var h=u.getAxis("x"),d=u.getAxis("y");o=h.getBandWidth()+.5,a=d.getBandWidth()+.5,s=h.scale.getExtent(),l=d.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=xv(e),b=e.getModel("emphasis"),w=b.get("focus"),S=b.get("blurScope"),_=b.get("disabled"),C=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],M=n;M<i;M++){var k=void 0,T=f.getItemVisual(M,"style");if(c){var D=f.get(C[0],M),I=f.get(C[1],M);if(isNaN(f.get(C[2],M))||isNaN(D)||isNaN(I)||D<s[0]||D>s[1]||I<l[0]||I>l[1])continue;var A=u.dataToPoint([D,I]);k=new yl({shape:{x:A[0]-o/2,y:A[1]-a/2,width:o,height:a},style:T})}else{if(isNaN(f.get(C[1],M)))continue;k=new yl({z2:1,shape:u.dataToRect([f.get(C[0],M)]).contentShape,style:T})}if(f.hasItemOption){var P=f.getItemModel(M),O=P.getModel("emphasis");g=O.getModel("itemStyle").getItemStyle(),m=P.getModel(["blur","itemStyle"]).getItemStyle(),v=P.getModel(["select","itemStyle"]).getItemStyle(),y=P.get(["itemStyle","borderRadius"]),w=O.get("focus"),S=O.get("blurScope"),_=O.get("disabled"),x=xv(P)}k.shape.r=y;var R=e.getRawValue(M),E="-";R&&null!=R[2]&&(E=R[2]+""),xm(k,x,{labelFetcher:e,labelDataIndex:M,defaultOpacity:T.opacity,defaultText:E}),k.ensureState("emphasis").style=g,k.ensureState("blur").style=m,k.ensureState("select").style=v,y4(k,w,S,_),k.incremental=r,r&&(k.states.emphasis.hoverLayer=!0),p.add(k),f.setItemGraphicEl(M,k),this._progressiveEls&&this._progressiveEls.push(k)}},t.prototype._renderOnGeo=function(e,t,n,i){var r,o,a,s,l,u,c,h=n.targetVisuals.inRange,d=n.targetVisuals.outOfRange,p=t.getData(),f=this._hmLayer||this._hmLayer||new IW;f.blurSize=t.get("blurSize"),f.pointSize=t.get("pointSize"),f.minOpacity=t.get("minOpacity"),f.maxOpacity=t.get("maxOpacity");var g=e.getViewRect().clone(),m=e.getRoamTransform();g.applyTransform(m);var v=Math.max(g.x,0),y=Math.max(g.y,0),x=Math.min(g.width+g.x,i.getWidth()),b=Math.min(g.height+g.y,i.getHeight()),w=x-v,S=b-y,_=[p.mapDimension("lng"),p.mapDimension("lat"),p.mapDimension("value")],C=p.mapArray(_,function(t,n,i){var r=e.dataToPoint([t,n]);return r[0]-=v,r[1]-=y,r.push(i),r}),M=n.getExtent(),k="visualMap.continuous"===n.type?(r=n.option.range,o=M[1]-M[0],r=[(r[0]-M[0])/o,(r[1]-M[0])/o],function(e){return e>=r[0]&&e<=r[1]}):(a=n.getPieceList(),s=n.option.selected,l=M[1]-M[0],u=(a=dQ(a,function(e){return{interval:[(e.interval[0]-M[0])/l,(e.interval[1]-M[0])/l]}})).length,c=0,function(e){var t;for(t=c;t<u;t++){var n=a[t].interval;if(n[0]<=e&&e<=n[1]){c=t;break}}if(t===u)for(t=c-1;t>=0;t--){var n=a[t].interval;if(n[0]<=e&&e<=n[1]){c=t;break}}return t>=0&&t<u&&s[t]});f.update(C,w,S,h.color.getNormalizer(),{inRange:h.color.getColorMapper(),outOfRange:d.color.getColorMapper()},k);var T=new ye({style:{width:w,height:S,x:v,y:y,image:f.canvas},silent:!0});this.group.add(T)},t.type="heatmap",t}(_5),IU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.getInitialData=function(e,t){return kp(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=bX.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}(Sh),Iq=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return dM(t,e),t.prototype.init=function(t,n,i){e.prototype.init.call(this,t,n,i),this._sourceManager=new w2(this),w5(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),w5(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:bP},t}(bb),IY=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return dM(t,e),t.type="dataset",t}(Sx),IX=["x","y","radius","angle","single"],IK=["cartesian2d","polar","singleAxis"];function IQ(e){return e+"Axis"}function IJ(e){var t=e.ecModel,n={infoList:[],infoMap:pg()};return e.eachTargetAxis(function(e,i){var r=t.getComponent(IQ(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 I0=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}(),I1=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 dM(t,e),t.prototype.init=function(e,t,n){var i=I2(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var t=I2(e);d$(this.option,e,!0),d$(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;dK([["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=pg();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 dK(IX,function(n){var i=this.getReferringComponents(IQ(n),mj);if(i.specified){t=!0;var r=new I0;dK(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,r="vertical"===t?"y":"x",o=n.findComponents({mainType:r+"Axis"});if(a(o,r),i){var o=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(o,"single")}function a(t,n){var r=t[0];if(r){var o=new I0;if(o.add(r.componentIndex),e.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",mZ).models[0];a&&dK(t,function(e){r.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",mZ).models[0]&&o.add(e.componentIndex)})}}}i&&dK(IX,function(t){if(i){var r=n.findComponents({mainType:IQ(t),filter:function(e){return"category"===e.get("type",!0)}});if(r[0]){var o=new I0;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");dK([["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(IQ(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,i){dK(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){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(IQ(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;dK([["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;dK(["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();if(n)return n.getDataValueWindow()},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 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}(bb);function I2(e){var t={};return dK(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var I5=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.type="dataZoom.inside",t.defaultOption=xz(I1.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(I1),I3=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.render=function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(Sx);function I4(e,t,n,i,r,o){e=e||0;var a,s=n[1]-n[0];if(null!=r&&(r=I6(r,[0,s])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var l=Math.abs(t[1]-t[0]);l=I6(l,[0,s]),r=o=I6(l,[r,o]),i=0}t[0]=I6(t[0],n),t[1]=I6(t[1],n);var u=I8(t,i);t[i]+=e;var c=r||0,h=n.slice();return u.sign<0?h[0]+=c:h[1]-=c,t[i]=I6(t[i],h),a=I8(t,i),null!=r&&(a.sign!==u.sign||a.span<r)&&(t[1-i]=t[i]+u.sign*r),a=I8(t,i),null!=o&&a.span>o&&(t[1-i]=t[i]+a.sign*o),t}function I8(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 I6(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var I9="\0_ec_interaction_mutex";function I7(e){return e[I9]||(e[I9]={})}M$({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},px);var Ae=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var i=d2(n._mousedownHandler,n),r=d2(n._mousemoveHandler,n),o=d2(n._mouseupHandler,n),a=d2(n._mousewheelHandler,n),s=d2(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=dU(dW(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 dM(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(!p2(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&&Ai("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!I7(this._zr).globalPan){var t=e.offsetX,n=e.offsetY,i=this._x,r=this._y;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&p1(e.event),An(this,"pan","moveOnMouseMove",e,{dx:t-i,dy:n-r,oldX:i,oldY:r,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){p2(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=Ai("zoomOnMouseWheel",e,this._opt),n=Ai("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;At(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);At(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){if(!I7(this._zr).globalPan){var t=e.pinchScale>1?1.1:1/1.1;At(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(pB);function At(e,t,n,i,r){e.pointerChecker&&e.pointerChecker(i,r.originX,r.originY)&&(p1(i.event),An(e,t,n,i,r))}function An(e,t,n,i,r){r.isAvailableBehavior=d2(Ai,null,n,i),e.trigger(t,r)}function Ai(e,t,n){var i=n[e];return!e||i&&(!d8(i)||t.event[i+"Key"])}var Ar=mN();function Ao(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function Aa(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function As(e,t,n,i){return e.coordinateSystem.containPoint([n,i])}var Al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return dM(t,e),t.prototype.render=function(t,n,i){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),function(e,t,n){Ar(e).coordSysRecordMap.each(function(e){var i=e.dataZoomInfoMap.get(t.uid);i&&(i.getRange=n)})}(i,t,{pan:d2(Au.pan,this),zoom:d2(Au.zoom,this),scrollMove:d2(Au.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){(function(e,t){for(var n=Ar(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||Ao(n,a))}}})(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(I3),Au={zoom:function(e,t,n,i){var r=this.range,o=r.slice(),a=e.axisModels[0];if(a){var s=Ah[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();if(I4(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1])return o}},pan:Ac(function(e,t,n,i,r,o){var a=Ah[i]([o.oldX,o.oldY],[o.newX,o.newY],t,r,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:Ac(function(e,t,n,i,r,o){return Ah[i]([0,0],[o.scrollDelta,o.scrollDelta],t,r,n).signal*(e[1]-e[0])*o.scrollDelta})};function Ac(e){return function(t,n,i,r){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s&&(I4(e(a,s,t,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]))return a}}var Ah={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}},Ad=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(dq(IK,t.get("coordinateSystem"))>=0){var n=IQ(this._dimName),i=t.getReferringComponents(n,mZ).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 dW(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=[];dK(["start","end"],function(l,u){var c=e[l],h=e[l+"Value"];"percent"===r[u]?(null==c&&(c=o[u]),h=i.parse(mu(c,o,n))):(t=!0,c=mu(h=null==h?n[u]:i.parse(h),n,o)),s[u]=null==h||isNaN(h)?n[u]:h,a[u]=null==c||isNaN(c)?o[u]:c}),md(s),md(a);var l=this._minMaxSpan;function u(e,t,n,r,o){var a=o?"Span":"ValueSpan";I4(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=mu(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,n,i,r,o,a=this.getTargetSeriesModels();this._dataExtent=(t=this,n=this._dimName,i=[1/0,-1/0],dK(a,function(e){var t;(t=e.getData())&&dK(Dc(t,n),function(e){var n=t.getApproximateExtent(e);n[0]<i[0]&&(i[0]=n[0]),n[1]>i[1]&&(i[1]=n[1])})}),[(o=Dn((r=t.getAxisModel()).axis.scale,r,i).calculate()).min,o.max]),this._updateMinMaxSpan();var s=this.calculateDataWindow(e.settledOption);this._valueWindow=s.valueWindow,this._percentWindow=s.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&&dK(i,function(e){var t=e.getData(),i=t.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=t.getStore(),s=dQ(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),h=u<o[0],d=u>o[1];if(c&&!h&&!d)return!0;c&&(r=!0),h&&(t=!0),d&&(n=!0)}return r&&t&&n})}else dK(i,function(n){if("empty"===r)e.setData(t=t.map(n,function(e){var t;return(t=e)>=o[0]&&t<=o[1]?e:NaN}));else{var i={};i[n]=o,t.selectRange(i)}});dK(i,function(e){t.setApproximateExtent(o,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;dK(["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=mu(n[0]+o,n,[0,100],!0):null!=r&&(o=mu(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=mf(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}();let Ap={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(i,r){var o=e.getComponent(IQ(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 Ad(t,i,o,e),n.push(r.__dzAxisProxy))});var i=pg();return dK(n,function(e){dK(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 Af=!1;function Ag(e){!Af&&(Af=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,Ap),function(e){e.registerAction("dataZoom",function(e,t){dK(function(e,t){var n,i=pg(),r=[],o=pg();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){var t;!o.get(e.uid)&&(t=!1,e.eachTargetAxis(function(e,n){var r=i.get(e);r&&r[n]&&(t=!0)}),t)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),r.push(e),function(e){e.eachTargetAxis(function(e,t){(i.get(e)||i.set(e,[]))[t]=!0})}(e)}return r}(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 Am(e){Ag(e),e.registerComponentModel(I5),e.registerComponentView(Al),function(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Ar(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=pg());i.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){dK(IJ(e).infoList,function(n){var r,o,a,s=n.model.uid,l=i.get(s)||i.set(s,(a=(o={model:r=n.model,containsPoint:d5(As,r),dispatchAction:d5(Aa,t),dataZoomInfoMap:null,controller:null}).controller=new Ae(t.getZr()),dK(["pan","zoom","scrollMove"],function(e){a.on(e,function(t){var n=[];o.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var r=(i.getRange||{})[e],a=r&&r(i.dzReferCoordSysInfo,o.model.mainType,o.controller,t);!i.model.get("disabled",!0)&&a&&n.push({dataZoomId:i.model.id,start:a[0],end:a[1]})}}),n.length&&o.dispatchAction(n)})}),o));(l.dataZoomInfoMap||(l.dataZoomInfoMap=pg())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),i.each(function(e){var t,n,r,o,a,s=e.controller,l=e.dataZoomInfoMap;if(l){var u=l.keys()[0];null!=u&&(a=l.get(u))}if(!a){Ao(i,e);return}var c=(n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,l.each(function(e){var i=e.model,a=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),o=o&&i.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}});s.enable(c.controlType,c.opt),s.setPointerChecker(e.containsPoint),Ci(e,"dispatchAction",a.model.get("throttle",!0),"fixRate")})})}(e)}var Av=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=xz(I1.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:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),t}(I1),Ay="horizontal",Ax="vertical",Ab=["line","bar","candlestick","scatter"],Aw={easing:"cubicOut",duration:100,delay:0},AS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return dM(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=d2(this._onBrush,this),this._onBrushEnd=d2(this._onBrushEnd,this)},t.prototype.render=function(t,n,i,r){if(e.prototype.render.apply(this,arguments),Ci(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show")){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Cr(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 mr;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"),i=this._findCoordRect(),r={width:t.getWidth(),height:t.getHeight()},o=this._orient===Ay?{right:r.width-i.x-i.width,top:r.height-30-7-7*!!n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=by(e.option);dK(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=o[e])});var s=bf(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===Ax&&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!==Ay||r?n===Ay&&r?{scaleY:a?1:-1,scaleX:-1}:n!==Ax||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 yl({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var r=new yl({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:d2(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,c=r.getDataExtent(a),h=(c[1]-c[0])*.3;c=[c[0]-h,c[1]+h];var d=[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;return}var n=null==e||isNaN(e)||""===e,i=n?0:mu(e,c,d,!0);n&&!u&&t?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&u&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=m,u=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,b=0;b<3;b++){var w=function(e){var t=x.getModel(e?"selectedDataBackground":"dataBackground"),n=new mr,i=new _e({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new _i({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}(1===b);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}},t.prototype._prepareDataShadowInfo=function(){var e,t=this.dataZoomModel,n=t.get("showDataShadow");if(!1!==n){var i=this.ecModel;return t.eachTargetAxis(function(r,o){dK(t.getAxisProxy(r,o).getTargetSeriesModels(),function(t){if(!(e||!0!==n&&0>dq(Ab,t.get("type")))){var a,s=i.getComponent(IQ(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),e={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}},this)},this),e}},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 yl({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(c),r.add(new yl({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)"}})),dK([0,1],function(t){var o=a.get("handleIcon");!CG[o]&&0>o.indexOf("path://")&&0>o.indexOf("image://")&&(o="path://"+o);var s=CY(o,-1,0,2,2,null,!0);s.attr({cursor:A_(this._orient),draggable:!0,drift:d2(this._onDragMove,this,t),ondragend:d2(this._onDragEnd,this),onmouseover:d2(this._showDataInfo,this,!0),onmouseout:d2(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=mc(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(),y3(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),r.add(n[t]=s);var h=a.getModel("textStyle");e.add(i[t]=new yS({silent:!0,invisible:!0,style:xy(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))},this);var h=c;if(u){var d=mc(a.get("moveHandleSize"),o[1]),p=t.moveHandle=new yl({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),f=.8*d,g=t.moveHandleIcon=CY(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(d,10));(h=t.moveZone=new yl({invisible:!0,shape:{y:o[1]-m,height:d+m}})).on("mouseover",function(){s.enterEmphasis(p)}).on("mouseout",function(){s.leaveEmphasis(p)}),r.add(p),r.add(g),r.add(h)}h.attr({draggable:!0,cursor:A_(this._orient),drift:d2(this._onDragMove,this,"all"),ondragstart:d2(this._showDataInfo,this,!0),ondragend:d2(this._onDragEnd,this),onmouseover:d2(this._showDataInfo,this,!0),onmouseout:d2(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[mu(e[0],[0,100],t,!0),mu(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];I4(t,i,r,n.get("zoomLock")?"all":e,null!=o.minSpan?mu(o.minSpan,a,r,!0):null,null!=o.maxSpan?mu(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=md([mu(i[0],r,a,!0),mu(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=md(n.slice()),r=this._size;dK([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 yl,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=md(this._handleEnds.slice());function h(e){var t=_H(n.handles[e].parent,this.group),a=_$(0===e?"right":"left",t),s=this._handleWidth/2+5,l=_W([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],verticalAlign:r===Ay?"middle":a,align:r===Ay?a:"center",text:o[e]})}h.call(this,0),h.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 d4(i)?i(e,o):d8(i)?i.replace("{value}",o):o},t.prototype._showDataInfo=function(e){e=this._dragging||e;var t=this._displayables,n=t.handleLabels;n[0].attr("invisible",!e),n[1].attr("invisible",!e),t.moveHandle&&this.api[e?"enterEmphasis":"leaveEmphasis"](t.moveHandle,1)},t.prototype._onDragMove=function(e,t,n,i){this._dragging=!0,p1(i.event);var r=_W([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 fn(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&&5>Math.abs(n.width))){var i=this._getViewExtent(),r=[0,100];this._range=md([mu(n.x,i,r,!0),mu(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&&(p1(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 yl({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?Aw:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=IJ(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}(I3);function A_(e){return"vertical"===e?"ns-resize":"ew-resize"}function AC(e){e.registerComponentModel(Av),e.registerComponentView(AS),Ag(e)}var AM=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 dM(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"]),d3(t)&&dK(t,function(e,i){var r;d8(e)&&(e={type:e}),t[i]=d$(e,"all"===(r=e.type)?{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])}:"inverse"===r?{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}:void 0)})},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&&mE(i)&&t.push(i.name)}),this._availableNames=n;var i=this.get("data")||t,r=pg(),o=dQ(i,function(e){return((d8(e)||d9(e))&&(e={name:e}),r.get(e.name))?null:(r.set(e.name,!0),new xB(e,this,this.ecModel))},this);this._data=d0(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")&&dK(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;dK(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;dK(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])&&dq(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}(bb);function Ak(e,t){var n=pl(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new yl({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 AT=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return dM(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new mr),this.group.add(this._selectorGroup=new mr),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"),h=bf(l,u,c),d=this.layoutInner(e,r,h,i,a,s),p=bf(dU({width:d.width,height:d.height},l),u,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Ak(d,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=pg(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){e.get("legendHoverLink")||c.push(e.id)}),dK(t.getData(),function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var h=new mr;h.newline=!0,s.add(h);return}var d=n.getSeriesByName(a)[0];if(!l.get(a)){if(d){var p=d.getData(),f=p.getVisual("legendLineStyle")||{},g=p.getVisual("legendIcon"),m=p.getVisual("style"),v=this._createItem(d,a,o,r,t,e,f,m,g,u,i);v.on("click",d5(AD,a,null,i,c)).on("mouseover",d5(AA,d.name,null,i,c)).on("mouseout",d5(AP,d.name,null,i,c)),n.ssr&&v.eachChild(function(e){var t=y_(e);t.seriesIndex=d.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}else n.eachRawSeries(function(s){if(!l.get(a)&&s.legendVisualProvider){var h=s.legendVisualProvider;if(h.containName(a)){var d=h.indexOfName(a),p=h.getItemVisual(d,"style"),f=h.getItemVisual(d,"legendIcon"),g=gn(p.fill);g&&0===g[3]&&(g[3]=.2,p=dG(dG({},p),{fill:gl(g,"rgba")}));var m=this._createItem(s,a,o,r,t,e,{},p,f,u,i);m.on("click",d5(AD,null,a,i,c)).on("mouseover",d5(AA,null,a,i,c)).on("mouseout",d5(AP,null,a,i,c)),n.ssr&&m.eachChild(function(e){var t=y_(e);t.seriesIndex=s.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}}},this)}},this),r&&this._createSelector(r,t,i,o,a)},t.prototype._createSelector=function(e,t,n,i,r){var o=this.getSelectorGroup();dK(e,function(e){var i=e.type,r=new yS({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),xm(r,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),y3(r)})},t.prototype._createItem=function(e,t,n,i,r,o,a,s,l,u,c){var h=e.visualDrawType,d=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=2*(t.lineWidth>0)),dK(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",h=l.getShallow("decal");u.decal=h&&"inherit"!==h?Md(h,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 d=t.getModel("lineStyle"),p=d.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=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",i,a,s,h,f,c),x=new mr,b=i.getModel("textStyle");if(d4(e.getLegendIcon)&&(!v||"inherit"===v))x.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:g,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}));else{var w,S,_,C="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===g?e.getData().getVisual("symbolRotate"):g:0;x.add(((_=CY(S=(w={itemWidth:d,itemHeight:p,icon:l,iconRotate:C,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:m}).icon||"roundRect",0,0,w.itemWidth,w.itemHeight,w.itemStyle.fill,w.symbolKeepAspect)).setStyle(w.itemStyle),_.rotation=(w.iconRotate||0)*Math.PI/180,_.setOrigin([w.itemWidth/2,w.itemHeight/2]),S.indexOf("empty")>-1&&(_.style.stroke=_.style.fill,_.style.fill="#fff",_.style.lineWidth=2),_))}var M=r.get("formatter"),k=t;d8(M)&&M?k=M.replace("{name}",null!=t?t:""):d4(M)&&(k=M(t));var T=f?b.getTextColor():i.get("inactiveColor");x.add(new yS({style:xy(b,{text:k,x:"left"===o?d+5:-5,y:p/2,fill:T,align:o,verticalAlign:"middle"},{inheritColor:T})}));var D=new yl({shape:x.getBoundingRect(),style:{fill:"transparent"}}),I=i.getModel("tooltip");return I.get("show")&&_Q({el:D,componentModel:r,itemName:t,itemTooltipOption:I.option}),x.add(D),x.eachChild(function(e){e.silent=!0}),D.silent=!u,this.getContentGroup().add(x),y3(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();bp(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)return a.x=u[0],a.y=u[1],this.group.getBoundingRect();bp("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=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?h[p]+=l[f]+d:u[p]+=c[f]+d,h[1-p]+=l[g]/2-c[g]/2,s.x=h[0],s.y=h[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+d+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-p]),v},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Sx);function AD(e,t,n,i){AP(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),AA(e,t,n,i)}function AI(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 AA(e,t,n,i){AI(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function AP(e,t,n,i){AI(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}function AO(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 AR(e,t,n){var i,r={},o="toggleSelected"===e;return n.eachComponent("legend",function(n){o&&null!=i?n[i?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),i=n.isSelected(t.name)),dK(n.getData(),function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);r.hasOwnProperty(t)?r[t]=r[t]&&i:r[t]=i}})}),"allSelect"===e||"inverseSelect"===e?{selected:r}:{name:t.name,selected:r}}function AE(e){e.registerComponentModel(AM),e.registerComponentView(AT),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,AO),e.registerSubTypeDefaulter("legend",function(){return"plain"}),e.registerAction("legendToggleSelect","legendselectchanged",d5(AR,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",d5(AR,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",d5(AR,"inverseSelect")),e.registerAction("legendSelect","legendselected",d5(AR,"select")),e.registerAction("legendUnSelect","legendunselected",d5(AR,"unSelect"))}var AL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,i){var r=by(t);e.prototype.init.call(this,t,n,i),AB(this,t,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),AB(this,this.option,t)},t.type="legend.scroll",t.defaultOption=xz(AM.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}(AM);function AB(e,t,n){var i=e.getOrient(),r=[1,1];r[i.index]=0,bv(t,n,{type:"box",ignoreSize:!!r})}var AN=["width","height"],AF=["x","y"],Az=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 dM(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new mr),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new mr)},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),h=d3(c)?c:[c,c];p("pagePrev",0);var d=n.getModel("pageTextStyle");function p(e,t){var i=_Y(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:d2(l._pageGo,l,e+"DataIndex",n,r)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});i.name=e,u.add(i)}u.add(new yS({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.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=AN[s],u=AF[s],c=AN[1-s],h=AF[1-s];r&&bp("horizontal",a,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=a.getBoundingRect(),f=[-p.x,-p.y],g=dW(n);r&&(g[l]=n[l]-p[l]-d);var m=this._layoutContentAndController(e,i,g,s,l,c,h,u);if(r){if("end"===o)f[s]+=m[l]+d;else{var v=p[l]+d;f[s]-=v,m[u]-=v}m[l]+=p[l]+d,f[1-s]+=m[h]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[h]=Math.min(m[h],p[h]+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;bp(e.get("orient"),l,e.get("itemGap"),i?n.width:null,i?null:n.height),bp("horizontal",c,e.get("pageButtonItemGap",!0));var h=l.getBoundingRect(),d=c.getBoundingRect(),p=this._showController=h[r]>n[r],f=[-h.x,-h.y];t||(f[i]=l[s]);var g=[0,0],m=[-d.x,-d.y],v=po(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?m[i]+=n[r]-d[r]:g[i]+=d[r]+v),m[1-i]+=h[o]/2-d[o]/2,l.setPosition(f),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[r]=p?n[r]:h[r],y[o]=Math.max(h[o],d[o]),y[a]=Math.min(0,d[a]+m[1-i]),u.__rectSize=n[r],p){var x={x:0,y:0};x[r]=Math.max(n[r]-d[r]-v,0),x[o]=y[o],u.setClipPath(new yl({shape:x})),u.__rectSize=x[r]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return null!=b.pageIndex&&xa(l,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),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;dK(["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",d8(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=AN[r],a=AF[r],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=+!!c,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.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==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(var 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==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;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){var t,n;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},t.type="legend.scroll",t}(AT);function AV(e){MK(AE),e.registerComponentModel(AL),e.registerComponentView(Az),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 AZ=mN();function Aj(e,t,n,i){!function e(t,n){if(!(d7(t)&&d7(n)))return t===n;var i=!0;return dK(n,function(n,r){i=i&&e(t[r],n)}),!!i}(AZ(n).lastProp,i)&&(AZ(n).lastProp=i,t?xa(n,i,e):(n.stopAnimation(),n.attr(i)))}function AH(e,t){e[t.get(["label","show"])?"show":"hide"]()}function AW(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function A$(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 AG(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:Ds(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};dK(i,function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,r=t&&t.getDataParams(i);r&&s.seriesData.push(r)}),d8(a)?o=a.replace("{value}",o):d4(a)&&(o=a(s))}return o}function AU(e,t,n){var i=p8();return fe(i,i,n.rotation),p7(i,i,n.position),_W([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var Aq=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.makeElOption=function(e,t,n,i,r){var o,a,s,l,u,c,h,d,p,f,g,m,v,y,x,b,w,S,_,C=n.axis,M=C.grid,k=i.get("type"),T=AY(M,C).getOtherAxis(C).getGlobalExtent(),D=C.toGlobalCoord(C.dataToCoord(t,!0));if(k&&"none"!==k){var I,A,P,O=(A=i.get("type"),P=i.getModel(A+"Style"),"line"===A?(I=P.getLineStyle()).fill=null:"shadow"===A&&((I=P.getAreaStyle()).stroke=null),I),R=AX[k](C,D,T);R.style=O,e.graphicKey=R.type,e.pointer=R}var E=DM(M.model,n);h=DE.innerTextLayout(E.rotation,0,E.labelDirection),E.labelMargin=i.get(["label","margin"]),d={position:AU(n.axis,t,E),align:h.textAlign,verticalAlign:h.textVerticalAlign},p=AG(i.get("value"),n.axis,n.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),g=pl((f=i.getModel("label")).get("padding")||0),v=gJ(p,m=f.getFont()),y=d.position,x=v.width+g[1]+g[3],b=v.height+g[0]+g[2],"right"===(w=d.align)&&(y[0]-=x),"center"===w&&(y[0]-=x/2),"bottom"===(S=d.verticalAlign)&&(y[1]-=b),"middle"===S&&(y[1]-=b/2),o=y,a=x,s=b,u=(l=r).getWidth(),c=l.getHeight(),o[0]=Math.min(o[0]+a,u)-a,o[1]=Math.min(o[1]+s,c)-s,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),(_=f.get("backgroundColor"))&&"auto"!==_||(_=n.get(["axisLine","lineStyle","color"])),e.label={x:y[0],y:y[1],style:xy(f,{text:p,font:m,fill:f.getTextColor(),padding:g,backgroundColor:_}),z2:10}},t.prototype.getHandleTransform=function(e,t,n){var i=DM(t.axis.grid.model,t,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=AU(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=AY(o,r).getOtherAxis(r).getGlobalExtent(),l=+("x"!==r.dim),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,h=[c,c];return h[l]=u[l],{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(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){a&&a.hide(),s&&s.hide();return}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 h=d5(Aj,t,c);this.updatePointerEl(a,l,h),this.updateLabelEl(a,l,h,t)}else a=this._group=new mr,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);A$(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=DZ(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,i,r){},e.prototype.createPointerEl=function(e,t,n,i){var r=t.pointer;if(r){var o=AZ(e).pointerEl=new eF[r.type](dW(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,i){if(t.label){var r=AZ(e).labelEl=new yS(dW(t.label));e.add(r),AH(r,i)}},e.prototype.updatePointerEl=function(e,t,n){var i=AZ(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,i){var r=AZ(e).labelEl;r&&(r.setStyle(t.label.style),n(r,{x:t.label.x,y:t.label.y}),AH(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){r&&i.remove(r),this._handle=null;return}this._handle||(t=!0,r=this._handle=_Y(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){p1(e.event)},onmousedown:d2(this._onHandleDragMove,this,0,0),drift:d2(this._onHandleDragMove,this),ondragend:d2(this._onHandleDragEnd,this)}),i.add(r)),A$(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");d3(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Ci(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){Aj(this._axisPointerModel,!t&&this._moveAnimation,this._handle,AW(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(AW(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(AW(i)),AZ(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Cr(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 AY(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var AX={line:function(e,t,n){var i,r,o;return{type:"Line",subPixelOptimize:!0,shape:(i=[t,n[0]],r=[t,n[1]],{x1:i[o=(o=AK(e))||0],y1:i[1-o],x2:r[o],y2:r[1-o]})}},shadow:function(e,t,n){var i,r,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(i=[t-a/2,n[0]],r=[a,s],{x:i[o=(o=AK(e))||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function AK(e){return+("x"!==e.dim)}var AQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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}(bb),AJ=mN();function A0(e,t,n){if(!dT.node){var i=t.getZr();AJ(i).records||(AJ(i).records={}),function(e,t){!AJ(e).initialized&&(AJ(e).initialized=!0,n("click",d5(A2,"click")),n("mousemove",d5(A2,"mousemove")),n("globalout",A1));function n(n,i){e.on(n,function(n){var r,o,a,s,l,u,c,h,d=(r=t,o={showTip:[],hideTip:[]},{dispatchAction:a=function(e){var t=o[e.type];t?t.push(e):(e.dispatchAction=a,r.dispatchAction(e))},pendings:o});dK(AJ(e).records,function(e){e&&i(e,n,d.dispatchAction)}),s=d.pendings,l=t,c=s.showTip.length,h=s.hideTip.length,c?u=s.showTip[c-1]:h&&(u=s.hideTip[h-1]),u&&(u.dispatchAction=null,l.dispatchAction(u))})}}(i,t),(AJ(i).records[e]||(AJ(i).records[e]={})).handler=n}}function A1(e,t,n){e.handler("leave",null,n)}function A2(e,t,n,i){t.handler(e,n,i)}function A5(e,t){if(!dT.node){var n=t.getZr();(AJ(n).records||{})[e]&&(AJ(n).records[e]=null)}}var A3=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.render=function(e,t,n){var i=t.getComponent("tooltip"),r=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";A0("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){A5("axisPointer",t)},t.prototype.dispose=function(e,t){A5("axisPointer",t)},t.type="axisPointer",t}(Sx);function A4(e,t){var n,i=[],r=e.seriesIndex;if(null==r||!(n=t.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=mB(o,e);if(null==a||a<0||d3(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,h=u.dim,d=+("x"===c||"radius"===c),p=o.mapDimension(h),f=[];f[d]=o.get(p,a),f[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(dQ(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 A8=mN();function A6(e,t,n){var i=e.currTrigger,r=[e.x,e.y],o=e.dispatchAction||d2(n.dispatchAction,n),a=t.getComponent("axisPointer").coordSysAxesInfo;if(a){Pn(r)&&(r=A4({seriesIndex:e.seriesIndex,dataIndex:e.dataIndex},t).point);var s,l,u,c,h,d,p,f,g,m,v,y,x=Pn(r),b=e.axesInfo,w=a.axesInfo,S="leave"===i||Pn(r),_={},C={},M={list:[],map:{}},k={showPointer:d5(A7,C),showTooltip:d5(Pe,M)};dK(a.coordSysMap,function(e,t){var n=x||e.containPoint(r);dK(a.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}}(b,e);if(!S&&n&&(!b||o)){var a=o&&o.value;null!=a||x||(a=i.pointToData(r)),null!=a&&A9(e,a,k,!1,_)}})});var T={};return dK(w,function(e,t){var n=e.linkGroup;n&&!C[t]&&dK(n.axesInfo,function(t,i){var r=C[i];if(t!==e&&r){var o=r.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,Pt(t),Pt(e)))),T[e.key]=o}})}),dK(T,function(e,t){A9(w[t],e,k,!0,_)}),s=C,l=w,u=_.axesInfo=[],dK(l,function(e,t){var n=e.axisPointerModel.option,i=s[t];i?(e.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):e.useHandle||(n.status="hide"),"show"===n.status&&u.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:n.value})}),function(e,t,n,i){if(Pn(t)||!e.list.length){i({type:"hideTip"});return}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})}(M,r,e,o),c=w,h=0,p=(d=n).getZr(),f="axisPointerLastHighlights",g=A8(p)[f]||{},m=A8(p)[f]={},dK(c,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&dK(n.seriesDataIndices,function(e){m[e.seriesIndex+" | "+e.dataIndex]=e})}),v=[],y=[],dK(g,function(e,t){m[t]||y.push(e)}),dK(m,function(e,t){g[t]||v.push(e)}),y.length&&d.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:y}),v.length&&d.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:v}),_}}function A9(e,t,n,i,r){var o=e.axis;if(!o.scale.isBlank()&&o.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var a,s,l,u,c,h,d,p,f=(a=t,u=(l=(s=e).axis).dim,c=a,h=[],d=Number.MAX_VALUE,p=-1,dK(s.seriesModels,function(e,t){var n,i,r=e.getData().mapDimensionsAll(u);if(e.getAxisTooltipData){var o=e.getAxisTooltipData(r,a,l);i=o.dataIndices,n=o.nestestValue}else{if(!(i=e.getData().indicesOfNearest(r[0],a,"category"===l.type?.5:null)).length)return;n=e.getData().get(r[0],i[0])}if(null!=n&&isFinite(n)){var s=a-n,f=Math.abs(s);f<=d&&((f<d||s>=0&&p<0)&&(d=f,p=s,c=n,h.length=0),dK(i,function(t){h.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:h,snapToValue:c}),g=f.payloadBatch,m=f.snapToValue;g[0]&&null==r.seriesIndex&&dG(r,g[0]),!i&&e.snap&&o.containData(m)&&null!=m&&(t=m),n.showPointer(e,t,g),n.showTooltip(e,f,m)}}function A7(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function Pe(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=DH(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 Pt(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 Pn(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function Pi(e){D$.registerAxisPointerClass("CartesianAxisPointer",Aq),e.registerComponentModel(AQ),e.registerComponentView(A3),e.registerPreprocessor(function(e){if(e){e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={});var t=e.axisPointer.link;t&&!d3(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){var n,i,r,o,a,s,l,u;e.getComponent("axisPointer").coordSysAxesInfo=(i=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},r=e,o=t,a=r.getComponent("tooltip"),l=(s=r.getComponent("axisPointer")).get("link",!0)||[],u=[],dK(o.getCoordinateSystems(),function(e){if(e.axisPointerEnabled){var t=DH(e.model),n=i.coordSysAxesInfo[t]={};i.coordSysMap[t]=e;var o=e.model.getModel("tooltip",a);if(dK(e.getAxes(),d5(p,!1,null)),e.getTooltipAxes&&a&&o.get("show")){var c="axis"===o.get("trigger"),h="cross"===o.get(["axisPointer","type"]),d=e.getTooltipAxes(o.get(["axisPointer","axis"]));(c||h)&&dK(d.baseAxes,d5(p,!h||"cross",c)),h&&dK(d.otherAxes,d5(p,"cross",!1))}}function p(t,a,c){var h=c.model.getModel("axisPointer",s),d=h.get("show");if(d&&("auto"!==d||t||Dj(h))){null==a&&(a=h.get("triggerTooltip"));var p=(h=t?function(e,t,n,i,r,o){var a=t.getModel("axisPointer"),s={};dK(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=dW(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&&dU(l,c.textStyle)}}return e.model.getModel("axisPointer",new xB(s,n,i))}(c,o,s,r,t,a):h).get("snap"),f=h.get("triggerEmphasis"),g=DH(c.model),m=a||p||"category"===c.type,v=i.axesInfo[g]={key:g,axis:c,coordSys:e,axisPointerModel:h,triggerTooltip:a,triggerEmphasis:f,involveSeries:m,snap:p,useHandle:Dj(h),seriesModels:[],linkGroup:null};n[g]=v,i.seriesInvolved=i.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(DV(o[i+"AxisId"],n.id)||DV(o[i+"AxisIndex"],n.componentIndex)||DV(o[i+"AxisName"],n.name))return r}}(l,c);if(null!=y){var x=u[y]||(u[y]={axesInfo:{}});x.axesInfo[g]=v,x.mapper=l[y].mapper,v.linkGroup=x}}}}),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)&&dK(e.coordSysAxesInfo[DH(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)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},A6)}var Pr=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 dM(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}(bb),Po=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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=po(e.get("textBaseline"),e.get("textVerticalAlign")),l=new yS({style:xy(r,{text:e.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new yS({style:xy(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!d&&!f,h.silent=!p&&!f,d&&l.on("click",function(){bc(d,"_"+e.get("target"))}),p&&h.on("click",function(){bc(p,"_"+e.get("subtarget"))}),y_(l).eventData=y_(h).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=bf(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),h.setStyle(y),g=i.getBoundingRect();var x=v.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var w=new yl({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:b,subPixelOptimize:!0,silent:!0});i.add(w)}},t.type="title",t}(Sx),Pa=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.type="dataZoom.select",t}(I1),Ps=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.type="dataZoom.select",t}(I3);function Pl(e){e.registerComponentModel(Pa),e.registerComponentView(Ps),Ag(e)}var Pu=function(){},Pc={},Ph=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;dK(this.option.feature,function(e,n){var i=Pc[n];i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),d$(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}(bb),Pd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.render=function(e,t,n,i){var r,o,a,s,l=this.group;if(l.removeAll(),e.get("show")){var u=+e.get("itemSize"),c="vertical"===e.get("orient"),h=e.get("feature")||{},d=this._features||(this._features={}),p=[];dK(h,function(e,t){p.push(t)}),new M2(this._featureNames||[],p).add(f).update(f).remove(d5(f,null)).execute(),this._featureNames=p,r=e.getBoxLayoutParams(),o=e.get("padding"),s=bf(r,a={width:n.getWidth(),height:n.getHeight()},o),bp(e.get("orient"),l,e.get("itemGap"),s.width,s.height),bg(l,r,a,o),l.add(Ak(l.getBoundingRect(),e)),c||l.eachChild(function(e){var t=e.__title,i=e.ensureState("emphasis"),r=i.textConfig||(i.textConfig={}),o=e.getTextContent(),a=o&&o.ensureState("emphasis");if(a&&!d4(a)&&t){var s=a.style||(a.style={}),c=gJ(t,yS.makeFont(s)),h=e.x+l.x,d=e.y+l.y+u,p=!1;d+c.height>n.getHeight()&&(r.position="top",p=!0);var f=p?-5-c.height:u+10;h+c.width/2>n.getWidth()?(r.position=["100%",f],s.align="right"):h-c.width/2<0&&(r.position=[0,f],s.align="left")}})}function f(r,o){var a,s,f,g,m,v,y,x,b,w,S,_=p[r],C=p[o],M=h[_],k=new xB(M,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===_&&(M.title=i.newTitle),_&&!C){if(0===_.indexOf("my"))S={onclick:k.option.onclick,featureName:_};else{var T=Pc[_];if(!T)return;S=new T}d[_]=S}else if(!(S=d[C]))return;S.uid=xF("toolbox-feature"),S.model=k,S.ecModel=t,S.api=n;var D=S instanceof Pu;if(!_&&C){D&&S.dispose&&S.dispose(t,n);return}if(!k.get("show")||D&&S.unusable){D&&S.remove&&S.remove(t,n);return}a=k,s=S,f=_,v=a.getModel("iconStyle"),y=a.getModel(["emphasis","iconStyle"]),x=s instanceof Pu&&s.getIcons?s.getIcons():a.get("icon"),b=a.get("title")||{},d8(x)?(g={})[f]=x:g=x,d8(b)?(m={})[f]=b:m=b,w=a.iconPaths={},dK(g,function(i,r){var o=_Y(i,{},{x:-u/2,y:-u/2,width:u,height:u});o.setStyle(v.getItemStyle()),o.ensureState("emphasis").style=y.getItemStyle();var h=new yS({style:{text:m[r],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:xC({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},t)},ignore:!0});o.setTextContent(h),_Q({el:o,componentModel:e,itemName:r,formatterParamsExtra:{title:m[r]}}),o.__title=m[r],o.on("mouseover",function(){var t=y.getItemStyle(),i=c?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";h.setStyle({fill:y.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),o.setTextConfig({position:y.get("textPosition")||i}),h.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==a.get(["iconStatus",r])&&n.leaveEmphasis(this),h.hide()}),("emphasis"===a.get(["iconStatus",r])?yX:yK)(o),l.add(o),o.on("click",d2(s.onclick,s,t,n,r)),w[r]=o}),k.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&("emphasis"===t?yX:yK)(i[e])},S instanceof Pu&&S.render&&S.render(k,t,n,i)}},t.prototype.updateView=function(e,t,n,i){dK(this._features,function(e){e instanceof Pu&&e.updateView&&e.updateView(e.model,t,n,i)})},t.prototype.remove=function(e,t){dK(this._features,function(n){n instanceof Pu&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){dK(this._features,function(n){n instanceof Pu&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(Sx),Pp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(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=dT.browser;if(d4(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=i+"."+o,l.target="_blank",l.href=a;var u=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});l.dispatchEvent(u)}else if(window.navigator.msSaveOrOpenBlob||r){var c=a.split(","),h=c[0].indexOf("base64")>-1,d=r?decodeURIComponent(c[1]):c[1];h&&(d=window.atob(d));var p=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var f=d.length,g=new Uint8Array(f);f--;)g[f]=d.charCodeAt(f);var m=new Blob([g]);window.navigator.msSaveOrOpenBlob(m,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,x=y.document;x.open("image/svg+xml","replace"),x.write(d),x.close(),y.focus(),x.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var b=n.get("lang"),w='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(b&&b[0]||"")+'" /></body>',S=window.open();S.document.write(w),S.document.title=i}},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}(Pu),Pf="__ec_magicType_stack__",Pg=[["line","bar"],["stack"]],Pm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return dK(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,r=this.model,o=r.get(["seriesIndex",n]);if(Pv[n]){var a={series:[]};dK(Pg,function(e){dq(e,n)>=0&&dK(e,function(e){r.setIconStatus(e,"normal")})}),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var t=e.subType,i=e.id,o=Pv[n](t,i,e,r);o&&(dU(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,mZ).models[0].componentIndex;a[u]=a[u]||[];for(var h=0;h<=c;h++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}});var s=n;"stack"===n&&(i=d$({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},t}(Pu),Pv={line:function(e,t,n,i){if("bar"===e)return d$({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 d$({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")===Pf;if("line"===e||"bar"===e)return i.setIconStatus("stack",r?"normal":"emphasis"),d$({id:t,stack:r?"":Pf},i.get(["option","stack"])||{},!0)}};M$({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var Py=Array(60).join("-");function Px(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Pb=RegExp("[ ]+","g"),Pw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n,i,r,o,a,s,l=t.getDom(),u=this.model;this._dom&&l.removeChild(this._dom);var c=document.createElement("div");c.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",c.style.backgroundColor=u.get("backgroundColor")||"#fff";var h=document.createElement("h4"),d=u.get("lang")||[];h.innerHTML=d[0]||u.get("title"),h.style.cssText="margin:10px 20px",h.style.color=u.get("textColor");var p=document.createElement("div"),f=document.createElement("textarea");p.style.cssText="overflow:auto";var g=u.get("optionToContent"),m=u.get("contentToOption"),v={value:d0([(a=(n={},i=[],r=[],e.eachRawSeries(function(e){var t=e.coordinateSystem;if(t&&("cartesian2d"===t.type||"polar"===t.type)){var o=t.getBaseAxis();if("category"===o.type){var a=o.dim+"_"+o.index;n[a]||(n[a]={categoryAxis:o,valueAxis:t.getOtherAxis(o),series:[]},r.push({axisDim:o.dim,axisIndex:o.index})),n[a].series.push(e)}else i.push(e)}else i.push(e)}),o={seriesGroupByCategoryAxis:n,other:i,meta:r}).seriesGroupByCategoryAxis,s=[],dK(a,function(e,t){var n=e.categoryAxis,i=e.valueAxis.dim,r=[" "].concat(dQ(e.series,function(e){return e.name})),o=[n.model.getCategories()];dK(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var a=[r.join(" ")],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);a.push(u.join(" "))}s.push(a.join("\n"))}),s.join("\n\n"+Py+"\n\n")),dQ(o.other,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.join(" "))}),n.join("\n")}).join("\n\n"+Py+"\n\n")],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+Py+"\n\n"),meta:o.meta};if(d4(g)){var y=g(t.getOption());d8(y)?p.innerHTML=y:pn(y)&&p.appendChild(y)}else{f.readOnly=u.get("readOnly");var x=f.style;x.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",x.color=u.get("textColor"),x.borderColor=u.get("textareaBorderColor"),x.backgroundColor=u.get("textareaColor"),f.value=v.value,p.appendChild(f)}var b=v.meta,w=document.createElement("div");w.style.cssText="position:absolute;bottom:5px;left:0;right:0";var S="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),C=document.createElement("div");S+=";background-color:"+u.get("buttonColor")+";color:"+u.get("buttonTextColor");var M=this;function k(){l.removeChild(c),M._dom=null}p0(_,"click",k),p0(C,"click",function(){var e,n,i;if(null==m&&null!=g||null!=m&&null==g){k();return}try{d4(m)?e=m(p,t.getOption()):(n=f.value.split(RegExp("\n*"+Py+"\n*","g")),i={series:[]},dK(n,function(e,t){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(" ")>=0)return!0}(e)){var n=function(e){for(var t=e.split(/\n+/g),n=Px(t.shift()).split(Pb),i=[],r=dQ(n,function(e){return{name:e,data:[]}}),o=0;o<t.length;o++){var a=Px(t[o]).split(Pb);i.push(a.shift());for(var s=0;s<a.length;s++)r[s]&&(r[s].data[o]=a[s])}return{series:r,categories:i}}(e),r=b[t],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:n.categories},i.series=i.series.concat(n.series))}else{var n=function(e){for(var t=e.split(/\n+/g),n=Px(t.shift()),i=[],r=0;r<t.length;r++){var o=Px(t[r]);if(o){var a=o.split(Pb),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(n)}}),e=i)}catch(e){throw k(),Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),k()}),_.innerHTML=d[1],C.innerHTML=d[2],C.style.cssText=_.style.cssText=S,u.get("readOnly")||w.appendChild(C),w.appendChild(_),c.appendChild(h),c.appendChild(p),c.appendChild(w),p.style.height=l.clientHeight-80+"px",l.appendChild(c),this._dom=c},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}(Pu);M$({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];dK(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:dQ(e.data,function(e,t){var n=r&&r[t];if(!d7(n)||d3(n))return e;d7(e)&&!d3(e)||(e={value:e});var i=null!=n.name&&null==e.name;return e=dU(e,n),i&&delete e.name,e})})}else n.push(dG({type:"scatter"},e))}),t.mergeOption(dU({series:n},e.newOption))});var PS=mN();function P_(e){var t=PS(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var PC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.onclick=function(e,t){PS(e).snapshots=null,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}(Pu);M$({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var PM=Math.min,Pk=Math.max,PT=Math.pow,PD="globalPan",PI={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},PA={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},PP={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},PO=0,PR=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new mr,n._uid="brushController_"+PO++,dK(P8,function(e,t){this._handlers[t]=d2(e,this)},n),n}return dM(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t,n=this._zr;!this._enableGlobalPan&&(t=this._uid,I7(n)[PD]=t),dK(this._handlers,function(e,t){n.on(t,e)}),this._brushType=e.brushType,this._brushOption=d$(dW(PP),e,!0)},t.prototype._doDisableBrush=function(){var e,t,n=this._zr;e=this._uid,(t=I7(n))[PD]===e&&(t[PD]=null),dK(this._handlers,function(e,t){n.off(t,e)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};dK(e,function(e){t[e.panelId]=dW(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},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){e=dQ(e,function(e){return d$(dW(PP),e,!0)});var t=this._covers,n=this._covers=[],i=this,r=this._creatingCover;return new M2(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]):PL(i,PE(i,s));PF(i,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),Pj(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(pB);function PE(e,t){var n=P9[t.brushType].createCover(e,t);return n.__brushOption=t,PN(n,t),e.group.add(n),n}function PL(e,t){var n=Pz(t);return n.endCreating&&(n.endCreating(e,t),PN(t,t.__brushOption)),t}function PB(e,t){var n=t.__brushOption;Pz(t).updateCoverShape(e,t,n.range,n)}function PN(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function PF(e,t){Pz(t).updateCommon(e,t),PB(e,t)}function Pz(e){return P9[e.__brushOption.brushType]}function PV(e,t,n){var i,r=e._panels;if(!r)return!0;var o=e._transform;return dK(r,function(e){e.isTargetByCursor(t,n,o)&&(i=e)}),i}function PZ(e,t){var n=e._panels;if(!n)return!0;var i=t.__brushOption.panelId;return null==i||n[i]}function Pj(e){var t=e._covers,n=t.length;return dK(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function PH(e,t){var n=dQ(e._covers,function(e){var t=e.__brushOption,n=dW(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function PW(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function P$(e,t,n,i){var r=new mr;return r.add(new yl({name:"main",style:PY(n),silent:!0,draggable:!0,cursor:"move",drift:d5(PQ,e,t,r,["n","s","w","e"]),ondragend:d5(PH,t,{isEnd:!0})})),dK(i,function(n){r.add(new yl({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:d5(PQ,e,t,r,n),ondragend:d5(PH,t,{isEnd:!0})}))}),r}function PG(e,t,n,i){var r=i.brushStyle.lineWidth||0,o=Pk(r,6),a=n[0][0],s=n[1][0],l=a-r/2,u=s-r/2,c=n[0][1],h=n[1][1],d=c-o+r/2,p=h-o+r/2,f=c-a,g=h-s,m=f+r,v=g+r;Pq(e,t,"main",a,s,f,g),i.transformable&&(Pq(e,t,"w",l,u,o,v),Pq(e,t,"e",d,u,o,v),Pq(e,t,"n",l,u,m,o),Pq(e,t,"s",l,p,m,o),Pq(e,t,"nw",l,u,o,o),Pq(e,t,"ne",d,u,o,o),Pq(e,t,"sw",l,p,o,o),Pq(e,t,"se",d,p,o,o))}function PU(e,t){var n=t.__brushOption,i=n.transformable,r=t.childAt(0);r.useStyle(PY(n)),r.attr({silent:!i,cursor:i?"move":"default"}),dK([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var r,o,a,s=t.childOfName(n.join("")),l=1===n.length?PK(e,n[0]):(("e"===(a=[PK(r=e,(o=n)[0]),PK(r,o[1])])[0]||"w"===a[0])&&a.reverse(),a.join(""));s&&s.attr({silent:!i,invisible:!i,cursor:i?PA[l]+"-resize":null})})}function Pq(e,t,n,i,r,o,a){var s,l,u,c=t.childOfName(n);c&&c.setShape((l=PM((s=P1(e,t,[[i,r],[i+o,r+a]]))[0][0],s[1][0]),{x:l,y:u=PM(s[0][1],s[1][1]),width:Pk(s[0][0],s[1][0])-l,height:Pk(s[0][1],s[1][1])-u}))}function PY(e){return dU({strokeNoScale:!0},e.brushStyle)}function PX(e,t,n,i){var r=[PM(e,n),PM(t,i)],o=[Pk(e,n),Pk(t,i)];return[[r[0],o[0]],[r[1],o[1]]]}function PK(e,t){return({left:"w",right:"e",top:"n",bottom:"s"})[_$({w:"left",e:"right",n:"top",s:"bottom"}[t],_H(e.group))]}function PQ(e,t,n,i,r,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=P0(t,r,o);dK(i,function(e){var t=PI[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(PX(s[0][0],s[1][0],s[0][1],s[1][1])),PF(t,n),PH(t,{isEnd:!1})}function PJ(e,t,n,i){var r=t.__brushOption.range,o=P0(e,n,i);dK(r,function(e){e[0]+=o[0],e[1]+=o[1]}),PF(e,t),PH(e,{isEnd:!1})}function P0(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 P1(e,t,n){var i=PZ(e,t);return i&&!0!==i?i.clipPath(n,e._transform):dW(n)}function P2(e){var t=e.event;t.preventDefault&&t.preventDefault()}function P5(e,t,n){return e.childOfName("main").contain(t,n)}function P3(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 PT(r*r+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&Pj(e);var l=dW(s);l.brushType=P4(l.brushType,a),l.panelId=!0===a?null:a.panelId,o=e._creatingCover=PE(e,l),e._covers.push(o)}if(o){var u=P9[P4(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(P1(e,o,e._track)),i&&(PL(e,o),u.updateCommon(e,o)),PB(e,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&PV(e,t,n)&&Pj(e)&&(r={isEnd:i,removeOnClick:!0});return r}function P4(e,t){return"auto"===e?t.defaultBrushType:e}var P8={mousedown:function(e){if(this._dragging)P6(this,e);else if(!e.target||!e.target.draggable){P2(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=PV(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||(i=e,r=t.offsetX,o=t.offsetY,a=i._zr,r<0||r>a.getWidth()||o<0||o>a.getHeight()))){var i,r,o,a,s=e._zr,l=e._covers,u=PV(e,t,n);if(!e._dragging)for(var c=0;c<l.length;c++){var h=l[c].__brushOption;if(u&&(!0===u||h.panelId===u.panelId)&&P9[h.brushType].contain(l[c],n[0],n[1]))return}u&&s.setCursorStyle("crosshair")}}(this,e,i),this._dragging){P2(e);var r=P3(this,e,i,!1);r&&PH(this,r)}},mouseup:function(e){P6(this,e)}};function P6(e,t){if(e._dragging){P2(t);var n=t.offsetX,i=t.offsetY,r=e.group.transformCoordToLocal(n,i),o=P3(e,t,r,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&PH(e,o)}}var P9={lineX:P7(0),lineY:P7(1),rect:{createCover:function(e,t){function n(e){return e}return P$({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=PW(e);return PX(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){PG(e,t,n,i)},updateCommon:PU,contain:P5},polygon:{createCover:function(e,t){var n=new mr;return n.add(new _i({name:"main",style:PY(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new _e({name:"main",draggable:!0,drift:d5(PJ,e,t),ondragend:d5(PH,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:P1(e,t,n)})},updateCommon:PU,contain:P5}};function P7(e){return{createCover:function(t,n){return P$({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=PW(t);return[PM(n[0][e],n[1][e]),Pk(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,r){var o,a=PZ(t,n);if(!0!==a&&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(),PG(t,n,l,r)},updateCommon:PU,contain:P5}}var Oe={axisPointer:1,tooltip:1,brush:1};function Ot(e){return fh.create(e)}var On=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Oi=function(){function e(e,t,n){var i=this;this._targetInfoList=[];var r=Oo(t,e);dK(Oa,function(e,t){(!n||!n.include||dq(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=Ou[e.brushType](0,n,t);e.__rangeOffset={offset:Oh[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){dK(e,function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&dK(i.coordSyses,function(i){var r=Ou[e.brushType](1,i,e.range,!0);n(e,r.values,i,t)})},this)},e.prototype.setInputRanges=function(e,t){dK(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var i,r,o,a,s,l=Ou[e.brushType](0,n.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?Oh[e.brushType](l.values,u.offset,(i=l.xyMinMax,r=u.xyMinMax,o=Op(i),a=Op(r),isNaN((s=[o[0]/a[0],o[1]/a[1]])[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s)):l.values}},this)},e.prototype.makePanelOpts=function(e,t){return dQ(this._targetInfoList,function(n){var i,r,o,a,s=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:(i=Ot(i=s),function(e){return _U(e,i)}),isTargetByCursor:(r=n.coordSysModel,o=Ot(s),function(t,n){var i,a;return o.contain(n[0],n[1])&&(a=(i=e.getComponentByElement(t.topTarget))&&i.coordinateSystem,!i||i===r||!!Oe.hasOwnProperty(i.mainType)||!a||a.model===r)}),getLinearBrushOtherExtent:(a=Ot(a=s),function(e){var t=e?a.width:a.height,n=e?a.x:a.y;return[n,n+(t||0)]})}})},e.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&dq(i.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=Oo(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<Os.length;s++)if(Os[s](i,o))return o}return!0},e}();function Or(e){return e[0]>e[1]&&e.reverse(),e}function Oo(e,t){return mz(e,t,{includeMainTypes:On})}var Oa={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,r=e.gridModels,o=pg(),a={},s={};(n||i||r)&&(dK(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),dK(i,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),dK(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=[];dK(r.getCartesians(),function(e,t){(dq(n,e.getAxis("x").model)>=0||dq(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:Ol.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){dK(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Ol.geo})})}},Os=[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}],Ol={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(_H(e)),t}},Ou={lineX:d5(Oc,0),lineY:d5(Oc,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=[Or([r[0],o[0]]),Or([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:dQ(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 Oc(e,t,n,i){var r=n.getAxis(["x","y"][e]),o=Or(dQ([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 Oh={lineX:d5(Od,0),lineY:d5(Od,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 dQ(e,function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]})}};function Od(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function Op(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var Of=mk+"toolbox-dataZoom_",Og=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dM(t,e),t.prototype.render=function(e,t,n,i){this._brushController||(this._brushController=new PR(n.getZr()),this._brushController.on("brush",d2(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 Oi(Ov(e),t,{include:["grid"]}).makePanelOpts(r,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(a).enableBrush(!!o&&!!a.length&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",P_(t).length>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){Om[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,n,i,r=e.areas;if(e.isEnd&&r.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new Oi(Ov(this.model),a,{include:["grid"]}).matchOutputRanges(r,a,function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(s("x",n,t[0]),s("y",n,t[1])):s({lineX:"x",lineY:"y"}[i],n,t)}}),t=a,n=o,i=P_(t),dK(n,function(e,n){for(var r=i.length-1;r>=0&&!i[r][n];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var a=o.getPercentRange();i[0][n]={dataZoomId:n,start:a[0],end:a[1]}}}}),i.push(n),this._dispatchZoomAction(o)}function s(e,t,n){var i,r,s,l=t.getAxis(e),u=l.model,c=(i=e,r=u,a.eachComponent({mainType:"dataZoom",subType:"select"},function(e){e.getAxisModel(i,r.componentIndex)&&(s=e)}),s),h=c.findRepresentativeAxisProxy(u).getMinMaxSpan();(null!=h.minValueSpan||null!=h.maxValueSpan)&&(n=I4(0,n.slice(),l.scale.getExtent(),0,h.minValueSpan,h.maxValueSpan)),c&&(o[c.id]={dataZoomId:c.id,startValue:n[0],endValue:n[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];dK(e,function(e,n){t.push(dW(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}(Pu),Om={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){var e,t,n;this._dispatchZoomAction((t=(e=P_(this.ecModel))[e.length-1],e.length>1&&e.pop(),n={},dK(t,function(t,i){for(var r=e.length-1;r>=0;r--)if(t=e[r][i]){n[i]=t;break}}),n))}};function Ov(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}A="dataZoom",P=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var i=t.getModel(n),r=[],o=mz(e,Ov(i));return dK(o.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),dK(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:Of+t+o};a[n]=o,r.push(a)}},pu(null==bz.get(A)&&P),bz.set(A,P);var Oy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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}(bb);function Ox(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function Ob(e){if(dT.domSupported){for(var t=document.documentElement.style,n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n]}}var Ow=Ob(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function OS(e,t){if(!e)return t;t=br(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var O_=OS(Ob(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),OC=OS(Ow,"transform"),OM="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(dT.transform3dSupported?"will-change:transform;":"");function Ok(e,t,n){var i=e.toFixed(0)+"px",r=t.toFixed(0)+"px";if(!dT.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=dT.transform3dSupported,a="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+OC+":"+a+";":[["top",0],["left",0],[Ow,a]]}function OT(e,t,n,i,r){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&pj(pZ,a,i,r,!0)&&pj(e,n,pZ[0],pZ[1])}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 OD=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,dT.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&&(d8(r)?document.querySelector(r):pn(r)?r:d4(r)&&r(e.getDom()));OT(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;pJ(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,n,i=this._api.getDom(),r=(t="position",(n=i.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(i))?t?n[t]:n:null),o=i.style;"absolute"!==o.position&&"absolute"!==r&&(o.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,i,r,o,a,s,l,u,c,h,d,p,f,g,m,v,y,x,b,w,S,_,C=this.el,M=C.style,k=this._styleCoord;C.innerHTML?M.cssText=OM+(n=!this._firstShow,i=this._longHide,r=[],o=e.get("transitionDuration"),a=e.get("backgroundColor"),s=e.get("shadowBlur"),l=e.get("shadowColor"),u=e.get("shadowOffsetX"),c=e.get("shadowOffsetY"),h=e.getModel("textStyle"),d=Ss(e,"html"),p=u+"px "+c+"px "+s+"px "+l,r.push("box-shadow:"+p),n&&o&&r.push((m="opacity"+(g=" "+o/2+"s "+(f="cubic-bezier(0.23,1,0.32,1)"))+",visibility"+g,i||(g=" "+o+"s "+f,m+=dT.transformSupported?","+OC+g:",left"+g+",top"+g),O_+":"+m)),a&&r.push("background-color:"+a),dK(["width","color","radius"],function(t){var n="border-"+t,i=br(n),o=e.get(i);null!=o&&r.push(n+":"+o+("color"===t?"":"px"))}),r.push((v=[],y=h.get("fontSize"),(x=h.getTextColor())&&v.push("color:"+x),v.push("font:"+h.getFont()),y&&v.push("line-height:"+Math.round(3*y/2)+"px"),b=h.get("textShadowColor"),w=h.get("textShadowBlur")||0,S=h.get("textShadowOffsetX")||0,_=h.get("textShadowOffsetY")||0,b&&w&&v.push("text-shadow:"+S+"px "+_+"px "+w+"px "+b),dK(["decoration","align"],function(e){var t=h.get(e);t&&v.push("text-"+e+":"+t)}),v.join(";"))),null!=d&&r.push("padding:"+pl(d).join("px ")+"px"),r.join(";")+";")+Ok(k[0],k[1],!0)+"border-color:"+bu(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):M.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){o.innerHTML="";return}var a="";if(d8(r)&&"item"===n.get("trigger")&&!Ox(n)&&(a=function(e,t,n){if(!d8(n)||"inside"===n)return"";var i,r,o=e.get("backgroundColor"),a=e.get("borderWidth");t=bu(t);var s=i="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",l=Math.max(1.5*Math.round(a),6),u="",c=OC+":";dq(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(r="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(r="top"===s?225:45)+"deg)");var h=r*Math.PI/180,d=l+a,p=d*Math.abs(Math.cos(h))+d*Math.abs(Math.sin(h));u+=";"+s+":-"+Math.round(((p-Math.SQRT2*a)/2+Math.SQRT2*a-(p-d)/2)*100)/100+"px";var f=t+" solid "+a+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",u+";"+c+";","border-bottom:"+f,"border-right:"+f,"background-color:"+o+";"].join("")+'"></div>'}(n,i,r)),d8(e))o.innerHTML=e+a;else if(e){o.innerHTML="",d3(e)||(e=[e]);for(var s=0;s<e.length;s++)pn(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)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},e.prototype.moveTo=function(e,t){var n=this._styleCoord;if(OT(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var i=this.el.style;dK(Ok(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",dT.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(d2(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}(),OI=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),OO(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;d7(e)&&wL(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new yS({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:Ss(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),dK(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),dK(["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=OP(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;OO(i,this._zr,e,t),e=i[0],t=i[1];var r=n.style,o=OA(r.borderWidth||0),a=OP(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(d2(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function OA(e){return Math.max(0,e)}function OP(e){var t=OA(e.shadowBlur||0),n=OA(e.shadowOffsetX||0),i=OA(e.shadowOffsetY||0);return{left:OA(t-n),right:OA(t+n),top:OA(t-i),bottom:OA(t+i)}}function OO(e,t,n,i){e[0]=n,e[1]=i,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var OR=new yl({shape:{x:-1,y:-1,width:2,height:2}}),OE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.init=function(e,t){if(!dT.node&&t.getDom()){var n,i=e.getComponent("tooltip"),r=this._renderMode="auto"===(n=i.get("renderMode"))?dT.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===r?new OI(t):new OD(t,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!dT.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")?Ci(this,"_updatePosition",50,"fixRate"):Cr(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");A0("itemTooltip",this._api,d2(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&&!dT.node&&n.getDom()){var r=OB(i,n);this._ticket="";var o=i.dataByCoordSys,a=function(e,t,n){var i,r=mV(e).queryOptionMap,o=r.keys()[0];if(o&&"series"!==o){var a=mH(t,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(t){var n=y_(t).tooltipConfig;if(n&&n.name===e.name)return i=t,!0}),i))return{componentMainType:o,componentIndex:a.componentIndex,el:i}}}(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)OR.x=i.x,OR.y=i.y,OR.update(),y_(OR).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:OR},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 l=A4(i,t),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,target:l.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(OB(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&&"axis"===OL([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,i,r=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(r){if("legend"===y_(r).ssrType)return;this._lastDataByCoordSys=null,CN(r,function(e){return null!=y_(e).dataIndex?(n=e,!0):null!=y_(e).tooltipConfig?(i=e,!0):void 0},!0),n?this._showSeriesItemTooltip(e,n,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=d2(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=OL([t.tooltipOption],i),a=this._renderMode,s=[],l=Se("section",{blocks:[],noHeader:!0}),u=[],c=new Sl;dK(e,function(e){dK(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),r=e.value;if(t&&null!=r){var o=AG(r,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),h=Se("section",{header:o,noHeader:!pc(o),sortBlocks:!0,blocks:[]});l.blocks.push(h),dK(e.seriesDataIndices,function(l){var d=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=d.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=Ds(t.axis,{value:r}),f.axisValueLabel=o,f.marker=c.makeTooltipMarker("item",bu(f.color),a);var g=wA(d.formatTooltip(p,!0,null)),m=g.frag;if(m){var v=OL([d],i).get("valueFormatter");h.blocks.push(v?dG({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(f)}})}})}),l.blocks.reverse(),u.reverse();var h=t.position,d=Sr(l,c,a,o.get("order"),n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var p="richText"===a?"\n\n":"<br/>",f=u.join(p);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,h,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,f,s,Math.random()+"",r[0],r[1],h,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var i=this._ecModel,r=y_(t),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,c=s.getData(u),h=this._renderMode,d=e.positionDefault,p=OL([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),m=new Sl;g.marker=m.makeTooltipMarker("item",bu(g.color),h);var v=wA(s.formatTooltip(l,!1,u)),y=p.get("order"),x=p.get("valueFormatter"),b=v.frag,w=b?Sr(x?dG({valueFormatter:x},b):b,m,h,y,i.get("useUTC"),p.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,w,g,S,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=y_(t),r=i.tooltipConfig.option||{};if(d8(r)){var o=r;r={content:o,formatter:o}}var a=[r],s=this._ecModel.getComponent(i.componentMainType,i.componentIndex);s&&a.push(s),a.push({formatter:r.content});var l=e.positionDefault,u=OL(a,this._tooltipModel,l?{position:l}:null),c=u.get("content"),h=Math.random()+"",d=new Sl;this._showOrMove(u,function(){var n=dW(u.get("formatterParams")||{});this._showTooltipContent(u,c,n,h,e.offsetX,e.offsetY,e.position,t,d)}),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 h=t,d=this._getNearestPoint([r,o],n,e.get("trigger"),e.get("borderColor")).color;if(c){if(d8(c)){var p=e.ecModel.get("useUTC"),f=d3(n)?n[0]:n,g=f&&f.axisType&&f.axisType.indexOf("time")>=0;h=c,g&&(h=xK(f.axisValue,h,p)),h=bl(h,n,!0)}else if(d4(c)){var m=d2(function(t,i){t===this._ticket&&(u.setContent(i,l,e,d,a),this._updatePosition(e,a,r,o,u,n,s))},this);this._ticket=i,h=c(n,i,m)}else h=c}u.setContent(h,l,e,d,a),u.show(e,d),this._updatePosition(e,a,r,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,i){return"axis"===n||d3(t)?{color:i||("html"===this._renderMode?"#fff":"none")}:d3(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"),h=e.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),d4(t)&&(t=t([n,i],o,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),d3(t))n=mc(t[0],s),i=mc(t[1],l);else if(d7(t)){var p=t;p.width=u[0],p.height=u[1];var f=bf(p,{width:s,height:l});n=f.x,i=f.y,c=null,h=null}else if(d8(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,d,u,e.get("borderWidth"));n=g[0],i=g[1]}else{var m,v,y,x,b,w,S,_,C,M,g=(m=n,v=i,y=r,x=s,b=l,w=c?null:20,S=h?null:20,C=(_=y.getSize())[0],M=_[1],null!=w&&(m+C+w+2>x?m-=C+w:m+=w),null!=S&&(v+M+S>b?v-=M+S:v+=S),[m,v]);n=g[0],i=g[1]}if(c&&(n-=ON(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=ON(h)?u[1]/2:"bottom"===h?u[1]:0),Ox(e)){var k,T,D,I,A,P,O,R,g=(k=n,T=i,D=r,I=s,A=l,O=(P=D.getSize())[0],R=P[1],k=Math.min(k+O,I)-O,T=Math.min(T+R,A)-R,[k=Math.max(k,0),T=Math.max(T,0)]);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&&dK(n,function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&dK(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)&&dK(a,function(e,t){var n=l[t];r=r&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),i&&dK(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){!dT.node&&t.getDom()&&(Cr(this,"_updatePosition"),this._tooltipContent.dispose(),A5("itemTooltip",t))},t.type="tooltip",t}(Sx);function OL(e,t,n){var i,r=t.ecModel;n?(i=new xB(n,r,r),i=new xB(t.option,i,r)):i=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof xB&&(a=a.get("tooltip",!0)),d8(a)&&(a={formatter:a}),a&&(i=new xB(a,i,r)))}return i}function OB(e,t){return e.dispatchAction||d2(t.dispatchAction,t)}function ON(e){return"center"===e||"middle"===e}var OF={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]}};let Oz={get:function(e,t,n){var i=dW((OF[e]||{})[t]);return n&&d3(i)?i[i.length-1]:i}};var OV=function(){function e(t){var n,i,r=t.mappingMethod,o=t.type,a=this.option=dW(t);this.type=o,this.mappingMethod=r,this._normalizeData=OX[r];var s=e.visualHandlers[o];this.applyVisual=s.applyVisual,this.getColorMapper=s.getColorMapper,this._normalizedToVisual=s._normalizedToVisual[r],"piecewise"===r?(OZ(a),i=(n=a).pieceList,n.hasSpecialVisual=!1,dK(i,function(e,t){e.originIndex=t,null!=e.visual&&(n.hasSpecialVisual=!0)})):"category"===r?a.categories?function(e){var t=e.categories,n=e.categoryMap={},i=e.visual;if(dK(t,function(e,t){n[e]=t}),!d3(i)){var r=[];d7(i)?dK(i,function(e,t){var i=n[t];r[null!=i?i:-1]=e}):r[-1]=i,i=OY(e,r)}for(var o=t.length-1;o>=0;o--)null==i[o]&&(delete n[t[o]],t.pop())}(a):OZ(a,!0):(pu("linear"!==r||a.dataExtent),OZ(a))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return d2(this._normalizeData,this)},e.listVisualTypes=function(){return d1(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){d7(e)?dK(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,i){var r,o=d3(t)?[]:d7(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&&dK(e.visualHandlers,function(e,r){t.hasOwnProperty(r)&&(i[r]=t[r],n=!0)}),n?i:null},e.prepareVisualTypes=function(e){if(d3(e))e=e.slice();else{if(!d7(e))return[];var t=[];dK(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||d8(s)&&s===e+"")return o;n&&_(s,o)}}for(var o=0,a=t.length;o<a;o++){var l,u,c,h,d,p,f,g,m,v,y,x,b=t[o],w=b.interval,S=b.close;if(w){if(w[0]===-1/0){if(l=S[1],u=e,c=w[1],l?u<=c:u<c)return o}else if(w[1]===1/0){if(h=S[0],d=w[0],p=e,h?d<=p:d<p)return o}else{if(f=S[0],g=w[0],m=e,(f?g<=m:g<m)&&(v=S[1],y=e,x=w[1],v?y<=x:y<x))return o}n&&_(w[0],o),n&&_(w[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function _(t,n){var o=Math.abs(t-e);o<r&&(r=o,i=n)}},e.visualHandlers={color:{applyVisual:OW("color"),getColorMapper:function(){var e=this.option;return d2("category"===e.mappingMethod?function(e,t){return t||(e=this._normalizeData(e)),O$.call(this,e)}:function(t,n,i){var r=!!i;return n||(t=this._normalizeData(t)),i=go(t,e.parsedVisual,i),r?i:gl(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return gl(go(e,this.option.parsedVisual),"rgba")},category:O$,piecewise:function(e,t){var n=Oq.call(this,t);return null==n&&(n=gl(go(e,this.option.parsedVisual),"rgba")),n},fixed:OG}},colorHue:Oj(function(e,t){return ga(e,t)}),colorSaturation:Oj(function(e,t){return ga(e,null,t)}),colorLightness:Oj(function(e,t){return ga(e,null,null,t)}),colorAlpha:Oj(function(e,t){return gs(e,t)}),decal:{applyVisual:OW("decal"),_normalizedToVisual:{linear:null,category:O$,piecewise:null,fixed:null}},opacity:{applyVisual:OW("opacity"),_normalizedToVisual:OU([0,1])},liftZ:{applyVisual:OW("liftZ"),_normalizedToVisual:{linear:OG,category:OG,piecewise:OG,fixed:OG}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:OH,category:O$,piecewise:function(e,t){var n=Oq.call(this,t);return null==n&&(n=OH.call(this,e)),n},fixed:OG}},symbolSize:{applyVisual:OW("symbolSize"),_normalizedToVisual:OU([0,1])}},e}();function OZ(e,t){var n=e.visual,i=[];d7(n)?dK(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]),OY(e,i)}function Oj(e){return{applyVisual:function(t,n,i){var r=this.mapValueToVisual(t);i("color",e(n("color"),r))},_normalizedToVisual:OU([0,1])}}function OH(e){var t=this.option.visual;return t[Math.round(mu(e,[0,1],[0,t.length-1],!0))]||{}}function OW(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function O$(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function OG(){return this.option.visual[0]}function OU(e){return{linear:function(t){return mu(t,e,this.option.visual,!0)},category:O$,piecewise:function(t,n){var i=Oq.call(this,n);return null==i&&(i=mu(t,e,this.option.visual,!0)),i},fixed:OG}}function Oq(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=OV.findPieceIndex(e,n),r=n[i];if(r&&r.visual)return r.visual[this.type]}}function OY(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=dQ(t,function(e){return gn(e)||[0,0,0,1]})),t}var OX={linear:function(e){return mu(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=OV.findPieceIndex(e,t,!0);if(null!=n)return mu(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:px};function OK(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function OQ(e,t,n){var i={};return dK(t,function(t){var r,o=i[t]=((r=function(){}).prototype.__hidden=r.prototype,new r);dK(e[t],function(e,i){if(OV.isValidType(i)){var r={type:i,visual:e};n&&n(r,t),o[i]=new OV(r),"opacity"===i&&((r=dW(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new OV(r))}})}),i}var OJ=OV.mapVisual,O0=OV.eachVisual,O1=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 dM(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n,i,r=this.option;t||(dK(n=this.replacableOptionKeys,function(t){e.hasOwnProperty(t)&&OK(e[t])&&(i=!0)}),i&&dK(n,function(t){e.hasOwnProperty(t)&&OK(e[t])?r[t]=dW(e[t]):delete r[t]})),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=d2(e,this),this.controllerVisuals=OQ(this.option.controller,t,e),this.targetVisuals=OQ(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=mT(e),t},t.prototype.eachTargetSeries=function(e,t){dK(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||["<",">"],d3(e)&&(e=e.slice(),i=!0);var l=t?e:i?[u(e[0]),u(e[1])]:u(e);if(d8(s))return s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l);if(d4(s))return i?s(e[0],e[1]):s(e);if(!i)return l;return e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1];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=md([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={});d$(i,n),d$(r,n);var o=this.isCategory();function a(n){d3(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]={},dK(i,function(e,t){if(OV.isValidType(t)){var n=Oz.get(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";dK(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&&dW(t)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&dW(n)||(o?s[0]:[s[0],s[0]])),l.symbol=OJ(l.symbol,function(e){return"none"===e?r:e});var u=l.symbolSize;if(null!=u){var c=-1/0;O0(u,function(e){e>c&&(c=e)}),l.symbolSize=OJ(u,function(e){return mu(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}(bb),O2=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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]=20),(null==t[1]||isNaN(t[1]))&&(t[1]=140)},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):d3(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),dK(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=md((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=O5(this,"outOfRange",this.getExtent()),n=O5(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(var 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=xz(O1.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}(O1);function O5(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 O3=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 dM(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,i){if(this.visualMapModel=e,!1===e.get("show")){this.group.removeAll();return}this.doRender(e,t,n,i)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=pl(t.get("padding")||0),i=e.getBoundingRect();e.add(new yl({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 dK(OV.prepareVisualTypes(u),function(i){var r=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",r=u.__alphaForOpacity),OV.dependsOn(i,t)&&r&&r.applyVisual(e,s,l)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;bg(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,i){},t.type="visualMap",t}(Sx),O4=[["left","right","width"],["top","bottom","height"]];function O8(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),s=O4[a],l=[0,null,10],u={},c=0;c<3;c++)u[O4[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:i[s[c]];var h=[["x","width",3],["y","height",0]][a],d=bf(u,o,i.padding);return s[(d.margin[h[2]]||0)+d[h[0]]+.5*d[h[1]]<.5*o[h[1]]?0:1]}function O6(e,t){return dK(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var O9=Math.min,O7=Math.max,Re=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 dM(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=d2(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=d2(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,h=this.visualMapModel.textStyleModel;this.group.add(new yS({style:xy(h,{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=O8(t,this.api,i),s=n.mainGroup=this._createBarGroup(a),l=new mr;s.add(l),l.add(n.outOfRange=Rt()),l.add(n.inRange=Rt(null,o?Ri(this._orient):null,d2(this._dragHandle,this,"all",!1),d2(this._dragHandle,this,"all",!0))),l.setClipPath(new yl({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=O7(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=d2(this._dragHandle,this,n,!1),s=d2(this._dragHandle,this,n,!0),l=g5(e.get("handleSize"),i[0]),u=CY(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=Ri(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){p1(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(),y7(u,!0),t.add(u);var h=new yS({cursor:c,draggable:!0,drift:a,onmousemove:function(e){p1(e.event)},ondragend:s,style:xy(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});h.ensureState("blur").style={opacity:.1},h.stateTransition={duration:200},this.group.add(h);var d=[l,0],p=this._shapes;p.handleThumbs[n]=u,p.handleLabelPoints[n]=d,p.handleLabels[n]=h},t.prototype._createIndicator=function(e,t,n,i,r){var o=g5(e.get("indicatorSize"),n[0]),a=CY(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 ye){var l=a.style;a.useStyle(dG({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=new yS({silent:!0,invisible:!0,style:xy(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});this.group.add(u);var c=[("horizontal"===r?i/2:6)+n[0]/2,0],h=this._shapes;h.indicator=a,h.indicatorLabel=u,h.indicatorLabelPoint=c,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()}!this.visualMapModel.get("realtime")===t&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?this._hovering||this._clearHoverLinkToSeries():Rn(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=[mu(t[0],n,i,!0),mu(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]];I4(t,i,r,e,0);var o=n.getExtent();this._dataInterval=[mu(i[0],r,o,!0),mu(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 _y(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 mr("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();dK([0,1],function(l){var u=r[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=mu(e[l],[0,a[1]],s,!0),h=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=h/a[0],u.x=a[0]-h/2;var d=_W(n.handleLabelPoints[l],_H(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[l]),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}),h=this.getControllerVisual(e,"symbolSize"),d=mu(e,o,s,!0),p=a[0]-h/2,f={x:u.x,y:u.y};u.y=d,u.x=p;var g=_W(l.indicatorLabelPoint,_H(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:d,style:{fill:c}},b={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,w),m.animateTo(b,w)}else u.attr(x),m.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var _=0;_<S.length;_++)this.api.enterBlur(S[_])}},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]=O9(O7(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,o,a,s,l,u=[0,i[1]],c=n.getExtent();e=O9(O7(u[0],e),u[1]);var h=(r=n,o=c,a=u,s=6,(l=r.get("hoverLinkDataSize"))&&(s=mu(l,o,a,!0)/2),s),d=[e-h,e+h],p=mu(e,u,c,!0),f=[mu(d[0],u,c,!0),mu(d[1],u,c,!0)];d[0]<u[0]&&(f[0]=-1/0),d[1]>u[1]&&(f[1]=1/0),t&&(f[0]===-1/0?this._showIndicator(p,f[1],"< ",h):f[1]===1/0?this._showIndicator(p,f[0],"> ",h):this._showIndicator(p,p,"≈ ",h));var g=this._hoverLinkDataIndices,m=[];(t||Rn(n))&&(m=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var v=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=mR(e[i].seriesId,null);if(null==o)return;for(var a=mT(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}}(g,m);this._dispatchHighDown("downplay",O6(v[0],n)),this._dispatchHighDown("highlight",O6(v[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){if(CN(e.target,function(e){var n=y_(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var t,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",O6(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=_H(t,i?null:this.group);return d3(e)?_W(e,r,n):_$(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}(O3);function Rt(e,t,n,i){return new _e({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){p1(e.event)},ondragend:i})}function Rn(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function Ri(e){return"vertical"===e?"ns-resize":"ew-resize"}var Rr={type:"selectDataRange",event:"dataRangeSelected",update:"update"},Ro=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},Ra=[{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=d2(t.getValueState,t),a=t.getDataDimensionIndex(e.getData()),s={},dK(i,function(e){var t=OV.prepareVisualTypes(r[e]);s[e]=t}),{progress:function(e,t){function n(e){return CE(t,u,e)}function i(e,n){!function(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)}}(t,u,e,n)}null!=a&&(l=t.getDimensionIndex(a));for(var l,u,c=t.getStore();null!=(u=e.next());){var h=t.getRawDataItem(u);if(!h||!1!==h.visualMap)for(var d=null!=a?c.get(l,u):u,p=o(d),f=r[p],g=s[p],m=0,v=g.length;m<v;m++){var y=g[m];f[y]&&f[y].applyVisual(d,n,i)}}}}))}),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(d2(Rs,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(r.dimension=o,i.push(r))}}),e.getData().setVisual("visualMeta",i)}}];function Rs(e,t,n,i){for(var r=t.targetVisuals[i],o=OV.prepareVisualTypes(r),a={color:CL(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,h,d)}return a.color;function h(e){return a[e]}function d(e,t){a[e]=t}}function Rl(e){var t=e&&e.visualMap;d3(t)||(t=t?[t]:[]),dK(t,function(e){if(e){Ru(e,"splitList")&&!Ru(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&d3(t)&&dK(t,function(e){d7(e)&&(Ru(e,"start")&&!Ru(e,"min")&&(e.min=e.start),Ru(e,"end")&&!Ru(e,"max")&&(e.max=e.end))})}})}function Ru(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var Rc=!1;function Rh(e){!Rc&&(Rc=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(Rr,Ro),dK(Ra,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(Rl))}function Rd(e){e.registerComponentModel(O2),e.registerComponentView(Re),Rh(e)}var Rp=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return dM(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],Rf[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=dW(r)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=dQ(this._pieceList,function(e){return e=dW(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},i=OV.listVisualTypes(),r=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}dK(t.pieces,function(e){dK(i,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),dK(n,function(e,n){var i=!1;dK(this.stateList,function(e){i=i||o(t,e,n)||o(t.target,e,n)},this),i||dK(this.stateList,function(e){(t[e]||(t[e]={}))[n]=Oz.get(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,dK(i,function(e,t){var n=this.getSelectedMapKey(e);r.hasOwnProperty(n)||(r[n]=!0)},this),"single"===n.selectedMode){var o=!1;dK(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=dW(e)},t.prototype.getValueState=function(e){var t=OV.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){OV.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 dK(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=xz(O1.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}(O1),Rf={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]}),mw(e),dK(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;dK(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),Rg(t,e)},pieces:function(e){var t=this.option;dK(t.pieces,function(t,n){d7(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 h=[["gte","gt","min"],["lte","lt","max"]][c],d=0;d<3&&null==o[c];d++)o[c]=t[h[d]],a[c]=s[d],u[c]=2===d;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),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=OV.retrieveVisuals(t),e.push(i)},this),Rg(t,e),mw(e),dK(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 Rg(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var Rm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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=pr(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),dK(l.viewPieceList,function(i){var l=i.piece,u=new mr;u.onclick=d2(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]]),c){var d=this.visualMapModel.getValueState(h);u.add(new yS({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"===d?.5:1}}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],s,c,a),bp(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:O6(i.findTargetDataIndices(t),i)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return O8(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 mr,a=this.visualMapModel.textStyleModel;o.add(new yS({style:xy(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=dQ(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){e.add(CY(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,i=n.selectedMode;if(i){var r=dW(n.selected),o=t.getSelectedMapKey(e);"single"===i||!0===i?(r[o]=!0,dK(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}(O3);function Rv(e){e.registerComponentModel(Rp),e.registerComponentView(Rm),Rh(e)}function Ry(e,t){if(!e)return!1;for(var n=d3(e)?e:[e],i=0;i<n.length;i++)if(n[i]&&n[i][t])return!0;return!1}function Rx(e){mD(e,"label",["show"])}var Rb=mN(),Rw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return dM(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(dT.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=Rb(e)[r];if(!n||!n.data){Rb(e)[r]=null;return}o?o._mergeOption(n,t,!0):(i&&Rx(n),dK(n.data,function(e){e instanceof Array?(Rx(e[0]),Rx(e[1])):Rx(e)}),dG(o=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),Rb(e)[r]=o},this)},t.prototype.formatTooltip=function(e,t,n){var i=this.getData(),r=this.getRawValue(e),o=i.getName(e);return Se("section",{header:this.name,blocks:[Se("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.getMarkerModelFromSeries=function(e,t){return Rb(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(bb);dY(Rw,wI.prototype);var RS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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}(Rw);function R_(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function RC(e,t,n,i,r,o){var a=[],s=kh(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=RA(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),h=mp(t.get(i,u));return(h=Math.min(h,20))>=0&&(a[o]=+a[o].toFixed(h)),[a,c]}var RM={min:d5(RC,"min"),max:d5(RC,"max"),average:d5(RC,"average"),median:d5(RC,"median")};function Rk(e,t){if(t){var n,i=e.getData(),r=e.coordinateSystem,o=r&&r.dimensions;if(!(!isNaN(parseFloat((n=t).x))&&!isNaN(parseFloat(n.y)))&&!d3(t.coord)&&d3(o)){var a=RT(t,i,r,e);if((t=dW(t)).type&&RM[t.type]&&a.baseAxis&&a.valueAxis){var s=dq(o,a.baseAxis.dim),l=dq(o,a.valueAxis.dim),u=RM[t.type](i,a.baseDataDim,a.valueDataDim,s,l);t.coord=u[0],t.value=u[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&d3(o))for(var c=t.coord,h=0;h<2;h++)RM[c[h]]&&(c[h]=RA(i,i.mapDimension(o[h]),c[h]));else t.coord=[];return t}}function RT(e,t,n,i){var r,o,a,s={};return null!=e.valueIndex||null!=e.valueDim?(s.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,s.valueAxis=n.getAxis((r=i,o=s.valueDataDim,(a=r.getData().getDimensionInfo(o))&&a.coordDim)),s.baseAxis=n.getOtherAxis(s.valueAxis),s.baseDataDim=t.mapDimension(s.baseAxis.dim)):(s.baseAxis=i.getBaseAxis(),s.valueAxis=n.getOtherAxis(s.baseAxis),s.baseDataDim=t.mapDimension(s.baseAxis.dim),s.valueDataDim=t.mapDimension(s.valueAxis.dim)),s}function RD(e,t){return!e||!e.containData||!t.coord||!!R_(t)||e.containData(t.coord)}function RI(e,t){return e?function(e,n,i,r){return wB(r<2?e.coord&&e.coord[r]:e.value,t[r])}:function(e,n,i,r){return wB(e.value,t[r])}}function RA(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)]}var RP=mN(),RO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.init=function(){this.markerGroupMap=pg()},t.prototype.render=function(e,t,n){var i=this,r=this.markerGroupMap;r.each(function(e){RP(e).keep=!1}),t.eachSeries(function(e){var r=Rw.getMarkerModelFromSeries(e,i.type);r&&i.renderSeries(e,r,t,n)}),r.each(function(e){RP(e).keep||i.group.remove(e.group)})},t.prototype.markKeep=function(e){RP(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;dK(e,function(e){var i=Rw.getMarkerModelFromSeries(e,n.type);i&&i.getData().eachItemGraphicEl(function(e){e&&(t?yW(e,yV):yW(e,yZ))})})},t.type="marker",t}(Sx),RR=mN(),RE=function(e,t,n,i){var r=i[0],o=i[1];if(r&&o){var a=Rk(e,r),s=Rk(e,o),l=a.coord,u=s.coord;l[0]=pr(l[0],-1/0),l[1]=pr(l[1],-1/0),u[0]=pr(u[0],1/0),u[1]=pr(u[1],1/0);var c=function(e,t){for(var n=e[0],i=1,r=e.length;i<r;i++)n=d$(n,e[i],void 0);return n}([{},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 RL(e){return!isNaN(e)&&!isFinite(e)}function RB(e,t,n,i){var r=1-e;return RL(t[r])&&RL(n[r])}function RN(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};if(kN(e,"cartesian2d"))return!!(n&&i&&(RB(1,n,i,e)||RB(0,n,i,e)))||!e||!e.containZone||!r.coord||!o.coord||!!R_(r)||!!R_(o)||e.containZone(r.coord,o.coord);return RD(e,r)||RD(e,o)}function RF(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=mc(s.get(n[0]),r.getWidth()),u=mc(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var c=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),d=a.clampData(c),p=a.clampData(h),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?h[0]:c[0]:f[0]=d[0]>p[0]?c[0]:h[0],"y0"===n[1]?f[1]=d[1]>p[1]?h[1]:c[1]:f[1]=d[1]>p[1]?c[1]:h[1],o=i.getMarkerPosition(f,n,!0)}else{var g=e.get(n[0],t),m=e.get(n[1],t),v=[g,m];a.clampData&&a.clampData(v,v),o=a.dataToPoint(v,!0)}if(kN(a,"cartesian2d")){var y=a.getAxis("x"),x=a.getAxis("y"),g=e.get(n[0],t),m=e.get(n[1],t);RL(g)?o[0]=y.toGlobalCoord(y.getExtent()[+("x0"!==n[0])]):RL(m)&&(o[1]=x.toGlobalCoord(x.getExtent()[+("y0"!==n[1])]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Rz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],RV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Rw.getMarkerModelFromSeries(e,"markArea");if(t){var i=t.getData();i.each(function(t){var r=dQ(Rz,function(r){return RF(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 mr});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){if(e){var i,r,o=dQ(e&&e.dimensions,function(e){var n=t.getData();return dG(dG({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=new ka(r=dQ(["x0","y0","x1","y1"],function(e,t){return{name:e,type:o[t%2].type}}),n)}else i=new ka(r=[{name:"value",type:"float"}],n);var a=dQ(n.get("data"),d5(RE,t,e,n));e&&(a=d0(a,d5(RN,e)));var s=e?function(e,t,n,i){return wB(e.coord[Math.floor(i/2)][i%2],r[i])}:function(e,t,n,i){return wB(e.value,r[i])};return i.initData(a,null,s),i.hasItemOption=!0,i}(r,e,t);t.setData(u),u.each(function(t){var n=dQ(Rz,function(n){return RF(u,t,n,e,i)}),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),c=s.getExtent(),h=[o.parse(u.get("x0",t)),o.parse(u.get("x1",t))],d=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];md(h),md(d);var p=!(l[0]>h[1]||l[1]<h[0]||c[0]>d[1]||c[1]<d[0]);u.setItemLayout(t,{points:n,allClipped:!p});var f=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=CL(a,"color");!f.fill&&(f.fill=g,d8(f.fill)&&(f.fill=gs(f.fill,.4))),f.stroke||(f.stroke=g),u.setItemVisual(t,"style",f)}),u.diff(RR(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new _e({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var i=RR(l).data.getItemGraphicEl(n),r=u.getItemLayout(e);r.allClipped?i&&l.group.remove(i):(i?xa(i,{shape:{points:r.points}},t,e):i=new _e({shape:{points:r.points}}),u.setItemGraphicEl(e,i),l.group.add(i))}).remove(function(e){var t=RR(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")),xm(e,xv(i),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:d8(r.fill)?gs(r.fill,1):"#000"}),y9(e,i),y4(e,null,null,i.get(["emphasis","disabled"])),y_(e).dataModel=t}),RR(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(RO),RZ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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}(Rw),Rj=_s.prototype,RH=_d.prototype,RW=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function R$(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}dM(function(){return null!==O&&O.apply(this,arguments)||this},O=RW);var RG=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return dM(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new RW},t.prototype.buildPath=function(e,t){R$(t)?Rj.buildPath.call(this,e,t):RH.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return R$(this.shape)?Rj.pointAt.call(this,e):RH.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=R$(t)?[t.x2-t.x1,t.y2-t.y1]:RH.tangentAt.call(this,e);return pT(n,n)},t}(v3),RU=["fromSymbol","toSymbol"];function Rq(e){return"_"+e+"Type"}function RY(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=CX(r),u=CK(a||0,l);return i+l+u+(o||"")+(s||"")}function RX(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=CX(r),u=CK(a||0,l),c=CY(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 RK(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 RQ=function(e){function t(t,n,i){var r=e.call(this)||this;return r._createLine(t,n,i),r}return dM(t,e),t.prototype._createLine=function(e,t,n){var i,r,o=e.hostModel,a=(i=e.getItemLayout(t),RK((r=new RG({name:"line",subPixelOptimize:!0})).shape,i),r);a.shape.percent=0,xs(a,{shape:{percent:1}},o,t),this.add(a),dK(RU,function(n){var i=RX(n,e,t);this.add(i),this[Rq(n)]=RY(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:{}};RK(a.shape,o),xa(r,a,i,t),dK(RU,function(n){var i=RY(n,e,t),r=Rq(n);if(this[r]!==i){this.remove(this.childOfName(n));var o=RX(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,h=n&&n.blurScope;if(!n||e.hasItemOption){var d=e.getItemModel(t),p=d.getModel("emphasis");o=p.getModel("lineStyle").getLineStyle(),a=d.getModel(["blur","lineStyle"]).getLineStyle(),s=d.getModel(["select","lineStyle"]).getLineStyle(),u=p.get("disabled"),c=p.get("focus"),h=p.get("blurScope"),l=xv(d)}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,dK(RU,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=f.opacity;for(var n=0;n<yI.length;n++){var i=yI[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);xm(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)?mh(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");d3(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),y4(this,c,h,u)},t.prototype.highlight=function(){yX(this)},t.prototype.downplay=function(){yK(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");RK(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),n=this.getTextContent();if(e||t||n&&!n.ignore){for(var i=1,r=this.parent;r;)r.scaleX&&(i/=r.scaleX),r=r.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var a=o.shape.percent,s=o.pointAt(0),l=o.pointAt(a),u=pM([],l,s);if(pT(u,u),e&&(e.setPosition(s),S(e,0),e.scaleX=e.scaleY=i*a,e.markRedraw()),t&&(t.setPosition(l),S(t,1),t.scaleX=t.scaleY=i*a,t.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var c=void 0,h=void 0,d=n.__labelDistance,p=d[0]*i,f=d[1]*i,g=a/2,m=o.tangentAt(g),v=[m[1],-m[0]],y=o.pointAt(g);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var x=m[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var b=-Math.atan2(m[1],m[0]);l[0]<s[0]&&(b=Math.PI+b),n.rotation=b}var w=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-f,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=f,h="top";break;default:w=0,h="middle"}switch(n.__position){case"end":n.x=u[0]*p+l[0],n.y=u[1]*f+l[1],c=u[0]>.8?"left":u[0]<-.8?"right":"center",h=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*p+s[0],n.y=-u[1]*f+s[1],c=u[0]>.8?"right":u[0]<-.8?"left":"center",h=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*x+s[0],n.y=s[1]+w,c=m[0]<0?"right":"left",n.originX=-p*x,n.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=y[0],n.y=y[1]+w,c="center",n.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*x+l[0],n.y=l[1]+w,c=m[0]>=0?"right":"left",n.originX=p*x,n.originY=-w}n.scaleX=n.scaleY=i,n.setStyle({verticalAlign:n.__verticalAlign||h,align:n.__align||c})}}}function S(e,t){var n=e.__specifiedRotation;if(null==n){var i=o.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else e.attr("rotation",n)}},t}(mr),RJ=function(){function e(e){this.group=new mr,this._LineCtor=e||RQ}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this.group,i=this._lineData;this._lineData=e,i||n.removeAll();var r=R0(e);e.diff(i).add(function(n){t._doAdd(e,n,r)}).update(function(n,o){t._doUpdate(i,e,o,n,r)}).remove(function(e){n.remove(i.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=R0(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){var t;e.isGroup||(t=e).animators&&t.animators.length>0||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=e.start;i<e.end;i++)if(R2(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){_0(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(R2(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);if(!R2(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,r):o=new this._LineCtor(t,i,r),t.setItemGraphicEl(i,o),this.group.add(o)},e}();function R0(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:xv(t)}}function R1(e){return isNaN(e[0])||isNaN(e[1])}function R2(e){return e&&!R1(e[0])&&!R1(e[1])}var R5=mN(),R3=function(e,t,n,i){var r,o=e.getData();if(d3(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=pr(i.yAxis,i.xAxis);else{var u=RT(i,o,t,e);s=u.valueAxis;var c=kd(o,u.valueDataDim);l=RA(o,c,a)}var h=+("x"!==s.dim),d=1-h,p=dW(i),f={coord:[]};p.type=null,p.coord=[],p.coord[d]=-1/0,f.coord[d]=1/0;var g=n.get("precision");g>=0&&d9(l)&&(l=+l.toFixed(Math.min(g,20))),p.coord[h]=f.coord[h]=l,r=[p,f,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var m=[Rk(e,r[0]),Rk(e,r[1]),dG({},r[2])];return m[2].type=m[2].type||null,d$(m[2],m[0]),d$(m[2],m[1]),m};function R4(e){return!isNaN(e)&&!isFinite(e)}function R8(e,t,n,i){var r=1-e,o=i.dimensions[e];return R4(t[r])&&R4(n[r])&&t[e]===n[e]&&i.getAxis(o).containData(t[e])}function R6(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(R8(1,n,i,e)||R8(0,n,i,e)))return!0}return RD(e,t[0])&&RD(e,t[1])}function R9(e,t,n,i,r){var o,a=i.coordinateSystem,s=e.getItemModel(t),l=mc(s.get("x"),r.getWidth()),u=mc(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,h=e.get(c[0],t),d=e.get(c[1],t);o=a.dataToPoint([h,d])}if(kN(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y"),c=a.dimensions;R4(e.get(c[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[+!n]):R4(e.get(c[1],t))&&(o[1]=f.toGlobalCoord(f.getExtent()[+!n]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}var R7=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Rw.getMarkerModelFromSeries(e,"markLine");if(t){var i=t.getData(),r=R5(t).from,o=R5(t).to;r.each(function(t){R9(r,t,!0,e,n),R9(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,o,a,s,l,u,c,h,d,p=e.coordinateSystem,f=e.id,g=e.getData(),m=this.markerGroupMap,v=m.get(f)||m.set(f,new RJ);this.group.add(v.group);var y=(r=p,o=e,a=t,l=new ka(s=r?dQ(r&&r.dimensions,function(e){return dG(dG({},o.getData().getDimensionInfo(o.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],a),u=new ka(s,a),c=new ka([],a),h=dQ(a.get("data"),d5(R3,o,r,a)),r&&(h=d0(h,d5(R6,r))),d=RI(!!r,s),l.initData(dQ(h,function(e){return e[0]}),null,d),u.initData(dQ(h,function(e){return e[1]}),null,d),c.initData(dQ(h,function(e){return e[2]})),c.hasItemOption=!0,{from:l,to:u,line:c}),x=y.from,b=y.to,w=y.line;R5(t).from=x,R5(t).to=b,t.setData(w);var S=t.get("symbol"),_=t.get("symbolSize"),C=t.get("symbolRotate"),M=t.get("symbolOffset");function k(t,n,r){var o=t.getItemModel(n);R9(t,n,r,e,i);var a=o.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=CL(g,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:po(o.get("symbolOffset",!0),M[+!r]),symbolRotate:po(o.get("symbolRotate",!0),C[+!r]),symbolSize:po(o.get("symbolSize"),_[+!r]),symbol:po(o.get("symbol",!0),S[+!r]),style:a})}d3(S)||(S=[S,S]),d3(_)||(_=[_,_]),d3(C)||(C=[C,C]),d3(M)||(M=[M,M]),y.from.each(function(e){k(x,e,!0),k(b,e,!1)}),w.each(function(e){var t=w.getItemModel(e).getModel("lineStyle").getLineStyle();w.setItemLayout(e,[x.getItemLayout(e),b.getItemLayout(e)]),null==t.stroke&&(t.stroke=x.getItemVisual(e,"style").fill),w.setItemVisual(e,{fromSymbolKeepAspect:x.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:x.getItemVisual(e,"symbolOffset"),fromSymbolRotate:x.getItemVisual(e,"symbolRotate"),fromSymbolSize:x.getItemVisual(e,"symbolSize"),fromSymbol:x.getItemVisual(e,"symbol"),toSymbolKeepAspect:b.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:b.getItemVisual(e,"symbolOffset"),toSymbolRotate:b.getItemVisual(e,"symbolRotate"),toSymbolSize:b.getItemVisual(e,"symbolSize"),toSymbol:b.getItemVisual(e,"symbol"),style:t})}),v.updateData(w),y.line.eachItemGraphicEl(function(e){y_(e).dataModel=t,e.traverse(function(e){y_(e).dataModel=t})}),this.markKeep(v),v.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(RO),Ee=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(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}(Rw);function Et(e,t,n){var i=t.coordinateSystem;e.each(function(r){var o,a=e.getItemModel(r),s=mc(a.get("x"),n.getWidth()),l=mc(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 En=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return dM(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Rw.getMarkerModelFromSeries(e,"markPoint");t&&(Et(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,i){var r,o,a,s,l,u,c,h=e.coordinateSystem,d=e.id,p=e.getData(),f=this.markerGroupMap,g=f.get(d)||f.set(d,new kw),m=(r=h,o=e,a=t,l=new ka(s=r?dQ(r&&r.dimensions,function(e){return dG(dG({},o.getData().getDimensionInfo(o.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],a),u=dQ(a.get("data"),d5(Rk,o)),r&&(u=d0(u,d5(RD,r))),c=RI(!!r,s),l.initData(u,null,c),l);t.setData(m),Et(t.getData(),e,i),m.each(function(e){var n=m.getItemModel(e),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),s=n.getShallow("symbolKeepAspect");if(d4(i)||d4(r)||d4(o)||d4(a)){var l=t.getRawValue(e),u=t.getDataParams(e);d4(i)&&(i=i(l,u)),d4(r)&&(r=r(l,u)),d4(o)&&(o=o(l,u)),d4(a)&&(a=a(l,u))}var c=n.getModel("itemStyle").getItemStyle(),h=CL(p,"color");c.fill||(c.fill=h),m.setItemVisual(e,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:a,symbolKeepAspect:s,style:c})}),g.updateData(m),this.group.add(g.group),m.eachItemGraphicEl(function(e){e.traverse(function(e){y_(e).dataModel=t})}),this.markKeep(g),g.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(RO);function Ei(e,t,n){var i=dA.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 Er=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||gV,"string"==typeof t?r=Ei(t,n,i):d7(t)&&(t=(r=t).id),o.id=t,o.dom=r;var a=r.style;return a&&(pv(r),r.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=i,o}return pS(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=Ei("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 fh(0,0,0,0);function u(e){if(!(!e.isFinite()||e.isZero())){if(0===o.length){var t=new fh(0,0,0,0);t.copy(e),o.push(t)}else{for(var n=!1,i=1/0,r=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var h=new fh(0,0,0,0);h.copy(c),h.union(e),o[u]=h,n=!0;break}if(s){l.copy(e),l.union(c);var d=e.width*e.height,p=c.width*c.height,f=l.width*l.height-d-p;f<i&&(i=f,r=u)}}if(s&&(o[r].union(e),n=!0),!n){var t=new fh(0,0,0,0);t.copy(e),o.push(t)}s||(s=o.length>=a)}}}for(var c=this.__startIndex;c<this.__endIndex;++c){var h=e[c];if(h){var d=h.shouldBePainted(n,i,!0,!0),p=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null;p&&u(p);var f=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;f&&u(f)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=t[c],d=h&&h.shouldBePainted(n,i,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var p=h.getPrevPaintRect();p&&u(p)}}do{r=!1;for(var c=0;c<o.length;){if(o[c].isZero()){o.splice(c,1);continue}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 h=this.domBack;function d(e,n,i,o){if(r.clearRect(e,n,i,o),t&&"transparent"!==t){var a=void 0;pi(t)?(a=(t.global||t.__width===i&&t.__height===o)&&t.__canvasGradient||CJ(r,t,{x:0,y:0,width:i,height:o}),t.__canvasGradient=a,t.__width=i,t.__height=o):null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=C7(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(h,e,n,i,o),r.restore())}!n||s?d(0,0,o,a):n.length&&dK(n,function(e){d(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(pB),Eo=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=dG({},n||{}),this.dpr=n.devicePixelRatio||gV,this._singleCanvas=r,this.root=e,e.style&&(pv(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(r){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new Er(e,this,this.dpr);u.__builtin__=!0,u.initContext(),a[314159]=u,u.zlevel=314159,o.push(314159),this._domRoot=e}else{this._width=C1(e,0,n),this._height=C1(e,1,n);var c,h,d,p=this._domRoot=(c=this._width,h=this._height,(d=document.createElement("div")).style.cssText=["position:relative","width:"+c+"px","height:"+h+"px","padding:0","margin:0","border-width:0"].join(";")+";",d);e.appendChild(p)}}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,n=e.length,i=this._hoverlayer;if(i&&i.clear(),n){for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<n;o++){var a=e[o];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(1e5)),t||(t=i.ctx).save(),Ml(t,a,r,o===n-1))}t&&t.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(1e5)},e.prototype.paintOne=function(e,t){Ms(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;ee(function(){s._paintList(e,t,n,i)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(314159).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,h=this,d=0;d<r.length;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&&(console.error("For some unknown reason. drawIndex is -1"),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&&Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(p){if(0===p.length)s=l.__endIndex;else for(var b=h.dpr,w=0;w<p.length;++w){var S=p[w];d.save(),d.beginPath(),d.rect(S.x*b,S.y*b,S.width*b,S.height*b),d.clip(),x(S),d.restore()}}else d.save(),x(),d.restore();l.__drawIndex=s,l.__drawIndex<l.__endIndex&&(u=!1)}(d);return dT.wxa&&dK(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))&&(Ml(a,e,r,o),e.setPrevPaintRect(s))}else Ml(a,e,r,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new Er("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?d$(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&d$(n,this._layerConfig[e-.01],!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]){if(t&&(t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)){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)}}},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){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1}),this._singleCanvas)for(var n,i,r=1;r<e.length;r++){var o=e[r];if(o.zlevel!==e[r-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0;for(i=0;i<e.length;i++){var o=e[i],l=o.zlevel,u=void 0;n!==l&&(n=l,s=0),o.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,s=1):u=this.getLayer(l+.01*(s>0),this._needsManuallyCompositing),u.__builtin__||dH("ZLevel "+l+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==i&&(u.__dirty=!0),u.__startIndex=i,u.incremental?u.__drawIndex=-1:u.__drawIndex=i,t(i),a=u),1&o.__dirty&&!o.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=i))}t(i),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,dK(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?d$(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(r===e||r===e+.01)&&d$(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(dq(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=C1(r,0,i),t=C1(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(314159).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 Er("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++)Ml(n,a[s],o,s===l-1);return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();MK([function(e){e.registerComponentModel(Iq),e.registerComponentView(IY)},function(e){MK(Am),MK(AC)},function(e){MK(AE),MK(AV)},function(e){e.registerChartView(kG),e.registerSeriesModel(kf),e.registerLayout(kU("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,{seriesType:"line",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(),h=Math.round(a/(Math.abs(u[1]-u[0])*(c||1)));if(isFinite(h)&&h>1){"lttb"===r&&e.setData(i.lttbDownSample(i.mapDimension(l.dim),1/h));var d=void 0;d8(r)?d=kq[r]:d4(r)&&(d=r),d&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,d,kY))}}}})},function(e){e.registerChartView(k1),e.registerSeriesModel(k5)},function(e){var t;e.registerChartView(Tg),e.registerSeriesModel(Ty),t=e.registerAction,dK([["pieToggleSelect","toggleSelect"],["pieSelect","select"],["pieUnSelect","unselect"]],function(e){t(e[0],function(t,n,i){var r,o;t=dG({},t),i.dispatchAction(dG(t,{type:e[1],seriesIndex:(r=t,o=[],n.eachComponent({mainType:"series",subType:"pie",query:r},function(e){o.push(e.seriesIndex)}),o)}))})}),e.registerLayout(d5(k9,"pie")),e.registerProcessor({seriesType:"pie",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})}}}),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!d9(i)||!!isNaN(i)||!(i<0)})}})},function(e){MK(D1),e.registerSeriesModel(Tx),e.registerChartView(T_),e.registerLayout(kU("scatter"))},function(e){e.registerChartView(II),e.registerSeriesModel(D4)},function(e){e.registerChartView(IG),e.registerSeriesModel(IU)},function(e){MK(D1),MK(Pi)},function(e){e.registerComponentModel(Pr),e.registerComponentView(Po)},function(e){e.registerComponentModel(Ph),e.registerComponentView(Pd),Pc.saveAsImage=Pp,Pc.magicType=Pm,Pc.dataView=Pw,Pc.dataZoom=Og,Pc.restore=PC,MK(Pl)},function(e){MK(Pi),e.registerComponentModel(Oy),e.registerComponentView(OE),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},px),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},px)},function(e){e.registerPainter("canvas",Eo)},function(e){MK(Rd),MK(Rv)},function(e){e.registerComponentModel(RS),e.registerComponentView(RV),e.registerPreprocessor(function(e){Ry(e.series,"markArea")&&(e.markArea=e.markArea||{})})},function(e){e.registerComponentModel(RZ),e.registerComponentView(R7),e.registerPreprocessor(function(e){Ry(e.series,"markLine")&&(e.markLine=e.markLine||{})})},function(e){e.registerComponentModel(Ee),e.registerComponentView(En),e.registerPreprocessor(function(e){Ry(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}]);let Ea=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"],Es=["datazoom","downplay","highlight"],El=(0,eV.memo)(function({option:e,theme:t,renderer:n,sx:i,style:r,onEvents:o,_instance:a,syncGroup:s,onChartInitialized:l}){let u=(0,eV.useRef)(e),c=(0,eV.useRef)(e),h=(0,eV.useRef)(null),d=(0,eV.useRef)(null);return(0,eV.useLayoutEffect)(()=>{if(null!==h.current&&null===d.current&&(d.current=function(e,t,n){var i=!(n&&n.ssr);if(i){var r=function(e){return MN[e.getAttribute?e.getAttribute(MZ):e[MZ]]}(e);if(r)return r}var o=new Mk(e,t,n);return o.id="ec_"+Mz++,MN[o.id]=o,i&&mW(e,MZ,o.id),ek(o),Mf.trigger("afterinit",o),o}(h.current,t,{renderer:n??"canvas"}),void 0!==d.current))return d.current.setOption(u.current,!0),l?.(d.current),void 0!==a&&(a.current=d.current),()=>{null!==d.current&&(d.current.dispose(),d.current=null)}},[a,l,t,n]),(0,eV.useEffect)(()=>{d.current&&s&&(d.current.group=s,function(e){if(d3(e)){var t=e;e=null,dK(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+MV++,dK(t,function(t){t.group=e})}MF[e]=!0}([d.current]))},[s,d]),(0,eV.useEffect)(()=>{!(void 0===c.current||MJ()(c.current,e))&&d.current&&(d.current.setOption(e,!0),c.current=e)},[e]),(0,eV.useLayoutEffect)(()=>{let e=ch()(()=>{d.current&&d.current.resize()},200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,eV.useEffect)(()=>{let e=d.current;if(e&&void 0!==o)return function(e,t){if(void 0!==t){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let i=t[n]??null;i&&function(t,n){var i,r;"function"==typeof n&&((i=t,Ea.includes(i))?e.on(t,t=>n(t,e)):(r=t,Es.includes(r))?e.on(t,e=>n(e)):e.on(t,()=>n(null,e)))}(n,i)}}}(e,o),()=>{if(void 0!==e&&!0!==e.isDisposed())for(let t in o)e.off(t)}},[o]),(0,eV.useEffect)(()=>{ch()(()=>{d.current&&d.current.resize()},200,{leading:!0})()},[i,r]),(0,ez.jsx)(r_.Z,{ref:h,sx:i,style:r})});function Eu(e){return(0,eQ.ZP)("MuiAlert",e)}let Ec=(0,eK.Z)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),Eh=(0,uI.Z)((0,ez.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Ed=(0,uI.Z)((0,ez.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Ep=(0,uI.Z)((0,ez.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),Ef=(0,uI.Z)((0,ez.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");var Eg=n(3049);let Em=e=>{let{variant:t,color:n,severity:i,classes:r}=e,o={root:["root",`color${(0,eG.Z)(n||i)}`,`${t}${(0,eG.Z)(n||i)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,eH.Z)(o,Eu,r)},Ev=(0,eU.ZP)(ck.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,eG.Z)(n.color||n.severity)}`]]}})((0,eq.Z)(({theme:e})=>{let t="light"===e.palette.mode?eW._j:eW.$n,n="light"===e.palette.mode?eW.$n:eW._j;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,eY.Z)(["light"])).map(([i])=>({props:{colorSeverity:i,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${i}Color`]:t(e.palette[i].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${i}StandardBg`]:n(e.palette[i].light,.9),[`& .${Ec.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:e.palette[i].main}}})),...Object.entries(e.palette).filter((0,eY.Z)(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${Ec.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter((0,eY.Z)(["dark"])).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),Ey=(0,eU.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Ex=(0,eU.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Eb=(0,eU.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Ew={success:(0,ez.jsx)(Eh,{fontSize:"inherit"}),warning:(0,ez.jsx)(Ed,{fontSize:"inherit"}),error:(0,ez.jsx)(Ep,{fontSize:"inherit"}),info:(0,ez.jsx)(Ef,{fontSize:"inherit"})},ES=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiAlert"}),{action:i,children:r,className:o,closeText:a="Close",color:s,components:l={},componentsProps:u={},icon:c,iconMapping:h=Ew,onClose:d,role:p="alert",severity:f="success",slotProps:g={},slots:m={},variant:v="standard",...y}=n,x={...n,color:s,severity:f,variant:v,colorSeverity:s||f},b=Em(x),w={slots:{closeButton:l.CloseButton,closeIcon:l.CloseIcon,...m},slotProps:{...u,...g}},[S,_]=(0,uR.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,ej.Z)(b.root,o),elementType:Ev,externalForwardedProps:{...w,...y},ownerState:x,additionalProps:{role:p,elevation:0}}),[C,M]=(0,uR.Z)("icon",{className:b.icon,elementType:Ey,externalForwardedProps:w,ownerState:x}),[k,T]=(0,uR.Z)("message",{className:b.message,elementType:Ex,externalForwardedProps:w,ownerState:x}),[D,I]=(0,uR.Z)("action",{className:b.action,elementType:Eb,externalForwardedProps:w,ownerState:x}),[A,P]=(0,uR.Z)("closeButton",{elementType:td.Z,externalForwardedProps:w,ownerState:x}),[O,R]=(0,uR.Z)("closeIcon",{elementType:Eg.Z,externalForwardedProps:w,ownerState:x});return(0,ez.jsxs)(S,{..._,children:[!1!==c?(0,ez.jsx)(C,{...M,children:c||h[f]||Ew[f]}):null,(0,ez.jsx)(k,{...T,children:r}),null!=i?(0,ez.jsx)(D,{...I,children:i}):null,null==i&&d?(0,ez.jsx)(D,{...I,children:(0,ez.jsx)(A,{size:"small","aria-label":a,title:a,color:"inherit",onClick:d,...P,children:(0,ez.jsx)(O,{fontSize:"small",...R})})}):null]})});function E_(e){let{error:t}=e;return(0,ez.jsx)(ES,{severity:"error",children:t.message})}var EC=n(8715);let EM=[{id:"default",label:"Default",value:void 0},{id:"12",label:"12",value:12},{id:"14",label:"14",value:14},{id:"16",label:"16",value:16},{id:"20",label:"20",value:20},{id:"24",label:"24",value:24},{id:"28",label:"28",value:28},{id:"32",label:"32",value:32},{id:"36",label:"36",value:36},{id:"40",label:"40",value:40},{id:"48",label:"48",value:48},{id:"56",label:"56",value:56},{id:"64",label:"64",value:64},{id:"72",label:"72",value:72},{id:"96",label:"96",value:96},{id:"128",label:"128",value:128},{id:"160",label:"160",value:160},{id:"192",label:"192",value:192}];function Ek({value:e,onChange:t}){return(0,ez.jsx)(c9,{label:"Font Size",control:(0,ez.jsx)(hi,{value:EM.find(t=>t.value===e),options:EM,getOptionLabel:e=>e.label,onChange:(e,{value:n})=>{t(n)},disableClearable:!0})})}var ET=n(9119);function ED({action:e,submitText:t="Save",cancelText:n="Cancel",isReadonly:i,isValid:r,onActionChange:o,onSubmit:a,onDelete:s,onCancel:l,...u}){return(0,ez.jsx)(th,{direction:"row",gap:1,sx:{marginLeft:"auto"},...u,children:"read"===e?(0,ez.jsxs)(ez.Fragment,{children:[o&&(0,ez.jsx)(e8.Z,{disabled:i,variant:"contained",onClick:()=>o("update"),children:"Edit"}),s&&(0,ez.jsx)(e8.Z,{color:"error",disabled:i,variant:"outlined",onClick:s,children:"Delete"}),l&&(a||s)&&(0,ez.jsx)(ET.Z,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey["500"],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),l&&(0,ez.jsx)(e8.Z,{color:"secondary",variant:"outlined",onClick:l,children:n})]}):(0,ez.jsxs)(ez.Fragment,{children:[a&&(0,ez.jsx)(e8.Z,{variant:"contained",disabled:!r,onClick:a,children:t}),l&&(0,ez.jsx)(e8.Z,{color:"secondary",variant:"outlined",onClick:l,children:n})]})})}var EI=n(252),EA=n(7784);let EP=[],EO=[];function ER(e){return e>=127462&&e<=127487}function EE(e,t,n){if(t==e.length)return t;t&&EB(e.charCodeAt(t))&&EN(e.charCodeAt(t-1))&&t--;let i=EL(e,t);for(t+=EF(i);t<e.length;){let r=EL(e,t);if(8205==i||8205==r||n&&function(e){if(e<768)return!1;for(let t=0,n=EP.length;;){let i=t+n>>1;if(e<EP[i])n=i;else{if(!(e>=EO[i]))return!0;t=i+1}if(t==n)return!1}}(r))t+=EF(r),i=r;else if(ER(r)){let n=0,i=t-2;for(;i>=0&&ER(EL(e,i));)n++,i-=2;if(n%2==0)break;t+=2}else break}return t}function EL(e,t){let n=e.charCodeAt(t);if(!EN(n)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return EB(i)?(n-55296<<10)+(i-56320)+65536:n}function EB(e){return e>=56320&&e<57344}function EN(e){return e>=55296&&e<56320}function EF(e){return e<65536?1:2}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?EO:EP).push(n+=e[t])})();class Ez{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=EU(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),EZ.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=EU(this,e,t);let n=[];return this.decompose(e,t,n,0),EZ.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new EH(this),r=new EH(e);for(let e=t,o=t;;){if(i.next(e),r.next(e),e=0,i.lineBreak!=r.lineBreak||i.done!=r.done||i.value!=r.value)return!1;if(o+=i.value.length,i.done||o>=n)return!0}}iter(e=1){return new EH(this,e)}iterRange(e,t=this.length){return new EW(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new E$(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new EV(e):EZ.from(EV.split(e,[])):Ez.empty}}class EV extends Ez{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let r=0;;r++){let o=this.text[r],a=i+o.length;if((t?n:a)>=e)return new EG(i,a,n,o);i=a+1,n++}}decompose(e,t,n,i){var r;let o=e<=0&&t>=this.length?this:new EV((r=this.text,Ej(r,[""],e,t)),Math.min(t,this.length)-Math.max(0,e));if(1&i){let e=n.pop(),t=Ej(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new EV(t,e.length+o.length));else{let e=t.length>>1;n.push(new EV(t.slice(0,e)),new EV(t.slice(e)))}}else n.push(o)}replace(e,t,n){var i,r;if(!(n instanceof EV))return super.replace(e,t,n);[e,t]=EU(this,e,t);let o=Ej(this.text,Ej(n.text,(i=this.text,r=0,Ej(i,[""],0,e))),t),a=this.length+n.length-(t-e);return o.length<=32?new EV(o,a):EZ.from(EV.split(o,[]),a)}sliceString(e,t=this.length,n="\n"){[e,t]=EU(this,e,t);let i="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let a=this.text[o],s=r+a.length;r>e&&o&&(i+=n),e<s&&t>r&&(i+=a.slice(Math.max(0,e-r),t-r)),r=s+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let r of e)n.push(r),i+=r.length+1,32==n.length&&(t.push(new EV(n,i)),n=[],i=-1);return i>-1&&t.push(new EV(n,i)),t}}class EZ extends Ez{constructor(e,t){for(let n of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=n.lines}lineInner(e,t,n,i){for(let r=0;;r++){let o=this.children[r],a=i+o.length,s=n+o.lines-1;if((t?s:a)>=e)return o.lineInner(e,t,n,i);i=a+1,n=s+1}}decompose(e,t,n,i){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let a=this.children[r],s=o+a.length;if(e<=s&&t>=o){let r=i&(+(o<=e)|2*(s>=t));o>=e&&s<=t&&!r?n.push(a):a.decompose(e-o,t-o,n,r)}o=s+1}}replace(e,t,n){if([e,t]=EU(this,e,t),n.lines<this.lines)for(let i=0,r=0;i<this.children.length;i++){let o=this.children[i],a=r+o.length;if(e>=r&&t<=a){let s=o.replace(e-r,t-r,n),l=this.lines-o.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let r=this.children.slice();return r[i]=s,new EZ(r,this.length-(t-e)+n.length)}return super.replace(r,a,s)}r=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=EU(this,e,t);let i="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let a=this.children[r],s=o+a.length;o>e&&r&&(i+=n),e<s&&t>o&&(i+=a.sliceString(e-o,t-o,n)),o=s+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof EZ))return 0;let n=0,[i,r,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,r+=t){if(i==o||r==a)return n;let s=this.children[i],l=e.children[r];if(s!=l)return n+s.scanIdentical(l,t);n+=s.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new EV(n,t)}let i=Math.max(32,n>>5),r=i<<1,o=i>>1,a=[],s=0,l=-1,u=[];function c(){0!=s&&(a.push(1==u.length?u[0]:EZ.from(u,l)),l=-1,s=u.length=0)}for(let t of e)!function e(t){let n;if(t.lines>r&&t instanceof EZ)for(let n of t.children)e(n);else t.lines>o&&(s>o||!s)?(c(),a.push(t)):t instanceof EV&&s&&(n=u[u.length-1])instanceof EV&&t.lines+n.lines<=32?(s+=t.lines,l+=t.length+1,u[u.length-1]=new EV(n.text.concat(t.text),n.length+1+t.length)):(s+t.lines>i&&c(),s+=t.lines,l+=t.length+1,u.push(t))}(t);return c(),1==a.length?a[0]:new EZ(a,t)}}function Ej(e,t,n=0,i=1e9){for(let r=0,o=0,a=!0;o<e.length&&r<=i;o++){let s=e[o],l=r+s.length;l>=n&&(l>i&&(s=s.slice(0,i-r)),r<n&&(s=s.slice(n-r)),a?(t[t.length-1]+=s,a=!1):t.push(s)),r=l+1}return t}Ez.empty=new EV([""],0);class EH{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof EV?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],o=r>>1,a=i instanceof EV?i.text.length:i.children.length;if(o==(t>0?a:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(i instanceof EV){let r=i.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,r.length>Math.max(0,e))return this.value=0==e?r:t>0?r.slice(e):r.slice(0,r.length-e),this;e-=r.length}else{let r=i.children[o+(t<0?-1:0)];e>r.length?(e-=r.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(t>0?1:(r instanceof EV?r.text.length:r.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class EW{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new EH(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class E${constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Ez.prototype[Symbol.iterator]=function(){return this.iter()},EH.prototype[Symbol.iterator]=EW.prototype[Symbol.iterator]=E$.prototype[Symbol.iterator]=function(){return this});class EG{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}function EU(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function Eq(e,t,n=!0,i=!0){return function(e,t,n=!0,i=!0){return(n?EE:function(e,t,n){for(;t>0;){let i=EE(e,t-2,n);if(i<t)return i;t--}return 0})(e,t,i)}(e,t,n,i)}function EY(e,t){let n=e.charCodeAt(t);if(!(n>=55296&&n<56320)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return i>=56320&&i<57344?(n-55296<<10)+(i-56320)+65536:n}function EX(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function EK(e){return e<65536?1:2}let EQ=/\r\n?|\n/;var EJ=((R=EJ||(EJ={}))[R.Simple=0]="Simple",R[R.TrackDel=1]="TrackDel",R[R.TrackBefore=2]="TrackBefore",R[R.TrackAfter=3]="TrackAfter",R);class E0{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(n,i,r),i+=r):i+=o,n+=r}}iterChangedRanges(e,t=!1){E3(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new E0(e)}composeDesc(e){return this.empty?e:e.empty?this:E8(this,e)}mapDesc(e,t=!1){return e.empty?this:E4(this,e,t)}mapPos(e,t=-1,n=EJ.Simple){let i=0,r=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],s=this.sections[o++],l=i+a;if(s<0){if(l>e)return r+(e-i);r+=a}else{if(n!=EJ.Simple&&l>=e&&(n==EJ.TrackDel&&i<e&&l>e||n==EJ.TrackBefore&&i<e||n==EJ.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==i||t<0?r:r+s;r+=s}i=l}if(e>i)throw RangeError(`Position ${e} is out of range for changeset of length ${i}`);return r}touchesRange(e,t=e){for(let n=0,i=0;n<this.sections.length&&i<=t;){let r=this.sections[n++],o=this.sections[n++],a=i+r;if(o>=0&&i<=t&&a>=e)return!(i<e)||!(a>t)||"cover";i=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new E0(e)}static create(e){return new E0(e)}}class E1 extends E0{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return E3(this,(t,n,i,r,o)=>e=e.replace(i,i+(n-t),o),!1),e}mapDesc(e,t=!1){return E4(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,r=0;i<t.length;i+=2){let o=t[i],a=t[i+1];if(a>=0){t[i]=a,t[i+1]=o;let s=i>>1;for(;n.length<s;)n.push(Ez.empty);n.push(o?e.slice(r,r+o):Ez.empty)}r+=o}return new E1(t,n)}compose(e){return this.empty?e:e.empty?this:E8(this,e,!0)}map(e,t=!1){return e.empty?this:E4(this,e,t,!0)}iterChanges(e,t=!1){E3(this,e,t)}get desc(){return E0.create(this.sections)}filter(e){let t=[],n=[],i=[],r=new E6(this);i:for(let o=0,a=0;;){let s=o==e.length?1e9:e[o++];for(;a<s||a==s&&0==r.len;){if(r.done)break i;let e=Math.min(r.len,s-a);E2(i,e,-1);let o=-1==r.ins?-1:0==r.off?r.ins:0;E2(t,e,o),o>0&&E5(n,t,r.text),r.forward(e),a+=e}let l=e[o++];for(;a<l;){if(r.done)break i;let e=Math.min(r.len,l-a);E2(t,e,-1),E2(i,e,-1==r.ins?-1:0==r.off?r.ins:0),r.forward(e),a+=e}}return{changes:new E1(t,n),filtered:E0.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):0==i?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],r=[],o=0,a=null;function s(e=!1){if(!e&&!i.length)return;o<t&&E2(i,t-o,-1);let n=new E1(i,r);a=a?a.compose(n.map(a)):n,i=[],r=[],o=0}return!function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof E1){if(l.length!=t)throw RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);s(),a=a?a.compose(l.map(a)):l}else{let{from:e,to:a=e,insert:u}=l;if(e>a||e<0||a>t)throw RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let c=u?"string"==typeof u?Ez.of(u.split(n||EQ)):u:Ez.empty,h=c.length;if(e==a&&0==h)return;e<o&&s(),e>o&&E2(i,e-o,-1),E2(i,a-e,h),E5(r,i,c),o=a}}(e),s(!a),a}static empty(e){return new E1(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let r=e[i];if("number"==typeof r)t.push(r,-1);else if(!Array.isArray(r)||"number"!=typeof r[0]||r.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==r.length)t.push(r[0],0);else{for(;n.length<i;)n.push(Ez.empty);n[i]=Ez.of(r.slice(1)),t.push(r[0],n[i].length)}}return new E1(t,n)}static createSet(e,t){return new E1(e,t)}}function E2(e,t,n,i=!1){if(0==t&&n<=0)return;let r=e.length-2;r>=0&&n<=0&&n==e[r+1]?e[r]+=t:r>=0&&0==t&&0==e[r]?e[r+1]+=n:i?(e[r]+=t,e[r+1]+=n):e.push(t,n)}function E5(e,t,n){if(0==n.length)return;let i=t.length-2>>1;if(i<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<i;)e.push(Ez.empty);e.push(n)}}function E3(e,t,n){let i=e.inserted;for(let r=0,o=0,a=0;a<e.sections.length;){let s=e.sections[a++],l=e.sections[a++];if(l<0)r+=s,o+=s;else{let u=r,c=o,h=Ez.empty;for(;u+=s,c+=l,l&&i&&(h=h.append(i[a-2>>1])),!n&&a!=e.sections.length&&!(e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(r,u,o,c,h),r=u,o=c}}}function E4(e,t,n,i=!1){let r=[],o=i?[]:null,a=new E6(e),s=new E6(t);for(let e=-1;;){if(a.done&&s.len||s.done&&a.len)throw Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let e=Math.min(a.len,s.len);E2(r,e,-1),a.forward(e),s.forward(e)}else if(s.ins>=0&&(a.ins<0||e==a.i||0==a.off&&(s.len<a.len||s.len==a.len&&!n))){let t=s.len;for(E2(r,s.ins,-1);t;){let n=Math.min(a.len,t);a.ins>=0&&e<a.i&&a.len<=n&&(E2(r,0,a.ins),o&&E5(o,r,a.text),e=a.i),a.forward(n),t-=n}s.next()}else if(a.ins>=0){let t=0,n=a.len;for(;n;)if(-1==s.ins){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(0==s.ins&&s.len<n)n-=s.len,s.next();else break;E2(r,t,e<a.i?a.ins:0),o&&e<a.i&&E5(o,r,a.text),e=a.i,a.forward(a.len-n)}else if(a.done&&s.done)return o?E1.createSet(r,o):E0.create(r);else throw Error("Mismatched change set lengths")}}function E8(e,t,n=!1){let i=[],r=n?[]:null,o=new E6(e),a=new E6(t);for(let e=!1;;){if(o.done&&a.done)return r?E1.createSet(i,r):E0.create(i);if(0==o.ins)E2(i,o.len,0,e),o.next();else if(0!=a.len||a.done){if(o.done||a.done)throw Error("Mismatched change set lengths");{let t=Math.min(o.len2,a.len),n=i.length;if(-1==o.ins){let n=-1==a.ins?-1:a.off?0:a.ins;E2(i,t,n,e),r&&n&&E5(r,i,a.text)}else -1==a.ins?(E2(i,o.off?0:o.len,t,e),r&&E5(r,i,o.textBit(t))):(E2(i,o.off?0:o.len,a.off?0:a.ins,e),r&&!a.off&&E5(r,i,a.text));e=(o.ins>t||a.ins>=0&&a.len>t)&&(e||i.length>n),o.forward2(t),a.forward(t)}}else E2(i,0,a.ins,e),r&&E5(r,i,a.text),a.next()}}class E6{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Ez.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Ez.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class E9{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 0xffffff==e?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new E9(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return E7.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return E7.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return E7.range(e.anchor,e.head)}static create(e,t,n){return new E9(e,t,n)}}class E7{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:E7.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new E7([this.main],0)}addRange(e,t=!0){return E7.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,E7.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new E7(e.ranges.map(e=>E9.fromJSON(e)),e.main)}static single(e,t=e){return new E7([E7.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let r=e[i];if(r.empty?r.from<=n:r.from<n)return E7.normalized(e.slice(),t);n=r.to}return new E7(e,t)}static cursor(e,t=0,n,i){return E9.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:0xffffff)<<6)}static range(e,t,n,i){let r=(null!=n?n:0xffffff)<<6|(null==i?7:Math.min(6,i));return t<e?E9.create(t,e,48|r):E9.create(e,t,8*(t>e)|r)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let i=e[n],r=e[n-1];if(i.empty?i.from<=r.to:i.from<r.to){let o=r.from,a=Math.max(i.to,r.to);n<=t&&t--,e.splice(--n,2,i.anchor>i.head?E7.range(a,o):E7.range(o,a))}}return new E7(e,t)}}function Le(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let Lt=0;class Ln{constructor(e,t,n,i,r){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=Lt++,this.default=e([]),this.extensions="function"==typeof r?r(this):r}get reader(){return this}static define(e={}){return new Ln(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:Li),!!e.static,e.enables)}of(e){return new Lr([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new Lr(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new Lr(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function Li(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class Lr{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=Lt++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,r=this.id,o=e[r]>>1,a=2==this.type,s=!1,l=!1,u=[];for(let n of this.dependencies)"doc"==n?s=!0:"selection"==n?l=!0:((null!==(t=e[n.id])&&void 0!==t?t:1)&1)==0&&u.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||La(e,u)){let t=n(e);if(a?!Lo(t,e.values[o],i):!i(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[r];if(null!=l){let r=Lv(t,l);if(this.dependencies.every(n=>n instanceof Ln?t.facet(n)===e.facet(n):!(n instanceof Ll)||t.field(n,!1)==e.field(n,!1))||(a?Lo(s=n(e),r,i):i(s=n(e),r)))return e.values[o]=r,0}else s=n(e);return e.values[o]=s,1}}}}function Lo(e,t,n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function La(e,t){let n=!1;for(let i of t)1&Lm(e,i)&&(n=!0);return n}let Ls=Ln.define({static:!0});class Ll{constructor(e,t,n,i,r){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=r,this.provides=void 0}static define(e){let t=new Ll(Lt++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Ls).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let i=e.values[t],r=this.updateF(i,n);return this.compareF(i,r)?0:(e.values[t]=r,1)},reconfigure:(e,n)=>{let i=e.facet(Ls),r=n.facet(Ls),o;return(o=i.find(e=>e.field==this))&&o!=r.find(e=>e.field==this)?(e.values[t]=o.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,Ls.of({field:this,create:e})]}get extension(){return this}}let Lu={lowest:4,low:3,default:2,high:1,highest:0};function Lc(e){return t=>new Ld(t,e)}let Lh={highest:Lc(Lu.highest),high:Lc(Lu.high),default:Lc(Lu.default),low:Lc(Lu.low),lowest:Lc(Lu.lowest)};class Ld{constructor(e,t){this.inner=e,this.prec=t}}class Lp{of(e){return new Lf(this,e)}reconfigure(e){return Lp.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Lf{constructor(e,t){this.compartment=e,this.inner=t}}class Lg{constructor(e,t,n,i,r,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){var i,r,o;let a,s,l=[],u=Object.create(null),c=new Map;for(let n of(i=e,r=t,o=c,a=[[],[],[],[],[]],s=new Map,!function e(t,n){let i=s.get(t);if(null!=i){if(i<=n)return;let e=a[i].indexOf(t);e>-1&&a[i].splice(e,1),t instanceof Lf&&o.delete(t.compartment)}if(s.set(t,n),Array.isArray(t))for(let i of t)e(i,n);else if(t instanceof Lf){if(o.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let i=r.get(t.compartment)||t.inner;o.set(t.compartment,i),e(i,n)}else if(t instanceof Ld)e(t.inner,t.prec);else if(t instanceof Ll)a[n].push(t),t.provides&&e(t.provides,n);else if(t instanceof Lr)a[n].push(t),t.facet.extensions&&e(t.facet.extensions,Lu.default);else{let i=t.extension;if(!i)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(i,n)}}(i,Lu.default),a.reduce((e,t)=>e.concat(t))))n instanceof Ll?l.push(n):(u[n.facet.id]||(u[n.facet.id]=[])).push(n);let h=Object.create(null),d=[],p=[];for(let e of l)h[e.id]=p.length<<1,p.push(t=>e.slot(t));let f=null==n?void 0:n.config.facets;for(let e in u){let t=u[e],i=t[0].facet,r=f&&f[e]||[];if(t.every(e=>0==e.type)){if(h[i.id]=d.length<<1|1,Li(r,t))d.push(n.facet(i));else{let e=i.combine(t.map(e=>e.value));d.push(n&&i.compare(e,n.facet(i))?n.facet(i):e)}}else{for(let e of t)0==e.type?(h[e.id]=d.length<<1|1,d.push(e.value)):(h[e.id]=p.length<<1,p.push(t=>e.dynamicSlot(t)));h[i.id]=p.length<<1,p.push(e=>(function(e,t,n){let i=n.map(t=>e[t.id]),r=n.map(e=>e.type),o=i.filter(e=>!(1&e)),a=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<i.length;t++){let o=Lv(e,i[t]);if(2==r[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of i)Lm(e,t);return e.values[a]=s(e),1},update(e,n){if(!La(e,o))return 0;let i=s(e);return t.compare(i,e.values[a])?0:(e.values[a]=i,1)},reconfigure(e,r){let o=La(e,i),l=r.config.facets[t.id],u=r.facet(t);if(l&&!o&&Li(n,l))return e.values[a]=u,0;let c=s(e);return t.compare(c,u)?(e.values[a]=u,0):(e.values[a]=c,1)}}})(e,i,t))}}return new Lg(e,c,p.map(e=>e(h)),h,d,u)}}function Lm(e,t){if(1&t)return 2;let n=t>>1,i=e.status[n];if(4==i)throw Error("Cyclic dependency between fields and/or facets");if(2&i)return i;e.status[n]=4;let r=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|r}function Lv(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let Ly=Ln.define(),Lx=Ln.define({combine:e=>e.some(e=>e),static:!0}),Lb=Ln.define({combine:e=>e.length?e[0]:void 0,static:!0}),Lw=Ln.define(),LS=Ln.define(),L_=Ln.define(),LC=Ln.define({combine:e=>!!e.length&&e[0]});class LM{constructor(e,t){this.type=e,this.value=t}static define(){return new Lk}}class Lk{of(e){return new LM(this,e)}}class LT{constructor(e){this.map=e}of(e){return new LD(this,e)}}class LD{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new LD(this.type,t)}is(e){return this.type==e}static define(e={}){return new LT(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let e=i.map(t);e&&n.push(e)}return n}}LD.reconfigure=LD.define(),LD.appendConfig=LD.define();class LI{constructor(e,t,n,i,r,o){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,n&&Le(n,t.newLength),r.some(e=>e.type==LI.time)||(this.annotations=r.concat(LI.time.of(Date.now())))}static create(e,t,n,i,r,o){return new LI(e,t,n,i,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(LI.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function LA(e,t,n){var i;let r,o,a;return n?(r=t.changes,o=E1.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(o):null===(i=e.selection)||void 0===i?void 0:i.map(r),effects:LD.mapEffects(e.effects,r).concat(LD.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function LP(e,t,n){let i=t.selection,r=LR(t.annotations);return t.userEvent&&(r=r.concat(LI.userEvent.of(t.userEvent))),{changes:t.changes instanceof E1?t.changes:E1.of(t.changes||[],n,e.facet(Lb)),selection:i&&(i instanceof E7?i:E7.single(i.anchor,i.head)),effects:LR(t.effects),annotations:r,scrollIntoView:!!t.scrollIntoView}}LI.time=LM.define(),LI.userEvent=LM.define(),LI.addToHistory=LM.define(),LI.remote=LM.define();let LO=[];function LR(e){return null==e?LO:Array.isArray(e)?e:[e]}var LE=((E=LE||(LE={}))[E.Word=0]="Word",E[E.Space=1]="Space",E[E.Other=2]="Other",E);let LL=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{i=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class LB{constructor(e,t,n,i,r,o){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Lm(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null==n){if(t)throw RangeError("Field is not present in this state");return}return Lm(this,n),Lv(this,n)}update(...e){return function e(t,n,i){let r=LP(t,n.length?n[0]:{},t.doc.length);n.length&&!1===n[0].filter&&(i=!1);for(let e=1;e<n.length;e++){!1===n[e].filter&&(i=!1);let o=!!n[e].sequential;r=LA(r,LP(t,n[e],o?r.changes.newLength:t.doc.length),o)}let o=LI.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(e){let t=e.startState,n=t.facet(L_),i=e;for(let r=n.length-1;r>=0;r--){let o=n[r](e);o&&Object.keys(o).length&&(i=LA(i,LP(t,o,e.changes.newLength),!0))}return i==e?e:LI.create(t,e.changes,e.selection,i.effects,i.annotations,i.scrollIntoView)}(i?function(t){let n=t.startState,i=!0;for(let e of n.facet(Lw)){let n=e(t);if(!1===n){i=!1;break}Array.isArray(n)&&(i=!0===i?n:function(e,t){let n=[];for(let i=0,r=0;;){let o,a;if(i<e.length&&(r==t.length||t[r]>=e[i]))o=e[i++],a=e[i++];else{if(!(r<t.length))return n;o=t[r++],a=t[r++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}(i,n))}if(!0!==i){let e,r;if(!1===i)r=t.changes.invertedDesc,e=E1.empty(n.doc.length);else{let n=t.changes.filter(i);e=n.changes,r=n.filtered.mapDesc(n.changes).invertedDesc}t=LI.create(n,e,t.selection&&t.selection.map(r),LD.mapEffects(t.effects,r),t.annotations,t.scrollIntoView)}let r=n.facet(LS);for(let i=r.length-1;i>=0;i--){let o=r[i](t);t=o instanceof LI?o:Array.isArray(o)&&1==o.length&&o[0]instanceof LI?o[0]:e(n,LR(o),!1)}return t}(o):o)}(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:i,compartments:r}=n;for(let t of e.effects)t.is(Lp.reconfigure)?(n&&(r=new Map,n.compartments.forEach((e,t)=>r.set(t,e)),n=null),r.set(t.value.compartment,t.value.extension)):t.is(LD.reconfigure)?(n=null,i=t.value):t.is(LD.appendConfig)&&(n=null,i=LR(i).concat(t.value));t=n?e.startState.values.slice():new LB(n=Lg.resolve(i,r,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let o=e.startState.facet(Lx)?e.newSelection:e.newSelection.asSingle();new LB(n,e.newDoc,o,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:E7.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),r=[n.range],o=LR(n.effects);for(let n=1;n<t.ranges.length;n++){let a=e(t.ranges[n]),s=this.changes(a.changes),l=s.map(i);for(let e=0;e<n;e++)r[e]=r[e].map(l);let u=i.mapDesc(s,!0);r.push(a.range.map(u)),i=i.compose(l),o=LD.mapEffects(o,l).concat(LD.mapEffects(LR(a.effects),u))}return{changes:i,selection:E7.create(r,t.mainIndex),effects:o}}changes(e=[]){return e instanceof E1?e:E1.of(e,this.doc.length,this.facet(LB.lineSeparator))}toText(e){return Ez.of(e.split(this.facet(LB.lineSeparator)||EQ))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(Lm(this,t),Lv(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof Ll&&null!=this.config.address[i.id]&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let r=n[t],o=e[t];i.push(r.init(e=>r.spec.fromJSON(o,e)))}}return LB.create({doc:e.doc,selection:E7.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=Lg.resolve(e.extensions||[],new Map),n=e.doc instanceof Ez?e.doc:Ez.of((e.doc||"").split(t.staticFacet(LB.lineSeparator)||EQ)),i=e.selection?e.selection instanceof E7?e.selection:E7.single(e.selection.anchor,e.selection.head):E7.single(0);return Le(i,n.length),t.staticFacet(Lx)||(i=i.asSingle()),new LB(t,n,i,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(LB.tabSize)}get lineBreak(){return this.facet(LB.lineSeparator)||"\n"}get readOnly(){return this.facet(LC)}phrase(e,...t){for(let t of this.facet(LB.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>t.length?e:t[i-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let r of this.facet(Ly))for(let o of r(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){var t;return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return LE.Space;if(function(e){if(i)return i.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||LL.test(n)))return!0}return!1}(e))return LE.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return LE.Word;return LE.Other}}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let e=Eq(t,o,!1);if(r(t.slice(e,o))!=LE.Word)break;o=e}for(;a<i;){let e=Eq(t,a);if(r(t.slice(a,e))!=LE.Word)break;a=e}return o==a?null:E7.range(o+n,a+n)}}function LN(e,t,n={}){let i={};for(let t of e)for(let e of Object.keys(t)){let r=t[e],o=i[e];if(void 0===o)i[e]=r;else if(o===r||void 0===r);else if(Object.hasOwnProperty.call(n,e))i[e]=n[e](o,r);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===i[e]&&(i[e]=t[e]);return i}LB.allowMultipleSelections=Lx,LB.tabSize=Ln.define({combine:e=>e.length?e[0]:4}),LB.lineSeparator=Lb,LB.readOnly=LC,LB.phrases=Ln.define({compare(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length==i.length&&n.every(n=>e[n]==t[n])}}),LB.languageData=Ly,LB.changeFilter=Lw,LB.transactionFilter=LS,LB.transactionExtender=L_,Lp.reconfigure=LD.define();class LF{eq(e){return this==e}range(e,t=e){return Lz.create(e,t,this)}}LF.prototype.startSide=LF.prototype.endSide=0,LF.prototype.point=!1,LF.prototype.mapMode=EJ.TrackDel;class Lz{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new Lz(e,t,n)}}function LV(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class LZ{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let r=n?this.to:this.from;for(let o=i,a=r.length;;){if(o==a)return o;let i=o+a>>1,s=r[i]-e||(n?this.value[i].endSide:this.value[i].startSide)-t;if(i==o)return s>=0?o:a;s>=0?a=i:o=i+1}}between(e,t,n,i){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,r);r<o;r++)if(!1===i(this.from[r]+e,this.to[r]+e,this.value[r]))return!1}map(e,t){let n=[],i=[],r=[],o=-1,a=-1;for(let s=0;s<this.value.length;s++){let l=this.value[s],u=this.from[s]+e,c=this.to[s]+e,h,d;if(u==c){let e=t.mapPos(u,l.startSide,l.mapMode);if(null==e||(h=d=e,l.startSide!=l.endSide&&(d=t.mapPos(u,l.endSide))<h))continue}else if((h=t.mapPos(u,l.startSide))>(d=t.mapPos(c,l.endSide))||h==d&&l.startSide>0&&l.endSide<=0)continue;0>(d-h||l.endSide-l.startSide)||(o<0&&(o=h),l.point&&(a=Math.max(a,d-h)),n.push(l),i.push(h-o),r.push(d-o))}return{mapped:n.length?new LZ(i,r,n,a):null,pos:o}}}class Lj{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new Lj(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:r=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(LV)),this.isEmpty)return t.length?Lj.of(t):this;let a=new L$(this,null,-1).goto(0),s=0,l=[],u=new LH;for(;a.value||s<t.length;)if(s<t.length&&(a.from-t[s].from||a.startSide-t[s].value.startSide)>=0){let e=t[s++];u.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndex<this.chunk.length&&(s==t.length||this.chunkEnd(a.chunkIndex)<t[s].from)&&(!o||i>this.chunkEnd(a.chunkIndex)||r<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||i>a.to||r<a.from||o(a.from,a.to,a.value))&&!u.addInner(a.from,a.to,a.value)&&l.push(Lz.create(a.from,a.to,a.value)),a.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?Lj.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],a=this.chunk[r],s=e.touchesRange(o,o+a.length);if(!1===s)i=Math.max(i,a.maxPoint),t.push(a),n.push(e.mapPos(o));else if(!0===s){let{mapped:r,pos:s}=a.map(o,e);r&&(i=Math.max(i,r.maxPoint),t.push(r),n.push(s))}}let r=this.nextLayer.map(e);return 0==t.length?r:new Lj(n,t,r||Lj.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let r=this.chunkPos[i],o=this.chunk[i];if(t>=r&&e<=r+o.length&&!1===o.between(r,e-r,t-r,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return LG.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return LG.from(e).goto(t)}static compare(e,t,n,i,r=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r),a=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=r),s=LW(o,a,n),l=new Lq(o,s,r),u=new Lq(a,s,r);n.iterGaps((e,t,n)=>LY(l,e,u,t,n,i)),n.empty&&0==n.length&&LY(l,0,u,0,0,i)}static eq(e,t,n=0,i){null==i&&(i=0x3b9ac9ff);let r=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),o=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(r.length!=o.length)return!1;if(!r.length)return!0;let a=LW(r,o),s=new Lq(r,a,0).goto(n),l=new Lq(o,a,0).goto(n);for(;;){if(s.to!=l.to||!LX(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>i)return!0;s.next(),l.next()}}static spans(e,t,n,i,r=-1){let o=new Lq(e,null,r).goto(t),a=t,s=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),r=o.pointFrom<t?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,s);i.point(a,e,o.point,n,r,o.pointRank),s=Math.min(o.openEnd(e),n.length)}else e>a&&(i.span(a,e,o.active,s),s=o.openEnd(e));if(o.to>n)return s+(o.point&&o.to>n?1:0);a=o.to,o.next()}}static of(e,t=!1){let n=new LH;for(let i of e instanceof Lz?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let i=e[n];if(LV(t,i)>0)return e.slice().sort(LV);t=i}return e}(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return Lj.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=Lj.empty;i=i.nextLayer)t=new Lj(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Lj.empty=new Lj([],[],null,-1),Lj.empty.nextLayer=Lj.empty;class LH{finishChunk(e){this.chunks.push(new LZ(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new LH)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Lj.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Lj.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function LW(e,t,n){let i=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&i.set(t.chunk[e],t.chunkPos[e]);let r=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=i.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||r.add(e.chunk[t])}return r}class L${constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class LG{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let r=0;r<e.length;r++)for(let o=e[r];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&i.push(new L$(o,t,n,r));return 1==i.length?i[0]:new LG(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)LU(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)LU(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),LU(this.heap,0)}}}function LU(e,t){for(let n=e[t];;){let i=(t<<1)+1;if(i>=e.length)break;let r=e[i];if(i+1<e.length&&r.compare(e[i+1])>=0&&(r=e[i+1],i++),0>n.compare(r))break;e[i]=n,e[t]=r,t=i}}class Lq{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=LG.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){LK(this.active,e),LK(this.activeTo,e),LK(this.activeRank,e),this.minActive=LJ(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:r}=this.cursor;for(;t<this.activeRank.length&&(r-this.activeRank[t]||i-this.activeTo[t])>0;)t++;LQ(this.active,t,n),LQ(this.activeTo,t,i),LQ(this.activeRank,t,r),e&&LQ(e,t,this.cursor.from),this.minActive=LJ(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&0>(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&LK(n,i)}else if(this.cursor.value){if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else this.addActive(n),this.cursor.next()}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function LY(e,t,n,i,r,o){e.goto(t),n.goto(i);let a=i+r,s=i,l=i-t;for(;;){let t=e.to+l-n.to,i=t||e.endSide-n.endSide,r=i<0?e.to+l:n.to,u=Math.min(r,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&LX(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(s,u,e.point,n.point):u>s&&!LX(e.active,n.active)&&o.compareRange(s,u,e.active,n.active),r>a)break;(t||e.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(r),s=r,i<=0&&e.next(),i>=0&&n.next()}}function LX(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function LK(e,t){for(let n=t,i=e.length-1;n<i;n++)e[n]=e[n+1];e.pop()}function LQ(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function LJ(e,t){let n=-1,i=1e9;for(let r=0;r<t.length;r++)0>(t[r]-i||e[r].endSide-e[n].endSide)&&(n=r,i=t[r]);return n}function L0(e,t,n=e.length){let i=0;for(let r=0;r<n&&r<e.length;)9==e.charCodeAt(r)?(i+=t-i%t,r++):(i++,r=Eq(e,r));return i}function L1(e,t,n,i){for(let i=0,r=0;;){if(r>=t)return i;if(i==e.length)break;r+=9==e.charCodeAt(i)?n-r%n:1,i=Eq(e,i)}return!0===i?-1:e.length}let L2="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),L5="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),L3="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class L4{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,r,o,a){let s=[],l=/^@(\w+)\b/.exec(t[0]),u=l&&"keyframes"==l[1];if(l&&null==r)return o.push(t[0]+";");for(let n in r){let a=r[n];if(/&/.test(n))e(n.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>e.concat(t)),a,o);else if(a&&"object"==typeof a){if(!l)throw RangeError("The value of a property ("+n+") should be a primitive value.");e(i(n),a,s,u)}else null!=a&&s.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+a+";")}(s.length||u)&&o.push((!n||l||a?t:t.map(n)).join(", ")+" {"+s.join(" ")+"}")}(i(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=L3[L2]||1;return L3[L2]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let i=e[L5],r=n&&n.nonce;i?r&&i.setNonce(r):i=new L6(e,r),i.mount(Array.isArray(t)?t:[t],e)}}let L8=new Map;class L6{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let t=L8.get(n);if(t)return e[L5]=t;this.sheet=new i.CSSStyleSheet,L8.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[L5]=this}mount(e,t){let n=this.sheet,i=0,r=0;for(let t=0;t<e.length;t++){let o=e[t],a=this.modules.indexOf(o);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,o),n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],i++)}else{for(;r<a;)i+=this.modules[r++].rules.length;i+=o.rules.length,r++}}if(n)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var L9={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},L7={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Be="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Bt="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Bn=0;Bn<10;Bn++)L9[48+Bn]=L9[96+Bn]=String(Bn);for(var Bn=1;Bn<=24;Bn++)L9[Bn+111]="F"+Bn;for(var Bn=65;Bn<=90;Bn++)L9[Bn]=String.fromCharCode(Bn+32),L7[Bn]=String.fromCharCode(Bn);for(var Bi in L9)L7.hasOwnProperty(Bi)||(L7[Bi]=L9[Bi]);function Br(e){let t;return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function Bo(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function Ba(e,t){if(!t.anchorNode)return!1;try{return Bo(e,t.anchorNode)}catch(e){return!1}}function Bs(e){return 3==e.nodeType?By(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Bl(e,t,n,i){return!!n&&(Bh(e,t,n,i,-1)||Bh(e,t,n,i,1))}function Bu(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Bc(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function Bh(e,t,n,i,r){for(;;){if(e==n&&t==i)return!0;if(t==(r<0?0:Bd(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=Bu(e)+(r<0?0:1),e=n}else{if(1!=e.nodeType||1==(e=e.childNodes[t+(r<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=r<0?Bd(e):0}}}function Bd(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Bp(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Bf(e,t){let n=t.width/e.offsetWidth,i=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(t.width-e.offsetWidth))&&(n=1),(i>.995&&i<1.005||!isFinite(i)||1>Math.abs(t.height-e.offsetHeight))&&(i=1),{scaleX:n,scaleY:i}}class Bg{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Bd(t):0),n,Math.min(e.focusOffset,n?Bd(n):0))}set(e,t,n,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=i}}let Bm=null;function Bv(e){if(e.setActive)return e.setActive();if(Bm)return e.focus(Bm);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==Bm?{get preventScroll(){return Bm={preventScroll:!0},!0}}:void 0),!Bm){Bm=!1;for(let e=0;e<t.length;){let n=t[e++],i=t[e++],r=t[e++];n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}}}function By(e,t,n=t){let i=r||(r=document.createRange());return i.setEnd(e,n),i.setStart(e,t),i}function Bx(e,t,n,i){let r={key:t,code:t,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let o=new KeyboardEvent("keydown",r);o.synthetic=!0,e.dispatchEvent(o);let a=new KeyboardEvent("keyup",r);return a.synthetic=!0,e.dispatchEvent(a),o.defaultPrevented||a.defaultPrevented}function Bb(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function Bw(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function BS(e,t){for(let n=e,i=t;;){if(3==n.nodeType&&i>0)return{node:n,offset:i};if(1==n.nodeType&&i>0){if("false"==n.contentEditable)return null;i=Bd(n=n.childNodes[i-1])}else{if(!n.parentNode||Bc(n))return null;i=Bu(n),n=n.parentNode}}}function B_(e,t){for(let n=e,i=t;;){if(3==n.nodeType&&i<n.nodeValue.length)return{node:n,offset:i};if(1==n.nodeType&&i<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[i],i=0}else{if(!n.parentNode||Bc(n))return null;i=Bu(n)+1,n=n.parentNode}}}class BC{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new BC(e.parentNode,Bu(e),t)}static after(e,t){return new BC(e.parentNode,Bu(e)+1,t)}}let BM=[];class Bk{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n=this.dom,i=null,r;for(let o of this.children){if(7&o.flags){if(!o.dom&&(r=i?i.nextSibling:n.firstChild)){let e=Bk.get(r);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(r)}o.sync(e,t),o.flags&=-8}if(r=i?i.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&r!=o.dom&&(t.written=!0),o.dom.parentNode==n)for(;r&&r!=o.dom;)r=BT(r);else n.insertBefore(o.dom,r);i=o.dom}for((r=i?i.nextSibling:n.firstChild)&&t&&t.node==n&&(t.written=!0);r;)r=BT(r)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let i=0==Bd(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==i&&t.firstChild!=t.lastChild&&(i=e==t.firstChild?-1:1),e=t}n=i<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Bk.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let i=this.children[e];if(i.dom==n)return t;t+=i.length+i.breakAfter}}domBoundsAround(e,t,n=0){let i=-1,r=-1,o=-1,a=-1;for(let s=0,l=n,u=n;s<this.children.length;s++){let n=this.children[s],c=l+n.length;if(l<e&&c>t)return n.domBoundsAround(e,t,l);if(c>=e&&-1==i&&(i=s,r=l),l>t&&n.dom.parentNode==this.dom){o=s,a=u;break}u=c,l=c+n.breakAfter}return{from:r,to:a<0?n+this.length:a,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=BM){this.markDirty();for(let i=e;i<t;i++){let e=this.children[i];e.parent==this&&0>n.indexOf(e)&&e.destroy()}n.length<250?this.children.splice(e,t-e,...n):this.children=[].concat(this.children.slice(0,e),n,this.children.slice(t));for(let e=0;e<n.length;e++)n[e].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new BD(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==e?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,t,n,i,r,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}function BT(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}Bk.prototype.breakAfter=0;class BD{constructor(e,t,n){this.children=e,this.pos=t,this.i=n,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function BI(e,t,n,i,r,o,a,s,l){let{children:u}=e,c=u.length?u[t]:null,h=o.length?o[o.length-1]:null,d=h?h.breakAfter:a;if(!(t==i&&c&&!a&&!d&&o.length<2&&c.merge(n,r,o.length?h:null,0==n,s,l))){if(i<u.length){let e=u[i];e&&(r<e.length||e.breakAfter&&(null==h?void 0:h.breakAfter))?(t==i&&(e=e.split(r),r=0),!d&&h&&e.merge(0,r,h,!0,0,l)?o[o.length-1]=e:((r||e.children.length&&!e.children[0].length)&&e.merge(0,r,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(h?h.breakAfter=1:a=1),i++}for(c&&(c.breakAfter=a,n>0&&(!a&&o.length&&c.merge(n,c.length,o[0],!1,s,0)?c.breakAfter=o.shift().breakAfter:(n<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(n,c.length,null,!1,s,0),t++));t<i&&o.length;)if(u[i-1].become(o[o.length-1]))i--,o.pop(),l=o.length?0:s;else if(u[t].become(o[0]))t++,o.shift(),s=o.length?0:l;else break;!o.length&&t&&i<u.length&&!u[t-1].breakAfter&&u[i].merge(0,0,u[t-1],!1,s,l)&&t--,(t<i||o.length)&&e.replaceChildren(t,i,o)}}function BA(e,t,n,i,r,o){let a=e.childCursor(),{i:s,off:l}=a.findPos(n,1),{i:u,off:c}=a.findPos(t,-1),h=t-n;for(let e of i)h+=e.length;e.length+=h,BI(e,u,c,s,l,i,0,r,o)}let BP="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},BO="undefined"!=typeof document?document:{documentElement:{style:{}}},BR=/Edge\/(\d+)/.exec(BP.userAgent),BE=/MSIE \d/.test(BP.userAgent),BL=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(BP.userAgent),BB=!!(BE||BL||BR),BN=!BB&&/gecko\/(\d+)/i.test(BP.userAgent),BF=!BB&&/Chrome\/(\d+)/.exec(BP.userAgent),Bz="webkitFontSmoothing"in BO.documentElement.style,BV=!BB&&/Apple Computer/.test(BP.vendor),BZ=BV&&(/Mobile\/\w+/.test(BP.userAgent)||BP.maxTouchPoints>2);var Bj={mac:BZ||/Mac/.test(BP.platform),windows:/Win/.test(BP.platform),linux:/Linux|X11/.test(BP.platform),ie:BB,ie_version:BE?BO.documentMode||6:BL?+BL[1]:BR?+BR[1]:0,gecko:BN,gecko_version:BN?+(/Firefox\/(\d+)/.exec(BP.userAgent)||[0,0])[1]:0,chrome:!!BF,chrome_version:BF?+BF[1]:0,ios:BZ,android:/Android\b/.test(BP.userAgent),webkit:Bz,safari:BV,webkit_version:Bz?+(/\bAppleWebKit\/(\d+)/.exec(BP.userAgent)||[0,0])[1]:0,tabSize:null!=BO.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class BH extends Bk{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags)&&(!n||n instanceof BH&&!(this.length-(t-e)+n.length>256)&&!(8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new BH(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new BC(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let i=e.nodeValue.length;t>i&&(t=i);let r=t,o=t,a=0;0==t&&n<0||t==i&&n>=0?!(Bj.chrome||Bj.gecko)&&(t?(r--,a=1):o<i&&(o++,a=-1)):n<0?r--:o<i&&o++;let s=By(e,r,o).getClientRects();if(!s.length)return null;let l=s[(a?a<0:n>=0)?0:s.length-1];return Bj.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,e=>e.width)||l),a?Bp(l,a<0):l||null}(this.dom,e,t)}}class BW extends Bk{constructor(e,t=[],n=0){for(let i of(super(),this.mark=e,this.children=t,this.length=n,t))i.setParent(this)}setAttrs(e){if(Bb(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,i,r,o){return(!n||!!(n instanceof BW&&n.mark.eq(this.mark))&&(!e||!(r<=0))&&(!(t<this.length)||!(o<=0)))&&(BA(this,e,t,n?n.children.slice():[],r-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,i=-1,r=0;for(let o of this.children){let a=n+o.length;a>e&&t.push(n<e?o.split(e-n):o),i<0&&n>=e&&(i=r),n=a,r++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new BW(this.mark,t,o)}domAtPos(e){return BU(this,e)}coordsAt(e,t){return Bq(this,e,t)}}class B$ extends Bk{static create(e,t,n){return new B$(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=B$.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,i,r,o){return(!n||n instanceof B$&&!!this.widget.compare(n.widget)&&(!(e>0)||!(r<=0))&&(!(t<this.length)||!(o<=0)))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof B$&&e.side==this.side&&this.widget.constructor==e.widget.constructor&&(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(0==this.length)return Ez.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):Ez.empty}domAtPos(e){return(this.length?0==e:this.side>0)?BC.before(this.dom):BC.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let i=this.dom.getClientRects(),r=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?i.length-1:0;r=i[t],e>0?0!=t:t!=i.length-1&&!(r.top<r.bottom);t+=o?-1:1);return Bp(r,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class BG extends Bk{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof BG&&e.side==this.side}split(){return new BG(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?BC.before(this.dom):BC.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ez.empty}get isHidden(){return!0}}function BU(e,t){let n=e.dom,{children:i}=e,r=0;for(let e=0;r<i.length;r++){let o=i[r],a=e+o.length;if(!(a==e&&0>=o.getSide())){if(t>e&&t<a&&o.dom.parentNode==n)return o.domAtPos(t-e);if(t<=e)break;e=a}}for(let e=r;e>0;e--){let t=i[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=r;e<i.length;e++){let t=i[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new BC(n,0)}function Bq(e,t,n){let i=null,r=-1,o=null,a=-1;!function e(t,s){for(let l=0,u=0;l<t.children.length&&u<=s;l++){let c=t.children[l],h=u+c.length;h>=s&&(c.children.length?e(c,s-u):(!o||o.isHidden&&n>0)&&(h>s||u==h&&c.getSide()>0)?(o=c,a=s-u):(u<s||u==h&&0>c.getSide()&&!c.isHidden)&&(i=c,r=s-u)),u=h}}(e,t);let s=(n<0?i:o)||i||o;return s?s.coordsAt(Math.max(0,s==i?r:a),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Bs(t);return n[n.length-1]||null}(e)}function BY(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}BH.prototype.children=B$.prototype.children=BG.prototype.children=BM;let BX=Object.create(null);function BK(e,t,n){if(e==t)return!0;e||(e=BX),t||(t=BX);let i=Object.keys(e),r=Object.keys(t);if(i.length-(n&&i.indexOf(n)>-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let o of i)if(o!=n&&(-1==r.indexOf(o)||e[o]!==t[o]))return!1;return!0}function BQ(e,t,n){let i=!1;if(t)for(let r in t)n&&r in n||(i=!0,"style"==r?e.style.cssText="":e.removeAttribute(r));if(n)for(let r in n)t&&t[r]==n[r]||(i=!0,"style"==r?e.style.cssText=n[r]:e.setAttribute(r,n[r]));return i}class BJ{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return -1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var B0=((L=B0||(B0={}))[L.Text=0]="Text",L[L.WidgetBefore=1]="WidgetBefore",L[L.WidgetAfter=2]="WidgetAfter",L[L.WidgetRange=3]="WidgetRange",L);class B1 extends LF{constructor(e,t,n,i){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=i}get heightRelevant(){return!1}static mark(e){return new B2(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new B3(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,i;if(e.isBlockGap)n=-5e8,i=4e8;else{let{start:r,end:o}=B4(e,t);n=(r?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new B3(e,n,i,t,e.widget||null,!0)}static line(e){return new B5(e)}static set(e,t=!1){return Lj.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}B1.none=Lj.empty;class B2 extends B1{constructor(e){let{start:t,end:n}=B4(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof B2&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&BK(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw RangeError("Mark decorations may not be empty");return super.range(e,t)}}B2.prototype.point=!1;class B5 extends B1{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof B5&&this.spec.class==e.spec.class&&BK(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}B5.prototype.mapMode=EJ.TrackBefore,B5.prototype.point=!0;class B3 extends B1{constructor(e,t,n,i,r,o){super(t,n,r,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?EJ.TrackBefore:EJ.TrackAfter:EJ.TrackDel}get type(){return this.startSide!=this.endSide?B0.WidgetRange:this.startSide<=0?B0.WidgetBefore:B0.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){var t,n;return e instanceof B3&&(t=this.widget,t==(n=e.widget)||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function B4(e,t=!1){let{inclusiveStart:n,inclusiveEnd:i}=e;return null==n&&(n=e.inclusive),null==i&&(i=e.inclusive),{start:null!=n?n:t,end:null!=i?i:t}}function B8(e,t,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=e?n[r]=Math.max(n[r],t):n.push(e,t)}B3.prototype.point=!0;class B6 extends Bk{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,i,r,o){if(n){if(!(n instanceof B6))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),BA(this,e,t,n?n.children.slice():[],r,o),!0}split(e){let t=new B6;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:i}=this.childPos(e);i&&(t.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let e=n;e<this.children.length;e++)t.append(this.children[e],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){BK(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,i){let r,{children:o}=t;i>0&&n instanceof BW&&o.length&&(r=o[o.length-1])instanceof BW&&r.mark.eq(n.mark)?e(r,n.children[0],i-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=BY(t,this.attrs||{})),n&&(this.attrs=BY({class:n},this.attrs||{}))}domAtPos(e){return BU(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(Bb(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(BQ(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&Bk.get(i)instanceof BW;)i=i.lastChild;if(!i||!this.length||"BR"!=i.nodeName&&(null===(n=Bk.get(i))||void 0===n?void 0:n.isEditable)==!1&&(!Bj.ios||!this.children.some(e=>e instanceof BH))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof BH)||/[^ -~]/.test(n.text))return null;let i=Bs(n.dom);if(1!=i.length)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=Bq(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(2>Math.abs(t-e.lineHeight)&&e.textHeight<t){let i=(t-e.textHeight)/2;return{top:n.top+i,bottom:n.bottom-i,left:n.left,right:n.left}}}return n}become(e){return e instanceof B6&&0==this.children.length&&0==e.children.length&&BK(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,i=0;n<e.children.length;n++){let r=e.children[n],o=i+r.length;if(o>=t){if(r instanceof B6)return r;if(o>t)break}i=o+r.breakAfter}return null}}class B9 extends Bk{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,i,r,o){return(!n||n instanceof B9&&!!this.widget.compare(n.widget)&&(!(e>0)||!(r<=0))&&(!(t<this.length)||!(o<=0)))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?BC.before(this.dom):BC.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new B9(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return BM}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ez.empty}domBoundsAround(){return null}become(e){return e instanceof B9&&e.widget.constructor==this.widget.constructor&&(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);return n||(this.widget instanceof B7?null:Bp(this.dom.getBoundingClientRect(),this.length?0==e:t<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:t,endSide:n}=this.deco;return t!=n&&(e<0?t<0:n>0)}}class B7 extends BJ{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Ne{constructor(e,t,n,i){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof B9&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new B6),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Nt(new BG(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof B9||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:i}=this.cursor.next(this.skip);if(this.skip=0,i)throw Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Nt(new BH(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,t,n,i){this.buildText(t-e,n,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,n,i,r,o){if(this.disallowBlockEffectsFor[o]&&n instanceof B3){if(n.block)throw RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof B3){if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new B9(n.widget||Nn.block,a,n));else{let o=B$.create(n.widget||Nn.inline,a,a?0:n.startSide),s=this.atCursorPos&&!o.isEditable&&r<=i.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||r>i.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||s||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(i),s&&(u.append(Nt(new BG(1),i),r),r=i.length+Math.max(0,r-i.length)),u.append(Nt(o,i),r),this.atCursorPos=l,this.pendingBuffer=l?e<t||r>i.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=r)}static build(e,t,n,i,r){let o=new Ne(e,t,n,r);return o.openEnd=Lj.spans(i,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Nt(e,t){for(let n of t)e=new BW(n,[e],e.length);return e}class Nn extends BJ{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Nn.inline=new Nn("span"),Nn.block=new Nn("div");var Ni=((B=Ni||(Ni={}))[B.LTR=0]="LTR",B[B.RTL=1]="RTL",B);let Nr=Ni.LTR,No=Ni.RTL;function Na(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}let Ns=Na("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Nl=Na("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Nu=Object.create(null),Nc=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Nu[t]=n,Nu[n]=-t}function Nh(e){return e<=247?Ns[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Nl[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}let Nd=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Np{get dir(){return this.level%2?No:Nr}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,i){let r=-1;for(let o=0;o<e.length;o++){let a=e[o];if(a.from<=t&&a.to>=t){if(a.level==n)return o;(r<0||(0!=i?i<0?a.from<t:a.to>t:e[r].level>a.level))&&(r=o)}}if(r<0)throw RangeError("Index out of range");return r}}let Nf=[];function Ng(e){return[new Np(0,e,0)]}let Nm="",Nv=Ln.define(),Ny=Ln.define(),Nx=Ln.define(),Nb=Ln.define(),Nw=Ln.define(),NS=Ln.define(),N_=Ln.define(),NC=Ln.define(),NM=Ln.define(),Nk=Ln.define({combine:e=>e.some(e=>e)}),NT=Ln.define({combine:e=>e.some(e=>e)}),ND=Ln.define();class NI{constructor(e,t="nearest",n="nearest",i=5,r=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=i,this.xMargin=r,this.isSnapshot=o}map(e){return e.empty?this:new NI(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new NI(E7.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let NA=LD.define({map:(e,t)=>e.map(t)}),NP=LD.define();function NO(e,t,n){let i=e.facet(Nb);i.length?i[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}let NR=Ln.define({combine:e=>!e.length||e[0]}),NE=0,NL=Ln.define();class NB{constructor(e,t,n,i,r){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=i,this.extension=r(this)}static define(e,t){let{eventHandlers:n,eventObservers:i,provide:r,decorations:o}=t||{};return new NB(NE++,e,n,i,e=>{let t=[NL.of(e)];return o&&t.push(NV.of(t=>{let n=t.plugin(e);return n?o(n):B1.none})),r&&t.push(r(e)),t})}static fromClass(e,t){return NB.define(t=>new e(t),t)}}class NN{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(NO(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){NO(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){NO(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let NF=Ln.define(),Nz=Ln.define(),NV=Ln.define(),NZ=Ln.define(),Nj=Ln.define(),NH=Ln.define();function NW(e,t){let n=e.state.facet(NH);if(!n.length)return n;let i=n.map(t=>t instanceof Function?t(e):t),r=[];return Lj.spans(i,t.from,t.to,{point(){},span(e,n,i,o){let a=e-t.from,s=n-t.from,l=r;for(let e=i.length-1;e>=0;e--,o--){let n=i[e].spec.bidiIsolate,r;if(null==n&&(n=function(e,t,n){for(let i=t;i<n;i++){let t=Nh(e.charCodeAt(i));if(1==t)break;if(2==t||4==t)return No}return Nr}(t.text,a,s)),o>0&&l.length&&(r=l[l.length-1]).to==a&&r.direction==n)r.to=s,l=r.inner;else{let e={from:a,to:s,direction:n,inner:[]};l.push(e),l=e.inner}}}}),r}let N$=Ln.define();function NG(e){let t=0,n=0,i=0,r=0;for(let o of e.state.facet(N$)){let a=o(e);a&&(null!=a.left&&(t=Math.max(t,a.left)),null!=a.right&&(n=Math.max(n,a.right)),null!=a.top&&(i=Math.max(i,a.top)),null!=a.bottom&&(r=Math.max(r,a.bottom)))}return{left:t,right:n,top:i,bottom:r}}let NU=Ln.define();class Nq{constructor(e,t,n,i){this.fromA=e,this.toA=t,this.fromB=n,this.toB=i}join(e){return new Nq(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>n.toA)){if(i.toA<n.fromA)break;n=n.join(i),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let i=0,r=0,o=0,a=0;;i++){let s=i==e.length?null:e[i],l=o-a,u=s?s.fromB:1e9;for(;r<t.length&&t[r]<u;){let e=t[r],i=t[r+1],o=Math.max(a,e),s=Math.min(u,i);if(o<=s&&new Nq(o+l,s+l,o,s).addToSet(n),i>u)break;r+=2}if(!s)return n;new Nq(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),o=s.toA,a=s.toB}}}class NY{constructor(e,t,n){for(let i of(this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=E1.empty(this.startState.doc.length),n))this.changes=this.changes.compose(i.changes);let i=[];this.changes.iterChangedRanges((e,t,n,r)=>i.push(new Nq(e,t,n,r))),this.changedRanges=i}static create(e,t,n){return new NY(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}class NX extends Bk{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=B1.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new B6],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Nq(0,0,0,e.state.doc.length)],0,null)}update(e){var t,n,i,r,o,a;let s,l;let u=e.changedRanges;this.minWidth>0&&u.length&&(u.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let c=-1;!(this.view.inputState.composing>=0)||this.view.observer.editContext||((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?c=this.domChanged.newSel.head:(n=e.changes,i=this.hasComposition,s=!1,i&&n.iterChangedRanges((e,t)=>{e<i.to&&t>i.from&&(s=!0)}),s||e.selectionSet||(c=e.state.selection.main.head)));let h=c>-1?function(e,t,n){let i=NK(e,n);if(!i)return null;let{node:r,from:o,to:a}=i,s=r.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(i.from,i.to)!=s)return null;let l=t.invertedDesc,u=new Nq(l.mapPos(o),l.mapPos(a),o,a),c=[];for(let t=r.parentNode;;t=t.parentNode){let n=Bk.get(t);if(n instanceof BW)c.push({node:t,deco:n.mark});else{if(n instanceof B6||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:u,text:r,marks:c,line:t};if(t==e.contentDOM)return null;c.push({node:t,deco:new B2({inclusive:!0,attributes:function(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let i=e.attributes[n];t[i.name]=i.value}return t}(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,c):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:n}=this.hasComposition;u=new Nq(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(u.slice())}this.hasComposition=h?{from:h.range.fromB,to:h.range.toB}:null,(Bj.ie||Bj.chrome)&&!h&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let d=(r=this.decorations,o=this.updateDeco(),a=e.changes,l=new NQ,Lj.compare(r,o,a,l),l.changes);return u=Nq.extendWithRanges(u,d),(!!(7&this.flags)||0!=u.length)&&(this.updateInner(u,e.startState.doc.length,h),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=Bj.chrome||Bj.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||i.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof B9&&e.widget instanceof B7&&r.push(e.dom);i.updateGaps(r)}updateChildren(e,t,n){let i=n?n.range.addToSet(e.slice()):e,r=this.childCursor(t);for(let e=i.length-1;;e--){let t=e>=0?i[e]:null;if(!t)break;let{fromA:o,toA:a,fromB:s,toB:l}=t,u,c,h,d;if(n&&n.range.fromB<l&&n.range.toB>s){let e=Ne.build(this.view.state.doc,s,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=Ne.build(this.view.state.doc,n.range.toB,l,this.decorations,this.dynamicDecorationMap);c=e.breakAtStart,h=e.openStart,d=t.openEnd;let i=this.compositionView(n);t.breakAtStart?i.breakAfter=1:t.content.length&&i.merge(i.length,i.length,t.content[0],!1,t.openStart,0)&&(i.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&i.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),u=e.content.concat(i).concat(t.content)}else({content:u,breakAtStart:c,openStart:h,openEnd:d}=Ne.build(this.view.state.doc,s,l,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=r.findPos(a,1),{i:g,off:m}=r.findPos(o,-1);BI(this,g,m,p,f,u,c,h,d)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){for(let t of(this.editContextFormatting=this.editContextFormatting.map(e.changes),e.transactions))for(let e of t.effects)e.is(NP)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new BH(e.text.nodeValue);for(let{deco:n}of(t.flags|=8,e.marks))t=new BW(n,[t],t.length);let n=new B6;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|+!!t.children.some(e=>7&e.flags),this.markedForComposition.add(t);let n=Bk.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];t(e.line,i);for(let r=e.marks.length-1;r>=-1;r--)n=i.childPos(n.off,1),i=i.children[n.i],t(r>=0?e.marks[r].node:e.text,i)}updateSelection(e=!1,t=!1){var n;(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&!(this.view.state.facet(NR)||this.dom.tabIndex>-1)&&Ba(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||t||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Bj.gecko&&s.empty&&!this.hasComposition&&1==(n=l).node.nodeType&&n.node.firstChild&&(0==n.offset||"false"==n.node.childNodes[n.offset-1].contentEditable)&&(n.offset==n.node.childNodes.length||"false"==n.node.childNodes[n.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(e,l.node.childNodes[l.offset]||null)),l=u=new BC(e,0),a=!0}let c=this.view.observer.selectionRange;!a&&c.focusNode&&(Bl(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Bl(u.node,u.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,s))||(this.view.observer.ignore(()=>{Bj.android&&Bj.chrome&&this.dom.contains(c.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Br(this.view.root);if(e){if(s.empty){if(Bj.gecko){var t,n;let e=(t=l.node,n=l.offset,1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|2*(n<t.childNodes.length&&"false"==t.childNodes[n].contentEditable));if(e&&3!=e){let t=(1==e?BS:B_)(l.node,l.offset);t&&(l=new BC(t.node,t.offset))}}e.collapse(l.node,l.offset),null!=s.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(l.node,l.offset);try{e.extend(u.node,u.offset)}catch(e){}}else{let t=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),t.setEnd(u.node,u.offset),t.setStart(l.node,l.offset),e.removeAllRanges(),e.addRange(t)}}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new BC(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new BC(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Bl(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Br(e.root),{anchorNode:i,anchorOffset:r}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=B6.find(this,t.head);if(!o)return;let a=o.posAtStart;if(t.head==a||t.head==a+o.length)return;let s=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!s||!l||s.bottom>l.top)return;let u=this.domAtPos(t.head+t.assoc);n.collapse(u.node,u.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let c=e.observer.selectionRange;e.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=t.from&&n.collapse(i,r)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let i=e.offset;!n&&i<t.childNodes.length;i++){let e=Bk.get(t.childNodes[i]);e instanceof B6&&(n=e.domAtPos(0))}for(let i=e.offset-1;!n&&i>=0;i--){let e=Bk.get(t.childNodes[i]);e instanceof B6&&(n=e.domAtPos(e.length))}return n?new BC(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let e=Bk.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let e=this.children[t];if(n<e.length||e instanceof B6)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,i=0;for(let r=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],s=r-a.breakAfter,l=s-a.length;if(s<e)break;if(l<=e&&(l<e||a.covers(-1))&&(s>e||a.covers(1))&&(!n||a instanceof B6&&!(n instanceof B6&&t>=0)))n=a,i=l;else if(n&&l==e&&s==e&&a instanceof B9&&2>Math.abs(t)){if(a.deco.startSide<0)break;o&&(n=null)}r=l}return n?n.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),i=this.children[t];if(!(i instanceof B6))return null;for(;i.children.length;){let{i:e,off:t}=i.childPos(n,1);for(;;e++){if(e==i.children.length)return null;if((i=i.children[e]).length)break}n=t}if(!(i instanceof BH))return null;let r=Eq(i.text,n);if(r==n)return null;let o=By(i.dom,n,r).getClientRects();for(let e=0;e<o.length;e++){let t=o[e];if(e==o.length-1||t.top<t.bottom&&t.left<t.right)return t}return null}measureVisibleLineHeights(e){let t=[],{from:n,to:i}=e,r=this.view.contentDOM.clientWidth,o=r>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==Ni.LTR;for(let e=0,l=0;l<this.children.length;l++){let u=this.children[l],c=e+u.length;if(c>i)break;if(e>=n){let n=u.dom.getBoundingClientRect();if(t.push(n.height),o){let t=u.dom.lastChild,i=t?Bs(t):[];if(i.length){let t=i[i.length-1],o=s?t.right-n.left:n.right-t.left;o>a&&(a=o,this.minWidth=r,this.minWidthFrom=e,this.minWidthTo=c)}}}e=c+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?Ni.RTL:Ni.LTR}measureTextSize(){for(let e of this.children)if(e instanceof B6){let t=e.measureTextSize();if(t)return t}let e=document.createElement("div"),t,n,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=Bs(e.firstChild)[0];t=e.getBoundingClientRect().height,n=r?r.width/27:7,i=r?r.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new BD(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,i=0;;i++){let r=i==t.viewports.length?null:t.viewports[i],o=r?r.from-1:this.length;if(o>n){let i=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(B1.replace({widget:new B7(i),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!r)break;n=r.to+1}return B1.set(e)}updateDeco(){let e=1,t=this.view.state.facet(NV).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),n=!1,i=this.view.state.facet(NZ).map((e,t)=>{let i="function"==typeof e;return i&&(n=!0),i?e(this.view):e});for(i.length&&(this.dynamicDecorationMap[e++]=n,t.push(Lj.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(ND))try{if(t(this.view,e.range,e))return!0}catch(e){NO(this.view.state,e,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),i;if(!n)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let r=NG(this.view),o={left:n.left-r.left,top:n.top-r.top,right:n.right+r.right,bottom:n.bottom+r.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,n,i,r,o,a,s){let l=e.ownerDocument,u=l.defaultView||window;for(let c=e,h=!1;c&&!h;)if(1==c.nodeType){let e,d=c==l.body,p=1,f=1;if(d)e=function(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(h=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();({scaleX:p,scaleY:f}=Bf(c,t)),e={left:t.left,right:t.left+c.clientWidth*p,top:t.top,bottom:t.top+c.clientHeight*f}}let g=0,m=0;if("nearest"==r)t.top<e.top?(m=t.top-(e.top+a),n>0&&t.bottom>e.bottom+m&&(m=t.bottom-e.bottom+a)):t.bottom>e.bottom&&(m=t.bottom-e.bottom+a,n<0&&t.top-m<e.top&&(m=t.top-(e.top+a)));else{let i=t.bottom-t.top,o=e.bottom-e.top;m=("center"==r&&i<=o?t.top+i/2-o/2:"start"==r||"center"==r&&n<0?t.top-a:t.bottom-o+a)-e.top}if("nearest"==i?t.left<e.left?(g=t.left-(e.left+o),n>0&&t.right>e.right+g&&(g=t.right-e.right+o)):t.right>e.right&&(g=t.right-e.right+o,n<0&&t.left<e.left+g&&(g=t.left-(e.left+o))):g=("center"==i?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==i==s?t.left-o:t.right-(e.right-e.left)+o)-e.left,g||m){if(d)u.scrollBy(g,m);else{let e=0,n=0;if(m){let e=c.scrollTop;c.scrollTop+=m/f,n=(c.scrollTop-e)*f}if(g){let t=c.scrollLeft;c.scrollLeft+=g/p,e=(c.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&1>Math.abs(e-g)&&(i="nearest"),n&&1>Math.abs(n-m)&&(r="nearest")}}if(d)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),c=c.assignedSlot||c.parentNode}else if(11==c.nodeType)c=c.host;else break}(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,a),-a),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==Ni.LTR)}}function NK(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let i=BS(n.focusNode,n.focusOffset),r=B_(n.focusNode,n.focusOffset),o=i||r;if(r&&i&&r.node!=i.node){let t=Bk.get(r.node);if(!t||t instanceof BH&&t.text!=r.node.nodeValue)o=r;else if(e.docView.lastCompositionAfterCursor){let e=Bk.get(i.node);!e||e instanceof BH&&e.text!=i.node.nodeValue||(o=r)}}if(e.docView.lastCompositionAfterCursor=o!=i,!o)return null;let a=t-o.offset;return{from:a,to:a+o.node.nodeValue.length,node:o.node}}let NQ=class{constructor(){this.changes=[]}compareRange(e,t){B8(e,t,this.changes)}comparePoint(e,t){B8(e,t,this.changes)}boundChange(e){B8(e,e,this.changes)}};function NJ(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function N0(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function N1(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function N2(e,t,n){let i=e.nodeValue.length,r=-1,o=1e9,a=0;for(let s=0;s<i;s++){let i=By(e,s,s+1).getClientRects();for(let l=0;l<i.length;l++){let u=i[l];if(u.top==u.bottom)continue;a||(a=t-u.left);let c=(u.top>n?u.top-n:n-u.bottom)-1;if(u.left-1<=t&&u.right+1>=t&&c<o){let n=t>=(u.left+u.right)/2,i=n;if((Bj.chrome||Bj.gecko)&&By(e,s).getBoundingClientRect().left==u.right&&(i=!n),c<=0)return{node:e,offset:s+ +!!i};r=s+ +!!i,o=c}}}return{node:e,offset:r>-1?r:a>0?e.nodeValue.length:0}}function N5(e,t,n,i=-1){var r,o;let a=e.contentDOM.getBoundingClientRect(),s=a.top+e.viewState.paddingTop,l,{docHeight:u}=e.viewState,{x:c,y:h}=t,d=h-s;if(d<0)return 0;if(d>u)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,r=!1;(l=e.elementAtHeight(d)).type!=B0.Text;)for(;!((d=i>0?l.bottom+t:l.top-t)>=0)||!(d<=u);){if(r)return n?null:0;r=!0,i=-i}h=s+d;let p=l.from;if(p<e.viewport.from)return 0==e.viewport.from?0:n?null:N3(e,a,l,c,h);if(p>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:N3(e,a,l,c,h);let f=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:f,m=g.elementFromPoint(c,h);m&&!e.contentDOM.contains(m)&&(m=null),!m&&(c=Math.max(a.left+1,Math.min(a.right-1,c)),(m=g.elementFromPoint(c,h))&&!e.contentDOM.contains(m)&&(m=null));let v,y=-1;if(m&&(null===(r=e.docView.nearest(m))||void 0===r?void 0:r.isEditable)!=!1){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,h);e&&({offsetNode:v,offset:y}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(c,h);t&&({startContainer:v,startOffset:y}=t,(!e.contentDOM.contains(v)||Bj.safari&&function(e,t,n){let i;if(3!=e.nodeType||t!=(i=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return By(e,i-1,i).getBoundingClientRect().left>n}(v,y,c)||Bj.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}return n-(1==e.nodeType?e.getBoundingClientRect():By(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(v,y,c))&&(v=void 0))}v&&(y=Math.min(Bd(v),y))}if(!v||!e.docView.dom.contains(v)){let t=B6.find(e.docView,p);if(!t)return d>l.top+l.height/2?l.to:l.from;({node:v,offset:y}=function e(t,n,i){let r,o,a,s,l,u,c,h,d=!1;for(let g=t.firstChild;g;g=g.nextSibling){let t=Bs(g);for(let m=0;m<t.length;m++){var p,f;let v=t[m];u&&NJ(u,v)&&(v=N0(N1(v,u.bottom),u.top));let y=(p=v).left>n?p.left-n:Math.max(0,n-p.right),x=(f=v).top>i?f.top-i:Math.max(0,i-f.bottom);if(0==y&&0==x)return 3==g.nodeType?N2(g,n,i):e(g,n,i);if(!l||h>x||h==x&&c>y){l=g,u=v,c=y,h=x;let e=x?i<v.top?-1:1:y?n<v.left?-1:1:0;d=!e||(e>0?m<t.length-1:m>0)}0==y?i>v.bottom&&(!a||a.bottom<v.bottom)?(r=g,a=v):i<v.top&&(!s||s.top>v.top)&&(o=g,s=v):a&&NJ(a,v)?a=N1(a,v.bottom):s&&NJ(s,v)&&(s=N0(s,v.top))}}if(a&&a.bottom>=i?(l=r,u=a):s&&s.top<=i&&(l=o,u=s),!l)return{node:t,offset:0};let g=Math.max(u.left,Math.min(u.right,n));if(3==l.nodeType)return N2(l,g,i);if(d&&"false"!=l.contentEditable)return e(l,g,i);let m=Array.prototype.indexOf.call(t.childNodes,l)+ +(n>=(u.left+u.right)/2);return{node:t,offset:m}}(t.dom,c,h))}let x=e.docView.nearest(v);if(!x)return null;if(!x.isWidget||(null===(o=x.dom)||void 0===o?void 0:o.nodeType)!=1)return x.localPosFromDOM(v,y)+x.posAtStart;{let e=x.dom.getBoundingClientRect();return t.y<e.top||t.y<=e.bottom&&t.x<=(e.left+e.right)/2?x.posAtStart:x.posAtEnd}}function N3(e,t,n,i,r){let o=Math.round((i-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((r-n.top-(e.defaultLineHeight-t)*.5)/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+L1(a,o,e.state.tabSize)}function N4(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type)){for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==B0.Text))return e}return n}function N8(e,t,n,i){let r=e.state.doc.lineAt(t.head),o=e.bidiSpans(r),a=e.textDirectionAt(r.from);for(let s=t,l=null;;){let t=function(e,t,n,i,r){var o;let a=i.head-e.from,s=Np.find(t,a,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc),l=t[s],u=l.side(r,n);if(a==u){let e=s+=r?1:-1;if(e<0||e>=t.length)return null;a=(l=t[s=e]).side(!r,n),u=l.side(r,n)}let c=Eq(e.text,a,l.forward(r,n));(c<l.from||c>l.to)&&(c=u),Nm=e.text.slice(Math.min(a,c),Math.max(a,c));let h=s==(r?t.length-1:0)?null:t[s+(r?1:-1)];return h&&c==u&&h.level+ +!r<l.level?E7.cursor(h.side(!r,n)+e.from,h.forward(r,n)?1:-1,h.level):E7.cursor(c+e.from,l.forward(r,n)?-1:1,l.level)}(r,o,a,s,n),u=Nm;if(!t){if(r.number==(n?e.state.doc.lines:1))return s;u="\n",r=e.state.doc.line(r.number+(n?1:-1)),o=e.bidiSpans(r),t=e.visualLineSide(r,!n)}if(l){if(!l(u))return s}else{if(!i)return t;l=i(u)}s=t}}function N6(e,t,n){for(;;){let i=0;for(let r of e)r.between(t-1,t+1,(e,r,o)=>{if(t>e&&t<r){let o=i||n||(t-e<r-t?-1:1);t=o<0?e:r,i=o}});if(!i)return t}}function N9(e,t,n){let i=N6(e.state.facet(Nj).map(t=>t(e)),n.from,t.head>n.from?-1:1);return i==n.from?n:E7.cursor(i,i<n.from?1:-1)}class N7{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(LB.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let i=e;;){this.findPointBefore(n,i);let e=this.text.length;this.readNode(i);let r=i.nextSibling;if(r==t)break;let o=Bk.get(i),a=Bk.get(r);(o&&a?o.breakAfter:(o?o.breakAfter:Bc(i))||Bc(r)&&("BR"!=i.nodeName||i.cmIgnore)&&this.text.length>e)&&this.lineBreak(),i=r}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,a;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=i.exec(t))&&(r=a.index,o=a[0].length),this.append(t.slice(n,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);n=r+o}}readNode(e){if(e.cmIgnore)return;let t=Bk.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(!function(e,t,n){for(;;){if(!t||n<Bd(t))return!1;if(t==e)return!0;n=Bu(t)+1,t=t.parentNode}}(e,n.node,n.offset)?0:t))}}class Fe{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Ft{constructor(e,t,n,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:r,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=r||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}=e.observer.selectionRange;return n&&(t.push(new Fe(n,i)),(r!=n||o!=i)&&t.push(new Fe(r,o))),t}(e),n=new N7(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,i=2==e.length?e[1].pos:n;return n>-1&&i>-1?E7.single(n+t,i+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=r&&r.node==t.focusNode&&r.offset==t.focusOffset||!Bo(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),i=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!Bo(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((Bj.ios||Bj.chrome)&&e.state.selection.main.empty&&n!=i&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(n,i),r=Math.max(n,i),o=a.from-t,s=a.to-r;(0==o||1==o||0==t)&&(0==s||-1==s||r==e.state.doc.length)&&(n=0,i=e.state.doc.length)}this.newSel=E7.single(i,n)}}}function Fn(e,t){let n;let{newSel:i}=t,r=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:i,to:a}=t.bounds,s=r.from,l=null;(8===o||Bj.android&&t.text.length<a-i)&&(s=r.to,l="end");let u=function(e,t,n,i){let r=Math.min(e.length,t.length),o=0;for(;o<r&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==r&&e.length==t.length)return null;let a=e.length,s=t.length;for(;a>0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==i){let e=Math.max(0,o-Math.min(a,s));n-=a+e-o}if(a<o&&e.length<t.length){let e=n<=o&&n>=a?o-n:0;o-=e,s=o+(s-a),a=o}else if(s<o){let e=n<=o&&n>=s?o-n:0;o-=e,a=o+(a-s),s=o}return{from:o,toA:a,toB:s}}(e.state.doc.sliceString(i,a,""),t.text,s-i,l);u&&(Bj.chrome&&13==o&&u.toB==u.from+2&&""==t.text.slice(u.from,u.toB)&&u.toB--,n={from:i+u.from,to:i+u.toA,insert:Ez.of(t.text.slice(u.from,u.toB).split(""))})}else i&&(!e.hasFocus&&e.state.facet(NR)||i.main.eq(r))&&(i=null);if(!n&&!i)return!1;if(!n&&t.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,r.to)}:(Bj.mac||Bj.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(i&&2==n.insert.length&&(i=E7.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:Ez.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:e.state.doc.slice(r.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,r.to))}:Bj.chrome&&n&&n.from==n.to&&n.from==r.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(i&&(i=E7.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:Ez.of([" "])}),n)return Fi(e,n,i,o);if(!i||i.main.eq(r))return!1;{let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:i,scrollIntoView:t,userEvent:n}),!0}}function Fi(e,t,n,i=-1){let r;if(Bj.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(Bj.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&" "==e.state.sliceDoc(t.from,o.from))&&1==t.insert.length&&2==t.insert.lines&&Bx(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==i&&t.insert.length<t.to-t.from&&t.to>o.head)&&Bx(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&Bx(e.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>r||(r=function(e,t,n){let i,r=e.state,o=r.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.from<t.from?r.sliceDoc(o.from,t.from):"",a=o.to>t.to?r.sliceDoc(t.to,o.to):"";i=r.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=r.changes(t),s=n&&n.main.to<=a.newLength?n.main:void 0;if(r.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l=e.state.sliceDoc(t.from,t.to),u,c=n&&NK(e,n.main.head);if(c){let e=t.insert.length-(t.to-t.from);u={from:c.from,to:c.to-e}}else u=e.state.doc.lineAt(o.head);let h=o.to-t.to,d=o.to-o.from;i=r.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:a,range:s||n.map(a)};let i=n.to-h,c=i-l.length;if(n.to-n.from!=d||e.state.sliceDoc(c,i)!=l||n.to>=u.from&&n.from<=u.to)return{range:n};let p=r.changes({from:c,to:i,insert:t.insert}),f=n.to-o.to;return{changes:p,range:s?E7.range(Math.max(0,s.anchor+f),Math.max(0,s.head+f)):n.map(p)}})}else i={changes:a,selection:s&&r.selection.replaceRange(s)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(NS).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}class Fr{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Bj.safari&&e.contentDOM.addEventListener("input",()=>null),Bj.gecko&&(t=e.contentDOM.ownerDocument,FI.has(t)||(FI.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){!(!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,i;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=Bk.get(n))&&i.ignoreEvent(t))return!1;return!0}(this.view,e)||this.ignoreDuringComposition(e))&&("keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let i in e.domEventHandlers){let r=e.domEventHandlers[i];r&&n(i).handlers.push(Fo(t.value,r))}if(e&&e.domEventObservers)for(let i in e.domEventObservers){let r=e.domEventObservers[i];r&&n(i).observers.push(Fo(t.value,r))}}for(let e in Fh)n(e).handlers.push(Fh[e]);for(let e in Fd)n(e).observers.push(Fd[e]);return t}(e),n=this.handlers,i=this.view.contentDOM;for(let e in t)if("scroll"!=e){let r=!t[e].handlers.length,o=n[e];o&&!o.handlers.length!=r&&(i.removeEventListener(e,this.handleEvent),o=null),o||i.addEventListener(e,this.handleEvent,{passive:r})}for(let e in n)"scroll"==e||t[e]||i.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){let t;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),!!(9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))||((this.tabFocusMode>0&&27!=e.keyCode&&0>Fl.indexOf(e.keyCode)&&(this.tabFocusMode=-1),Bj.android&&Bj.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))?(this.view.observer.delayAndroidKey(e.key,e.keyCode),!0):Bj.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Fa.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||Fs.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(229!=e.keyCode&&this.view.observer.forceFlush(),!1))}flushIOSKey(e){let t=this.pendingIOSKey;return!(!t||"Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,Bx(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(Bj.safari&&!Bj.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Fo(e,t){return(n,i)=>{try{return t.call(e,i,n)}catch(e){NO(n.state,e)}}}let Fa=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Fs="dthko",Fl=[16,17,18,20,91,92,224,225];function Fu(e){return .7*Math.max(0,e)+8}class Fc{constructor(e,t,n,i){var r,o;let a;this.view=e,this.startEvent=t,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t=e.ownerDocument,n,i;for(let r=e.parentNode;r&&r!=t.body&&(!n||!i);)if(1==r.nodeType)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(11==r.nodeType)r=r.host;else break;return{x:n,y:i}}(e.contentDOM),this.atoms=e.state.facet(Nj).map(t=>t(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(LB.allowMultipleSelections)&&(r=e,o=t,(a=r.state.facet(Nv)).length?a[0](o):Bj.mac?o.metaKey:o.ctrlKey),this.dragging=!!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let i=Br(e.root);if(!i||0==i.rangeCount)return!0;let r=i.getRangeAt(0).getClientRects();for(let e=0;e<r.length;e++){let n=r[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)&&1==F_(t)&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&10>Math.max(Math.abs((t=this.startEvent).clientX-e.clientX),Math.abs(t.clientY-e.clientY)))return;this.select(this.lastEvent=e);let n=0,i=0,r=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=NG(this.view);e.clientX-l.left<=r+6?n=-Fu(r-e.clientX):e.clientX+l.right>=a-6&&(n=Fu(e.clientX-a)),e.clientY-l.top<=o+6?i=-Fu(o-e.clientY):e.clientY+l.bottom>=s-6&&(i=Fu(e.clientY-s)),this.setScrollSpeed(n,i)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;n<e.ranges.length;n++){let i=e.ranges[n],r=null;if(i.empty){let e=N6(this.atoms,i.from,0);e!=i.from&&(r=E7.cursor(e,-1))}else{let e=N6(this.atoms,i.from,-1),t=N6(this.atoms,i.to,1);(e!=i.from||t!=i.to)&&(r=E7.range(i.from==i.anchor?e:t,i.from==i.head?e:t))}r&&(t||(t=e.ranges.slice()),t[n]=r)}return t?E7.create(t,e.mainIndex):e}select(e){let{view:t}=this,n=this.skipAtoms(this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,!1===this.dragging))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}let Fh=Object.create(null),Fd=Object.create(null),Fp=Bj.ie&&Bj.ie_version<15||Bj.ios&&Bj.webkit_version<604;function Ff(e,t,n){for(let i of e.facet(t))n=i(n,e);return n}function Fg(e,t){t=Ff(e.state,NC,t);let{state:n}=e,i,r=1,o=n.toText(t),a=o.lines==n.selection.ranges.length;if(null!=FM&&n.selection.ranges.every(e=>e.empty)&&FM==o.toString()){let e=-1;i=n.changeByRange(i=>{let s=n.doc.lineAt(i.from);if(s.from==e)return{range:i};e=s.from;let l=n.toText((a?o.line(r++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:l},range:E7.cursor(i.from+l.length)}})}else i=a?n.changeByRange(e=>{let t=o.line(r++);return{changes:{from:e.from,to:e.to,insert:t.text},range:E7.cursor(e.from+t.length)}}):n.replaceSelection(o);e.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function Fm(e,t,n,i){if(1==i)return E7.cursor(t,n);if(2==i)return function(e,t,n=1){let i=e.charCategorizer(t),r=e.doc.lineAt(t),o=t-r.from;if(0==r.length)return E7.cursor(t);0==o?n=1:o==r.length&&(n=-1);let a=o,s=o;n<0?a=Eq(r.text,o,!1):s=Eq(r.text,o);let l=i(r.text.slice(a,s));for(;a>0;){let e=Eq(r.text,a,!1);if(i(r.text.slice(e,a))!=l)break;a=e}for(;s<r.length;){let e=Eq(r.text,s);if(i(r.text.slice(s,e))!=l)break;s=e}return E7.range(a+r.from,s+r.from)}(e.state,t,n);{let n=B6.find(e.docView,t),i=e.state.doc.lineAt(n?n.posAtEnd:t),r=n?n.posAtStart:i.from,o=n?n.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,E7.range(r,o)}}Fd.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Fh.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),Fd.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},Fd.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},Fh.mousedown=(e,t)=>{var n,i;let r,o,a;if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let s=null;for(let n of e.state.facet(Nx))if(s=n(e,t))break;if(s||0!=t.button||(r=Fy(n=e,i=t),o=F_(i),a=n.state.selection,s={update(e){e.docChanged&&(r.pos=e.changes.mapPos(r.pos),a=a.map(e.changes))},get(e,t,i){let s=Fy(n,e),l,u=Fm(n,s.pos,s.bias,o);if(r.pos!=s.pos&&!t){let e=Fm(n,r.pos,r.bias,o),t=Math.min(e.from,u.from),i=Math.max(e.to,u.to);u=t<u.from?E7.range(t,i):E7.range(i,t)}return t?a.replaceRange(a.main.extend(u.from,u.to)):i&&1==o&&a.ranges.length>1&&(l=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:i,to:r}=e.ranges[n];if(i<=t&&r>=t)return E7.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}(a,s.pos))?l:i?a.addRange(u):E7.create([u])}}),s){let n=!e.hasFocus;e.inputState.startMouseSelection(new Fc(e,t,s,n)),n&&e.observer.ignore(()=>{Bv(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let Fv=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function Fy(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:function(e,t,n,i){let r=B6.find(e.docView,t);if(!r)return 1;let o=t-r.posAtStart;if(0==o)return 1;if(o==r.length)return -1;let a=r.coordsAt(o,-1);if(a&&Fv(n,i,a))return -1;let s=r.coordsAt(o,1);return s&&Fv(n,i,s)?1:a&&a.bottom>=i?-1:1}(e,n,t.clientX,t.clientY)}}let Fx=Bj.ie&&Bj.ie_version<=11,Fb=null,Fw=0,FS=0;function F_(e){if(!Fx)return e.detail;let t=Fb,n=FS;return Fb=e,FS=Date.now(),Fw=!t||n>Date.now()-400&&2>Math.abs(t.clientX-e.clientX)&&2>Math.abs(t.clientY-e.clientY)?(Fw+1)%3:1}function FC(e,t,n,i){let r;if(!(n=Ff(e.state,NC,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,s=i&&a&&((r=e.state.facet(Ny)).length?r[0](t):Bj.mac?!t.altKey:!t.ctrlKey)?{from:a.from,to:a.to}:null,l={from:o,insert:n},u=e.state.changes(s?[s,l]:l);e.focus(),e.dispatch({changes:u,selection:{anchor:u.mapPos(o,-1),head:u.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}Fh.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let i=e.docView.nearest(t.target);if(i&&i.isWidget){let e=i.posAtStart,t=e+i.length;(e>=n.to||t<=n.from)&&(n=E7.range(e,t))}}let{inputState:i}=e;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",Ff(e.state,NM,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},Fh.dragend=e=>(e.inputState.draggedContent=null,!1),Fh.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,o=()=>{++r==n.length&&FC(e,t,i.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(i[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return FC(e,t,n,!0),!0}return!1},Fh.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Fp?null:t.clipboardData;return n?(Fg(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),Fg(e,n.value)},50)}(e),!1)};let FM=null;Fh.copy=Fh.cut=(e,t)=>{let{text:n,ranges:i,linewise:r}=function(e){let t=[],n=[],i=!1;for(let i of e.selection.ranges)i.empty||(t.push(e.sliceDoc(i.from,i.to)),n.push(i));if(!t.length){let r=-1;for(let{from:i}of e.selection.ranges){let o=e.doc.lineAt(i);o.number>r&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),r=o.number}i=!0}return{text:Ff(e,NM,t.join(e.lineBreak)),ranges:n,linewise:i}}(e.state);if(!n&&!r)return!1;FM=r?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let o=Fp?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(!function(e,t){let n=e.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=t,i.focus(),i.selectionEnd=t.length,i.selectionStart=0,setTimeout(()=>{i.remove(),e.focus()},50)}(e,n),!1)};let Fk=LM.define();function FT(e,t){let n=[];for(let i of e.facet(N_)){let r=i(e,t);r&&n.push(r)}return n?e.update({effects:n,annotations:Fk.of(!0)}):null}function FD(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=FT(e.state,t);n?e.dispatch(n):e.update([])}},10)}Fd.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),FD(e)},Fd.blur=e=>{e.observer.clearSelectionRange(),FD(e)},Fd.compositionstart=Fd.compositionupdate=e=>{!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},Fd.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Bj.chrome&&Bj.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},Fd.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Fh.beforeinput=(e,t)=>{var n,i;let r;if("insertReplacementText"==t.inputType&&e.observer.editContext){let i=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),r=t.getTargetRanges();if(i&&r.length){let t=r[0],n=e.posAtDOM(t.startContainer,t.startOffset),o=e.posAtDOM(t.endContainer,t.endOffset);return Fi(e,{from:n,to:o,insert:e.state.toText(i)},null),!0}}if(Bj.chrome&&Bj.android&&(r=Fa.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return Bj.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),Bj.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>Fd.compositionend(e,t),20),!1};let FI=new Set,FA=["pre-wrap","normal","pre-line","break-spaces"],FP=!1;class FO{constructor(e){this.lineWrapping=e,this.doc=Ez.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return FA.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let i=e[n];i<0?n++:this.heightSamples[Math.floor(10*i)]||(t=!0,this.heightSamples[Math.floor(10*i)]=!0)}return t}refresh(e,t,n,i,r,o){let a=FA.indexOf(e)>-1,s=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=a;if(this.lineWrapping=a,this.lineHeight=t,this.charWidth=n,this.textHeight=i,this.lineLength=r,s){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return s}}class FR{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class FE{constructor(e,t,n,i,r){this.from=e,this.length=t,this.top=n,this.height=i,this._content=r}get type(){return"number"==typeof this._content?B0.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof B3?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new FE(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var FL=((N=FL||(FL={}))[N.ByPos=0]="ByPos",N[N.ByHeight=1]="ByHeight",N[N.ByPosNoHeight=2]="ByPosNoHeight",N);class FB{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=2*!!e|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>.001&&(FP=!0),this.height=e)}replace(e,t,n){return FB.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,i){let r=this,o=n.doc;for(let a=i.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:u,toB:c}=i[a],h=r.lineAt(s,FL.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=l?h:r.lineAt(l,FL.ByPosNoHeight,n,0,0);for(c+=d.to-l,l=d.to;a>0&&h.from<=i[a-1].toA;)s=i[a-1].fromA,u=i[a-1].fromB,a--,s<h.from&&(h=r.lineAt(s,FL.ByPosNoHeight,n,0,0));u+=h.from-s,s=h.from;let p=FH.build(n.setDoc(o),e,u,c);r=FN(r,r.replace(s,l,p))}return r.updateHeight(n,0)}static empty(){return new Fz(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,i=0,r=0;for(;;)if(t==n){if(i>2*r){let r=e[t-1];r.break?e.splice(--t,1,r.left,null,r.right):e.splice(--t,1,r.left,r.right),n+=1+r.break,i-=r.size}else if(r>2*i){let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,r-=t.size}else break}else if(i<r){let n=e[t++];n&&(i+=n.size)}else{let t=e[--n];t&&(r+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new FZ(FB.of(e.slice(0,t)),o,FB.of(e.slice(n)))}}function FN(e,t){return e==t?e:(e.constructor!=t.constructor&&(FP=!0),t)}FB.prototype.size=1;class FF extends FB{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,i){return new FE(i,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,i,r){return this.blockAt(0,n,i,r)}forEachLine(e,t,n,i,r,o){e<=r+this.length&&t>=r&&o(this.blockAt(0,n,i,r))}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Fz extends FF{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,i){return new FE(i,this.length,n,this.height,this.breaks)}replace(e,t,n){let i=n[0];return 1==n.length&&(i instanceof Fz||i instanceof FV&&4&i.flags)&&10>Math.abs(this.length-i.length)?(i instanceof FV?i=new Fz(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):FB.of(n)}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class FV extends FB{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,r=i-n+1,o,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*r);o=t/r,this.length>r+1&&(a=(this.height-t)/(this.length-r-1))}else o=this.height/r;return{firstLine:n,lastLine:i,perLine:o,perChar:a}}blockAt(e,t,n,i){let{firstLine:r,lastLine:o,perLine:a,perChar:s}=this.heightMetrics(t,i);if(t.lineWrapping){let r=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),o=t.doc.lineAt(r),l=a+o.length*s,u=Math.max(n,e-l/2);return new FE(o.from,o.length,u,l,0)}{let i=Math.max(0,Math.min(o-r,Math.floor((e-n)/a))),{from:s,length:l}=t.doc.line(r+i);return new FE(s,l,n+a*i,a,0)}}lineAt(e,t,n,i,r){if(t==FL.ByHeight)return this.blockAt(e,n,i,r);if(t==FL.ByPosNoHeight){let{from:t,to:i}=n.doc.lineAt(e);return new FE(t,i-t,0,0,0)}let{firstLine:o,perLine:a,perChar:s}=this.heightMetrics(n,r),l=n.doc.lineAt(e),u=a+l.length*s,c=l.number-o,h=i+a*c+s*(l.from-r-c);return new FE(l.from,l.length,Math.max(i,Math.min(h,i+this.height-u)),u,0)}forEachLine(e,t,n,i,r,o){e=Math.max(e,r),t=Math.min(t,r+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(n,r);for(let u=e,c=i;u<=t;){let t=n.doc.lineAt(u);if(u==e){let n=t.number-a;c+=s*n+l*(e-r-n)}let i=s+l*t.length;o(new FE(t.from,t.length,c,i,0)),c+=i,u=t.to+1}}replace(e,t,n){let i=this.length-t;if(i>0){let e=n[n.length-1];e instanceof FV?n[n.length-1]=new FV(e.length+i):n.push(null,new FV(i-1))}if(e>0){let t=n[0];t instanceof FV?n[0]=new FV(e+t.length):n.unshift(new FV(e-1),null)}return FB.of(n)}decomposeLeft(e,t){t.push(new FV(e-1),null)}decomposeRight(e,t){t.push(null,new FV(this.length-e-1))}updateHeight(e,t=0,n=!1,i){let r=t+this.length;if(i&&i.from<=t+this.length&&i.more){let n=[],o=Math.max(t,i.from),a=-1;for(i.from>t&&n.push(new FV(i.from-t-1).updateHeight(e,t));o<=r&&i.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let r=i.heights[i.index++];-1==a?a=r:Math.abs(r-a)>=.001&&(a=-2);let s=new Fz(t,r);s.outdated=!1,n.push(s),o+=t+1}o<=r&&n.push(null,new FV(r-o).updateHeight(e,o));let s=FB.of(n);return(a<0||Math.abs(s.height-this.height)>=.001||Math.abs(a-this.heightMetrics(e,t).perLine)>=.001)&&(FP=!0),FN(this,s)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class FZ extends FB{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,i){let r=n+this.left.height;return e<r?this.left.blockAt(e,t,n,i):this.right.blockAt(e,t,r,i+this.left.length+this.break)}lineAt(e,t,n,i,r){let o=i+this.left.height,a=r+this.left.length+this.break,s=t==FL.ByHeight?e<o:e<a,l=s?this.left.lineAt(e,t,n,i,r):this.right.lineAt(e,t,n,o,a);if(this.break||(s?l.to<a:l.from>a))return l;let u=t==FL.ByPosNoHeight?FL.ByPosNoHeight:FL.ByPos;return s?l.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,i,r).join(l)}forEachLine(e,t,n,i,r,o){let a=i+this.left.height,s=r+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,i,r,o),t>=s&&this.right.forEachLine(e,t,n,a,s,o);else{let l=this.lineAt(s,FL.ByPos,n,i,r);e<l.from&&this.left.forEachLine(e,l.from-1,n,i,r,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,a,s,o)}}replace(e,t,n){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,n));let r=[];e>0&&this.decomposeLeft(e,r);let o=r.length;for(let e of n)r.push(e);if(e>0&&Fj(r,o-1),t<this.length){let e=r.length;this.decomposeRight(t,r),Fj(r,e)}return FB.of(r)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++n&&t.push(null),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?FB.of(this.break?[e,null,t]:[e,t]):(this.left=FN(this.left,e),this.right=FN(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,i){let{left:r,right:o}=this,a=t+r.length+this.break,s=null;return(i&&i.from<=t+r.length&&i.more?s=r=r.updateHeight(e,t,n,i):r.updateHeight(e,t,n),i&&i.from<=a+o.length&&i.more?s=o=o.updateHeight(e,a,n,i):o.updateHeight(e,a,n),s)?this.balanced(r,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Fj(e,t){let n,i;null==e[t]&&(n=e[t-1])instanceof FV&&(i=e[t+1])instanceof FV&&e.splice(t-1,3,new FV(n.length+1+i.length))}class FH{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof Fz?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new Fz(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let i=n.widget?n.widget.estimatedHeight:0,r=n.widget?n.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new FF(o,i,n)):(o||r||i>=5)&&this.addLineDeco(i,r,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Fz(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new FV(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Fz)return e;let t=new Fz(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof Fz||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new Fz(0,-1));let n=e;for(let e of this.nodes)e instanceof Fz&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,i){let r=new FH(n,e);return Lj.spans(t,n,i,r,0),r.finish(n)}}class FW{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,i){(e<t||n&&n.heightRelevant||i&&i.heightRelevant)&&B8(e,t,this.changes,5)}}class F${constructor(e,t,n,i){this.from=e,this.to=t,this.size=n,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let i=e[n],r=t[n];if(i.from!=r.from||i.to!=r.to||i.size!=r.size)return!1}return!0}draw(e,t){return B1.replace({widget:new FG(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class FG extends BJ{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class FU{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=FK,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ni.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Nz).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new FO(t),this.stateDeco=e.facet(NV).filter(e=>"function"!=typeof e),this.heightMap=FB.empty().applyChanges(this.stateDeco,Ez.empty,this.heightOracle.setDoc(e.doc),[new Nq(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=B1.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let i=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>i>=e&&i<=t)){let{from:t,to:n}=this.lineBlockAt(i);e.push(new Fq(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?FK:new FQ(this.heightOracle,this.heightMap,this.viewports),2*!e.eq(this.scaler)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(FJ(e,this.scaler))})}update(e,t=null){var n,i;let r;this.state=e.state;let o=this.stateDeco;this.stateDeco=this.state.facet(NV).filter(e=>"function"!=typeof e);let a=e.changedRanges,s=Nq.extendWithRanges(a,(n=this.stateDeco,i=e?e.changes:E1.empty(this.state.doc.length),r=new FW,Lj.compare(o,n,i,r,0),r.changes)),l=this.heightMap.height,u=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);FP=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=l||FP)&&(e.flags|=2),u?(this.scrollAnchorPos=e.changes.mapPos(u.from,-1),this.scrollAnchorHeight=u.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(NT)&&(this.mustEnforceCursorAssoc=!0)}measure(e){var t;let n,i,r=e.contentDOM,o=window.getComputedStyle(r),a=this.heightOracle,s=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?Ni.RTL:Ni.LTR;let l=this.heightOracle.mustRefreshForWrapping(s),u=r.getBoundingClientRect(),c=l||this.mustMeasureContent||this.contentDOMHeight!=u.height;this.contentDOMHeight=u.height,this.mustMeasureContent=!1;let h=0,d=0;if(u.width&&u.height){let{scaleX:e,scaleY:t}=Bf(r,u);(e>.005&&Math.abs(this.scaleX-e)>.005||t>.005&&Math.abs(this.scaleY-t)>.005)&&(this.scaleX=e,this.scaleY=t,h|=16,l=c=!0)}let p=(parseInt(o.paddingTop)||0)*this.scaleY,f=(parseInt(o.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=f)&&(this.paddingTop=p,this.paddingBottom=f,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(a.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let g=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=g&&(this.scrollAnchorHeight=-1,this.scrollTop=g),this.scrolledToBottom=Bw(e.scrollDOM);let m=(this.printing?function(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}:function(e,t){let n=e.getBoundingClientRect(),i=e.ownerDocument,r=i.defaultView||window,o=Math.max(0,n.left),a=Math.min(r.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(r.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=i.body;)if(1==t.nodeType){let n=t,i=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=i.overflow){let i=n.getBoundingClientRect();o=Math.max(o,i.left),a=Math.min(a,i.right),s=Math.max(s,i.top),l=Math.min(t==e.parentNode?r.innerHeight:l,i.bottom)}t="absolute"==i.position||"fixed"==i.position?n.offsetParent:n.parentNode}else if(11==t.nodeType)t=t.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,l)-(n.top+t)}})(r,this.paddingTop),v=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(c=!0)),!this.inView&&!this.scrollTarget&&(n=(t=e.dom).getBoundingClientRect(),i=t.ownerDocument.defaultView||window,!(n.left<i.innerWidth)||!(n.right>0)||!(n.top<i.innerHeight)||!(n.bottom>0)))return 0;let b=u.width;if((this.contentDOMWidth!=b||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=u.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let t=e.docView.measureVisibleLineHeights(this.viewport);if(a.mustRefreshForHeights(t)&&(l=!0),l||a.lineWrapping&&Math.abs(b-this.contentDOMWidth)>a.charWidth){let{lineHeight:n,charWidth:i,textHeight:r}=e.docView.measureTextSize();(l=n>0&&a.refresh(s,n,i,r,b/i,t))&&(e.docView.minWidth=0,h|=16)}for(let n of(v>0&&y>0?d=Math.max(v,y):v<0&&y<0&&(d=Math.min(v,y)),FP=!1,this.viewports)){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(l?FB.empty().applyChanges(this.stateDeco,Ez.empty,this.heightOracle,[new Nq(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(a,0,l,new FR(n.from,i))}FP&&(h|=2)}let w=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(2&h&&(h|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),h|=this.updateForViewport()),(2&h||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,r=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,s=new Fq(i.lineAt(o-1e3*n,FL.ByHeight,r,0,0).from,i.lineAt(a+(1-n)*1e3,FL.ByHeight,r,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=i.lineAt(e,FL.ByPos,r,0,0),a;a="center"==t.y?(o.top+o.bottom)/2-n/2:"start"==t.y||"nearest"==t.y&&e<s.from?o.top:o.bottom-n,s=new Fq(i.lineAt(a-500,FL.ByHeight,r,0,0).from,i.lineAt(a+n+500,FL.ByHeight,r,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new Fq(this.heightMap.lineAt(n,FL.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,FL.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,FL.ByPos,this.heightOracle,0,0),{bottom:r}=this.heightMap.lineAt(t,FL.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(0==e||i<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||r>=a+Math.max(10,Math.min(n,250)))&&i>o-2e3&&r<a+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let i of e)t.touchesRange(i.from,i.to)||n.push(new F$(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,r=i>>1,o=i<<1;if(this.defaultTextDirection!=Ni.LTR&&!n)return[];let a=[],s=(i,o,l,u)=>{if(o-i<r)return;let c=this.state.selection.main,h=[c.from];for(let e of(c.empty||h.push(c.to),h))if(e>i&&e<o){s(i,e-10,l,u),s(e+10,o,l,u);return}let d=function(e,t){for(let n of e)if(t(n))return n}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-i)<r&&Math.abs(e.to-o)<r&&!h.some(t=>e.from<t&&e.to>t));if(!d){if(o<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(E7.cursor(o),!1,!0).head;e>i&&(o=e)}let e=this.gapSize(l,i,o,u),r=n||e<2e6?e:2e6;d=new F$(i,o,e,r)}a.push(d)},l=t=>{var r,a,l;let u,c,h,d,p;if(t.length<o||t.type!=B0.Text)return;let f=(r=t.from,a=t.to,l=this.stateDeco,h=[],d=r,p=0,Lj.spans(l,r,a,{span(){},point(e,t){e>d&&(h.push({from:d,to:e}),p+=e-d),d=t}},20),d<a&&(h.push({from:d,to:a}),p+=a-d),{total:p,ranges:h});if(f.total<o)return;let g=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,r=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=g){let i=FX(f,g),o=((this.visibleBottom-this.visibleTop)/2+r)/t.height;e=i-o,n=i+o}else e=(this.visibleTop-t.top-r)/t.height,n=(this.visibleBottom-t.top+r)/t.height;u=FY(f,e),c=FY(f,n)}else{let n,r,o=f.total*this.heightOracle.charWidth,a=i*this.heightOracle.charWidth,s=0;if(o>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let l=this.pixelViewport.left+s,h=this.pixelViewport.right+s;if(null!=g){let e=FX(f,g),t=((h-l)/2+a)/o;n=e-t,r=e+t}else n=(l-a)/o,r=(h+a)/o;u=FY(f,n),c=FY(f,r)}u>t.from&&s(t.from,u,t,f),c<t.to&&s(c,t.to,t,f)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return a}gapSize(e,t,n,i){let r=FX(i,n)-FX(i,t);return this.heightOracle.lineWrapping?e.height*r:i.total*this.heightOracle.charWidth*r}updateLineGaps(e){F$.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=B1.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Lj.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let i=0;if(n.length!=this.visibleRanges.length)i=12;else for(let t=0;t<n.length&&!(8&i);t++){let r=this.visibleRanges[t],o=n[t];r.from==o.from&&r.to==o.to||(i|=4,e&&e.mapPos(r.from,-1)==o.from&&e.mapPos(r.to,1)==o.to||(i|=8))}return this.visibleRanges=n,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||FJ(this.heightMap.lineAt(e,FL.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||FJ(this.heightMap.lineAt(this.scaler.fromDOM(e),FL.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return FJ(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fq{constructor(e,t){this.from=e,this.to=t}}function FY({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let i=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:r}=t[e],o=r-n;if(i<=o)return n+i;i-=o}}function FX(e,t){let n=0;for(let{from:i,to:r}of e.ranges){if(t<=r){n+=t-i;break}n+=r-i}return n/e.total}let FK={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class FQ{constructor(e,t,n){let i=0,r=0,o=0;for(let a of(this.viewports=n.map(({from:n,to:r})=>{let o=t.lineAt(n,FL.ByPos,e,0,0).top,a=t.lineAt(r,FL.ByPos,e,0,0).bottom;return i+=a-o,{from:n,to:r,top:o,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i),this.viewports))a.domTop=o+(a.top-r)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),r=a.bottom}toDOM(e){for(let t=0,n=0,i=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.top)return i+(e-n)*this.scale;if(e<=r.bottom)return r.domTop+(e-r.top);n=r.bottom,i=r.domBottom}}fromDOM(e){for(let t=0,n=0,i=0;;t++){let r=t<this.viewports.length?this.viewports[t]:null;if(!r||e<r.domTop)return n+(e-i)/this.scale;if(e<=r.domBottom)return r.top+(e-r.domTop);n=r.bottom,i=r.domBottom}}eq(e){return e instanceof FQ&&this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function FJ(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),i=t.toDOM(e.bottom);return new FE(e.from,e.length,n,i-n,Array.isArray(e._content)?e._content.map(e=>FJ(e,t)):e._content)}let F0=Ln.define({combine:e=>e.join(" ")}),F1=Ln.define({combine:e=>e.indexOf(!0)>-1}),F2=L4.newName(),F5=L4.newName(),F3=L4.newName(),F4={"&light":"."+F5,"&dark":"."+F3};function F8(e,t,n){return new L4(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t})}let F6=F8("."+F2,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},F4),F9={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},F7=Bj.ie&&Bj.ie_version<=11;class ze{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Bg,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(Bj.ie&&Bj.ie_version<=11||Bj.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&!1!==e.constructor.EDIT_CONTEXT&&!(Bj.chrome&&Bj.chrome_version<126)&&(this.editContext=new zi(e),e.state.facet(NR)&&(e.contentDOM.editContext=this.editContext.editContext)),F7&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){for(let t of(this.gapIntersection.disconnect(),e))this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(NR)?n.root.activeElement!=this.dom:!Ba(this.dom,i))return;let r=i.anchorNode&&n.docView.nearest(i.anchorNode);if(r&&r.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Bj.ie&&Bj.ie_version<=11||Bj.android&&Bj.chrome)&&!n.state.selection.main.empty&&i.focusNode&&Bl(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Br(e.root);if(!t)return!1;let n=Bj.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return zn(e,n)}let n=null;function i(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",i,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",i,!0),n?zn(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let i=Ba(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,i=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=i)return!1;for(i=Math.min(i,Bd(n));;)if(i){if(1!=n.nodeType)return!1;let e=n.childNodes[i-1];"false"==e.contentEditable?i--:i=Bd(n=e)}else{if(n==e)return!0;i=Bu(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(1==n.nodeType)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(11==n.nodeType)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,F9),F7&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),F7&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;this.delayedAndroidKey||(this.flushingAndroidKey=this.view.win.requestAnimationFrame(()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Bx(this.dom,e.key,e.keyCode))})),this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,i=!1;for(let r of e){let e=this.readMutation(r);e&&(e.typeOver&&(i=!0),-1==t?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:i}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),i=this.selectionChanged&&Ba(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let r=new Ft(this.view,e,t,n);return this.view.docView.domChanged={newSel:r.newSel?r.newSel.main:null},r}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,i=Fn(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=zt(t,e.previousSibling||e.target.previousSibling,-1),i=zt(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(NR)!=e.state.facet(NR)&&(e.view.contentDOM.editContext=e.state.facet(NR)?this.editContext.editContext:null))}destroy(){var e,t,n;for(let i of(this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect(),this.scrollTargets))i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function zt(e,t,n){for(;t;){let i=Bk.get(t);if(i&&i.parent==e)return i;let r=t.parentNode;t=r!=e.dom?r:n>0?t.nextSibling:t.previousSibling}return null}function zn(e,t){let n=t.startContainer,i=t.startOffset,r=t.endContainer,o=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return Bl(a.node,a.offset,r,o)&&([n,i,r,o]=[r,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:o}}class zi{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});for(let n in this.handlers.textupdate=t=>{let n=e.state.selection.main,{anchor:i,head:r}=n,o=this.toEditorPos(t.updateRangeStart),a=this.toEditorPos(t.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:t.updateRangeStart,editorBase:o,drifted:!1});let s={from:o,to:a,insert:Ez.of(t.text.split("\n"))};if(s.from==this.from&&i<this.from?s.from=i:s.to==this.to&&i>this.to&&(s.to=i),s.from==s.to&&!s.insert.length){let i=E7.single(this.toEditorPos(t.selectionStart),this.toEditorPos(t.selectionEnd));i.main.eq(n)||e.dispatch({selection:i,userEvent:"select"});return}if((Bj.mac||Bj.android)&&s.from==r-1&&/^\. ?$/.test(t.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(s={from:o,to:a,insert:Ez.of([t.text.replace("."," ")])}),this.pendingContextChange=s,!e.state.readOnly){let n=this.to-this.from+(s.to-s.from+s.insert.length);Fi(e,s,E7.single(this.toEditorPos(t.selectionStart,n),this.toEditorPos(t.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state))},this.handlers.characterboundsupdate=n=>{let i=[],r=null;for(let t=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);t<o;t++){let n=e.coordsForChar(t);r=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||r||new DOMRect,i.push(r)}t.updateCharacterBounds(n.rangeStart,i)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,i=e.underlineThickness;if("None"!=t&&"None"!=i){let r=this.toEditorPos(e.rangeStart),o=this.toEditorPos(e.rangeEnd);if(r<o){let e=`text-decoration: underline ${"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${"Thin"==i?1:2}px`;n.push(B1.mark({attributes:{style:e}}).range(r,o))}}}e.dispatch({effects:NP.of(B1.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}},this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=Br(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,i=this.pendingContextChange;return e.changes.iterChanges((r,o,a,s,l)=>{if(n)return;let u=l.length-(o-r);if(i&&o>=i.to){if(i.from==r&&i.to==o&&i.insert.eq(l)){i=this.pendingContextChange=null,t+=u,this.to+=u;return}i=null,this.revertPending(e.state)}if(r+=t,(o+=t)<=this.from)this.from+=u,this.to+=u;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+l.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),l.toString()),this.to+=u}t+=u}),i&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(n,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class zr{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;for(let t of(this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new FU(e.state||LB.create(e)),e.scrollTo&&e.scrollTo.is(NA)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(NL).map(e=>new NN(e)),this.plugins))t.update(this);this.observer=new ze(this),this.inputState=new Fr(this),this.inputState.ensureHandlers(this.plugins),this.docView=new NX(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(t=document.fonts)||void 0===t?void 0:t.ready)&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=1==e.length&&e[0]instanceof LI?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,i,r=this.state;for(let t of e){if(t.startState!=r)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=t.state}if(this.destroyed){this.viewState.state=r;return}let o=this.hasFocus,a=0,s=null;e.some(e=>e.annotation(Fk))?(this.inputState.notifiedFocused=o,a=1):o==this.inputState.notifiedFocused||(this.inputState.notifiedFocused=o,(s=FT(r,o))||(a=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),((u=this.observer.readChange())&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))&&(u=null)):this.observer.clear(),r.facet(LB.phrases)!=this.state.facet(LB.phrases))return this.setState(r);i=NY.create(this,r,e),i.flags|=a;let c=this.viewState.scrollTarget;try{for(let t of(this.updateState=2,e)){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;c=new NI(e.empty?e:E7.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(NA)&&(c=e.value.clip(this.state))}this.viewState.update(i,c),this.bidiCache=zs.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(NU)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(F0)!=i.state.facet(F0)&&(this.viewState.mustMeasureContent=!0),(t||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(Nw))try{e(i)}catch(e){NO(this.state,e,"update listener")}(s||u)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),u&&!Fn(this,u)&&l.force&&Bx(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);for(let t of(this.viewState=new FU(e),this.plugins=e.facet(NL).map(e=>new NN(e)),this.pluginMap.clear(),this.plugins))t.update(this);this.docView.destroy(),this.docView=new NX(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(NL),n=e.state.facet(NL);if(t!=n){let i=[];for(let r of n){let n=t.indexOf(r);if(n<0)i.push(new NN(r));else{let t=this.plugins[n];t.mustUpdate=e,i.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){NO(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:r,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0){if(Bw(n))r=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(i);r=e.from,o=e.top}}this.updateState=1;let a=this.viewState.measure(this);if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&a||([this.measureRequests,s]=[s,this.measureRequests]);let l=s.map(e=>{try{return e.read(this)}catch(e){return NO(this.state,e),za}}),u=NY.create(this,this.state,[]),c=!1;u.flags|=a,t?t.flags|=a:t=u,this.updateState=2,!u.empty&&(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),(c=this.docView.update(u))&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(l[e]!=za)try{let t=s[e];t.write&&t.write(l[e],this)}catch(e){NO(this.state,e)}if(c&&this.docView.updateSelection(!0),!u.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let e=(r<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(r).top)-o;if(e>1||e<-1){i+=e,n.scrollTop=i/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Nw))e(t)}get themeClasses(){return F2+" "+(this.state.facet(F1)?F3:F5)+" "+this.state.facet(F0)}updateAttrs(){let e=zl(this,NF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(NR)?"true":"false",class:"cm-content",style:`${Bj.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),zl(this,Nz,t);let n=this.observer.ignore(()=>{let n=BQ(this.contentDOM,this.contentAttrs,t),i=BQ(this.dom,this.editorAttrs,e);return n||i});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)e.is(zr.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(NU);let e=this.state.facet(zr.cspNonce);L4.mount(this.root,this.styleModules.concat(F6).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e&&!(this.measureRequests.indexOf(e)>-1)){if(null!=e.key){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return N9(this,e,N8(this,e,t,n))}moveByGroup(e,t){return N9(this,e,N8(this,e,t,t=>{var n;let i,r;return n=e.head,r=(i=this.state.charCategorizer(n))(t),e=>{let t=i(e);return r==LE.Space&&(r=t),r==t}}))}visualLineSide(e,t){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),r=n[t?n.length-1:0];return E7.cursor(r.side(t,i)+e.from,r.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,i){let r=N4(e,t.head),o=i&&r.type==B0.Text&&(e.lineWrapping||r.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>r.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),i=e.textDirectionAt(r.from),a=e.posAtCoords({x:n==(i==Ni.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=a)return E7.cursor(a,n?-1:1)}return E7.cursor(n?r.to:r.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return N9(this,e,function(e,t,n,i){let r=t.head,o=n?1:-1;if(r==(n?e.state.doc.length:0))return E7.cursor(r,t.assoc);let a=t.goalColumn,s,l=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(r,t.assoc||-1),c=e.documentTop;if(u)null==a&&(a=u.left-l.left),s=o<0?u.top:u.bottom;else{let t=e.viewState.lineBlockAt(r);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(r-t.from))),s=(o<0?t.top:t.bottom)+c}let h=l.left+a,d=null!=i?i:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(d+t)*o,i=N5(e,{x:h,y:n},!1,o);if(n<l.top||n>l.bottom||(o<0?i<r:i>r)){let t=e.docView.coordsForChar(i),r=!t||n<t.top?-1:1;return E7.cursor(i,r,void 0,a)}}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),N5(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),r=this.bidiSpans(i);return Bp(n,r[Np.find(r,e-i.from,-1,t)].dir==Ni.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Nk)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>zo)return Ng(e.length);let t=this.textDirectionAt(e.from),n;for(let i of this.bidiCache)if(i.from==e.from&&i.dir==t&&(i.fresh||function e(t,n){if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],o=n[i];if(r.from!=o.from||r.to!=o.to||r.direction!=o.direction||!e(r.inner,o.inner))return!1}return!0}(i.isolates,n=NW(this,e))))return i.order;n||(n=NW(this,e));let i=function(e,t,n){if(!e)return[new Np(0,0,+(t==No))];if(t==Nr&&!n.length&&!Nd.test(e))return Ng(e.length);if(n.length)for(;e.length>Nf.length;)Nf[Nf.length]=256;let i=[],r=+(t!=Nr);return function e(t,n,i,r,o,a,s){let l=n%2?2:1;!function(e,t,n,i,r){for(let o=0;o<=i.length;o++){let a=o?i[o-1].to:t,s=o<i.length?i[o].from:n,l=o?256:r;for(let t=a,n=l,i=l;t<s;t++){let r=Nh(e.charCodeAt(t));512==r?r=n:8==r&&4==i&&(r=16),Nf[t]=4==r?2:r,7&r&&(i=r),n=r}for(let e=a,t=l,i=l;e<s;e++){let r=Nf[e];if(128==r)e<s-1&&t==Nf[e+1]&&24&t?r=Nf[e]=t:Nf[e]=256;else if(64==r){let r=e+1;for(;r<s&&64==Nf[r];)r++;let o=e&&8==t||r<n&&8==Nf[r]?1==i?1:8:256;for(let t=e;t<r;t++)Nf[t]=o;e=r-1}else 8==r&&1==i&&(Nf[e]=1);t=r,7&r&&(i=r)}}}(t,o,a,r,l),function(e,t,n,i,r){let o=1==r?2:1;for(let a=0,s=0,l=0;a<=i.length;a++){let u=a?i[a-1].to:t,c=a<i.length?i[a].from:n;for(let t=u,n,i,a;t<c;t++)if(i=Nu[n=e.charCodeAt(t)]){if(i<0){for(let e=s-3;e>=0;e-=3)if(Nc[e+1]==-i){let n=Nc[e+2],i=2&n?r:4&n?1&n?o:r:0;i&&(Nf[t]=Nf[Nc[e]]=i),s=e;break}}else if(189==Nc.length)break;else Nc[s++]=t,Nc[s++]=n,Nc[s++]=l}else if(2==(a=Nf[t])||1==a){let e=a==r;l=+!e;for(let t=s-3;t>=0;t-=3){let n=Nc[t+2];if(2&n)break;if(e)Nc[t+2]|=2;else{if(4&n)break;Nc[t+2]|=4}}}}}(t,o,a,r,l),function(e,t,n,i){for(let r=0,o=i;r<=n.length;r++){let a=r?n[r-1].to:e,s=r<n.length?n[r].from:t;for(let l=a;l<s;){let a=Nf[l];if(256==a){let a=l+1;for(;;)if(a==s){if(r==n.length)break;a=n[r++].to,s=r<n.length?n[r].from:t}else if(256==Nf[a])a++;else break;let u=1==o,c=u==((a<t?Nf[a]:i)==1)?u?1:2:i;for(let t=a,i=r,o=i?n[i-1].to:e;t>l;)t==o&&(t=n[--i].from,o=i?n[i-1].to:e),Nf[--t]=c;l=a}else o=a,l++}}}(o,a,r,l),function t(n,i,r,o,a,s,l){let u=o%2?2:1;if(o%2==a%2)for(let c=i,h=0;c<r;){let i=!0,d=!1;if(h==s.length||c<s[h].from){let e=Nf[c];e!=u&&(i=!1,d=16==e)}let p=i||1!=u?null:[],f=i?o:o+1,g=c;r:for(;;)if(h<s.length&&g==s[h].from){if(d)break;let t=s[h];if(!i)for(let e=t.to,n=h+1;;){if(e==r)break r;if(n<s.length&&s[n].from==e)e=s[n++].to;else if(Nf[e]==u)break r;else break}h++,p?p.push(t):(t.from>c&&l.push(new Np(c,t.from,f)),e(n,t.direction==Nr!=!(f%2)?o+1:o,a,t.inner,t.from,t.to,l),c=t.to),g=t.to}else if(g==r||(i?Nf[g]!=u:Nf[g]==u))break;else g++;p?t(n,c,g,o+1,a,p,l):c<g&&l.push(new Np(c,g,f)),c=g}else for(let c=r,h=s.length;c>i;){let r=!0,d=!1;if(!h||c>s[h-1].to){let e=Nf[c-1];e!=u&&(r=!1,d=16==e)}let p=r||1!=u?null:[],f=r?o:o+1,g=c;r:for(;;)if(h&&g==s[h-1].to){if(d)break;let t=s[--h];if(!r)for(let e=t.from,n=h;;){if(e==i)break r;if(n&&s[n-1].to==e)e=s[--n].from;else if(Nf[e-1]==u)break r;else break}p?p.push(t):(t.to<c&&l.push(new Np(t.to,c,f)),e(n,t.direction==Nr!=!(f%2)?o+1:o,a,t.inner,t.from,t.to,l),c=t.from),g=t.from}else if(g==i||(r?Nf[g-1]!=u:Nf[g-1]==u))break;else g--;p?t(n,g,c,o+1,a,p,l):g<c&&l.push(new Np(g,c,f)),c=g}}(t,o,a,n,i,r,s)}(e,r,r,n,0,e.length,i),i}(e.text,t,n);return this.bidiCache.push(new zs(e.from,e.to,t,n,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Bj.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Bv(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of(this.root.activeElement==this.contentDOM&&this.contentDOM.blur(),this.plugins))e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return NA.of(new NI("number"==typeof e?E7.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return NA.of(new NI(E7.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return NB.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return NB.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=L4.newName(),i=[F0.of(n),NU.of(F8(`.${n}`,e))];return t&&t.dark&&i.push(F1.of(!0)),i}static baseTheme(e){return Lh.lowest(NU.of(F8("."+F2,e,F4)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),i=n&&Bk.get(n)||Bk.get(e);return(null===(t=null==i?void 0:i.rootView)||void 0===t?void 0:t.view)||null}}zr.styleModule=NU,zr.inputHandler=NS,zr.clipboardInputFilter=NC,zr.clipboardOutputFilter=NM,zr.scrollHandler=ND,zr.focusChangeEffect=N_,zr.perLineTextDirection=Nk,zr.exceptionSink=Nb,zr.updateListener=Nw,zr.editable=NR,zr.mouseSelectionStyle=Nx,zr.dragMovesSelection=Ny,zr.clickAddsSelectionRange=Nv,zr.decorations=NV,zr.outerDecorations=NZ,zr.atomicRanges=Nj,zr.bidiIsolatedRanges=NH,zr.scrollMargins=N$,zr.darkTheme=F1,zr.cspNonce=Ln.define({combine:e=>e.length?e[0]:""}),zr.contentAttributes=Nz,zr.editorAttributes=NF,zr.lineWrapping=zr.contentAttributes.of({class:"cm-lineWrapping"}),zr.announce=LD.define();let zo=4096,za={};class zs{constructor(e,t,n,i,r,o){this.from=e,this.to=t,this.dir=n,this.isolates=i,this.fresh=r,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],i=e.length?e[e.length-1].dir:Ni.LTR;for(let r=Math.max(0,e.length-10);r<e.length;r++){let o=e[r];o.dir!=i||t.touchesRange(o.from,o.to)||n.push(new zs(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function zl(e,t,n){for(let i=e.state.facet(t),r=i.length-1;r>=0;r--){let t=i[r],o="function"==typeof t?t(e):t;o&&BY(o,n)}return n}let zu=Bj.mac?"mac":Bj.windows?"win":Bj.linux?"linux":"key";function zc(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}let zh=Lh.default(zr.domEventHandlers({keydown:(e,t)=>zv(zf(t.state),e,t,"editor")})),zd=Ln.define({enables:zh}),zp=new WeakMap;function zf(e){let t=e.facet(zd),n=zp.get(t);return n||zp.set(t,n=function(e,t=zu){let n=Object.create(null),i=Object.create(null),r=(e,t)=>{let n=i[e];if(null==n)i[e]=t;else if(n!=t)throw Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,i,o,a,s)=>{var l,u;let c=n[e]||(n[e]=Object.create(null)),h=i.split(/ (?!$)/).map(e=>(function(e,t){let n,i,r,o;let a=e.split(/-(?!$)/),s=a[a.length-1];"Space"==s&&(s=" ");for(let e=0;e<a.length-1;++e){let s=a[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))i=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))"mac"==t?o=!0:i=!0;else throw Error("Unrecognized modifier name: "+s)}return n&&(s="Alt-"+s),i&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s})(e,t));for(let t=1;t<h.length;t++){let n=h.slice(0,t).join(" ");r(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let i=zg={view:t,prefix:n,scope:e};return setTimeout(()=>{zg==i&&(zg=null)},4e3),!0}]})}let d=h.join(" ");r(d,!1);let p=c[d]||(c[d]={preventDefault:!1,stopPropagation:!1,run:(null===(u=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===u?void 0:u.slice())||[]});o&&p.run.push(o),a&&(p.preventDefault=!0),s&&(p.stopPropagation=!0)};for(let i of e){let e=i.scope?i.scope.split(" "):["editor"];if(i.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:r}=i;for(let t in e)e[t].run.push(e=>r(e,zm))}let r=i[t]||i.key;if(r)for(let t of e)o(t,r,i.run,i.preventDefault,i.stopPropagation),i.shift&&o(t,"Shift-"+r,i.shift,i.preventDefault,i.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let zg=null,zm=null;function zv(e,t,n,i){var r;zm=t;let o=("Esc"==(r=!(Be&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Bt&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?L7:L9)[t.keyCode]||t.key||"Unidentified")&&(r="Escape"),"Del"==r&&(r="Delete"),"Left"==r&&(r="ArrowLeft"),"Up"==r&&(r="ArrowUp"),"Right"==r&&(r="ArrowRight"),"Down"==r&&(r="ArrowDown"),r),a=EK(EY(o,0))==o.length&&" "!=o,s="",l=!1,u=!1,c=!1;zg&&zg.view==n&&zg.scope==i&&(s=zg.prefix+" ",0>Fl.indexOf(t.keyCode)&&(u=!0,zg=null));let h=new Set,d=e=>{if(e){for(let t of e.run)if(!h.has(t)&&(h.add(t),t(n)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),u=!0)}return!1},p=e[i],f,g;return p&&(d(p[s+zc(o,t,!a)])?l=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Bj.windows&&t.ctrlKey&&t.altKey)&&(f=L9[t.keyCode])&&f!=o?d(p[s+zc(f,t,!0)])?l=!0:t.shiftKey&&(g=L7[t.keyCode])!=o&&g!=f&&d(p[s+zc(g,t,!1)])&&(l=!0):a&&t.shiftKey&&d(p[s+zc(o,t,!0)])&&(l=!0),!l&&d(p._any)&&(l=!0)),u&&(l=!0),l&&c&&t.stopPropagation(),zm=null,l}class zy{constructor(e,t,n,i,r){this.className=e,this.left=t,this.top=n,this.width=i,this.height=r}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(!n.empty)return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let i=Math.max(n.from,e.viewport.from),r=Math.min(n.to,e.viewport.to),o=e.textDirection==Ni.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=zx(e),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),h=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),d=s.right-(c?parseInt(c.paddingRight):0),p=N4(e,i),f=N4(e,r),g=p.type==B0.Text?p:null,m=f.type==B0.Text?f:null;if(g&&(e.lineWrapping||p.widgetLineBreaks)&&(g=zb(e,i,1,g)),m&&(e.lineWrapping||f.widgetLineBreaks)&&(m=zb(e,r,-1,m)),g&&m&&g.from==m.from&&g.to==m.to)return y(x(n.from,n.to,g));{let t=g?x(n.from,null,g):b(p,!1),i=m?x(null,n.to,m):b(f,!0),r=[];return(g||p).to<(m||f).from-(g&&m?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<i.top?r.push(v(h,t.bottom,d,i.top)):t.bottom<i.top&&e.elementAtHeight((t.bottom+i.top)/2).type==B0.Text&&(t.bottom=i.top=(t.bottom+i.top)/2),y(t).concat(r).concat(y(i))}function v(e,n,i,r){return new zy(t,e-l.left,n-l.top,i-e,r-n)}function y({top:e,bottom:t,horizontal:n}){let i=[];for(let r=0;r<n.length;r+=2)i.push(v(n[r],e,n[r+1],t));return i}function x(t,n,i){let r=1e9,a=-1e9,s=[];function l(t,n,l,u,c){let p=e.coordsAtPos(t,t==i.to?-2:2),f=e.coordsAtPos(l,l==i.from?2:-2);p&&f&&(r=Math.min(p.top,f.top,r),a=Math.max(p.bottom,f.bottom,a),c==Ni.LTR?s.push(o&&n?h:p.left,o&&u?d:f.right):s.push(!o&&u?h:f.left,!o&&n?d:p.right))}let u=null!=t?t:i.from,c=null!=n?n:i.to;for(let i of e.visibleRanges)if(i.to>u&&i.from<c)for(let r=Math.max(i.from,u),o=Math.min(i.to,c);;){let i=e.state.doc.lineAt(r);for(let a of e.bidiSpans(i)){let e=a.from+i.from,s=a.to+i.from;if(e>=o)break;s>r&&l(Math.max(e,r),null==t&&e<=u,Math.min(s,o),null==n&&s>=c,a.dir)}if((r=i.to+1)>=o)break}return 0==s.length&&l(u,null==t,c,null==n,e.textDirection),{top:r,bottom:a,horizontal:s}}function b(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n);{let i=e.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let r=zx(e);return[new zy(t,i.left-r.left,i.top-r.top,null,i.bottom-i.top)]}}}function zx(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==Ni.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function zb(e,t,n,i){let r=e.coordsAtPos(t,2*n);if(!r)return i;let o=e.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,s=e.posAtCoords({x:o.left+1,y:a}),l=e.posAtCoords({x:o.right-1,y:a});return null==s||null==l?i:{from:Math.max(i.from,Math.min(s,l)),to:Math.min(i.to,Math.max(s,l))}}class zw{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(zS)!=e.state.facet(zS)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(zS);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{var n;return n=this.drawn[t],!(e.constructor==n.constructor&&e.eq(n))})){let t=this.dom.firstChild,n=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[n].constructor&&i.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(i.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}let zS=Ln.define();function z_(e){return[NB.define(t=>new zw(t,e)),zS.of(e)]}let zC=!(Bj.ios&&Bj.webkit&&Bj.webkit_version<534),zM=Ln.define({combine:e=>LN(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function zk(e){return e.startState.facet(zM)!=e.state.facet(zM)}let zT=z_({above:!0,markers(e){let{state:t}=e,n=t.facet(zM),i=[];for(let r of t.selection.ranges){let o=r==t.selection.main;if(r.empty?!o||zC:n.drawRangeCursor){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=r.empty?r:E7.cursor(r.head,r.head>r.anchor?-1:1);for(let r of zy.forRange(e,t,n))i.push(r)}}return i},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=zk(e);return n&&zD(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){zD(t.state,e)},class:"cm-cursorLayer"});function zD(e,t){t.style.animationDuration=e.facet(zM).cursorBlinkRate+"ms"}let zI=z_({above:!1,markers:e=>e.state.selection.ranges.map(t=>t.empty?[]:zy.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t)),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||zk(e),class:"cm-selectionLayer"}),zA={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};zC&&(zA[".cm-line"].caretColor=zA[".cm-content"].caretColor="transparent !important");let zP=Lh.highest(zr.theme(zA)),zO=LD.define({map:(e,t)=>null==e?null:t.mapPos(e)}),zR=Ll.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(zO)?t.value:e,e))}),zE=NB.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(zR);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(zR)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(zR),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let i=e.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-i.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(zR)!=e&&this.view.dispatch({effects:zO.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function zL(e,t,n,i,r){t.lastIndex=0;for(let o=e.iterRange(n,i),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=t.exec(o.value);)r(a+s.index,s)}class zB{constructor(e){let{regexp:t,decoration:n,decorate:i,boundary:r,maxLength:o=1e3}=e;if(!t.global)throw RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,i)this.addMatch=(e,t,n,r)=>i(r,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,i,r)=>{let o=n(e,t,i);o&&r(i,i+e[0].length,o)};else if(n)this.addMatch=(e,t,i,r)=>r(i,i+e[0].length,n);else throw RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=r,this.maxLength=o}createDeco(e){let t=new LH,n=t.add.bind(t);for(let{from:t,to:i}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let i=[];for(let{from:r,to:o}of n)r=Math.max(e.state.doc.lineAt(r).from,r-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),i.length&&i[i.length-1].to>=r?i[i.length-1].to=o:i.push({from:r,to:o});return i}(e,this.maxLength))zL(e.state.doc,this.regexp,t,i,(t,i)=>this.addMatch(i,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,i=-1;return(e.docChanged&&e.changes.iterChanges((t,r,o,a)=>{a>=e.view.viewport.from&&o<=e.view.viewport.to&&(n=Math.min(o,n),i=Math.max(a,i))}),e.viewportMoved||i-n>1e3)?this.createDeco(e.view):i>-1?this.updateRange(e.view,t.map(e.changes),n,i):t}updateRange(e,t,n,i){for(let r of e.visibleRanges){let o=Math.max(r.from,n),a=Math.min(r.to,i);if(a>o){let n=e.state.doc.lineAt(o),i=n.to<a?e.state.doc.lineAt(a):n,s=Math.max(r.from,n.from),l=Math.min(r.to,i.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){s=o;break}for(;a<i.to;a++)if(this.boundary.test(i.text[a-i.from])){l=a;break}}let u=[],c,h=(e,t,n)=>u.push(n.range(e,t));if(n==i)for(this.regexp.lastIndex=s-n.from;(c=this.regexp.exec(n.text))&&c.index<l-n.from;)this.addMatch(c,e,c.index+n.from,h);else zL(e.state.doc,this.regexp,s,l,(t,n)=>this.addMatch(n,e,t,h));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>e<s||t>l,add:u})}}return t}}let zN=null!=/x/.unicode?"gu":"g",zF=RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u2028\u2029\uFEFF-]",zN),zz={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},zV=null,zZ=Ln.define({combine(e){let t=LN(e,{render:null,specialChars:zF,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==zV&&"undefined"!=typeof document&&document.body){let t=document.body.style;zV=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)!=null}return zV||!1}())&&(t.specialChars=RegExp(" |"+t.specialChars.source,zN)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,zN)),t}}),zj=null;class zH extends BJ{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){var t;let n=(t=this.code)>=32?"•":10==t?"":String.fromCharCode(9216+t),i=e.state.phrase("Control character")+" "+(zz[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let o=document.createElement("span");return o.textContent=n,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class zW extends BJ{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}let z$=B1.line({class:"cm-activeLine"}),zG=NB.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let i of e.state.selection.ranges){let r=e.lineBlockAt(i.head);r.from>t&&(n.push(z$.range(r.from)),t=r.from)}return B1.set(n)}},{decorations:e=>e.decorations});class zU extends BJ{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),"string"==typeof this.content?t.setAttribute("aria-label","placeholder "+this.content):t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?Bs(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),i=Bp(t[0],"rtl"!=n.direction),r=parseInt(n.lineHeight);return i.bottom-i.top>1.5*r?{left:i.left,right:i.right,top:i.top,bottom:i.top+r}:i}ignoreEvent(){return!1}}function zq(e,t){var n;let i,r=e.posAtCoords({x:t.clientX,y:t.clientY},!1),o=e.state.doc.lineAt(r),a=r-o.from,s=a>2e3?-1:a==o.length?(n=t.clientX,(i=e.coordsAtPos(e.viewport.from))?Math.round(Math.abs((i.left-n)/e.defaultCharacterWidth)):-1):L0(o.text,e.state.tabSize,r-o.from);return{line:o.number,col:s,off:a}}let zY={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},zX={style:"cursor: crosshair"},zK="-10000px";class zQ{constructor(e,t,n,i){this.facet=t,this.createTooltipView=n,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let r=null;this.tooltipViews=this.tooltips.map(e=>r=n(e,r))}update(e,t){var n;let i=e.state.facet(this.facet),r=i.filter(e=>e);if(i===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let o=[],a=t?[]:null;for(let n=0;n<r.length;n++){let i=r[n],s=-1;if(i){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==i.create&&(s=e)}if(s<0)o[n]=this.createTooltipView(i,n?o[n-1]:null),a&&(a[n]=!!i.above);else{let i=o[n]=this.tooltipViews[s];a&&(a[n]=t[s]),i.update&&i.update(e)}}}for(let e of this.tooltipViews)0>o.indexOf(e)&&(this.removeTooltipView(e),null===(n=e.destroy)||void 0===n||n.call(e));return t&&(a.forEach((e,n)=>t[n]=e),t.length=a.length),this.input=i,this.tooltips=r,this.tooltipViews=o,!0}}function zJ(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}let z0=Ln.define({combine:e=>{var t,n,i;return{position:Bj.ios?"absolute":(null===(t=e.find(e=>e.position))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find(e=>e.parent))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(i=e.find(e=>e.tooltipSpace))||void 0===i?void 0:i.tooltipSpace)||zJ}}}),z1=new WeakMap,z2=NB.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(z0);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new zQ(e,z8,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let e of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(e.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,i=e.state.facet(z0);if(i.position!=this.position&&!this.madeAbsolute){for(let e of(this.position=i.position,this.manager.tooltipViews))e.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){for(let e of(this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),i=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=zK,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;for(let t of(this.view.win.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);this.parent&&this.container.remove(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Bj.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==zK&&"0px"==e.style.left){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}}if(n||"absolute"==this.position){if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState)}let i=this.view.scrollDOM.getBoundingClientRect(),r=NG(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(z0).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute)for(let e of(this.madeAbsolute=!0,this.position="absolute",this.manager.tooltipViews))e.dom.style.position="absolute";let{visible:n,space:i,scaleX:r,scaleY:o}=e,a=[];for(let s=0;s<this.manager.tooltips.length;s++){let l=this.manager.tooltips[s],u=this.manager.tooltipViews[s],{dom:c}=u,h=e.pos[s],d=e.size[s];if(!h||!1!==l.clip&&(h.bottom<=Math.max(n.top,i.top)||h.top>=Math.min(n.bottom,i.bottom)||h.right<Math.max(n.left,i.left)-.1||h.left>Math.min(n.right,i.right)+.1)){c.style.top=zK;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,f=7*!!p,g=d.right-d.left,m=null!==(t=z1.get(u))&&void 0!==t?t:d.bottom-d.top,v=u.offset||z4,y=this.view.textDirection==Ni.LTR,x=d.width>i.right-i.left?y?i.left:i.right-d.width:y?Math.max(i.left,Math.min(h.left-14*!!p+v.x,i.right-g)):Math.min(Math.max(i.left,h.left-g+14*!!p-v.x),i.right-g),b=this.above[s];!l.strictSide&&(b?h.top-m-f-v.y<i.top:h.bottom+m+f+v.y>i.bottom)&&b==i.bottom-h.bottom>h.top-i.top&&(b=this.above[s]=!b);let w=(b?h.top-i.top:i.bottom-h.bottom)-f;if(w<m&&!1!==u.resize){if(w<this.view.defaultLineHeight){c.style.top=zK;continue}z1.set(u,m),c.style.height=(m=w)/o+"px"}else c.style.height&&(c.style.height="");let S=b?h.top-m-f-v.y:h.bottom+f+v.y,_=x+g;if(!0!==u.overlap)for(let e of a)e.left<_&&e.right>x&&e.top<S+m&&e.bottom>S&&(S=b?e.top-m-2-f:e.bottom+f+2);if("absolute"==this.position?(c.style.top=(S-e.parent.top)/o+"px",z5(c,(x-e.parent.left)/r)):(c.style.top=S/o+"px",z5(c,x/r)),p){let e=h.left+(y?v.x:-v.x)-(x+14-7);p.style.left=e/r+"px"}!0!==u.overlap&&a.push({left:x,top:S,right:_,bottom:S+m}),c.classList.toggle("cm-tooltip-above",b),c.classList.toggle("cm-tooltip-below",!b),u.positioned&&u.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=zK}},{eventObservers:{scroll(){this.maybeMeasure()}}});function z5(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}let z3=zr.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),z4={x:0,y:0},z8=Ln.define({enables:[z2,z3]}),z6=Ln.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class z9{static create(e){return new z9(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new zQ(e,z6,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let i=n[e];if(void 0!==i){if(void 0===t)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}let z7=z8.compute([z6],e=>{let t=e.facet(z6);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return null!==(t=e.end)&&void 0!==t?t:e.pos})),create:z9.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class Ve{constructor(e,t,n,i,r){this.view=e,this.source=t,this.field=n,this.setHover=i,this.hoverTime=r,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.nearest(t.target);if(!n)return;let i,r=1;if(n instanceof B$)i=n.posAtStart;else{if(null==(i=e.posAtCoords(t)))return;let n=e.coordsAtPos(i);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(i)).find(e=>e.from<=i&&e.to>=i),a=o&&o.dir==Ni.RTL?-1:1;r=t.x<n.left?-a:a}let o=this.source(e,i,r);if(null==o?void 0:o.then){let t=this.pending={pos:i};o.then(n=>{this.pending==t&&(this.pending=null,n&&!(Array.isArray(n)&&!n.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))},t=>NO(e.state,t,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(z2),t=e?e.manager.tooltips.findIndex(e=>e.create==z9.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:r}=this;if(i.length&&r&&!function(e,t){let{left:n,right:i,top:r,bottom:o}=e.getBoundingClientRect(),a;if(a=e.querySelector(".cm-tooltip-arrow")){let e=a.getBoundingClientRect();r=Math.min(e.top,r),o=Math.max(e.bottom,o)}return t.clientX>=n-4&&t.clientX<=i+4&&t.clientY>=r-4&&t.clientY<=o+4}(r.dom,e)||this.pending){let{pos:r}=i[0]||this.pending,o=null!==(n=null===(t=i[0])||void 0===t?void 0:t.end)&&void 0!==n?n:r;(r==o?this.view.posAtCoords(this.lastMove)!=r:!function(e,t,n,i,r,o){let a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>i||a.right<i||a.top>r||Math.min(a.bottom,s)<r)return!1;let l=e.posAtCoords({x:i,y:r},!1);return l>=t&&l<=n}(this.view,r,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Vt(e,t){let n=e.plugin(z2);if(!n)return null;let i=n.manager.tooltips.indexOf(t);return i<0?null:n.manager.tooltipViews[i]}let Vn=LD.define(),Vi=Ln.define({combine(e){let t,n;for(let i of e)t=t||i.topContainer,n=n||i.bottomContainer;return{topContainer:t,bottomContainer:n}}});function Vr(e,t){let n=e.plugin(Vo),i=n?n.specs.indexOf(t):-1;return i>-1?n.panels[i]:null}let Vo=NB.fromClass(class{constructor(e){this.input=e.state.facet(Vl),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(Vi);for(let n of(this.top=new Va(e,!0,t.topContainer),this.bottom=new Va(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top)),this.panels))n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(e){let t=e.state.facet(Vi);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Va(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Va(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(Vl);if(n!=this.input){let t=n.filter(e=>e),i=[],r=[],o=[],a=[];for(let n of t){let t=this.specs.indexOf(n),s;t<0?(s=n(e.view),a.push(s)):(s=this.panels[t]).update&&s.update(e),i.push(s),(s.top?r:o).push(s)}for(let e of(this.specs=t,this.panels=i,this.top.sync(r),this.bottom.sync(o),a))e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>zr.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Va{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&0>e.indexOf(t)&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=Vs(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=Vs(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function Vs(e){let t=e.nextSibling;return e.remove(),t}let Vl=Ln.define({enables:Vo});class Vu extends LF{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Vu.prototype.elementClass="",Vu.prototype.toDOM=void 0,Vu.prototype.mapMode=EJ.TrackBefore,Vu.prototype.startSide=Vu.prototype.endSide=-1,Vu.prototype.point=!0;let Vc=Ln.define(),Vh=Ln.define(),Vd={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Lj.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Vp=Ln.define();function Vf(e){return[Vm(),Vp.of(Object.assign(Object.assign({},Vd),e))]}let Vg=Ln.define({combine:e=>e.some(e=>e)});function Vm(e){let t=[Vv];return e&&!1===e.fixed&&t.push(Vg.of(!0)),t}let Vv=NB.fromClass(class{constructor(e){for(let t of(this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(Vp).map(t=>new Vw(e,t)),this.gutters))this.dom.appendChild(t.dom);this.fixed=!e.state.facet(Vg),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,i=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(Vg)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=Lj.iter(this.view.state.facet(Vc),this.view.viewport.from),i=[],r=this.gutters.map(e=>new Vb(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==B0.Text&&t){for(let e of(Vx(n,i,o.from),r))e.line(this.view,o,i);t=!1}else if(o.widget)for(let e of r)e.widget(this.view,o)}else if(e.type==B0.Text)for(let t of(Vx(n,i,e.from),r))t.line(this.view,e,i);else if(e.widget)for(let t of r)t.widget(this.view,e);for(let e of r)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(Vp),n=e.state.facet(Vp),i=e.docChanged||e.heightChanged||e.viewportChanged||!Lj.eq(e.startState.facet(Vc),e.state.facet(Vc),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(i=!0);else{i=!0;let r=[];for(let i of n){let n=t.indexOf(i);n<0?r.push(new Vw(this.view,i)):(this.gutters[n].update(e),r.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),0>r.indexOf(e)&&e.destroy();for(let e of r)this.dom.appendChild(e.dom);this.gutters=r}return i}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>zr.scrollMargins.of(t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==Ni.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null})});function Vy(e){return Array.isArray(e)?e:[e]}function Vx(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class Vb{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Lj.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:i}=this,r=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let t=new VS(e,o,r,n);i.elements.push(t),i.dom.appendChild(t.dom)}else i.elements[this.i].update(e,o,r,n);this.height=t.bottom,this.i++}line(e,t,n){let i=[];Vx(this.cursor,i,t.from),n.length&&(i=i.concat(n));let r=this.gutter.config.lineMarker(e,t,i);r&&i.unshift(r);let o=this.gutter;(0!=i.length||o.config.renderEmptyElements)&&this.addElement(e,t,i)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),i=n?[n]:null;for(let n of e.state.facet(Vh)){let r=n(e,t.widget,t);r&&(i||(i=[])).push(r)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Vw{constructor(e,t){for(let n in this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),t.domEventHandlers)this.dom.addEventListener(n,i=>{let r=i.target,o;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let e=r.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=i.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,i)&&i.preventDefault()});this.markers=Vy(t.markers(e)),t.initialSpacer&&(this.spacer=new VS(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=Vy(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!Lj.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class VS{constructor(e,t,n,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,i)}update(e,t,n,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),!function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,i)&&this.setMarkers(e,i)}setMarkers(e,t){let n="cm-gutterElement",i=this.dom.firstChild;for(let r=0,o=0;;){let a=o,s=r<t.length?t[r++]:null,l=!1;if(s){let e=s.elementClass;e&&(n+=" "+e);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(s)){a=e,l=!0;break}}else a=this.markers.length;for(;o<a;){let e=this.markers[o++];if(e.toDOM){e.destroy(i);let t=i.nextSibling;i.remove(),i=t}}if(!s)break;s.toDOM&&(l?i=i.nextSibling:this.dom.insertBefore(s.toDOM(e),i)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}let V_=Ln.define(),VC=Ln.define(),VM=Ln.define({combine:e=>LN(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let i=n[e],r=t[e];n[e]=i?(e,t,n)=>i(e,t,n)||r(e,t,n):r}return n}})});class Vk extends Vu{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function VT(e,t){return e.state.facet(VM).formatNumber(t,e.state)}let VD=Vp.compute([VM],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(V_),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new Vk(VT(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let i of e.state.facet(VC)){let r=i(e,t,n);if(r)return r}return null},lineMarkerChange:e=>e.startState.facet(VM)!=e.state.facet(VM),initialSpacer:e=>new Vk(VT(e,VI(e.state.doc.lines))),updateSpacer(e,t){let n=VT(t.view,VI(t.view.state.doc.lines));return n==e.number?e:new Vk(n)},domEventHandlers:e.facet(VM).domEventHandlers}));function VI(e){let t=9;for(;t<e;)t=10*t+9;return t}let VA=new class extends Vu{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},VP=Vc.compute(["selection"],e=>{let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.head).from;r>n&&(n=r,t.push(VA.range(r)))}return Lj.of(t)}),VO=0;class VR{constructor(e,t){this.from=e,this.to=t}}class VE{constructor(e={}){this.id=VO++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=VN.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}VE.closedBy=new VE({deserialize:e=>e.split(" ")}),VE.openedBy=new VE({deserialize:e=>e.split(" ")}),VE.group=new VE({deserialize:e=>e.split(" ")}),VE.isolate=new VE({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),VE.contextHash=new VE({perNode:!0}),VE.lookAhead=new VE({perNode:!0}),VE.mounted=new VE({perNode:!0});class VL{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[VE.mounted.id]}}let VB=Object.create(null);class VN{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):VB,n=+!!e.top|2*!!e.skipped|4*!!e.error|8*(null==e.name),i=new VN(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(VE.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return e=>{for(let n=e.prop(VE.group),i=-1;i<(n?n.length:0);i++){let r=t[i<0?e.name:n[i]];if(r)return r}}}}VN.none=new VN("",Object.create(null),0,8);class VF{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let i=null;for(let t of e){let e=t(n);e&&(i||(i=Object.assign({},n.props)),i[e[0].id]=e[1])}t.push(i?new VN(n.name,i,n.id,n.flags):n)}return new VF(t)}}let Vz=new WeakMap,VV=new WeakMap;(F=eB||(eB={}))[F.ExcludeBuffers=1]="ExcludeBuffers",F[F.IncludeAnonymous=2]="IncludeAnonymous",F[F.IgnoreMounts=4]="IgnoreMounts",F[F.IgnoreOverlays=8]="IgnoreOverlays";class VZ{constructor(e,t,n,i,r){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,r&&r.length)for(let[e,t]of(this.props=Object.create(null),r))this.props["number"==typeof e?e:e.id]=t}toString(){let e=VL.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new V0(this.topNode,e)}cursorAt(e,t=0,n=0){let i=new V0(Vz.get(this)||this.topNode);return i.moveTo(e,t),Vz.set(this,i._tree),i}get topNode(){return new VU(this,0,0,null)}resolve(e,t=0){let n=V$(Vz.get(this)||this.topNode,e,t,!1);return Vz.set(this,n),n}resolveInner(e,t=0){let n=V$(VV.get(this)||this.topNode,e,t,!0);return VV.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let i=e.resolveInner(t,n),r=null;for(let e=i instanceof VU?i:i.context.parent;e;e=e.parent)if(e.index<0){let o=e.parent;(r||(r=[i])).push(o.resolve(t,n)),e=o}else{let o=VL.get(e.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let a=new VU(o.tree,o.overlay[0].from+e.from,-1,e);(r||(r=[i])).push(V$(a,t,n,!1))}}return r?VQ(r):i}(this,e,t)}iterate(e){let{enter:t,leave:n,from:i=0,to:r=this.length}=e,o=e.mode||0,a=(o&eB.IncludeAnonymous)>0;for(let e=this.cursor(o|eB.IncludeAnonymous);;){let o=!1;if(e.from<=r&&e.to>=i&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;o=!0}for(;o&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:V3(VN.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new VZ(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new VZ(VN.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:r=1024,reused:o=[],minRepeatType:a=i.types.length}=e,s=Array.isArray(n)?new Vj(n,n.length):n,l=i.types,u=0,c=0;function h(e,t,n,r,o,a,s,l,u){let c=[],h=[];for(;e.length>r;)c.push(e.pop()),h.push(t.pop()+n-o);e.push(d(i.types[s],c,h,a-o,l-a,u)),t.push(o-n)}function d(e,t,n,i,r,o,a){if(o){let e=[VE.contextHash,o];a=a?[e].concat(a):[e]}if(r>25){let e=[VE.lookAhead,r];a=a?[e].concat(a):[e]}return new VZ(e,t,n,i,a)}let p=[],f=[];for(;s.pos>0;)!function e(t,n,p,f,g,m){let{id:v,start:y,end:x,size:b}=s,w=c,S=u;for(;b<0;){if(s.next(),-1==b){let e=o[v];p.push(e),f.push(y-t);return}if(-3==b){u=v;return}if(-4==b){c=v;return}else throw RangeError(`Unrecognized record size: ${b}`)}let _=l[v],C,M,k=y-t;if(x-y<=r&&(M=function(e,t){let n=s.fork(),i=0,o=0,l=0,u=n.end-r,c={size:0,start:0,skip:0};o:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){c.size=i,c.start=o,c.skip=l,l+=4,i+=4,n.next();continue}let s=n.pos-e;if(e<0||s<r||n.start<u)break;let h=4*(n.id>=a),d=n.start;for(n.next();n.pos>s;){if(n.size<0){if(-3==n.size)h+=4;else break o}else n.id>=a&&(h+=4);n.next()}o=d,i+=e,l+=h}return(t<0||i==e)&&(c.size=i,c.start=o,c.skip=l),c.size>4?c:void 0}(s.pos-n,g))){let e=new Uint16Array(M.size-M.skip),n=s.pos-M.size,r=e.length;for(;s.pos>n;)r=function e(t,n,i){let{id:r,start:o,end:l,size:h}=s;if(s.next(),h>=0&&r<a){let a=i;if(h>4){let r=s.pos-(h-4);for(;s.pos>r;)i=e(t,n,i)}n[--i]=a,n[--i]=l-t,n[--i]=o-t,n[--i]=r}else -3==h?u=r:-4==h&&(c=r);return i}(M.start,e,r);C=new VH(e,x-M.start,i),k=M.start-t}else{let t=s.pos-b;s.next();let n=[],o=[],l=v>=a?v:-1,u=0,c=x;for(;s.pos>t;)l>=0&&s.id==l&&s.size>=0?(s.end<=c-r&&(h(n,o,y,u,s.end,c,l,w,S),u=n.length,c=s.end),s.next()):m>2500?function(e,t,n,o){let a=[],l=0,u=-1;for(;s.pos>t;){let{id:e,start:t,end:n,size:i}=s;if(i>4)s.next();else if(u>-1&&t<u)break;else u<0&&(u=n-r),a.push(e,t,n),l++,s.next()}if(l){let t=new Uint16Array(4*l),r=a[a.length-2];for(let e=a.length-3,n=0;e>=0;e-=3)t[n++]=a[e],t[n++]=a[e+1]-r,t[n++]=a[e+2]-r,t[n++]=n;n.push(new VH(t,a[2]-r,i)),o.push(r-e)}}(y,t,n,o):e(y,t,n,o,l,m+1);if(l>=0&&u>0&&u<n.length&&h(n,o,y,u,y,c,l,w,S),n.reverse(),o.reverse(),l>-1&&u>0){let e=function(e,t){return(n,i,r)=>{let o=0,a=n.length-1,s,l;if(a>=0&&(s=n[a])instanceof VZ){if(!a&&s.type==e&&s.length==r)return s;(l=s.prop(VE.lookAhead))&&(o=i[a]+s.length+l)}return d(e,n,i,r,o,t)}}(_,S);C=V3(_,n,o,0,n.length,0,x-y,e,e)}else C=d(_,n,o,x-y,w-x,S)}p.push(C),f.push(k)}(e.start||0,e.bufferStart||0,p,f,-1,0);let g=null!==(t=e.length)&&void 0!==t?t:p.length?f[0]+p[0].length:0;return new VZ(l[e.topID],p.reverse(),f.reverse(),g)}(e)}}VZ.empty=new VZ(VN.none,[],[],0);class Vj{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Vj(this.buffer,this.index)}}class VH{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return VN.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],i=this.set.types[t],r=i.name;if(/\W/.test(r)&&!i.isError&&(r=JSON.stringify(r)),n==(e+=4))return r;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return r+"("+o.join(",")+")"}findChild(e,t,n,i,r){let{buffer:o}=this,a=-1;for(let s=e;s!=t&&(!VW(r,i,o[s+1],o[s+2])||(a=s,!(n>0)));s=o[s+3]);return a}slice(e,t,n){let i=this.buffer,r=new Uint16Array(t-e),o=0;for(let a=e,s=0;a<t;){r[s++]=i[a++],r[s++]=i[a++]-n;let t=r[s++]=i[a++]-n;r[s++]=i[a++]-e,o=Math.max(o,t)}return new VH(r,o,this.set)}}function VW(e,t,n,i){switch(e){case -2:return n<t;case -1:return i>=t&&n<t;case 0:return n<t&&i>t;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function V$(e,t,n,i){for(var r;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!i&&e instanceof VU&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=i?0:eB.IgnoreOverlays;if(i)for(let i=e,a=i.parent;a;a=(i=a).parent)i instanceof VU&&i.index<0&&(null===(r=a.enter(t,n,o))||void 0===r?void 0:r.from)!=i.from&&(e=a);for(;;){let i=e.enter(t,n,o);if(!i)return e;e=i}}class VG{cursor(e=0){return new V0(this,e)}getChild(e,t=null,n=null){let i=Vq(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return Vq(this,e,t,n)}resolve(e,t=0){return V$(this,e,t,!1)}resolveInner(e,t=0){return V$(this,e,t,!0)}matchContext(e){return VY(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class VU extends VG{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,i,r=0){for(let o=this;;){for(let{children:a,positions:s}=o._tree,l=t>0?a.length:-1;e!=l;e+=t){let l=a[e],u=s[e]+o.from;if(VW(i,n,u,u+l.length)){if(l instanceof VH){if(r&eB.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,n-u,i);if(a>-1)return new VK(new VX(o,l,e,u),null,a)}else if(r&eB.IncludeAnonymous||!l.type.isAnonymous||V1(l)){let a;if(!(r&eB.IgnoreMounts)&&(a=VL.get(l))&&!a.overlay)return new VU(a.tree,u,e,o);let s=new VU(l,u,e,o);return r&eB.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,n,i)}}}if(r&eB.IncludeAnonymous||!o.type.isAnonymous||(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,!(o=o._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&eB.IgnoreOverlays)&&(i=VL.get(this._tree))&&i.overlay){let n=e-this.from;for(let{from:e,to:r}of i.overlay)if((t>0?e<=n:e<n)&&(t<0?r>=n:r>n))return new VU(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Vq(e,t,n,i){let r=e.cursor(),o=[];if(!r.firstChild())return o;if(null!=n){for(let e=!1;!e;)if(e=r.type.is(n),!r.nextSibling())return o}for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(t)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function VY(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class VX{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class VK extends VG{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return r<0?null:new VK(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&eB.ExcludeBuffers)return null;let{buffer:i}=this.context,r=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new VK(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new VK(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new VK(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,r=n.buffer[this.index+3];if(r>i){let o=n.buffer[this.index+1];e.push(n.slice(i,r,o)),t.push(0)}return new VZ(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function VQ(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let r=e[i];(r.from>n.from||r.to<n.to)&&(n=r,t=i)}let i=n instanceof VU&&n.index<0?null:n.parent,r=e.slice();return i?r[t]=i:r.splice(t,1),new VJ(r,n)}class VJ{constructor(e,t){this.heads=e,this.node=t}get next(){return VQ(this.heads)}}class V0{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof VU)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return!!e&&(e instanceof VU?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,r=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return!(r<0)&&(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&eB.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&eB.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&eB.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(i.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=i)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let i=t+e,r=e<0?-1:n._tree.children.length;i!=r;i+=e){let e=n._tree.children[i];if(this.mode&eB.IncludeAnonymous||e instanceof VH||!e.type.isAnonymous||V1(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)o:for(let i=this.index,r=this.stack.length;r>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,n=r+1;break o}i=this.stack[--r]}for(let e=n;e<this.stack.length;e++)t=new VK(this.buffer,t,this.stack[e]);return this.bufferNode=new VK(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return VY(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,r=this.stack.length-1;i>=0;r--){if(r<0)return VY(this._tree,e,i);let o=n[t.buffer[this.stack[r]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function V1(e){return e.children.some(e=>e instanceof VH||!e.type.isAnonymous||V1(e))}let V2=new WeakMap;function V5(e,t){if(!e.isAnonymous||t instanceof VH||t.type!=e)return 1;let n=V2.get(t);if(null==n){for(let i of(n=1,t.children)){if(i.type!=e||!(i instanceof VZ)){n=1;break}n+=V5(e,i)}V2.set(t,n)}return n}function V3(e,t,n,i,r,o,a,s,l){let u=0;for(let n=i;n<r;n++)u+=V5(e,t[n]);let c=Math.ceil(1.5*u/8),h=[],d=[];return!function t(n,i,r,a,s){for(let u=r;u<a;){let r=u,p=i[u],f=V5(e,n[u]);for(u++;u<a;u++){let t=V5(e,n[u]);if(f+t>=c)break;f+=t}if(u==r+1){if(f>c){let e=n[r];t(e.children,e.positions,0,e.children.length,i[r]+s);continue}h.push(n[r])}else{let t=i[u-1]+n[u-1].length-p;h.push(V3(e,n,i,r,u,p,t,null,l))}d.push(p+s-o)}}(t,n,i,r,0),(s||l)(h,d,a)}class V4{constructor(e,t,n,i,r=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=+!!r|2*!!o}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let i=[new V4(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],r=1,o=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let u=a<t.length?t[a]:null,c=u?u.fromA:1e9;if(c-s>=n)for(;o&&o.from<c;){let t=o;if(s>=t.from||c<=t.to||l){let e=Math.max(t.from,s)-l,n=Math.min(t.to,c)-l;t=e>=n?null:new V4(e,n,t.tree,t.offset+l,a>0,!!u)}if(t&&i.push(t),o.to>c)break;o=r<e.length?e[r++]:null}if(!u)break;s=u.toA,l=u.toA-u.toB}return i}}class V8{startParse(e,t,n){return"string"==typeof e&&(e=new V6(e)),n=n?n.length?n.map(e=>new VR(e.from,e.to)):[new VR(0,0)]:[new VR(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let e=i.advance();if(e)return e}}}class V6{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new VE({perNode:!0});let V9=0;class V7{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=V9++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof V7&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new V7("string"==typeof e?e:"?",[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new Zt(e);return e=>e.modified.indexOf(t)>-1?e:Zt.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let Ze=0;class Zt{constructor(e){this.name=e,this.instances=[],this.id=Ze++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{var i,r;return n.base==e&&(i=t,r=n.modified,i.length==r.length&&i.every((e,t)=>e==r[t]))});if(n)return n;let i=[],r=new V7(e.name,i,e,t);for(let e of t)e.instances.push(r);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let i=0,r=t.length;i<r;i++)t.push(t[i].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)i.push(Zt.get(t,e));return r}}function Zn(e){let t=Object.create(null);for(let n in e){let i=e[n];for(let e of(Array.isArray(i)||(i=[i]),n.split(" ")))if(e){let n=[],r=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){r=1;break}let i=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!i)throw RangeError("Invalid path: "+e);if(n.push("*"==i[0]?"":'"'==i[0][0]?JSON.parse(i[0]):i[0]),(t+=i[0].length)==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){r=0;break}if("/"!=a)throw RangeError("Invalid path: "+e);o=e.slice(t)}let a=n.length-1,s=n[a];if(!s)throw RangeError("Invalid path: "+e);let l=new Zr(i,r,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return Zi.add(t)}let Zi=new VE;class Zr{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function Zo(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:i,all:r=null}=t||{};return{style:e=>{let t=r;for(let i of e)for(let e of i.set){let i=n[e.id];if(i){t=t?t+" "+i:i;break}}return t},scope:i}}Zr.empty=new Zr([],2,null);class Za{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,r){let{type:o,from:a,to:s}=e;if(a>=n||s<=t)return;o.isTop&&(r=this.highlighters.filter(e=>!e.scope||e.scope(o)));let l=i,u=function(e){let t=e.type.prop(Zi);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||Zr.empty,c=function(e,t){let n=null;for(let i of e){let e=i.style(t);e&&(n=n?n+" "+e:e)}return n}(r,u.tags);if(c&&(l&&(l+=" "),l+=c,1==u.mode&&(i+=(i?" ":"")+c)),this.startSpan(Math.max(t,a),l),u.opaque)return;let h=e.tree&&e.tree.prop(VE.mounted);if(h&&h.overlay){let o=e.node.enter(h.overlay[0].from+a,1),u=this.highlighters.filter(e=>!e.scope||e.scope(h.tree.type)),c=e.firstChild();for(let d=0,p=a;;d++){let f=d<h.overlay.length?h.overlay[d]:null,g=f?f.from+a:s,m=Math.max(t,p),v=Math.min(n,g);if(m<v&&c)for(;e.from<v&&(this.highlightRange(e,m,v,i,r),this.startSpan(Math.min(v,e.to),l),!(e.to>=g)&&e.nextSibling()););if(!f||g>n)break;(p=f.to+a)>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+a),Math.min(n,p),"",u),this.startSpan(Math.min(n,p),l))}c&&e.parent()}else if(e.firstChild()){h&&(i="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,i,r),this.startSpan(Math.min(n,e.to),l)}while(e.nextSibling());e.parent()}}}let Zs=V7.define,Zl=Zs(),Zu=Zs(),Zc=Zs(Zu),Zh=Zs(Zu),Zd=Zs(),Zp=Zs(Zd),Zf=Zs(Zd),Zg=Zs(),Zm=Zs(Zg),Zv=Zs(),Zy=Zs(),Zx=Zs(),Zb=Zs(Zx),Zw=Zs(),ZS={comment:Zl,lineComment:Zs(Zl),blockComment:Zs(Zl),docComment:Zs(Zl),name:Zu,variableName:Zs(Zu),typeName:Zc,tagName:Zs(Zc),propertyName:Zh,attributeName:Zs(Zh),className:Zs(Zu),labelName:Zs(Zu),namespace:Zs(Zu),macroName:Zs(Zu),literal:Zd,string:Zp,docString:Zs(Zp),character:Zs(Zp),attributeValue:Zs(Zp),number:Zf,integer:Zs(Zf),float:Zs(Zf),bool:Zs(Zd),regexp:Zs(Zd),escape:Zs(Zd),color:Zs(Zd),url:Zs(Zd),keyword:Zv,self:Zs(Zv),null:Zs(Zv),atom:Zs(Zv),unit:Zs(Zv),modifier:Zs(Zv),operatorKeyword:Zs(Zv),controlKeyword:Zs(Zv),definitionKeyword:Zs(Zv),moduleKeyword:Zs(Zv),operator:Zy,derefOperator:Zs(Zy),arithmeticOperator:Zs(Zy),logicOperator:Zs(Zy),bitwiseOperator:Zs(Zy),compareOperator:Zs(Zy),updateOperator:Zs(Zy),definitionOperator:Zs(Zy),typeOperator:Zs(Zy),controlOperator:Zs(Zy),punctuation:Zx,separator:Zs(Zx),bracket:Zb,angleBracket:Zs(Zb),squareBracket:Zs(Zb),paren:Zs(Zb),brace:Zs(Zb),content:Zg,heading:Zm,heading1:Zs(Zm),heading2:Zs(Zm),heading3:Zs(Zm),heading4:Zs(Zm),heading5:Zs(Zm),heading6:Zs(Zm),contentSeparator:Zs(Zg),list:Zs(Zg),quote:Zs(Zg),emphasis:Zs(Zg),strong:Zs(Zg),link:Zs(Zg),monospace:Zs(Zg),strikethrough:Zs(Zg),inserted:Zs(),deleted:Zs(),changed:Zs(),invalid:Zs(),meta:Zw,documentMeta:Zs(Zw),annotation:Zs(Zw),processingInstruction:Zs(Zw),definition:V7.defineModifier("definition"),constant:V7.defineModifier("constant"),function:V7.defineModifier("function"),standard:V7.defineModifier("standard"),local:V7.defineModifier("local"),special:V7.defineModifier("special")};for(let e in ZS){let t=ZS[e];t instanceof V7&&(t.name=e)}Zo([{tag:ZS.link,class:"tok-link"},{tag:ZS.heading,class:"tok-heading"},{tag:ZS.emphasis,class:"tok-emphasis"},{tag:ZS.strong,class:"tok-strong"},{tag:ZS.keyword,class:"tok-keyword"},{tag:ZS.atom,class:"tok-atom"},{tag:ZS.bool,class:"tok-bool"},{tag:ZS.url,class:"tok-url"},{tag:ZS.labelName,class:"tok-labelName"},{tag:ZS.inserted,class:"tok-inserted"},{tag:ZS.deleted,class:"tok-deleted"},{tag:ZS.literal,class:"tok-literal"},{tag:ZS.string,class:"tok-string"},{tag:ZS.number,class:"tok-number"},{tag:[ZS.regexp,ZS.escape,ZS.special(ZS.string)],class:"tok-string2"},{tag:ZS.variableName,class:"tok-variableName"},{tag:ZS.local(ZS.variableName),class:"tok-variableName tok-local"},{tag:ZS.definition(ZS.variableName),class:"tok-variableName tok-definition"},{tag:ZS.special(ZS.variableName),class:"tok-variableName2"},{tag:ZS.definition(ZS.propertyName),class:"tok-propertyName tok-definition"},{tag:ZS.typeName,class:"tok-typeName"},{tag:ZS.namespace,class:"tok-namespace"},{tag:ZS.className,class:"tok-className"},{tag:ZS.macroName,class:"tok-macroName"},{tag:ZS.propertyName,class:"tok-propertyName"},{tag:ZS.operator,class:"tok-operator"},{tag:ZS.comment,class:"tok-comment"},{tag:ZS.meta,class:"tok-meta"},{tag:ZS.invalid,class:"tok-invalid"},{tag:ZS.punctuation,class:"tok-punctuation"}]);let Z_=new VE,ZC=new VE;class ZM{constructor(e,t,n=[],i=""){this.data=e,this.name=i,LB.prototype.hasOwnProperty("tree")||Object.defineProperty(LB.prototype,"tree",{get(){return ZD(this)}}),this.parser=t,this.extension=[ZN.of(this),LB.languageData.of((e,t,n)=>{let i=Zk(e,t,n),r=i.type.prop(Z_);if(!r)return[];let o=e.facet(r),a=i.type.prop(ZC);if(a){let r=i.resolve(t-i.from,n);for(let t of a)if(t.test(r,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(e,t,n=-1){return Zk(e,t,n).type.prop(Z_)==this.data}findRegions(e){let t=e.facet(ZN);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(e,t)=>{if(e.prop(Z_)==this.data){n.push({from:t,to:t+e.length});return}let r=e.prop(VE.mounted);if(r){if(r.tree.prop(Z_)==this.data){if(r.overlay)for(let e of r.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(r.overlay){let e=n.length;if(i(r.tree,r.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let r=e.children[n];r instanceof VZ&&i(r,e.positions[n]+t)}};return i(ZD(e),0),n}get allowsNesting(){return!0}}function Zk(e,t,n){let i=e.facet(ZN),r=ZD(e).topNode;if(!i||i.allowsNesting)for(let e=r;e;e=e.enter(t,n,eB.ExcludeBuffers))e.type.isTop&&(r=e);return r}ZM.setState=LD.define();class ZT extends ZM{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){var t;let n=(t=e.languageData,Ln.define({combine:t?e=>e.concat(t):void 0}));return new ZT(n,e.parser.configure({props:[Z_.add(e=>e.isTop?n:void 0)]}),e.name)}configure(e,t){return new ZT(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ZD(e){let t=e.field(ZM.state,!1);return t?t.tree:VZ.empty}class ZI{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let ZA=null;class ZP{constructor(e,t,n=[],i,r,o,a,s){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=r,this.viewport=o,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new ZP(e,t,[],VZ.empty,0,n,[],null)}startParse(){return this.parser.startParse(new ZI(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=VZ.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(V4.addTree(i,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(V4.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ZA;ZA=this;try{return e()}finally{ZA=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=ZO(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:r,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,i,r)=>t.push({fromA:e,toA:n,fromB:i,toB:r})),n=V4.applyChanges(n,t),i=VZ.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length)for(let t of(a=[],this.skipped)){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);n<i&&a.push({from:n,to:i})}}return new ZP(this.parser,t,n,i,r,o,a,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:i}=this.skipped[t];n<e.to&&i>e.from&&(this.fragments=ZO(this.fragments,n,i),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends V8{createParse(t,n,i){let r=i[0].from,o=i[i.length-1].to;return{parsedPos:r,advance(){let t=ZA;if(t){for(let e of i)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new VZ(VN.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return ZA}}function ZO(e,t,n){return V4.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class ZR{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new ZR(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=ZP.create(e.facet(ZN).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new ZR(n)}}ZM.state=Ll.define({create:ZR.init,update(e,t){for(let e of t.effects)if(e.is(ZM.setState))return e.value;return t.startState.facet(ZN)!=t.state.facet(ZN)?ZR.init(t.state):e.apply(t)}});let ZE=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(ZE=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let ZL="undefined"!=typeof navigator&&(null===(eN=navigator.scheduling)||void 0===eN?void 0:eN.isInputPending)?()=>navigator.scheduling.isInputPending():null,ZB=NB.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(ZM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(ZM.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=ZE(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,r=n.field(ZM.state);if(r.tree==r.context.tree&&r.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!ZL?Math.max(25,e.timeRemaining()-5):1e9),a=r.context.treeLen<i&&n.doc.length>i+1e3,s=r.context.work(()=>ZL&&ZL()||Date.now()>o,i+1e5*!a);this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(r.context.takeTree(),this.view.dispatch({effects:ZM.setState.of(new ZR(r.context))})),this.chunkBudget>0&&!(s&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(r.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>NO(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ZN=Ln.define({combine:e=>e.length?e[0]:null,enables:e=>[ZM.state,ZB,zr.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class ZF{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let Zz=Ln.define(),ZV=Ln.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function ZZ(e){let t=e.facet(ZV);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Zj(e,t){let n="",i=e.tabSize,r=e.facet(ZV)[0];if(" "==r){for(;t>=i;)n+=" ",t-=i;r=" "}for(let e=0;e<t;e++)n+=r;return n}function ZH(e,t){for(let n of(e instanceof LB&&(e=new ZW(e)),e.state.facet(Zz))){let i=n(e,t);if(void 0!==i)return i}let n=ZD(e.state);return n.length>=t?function(e,t,n){let i=t.resolveStack(n),r=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let e=[];for(let t=r;t&&(t.from!=i.node.from||t.type!=i.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)i={node:e[t],next:i}}return ZG(i,e,n)}(e,n,t):null}class ZW{constructor(e,t={}){this.state=e,this.options=t,this.unit=ZZ(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:r}=this.options;return null!=i&&i>=n.from&&i<=n.to?r&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(e,t);return n.slice(e-i,Math.min(n.length,e+100-i))}column(e,t=1){let{text:n,from:i}=this.lineAt(e,t),r=this.countColumn(n,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(r+=o-this.countColumn(n,n.search(/\S|$/))),r}countColumn(e,t=e.length){return L0(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),r=this.options.overrideIndentation;if(r){let e=r(i);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let Z$=new VE;function ZG(e,t,n){for(let i=e;i;i=i.next){let e=function(e){let t=e.type.prop(Z$);if(t)return t;let n=e.firstChild,i;if(n&&(i=n.type.prop(VE.closedBy))){let t=e.lastChild,n=t&&i.indexOf(t.name)>-1;return e=>(function(e,t,n,i,r){let o=e.textAfter,a=o.match(/^\s*/)[0].length,s=i&&o.slice(a,a+i.length)==i||r==e.pos+a,l=t?function(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let r=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=null==r||r<=o.from?o.to:Math.min(o.to,r);for(let e=n.to;;){let r=t.childAfter(e);if(!r||r==i)return null;if(!r.type.isSkipped){if(r.from>=a)return null;let e=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+e}}e=r.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:+e.unit)})(e,!0,1,void 0,n&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?ZU:null}(i.node);if(e)return e(Zq.create(t,n,i))}return 0}function ZU(){return 0}class Zq extends ZW{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new Zq(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return ZG(this.context.next,this.base,this.pos)}}function ZY({except:e,units:t=1}={}){return n=>{let i=e&&e.test(n.textAfter);return n.baseIndent+(i?0:t*n.unit)}}let ZX=Ln.define(),ZK=new VE;function ZQ(e,t,n){for(let i of e.facet(ZX)){let r=i(e,t,n);if(r)return r}return function(e,t,n){let i=ZD(e);if(i.length<n)return null;let r=i.resolveStack(n,1),o=null;for(let a=r;a;a=a.next){let r=a.node;if(r.to<=n||r.from>n)continue;if(o&&r.from<t)break;let s=r.type.prop(ZK);if(s&&(r.to<i.length-50||i.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(r))){let i=s(r,e);i&&i.from<=n&&i.from>=t&&i.to>n&&(o=i)}}return o}(e,t,n)}function ZJ(e,t){let n=t.mapPos(e.from,1),i=t.mapPos(e.to,-1);return n>=i?void 0:{from:n,to:i}}let Z0=LD.define({map:ZJ}),Z1=LD.define({map:ZJ});function Z2(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}let Z5=Ll.define({create:()=>B1.none,update(e,t){for(let n of(e=e.map(t.changes),t.effects))if(n.is(Z0)&&!function(e,t,n){let i=!1;return e.between(t,t,(e,r)=>{e==t&&r==n&&(i=!0)}),i}(e,n.value.from,n.value.to)){let{preparePlaceholder:i}=t.state.facet(Z7),r=i?B1.replace({widget:new ji(i(t.state,n.value))}):jn;e=e.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Z1)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:i}=t.selection.main;e.between(i,i,(e,t)=>{e<i&&t>i&&(n=!0)}),n&&(e=e.update({filterFrom:i,filterTo:i,filter:(e,t)=>t<=i||e>=i}))}return e},provide:e=>zr.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let i=e[n++],r=e[n++];if("number"!=typeof i||"number"!=typeof r)throw RangeError("Invalid JSON for fold state");t.push(jn.range(i,r))}return B1.set(t,!0)}});function Z3(e,t,n){var i;let r=null;return null===(i=e.field(Z5,!1))||void 0===i||i.between(t,n,(e,t)=>{(!r||r.from>e)&&(r={from:e,to:t})}),r}function Z4(e,t){return e.field(Z5,!1)?t:t.concat(LD.appendConfig.of(je()))}function Z8(e,t,n=!0){let i=e.state.doc.lineAt(t.from).number,r=e.state.doc.lineAt(t.to).number;return zr.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${e.state.phrase("to")} ${r}.`)}let Z6=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of Z2(e)){let n=ZQ(e.state,t.from,t.to);if(n)return e.dispatch({effects:Z4(e.state,[Z0.of(n),Z8(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(Z5,!1))return!1;let t=[];for(let n of Z2(e)){let i=Z3(e.state,n.from,n.to);i&&t.push(Z1.of(i),Z8(e,i,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let i=0;i<t.doc.length;){let r=e.lineBlockAt(i),o=ZQ(t,r.from,r.to);o&&n.push(Z0.of(o)),i=(o?e.lineBlockAt(o.to):r).to+1}return n.length&&e.dispatch({effects:Z4(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(Z5,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(Z1.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],Z9={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Z7=Ln.define({combine:e=>LN(e,Z9)});function je(e){let t=[Z5,ja];return e&&t.push(Z7.of(e)),t}function jt(e,t){let{state:n}=e,i=n.facet(Z7),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),i=Z3(e.state,n.from,n.to);i&&e.dispatch({effects:Z1.of(i)}),t.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(e,r,t);let o=document.createElement("span");return o.textContent=i.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=r,o}let jn=B1.replace({widget:new class extends BJ{toDOM(e){return jt(e,null)}}});class ji extends BJ{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return jt(e,this.value)}}let jr={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class jo extends Vu{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}let ja=zr.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class js{constructor(e,t){let n;function i(e){let t=L4.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;let r="string"==typeof t.all?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof ZM?e=>e.prop(Z_)==o.data:o?e=>e==o:void 0,this.style=Zo(e.map(e=>({tag:e.tag,class:e.class||i(Object.assign({},e,{tag:null}))})),{all:r}).style,this.module=n?new L4(n):null,this.themeType=t.themeType}static define(e,t){return new js(e,t||{})}}let jl=Ln.define(),ju=Ln.define({combine:e=>e.length?[e[0]]:null});function jc(e){let t=e.facet(jl);return t.length?t:e.facet(ju)}function jh(e,t){let n=[jd],i;return e instanceof js&&(e.module&&n.push(zr.styleModule.of(e.module)),i=e.themeType),(null==t?void 0:t.fallback)?n.push(ju.of(e)):i?n.push(jl.computeN([zr.darkTheme],t=>t.facet(zr.darkTheme)==("dark"==i)?[e]:[])):n.push(jl.of(e)),n}let jd=Lh.high(NB.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=ZD(e.state),this.decorations=this.buildDeco(e,jc(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ZD(e.state),n=jc(e.state),i=n!=jc(e.startState),{viewport:r}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<r.to&&!i&&t.type==this.tree.type&&o>=r.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=r.to)}buildDeco(e,t){if(!t||!this.tree.length)return B1.none;let n=new LH;for(let{from:i,to:r}of e.visibleRanges)!function(e,t,n,i=0,r=e.length){let o=new Za(i,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),i,r,"",o.highlighters),o.flush(r)}(this.tree,t,(e,t,i)=>{n.add(e,t,this.markCache[i]||(this.markCache[i]=B1.mark({class:i})))},i,r);return n.finish()}},{decorations:e=>e.decorations})),jp=js.define([{tag:ZS.meta,color:"#404740"},{tag:ZS.link,textDecoration:"underline"},{tag:ZS.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ZS.emphasis,fontStyle:"italic"},{tag:ZS.strong,fontWeight:"bold"},{tag:ZS.strikethrough,textDecoration:"line-through"},{tag:ZS.keyword,color:"#708"},{tag:[ZS.atom,ZS.bool,ZS.url,ZS.contentSeparator,ZS.labelName],color:"#219"},{tag:[ZS.literal,ZS.inserted],color:"#164"},{tag:[ZS.string,ZS.deleted],color:"#a11"},{tag:[ZS.regexp,ZS.escape,ZS.special(ZS.string)],color:"#e40"},{tag:ZS.definition(ZS.variableName),color:"#00f"},{tag:ZS.local(ZS.variableName),color:"#30a"},{tag:[ZS.typeName,ZS.namespace],color:"#085"},{tag:ZS.className,color:"#167"},{tag:[ZS.special(ZS.variableName),ZS.macroName],color:"#256"},{tag:ZS.definition(ZS.propertyName),color:"#00c"},{tag:ZS.comment,color:"#940"},{tag:ZS.invalid,color:"#f00"}]),jf=zr.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),jg="()[]{}",jm=Ln.define({combine:e=>LN(e,{afterCursor:!0,brackets:jg,maxScanDistance:1e4,renderMatch:jx})}),jv=B1.mark({class:"cm-matchingBracket"}),jy=B1.mark({class:"cm-nonmatchingBracket"});function jx(e){let t=[],n=e.matched?jv:jy;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}let jb=[Ll.define({create:()=>B1.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],i=t.state.facet(jm);for(let e of t.state.selection.ranges){if(!e.empty)continue;let r=jC(t.state,e.head,-1,i)||e.head>0&&jC(t.state,e.head-1,1,i)||i.afterCursor&&(jC(t.state,e.head,1,i)||e.head<t.state.doc.length&&jC(t.state,e.head+1,-1,i));r&&(n=n.concat(i.renderMatch(r,t.state)))}return B1.set(n,!0)},provide:e=>zr.decorations.from(e)}),jf],jw=new VE;function jS(e,t,n){let i=e.prop(t<0?VE.openedBy:VE.closedBy);if(i)return i;if(1==e.name.length){let i=n.indexOf(e.name);if(i>-1&&i%2==+(t<0))return[n[i+t]]}return null}function j_(e){let t=e.type.prop(jw);return t?t(e.node):e}function jC(e,t,n,i={}){let r=i.maxScanDistance||1e4,o=i.brackets||jg,a=ZD(e),s=a.resolveInner(t,n);for(let e=s;e;e=e.parent){let i=jS(e.type,n,o);if(i&&e.from<e.to){let r=j_(e);if(r&&(n>0?t>=r.from&&t<r.to:t>r.from&&t<=r.to))return function(e,t,n,i,r,o,a){let s=i.parent,l={from:r.from,to:r.to},u=0,c=null==s?void 0:s.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(0==u&&o.indexOf(c.type.name)>-1&&c.from<c.to){let e=j_(c);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(jS(c.type,n,a))u++;else if(jS(c.type,-n,a)){if(0==u){let e=j_(c);return{start:l,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}u--}}while(n<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}(0,0,n,e,r,i,o)}}return function(e,t,n,i,r,o,a){let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=a.indexOf(s);if(l<0||l%2==0!=n>0)return null;let u={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),h=0;for(let e=0;!c.next().done&&e<=o;){let o=c.value;n<0&&(e+=o.length);let s=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=a.indexOf(o[e]);if(!(t<0)&&i.resolveInner(s+e,1).type==r){if(t%2==0==n>0)h++;else{if(1==h)return{start:u,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};h--}}}n>0&&(e+=o.length)}return c.done?{start:u,matched:!1}:null}(e,t,n,a,s.type,r,o)}let jM=Object.create(null),jk=[VN.none],jT=[],jD=Object.create(null),jI=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])jI[e]=function(e,t){let n=[];for(let i of t.split(" ")){let t=[];for(let n of i.split(".")){let i=e[n]||ZS[n];i?"function"==typeof i?t.length?t=t.map(i):jA(n,`Modifier ${n} used at start of tag`):t.length?jA(n,`Tag ${n} used as modifier`):t=Array.isArray(i)?i:[i]:jA(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let i=t.replace(/ /g,"_"),r=i+" "+n.map(e=>e.id),o=jD[r];if(o)return o.id;let a=jD[r]=VN.define({id:jk.length,name:i,props:[Zn({[i]:n})]});return jk.push(a),a.id}(jM,t);function jA(e,t){jT.indexOf(e)>-1||(jT.push(e),console.warn(t))}function jP(e,t){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=e(t,n);return!!r&&(i(n.update(r)),!0)}}Ni.RTL,Ni.LTR;let jO=jP(function(e,t,n=t.selection.ranges){let i=[],r=-1;for(let{from:e,to:o}of n){let n=i.length,a=1e9,s=jL(t,e).line;if(s){for(let n=e;n<=o;){let l=t.doc.lineAt(n);if(l.from>r&&(e==o||o>l.from)){r=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+s.length)==s?e:-1;e<l.text.length&&e<a&&(a=e),i.push({line:l,comment:n,token:s,indent:e,empty:t,single:!1})}n=l.to+1}if(a<1e9)for(let e=n;e<i.length;e++)i[e].indent<i[e].line.text.length&&(i[e].indent=a);i.length==n+1&&(i[n].single=!0)}}if(2!=e&&i.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:r,empty:o,single:a}of i)(a||!o)&&e.push({from:t.from+r,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&i.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:r}of i)if(n>=0){let i=t.from+n,o=i+r.length;" "==t.text[o-t.from]&&o++,e.push({from:i,to:o})}return{changes:e}}return null},0),jR=jP(jB,0),jE=jP((e,t)=>jB(e,t,function(e){let t=[];for(let n of e.selection.ranges){let i=e.doc.lineAt(n.from),r=n.to<=i.to?i:e.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>i.from?t[o].to=r.to:t.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return t}(t)),0);function jL(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function jB(e,t,n=t.selection.ranges){let i=n.map(e=>jL(t,e.from).block);if(!i.every(e=>e))return null;let r=n.map((e,n)=>(function(e,{open:t,close:n},i,r){let o,a,s=e.sliceDoc(i-50,i),l=e.sliceDoc(r,r+50),u=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,h=s.length-u;if(s.slice(h-t.length,h)==t&&l.slice(c,c+n.length)==n)return{open:{pos:i-u,margin:u&&1},close:{pos:r+c,margin:c&&1}};r-i<=100?o=a=e.sliceDoc(i,r):(o=e.sliceDoc(i,i+50),a=e.sliceDoc(r-50,r));let d=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(a)[0].length,f=a.length-p-n.length;return o.slice(d,d+t.length)==t&&a.slice(f,f+n.length)==n?{open:{pos:i+d+t.length,margin:+!!/\s/.test(o.charAt(d+t.length))},close:{pos:r-p-n.length,margin:+!!/\s/.test(a.charAt(f-1))}}:null})(t,i[n],e.from,e.to));if(2!=e&&!r.every(e=>e))return{changes:t.changes(n.map((e,t)=>r[t]?[]:[{from:e.from,insert:i[t].open+" "},{from:e.to,insert:" "+i[t].close}]))};if(1!=e&&r.some(e=>e)){let e=[];for(let t=0,n;t<r.length;t++)if(n=r[t]){let r=i[t],{open:o,close:a}=n;e.push({from:o.pos-r.open.length,to:o.pos+o.margin},{from:a.pos-a.margin,to:a.pos+r.close.length})}return{changes:e}}return null}let jN=LM.define(),jF=LM.define(),jz=Ln.define(),jV=Ln.define({combine:e=>LN(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,i)=>e(n,i)||t(n,i)})}),jZ=Ll.define({create:()=>j0.empty,update(e,t){let n=t.state.facet(jV),i=t.annotation(jN);if(i){let r=jU.fromTransaction(t,i.selection),o=i.side,a=0==o?e.undone:e.done;return a=r?jq(a,a.length,n.minDepth,r):jK(a,t.startState.selection),new j0(0==o?i.rest:a,0==o?a:i.rest)}let r=t.annotation(jF);if(("full"==r||"before"==r)&&(e=e.isolate()),!1===t.annotation(LI.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=jU.fromTransaction(t),a=t.annotation(LI.time),s=t.annotation(LI.userEvent);return o?e=e.addChanges(o,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),("full"==r||"after"==r)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new j0(e.done.map(jU.fromJSON),e.undone.map(jU.fromJSON))});function jj(e,t){return function({state:n,dispatch:i}){if(!t&&n.readOnly)return!1;let r=n.field(jZ,!1);if(!r)return!1;let o=r.pop(e,n,t);return!!o&&(i(o),!0)}}let jH=jj(0,!1),jW=jj(1,!1),j$=jj(0,!0),jG=jj(1,!0);class jU{constructor(e,t,n,i,r){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=i,this.selectionsAfter=r}setSelAfter(e){return new jU(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new jU(e.changes&&E1.fromJSON(e.changes),[],e.mapped&&E0.fromJSON(e.mapped),e.startSelection&&E7.fromJSON(e.startSelection),e.selectionsAfter.map(E7.fromJSON))}static fromTransaction(e,t){let n=jX;for(let t of e.startState.facet(jz)){let i=t(e);i.length&&(n=n.concat(i))}return!n.length&&e.changes.empty?null:new jU(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,jX)}static selection(e){return new jU(void 0,jX,void 0,void 0,e)}}function jq(e,t,n,i){let r=e.slice(t+1>n+20?t-n-1:0,t);return r.push(i),r}function jY(e,t){return e.length?t.length?e.concat(t):e:t}let jX=[];function jK(e,t){if(!e.length)return[jU.selection([t])];{let n=e[e.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(t)?e:(i.push(t),jq(e,e.length-1,1e9,n.setSelAfter(i)))}}function jQ(e,t){if(!e.length)return e;let n=e.length,i=jX;for(;n;){let r=function(e,t,n){let i=jY(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):jX,n);if(!e.changes)return jU.selection(i);let r=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new jU(r,LD.mapEffects(e.effects,t),a,e.startSelection.map(o),i)}(e[n-1],t,i);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,n);return t[n-1]=r,t}t=r.mapped,n--,i=r.selectionsAfter}return i.length?[jU.selection(i)]:jX}let jJ=/^(input\.type|delete)($|\.)/;class j0{constructor(e,t,n=0,i){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new j0(this.done,this.undone):this}addChanges(e,t,n,i,r){var o,a;let s,l,u=this.done,c=u[u.length-1];return new j0(u=c&&c.changes&&!c.changes.empty&&e.changes&&(!n||jJ.test(n))&&(!c.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(r,(o=c.changes,a=e.changes,s=[],l=!1,o.iterChangedRanges((e,t)=>s.push(e,t)),a.iterChangedRanges((e,t,n,i)=>{for(let e=0;e<s.length;){let t=s[e++],r=s[e++];i>=t&&n<=r&&(l=!0)}}),l))||"input.type.compose"==n)?jq(u,u.length-1,i.minDepth,new jU(e.changes.compose(c.changes),jY(LD.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,jX)):jq(u,u.length,i.minDepth,e),jX,t,n)}addSelection(e,t,n,i){var r;let o=this.done.length?this.done[this.done.length-1].selectionsAfter:jX;return o.length>0&&t-this.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(r=o[o.length-1]).ranges.length==e.ranges.length&&0===r.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length?this:new j0(jK(this.done,e),this.undone,t,n)}addMapping(e){return new j0(jQ(this.done,e),jQ(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let i=0==e?this.done:this.undone;if(0==i.length)return null;let r=i[i.length-1],o=r.selectionsAfter[0]||t.selection;if(n&&r.selectionsAfter.length){let n,a;return t.update({selection:r.selectionsAfter[r.selectionsAfter.length-1],annotations:jN.of({side:e,rest:(n=i[i.length-1],(a=i.slice())[i.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),a),selection:o}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}if(!r.changes)return null;{let n=1==i.length?jX:i.slice(0,i.length-1);return r.mapped&&(n=jQ(n,r.mapped)),t.update({changes:r.changes,selection:r.startSelection,effects:r.effects,annotations:jN.of({side:e,rest:n,selection:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}j0.empty=new j0(jX,jX);let j1=[{key:"Mod-z",run:jH,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:jW,preventDefault:!0},{linux:"Ctrl-Shift-z",run:jW,preventDefault:!0},{key:"Mod-u",run:j$,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:jG,preventDefault:!0}];function j2(e,t){return E7.create(e.ranges.map(t),e.mainIndex)}function j5(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function j3({state:e,dispatch:t},n){let i=j2(e.selection,n);return!i.eq(e.selection,!0)&&(t(j5(e,i)),!0)}function j4(e,t){return E7.cursor(t?e.to:e.from)}function j8(e,t){return j3(e,n=>n.empty?e.moveByChar(n,t):j4(n,t))}function j6(e){return e.textDirectionAt(e.state.selection.main.head)==Ni.LTR}let j9=e=>j8(e,!j6(e)),j7=e=>j8(e,j6(e));function He(e,t){return j3(e,n=>n.empty?e.moveByGroup(n,t):j4(n,t))}function Ht(e,t,n){let i,r,o=ZD(e).resolveInner(t.head),a=n?VE.closedBy:VE.openedBy;for(let i=t.head;;){let t=n?o.childAfter(i):o.childBefore(i);if(!t)break;!function(e,t,n){if(t.type.prop(n))return!0;let i=t.to-t.from;return i&&(i>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,a)?i=n?t.to:t.from:o=t}return r=o.type.prop(a)&&(i=n?jC(e,o.from,1):jC(e,o.to,-1))&&i.matched?n?i.end.to:i.end.from:n?o.to:o.from,E7.cursor(r,n?-1:1)}function Hn(e,t){return j3(e,n=>{if(!n.empty)return j4(n,t);let i=e.moveVertically(n,t);return i.head!=n.head?i:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;let Hi=e=>Hn(e,!1),Hr=e=>Hn(e,!0);function Ho(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,i=0,r;if(t){for(let t of e.state.facet(zr.scrollMargins)){let r=t(e);(null==r?void 0:r.top)&&(n=Math.max(null==r?void 0:r.top,n)),(null==r?void 0:r.bottom)&&(i=Math.max(null==r?void 0:r.bottom,i))}r=e.scrollDOM.clientHeight-n-i}else r=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:t,height:Math.max(e.defaultLineHeight,r-5)}}function Ha(e,t){let n,i=Ho(e),{state:r}=e,o=j2(r.selection,n=>n.empty?e.moveVertically(n,t,i.height):j4(n,t));if(o.eq(r.selection))return!1;if(i.selfScroll){let t=e.coordsAtPos(r.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+i.marginTop,l=a.bottom-i.marginBottom;t&&t.top>s&&t.bottom<l&&(n=zr.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(j5(r,o),{effects:n}),!0}let Hs=e=>Ha(e,!1),Hl=e=>Ha(e,!0);function Hu(e,t,n){let i=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,n);if(r.head==t.head&&r.head!=(n?i.to:i.from)&&(r=e.moveToLineBoundary(t,n,!1)),!n&&r.head==i.from&&i.length){let n=/^\s*/.exec(e.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;n&&t.head!=i.from+n&&(r=E7.cursor(i.from+n))}return r}function Hc(e,t){let n=j2(e.state.selection,e=>{let n=t(e);return E7.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(j5(e.state,n)),!0)}function Hh(e,t){return Hc(e,n=>e.moveByChar(n,t))}let Hd=e=>Hh(e,!j6(e)),Hp=e=>Hh(e,j6(e));function Hf(e,t){return Hc(e,n=>e.moveByGroup(n,t))}function Hg(e,t){return Hc(e,n=>e.moveVertically(n,t))}let Hm=e=>Hg(e,!1),Hv=e=>Hg(e,!0);function Hy(e,t){return Hc(e,n=>e.moveVertically(n,t,Ho(e).height))}let Hx=e=>Hy(e,!1),Hb=e=>Hy(e,!0),Hw=({state:e,dispatch:t})=>(t(j5(e,{anchor:0})),!0),HS=({state:e,dispatch:t})=>(t(j5(e,{anchor:e.doc.length})),!0),H_=({state:e,dispatch:t})=>(t(j5(e,{anchor:e.selection.main.anchor,head:0})),!0),HC=({state:e,dispatch:t})=>(t(j5(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function HM(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:i}=e,r=i.changeByRange(i=>{let{from:r,to:o}=i;if(r==o){let a=t(i);a<r?(n="delete.backward",a=Hk(e,a,!1)):a>r&&(n="delete.forward",a=Hk(e,a,!0)),r=Math.min(r,a),o=Math.max(o,a)}else r=Hk(e,r,!1),o=Hk(e,o,!0);return r==o?{range:i}:{changes:{from:r,to:o},range:E7.cursor(r,r<i.head?-1:1)}});return!r.changes.empty&&(e.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?zr.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function Hk(e,t,n){if(e instanceof zr)for(let i of e.state.facet(zr.atomicRanges).map(t=>t(e)))i.between(t,t,(e,i)=>{e<t&&i>t&&(t=n?i:e)});return t}let HT=(e,t,n)=>HM(e,i=>{let r=i.from,{state:o}=e,a=o.doc.lineAt(r),s,l;if(n&&!t&&r>a.from&&r<a.from+200&&!/[^ \t]/.test(s=a.text.slice(0,r-a.from))){if(" "==s[s.length-1])return r-1;let e=L0(s,o.tabSize)%ZZ(o)||ZZ(o);for(let t=0;t<e&&" "==s[s.length-1-t];t++)r--;l=r}else(l=Eq(a.text,r-a.from,t,t)+a.from)==r&&a.number!=(t?o.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(a.text.slice(l-a.from,r-a.from))&&(l=Eq(a.text,l-a.from,!1,!1)+a.from);return l}),HD=e=>HT(e,!1,!0),HI=e=>HT(e,!0,!1),HA=(e,t)=>HM(e,n=>{let i=n.head,{state:r}=e,o=r.doc.lineAt(i),a=r.charCategorizer(i);for(let e=null;;){if(i==(t?o.to:o.from)){i==n.head&&o.number!=(t?r.doc.lines:1)&&(i+=t?1:-1);break}let s=Eq(o.text,i-o.from,t)+o.from,l=o.text.slice(Math.min(i,s)-o.from,Math.max(i,s)-o.from),u=a(l);if(null!=e&&u!=e)break;(" "!=l||i!=n.head)&&(e=u),i=s}return i}),HP=e=>HA(e,!1);function HO(e){let t=[],n=-1;for(let i of e.selection.ranges){let r=e.doc.lineAt(i.from),o=e.doc.lineAt(i.to);if(i.empty||i.to!=o.from||(o=e.doc.lineAt(i.to-1)),n>=r.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(i)}else t.push({from:r.from,to:o.to,ranges:[i]});n=o.number+1}return t}function HR(e,t,n){if(e.readOnly)return!1;let i=[],r=[];for(let t of HO(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),a=o.length+1;if(n)for(let n of(i.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))r.push(E7.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)));else for(let n of(i.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))r.push(E7.range(n.anchor-a,n.head-a))}return!!i.length&&(t(e.update({changes:i,scrollIntoView:!0,selection:E7.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0)}function HE(e,t,n){if(e.readOnly)return!1;let i=[];for(let t of HO(e))n?i.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):i.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let HL=HN(!1),HB=HN(!0);function HN(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=t.changeByRange(n=>{let{from:i,to:r}=n,o=t.doc.lineAt(i),a=!e&&i==r&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=ZD(e).resolveInner(t),i=n.childBefore(t),r=n.childAfter(t),o;return i&&r&&i.to<=t&&r.from>=t&&(o=i.type.prop(VE.closedBy))&&o.indexOf(r.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(r.from).from&&!/\S/.test(e.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}(t,i);e&&(i=r=(r<=o.to?o:t.doc.lineAt(r)).to);let s=new ZW(t,{simulateBreak:i,simulateDoubleBreak:!!a}),l=ZH(s,i);for(null==l&&(l=L0(/^\s*/.exec(t.doc.lineAt(i).text)[0],t.tabSize));r<o.to&&/\s/.test(o.text[r-o.from]);)r++;a?{from:i,to:r}=a:i>o.from&&i<o.from+100&&!/\S/.test(o.text.slice(0,i))&&(i=o.from);let u=["",Zj(t,l)];return a&&u.push(Zj(t,s.lineIndent(o.from,-1))),{changes:{from:i,to:r,insert:Ez.of(u)},range:E7.cursor(i+1+u[1].length)}});return n(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function HF(e,t){let n=-1;return e.changeByRange(i=>{let r=[];for(let o=i.from;o<=i.to;){let a=e.doc.lineAt(o);a.number>n&&(i.empty||i.to>a.from)&&(t(a,r,i),n=a.number),o=a.to+1}let o=e.changes(r);return{changes:r,range:E7.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}})}let Hz=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(HF(e,(t,n)=>{n.push({from:t.from,insert:e.facet(ZV)})}),{userEvent:"input.indent"})),!0),HV=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(HF(e,(t,n)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let r=L0(i,e.tabSize),o=0,a=Zj(e,Math.max(0,r-ZZ(e)));for(;o<i.length&&o<a.length&&i.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+i.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),HZ=[{key:"Ctrl-b",run:j9,shift:Hd,preventDefault:!0},{key:"Ctrl-f",run:j7,shift:Hp},{key:"Ctrl-p",run:Hi,shift:Hm},{key:"Ctrl-n",run:Hr,shift:Hv},{key:"Ctrl-a",run:e=>j3(e,t=>E7.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>Hc(e,t=>E7.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>j3(e,t=>E7.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>Hc(e,t=>E7.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:HI},{key:"Ctrl-h",run:HD},{key:"Ctrl-k",run:e=>HM(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:HP},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Ez.of(["",""])},range:E7.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,i=e.doc.lineAt(n),r=n==i.from?n-1:Eq(i.text,n-i.from,!1)+i.from,o=n==i.to?n+1:Eq(i.text,n-i.from,!0)+i.from;return{changes:{from:r,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(r,n))},range:E7.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Hl}],Hj=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>j3(e,t=>Ht(e.state,t,!j6(e))),shift:e=>Hc(e,t=>Ht(e.state,t,!j6(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>j3(e,t=>Ht(e.state,t,j6(e))),shift:e=>Hc(e,t=>Ht(e.state,t,j6(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>HR(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>HE(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>HR(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>HE(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,i=null;return n.ranges.length>1?i=E7.create([n.main]):n.main.empty||(i=E7.create([E7.cursor(n.main.head)])),!!i&&(t(j5(e,i)),!0)}},{key:"Mod-Enter",run:HB},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=HO(e).map(({from:t,to:n})=>E7.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:E7.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=j2(e.selection,t=>{let n=ZD(e),i=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=i.node.from&&e.node.to<=i.node.to&&(i=e)}for(let e=i;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return E7.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(j5(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:HV},{key:"Mod-]",run:Hz},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),i=new ZW(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),r=HF(e,(t,r,o)=>{let a=ZH(i,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=Zj(e,a);(s!=l||o.from<t.from+s.length)&&(n[t.from]=a,r.push({from:t.from,to:t.from+s.length,insert:l}))});return r.changes.empty||t(e.update(r,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(HO(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),i=j2(t.selection,t=>{let n;if(e.lineWrapping){let i=e.lineBlockAt(t.head),r=e.coordsAtPos(t.head,t.assoc||1);r&&(n=i.bottom+e.documentTop-r.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let n,i;return n=!1,i=j2(e.selection,t=>{let i=jC(e,t.head,-1)||jC(e,t.head,1)||t.head>0&&jC(e,t.head-1,1)||t.head<e.doc.length&&jC(e,t.head+1,-1);if(!i||!i.end)return t;n=!0;let r=i.start.from==t.head?i.end.to:i.end.from;return E7.cursor(r)}),!!n&&(t(j5(e,i)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),i=jL(e.state,n.from);return i.line?jO(e):!!i.block&&jE(e)}},{key:"Alt-A",run:jR},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:j9,shift:Hd,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>He(e,!j6(e)),shift:e=>Hf(e,!j6(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>j3(e,t=>Hu(e,t,!j6(e))),shift:e=>Hc(e,t=>Hu(e,t,!j6(e))),preventDefault:!0},{key:"ArrowRight",run:j7,shift:Hp,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>He(e,j6(e)),shift:e=>Hf(e,j6(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>j3(e,t=>Hu(e,t,j6(e))),shift:e=>Hc(e,t=>Hu(e,t,j6(e))),preventDefault:!0},{key:"ArrowUp",run:Hi,shift:Hm,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Hw,shift:H_},{mac:"Ctrl-ArrowUp",run:Hs,shift:Hx},{key:"ArrowDown",run:Hr,shift:Hv,preventDefault:!0},{mac:"Cmd-ArrowDown",run:HS,shift:HC},{mac:"Ctrl-ArrowDown",run:Hl,shift:Hb},{key:"PageUp",run:Hs,shift:Hx},{key:"PageDown",run:Hl,shift:Hb},{key:"Home",run:e=>j3(e,t=>Hu(e,t,!1)),shift:e=>Hc(e,t=>Hu(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:Hw,shift:H_},{key:"End",run:e=>j3(e,t=>Hu(e,t,!0)),shift:e=>Hc(e,t=>Hu(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:HS,shift:HC},{key:"Enter",run:HL,shift:HL},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:HD,shift:HD},{key:"Delete",run:HI},{key:"Mod-Backspace",mac:"Alt-Backspace",run:HP},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>HA(e,!0)},{mac:"Mod-Backspace",run:e=>HM(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})},{mac:"Mod-Delete",run:e=>HM(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})}].concat(HZ.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),HH={key:"Tab",run:Hz,shift:HV};function HW(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];"string"==typeof r?e.setAttribute(i,r):null!=r&&(e[i]=r)}t++}for(;t<arguments.length;t++)!function e(t,n){if("string"==typeof n)t.appendChild(document.createTextNode(n));else if(null==n);else if(null!=n.nodeType)t.appendChild(n);else if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,n[i]);else throw RangeError("Unsupported child node: "+n)}(e,arguments[t]);return e}let H$="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class HG{constructor(e,t,n=0,i=e.length,r,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=r?e=>r(H$(e)):H$,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return EY(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=EX(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=EK(e);let i=this.normalize(t);if(i.length)for(let e=0,r=n;;e++){let o=i.charCodeAt(e),a=this.match(o,r,this.bufferPos+this.bufferStart);if(e==i.length-1){if(a)return this.value=a,this;break}r==n&&e<t.length&&t.charCodeAt(e)==o&&r++}}}match(e,t,n){let i=null;for(let t=0;t<this.matches.length;t+=2){let r=this.matches[t],o=!1;this.query.charCodeAt(r)==e&&(r==this.query.length-1?i={from:this.matches[t+1],to:n}:(this.matches[t]++,o=!0)),o||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(1==this.query.length?i={from:t,to:n}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}"undefined"!=typeof Symbol&&(HG.prototype[Symbol.iterator]=function(){return this});let HU={from:-1,to:-1,match:/.*/.exec("")},Hq="gm"+(null==/x/.unicode?"":"u");class HY{constructor(e,t,n,i=0,r=e.length){if(this.text=e,this.to=r,this.curLine="",this.done=!1,this.value=HU,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new HQ(e,t,n,i,r);this.re=new RegExp(t,Hq+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=HJ(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,i=n+t[0].length;if(this.matchPos=HJ(this.text,i+ +(n==i)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}let HX=new WeakMap;class HK{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let i=HX.get(e);if(!i||i.from>=n||i.to<=t){let i=new HK(t,e.sliceString(t,n));return HX.set(e,i),i}if(i.from==t&&i.to==n)return i;let{text:r,from:o}=i;return o>t&&(r=e.sliceString(t,o)+r,o=t),i.to<n&&(r+=e.sliceString(i.to,n)),HX.set(e,new HK(o,r)),new HK(t,r.slice(t-o,n-o))}}class HQ{constructor(e,t,n,i,r){this.text=e,this.to=r,this.done=!1,this.value=HU,this.matchPos=HJ(e,i),this.re=new RegExp(t,Hq+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=HK.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=HJ(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=HK.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function HJ(e,t){if(t>=e.length)return t;let n=e.lineAt(t),i;for(;t<n.to&&(i=n.text.charCodeAt(t-n.from))>=56320&&i<57344;)t++;return t}function H0(e){let t=HW("input",{class:"cm-textfield",name:"line",value:String(e.state.doc.lineAt(e.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:i}=e,r=i.doc.lineAt(i.selection.main.head),[,o,a,s,l]=n,u=s?+s.slice(1):0,c=a?+a:r.number;if(a&&l){let e=c/100;o&&(e=e*("-"==o?-1:1)+r.number/i.doc.lines),c=Math.round(i.doc.lines*e)}else a&&o&&(c=c*("-"==o?-1:1)+r.number);let h=i.doc.line(Math.max(1,Math.min(i.doc.lines,c))),d=E7.cursor(h.from+Math.max(0,Math.min(u,h.length)));e.dispatch({effects:[H1.of(!1),zr.scrollIntoView(d.from,{y:"center"})],selection:d}),e.focus()}return{dom:HW("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:H1.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},HW("label",e.state.phrase("Go to line"),": ",t)," ",HW("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),HW("button",{name:"close",onclick:()=>{e.dispatch({effects:H1.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["\xd7"]))}}"undefined"!=typeof Symbol&&(HY.prototype[Symbol.iterator]=HQ.prototype[Symbol.iterator]=function(){return this});let H1=LD.define(),H2=Ll.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(H1)&&(e=n.value);return e},provide:e=>Vl.from(e,e=>e?H0:null)}),H5=zr.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),H3={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},H4=Ln.define({combine:e=>LN(e,H3,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),H8=B1.mark({class:"cm-selectionMatch"}),H6=B1.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function H9(e,t,n,i){return(0==n||e(t.sliceDoc(n-1,n))!=LE.Word)&&(i==t.doc.length||e(t.sliceDoc(i,i+1))!=LE.Word)}let H7=NB.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(H4),{state:n}=e,i=n.selection;if(i.ranges.length>1)return B1.none;let r=i.main,o,a=null;if(r.empty){if(!t.highlightWordAroundCursor)return B1.none;let e=n.wordAt(r.head);if(!e)return B1.none;a=n.charCategorizer(r.head),o=n.sliceDoc(e.from,e.to)}else{let e=r.to-r.from;if(e<t.minSelectionLength||e>200)return B1.none;if(t.wholeWords){var s,l,u;if(o=n.sliceDoc(r.from,r.to),!(H9(a=n.charCategorizer(r.head),n,r.from,r.to)&&(s=a,l=r.from,u=r.to,s(n.sliceDoc(l,l+1))==LE.Word&&s(n.sliceDoc(u-1,u))==LE.Word)))return B1.none}else if(!(o=n.sliceDoc(r.from,r.to)))return B1.none}let c=[];for(let i of e.visibleRanges){let e=new HG(n.doc,o,i.from,i.to);for(;!e.next().done;){let{from:i,to:o}=e.value;if((!a||H9(a,n,i,o))&&(r.empty&&i<=r.from&&o>=r.to?c.push(H6.range(i,o)):(i>=r.to||o<=r.from)&&c.push(H8.range(i,o)),c.length>t.maxMatches))return B1.none}}return B1.set(c)}},{decorations:e=>e.decorations}),We=zr.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Wt=({state:e,dispatch:t})=>{let{selection:n}=e,i=E7.create(n.ranges.map(t=>e.wordAt(t.head)||E7.cursor(t.head)),n.mainIndex);return!i.eq(n)&&(t(e.update({selection:i})),!0)},Wn=Ln.define({combine:e=>LN(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new WP(e),scrollToMatch:e=>zr.scrollIntoView(e)})});class Wi{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,Hq),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Wc(this):new Wa(this)}getCursor(e,t=0,n){let i=e.doc?e:LB.create({doc:e});return null==n&&(n=i.doc.length),this.regexp?Ws(this,i,t,n):Wo(this,i,t,n)}}class Wr{constructor(e){this.spec=e}}function Wo(e,t,n,i){var r,o;return new HG(t.doc,e.unquoted,n,i,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(r=t.doc,o=t.charCategorizer(t.selection.main.head),(e,t,n,i)=>((i>e||i+n.length<t)&&(i=Math.max(0,e-2),n=r.sliceString(i,Math.min(r.length,t+2))),(o(Wl(n,e-i))!=LE.Word||o(Wu(n,e-i))!=LE.Word)&&(o(Wu(n,t-i))!=LE.Word||o(Wl(n,t-i))!=LE.Word))):void 0)}class Wa extends Wr{constructor(e){super(e)}nextMatch(e,t,n){let i=Wo(this.spec,e,n,e.doc.length).nextOverlapping();if(i.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);i=Wo(this.spec,e,0,n).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==n?null:i.value}prevMatchInRange(e,t,n){for(let i=n;;){let n=Math.max(t,i-1e4-this.spec.unquoted.length),r=Wo(this.spec,e,n,i),o=null;for(;!r.nextOverlapping().done;)o=r.value;if(o)return o;if(n==t)return null;i-=1e4}}prevMatch(e,t,n){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=n)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Wo(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let r=Wo(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}function Ws(e,t,n,i){var r;return new HY(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(r=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(r(Wl(n.input,n.index))!=LE.Word||r(Wu(n.input,n.index))!=LE.Word)&&(r(Wu(n.input,n.index+n[0].length))!=LE.Word||r(Wl(n.input,n.index+n[0].length))!=LE.Word)):void 0},n,i)}function Wl(e,t){return e.slice(Eq(e,t,!1),t)}function Wu(e,t){return e.slice(t,Eq(e,t))}class Wc extends Wr{nextMatch(e,t,n){let i=Ws(this.spec,e,n,e.doc.length).next();return i.done&&(i=Ws(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let r=Math.max(t,n-1e4*i),o=Ws(this.spec,e,r,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(r==t||a.from>r+10))return a;if(r==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let i=+n.slice(0,t);if(i>0&&i<e.match.length)return e.match[i]+n.slice(t)}return t})}matchAll(e,t){let n=Ws(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let r=Ws(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!r.next().done;)i(r.value.from,r.value.to)}}let Wh=LD.define(),Wd=LD.define(),Wp=Ll.define({create:e=>new Wf(WM(e).create(),null),update(e,t){for(let n of t.effects)n.is(Wh)?e=new Wf(n.value.create(),e.panel):n.is(Wd)&&(e=new Wf(e.query,n.value?WC:null));return e},provide:e=>Vl.from(e,e=>e.panel)});class Wf{constructor(e,t){this.query=e,this.panel=t}}let Wg=B1.mark({class:"cm-searchMatch"}),Wm=B1.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Wv=NB.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Wp))}update(e){let t=e.state.field(Wp);(t!=e.startState.field(Wp)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return B1.none;let{view:n}=this,i=new LH;for(let t=0,r=n.visibleRanges,o=r.length;t<o;t++){let{from:a,to:s}=r[t];for(;t<o-1&&s>r[t+1].from-500;)s=r[++t].to;e.highlight(n.state,a,s,(e,t)=>{let r=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);i.add(e,t,r?Wm:Wg)})}return i.finish()}},{decorations:e=>e.decorations});function Wy(e){return t=>{let n=t.state.field(Wp,!1);return n&&n.query.spec.valid?e(t,n):WD(t)}}let Wx=Wy((e,{query:t})=>{let{to:n}=e.state.selection.main,i=t.nextMatch(e.state,n,n);if(!i)return!1;let r=E7.single(i.from,i.to),o=e.state.facet(Wn);return e.dispatch({selection:r,effects:[WE(e,i),o.scrollToMatch(r.main,e)],userEvent:"select.search"}),WT(e),!0}),Wb=Wy((e,{query:t})=>{let{state:n}=e,{from:i}=n.selection.main,r=t.prevMatch(n,i,i);if(!r)return!1;let o=E7.single(r.from,r.to),a=e.state.facet(Wn);return e.dispatch({selection:o,effects:[WE(e,r),a.scrollToMatch(o.main,e)],userEvent:"select.search"}),WT(e),!0}),Ww=Wy((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!!n&&!!n.length&&(e.dispatch({selection:E7.create(n.map(e=>E7.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),WS=Wy((e,{query:t})=>{let{state:n}=e,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,i,i);if(!o)return!1;let a=o,s=[],l,u,c=[];if(a.from==i&&a.to==r&&(u=n.toText(t.getReplacement(a)),s.push({from:a.from,to:a.to,insert:u}),a=t.nextMatch(n,a.from,a.to),c.push(zr.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))),a){let t=0==s.length||s[0].from>=o.to?0:o.to-o.from-u.length;l=E7.single(a.from-t,a.to-t),c.push(WE(e,a)),c.push(n.facet(Wn).scrollToMatch(l.main,e))}return e.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),W_=Wy((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:i}=e;return{from:n,to:i,insert:t.getReplacement(e)}});if(!n.length)return!1;let i=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:zr.announce.of(i),userEvent:"input.replace.all"}),!0});function WC(e){return e.state.facet(Wn).createPanel(e)}function WM(e,t){var n,i,r,o,a;let s=e.selection.main,l=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!l)return t;let u=e.facet(Wn);return new Wi({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(i=null==t?void 0:t.caseSensitive)&&void 0!==i?i:u.caseSensitive,literal:null!==(r=null==t?void 0:t.literal)&&void 0!==r?r:u.literal,regexp:null!==(o=null==t?void 0:t.regexp)&&void 0!==o?o:u.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:u.wholeWord})}function Wk(e){let t=Vr(e,WC);return t&&t.dom.querySelector("[main-field]")}function WT(e){let t=Wk(e);t&&t==e.root.activeElement&&t.select()}let WD=e=>{let t=e.state.field(Wp,!1);if(t&&t.panel){let n=Wk(e);if(n&&n!=e.root.activeElement){let i=WM(e.state,t.query.spec);i.valid&&e.dispatch({effects:Wh.of(i)}),n.focus(),n.select()}}else e.dispatch({effects:[Wd.of(!0),t?Wh.of(WM(e.state,t.query.spec)):LD.appendConfig.of(WB)]});return!0},WI=e=>{let t=e.state.field(Wp,!1);if(!t||!t.panel)return!1;let n=Vr(e,WC);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Wd.of(!1)}),!0},WA=[{key:"Mod-f",run:WD,scope:"editor search-panel"},{key:"F3",run:Wx,shift:Wb,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Wx,shift:Wb,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:WI,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,o=[],a=0;for(let t=new HG(e.doc,e.sliceDoc(i,r));!t.next().done;){if(o.length>1e3)return!1;t.value.from==i&&(a=o.length),o.push(E7.range(t.value.from,t.value.to))}return t(e.update({selection:E7.create(o,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=Vr(e,H0);if(!t){let n=[H1.of(!0)];null==e.state.field(H2,!1)&&n.push(LD.appendConfig.of([H2,H5])),e.dispatch({effects:n}),t=Vr(e,H0)}return t&&t.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Wt({state:e,dispatch:t});let i=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=i))return!1;let r=function(e,t){let{main:n,ranges:i}=e.selection,r=e.wordAt(n.head),o=r&&r.from==n.from&&r.to==n.to;for(let n=!1,r=new HG(e.doc,t,i[i.length-1].to);;)if(r.next(),r.done){if(n)return null;r=new HG(e.doc,t,0,Math.max(0,i[i.length-1].from-1)),n=!0}else{if(n&&i.some(e=>e.from==r.value.from))continue;if(o){let t=e.wordAt(r.value.from);if(!t||t.from!=r.value.from||t.to!=r.value.to)continue}return r.value}}(e,i);return!!r&&(t(e.update({selection:e.selection.addRange(E7.range(r.from,r.to),!1),effects:zr.scrollIntoView(r.to)})),!0)},preventDefault:!0}];class WP{constructor(e){this.view=e;let t=this.query=e.state.field(Wp).query.spec;function n(e,t,n){return HW("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=HW("input",{value:t.search,placeholder:WO(e,"Find"),"aria-label":WO(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=HW("input",{value:t.replace,placeholder:WO(e,"Replace"),"aria-label":WO(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=HW("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=HW("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=HW("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=HW("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>Wx(e),[WO(e,"next")]),n("prev",()=>Wb(e),[WO(e,"previous")]),n("select",()=>Ww(e),[WO(e,"all")]),HW("label",null,[this.caseField,WO(e,"match case")]),HW("label",null,[this.reField,WO(e,"regexp")]),HW("label",null,[this.wordField,WO(e,"by word")]),...e.state.readOnly?[]:[HW("br"),this.replaceField,n("replace",()=>WS(e),[WO(e,"replace")]),n("replaceAll",()=>W_(e),[WO(e,"replace all")])],HW("button",{name:"close",onclick:()=>WI(e),"aria-label":WO(e,"close"),type:"button"},["\xd7"])])}commit(){let e=new Wi({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Wh.of(e)}))}keydown(e){var t,n;(t=this.view,n="search-panel",zv(zf(t.state),e,t,n))?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Wb:Wx)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),WS(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Wh)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Wn).top}}function WO(e,t){return e.state.phrase(t)}let WR=/[\s\.,:;?!]/;function WE(e,{from:t,to:n}){let i=e.state.doc.lineAt(t),r=e.state.doc.lineAt(n).to,o=Math.max(i.from,t-30),a=Math.min(r,n+30),s=e.state.sliceDoc(o,a);if(o!=i.from){for(let e=0;e<30;e++)if(!WR.test(s[e+1])&&WR.test(s[e])){s=s.slice(e);break}}if(a!=r){for(let e=s.length-1;e>s.length-30;e--)if(!WR.test(s[e-1])&&WR.test(s[e])){s=s.slice(0,e);break}}return zr.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${i.number}.`)}let WL=zr.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),WB=[Wp,Lh.low(Wv),WL];class WN{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ZD(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),r=i.search(WZ(e,!1));return r<0?null:{from:n+r,to:this.pos,text:i.slice(r)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function WF(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}class Wz{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}}function WV(e){return e.selection.main.from}function WZ(e,t){var n;let{source:i}=e,r=t&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?RegExp(`${r?"^":""}(?:${i})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}let Wj=LM.define(),WH=new WeakMap;function WW(e){if(!Array.isArray(e))return e;let t=WH.get(e);return t||WH.set(e,t=function(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,i]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let e=1;e<i.length;e++)n[i[e]]=!0}let i=WF(t)+WF(n)+"*$";return[RegExp("^"+i),new RegExp(i)]}(t);return e=>{let r=e.matchBefore(i);return r||e.explicit?{from:r?r.from:e.pos,options:t,validFor:n}:null}}(e)),t}let W$=LD.define(),WG=LD.define();class WU{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=EY(e,t),i=EK(n);this.chars.push(n);let r=e.slice(t,t+i),o=r.toUpperCase();this.folded.push(EY(o==r?r.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:r,byWord:o}=this;if(1==t.length){let i=EY(e,0),r=EK(i),o=r==e.length?0:-100;if(i==t[0]);else{if(i!=n[0])return null;o+=-200}return this.ret(o,[0,r])}let a=e.indexOf(this.pattern);if(0==a)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,l=0;if(a<0){for(let r=0,o=Math.min(e.length,200);r<o&&l<s;){let o=EY(e,r);(o==t[l]||o==n[l])&&(i[l++]=r),r+=EK(o)}if(l<s)return null}let u=0,c=0,h=!1,d=0,p=-1,f=-1,g=/[a-z]/.test(e),m=!0;for(let i=0,l=Math.min(e.length,200),v=0;i<l&&c<s;){let l=EY(e,i);a<0&&(u<s&&l==t[u]&&(r[u++]=i),d<s&&(l==t[d]||l==n[d]?(0==d&&(p=i),f=i+1,d++):d=0));let y,x=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(y=EX(l))!=y.toLowerCase()?1:2*(y!=y.toUpperCase());(!i||1==x&&g||0==v&&0!=x)&&(t[c]==l||n[c]==l&&(h=!0)?o[c++]=i:o.length&&(m=!1)),v=x,i+=EK(l)}return c==s&&0==o[0]&&m?this.result(-100+(h?-200:0),o,e):d==s&&0==p?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==s?this.ret(-900-e.length,[p,f]):c==s?this.result(-100+(h?-200:0)+-700+(m?0:-1100),o,e):2==t.length?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],r=0;for(let e of t){let t=e+(this.astral?EK(EY(n,e)):1);r&&i[r-1]==e?i[r-1]=t:(i[r++]=e,i[r++]=t)}return this.ret(e-n.length,i)}}class Wq{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}let WY=Ln.define({combine:e=>LN(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:WK,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>WX(e(n),t(n)),optionClass:(e,t)=>n=>WX(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function WX(e,t){return e?t?e+" "+t:e:t}function WK(e,t,n,i,r,o){let a=e.textDirection==Ni.RTL,s=a,l=!1,u="top",c,h,d=t.left-r.left,p=r.right-t.right,f=i.right-i.left,g=i.bottom-i.top;if(s&&d<Math.min(f,p)?s=!1:!s&&p<Math.min(f,d)&&(s=!0),f<=(s?d:p))c=Math.max(r.top,Math.min(n.top,r.bottom-g))-t.top,h=Math.min(400,s?d:p);else{l=!0,h=Math.min(400,(a?t.right:r.right-t.left)-30);let e=r.bottom-t.bottom;e>=g||e>t.top?c=n.bottom-t.top:(u="bottom",c=t.bottom-n.top)}let m=(t.bottom-t.top)/o.offsetHeight,v=(t.right-t.left)/o.offsetWidth;return{style:`${u}: ${c/m}px; max-width: ${h/v}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function WQ(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}class WJ{constructor(e,t,n){let i;this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:a}=r.open,s=e.state.facet(WY);this.optionContent=(i=s.addToOptions.slice(),s.icons&&i.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),i.push({render(e,t,n,i){let r=document.createElement("span");r.className="cm-completionLabel";let o=e.displayLabel||e.label,a=0;for(let e=0;e<i.length;){let t=i[e++],n=i[e++];t>a&&r.appendChild(document.createTextNode(o.slice(a,t)));let s=r.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(o.slice(t,n))),s.className="cm-completionMatchedText",a=n}return a<o.length&&r.appendChild(document.createTextNode(o.slice(a))),r},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),i.sort((e,t)=>e.position-t.position).map(e=>e.render)),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=WQ(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:i}=e.state.field(t).open;for(let t=n.target,r;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(r=/-(\d+)$/.exec(t.id))&&+r[1]<i.length){this.applyCompletion(e,i[+r[1]]),n.preventDefault();return}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(WY).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:WG.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:r,selected:o,disabled:a}=n.open;i.open&&i.open.options==r||(this.range=WQ(r.length,o,e.state.facet(WY).maxRenderedOptions),this.showOptions(r,n.id)),this.updateSel(),a!=(null===(t=i.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=WQ(t.options.length,t.selected,this.view.state.facet(WY).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:i}=n;if(!i)return;let r="string"==typeof i?document.createTextNode(i):i(n);if(!r)return;"then"in r?r.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>NO(this.view.state,e,"completion info")):this.addInfoPane(r,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:i}=e;n.appendChild(t),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,n;let i,r,o,a=null;for(let t=this.list.firstChild,n=this.range.from;t;t=t.nextSibling,n++)"LI"==t.nodeName&&t.id?n==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),a=t):t.hasAttribute("aria-selected")&&t.removeAttribute("aria-selected"):n--;return a&&(t=this.list,n=a,i=t.getBoundingClientRect(),r=n.getBoundingClientRect(),o=i.height/t.offsetHeight,r.top<i.top?t.scrollTop-=(i.top-r.top)/o:r.bottom>i.bottom&&(t.scrollTop+=(r.bottom-i.bottom)/o)),a}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),r=this.space;if(!r){let e=this.dom.ownerDocument.documentElement;r={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return i.top>Math.min(r.bottom,t.bottom)-10||i.bottom<Math.max(r.top,t.top)+10?null:this.view.state.facet(WY).positionInfo(this.view,t,i,n,r,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",e=>{e.target==i&&e.preventDefault()});let r=null;for(let o=n.from;o<n.to;o++){let{completion:a,match:s}=e[o],{section:l}=a;if(l){let e="string"==typeof l?l:l.name;e!=r&&(o>n.from||0==n.from)&&(r=e,"string"!=typeof l&&l.header?i.appendChild(l.header(l)):i.appendChild(document.createElement("completion-section")).textContent=e)}let u=i.appendChild(document.createElement("li"));u.id=t+"-"+o,u.setAttribute("role","option");let c=this.optionClass(a);for(let e of(c&&(u.className=c),this.optionContent)){let t=e(a,this.view.state,this.view,s);t&&u.appendChild(t)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function W0(e){return 100*(e.boost||0)+10*!!e.apply+5*!!e.info+ +!!e.type}class W1{constructor(e,t,n,i,r,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=r,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new W1(this.options,W4(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,r,o){if(i&&!o&&e.some(e=>e.isPending))return i.setDisabled();let a=function(e,t){let n=[],i=null,r=e=>{n.push(e);let{section:t}=e.completion;if(t){i||(i=[]);let e="string"==typeof t?t:t.name;i.some(t=>t.name==e)||i.push("string"==typeof t?{name:e}:t)}},o=t.facet(WY);for(let i of e)if(i.hasResult()){let e=i.result.getMatch;if(!1===i.result.filter)for(let t of i.result.options)r(new Wz(t,i.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(i.from,i.to),a,s=o.filterStrict?new Wq(n):new WU(n);for(let t of i.result.options)if(a=s.match(t.label)){let n=t.displayLabel?e?e(t,a.matched):[]:a.matched;r(new Wz(t,i.source,n,a.score+(t.boost||0)))}}}if(i){let e=Object.create(null),t=0;for(let n of i.sort((e,t)=>{var n,i;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(i=t.rank)&&void 0!==i?i:1e9)||(e.name<t.name?-1:1)}))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let a=[],s=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;s&&s.label==t.label&&s.detail==t.detail&&(null==s.type||null==t.type||s.type==t.type)&&s.apply==t.apply&&s.boost==t.boost?W0(e.completion)>W0(s)&&(a[a.length-1]=e):a.push(e),s=e.completion}return a}(e,t);if(!a.length)return i&&e.some(e=>e.isPending)?i.setDisabled():null;let s=t.facet(WY).selectOnOpen?0:-1;if(i&&i.selected!=s&&-1!=i.selected){let e=i.options[i.selected].completion;for(let t=0;t<a.length;t++)if(a[t].completion==e){s=t;break}}return new W1(a,W4(n,s),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:$r,above:r.aboveCursor},i?i.timestamp:Date.now(),s,!1)}map(e){return new W1(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new W1(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class W2{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new W2(W8,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(WY),i=(n.override||t.languageDataAt("autocomplete",WV(t)).map(WW)).map(t=>(this.active.find(e=>e.source==t)||new W9(t,+!!this.active.some(e=>0!=e.state))).update(e,n));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let r=this.open,o=e.effects.some(e=>e.is($e));for(let a of(r&&e.docChanged&&(r=r.map(e.changes)),e.selection||i.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,i=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;i<t.length&&!t[i].hasResult();)i++;let r=n==e.length,o=i==t.length;if(r||o)return r==o;if(e[n++].result!=t[i++].result)return!1}}(i,this.active)||o?r=W1.build(i,t,this.id,r,n,o):r&&r.disabled&&!i.some(e=>e.isPending)&&(r=null),!r&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new W9(e.source,0):e)),e.effects))a.is($t)&&(r=r&&r.setSelected(a.value,this.id));return i==this.active&&r==this.open?this:new W2(i,this.id,r)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?W5:W3}}let W5={"aria-autocomplete":"list"},W3={};function W4(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}let W8=[];function W6(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(Wj);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:16*!!e.docChanged}class W9{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=W6(e,t),i=this;for(let t of((8&n||16&n&&this.touches(e))&&(i=new W9(i.source,0)),4&n&&0==i.state&&(i=new W9(this.source,1)),i=i.updateFor(e,n),e.effects))if(t.is(W$))i=new W9(i.source,1,t.value);else if(t.is(WG))i=new W9(i.source,0);else if(t.is($e))for(let e of t.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(WV(e.state))}}class W7 extends W9{constructor(e,t,n,i,r,o){super(e,3,t),this.limit=n,this.result=i,this.from=r,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let r=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=WV(e.state);if(a>o||!i||2&t&&(WV(e.startState)==this.from||a<this.limit))return new W9(this.source,4&t?1:0);let s=e.changes.mapPos(this.limit);return!function(e,t,n,i){if(!e)return!1;let r=t.sliceDoc(n,i);return"function"==typeof e?e(r,n,i,t):WZ(e,!0).test(r)}(i.validFor,e.state,r,o)?i.update&&(i=i.update(i,r,o,new WN(e.state,a,!1)))?new W7(this.source,this.explicit,s,i,i.from,null!==(n=i.to)&&void 0!==n?n:WV(e.state)):new W9(this.source,1,this.explicit):new W7(this.source,this.explicit,s,i,r,o)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new W7(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new W9(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let $e=LD.define({map:(e,t)=>e.map(e=>e.map(t))}),$t=LD.define(),$n=Ll.define({create:()=>W2.start(),update:(e,t)=>e.update(t),provide:e=>[z8.from(e,e=>e.tooltip),zr.contentAttributes.from(e,e=>e.attrs)]});function $i(e,t){let n=t.completion.apply||t.completion.label,i=e.state.field($n).active.find(e=>e.source==t.source);return i instanceof W7&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,i){let{main:r}=e.selection,o=n-r.from,a=i-r.from;return Object.assign(Object.assign({},e.changeByRange(s=>{if(s!=r&&n!=i&&e.sliceDoc(s.from+o,s.from+a)!=e.sliceDoc(n,i))return{range:s};let l=e.toText(t);return{changes:{from:s.from+o,to:i==r.from?s.to:s.from+a,insert:l},range:E7.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,i.from,i.to)),{annotations:Wj.of(t.completion)})):n(e,t.completion,i.from,i.to),!0)}let $r=e=>new WJ(e,$n,$i);function $o(e,t="option"){return n=>{let i=n.state.field($n,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(WY).interactionDelay)return!1;let r=1,o;"page"==t&&(o=Vt(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=i.open.options,s=i.open.selected>-1?i.open.selected+r*(e?1:-1):e?0:a-1;return s<0?s="page"==t?0:a-1:s>=a&&(s="page"==t?a-1:0),n.dispatch({effects:$t.of(s)}),!0}}let $a=e=>!!e.state.field($n,!1)&&(e.dispatch({effects:W$.of(!0)}),!0);class $s{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}let $l=NB.fromClass(class{constructor(e){for(let t of(this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0,e.state.field($n).active))t.isPending&&this.startQuery(t)}update(e){let t=e.state.field($n),n=e.state.facet(WY);if(!e.selectionSet&&!e.docChanged&&e.startState.field($n)==t)return;let i=e.transactions.some(e=>{let t=W6(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(i||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){NO(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(W$)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),r):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field($n);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(WY).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=WV(t),i=new WN(t,n,e.explicit,this.view),r=new $s(e,i);this.running.push(r),Promise.resolve(e.source(i)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:WG.of(null)}),NO(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(WY).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(WY),i=this.view.state.field($n);for(let r=0;r<this.running.length;r++){let o=this.running[r];if(void 0===o.done)continue;if(this.running.splice(r--,1),o.done){let i=WV(o.updates.length?o.updates[0].startState:this.view.state),r=Math.min(i,o.done.from+ +!o.active.explicit),a=new W7(o.active.source,o.active.explicit,r,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:i);for(let e of o.updates)a=a.update(e,n);if(a.hasResult()){t.push(a);continue}}let a=i.active.find(e=>e.source==o.active.source);if(a&&a.isPending){if(null==o.done){let e=new W9(o.active.source,0);for(let t of o.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(a)}}(t.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:$e.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field($n,!1);if(t&&t.tooltip&&this.view.state.facet(WY).closeOnBlur){let n=t.open&&Vt(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:WG.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:W$.of(!1)}),20),this.composing=0}}}),$u="object"==typeof navigator&&/Win/.test(navigator.platform),$c=Lh.highest(zr.domEventHandlers({keydown(e,t){let n=t.state.field($n,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!($u&&e.altKey)||e.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(e=>e.source==i.source),o=i.completion.commitCharacters||r.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&$i(t,i),!1}})),$h=zr.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),$d={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$p=LD.define({map(e,t){let n=t.mapPos(e,-1,EJ.TrackAfter);return null==n?void 0:n}}),$f=new class extends LF{};$f.startSide=1,$f.endSide=-1;let $g=Ll.define({create:()=>Lj.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is($p)&&(e=e.update({add:[$f.range(n.value,n.value+1)]}));return e}}),$m="()[]{}<>\xab\xbb\xbb\xab[]{}";function $v(e){for(let t=0;t<$m.length;t+=2)if($m.charCodeAt(t)==e)return $m.charAt(t+1);return EX(e<128?e:e+1)}function $y(e,t){return e.languageDataAt("closeBrackets",t)[0]||$d}let $x="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),$b=zr.inputHandler.of((e,t,n,i)=>{if(($x?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let r=e.state.selection.main;if(i.length>2||2==i.length&&1==EK(EY(i,0))||t!=r.from||n!=r.to)return!1;let o=function(e,t){let n=$y(e,e.selection.main.head),i=n.brackets||$d.brackets;for(let r of i){let o=$v(EY(r,0));if(t==r)return o==r?function(e,t,n,i){let r=i.stringPrefixes||$d.stringPrefixes,o=null,a=e.changeByRange(i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:t,from:i.to}],effects:$p.of(i.to+t.length),range:E7.range(i.anchor+t.length,i.head+t.length)};let a=i.head,s=$_(e.doc,a),l;if(s==t){if($C(e,a))return{changes:{insert:t+t,from:a},effects:$p.of(a+t.length),range:E7.cursor(a+t.length)};if($S(e,a)){let i=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+i.length,insert:i},range:E7.cursor(a+i.length)}}}else if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(l=$M(e,a-2*t.length,r))>-1&&$C(e,l))return{changes:{insert:t+t+t+t,from:a},effects:$p.of(a+t.length),range:E7.cursor(a+t.length)};else if(e.charCategorizer(a)(s)!=LE.Word&&$M(e,a,r)>-1&&!function(e,t,n,i){let r=ZD(e).resolveInner(t,-1),o=i.reduce((e,t)=>Math.max(e,t.length),0);for(let a=0;a<5;a++){let a=e.sliceDoc(r.from,Math.min(r.to,r.from+n.length+o)),s=a.indexOf(n);if(!s||s>-1&&i.indexOf(a.slice(0,s))>-1){let t=r.firstChild;for(;t&&t.from==r.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=r.to==t&&r.parent;if(!l)break;r=l}return!1}(e,a,t,r))return{changes:{insert:t+t,from:a},effects:$p.of(a+t.length),range:E7.cursor(a+t.length)};return{range:o=i}});return o?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(e,r,i.indexOf(r+r+r)>-1,n):function(e,t,n,i){let r=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:$p.of(o.to+t.length),range:E7.range(o.anchor+t.length,o.head+t.length)};let a=$_(e.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:t+n,from:o.head},effects:$p.of(o.head+t.length),range:E7.cursor(o.head+t.length)}:{range:r=o}});return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(e,r,o,n.before||$d.before);if(t==o&&$S(e,e.selection.main.from))return function(e,t,n){let i=null,r=e.changeByRange(t=>t.empty&&$_(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:E7.cursor(t.head+n.length)}:i={range:t});return i?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}(e,0,o)}return null}(e.state,i);return!!o&&(e.dispatch(o),!0)}),$w=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=$y(e,e.selection.main.head).brackets||$d.brackets,i=null,r=e.changeByRange(t=>{if(t.empty){var r,o;let i;let a=(r=e.doc,o=t.head,EK(EY(i=r.sliceString(o-2,o),0))==i.length?i:i.slice(1));for(let i of n)if(i==a&&$_(e.doc,t.head)==$v(EY(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:E7.cursor(t.head-i.length)}}return{range:i=t}});return i||t(e.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function $S(e,t){let n=!1;return e.field($g).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $_(e,t){let n=e.sliceString(t,t+2);return n.slice(0,EK(EY(n,0)))}function $C(e,t){let n=ZD(e).resolveInner(t+1);return n.parent&&n.from==t}function $M(e,t,n){let i=e.charCategorizer(t);if(i(e.sliceDoc(t-1,t))!=LE.Word)return t;for(let r of n){let n=t-r.length;if(e.sliceDoc(n,t)==r&&i(e.sliceDoc(n-1,n))!=LE.Word)return n}return -1}let $k=[{key:"Ctrl-Space",run:$a},{mac:"Alt-`",run:$a},{key:"Escape",run:e=>{let t=e.state.field($n,!1);return!!(t&&t.active.some(e=>0!=e.state))&&(e.dispatch({effects:WG.of(null)}),!0)}},{key:"ArrowDown",run:$o(!0)},{key:"ArrowUp",run:$o(!1)},{key:"PageDown",run:$o(!0,"page")},{key:"PageUp",run:$o(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field($n,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(WY).interactionDelay)&&$i(e,t.open.options[t.open.selected])}}],$T=Lh.highest(zd.computeN([WY],e=>e.facet(WY).defaultKeymap?[$k]:[]));class $D{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class $I{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let i=e,r=n.facet($j).markerFilter;r&&(i=r(i,n));let o=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),a=new LH,s=[],l=0;for(let e=0;;){let t,i,r=e==o.length?null:o[e];if(!r&&!s.length)break;for(s.length?(t=l,i=s.reduce((e,t)=>Math.min(e,t.to),r&&r.from>t?r.from:1e8)):(t=r.from,i=r.to,s.push(r),e++);e<o.length;){let n=o[e];if(n.from==t&&(n.to>n.from||n.to==t))s.push(n),e++,i=Math.min(n.to,i);else{i=Math.min(n.from,i);break}}let u=$K(s);if(s.some(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from))a.add(t,t,B1.widget({widget:new $$(u),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");a.add(t,i,B1.mark({class:"cm-lintRange cm-lintRange-"+u+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>i)}))}l=i;for(let e=0;e<s.length;e++)s[e].to<=l&&s.splice(e--,1)}let u=a.finish();return new $I(u,t,$A(u))}}function $A(e,t=null,n=0){let i=null;return e.between(n,1e9,(e,n,{spec:r})=>{if(!(t&&0>r.diagnostics.indexOf(t))){if(i){if(0>r.diagnostics.indexOf(i.diagnostic))return!1;i=new $D(i.from,n,i.diagnostic)}else i=new $D(e,n,t||r.diagnostics[0])}}),i}function $P(e,t){let n=t.pos,i=t.end||n,r=e.state.facet($j).hideOn(e,n,i);if(null!=r)return r;let o=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is($R))||e.changes.touchesRange(o.from,Math.max(o.to,i)))}function $O(e,t){return e.field($B,!1)?t:t.concat(LD.appendConfig.of($3))}let $R=LD.define(),$E=LD.define(),$L=LD.define(),$B=Ll.define({create:()=>new $I(B1.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),i=null,r=e.panel;if(e.selected){let r=t.changes.mapPos(e.selected.from,1);i=$A(n,e.selected.diagnostic,r)||$A(n,null,r)}!n.size&&r&&t.state.facet($j).autoPanel&&(r=null),e=new $I(n,r,i)}for(let n of t.effects)if(n.is($R)){let i=t.state.facet($j).autoPanel?n.value.length?$U.open:null:e.panel;e=$I.init(n.value,i,t.state)}else n.is($E)?e=new $I(e.diagnostics,n.value?$U.open:null,e.selected):n.is($L)&&(e=new $I(e.diagnostics,e.panel,n.value));return e},provide:e=>[Vl.from(e,e=>e.panel),zr.decorations.from(e,e=>e.diagnostics)]}),$N=B1.mark({class:"cm-lintRange cm-lintRange-active"});function $F(e,t){return HW("ul",{class:"cm-tooltip-lint"},t.map(t=>$W(e,t,!1)))}let $z=e=>{let t=e.state.field($B,!1);return!!t&&!!t.panel&&(e.dispatch({effects:$E.of(!1)}),!0)},$V=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field($B,!1);t&&t.panel||e.dispatch({effects:$O(e.state,[$E.of(!0)])});let n=Vr(e,$U.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field($B,!1);if(!t)return!1;let n=e.state.selection.main,i=t.diagnostics.iter(n.to+1);return(!!i.value||!!(i=t.diagnostics.iter(0)).value&&(i.from!=n.from||i.to!=n.to))&&(e.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)}}],$Z=NB.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet($j);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet($j);t.length&&function(e,t,n){let i=[],r=-1;for(let o of e)o.then(n=>{i.push(n),clearTimeout(r),i.length==e.length?t(i):r=setTimeout(()=>t(i),200)},n)}(t.map(e=>Promise.resolve(e(this.view))),t=>{if(this.view.state.doc==e.doc){var n,i;this.view.dispatch((n=this.view.state,i=t.reduce((e,t)=>e.concat(t)),{effects:$O(n,[$R.of(i)])}))}},e=>{NO(this.view.state,e)})}}update(e){let t=e.state.facet($j);(e.docChanged||t!=e.startState.facet($j)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),$j=Ln.define({combine:e=>Object.assign({sources:e.map(e=>e.source).filter(e=>null!=e)},LN(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function $H(e){let t=[];if(e)a:for(let{name:n}of e){for(let e=0;e<n.length;e++){let i=n[e];if(/[a-zA-Z]/.test(i)&&!t.some(e=>e.toLowerCase()==i.toLowerCase())){t.push(i);continue a}}t.push("")}return t}function $W(e,t,n){var i;let r=n?$H(t.actions):[];return HW("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},HW("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(i=t.actions)||void 0===i?void 0:i.map((n,i)=>{let o=!1,a=i=>{if(i.preventDefault(),o)return;o=!0;let r=$A(e.state.field($B).diagnostics,t);r&&n.apply(e,r.from,r.to)},{name:s}=n,l=r[i]?s.indexOf(r[i]):-1,u=l<0?s:[s.slice(0,l),HW("u",s.slice(l,l+1)),s.slice(l+1)];return HW("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${r[i]})"`}.`},u)}),t.source&&HW("div",{class:"cm-diagnosticSource"},t.source))}class $$ extends BJ{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return HW("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class $G{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(0xffffffff*Math.random()).toString(16),this.dom=$W(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class $U{constructor(e){this.view=e,this.items=[],this.list=HW("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)$z(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65)||!(t.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],i=$H(n.actions);for(let r=0;r<i.length;r++)if(i[r].toUpperCase().charCodeAt(0)==t.keyCode){let t=$A(this.view.state.field($B).diagnostics,n);t&&n.actions[r].apply(e,t.from,t.to)}}t.preventDefault()},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=HW("div",{class:"cm-panel-lint"},this.list,HW("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>$z(this.view)},"\xd7")),this.update()}get selectedIndex(){let e=this.view.state.field($B).selected;if(!e)return -1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return -1}update(){let{diagnostics:e,selected:t}=this.view.state.field($B),n=0,i=!1,r=null,o=new Set;for(e.between(0,this.view.state.doc.length,(e,a,{spec:s})=>{for(let e of s.diagnostics){if(o.has(e))continue;o.add(e);let a=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){a=t;break}a<0?(s=new $G(this.view,e),this.items.splice(n,0,s),i=!0):(s=this.items[a],a>n&&(this.items.splice(n,a-n),i=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),r=s):s.dom.hasAttribute("aria-selected")&&s.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)i=!0,this.items.pop();0==this.items.length&&(this.items.push(new $G(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),i=!0),r?(this.list.setAttribute("aria-activedescendant",r.id),this.view.requestMeasure({key:this,read:()=>({sel:r.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=$A(this.view.state.field($B).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:$L.of(t)})}static open(e){return new $U(e)}}function $q(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function $Y(e){return $q(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}let $X=zr.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:$Y("#d11")},".cm-lintRange-warning":{backgroundImage:$Y("orange")},".cm-lintRange-info":{backgroundImage:$Y("#999")},".cm-lintRange-hint":{backgroundImage:$Y("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function $K(e){let t="hint",n=1;for(let r of e){var i;let e="error"==(i=r.severity)?4:"warning"==i?3:"info"==i?2:1;e>n&&(n=e,t=r.severity)}return t}class $Q extends Vu{constructor(e){super(),this.diagnostics=e,this.severity=$K(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,i=e.state.facet($4).tooltipFilter;return i&&(n=i(n,e.state)),n.length&&(t.onmouseover=()=>(function(e,t,n){function i(){let i,r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:$1.of({pos:r.from,above:!1,clip:!1,create:()=>({dom:$F(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,i=n=>{let r=t.getBoundingClientRect();if(!(n.clientX>r.left-10)||!(n.clientX<r.right+10)||!(n.clientY>r.top-10)||!(n.clientY<r.bottom+10)){for(let e=n.target;e;e=e.parentNode)if(1==e.nodeType&&e.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",i),e.state.field($2)&&e.dispatch({effects:$1.of(null)})}},window.addEventListener("mousemove",i)}let{hoverTime:r}=e.state.facet($4),o=setTimeout(i,r);t.onmouseout=()=>{clearTimeout(o),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(o),o=setTimeout(i,r)}})(e,t,n)),t}}let $J=Vf({class:"cm-gutter-lint",markers:e=>e.state.field($0),widgetMarker:(e,t,n)=>{let i=[];return e.state.field($0).between(n.from,n.to,(e,t,r)=>{e>n.from&&e<n.to&&i.push(...r.diagnostics)}),i.length?new $Q(i):null}}),$0=Ll.define({create:()=>Lj.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet($4).markerFilter;for(let i of t.effects)if(i.is($R)){let r=i.value;n&&(r=n(r||[],t.state)),e=function(e,t){let n=Object.create(null);for(let i of t){let t=e.lineAt(i.from);(n[t.from]||(n[t.from]=[])).push(i)}let i=[];for(let e in n)i.push(new $Q(n[e]).range(+e));return Lj.of(i,!0)}(t.state.doc,r.slice(0))}return e}}),$1=LD.define(),$2=Ll.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=$P(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce((e,t)=>t.is($1)?t.value:e,e)),provide:e=>z8.from(e)}),$5=zr.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:$q('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:$q('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:$q('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),$3=[$B,zr.decorations.compute([$B],e=>{let{selected:t,panel:n}=e.field($B);return t&&n&&t.from!=t.to?B1.set([$N.range(t.from,t.to)]):B1.none}),function(e,t={}){let n=LD.define(),i=Ll.define({create:()=>[],update(e,i){if(e.length&&(t.hideOnChange&&(i.docChanged||i.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(i,e))),i.docChanged)){let t=[];for(let n of e){let e=i.changes.mapPos(n.pos,-1,EJ.TrackDel);if(null!=e){let r=Object.assign(Object.create(null),n);r.pos=e,null!=r.end&&(r.end=i.changes.mapPos(r.end)),t.push(r)}}e=t}for(let t of i.effects)t.is(n)&&(e=t.value),t.is(Vn)&&(e=[]);return e},provide:e=>z6.from(e)});return{active:i,extension:[i,NB.define(r=>new Ve(r,e,i,n,t.hoverTime||300)),z7]}}(function(e,t,n){let{diagnostics:i}=e.state.field($B),r,o=-1,a=-1;i.between(t-+(n<0),t+ +(n>0),(e,i,{spec:s})=>{if(t>=e&&t<=i&&(e==i||(t>e||n>0)&&(t<i||n<0)))return r=s.diagnostics,o=e,a=i,!1});let s=e.state.facet($j).tooltipFilter;return(r&&s&&(r=s(r,e.state)),r)?{pos:o,end:a,above:e.state.doc.lineAt(o).to<a,create:()=>({dom:$F(e,r)})}:null},{hideOn:$P}),$X],$4=Ln.define({combine:e=>LN(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});var $8=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat($w)),!1!==e.defaultKeymap&&(n=n.concat(Hj)),!1!==e.searchKeymap&&(n=n.concat(WA)),!1!==e.historyKeymap&&(n=n.concat(j1)),!1!==e.foldKeymap&&(n=n.concat(Z6)),!1!==e.completionKeymap&&(n=n.concat($k)),!1!==e.lintKeymap&&(n=n.concat($V));var i=[];if(!1!==e.lineNumbers&&i.push(function(e={}){return[VM.of(e),Vm(),VD]}()),!1!==e.highlightActiveLineGutter&&i.push(VP),!1!==e.highlightSpecialChars&&i.push(function(e={}){return[zZ.of(e),zj||(zj=NB.fromClass(class{constructor(e){this.view=e,this.decorations=B1.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(zZ)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new zB({regexp:e.specialChars,decoration:(t,n,i)=>{let{doc:r}=n.state,o=EY(t[0],0);if(9==o){let e=r.lineAt(i),t=n.state.tabSize,o=L0(e.text,t,i-e.from);return B1.replace({widget:new zW((t-o%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=B1.replace({widget:new zH(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(zZ);e.startState.facet(zZ)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&i.push(function(e={}){return[jZ,jV.of(e),zr.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?jH:"historyRedo"==e.inputType?jW:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&i.push(function(e={}){let t=Object.assign(Object.assign({},jr),e),n=new jo(t,!0),i=new jo(t,!1),r=NB.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(ZN)!=e.state.facet(ZN)||e.startState.field(Z5,!1)!=e.state.field(Z5,!1)||ZD(e.startState)!=ZD(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new LH;for(let r of e.viewportLineBlocks){let o=Z3(e.state,r.from,r.to)?i:ZQ(e.state,r.from,r.to)?n:null;o&&t.add(r.from,r.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[r,Vf({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.markers)||Lj.empty},initialSpacer:()=>new jo(t,!1),domEventHandlers:Object.assign(Object.assign({},o),{click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let i=Z3(e.state,t.from,t.to);if(i)return e.dispatch({effects:Z1.of(i)}),!0;let r=ZQ(e.state,t.from,t.to);return!!r&&(e.dispatch({effects:Z0.of(r)}),!0)}})}),je()]}()),!1!==e.drawSelection&&i.push(function(e={}){return[zM.of(e),zT,zI,zP,NT.of(!0)]}()),!1!==e.dropCursor&&i.push([zR,zE]),!1!==e.allowMultipleSelections&&i.push(LB.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&i.push(LB.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:i}=e.newSelection.main,r=n.lineAt(i);if(i>r.from+200)return e;let o=n.sliceString(r.from,i);if(!t.some(e=>e.test(o)))return e;let{state:a}=e,s=-1,l=[];for(let{head:e}of a.selection.ranges){let t=a.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=ZH(a,t.from);if(null==n)continue;let i=/^\s*/.exec(t.text)[0],r=Zj(a,n);i!=r&&l.push({from:t.from,to:t.from+i.length,insert:r})}return l.length?[e,{changes:l,sequential:!0}]:e})),!1!==e.syntaxHighlighting&&i.push(jh(jp,{fallback:!0})),!1!==e.bracketMatching&&i.push(function(e={}){return[jm.of(e),jb]}()),!1!==e.closeBrackets&&i.push([$b,$g]),!1!==e.autocompletion&&i.push(function(e={}){return[$c,$n,WY.of(e),$l,$T,$h]}()),!1!==e.rectangularSelection){let e;i.push((e=e=>e.altKey&&0==e.button,zr.mouseSelectionStyle.of((t,n)=>{let i,r;return e(n)?(i=zq(t,n),r=t.state.selection,i?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(i.line).from),n=e.state.doc.lineAt(t);i={line:n.number,col:i.col,off:Math.min(i.off,n.length)},r=r.map(e.changes)}},get(e,n,o){let a=zq(t,e);if(!a)return r;let s=function(e,t,n){let i=Math.min(t.line,n.line),r=Math.max(t.line,n.line),o=[];if(t.off>2e3||n.off>2e3||t.col<0||n.col<0){let a=Math.min(t.off,n.off),s=Math.max(t.off,n.off);for(let t=i;t<=r;t++){let n=e.doc.line(t);n.length<=s&&o.push(E7.range(n.from+a,n.to+s))}}else{let a=Math.min(t.col,n.col),s=Math.max(t.col,n.col);for(let t=i;t<=r;t++){let n=e.doc.line(t),i=L1(n.text,a,e.tabSize,!0);if(i<0)o.push(E7.cursor(n.to));else{let t=L1(n.text,s,e.tabSize);o.push(E7.range(n.from+i,n.from+t))}}}return o}(t.state,i,a);return s.length?o?E7.create(s.concat(r.ranges)):E7.create(s):r}}:null):null})))}if(!1!==t&&i.push(function(e={}){let[t,n]=zY[e.key||"Alt"],i=NB.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[i,zr.contentAttributes.of(e=>{var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.isDown)?zX:null})]}()),!1!==e.highlightActiveLine&&i.push(zG),!1!==e.highlightSelectionMatches){let e;i.push(e=[We,H7])}return e.tabSize&&"number"==typeof e.tabSize&&i.push(ZV.of(" ".repeat(e.tabSize))),i.concat([zd.of(n.flat())]).filter(Boolean)};let $6="#e06c75",$9="#abb2bf",$7="#7d8799",Ge="#d19a66",Gt="#2c313a",Gn="#282c34",Gi="#353a42",Gr="#528bff",Go=[zr.theme({"&":{color:$9,backgroundColor:Gn},".cm-content":{caretColor:Gr},".cm-cursor, .cm-dropCursor":{borderLeftColor:Gr},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:$9},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Gn,color:$7,border:"none"},".cm-activeLineGutter":{backgroundColor:Gt},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Gi},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Gi,borderBottomColor:Gi},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Gt,color:$9}}},{dark:!0}),jh(js.define([{tag:ZS.keyword,color:"#c678dd"},{tag:[ZS.name,ZS.deleted,ZS.character,ZS.propertyName,ZS.macroName],color:$6},{tag:[ZS.function(ZS.variableName),ZS.labelName],color:"#61afef"},{tag:[ZS.color,ZS.constant(ZS.name),ZS.standard(ZS.name)],color:Ge},{tag:[ZS.definition(ZS.name),ZS.separator],color:$9},{tag:[ZS.typeName,ZS.className,ZS.number,ZS.changed,ZS.annotation,ZS.modifier,ZS.self,ZS.namespace],color:"#e5c07b"},{tag:[ZS.operator,ZS.operatorKeyword,ZS.url,ZS.escape,ZS.regexp,ZS.link,ZS.special(ZS.string)],color:"#56b6c2"},{tag:[ZS.meta,ZS.comment],color:$7},{tag:ZS.strong,fontWeight:"bold"},{tag:ZS.emphasis,fontStyle:"italic"},{tag:ZS.strikethrough,textDecoration:"line-through"},{tag:ZS.link,color:$7,textDecoration:"underline"},{tag:ZS.heading,fontWeight:"bold",color:$6},{tag:[ZS.atom,ZS.bool,ZS.special(ZS.variableName)],color:Ge},{tag:[ZS.processingInstruction,ZS.string,ZS.inserted],color:"#98c379"},{tag:ZS.invalid,color:"#ffffff"}]))];var Ga=zr.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Gs=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:i=!1,theme:r="light",placeholder:o="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(zd.of([HH])),a&&("boolean"==typeof a?s.unshift($8()):s.unshift($8(a))),o&&s.unshift(NB.fromClass(class{constructor(e){this.view=e,this.placeholder=o?B1.set([B1.widget({widget:new zU(o),side:1}).range(0)]):B1.none}get decorations(){return this.view.state.doc.length?B1.none:this.placeholder}},{decorations:e=>e.decorations})),r){case"light":s.push(Ga);break;case"dark":s.push(Go);break;case"none":break;default:s.push(r)}return!1===n&&s.push(zr.editable.of(!1)),i&&s.push(LB.readOnly.of(!0)),[...s]},Gl=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),Gu=LM.define(),Gc=[],Gh=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Gd=(0,eV.forwardRef)((e,t)=>{var{className:n,value:i="",selection:r,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:u,autoFocus:c,theme:h="light",height:d,minHeight:p,maxHeight:f,width:g,minWidth:m,maxWidth:v,basicSetup:y,placeholder:x,indentWithTab:b,editable:w,readOnly:S,root:_,initialState:C}=e,M=(0,EA.Z)(e,Gh),k=(0,eV.useRef)(null),{state:T,view:D,container:I,setContainer:A}=function(e){var{value:t,selection:n,onChange:i,onStatistics:r,onCreateEditor:o,onUpdate:a,extensions:s=Gc,autoFocus:l,theme:u="light",height:c=null,minHeight:h=null,maxHeight:d=null,width:p=null,minWidth:f=null,maxWidth:g=null,placeholder:m="",editable:v=!0,readOnly:y=!1,indentWithTab:x=!0,basicSetup:b=!0,root:w,initialState:S}=e,[_,C]=(0,eV.useState)(),[M,k]=(0,eV.useState)(),[T,D]=(0,eV.useState)(),I=zr.theme({"&":{height:c,minHeight:h,maxHeight:d,width:p,minWidth:f,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),A=[zr.updateListener.of(e=>{e.docChanged&&"function"==typeof i&&!e.transactions.some(e=>e.annotation(Gu))&&i(e.state.doc.toString(),e),r&&r(Gl(e))}),I,...Gs({theme:u,editable:v,readOnly:y,placeholder:m,indentWithTab:x,basicSetup:b})];return a&&"function"==typeof a&&A.push(zr.updateListener.of(a)),A=A.concat(s),(0,eV.useLayoutEffect)(()=>{if(_&&!T){var e={doc:t,selection:n,extensions:A},i=S?LB.fromJSON(S.json,e,S.fields):LB.create(e);if(D(i),!M){var r=new zr({state:i,parent:_,root:w});k(r),o&&o(r,i)}}return()=>{M&&(D(void 0),k(void 0))}},[_,T]),(0,eV.useEffect)(()=>{e.container&&C(e.container)},[e.container]),(0,eV.useEffect)(()=>()=>{M&&(M.destroy(),k(void 0))},[M]),(0,eV.useEffect)(()=>{l&&M&&M.focus()},[l,M]),(0,eV.useEffect)(()=>{M&&M.dispatch({effects:LD.reconfigure.of(A)})},[u,s,c,h,d,p,f,g,m,v,y,x,b,i,a]),(0,eV.useEffect)(()=>{if(void 0!==t){var e=M?M.state.doc.toString():"";M&&t!==e&&M.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[Gu.of(!0)]})}},[t,M]),{state:T,setState:D,view:M,setView:k,container:_,setContainer:C}}({root:_,value:i,autoFocus:c,theme:h,height:d,minHeight:p,maxHeight:f,width:g,minWidth:m,maxWidth:v,basicSetup:y,placeholder:x,indentWithTab:b,editable:w,readOnly:S,selection:r,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:u,extensions:o,initialState:C});(0,eV.useImperativeHandle)(t,()=>({editor:k.current,state:T,view:D}),[k,I,T,D]);var P=(0,eV.useCallback)(e=>{k.current=e,A(e)},[A]);if("string"!=typeof i)throw Error("value must be typeof string but got "+typeof i);var O="string"==typeof h?"cm-theme-"+h:"cm-theme";return(0,ez.jsx)("div",(0,EI.Z)({ref:P,className:""+O+(n?" "+n:"")},M))});Gd.displayName="CodeMirror";class Gp{constructor(e,t,n,i,r,o,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=r,this.score=o,this.buffer=a,this.bufferBase=s,this.curContext=l,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new Gp(e,[],t,n,n,0,[],0,i?new Gf(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=65535&e,{parser:r}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=r.dynamicPrecedence(i);if(a&&(this.score+=a),0==n){this.pushState(r.getGoto(this.state,i,!0),this.reducePos),i<r.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let s=this.stack.length-(n-1)*3-(262144&e?6:0),l=s?this.stack[s-2]:this.p.ranges[0].from,u=this.reducePos-l;u>=2e3&&!(null===(t=this.p.parser.nodeSet.types[i])||void 0===t?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=u));let c=s?this.stack[s-1]:0,h=this.bufferBase+this.buffer.length-c;if(i<r.minRepeatTerm||131072&e){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,l,e,h+4,!0)}if(262144&e)this.state=this.stack[s];else{let e=this.stack[s-3];this.state=r.getGoto(e,i,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(i,l)}storeNode(e,t,n,i=4,r=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,i=this.buffer.length;if(0==i&&e.parent&&(i=e.bufferBase-e.parent.bufferBase,e=e.parent),i>0&&0==e.buffer[i-4]&&e.buffer[i-1]>-1){if(t==n)return;if(e.buffer[i-2]>=t){e.buffer[i-2]=n;return}}}if(r&&this.pos!=n){let r=this.buffer.length;if(r>0&&0!=this.buffer[r-4]){let e=!1;for(let t=r;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;r>0&&this.buffer[r-2]>n;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=e,this.buffer[r+1]=t,this.buffer[r+2]=n,this.buffer[r+3]=i}else this.buffer.push(e,t,n,i)}shift(e,t,n,i){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:r}=this.p;(i>this.pos||t<=r.maxNode)&&(this.pos=i,r.stateFlag(e,1)||(this.reducePos=i)),this.pushState(e,n),this.shiftContext(t,n),t<=r.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,n,i){65536&e?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Gp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Gg(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if((65536&n)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let i=0,r;i<t.length;i+=2)(r=t[i+1])!=this.state&&this.p.parser.hasAction(r,e)&&n.push(t[i],r);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let i=t[e+1];n.some((e,t)=>1&t&&e==i)||n.push(t[e],i)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let i=t[e+1];if(i==this.state)continue;let r=this.split();r.pushState(i,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(t[e],this.pos),r.reducePos=this.pos,r.score-=200,n.push(r)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,i=65535&t,r=this.stack.length-3*n;if(r<0||0>e.getGoto(this.stack[r],i,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,r)=>{if(!t.includes(i))return t.push(i),e.allActions(i,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-r;if(n>1){let i=65535&t,r=this.stack.length-3*n;if(r>=0&&e.getGoto(this.stack[r],i,!1)>=0)return n<<19|65536|i}}else{let e=n(t,r+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new Gf(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Gf{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class Gg{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=n}}class Gm{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Gm(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new Gm(this.stack,this.pos,this.index)}}function Gv(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let i=0,r=0;i<e.length;){let o=0;for(;;){let t=e.charCodeAt(i++),n=!1;if(126==t){o=65535;break}t>=92&&t--,t>=34&&t--;let r=t-32;if(r>=46&&(r-=46,n=!0),o+=r,n)break;o*=46}n?n[r++]=o:n=new t(o)}return n}class Gy{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let Gx=new Gy;class Gb{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Gx,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,r=this.pos+e;for(;r<n.from;){if(!i)return null;let e=this.ranges[--i];r-=n.from-e.to,n=e}for(;t<0?r>n.to:r>=n.to;){if(i==this.ranges.length-1)return null;let e=this.ranges[++i];r+=e.from-n.to,n=e}return r}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t<this.chunk.length)n=this.pos+e,i=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((n=t)>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Gx,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}}class Gw{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;GS(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}function GS(e,t,n,i,r,o){let a=0,s=1<<i,{dialect:l}=n.p.parser;o:for(;(s&e[a])!=0;){let n=e[a+1];for(let i=a+3;i<n;i+=2)if((e[i+1]&s)>0){let n=e[i];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||function(e,t,n,i){let r=G_(n,i,t);return r<0||G_(n,i,e)<r}(n,t.token.value,r,o))){t.acceptToken(n);break}}let i=t.next,u=0,c=e[a+2];if(t.next<0&&c>u&&65535==e[n+3*c-3]){a=e[n+3*c-1];continue}for(;u<c;){let r=u+c>>1,o=n+r+(r<<1),s=e[o],l=e[o+1]||65536;if(i<s)c=r;else if(i>=l)u=r+1;else{a=e[o+2],t.advance();continue o}}break}}function G_(e,t,n){for(let i=t,r;65535!=(r=e[i]);i++)if(r==n)return i-t;return -1}Gw.prototype.contextual=Gw.prototype.fallback=Gw.prototype.extend=!1,(class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?Gv(e):e}token(e,t){let n=e.pos,i=0;for(;;){let n=e.next<0,r=e.resolveOffset(1,1);if(GS(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&i++,null==r)break;e.reset(r,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}}).prototype.contextual=Gw.prototype.fallback=Gw.prototype.extend=!1;let GC="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),GM=null;function Gk(e,t,n){let i=e.cursor(eB.IncludeAnonymous);for(i.moveTo(t);;)if(!(n<0?i.childBefore(t):i.childAfter(t)))for(;;){if((n<0?i.to<t:i.from>t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}class GT{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Gk(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Gk(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],i=this.index[t];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=n.children[i],o=this.start[t]+n.positions[i];if(o>e)return this.nextStart=o,null;if(r instanceof VZ){if(o==e){if(o<this.safeFrom)return null;let e=o+r.length;if(e<=this.safeTo){let t=r.prop(VE.lookAhead);if(!t||e+t<this.fragment.to)return r}}this.index[t]++,o+r.length>=Math.max(this.safeFrom,e)&&(this.trees.push(r),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+r.length}}}class GD{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new Gy)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:r}=i,o=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let i=0;i<r.length;i++){if((1<<i&o)==0)continue;let l=r[i],u=this.tokens[i];if((!n||l.fallback)&&((l.contextual||u.start!=e.pos||u.mask!=o||u.context!=a)&&(this.updateCachedToken(u,l,e),u.mask=o,u.context=a),u.lookAhead>u.end+25&&(s=Math.max(u.lookAhead,s)),0!=u.value)){let i=t;if(u.extended>-1&&(t=this.addActions(e,u.extended,u.end,t)),t=this.addActions(e,u.value,u.end,t),!l.extend&&(n=u,t>i))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||((n=new Gy).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Gy,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:t}=n.p;for(let i=0;i<t.specialized.length;i++)if(t.specialized[i]==e.value){let r=t.specializers[i](this.stream.read(e.start,e.end),n);if(r>=0&&n.p.parser.dialect.allows(r>>1)){(1&r)==0?e.value=r>>1:e.extended=r>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let t=0;t<i;t+=3)if(this.actions[t]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=n,i}addActions(e,t,n,i){let{state:r}=e,{parser:o}=e.p,{data:a}=o;for(let e=0;e<2;e++)for(let s=o.stateSlot(r,e?2:1);;s+=3){if(65535==a[s]){if(1==a[s+1])s=GR(a,s+2);else{0==i&&2==a[s+1]&&(i=this.putAction(GR(a,s+2),t,n,i));break}}a[s]==t&&(i=this.putAction(GR(a,s+1),t,n,i))}return i}}class GI{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Gb(t,i),this.tokens=new GD(e,this.stream),this.topTerm=e.top[1];let{from:r}=i[0];this.stacks=[Gp.start(this,e.top[0],r)],this.fragments=n.length&&this.stream.end-r>4*e.bufferLength?new GT(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,i=this.minStackPos,r=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let a=n[o];for(;;){if(this.tokens.mainToken=null,a.pos>i)r.push(a);else{if(this.advanceStack(a,r,n))continue;e||(e=[],t=[]),e.push(a);let i=this.tokens.getMainToken(a);t.push(i.value,i.end)}break}}if(!r.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return GC&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw GC&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,r);if(n)return GC&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(r.length>e)for(r.sort((e,t)=>t.score-e.score);r.length>e;)r.pop();r.some(e=>e.reducePos>i)&&this.recovering--}else if(r.length>1){n:for(let e=0;e<r.length-1;e++){let t=r[e];for(let n=e+1;n<r.length;n++){let i=r[n];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)r.splice(n--,1);else{r.splice(e--,1);continue n}}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let e=1;e<r.length;e++)r[e].pos<this.minStackPos&&(this.minStackPos=r[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let i=e.pos,{parser:r}=this,o=GC?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(i);a;){let i=this.parser.nodeSet.types[a.type.id]==a.type?r.getGoto(e.state,a.type.id):-1;if(i>-1&&a.length&&(!t||(a.prop(VE.contextHash)||0)==n))return e.useNode(a,i),GC&&console.log(o+this.stackID(e)+` (via reuse of ${r.getName(a.type.id)})`),!0;if(!(a instanceof VZ)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(s instanceof VZ&&0==a.positions[0])a=s;else break}}let a=r.stateSlot(e.state,4);if(a>0)return e.reduce(a),GC&&console.log(o+this.stackID(e)+` (via always-reduce ${r.getName(65535&a)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let a=0;a<s.length;){let l=s[a++],u=s[a++],c=s[a++],h=a==s.length||!n,d=h?e:e.split(),p=this.tokens.mainToken;if(d.apply(l,u,p?p.start:d.pos,c),GC&&console.log(o+this.stackID(d)+` (via ${(65536&l)==0?"shift":`reduce of ${r.getName(65535&l)}`} for ${r.getName(u)} @ ${i}${d==e?"":", split"})`),h)return!0;d.pos>i?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return GA(e,t),!0}}runRecovery(e,t,n){let i=null,r=!1;for(let o=0;o<e.length;o++){let a=e[o],s=t[o<<1],l=t[(o<<1)+1],u=GC?this.stackID(a)+" -> ":"";if(a.deadEnd&&(r||(r=!0,a.restart(),GC&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))))continue;let c=a.split(),h=u;for(let e=0;c.forceReduce()&&e<10&&(GC&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));e++)GC&&(h=this.stackID(c)+" -> ");for(let e of a.recoverByInsert(s))GC&&console.log(u+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>a.pos?(l==a.pos&&(l++,s=0),a.recoverByDelete(s,l),GC&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),GA(a,n)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),VZ.build({buffer:Gm.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(GM||(GM=new WeakMap)).get(e);return t||GM.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function GA(e,t){for(let n=0;n<t.length;n++){let i=t[n];if(i.pos==e.pos&&i.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class GP{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class GO extends V8{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),i=[];for(let e=0;e<t.length;e++)i.push([]);function r(e,t,n){i[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=VE[e]);for(let n=1;n<t.length;){let i=t[n++];if(i>=0)r(i,e,t[n++]);else{let o=t[n+-i];for(let a=-i;a>0;a--)r(t[n++],e,o);n++}}}this.nodeSet=new VF(t.map((t,r)=>VN.define({name:r>=this.minRepeatTerm?void 0:t,id:r,props:i[r],top:n.indexOf(r)>-1,error:0==r,skipped:e.skippedNodes&&e.skippedNodes.indexOf(r)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=Gv(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(GE),this.states=Gv(e.states,Uint32Array),this.data=Gv(e.stateData),this.goto=Gv(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new Gw(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new GI(this,e,t,n);for(let r of this.wrappers)i=r(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return -1;for(let r=i[t+1];;){let t=i[r++],o=1&t,a=i[r++];if(o&&n)return a;for(let n=r+(t>>1);r<n;r++)if(i[r]==e)return a;if(o)return -1}}hasAction(e,t){let n=this.data;for(let i=0;i<2;i++)for(let r=this.stateSlot(e,i?2:1),o;;r+=3){if(65535==(o=n[r])){if(1==n[r+1])o=n[r=GR(n,r+2)];else if(2==n[r+1])return GR(n,r+2);else break}if(o==t||0==o)return GR(n,r+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==i;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=GR(this.data,n+2);else break}i=t(GR(this.data,n+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=GR(this.data,n+2);else break}if((1&this.data[n+2])==0){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(GO.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let r=e.specializers.find(e=>e.from==n.external);if(!r)return n;let o=Object.assign(Object.assign({},n),{external:r.to});return t.specializers[i]=GE(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let i of e.split(" ")){let e=t.indexOf(i);e>=0&&(n[e]=!0)}let i=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],r;65535!=(r=this.data[n++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[r]=1;return new GP(e,n,i)}static deserialize(e){return new GO(e)}}function GR(e,t){return e[t]|e[t+1]<<16}function GE(e){if(e.external){let t=+!!e.extend;return(n,i)=>e.external(n,i)<<1|t}return e.get}let GL=Zn({String:ZS.string,Number:ZS.number,"True False":ZS.bool,PropertyName:ZS.propertyName,Null:ZS.null,", :":ZS.separator,"[ ]":ZS.squareBracket,"{ }":ZS.brace}),GB=GO.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[GL],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),GN=()=>e=>{try{JSON.parse(e.state.doc.toString())}catch(o){var t,n;let i;if(!(o instanceof SyntaxError))throw o;let r=(t=o,n=e.state.doc,(i=t.message.match(/at position (\d+)/))?Math.min(+i[1],n.length):(i=t.message.match(/at line (\d+) column (\d+)/))?Math.min(n.line(+i[1]).from+ +i[2]-1,n.length):0);return[{from:r,message:o.message,severity:"error",to:r}]}return[]},GF=ZT.define({name:"json",parser:GB.configure({props:[Z$.add({Object:ZY({except:/^\s*\}/}),Array:ZY({except:/^\s*\]/})}),ZK.add({"Object Array":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function Gz(e){let t=(0,rS.Z)(),n="dark"===t.palette.mode,[i,r]=(0,eV.useState)(()=>JSON.stringify(e.value,null,2)),[o,a]=(0,eV.useState)(i);return(0,ez.jsx)(Gd,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[new ZF(GF),function(e,t={}){return[$j.of({source:e,config:t}),$Z,$3]}(GN()),function(e={}){return[$4.of(e),$0,$J,$5,$2]}()],value:i,onChange:t=>{r(t),e.onChange&&e.onChange(t)},onBlur:()=>{o!==i&&void 0!==e.onChange&&(e.onChange(i),a(i))},placeholder:e.placeholder})}var GV=n(8797),GZ=e=>"checkbox"===e.type,Gj=e=>e instanceof Date,GH=e=>null==e;let GW=e=>"object"==typeof e;var G$=e=>!GH(e)&&!Array.isArray(e)&&GW(e)&&!Gj(e),GG=e=>G$(e)&&e.target?GZ(e.target)?e.target.checked:e.target.value:e,GU=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Gq=(e,t)=>e.has(GU(t)),GY=e=>{let t=e.constructor&&e.constructor.prototype;return G$(t)&&t.hasOwnProperty("isPrototypeOf")},GX="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function GK(e){let t;let n=Array.isArray(e),i="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(!(GX&&(e instanceof Blob||i))&&(n||G$(e))))return e;else if(t=n?[]:{},n||GY(e))for(let n in e)e.hasOwnProperty(n)&&(t[n]=GK(e[n]));else t=e;return t}var GQ=e=>Array.isArray(e)?e.filter(Boolean):[],GJ=e=>void 0===e,G0=(e,t,n)=>{if(!t||!G$(e))return n;let i=GQ(t.split(/[,[\].]+?/)).reduce((e,t)=>GH(e)?e:e[t],e);return GJ(i)||i===e?GJ(e[t])?n:e[t]:i},G1=e=>"boolean"==typeof e,G2=e=>/^\w*$/.test(e),G5=e=>GQ(e.replace(/["|']|\]/g,"").split(/\.|\[/)),G3=(e,t,n)=>{let i=-1,r=G2(t)?[t]:G5(t),o=r.length,a=o-1;for(;++i<o;){let t=r[i],o=n;if(i!==a){let n=e[t];o=G$(n)||Array.isArray(n)?n:isNaN(+r[i+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=o,e=e[t]}return e};let G4={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},G8={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},G6=eV.createContext(null),G9=()=>eV.useContext(G6);var G7=(e,t,n,i=!0)=>{let r={defaultValues:t._defaultValues};for(let o in e)Object.defineProperty(r,o,{get:()=>(t._proxyFormState[o]!==G4.all&&(t._proxyFormState[o]=!i||G4.all),n&&(n[o]=!0),e[o])});return r},Ue=e=>G$(e)&&!Object.keys(e).length,Ut=(e,t,n,i)=>{n(e);let{name:r,...o}=e;return Ue(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!i||G4.all))},Un=e=>Array.isArray(e)?e:[e],Ui=(e,t,n)=>!e||!t||e===t||Un(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e)));function Ur(e){let t=eV.useRef(e);t.current=e,eV.useEffect(()=>{let n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Uo=e=>"string"==typeof e,Ua=(e,t,n,i,r)=>Uo(e)?(i&&t.watch.add(e),G0(n,e,r)):Array.isArray(e)?e.map(e=>(i&&t.watch.add(e),G0(n,e))):(i&&(t.watchAll=!0),n);let Us=e=>e.render(function(e){let t=G9(),{name:n,disabled:i,control:r=t.control,shouldUnregister:o}=e,a=Gq(r._names.array,n),s=function(e){let t=G9(),{control:n=t.control,name:i,defaultValue:r,disabled:o,exact:a}=e||{},s=eV.useRef(i);s.current=i,Ur({disabled:o,subject:n._subjects.values,next:e=>{Ui(s.current,e.name,a)&&u(GK(Ua(s.current,n._names,e.values||n._formValues,!1,r)))}});let[l,u]=eV.useState(n._getWatch(i,r));return eV.useEffect(()=>n._removeUnmounted()),l}({control:r,name:n,defaultValue:G0(r._formValues,n,G0(r._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){let t=G9(),{control:n=t.control,disabled:i,name:r,exact:o}=e||{},[a,s]=eV.useState(n._formState),l=eV.useRef(!0),u=eV.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=eV.useRef(r);return c.current=r,Ur({disabled:i,next:e=>l.current&&Ui(c.current,e.name,o)&&Ut(e,u.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),eV.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),eV.useMemo(()=>G7(a,n,u.current,!1),[a,n])}({control:r,name:n,exact:!0}),u=eV.useRef(r.register(n,{...e.rules,value:s,...G1(e.disabled)?{disabled:e.disabled}:{}})),c=eV.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!G0(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!G0(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!G0(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!G0(l.validatingFields,n)},error:{enumerable:!0,get:()=>G0(l.errors,n)}}),[l,n]),h=eV.useMemo(()=>({name:n,value:s,...G1(i)||l.disabled?{disabled:l.disabled||i}:{},onChange:e=>u.current.onChange({target:{value:GG(e),name:n},type:"change"}),onBlur:()=>u.current.onBlur({target:{value:G0(r._formValues,n),name:n},type:"blur"}),ref:e=>{let t=G0(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}}),[n,r._formValues,i,l.disabled,s,r._fields]);return eV.useEffect(()=>{let e=r._options.shouldUnregister||o,t=(e,t)=>{let n=G0(r._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=GK(G0(r._options.defaultValues,n));G3(r._defaultValues,n,e),GJ(G0(r._formValues,n))&&G3(r._formValues,n,e)}return a||r.register(n),()=>{(a?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,a,o]),eV.useEffect(()=>{r._updateDisabledField({disabled:i,fields:r._fields,name:n})},[i,n,r]),eV.useMemo(()=>({field:h,formState:l,fieldState:c}),[h,l,c])}(e));var Ul=(e,t,n,i,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[i]:r||!0}}:{},Uu=()=>{let e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let n=(16*Math.random()+e)%16|0;return("x"==t?n:3&n|8).toString(16)})},Uc=(e,t,n={})=>n.shouldFocus||GJ(n.shouldFocus)?n.focusName||`${e}.${GJ(n.focusIndex)?t:n.focusIndex}.`:"",Uh=e=>({isOnSubmit:!e||e===G4.onSubmit,isOnBlur:e===G4.onBlur,isOnChange:e===G4.onChange,isOnAll:e===G4.all,isOnTouch:e===G4.onTouched}),Ud=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let Up=(e,t,n,i)=>{for(let r of n||Object.keys(e)){let n=G0(e,r);if(n){let{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],r)&&!i)return!0;if(e.ref&&t(e.ref,e.name)&&!i)return!0;if(Up(o,t))break}else if(G$(o)&&Up(o,t))break}}};var Uf=(e,t,n)=>{let i=Un(G0(e,n));return G3(i,"root",t[n]),G3(e,n,i),e},Ug=e=>"file"===e.type,Um=e=>"function"==typeof e,Uv=e=>{if(!GX)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Uy=e=>Uo(e),Ux=e=>"radio"===e.type,Ub=e=>e instanceof RegExp;let Uw={value:!1,isValid:!1},US={value:!0,isValid:!0};var U_=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!GJ(e[0].attributes.value)?GJ(e[0].value)||""===e[0].value?US:{value:e[0].value,isValid:!0}:US:Uw}return Uw};let UC={isValid:!1,value:null};var UM=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,UC):UC;function Uk(e,t,n="validate"){if(Uy(e)||Array.isArray(e)&&e.every(Uy)||G1(e)&&!e)return{type:n,message:Uy(e)?e:"",ref:t}}var UT=e=>G$(e)&&!Ub(e)?e:{value:e,message:""},UD=async(e,t,n,i,r,o)=>{let{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:p,validate:f,name:g,valueAsNumber:m,mount:v}=e._f,y=G0(n,g);if(!v||t.has(g))return{};let x=s?s[0]:a,b=e=>{r&&x.reportValidity&&(x.setCustomValidity(G1(e)?"":e||""),x.reportValidity())},w={},S=Ux(a),_=GZ(a),C=(m||Ug(a))&&GJ(a.value)&&GJ(y)||Uv(a)&&""===a.value||""===y||Array.isArray(y)&&!y.length,M=Ul.bind(null,g,i,w),k=(e,t,n,i=G8.maxLength,r=G8.minLength)=>{let o=e?t:n;w[g]={type:e?i:r,message:o,ref:a,...M(e?i:r,o)}};if(o?!Array.isArray(y)||!y.length:l&&(!(S||_)&&(C||GH(y))||G1(y)&&!y||_&&!U_(s).isValid||S&&!UM(s).isValid)){let{value:e,message:t}=Uy(l)?{value:!!l,message:l}:UT(l);if(e&&(w[g]={type:G8.required,message:t,ref:x,...M(G8.required,t)},!i))return b(t),w}if(!C&&(!GH(h)||!GH(d))){let e,t;let n=UT(d),r=UT(h);if(GH(y)||isNaN(y)){let i=a.valueAsDate||new Date(y),o=e=>new Date(new Date().toDateString()+" "+e),s="time"==a.type,l="week"==a.type;Uo(n.value)&&y&&(e=s?o(y)>o(n.value):l?y>n.value:i>new Date(n.value)),Uo(r.value)&&y&&(t=s?o(y)<o(r.value):l?y<r.value:i<new Date(r.value))}else{let i=a.valueAsNumber||(y?+y:y);GH(n.value)||(e=i>n.value),GH(r.value)||(t=i<r.value)}if((e||t)&&(k(!!e,n.message,r.message,G8.max,G8.min),!i))return b(w[g].message),w}if((u||c)&&!C&&(Uo(y)||o&&Array.isArray(y))){let e=UT(u),t=UT(c),n=!GH(e.value)&&y.length>+e.value,r=!GH(t.value)&&y.length<+t.value;if((n||r)&&(k(n,e.message,t.message),!i))return b(w[g].message),w}if(p&&!C&&Uo(y)){let{value:e,message:t}=UT(p);if(Ub(e)&&!y.match(e)&&(w[g]={type:G8.pattern,message:t,ref:a,...M(G8.pattern,t)},!i))return b(t),w}if(f){if(Um(f)){let e=Uk(await f(y,n),x);if(e&&(w[g]={...e,...M(G8.validate,e.message)},!i))return b(e.message),w}else if(G$(f)){let e={};for(let t in f){if(!Ue(e)&&!i)break;let r=Uk(await f[t](y,n),x,t);r&&(e={...r,...M(t,r.message)},b(r.message),i&&(w[g]=e))}if(!Ue(e)&&(w[g]={ref:x,...e},!i))return w}}return b(!0),w},UI=(e,t)=>[...e,...Un(t)],UA=e=>Array.isArray(e)?e.map(()=>void 0):void 0;function UP(e,t,n){return[...e.slice(0,t),...Un(n),...e.slice(t)]}var UO=(e,t,n)=>Array.isArray(e)?(GJ(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],UR=(e,t)=>[...Un(t),...Un(e)],UE=(e,t)=>GJ(t)?[]:function(e,t){let n=0,i=[...e];for(let e of t)i.splice(e-n,1),n++;return GQ(i).length?i:[]}(e,Un(t).sort((e,t)=>e-t)),UL=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},UB=(e,t,n)=>(e[t]=n,e);G4.onSubmit,G4.onChange;var UN=n(3755),UF=n(6396);function Uz({control:e,...t}){let{fields:n,append:i,remove:r}=function(e){let t=G9(),{control:n=t.control,name:i,keyName:r="id",shouldUnregister:o,rules:a}=e,[s,l]=eV.useState(n._getFieldArray(i)),u=eV.useRef(n._getFieldArray(i).map(Uu)),c=eV.useRef(s),h=eV.useRef(i),d=eV.useRef(!1);h.current=i,c.current=s,n._names.array.add(i),a&&n.register(i,a),Ur({next:({values:e,name:t})=>{if(t===h.current||!t){let t=G0(e,h.current);Array.isArray(t)&&(l(t),u.current=t.map(Uu))}},subject:n._subjects.array});let p=eV.useCallback(e=>{d.current=!0,n._updateFieldArray(i,e)},[n,i]);return eV.useEffect(()=>{if(n._state.action=!1,Ud(i,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Uh(n._options.mode).isOnSubmit||n._formState.isSubmitted)){if(n._options.resolver)n._executeSchema([i]).then(e=>{let t=G0(e.errors,i),r=G0(n._formState.errors,i);(r?!t&&r.type||t&&(r.type!==t.type||r.message!==t.message):t&&t.type)&&(t?G3(n._formState.errors,i,t):function e(t,n){let i=Array.isArray(n)?n:G2(n)?[n]:G5(n),r=1===i.length?t:function(e,t){let n=t.slice(0,-1).length,i=0;for(;i<n;)e=GJ(e)?i++:e[t[i++]];return e}(t,i),o=i.length-1,a=i[o];return r&&delete r[a],0!==o&&(G$(r)&&Ue(r)||Array.isArray(r)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!GJ(e[t]))return!1;return!0}(r))&&e(t,i.slice(0,-1)),t}(n._formState.errors,i),n._subjects.state.next({errors:n._formState.errors}))});else{let e=G0(n._fields,i);e&&e._f&&!(Uh(n._options.reValidateMode).isOnSubmit&&Uh(n._options.mode).isOnSubmit)&&UD(e,n._names.disabled,n._formValues,n._options.criteriaMode===G4.all,n._options.shouldUseNativeValidation,!0).then(e=>!Ue(e)&&n._subjects.state.next({errors:Uf(n._formState.errors,e,i)}))}}n._subjects.values.next({name:i,values:{...n._formValues}}),n._names.focus&&Up(n._fields,(e,t)=>{if(n._names.focus&&t.startsWith(n._names.focus)&&e.focus)return e.focus(),1}),n._names.focus="",n._updateValid(),d.current=!1},[s,i,n]),eV.useEffect(()=>(G0(n._formValues,i)||n._updateFieldArray(i),()=>{(n._options.shouldUnregister||o)&&n.unregister(i)}),[i,n,r,o]),{swap:eV.useCallback((e,t)=>{let r=n._getFieldArray(i);UL(r,e,t),UL(u.current,e,t),p(r),l(r),n._updateFieldArray(i,r,UL,{argA:e,argB:t},!1)},[p,i,n]),move:eV.useCallback((e,t)=>{let r=n._getFieldArray(i);UO(r,e,t),UO(u.current,e,t),p(r),l(r),n._updateFieldArray(i,r,UO,{argA:e,argB:t},!1)},[p,i,n]),prepend:eV.useCallback((e,t)=>{let r=Un(GK(e)),o=UR(n._getFieldArray(i),r);n._names.focus=Uc(i,0,t),u.current=UR(u.current,r.map(Uu)),p(o),l(o),n._updateFieldArray(i,o,UR,{argA:UA(e)})},[p,i,n]),append:eV.useCallback((e,t)=>{let r=Un(GK(e)),o=UI(n._getFieldArray(i),r);n._names.focus=Uc(i,o.length-1,t),u.current=UI(u.current,r.map(Uu)),p(o),l(o),n._updateFieldArray(i,o,UI,{argA:UA(e)})},[p,i,n]),remove:eV.useCallback(e=>{let t=UE(n._getFieldArray(i),e);u.current=UE(u.current,e),p(t),l(t),Array.isArray(G0(n._fields,i))||G3(n._fields,i,void 0),n._updateFieldArray(i,t,UE,{argA:e})},[p,i,n]),insert:eV.useCallback((e,t,r)=>{let o=Un(GK(t)),a=UP(n._getFieldArray(i),e,o);n._names.focus=Uc(i,e,r),u.current=UP(u.current,e,o.map(Uu)),p(a),l(a),n._updateFieldArray(i,a,UP,{argA:e,argB:UA(t)})},[p,i,n]),update:eV.useCallback((e,t)=>{let r=GK(t),o=UB(n._getFieldArray(i),e,r);u.current=[...o].map((t,n)=>t&&n!==e?u.current[n]:Uu()),p(o),l([...o]),n._updateFieldArray(i,o,UB,{argA:e,argB:r},!0,!1)},[p,i,n]),replace:eV.useCallback(e=>{let t=Un(GK(e));u.current=t.map(Uu),p([...t]),l([...t]),n._updateFieldArray(i,[...t],e=>e,{},!0,!1)},[p,i,n]),fields:eV.useMemo(()=>s.map((e,t)=>({...e,[r]:u.current[t]||Uu()})),[s,r])}}({control:e,name:"panelDefinition.spec.links"});return(0,ez.jsxs)(th,{...t,gap:3,children:[n&&n.length>0?n.map((t,n)=>(0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsxs)(th,{direction:"row",gap:1,alignItems:"center",children:[(0,ez.jsx)(UV,{control:e,index:n}),(0,ez.jsx)(td.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>r(n),children:(0,ez.jsx)(UF.default,{})})]}),(0,ez.jsx)(ET.Z,{})]},t.id)):(0,ez.jsx)(uD.Z,{variant:"subtitle1",mb:2,fontStyle:"italic",children:"No links defined"}),(0,ez.jsx)(td.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>i({url:""}),children:(0,ez.jsx)(UN.default,{})})]})}function UV({control:e,index:t}){return(0,ez.jsxs)(th,{gap:2,flexGrow:1,children:[(0,ez.jsxs)(th,{direction:"row",gap:2,children:[(0,ez.jsx)(Us,{control:e,name:`panelDefinition.spec.links.${t}.url`,render:({field:e,fieldState:t})=>(0,ez.jsx)(tp.Z,{...e,required:!0,fullWidth:!0,label:"URL",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})}),(0,ez.jsx)(Us,{control:e,name:`panelDefinition.spec.links.${t}.name`,render:({field:e,fieldState:t})=>(0,ez.jsx)(tp.Z,{...e,fullWidth:!0,label:"Name",defaultValue:"",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})}),(0,ez.jsx)(Us,{control:e,name:`panelDefinition.spec.links.${t}.tooltip`,render:({field:e,fieldState:t})=>(0,ez.jsx)(tp.Z,{...e,fullWidth:!0,label:"Tooltip",defaultValue:"",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})})]}),(0,ez.jsxs)(th,{gap:2,direction:"row",alignItems:"center",children:[(0,ez.jsx)(Us,{control:e,name:`panelDefinition.spec.links.${t}.renderVariables`,render:({field:e})=>(0,ez.jsx)(GV.Z,{label:"Render Variables",control:(0,ez.jsx)(u6.Z,{...e,checked:e.value,onChange:t=>e.onChange(t.target.checked)})})}),(0,ez.jsx)(Us,{control:e,name:`panelDefinition.spec.links.${t}.targetBlank`,render:({field:e})=>(0,ez.jsx)(GV.Z,{label:"Open in new tab",control:(0,ez.jsx)(u6.Z,{...e,checked:e.value,onChange:t=>e.onChange(t.target.checked)})})})]})]})}let UZ=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function Uj({disablePercentageMode:e,onChange:t,value:n="value"}){return(0,ez.jsx)(c9,{label:"Mode",control:(0,ez.jsx)(hi,{value:UZ.find(e=>e.id===n),options:UZ,getOptionLabel:e=>e.label,getOptionDisabled:t=>"percentage"===t.id&&e,onChange:(e,{id:n})=>{t(n)},disableClearable:!0})})}var UH=n(6224);function UW(e){let{message:t}=e;return(0,ez.jsx)(th,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,ez.jsx)(uD.Z,{children:t})})}function U$(e){let{resource:t}=e;return(0,ez.jsx)(UW,{message:`No ${t}`})}function UG(e){let{variant:t="rounded"}=e;return(0,ez.jsx)(th,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,ez.jsx)(UH.Z,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}let UU=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function Uq({onChange:e,value:t="desc"}){return(0,ez.jsx)(c9,{label:"Sort",control:(0,ez.jsx)(hi,{value:UU.find(e=>e.id===t),options:UU,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function UY({onChange:e,value:t,...n}){let i=t=>{e(t)};return(0,ez.jsxs)(e4,{"aria-label":"Sort",...n,children:[(0,ez.jsx)(e8.Z,{onClick:()=>i(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,ez.jsx)(e8.Z,{onClick:()=>i("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,ez.jsx)(e8.Z,{onClick:()=>i("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}function UX(e){return(0,eQ.ZP)("MuiToggleButtonGroup",e)}let UK=(0,eK.Z)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),UQ=eV.createContext({}),UJ=eV.createContext(void 0);function U0(e){return(0,eQ.ZP)("MuiToggleButton",e)}let U1=(0,eK.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),U2=e=>{let{classes:t,orientation:n,fullWidth:i,disabled:r}=e,o={root:["root",n,i&&"fullWidth"],grouped:["grouped",`grouped${(0,eG.Z)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,eH.Z)(o,UX,t)},U5=(0,eU.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${UK.grouped}`]:t.grouped},{[`& .${UK.grouped}`]:t[`grouped${(0,eG.Z)(n.orientation)}`]},{[`& .${UK.firstButton}`]:t.firstButton},{[`& .${UK.lastButton}`]:t.lastButton},{[`& .${UK.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,eq.Z)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${UK.grouped}`]:{[`&.${UK.selected} + .${UK.grouped}.${UK.selected}`]:{borderTop:0,marginTop:0}},[`& .${UK.firstButton},& .${UK.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${UK.lastButton},& .${UK.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${UK.lastButton}.${U1.disabled},& .${UK.middleButton}.${U1.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${UK.grouped}`]:{[`&.${UK.selected} + .${UK.grouped}.${UK.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${UK.firstButton},& .${UK.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${UK.lastButton},& .${UK.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${UK.lastButton}.${U1.disabled},& .${UK.middleButton}.${U1.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),U3=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:r,color:o="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:u,orientation:c="horizontal",size:h="medium",value:d,...p}=n,f={...n,disabled:a,fullWidth:l,orientation:c,size:h},g=U2(f),m=eV.useCallback((e,t)=>{let n;if(!u)return;let i=d&&d.indexOf(t);d&&i>=0?(n=d.slice()).splice(i,1):n=d?d.concat(t):[t],u(e,n)},[u,d]),v=eV.useCallback((e,t)=>{u&&u(e,d===t?null:t)},[u,d]),y=eV.useMemo(()=>({className:g.grouped,onChange:s?v:m,value:d,size:h,fullWidth:l,color:o,disabled:a}),[g.grouped,s,v,m,d,h,l,o,a]),x=e$(i),b=x.length,w=e=>{let t=0===e,n=e===b-1;return t&&n?"":t?g.firstButton:n?g.lastButton:g.middleButton};return(0,ez.jsx)(U5,{role:"group",className:(0,ej.Z)(g.root,r),ref:t,ownerState:f,...p,children:(0,ez.jsx)(UQ.Provider,{value:y,children:x.map((e,t)=>(0,ez.jsx)(UJ.Provider,{value:w(t),children:e},t))})})});var U4=n(6819);let U8=e=>{let{classes:t,fullWidth:n,selected:i,disabled:r,size:o,color:a}=e,s={root:["root",i&&"selected",r&&"disabled",n&&"fullWidth",`size${(0,eG.Z)(o)}`,a]};return(0,eH.Z)(s,U0,t)},U6=(0,eU.ZP)(lo.Z,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${(0,eG.Z)(n.size)}`]]}})((0,eq.Z)(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${U1.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${U1.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,eW.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter((0,eY.Z)()).map(([t])=>({props:{color:t},style:{[`&.${U1.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,eW.Fq)(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,eW.Fq)(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),U9=eV.forwardRef(function(e,t){var n;let{value:i,...r}=eV.useContext(UQ),o=eV.useContext(UJ),a=(0,U4.Z)({...r,selected:(n=e.value,void 0!==i&&void 0!==n&&(Array.isArray(i)?i.includes(n):n===i))},e),s=(0,eX.i)({props:a,name:"MuiToggleButton"}),{children:l,className:u,color:c="standard",disabled:h=!1,disableFocusRipple:d=!1,fullWidth:p=!1,onChange:f,onClick:g,selected:m,size:v="medium",value:y,...x}=s,b={...s,color:c,disabled:h,disableFocusRipple:d,fullWidth:p,size:v},w=U8(b);return(0,ez.jsx)(U6,{className:(0,ej.Z)(r.className,w.root,u,o||""),disabled:h,focusRipple:!d,ref:t,onClick:e=>{(!g||(g(e,y),!e.defaultPrevented))&&f&&f(e,y)},onChange:f,value:y,ownerState:b,"aria-pressed":m,...x,children:l})}),U7=tc();var qe=n(2446);function qt({inputRef:e,label:t,color:n,value:i,mode:r,onChange:o,onColorChange:a,onBlur:s,onDelete:l}){let[u,c]=(0,eV.useState)(0);return(0,ez.jsxs)(th,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,ez.jsx)(rb,{label:t,color:n,onColorChange:a}),(0,ez.jsx)(c1.Z,{htmlFor:t,children:t}),(0,ez.jsx)(tp.Z,{id:t,inputRef:e,type:"number",value:0===i?"":i,placeholder:"0",onChange:o,onBlur:s,onKeyDown:e=>{"Enter"===e.key&&(s(),c(u+1))},InputProps:{endAdornment:"percent"===r?(0,ez.jsx)(r_.Z,{paddingX:1,children:"%"}):void 0}},u),(0,ez.jsx)(td.Z,{"aria-label":`delete threshold ${t}`,size:"small",onClick:l,children:(0,ez.jsx)(qe.default,{})})]})}function qn({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:i}){let{thresholds:{defaultColor:r,palette:o}}=tK(),a=e?.defaultColor??r,[s,l]=(0,eV.useState)(e?.steps);(0,eV.useEffect)(()=>{l(e?.steps)},[e?.steps]);let u=(0,eV.useRef)(null),c=(0,eV.useRef)(!1);(0,eV.useEffect)(()=>{u.current&&c.current&&(u.current?.focus(),c.current=!1)},[s?.length]);let h=(e,t)=>{l(oi(s,n=>{let i=n?.[t];i&&(i.value=Number(e.target.value))}))},d=(n,i)=>{void 0!==e&&t(oi(e,e=>{if(void 0!==e.steps){let t=e.steps[i];t&&(t.color=n)}}))},p=()=>{if(void 0!==s){let n=[...s];n.sort((e,t)=>e.value-t.value),void 0!==e&&t(oi(e,e=>{e.steps=n}))}},f=n=>{void 0!==e&&t(oi(e,e=>{e.steps&&e.steps.splice(n,1)}))};return(0,ez.jsxs)(he,{title:"Thresholds",icon:(0,ez.jsx)(c4,{description:"Add threshold",children:(0,ez.jsx)(td.Z,{size:"small","aria-label":"add threshold",onClick:()=>{c.current=!0,void 0===e?t({steps:[{value:10}]}):e&&void 0===e.steps?t(oi(e,e=>{e.steps=[{value:10}]})):t(oi(e,e=>{let t=e.steps;if(t?.length){let e=t[t.length-1],n=o[t.length]??qi();t.push({color:n,value:(e?.value??0)+10})}else t&&t.push({value:10})}))},children:(0,ez.jsx)(UN.default,{})})}),children:[(0,ez.jsx)(c9,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,ez.jsxs)(U3,{exclusive:!0,disabled:i,value:e?.mode??"absolute",onChange:(n,i)=>{let r="percent"===i?"percent":void 0;void 0!==e?t(oi(e,e=>{e.mode=r})):t({mode:r})},sx:{height:"36px",marginLeft:"auto"},children:[(0,ez.jsx)(U9,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,ez.jsx)(U9,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),s&&s.map((t,n)=>(0,ez.jsx)(qt,{inputRef:n===s.length-1?u:void 0,label:`T${n+1}`,color:t.color??o[n]??a,value:t.value,mode:e?.mode,onColorChange:e=>d(e,n),onChange:e=>{h(e,n)},onDelete:()=>{f(n)},onBlur:p},n)).reverse(),!n&&(0,ez.jsxs)(U7,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,ez.jsx)(rb,{label:"default",color:a,onColorChange:n=>{void 0!==e?t(oi(e,e=>{e.defaultColor=n})):t({defaultColor:n})}}),(0,ez.jsx)(uD.Z,{children:"Default"})]})]})}let qi=()=>"#"+Math.floor(0x1000000*Math.random()).toString(16).padStart(6,"0");var qr=n(3767),qo=n(9986),qa=n(8014);let qs=["localeText"],ql=eV.createContext(null),qu=function(e){let{localeText:t}=e,n=(0,EA.Z)(e,qs),{utils:i,localeText:r}=eV.useContext(ql)??{utils:void 0,localeText:void 0},{children:o,dateAdapter:a,dateFormats:s,dateLibInstance:l,adapterLocale:u,localeText:c}=(0,qa.Z)({props:n,name:"MuiLocalizationProvider"}),h=eV.useMemo(()=>(0,EI.Z)({},c,r,t),[c,r,t]),d=eV.useMemo(()=>{if(!a)return i||null;let e=new a({locale:u,formats:s,instance:l});if(!e.isMUIAdapter)throw Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
6
|
-
`));return e},[a,u,s,l,i]),p=eV.useMemo(()=>d?{minDate:d.date("1900-01-01T00:00:00.000"),maxDate:d.date("2099-12-31T00:00:00.000")}:null,[d]),f=eV.useMemo(()=>({utils:d,defaultDates:p,localeText:h}),[p,d,h]);return(0,ez.jsx)(ql.Provider,{value:f,children:o})};var qc=n(3615),qh=n.n(qc);let qd={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,i)=>`Select ${e}. ${i||null!==t&&n.isValid(t)?`Selected time is ${i??n.format(t,"fullTime")}`:"No time selected"}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"};(0,EI.Z)({},qd);let qp=()=>{let e=eV.useContext(ql);if(null===e)throw Error("MUI X: Can not find the date and time pickers localization context.\nIt looks like you forgot to wrap your component in LocalizationProvider.\nThis can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package");if(null===e.utils)throw Error("MUI X: Can not find the date and time pickers adapter from its localization context.\nIt looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.");let t=eV.useMemo(()=>(0,EI.Z)({},qd,e.localeText),[e.localeText]);return eV.useMemo(()=>(0,EI.Z)({},e,{localeText:t}),[e,t])},qf=()=>qp().utils,qg=()=>qp().defaultDates,qm=e=>{let t=qf(),n=eV.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},qv=(e,t,n)=>{let i=t;return i=e.setHours(i,e.getHours(n)),i=e.setMinutes(i,e.getMinutes(n)),i=e.setSeconds(i,e.getSeconds(n)),i=e.setMilliseconds(i,e.getMilliseconds(n))},qy=({date:e,disableFuture:t,disablePast:n,maxDate:i,minDate:r,isDateDisabled:o,utils:a,timezone:s})=>{let l=qv(a,a.date(void 0,s),e);n&&a.isBefore(r,l)&&(r=l),t&&a.isAfter(i,l)&&(i=l);let u=e,c=e;for(a.isBefore(e,r)&&(u=r,c=null),a.isAfter(e,i)&&(c&&(c=i),u=null);u||c;){if(u&&a.isAfter(u,i)&&(u=null),c&&a.isBefore(c,r)&&(c=null),u){if(!o(u))return u;u=a.addDays(u,1)}if(c){if(!o(c))return c;c=a.addDays(c,-1)}}return null},qx=(e,t,n)=>null!=t&&e.isValid(t)?t:n,qb=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},qw=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),qS=(e,t)=>{let n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},q_=["year","month","day"],qC=e=>q_.includes(e),qM=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))};function qk(e){return(0,eQ.ZP)("MuiTab",e)}let qT=(0,eK.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),qD=e=>{let{classes:t,textColor:n,fullWidth:i,wrapped:r,icon:o,label:a,selected:s,disabled:l}=e,u={root:["root",o&&a&&"labelIcon",`textColor${(0,eG.Z)(n)}`,i&&"fullWidth",r&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return(0,eH.Z)(u,qk,t)},qI=(0,eU.ZP)(lo.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,eG.Z)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${qT.iconWrapper}`]:t.iconWrapper},{[`& .${qT.icon}`]:t.icon}]}})((0,eq.Z)(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${qT.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${qT.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${qT.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${qT.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${qT.selected}`]:{opacity:1},[`&.${qT.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${qT.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${qT.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${qT.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${qT.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),qA=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTab"}),{className:i,disabled:r=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:u,label:c,onChange:h,onClick:d,onFocus:p,selected:f,selectionFollowsFocus:g,textColor:m="inherit",value:v,wrapped:y=!1,...x}=n,b={...n,disabled:r,disableFocusRipple:o,selected:f,icon:!!s,iconPosition:l,label:!!c,fullWidth:a,textColor:m,wrapped:y},w=qD(b),S=s&&c&&eV.isValidElement(s)?eV.cloneElement(s,{className:(0,ej.Z)(w.icon,s.props.className)}):s;return(0,ez.jsxs)(qI,{focusRipple:!o,className:(0,ej.Z)(w.root,i),ref:t,role:"tab","aria-selected":f,disabled:r,onClick:e=>{!f&&h&&h(e,v),d&&d(e)},onFocus:e=>{g&&!f&&h&&h(e,v),p&&p(e)},ownerState:b,tabIndex:f?0:-1,...x,children:["top"===l||"start"===l?(0,ez.jsxs)(eV.Fragment,{children:[S,c]}):(0,ez.jsxs)(eV.Fragment,{children:[c,S]}),u]})});var qP=n(5399);function qO(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}let qR={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var qE=n(7665),qL=n(3633);function qB(e){return(0,eQ.ZP)("MuiTabScrollButton",e)}let qN=(0,eK.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),qF=e=>{let{classes:t,orientation:n,disabled:i}=e;return(0,eH.Z)({root:["root",n,i&&"disabled"]},qB,t)},qz=(0,eU.ZP)(lo.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${qN.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),qV=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTabScrollButton"}),{className:i,slots:r={},slotProps:o={},direction:a,orientation:s,disabled:l,...u}=n,c=(0,da.V)(),h={isRtl:c,...n},d=qF(h),p=r.StartScrollButtonIcon??qE.Z,f=r.EndScrollButtonIcon??qL.Z,g=(0,qP.Z)({elementType:p,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),m=(0,qP.Z)({elementType:f,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return(0,ez.jsx)(qz,{component:"div",className:(0,ej.Z)(d.root,i),ref:t,role:null,ownerState:h,tabIndex:null,...u,style:{...u.style,..."vertical"===s&&{"--TabScrollButton-svgRotate":`rotate(${c?-90:90}deg)`}},children:"left"===a?(0,ez.jsx)(p,{...g}):(0,ez.jsx)(f,{...m})})});var qZ=n(7151);function qj(e){return(0,eQ.ZP)("MuiTabs",e)}let qH=(0,eK.Z)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var qW=n(2444);let q$=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,qG=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qU=(e,t,n)=>{let i=!1,r=n(e,t);for(;r;){if(r===e.firstChild){if(i)return;i=!0}let t=r.disabled||"true"===r.getAttribute("aria-disabled");if(!r.hasAttribute("tabindex")||t)r=n(e,r);else{r.focus();return}}},qq=e=>{let{vertical:t,fixed:n,hideScrollbar:i,scrollableX:r,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return(0,eH.Z)({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",i&&"hideScrollbar",r&&"scrollableX",o&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[r&&"scrollableX"],hideScrollbar:[i&&"hideScrollbar"]},qj,l)},qY=(0,eU.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${qH.scrollButtons}`]:t.scrollButtons},{[`& .${qH.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,eq.Z)(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${qH.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),qX=(0,eU.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),qK=(0,eU.ZP)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),qQ=(0,eU.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,eq.Z)(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),qJ=(0,eU.ZP)(function(e){let{onChange:t,...n}=e,i=eV.useRef(),r=eV.useRef(null),o=()=>{i.current=r.current.offsetHeight-r.current.clientHeight};return(0,la.Z)(()=>{let e=(0,du.Z)(()=>{let e=i.current;o(),e!==i.current&&t(i.current)}),n=(0,dh.Z)(r.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),eV.useEffect(()=>{o(),t(i.current)},[t]),(0,ez.jsx)("div",{style:qR,...n,ref:r})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),q0={},q1=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiTabs"}),i=(0,rS.Z)(),r=(0,da.V)(),{"aria-label":o,"aria-labelledby":a,action:s,centered:l=!1,children:u,className:c,component:h="div",allowScrollButtonsMobile:d=!1,indicatorColor:p="primary",onChange:f,orientation:g="horizontal",ScrollButtonComponent:m,scrollButtons:v="auto",selectionFollowsFocus:y,slots:x={},slotProps:b={},TabIndicatorProps:w={},TabScrollButtonProps:S={},textColor:_="primary",value:C,variant:M="standard",visibleScrollbar:k=!1,...T}=n,D="scrollable"===M,I="vertical"===g,A=I?"scrollTop":"scrollLeft",P=I?"top":"left",O=I?"bottom":"right",R=I?"clientHeight":"clientWidth",E=I?"height":"width",L={...n,component:h,allowScrollButtonsMobile:d,indicatorColor:p,orientation:g,vertical:I,scrollButtons:v,textColor:_,variant:M,visibleScrollbar:k,fixed:!D,hideScrollbar:D&&!k,scrollableX:D&&!I,scrollableY:D&&I,centered:l&&!D,scrollButtonsHideMobile:!d},B=qq(L),N=(0,qP.Z)({elementType:x.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:L}),F=(0,qP.Z)({elementType:x.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:L}),[z,V]=eV.useState(!1),[Z,j]=eV.useState(q0),[H,W]=eV.useState(!1),[$,G]=eV.useState(!1),[U,q]=eV.useState(!1),[Y,X]=eV.useState({overflow:"hidden",scrollbarWidth:0}),K=new Map,Q=eV.useRef(null),J=eV.useRef(null),ee={slots:x,slotProps:{indicator:w,scrollButton:S,...b}},et=()=>{let e,t;let n=Q.current;if(n){let t=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(n&&!1!==C){let e=J.current.children;if(e.length>0){let n=e[K.get(C)];t=n?n.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},en=(0,qZ.Z)(()=>{let e;let{tabsMeta:t,tabMeta:n}=et(),i=0;I?(e="top",n&&t&&(i=n.top-t.top+t.scrollTop)):(e=r?"right":"left",n&&t&&(i=(r?-1:1)*(n[e]-t[e]+t.scrollLeft)));let o={[e]:i,[E]:n?n[E]:0};if("number"!=typeof Z[e]||"number"!=typeof Z[E])j(o);else{let t=Math.abs(Z[e]-o[e]),n=Math.abs(Z[E]-o[E]);(t>=1||n>=1)&&j(o)}}),ei=(e,{animation:t=!0}={})=>{t?function(e,t,n,i={},r=()=>{}){let{ease:o=qO,duration:a=300}=i,s=null,l=t[e],u=!1,c=()=>{u=!0},h=i=>{if(u){r(Error("Animation cancelled"));return}null===s&&(s=i);let c=Math.min(1,(i-s)/a);if(t[e]=o(c)*(n-l)+l,c>=1){requestAnimationFrame(()=>{r(null)});return}requestAnimationFrame(h)};return l===n?r(Error("Element already at target position")):requestAnimationFrame(h),c}(A,Q.current,e,{duration:i.transitions.duration.standard}):Q.current[A]=e},er=e=>{let t=Q.current[A];I?t+=e:t+=e*(r?-1:1),ei(t)},eo=()=>{let e=Q.current[R],t=0,n=Array.from(J.current.children);for(let i=0;i<n.length;i+=1){let r=n[i];if(t+r[R]>e){0===i&&(t=e);break}t+=r[R]}return t},ea=()=>{er(-1*eo())},es=()=>{er(eo())},[el,{onChange:eu,...ec}]=(0,uR.Z)("scrollbar",{className:(0,ej.Z)(B.scrollableX,B.hideScrollbar),elementType:qJ,shouldForwardComponentProp:!0,externalForwardedProps:ee,ownerState:L}),eh=eV.useCallback(e=>{eu?.(e),X({overflow:null,scrollbarWidth:e})},[eu]),[ed,ep]=(0,uR.Z)("scrollButtons",{className:(0,ej.Z)(B.scrollButtons,S.className),elementType:qV,externalForwardedProps:ee,ownerState:L,additionalProps:{orientation:g,slots:{StartScrollButtonIcon:x.startScrollButtonIcon||x.StartScrollButtonIcon,EndScrollButtonIcon:x.endScrollButtonIcon||x.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:N,endScrollButtonIcon:F}}}),ef=(0,qZ.Z)(e=>{let{tabsMeta:t,tabMeta:n}=et();n&&t&&(n[P]<t[P]?ei(t[A]+(n[P]-t[P]),{animation:e}):n[O]>t[O]&&ei(t[A]+(n[O]-t[O]),{animation:e}))}),eg=(0,qZ.Z)(()=>{D&&!1!==v&&q(!U)});eV.useEffect(()=>{let e,t;let n=(0,du.Z)(()=>{Q.current&&en()}),i=(0,dh.Z)(Q.current);return i.addEventListener("resize",n),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(n),Array.from(J.current.children).forEach(t=>{e.observe(t)})),"undefined"!=typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{e?.unobserve(t)}),t.addedNodes.forEach(t=>{e?.observe(t)})}),n(),eg()})).observe(J.current,{childList:!0}),()=>{n.clear(),i.removeEventListener("resize",n),t?.disconnect(),e?.disconnect()}},[en,eg]),eV.useEffect(()=>{let e=Array.from(J.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&D&&!1!==v){let n=e[0],i=e[t-1],r={root:Q.current,threshold:.99},o=new IntersectionObserver(e=>{W(!e[0].isIntersecting)},r);o.observe(n);let a=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},r);return a.observe(i),()=>{o.disconnect(),a.disconnect()}}},[D,v,U,u?.length]),eV.useEffect(()=>{V(!0)},[]),eV.useEffect(()=>{en()}),eV.useEffect(()=>{ef(q0!==Z)},[ef,Z]),eV.useImperativeHandle(s,()=>({updateIndicator:en,updateScrollButtons:eg}),[en,eg]);let[em,ev]=(0,uR.Z)("indicator",{className:(0,ej.Z)(B.indicator,w.className),elementType:qQ,externalForwardedProps:ee,ownerState:L,additionalProps:{style:Z}}),ey=(0,ez.jsx)(em,{...ev}),ex=0,eb=eV.Children.map(u,e=>{if(!eV.isValidElement(e))return null;let t=void 0===e.props.value?ex:e.props.value;K.set(t,ex);let n=t===C;return ex+=1,eV.cloneElement(e,{fullWidth:"fullWidth"===M,indicator:n&&!z&&ey,selected:n,selectionFollowsFocus:y,onChange:f,textColor:_,value:t,...1!==ex||!1!==C||e.props.tabIndex?{}:{tabIndex:0}})}),ew=e=>{let t=J.current,n=(0,qW.Z)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let i="horizontal"===g?"ArrowLeft":"ArrowUp",o="horizontal"===g?"ArrowRight":"ArrowDown";switch("horizontal"===g&&r&&(i="ArrowRight",o="ArrowLeft"),e.key){case i:e.preventDefault(),qU(t,n,qG);break;case o:e.preventDefault(),qU(t,n,q$);break;case"Home":e.preventDefault(),qU(t,null,q$);break;case"End":e.preventDefault(),qU(t,null,qG)}},eS=(()=>{let e={};e.scrollbarSizeListener=D?(0,ez.jsx)(el,{...ec,onChange:eh}):null;let t=D&&("auto"===v&&(H||$)||!0===v);return e.scrollButtonStart=t?(0,ez.jsx)(ed,{direction:r?"right":"left",onClick:ea,disabled:!H,...ep}):null,e.scrollButtonEnd=t?(0,ez.jsx)(ed,{direction:r?"left":"right",onClick:es,disabled:!$,...ep}):null,e})(),[e_,eC]=(0,uR.Z)("root",{ref:t,className:(0,ej.Z)(B.root,c),elementType:qY,externalForwardedProps:{...ee,...T,component:h},ownerState:L}),[eM,ek]=(0,uR.Z)("scroller",{ref:Q,className:B.scroller,elementType:qX,externalForwardedProps:ee,ownerState:L,additionalProps:{style:{overflow:Y.overflow,[I?`margin${r?"Left":"Right"}`:"marginBottom"]:k?void 0:-Y.scrollbarWidth}}}),[eT,eD]=(0,uR.Z)("list",{ref:J,className:(0,ej.Z)(B.list,B.flexContainer),elementType:qK,externalForwardedProps:ee,ownerState:L,getSlotProps:e=>({...e,onKeyDown:t=>{ew(t),e.onKeyDown?.(t)}})});return(0,ez.jsxs)(e_,{...eC,children:[eS.scrollButtonStart,eS.scrollbarSizeListener,(0,ez.jsxs)(eM,{...ek,children:[(0,ez.jsx)(eT,{"aria-label":o,"aria-labelledby":a,"aria-orientation":"vertical"===g?"vertical":null,role:"tablist",...eD,children:eb}),z&&ey]}),eS.scrollButtonEnd]})}),q2=(0,uI.Z)((0,ez.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),q5=(0,uI.Z)((0,ez.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),q3=(0,uI.Z)((0,ez.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");(0,uI.Z)((0,ez.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,uI.Z)((0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,ez.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");let q4=(0,uI.Z)((0,ez.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),q8=(0,uI.Z)((0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,ez.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),q6=(0,uI.Z)((0,ez.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),q9=()=>qp().localeText;function q7(e){return(0,eQ.ZP)("MuiDateTimePickerTabs",e)}(0,eK.Z)("MuiDateTimePickerTabs",["root"]);let Ye=e=>qC(e)?"date":"time",Yt=e=>"date"===e?"day":"hours",Yn=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},q7,t)},Yi=(0,eU.ZP)(q1,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${qH.indicator}`]:{bottom:"auto",top:0}}})),Yr=function(e){let t=(0,qa.Z)({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,ez.jsx)(q4,{}),onViewChange:i,timeIcon:r=(0,ez.jsx)(q8,{}),view:o,hidden:a="undefined"==typeof window||window.innerHeight<667,className:s,sx:l}=t,u=q9(),c=Yn(t);return a?null:(0,ez.jsxs)(Yi,{ownerState:t,variant:"fullWidth",value:Ye(o),onChange:(e,t)=>{i(Yt(t))},className:(0,ej.Z)(s,c.root),sx:l,children:[(0,ez.jsx)(qA,{value:"date","aria-label":u.dateTableLabel,icon:(0,ez.jsx)(eV.Fragment,{children:n})}),(0,ez.jsx)(qA,{value:"time","aria-label":u.timeTableLabel,icon:(0,ez.jsx)(eV.Fragment,{children:r})})]})};function Yo(e){return(0,eQ.ZP)("MuiPickersToolbarText",e)}let Ya=(0,eK.Z)("MuiPickersToolbarText",["root","selected"]),Ys=["className","selected","value"],Yl=e=>{let{classes:t,selected:n}=e;return(0,eH.Z)({root:["root",n&&"selected"]},Yo,t)},Yu=(0,eU.ZP)(uD.Z,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Ya.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${Ya.selected}`]:{color:(e.vars||e).palette.text.primary}})),Yc=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersToolbarText"}),{className:i,value:r}=n,o=(0,EA.Z)(n,Ys),a=Yl(n);return(0,ez.jsx)(Yu,(0,EI.Z)({ref:t,className:(0,ej.Z)(a.root,i),component:"span"},o,{children:r}))});function Yh(e){return(0,eQ.ZP)("MuiPickersToolbar",e)}let Yd=(0,eK.Z)("MuiPickersToolbar",["root","content"]),Yp=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],Yf=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],content:["content"]},Yh,t)},Yg=(0,eU.ZP)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),Ym=(0,eU.ZP)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),Yv=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersToolbar"}),{children:i,className:r,toolbarTitle:o,hidden:a,titleId:s}=n,l=(0,EA.Z)(n,Yp),u=Yf(n);return a?null:(0,ez.jsxs)(Yg,(0,EI.Z)({ref:t,className:(0,ej.Z)(u.root,r),ownerState:n},l,{children:[(0,ez.jsx)(uD.Z,{color:"text.secondary",variant:"overline",id:s,children:o}),(0,ez.jsx)(Ym,{className:u.content,ownerState:n,children:i})]}))}),Yy=["align","className","selected","typographyClassName","value","variant","width"],Yx=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},Yh,t)},Yb=(0,eU.ZP)(e8.Z,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),Yw=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersToolbarButton"}),{align:i,className:r,selected:o,typographyClassName:a,value:s,variant:l,width:u}=n,c=(0,EA.Z)(n,Yy),h=Yx(n);return(0,ez.jsx)(Yb,(0,EI.Z)({variant:"text",ref:t,className:(0,ej.Z)(h.root,r)},u?{sx:{width:u}}:{},c,{children:(0,ez.jsx)(Yc,{align:i,className:a,variant:l,value:s,selected:o})}))});function YS(e){return(0,eQ.ZP)("MuiDateTimePickerToolbar",e)}let Y_=(0,eK.Z)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),YC=["hours","minutes","seconds"],YM=e=>YC.includes(e),Yk=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,YT=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,YD=(e,t,n,i)=>{let r=YT(i.getHours(e),t,n);return i.setHours(e,r)},YI=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),YA=(e,t)=>(n,i)=>e?t.isAfter(n,i):YI(n,t)>YI(i,t);function YP(e,t,n,i){let r=qf();return{meridiemMode:Yk(e,r),handleMeridiemChange:eV.useCallback(o=>{n(null==e?null:YD(e,o,!!t,r),i??"partial")},[t,e,n,i,r])}}let YO=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],YR=e=>{let{classes:t,isLandscape:n,isRtl:i}=e;return(0,eH.Z)({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",i&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",i&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},YS,t)},YE=(0,eU.ZP)(Yv,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Yd.content} .${Ya.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),YL=(0,eU.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),YB=(0,eU.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&"desktop"!==t&&n,style:{flexDirection:"column-reverse"}}]}),YN=(0,eU.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),YF=(0,eU.ZP)(Yc,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),Yz=(0,eU.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Y_.ampmLabel}`]:t.ampmLabel},{[`&.${Y_.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Y_.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function YV(e){let t=(0,qa.Z)({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:i,value:r,onChange:o,view:a,isLandscape:s,onViewChange:l,toolbarFormat:u,toolbarPlaceholder:c="––",views:h,disabled:d,readOnly:p,toolbarVariant:f="mobile",toolbarTitle:g,className:m}=t,v=(0,EA.Z)(t,YO),y=(0,da.V)(),x=(0,EI.Z)({},t,{isRtl:y}),b=qf(),{meridiemMode:w,handleMeridiemChange:S}=YP(r,n,o),_=!!(n&&!i),C="desktop"===f,M=q9(),k=YR(x),T=g??M.dateTimePickerToolbarTitle,D=eV.useMemo(()=>r?u?b.formatByString(r,u):b.format(r,"shortDate"):c,[r,u,c,b]);return(0,ez.jsxs)(YE,(0,EI.Z)({isLandscape:s,className:(0,ej.Z)(k.root,m),toolbarTitle:T},v,{ownerState:x,children:[(0,ez.jsxs)(YL,{className:k.dateContainer,ownerState:x,children:[h.includes("year")&&(0,ez.jsx)(Yw,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:"year"===a,value:r?b.format(r,"year"):"–"}),h.includes("day")&&(0,ez.jsx)(Yw,{tabIndex:-1,variant:C?"h5":"h4",onClick:()=>l("day"),selected:"day"===a,value:D})]}),(0,ez.jsxs)(YB,{className:k.timeContainer,ownerState:x,children:[(0,ez.jsxs)(YN,{className:k.timeDigitsContainer,ownerState:x,children:[h.includes("hours")&&(0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsx)(Yw,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("hours"),selected:"hours"===a,value:r?n?b.format(r,"hours12h"):b.format(r,"hours24h"):"--"}),(0,ez.jsx)(YF,{variant:C?"h5":"h3",value:":",className:k.separator,ownerState:x}),(0,ez.jsx)(Yw,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("minutes"),selected:"minutes"===a||!h.includes("minutes")&&"hours"===a,value:r?b.format(r,"minutes"):"--",disabled:!h.includes("minutes")})]}),h.includes("seconds")&&(0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsx)(YF,{variant:C?"h5":"h3",value:":",className:k.separator,ownerState:x}),(0,ez.jsx)(Yw,{variant:C?"h5":"h3",width:C&&!s?48:void 0,onClick:()=>l("seconds"),selected:"seconds"===a,value:r?b.format(r,"seconds"):"--"})]})]}),_&&!C&&(0,ez.jsxs)(Yz,{className:k.ampmSelection,ownerState:x,children:[(0,ez.jsx)(Yw,{variant:"subtitle2",selected:"am"===w,typographyClassName:k.ampmLabel,value:qS(b,"am"),onClick:p?void 0:()=>S("am"),disabled:d}),(0,ez.jsx)(Yw,{variant:"subtitle2",selected:"pm"===w,typographyClassName:k.ampmLabel,value:qS(b,"pm"),onClick:p?void 0:()=>S("pm"),disabled:d})]}),n&&C&&(0,ez.jsx)(Yw,{variant:"h5",onClick:()=>l("meridiem"),selected:"meridiem"===a,value:r&&w?qS(b,w):"--",width:48})]})]}))}let YZ=({openTo:e,defaultOpenTo:t,views:n,defaultViews:i})=>{let r;let o=n??i;if(null!=e)r=e;else if(o.includes(t))r=t;else if(o.length>0)r=o[0];else throw Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:r}};function Yj(e){return(0,eQ.ZP)("MuiPickersArrowSwitcher",e)}(0,eK.Z)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);let YH=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],YW=["ownerState"],Y$=["ownerState"],YG=(0,eU.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),YU=(0,eU.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Yq=(0,eU.ZP)(td.Z,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),YY=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Yj,t)},YX=eV.forwardRef(function(e,t){let n=(0,da.V)(),i=(0,qa.Z)({props:e,name:"MuiPickersArrowSwitcher"}),{children:r,className:o,slots:a,slotProps:s,isNextDisabled:l,isNextHidden:u,onGoToNext:c,nextLabel:h,isPreviousDisabled:d,isPreviousHidden:p,onGoToPrevious:f,previousLabel:g,labelId:m}=i,v=(0,EA.Z)(i,YH),y=YY(i),x=a?.previousIconButton??Yq,b=(0,qP.Z)({elementType:x,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:g,"aria-label":g,disabled:d,edge:"end",onClick:f},ownerState:(0,EI.Z)({},i,{hidden:p}),className:(0,ej.Z)(y.button,y.previousIconButton)}),w=a?.nextIconButton??Yq,S=(0,qP.Z)({elementType:w,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:h,"aria-label":h,disabled:l,edge:"start",onClick:c},ownerState:(0,EI.Z)({},i,{hidden:u}),className:(0,ej.Z)(y.button,y.nextIconButton)}),_=a?.leftArrowIcon??q5,C=(0,qP.Z)({elementType:_,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:i,className:y.leftArrowIcon}),M=(0,EA.Z)(C,YW),k=a?.rightArrowIcon??q3,T=(0,qP.Z)({elementType:k,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:i,className:y.rightArrowIcon}),D=(0,EA.Z)(T,Y$);return(0,ez.jsxs)(YG,(0,EI.Z)({ref:t,className:(0,ej.Z)(y.root,o),ownerState:i},v,{children:[(0,ez.jsx)(x,(0,EI.Z)({},b,{children:n?(0,ez.jsx)(k,(0,EI.Z)({},D)):(0,ez.jsx)(_,(0,EI.Z)({},M))})),r?(0,ez.jsx)(uD.Z,{variant:"subtitle1",component:"span",id:m,children:r}):(0,ez.jsx)(YU,{className:y.spacer,ownerState:i}),(0,ez.jsx)(w,(0,EI.Z)({},S,{children:n?(0,ez.jsx)(_,(0,EI.Z)({},M)):(0,ez.jsx)(k,(0,EI.Z)({},D))}))]}))});var YK=n(1925),YQ=n(9831);function YJ({onChange:e,onViewChange:t,openTo:n,view:i,views:r,autoFocus:o,focusedView:a,onFocusedViewChange:s}){let l=eV.useRef(n),u=eV.useRef(r),c=eV.useRef(r.includes(n)?n:r[0]),[h,d]=(0,YQ.Z)({name:"useViews",state:"view",controlled:i,default:c.current}),p=eV.useRef(o?h:null),[f,g]=(0,YQ.Z)({name:"useViews",state:"focusedView",controlled:a,default:p.current});eV.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(e=>!r.includes(e)))&&(d(r.includes(n)?n:r[0]),u.current=r,l.current=n)},[n,d,h,r]);let m=r.indexOf(h),v=r[m-1]??null,y=r[m+1]??null,x=(0,YK.Z)((e,t)=>{t?g(e):g(t=>e===t?null:t),s?.(e,t)}),b=(0,YK.Z)(e=>{x(e,!0),e!==h&&(d(e),t&&t(e))}),w=(0,YK.Z)(()=>{y&&b(y)}),S=(0,YK.Z)((t,n,i)=>{let o="finish"===n,a=i?r.indexOf(i)<r.length-1:!!y;if(e(t,o&&a?"partial":n,i),i&&i!==h){let e=r[r.indexOf(i)+1];e&&b(e)}else o&&w()});return{view:h,setView:b,focusedView:f,setFocusedView:x,nextView:y,previousView:v,defaultView:r.includes(n)?n:r[0],goToNextView:w,setValueAndGoToNextView:S}}let Y0=(0,eU.ZP)("div")({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function Y1(e){return(0,eQ.ZP)("MuiTimeClock",e)}(0,eK.Z)("MuiTimeClock",["root","arrowSwitcher"]);let Y2=110,Y5=110,Y3=Y2,Y4=0,Y8=Y3-Y2,Y6=Y4-Y5,Y9=e=>180/Math.PI*e,Y7=(e,t,n)=>{let i=t-Y2,r=n-Y5,o=Y9(Math.atan2(Y8,Y6)-Math.atan2(i,r));return{value:Math.floor((o=Math.round(o/e)*e%360)/e)||0,distance:Math.sqrt(i**2+r**2)}},Xe=(e,t,n=1)=>{let{value:i}=Y7(6*n,e,t);return i*n%60},Xt=(e,t,n)=>{let{value:i,distance:r}=Y7(30,e,t),o=i||12;return n?o%=12:r<74&&(o+=12,o%=24),o};function Xn(e){return(0,eQ.ZP)("MuiClockPointer",e)}(0,eK.Z)("MuiClockPointer",["root","thumb"]);let Xi=["className","hasSelected","isInner","type","viewValue"],Xr=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],thumb:["thumb"]},Xn,t)},Xo=(0,eU.ZP)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),Xa=(0,eU.ZP)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function Xs(e){let t;let n=(0,qa.Z)({props:e,name:"MuiClockPointer"}),{className:i,isInner:r,type:o,viewValue:a}=n,s=(0,EA.Z)(n,Xi),l=eV.useRef(o);eV.useEffect(()=>{l.current=o},[o]);let u=(0,EI.Z)({},n,{shouldAnimate:l.current!==o}),c=Xr(u);return(0,ez.jsx)(Xo,(0,EI.Z)({style:(t=360/("hours"===o?12:60)*a,"hours"===o&&a>12&&(t-=360),{height:Math.round((r?.26:.4)*220),transform:`rotateZ(${t}deg)`}),className:(0,ej.Z)(c.root,i),ownerState:u},s,{children:(0,ez.jsx)(Xa,{ownerState:u,className:c.thumb})}))}function Xl(e){return(0,eQ.ZP)("MuiClock",e)}(0,eK.Z)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);let Xu=e=>{let{classes:t,meridiemMode:n}=e;return(0,eH.Z)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]},Xl,t)},Xc=(0,eU.ZP)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),Xh=(0,eU.ZP)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Xd=(0,eU.ZP)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Xp=(0,eU.ZP)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Xf=(0,eU.ZP)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),Xg=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Xm=(0,eU.ZP)(td.Z,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>(0,EI.Z)({},Xg(e,"am"),{position:"absolute",left:8})),Xv=(0,eU.ZP)(td.Z,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>(0,EI.Z)({},Xg(e,"pm"),{position:"absolute",right:8})),Xy=(0,eU.ZP)(uD.Z,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Xx(e){let t=(0,qa.Z)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:i,autoFocus:r,children:o,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:u,minutesStep:c=1,onChange:h,selectedId:d,type:p,viewValue:f,viewRange:[g,m],disabled:v=!1,readOnly:y,className:x}=t,b=qf(),w=q9(),S=eV.useRef(!1),_=Xu(t),C=l(f,p),M=!n&&"hours"===p&&(f<1||f>12),k=(e,t)=>{!(v||y||l(e,p))&&h(e,t)},T=(e,t)=>{let{offsetX:i,offsetY:r}=e;if(void 0===i){let t=e.target.getBoundingClientRect();i=e.changedTouches[0].clientX-t.left,r=e.changedTouches[0].clientY-t.top}k("seconds"===p||"minutes"===p?Xe(i,r,c):Xt(i,r,!!n),t)},D=e=>{S.current=!0,T(e,"shallow")},I=eV.useMemo(()=>"hours"===p||f%5==0,[p,f]),A="minutes"===p?c:1,P=eV.useRef(null);(0,h7.Z)(()=>{r&&P.current.focus()},[r]);let O=e=>Math.max(g,Math.min(m,e)),R=e=>(e+(m+1))%(m+1);return(0,ez.jsxs)(Xc,{className:(0,ej.Z)(_.root,x),children:[(0,ez.jsxs)(Xh,{className:_.clock,children:[(0,ez.jsx)(Xp,{onTouchMove:D,onTouchStart:D,onTouchEnd:e=>{S.current&&(T(e,"finish"),S.current=!1),e.preventDefault()},onMouseUp:e=>{S.current&&(S.current=!1),T(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&T(e.nativeEvent,"shallow")},ownerState:{disabled:v},className:_.squareMask}),!C&&(0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsx)(Xf,{className:_.pin}),null!=a&&(0,ez.jsx)(Xs,{type:p,viewValue:f,isInner:M,hasSelected:I})]}),(0,ez.jsx)(Xd,{"aria-activedescendant":d,"aria-label":w.clockLabelText(p,a,b,null==a?null:b.format(a,"fullTime")),ref:P,role:"listbox",onKeyDown:e=>{if(!S.current)switch(e.key){case"Home":k(g,"partial"),e.preventDefault();break;case"End":k(m,"partial"),e.preventDefault();break;case"ArrowUp":k(R(f+A),"partial"),e.preventDefault();break;case"ArrowDown":k(R(f-A),"partial"),e.preventDefault();break;case"PageUp":k(O(f+5),"partial"),e.preventDefault();break;case"PageDown":k(O(f-5),"partial"),e.preventDefault();break;case"Enter":case" ":k(f,"finish"),e.preventDefault()}},tabIndex:0,className:_.wrapper,children:o})]}),n&&i&&(0,ez.jsxs)(eV.Fragment,{children:[(0,ez.jsx)(Xm,{onClick:y?void 0:()=>s("am"),disabled:v||null===u,ownerState:t,className:_.amButton,title:qS(b,"am"),children:(0,ez.jsx)(Xy,{variant:"caption",className:_.meridiemText,children:qS(b,"am")})}),(0,ez.jsx)(Xv,{disabled:v||null===u,onClick:y?void 0:()=>s("pm"),ownerState:t,className:_.pmButton,title:qS(b,"pm"),children:(0,ez.jsx)(Xy,{variant:"caption",className:_.meridiemText,children:qS(b,"pm")})})]})]})}function Xb(e){return(0,eQ.ZP)("MuiClockNumber",e)}let Xw=(0,eK.Z)("MuiClockNumber",["root","selected","disabled"]),XS=["className","disabled","index","inner","label","selected"],X_=e=>{let{classes:t,selected:n,disabled:i}=e;return(0,eH.Z)({root:["root",n&&"selected",i&&"disabled"]},Xb,t)},XC=(0,eU.ZP)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Xw.disabled}`]:t.disabled},{[`&.${Xw.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${Xw.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${Xw.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,EI.Z)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function XM(e){let t=(0,qa.Z)({props:e,name:"MuiClockNumber"}),{className:n,disabled:i,index:r,inner:o,label:a,selected:s}=t,l=(0,EA.Z)(t,XS),u=X_(t),c=r%12/12*Math.PI*2-Math.PI/2,h=91*(o?.65:1),d=Math.round(Math.cos(c)*h),p=Math.round(Math.sin(c)*h);return(0,ez.jsx)(XC,(0,EI.Z)({className:(0,ej.Z)(u.root,n),"aria-disabled":!!i||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${d}px, ${p+92}px`},ownerState:t},l,{children:a}))}let Xk=({ampm:e,value:t,getClockNumberText:n,isDisabled:i,selectedId:r,utils:o})=>{let a=t?o.getHours(t):null,s=[],l=+!!e,u=e?12:23,c=t=>null!==a&&(e?12===t?12===a||0===a:a===t||a-12===t:a===t);for(let t=l;t<=u;t+=1){let a=t.toString();0===t&&(a="00");let l=!e&&(0===t||t>12);a=o.formatNumber(a);let u=c(t);s.push((0,ez.jsx)(XM,{id:u?r:void 0,index:t,inner:l,selected:u,disabled:i(t),label:a,"aria-label":n(a)},t))}return s},XT=({utils:e,value:t,isDisabled:n,getClockNumberText:i,selectedId:r})=>{let o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(([e,o],a)=>{let s=e===t;return(0,ez.jsx)(XM,{label:o,id:s?r:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":i(o)},e)})},XD=({timezone:e,value:t,defaultValue:n,referenceDate:i,onChange:r,valueManager:o})=>{let a;let s=qf(),l=eV.useRef(n),u=t??l.current??o.emptyValue,c=eV.useMemo(()=>o.getTimezone(s,u),[s,o,u]),h=(0,YK.Z)(e=>null==c?e:o.setTimezone(s,c,e));return a=e||c||(i?s.getTimezone(i):"default"),{value:eV.useMemo(()=>o.setTimezone(s,a,u),[o,s,a,u]),handleValueChange:(0,YK.Z)((e,...t)=>{let n=h(e);r?.(n,...t)}),timezone:a}},XI=({name:e,timezone:t,value:n,defaultValue:i,referenceDate:r,onChange:o,valueManager:a})=>{let[s,l]=(0,YQ.Z)({name:e,state:"value",controlled:n,default:i??a.emptyValue});return XD({timezone:t,value:s,defaultValue:void 0,referenceDate:r,onChange:(0,YK.Z)((e,...t)=>{l(e),o?.(e,...t)}),valueManager:a})},XA={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},XP=e=>Math.max(...e.map(e=>XA[e.type]??1)),XO=(e,t,n)=>{if(t===XA.year)return e.startOfYear(n);if(t===XA.month)return e.startOfMonth(n);if(t===XA.day)return e.startOfDay(n);let i=n;return t<XA.minutes&&(i=e.setMinutes(i,0)),t<XA.seconds&&(i=e.setSeconds(i,0)),t<XA.milliseconds&&(i=e.setMilliseconds(i,0)),i},XR=({props:e,utils:t,granularity:n,timezone:i,getTodayDate:r})=>{let o=r?r():XO(t,n,qw(t,i));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=XO(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=XO(t,n,e.maxDate));let a=YA(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=XO(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:qv(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=XO(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:qv(t,o,e.maxTime))),o},XE=(e,t)=>{let n=e.formatTokenMap[t];if(null==n)throw Error(`MUI X: The token "${t}" is not supported by the Date and Time Pickers.
|
|
7
|
-
Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.`);return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},XL=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return -1;case"PageUp":return 5;case"PageDown":return -5;default:return 0}},XB=(e,t)=>{let n=[],i=e.date(void 0,"default"),r=e.startOfWeek(i),o=e.endOfWeek(i),a=r;for(;e.isBefore(a,o);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},XN=(e,t,n,i)=>{switch(n){case"month":return qb(e,e.date(void 0,t)).map(t=>e.formatByString(t,i));case"weekDay":return XB(e,i);case"meridiem":{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,i))}default:return[]}},XF=["0","1","2","3","4","5","6","7","8","9"],Xz=e=>{let t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?XF:Array.from({length:10}).map((n,i)=>e.formatByString(e.setSeconds(t,i),"s"))},XV=(e,t)=>{if("0"===t[0])return e;let n=[],i="";for(let r=0;r<e.length;r+=1){i+=e[r];let o=t.indexOf(i);o>-1&&(n.push(o.toString()),i="")}return n.join("")},XZ=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),Xj=(e,t)=>{let n=XV(e,t);return" "!==n&&!Number.isNaN(Number(n))},XH=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},XW=(e,t,n,i,r)=>{if("day"===r.type&&"digit-with-letter"===r.contentType){let i=e.setDate(n.longestMonth,t);return e.formatByString(i,r.format)}let o=t.toString();return r.hasLeadingZerosInInput&&(o=XH(o,r.maxLength)),XZ(o,i)},X$=(e,t,n,i,r,o,a,s)=>{let l=XL(i),u="Home"===i,c="End"===i,h=""===n.value||u||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{let i=r[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),d=t=>XW(e,t,i,o,n),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1,f=parseInt(XV(n.value,o),10)+l*p;if(h){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);f=l>0||u?i.minimum:i.maximum}return d((f%p!=0&&((l<0||u)&&(f+=p-(p+f)%p),(l>0||c)&&(f-=f%p)),f>i.maximum)?i.minimum+(f-i.maximum-1)%(i.maximum-i.minimum+1):f<i.minimum?i.maximum-(i.minimum-f-1)%(i.maximum-i.minimum+1):f)})():(()=>{let i=XN(e,t,n.type,n.format);if(0===i.length)return n.value;if(h)return l>0||u?i[0]:i[i.length-1];let r=((i.indexOf(n.value)+l)%i.length+i.length)%i.length;return i[r]})()},XG=(e,t,n)=>{let i=e.value||e.placeholder,r="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(i=Number(XV(i,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!r&&1===i.length&&(i=`${i}\u200e`),"input-rtl"===t&&(i=`\u2068${i}\u2069`),i},XU=(e,t,n,i)=>e.formatByString(e.parse(t,n),i),Xq=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,XY=(e,t,n,i)=>{if("digit"!==t)return!1;let r=e.date(void 0,"default");switch(n){case"year":if(Xq(e,i))return"0001"===e.formatByString(e.setYear(r,1),i);return"01"===e.formatByString(e.setYear(r,2001),i);case"month":return e.formatByString(e.startOfYear(r),i).length>1;case"day":return e.formatByString(e.startOfMonth(r),i).length>1;case"weekDay":return e.formatByString(e.startOfWeek(r),i).length>1;case"hours":return e.formatByString(e.setHours(r,1),i).length>1;case"minutes":return e.formatByString(e.setMinutes(r,1),i).length>1;case"seconds":return e.formatByString(e.setSeconds(r,1),i).length>1;default:throw Error("Invalid section type")}},XX=(e,t,n)=>{let i=t.some(e=>"day"===e.type),r=[],o=[];for(let e=0;e<t.length;e+=1){let a=t[e];i&&"weekDay"===a.type||(r.push(a.format),o.push(XG(a,"non-input",n)))}let a=r.join(" "),s=o.join(" ");return e.parse(s,a)},XK=(e,t,n)=>{let i=e.date(void 0,n),r=e.endOfYear(i),o=e.endOfDay(i),{maxDaysInMonth:a,longestMonth:s}=qb(e,i).reduce((t,n)=>{let i=e.getDaysInMonth(n);return i>t.maxDaysInMonth?{maxDaysInMonth:i,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:Xq(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(r)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):a,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if("digit"===n){let n=XB(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let r=e.getHours(o);return XV(e.formatByString(e.endOfDay(i),n),t)!==r.toString()?{minimum:1,maximum:Number(XV(e.formatByString(e.startOfDay(i),n),t))}:{minimum:0,maximum:r}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},XQ=(e,t)=>{},XJ=(e,t,n,i)=>{switch(t.type){case"year":return e.setYear(i,e.getYear(n));case"month":return e.setMonth(i,e.getMonth(n));case"weekDay":{let i=XB(e,t.format),r=e.formatByString(n,t.format),o=i.indexOf(r),a=i.indexOf(t.value);return e.addDays(n,a-o)}case"day":return e.setDate(i,e.getDate(n));case"meridiem":{let t=12>e.getHours(n),r=e.getHours(i);if(t&&r>=12)return e.addHours(i,-12);if(!t&&r<12)return e.addHours(i,12);return i}case"hours":return e.setHours(i,e.getHours(n));case"minutes":return e.setMinutes(i,e.getMinutes(n));case"seconds":return e.setSeconds(i,e.getSeconds(n));default:return i}},X0={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},X1=(e,t,n,i,r)=>[...n].sort((e,t)=>X0[e.type]-X0[t.type]).reduce((n,i)=>!r||i.modified?XJ(e,i,t,n):n,i),X2=()=>navigator.userAgent.toLowerCase().includes("android"),X5=(e,t)=>{let n={};if(!t)return e.forEach((t,i)=>{let r=i===e.length-1?null:i+1;n[i]={leftIndex:0===i?null:i-1,rightIndex:r}}),{neighbors:n,startIndex:0,endIndex:e.length-1};let i={},r={},o=0,a=0,s=e.length-1;for(;s>=0;){-1===(a=e.findIndex((e,t)=>t>=o&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator))&&(a=e.length-1);for(let e=a;e>=o;e-=1)r[e]=s,i[s]=e,s-=1;o=a+1}return e.forEach((t,o)=>{let a=r[o],s=0===a?null:i[a-1],l=a===e.length-1?null:i[a+1];n[o]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:i[0],endIndex:i[e.length-1]}},X3=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){let n=t.findIndex(t=>t.type===e);return -1===n?null:n}return e},X4=(e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");let n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}},X8=(e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);if(n)return+(t.getHours(n)>=12);return}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}},X6=["value","referenceDate"],X9={emptyValue:null,getTodayValue:qw,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,i=(0,EA.Z)(e,X6);return null!=t&&i.utils.isValid(t)?t:null!=n?n:XR(i)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!(e.isValid(t)||null==t||e.isValid(n))&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},X7={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,i)=>!e.isValid(t)&&n?n:i(t),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{let i=e.map(e=>{let i=XG(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${i}${e.endSeparator}`}).join("");return n?`\u2066${i}\u2069`:i},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},Ke=({value:e,referenceDate:t,utils:n,props:i,timezone:r})=>{let o=eV.useMemo(()=>X9.getInitialReferenceValue({value:e,utils:n,props:i,referenceDate:t,granularity:XA.day,timezone:r,getTodayDate:()=>qw(n,r,"date")}),[]);return e??o},Kt=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Kn=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],arrowSwitcher:["arrowSwitcher"]},Y1,t)},Ki=(0,eU.ZP)(Y0,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),Kr=(0,eU.ZP)(YX,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),Ko=["hours","minutes"],Ka=eV.forwardRef(function(e,t){let n=qf(),i=(0,qa.Z)({props:e,name:"MuiTimeClock"}),{ampm:r=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:a,slots:s,slotProps:l,value:u,defaultValue:c,referenceDate:h,disableIgnoringDatePartForTimeValidation:d=!1,maxTime:p,minTime:f,disableFuture:g,disablePast:m,minutesStep:v=1,shouldDisableTime:y,showViewSwitcher:x,onChange:b,view:w,views:S=Ko,openTo:_,onViewChange:C,focusedView:M,onFocusedViewChange:k,className:T,disabled:D,readOnly:I,timezone:A}=i,P=(0,EA.Z)(i,Kt),{value:O,handleValueChange:R,timezone:E}=XI({name:"TimeClock",timezone:A,value:u,defaultValue:c,referenceDate:h,onChange:b,valueManager:X9}),L=Ke({value:O,referenceDate:h,utils:n,props:i,timezone:E}),B=q9(),N=qm(E),{view:F,setView:z,previousView:V,nextView:Z,setValueAndGoToNextView:j}=YJ({view:w,views:S,openTo:_,onViewChange:C,onChange:R,focusedView:M,onFocusedViewChange:k}),{meridiemMode:H,handleMeridiemChange:W}=YP(L,r,j),$=eV.useCallback((e,t)=>{let i=YA(d,n),o="hours"===t||"minutes"===t&&S.includes("seconds"),a=({start:e,end:t})=>!(f&&i(f,t)||p&&i(e,p)||g&&i(e,N)||m&&i(N,o?t:e)),s=(e,i=1)=>{if(e%i!=0)return!1;if(y)switch(t){case"hours":return!y(n.setHours(L,e),"hours");case"minutes":return!y(n.setMinutes(L,e),"minutes");case"seconds":return!y(n.setSeconds(L,e),"seconds");default:return!1}return!0};switch(t){case"hours":{let t=YT(e,H,r),i=n.setHours(L,t);if(n.getHours(i)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(i,0),0),end:n.setSeconds(n.setMinutes(i,59),59)})||!s(t)}case"minutes":{let t=n.setMinutes(L,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,v)}case"seconds":{let t=n.setSeconds(L,e);return!a({start:t,end:t})||!s(e)}default:throw Error("not supported")}},[r,L,d,p,H,f,v,y,n,g,m,N,S]),G=(0,c_.Z)(),U=eV.useMemo(()=>{switch(F){case"hours":{let e;let t=(e,t)=>{let i=YT(e,H,r);j(n.setHours(L,i),t,"hours")},i=n.getHours(L);return e=r?i>12?[12,23]:[0,11]:[0,23],{onChange:t,viewValue:i,children:Xk({value:O,utils:n,ampm:r,onChange:t,getClockNumberText:B.hoursClockNumberText,isDisabled:e=>D||$(e,"hours"),selectedId:G}),viewRange:e}}case"minutes":{let e=n.getMinutes(L),t=(e,t)=>{j(n.setMinutes(L,e),t,"minutes")};return{viewValue:e,onChange:t,children:XT({utils:n,value:e,onChange:t,getClockNumberText:B.minutesClockNumberText,isDisabled:e=>D||$(e,"minutes"),selectedId:G}),viewRange:[0,59]}}case"seconds":{let e=n.getSeconds(L),t=(e,t)=>{j(n.setSeconds(L,e),t,"seconds")};return{viewValue:e,onChange:t,children:XT({utils:n,value:e,onChange:t,getClockNumberText:B.secondsClockNumberText,isDisabled:e=>D||$(e,"seconds"),selectedId:G}),viewRange:[0,59]}}default:throw Error("You must provide the type for ClockView")}},[F,n,O,r,B.hoursClockNumberText,B.minutesClockNumberText,B.secondsClockNumberText,H,j,L,$,G,D]),q=Kn(i);return(0,ez.jsxs)(Ki,(0,EI.Z)({ref:t,className:(0,ej.Z)(q.root,T),ownerState:i},P,{children:[(0,ez.jsx)(Xx,(0,EI.Z)({autoFocus:a??!!M,ampmInClock:o&&S.includes("hours"),value:O,type:F,ampm:r,minutesStep:v,isTimeDisabled:$,meridiemMode:H,handleMeridiemChange:W,selectedId:G,disabled:D,readOnly:I},U)),x&&(0,ez.jsx)(Kr,{className:q.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>z(V),isPreviousDisabled:!V,previousLabel:B.openPreviousView,onGoToNext:()=>z(Z),isNextDisabled:!Z,nextLabel:B.openNextView,ownerState:i})]}))}),Ks=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:i,views:r,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:S,sx:_,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:k,timezone:T})=>(0,ez.jsx)(Ka,{view:e,onViewChange:t,focusedView:n&&YM(n)?n:null,onFocusedViewChange:i,views:r.filter(YM),value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minTime:p,maxTime:f,shouldDisableTime:g,minutesStep:m,ampm:v,ampmInClock:y,slots:x,slotProps:b,readOnly:w,disabled:S,sx:_,autoFocus:C,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:k,timezone:T}),Kl=({props:e,value:t,timezone:n,adapter:i})=>{if(null===t)return null;let{shouldDisableDate:r,shouldDisableMonth:o,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=i.utils.date(void 0,n),c=qx(i.utils,e.minDate,i.defaultDates.minDate),h=qx(i.utils,e.maxDate,i.defaultDates.maxDate);switch(!0){case!i.utils.isValid(t):return"invalidDate";case!!(r&&r(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&i.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&i.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&i.utils.isBeforeDay(t,c)):return"minDate";case!!(h&&i.utils.isAfterDay(t,h)):return"maxDate";default:return null}};Kl.valueManager=X9;let Ku=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:i,maxDate:r,disableFuture:o,disablePast:a,timezone:s})=>{let l=qp();return eV.useCallback(u=>null!==Kl({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:i,maxDate:r,disableFuture:o,disablePast:a}}),[l,e,t,n,i,r,o,a,s])},Kc=(e,t,n)=>(i,r)=>{switch(r.type){case"changeMonth":return(0,EI.Z)({},i,{slideDirection:r.direction,currentMonth:r.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{let e=r.newTimezone;if(n.getTimezone(i.currentMonth)===e)return i;let t=n.setTimezone(i.currentMonth,e);return n.getMonth(t)!==n.getMonth(i.currentMonth)&&(t=n.setMonth(t,n.getMonth(i.currentMonth))),(0,EI.Z)({},i,{currentMonth:t})}case"finishMonthSwitchingAnimation":return(0,EI.Z)({},i,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=i.focusedDay&&null!=r.focusedDay&&n.isSameDay(r.focusedDay,i.focusedDay))return i;let o=null!=r.focusedDay&&!t&&!n.isSameMonth(i.currentMonth,r.focusedDay);return(0,EI.Z)({},i,{focusedDay:r.focusedDay,isMonthSwitchingAnimating:o&&!e&&!r.withoutMonthSwitchingAnimation,currentMonth:o?n.startOfMonth(r.focusedDay):i.currentMonth,slideDirection:null!=r.focusedDay&&n.isAfterDay(r.focusedDay,i.currentMonth)?"left":"right"})}default:throw Error("missing support")}},Kh=e=>{let{value:t,referenceDate:n,disableFuture:i,disablePast:r,disableSwitchToMonthOnDayFocus:o=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:h}=e,d=qf(),p=eV.useRef(Kc(!!u,o,d)).current,f=eV.useMemo(()=>X9.getInitialReferenceValue({value:t,utils:d,timezone:h,props:e,referenceDate:n,granularity:XA.day}),[n,h]),[g,m]=eV.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:f,currentMonth:d.startOfMonth(f),slideDirection:"left"});eV.useEffect(()=>{m({type:"changeMonthTimezone",newTimezone:d.getTimezone(f)})},[f,d]);let v=eV.useCallback(e=>{m((0,EI.Z)({type:"changeMonth"},e)),l&&l(e.newMonth)},[l]),y=eV.useCallback(e=>{!d.isSameMonth(e,g.currentMonth)&&v({newMonth:d.startOfMonth(e),direction:d.isAfterDay(e,g.currentMonth)?"left":"right"})},[g.currentMonth,v,d]),x=Ku({shouldDisableDate:c,minDate:s,maxDate:a,disableFuture:i,disablePast:r,timezone:h}),b=eV.useCallback(()=>{m({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:f,calendarState:g,changeMonth:y,changeFocusedDay:(0,YK.Z)((e,t)=>{x(e)||m({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),isDateDisabled:x,onMonthSwitchingAnimationEnd:b,handleChangeMonth:v}};var Kd=n(6317);let Kp=e=>(0,eQ.ZP)("MuiPickersFadeTransitionGroup",e);(0,eK.Z)("MuiPickersFadeTransitionGroup",["root"]);let Kf=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},Kp,t)},Kg=(0,eU.ZP)(Kd.Z,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Km(e){let t=(0,qa.Z)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:i,reduceAnimations:r,transKey:o}=t,a=Kf(t),s=(0,rS.Z)();return r?n:(0,ez.jsx)(Kg,{className:(0,ej.Z)(a.root,i),children:(0,ez.jsx)(cM.Z,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},o)})}var Kv=n(7048);function Ky(e){return(0,eQ.ZP)("MuiPickersDay",e)}let Kx=(0,eK.Z)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Kb=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Kw=e=>{let{selected:t,disableMargin:n,disableHighlightToday:i,today:r,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return(0,eH.Z)({root:["root",t&&!u&&"selected",o&&"disabled",!n&&"dayWithMargin",!i&&r&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Ky,l)},KS=({theme:e})=>(0,EI.Z)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,eW.Fq)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Kx.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Kx.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Kx.disabled}:not(.${Kx.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Kx.disabled}&.${Kx.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Kx.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),K_=(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},KC=(0,eU.ZP)(lo.Z,{name:"MuiPickersDay",slot:"Root",overridesResolver:K_})(KS),KM=(0,eU.ZP)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:K_})(({theme:e})=>(0,EI.Z)({},KS({theme:e}),{opacity:0,pointerEvents:"none"})),Kk=()=>{},KT=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersDay"}),{autoFocus:i=!1,className:r,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:u,onClick:c,onDaySelect:h,onFocus:d=Kk,onBlur:p=Kk,onKeyDown:f=Kk,onMouseDown:g=Kk,onMouseEnter:m=Kk,outsideCurrentMonth:v,selected:y=!1,showDaysOutsideCurrentMonth:x=!1,children:b,today:w=!1}=n,S=(0,EA.Z)(n,Kb),_=(0,EI.Z)({},n,{autoFocus:i,disabled:a,disableHighlightToday:s,disableMargin:l,selected:y,showDaysOutsideCurrentMonth:x,today:w}),C=Kw(_),M=qf(),k=eV.useRef(null),T=(0,Kv.Z)(k,t);return((0,h7.Z)(()=>{!i||a||u||v||k.current.focus()},[i,a,u,v]),v&&!x)?(0,ez.jsx)(KM,{className:(0,ej.Z)(C.root,C.hiddenDaySpacingFiller,r),ownerState:_,role:S.role}):(0,ez.jsx)(KC,(0,EI.Z)({className:(0,ej.Z)(C.root,r),ref:T,centerRipple:!0,disabled:a,tabIndex:y?0:-1,onKeyDown:e=>f(e,o),onFocus:e=>d(e,o),onBlur:e=>p(e,o),onMouseEnter:e=>m(e,o),onClick:e=>{a||h(o),v&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{g(e),v&&e.preventDefault()}},S,{ownerState:_,children:b||M.format(o,"dayOfMonth")}))}),KD=eV.memo(KT);var KI=n(4652);function KA(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var KP=n(8683),KO=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=KA(e.className,t):e.setAttribute("class",KA(e.className&&e.className.baseVal||"",t))})},KR=function(e){function t(){for(var t,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var i=t.resolveArguments(e,n),r=i[0],o=i[1];t.removeClasses(r,"exit"),t.addClass(r,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var i=t.resolveArguments(e,n),r=i[0],o=i[1];t.addClass(r,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var i=t.resolveArguments(e,n),r=i[0],o=i[1]?"appear":"enter";t.removeClasses(r,o),t.addClass(r,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,i="string"==typeof n,r=i&&n?n+"-":"",o=i?""+r+e:n[e],a=i?o+"-active":n[e+"Active"],s=i?o+"-done":n[e+"Done"];return{baseClassName:o,activeClassName:a,doneClassName:s}},t}(0,KI.Z)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var i,r=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(r+=" "+o),"active"===n&&e&&(0,KP.Q)(e),r&&(this.appliedClasses[t][n]=r,i=r,e&&i&&i.split(" ").forEach(function(t){return function(e,t){if(e.classList)e.classList.add(t);else(e.classList?!(t&&e.classList.contains(t)):-1===(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" "))&&("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}(e,t)}))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],i=n.base,r=n.active,o=n.done;this.appliedClasses[t]={},i&&KO(e,i),r&&KO(e,r),o&&KO(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,EA.Z)(e,["classNames"]));return eZ().createElement(ds.ZP,(0,EI.Z)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(eZ().Component);KR.defaultProps={classNames:""},KR.propTypes={};let KE=e=>(0,eQ.ZP)("MuiPickersSlideTransition",e),KL=(0,eK.Z)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),KB=["children","className","reduceAnimations","slideDirection","transKey","classes"],KN=e=>{let{classes:t,slideDirection:n}=e,i={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,eH.Z)(i,KE,t)},KF=(0,eU.ZP)(Kd.Z,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${KL["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${KL["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${KL.slideEnterActive}`]:t.slideEnterActive},{[`.${KL.slideExit}`]:t.slideExit},{[`.${KL["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${KL["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{let t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${KL["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${KL["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${KL.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${KL.slideExit}`]:{transform:"translate(0%)"},[`& .${KL["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${KL["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),Kz=e=>(0,eQ.ZP)("MuiDayCalendar",e);(0,eK.Z)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);let KV=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],KZ=["ownerState"],Kj=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Kz,t)},KH=(0,eU.ZP)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),KW=(0,eU.ZP)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),K$=(0,eU.ZP)(uD.Z,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),KG=(0,eU.ZP)(uD.Z,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),KU=(0,eU.ZP)(uD.Z,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,EI.Z)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),Kq=(0,eU.ZP)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),KY=(0,eU.ZP)(function(e){let t=(0,qa.Z)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:i,reduceAnimations:r,transKey:o}=t,a=(0,EA.Z)(t,KB),s=KN(t),l=(0,rS.Z)();if(r)return(0,ez.jsx)("div",{className:(0,ej.Z)(s.root,i),children:n});let u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return(0,ez.jsx)(KF,{className:(0,ej.Z)(s.root,i),childFactory:e=>eV.cloneElement(e,{classNames:u}),role:"presentation",children:(0,ez.jsx)(KR,(0,EI.Z)({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:u},a,{children:n}),o)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),KX=(0,eU.ZP)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),KK=(0,eU.ZP)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function KQ(e){let{parentProps:t,day:n,focusableDay:i,selectedDays:r,isDateDisabled:o,currentMonthNumber:a,isViewFocused:s}=e,l=(0,EA.Z)(e,KV),{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:h,showDaysOutsideCurrentMonth:d,slots:p,slotProps:f,timezone:g}=t,m=qf(),v=qm(g),y=null!==i&&m.isSameDay(n,i),x=r.some(e=>m.isSameDay(e,n)),b=m.isSameDay(n,v),w=p?.day??KD,S=(0,qP.Z)({elementType:w,externalSlotProps:f?.day,additionalProps:(0,EI.Z)({disableHighlightToday:c,showDaysOutsideCurrentMonth:d,role:"gridcell",isAnimating:h,"data-timestamp":m.toJsDate(n).valueOf()},l),ownerState:(0,EI.Z)({},t,{day:n,selected:x})}),_=(0,EA.Z)(S,KZ),C=eV.useMemo(()=>u||o(n),[u,o,n]),M=eV.useMemo(()=>m.getMonth(n)!==a,[m,n,a]),k=eV.useMemo(()=>{let e=m.startOfMonth(m.setMonth(n,a));return d?m.isSameDay(n,m.startOfWeek(e)):m.isSameDay(n,e)},[a,n,d,m]),T=eV.useMemo(()=>{let e=m.endOfMonth(m.setMonth(n,a));return d?m.isSameDay(n,m.endOfWeek(e)):m.isSameDay(n,e)},[a,n,d,m]);return(0,ez.jsx)(w,(0,EI.Z)({},_,{day:n,disabled:C,autoFocus:s&&y,today:b,outsideCurrentMonth:M,isFirstVisibleCell:k,isLastVisibleCell:T,selected:x,tabIndex:y?0:-1,"aria-selected":x,"aria-current":b?"date":void 0}))}function KJ(e){let t=(0,qa.Z)({props:e,name:"MuiDayCalendar"}),n=qf(),{onFocusedDayChange:i,className:r,currentMonth:o,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:c,readOnly:h,reduceAnimations:d,renderLoading:p=()=>(0,ez.jsx)("span",{children:"..."}),slideDirection:f,TransitionProps:g,disablePast:m,disableFuture:v,minDate:y,maxDate:x,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:S,dayOfWeekFormatter:_=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:C,onFocusedViewChange:M,gridLabelId:k,displayWeekNumber:T,fixedWeekNumber:D,autoFocus:I,timezone:A}=t,P=qm(A),O=Kj(t),R=(0,da.V)(),E=Ku({shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:S,minDate:y,maxDate:x,disablePast:m,disableFuture:v,timezone:A}),L=q9(),[B,N]=(0,YQ.Z)({name:"DayCalendar",state:"hasFocus",controlled:C,default:I??!1}),[F,z]=eV.useState(()=>s||P),V=(0,YK.Z)(e=>{!h&&u(e)}),Z=e=>{E(e)||(i(e),z(e),M?.(!0),N(!0))},j=(0,YK.Z)((e,t)=>{switch(e.key){case"ArrowUp":Z(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":Z(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{let i=n.addDays(t,R?1:-1),r=n.addMonths(t,R?1:-1);Z(qy({utils:n,date:i,minDate:R?i:n.startOfMonth(r),maxDate:R?n.endOfMonth(r):i,isDateDisabled:E,timezone:A})||i),e.preventDefault();break}case"ArrowRight":{let i=n.addDays(t,R?-1:1),r=n.addMonths(t,R?-1:1);Z(qy({utils:n,date:i,minDate:R?n.startOfMonth(r):i,maxDate:R?i:n.endOfMonth(r),isDateDisabled:E,timezone:A})||i),e.preventDefault();break}case"Home":Z(n.startOfWeek(t)),e.preventDefault();break;case"End":Z(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":Z(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":Z(n.addMonths(t,-1)),e.preventDefault()}}),H=(0,YK.Z)((e,t)=>Z(t)),W=(0,YK.Z)((e,t)=>{B&&n.isSameDay(F,t)&&M?.(!1)}),$=n.getMonth(o),G=n.getYear(o),U=eV.useMemo(()=>a.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,a]),q=`${G}-${$}`,Y=eV.useMemo(()=>eV.createRef(),[q]),X=eV.useMemo(()=>{let e=n.startOfMonth(o),t=n.endOfMonth(o);return E(F)||n.isAfterDay(F,t)||n.isBeforeDay(F,e)?qy({utils:n,date:F,minDate:e,maxDate:t,disablePast:m,disableFuture:v,isDateDisabled:E,timezone:A}):F},[o,v,m,F,E,n,A]),K=eV.useMemo(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;D&&e.length<D;){let i=n.getWeekArray(t),r=n.isSameDay(e[e.length-1][0],i[0][0]);i.slice(+!!r).forEach(t=>{e.length<D&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,D,n]);return(0,ez.jsxs)(KH,{role:"grid","aria-labelledby":k,className:O.root,children:[(0,ez.jsxs)(KW,{role:"row",className:O.header,children:[T&&(0,ez.jsx)(KG,{variant:"caption",role:"columnheader","aria-label":L.calendarWeekNumberHeaderLabel,className:O.weekNumberLabel,children:L.calendarWeekNumberHeaderText}),qM(n,P).map((e,t)=>(0,ez.jsx)(K$,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:O.weekDayLabel,children:_(e)},t.toString()))]}),l?(0,ez.jsx)(Kq,{className:O.loadingContainer,children:p()}):(0,ez.jsx)(KY,(0,EI.Z)({transKey:q,onExited:c,reduceAnimations:d,slideDirection:f,className:(0,ej.Z)(r,O.slideTransition)},g,{nodeRef:Y,children:(0,ez.jsx)(KX,{ref:Y,role:"rowgroup",className:O.monthContainer,children:K.map((e,i)=>(0,ez.jsxs)(KK,{role:"row",className:O.weekContainer,"aria-rowindex":i+1,children:[T&&(0,ez.jsx)(KU,{className:O.weekNumber,role:"rowheader","aria-label":L.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:L.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>(0,ez.jsx)(KQ,{parentProps:t,day:e,selectedDays:U,focusableDay:X,onKeyDown:j,onFocus:H,onBlur:W,onDaySelect:V,isDateDisabled:E,currentMonthNumber:$,isViewFocused:B,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function K0(e){return(0,eQ.ZP)("MuiPickersMonth",e)}let K1=(0,eK.Z)("MuiPickersMonth",["root","monthButton","disabled","selected"]),K2=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],K5=e=>{let{disabled:t,selected:n,classes:i}=e;return(0,eH.Z)({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},K0,i)},K3=(0,eU.ZP)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),K4=(0,eU.ZP)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${K1.disabled}`]:t.disabled},{[`&.${K1.selected}`]:t.selected}]})(({theme:e})=>(0,EI.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${K1.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${K1.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),K8=eV.memo(function(e){let t=(0,qa.Z)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:i,children:r,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:h,onBlur:d,"aria-current":p,"aria-label":f,slots:g,slotProps:m}=t,v=(0,EA.Z)(t,K2),y=eV.useRef(null),x=K5(t);(0,h7.Z)(()=>{n&&y.current?.focus()},[n]);let b=g?.monthButton??K4,w=(0,qP.Z)({elementType:b,externalSlotProps:m?.monthButton,additionalProps:{children:r,disabled:o,tabIndex:l,ref:y,type:"button",role:"radio","aria-current":p,"aria-checked":a,"aria-label":f,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>h(e,s),onBlur:e=>d(e,s)},ownerState:t,className:x.monthButton});return(0,ez.jsx)(K3,(0,EI.Z)({className:(0,ej.Z)(x.root,i),ownerState:t},v,{children:(0,ez.jsx)(b,(0,EI.Z)({},w))}))});function K6(e){return(0,eQ.ZP)("MuiMonthCalendar",e)}(0,eK.Z)("MuiMonthCalendar",["root"]);let K9=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],K7=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},K6,t)},Qe=(0,eU.ZP)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),Qt=eV.forwardRef(function(e,t){let n=function(e,t){let n=qf(),i=qg(),r=(0,qa.Z)({props:e,name:t});return(0,EI.Z)({disableFuture:!1,disablePast:!1},r,{minDate:qx(n,r.minDate,i.minDate),maxDate:qx(n,r.maxDate,i.maxDate)})}(e,"MuiMonthCalendar"),{className:i,value:r,defaultValue:o,referenceDate:a,disabled:s,disableFuture:l,disablePast:u,maxDate:c,minDate:h,onChange:d,shouldDisableMonth:p,readOnly:f,autoFocus:g=!1,onMonthFocus:m,hasFocus:v,onFocusedViewChange:y,monthsPerRow:x=3,timezone:b,gridLabelId:w,slots:S,slotProps:_}=n,C=(0,EA.Z)(n,K9),{value:M,handleValueChange:k,timezone:T}=XI({name:"MonthCalendar",timezone:b,value:r,defaultValue:o,referenceDate:a,onChange:d,valueManager:X9}),D=qm(T),I=(0,da.V)(),A=qf(),P=eV.useMemo(()=>X9.getInitialReferenceValue({value:M,utils:A,props:n,timezone:T,referenceDate:a,granularity:XA.month}),[]),O=K7(n),R=eV.useMemo(()=>A.getMonth(D),[A,D]),E=eV.useMemo(()=>null!=M?A.getMonth(M):null,[M,A]),[L,B]=eV.useState(()=>E||A.getMonth(P)),[N,F]=(0,YQ.Z)({name:"MonthCalendar",state:"hasFocus",controlled:v,default:g??!1}),z=(0,YK.Z)(e=>{F(e),y&&y(e)}),V=eV.useCallback(e=>{let t=A.startOfMonth(u&&A.isAfter(D,h)?D:h),n=A.startOfMonth(l&&A.isBefore(D,c)?D:c),i=A.startOfMonth(e);return!!(A.isBefore(i,t)||A.isAfter(i,n))||!!p&&p(i)},[l,u,c,h,D,p,A]),Z=(0,YK.Z)((e,t)=>{!f&&k(A.setMonth(M??P,t))}),j=(0,YK.Z)(e=>{!V(A.setMonth(M??P,e))&&(B(e),z(!0),m&&m(e))});eV.useEffect(()=>{B(e=>null!==E&&e!==E?E:e)},[E]);let H=(0,YK.Z)((e,t)=>{switch(e.key){case"ArrowUp":j((12+t-3)%12),e.preventDefault();break;case"ArrowDown":j((12+t+3)%12),e.preventDefault();break;case"ArrowLeft":j((12+t+(I?1:-1))%12),e.preventDefault();break;case"ArrowRight":j((12+t+(I?-1:1))%12),e.preventDefault()}}),W=(0,YK.Z)((e,t)=>{j(t)}),$=(0,YK.Z)((e,t)=>{L===t&&z(!1)});return(0,ez.jsx)(Qe,(0,EI.Z)({ref:t,className:(0,ej.Z)(O.root,i),ownerState:n,role:"radiogroup","aria-labelledby":w},C,{children:qb(A,M??P).map(e=>{let t=A.getMonth(e),n=A.format(e,"monthShort"),i=A.format(e,"month"),r=s||V(e);return(0,ez.jsx)(K8,{selected:t===E,value:t,onClick:Z,onKeyDown:H,autoFocus:N&&t===L,disabled:r,tabIndex:t!==L||r?-1:0,onFocus:W,onBlur:$,"aria-current":R===t?"date":void 0,"aria-label":i,monthsPerRow:x,slots:S,slotProps:_,children:n},n)})}))});function Qn(e){return(0,eQ.ZP)("MuiPickersYear",e)}let Qi=(0,eK.Z)("MuiPickersYear",["root","yearButton","selected","disabled"]),Qr=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Qo=e=>{let{disabled:t,selected:n,classes:i}=e;return(0,eH.Z)({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Qn,i)},Qa=(0,eU.ZP)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Qs=(0,eU.ZP)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Qi.disabled}`]:t.disabled},{[`&.${Qi.selected}`]:t.selected}]})(({theme:e})=>(0,EI.Z)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,eW.Fq)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Qi.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Qi.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Ql=eV.memo(function(e){let t=(0,qa.Z)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:i,children:r,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:h,onBlur:d,"aria-current":p,slots:f,slotProps:g}=t,m=(0,EA.Z)(t,Qr),v=eV.useRef(null),y=Qo(t);(0,h7.Z)(()=>{n&&v.current?.focus()},[n]);let x=f?.yearButton??Qs,b=(0,qP.Z)({elementType:x,externalSlotProps:g?.yearButton,additionalProps:{children:r,disabled:o,tabIndex:l,ref:v,type:"button",role:"radio","aria-current":p,"aria-checked":a,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>h(e,s),onBlur:e=>d(e,s)},ownerState:t,className:y.yearButton});return(0,ez.jsx)(Qa,(0,EI.Z)({className:(0,ej.Z)(y.root,i),ownerState:t},m,{children:(0,ez.jsx)(x,(0,EI.Z)({},b))}))});function Qu(e){return(0,eQ.ZP)("MuiYearCalendar",e)}(0,eK.Z)("MuiYearCalendar",["root"]);let Qc=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],Qh=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"]},Qu,t)},Qd=(0,eU.ZP)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),Qp=eV.forwardRef(function(e,t){let n=function(e,t){let n=qf(),i=qg(),r=(0,qa.Z)({props:e,name:t});return(0,EI.Z)({disablePast:!1,disableFuture:!1},r,{yearsPerRow:r.yearsPerRow??3,minDate:qx(n,r.minDate,i.minDate),maxDate:qx(n,r.maxDate,i.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:i,className:r,value:o,defaultValue:a,referenceDate:s,disabled:l,disableFuture:u,disablePast:c,maxDate:h,minDate:d,onChange:p,readOnly:f,shouldDisableYear:g,onYearFocus:m,hasFocus:v,onFocusedViewChange:y,yearsOrder:x="asc",yearsPerRow:b,timezone:w,gridLabelId:S,slots:_,slotProps:C}=n,M=(0,EA.Z)(n,Qc),{value:k,handleValueChange:T,timezone:D}=XI({name:"YearCalendar",timezone:w,value:o,defaultValue:a,referenceDate:s,onChange:p,valueManager:X9}),I=qm(D),A=(0,da.V)(),P=qf(),O=eV.useMemo(()=>X9.getInitialReferenceValue({value:k,utils:P,props:n,timezone:D,referenceDate:s,granularity:XA.year}),[]),R=Qh(n),E=eV.useMemo(()=>P.getYear(I),[P,I]),L=eV.useMemo(()=>null!=k?P.getYear(k):null,[k,P]),[B,N]=eV.useState(()=>L||P.getYear(O)),[F,z]=(0,YQ.Z)({name:"YearCalendar",state:"hasFocus",controlled:v,default:i??!1}),V=(0,YK.Z)(e=>{z(e),y&&y(e)}),Z=eV.useCallback(e=>!!(c&&P.isBeforeYear(e,I)||u&&P.isAfterYear(e,I)||d&&P.isBeforeYear(e,d)||h&&P.isAfterYear(e,h))||!!g&&g(P.startOfYear(e)),[u,c,h,d,I,g,P]),j=(0,YK.Z)((e,t)=>{!f&&T(P.setYear(k??O,t))}),H=(0,YK.Z)(e=>{Z(P.setYear(k??O,e))||(N(e),V(!0),m?.(e))});eV.useEffect(()=>{N(e=>null!==L&&e!==L?L:e)},[L]);let W="desc"!==x?+b:-1*b,$=A&&"asc"===x||!A&&"desc"===x?-1:1,G=(0,YK.Z)((e,t)=>{switch(e.key){case"ArrowUp":H(t-W),e.preventDefault();break;case"ArrowDown":H(t+W),e.preventDefault();break;case"ArrowLeft":H(t-$),e.preventDefault();break;case"ArrowRight":H(t+$),e.preventDefault()}}),U=(0,YK.Z)((e,t)=>{H(t)}),q=(0,YK.Z)((e,t)=>{B===t&&V(!1)}),Y=eV.useRef(null),X=(0,Kv.Z)(t,Y);eV.useEffect(()=>{if(i||null===Y.current)return;let e=Y.current.querySelector('[tabindex="0"]');if(!e)return;let t=e.offsetHeight,n=e.offsetTop,r=Y.current.clientHeight,o=Y.current.scrollTop;!(t>r)&&!(n<o)&&(Y.current.scrollTop=n+t-r/2-t/2)},[i]);let K=P.getYearRange([d,h]);return"desc"===x&&K.reverse(),(0,ez.jsx)(Qd,(0,EI.Z)({ref:X,className:(0,ej.Z)(R.root,r),ownerState:n,role:"radiogroup","aria-labelledby":S},M,{children:K.map(e=>{let t=P.getYear(e),n=l||Z(e);return(0,ez.jsx)(Ql,{selected:t===L,value:t,onClick:j,onKeyDown:G,autoFocus:F&&t===B,disabled:n,tabIndex:t!==B||n?-1:0,onFocus:U,onBlur:q,"aria-current":E===t?"date":void 0,yearsPerRow:b,slots:_,slotProps:C,children:P.format(e,"year")},P.format(e,"year"))})}))}),Qf=e=>(0,eQ.ZP)("MuiPickersCalendarHeader",e),Qg=(0,eK.Z)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Qm=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Qv=["ownerState"],Qy=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Qf,t)},Qx=(0,eU.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Qb=(0,eU.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,EI.Z)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Qw=(0,eU.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),QS=(0,eU.ZP)(td.Z,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Qg.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Q_=(0,eU.ZP)(q2,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),QC=eV.forwardRef(function(e,t){let n=q9(),i=qf(),r=(0,qa.Z)({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:a,currentMonth:s,disabled:l,disableFuture:u,disablePast:c,maxDate:h,minDate:d,onMonthChange:p,onViewChange:f,view:g,reduceAnimations:m,views:v,labelId:y,className:x,timezone:b,format:w=`${i.formats.month} ${i.formats.year}`}=r,S=(0,EA.Z)(r,Qm),_=Qy(r),C=o?.switchViewButton??QS,M=(0,qP.Z)({elementType:C,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(g)},ownerState:r,className:_.switchViewButton}),k=o?.switchViewIcon??Q_,T=(0,qP.Z)({elementType:k,externalSlotProps:a?.switchViewIcon,ownerState:r,className:_.switchViewIcon}),D=(0,EA.Z)(T,Qv),I=function(e,{disableFuture:t,maxDate:n,timezone:i}){let r=qf();return eV.useMemo(()=>{let o=r.date(void 0,i),a=r.startOfMonth(t&&r.isBefore(o,n)?o:n);return!r.isAfter(a,e)},[t,n,e,r,i])}(s,{disableFuture:u,maxDate:h,timezone:b}),A=function(e,{disablePast:t,minDate:n,timezone:i}){let r=qf();return eV.useMemo(()=>{let o=r.date(void 0,i),a=r.startOfMonth(t&&r.isAfter(o,n)?o:n);return!r.isBefore(a,e)},[t,n,e,r,i])}(s,{disablePast:c,minDate:d,timezone:b});if(1===v.length&&"year"===v[0])return null;let P=i.formatByString(s,w);return(0,ez.jsxs)(Qx,(0,EI.Z)({},S,{ownerState:r,className:(0,ej.Z)(_.root,x),ref:t,children:[(0,ez.jsxs)(Qb,{role:"presentation",onClick:()=>{if(1!==v.length&&f&&!l){if(2===v.length)f(v.find(e=>e!==g)||v[0]);else{let e=+(0===v.indexOf(g));f(v[e])}}},ownerState:r,"aria-live":"polite",className:_.labelContainer,children:[(0,ez.jsx)(Km,{reduceAnimations:m,transKey:P,children:(0,ez.jsx)(Qw,{id:y,ownerState:r,className:_.label,children:P})}),v.length>1&&!l&&(0,ez.jsx)(C,(0,EI.Z)({},M,{children:(0,ez.jsx)(k,(0,EI.Z)({},D))}))]}),(0,ez.jsx)(cM.Z,{in:"day"===g,appear:!m,enter:!m,children:(0,ez.jsx)(YX,{slots:o,slotProps:a,onGoToPrevious:()=>p(i.addMonths(s,-1),"right"),isPreviousDisabled:A,previousLabel:n.previousMonth,onGoToNext:()=>p(i.addMonths(s,1),"left"),isNextDisabled:I,nextLabel:n.nextMonth})})]}))}),QM="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Qk=QM&&QM[1]?parseInt(QM[1],10):null,QT=QM&&QM[2]?parseInt(QM[2],10):null,QD=Qk&&Qk<10||QT&&QT<13||!1,QI=()=>dr("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||QD,QA=e=>(0,eQ.ZP)("MuiDateCalendar",e);(0,eK.Z)("MuiDateCalendar",["root","viewTransitionContainer"]);let QP=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],QO=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},QA,t)},QR=(0,eU.ZP)(Y0,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),QE=(0,eU.ZP)(Km,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),QL=eV.forwardRef(function(e,t){let n=qf(),i=(0,c_.Z)(),r=function(e,t){let n=qf(),i=qg(),r=QI(),o=(0,qa.Z)({props:e,name:t});return(0,EI.Z)({},o,{loading:o.loading??!1,disablePast:o.disablePast??!1,disableFuture:o.disableFuture??!1,openTo:o.openTo??"day",views:o.views??["year","day"],reduceAnimations:o.reduceAnimations??r,renderLoading:o.renderLoading??(()=>(0,ez.jsx)("span",{children:"..."})),minDate:qx(n,o.minDate,i.minDate),maxDate:qx(n,o.maxDate,i.maxDate)})}(e,"MuiDateCalendar"),{autoFocus:o,onViewChange:a,value:s,defaultValue:l,referenceDate:u,disableFuture:c,disablePast:h,onChange:d,onYearChange:p,onMonthChange:f,reduceAnimations:g,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:y,view:x,views:b,openTo:w,className:S,disabled:_,readOnly:C,minDate:M,maxDate:k,disableHighlightToday:T,focusedView:D,onFocusedViewChange:I,showDaysOutsideCurrentMonth:A,fixedWeekNumber:P,dayOfWeekFormatter:O,slots:R,slotProps:E,loading:L,renderLoading:B,displayWeekNumber:N,yearsOrder:F,yearsPerRow:z,monthsPerRow:V,timezone:Z}=r,j=(0,EA.Z)(r,QP),{value:H,handleValueChange:W,timezone:$}=XI({name:"DateCalendar",timezone:Z,value:s,defaultValue:l,referenceDate:u,onChange:d,valueManager:X9}),{view:G,setView:U,focusedView:q,setFocusedView:Y,goToNextView:X,setValueAndGoToNextView:K}=YJ({view:x,views:b,openTo:w,onChange:W,onViewChange:a,autoFocus:o,focusedView:D,onFocusedViewChange:I}),{referenceDate:Q,calendarState:J,changeFocusedDay:ee,changeMonth:et,handleChangeMonth:en,isDateDisabled:ei,onMonthSwitchingAnimationEnd:er}=Kh({value:H,referenceDate:u,reduceAnimations:g,onMonthChange:f,minDate:M,maxDate:k,shouldDisableDate:m,disablePast:h,disableFuture:c,timezone:$}),eo=_&&H||M,ea=_&&H||k,es=`${i}-grid-label`,el=null!==q,eu=R?.calendarHeader??QC,ec=(0,qP.Z)({elementType:eu,externalSlotProps:E?.calendarHeader,additionalProps:{views:b,view:G,currentMonth:J.currentMonth,onViewChange:U,onMonthChange:(e,t)=>en({newMonth:e,direction:t}),minDate:eo,maxDate:ea,disabled:_,disablePast:h,disableFuture:c,reduceAnimations:g,timezone:$,labelId:es},ownerState:r}),eh=(0,YK.Z)(e=>{let t=n.startOfMonth(e),i=n.endOfMonth(e),r=ei(e)?qy({utils:n,date:e,minDate:n.isBefore(M,t)?t:M,maxDate:n.isAfter(k,i)?i:k,disablePast:h,disableFuture:c,isDateDisabled:ei,timezone:$}):e;r?(K(r,"finish"),f?.(t)):(X(),et(t)),ee(r,!0)}),ed=(0,YK.Z)(e=>{let t=n.startOfYear(e),i=n.endOfYear(e),r=ei(e)?qy({utils:n,date:e,minDate:n.isBefore(M,t)?t:M,maxDate:n.isAfter(k,i)?i:k,disablePast:h,disableFuture:c,isDateDisabled:ei,timezone:$}):e;r?(K(r,"finish"),p?.(r)):(X(),et(t)),ee(r,!0)}),ep=(0,YK.Z)(e=>e?W(qv(n,e,H??Q),"finish",G):W(e,"finish",G));eV.useEffect(()=>{null!=H&&n.isValid(H)&&et(H)},[H]);let ef=QO(r),eg={disablePast:h,disableFuture:c,maxDate:k,minDate:M},em={disableHighlightToday:T,readOnly:C,disabled:_,timezone:$,gridLabelId:es,slots:R,slotProps:E},ev=eV.useRef(G);eV.useEffect(()=>{ev.current!==G&&(q===ev.current&&Y(G,!0),ev.current=G)},[q,Y,G]);let ey=eV.useMemo(()=>[H],[H]);return(0,ez.jsxs)(QR,(0,EI.Z)({ref:t,className:(0,ej.Z)(ef.root,S),ownerState:r},j,{children:[(0,ez.jsx)(eu,(0,EI.Z)({},ec,{slots:R,slotProps:E})),(0,ez.jsx)(QE,{reduceAnimations:g,className:ef.viewTransitionContainer,transKey:G,ownerState:r,children:(0,ez.jsxs)("div",{children:["year"===G&&(0,ez.jsx)(Qp,(0,EI.Z)({},eg,em,{value:H,onChange:ed,shouldDisableYear:y,hasFocus:el,onFocusedViewChange:e=>Y("year",e),yearsOrder:F,yearsPerRow:z,referenceDate:Q})),"month"===G&&(0,ez.jsx)(Qt,(0,EI.Z)({},eg,em,{hasFocus:el,className:S,value:H,onChange:eh,shouldDisableMonth:v,onFocusedViewChange:e=>Y("month",e),monthsPerRow:V,referenceDate:Q})),"day"===G&&(0,ez.jsx)(KJ,(0,EI.Z)({},J,eg,em,{onMonthSwitchingAnimationEnd:er,onFocusedDayChange:ee,reduceAnimations:g,selectedDays:ey,onSelectedDaysChange:ep,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:y,hasFocus:el,onFocusedViewChange:e=>Y("day",e),showDaysOutsideCurrentMonth:A,fixedWeekNumber:P,dayOfWeekFormatter:O,displayWeekNumber:N,loading:L,renderLoading:B}))]})})]}))}),QB=({view:e,onViewChange:t,views:n,focusedView:i,onFocusedViewChange:r,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:S,yearsPerRow:_,slots:C,slotProps:M,loading:k,renderLoading:T,disableHighlightToday:D,readOnly:I,disabled:A,showDaysOutsideCurrentMonth:P,dayOfWeekFormatter:O,sx:R,autoFocus:E,fixedWeekNumber:L,displayWeekNumber:B,timezone:N})=>(0,ez.jsx)(QL,{view:e,onViewChange:t,views:n.filter(qC),focusedView:i&&qC(i)?i:null,onFocusedViewChange:r,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minDate:p,maxDate:f,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:x,monthsPerRow:b,onYearChange:w,yearsOrder:S,yearsPerRow:_,slots:C,slotProps:M,loading:k,renderLoading:T,disableHighlightToday:D,readOnly:I,disabled:A,showDaysOutsideCurrentMonth:P,dayOfWeekFormatter:O,sx:R,autoFocus:E,fixedWeekNumber:L,displayWeekNumber:B,timezone:N}),QN=({open:e,onOpen:t,onClose:n})=>{let i=eV.useRef("boolean"==typeof e).current,[r,o]=eV.useState(!1);return eV.useEffect(()=>{if(i){if("boolean"!=typeof e)throw Error("You must not mix controlling and uncontrolled mode for `open` prop");o(e)}},[i,e]),{isOpen:r,setIsOpen:eV.useCallback(e=>{i||o(e),e&&t&&t(),!e&&n&&n()},[i,t,n])}};function QF(e){let{props:t,validator:n,value:i,timezone:r,onError:o}=e,a=qp(),s=eV.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:i,timezone:r,props:t}),u=n.valueManager.hasError(l);return eV.useEffect(()=>{o&&!n.valueManager.isSameError(l,s.current)&&o(l,i),s.current=l},[n,o,l,i]),{validationError:l,hasValidationError:u,getValidationErrorForNewValue:(0,YK.Z)(e=>n({adapter:a,value:e,timezone:r,props:t}))}}let Qz=e=>{let{action:t,hasChanged:n,dateState:i,isControlled:r}=e,o=!r&&!i.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!!(o&&["accept","today","clear"].includes(t.pickerAction))||n(i.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!o||n(i.lastPublishedValue)))},QV=e=>{let{action:t,hasChanged:n,dateState:i,isControlled:r,closeOnSelect:o}=e,a=!r&&!i.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!!(a&&["accept","today","clear"].includes(t.pickerAction))||n(i.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&o?!!a||n(i.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(i.lastCommittedValue)},QZ=e=>{let{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)},Qj=({props:e,valueManager:t,valueType:n,wrapperVariant:i,validator:r})=>{let{onAccept:o,onChange:a,value:s,defaultValue:l,closeOnSelect:u="desktop"===i,timezone:c,referenceDate:h}=e,{current:d}=eV.useRef(l),{current:p}=eV.useRef(void 0!==s),[f,g]=eV.useState(c),m=qf(),v=qp(),{isOpen:y,setIsOpen:x}=QN(e),{timezone:b,value:w,handleValueChange:S}=XD({timezone:c,value:s,defaultValue:d,referenceDate:h,onChange:a,valueManager:t}),[_,C]=eV.useState(()=>{let e;return{draft:e=void 0!==w?w:void 0!==d?d:t.emptyValue,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),M=t.getTimezone(m,_.draft);f!==c&&(g(c),c&&M&&c!==M&&C(e=>(0,EI.Z)({},e,{draft:t.setTimezone(m,c,e.draft)})));let{getValidationErrorForNewValue:k}=QF({props:e,validator:r,timezone:b,value:_.draft,onError:e.onError}),T=(0,YK.Z)(e=>{let n={action:e,dateState:_,hasChanged:n=>!t.areValuesEqual(m,e.value,n),isControlled:p,closeOnSelect:u},i=Qz(n),r=QV(n),a=QZ(n);C(t=>(0,EI.Z)({},t,{draft:e.value,lastPublishedValue:i?e.value:t.lastPublishedValue,lastCommittedValue:r?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let s=null,l=()=>(s||(s={validationError:"setValueFromField"===e.name?e.context.validationError:k(e.value)},"setValueFromShortcut"!==e.name||(s.shortcut=e.shortcut)),s);i&&S(e.value,l()),r&&o&&o(e.value,l()),a&&x(!1)});if(_.lastControlledValue!==s){let e=t.areValuesEqual(m,_.draft,w);C(t=>(0,EI.Z)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:w,lastPublishedValue:w,draft:w,hasBeenModifiedSinceMount:!0}))}let D=(0,YK.Z)(()=>{T({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),I=(0,YK.Z)(()=>{T({value:_.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),A=(0,YK.Z)(()=>{T({value:_.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),P=(0,YK.Z)(()=>{T({value:_.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),O=(0,YK.Z)(()=>{T({value:t.getTodayValue(m,b,n),name:"setValueFromAction",pickerAction:"today"})}),R=(0,YK.Z)(e=>{e.preventDefault(),x(!0)}),E=(0,YK.Z)(e=>{e?.preventDefault(),x(!1)}),L=(0,YK.Z)((e,t="partial")=>T({name:"setValueFromView",value:e,selectionState:t})),B=(0,YK.Z)((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n})),N=(0,YK.Z)((e,t)=>T({name:"setValueFromField",value:e,context:t})),F={onClear:D,onAccept:I,onDismiss:A,onCancel:P,onSetToday:O,onOpen:R,onClose:E},z={value:_.draft,onChange:N},V=eV.useMemo(()=>t.cleanValue(m,_.draft),[m,t,_.draft]),Z=(0,EI.Z)({},F,{value:V,onChange:L,onSelectShortcut:B,isValid:n=>{let i=r({adapter:v,value:n,timezone:b,props:e});return!t.hasError(i)}}),j=eV.useMemo(()=>({onOpen:R,onClose:E,open:y}),[y,E,R]);return{open:y,fieldProps:z,viewProps:{value:V,onChange:L,onClose:E,open:y},layoutProps:Z,actions:F,contextValue:j}},QH=["className","sx"],QW=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:i,rendererInterceptor:r,fieldRef:o})=>{let{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:h,onViewChange:d,viewRenderers:p,timezone:f}=e,g=(0,EA.Z)(e,QH),{view:m,setView:v,defaultView:y,focusedView:x,setFocusedView:b,setValueAndGoToNextView:w}=YJ({view:u,views:c,openTo:h,onChange:a,onViewChange:d,autoFocus:i}),{hasUIView:S,viewModeLookup:_}=eV.useMemo(()=>c.reduce((e,t)=>{let n;return n=null!=p[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[p,c]),C=eV.useMemo(()=>c.reduce((e,t)=>null!=p[t]&&YM(t)?e+1:e,0),[p,c]),M=_[m],k=(0,YK.Z)(()=>"UI"===M),[T,D]=eV.useState("UI"===M?m:null);return T!==m&&"UI"===_[m]&&D(m),(0,h7.Z)(()=>{"field"===M&&s&&(l(),setTimeout(()=>{o?.current?.setSelectedSections(m),o?.current?.focusField(m)}))},[m]),(0,h7.Z)(()=>{if(!s)return;let e=m;"field"===M&&null!=T&&(e=T),e!==y&&"UI"===_[e]&&"UI"===_[y]&&(e=y),e!==m&&v(e),b(e,!0)},[s]),{hasUIView:S,shouldRestoreFocus:k,layoutProps:{views:c,view:T,onViewChange:v},renderCurrentView:()=>{if(null==T)return null;let e=p[T];if(null==e)return null;let i=(0,EI.Z)({},g,n,t,{views:c,timezone:f,onChange:w,view:T,onViewChange:v,focusedView:x,onFocusedViewChange:b,showViewSwitcher:C>1,timeViewsCount:C});return r?r(p,T,i):e(i)}}},Q$=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Q$(t.shadowRoot):t:null};function QG(){return"undefined"==typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}let QU=(e,t)=>{var n;let[i,r]=eV.useState(QG);return(0,h7.Z)(()=>{let e=()=>{r(QG())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),(Array.isArray(n=["hours","minutes","seconds"])?!n.every(t=>-1!==e.indexOf(t)):-1===e.indexOf(n))&&"landscape"===(t||i)},Qq=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:i})=>{let{orientation:r}=e,o=QU(n.views,r),a=(0,da.V)();return{layoutProps:(0,EI.Z)({},n,t,{isLandscape:o,isRtl:a,wrapperVariant:i,disabled:e.disabled,readOnly:e.readOnly})}},QY=({props:e,valueManager:t,valueType:n,wrapperVariant:i,additionalViewProps:r,validator:o,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{let u=Qj({props:e,valueManager:t,valueType:n,wrapperVariant:i,validator:o}),c=QW({props:e,additionalViewProps:r,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),h=Qq({props:e,wrapperVariant:i,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),d=function(e){let{props:t,pickerValueResponse:n}=e;return eV.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:e,pickerValueResponse:u});return{open:u.open,actions:u.actions,fieldProps:u.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:h.layoutProps,contextValue:u.contextValue,ownerState:d}};function QX(e){return(0,eQ.ZP)("MuiPickersLayout",e)}let QK=(0,eK.Z)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),QQ=["onAccept","onClear","onCancel","onSetToday","actions"];function QJ(e){let{onAccept:t,onClear:n,onCancel:i,onSetToday:r,actions:o}=e,a=(0,EA.Z)(e,QQ),s=q9();if(null==o||0===o.length)return null;let l=o?.map(e=>{switch(e){case"clear":return ez.jsx(e8.Z,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return ez.jsx(e8.Z,{onClick:i,children:s.cancelButtonLabel},e);case"accept":return ez.jsx(e8.Z,{onClick:t,children:s.okButtonLabel},e);case"today":return ez.jsx(e8.Z,{onClick:r,children:s.todayButtonLabel},e);default:return null}});return(0,ez.jsx)(cz,(0,EI.Z)({},a,{children:l}))}var Q0=n(1852),Q1=n(8653),Q2=n(777);function Q5(e){return(0,eQ.ZP)("MuiListItem",e)}function Q3(e){return(0,eQ.ZP)("MuiListItemSecondaryAction",e)}(0,eK.Z)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]),(0,eK.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);let Q4=e=>{let{disableGutters:t,classes:n}=e;return(0,eH.Z)({root:["root",t&&"disableGutters"]},Q3,n)},Q8=(0,eU.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),Q6=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiListItemSecondaryAction"}),{className:i,...r}=n,o=eV.useContext(ll.Z),a={...n,disableGutters:o.disableGutters},s=Q4(a);return(0,ez.jsx)(Q8,{className:(0,ej.Z)(s.root,i),ownerState:a,ref:t,...r})});Q6.muiName="ListItemSecondaryAction";let Q9=e=>{let{alignItems:t,classes:n,dense:i,disableGutters:r,disablePadding:o,divider:a,hasSecondaryAction:s}=e;return(0,eH.Z)({root:["root",i&&"dense",!r&&"gutters",!o&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Q5,n)},Q7=(0,eU.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,eq.Z)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${lc.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),Je=(0,eU.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Jt=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiListItem"}),{alignItems:i="center",children:r,className:o,component:a,components:s={},componentsProps:l={},ContainerComponent:u="li",ContainerProps:{className:c,...h}={},dense:d=!1,disableGutters:p=!1,disablePadding:f=!1,divider:g=!1,secondaryAction:m,slotProps:v={},slots:y={},...x}=n,b=eV.useContext(ll.Z),w=eV.useMemo(()=>({dense:d||b.dense||!1,alignItems:i,disableGutters:p}),[i,b.dense,d,p]),S=eV.useRef(null),_=eV.Children.toArray(r),C=_.length&&(0,Q2.Z)(_[_.length-1],["ListItemSecondaryAction"]),M={...n,alignItems:i,dense:w.dense,disableGutters:p,disablePadding:f,divider:g,hasSecondaryAction:C},k=Q9(M),T=(0,ls.Z)(S,t),D=y.root||s.Root||Q7,I=v.root||l.root||{},A={className:(0,ej.Z)(k.root,I.className,o),...x},P=a||"li";return C?(P=A.component||a?P:"div","li"===u&&("li"===P?P="div":"li"===A.component&&(A.component="div")),(0,ez.jsx)(ll.Z.Provider,{value:w,children:(0,ez.jsxs)(Je,{as:u,className:(0,ej.Z)(k.container,c),ref:T,ownerState:M,...h,children:[(0,ez.jsx)(D,{...I,...!(0,Q1.Z)(D)&&{as:P,ownerState:{...M,...I.ownerState}},...A,children:_}),_.pop()]})})):(0,ez.jsx)(ll.Z.Provider,{value:w,children:(0,ez.jsxs)(D,{...I,as:P,ref:T,...!(0,Q1.Z)(D)&&{ownerState:{...M,...I.ownerState}},...A,children:[_,m&&(0,ez.jsx)(Q6,{children:m})]})})});var Jn=n(2889);let Ji=["items","changeImportance","isLandscape","onChange","isValid"],Jr=["getValue"];function Jo(e){let{items:t,changeImportance:n="accept",onChange:i,isValid:r}=e,o=(0,EA.Z)(e,Ji);if(null==t||0===t.length)return null;let a=t.map(e=>{let{getValue:t}=e,o=(0,EA.Z)(e,Jr),a=t({isValid:r});return(0,EI.Z)({},o,{label:o.label,onClick:()=>{i(a,n,o)},disabled:!r(a)})});return(0,ez.jsx)(Q0.Z,(0,EI.Z)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(e=>(0,ez.jsx)(Jt,{children:(0,ez.jsx)(Jn.Z,(0,EI.Z)({},e))},e.id??e.label))}))}let Ja=e=>{let{classes:t,isLandscape:n}=e;return(0,eH.Z)({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},QX,t)},Js=e=>{let{wrapperVariant:t,onAccept:n,onClear:i,onCancel:r,onSetToday:o,view:a,views:s,onViewChange:l,value:u,onChange:c,onSelectShortcut:h,isValid:d,isLandscape:p,disabled:f,readOnly:g,children:m,slots:v,slotProps:y}=e,x=Ja(e),b=v?.actionBar??QJ,w=(0,qP.Z)({elementType:b,externalSlotProps:y?.actionBar,additionalProps:{onAccept:n,onClear:i,onCancel:r,onSetToday:o,actions:"desktop"===t?[]:["cancel","accept"]},className:x.actionBar,ownerState:(0,EI.Z)({},e,{wrapperVariant:t})}),S=(0,ez.jsx)(b,(0,EI.Z)({},w)),_=v?.toolbar,C=(0,qP.Z)({elementType:_,externalSlotProps:y?.toolbar,additionalProps:{isLandscape:p,onChange:c,value:u,view:a,onViewChange:l,views:s,disabled:f,readOnly:g},className:x.toolbar,ownerState:(0,EI.Z)({},e,{wrapperVariant:t})}),M=null!==C.view&&_?(0,ez.jsx)(_,(0,EI.Z)({},C)):null,k=v?.tabs,T=a&&k?(0,ez.jsx)(k,(0,EI.Z)({view:a,onViewChange:l,className:x.tabs},y?.tabs)):null,D=v?.shortcuts??Jo,I=(0,qP.Z)({elementType:D,externalSlotProps:y?.shortcuts,additionalProps:{isValid:d,isLandscape:p,onChange:h},className:x.shortcuts,ownerState:{isValid:d,isLandscape:p,onChange:h,wrapperVariant:t}});return{toolbar:M,content:m,tabs:T,actionBar:S,shortcuts:a&&D?(0,ez.jsx)(D,(0,EI.Z)({},I)):null}},Jl=e=>{let{isLandscape:t,classes:n}=e;return(0,eH.Z)({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},QX,n)},Ju=(0,eU.ZP)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${QK.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${QK.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${QK.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${QK.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${QK.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${QK.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${QK.shortcuts}`]:{gridColumn:3}}}]}),Jc=(0,eU.ZP)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Jh=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersLayout"}),{toolbar:i,content:r,tabs:o,actionBar:a,shortcuts:s}=Js(n),{sx:l,className:u,isLandscape:c,wrapperVariant:h}=n,d=Jl(n);return(0,ez.jsxs)(Ju,{ref:t,sx:l,className:(0,ej.Z)(d.root,u),ownerState:n,children:[c?s:i,c?i:s,(0,ez.jsx)(Jc,{className:d.contentWrapper,children:"desktop"===h?(0,ez.jsxs)(eV.Fragment,{children:[r,o]}):(0,ez.jsxs)(eV.Fragment,{children:[o,r]})}),a]})}),Jd=["props","ref"],Jp=(0,eU.ZP)(Jh)(({theme:e})=>({overflow:"hidden",minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),Jf=e=>{let{props:t,ref:n}=e,i=(0,EA.Z)(e,Jd),{localeText:r,slots:o,slotProps:a,className:s,sx:l,displayStaticWrapperAs:u,autoFocus:c}=t,{layoutProps:h,renderCurrentView:d}=QY((0,EI.Z)({},i,{props:t,autoFocusView:c??!1,additionalViewProps:{},wrapperVariant:u})),p=o?.layout??Jp;return{renderPicker:()=>(0,ez.jsx)(qu,{localeText:r,children:(0,ez.jsx)(p,(0,EI.Z)({},h,a?.layout,{slots:o,slotProps:a,sx:[...Array.isArray(l)?l:[l],...Array.isArray(a?.layout?.sx)?a.layout.sx:[a?.layout?.sx]],className:(0,ej.Z)(s,a?.layout?.className),ref:n,children:d()}))})}},Jg=({adapter:e,value:t,timezone:n,props:i})=>{if(null===t)return null;let{minTime:r,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=i,h=e.utils.date(void 0,n),d=YA(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(r&&d(r,t)):return"minTime";case!!(o&&d(t,o)):return"maxTime";case!!(c&&e.utils.isAfter(t,h)):return"disableFuture";case!!(u&&e.utils.isBefore(t,h)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}};Jg.valueManager=X9;let Jm=({adapter:e,value:t,timezone:n,props:i})=>{let r=Kl({adapter:e,value:t,timezone:n,props:i});return null!==r?r:Jg({adapter:e,value:t,timezone:n,props:i})};Jm.valueManager=X9;let Jv=eV.forwardRef(function(e,t){let n=function(e,t){let n=qf(),i=qg(),r=(0,qa.Z)({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),a=eV.useMemo(()=>r.localeText?.toolbarTitle==null?r.localeText:(0,EI.Z)({},r.localeText,{dateTimePickerToolbarTitle:r.localeText.toolbarTitle}),[r.localeText]);return(0,EI.Z)({},r,YZ({views:r.views,openTo:r.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:o,localeText:a,orientation:r.orientation??"portrait",disableIgnoringDatePartForTimeValidation:r.disableIgnoringDatePartForTimeValidation??!!(r.minDateTime||r.maxDateTime||r.disablePast||r.disableFuture),disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,minDate:qx(n,r.minDateTime??r.minDate,i.minDate),maxDate:qx(n,r.maxDateTime??r.maxDate,i.maxDate),minTime:r.minDateTime??r.minTime,maxTime:r.maxDateTime??r.maxTime,slots:(0,EI.Z)({toolbar:YV,tabs:Yr},r.slots),slotProps:(0,EI.Z)({},r.slotProps,{toolbar:(0,EI.Z)({ampm:o},r.slotProps?.toolbar)})})}(e,"MuiStaticDateTimePicker"),i=n.displayStaticWrapperAs??"mobile",r=n.ampmInClock??"desktop"===i,o=(0,EI.Z)({day:QB,month:QB,year:QB,hours:Ks,minutes:Ks,seconds:Ks},n.viewRenderers),{renderPicker:a}=Jf({props:(0,EI.Z)({},n,{viewRenderers:o,displayStaticWrapperAs:i,ampmInClock:r,yearsPerRow:n.yearsPerRow??("mobile"===i?3:4),slotProps:(0,EI.Z)({},n.slotProps,{tabs:(0,EI.Z)({hidden:"desktop"===i},n.slotProps?.tabs),toolbar:(0,EI.Z)({hidden:"desktop"===i,ampmInClock:r},n.slotProps?.toolbar)})}),valueManager:X9,valueType:"date-time",validator:Jm,ref:t});return a()});Jv.propTypes={ampm:qh().bool,ampmInClock:qh().bool,autoFocus:qh().bool,className:qh().string,dayOfWeekFormatter:qh().func,defaultValue:qh().object,disabled:qh().bool,disableFuture:qh().bool,disableHighlightToday:qh().bool,disableIgnoringDatePartForTimeValidation:qh().bool,disablePast:qh().bool,displayStaticWrapperAs:qh().oneOf(["desktop","mobile"]),displayWeekNumber:qh().bool,fixedWeekNumber:qh().number,loading:qh().bool,localeText:qh().object,maxDate:qh().object,maxDateTime:qh().object,maxTime:qh().object,minDate:qh().object,minDateTime:qh().object,minTime:qh().object,minutesStep:qh().number,monthsPerRow:qh().oneOf([3,4]),onAccept:qh().func,onChange:qh().func,onClose:qh().func,onError:qh().func,onMonthChange:qh().func,onViewChange:qh().func,onYearChange:qh().func,openTo:qh().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:qh().oneOf(["landscape","portrait"]),readOnly:qh().bool,reduceAnimations:qh().bool,referenceDate:qh().object,renderLoading:qh().func,shouldDisableDate:qh().func,shouldDisableMonth:qh().func,shouldDisableTime:qh().func,shouldDisableYear:qh().func,showDaysOutsideCurrentMonth:qh().bool,slotProps:qh().object,slots:qh().object,sx:qh().oneOfType([qh().arrayOf(qh().oneOfType([qh().func,qh().object,qh().bool])),qh().func,qh().object]),timezone:qh().string,value:qh().object,view:qh().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:qh().shape({day:qh().func,hours:qh().func,minutes:qh().func,month:qh().func,seconds:qh().func,year:qh().func}),views:qh().arrayOf(qh().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:qh().oneOf(["asc","desc"]),yearsPerRow:qh().oneOf([3,4])};let Jy=({utils:e,format:t})=>{let n=10,i=t,r=e.expandFormat(t);for(;r!==i;)if(i=r,r=e.expandFormat(i),(n-=1)<0)throw Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return r},Jx=({utils:e,expandedFormat:t})=>{let n=[],{start:i,end:r}=e.escapedCharacters,o=RegExp(`(\\${i}[^\\${r}]*\\${r})+`,"g"),a=null;for(;a=o.exec(t);)n.push({start:a.index,end:o.lastIndex-1});return n},Jb=(e,t,n,i)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),i).length,format:i});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:i});case"day":return t.fieldDayPlaceholder({format:i});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:i});case"hours":return t.fieldHoursPlaceholder({format:i});case"minutes":return t.fieldMinutesPlaceholder({format:i});case"seconds":return t.fieldSecondsPlaceholder({format:i});case"meridiem":return t.fieldMeridiemPlaceholder({format:i});default:return i}},Jw=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:i,localizedDigits:r,now:o,token:a,startSeparator:s})=>{if(""===a)throw Error("MUI X: Should not call `commitToken` with an empty token");let l=XE(e,a),u=XY(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,h=null!=t&&e.isValid(t),d=h?e.formatByString(t,a):"",p=null;if(c){if(u)p=""===d?e.formatByString(o,a).length:d.length;else{if(null==l.maxLength)throw Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,h&&(d=XZ(XH(XV(d,r),p),r))}}return(0,EI.Z)({},l,{format:a,maxLength:p,value:d,placeholder:Jb(e,i,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},JS=e=>{let{utils:t,expandedFormat:n,escapedParts:i}=e,r=t.date(void 0),o=[],a="",s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,u=RegExp(`^(${s.join("|")})*$`),c=RegExp(`^(${s.join("|")})`),h=e=>i.find(t=>t.start<=e&&t.end>=e),d=0;for(;d<n.length;){let t=h(d),i=null!=t,s=l.exec(n.slice(d))?.[1];if(!i&&null!=s&&u.test(s)){let t=s;for(;t.length>0;){let n=c.exec(t)[1];t=t.slice(n.length),o.push(Jw((0,EI.Z)({},e,{now:r,token:n,startSeparator:a}))),a=""}d+=s.length}else{let e=n[d];i&&t?.start===d||t?.end===d||(0===o.length?a+=e:o[o.length-1].endSeparator+=e),d+=1}}return 0===o.length&&a.length>0&&o.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),o},J_=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let i=n=>{let i=n;return e&&null!==i&&i.includes(" ")&&(i=`\u2069${i}\u2066`),"spacious"===t&&["/",".","-"].includes(i)&&(i=` ${i} `),i};return n.startSeparator=i(n.startSeparator),n.endSeparator=i(n.endSeparator),n}),JC=e=>{let t=Jy(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));let n=Jx((0,EI.Z)({},e,{expandedFormat:t})),i=JS((0,EI.Z)({},e,{expandedFormat:t,escapedParts:n}));return J_((0,EI.Z)({},e,{sections:i}))},JM=e=>{let t=qf(),n=q9(),i=qp(),r=(0,da.V)(),{valueManager:o,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:h,referenceDate:d,onChange:p,format:f,formatDensity:g="dense",selectedSections:m,onSelectedSectionsChange:v,shouldRespectLeadingZeros:y=!1,timezone:x,enableAccessibleFieldDOMStructure:b=!1}}=e,{timezone:w,value:S,handleValueChange:_}=XD({timezone:x,value:c,defaultValue:h,referenceDate:d,onChange:p,valueManager:o}),C=eV.useMemo(()=>Xz(t),[t]),M=eV.useMemo(()=>XK(t,C,w),[t,C,w]),k=eV.useCallback((e,i=null)=>a.getSectionsFromValue(t,e,i,e=>JC({utils:t,localeText:n,localizedDigits:C,format:f,date:e,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:r})),[a,f,n,C,r,y,t,g,b]),[T,D]=eV.useState(()=>{let e=k(S);XQ(e,s);let n={sections:e,value:S,referenceValue:o.emptyValue,tempValueStrAndroid:null},i=XP(e),r=o.getInitialReferenceValue({referenceDate:d,value:S,utils:t,props:u,granularity:i,timezone:w});return(0,EI.Z)({},n,{referenceValue:r})}),[I,A]=(0,YQ.Z)({controlled:m,default:null,name:"useField",state:"selectedSections"}),P=e=>{A(e),v?.(e)},O=eV.useMemo(()=>X3(I,T.sections),[I,T.sections]),R="all"===O?0:O,E=({value:e,referenceValue:n,sections:r})=>{if(D(t=>(0,EI.Z)({},t,{sections:r,value:e,referenceValue:n,tempValueStrAndroid:null})),o.areValuesEqual(t,T.value,e))return;let a={validationError:l({adapter:i,value:e,timezone:w,props:u})};_(e,a)},L=(e,t)=>{let n=[...T.sections];return n[e]=(0,EI.Z)({},n[e],{value:t,modified:!0}),n};return eV.useEffect(()=>{let e=k(T.value);XQ(e,s),D(t=>(0,EI.Z)({},t,{sections:e}))},[f,t.locale,r]),eV.useEffect(()=>{let e;o.areValuesEqual(t,T.value,S)&&o.getTimezone(t,T.value)===o.getTimezone(t,S)||D(e=>(0,EI.Z)({},e,{value:S,referenceValue:a.updateReferenceValue(t,S,e.referenceValue),sections:k(S)}))},[S]),{state:T,activeSectionIndex:R,parsedSelectedSections:O,setSelectedSections:P,clearValue:()=>{E({value:o.emptyValue,referenceValue:T.referenceValue,sections:k(o.emptyValue)})},clearActiveSection:()=>{if(null==R)return;let e=T.sections[R],n=a.getActiveDateManager(t,T,e),i=n.getSections(T.sections).filter(e=>""!==e.value).length===+(""!==e.value),r=L(R,""),o=i?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(o);E((0,EI.Z)({},s,{sections:r}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:i})=>{let r,o;i&&R<T.sections.length-1&&P(R+1);let s=a.getActiveDateManager(t,T,e),l=L(R,n),u=s.getSections(l),c=XX(t,u,C);if(null!=c&&t.isValid(c)){let e=X1(t,c,u,s.referenceDate,!0);r=s.getNewValuesFromNewActiveDate(e),o=!0}else r=s.getNewValuesFromNewActiveDate(c),o=(null!=c&&!t.isValid(c))!=(null!=s.date&&!t.isValid(s.date));return o?E((0,EI.Z)({},r,{sections:l})):D(e=>(0,EI.Z)({},e,r,{sections:l,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{let i=a.parseValueStr(e,T.referenceValue,(e,i)=>{let o=t.parse(e,f);if(null==o||!t.isValid(o))return null;let a=JC({utils:t,localeText:n,localizedDigits:C,format:f,date:o,formatDensity:g,shouldRespectLeadingZeros:y,enableAccessibleFieldDOMStructure:b,isRtl:r});return X1(t,o,a,i,!1)}),o=a.updateReferenceValue(t,i,T.referenceValue);E({value:i,referenceValue:o,sections:k(i,T.sections)})},setTempAndroidValueStr:e=>D(t=>(0,EI.Z)({},t,{tempValueStrAndroid:e})),getSectionsFromValue:k,sectionsValueBoundaries:M,localizedDigits:C,timezone:w}},Jk=e=>null!=e.saveQuery,JT=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:i,setTempAndroidValueStr:r,timezone:o})=>{let a=qf(),[s,l]=eV.useState(null),u=(0,YK.Z)(()=>l(null));eV.useEffect(()=>{null!=s&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),eV.useEffect(()=>{if(null!=s){let e=setTimeout(()=>u(),5e3);return()=>{clearTimeout(e)}}return()=>{}},[s,u]);let c=({keyPressed:t,sectionIndex:n},i,r)=>{let o=t.toLowerCase(),a=e[n];if(null!=s&&(!r||r(s.value))&&s.sectionIndex===n){let e=`${s.value}${o}`,t=i(e,a);if(!Jk(t))return l({sectionIndex:n,value:e,sectionType:a.type}),t}let c=i(o,a);return Jk(c)&&!c.saveQuery?(u(),null):(l({sectionIndex:n,value:o,sectionType:a.type}),Jk(c))?null:c},h=e=>{let t=(e,t,n)=>{let i=t.filter(e=>e.toLowerCase().startsWith(n));return 0===i.length?{saveQuery:!1}:{sectionValue:i[0],shouldGoToNextSection:1===i.length}},n=(e,n,i,r)=>{let s=e=>XN(a,o,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(i&&null!=r&&"letter"===XE(a,i).contentType){let n=s(i),o=t(i,n,e);return Jk(o)?{saveQuery:!1}:(0,EI.Z)({},o,{sectionValue:r(o.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case"month":return n(e,t,a.formats.month,e=>XU(a,e,a.formats.month,t.format));case"weekDay":return n(e,t,a.formats.weekday,(e,t)=>t.indexOf(e).toString());case"meridiem":return n(e,t);default:return{saveQuery:!1}}})},d=e=>{let t=(e,t)=>{let r=XV(e,i),o=Number(r),s=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(o>s.maximum)return{saveQuery:!1};if(o<s.minimum)return{saveQuery:!0};let l=10*o>s.maximum||r.length===s.maximum.toString().length;return{sectionValue:XW(a,o,s,i,t),shouldGoToNextSection:l}};return c(e,(e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){let i=XY(a,"digit","month","MM"),r=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:i,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Jk(r))return r;let o=XU(a,r.sectionValue,"MM",n.format);return(0,EI.Z)({},r,{sectionValue:o})}if("weekDay"===n.type){let i=t(e,n);if(Jk(i))return i;let r=XB(a,n.format)[Number(i.sectionValue)-1];return(0,EI.Z)({},i,{sectionValue:r})}return{saveQuery:!1}},e=>Xj(e,i))};return{applyCharacterEditing:(0,YK.Z)(n=>{let o=e[n.sectionIndex],a=Xj(n.keyPressed,i)?d((0,EI.Z)({},n,{keyPressed:XZ(n.keyPressed,i)})):h(n);if(null==a){r(null);return}t({activeSection:o,newSectionValue:a.sectionValue,shouldGoToNextSection:a.shouldGoToNextSection})}),resetCharacterQuery:u}},JD=e=>{let{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:i,onBlur:r,onClick:o,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:h,applyCharacterEditing:d,resetCharacterQuery:p,setSelectedSections:f,parsedSelectedSections:g,state:m,clearActiveSection:v,clearValue:y,updateSectionValue:x,updateValueFromValueStr:b,sectionOrder:w,areAllSectionsEmpty:S,sectionsValueBoundaries:_}=e,C=eV.useRef(null),M=(0,Kv.Z)(i,C),k=q9(),T=qf(),D=(0,c_.Z)(),[I,A]=eV.useState(!1),P=eV.useMemo(()=>({syncSelectionToDOM:()=>{let e;if(!C.current)return;let t=document.getSelection();if(!t)return;if(null==g){t.rangeCount>0&&C.current.getRoot().contains(t.getRangeAt(0).startContainer)&&t.removeAllRanges(),I&&C.current.getRoot().blur();return}if(!C.current.getRoot().contains(Q$(document)))return;let n=new window.Range;e="all"===g?C.current.getRoot():"empty"===m.sections[g].type?C.current.getSectionContainer(g):C.current.getSectionContent(g),n.selectNodeContents(e),e.focus(),t.removeAllRanges(),t.addRange(n)},getActiveSectionIndexFromDOM:()=>{let e=Q$(document);return e&&C.current&&C.current.getRoot().contains(e)?C.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!C.current||null!=P.getActiveSectionIndexFromDOM())return;let t=X3(e,m.sections);A(!0),C.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!C.current)return;let t=X3(e,m.sections);A(null!==("all"===t?0:t)),f(e)},isFieldFocused:()=>{let e=Q$(document);return!!C.current&&C.current.getRoot().contains(e)}}),[g,f,m.sections,I]),O=(0,YK.Z)(e=>{if(!C.current)return;let t=m.sections[e];C.current.getSectionContent(e).innerHTML=t.value||t.placeholder,P.syncSelectionToDOM()}),R=(0,YK.Z)((e,...t)=>{!e.isDefaultPrevented()&&C.current&&(A(!0),o?.(e,...t),"all"===g?setTimeout(()=>{let e=document.getSelection().getRangeAt(0).startOffset;if(0===e){f(w.startIndex);return}let t=0,n=0;for(;n<e&&t<m.sections.length;){let e=m.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}f(t-1)}):I?C.current.getRoot().contains(e.target)||f(w.startIndex):(A(!0),f(w.startIndex)))}),E=(0,YK.Z)(e=>{if(s?.(e),!C.current||"all"!==g)return;let t=e.target.textContent??"";C.current.getRoot().innerHTML=m.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),P.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(p(),y(),f("all")):t.length>1?b(t):("all"===g&&f(0),d({keyPressed:t,sectionIndex:0}))}),L=(0,YK.Z)(e=>{if(l?.(e),n||"all"!==g){e.preventDefault();return}let t=e.clipboardData.getData("text");e.preventDefault(),p(),b(t)}),B=(0,YK.Z)((...e)=>{a?.(...e),!I&&C.current&&(A(!0),null==C.current.getSectionIndexFromDOMElement(Q$(document))&&f(w.startIndex))}),N=(0,YK.Z)((...e)=>{r?.(...e),setTimeout(()=>{if(!C.current)return;let e=Q$(document);C.current.getRoot().contains(e)||(A(!1),f(null))})}),F=(0,YK.Z)(e=>t=>{!t.isDefaultPrevented()&&f(e)}),z=(0,YK.Z)(e=>{e.preventDefault()}),V=(0,YK.Z)(e=>()=>{f(e)}),Z=(0,YK.Z)(e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;let i=m.sections[g],r=e.clipboardData.getData("text"),o=/^[a-zA-Z]+$/.test(r),a=/^[0-9]+$/.test(r),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(r);"letter"===i.contentType&&o||"digit"===i.contentType&&a||"digit-with-letter"===i.contentType&&s?(p(),x({activeSection:i,newSectionValue:r,shouldGoToNextSection:!0})):o||a||(p(),b(r))}),j=(0,YK.Z)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),H=(0,YK.Z)(e=>{if(!C.current)return;let t=e.target,i=t.textContent??"",r=C.current.getSectionIndexFromDOMElement(t),o=m.sections[r];if(n||!C.current){O(r);return}if(0===i.length){if(""===o.value){O(r);return}let t=e.nativeEvent.inputType;if("insertParagraph"===t||"insertLineBreak"===t){O(r);return}p(),v();return}d({keyPressed:i,sectionIndex:r}),O(r)});(0,h7.Z)(()=>{if(I&&C.current){if("all"===g)C.current.getRoot().focus();else if("number"==typeof g){let e=C.current.getSectionContent(g);e&&e.focus()}}},[g,I]);let W=eV.useMemo(()=>m.sections.reduce((e,t)=>(e[t.type]=_[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e),{}),[_,m.sections]),$="all"===g,G=eV.useMemo(()=>m.sections.map((e,i)=>{let r=!$&&!t&&!n;return{container:{"data-sectionindex":i,onClick:F(i)},content:{tabIndex:$||i>0?-1:0,contentEditable:!$&&!t&&!n,role:"spinbutton",id:`${D}-${e.type}`,"aria-labelledby":`${D}-${e.type}`,"aria-readonly":n,"aria-valuenow":X8(e,T),"aria-valuemin":W[e.type].minimum,"aria-valuemax":W[e.type].maximum,"aria-valuetext":e.value?X4(e,T):k.empty,"aria-label":k[e.type],"aria-disabled":t,spellCheck:!r&&void 0,autoCapitalize:r?"off":void 0,autoCorrect:r?"off":void 0,[parseInt(eV.version,10)>=17?"enterKeyHint":"enterkeyhint"]:r?"next":void 0,children:e.value||e.placeholder,onInput:H,onPaste:Z,onFocus:V(i),onDragOver:j,onMouseUp:z,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}),[m.sections,V,Z,j,H,F,z,t,n,$,k,T,W,D]),U=(0,YK.Z)(e=>{b(e.target.value)}),q=eV.useMemo(()=>S?"":h.getV7HiddenInputValueFromSections(m.sections),[S,m.sections,h]);return eV.useEffect(()=>{if(null==C.current)throw Error("MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`\nYou probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.\n\nIf you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:\n\n<DatePicker slots={{ textField: MyCustomTextField }} />\n\nLearn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element");c&&C.current&&C.current.getSectionContent(w.startIndex).focus()},[]),{interactions:P,returnedValue:{autoFocus:c,readOnly:n,focused:u??I,sectionListRef:M,onBlur:N,onClick:R,onFocus:B,onInput:E,onPaste:L,enableAccessibleFieldDOMStructure:!0,elements:G,tabIndex:0===g?-1:0,contentEditable:$,value:q,onChange:U,areAllSectionsEmpty:S}}},JI=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),JA=(e,t,n)=>{let i=0,r=+!!n,o=[];for(let a=0;a<e.length;a+=1){let s=e[a],l=XG(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,c=JI(u).length,h=u.length,d=JI(l),p=r+(""===d?0:l.indexOf(d[0]))+s.startSeparator.length,f=p+d.length;o.push((0,EI.Z)({},s,{start:i,end:i+c,startInInput:p,endInInput:f})),i+=c,r+=h}return o},JP=e=>{let t=(0,da.V)(),n=eV.useRef(void 0),i=eV.useRef(void 0),{forwardedProps:{onFocus:r,onClick:o,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:h=!1},parsedSelectedSections:d,activeSectionIndex:p,state:f,fieldValueManager:g,valueManager:m,applyCharacterEditing:v,resetCharacterQuery:y,updateSectionValue:x,updateValueFromValueStr:b,clearActiveSection:w,clearValue:S,setTempAndroidValueStr:_,setSelectedSections:C,getSectionsFromValue:M,areAllSectionsEmpty:k,localizedDigits:T}=e,D=eV.useRef(null),I=(0,Kv.Z)(l,D),A=eV.useMemo(()=>JA(f.sections,T,t),[f.sections,T,t]),P=eV.useMemo(()=>({syncSelectionToDOM:()=>{if(!D.current)return;if(null==d){D.current.scrollLeft&&(D.current.scrollLeft=0);return}if(D.current!==Q$(document))return;let e=D.current.scrollTop;if("all"===d)D.current.select();else{let e=A[d],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;(t!==D.current.selectionStart||n!==D.current.selectionEnd)&&D.current===Q$(document)&&D.current.setSelectionRange(t,n),clearTimeout(i.current),i.current=setTimeout(()=>{D.current&&D.current===Q$(document)&&D.current.selectionStart===D.current.selectionEnd&&(D.current.selectionStart!==t||D.current.selectionEnd!==n)&&P.syncSelectionToDOM()})}D.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{let e=D.current.selectionStart??0,t=D.current.selectionEnd??0;if(0===e&&0===t)return null;let n=e<=A[0].startInInput?1:A.findIndex(t=>t.startInInput-t.startSeparator.length>e);return -1===n?A.length-1:n-1},focusField:(e=0)=>{Q$(document)!==D.current&&(D.current?.focus(),C(e))},setSelectedSections:e=>C(e),isFieldFocused:()=>D.current===Q$(document)}),[D,d,A,C]),O=()=>{let e;let t=D.current.selectionStart??0;C(-1===(e=t<=A[0].startInInput?1:t>=A[A.length-1].endInInput?1:A.findIndex(e=>e.startInInput-e.startSeparator.length>t))?A.length-1:e-1)},R=(0,YK.Z)((...e)=>{r?.(...e);let t=D.current;clearTimeout(n.current),n.current=setTimeout(()=>{t&&t===D.current&&null==p&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?C("all"):O())})}),E=(0,YK.Z)((e,...t)=>{!e.isDefaultPrevented()&&(o?.(e,...t),O())}),L=(0,YK.Z)(e=>{if(a?.(e),e.preventDefault(),c||h)return;let t=e.clipboardData.getData("text");if("number"==typeof d){let e=f.sections[d],n=/^[a-zA-Z]+$/.test(t),i=/^[0-9]+$/.test(t),r=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&i||"digit-with-letter"===e.contentType&&r){y(),x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});return}if(n||i)return}y(),b(t)}),B=(0,YK.Z)((...e)=>{s?.(...e),C(null)}),N=(0,YK.Z)(e=>{let n;if(c)return;let i=e.target.value;if(""===i){y(),S();return}let r=e.nativeEvent.data,o=r&&r.length>1,a=o?r:i,s=JI(a);if("all"===d&&C(p),null==p||o){b(o?r:s);return}if("all"===d&&1===s.length)n=s;else{let e=JI(g.getV6InputValueFromSections(A,T,t)),i=-1,r=-1;for(let t=0;t<e.length;t+=1)-1===i&&e[t]!==s[t]&&(i=t),-1===r&&e[e.length-t-1]!==s[s.length-t-1]&&(r=t);let o=A[p];if(i<o.start||e.length-r-1>o.end)return;let a=s.length-e.length+o.end-JI(o.endSeparator||"").length;n=s.slice(o.start+JI(o.startSeparator||"").length,a)}if(0===n.length){X2()&&_(a),y(),w();return}v({keyPressed:n,sectionIndex:p})}),F=eV.useMemo(()=>void 0!==u?u:g.getV6InputValueFromSections(M(m.emptyValue),T,t),[u,g,M,m.emptyValue,T,t]),z=eV.useMemo(()=>f.tempValueStrAndroid??g.getV6InputValueFromSections(f.sections,T,t),[f.sections,g,f.tempValueStrAndroid,T,t]);eV.useEffect(()=>(D.current&&D.current===Q$(document)&&C("all"),()=>{clearTimeout(n.current),clearTimeout(i.current)}),[]);let V=eV.useMemo(()=>null==p||"letter"===f.sections[p].contentType?"text":"numeric",[p,f.sections]);return{interactions:P,returnedValue:{readOnly:c,onBlur:B,onClick:E,onFocus:R,onPaste:L,inputRef:I,enableAccessibleFieldDOMStructure:!1,placeholder:F,inputMode:V,autoComplete:"off",value:!(D.current&&D.current===Q$(document))&&k?"":z,onChange:N}}},JO=e=>{let t=qf(),{internalProps:n,internalProps:{unstableFieldRef:i,minutesStep:r,enableAccessibleFieldDOMStructure:o=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:h},fieldValueManager:d,valueManager:p,validator:f}=e,g=(0,da.V)(),m=JM(e),{state:v,activeSectionIndex:y,parsedSelectedSections:x,setSelectedSections:b,clearValue:w,clearActiveSection:S,updateSectionValue:_,setTempAndroidValueStr:C,sectionsValueBoundaries:M,localizedDigits:k,timezone:T}=m,D=JT({sections:v.sections,updateSectionValue:_,sectionsValueBoundaries:M,localizedDigits:k,setTempAndroidValueStr:C,timezone:T}),{resetCharacterQuery:I}=D,A=p.areValuesEqual(t,v.value,p.emptyValue),P=o?JD:JP,O=eV.useMemo(()=>X5(v.sections,g&&!o),[v.sections,g,o]),{returnedValue:R,interactions:E}=P((0,EI.Z)({},e,m,D,{areAllSectionsEmpty:A,sectionOrder:O})),L=(0,YK.Z)(e=>{if(l?.(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),b("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)b(O.startIndex);else if("all"===x)b(O.endIndex);else{let e=O.neighbors[x].rightIndex;null!==e&&b(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)b(O.endIndex);else if("all"===x)b(O.startIndex);else{let e=O.neighbors[x].leftIndex;null!==e&&b(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==x||"all"===x?w():S(),I();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==y)break;"all"===x&&b(y);let n=v.sections[y],i=d.getActiveDateManager(t,v,n),o=X$(t,T,n,e.key,M,k,i.date,{minutesStep:r});_({activeSection:n,newSectionValue:o,shouldGoToNextSection:!1})}}});(0,h7.Z)(()=>{E.syncSelectionToDOM()});let{hasValidationError:B}=QF({props:n,validator:f,timezone:T,value:v.value,onError:n.onError}),N=eV.useMemo(()=>void 0!==u?u:B,[B,u]);eV.useEffect(()=>{N||null!=y||I()},[v.referenceValue,y,N]),eV.useEffect(()=>{null!=v.tempValueStrAndroid&&null!=y&&(I(),S())},[v.sections]),eV.useImperativeHandle(i,()=>({getSections:()=>v.sections,getActiveSectionIndex:E.getActiveSectionIndexFromDOM,setSelectedSections:E.setSelectedSections,focusField:E.focusField,isFieldFocused:E.isFieldFocused}));let F={onKeyDown:L,onClear:(0,YK.Z)((e,...t)=>{e.preventDefault(),h?.(e,...t),w(),E.isFieldFocused()?b(O.startIndex):E.focusField(0)}),error:N,clearable:!!(c&&!A&&!s&&!a)};return(0,EI.Z)({},e.forwardedProps,F,{disabled:a,readOnly:s},R)},JR=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],JE=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],JL=["minDateTime","maxDateTime"];[...JR,...JE,...JL];let JB=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],JN=(e,t)=>eV.useMemo(()=>{let n=(0,EI.Z)({},e),i={},r=e=>{n.hasOwnProperty(e)&&(i[e]=n[e],delete n[e])};return JB.forEach(r),"date"===t?JR.forEach(r):"time"===t?JE.forEach(r):"date-time"===t&&(JR.forEach(r),JE.forEach(r),JL.forEach(r)),{forwardedProps:n,internalProps:i}},[e,t]),JF=e=>{let t=qf(),n=qg(),i=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return(0,EI.Z)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??i,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:qx(t,e.minDateTime??e.minDate,n.minDate),maxDate:qx(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},Jz=e=>{let{forwardedProps:t,internalProps:n}=JN(JF(e),"date-time");return JO({forwardedProps:t,internalProps:n,valueManager:X9,fieldValueManager:X7,validator:Jm,valueType:"date-time"})};var JV=n(6992);let JZ=["clearable","onClear","InputProps","sx","slots","slotProps"],Jj=["ownerState"],JH=e=>{let t=q9(),{clearable:n,onClear:i,InputProps:r,sx:o,slots:a,slotProps:s}=e,l=(0,EA.Z)(e,JZ),u=a?.clearButton??td.Z,c=(0,qP.Z)({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),h=(0,EA.Z)(c,Jj),d=a?.clearIcon??q6,p=(0,qP.Z)({elementType:d,externalSlotProps:s?.clearIcon,ownerState:{}});return(0,EI.Z)({},l,{InputProps:(0,EI.Z)({},r,{endAdornment:(0,ez.jsxs)(eV.Fragment,{children:[n&&(0,ez.jsx)(JV.Z,{position:"end",sx:{marginRight:r?.endAdornment?-1:-1.5},children:(0,ez.jsx)(u,(0,EI.Z)({},h,{onClick:i,children:(0,ez.jsx)(d,(0,EI.Z)({fontSize:"small"},p))}))}),r?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(o)?o:[o]]})};var JW=n(8808),J$=n(2931);function JG(e){return(0,eQ.ZP)("MuiPickersTextField",e)}(0,eK.Z)("MuiPickersTextField",["root","focused","disabled","error","required"]);var JU=n(6683);function Jq(e){return(0,eQ.ZP)("MuiPickersInputBase",e)}let JY=(0,eK.Z)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function JX(e){return(0,eQ.ZP)("MuiPickersOutlinedInput",e)}let JK=(0,EI.Z)({},JY,(0,eK.Z)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),JQ=["children","className","label","notched","shrink"],JJ=(0,eU.ZP)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),J0=(0,eU.ZP)("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),J1=(0,eU.ZP)("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function J2(e){let{className:t,label:n}=e,i=(0,EA.Z)(e,JQ),r=null!=n&&""!==n,o=(0,EI.Z)({},e,{withLabel:r});return(0,ez.jsx)(JJ,(0,EI.Z)({"aria-hidden":!0,className:t},i,{ownerState:o,children:(0,ez.jsx)(J1,{ownerState:o,children:r?(0,ez.jsx)(J0,{children:n}):(0,ez.jsx)(J0,{className:"notranslate",children:""})})}))}var J5=n(3150);function J3(e){return(0,eQ.ZP)("MuiPickersSectionList",e)}let J4=(0,eK.Z)("MuiPickersSectionList",["root","section","sectionContent"]),J8=["slots","slotProps","elements","sectionListRef"],J6=(0,eU.ZP)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),J9=(0,eU.ZP)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),J7=(0,eU.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),eee=(0,eU.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),eet=e=>{let{classes:t}=e;return(0,eH.Z)({root:["root"],section:["section"],sectionContent:["sectionContent"]},J3,t)};function een(e){let{slots:t,slotProps:n,element:i,classes:r}=e,o=t?.section??J9,a=(0,qP.Z)({elementType:o,externalSlotProps:n?.section,externalForwardedProps:i.container,className:r.section,ownerState:{}}),s=t?.sectionContent??eee,l=(0,qP.Z)({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:i.content,additionalProps:{suppressContentEditableWarning:!0},className:r.sectionContent,ownerState:{}}),u=t?.sectionSeparator??J7,c=(0,qP.Z)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:i.before,ownerState:{position:"before"}}),h=(0,qP.Z)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:i.after,ownerState:{position:"after"}});return(0,ez.jsxs)(o,(0,EI.Z)({},a,{children:[(0,ez.jsx)(u,(0,EI.Z)({},c)),(0,ez.jsx)(s,(0,EI.Z)({},l)),(0,ez.jsx)(u,(0,EI.Z)({},h))]}))}let eei=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersSectionList"}),{slots:i,slotProps:r,elements:o,sectionListRef:a}=n,s=(0,EA.Z)(n,J8),l=eet(n),u=eV.useRef(null),c=(0,Kv.Z)(t,u),h=e=>{if(!u.current)throw Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return u.current};eV.useImperativeHandle(a,()=>({getRoot:()=>h("getRoot"),getSectionContainer:e=>h("getSectionContainer").querySelector(`.${J4.section}[data-sectionindex="${e}"]`),getSectionContent:e=>h("getSectionContent").querySelector(`.${J4.section}[data-sectionindex="${e}"] .${J4.sectionContent}`),getSectionIndexFromDOMElement(e){let t=h("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return(e.classList.contains(J4.section)?n=e:e.classList.contains(J4.sectionContent)&&(n=e.parentElement),null==n)?null:Number(n.dataset.sectionindex)}}));let d=i?.root??J6,p=(0,qP.Z)({elementType:d,externalSlotProps:r?.root,externalForwardedProps:s,additionalProps:{ref:c,suppressContentEditableWarning:!0},className:l.root,ownerState:{}});return(0,ez.jsx)(d,(0,EI.Z)({},p,{children:p.contentEditable?o.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,ez.jsx)(eV.Fragment,{children:o.map((e,t)=>(0,ez.jsx)(een,{slots:i,slotProps:r,element:e,classes:l},t))})}))}),eer=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],eeo=e=>Math.round(1e5*e)/1e5,eea=(0,eU.ZP)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>(0,EI.Z)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${eeo(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),ees=(0,eU.ZP)(J6,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:t,filled:n,label:i})=>!e&&!t&&!n&&null==i,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),eel=(0,eU.ZP)(J9,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),eeu=(0,eU.ZP)(eee,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),eec=(0,eU.ZP)(J7,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),eeh=(0,eU.ZP)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,EI.Z)({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),eed=e=>{let{focused:t,disabled:n,error:i,classes:r,fullWidth:o,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,h={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",i&&"error",o&&"fullWidth",`color${(0,J5.Z)(s)}`,"small"===l&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,eH.Z)(h,Jq,r)},eep=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersInputBase"}),{elements:i,areAllSectionsEmpty:r,value:o,onChange:a,id:s,endAdornment:l,startAdornment:u,renderSuffix:c,slots:h,slotProps:d,contentEditable:p,tabIndex:f,onInput:g,onPaste:m,onKeyDown:v,name:y,readOnly:x,inputProps:b,inputRef:w,sectionListRef:S}=n,_=(0,EA.Z)(n,eer),C=eV.useRef(null),M=(0,Kv.Z)(t,C),k=(0,Kv.Z)(b?.ref,w),T=(0,da.V)(),D=(0,JU.Z)();if(!D)throw Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");eV.useEffect(()=>{D&&D.setAdornedStart(!!u)},[D,u]),eV.useEffect(()=>{D&&(r?D.onEmpty():D.onFilled())},[D,r]);let I=(0,EI.Z)({},n,D,{isRtl:T}),A=eed(I),P=h?.root||eea,O=(0,qP.Z)({elementType:P,externalSlotProps:d?.root,externalForwardedProps:_,additionalProps:{"aria-invalid":D.error,ref:M},className:A.root,ownerState:I}),R=h?.input||ees;return(0,ez.jsxs)(P,(0,EI.Z)({},O,{children:[u,(0,ez.jsx)(eei,{sectionListRef:S,elements:i,contentEditable:p,tabIndex:f,className:A.sectionsContainer,onFocus:e=>{if(D.disabled){e.stopPropagation();return}D.onFocus?.(e)},onBlur:D.onBlur,onInput:g,onPaste:m,onKeyDown:v,slots:{root:R,section:eel,sectionContent:eeu,sectionSeparator:eec},slotProps:{root:{ownerState:I},sectionContent:{className:JY.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?JY.sectionBefore:JY.sectionAfter})}}),l,c?c((0,EI.Z)({},D)):null,(0,ez.jsx)(eeh,(0,EI.Z)({name:y,className:A.input,value:o,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:x,required:D.required,disabled:D.disabled},b,{ref:k}))]}))}),eef=["label","autoFocus","ownerState","notched"],eeg=(0,eU.ZP)(eea,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${JK.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${JK.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${JK.focused} .${JK.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${JK.disabled}`]:{[`& .${JK.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${JK.error} .${JK.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{color:t},style:{[`&.${JK.focused}:not(.${JK.error}) .${JK.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),eem=(0,eU.ZP)(ees,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),eev=e=>{let{classes:t}=e,n=(0,eH.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},JX,t);return(0,EI.Z)({},t,n)},eey=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersOutlinedInput"}),{label:i,ownerState:r,notched:o}=n,a=(0,EA.Z)(n,eef),s=(0,JU.Z)(),l=(0,EI.Z)({},n,r,s,{color:s?.color||"primary"}),u=eev(l);return(0,ez.jsx)(eep,(0,EI.Z)({slots:{root:eeg,input:eem},renderSuffix:e=>(0,ez.jsx)(J2,{shrink:!!(o||e.adornedStart||e.focused||e.filled),notched:!!(o||e.adornedStart||e.focused||e.filled),className:u.notchedOutline,label:null!=i&&""!==i&&s?.required?(0,ez.jsxs)(eV.Fragment,{children:[i," ","*"]}):i,ownerState:l})},a,{label:i,classes:u,ref:t}))});eey.muiName="Input";var eex=n(5315);function eeb(e){return(0,eQ.ZP)("MuiPickersFilledInput",e)}let eew=(0,EI.Z)({},JY,(0,eK.Z)("MuiPickersFilledInput",["root","underline","input"])),eeS=["label","autoFocus","disableUnderline","ownerState"],ee_=(0,eU.ZP)(eea,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,eex.x9)(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${eew.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${eew.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${eew.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${eew.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${eew.disabled}, .${eew.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${eew.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}}),eeC=(0,eU.ZP)(ees,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),eeM=e=>{let{classes:t,disableUnderline:n}=e,i=(0,eH.Z)({root:["root",!n&&"underline"],input:["input"]},eeb,t);return(0,EI.Z)({},t,i)},eek=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersFilledInput"}),{label:i,disableUnderline:r=!1,ownerState:o}=n,a=(0,EA.Z)(n,eeS),s=(0,JU.Z)(),l=eeM((0,EI.Z)({},n,o,s,{color:s?.color||"primary"}));return(0,ez.jsx)(eep,(0,EI.Z)({slots:{root:ee_,input:eeC},slotProps:{root:{disableUnderline:r}}},a,{label:i,classes:l,ref:t}))});function eeT(e){return(0,eQ.ZP)("MuiPickersFilledInput",e)}eek.muiName="Input";let eeD=(0,EI.Z)({},JY,(0,eK.Z)("MuiPickersInput",["root","input"])),eeI=["label","autoFocus","disableUnderline","ownerState"],eeA=(0,eU.ZP)(eea,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${eeD.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${eeD.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${eeD.disabled}, .${eeD.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${eeD.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),eeP=e=>{let{classes:t,disableUnderline:n}=e,i=(0,eH.Z)({root:["root",!n&&"underline"],input:["input"]},eeT,t);return(0,EI.Z)({},t,i)},eeO=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersInput"}),{label:i,disableUnderline:r=!1,ownerState:o}=n,a=(0,EA.Z)(n,eeI),s=(0,JU.Z)(),l=eeP((0,EI.Z)({},n,o,s,{disableUnderline:r,color:s?.color||"primary"}));return(0,ez.jsx)(eep,(0,EI.Z)({slots:{root:eeA}},a,{label:i,classes:l,ref:t}))});eeO.muiName="Input";let eeR=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],eeE={standard:eeO,filled:eek,outlined:eey},eeL=(0,eU.ZP)(c0.Z,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eeB=e=>{let{focused:t,disabled:n,classes:i,required:r}=e;return(0,eH.Z)({root:["root",t&&!n&&"focused",n&&"disabled",r&&"required"]},JG,i)},eeN=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiPickersTextField"}),{onFocus:i,onBlur:r,className:o,color:a="primary",disabled:s=!1,error:l=!1,variant:u="outlined",required:c=!1,InputProps:h,inputProps:d,inputRef:p,sectionListRef:f,elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onPaste:b,onInput:w,endAdornment:S,startAdornment:_,tabIndex:C,contentEditable:M,focused:k,value:T,onChange:D,fullWidth:I,id:A,name:P,helperText:O,FormHelperTextProps:R,label:E,InputLabelProps:L}=n,B=(0,EA.Z)(n,eeR),N=eV.useRef(null),F=(0,Kv.Z)(t,N),z=(0,c_.Z)(A),V=O&&z?`${z}-helper-text`:void 0,Z=E&&z?`${z}-label`:void 0,j=(0,EI.Z)({},n,{color:a,disabled:s,error:l,focused:k,required:c,variant:u}),H=eeB(j),W=eeE[u];return(0,ez.jsxs)(eeL,(0,EI.Z)({className:(0,ej.Z)(H.root,o),ref:F,focused:k,onFocus:i,onBlur:r,disabled:s,variant:u,error:l,color:a,fullWidth:I,required:c,ownerState:j},B,{children:[(0,ez.jsx)(JW.Z,(0,EI.Z)({htmlFor:z,id:Z},L,{children:E})),(0,ez.jsx)(W,(0,EI.Z)({elements:g,areAllSectionsEmpty:m,onClick:v,onKeyDown:y,onKeyUp:x,onInput:w,onPaste:b,endAdornment:S,startAdornment:_,tabIndex:C,contentEditable:M,value:T,onChange:D,id:z,fullWidth:I,inputProps:d,inputRef:p,sectionListRef:f,label:E,name:P,role:"group","aria-labelledby":Z,"aria-describedby":V,"aria-live":V?"polite":void 0},h)),O&&(0,ez.jsx)(J$.Z,(0,EI.Z)({id:V},R,{children:O}))]}))}),eeF=["enableAccessibleFieldDOMStructure"],eez=["InputProps","readOnly"],eeV=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],eeZ=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,EA.Z)(e,eeF);if(t){let{InputProps:e,readOnly:t}=n,i=(0,EA.Z)(n,eez);return(0,EI.Z)({},i,{InputProps:(0,EI.Z)({},e??{},{readOnly:t})})}let{onPaste:i,onKeyDown:r,inputMode:o,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,EA.Z)(n,eeV);return(0,EI.Z)({},c,{InputProps:(0,EI.Z)({},s??{},{readOnly:a}),inputProps:(0,EI.Z)({},l??{},{inputMode:o,onPaste:i,onKeyDown:r,ref:u})})},eej=["slots","slotProps","InputProps","inputProps"],eeH=eV.forwardRef(function(e,t){let n=(0,qa.Z)({props:e,name:"MuiDateTimeField"}),{slots:i,slotProps:r,InputProps:o,inputProps:a}=n,s=(0,EA.Z)(n,eej),l=i?.textField??(e.enableAccessibleFieldDOMStructure?eeN:tp.Z),u=(0,qP.Z)({elementType:l,externalSlotProps:r?.textField,externalForwardedProps:s,ownerState:n,additionalProps:{ref:t}});u.inputProps=(0,EI.Z)({},a,u.inputProps),u.InputProps=(0,EI.Z)({},o,u.InputProps);let c=eeZ(Jz(u)),h=JH((0,EI.Z)({},c,{slots:i,slotProps:r}));return(0,ez.jsx)(l,(0,EI.Z)({},h))});var eeW=n(9435),ee$=n(2791),eeG=n(4336),eeU=n(2694),eeq=n(5154),eeY=n(9489),eeX=n(6341),eeK=n(3189),eeQ=n(5918),eeJ=n(9880),ee0=n(8006),ee1=n(6332),ee2=n(1721),ee5=n(1267),ee3=n(8904),ee4=n(7785),ee8=n(8364),ee6=n(8340),ee9=n(506),ee7=n(4265),ete=n(6635),ett=n(1275),etn=n(4107),eti=n(436),etr=n(7912),eto=n(9250),eta=n(3303),ets=n(8374),etl=n(3743),etu=n(8070),etc=n(3709),eth=n(3200),etd=n(6292),etp=n(1136),etf=n(3518),etg=n(4138),etm=n(8140),etv=n(3033),ety=n(7),etx=n(4575),etb=n(5149),etw=n(8874),etS=n(2511),et_=n(4257);let etC={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},etM={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class etk{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=etC,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;let{locale:t,formats:n,longFormatters:i,lib:r}=e;this.locale=t,this.formats=(0,EI.Z)({},etM,n),this.longFormatters=i,this.lib=r||"date-fns"}}class etT extends etk{constructor({locale:e,formats:t}={}){super({locale:e??et_._,formats:t,longFormatters:ee0.G}),this.parse=(e,t)=>""===e?null:(0,etu.Qc)(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&(0,etl.J)(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>(0,ee1.WU)(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&(0,eti.X)(e,t),this.isSameYear=(e,t)=>(0,eto.F)(e,t),this.isSameMonth=(e,t)=>(0,eta.x)(e,t),this.isSameDay=(e,t)=>(0,etr.K)(e,t),this.isSameHour=(e,t)=>(0,ets.f)(e,t),this.isAfter=(e,t)=>(0,ett.A)(e,t),this.isAfterYear=(e,t)=>(0,ett.A)(e,(0,eeJ.w)(t)),this.isAfterDay=(e,t)=>(0,ett.A)(e,(0,eeK.i)(t)),this.isBefore=(e,t)=>(0,etn.R)(e,t),this.isBeforeYear=(e,t)=>(0,etn.R)(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>(0,etn.R)(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>(0,etS._)(e,{start:t,end:n}),this.startOfYear=e=>(0,etw.e)(e),this.startOfMonth=e=>(0,ety.N)(e),this.startOfWeek=e=>(0,etb.z)(e,{locale:this.locale}),this.startOfDay=e=>(0,etv.b)(e),this.endOfYear=e=>(0,eeJ.w)(e),this.endOfMonth=e=>(0,etx.V)(e),this.endOfWeek=e=>(0,eeQ.v)(e,{locale:this.locale}),this.endOfDay=e=>(0,eeK.i)(e),this.addYears=(e,t)=>(0,eeX.B)(e,t),this.addMonths=(e,t)=>(0,eeY.z)(e,t),this.addWeeks=(e,t)=>(0,eeq.j)(e,t),this.addDays=(e,t)=>(0,eeW.E)(e,t),this.addHours=(e,t)=>(0,eeU.T)(e,t),this.addMinutes=(e,t)=>(0,eeG.m)(e,t),this.addSeconds=(e,t)=>(0,ee$.v)(e,t),this.getYear=e=>(0,ete.S)(e),this.getMonth=e=>(0,ee8.j)(e),this.getDate=e=>(0,ee2._)(e),this.getHours=e=>(0,ee3.p)(e),this.getMinutes=e=>(0,ee4.q)(e),this.getSeconds=e=>(0,ee6.C)(e),this.getMilliseconds=e=>(0,ee9.p)(e),this.setYear=(e,t)=>(0,etm.M)(e,t),this.setMonth=(e,t)=>(0,etp.q)(e,t),this.setDate=(e,t)=>(0,etc.G)(e,t),this.setHours=(e,t)=>(0,eth.B)(e,t),this.setMinutes=(e,t)=>(0,etd.H)(e,t),this.setSeconds=(e,t)=>(0,etf.O)(e,t),this.setMilliseconds=(e,t)=>(0,etg.I)(e,t),this.getDaysInMonth=e=>(0,ee5.N)(e),this.getWeekArray=e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),i=0,r=t,o=[];for(;this.isBefore(r,n);){let e=Math.floor(i/7);o[e]=o[e]||[],o[e].push(r),r=this.addDays(r,1),i+=1}return o},this.getWeekNumber=e=>(0,ee7.Q)(e,{locale:this.locale}),this.getYearRange=([e,t])=>{let n=this.startOfYear(e),i=this.endOfYear(t),r=[],o=n;for(;this.isBefore(o,i);)r.push(o),o=this.addYears(o,1);return r}}}let etD="yyyy-MM-dd HH:mm:ss";function etI(e,t){return e?(0,i9.s3)(e)?e.pastDuration:function(e,t,n){let i=rp(e.start,t,n),r=rp(e.end,t,n);return`${i} - ${r}`}(e,etD,t):"Custom Time Range"}let etA=({initialTimeRange:e,onChange:t,onCancel:n})=>{let{formatWithUserTimeZone:i}=rx(),[r,o]=(0,eV.useState)(e),[a,s]=(0,eV.useState)({start:i(e.start,etD),end:i(e.end,etD)}),[l,u]=(0,eV.useState)(!0),c=(e,t)=>{let n="string"==typeof e,r=n?e:i(e,etD);s(e=>({...e,[t]:r})),n||o(n=>({...n,[t]:e}))},h=e=>{c(e,"start")},d=e=>{c(e,"end")},p=()=>{var e,t;let n={start:new Date(a.start),end:new Date(a.end)};if(e=n.start,t=n.end,(0,i7.isValid)(e)&&(0,i7.isValid)(t)?!!(0,i7.isBefore)(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return o(n),n},f=()=>{let e=p();e&&t(e)};return(0,ez.jsx)(qu,{dateAdapter:etT,children:(0,ez.jsxs)(th,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[l&&(0,ez.jsxs)(r_.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,ez.jsx)(uD.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,ez.jsx)(Jv,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.start,onChange:e=>{null!==e&&h(e)},onAccept:()=>{u(!1)}})]}),!l&&(0,ez.jsxs)(r_.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,ez.jsx)(uD.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,ez.jsx)(Jv,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.end,minDateTime:r.start,onChange:e=>{null!==e&&d(e)},onAccept:e=>{null!==e&&(u(!0),d(e))}})]}),(0,ez.jsxs)(th,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,ez.jsx)(EC.ErrorBoundary,{FallbackComponent:E_,children:(0,ez.jsx)(eeH,{label:"Start Time",value:new Date(a.start),onChange:e=>{e&&h(e)},onBlur:()=>p(),format:etD})}),(0,ez.jsx)(EC.ErrorBoundary,{FallbackComponent:E_,children:(0,ez.jsx)(eeH,{label:"End Time",value:new Date(a.end),onChange:e=>{e&&d(e)},onBlur:()=>p(),format:etD})})]}),(0,ez.jsxs)(th,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,ez.jsx)(e8.Z,{variant:"contained",onClick:()=>f(),fullWidth:!0,children:"Apply"}),(0,ez.jsx)(e8.Z,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function etP({value:e,timeOptions:t,onChange:n,height:i,showCustomTimeRange:r=!0}){let{timeZone:o}=rx(),a=(0,eV.useRef)(),[s,l]=(0,eV.useState)(!1),u=(0,eV.useMemo)(()=>(0,i9.s3)(e)?(0,i9.sG)(e):e,[e]),c=(0,eV.useMemo)(()=>{var t;return{value:t=(0,i9.s3)(e)?void 0:e,display:etI(t,o)}},[e,o]),[h,d]=(0,eV.useState)(!1);return(0,ez.jsxs)(ez.Fragment,{children:[(0,ez.jsx)(tU.ZP,{anchorEl:a.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:s,onClose:()=>l(!1),sx:e=>({padding:e.spacing(2)}),children:(0,ez.jsx)(etA,{initialTimeRange:u,onChange:e=>{n(e),l(!1),d(!1)},onCancel:()=>l(!1)})}),(0,ez.jsx)(r_.Z,{ref:a,children:(0,ez.jsxs)(qr.Z,{open:h,value:etI(e,o),onClick:()=>d(!h),IconComponent:qo.default,inputProps:{"aria-label":`Select time range. Currently set to ${e}`},sx:{".MuiSelect-icon":{marginTop:"1px",transform:"none"},".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":{paddingRight:"36px"},".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[t.map((e,t)=>(0,ez.jsx)(h3.Z,{value:etI(e.value,o),onClick:()=>{n(e.value)},children:e.display},t)),r&&(0,ez.jsx)(h3.Z,{value:etI(c.value,o),onClick:()=>l(!0),children:c.display})]})})]})}function etO(e){let{markerColor:t,sx:n}=e;return(0,ez.jsx)(r_.Z,{sx:ru({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function etR(e){let{formattedY:t,markerColor:n,metricName:i,metricLabels:r}=e;return(0,ez.jsxs)(th,{spacing:.5,children:[(0,ez.jsxs)(r_.Z,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,ez.jsx)(etO,{markerColor:n,sx:{marginTop:.25}}),(0,ez.jsxs)(r_.Z,{component:"span",children:[i,(0,ez.jsx)(r_.Z,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,ez.jsx)(ET.Z,{sx:e=>({borderColor:e.palette.grey["500"]})}),(0,ez.jsx)(r_.Z,{sx:e=>({color:e.palette.common.white}),children:r.map(e=>{if(e){let[t,n]=e.split("="),i=void 0!==n?`${t}: `:t,r=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,ez.jsxs)(r_.Z,{sx:{display:"flex",gap:"4px"},children:[(0,ez.jsx)(uD.Z,{sx:{fontSize:"11px"},children:i}),(0,ez.jsx)(uD.Z,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:r})]},e)}})})]})}let etE=375,etL=650,etB=650,etN=500,etF=.75,etz=8,etV=750,etZ="nearby series showing in tooltip",etj="emphasized series showing as bold in tooltip",etH="#2E313E",etW=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),et$={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},etG=[],etU=()=>{let[e,t]=(0,eV.useState)(null);return(0,eV.useEffect)(()=>{let e=e=>t({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},[]),e},etq={wrapLabels:!0,enablePinning:!0},etY="Click chart to pin",etX="Click chart to unpin";function etK(e){let{seriesName:t,formattedY:n,markerColor:i,totalSeries:r,emphasizeText:o=!1,wrapLabels:a=!0}=e,s=t.split("{"),l=(s[1]??t).replace(/[{}]/g,"").split(",");if(1===r&&l.length>1){let e=s[0]?`${s[0]}:`:"value:";return(0,ez.jsx)(etR,{formattedY:n,metricName:e,metricLabels:l,markerColor:i})}let u=t.replace(/[,]/g,", ");return(0,ez.jsxs)(r_.Z,{sx:{display:"table-row",paddingTop:.5},children:[(0,ez.jsxs)(r_.Z,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,ez.jsx)(etO,{markerColor:i,sx:{marginTop:.5}}),(0,ez.jsx)(r_.Z,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:etN,overflow:"hidden",color:e.palette.common.white,fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:a?"normal":"nowrap"}),"aria-label":o?etj:etZ,children:u})]}),(0,ez.jsx)(r_.Z,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}var etQ=n(7444);function etJ(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}function et0(e,t,n,i,r){if(null===e||(null!==t&&(e=t),void 0===e.plotCanvas.x))return;let o=e.page.x+32,a=e.page.y+16;if(r){let e=r.getBoundingClientRect();o=o-e.left+r.scrollLeft,a=a-e.top+r.scrollTop;let t=e.top+r.scrollHeight;a+n>t&&(a=Math.max(t-n-16,etz/2))}else a+n>window.innerHeight+window.scrollY&&(a=Math.max(window.innerHeight+window.scrollY-n-16,etz/2));return o+i>window.innerWidth&&(o=e.page.x-i-32),o<32&&(o=32),a<etz/2&&(a=etz/2),`translate3d(${o}px, ${a}px, 0)`}function et1(e,t,n){return{minWidth:etE,maxWidth:etL,maxHeight:(n?n-etz:void 0)??etB,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??etH,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"all 0.1s ease-out",zIndex:null!==t?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}let et2=5.5,et5=30,et3=5;function et4(e,t,n,i,r,o){let a=[],s=n[0]??null,l=n[1]??null;if(null===s||null===l||void 0===r.dispatchAction||!Array.isArray(e))return a;let u=[],c=[],h=[],d=[],p=[],f=e.length,g=new Map,m=rs(e[0]?.values,s);if(null===m)return etG;for(let n=0;n<f;n++){let s=t[n];if(!s)break;let v=f>0?e[n]:null;if(!v)break;let y=v.values;if(void 0===y||!Array.isArray(y))break;let x=s.name?s.name.toString():"",b=s.color??"#000";if(Array.isArray(e))for(let e=0;e<y.length;e++){let t=y[e];if(void 0===t||!Array.isArray(t))break;let s=t[0],v=t[1];if(null!=v&&m===s&&l<=v+i&&l>=v-i){let t=et7({valueToCheck:l,baseValue:v,percentage:Math.max(f>et3?2:5,100/f)});if(t){c.push(n);let t=g.get(v)??0;g.set(v,t+1),t>0&&p.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:v}),d.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:v})}else h.push(n),r.dispatchAction({type:"downplay",seriesIndex:n});let i=i1(v,o);a.push({seriesIdx:n,datumIdx:e,seriesName:x,date:m,x:s,y:v,formattedY:i,markerColor:b.toString(),isClosestToCursor:t}),u.push(n)}}}return ro(r,u,c,h,d,p),a}function et8(e,t,n,i,r){let o=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return o;let l=[],u=[],c=[],h=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t<h;t++){let d=e.timeSeries[t];if(void 0===d||o.length>=i4)break;let p=d.name?d.name.toString():"",f=d.color??"#000";if(Array.isArray(d.data))for(let g=0;g<d.data.length;g++){let m=e.xAxis[g]??0,v=d.data[g];if(null!=v&&a===g&&"-"!==v&&s<=v+n&&s>=v-n){let e=et7({valueToCheck:s,baseValue:v,percentage:Math.max(h>et3?2:5,100/h)});e?u.push(t):(c.push(t),i?.dispatchAction!==void 0&&i.dispatchAction({type:"downplay",seriesIndex:t}));let n=m>0x174876e7ff?m:1e3*m,a=i1(v,r);o.push({seriesIdx:t,datumIdx:g,seriesName:p,date:n,x:m,y:v,formattedY:a,markerColor:f.toString(),isClosestToCursor:e}),l.push(t)}}}return i?.dispatchAction!==void 0&&(i.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?i.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):i.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),o}function et6({mousePos:e,pinnedPos:t,data:n,seriesMapping:i,chart:r,format:o,showAllSeries:a=!1}){if(void 0===r||null===e)return etG;let s=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&r.getDom()===e&&(s=!0)}}if(null!==t&&(e=t,s=!0),!1===s||null===n||void 0===r._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return etG;let l=rr(e.plotCanvas.x,e.plotCanvas.y,r);if(null!==l){let e=ene({yInterval:r._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.length,showAllSeries:a});return et4(n,i,l,e,r,o)}return etG}function et9({mousePos:e,pinnedPos:t,chartData:n,chart:i,format:r,showAllSeries:o=!1}){if(void 0===i||null===e)return[];let a=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(a=!0)}}if(null!==t&&(e=t,a=!0),!1===a||void 0===i._model)return[];let s=ene({yInterval:i._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.timeSeries.length,showAllSeries:o}),l=[e.plotCanvas.x??0,e.plotCanvas.y??0];if(i.containPixel("grid",l)){let e=i.convertFromPixel("grid",l);if(void 0!==e[0]&&void 0!==e[1])return et8(n,e,s,i,r)}return[]}function et7({valueToCheck:e,baseValue:t,percentage:n}){let i=n/100*t;return e>=t-i&&e<=t+i}function ene({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let i=.3*e;return t>et3?Math.max(i,e*et5/t):Math.max(i,e*et2)}var ent=n(9140);function enn(e){return(0,eQ.ZP)("MuiSwitch",e)}let eni=(0,eK.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),enr=e=>{let{classes:t,edge:n,size:i,color:r,checked:o,disabled:a}=e,s={root:["root",n&&`edge${(0,eG.Z)(n)}`,`size${(0,eG.Z)(i)}`],switchBase:["switchBase",`color${(0,eG.Z)(r)}`,o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,eH.Z)(s,enn,t);return{...t,...l}},eno=(0,eU.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,eG.Z)(n.edge)}`],t[`size${(0,eG.Z)(n.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${eni.thumb}`]:{width:16,height:16},[`& .${eni.switchBase}`]:{padding:4,[`&.${eni.checked}`]:{transform:"translateX(16px)"}}}}]}),ena=(0,eU.ZP)(ent.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.switchBase,{[`& .${eni.input}`]:t.input},"default"!==n.color&&t[`color${(0,eG.Z)(n.color)}`]]}})((0,eq.Z)(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${eni.checked}`]:{transform:"translateX(20px)"},[`&.${eni.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${eni.checked} + .${eni.track}`]:{opacity:.5},[`&.${eni.disabled} + .${eni.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${"light"===e.palette.mode?.12:.2}`},[`& .${eni.input}`]:{left:"-100%",width:"300%"}})),(0,eq.Z)(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,eY.Z)(["light"])).map(([t])=>({props:{color:t},style:{[`&.${eni.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,eW.Fq)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${eni.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,eW.$n)(e.palette[t].main,.62):(0,eW._j)(e.palette[t].main,.55)}`}},[`&.${eni.checked} + .${eni.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),ens=(0,eU.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,eq.Z)(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${"light"===e.palette.mode?.38:.3}`}))),enl=(0,eU.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,eq.Z)(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),enu=eV.forwardRef(function(e,t){let n=(0,eX.i)({props:e,name:"MuiSwitch"}),{className:i,color:r="primary",edge:o=!1,size:a="medium",sx:s,...l}=n,u={...n,color:r,edge:o,size:a},c=enr(u),h=(0,ez.jsx)(enl,{className:c.thumb,ownerState:u});return(0,ez.jsxs)(eno,{className:(0,ej.Z)(c.root,i),sx:s,ownerState:u,children:[(0,ez.jsx)(ena,{type:"checkbox",icon:h,checkedIcon:h,ref:t,ownerState:u,...l,classes:{...c,root:c.switchBase}}),(0,ez.jsx)(ens,{className:c.track,ownerState:u})]})});var enc=n(1889),enh=n(5186);let end=(0,eV.memo)(function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:i,enablePinning:r=!0,onShowAllClick:o,onUnpinClick:a}){let s=e[0]?.date??null;if(null===s)return null;let l=r&&t>5;return(0,ez.jsxs)(r_.Z,{sx:e=>({width:"100%",maxWidth:etL,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??etH,position:"sticky",top:0,left:0}),children:[(0,ez.jsxs)(r_.Z,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(e=>{let{formattedTime:t,formattedDate:n}=rg(e);return(0,ez.jsxs)(r_.Z,{children:[(0,ez.jsx)(uD.Z,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:n}),(0,ez.jsx)(uD.Z,{variant:"caption",children:(0,ez.jsx)("strong",{children:t})})]})})(s),(0,ez.jsxs)(th,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[l&&(0,ez.jsxs)(th,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,ez.jsx)(uD.Z,{sx:{fontSize:11},children:"Show All"}),(0,ez.jsx)(enu,{checked:i,size:"small",onChange:(e,t)=>{if(void 0!==o)return o(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),r&&(0,ez.jsxs)(th,{direction:"row",alignItems:"center",children:[(0,ez.jsx)(uD.Z,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:n?etX:etY}),n?(0,ez.jsx)(enc.default,{onClick:()=>{void 0!==a&&a()},sx:{fontSize:16,cursor:"pointer"}}):(0,ez.jsx)(enh.default,{sx:{fontSize:16}})]})]})]}),(0,ez.jsx)(ET.Z,{sx:e=>({width:"100%",borderColor:e.palette.grey["500"]})})]})});function enp(e){let{series:t,wrapLabels:n}=e,i=(0,eV.useMemo)(()=>null===t?null:t.sort((e,t)=>e.y>t.y?-1:1),[t]);return null===t||null===i?null:(0,ez.jsx)(r_.Z,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:i.map(({datumIdx:e,seriesIdx:t,seriesName:r,y:o,formattedY:a,markerColor:s,isClosestToCursor:l})=>{if(null===e||null===t)return null;let u=t.toString()+e.toString();return(0,ez.jsx)(etK,{seriesName:r,y:o,formattedY:a,markerColor:s,totalSeries:i.length,wrapLabels:n,emphasizeText:l},u)})})}let enf=(0,eV.memo)(function({containerId:e,chartRef:t,data:n,seriesMapping:i,enablePinning:r=!0,wrapLabels:o,format:a,onUnpinClick:s,pinnedPos:l}){var u,c,h,d,p,f,g,m,v,y,x,b,w,S,_,C,M;let[k,T]=(0,eV.useState)(!1),D=(0,eV.useRef)(),I=etU(),{height:A,width:P,ref:O}=(void 0===u&&(u={}),c=u.onResize,(h=(0,eV.useRef)(void 0)).current=c,d=u.round||Math.round,p=(0,eV.useRef)(),g=(f=(0,eV.useState)({width:void 0,height:void 0}))[0],m=f[1],v=(0,eV.useRef)(!1),(0,eV.useEffect)(function(){return v.current=!1,function(){v.current=!0}},[]),y=(0,eV.useRef)({width:void 0,height:void 0}),x=(0,eV.useCallback)(function(e){return p.current&&p.current.box===u.box&&p.current.round===d||(p.current={box:u.box,round:d,instance:new ResizeObserver(function(e){var t=e[0],n="border-box"===u.box?"borderBoxSize":"device-pixel-content-box"===u.box?"devicePixelContentBoxSize":"contentBoxSize",i=etJ(t,n,"inlineSize"),r=etJ(t,n,"blockSize"),o=i?d(i):void 0,a=r?d(r):void 0;if(y.current.width!==o||y.current.height!==a){var s={width:o,height:a};y.current.width=o,y.current.height=a,h.current?h.current(s):v.current||m(s)}})}),p.current.instance.observe(e,{box:u.box}),function(){p.current&&p.current.instance.unobserve(e)}},[u.box,d]),b=u.ref,w=(0,eV.useRef)(null),(S=(0,eV.useRef)(null)).current=b,_=(0,eV.useRef)(null),(0,eV.useEffect)(function(){C()}),C=(0,eV.useCallback)(function(){var e=_.current,t=S.current,n=e||(t?t instanceof Element?t:t.current:null);(!w.current||w.current.element!==n||w.current.subscriber!==x)&&(w.current&&w.current.cleanup&&w.current.cleanup(),w.current={element:n,subscriber:x,cleanup:n?x(n):void 0})},[x]),(0,eV.useEffect)(function(){return function(){w.current&&w.current.cleanup&&(w.current.cleanup(),w.current=null)}},[]),M=(0,eV.useCallback)(function(e){_.current=e,C()},[C]),(0,eV.useMemo)(function(){return{ref:M,width:g.width,height:g.height}},[M,g.width,g.height])),R=null!==l&&r;if(null===I||null===I.target||null===n||null===l&&"CANVAS"!==I.target.tagName)return null;let E=t.current,L=e?document.querySelector(e):void 0,B=L?L.getBoundingClientRect().height:void 0;D.current=et0(I,l,A??0,P??0,L);let N=et6({mousePos:I,data:n,seriesMapping:i,pinnedPos:l,chart:E,format:a,showAllSeries:k});if(0===N.length)return null;let F=n.length;return(0,ez.jsx)(etQ.Z,{container:L,children:(0,ez.jsx)(r_.Z,{ref:O,sx:e=>et1(e,l,B),style:{transform:D.current},children:(0,ez.jsxs)(th,{spacing:.5,children:[(0,ez.jsx)(end,{nearbySeries:N,totalSeries:F,enablePinning:r,isTooltipPinned:R,showAllSeries:k,onShowAllClick:e=>T(e),onUnpinClick:s}),(0,ez.jsx)(enp,{series:N,wrapLabels:o})]})})})}),eng=(0,eU.ZP)(e8.Z)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),enm=(0,eV.forwardRef)(function(e,t){return(0,ez.jsx)(eng,{ref:t,variant:"outlined",color:"secondary",...e})}),env=Object.entries(i0).map(([e,t])=>({id:e,...t})).filter(e=>!e.disableSelectorOption),eny=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function enx({value:e,onChange:t,disabled:n=!1}){var i;let r=!!i5(e).decimalPlaces,o=!!i5(e).shortValues,a=({decimalPlaces:n})=>{r&&t({...e,decimalPlaces:n})},s=i0[e.unit];return(0,ez.jsxs)(ez.Fragment,{children:[(0,ez.jsx)(c9,{label:"Short values",control:(0,ez.jsx)(enu,{checked:!!o&&!1!==e.shortValues,onChange:(n,i)=>{o&&t({...e,shortValues:i})},disabled:!o})}),(0,ez.jsx)(c9,{label:"Unit",control:(0,ez.jsx)(hi,{value:{id:e.unit,...s},options:env,groupBy:e=>e.group,onChange:(e,n)=>{t({unit:n.id})},disableClearable:!0,disabled:n})}),(0,ez.jsx)(c9,{label:"Decimals",control:(0,ez.jsx)(hi,{value:(i=e.decimalPlaces,eny.find(e=>e.decimalPlaces===i)),options:eny,getOptionLabel:e=>e.label,onChange:(e,t)=>a(t),disabled:!r,disableClearable:!0})})]})}function enb({name:e,height:t}){return(0,ez.jsx)(r_.Z,{style:{maxWidth:t,top:`calc(${t}px / 2)`},sx:{display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},children:(0,ez.jsx)(uD.Z,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var enw=n(6385);let enS=rm((0,enw.Z)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),en_={chartsTheme:enS,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null},enC={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`& .${Ec.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${Ec.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`& .${Ec.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${Ec.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`& .${Ec.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${Ec.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`& .${Ec.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${Ec.icon}`]:{color:e.palette.warning.main}},root:{["& ."+n(757).Z.root]:{textDecoration:"underline"}}}},enM={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},enk={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},enT="#FFFFFF",enD=e=>{let t=enM["800"],n=enM["300"];return"light"===e?{navigation:t,accent:n,primary:enM["800"],secondary:enM["700"],disabled:enM["300"],link:enk["500"],linkHover:enk["600"]}:{navigation:t,accent:n,primary:enT,secondary:enM["50"],disabled:enM["600"],link:enk["400"],linkHover:enk["500"]}},enI=e=>{let t=enk["150"],n="rgba(21, 23, 33, 0.75)";return"light"===e?{navigation:t,overlay:n,default:enT,paper:enM["50"],code:enM["50"],tooltip:enM["100"],lighter:enM["50"],border:enM["100"]}:{navigation:t,overlay:n,default:enM["900"],paper:enM["850"],code:enM["800"],tooltip:enM["600"],lighter:enM["700"],border:enM["600"]}},enA=e=>"light"===e?{50:enM["50"],100:enM["100"],200:enM["200"],300:enM["300"],400:enM["400"],500:enM["500"],600:enM["600"],700:enM["700"],800:enM["800"],900:enM["900"],950:enM["950"]}:{50:enM["950"],100:enM["900"],200:enM["800"],300:enM["700"],400:enM["600"],500:enM["500"],600:enM["400"],700:enM["300"],800:enM["200"],900:enM["100"],950:enM["50"]},enP=e=>"light"===e?{main:enk["500"],dark:enk["600"],light:enk["50"]}:{main:enk["400"],dark:enk["800"],light:enk["200"]},enO=e=>"light"===e?{main:enM["600"],dark:enM["900"],light:enM["100"]}:{main:enT,dark:enT,light:enT},enR={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},enE={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},enL={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},enB={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},enN=e=>"light"===e?{main:enB["500"],dark:enB["600"],light:enB["50"]}:{main:enB["400"],dark:enB["800"],light:enB["300"]},enF=e=>"light"===e?{main:enR["500"],dark:enR["700"],light:enR["50"]}:{main:enR["400"],dark:enR["800"],light:enR["300"]},enz=e=>"light"===e?{main:enE["500"],dark:enE["700"],light:enE["50"]}:{main:enE["400"],dark:enE["800"],light:enE["300"]},enV={fontFamily:'"Lato", sans-serif',fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:700,fontWeightBold:900,h1:{fontSize:"1.5rem",fontWeight:700,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:700,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:700,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:700,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:400,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:400,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:400,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:700,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:700,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:400,lineHeight:"16px"}},enZ=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function enj(e,t={}){return(0,enw.Z)({palette:{mode:e,primary:enP(e),secondary:enO(e),grey:enA(e),background:enI(e),text:enD(e),error:enN(e),warning:enz(e),info:enP(e),success:enF(e),common:{white:enT,black:"#000000"},designSystem:{blue:enk,green:enR,grey:enM,orange:enE,purple:enL,red:enB}},typography:enV,mixins:{},components:enH,...t})}let enH={MuiAlert:enC,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:{styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:enZ}},MuiDialog:{styleOverrides:{paper:enZ}},MuiPopover:{styleOverrides:{paper:enZ}}};var enW=n(4974),en$=n(2449),enG=n(8418),enU=n(7689);let enq={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series"};function enY({value:e,onChange:t}){return(0,ez.jsxs)(th,{direction:"row",children:[(0,ez.jsx)(ht.Z,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,ez.jsx)(tp.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,i)=>{t({...e,spec:{...e.spec,columns:i}})}}),(0,ez.jsx)(GV.Z,{label:"Enabled",labelPlacement:"start",control:(0,ez.jsx)(enu,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function enX({value:e,onChange:t}){return(0,ez.jsxs)(th,{direction:"row",gap:1,alignItems:"center",children:[(0,ez.jsx)(ht.Z,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,ez.jsx)(tp.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,i)=>{t({...e,spec:{...e.spec,columns:i}})}}),(0,ez.jsx)(cd,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:e.spec.name??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,name:n}})},required:!0}),(0,ez.jsx)(GV.Z,{label:"Enabled",labelPlacement:"start",control:(0,ez.jsx)(enu,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function enK({value:e,onChange:t}){return(0,ez.jsxs)(th,{direction:"row",children:[(0,ez.jsx)(cd,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:e.spec.column??"",sx:{width:"100%"},onChange:n=>{t({...e,spec:{...e.spec,column:n}})},required:!0}),(0,ez.jsx)(GV.Z,{label:"Enabled",labelPlacement:"start",control:(0,ez.jsx)(enu,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function enQ({value:e,onChange:t}){return(0,ez.jsx)(th,{direction:"row",children:(0,ez.jsx)(GV.Z,{label:"Enabled",labelPlacement:"start",control:(0,ez.jsx)(enu,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function enJ({value:e,onChange:t,...n}){return(0,ez.jsxs)(th,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,ez.jsxs)(cd,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,ez.jsx)(h3.Z,{value:"JoinByColumnValue",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Join by column value"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,ez.jsx)(h3.Z,{value:"MergeColumns",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Merge columns"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,ez.jsx)(h3.Z,{value:"MergeIndexedColumns",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Merge indexed columns"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,ez.jsx)(h3.Z,{value:"MergeSeries",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Merge series"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,ez.jsx)(enY,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,ez.jsx)(enX,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,ez.jsx)(enK,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,ez.jsx)(enQ,{value:e,onChange:t})]})}function en0({index:e,value:t,isCollapsed:n,onChange:i,onCollapse:r,onDelete:o,...a}){return(0,ez.jsxs)(th,{...a,children:[(0,ez.jsxs)(th,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,ez.jsxs)(th,{direction:"row",gap:1,children:[(0,ez.jsx)(td.Z,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>r(!n),children:n?(0,ez.jsx)(enW.default,{}):(0,ez.jsx)(en$.default,{})}),(0,ez.jsx)(uD.Z,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,ez.jsx)("span",{children:(0,ez.jsx)("strong",{children:enq[t.kind]})}):(0,ez.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,ez.jsxs)(th,{direction:"row",gap:1,children:[n&&(0,ez.jsxs)(ez.Fragment,{children:[(0,ez.jsx)(c5.Z,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,ez.jsx)(td.Z,{size:"small",sx:{marginLeft:"auto"},onClick:function(){i({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,ez.jsx)(enG.default,{}):(0,ez.jsx)(enU.default,{})})}),(0,ez.jsx)(ET.Z,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,ez.jsx)(c5.Z,{title:"Remove transformation",placement:"top",children:(0,ez.jsx)(td.Z,{size:"small",sx:{marginLeft:"auto"},onClick:o,children:(0,ez.jsx)(qe.default,{})})})]})]}),!n&&(0,ez.jsx)(enJ,{value:t,onChange:i})]})}function en1({value:e,onChange:t,...n}){let[i,r]=(0,eV.useState)(e.map(()=>!0));return(0,ez.jsxs)(th,{gap:1,...n,children:[e.map((n,o)=>(0,ez.jsx)(en0,{index:o,value:n,isCollapsed:i[o]??!0,onChange:n=>(function(n,i){let r=[...e];r[n]=i,t(r)})(o,n),onDelete:()=>(function(n){let i=[...e];i.splice(n,1),t(i),r(e=>(e.splice(n,1),[...e]))})(o),onCollapse:e=>{r(t=>(t[o]=e,[...t]))}},o)),(0,ez.jsx)(e8.Z,{variant:"contained",startIcon:(0,ez.jsx)(UN.default,{}),sx:{marginTop:1},onClick:function(){let n=[...e];n.push({kind:"",spec:{}}),t(n),r(e=>(e.push(!1),[...e]))},children:"Add Transformation"})]})}function en2(e){let{value:t,onChange:n,timeOptions:i,height:r}=e,o=(0,eV.useMemo)(()=>{if(t&&!i.some(e=>e.value.pastDuration===t))return(0,ez.jsx)(h3.Z,{value:t,children:t})},[i,t]);return(0,ez.jsx)(c0.Z,{children:(0,ez.jsx)(r_.Z,{children:(0,ez.jsxs)(qr.Z,{id:"refreshInterval",value:t,onChange:e=>{n(e.target.value)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":r?{lineHeight:r,paddingY:0}:{}},children:[i.map((e,t)=>(0,ez.jsx)(h3.Z,{value:e.value.pastDuration,children:e.display},t)),o]})})})}var en5=n(1104),en3=n(8971);let en4=(e,t)=>e.filter(e=>t.includes(e)),en8=(e,t,n)=>{let i=e.keys[0];Array.isArray(t)?t.forEach((t,i)=>{n((t,n)=>{i<=e.keys.length-1&&(0===i?Object.assign(t,n):t[e.up(e.keys[i])]=n)},t)}):t&&"object"==typeof t?(Object.keys(t).length>e.keys.length?e.keys:en4(e.keys,Object.keys(t))).forEach(r=>{if(e.keys.includes(r)){let o=t[r];void 0!==o&&n((t,n)=>{i===r?Object.assign(t,n):t[e.up(r)]=n},o)}}):("number"==typeof t||"string"==typeof t)&&n((e,t)=>{Object.assign(e,t)},t)};function en6(e){return`--Grid-${e}Spacing`}function en9(e){return`--Grid-parent-${e}Spacing`}let en7="--Grid-columns",eie="--Grid-parent-columns",eit=({theme:e,ownerState:t})=>{let n={};return en8(e.breakpoints,t.size,(e,t)=>{let i={};"grow"===t&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${eie}) - (var(${eie}) - ${t}) * (var(${en9("column")}) / var(${eie})))`}),e(n,i)}),n},ein=({theme:e,ownerState:t})=>{let n={};return en8(e.breakpoints,t.offset,(e,t)=>{let i={};"auto"===t&&(i={marginLeft:"auto"}),"number"==typeof t&&(i={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${eie}) + var(${en9("column")}) * ${t} / var(${eie}))`}),e(n,i)}),n},eii=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[en7]:12};return en8(e.breakpoints,t.columns,(e,t)=>{let i=t??12;e(n,{[en7]:i,"> *":{[eie]:i}})}),n},eir=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return en8(e.breakpoints,t.rowSpacing,(t,i)=>{let r="string"==typeof i?i:e.spacing?.(i);t(n,{[en6("row")]:r,"> *":{[en9("row")]:r}})}),n},eio=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return en8(e.breakpoints,t.columnSpacing,(t,i)=>{let r="string"==typeof i?i:e.spacing?.(i);t(n,{[en6("column")]:r,"> *":{[en9("column")]:r}})}),n},eia=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return en8(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},eis=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${en6("row")}) var(${en6("column")})`}}),eil=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{!1!==n&&void 0!==n&&t.push(`grid-${e}-${String(n)}`)}),t},eiu=(e,t="xs")=>{function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,i])=>{n(i)&&t.push(`spacing-${e}-${String(i)}`)}),t}return[]},eic=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],eih=(0,tn.Z)(),eid=(0,e7.Z)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function eip(e){return(0,te.Z)({props:e,name:"MuiGrid",defaultTheme:eih})}let eif=function(e={}){let{createStyledComponent:t=eid,useThemeProps:n=eip,useTheme:i=en3.Z,componentName:r="MuiGrid"}=e,o=(e,t)=>{let{container:n,direction:i,spacing:o,wrap:a,size:s}=e,l={root:["root",n&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...eic(i),...eil(s),...n?eiu(o,t.breakpoints.keys[0]):[]]};return(0,eH.Z)(l,e=>(0,eQ.ZP)(r,e),{})};function a(e,t,n=()=>!0){let i={};return null===e||(Array.isArray(e)?e.forEach((e,r)=>{null!==e&&n(e)&&t.keys[r]&&(i[t.keys[r]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{let r=e[t];null!=r&&n(r)&&(i[t]=r)}):i[t.keys[0]]=e),i}let s=t(eii,eio,eir,eit,eia,eis,ein),l=eV.forwardRef(function(e,t){let r=i(),l=n(e),u=(0,tt.Z)(l);!function(e,t){let n=[];void 0!==e.item&&(delete e.item,n.push("item")),void 0!==e.zeroMinWidth&&(delete e.zeroMinWidth,n.push("zeroMinWidth")),t.keys.forEach(t=>{void 0!==e[t]&&(n.push(t),delete e[t])})}(u,r.breakpoints);let{className:c,children:h,columns:d=12,container:p=!1,component:f="div",direction:g="row",wrap:m="wrap",size:v={},offset:y={},spacing:x=0,rowSpacing:b=x,columnSpacing:w=x,unstable_level:S=0,..._}=u,C=a(v,r.breakpoints,e=>!1!==e),M=a(y,r.breakpoints),k=e.columns??(S?void 0:d),T=e.spacing??(S?void 0:x),D=e.rowSpacing??e.spacing??(S?void 0:b),I=e.columnSpacing??e.spacing??(S?void 0:w),A={...u,level:S,columns:k,container:p,direction:g,wrap:m,spacing:T,rowSpacing:D,columnSpacing:I,size:C,offset:M},P=o(A,r);return(0,ez.jsx)(s,{ref:t,as:f,ownerState:A,className:(0,ej.Z)(P.root,c),..._,children:eV.Children.map(h,e=>eV.isValidElement(e)&&(0,en5.Z)(e,["Grid"])&&p&&e.props.container?eV.cloneElement(e,{unstable_level:e.props?.unstable_level??S+1}):e)})});return l.muiName="Grid",l}({createStyledComponent:(0,eU.ZP)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,eX.i)({props:e,name:"MuiGrid2"}),useTheme:rS.Z}),eig=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,ez.jsx)(th,{gap:1,direction:"row",...n,children:(0,ez.jsx)(tp.Z,{label:"Value",placeholder:"Exact value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{...e.spec,value:n.target.value}}),fullWidth:!0})});case"Range":return(0,ez.jsxs)(th,{gap:1,direction:"row",...n,children:[(0,ez.jsx)(tp.Z,{label:"From",placeholder:"Start of range",value:e.spec?.from??"",onChange:n=>t({...e,spec:{...e.spec,from:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0}),(0,ez.jsx)(tp.Z,{label:"To",placeholder:"End of range (inclusive)",value:e.spec?.to??"",onChange:n=>t({...e,spec:{...e.spec,to:""===n.target.value?void 0:+n.target.value}}),fullWidth:!0})]});case"Regex":return(0,ez.jsx)(th,{gap:1,direction:"row",...n,children:(0,ez.jsx)(tp.Z,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:e.spec?.pattern??"",onChange:n=>t({...e,spec:{...e.spec,pattern:n.target.value}}),fullWidth:!0})});case"Misc":return(0,ez.jsx)(th,{gap:1,direction:"row",...n,children:(0,ez.jsxs)(tp.Z,{select:!0,label:"Value",value:e.spec?.value??"",onChange:n=>t({...e,spec:{value:n.target.value}}),SelectProps:{renderValue:e=>{switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}},fullWidth:!0,children:[(0,ez.jsx)(h3.Z,{value:"empty",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Empty"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches empty string"})]})}),(0,ez.jsx)(h3.Z,{value:"null",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Null"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches null or undefined"})]})}),(0,ez.jsx)(h3.Z,{value:"NaN",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"NaN"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,ez.jsx)(h3.Z,{value:"true",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"True"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches true boolean"})]})}),(0,ez.jsx)(h3.Z,{value:"false",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"False"}),(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},eim=({mapping:e,onChange:t,onDelete:n,...i})=>{let r=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,ez.jsxs)(eif,{container:!0,spacing:2,...i,children:[(0,ez.jsx)(eif,{size:{xs:5},children:(0,ez.jsxs)(th,{direction:"row",gap:1,width:"100%",children:[(0,ez.jsxs)(tp.Z,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,ez.jsx)(h3.Z,{value:"Value",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Value"}),"Value"!==e.kind&&(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches an exact text value"})]})}),(0,ez.jsx)(h3.Z,{value:"Range",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Range"}),"Range"!==e.kind&&(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,ez.jsx)(h3.Z,{value:"Regex",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Regex"}),"Regex"!==e.kind&&(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,ez.jsx)(h3.Z,{value:"Misc",children:(0,ez.jsxs)(th,{children:[(0,ez.jsx)(uD.Z,{children:"Misc"}),"Misc"!==e.kind&&(0,ez.jsx)(uD.Z,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,ez.jsx)(eig,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,ez.jsx)(eif,{size:{xs:4},children:(0,ez.jsx)(tp.Z,{label:"Display text",value:e.spec?.result?.value??"",onChange:n=>t({...e,spec:{...e.spec,result:{...e.spec?.result,value:n.target.value}}}),fullWidth:!0})}),(0,ez.jsx)(eif,{size:{xs:1},children:(0,ez.jsx)(th,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,ez.jsx)(rb,{label:"Color",color:e.spec.result.color??"#000",onColorChange:r,onClear:()=>r(void 0)}):(0,ez.jsx)(td.Z,{onClick:()=>r("#000"),children:(0,ez.jsx)(UN.default,{})})})}),(0,ez.jsx)(eif,{size:{xs:1},textAlign:"end",children:(0,ez.jsx)(c5.Z,{title:"Remove mapping settings",placement:"top",children:(0,ez.jsx)(td.Z,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,ez.jsx)(qe.default,{})})})})]})},eiv=({mappings:e,onChange:t})=>{let[n,i]=(0,eV.useState)(e);return(0,ez.jsxs)(th,{spacing:1,children:[(0,ez.jsxs)(eif,{container:!0,spacing:2,children:[(0,ez.jsx)(eif,{size:{xs:5},children:(0,ez.jsx)(uD.Z,{variant:"subtitle1",children:"Condition"})}),(0,ez.jsx)(eif,{size:{xs:4},children:(0,ez.jsx)(uD.Z,{variant:"subtitle1",children:"Display Text"})}),(0,ez.jsx)(eif,{size:{xs:1},textAlign:"center",children:(0,ez.jsx)(uD.Z,{variant:"subtitle1",children:"Color"})}),(0,ez.jsx)(eif,{size:{xs:1}})]}),(0,ez.jsx)(th,{gap:1.5,divider:(0,ez.jsx)(ET.Z,{flexItem:!0,orientation:"horizontal"}),children:n.map((e,r)=>(0,ez.jsx)(eim,{mapping:e,onChange:e=>(function(e,r){let o=[...n];o[e]=r,i(o),t(o)})(r,e),onDelete:()=>(function(e){let r=[...n];r.splice(e,1),i(r),t(r)})(r)},r))}),(0,ez.jsx)(e8.Z,{variant:"contained",startIcon:(0,ez.jsx)(UN.default,{}),sx:{marginTop:1},onClick:function(){let e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),i(e),t(e)},children:"Add value mappings"})]})}},8118:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=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}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var r=n(3778);function o(e){return void 0===e?void 0:"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,n){var a=t.map(function(t){var a=null==n?t:i(i({},t),{options:i(i({},o(n)),o(t.options))});return(0,r.bind)(e,a)});return function(){a.forEach(function(e){return e()})}}},3778:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var n=t.type,i=t.listener,r=t.options;return e.addEventListener(n,i,r),function(){e.removeEventListener(n,i,r)}}},501:function(e,t,n){"use strict";t.bindAll=t.bind=void 0;var i=n(3778);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return i.bind}});var r=n(8118);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return r.bindAll}})},2545:function(e,t,n){var i=n(1822)(n(7400),"DataView");e.exports=i},6586:function(e,t,n){var i=n(7753),r=n(2452),o=n(2115),a=n(8256),s=n(7426);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},6301:function(e,t,n){var i=n(9417),r=n(2470),o=n(6165),a=n(1873),s=n(2556);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},7836:function(e,t,n){var i=n(1822)(n(7400),"Map");e.exports=i},4554:function(e,t,n){var i=n(9448),r=n(7738),o=n(6575),a=n(7238),s=n(8738);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},4825:function(e,t,n){var i=n(1822)(n(7400),"Promise");e.exports=i},6151:function(e,t,n){var i=n(1822)(n(7400),"Set");e.exports=i},2485:function(e,t,n){var i=n(4554),r=n(8639),o=n(8379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,e.exports=a},3694:function(e,t,n){var i=n(6301),r=n(7354),o=n(5863),a=n(2367),s=n(748),l=n(7569);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,e.exports=u},6539:function(e,t,n){var i=n(7400).Symbol;e.exports=i},9942:function(e,t,n){var i=n(7400).Uint8Array;e.exports=i},6902:function(e,t,n){var i=n(1822)(n(7400),"WeakMap");e.exports=i},9349:function(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},263:function(e){e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[r++]=a)}return o}},8213:function(e,t,n){var i=n(4701),r=n(2900),o=n(9785),a=n(3854),s=n(2383),l=n(8519),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&r(e),h=!n&&!c&&a(e),d=!n&&!c&&!h&&l(e),p=n||c||h||d,f=p?i(e.length,String):[],g=f.length;for(var m in e)(t||u.call(e,m))&&!(p&&("length"==m||h&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g)))&&f.push(m);return f}},7141:function(e){e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},756:function(e){e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},3140:function(e,t,n){var i=n(8799),r=n(5638);e.exports=function(e,t,n){(void 0===n||r(e[t],n))&&(void 0!==n||t in e)||i(e,t,n)}},1928:function(e,t,n){var i=n(8799),r=n(5638),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&r(a,n)&&(void 0!==n||t in e)||i(e,t,n)}},5041:function(e,t,n){var i=n(5638);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return -1}},8799:function(e,t,n){var i=n(2630);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},158:function(e,t,n){var i=n(1611),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9819:function(e,t,n){var i=n(8911)();e.exports=i},1324:function(e,t,n){var i=n(7141),r=n(9785);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},9736:function(e,t,n){var i=n(6539),r=n(4840),o=n(1258),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):o(e)}},5829:function(e,t,n){var i=n(9736),r=n(2360);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},2866:function(e,t,n){var i=n(2772),r=n(2360);e.exports=function e(t,n,o,a,s){return t===n||(null!=t&&null!=n&&(r(t)||r(n))?i(t,n,o,a,e,s):t!=t&&n!=n)}},2772:function(e,t,n){var i=n(3694),r=n(7042),o=n(370),a=n(9584),s=n(3533),l=n(9785),u=n(3854),c=n(8519),h="[object Arguments]",d="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),x=l(t),b=y?d:s(e),w=x?d:s(t);b=b==h?p:b,w=w==h?p:w;var S=b==p,_=w==p,C=b==w;if(C&&u(e)){if(!u(t))return!1;y=!0,S=!1}if(C&&!S)return v||(v=new i),y||c(e)?r(e,t,n,g,m,v):o(e,t,b,n,g,m,v);if(!(1&n)){var M=S&&f.call(e,"__wrapped__"),k=_&&f.call(t,"__wrapped__");if(M||k){var T=M?e.value():e,D=k?t.value():t;return v||(v=new i),m(T,D,n,g,v)}}return!!C&&(v||(v=new i),a(e,t,n,g,m,v))}},6729:function(e,t,n){var i=n(8338),r=n(9678),o=n(1611),a=n(6532),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,h=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?h:s).test(a(e))}},6972:function(e,t,n){var i=n(9736),r=n(4194),o=n(2360),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!a[i(e)]}},186:function(e,t,n){var i=n(6016),r=n(962),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9464:function(e,t,n){var i=n(1611),r=n(6016),o=n(1586),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return o(e);var t=r(e),n=[];for(var s in e)"constructor"==s&&(t||!a.call(e,s))||n.push(s);return n}},15:function(e,t,n){var i=n(3694),r=n(3140),o=n(9819),a=n(8867),s=n(1611),l=n(3893),u=n(7494);e.exports=function e(t,n,c,h,d){t!==n&&o(n,function(o,l){if(d||(d=new i),s(o))a(t,n,l,c,e,h,d);else{var p=h?h(u(t,l),o,l+"",t,n,d):void 0;void 0===p&&(p=o),r(t,l,p)}},l)}},8867:function(e,t,n){var i=n(3140),r=n(2734),o=n(3428),a=n(7561),s=n(7635),l=n(2900),u=n(9785),c=n(6468),h=n(3854),d=n(8338),p=n(1611),f=n(861),g=n(8519),m=n(7494),v=n(9328);e.exports=function(e,t,n,y,x,b,w){var S=m(e,n),_=m(t,n),C=w.get(_);if(C){i(e,n,C);return}var M=b?b(S,_,n+"",e,t,w):void 0,k=void 0===M;if(k){var T=u(_),D=!T&&h(_),I=!T&&!D&&g(_);M=_,T||D||I?u(S)?M=S:c(S)?M=a(S):D?(k=!1,M=r(_,!0)):I?(k=!1,M=o(_,!0)):M=[]:f(_)||l(_)?(M=S,l(S)?M=v(S):(!p(S)||d(S))&&(M=s(_))):k=!1}k&&(w.set(_,M),x(M,_,y,b,w),w.delete(_)),i(e,n,M)}},1197:function(e,t,n){var i=n(1137),r=n(1871),o=n(3132);e.exports=function(e,t){return o(r(e,t,i),e+"")}},4459:function(e,t,n){var i=n(551),r=n(2630),o=n(1137),a=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=a},4701:function(e){e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},4833:function(e,t,n){var i=n(6127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},9334:function(e){e.exports=function(e){return function(t){return e(t)}}},5581:function(e){e.exports=function(e,t){return e.has(t)}},5825:function(e,t,n){var i=n(9942);e.exports=function(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}},2734:function(e,t,n){e=n.nmd(e);var i=n(7400),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?i.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,i=s?s(n):new e.constructor(n);return e.copy(i),i}},3428:function(e,t,n){var i=n(5825);e.exports=function(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},7561:function(e){e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},5159:function(e,t,n){var i=n(1928),r=n(8799);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=o?o(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?r(n,u,c):i(n,u,c)}return n}},4937:function(e,t,n){var i=n(7400)["__core-js_shared__"];e.exports=i},7270:function(e,t,n){var i=n(1197),r=n(7535);e.exports=function(e){return i(function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&r(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++i<o;){var l=n[i];l&&e(t,l,i,a)}return t})}},8911:function(e){e.exports=function(e){return function(t,n,i){for(var r=-1,o=Object(t),a=i(t),s=a.length;s--;){var l=a[e?s:++r];if(!1===n(o[l],l,o))break}return t}}},2630:function(e,t,n){var i=n(1822),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},7042:function(e,t,n){var i=n(2485),r=n(756),o=n(5581);e.exports=function(e,t,n,a,s,l){var u=1&n,c=e.length,h=t.length;if(c!=h&&!(u&&h>c))return!1;var d=l.get(e),p=l.get(t);if(d&&p)return d==t&&p==e;var f=-1,g=!0,m=2&n?new i:void 0;for(l.set(e,t),l.set(t,e);++f<c;){var v=e[f],y=t[f];if(a)var x=u?a(y,v,f,t,e,l):a(v,y,f,e,t,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!r(t,function(e,t){if(!o(m,t)&&(v===e||s(v,e,n,a,l)))return m.push(t)})){g=!1;break}}else if(!(v===y||s(v,y,n,a,l))){g=!1;break}}return l.delete(e),l.delete(t),g}},370:function(e,t,n){var i=n(6539),r=n(9942),o=n(5638),a=n(7042),s=n(9383),l=n(3735),u=i?i.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,h,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!h(new r(e),new r(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&i;if(p||(p=l),e.size!=t.size&&!f)break;var g=d.get(e);if(g)return g==t;i|=2,d.set(e,t);var m=a(p(e),p(t),i,u,h,d);return d.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},9584:function(e,t,n){var i=n(1385),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=i(e),c=u.length;if(c!=i(t).length&&!l)return!1;for(var h=c;h--;){var d=u[h];if(!(l?d in t:r.call(t,d)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++h<c;){var v=e[d=u[h]],y=t[d];if(o)var x=l?o(y,v,d,t,e,s):o(v,y,d,e,t,s);if(!(void 0===x?v===y||a(v,y,n,o,s):x)){g=!1;break}m||(m="constructor"==d)}if(g&&!m){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(g=!1)}return s.delete(e),s.delete(t),g}},9120:function(e,t,n){var i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=i},1385:function(e,t,n){var i=n(1324),r=n(3080),o=n(98);e.exports=function(e){return i(e,o,r)}},5899:function(e,t,n){var i=n(4479);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},1822:function(e,t,n){var i=n(6729),r=n(5371);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},2173:function(e,t,n){var i=n(8023)(Object.getPrototypeOf,Object);e.exports=i},4840:function(e,t,n){var i=n(6539),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,s=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=a.call(e);return i&&(t?e[s]=n:delete e[s]),r}},3080:function(e,t,n){var i=n(263),r=n(5937),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:i(a(e=Object(e)),function(t){return o.call(e,t)})}:r;e.exports=s},3533:function(e,t,n){var i=n(2545),r=n(7836),o=n(4825),a=n(6151),s=n(6902),l=n(9736),u=n(6532),c="[object Map]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",g=u(i),m=u(r),v=u(o),y=u(a),x=u(s),b=l;(i&&b(new i(new ArrayBuffer(1)))!=f||r&&b(new r)!=c||o&&b(o.resolve())!=h||a&&b(new a)!=d||s&&b(new s)!=p)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case g:return f;case m:return c;case v:return h;case y:return d;case x:return p}return t}),e.exports=b},5371:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},7753:function(e,t,n){var i=n(5718);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},2452:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}},2115:function(e,t,n){var i=n(5718),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},8256:function(e,t,n){var i=n(5718),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},7426:function(e,t,n){var i=n(5718);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},7635:function(e,t,n){var i=n(158),r=n(2173),o=n(6016);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:i(r(e))}},2383:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==i||"symbol"!=i&&t.test(e))&&e>-1&&e%1==0&&e<n}},7535:function(e,t,n){var i=n(5638),r=n(68),o=n(2383),a=n(1611);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return("number"==s?!!(r(n)&&o(t,n.length)):"string"==s&&t in n)&&i(n[t],e)}},4479:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},9678:function(e,t,n){var i,r=n(4937),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},6016:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9417:function(e){e.exports=function(){this.__data__=[],this.size=0}},2470:function(e,t,n){var i=n(5041),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},6165:function(e,t,n){var i=n(5041);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},1873:function(e,t,n){var i=n(5041);e.exports=function(e){return i(this.__data__,e)>-1}},2556:function(e,t,n){var i=n(5041);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},9448:function(e,t,n){var i=n(6586),r=n(6301),o=n(7836);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},7738:function(e,t,n){var i=n(5899);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=+!!t,t}},6575:function(e,t,n){var i=n(5899);e.exports=function(e){return i(this,e).get(e)}},7238:function(e,t,n){var i=n(5899);e.exports=function(e){return i(this,e).has(e)}},8738:function(e,t,n){var i=n(5899);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this}},9383:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}},5718:function(e,t,n){var i=n(1822)(Object,"create");e.exports=i},962:function(e,t,n){var i=n(8023)(Object.keys,Object);e.exports=i},1586:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},8125:function(e,t,n){e=n.nmd(e);var i=n(9120),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&i.process,s=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},1258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},8023:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},1871:function(e,t,n){var i=n(9349),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=r(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=n(l),i(e,this,u)}}},7400:function(e,t,n){var i=n(9120),r="object"==typeof self&&self&&self.Object===Object&&self,o=i||r||Function("return this")();e.exports=o},7494:function(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},8639:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8379:function(e){e.exports=function(e){return this.__data__.has(e)}},3735:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},3132:function(e,t,n){var i=n(4459),r=n(9591)(i);e.exports=r},9591:function(e){var t=Date.now;e.exports=function(e){var n=0,i=0;return function(){var r=t(),o=16-(r-i);if(i=r,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7354:function(e,t,n){var i=n(6301);e.exports=function(){this.__data__=new i,this.size=0}},5863:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},2367:function(e){e.exports=function(e){return this.__data__.get(e)}},748:function(e){e.exports=function(e){return this.__data__.has(e)}},7569:function(e,t,n){var i=n(6301),r=n(7836),o=n(4554);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!r||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},6532:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},6127:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},551:function(e){e.exports=function(e){return function(){return e}}},6726:function(e,t,n){var i=n(1611),r=n(2846),o=n(1936),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,h,d,p,f=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=l,i=u;return l=u=void 0,f=t,h=e.apply(i,n)}function x(e){var n=e-p,i=e-f;return void 0===p||n>=t||n<0||m&&i>=c}function b(){var e,n,i,o=r();if(x(o))return w(o);d=setTimeout(b,(e=o-p,n=o-f,i=t-e,m?s(i,c-n):i))}function w(e){return(d=void 0,v&&l)?y(e):(l=u=void 0,h)}function S(){var e,n=r(),i=x(n);if(l=arguments,u=this,p=n,i){if(void 0===d)return f=e=p,d=setTimeout(b,t),g?y(e):h;if(m)return clearTimeout(d),d=setTimeout(b,t),y(p)}return void 0===d&&(d=setTimeout(b,t)),h}return t=o(t)||0,i(n)&&(g=!!n.leading,c=(m="maxWait"in n)?a(o(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=u=d=void 0},S.flush=function(){return void 0===d?h:w(r())},S}},5638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},1137:function(e){e.exports=function(e){return e}},2900:function(e,t,n){var i=n(5829),r=n(2360),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(e){return r(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},9785:function(e){var t=Array.isArray;e.exports=t},68:function(e,t,n){var i=n(8338),r=n(4194);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},6468:function(e,t,n){var i=n(68),r=n(2360);e.exports=function(e){return r(e)&&i(e)}},3854:function(e,t,n){e=n.nmd(e);var i=n(7400),r=n(7714),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?i.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||r},6141:function(e,t,n){var i=n(2866);e.exports=function(e,t){return i(e,t)}},8338:function(e,t,n){var i=n(9736),r=n(1611);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4194:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},1611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},861:function(e,t,n){var i=n(9736),r=n(2173),o=n(2360),a=Object.prototype,s=Function.prototype.toString,l=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=i(e))return!1;var t=r(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},5193:function(e,t,n){var i=n(9736),r=n(2360);e.exports=function(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==i(e)}},8519:function(e,t,n){var i=n(6972),r=n(9334),o=n(8125),a=o&&o.isTypedArray,s=a?r(a):i;e.exports=s},98:function(e,t,n){var i=n(8213),r=n(186),o=n(68);e.exports=function(e){return o(e)?i(e):r(e)}},3893:function(e,t,n){var i=n(8213),r=n(9464),o=n(68);e.exports=function(e){return o(e)?i(e,!0):r(e)}},5409:function(e,t,n){var i=n(15),r=n(7270)(function(e,t,n){i(e,t,n)});e.exports=r},2846:function(e,t,n){var i=n(7400);e.exports=function(){return i.Date.now()}},5937:function(e){e.exports=function(){return[]}},7714:function(e){e.exports=function(){return!1}},1936:function(e,t,n){var i=n(4833),r=n(1611),o=n(5193),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=l.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?a:+e}},9328:function(e,t,n){var i=n(5159),r=n(3893);e.exports=function(e){return i(e,r(e))}},9986:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},2449:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},4974:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},791:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Circle")},763:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},354:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},2446:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z","DeleteOutline")},1682:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},8418:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},7689:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},9398:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z","InformationOutline")},6396:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M19,13H5V11H19V13Z","Minus")},1889:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},5186:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},3755:function(e,t,n){"use strict";t.default=void 0;var i,r=(i=n(265))&&i.__esModule?i:{default:i};t.default=(0,r.default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},8715:function(e,t,n){!function(e,t){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}(t);function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var r={error:null},o=function(e){function t(){for(var t,n=arguments.length,i=Array(n),o=0;o<n;o++)i[o]=arguments[o];return(t=e.call.apply(e,[this].concat(i))||this).state=r,t.resetErrorBoundary=function(){for(var e,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];null==t.props.onReset||(e=t.props).onReset.apply(e,i),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var o=t.prototype;return o.reset=function(){this.setState(r)},o.componentDidCatch=function(e,t){var n,i;null==(n=(i=this.props).onError)||n.call(i,e,t)},o.componentDidUpdate=function(e,t){var n,i,r,o,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(n=e.resetKeys)&&(n=[]),void 0===(i=s)&&(i=[]),n.length!==i.length||n.some(function(e,t){return!Object.is(e,i[t])}))&&(null==(r=(o=this.props).onResetKeysChange)||r.call(o,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,i=t.fallbackRender,r=t.FallbackComponent,o=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(o))return o;if("function"==typeof i)return i(a);if(r)return n.createElement(r,a);else throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(n.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=n.useState(null),i=t[0],r=t[1];if(null!=e)throw e;if(null!=i)throw i;return r},e.withErrorBoundary=function(e,t){var i=function(i){return n.createElement(o,t,n.createElement(e,i))},r=e.displayName||e.name||"Unknown";return i.displayName="withErrorBoundary("+r+")",i},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(4538))}}]);
|