@perses-dev/trace-table-plugin 0.6.1 → 0.7.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/js/{152.e9184c1d.js → 152.20a64e89.js} +1 -1
- package/__mf/js/{TraceTable.1eb6e9fc.js → TraceTable.d244402d.js} +2 -2
- package/__mf/js/async/{51.640efc8d.js → 51.a8d0a55c.js} +3 -3
- package/__mf/js/async/764.102c33d3.js +7 -0
- package/__mf/js/async/{852.48a05ad6.js.LICENSE.txt → 764.102c33d3.js.LICENSE.txt} +1 -17
- package/__mf/js/async/{902.d7ac1450.js → 902.129cd5da.js} +2 -2
- package/__mf/js/async/{__federation_expose_TraceTable.a80ab6e3.js → __federation_expose_TraceTable.0bcb874f.js} +1 -1
- package/__mf/js/{main.1fa7162d.js → main.b975eef1.js} +1 -1
- package/mf-manifest.json +11 -11
- package/mf-stats.json +11 -11
- package/package.json +4 -4
- package/__mf/js/async/852.48a05ad6.js +0 -29
- /package/__mf/js/async/{51.640efc8d.js.LICENSE.txt → 51.a8d0a55c.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{902.d7ac1450.js.LICENSE.txt → 902.129cd5da.js.LICENSE.txt} +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 852.48a05ad6.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkTraceTable=self.webpackChunkTraceTable||[]).push([["852"],{7464:function(e,t,n){"use strict";let r,i,o,a;n.r(t),n.d(t,{ErrorAlert:()=>AN,JSONEditor:()=>Z8,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>$d,OptionsEditorGroup:()=>GF,DensitySelector:()=>Di,assembleTransform:()=>$w,clearHighlightedSeries:()=>$a,getColorsForValues:()=>esp,ErrorBoundary:()=>AB.ErrorBoundary,SeriesMarker:()=>WY,TimeRangeSelector:()=>eiu,testChartsTheme:()=>eoI,ChartsThemeContext:()=>vB,TextOverlay:()=>GV,hexToHSL:()=>esg,DEFAULT_COLUMN_HEIGHT:()=>kK,useMousePosition:()=>Wj,NoDataOverlay:()=>GZ,generateChartsTheme:()=>eoT,OptionsEditorGrid:()=>GB,OPTIMIZED_MODE_SERIES_LIMIT:()=>$t,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>WR,DiscardChangesConfirmationDialog:()=>TJ,getDateRange:()=>xH,EMPHASIZED_SERIES_DESCRIPTION:()=>WB,useChartsTheme:()=>vz,persesColumnsToTanstackColumns:()=>kJ,mockChartsContext:()=>eoO,Legend:()=>Ty,TOOLTIP_DATE_FORMAT:()=>Wz,TOOLTIP_MAX_WIDTH:()=>WI,dateFormatOptionsWithTimeZone:()=>Ww,legacyCheckforNearbySeries:()=>$m,ToolbarIconButton:()=>eih,PIN_TOOLTIP_HELP_TEXT:()=>WW,checkforNearbyTimeSeries:()=>$g,getTheme:()=>eoX,PieChart:()=>eaM,TooltipHeader:()=>$e,TOOLTIP_BG_COLOR_FALLBACK:()=>WF,UNPIN_TOOLTIP_HELP_TEXT:()=>W$,DateTimeRangePicker:()=>eil,handleMoveUp:()=>D4,getClosestTimestamp:()=>$c,getFormattedAxis:()=>xj,formatWithTimeZone:()=>WS,batchDispatchNearbySeriesActions:()=>$l,useTimeZone:()=>WD,ChartsProvider:()=>vN,isWithinPercentageRange:()=>$x,TOOLTIP_MIN_WIDTH:()=>WA,StatusHistoryChart:()=>esh,TOOLTIP_LABELS_MAX_WIDTH:()=>WP,getYBuffer:()=>$b,DEFAULT_PINNED_CROSSHAIR:()=>$r,LineChartTooltip:()=>$_,FormatControls:()=>eip,TooltipContent:()=>WQ,hslToHex:()=>esm,SHOW_FEWER_SERIES_LIMIT:()=>$p,TimeChartTooltip:()=>XH,getClosestTimestampInFullDataset:()=>$h,getTableCellLayout:()=>kQ,EChart:()=>xz,PINNED_CROSSHAIR_SERIES_NAME:()=>$n,SortSelector:()=>GW,SnackbarProvider:()=>eoC,Drawer:()=>Aw,AlignSelector:()=>N,LinksEditor:()=>GC,ValueMappingsEditor:()=>esZ,TimeZoneContext:()=>Wk,GaugeChart:()=>Aq,LineChart:()=>$C,SeriesLabelsStack:()=>WX,checkCrosshairPinnedStatus:()=>$u,StatChart:()=>Gq,SeriesInfo:()=>WK,ColorPicker:()=>wT,Table:()=>Tf,useSnackbar:()=>eoM,InfoTooltip:()=>T8,TimeZoneProvider:()=>WT,LoadingOverlay:()=>Gj,typography:()=>eoq,Dialog:()=>TQ,DropIndicator:()=>Do,TransformsEditor:()=>eo7,OptionsEditorControl:()=>T7,TOOLTIP_PADDING:()=>WE,getFormattedAxisLabel:()=>WC,SortSelectorButtons:()=>G$,getTooltipStyles:()=>$S,useChartsContext:()=>vF,RefreshIntervalPicker:()=>eae,enableDataZoom:()=>$i,useDragAndDropMonitor:()=>D0,combineSx:()=>MM,OptionsEditorColumn:()=>GN,getDateAndTime:()=>WM,ThresholdsEditor:()=>Ur,DEFAULT_TOOLTIP_CONFIG:()=>WH,handleMoveDown:()=>D8,DragButton:()=>D6,useId:()=>T5,ContentWithLegend:()=>Tb,BarChart:()=>xW,getFormattedDate:()=>W_,NEARBY_SERIES_DESCRIPTION:()=>WN,getColorForValue:()=>esf,isLegendItemVisuallySelected:()=>MA,getPointInGrid:()=>$s,EMPTY_TOOLTIP_DATA:()=>WZ,legacyGetNearbySeriesData:()=>$y,buildRelativeTimeOption:()=>eoD,SettingsAutocomplete:()=>Dn,FontSizeSelector:()=>Az,defaultCursorData:()=>WV,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>$f,FALLBACK_COLOR:()=>esd,getNearbySeriesData:()=>$v,TOOLTIP_MAX_HEIGHT:()=>WO,YAxisLabel:()=>eig,TimeChart:()=>XW,FALLBACK_CHART_WIDTH:()=>WL,DragAndDropElement:()=>D1,getResponsiveValueSize:()=>AY,restoreChart:()=>$o,ModeSelector:()=>GT,TextField:()=>Tw,DEFAULT_COLUMN_WIDTH:()=>kX,FormActions:()=>AZ,OptionsColorPicker:()=>wI});var s,l,u,c,h,d,f={};n.r(f),n.d(f,{Arc:()=>hI,BezierCurve:()=>hT,BoundingRect:()=>nC,Circle:()=>c1,CompoundPath:()=>hO,Ellipse:()=>c3,Group:()=>ix,Image:()=>ag,IncrementalDisplayable:()=>hZ,Line:()=>hS,LinearGradient:()=>hR,OrientedBoundingRect:()=>hz,Path:()=>au,Point:()=>ng,Polygon:()=>hg,Polyline:()=>hy,RadialGradient:()=>hE,Rect:()=>a_,Ring:()=>hh,Sector:()=>hl,Text:()=>aB,applyTransform:()=>h4,clipPointsByRect:()=>h9,clipRectByRect:()=>h7,createIcon:()=>de,extendPath:()=>hU,extendShape:()=>h$,getShapeClass:()=>hY,getTransform:()=>h3,groupTransition:()=>h6,initProps:()=>sS,isElementRemoved:()=>s_,lineLineIntersect:()=>dn,linePolygonIntersect:()=>dt,makeImage:()=>hK,makePath:()=>hX,mergePath:()=>hJ,registerShape:()=>hq,removeElement:()=>sC,removeElementWithFadeOut:()=>sk,resizePath:()=>h0,setTooltipConfig:()=>dr,subPixelOptimize:()=>h5,subPixelOptimizeLine:()=>h1,subPixelOptimizeRect:()=>h2,transformDirection:()=>h8,traverseElements:()=>da,updateProps:()=>sw});var p=n(4246),g=n(4538),m=n.n(g),v=n(496),y=n(2267),x=n(6838);function b(e){return g.Children.toArray(e).filter(e=>g.isValidElement(e))}var w=n(1640),S=n(2709),_=n(2319),C=n(433),M=n(1751),k=n(4124),T=n(6749);function D(e){return(0,T.ZP)("MuiButtonGroup",e)}let A=(0,k.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 I=n(5720),O=n(1645);let P=e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:a,variant:s}=e,l={root:["root",s,a,o&&"fullWidth",i&&"disableElevation",`color${(0,w.Z)(n)}`],grouped:["grouped",`grouped${(0,w.Z)(a)}`,`grouped${(0,w.Z)(s)}`,`grouped${(0,w.Z)(s)}${(0,w.Z)(a)}`,`grouped${(0,w.Z)(s)}${(0,w.Z)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,y.Z)(l,D,t)},R=(0,S.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${A.grouped}`]:t.grouped},{[`& .${A.grouped}`]:t[`grouped${(0,w.Z)(n.orientation)}`]},{[`& .${A.grouped}`]:t[`grouped${(0,w.Z)(n.variant)}`]},{[`& .${A.grouped}`]:t[`grouped${(0,w.Z)(n.variant)}${(0,w.Z)(n.orientation)}`]},{[`& .${A.grouped}`]:t[`grouped${(0,w.Z)(n.variant)}${(0,w.Z)(n.color)}`]},{[`& .${A.firstButton}`]:t.firstButton},{[`& .${A.lastButton}`]:t.lastButton},{[`& .${A.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,_.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",[`& .${A.lastButton},& .${A.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${A.firstButton},& .${A.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${A.lastButton},& .${A.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${A.firstButton},& .${A.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)"}`,[`&.${A.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${A.firstButton},& .${A.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)"}`,[`&.${A.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,C.Z)()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,x.Fq)(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${A.lastButton},& .${A.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${A.lastButton},& .${A.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${A.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${A.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,C.Z)(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${A.firstButton},& .${A.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${A.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),E=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiButtonGroup"}),{children:r,className:i,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:f="medium",variant:m="outlined",...y}=n,x={...n,color:o,component:a,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:h,orientation:d,size:f,variant:m},w=P(x),S=g.useMemo(()=>({className:w.grouped,color:o,disabled:s,disableElevation:l,disableFocusRipple:u,disableRipple:c,fullWidth:h,size:f,variant:m}),[o,s,l,u,c,h,f,m,w.grouped]),_=b(r),C=_.length,k=e=>{let t=0===e,n=e===C-1;return t&&n?"":t?w.firstButton:n?w.lastButton:w.middleButton};return(0,p.jsx)(R,{as:a,role:"group",className:(0,v.Z)(w.root,i),ref:t,ownerState:x,...y,children:(0,p.jsx)(I.Z.Provider,{value:S,children:_.map((e,t)=>(0,p.jsx)(O.Z.Provider,{value:k(t),children:e},t))})})});var L=n(8565);function N({onChange:e,value:t="left",...n}){let r=t=>{e(t)};return(0,p.jsxs)(E,{"aria-label":"Alignement",...n,children:[(0,p.jsx)(L.Z,{onClick:()=>r("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,p.jsx)(L.Z,{onClick:()=>r("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,p.jsx)(L.Z,{onClick:()=>r("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function F(){if(bw)return bb;bw=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 bb={unformat:function(n,r){let i;let o=Z(),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 r=+n[0],i=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(o)}(n,a)){let e,t,r;t=+(e=n.split(":"))[0],r=+e[1],i=+e[2]+60*r+3600*t}else i=function(n,r,i="",o,a,s,l){let u;if(""!==n)return n===a?0:function n(r,i,o,a,s,l,u){if(!isNaN(+r))return+r;let c="",h=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==r)return -1*n(h,i,o,a,s,l);for(let t=0;t<e.length;t++){let u=e[t];if((c=r.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"))!==r)return n(c,i,o,a,s,l)*u.factor}if((c=r.replace("%",""))!==r)return n(c,i,o,a,s,l)/100;let d=parseFloat(r);if(isNaN(d))return;let f=a(d);if(f&&"."!==f&&(c=r.replace(RegExp(`${t(f)}$`),""))!==r)return n(c,i,o,a,s,l);let p={};Object.keys(l).forEach(e=>{p[l[e]]=e});let g=Object.keys(p).sort().reverse(),m=g.length;for(let e=0;e<m;e++){let t=g[e],u=p[t];if((c=r.replace(t,""))!==r){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,i,o,a,s,l)*e}}}(n.replace(i,"").replace(RegExp(`([0-9])${t(r.thousands)}([0-9])`,"g"),"$1$2").replace(r.decimal,"."),r,i,o,a,s)}(n,a,s,l,u,c)}else{if("number"!=typeof n)return;i=n}if(void 0!==i)return i}}}function z(){if(b_)return bS;b_=1;let e=F(),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`"}},r={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 i(t){return void 0!==e.unformat(t)}function o(e,t,r,i=!1){let a=Object.keys(e).map(i=>{if(!t[i])return console.error(`${r} Invalid key: ${i}`),!1;let a=e[i],s=t[i];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(a,n,`[Validate ${i}]`,!0))return!1}else if(typeof a!==s.type)return console.error(`${r} ${i} 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(`${r} ${i} invalid value: ${o}`),!1}}return s.restriction&&!s.restriction(a,e)?(console.error(`${r} ${i} invalid value: ${s.message}`),!1):s.validValues&&-1===s.validValues.indexOf(a)?(console.error(`${r} ${i} invalid value: must be among ${JSON.stringify(s.validValues)}, "${a}" provided`),!1):!s.children||!!o(a,s.children,`[Validate ${i}]`)});return i||a.push(...Object.keys(t).map(n=>{let i=t[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0})),a.reduce((e,t)=>e&&t,!0)}function a(e){return o(e,n,"[Validate format]")}return bS={validate:function(e,t){let n=i(e),r=a(t);return n&&r},validateFormat:a,validateInput:i,validateLanguage:function(e){return o(e,r,"[Validate language]")}}}var V={parseFormat:function(e,t={}){var n,r,i,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=(r=e=(s=(n=e).match(/^{([^}]*)}/))?(t.prefix=s[1],n.slice(s[0].length)):n).match(/{([^}]*)}$/))?(t.postfix=l[1],r.slice(0,-l[0].length)):r,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!==(i=e).indexOf("K")?t.forceAverage="thousand":-1!==i.indexOf("M")?t.forceAverage="million":-1!==i.indexOf("B")?t.forceAverage="billion":-1!==i.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 Z(){let e;if(bM)return bC;bM=1;let t=bx?by:(bx=1,by={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=z(),r={},i={},o=null,a={};function s(){return i[e]}return r.languages=()=>Object.assign({},i),r.currentLanguage=()=>e,r.currentBytes=()=>s().bytes||{},r.currentCurrency=()=>s().currency,r.currentAbbreviations=()=>s().abbreviations,r.currentDelimiters=()=>s().delimiters,r.currentOrdinal=()=>s().ordinal,r.currentDefaults=()=>Object.assign({},s().defaults,a),r.currentOrdinalDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().ordinalFormat),r.currentByteDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().byteFormat),r.currentPercentageDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().percentageFormat),r.currentCurrencyDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().currencyFormat),r.currentTimeDefaultFormat=()=>Object.assign({},r.currentDefaults(),s().timeFormat),r.setDefaults=e=>{e=V.parseFormat(e),n.validateFormat(e)&&(a=e)},r.getZeroFormat=()=>o,r.setZeroFormat=e=>o="string"==typeof e?e:null,r.hasZeroFormat=()=>null!==o,r.languageData=e=>{if(e){if(i[e])return i[e];throw Error(`Unknown tag "${e}"`)}return s()},r.registerLanguage=(t,r=!1)=>{if(!n.validateLanguage(t))throw Error("Invalid language data");i[t.languageTag]=t,r&&(e=t.languageTag)},r.setLanguage=(n,r=t.languageTag)=>{if(!i[n]){let t=n.split("-")[0],o=Object.keys(i).find(e=>e.split("-")[0]===t);if(!i[o]){e=r;return}e=o;return}e=n},r.registerLanguage(t),e=t.languageTag,bC=r}var j={exports:{}};!function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=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,r=1,i=e.length,o=e[0]+"";r<i;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var n,r,i=e.c,o=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=l==u,!i||!o)return r?0:!i^n?1:-1;if(!r)return l>u^n?1:-1;for(a=0,s=(l=i.length)<(u=o.length)?l:u;a<s;a++)if(i[a]!=o[a])return i[a]>o[a]^n?1:-1;return l==u?0:l>u^n?1:-1}function h(e,t,n,r){if(e<t||e>n||e!==i(e))throw Error(o+(r||"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 f(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function p(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(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,A=21,I=-1e7,O=1e7,P=!1,R=1,E=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function F(e,t){var r,o,s,l,u,c,d,f,p=this;if(!(p instanceof F))return new F(e,t);if(null==t){if(e&&!0===e._isBigNumber){p.s=e.s,!e.c||e.e>O?p.c=p.e=null:e.e<I?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice());return}if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,u=e;u>=10;u/=10,l++);l>O?p.c=p.e=null:(p.e=l,p.c=[e]);return}f=String(e)}else{if(!n.test(f=String(e)))return _(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(l=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(l<0&&(l=u),l+=+f.slice(u+1),f=f.substring(0,u)):l<0&&(l=f.length)}else{if(h(t,2,N.length,"Base"),10==t&&B)return j(p=new F(e),k+p.e+1,T);if(f=String(e),c="number"==typeof e){if(0*e!=0)return _(p,f,c,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,F.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(a+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=N.slice(0,t),l=u=0,d=f.length;u<d;u++)if(0>r.indexOf(o=f.charAt(u))){if("."==o){if(u>l){l=d;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,u=-1,l=0;continue}return _(p,String(e),c,t)}c=!1,(l=(f=S(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):l=f.length}for(u=0;48===f.charCodeAt(u);u++);for(d=f.length;48===f.charCodeAt(--d););if(f=f.slice(u,++d)){if(d-=u,c&&F.DEBUG&&d>15&&(e>0x1fffffffffffff||e!==i(e)))throw Error(a+p.s*e);if((l=l-u-1)>O)p.c=p.e=null;else if(l<I)p.c=[p.e=0];else{if(p.e=l,p.c=[],u=(l+1)%14,l<0&&(u+=14),u<d){for(u&&p.c.push(+f.slice(0,u)),d-=14;u<d;)p.c.push(+f.slice(u,u+=14));u=14-(f=f.slice(u)).length}else u-=d;for(;u--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function z(e,t,n,r){var i,o,a,s,l;if(null==n?n=T:h(n,0,8),!e.c)return e.toString();if(i=e.c[0],a=e.e,null==t)l=u(e.c),l=1==r||2==r&&(a<=D||a>=A)?f(l,a):p(l,a,"0");else if(o=(e=j(new F(e),t,n)).e,s=(l=u(e.c)).length,1==r||2==r&&(t<=o||o<=D)){for(;s<t;l+="0",s++);l=f(l,o)}else if(t-=a,l=p(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&&i?"-"+l:l}function V(e,t){for(var n,r,i=1,o=new F(e[0]);i<e.length;i++)(r=new F(e[i])).s&&(n=c(o,r))!==t&&(0!==n||o.s!==t)||(o=r);return o}function Z(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+14*n-1)>O?e.c=e.e=null:n<I?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,f,p=e.c;if(p){e:{for(a=1,c=p[0];c>=10;c/=10,a++);if((l=t-a)<0)l+=14,u=t,f=i((h=p[d=0])/s[a-u-1]%10);else if((d=r((l+1)/14))>=p.length){if(o){for(;p.length<=d;p.push(0));h=f=0,a=1,l%=14,u=l-14+1}else break e}else{for(a=1,h=c=p[d];c>=10;c/=10,a++);l%=14,f=(u=l-14+a)<0?0:i(h/s[a-u-1]%10)}if(o=o||t<0||null!=p[d+1]||(u<0?h:h%s[a-u-1]),o=n<4?(f||o)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||o||6==n&&(l>0?u>0?h/s[a-u]:0:p[d-1])%10&1||n==(e.s<0?8:7)),t<1||!p[0])return p.length=0,o?(t-=e.e+1,p[0]=s[(14-t%14)%14],e.e=-t||0):p[0]=e.e=0,e;if(0==l?(p.length=d,c=1,d--):(p.length=d+1,c=s[14-l],p[d]=u>0?i(h/s[a-u]%s[u])*c:0),o)for(;;){if(0==d){for(l=1,u=p[0];u>=10;u/=10,l++);for(u=p[0]+=c,c=1;u>=10;u/=10,c++);l!=c&&(e.e++,1e14==p[0]&&(p[0]=1));break}if(p[d]+=c,1e14!=p[d])break;p[d--]=0,c=1}for(l=p.length;0===p[--l];p.pop());}e.e>O?e.c=e.e=null:e.e<I&&(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>=A?f(t,n):p(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],A=n[1]):(h(n,-1e9,1e9,t),D=-(A=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),I=n[0],O=n[1];else if(h(n,-1e9,1e9,t),n)I=-(O=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))P=n;else throw P=!n,Error(o+"crypto unavailable")}else P=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);B="0123456789"==n.slice(0,10),N=n}}else throw Error(o+"Object expected: "+e)}return{DECIMAL_PLACES:k,ROUNDING_MODE:T,EXPONENTIAL_AT:[D,A],RANGE:[I,O],CRYPTO:P,MODULO_MODE:R,POW_PRECISION:E,FORMAT:L,ALPHABET:N}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!F.DEBUG)return!0;var t,n,r=e.c,a=e.e,s=e.s;e:if("[object Array]"==({}).toString.call(r)){if((1===s||-1===s)&&a>=-1e9&&a<=1e9&&a===i(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=1e14||n!==i(n))break e;if(0!==n)return!0}}}else if(null===r&&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 i(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=[],f=new F(M);if(null==e?e=k:h(e,0,1e9),l=r(e/14),P){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 P=!1,Error(o+"crypto unavailable")}if(!P)for(;c<l;)(u=g())<9e15&&(d[c++]=u%1e14);for(l=d[--c],e%=14,l&&e&&(u=s[14-e],d[c]=i(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 f.e=a,f.c=d,f}),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,r){for(var i,o,a=[0],s=0,l=e.length;s<l;){for(o=a.length;o--;a[o]*=t);for(a[0]+=r.indexOf(e.charAt(s++)),i=0;i<a.length;i++)a[i]>n-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(n,r,i,o,a){var s,l,c,h,d,f,g,m,v=n.indexOf("."),y=k,x=T;for(v>=0&&(h=E,E=0,n=n.replace(".",""),f=(m=new F(r)).pow(n.length-v),E=h,m.c=t(p(u(f.c),f.e,"0"),10,i,e),m.e=m.c.length),c=h=(g=t(n,r,i,a?(s=N,e):(s=e,N))).length;0==g[--h];g.pop());if(!g[0])return s.charAt(0);if(v<0?--c:(f.c=g,f.e=c,f.s=o,g=(f=w(f,m,y,x,i)).c,d=f.r,c=f.e),v=g[l=c+y+1],h=i/2,d=d||l<0||null!=g[l+1],d=x<4?(null!=v||d)&&(0==x||x==(f.s<0?3:2)):v>h||v==h&&(4==x||d||6==x&&1&g[l-1]||x==(f.s<0?8:7)),l<1||!g[0])n=d?p(s.charAt(1),-y,s.charAt(0)):s.charAt(0);else{if(g.length=l,d)for(--i;++g[--l]>i;)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=p(n,c,s.charAt(0))}return n}}(),w=function(){function e(e,t,n){var r,i,o,a,s=0,l=e.length,u=t%1e7,c=t/1e7|0;for(e=e.slice();l--;)r=c*(o=e[l]%1e7)+(a=e[l]/1e7|0)*u,s=((i=u*o+r%1e7*1e7+s)/n|0)+(r/1e7|0)+c*a,e[l]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,a,s,u){var c,h,d,f,p,g,m,v,y,x,b,w,S,_,C,M,k,T=r.s==o.s?1:-1,D=r.c,A=o.c;if(!D||!D[0]||!A||!A[0])return new F(r.s&&o.s&&(D?!A||D[0]!=A[0]:A)?D&&0==D[0]||!A?0*T:T/0:NaN);for(y=(v=new F(T)).c=[],T=a+(h=r.e-o.e)+1,u||(u=1e14,h=l(r.e/14)-l(o.e/14),T=T/14|0),d=0;A[d]==(D[d]||0);d++);if(A[d]>(D[d]||0)&&h--,T<0)y.push(1),f=!0;else{for(_=D.length,M=A.length,d=0,T+=2,(p=i(u/(A[0]+1)))>1&&(A=e(A,p,u),D=e(D,p,u),M=A.length,_=D.length),S=M,b=(x=D.slice(0,M)).length;b<M;x[b++]=0);k=[0].concat(k=A.slice()),C=A[0],A[1]>=u/2&&C++;do{if(p=0,(c=t(A,x,M,b))<0){if(w=x[0],M!=b&&(w=w*u+(x[1]||0)),(p=i(w/C))>1)for(p>=u&&(p=u-1),m=(g=e(A,p,u)).length,b=x.length;1==t(g,x,m,b);)p--,n(g,M<m?k:A,m,u),m=g.length,c=1;else 0==p&&(c=p=1),m=(g=A.slice()).length;if(m<b&&(g=[0].concat(g)),n(x,g,b,u),b=x.length,-1==c)for(;1>t(A,x,M,b);)p++,n(x,M<b?k:A,b,u),b=x.length}else 0===c&&(p++,x=[0]);y[d++]=p,x[0]?x[b++]=D[S]||0:(x=[D[S]],b=1)}while((S++<_||null!=x[0])&&T--);f=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,f)}else v.e=h,v.r=+f;return v}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,b=/^\s*\+(?=[\w.])|^\s+|\s+$/g,_=function(e,t,n,r){var i,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 i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,a=a.replace(v,"$1").replace(y,"0.$1")),t!=a))return new F(a,i);if(F.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" 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,r,i;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(r=((i=n.length-1)-l(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},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,f,p,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 p=new F(Math.pow(+H(g),c?e.s*(2-d(e)):+H(e))),t?p.mod(t):p;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=r(E/14+2))}for(c?(n=new F(.5),h&&(e.s=1),f=d(e)):f=(s=Math.abs(+H(e)))%2,p=new F(M);;){if(f){if(!(p=p.times(g)).c)break;l?p.c.length>l&&(p.c.length=l):a&&(p=p.mod(t))}if(s){if(0===(s=i(s/2)))break;f=s%2}else if(j(e=e.times(n),e.e+1,1),e.e>14)f=d(e);else{if(0==(s=+H(e)))break;f=s%2}g=g.times(g),l?g.c&&g.c.length>l&&(g.c.length=l):a&&(g=g.mod(t))}return a?p:(h&&(p=M.div(p)),t?p.mod(t):l?j(p,E,T,u):p)},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,r,i,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,i=c):(u=s,i=h),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(o=(a=c.length)<(t=h.length))?a:t,a=t=0;t<r;t++)if(c[t]!=h[t]){o=c[t]<h[t];break}if(o&&(i=c,c=h,h=i,e.s=-e.s),(t=(r=h.length)-(n=c.length))>0)for(;t--;c[n++]=0);for(t=1e14-1;r>a;){if(c[--r]<h[r]){for(n=r;n&&!c[--n];c[n]=t);--c[n],c[r]+=1e14}c[r]-=h[r]}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,r;return(e=new F(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==R?(r=e.s,e.s=1,n=w(this,e,0,3),e.s=r,n.s*=r):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,r,i,o,a,s,u,c,h,d,f,p,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(r=l(this.e/14)+l(e.e/14),e.s*=this.s,(u=m.length)<(d=v.length)&&(g=m,m=v,v=g,i=u,u=d,d=i),i=u+d,g=[];i--;g.push(0));for(i=d;--i>=0;){for(n=0,f=v[i]%1e7,p=v[i]/1e7|0,o=i+(a=u);o>i;)s=p*(c=m[--a]%1e7)+(h=m[a]/1e7|0)*f,n=((c=f*c+s%1e7*1e7+g[o]+n)/1e14|0)+(s/1e7|0)+p*h,g[o--]=c%1e14;g[o]=n}return n?++r:g.splice(0,1),Z(e,g,r)},C.negated=function(){var e=new F(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,r=this.s;if(t=(e=new F(e,t)).s,!r||!t)return new F(NaN);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,a=this.c,s=e.c;if(!i||!o){if(!a||!s)return new F(r/0);if(!a[0]||!s[0])return s[0]?e:new F(a[0]?this:0*r)}if(i=l(i),o=l(o),a=a.slice(),r=i-o){for(r>0?(o=i,n=s):(r=-r,n=a),n.reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=r),r=0;t;)r=(a[--t]=a[t]+s[t]+r)/1e14|0,a[t]=1e14===a[t]?0:a[t]%1e14;return r&&(a=[r].concat(a),++o),Z(e,a,o)},C.precision=C.sd=function(e,t){var n,r,i;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(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},C.shiftedBy=function(e){return h(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,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(i=n,n=h.times(i.plus(w(this,i,c,1))),u(i.c).slice(0,a)===(t=u(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(r||"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(!r&&(j(i,i.e+k+2,0),i.times(i).eq(this))){n=i;break}c+=4,a+=4,r=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 r;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(r=this.toFixed(e,t),this.c){var i,a=r.split("."),s=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=a[0],h=a[1],d=this.s<0,f=d?c.slice(1):c,p=f.length;if(l&&(i=s,s=l,l=i,p-=i),s>0&&p>0){for(i=p%s||s,c=f.substr(0,i);i<p;i+=s)c+=u+f.substr(i,s);l>0&&(c+=u+f.slice(i)),d&&(c="-"+c)}r=h?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):c}return(n.prefix||"")+r+(n.suffix||"")},C.toFraction=function(e){var t,n,r,i,a,l,c,h,d,f,p,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),r=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=O,O=1/0,c=new F(g),h.c[0]=0;f=w(c,t,0,1),1!=(i=n.plus(f.times(r))).comparedTo(e);)n=r,r=i,d=h.plus(f.times(i=d)),h=i,t=c.minus(f.times(i=t)),c=i;return i=w(e.minus(n),r,0,1),h=h.plus(i.times(d)),n=n.plus(i.times(r)),h.s=d.s=this.s,a*=2,p=1>w(d,r,a,T).minus(this).abs().comparedTo(w(h,n,a,T).minus(this).abs())?[d,r]:[h,n],O=l,p},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,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=D||i>=A?f(u(n.c),i):p(u(n.c),i,"0"):10===e&&B?t=p(u((n=j(new F(n),k+i+1,T)).c),n.e,"0"):(h(e,2,N.length,"Base"),t=S(p(u(n.c),i,"0"),10,e,r,!0)),r<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,j.exports?j.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(B);var H=j.exports;let W=Z(),$=z(),G={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},U={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:q,decimalSuffixes:Y}=W.currentBytes(),X={scale:1024,suffixes:Y,marker:"bd"},K={scale:1024,suffixes:q,marker:"b"},Q={scale:1e3,suffixes:Y,marker:"d"};function J(e,t,n){let r=t[0],i=Math.abs(e);if(i>=n){for(let o=1;o<t.length;++o){let a=Math.pow(n,o),s=Math.pow(n,o+1);if(i>=a&&i<s){r=t[o],e/=a;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function ee(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function et({instance:e,providedFormat:t,state:n=W,decimalSeparator:r,defaults:i=n.currentDefaults()}){let o=e._value;if(0===o&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(o))return o.toString();let a=Object.assign({},U,i,t),s=a.totalLength,l=s?0:a.characteristic,u=a.optionalCharacteristic,c=a.forceAverage,h=a.lowPrecision,d=!!s||!!c||a.average,f=s?-1:d&&void 0===t.mantissa?0:a.mantissa,p=!s&&(void 0===t.optionalMantissa?-1===f: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:r,spaceSeparated:i=!1,totalLength:o=0,roundingFunction:a=Math.round}){let s="",l=Math.abs(e),u=-1;if(t&&r[t]&&G[t]?(s=r[t],e/=G[t]):l>=G.trillion||n&&1===a(l/G.trillion)?(s=r.trillion,e/=G.trillion):l<G.trillion&&l>=G.billion||n&&1===a(l/G.billion)?(s=r.billion,e/=G.billion):l<G.billion&&l>=G.million||n&&1===a(l/G.million)?(s=r.million,e/=G.million):(l<G.million&&l>=G.thousand||n&&1===a(l/G.thousand))&&(s=r.thousand,e/=G.thousand),s&&(s=(i?" ":"")+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&&(f=e.mantissaPrecision)}if(b){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),i=+n;return t&&1<t&&(i*=Math.pow(10,t-1),r=(r=+r-(t-1))>=0?`+${r}`:r),{value:i,abbreviation:`e${r}`}}({value:o,characteristicPrecision:l});o=e.value,S=e.abbreviation+S}let _=function(e,t,n,r,i,o){if(-1===r)return e;let a=function(e,t,n=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[r,i]=n.split("e"),[o,a=""]=r.split(".");if(+i>0)n=o+a+ee(i-a.length);else{let e=".";e=0>+o?`-0${e}`:`0${e}`;let r=(ee(-i-1)+Math.abs(o)+a).substr(0,t);r.length<t&&(r+=ee(t-r.length)),n=e+r}return+i>0&&t>0&&(n+=`.${ee(t)}`),n}(e,t):new H(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,r,o),[s,l=""]=a.toString().split(".");if(l.match(/^0+$/)&&(n||i))return s;let u=l.match(/0+$/);return i&&u?`${s}.${l.toString().slice(0,u.index)}`:a.toString()}(o.toString(),o,p,f,g,w);if(_=function(e,t,n,r,i){let o=r.currentDelimiters(),a=o.thousands;i=i||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=[],r=0;for(let i=e;i>0;i--)r===t&&(n.unshift(i),r=0),r++;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+i+c:u}(_=function(e,t,n,r){let i=e,[o,a]=i.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),i=i.slice(1)),o.length<r){let e=r-o.length;for(let t=0;t<e;t++)i=`0${i}`}return s&&(i=`-${i}`),i.toString()}(_,o,u,l),o,m,n,r),(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 en(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}function er(e,t,n){let r=new H(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new H(i),e._value=r.minus(i).toNumber(),e}let ei=Z(),eo=z(),ea=F(),es=(...e)=>(function(e,t={},n){if("string"==typeof t&&(t=V.parseFormat(t)),!$.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",i=t.postfix||"",o=function(e,t,n){var r,i;switch(t.output){case"currency":return function(e,t,n){let r;let i=n.currentCurrency(),o=Object.assign({},t),a=Object.assign({},U,o),s="",l=!!a.totalLength||!!a.forceAverage||a.average,u=o.currencyPosition||i.position,c=o.currencySymbol||i.symbol,h=void 0!==a.spaceSeparatedCurrency?a.spaceSeparatedCurrency:a.spaceSeparated;void 0===o.lowPrecision&&(o.lowPrecision=!1),h&&(s=" "),"infix"===u&&(r=s+c+s);let d=et({instance:e,providedFormat:o,state:n,decimalSeparator:r});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=en(t,W.currentCurrencyDefaultFormat()),W);case"percent":let o,a,s;return o=(r=t=en(t,W.currentPercentageDefaultFormat())).prefixSymbol,a=et({instance:n(100*e._value),providedFormat:r,state:W}),s=Object.assign({},U,r),o?`%${s.spaceSeparated?" ":""}${a}`:`${a}${s.spaceSeparated?" ":""}%`;case"byte":return function(e,t,n,r){let i=t.base||"binary",o=Object.assign({},U,t),{binarySuffixes:a,decimalSuffixes:s}=n.currentBytes(),l={general:{scale:1024,suffixes:s||Y,marker:"bd"},binary:{scale:1024,suffixes:a||q,marker:"b"},decimal:{scale:1e3,suffixes:s||Y,marker:"d"}}[i],{value:u,suffix:c}=J(e._value,l.suffixes,l.scale),h=et({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${h}${o.spaceSeparated?" ":""}${c}`}(e,t=en(t,W.currentByteDefaultFormat()),W,n);case"time":let l,u,c;return t=en(t,W.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,f,p;return i=t=en(t,W.currentOrdinalDefaultFormat()),h=W.currentOrdinal(),d=Object.assign({},U,i),f=et({instance:e,providedFormat:i,state:W}),p=h(e._value),`${f}${d.spaceSeparated?" ":""}${p}`;default:return et({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(o=r+o)+i})(...e,ew),el=(...e)=>(function(e){return J(e._value,X.suffixes,X.scale).suffix})(...e,ew),eu=(...e)=>(function(e){return J(e._value,K.suffixes,K.scale).suffix})(...e,ew),ec=(...e)=>(function(e){return J(e._value,Q.suffixes,Q.scale).suffix})(...e,ew),eh=en,ed=(e,t)=>{let n,r;return n=new H(e._value),r=t,ew.isNumbro(t)&&(r=t._value),r=new H(r),e._value=n.plus(r).toNumber(),e},ef=(e,t)=>er(e,t,ew),ep=(e,t)=>{let n,r;return n=new H(e._value),r=t,ew.isNumbro(t)&&(r=t._value),r=new H(r),e._value=n.times(r).toNumber(),e},eg=(e,t)=>{let n,r;return n=new H(e._value),r=t,ew.isNumbro(t)&&(r=t._value),r=new H(r),e._value=n.dividedBy(r).toNumber(),e},em=(e,t)=>{let n;return n=t,ew.isNumbro(t)&&(n=t._value),e._value=n,e},ev=(e,t)=>{let n;return er(n=ew(e._value),t,ew),Math.abs(n._value)},ey=H;class ex{constructor(e){this._value=e}clone(){return ew(this._value)}format(e={}){return es(this,e)}formatCurrency(e){return"string"==typeof e&&(e=V.parseFormat(e)),(e=eh(e,ei.currentCurrencyDefaultFormat())).output="currency",es(this,e)}formatTime(e={}){return e.output="time",es(this,e)}binaryByteUnits(){return eu(this)}decimalByteUnits(){return ec(this)}byteUnits(){return el(this)}difference(e){return ev(this,e)}add(e){return ed(this,e)}subtract(e){return ef(this,e)}multiply(e){return ep(this,e)}divide(e){return eg(this,e)}set(e){return em(this,eb(e))}value(){return this._value}valueOf(){return this._value}}function eb(e){let t=e;return ew.isNumbro(e)?t=e._value:"string"==typeof e?t=ew.unformat(e):isNaN(e)&&(t=NaN),t}function ew(e){return new ex(eb(e))}ew.version="2.5.0",ew.isNumbro=function(e){return e instanceof ex},ew.language=ei.currentLanguage,ew.registerLanguage=ei.registerLanguage,ew.setLanguage=ei.setLanguage,ew.languages=ei.languages,ew.languageData=ei.languageData,ew.zeroFormat=ei.setZeroFormat,ew.defaultFormat=ei.currentDefaults,ew.setDefaults=ei.setDefaults,ew.defaultCurrencyFormat=ei.currentCurrencyDefaultFormat,ew.validate=eo.validate,ew.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,ew),ew.unformat=ea.unformat,ew.BigNumber=ey;var eS=ew&&ew.__esModule&&Object.prototype.hasOwnProperty.call(ew,"default")?ew.default:ew;function e_(e){return"number"==typeof e}function eC(e){return e&&(e<0?e=0:e>20&&(e=20)),e}function eM(e,{shortValues:t,decimalPlaces:n}){if(!1===t||1e3>Math.abs(e)){let r={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return e_(n)?(r.minimumFractionDigits=eC(n),r.maximumFractionDigits=eC(n)):!1!==t&&(r.maximumSignificantDigits=3),Intl.NumberFormat("en-US",r).format(e)}return eS(e).format({output:"byte",base:"decimal",spaceSeparated:!0,mantissa:e_(n)?n:2,trimMantissa:!e_(n),optionalMantissa:!e_(n)})}let ek="Percent",eT="Time";var eD=((bl={}).milliseconds="millisecond",bl.seconds="second",bl.minutes="minute",bl.hours="hour",bl.days="day",bl.weeks="week",bl.months="month",bl.years="year",bl);let eA={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001},eI=["years","months","weeks","days","hours","minutes","seconds","milliseconds"],eO="Throughput",eP={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}},eR={milliseconds:{group:eT,label:"Milliseconds"},seconds:{group:eT,label:"Seconds"},minutes:{group:eT,label:"Minutes"},hours:{group:eT,label:"Hours"},days:{group:eT,label:"Days"},weeks:{group:eT,label:"Weeks"},months:{group:eT,label:"Months"},years:{group:eT,label:"Years"},percent:{group:ek,label:"Percent (0-100)"},"percent-decimal":{group:ek,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:ek,label:"%"},decimal:{group:"Decimal",label:"Decimal"},bytes:{group:"Bytes",label:"Bytes"},"bits/sec":{group:eO,label:"Bits/sec"},"bytes/sec":{group:eO,label:"Bytes/sec"},"counts/sec":{group:eO,label:"Counts/sec"},"events/sec":{group:eO,label:"Events/sec"},"messages/sec":{group:eO,label:"Messages/sec"},"ops/sec":{group:eO,label:"Ops/sec"},"packets/sec":{group:eO,label:"Packets/sec"},"reads/sec":{group:eO,label:"Reads/sec"},"requests/sec":{group:eO,label:"Requests/sec"},"records/sec":{group:eO,label:"Records/sec"},"rows/sec":{group:eO,label:"Rows/sec"},"writes/sec":{group:eO,label:"Writes/sec"}};function eE(e,t){if(void 0===t)return e.toString();if("Bytes"===eL(t))return eM(e,t);if("Decimal"===eL(t))return function(e,{shortValues:t,decimalPlaces:n}){let r={style:"decimal",useGrouping:!0};return!1!==t&&(r.notation="compact"),e_(n)?(r.minimumFractionDigits=eC(n),r.maximumFractionDigits=eC(n)):!1!==t&&(r.maximumSignificantDigits=3),Intl.NumberFormat("en-US",r).format(e)}(e,t);if("Percent"===eL(t))return function(e,{unit:t,decimalPlaces:n}){let r={style:"percent",useGrouping:!0};return e_(n)?(r.minimumFractionDigits=eC(n),r.maximumFractionDigits=eC(n)):r.maximumSignificantDigits=3,"percent"===t&&(e/=100),Intl.NumberFormat("en-US",r).format(e)}(e,t);if("Time"===eL(t))return function(e,{unit:t,decimalPlaces:n}){var r;if(0===e)return"0s";let i=function(e,t){let n=e*eA[t],r=eI[0]||"years",i=r,o=n/eA[r];for(i of eI)if((o=n/eA[i])>=1)break;return{value:o,unit:i}}(e,t),o={style:"unit",unit:eD[i.unit],unitDisplay:"months"===(r=i.unit)||"years"===r?"long":"narrow"};return e_(n)?(o.minimumFractionDigits=eC(n),o.maximumFractionDigits=eC(n)):o.maximumSignificantDigits=3,Intl.NumberFormat("en-US",o).format(i.value)}(e,t);if("Throughput"===eL(t))return function(e,{unit:t,shortValues:n,decimalPlaces:r}){if("bytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return eM(e,{unit:"bytes",shortValues:n,decimalPlaces:r})+"/"+t}let i={style:"decimal",useGrouping:!0};return!1!==n&&(i.notation="compact"),e_(r)?(i.minimumFractionDigits=eC(r),i.maximumFractionDigits=eC(r)):!1!==n&&(i.maximumSignificantDigits=3),Intl.NumberFormat("en-US",i).format(e)+" "+t}(e,t);throw Error(`Unknown unit options ${t}`)}function eL(e){return eR[e.unit].group}function eN(e){return eP[eR[e.unit].group]}var eB=function(e,t){return(eB=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 eF(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}eB(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ez=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},eV=new function(){this.browser=new ez,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?(eV.wxa=!0,eV.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?eV.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(eV.node=!0,eV.svgSupported=!0):(be=navigator.userAgent,bn=(bt=eV).browser,br=be.match(/Firefox\/([\d.]+)/),bi=be.match(/MSIE\s([\d.]+)/)||be.match(/Trident\/.+?rv:(([\d.]+))/),bo=be.match(/Edge?\/([\d.]+)/),ba=/micromessenger/i.test(be),br&&(bn.firefox=!0,bn.version=br[1]),bi&&(bn.ie=!0,bn.version=bi[1]),bo&&(bn.edge=!0,bn.version=bo[1],bn.newEdge=+bo[1].split(".")[0]>18),ba&&(bn.weChat=!0),bt.svgSupported="undefined"!=typeof SVGRect,bt.touchEventsSupported="ontouchstart"in window&&!bn.ie&&!bn.edge,bt.pointerEventsSupported="onpointerdown"in window&&(bn.edge||bn.ie&&+bn.version>=11),bt.domSupported="undefined"!=typeof document,bs=document.documentElement.style,bt.transform3dSupported=(bn.ie&&"transition"in bs||bn.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in bs)&&!("OTransition"in bs),bt.transformSupported=bt.transform3dSupported||bn.ie&&+bn.version>=9);var eZ="12px sans-serif",ej=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),eH={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!bu){var n=eH.createCanvas();bu=n&&n.getContext("2d")}if(bu)return bc!==t&&(bc=bu.font=t||eZ),bu.measureText(e);e=e||"",t=t||eZ;var r=/(\d+)px/.exec(t),i=r&&+r[1]||12,o=0;if(t.indexOf("mono")>=0)o=i*e.length;else for(var a=0;a<e.length;a++){var s=ej[e[a]];o+=null==s?i:s*i}return{width:o}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},eW=tn(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),e$=tn(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),eG=Object.prototype.toString,eU=Array.prototype,eq=eU.forEach,eY=eU.filter,eX=eU.slice,eK=eU.map,eQ=(function(){}).constructor,eJ=eQ?eQ.prototype:null,e0="__proto__",e1=2311;function e2(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function e5(e){if(null==e||"object"!=typeof e)return e;var t=e,n=eG.call(e);if("[object Array]"===n){if(!e[tC]){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=e5(e[r])}}else if(e$[n]){if(!e[tC]){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else{if(!eW[n]&&!e[tC]&&!tg(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==e0&&(t[a]=e5(e[a]))}return t}function e3(e,t,n){if(!td(t)||!td(e))return n?e5(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==e0){var i=e[r],o=t[r];!(td(o)&&td(i))||ts(o)||ts(i)||tg(o)||tg(i)||tf(o)||tf(i)||o[tC]||i[tC]?!n&&r in e||(e[r]=e5(t[r])):e3(i,o,n)}return e}function e4(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==e0&&(e[n]=t[n]);return e}function e8(e,t,n){for(var r=ti(t),i=0;i<r.length;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function e6(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return -1}function e9(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else e8(e,t,n)}function e7(e){return!!e&&"string"!=typeof e&&"number"==typeof e.length}function te(e,t,n){if(e&&t){if(e.forEach&&e.forEach===eq)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}}function tt(e,t,n){if(!e)return[];if(!t)return tb(e);if(e.map&&e.map===eK)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function tn(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function tr(e,t,n){if(!e)return[];if(!t)return tb(e);if(e.filter&&e.filter===eY)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function ti(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}eH.createCanvas;var to=eJ&&tl(eJ.bind)?eJ.call.bind(eJ.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(eX.call(arguments)))}};function ta(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(eX.call(arguments)))}}function ts(e){return Array.isArray?Array.isArray(e):"[object Array]"===eG.call(e)}function tl(e){return"function"==typeof e}function tu(e){return"string"==typeof e}function tc(e){return"[object String]"===eG.call(e)}function th(e){return"number"==typeof e}function td(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function tf(e){return!!eW[eG.call(e)]}function tp(e){return!!e$[eG.call(e)]}function tg(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function tm(e){return null!=e.colorStops}function tv(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function ty(e,t){return null!=e?e:t}function tx(e,t,n){return null!=e?e:null!=t?t:n}function tb(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return eX.apply(e,t)}function tw(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 tS(e,t){if(!e)throw Error(t)}function t_(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var tC="__ec_primitive__",tM=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 ti(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),tk="function"==typeof Map,tT=function(){function e(t){var n=ts(t);this.data=tk?new Map:new tM;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&te(t,i)}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,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return tk?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function tD(e){return new tT(e)}function tA(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&e4(n,t),n}function tI(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function tO(e,t){return e.hasOwnProperty(t)}function tP(){}var tR=180/Math.PI,tE=function(e,t){return(tE=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 tL(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}tE(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function tN(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function tB(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function tF(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function tz(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function tV(e,t){var n,r=Math.sqrt((n=t)[0]*n[0]+n[1]*n[1]);return 0===r?(e[0]=0,e[1]=0):(e[0]=t[0]/r,e[1]=t[1]/r),e}function tZ(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var tj=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function tH(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function tW(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function t$(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function tG(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var tU=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},tq=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 tU(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,t.drift(i,o,e),this.handler.dispatchToElement(new tU(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new tU(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new tU(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new tU(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new tU(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),tY=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[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 r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}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 r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.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 i&&i.afterTrigger&&i.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 r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.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 i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),tX=Math.log(2);function tK(e,t,n,r,i,o){var a=r+"-"+i,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/tX);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var h=0,d=0,f=0;d<s;d++){var p=1<<d;!(p&i)&&(h+=(f%2?-1:1)*e[n][d]*tK(e,t-1,c,u,i|p,o),f++)}return o[a]=h,h}function tQ(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]]],r={},i=tK(n,8,0,0,0,r);if(0!==i){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)*tK(n,7,+(0===a),1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var tJ="___zrEVENTSAVED",t0=[];function t1(e,t,n,r,i){if(t.getBoundingClientRect&&eV.domSupported&&!t2(t)){var o=t[tJ]||(t[tJ]={}),a=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;a.push(d,f),l=l&&o&&d===o[h]&&f===o[h+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=a,t[r]=n?tQ(s,a):tQ(a,s))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["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",r[l]+":0",i[u]+":0",r[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),o,i);if(a)return a(e,n,r),!0}return!1}function t2(e){return"CANVAS"===e.nodeName.toUpperCase()}var t5=/([&<>"'])/g,t3={"&":"&","<":"<",">":">",'"':""","'":"'"};function t4(e){return null==e?"":(e+"").replace(t5,function(e,t){return t3[t]})}var t8=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,t6=[],t9=eV.browser.firefox&&39>+eV.browser.version.split(".")[0];function t7(e,t,n,r){return n=n||{},r?ne(e,t,n):t9&&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):ne(e,t,n),n}function ne(e,t,n){if(eV.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(t2(e)){var o=e.getBoundingClientRect();n.zrX=r-o.left,n.zrY=i-o.top;return}if(t1(t6,e,r,i)){n.zrX=t6[0],n.zrY=t6[1];return}}n.zrX=n.zrY=0}function nt(e){return e||window.event}function nn(e,t,n){if(null!=(t=nt(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&t7(e,i,t,n)}else{t7(e,t,t,n);var o=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;return null==n||null==r?t:3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<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&&t8.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function nr(e,t,n,r){e.addEventListener(t,n,r)}var ni=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function no(e){return 2===e.which||3===e.which}var na=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 r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],l=t7(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in nl)if(nl.hasOwnProperty(t)){var n=nl[t](this._track,e);if(n)return n}},e}();function ns(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var nl={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var o=ns(r)/ns(i);isFinite(o)||(o=1),t.pinchScale=o;var a=[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=a[0],t.pinchY=a[1],{type:"pinch",target:e[0].target,event:t}}}}};function nu(){return[1,0,0,1,0,0]}function nc(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function nh(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=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]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function nd(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 nf(e,t,n,r){void 0===r&&(r=[0,0]);var i=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]=i*h+s*c,e[1]=-i*c+s*h,e[2]=o*h+l*c,e[3]=-o*c+h*l,e[4]=h*(a-r[0])+c*(u-r[1])+r[0],e[5]=h*(u-r[1])-c*(a-r[0])+r[1],e}function np(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*r;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*i)*l,e[5]=(o*i-n*s)*l,e):null}let ng=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,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}();var nm=Math.min,nv=Math.max,ny=new ng,nx=new ng,nb=new ng,nw=new ng,nS=new ng,n_=new ng;let nC=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=nm(e.x,this.x),n=nm(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=nv(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=nv(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,r,i=e.width/this.width,o=e.height/this.height,a=nu();return nd(a,a,[-this.x,-this.y]),n=(t=[i,o])[0],r=t[1],a[0]=a[0]*n,a[1]=a[1]*r,a[2]=a[2]*n,a[3]=a[3]*r,a[4]=a[4]*n,a[5]=a[5]*r,nd(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 r=this.x,i=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=!(i<s||l<r||a<u||c<o);if(n){var d=1/0,f=0,p=Math.abs(i-s),g=Math.abs(l-r),m=Math.abs(a-u),v=Math.abs(c-o),y=Math.min(p,g),x=Math.min(m,v);i<s||l<r?y>f&&(f=y,p<g?ng.set(n_,-p,0):ng.set(n_,g,0)):y<d&&(d=y,p<g?ng.set(nS,p,0):ng.set(nS,-g,0)),a<u||c<o?x>f&&(f=x,m<v?ng.set(n_,0,-m):ng.set(n_,0,v)):y<d&&(d=y,m<v?ng.set(nS,0,m):ng.set(nS,0,-v))}return n&&ng.copy(n,h?nS:n_),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,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,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}ny.x=nb.x=n.x,ny.y=nw.y=n.y,nx.x=nw.x=n.x+n.width,nx.y=nb.y=n.y+n.height,ny.transform(r),nw.transform(r),nx.transform(r),nb.transform(r),t.x=nm(ny.x,nx.x,nb.x,nw.x),t.y=nm(ny.y,nx.y,nb.y,nw.y);var l=nv(ny.x,nx.x,nb.x,nw.x),u=nv(ny.y,nx.y,nb.y,nw.y);t.width=l-t.x,t.height=u-t.y},e}();var nM="silent";function nk(){ni(this.event)}var nT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return tL(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(tY),nD=function(e,t){this.x=e,this.y=t},nA=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],nI=new nC(0,0,0,0),nO=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a._hovered=new nD(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new nT,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new tq(a),a}return tL(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(te(nA,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,r=nR(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new nD(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(i,"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 nD(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 r,i=(e=e||{}).target;if(!i||!i.silent){for(var o="on"+t,a={type:t,event:n,target:(r=e).target,topTarget:r.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:nk};i&&(i[o]&&(a.cancelBubble=!!i[o].call(i,a)),i.trigger(t,a),i=i.__hostTarget?i.__hostTarget:i.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 r=this.storage.getDisplayList(),i=new nD(e,t);if(nP(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new nC(e-s,t-s,a,a),u=r.length-1;u>=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||(nI.copy(c.getBoundingRect()),c.transform&&nI.applyTransform(c.transform),nI.intersect(l)&&o.push(c))}if(o.length){for(var h=Math.PI/12,d=2*Math.PI,f=0;f<s;f+=4)for(var p=0;p<d;p+=h)if(nP(o,i,e+f*Math.cos(p),t+f*Math.sin(p),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new na);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new nD;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(tY);function nP(e,t,n,r,i){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=function(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1}r.silent&&(i=!0),r=r.__hostTarget||r.parent}return!i||nM}return!1}(a,n,r))&&(t.topTarget||(t.topTarget=a),s!==nM)){t.target=a;break}}}function nR(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}function nE(e,t,n,r){var i=t+1;if(i===n)return 1;if(0>r(e[i++],e[t])){for(;i<n&&0>r(e[i],e[i-1]);)i++;!function(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function nL(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,l=r;s<l;)0>i(a,e[o=s+l>>>1])?l=o:s=o+1;var u=r-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 nN(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){for(s=r-i;l<s&&o(e,t[n+i+l])>0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&0>=o(e,t[n+i-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-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 nB(e,t,n,r,i,o){var a=0,s=0,l=1;if(0>o(e,t[n+i])){for(s=i+1;l<s&&0>o(e,t[n+i-l]);)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(e,t[n+i+l])>=0;)a=l,(l=(l<<1)+1)<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);0>o(e,t[n+c])?l=c:a=c+1}return l}function nF(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var o=0;if(i<32){o=nE(e,n,r,t),nL(e,n,r,n+o,t);return}var a=function(e,t){var n,r,i=7,o=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],h=r[s+1];r[s]=u+h,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var d=nB(e[c],e,l,u,0,t);l+=d,0!=(u-=d)&&0!==(h=nN(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,r,o,s){var l,u,c,h=0;for(h=0;h<r;h++)a[h]=e[n+h];var d=0,f=o,p=n;if(e[p++]=e[f++],0==--s){for(h=0;h<r;h++)e[p+h]=a[d+h];return}if(1===r){for(h=0;h<s;h++)e[p+h]=e[f+h];e[p+s]=a[d];return}for(var g=i;;){l=0,u=0,c=!1;do if(0>t(e[f],a[d])){if(e[p++]=e[f++],u++,l=0,0==--s){c=!0;break}}else if(e[p++]=a[d++],l++,u=0,1==--r){c=!0;break}while((l|u)<g);if(c)break;do{if(0!==(l=nB(e[f],a,d,r,0,t))){for(h=0;h<l;h++)e[p+h]=a[d+h];if(p+=l,d+=l,(r-=l)<=1){c=!0;break}}if(e[p++]=e[f++],0==--s){c=!0;break}if(0!==(u=nN(a[d],e,f,s,0,t))){for(h=0;h<u;h++)e[p+h]=e[f+h];if(p+=u,f+=u,0==(s-=u)){c=!0;break}}if(e[p++]=a[d++],1==--r){c=!0;break}g--}while(l>=7||u>=7);if(c)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(h=0;h<s;h++)e[p+h]=e[f+h];e[p+s]=a[d]}else if(0===r)throw Error();else for(h=0;h<r;h++)e[p+h]=a[d+h]}(l,u,c,h):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+r-1,c=s-1,h=o+s-1,d=0,f=0;if(e[h--]=e[u--],0==--r){for(l=0,d=h-(s-1);l<s;l++)e[d+l]=a[l];return}if(1===s){for(h-=r,u-=r,f=h+1,d=u+1,l=r-1;l>=0;l--)e[f+l]=e[d+l];e[h]=a[c];return}for(var p=i;;){var g=0,m=0,v=!1;do if(0>t(a[c],e[u])){if(e[h--]=e[u--],g++,m=0,0==--r){v=!0;break}}else if(e[h--]=a[c--],m++,g=0,1==--s){v=!0;break}while((g|m)<p);if(v)break;do{if(0!=(g=r-nB(a[c],e,n,r,r-1,t))){for(h-=g,u-=g,r-=g,f=h+1,d=u+1,l=g-1;l>=0;l--)e[f+l]=e[d+l];if(0===r){v=!0;break}}if(e[h--]=a[c--],1==--s){v=!0;break}if(0!=(m=s-nN(e[u],a,0,s,s-1,t))){for(h-=m,c-=m,s-=m,f=h+1,d=c+1,l=0;l<m;l++)e[f+l]=a[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--r){v=!0;break}p--}while(g>=7||m>=7);if(v)break;p<0&&(p=0),p+=2}if((i=p)<1&&(i=1),1===s){for(h-=r,u-=r,f=h+1,d=u+1,l=r-1;l>=0;l--)e[f+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=[],r=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=nE(e,n,r,t))<s){var l=i;l>s&&(l=s),nL(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}te(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){nO.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=nR(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||tZ(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}});var nz=!1;function nV(){!nz&&(nz=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nZ(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var nj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nZ}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,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,nF(n,nZ)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.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)&&(nV(),e.z=0),isNaN(e.z2)&&(nV(),e.z2=0),isNaN(e.zlevel)&&(nV(),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 r=e6(this._roots,e);r>=0&&this._roots.splice(r,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}();bk=eV.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var nH={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-nH.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*nH.bounceIn(2*e):.5*nH.bounceOut(2*e-1)+.5}},nW=Math.pow,n$=Math.sqrt,nG=n$(3),nU=1/3,nq=tN(),nY=tN(),nX=tN();function nK(e){return e>-1e-8&&e<1e-8}function nQ(e){return e>1e-8||e<-1e-8}function nJ(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function n0(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function n1(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*a*l,h=s*l-9*a*u,d=l*l-3*s*u,f=0;if(nK(c)&&nK(h)){if(nK(s))o[0]=0;else{var p=-l/s;p>=0&&p<=1&&(o[f++]=p)}}else{var g=h*h-4*c*d;if(nK(g)){var m=h/c,p=-s/a+m,v=-m/2;p>=0&&p<=1&&(o[f++]=p),v>=0&&v<=1&&(o[f++]=v)}else if(g>0){var y=n$(g),x=c*s+1.5*a*(-h+y),b=c*s+1.5*a*(-h-y),p=(-s-((x=x<0?-nW(-x,nU):nW(x,nU))+(b=b<0?-nW(-b,nU):nW(b,nU))))/(3*a);p>=0&&p<=1&&(o[f++]=p)}else{var w=Math.acos((2*c*s-3*a*h)/(2*n$(c*c*c)))/3,S=n$(c),_=Math.cos(w),p=(-s-2*S*_)/(3*a),v=(-s+S*(_+nG*Math.sin(w)))/(3*a),C=(-s+S*(_-nG*Math.sin(w)))/(3*a);p>=0&&p<=1&&(o[f++]=p),v>=0&&v<=1&&(o[f++]=v),C>=0&&C<=1&&(o[f++]=C)}}return f}function n2(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(nK(a)){if(nQ(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(nK(c))i[0]=-o/(2*a);else if(c>0){var h=n$(c),u=(-o+h)/(2*a),d=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function n5(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,h=(c-u)*i+u;o[0]=e,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=r}function n3(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function n4(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function n8(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function n6(e,t,n,r,i){var o=(t-e)*r+e,a=(n-t)*r+t,s=(a-o)*r+o;i[0]=e,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}var n9=/cubic-bezier\(([0-9,\.e ]+)\)/;function n7(e){var t=e&&n9.exec(e);if(t){var n=t[1].split(","),r=+t_(n[0]),i=+t_(n[1]),o=+t_(n[2]),a=+t_(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:n1(0,r,o,1,e,s)&&nJ(0,i,a,1,s[0])}}}var re=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||tP,this.ondestroy=e.ondestroy||tP,this.onrestart=e.onrestart||tP,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,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;this._startTime=e-r%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=tl(e)?e:nH[e]||n7(e)},e}(),rt=function(e){this.value=e},rn=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new rt(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}(),rr=function(){function e(e){this._list=new rn,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new rt(t),a.key=e,n.insertEntry(a),r[e]=a}return i},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}(),ri={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 ro(e){return(e=Math.round(e))<0?0:e>255?255:e}function ra(e){return e<0?0:e>1?1:e}function rs(e){return e.length&&"%"===e.charAt(e.length-1)?ro(parseFloat(e)/100*255):ro(parseInt(e,10))}function rl(e){return e.length&&"%"===e.charAt(e.length-1)?ra(parseFloat(e)/100):ra(parseFloat(e))}function ru(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 rc(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function rh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var rd=new rr(20),rf=null;function rp(e,t){rf&&rh(rf,t),rf=rd.put(e,rf||t.slice())}function rg(e,t){if(e){t=t||[];var n=rd.get(e);if(n)return rh(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in ri)return rh(t,ri[r]),rp(e,t),t;var i=r.length;if("#"===r.charAt(0)){if(4===i||5===i){var o=parseInt(r.slice(1,4),16);if(!(o>=0&&o<=4095)){rc(t,0,0,0,1);return}return rc(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),rp(e,t),t}if(7===i||9===i){var o=parseInt(r.slice(1,7),16);if(!(o>=0&&o<=0xffffff)){rc(t,0,0,0,1);return}return rc(t,(0xff0000&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),rp(e,t),t}return}var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?rc(t,+u[0],+u[1],+u[2],1):rc(t,0,0,0,1);c=rl(u.pop());case"rgb":if(u.length>=3)return rc(t,rs(u[0]),rs(u[1]),rs(u[2]),3===u.length?c:rl(u[3])),rp(e,t),t;rc(t,0,0,0,1);return;case"hsla":if(4!==u.length){rc(t,0,0,0,1);return}return u[3]=rl(u[3]),rm(u,t),rp(e,t),t;case"hsl":if(3!==u.length){rc(t,0,0,0,1);return}return rm(u,t),rp(e,t),t;default:return}}rc(t,0,0,0,1)}}function rm(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=rl(e[1]),i=rl(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return rc(t=t||[],ro(255*ru(a,o,n+1/3)),ro(255*ru(a,o,n)),ro(255*ru(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function rv(e,t){var n=rg(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return rw(n,4===n.length?"rgba":"rgb")}}function ry(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r,i,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]=ro((r=c[0],r+(h[0]-r)*d)),n[1]=ro((i=c[1],i+(h[1]-i)*d)),n[2]=ro((o=c[2],o+(h[2]-o)*d)),n[3]=ra((a=c[3],a+(h[3]-a)*d)),n}}function rx(e,t,n,r){var i,o=rg(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,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-r)/6+l/2)/l,h=((s-i)/6+l/2)/l,d=((s-o)/6+l/2)/l;r===s?t=d-h:i===s?t=1/3+c-d:o===s&&(t=2/3+h-c),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,u];return null!=e[3]&&f.push(e[3]),f}}(o),null!=t&&(o[0]=(i=Math.round(i=t))<0?0:i>360?360:i),null!=n&&(o[1]=rl(n)),null!=r&&(o[2]=rl(r)),rw(rm(o),"rgba")}function rb(e,t){var n=rg(e);if(n&&null!=t)return n[3]=ra(t),rw(n,"rgba")}function rw(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 rS(e,t){var n=rg(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var r_=new rr(100);function rC(e){if(tu(e)){var t=r_.get(e);return t||(t=rv(e,-.1),r_.put(e,t)),t}if(tm(e)){var n=e4({},e);return n.colorStops=tt(e.colorStops,function(e){return{offset:e.offset,color:rv(e.color,-.1)}}),n}return e}eV.hasGlobalWindow&&tl(window.btoa);var rM=Array.prototype.slice;function rk(e,t,n,r){for(var i,o=t.length,a=0;a<o;a++)e[a]=(i=t[a],(n[a]-i)*r+i);return e}function rT(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function rD(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function rA(e){if(e7(e)){var t=e.length;if(e7(e[0])){for(var n=[],r=0;r<t;r++)n.push(rM.call(e[r]));return n}return rM.call(e)}return e}function rI(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 rO(e){return 4===e||5===e}function rP(e){return 1===e||2===e}var rR=[0,0,0,0],rE=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 r=this.keyframes,i=r.length,o=!1,a=6,s=t;if(e7(t)){var l=e7(t&&t[0])?2:1;a=l,(1!==l||th(t[0]))&&(2!==l||th(t[0][0]))||(o=!0)}else if(th(t)&&t==t)a=0;else if(tu(t)){if(isNaN(+t)){var u=rg(t);u&&(s=u,a=3)}else a=0}else if(tm(t)){var c=e4({},s);(c.colorStops=tt(t.colorStops,function(e){return{offset:e.offset,color:rg(e.color)}}),"linear"===t.type)?a=4:"radial"===t.type&&(a=5),s=c}0===i?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=tl(n)?n:nH[n]||n7(n)),r.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 r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=rP(r),l=rO(r),u=0;u<i;u++){var c=n[u],h=c.value,d=o.value;c.percent=c.time/e,!a&&(s&&u!==i-1?function(e,t,n){if(e.push&&t.push){var r=e.length,i=t.length;if(r!==i){if(r>i)e.length=i;else for(var o=r;o<i;o++)e.push(1===n?t[o]:rM.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,r):l&&function(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}(h.colorStops,d.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var f=n[0].value,u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-f:3===r?n[u].additiveValue=rT([],n[u].value,f,-1):rP(r)&&(n[u].additiveValue=1===r?rT([],n[u].value,f,-1):rD([],n[u].value,f,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,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,f=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=f(d+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=f(n,u-2)}else{for(n=d;n<u&&!(l[n].percent>t);n++);n=f(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var p=i.percent-r.percent,g=0===p?1:f((t-r.percent)/p,1);i.easingFunc&&(g=i.easingFunc(g));var m=o?this._additiveValue:h?rR:e[c];if((rP(s)||h)&&!m&&(m=this._additiveValue=[]),this.discrete)e[c]=g<1?r.rawValue:i.rawValue;else if(rP(s))1===s?rk(m,r[a],i[a],g):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s,l=0;l<o;l++)e[a][l]=(s=t[a][l],(n[a][l]-s)*r+s)}return e}(m,r[a],i[a],g);else if(rO(s)){var v,y,x,b,w,S=r[a],_=i[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:tt(S.colorStops,function(e,t){var n,r=_.colorStops[t];return{offset:(n=e.offset,(r.offset-n)*g+n),color:rI(rk([],e.color,r.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)rk(m,r[a],i[a],g),o||(e[c]=rI(m));else{var M,k=(M=r[a],(i[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,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(rg(e[n],rR),rT(rR,rR,r,1),e[n]=rI(rR)):1===t?rT(e[n],e[n],r,1):2===t&&rD(e[n],e[n],r,1)},e}(),rL=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){e2("Can' use additive animation on looped animation.");return}this._additiveAnimators=r,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,ti(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new rE(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=rI(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,rA(l),r),this._trackKeys.push(a)}s.addKeyframe(e,rA(t[a]),r)}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 r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,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 re({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(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 tt(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,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}for(var a=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];if(!(!o||o.isFinished())){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[i]=rA(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||ti(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function rN(){return new Date().getTime()}var rB=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 tL(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=rN()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=i}this._time=t,!e&&(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,bk(function t(){e._running&&(bk(t),e._paused||e.update())})},t.prototype.start=function(){!this._running&&(this._time=rN(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=rN(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=rN()-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 rL(e,t.loop);return this.addAnimator(n),n},t}(tY),rF=eV.domSupported,rz=(bd={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},bf=tt(bh=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],function(e){var t=e.replace("mouse","pointer");return bd.hasOwnProperty(t)?t:e}),{mouse:bh,touch:["touchstart","touchend","touchmove"],pointer:bf}),rV={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},rZ=!1;function rj(e){var t=e.pointerType;return"pen"===t||"touch"===t}function rH(e){e&&(e.zrByTouch=!0)}function rW(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var r$=function(e,t){this.stopPropagation=tP,this.stopImmediatePropagation=tP,this.preventDefault=tP,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},rG={mousedown:function(e){e=nn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=nn(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=nn(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){rW(this,(e=nn(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){rZ=!0,e=nn(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){!rZ&&(e=nn(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){rH(e=nn(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),rG.mousemove.call(this,e),rG.mousedown.call(this,e)},touchmove:function(e){rH(e=nn(this.dom,e)),this.handler.processGesture(e,"change"),rG.mousemove.call(this,e)},touchend:function(e){rH(e=nn(this.dom,e)),this.handler.processGesture(e,"end"),rG.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&rG.click.call(this,e)},pointerdown:function(e){rG.mousedown.call(this,e)},pointermove:function(e){rj(e)||rG.mousemove.call(this,e)},pointerup:function(e){rG.mouseup.call(this,e)},pointerout:function(e){rj(e)||rG.mouseout.call(this,e)}};te(["click","dblclick","contextmenu"],function(e){rG[e]=function(t){t=nn(this.dom,t),this.trigger(e,t)}});var rU={pointermove:function(e){rj(e)||rU.mousemove.call(this,e)},pointerup:function(e){rU.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 rq(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,nr(e.domTarget,t,n,r)}function rY(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&function(e,t,n,r){e.removeEventListener(t,n,r)}(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var rX=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},rK=function(e){function t(t,n){var r,i,o=e.call(this)||this;return o.__pointerCapturing=!1,o.dom=t,o.painterRoot=n,o._localHandlerScope=new rX(t,rG),rF&&(o._globalHandlerScope=new rX(document,rU)),i=(r=o._localHandlerScope).domHandlers,eV.pointerEventsSupported?te(rz.pointer,function(e){rq(r,e,function(t){i[e].call(o,t)})}):(eV.touchEventsSupported&&te(rz.touch,function(e){rq(r,e,function(t){i[e].call(o,t),r.touching=!0,null!=r.touchTimer&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)})}),te(rz.mouse,function(e){rq(r,e,function(t){t=nt(t),r.touching||i[e].call(o,t)})})),o}return tL(t,e),t.prototype.dispose=function(){rY(this._localHandlerScope),rF&&rY(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,rF&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?function(e,t){eV.pointerEventsSupported?te(rV.pointer,n):eV.touchEventsSupported||te(rV.mouse,n);function n(n){rq(t,n,function(r){if(!rW(e,(r=nt(r)).target)){var i;i=r,r=nn(e.dom,new r$(e,i),!0),t.domHandlers[n].call(e,r)}},{capture:!0})}}(this,t):rY(t)}},t}(tY),rQ=1;eV.hasGlobalWindow&&(rQ=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var rJ=rQ,r0="#333",r1="#ccc";function r2(e){return e>5e-5||e<-5e-5}var r5=[],r3=[],r4=nu(),r8=Math.abs,r6=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 r2(this.rotation)||r2(this.x)||r2(this.y)||r2(this.scaleX-1)||r2(this.scaleY-1)||r2(this.skewX)||r2(this.skewY)},t.prototype.updateTransform=function(){var e,t=this.parent&&this.parent.transform,n=this.needLocalTransform(),r=this.transform;if(!(n||t)){r&&(nc(r),this.invTransform=null);return}r=r||nu(),n?this.getLocalTransform(r):nc(r),t&&(n?nh(r,t,r):((e=r)[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=r,this._resolveGlobalScaleRatio(r)},t.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(r5);var n=r5[0]<0?-1:1,r=r5[1]<0?-1:1,i=((r5[0]-n)*t+n)/r5[0]||0,o=((r5[1]-r)*t+r)/r5[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||nu(),np(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],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,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||nu(),nh(r3,e.invTransform,t),t=r3);var n=this.originX,r=this.originY;(n||r)&&(r4[4]=n,r4[5]=r,nh(r3,t,r4),r3[4]-=n,r3[5]-=r,t=r3),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],r=this.invTransform;return r&&tW(n,n,r),n},t.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&tW(n,n,r),n},t.prototype.getLineScale=function(){var e=this.transform;return e&&r8(e[0]-1)>1e-10&&r8(e[3]-1)>1e-10?Math.sqrt(r8(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){(function(e,t){for(var n=0;n<r9.length;n++){var r=r9[n];e[r]=t[r]}})(this,e)},t.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=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||r||a||s){var f=n+a,p=r+s;t[4]=-f*i-h*p*o,t[5]=-p*o-d*f*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=d*i,t[2]=h*o,l&&nf(t,t,l),t[4]+=n+u,t[5]+=r+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}(),r9=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],r7={};function ie(e,t){var n=r7[t=t||eZ];n||(n=r7[t]=new rr(500));var r=n.get(e);return null==r&&(r=eH.measureText(e,t).width,n.put(e,r)),r}function it(e,t,n,r){var i=ie(e,t),o=ia(t);return new nC(ii(0,i,n),io(0,o,r),i,o)}function ir(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return it(i[0],t,n,r);for(var o=new nC(0,0,0,0),a=0;a<i.length;a++){var s=it(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function ii(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function io(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function ia(e){return ie("国",e)}function is(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function il(e,t,n){var r=t.position||"inside",i=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(r instanceof Array)l+=is(r[0],n.width),u+=is(r[1],n.height),c=null,h=null;else switch(r){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+a,u+=s,h="middle";break;case"top":l+=a/2,u-=i,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=a-i,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,h="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",h="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=h,e}var iu="__zr_normal__",ic=r9.concat(["ignore"]),ih=tn(r9,function(e,t){return e[t]=!0,e},{ignore:!1}),id={},ip=new nC(0,0,0,0),ig=function(){function e(e){this.id=e1++,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 r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[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,r=n.local,i=t.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(t),null!=n.position){n.layoutRect?ip.copy(n.layoutRect):ip.copy(this.getBoundingRect()),r||ip.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(id,n,ip):il(id,n,ip),i.x=id.x,i.y=id.y,o=id.align,a=id.verticalAlign;var u=n.origin;if(u&&null!=n.rotation){var c=void 0,h=void 0;"center"===u?(c=.5*ip.width,h=.5*ip.height):(c=is(u[0],ip.width),h=is(u[1],ip.height)),l=!0,i.originX=-i.x+c+(r?0:ip.x),i.originY=-i.y+h+(r?0:ip.y)}}null!=n.rotation&&(i.rotation=n.rotation);var d=n.offset;d&&(i.x+=d[0],i.y+=d[1],l||(i.originX=-d[0],i.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,m=void 0,v=void 0;f&&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")!==p.fill||m!==p.stroke||v!==p.autoStroke||o!==p.align||a!==p.verticalAlign)&&(s=!0,p.fill=g,p.stroke=m,p.autoStroke=v,p.align=o,p.verticalAlign=a,t.setDefaultTextStyle(p)),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()?r1:r0},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&rg(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+255*!i*(1-r);return n[3]=1,rw(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||{},e4(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(td(e))for(var n=ti(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}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 r=this.animators[n],i=r.__fromStateTransition;if(!r.getLoop()&&(!i||i===iu)){var o=r.targetName,a=o?t[o]:t;r.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,ic)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},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(iu,!1,e)},e.prototype.useState=function(e,t,n,r){var i,o=e===iu;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(e6(a,e)>=0)||!t&&1!==a.length){if(this.stateProxy&&!o&&(i=this.stateProxy(e)),i||(i=this.states&&this.states[e]),!i&&!o){e2("State "+e+" not exists.");return}o||this.saveCurrentToNormalState(i);var l=!!(i&&i.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,i,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),i}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a){for(var s=0;s<o;s++)if(e[s]!==i[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&&r.push(u)}var c=r[o-1],h=!!(c&&c.hoverLayer||n);h&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(r),f=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!t&&!this.__inHover&&f&&f.duration>0,f);var p=this._textContent,g=this._textGuide;p&&p.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=e6(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 r=this.currentStates.slice(),i=e6(r,e),o=e6(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];e4(n,i),i.textConfig&&e4(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,o){var a=!(t&&r);t&&t.textConfig?(this.textConfig=e4({},r?this.textConfig:n.textConfig),e4(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<ic.length;u++){var c=ic[u],h=i&&ih[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(!i)for(var u=0;u<this.animators.length;u++){var d=this.animators[u],f=d.targetName;d.getLoop()||d.__changeFinalValue(f?(t||n)[f]: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 r6,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),e4(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 r=new rL(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=e6(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,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){im(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){im(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=im(this,t,n,r),o=0;o<i.length;o++)i[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,r,i){Object.defineProperty(t,e,{get:function(){return this[n]||o(this,this[n]=[]),this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=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 im(e,t,n,r,i){var o=[];!function e(t,n,r,i,o,a,s,l){for(var u=ti(i),c=o.duration,h=o.delay,d=o.additive,f=o.setToFinal,p=!td(a),g=t.animators,m=[],v=0;v<u.length;v++){var y=u[v],x=i[y];if(null!=x&&null!=r[y]&&(p||a[y])){if(!td(x)||e7(x)||tm(x))m.push(y);else{if(n){l||(r[y]=x,t.updateDuringAnimation(n));continue}e(t,y,r[y],x,o,a&&a[y],s,l)}}else l||(r[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 _=e6(g,S);g.splice(_,1)}}if(o.force||(b=(m=tr(m,function(e){var t,n;return!((t=i[e])===(n=r[e])||e7(t)&&e7(n)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])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={},f&&(C={});for(var w=0;w<b;w++){var y=m[w];M[y]=r[y],f?C[y]=i[y]:r[y]=i[y]}}else if(f){k={};for(var w=0;w<b;w++){var y=m[w];k[y]=rA(r[y]),function(e,t,n){if(e7(t[n])){if(e7(e[n])||(e[n]=[]),tp(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),iv(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(e7(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?iv(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else iv(o,i,a);o.length=i.length}}else e[n]=t[n]}(r,i,y)}}var S=new rL(r,!1,!1,d?tr(g,function(e){return e.targetName===n}):null);S.targetName=n,o.scope&&(S.scope=o.scope),f&&C&&S.whenWithKeys(0,C,m),k&&S.whenWithKeys(0,k,m),S.whenWithKeys(null==c?500:c,l?M:i,m).delay(h||0),t.addAnimator(S,n),s.push(S)}}(e,"",e,t,n=n||{},r,o,i);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 f=o[d];c&&f.done(c),h&&f.aborted(h),n.force&&f.duration(n.duration),f.start(n.easing)}return o}function iv(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}e9(ig,tY),e9(ig,r6);var iy=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return tL(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,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=e6(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),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,r=e6(n,e);return r<0||(n.splice(r,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 r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.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 nC(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(nC.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(ig);iy.prototype.type="group";let ix=iy;var ib={},iw={},iS=function(){function e(e,t,n){var r,i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var o=new nj,a=n.renderer||"canvas";ib[a]||(a=ti(ib)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;var s=new ib[a](t,o,n,e),l=n.ssr||s.ssrOnly;this.storage=o,this.painter=s;var u=eV.node||eV.worker||l?null:new rK(s.getViewportRoot(),s.root),c=n.useCoarsePointer;(null==c||"auto"===c?eV.touchEventsSupported:!!c)&&(r=ty(n.pointerSize,44)),this.handler=new nO(o,s,u,s.root,r),this.animation=new rB({stage:{update:l?null:function(){return i._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>rS(e,1);if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=rS(t[i].color,1);return(n/=r)<.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=rN();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=rN();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-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 ix&&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 iw[e])},e}();function i_(e,t){var n=new iS(e1++,e,t);return iw[n.id]=n,n}function iC(e,t,n,r){var i=t[0],o=t[1],a=n[0],s=n[1],l=o-i,u=s-a;if(0===l)return 0===u?a:(a+s)/2;if(r){if(l>0){if(e<=i)return a;if(e>=o)return s}else{if(e>=i)return a;if(e<=o)return s}}else{if(e===i)return a;if(e===o)return s}return(e-i)/l*u+a}function iM(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 tu(e)?e.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function ik(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function iT(e){return e.sort(function(e,t){return e-t}),e}function iD(e){if(isNaN(e*=1))return 0;if(e>1e-14){for(var t,n,r,i,o,a=1,s=0;s<15;s++,a*=10)if(Math.round(e*a)/a===e)return s}return r=(n=(t=e.toString().toLowerCase()).indexOf("e"))>0?+t.slice(n+1):0,i=n>0?n:t.length,Math.max(0,((o=t.indexOf("."))<0?0:i-1-o)-r)}function iA(e,t){var n=Math.log,r=Math.LN10,i=Math.min(Math.max(-Math.floor(n(e[1]-e[0])/r)+Math.round(n(Math.abs(t[1]-t[0]))/r),0),20);return isFinite(i)?i:20}function iI(e){var t=2*Math.PI;return(e%t+t)%t}function iO(e){return e>-1e-4&&e<1e-4}var iP=/^(?:(\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 iR(e){if(e instanceof Date)return e;if(tu(e)){var t=iP.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 iE(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 iL(e,t){var n,r=iE(e),i=Math.pow(10,r),o=e/i;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)*i,r>=-20?+e.toFixed(r<0?-r:0):e}function iN(e){e.sort(function(e,t){return!function e(t,n,r){return t.interval[r]<n.interval[r]||t.interval[r]===n.interval[r]&&(t.close[r]-n.close[r]==(r?-1:1)||!r&&e(t,n,1))}(e,t,0)?1:-1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,o=e[r].close,a=0;a<2;a++)i[a]<=t&&(i[a]=t,o[a]=a?1:1-n),t=i[a],n=o[a];i[0]===i[1]&&o[0]*o[1]!=1?e.splice(r,1):r++}return e}function iB(e){var t=parseFloat(e);return t==e&&(0!==t||!tu(e)||0>=e.indexOf("x"))?t:NaN}function iF(){return Math.round(9*Math.random())}function iz(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 iV="series\0",iZ="\0_ec_\0";function ij(e){return e instanceof Array?e:null==e?[]:[e]}function iH(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var iW=["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 i$(e){return!td(e)||ts(e)||e instanceof Date?e:e.value}function iG(e,t,n){var r=iq(t[e],null),i=iq(n[e],null);return null!=r&&null!=i&&r===i}function iU(e){return iq(e,"")}function iq(e,t){return null==e?t:tu(e)?e:th(e)||tc(e)?e+"":t}function iY(e){var t=e.name;return!!(t&&t.indexOf(iV))}function iX(e){return e&&null!=e.id&&0===iU(e.id).indexOf(iZ)}function iK(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?ts(t.dataIndex)?tt(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?ts(t.name)?tt(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function iQ(){var e="__ec_inner_"+iJ++;return function(t){return t[e]||(t[e]={})}}var iJ=iF();function i0(e,t,n){var r=i1(t,n),i=r.mainTypeSpecified,o=r.queryOptionMap,a=r.others,s=n?n.defaultMainType:null;return!i&&s&&o.set(s,{}),o.each(function(t,r){var i=i3(e,r,t,{useDefault:s===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone});a[r+"Models"]=i.models,a[r+"Model"]=i.models[0]}),a}function i1(e,t){if(tu(e)){var n,r={};r[e+"Index"]=0,n=r}else n=e;var i=tD(),o={},a=!1;return te(n,function(e,n){if("dataIndex"===n||"dataIndexInside"===n){o[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();!(!s||!l||t&&t.includeMainTypes&&0>e6(t.includeMainTypes,s))&&(a=a||!!s,(i.get(s)||i.set(s,{}))[l]=e)}),{mainTypeSpecified:a,queryOptionMap:i,others:o}}var i2={useDefault:!0,enableAll:!1,enableNone:!1},i5={useDefault:!1,enableAll:!0,enableNone:!0};function i3(e,t,n,r){r=r||i2;var i=n.index,o=n.id,a=n.name,s={models:null,specified:null!=i||null!=o||null!=a};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=e.getComponent(t))?[l]:[],s}return"none"===i||!1===i?(tS(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[]):("all"===i&&(tS(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=a=null),s.models=e.queryComponents({mainType:t,index:i,id:o,name:a})),s}function i4(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function i8(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(th(r)){var a,s=(r-(a=n||0))*i+a;return ik(s,o?Math.max(iD(n||0),iD(r)):t)}if(tu(r))return i<1?n:r;for(var l=[],u=Math.max(n?n.length:0,r.length),c=0;c<u;++c){var h=e.getDimensionInfo(c);if(h&&"ordinal"===h.type)l[c]=(i<1&&n?n:r)[c];else{var d=n&&n[c]?n[c]:0,f=r[c],s=(f-d)*i+d;l[c]=ik(s,o?Math.max(iD(d),iD(f)):t)}}return l}var i6="___EC__COMPONENT__CONTAINER___",i9="___EC__EXTENDED_CLASS___";function i7(e){var t={main:"",sub:""};if(e){var n=e.split(".");t.main=n[0]||"",t.sub=n[1]||""}return t}function oe(e,t){e.$constructor=e,e.extend=function(e){var t,n,r=this;return tl(t=r)&&/^class\s/.test(Function.prototype.toString.call(t))?n=function(e){function t(){return e.apply(this,arguments)||this}return eF(t,e),t}(r):function(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}(n=function(){(e.$constructor||r).apply(this,arguments)},this),e4(n.prototype,e),n[i9]=!0,n.extend=this.extend,n.superCall=or,n.superApply=oi,n.superClass=r,n}}function ot(e,t){e.extend=t.extend}var on=Math.round(10*Math.random());function or(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function oi(e,t,n){return this.superClass.prototype[t].apply(e,n)}function oo(e){var t={};e.registerClass=function(e){var n=e.type||e.prototype.type;if(n){tS(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),e.prototype.type=n;var r,i,o=i7(n);o.sub?o.sub!==i6&&(((i=t[(r=o).main])&&i[i6]||((i=t[r.main]={})[i6]=!0),i)[o.sub]=e):t[o.main]=e}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[i6]&&(i=n?i[n]:null),r&&!i)throw Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){var n=i7(e),r=[],i=t[n.main];return i&&i[i6]?te(i,function(e,t){t!==i6&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[i7(e).main]},e.getAllClassMainTypes=function(){var e=[];return te(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[i7(e).main];return n&&n[i6]}}function oa(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,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];if(!(r&&e6(r,s)>=0||i&&0>e6(i,s))){var l=n.getShallow(s,t);null!=l&&(o[e[a][0]]=l)}}return o}}var os=oa([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ol=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return os(this,e,t)},e}(),ou=new rr(50);function oc(e,t,n,r,i){if(!e)return t;if("string"!=typeof e)return e;if(t&&t.__zrImageSrc===e||!n)return t;var o=ou.get(e),a={hostEl:n,cb:r,cbPayload:i};return o?od(t=o.image)||o.pending.push(a):((t=eH.loadImage(e,oh,oh)).__zrImageSrc=e,ou.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}function oh(){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],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function od(e){return e&&e.width&&e.height}var of=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function op(e,t,n,r){var i=e4({},r=r||{});i.font=t,n=ty(n,"..."),i.maxIterations=ty(r.maxIterations,2);var o=i.minChar=ty(r.minChar,0);i.cnCharWidth=ie("国",t);var a=i.ascCharWidth=ie("a",t);i.placeholder=ty(r.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<o&&s>=a;l++)s-=a;var u=ie(n,t);return u>s&&(n="",u=0),s=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function og(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";var o=ie(e,r);if(o<=n)return e;for(var a=0;;a++){if(o<=i||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?function(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}(e,i,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*i/o):0;o=ie(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}var om=function(){},ov=function(e){this.tokens=[],e&&(this.tokens=e)},oy=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function ox(e,t,n,r,i){var o,a,s=""===t,l=i&&n.rich[i]||{},u=e.lines,c=l.font||n.font,h=!1;if(r){var d=l.padding,f=d?d[1]+d[3]:0;if(null!=l.width&&"auto"!==l.width){var p=is(l.width,r.width)+f;u.length>0&&p+r.accumWidth>r.width&&(o=t.split("\n"),h=!0),r.accumWidth=p}else{var g=ow(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+f,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 om;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!s,"number"==typeof l.width?y.width=l.width:y.width=a?a[m]:ie(v,c),m||h)u.push(new ov([y]));else{var x=(u[u.length-1]||(u[0]=new ov)).tokens,b=x.length;1===b&&x[0].isLineHolder?x[0]=y:(v||!b||s)&&x.push(y)}}}var ob=tn(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function ow(e,t,n,r,i){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 f=ie(d,t),p=!r&&!function(e){var t;return(!((t=e.charCodeAt(0))>=32)||!(t<=591))&&(!(t>=880)||!(t<=4351))&&(!(t>=4608)||!(t<=5119))&&(!(t>=7680)||!(t<=8303))||!!ob[e]}(d);if(o.length?c+f>n:i+c+f>n){c?(s||l)&&(p?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=d,u+=f,s="",c=u):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=d,c=f)):p?(o.push(l),a.push(u),l=d,u=f):(o.push(d),a.push(f));continue}c+=f,p?(l+=d,u+=f):(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+=i),{accumWidth:c,lines:o,linesWidths:a}}var oS="__zr_style_"+Math.round(10*Math.random()),o_={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},oC={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};o_[oS]=!0;var oM=["z","z2","invisible"],ok=["invisible"],oT=function(e){var t;function n(t){return e.call(this,t)||this}return tL(n,e),n.prototype._init=function(t){for(var n=ti(t),r=0;r<n.length;r++){var i=n[r];"style"===i?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}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,r){var i,o,a,s=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(i=this,o=e,a=t,oD.copy(i.getBoundingRect()),i.transform&&oD.applyTransform(i.transform),oA.width=o,oA.height=a,!oD.intersect(oA))||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(r&&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(),r=this.style,i=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new nC(0,0,0,0)),t?nC.applyTransform(e,n,t):e.copy(n),(i||o||a)&&(e.width+=2*i+Math.abs(o),e.height+=2*i+Math.abs(a),e.x=Math.min(e.x,e.x+o-i),e.y=Math.min(e.y,e.y+a-i));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 nC(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:e4(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 tA(o_,e)},n.prototype.useStyle=function(e){e[oS]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},n.prototype.isStyleObject=function(e){return e[oS]},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,oM)},n.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.style?o?i?s=n.style:(s=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(s,n.style)):(s=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(s,n.style)):l&&(s=r.style),s){if(o){var u=this.style;if(this.style=this.createStyle(l?{}:u),l)for(var c=ti(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 f=ti(s),h=0;h<f.length;h++){var d=f[h];this.style[d]=this.style[d]}this._transitionState(t,{style:s},a,this.getAnimationStyleProps())}else this.useStyle(s)}for(var p=this.__inHover?ok:oM,h=0;h<p.length;h++){var d=p[h];n&&null!=n[d]?this[d]=n[d]:l&&null!=r[d]&&(this[d]=r[d])}},n.prototype._mergeStates=function(t){for(var n,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(n=n||{},this._mergeStyle(n,o.style))}return n&&(r.style=n),r},n.prototype._mergeStyle=function(e,t){return e4(e,t),e},n.prototype.getAnimationStyleProps=function(){return oC},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}(ig),oD=new nC(0,0,0,0),oA=new nC(0,0,0,0),oI=Math.min,oO=Math.max,oP=Math.sin,oR=Math.cos,oE=2*Math.PI,oL=tN(),oN=tN(),oB=tN();function oF(e,t,n,r,i,o){i[0]=oI(e,n),i[1]=oI(t,r),o[0]=oO(e,n),o[1]=oO(t,r)}var oz=[],oV=[],oZ={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},oj=[],oH=[],oW=[],o$=[],oG=[],oU=[],oq=Math.min,oY=Math.max,oX=Math.cos,oK=Math.sin,oQ=Math.abs,oJ=Math.PI,o0=2*oJ,o1="undefined"!=typeof Float32Array,o2=[];function o5(e){return Math.round(e/oJ*1e8)/1e8%2*oJ}function o3(e,t){var n=o5(e[0]);n<0&&(n+=o0);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=o0?i=n+o0:t&&n-i>=o0?i=n-o0:!t&&n>i?i=n+(o0-o5(n-i)):t&&n<i&&(i=n-(o0-o5(i-n))),e[0]=n,e[1]=i}var o4=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=oQ(n/rJ/e)||0,this._uy=oQ(n/rJ/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(oZ.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=oQ(e-this._xi),r=oQ(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(oZ.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(oZ.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(oZ.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),o2[0]=r,o2[1]=i,o3(o2,o),r=o2[0];var a=(i=o2[1])-r;return this.addData(oZ.A,e,t,n,n,r,a,0,+!o),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=oX(i)*n+e,this._yi=oK(i)*n+t,this},t.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},t.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(oZ.R,e,t,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(oZ.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)&&o1&&(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,r=this._len,i=0;i<t;i++)n+=e[i].len();o1&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(var i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},t.prototype.addData=function(e,t,n,r,i,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,o1&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){oW[0]=oW[1]=oG[0]=oG[1]=Number.MAX_VALUE,o$[0]=o$[1]=oU[0]=oU[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,i=0,o=0;for(e=0;e<this._len;){var a=t[e++],s=1===e;switch(s&&(n=t[e],r=t[e+1],i=n,o=r),a){case oZ.M:n=i=t[e++],r=o=t[e++],oG[0]=i,oG[1]=o,oU[0]=i,oU[1]=o;break;case oZ.L:oF(n,r,t[e],t[e+1],oG,oU),n=t[e++],r=t[e++];break;case oZ.C:(function(e,t,n,r,i,o,a,s,l,u){var c=n2(e,n,i,a,oz);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=nJ(e,n,i,a,oz[h]);l[0]=oI(d,l[0]),u[0]=oO(d,u[0])}c=n2(t,r,o,s,oV);for(var h=0;h<c;h++){var f=nJ(t,r,o,s,oV[h]);l[1]=oI(f,l[1]),u[1]=oO(f,u[1])}l[0]=oI(e,l[0]),u[0]=oO(e,u[0]),l[0]=oI(a,l[0]),u[0]=oO(a,u[0]),l[1]=oI(t,l[1]),u[1]=oO(t,u[1]),l[1]=oI(s,l[1]),u[1]=oO(s,u[1])})(n,r,t[e++],t[e++],t[e++],t[e++],t[e],t[e+1],oG,oU),n=t[e++],r=t[e++];break;case oZ.Q:(function(e,t,n,r,i,o,a,s){var l=oO(oI(n8(e,n,i),1),0),u=oO(oI(n8(t,r,o),1),0),c=n3(e,n,i,l),h=n3(t,r,o,u);a[0]=oI(e,i,c),a[1]=oI(t,o,h),s[0]=oO(e,i,c),s[1]=oO(t,o,h)})(n,r,t[e++],t[e++],t[e],t[e+1],oG,oU),n=t[e++],r=t[e++];break;case oZ.A:var l=t[e++],u=t[e++],c=t[e++],h=t[e++],d=t[e++],f=t[e++]+d;e+=1;var p=!t[e++];s&&(i=oX(d)*c+l,o=oK(d)*h+u),function(e,t,n,r,i,o,a,s,l){var u=Math.abs(i-o);if(u%oE<1e-4&&u>1e-4){s[0]=e-n,s[1]=t-r,l[0]=e+n,l[1]=t+r;return}if(oL[0]=oR(i)*n+e,oL[1]=oP(i)*r+t,oN[0]=oR(o)*n+e,oN[1]=oP(o)*r+t,t$(s,oL,oN),tG(l,oL,oN),(i%=oE)<0&&(i+=oE),(o%=oE)<0&&(o+=oE),i>o&&!a?o+=oE:i<o&&a&&(i+=oE),a){var c=o;o=i,i=c}for(var h=0;h<o;h+=Math.PI/2)h>i&&(oB[0]=oR(h)*n+e,oB[1]=oP(h)*r+t,t$(s,oB,s),tG(l,oB,l))}(l,u,c,h,d,f,p,oG,oU),n=oX(f)*c+l,r=oK(f)*h+u;break;case oZ.R:oF(i=n=t[e++],o=r=t[e++],i+t[e++],o+t[e++],oG,oU);break;case oZ.Z:n=i,r=o}t$(oW,oW,oG),tG(o$,o$,oU)}return 0===e&&(oW[0]=oW[1]=o$[0]=o$[1]=0),new nC(oW[0],oW[1],o$[0]-oW[0],o$[1]-oW[1])},t.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=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++],f=1===h;f&&(i=e[h],o=e[h+1],a=i,s=o);var p=-1;switch(d){case oZ.M:i=a=e[h++],o=s=e[h++];break;case oZ.L:var g=e[h++],m=e[h++],v=g-i,y=m-o;(oQ(v)>n||oQ(y)>r||h===t-1)&&(p=Math.sqrt(v*v+y*y),i=g,o=m);break;case oZ.C:var x=e[h++],b=e[h++],g=e[h++],m=e[h++],w=e[h++],S=e[h++];p=function(e,t,n,r,i,o,a,s,l){for(var u=e,c=t,h=0,d=1;d<=10;d++){var f=.1*d,p=nJ(e,n,i,a,f),g=nJ(t,r,o,s,f),m=p-u,v=g-c;h+=Math.sqrt(m*m+v*v),u=p,c=g}return h}(i,o,x,b,g,m,w,S,10),i=w,o=S;break;case oZ.Q:var x=e[h++],b=e[h++],g=e[h++],m=e[h++];p=function(e,t,n,r,i,o,a){for(var s=e,l=t,u=0,c=1;c<=10;c++){var h=.1*c,d=n3(e,n,i,h),f=n3(t,r,o,h),p=d-s,g=f-l;u+=Math.sqrt(p*p+g*g),s=d,l=f}return u}(i,o,x,b,g,m,10),i=g,o=m;break;case oZ.A:var _=e[h++],C=e[h++],M=e[h++],k=e[h++],T=e[h++],D=e[h++],A=D+T;h+=1,f&&(a=oX(T)*M+_,s=oK(T)*k+C),p=oY(M,k)*oq(o0,Math.abs(D)),i=oX(A)*M+_,o=oK(A)*k+C;break;case oZ.R:a=i=e[h++],s=o=e[h++],p=2*e[h++]+2*e[h++];break;case oZ.Z:var v=a-i,y=s-o;p=Math.sqrt(v*v+y*y),i=a,o=s}p>=0&&(l[c++]=p,u+=p)}return this._pathLen=u,u},t.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,l,u,c,h,d=this.data,f=this._ux,p=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&&(i=d[b],o=d[b+1],n=i,r=o),w!==oZ.L&&x>0&&(e.lineTo(c,h),x=0),w){case oZ.M:n=i=d[b++],r=o=d[b++],e.moveTo(i,o);break;case oZ.L:a=d[b++],s=d[b++];var _=oQ(a-i),C=oQ(s-o);if(_>f||C>p){if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;e.lineTo(i*(1-k)+a*k,o*(1-k)+s*k);break t}v+=M}e.lineTo(a,s),i=a,o=s,x=0}else{var T=_*_+C*C;T>x&&(c=a,h=s,x=T)}break;case oZ.C:var D=d[b++],A=d[b++],I=d[b++],O=d[b++],P=d[b++],R=d[b++];if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;n5(i,D,I,P,k,oj),n5(o,A,O,R,k,oH),e.bezierCurveTo(oj[1],oH[1],oj[2],oH[2],oj[3],oH[3]);break t}v+=M}e.bezierCurveTo(D,A,I,O,P,R),i=P,o=R;break;case oZ.Q:var D=d[b++],A=d[b++],I=d[b++],O=d[b++];if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;n6(i,D,I,k,oj),n6(o,A,O,k,oH),e.quadraticCurveTo(oj[1],oH[1],oj[2],oH[2]);break t}v+=M}e.quadraticCurveTo(D,A,I,O),i=I,o=O;break;case oZ.A:var E=d[b++],L=d[b++],N=d[b++],B=d[b++],F=d[b++],z=d[b++],V=d[b++],Z=!d[b++],j=N>B?N:B,H=oQ(N-B)>.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,N,B,V,F,W,Z):e.arc(E,L,j,F,W,Z),$)break t;S&&(n=oX(F)*N+E,r=oK(F)*B+L),i=oX(W)*N+E,o=oK(W)*B+L;break;case oZ.R:n=i=d[b],r=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+oq(q,G),s),(q-=G)>0&&e.lineTo(a+G,s+oq(q,U)),(q-=U)>0&&e.lineTo(a+oY(G-q,0),s+U),(q-=G)>0&&e.lineTo(a,s+oY(U-q,0));break t}v+=M}e.rect(a,s,G,U);break;case oZ.Z:if(m){var M=l[y++];if(v+M>u){var k=(u-v)/M;e.lineTo(i*(1-k)+n*k,o*(1-k)+r*k);break t}v+=M}e.closePath(),i=n,o=r}}},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=oZ,t.initDefaultProps=void((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0),t}();function o8(e,t,n,r,i,o,a){if(0===i)return!1;var s=0,l=e;if(a>t+i&&a>r+i||a<t-i&&a<r-i||o>e+i&&o>n+i||o<e-i&&o<n-i)return!1;if(e===n)return Math.abs(o-e)<=i/2;s=(t-r)/(e-n);var u=s*o-a+(l=(e*r-n*t)/(e-n));return u*u/(s*s+1)<=i/2*i/2}var o6=2*Math.PI;function o9(e){return(e%=o6)<0&&(e+=o6),e}var o7=2*Math.PI;function ae(e,t,n,r,i,o){if(o>t&&o>r||o<t&&o<r||r===t)return 0;var a=(o-t)/(r-t),s=r<t?1:-1;(1===a||0===a)&&(s=r<t?.5:-.5);var l=a*(n-e)+e;return l===i?1/0:l>i?s:0}var at=o4.CMD,an=2*Math.PI,ar=[-1,-1,-1],ai=[-1,-1];function ao(e,t,n,r,i){for(var o,a,s=e.data,l=e.len(),u=0,c=0,h=0,d=0,f=0,p=0;p<l;){var g,m,v,y,x,b,w,S,_,C,M,k,T,D,A=s[p++],I=1===p;switch(A===at.M&&p>1&&!n&&(u+=ae(c,h,d,f,r,i)),I&&(c=s[p],h=s[p+1],d=c,f=h),A){case at.M:d=s[p++],f=s[p++],c=d,h=f;break;case at.L:if(n){if(o8(c,h,s[p],s[p+1],t,r,i))return!0}else u+=ae(c,h,s[p],s[p+1],r,i)||0;c=s[p++],h=s[p++];break;case at.C:if(n){if(g=c,m=h,v=s[p++],y=s[p++],x=s[p++],b=s[p++],w=s[p],S=s[p+1],0!==t&&(!(i>m+t)||!(i>y+t)||!(i>b+t)||!(i>S+t))&&(!(i<m-t)||!(i<y-t)||!(i<b-t)||!(i<S-t))&&(!(r>g+t)||!(r>v+t)||!(r>x+t)||!(r>w+t))&&(!(r<g-t)||!(r<v-t)||!(r<x-t)||!(r<w-t))&&function(e,t,n,r,i,o,a,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;nq[0]=l,nq[1]=u;for(var y=0;y<1;y+=.05)nY[0]=nJ(e,n,i,a,y),nY[1]=nJ(t,r,o,s,y),(p=tj(nq,nY))<v&&(h=y,v=p);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=h-m,f=h+m,nY[0]=nJ(e,n,i,a,d),nY[1]=nJ(t,r,o,s,d),p=tj(nY,nq),d>=0&&p<v?(h=d,v=p):(nX[0]=nJ(e,n,i,a,f),nX[1]=nJ(t,r,o,s,f),g=tj(nX,nq),f<=1&&g<v?(h=f,v=g):m*=.5);return n$(v)}(g,m,v,y,x,b,w,S,r,i,0)<=t/2)return!0}else u+=function(e,t,n,r,i,o,a,s,l,u){if(u>t&&u>r&&u>o&&u>s||u<t&&u<r&&u<o&&u<s)return 0;var c=n1(t,r,o,s,u,ar);if(0===c)return 0;for(var h=0,d=-1,f=void 0,p=void 0,g=0;g<c;g++){var m=ar[g],v=0===m||1===m?.5:1;!(nJ(e,n,i,a,m)<l)&&(d<0&&(d=n2(t,r,o,s,ai),ai[1]<ai[0]&&d>1&&function(){var e=ai[0];ai[0]=ai[1],ai[1]=e}(),f=nJ(t,r,o,s,ai[0]),d>1&&(p=nJ(t,r,o,s,ai[1]))),2===d?m<ai[0]?h+=f<t?v:-v:m<ai[1]?h+=p<f?v:-v:h+=s<p?v:-v:m<ai[0]?h+=f<t?v:-v:h+=s<f?v:-v)}return h}(c,h,s[p++],s[p++],s[p++],s[p++],s[p],s[p+1],r,i)||0;c=s[p++],h=s[p++];break;case at.Q:if(n){if(_=c,C=h,M=s[p++],k=s[p++],T=s[p],D=s[p+1],0!==t&&(!(i>C+t)||!(i>k+t)||!(i>D+t))&&(!(i<C-t)||!(i<k-t)||!(i<D-t))&&(!(r>_+t)||!(r>M+t)||!(r>T+t))&&(!(r<_-t)||!(r<M-t)||!(r<T-t))&&function(e,t,n,r,i,o,a,s,l){var u,c=.005,h=1/0;nq[0]=a,nq[1]=s;for(var d=0;d<1;d+=.05){nY[0]=n3(e,n,i,d),nY[1]=n3(t,r,o,d);var f=tj(nq,nY);f<h&&(u=d,h=f)}h=1/0;for(var p=0;p<32&&!(c<1e-4);p++){var g=u-c,m=u+c;nY[0]=n3(e,n,i,g),nY[1]=n3(t,r,o,g);var f=tj(nY,nq);if(g>=0&&f<h)u=g,h=f;else{nX[0]=n3(e,n,i,m),nX[1]=n3(t,r,o,m);var v=tj(nX,nq);m<=1&&v<h?(u=m,h=v):c*=.5}}return n$(h)}(_,C,M,k,T,D,r,i,0)<=t/2)return!0}else u+=function(e,t,n,r,i,o,a,s){if(s>t&&s>r&&s>o||s<t&&s<r&&s<o)return 0;var l=function(e,t,n,r,i){var o=e-2*t+n,a=2*(t-e),s=e-r,l=0;if(nK(o)){if(nQ(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(nK(c)){var u=-a/(2*o);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=n$(c),u=(-a+h)/(2*o),d=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}(t,r,o,s,ar);if(0===l)return 0;var u=n8(t,r,o);if(u>=0&&u<=1){for(var c=0,h=n3(t,r,o,u),d=0;d<l;d++){var f=0===ar[d]||1===ar[d]?.5:1,p=n3(e,n,i,ar[d]);!(p<a)&&(ar[d]<u?c+=h<t?f:-f:c+=o<h?f:-f)}return c}var f=0===ar[0]||1===ar[0]?.5:1,p=n3(e,n,i,ar[0]);return p<a?0:o<t?f:-f}(c,h,s[p++],s[p++],s[p],s[p+1],r,i)||0;c=s[p++],h=s[p++];break;case at.A:var O=s[p++],P=s[p++],R=s[p++],E=s[p++],L=s[p++],N=s[p++];p+=1;var B=!!(1-s[p++]);o=Math.cos(L)*R+O,a=Math.sin(L)*E+P,I?(d=o,f=a):u+=ae(c,h,o,a,r,i);var F=(r-O)*E/R+O;if(n){if(function(e,t,n,r,i,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(r-i)%o7<1e-4)return!0;if(o){var c=r;r=o9(i),i=o9(c)}else r=o9(r),i=o9(i);r>i&&(i+=o7);var h=Math.atan2(l,s);return h<0&&(h+=o7),h>=r&&h<=i||h+o7>=r&&h+o7<=i}(O,P,E,L,L+N,B,t,F,i))return!0}else u+=function(e,t,n,r,i,o,a,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);ar[0]=-l,ar[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=an-1e-4){r=0,i=an;var c=o?1:-1;return a>=ar[0]+e&&a<=ar[1]+e?c:0}if(r>i){var h=r;r=i,i=h}r<0&&(r+=an,i+=an);for(var d=0,f=0;f<2;f++){var p=ar[f];if(p+e>a){var g=Math.atan2(s,p),c=o?1:-1;g<0&&(g=an+g),(g>=r&&g<=i||g+an>=r&&g+an<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),d+=c)}}return d}(O,P,E,L,L+N,B,F,i);c=Math.cos(L+N)*R+O,h=Math.sin(L+N)*E+P;break;case at.R:d=c=s[p++],f=h=s[p++];var z=s[p++],V=s[p++];if(o=d+z,a=f+V,n){if(o8(d,f,o,f,t,r,i)||o8(o,f,o,a,t,r,i)||o8(o,a,d,a,t,r,i)||o8(d,a,d,f,t,r,i))return!0}else u+=ae(o,f,o,a,r,i),u+=ae(d,a,d,f,r,i);break;case at.Z:if(n){if(o8(c,h,d,f,t,r,i))return!0}else u+=ae(c,h,d,f,r,i);c=d,h=f}}return!n&&!(1e-4>Math.abs(h-f))&&(u+=ae(c,h,d,f,r,i)||0),0!==u}var aa=e8({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},o_),as={style:e8({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},oC.style)},al=r9.concat(["invisible","culling","z","z2","zlevel","parent"]);let au=function(e){var t;function n(t){return e.call(this,t)||this}return tL(n,e),n.prototype.update=function(){var t=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new n;i.buildPath===n.prototype.buildPath&&(i.buildPath=function(e){t.buildPath(e,t.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s<al.length;++s)i[al[s]]=this[al[s]];i.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(t){var n=ti(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var o=n[i],a=t[o];"style"===o?this.style?e4(this.style,a):this.useStyle(a):"shape"===o?e4(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(tu(e)){var t=rS(e,0);return t>.5?r0:t>.2?"#eee":r1}if(e)return r1}return r0},n.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(tu(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==.4>rS(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 o4(!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 r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.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),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),ao(o,a/s,!0,e,t)))return!0}if(this.hasFill())return ao(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:e4(n,e),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(e){return tA(aa,e)},n.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=e4({},this.shape))},n.prototype._applyStateObj=function(t,n,r,i,o,a){e.prototype._applyStateObj.call(this,t,n,r,i,o,a);var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=e4({},r.shape),e4(s,n.shape)):(s=e4({},i?this.shape:r.shape),e4(s,n.shape)):l&&(s=r.shape),s){if(o){this.shape=e4({},this.shape);for(var u={},c=ti(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,r=e.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(n=n||{},this._mergeStyle(n,o.shape))}return n&&(r.shape=n),r},n.prototype.getAnimationStyleProps=function(){return as},n.prototype.isZeroArea=function(){return!1},n.extend=function(e){var t=function(t){function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return tL(n,t),n.prototype.getDefaultStyle=function(){return e5(e.style)},n.prototype.getDefaultShape=function(){return e5(e.shape)},n}(n);for(var r in e)"function"==typeof e[r]&&(t.prototype[r]=e[r]);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}(oT);var ac=e8({strokeFirst:!0,font:eZ,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},aa),ah=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tL(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 tA(ac,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=ir(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(oT);ah.prototype.type="tspan";var ad=e8({x:0,y:0},o_),af={style:e8({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},oC.style)},ap=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tL(t,e),t.prototype.createStyle=function(e){return tA(ad,e)},t.prototype._getSize=function(e){var t,n=this.style,r=n[e];if(null!=r)return r;var i=(t=n.image)&&"string"!=typeof t&&t.width&&t.height?n.image:this.__image;if(!i)return 0;var o="width"===e?"height":"width",a=n[o];return null==a?i[e]:i[e]/i[o]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return af},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new nC(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(oT);ap.prototype.type="image";let ag=ap;var am=Math.round;function av(e,t,n){if(t){var r=t.x1,i=t.x2,o=t.y1,a=t.y2;e.x1=r,e.x2=i,e.y1=o,e.y2=a;var s=n&&n.lineWidth;return s&&(am(2*r)===am(2*i)&&(e.x1=e.x2=ax(r,s,!0)),am(2*o)===am(2*a)&&(e.y1=e.y2=ax(o,s,!0))),e}}function ay(e,t,n){if(t){var r=t.x,i=t.y,o=t.width,a=t.height;e.x=r,e.y=i,e.width=o,e.height=a;var s=n&&n.lineWidth;return s&&(e.x=ax(r,s,!0),e.y=ax(i,s,!0),e.width=Math.max(ax(r+o,s,!1)-e.x,+(0!==o)),e.height=Math.max(ax(i+a,s,!1)-e.y,+(0!==a))),e}}function ax(e,t,n){if(!t)return e;var r=am(2*e);return(r+am(t))%2==0?r/2:(r+(n?1:-1))/2}var ab=function(){this.x=0,this.y=0,this.width=0,this.height=0},aw={},aS=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultShape=function(){return new ab},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,r,i,o,a,s,l,u,c,h,d,f,p,g,m,v=ay(aw,t,this.style);f=v.x,p=v.y,g=v.width,m=v.height,v.r=t.r,t=v}else f=t.x,p=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?r=i=o=a=d:d instanceof Array?1===d.length?r=i=o=a=d[0]:2===d.length?(r=o=d[0],i=a=d[1]):3===d.length?(r=d[0],i=a=d[1],o=d[2]):(r=d[0],i=d[1],o=d[2],a=d[3]):r=i=o=a=0,r+i>c&&(s=r+i,r*=c/s,i*=c/s),o+a>c&&(s=o+a,o*=c/s,a*=c/s),i+o>h&&(s=i+o,i*=h/s,o*=h/s),r+a>h&&(s=r+a,r*=h/s,a*=h/s),e.moveTo(l+r,u),e.lineTo(l+c-i,u),0!==i&&e.arc(l+c-i,u+i,i,-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+r),0!==r&&e.arc(l+r,u+r,r,Math.PI,1.5*Math.PI)):e.rect(f,p,g,m)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(au);aS.prototype.type="rect";let a_=aS;var aC={fill:"#000"},aM={style:e8({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},oC.style)},ak=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=aC,n.attr(t),n}return tL(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,aO(e=this.style),te(e.rich,aO),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 nC(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o=t[i],a=o.getBoundingRect(),s=o.getLocalTransform(n);s?(e.copy(a),e.applyTransform(s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||aC},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return e4(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=ti(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},e4(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return aM},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||eZ,n=e.padding,r=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a=ia(o),s=ty(t.lineHeight,a),l=!!t.backgroundColor,u="truncate"===t.lineOverflow,c=t.width,h=(n=null!=c&&("break"===r||"breakAll"===r)?e?ow(e,t.font,c,"breakAll"===r,0).lines:[]:e?e.split("\n"):[]).length*s,d=ty(t.height,h);if(h>d&&u){var f=Math.floor(d/s);n=n.slice(0,f)}if(e&&"truncate"===r&&null!=c)for(var p=op(c,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g<n.length;g++)n[g]=og(n[g],p);for(var m=d,v=0,g=0;g<n.length;g++)v=Math.max(ie(n[g],o),v);null==c&&(c=v);var y=v;return i&&(m+=i[0]+i[2],y+=i[1]+i[3],c+=i[1]+i[3]),l&&(y=c),{lines:n,height:d,outerWidth:y,outerHeight:m,lineHeight:s,calculatedLineHeight:a,contentWidth:v,contentHeight:h,width:c}}(aL(e),e),i=aN(e),o=!!e.backgroundColor,a=r.outerHeight,s=r.outerWidth,l=r.contentWidth,u=r.lines,c=r.lineHeight,h=this._defaultStyle,d=e.x||0,f=e.y||0,p=e.align||h.align||"left",g=e.verticalAlign||h.verticalAlign||"top",m=d,v=io(f,r.contentHeight,g);if(i||n){var y=ii(d,s,p),x=io(f,a,g);i&&this._renderBackground(e,e,y,x,s,a)}v+=c/2,n&&(m=aE(d,p,n),"top"===g?v+=n[0]:"bottom"===g&&(v-=n[2]));for(var b=0,w=!1,S=aR("fill"in e?e.fill:(w=!0,h.fill)),_=aP("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=r.calculatedLineHeight,T=0;T<u.length;T++){var D=this._getOrCreateChild(ah),A=D.createStyle();D.useStyle(A),A.text=u[T],A.x=m,A.y=v,p&&(A.textAlign=p),A.textBaseline="middle",A.opacity=e.opacity,A.strokeFirst=!0,C&&(A.shadowBlur=e.textShadowBlur||0,A.shadowColor=e.textShadowColor||"transparent",A.shadowOffsetX=e.textShadowOffsetX||0,A.shadowOffsetY=e.textShadowOffsetY||0),A.stroke=_,A.fill=S,_&&(A.lineWidth=e.lineWidth||b,A.lineDash=e.lineDash,A.lineDashOffset=e.lineDashOffset||0),A.font=t,aI(A,e),v+=c,M&&D.setBoundingRect(new nC(ii(A.x,e.width,A.textAlign),io(A.y,k,A.textBaseline),l,k))}},t.prototype._updateRichTexts=function(){var e=this.style,t=function(e,t){var n,r=new oy;if(null!=e&&(e+=""),!e)return r;for(var i=t.width,o=t.height,a=t.overflow,s=("break"===a||"breakAll"===a)&&null!=i?{width:i,accumWidth:0,breakAll:"breakAll"===a}:null,l=of.lastIndex=0;null!=(n=of.exec(e));){var u=n.index;u>l&&ox(r,e.substring(l,u),t,s),ox(r,n[2],t,s,n[1]),l=of.lastIndex}l<e.length&&ox(r,e.substring(l,e.length),t,s);var c=[],h=0,d=0,f=t.padding,p="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<r.lines.length;v++){for(var y=r.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=ia(k);var T=ty(_.height,S.contentHeight);if(S.innerHeight=T,C&&(T+=C[0]+C[2]),S.height=T,S.lineHeight=tx(_.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),r.lines=r.lines.slice(0,v+1)):r.lines=r.lines.slice(0,v);break n}var D=_.width,A=null==D||"auto"===D;if("string"==typeof D&&"%"===D.charAt(D.length-1))S.percentWidth=D,c.push(S),S.contentWidth=ie(S.text,k);else{if(A){var I=_.backgroundColor,O=I&&I.image;O&&od(O=function(e){if("string"!=typeof e)return e;var t=ou.get(e);return t&&t.image}(O))&&(S.width=Math.max(S.width,O.width*T/O.height))}var P=p&&null!=i?i-b:null;null!=P&&P<S.width?!A||P<M?(S.text="",S.width=S.contentWidth=0):(S.text=function(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=op(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=og(o[a],i);return o.join("\n")}(S.text,P-M,k,t.ellipsis,{minChar:t.truncateMinChar}),S.width=S.contentWidth=ie(S.text,k)):S.contentWidth=ie(S.text,k)}S.width+=M,b+=S.width,_&&(x=Math.max(x,S.lineHeight))}m(y,b,x)}r.outerWidth=r.width=ty(i,d),r.outerHeight=r.height=ty(o,h),r.contentHeight=h,r.contentWidth=d,f&&(r.outerWidth+=f[1]+f[3],r.outerHeight+=f[0]+f[2]);for(var v=0;v<c.length;v++){var S=c[v],R=S.percentWidth;S.width=parseInt(R,10)/100*r.width}return r}(aL(e),e),n=t.width,r=t.outerWidth,i=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=ii(a,r,u),d=io(s,i,c),f=h,p=d;o&&(f+=o[3],p+=o[0]);var g=f+n;aN(e)&&this._renderBackground(e,e,h,d,r,i);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=f,M=g,k=b-1,T=void 0;_<b&&(!(T=x[_]).align||"left"===T.align);)this._placeToken(T,e,w,p,C,"left",m),S-=T.width,C+=T.width,_++;for(;k>=0&&"right"===(T=x[k]).align;)this._placeToken(T,e,w,p,M,"right",m),S-=T.width,M-=T.width,k--;for(C+=(n-(C-f)-(g-M)-S)/2;_<=k;)T=x[_],this._placeToken(T,e,w,p,C+T.width/2,"center",m),C+=T.width,_++;p+=w}},t.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{};s.text=e.text;var l=e.verticalAlign,u=r+n/2;"top"===l?u=r+e.height/2:"bottom"===l&&(u=r+n-e.height/2),!e.isLineHolder&&aN(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,h=e.textPadding;h&&(i=aE(i,o,h),u-=e.height/2-h[0]-e.innerHeight/2);var d=this._getOrCreateChild(ah),f=d.createStyle();d.useStyle(f);var p=this._defaultStyle,g=!1,m=0,v=aR("fill"in s?s.fill:"fill"in t?t.fill:(g=!0,p.fill)),y=aP("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||p.autoStroke&&!g?null:(m=2,p.stroke)),x=s.textShadowBlur>0||t.textShadowBlur>0;f.text=e.text,f.x=i,f.y=u,x&&(f.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,f.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=e.font||eZ,f.opacity=tx(s.opacity,t.opacity,1),aI(f,s),y&&(f.lineWidth=tx(s.lineWidth,t.lineWidth,m),f.lineDash=ty(s.lineDash,t.lineDash),f.lineDashOffset=t.lineDashOffset||0,f.stroke=y),v&&(f.fill=v);var b=e.contentWidth,w=e.contentHeight;d.setBoundingRect(new nC(ii(f.x,b,f.textAlign),io(f.y,w,f.textBaseline),b,w))},t.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,h=l&&l.image,d=l&&!h,f=e.borderRadius,p=this;if(d||e.lineHeight||u&&c){(a=this._getOrCreateChild(a_)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=i,g.height=o,g.r=f,a.dirtyShape()}if(d){var m=a.style;m.fill=l||null,m.fillOpacity=ty(e.fillOpacity,1)}else if(h){(s=this._getOrCreateChild(ag)).onload=function(){p.dirtyStyle()};var v=s.style;v.image=l.image,v.x=n,v.y=r,v.width=i,v.height=o}if(u&&c){var m=a.style;m.lineWidth=u,m.stroke=c,m.strokeOpacity=ty(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=tx(e.opacity,t.opacity,1)},t.makeFont=function(e){var t,n,r="";return(null!=(t=e).fontSize||t.fontFamily||t.fontWeight)&&(r=[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(" ")),r&&t_(r)||e.textFont||e.font},t}(oT),aT={left:!0,right:1,center:1},aD={top:1,bottom:1,middle:1},aA=["fontStyle","fontWeight","fontSize","fontFamily"];function aI(e,t){for(var n=0;n<aA.length;n++){var r=aA[n],i=t[r];null!=i&&(e[r]=i)}}function aO(e){if(e){e.font=ak.makeFont(e);var t=e.align;"middle"===t&&(t="center"),e.align=null==t||aT[t]?t:"left";var n=e.verticalAlign;"center"===n&&(n="middle"),e.verticalAlign=null==n||aD[n]?n:"top",e.padding&&(e.padding=tw(e.padding))}}function aP(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function aR(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function aE(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function aL(e){var t=e.text;return null!=t&&(t+=""),t}function aN(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}let aB=ak;var aF=iQ(),az=function(e,t,n,r){if(r){var i=aF(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType="chart","group"===r.type&&r.traverse(function(r){var i=aF(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType="chart"})}},aV=1,aZ={},aj=iQ(),aH=iQ(),aW=["emphasis","blur","select"],a$=["normal","emphasis","blur","select"],aG="highlight",aU="downplay",aq="select",aY="unselect",aX="toggleSelect";function aK(e){return null!=e&&"none"!==e}function aQ(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function aJ(e){aQ(e,"emphasis",2)}function a0(e){2===e.hoverState&&aQ(e,"normal",0)}function a1(e){aQ(e,"blur",1)}function a2(e){1===e.hoverState&&aQ(e,"normal",0)}function a5(e){e.selected=!0}function a3(e){e.selected=!1}function a4(e,t,n){t(e,n),e.isGroup&&e.traverse(function(e){t(e,n)})}function a8(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 a6(e,t){var n,r,i,o,a,s=this.states[e];if(this.style){if("emphasis"===e)return function(e,t,n,r){var i=n&&e6(n,"select")>=0,o=!1;if(e instanceof au){var a=aj(e),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(aK(s)||aK(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=e4({},r),(u=e4({},u)).fill=s):!aK(u.fill)&&aK(s)?(o=!0,r=e4({},r),(u=e4({},u)).fill=rC(s)):!aK(u.stroke)&&aK(l)&&(o||(r=e4({},r),u=e4({},u)),u.stroke=rC(l)),r.style=u}}if(r&&null==r.z2){o||(r=e4({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,s);if("blur"===e)return n=s,r=e6(this.currentStates,e)>=0,i=this.style.opacity,o=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],l=i[s];o[s]=null==l?r&&r[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=e4({},n),a=e4({opacity:r?i:.1*o.opacity},a),n.style=a),n;if("select"===e)return function(e,t,n){if(n&&null==n.z2){n=e4({},n);var r=e.z2SelectLift;n.z2=e.z2+(null!=r?r:9)}return n}(this,0,s)}return s}function a9(e){e.stateProxy=a6;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=a6),n&&(n.stateProxy=a6)}function a7(e,t){sr(e,t)||e.__highByOuter||a4(e,aJ)}function se(e,t){sr(e,t)||e.__highByOuter||a4(e,a0)}function st(e,t){e.__highByOuter|=1<<(t||0),a4(e,aJ)}function sn(e,t){(e.__highByOuter&=~(1<<(t||0)))||a4(e,a0)}function sr(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function si(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var o=aH(i),a="series"===t,s=a?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);a||r.push(s),o.isBlured&&(s.group.traverse(function(e){a2(e)}),a&&n.push(i)),o.isBlured=!1}),te(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function so(e,t,n,r){var i=r.getModel();function o(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&a4(r,a2)}}if(n=n||"coordinateSystem",null!=e&&t&&"none"!==t){var a=i.getSeriesByIndex(e),s=a.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(e){var i=a===e,u=e.coordinateSystem;u&&u.master&&(u=u.master);var c=u&&s?u===s:i;if(!("series"===n&&!i||"coordinateSystem"===n&&!c||"series"===t&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){(!e.__highByOuter||!i||"self"!==t)&&a1(e)}),e7(t))o(e.getData(),t);else if(td(t))for(var h=ti(t),d=0;d<h.length;d++)o(e.getData(h[d]),t[h[d]]);l.push(e),aH(e).isBlured=!0}}),i.eachComponent(function(e,t){if("series"!==e){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(l,!0,i)}})}}function sa(e,t,n){if(null!=e&&null!=t){var r=n.getModel().getComponent(e,t);if(r){aH(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){a1(e)})}}}function ss(e,t,n,r){var i,o={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return o;var a=r.getModel().getComponent(e,t);if(!a)return o;var s=r.getViewOfComponentModel(a);if(!s||!s.findHighDownDispatchers)return o;for(var l=s.findHighDownDispatchers(n),u=0;u<l.length;u++)if("self"===aF(l[u]).focus){i=!0;break}return{focusSelf:i,dispatchers:l}}function sl(e){te(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?a4(t,a5):a4(t,a3)})})}function su(e,t,n){var r,i,o,a;sp(e,!0),a4(e,a9),r=e,i=t,o=n,a=aF(r),null!=i?(a.focus=i,a.blurScope=o):a.focus&&(a.focus=null)}function sc(e,t,n,r){r?sp(e,!1):su(e,t,n)}var sh=["emphasis","blur","select"],sd={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function sf(e,t,n,r){n=n||"itemStyle";for(var i=0;i<sh.length;i++){var o=sh[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[sd[n]]()}}function sp(e,t){var n=!1===t;e.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||e.__highDownDispatcher)&&(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function sg(e){return!!(e&&e.__highDownDispatcher)}function sm(e){var t=e.type;return t===aq||t===aY||t===aX}function sv(e){var t=e.type;return t===aG||t===aU}var sy=iQ();function sx(e,t,n,r,i){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 r?(u=ty(r.duration,200),c=ty(r.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)),tl(h)&&(h=h(n,i)),tl(u)&&(u=u(n)),{duration:u||0,delay:h,easing:c}}function sb(e,t,n,r,i,o,a){var s,l=!1;tl(i)?(a=o,o=i,i=null):td(i)&&(o=i.cb,a=i.during,l=i.isFrom,s=i.removeOpt,i=i.dataIndex);var u="leave"===e;u||t.stopAnimation("leave");var c=sx(e,r,i,u?s||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):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 sw(e,t,n,r,i,o){sb("update",e,t,n,r,i,o)}function sS(e,t,n,r,i,o){sb("enter",e,t,n,r,i,o)}function s_(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 sC(e,t,n,r,i,o){!s_(e)&&sb("leave",e,t,n,r,i,o)}function sM(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),sC(e,{style:{opacity:0}},t,n,r)}function sk(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||sM(e,t,n,r)}):sM(e,t,n,r)}function sT(e){sy(e).oldStyle=e.style}var sD={};function sA(e,t){for(var n=0;n<aW.length;n++){var r=aW[n],i=t[r],o=e.ensureState(r);o.style=o.style||{},o.style.text=i}var a=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(a,!0)}function sI(e,t,n){var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal;i&&(r=i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null)),null==r&&(r=tl(e.defaultText)?e.defaultText(o,e,n):e.defaultText);for(var l={normal:r},u=0;u<aW.length;u++){var c=aW[u],h=t[c];l[c]=ty(i?i.getFormattedLabel(o,c,null,a,h&&h.get("formatter")):null,r)}return l}function sO(e,t,n,r){n=n||sD;for(var i=e instanceof aB,o=!1,a=0;a<a$.length;a++){var s=t[a$[a]];if(s&&s.getShallow("show")){o=!0;break}}var l=i?e:e.getTextContent();if(o){!i&&(l||(l=new aB,e.setTextContent(l)),e.stateProxy&&(l.stateProxy=e.stateProxy));var u=sI(n,t),c=t.normal,h=!!c.getShallow("show"),d=sR(c,r&&r.normal,n,!1,!i);d.text=u.normal,i||e.setTextConfig(sE(c,n,!1));for(var a=0;a<aW.length;a++){var f=aW[a],s=t[f];if(s){var p=l.ensureState(f),g=!!ty(s.getShallow("show"),h);g!==h&&(p.ignore=!g),p.style=sR(s,r&&r[f],n,!0,!i),p.style.text=u[f],i||(e.ensureState(f).textConfig=sE(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&&(sV(l).setLabelText=function(e){var r=sI(n,t,e);sA(l,r)})}else l&&(l.ignore=!0);e.dirty()}function sP(e,t){t=t||"label";for(var n={normal:e.getModel(t)},r=0;r<aW.length;r++){var i=aW[r];n[i]=e.getModel([i,t])}return n}function sR(e,t,n,r,i){var o={};return function(e,t,n,r,i){n=n||sD;var o,a=t.ecModel,s=a&&a.option.textStyle,l=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||sD).rich;if(n){t=t||{};for(var r=ti(n),i=0;i<r.length;i++)t[r[i]]=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]);sF(o[u]={},c,s,n,r,i,!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),sF(e,t,s,n,r,i,!0,!1)}(o,e,n,r,i),t&&e4(o,t),o}function sE(e,t,n){t=t||{};var r,i={},o=e.getShallow("rotate"),a=ty(e.getShallow("distance"),n?null:5),s=e.getShallow("offset");return"outside"===(r=e.getShallow("position")||(n?null:"inside"))&&(r=t.defaultOutsidePosition||"top"),null!=r&&(i.position=r),null!=s&&(i.offset=s),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=a&&(i.distance=a),i.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",i}var sL=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],sN=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],sB=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function sF(e,t,n,r,i,o,a,s){n=!i&&n||sD;var l=r&&r.inheritColor,u=t.getShallow("color"),c=t.getShallow("textBorderColor"),h=ty(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=ty(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=d&&(e.lineWidth=d);var f=ty(t.getShallow("textBorderType"),n.textBorderType);null!=f&&(e.lineDash=f);var p=ty(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=p&&(e.lineDashOffset=p),i||null!=h||s||(h=r&&r.defaultOpacity),null!=h&&(e.opacity=h),i||o||null!=e.fill||!r.inheritColor||(e.fill=r.inheritColor);for(var g=0;g<sL.length;g++){var m=sL[g],v=ty(t.getShallow(m),n[m]);null!=v&&(e[m]=v)}for(var g=0;g<sN.length;g++){var m=sN[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||!r.disableBox){for(var g=0;g<sB.length;g++){var m=sB[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 sz(e,t){var n=t&&t.getModel("textStyle");return t_([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 sV=iQ();function sZ(e,t,n,r){if(e){var i=sV(e);i.prevValue=i.value,i.value=n;var o=t.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=t)}}var sj=["textStyle","color"],sH=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],sW=new aB,s$=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(sj):null)},e.prototype.getFont=function(){return sz({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<sH.length;n++)t[sH[n]]=this.getShallow(sH[n]);return sW.useStyle(t),sW.update(),sW.getBoundingRect()},e}(),sG=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],sU=oa(sG),sq=function(){function e(){}return e.prototype.getLineStyle=function(e){return sU(this,e)},e}(),sY=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],sX=oa(sY),sK=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return sX(this,e,t)},e}(),sQ=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 r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){e3(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,r=null==n?n:n[e];if(null==r&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=null!=t,i=r?this.parsePath(t):null;return new e(r?this._doGet(i):this.option,n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),this.ecModel)},e.prototype.isEmpty=function(){return null==this.option},e.prototype.restoreData=function(){},e.prototype.clone=function(){return new this.constructor(e5(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(!eV.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 r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);return null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();oe(sQ),bp=["__\0is_clz",on++].join("_"),sQ.prototype[bp]=!0,sQ.isInstance=function(e){return!!(e&&e[bp])},e9(sQ,sq),e9(sQ,sK),e9(sQ,ol),e9(sQ,s$);var sJ=Math.round(10*Math.random());function s0(e){return[e||"",sJ++].join("_")}function s1(e,t){return e3(e3({},e,!0),t,!0)}var s2={},s5={},s3=eV.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||"EN").toUpperCase().indexOf("ZH")>-1?"ZH":"EN";function s4(e,t){s5[e=e.toUpperCase()]=new sQ(t),s2[e]=t}s4("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:". "}}}}),s4("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 s8={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}"},s6="{yyyy}-{MM}-{dd}",s9={year:"{yyyy}",month:"{yyyy}-{MM}",day:s6,hour:s6+" "+s8.hour,minute:s6+" "+s8.minute,second:s6+" "+s8.second,millisecond:s8.none},s7=["year","month","day","hour","minute","second","millisecond"],le=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function lt(e,t){return e+="","0000".substr(0,t-e.length)+e}function ln(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 lr(e,t,n,r){var i=iR(e),o=i[la(n)](),a=i[ls(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[ll(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[lu(n)](),h=(c-1)%12+1,d=i[lc(n)](),f=i[lh(n)](),p=i[ld(n)](),g=(r instanceof sQ?r:s5[r||s3]||s5.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,lt(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,lt(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,lt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,y[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,lt(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,lt(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,lt(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,lt(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,lt(p,3)).replace(/{S}/g,p+"")}function li(e,t){var n=iR(e),r=n[ls(t)]()+1,i=n[ll(t)](),o=n[lu(t)](),a=n[lc(t)](),s=n[lh(t)](),l=0===n[ld(t)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,d=h&&1===i;if(d&&1===r)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 lo(e,t,n){var r=th(e)?iR(e):e;switch(t=t||li(e,n)){case"year":return r[la(n)]();case"half-year":return+(r[ls(n)]()>=6);case"quarter":return Math.floor((r[ls(n)]()+1)/4);case"month":return r[ls(n)]();case"day":return r[ll(n)]();case"half-day":return r[lu(n)]()/24;case"hour":return r[lu(n)]();case"minute":return r[lc(n)]();case"second":return r[lh(n)]();case"millisecond":return r[ld(n)]()}}function la(e){return e?"getUTCFullYear":"getFullYear"}function ls(e){return e?"getUTCMonth":"getMonth"}function ll(e){return e?"getUTCDate":"getDate"}function lu(e){return e?"getUTCHours":"getHours"}function lc(e){return e?"getUTCMinutes":"getMinutes"}function lh(e){return e?"getUTCSeconds":"getSeconds"}function ld(e){return e?"getUTCMilliseconds":"getMilliseconds"}function lf(e){return e?"setUTCMonth":"setMonth"}function lp(e){return e?"setUTCDate":"setDate"}function lg(e){return e?"setUTCHours":"setHours"}function lm(e){return e?"setUTCMinutes":"setMinutes"}function lv(e){return e?"setUTCSeconds":"setSeconds"}function ly(e){return e?"setUTCMilliseconds":"setMilliseconds"}function lx(e){if(isNaN(iB(e)))return tu(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function lb(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 lw(e,t,n){function r(e){return e&&t_(e)?e:"-"}function i(e){return!!(null!=e&&!isNaN(e)&&isFinite(e))}var o="time"===t,a=e instanceof Date;if(o||a){var s=o?iR(e):e;if(!isNaN(+s))return lr(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return tc(e)?r(e):th(e)&&i(e)?e+"":"-";var l=iB(e);return i(l)?lx(l):tc(e)?r(e):"boolean"==typeof e?e+"":"-"}var lS=["a","b","c","d","e","f","g"],l_=function(e,t){return"{"+e+(null==t?"":t)+"}"};function lC(e,t,n){ts(t)||(t=[t]);var r=t.length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=lS[o];e=e.replace(l_(a),l_(a,0))}for(var s=0;s<r;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];e=e.replace(l_(lS[l],s),n?t4(u):u)}return e}function lM(e,t){return t=t||"transparent",tu(e)?e:td(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function lk(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var lT=["left","right","top","bottom","width","height"],lD=[["width","left","right"],["height","top","bottom"]];function lA(e,t,n,r,i){var o=0,a=0;null==r&&(r=1/0),null==i&&(i=1/0);var s=0;t.eachChild(function(l,u){var c,h,d=l.getBoundingRect(),f=t.childAt(u+1),p=f&&f.getBoundingRect();if("horizontal"===e){var g=d.width+(p?-p.x+d.x:0);(c=o+g)>r||l.newline?(o=0,c=g,a+=s+n,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(p?-p.y+d.y:0);(h=a+m)>i||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 lI(e,t,n){n=tw(n||0);var r=t.width,i=t.height,o=iM(e.left,r),a=iM(e.top,i),s=iM(e.right,r),l=iM(e.bottom,i),u=iM(e.width,r),c=iM(e.height,i),h=n[2]+n[0],d=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=r-s-d-o),isNaN(c)&&(c=i-l-h-a),null!=f&&(isNaN(u)&&isNaN(c)&&(f>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(o)&&(o=r-s-u-d),isNaN(a)&&(a=i-l-c-h),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-d}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-h}o=o||0,a=a||0,isNaN(u)&&(u=r-d-o-(s||0)),isNaN(c)&&(c=i-h-a-(l||0));var p=new nC(o+n[3],a+n[0],u,c);return p.margin=n,p}function lO(e,t,n,r,i,o){var a,s=!i||!i.hv||i.hv[0],l=!i||!i.hv||i.hv[1],u=i&&i.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 nC(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=lI(e8({width:a.width,height:a.height},t),n,r),d=s?h.x-a.x:0,f=l?h.y-a.y:0;return"raw"===u?(o.x=d,o.y=f):(o.x+=d,o.y+=f),o===e&&e.markRedraw(),!0}function lP(e){var t=e.layoutMode||e.constructor.layoutMode;return td(t)?t:t?{type:t}:null}function lR(e,t,n){var r=n&&n.ignoreSize;ts(r)||(r=[r,r]);var i=a(lD[0],0),o=a(lD[1],1);function a(n,i){var o={},a=0,u={},c=0;if(te(n,function(t){u[t]=e[t]}),te(n,function(e){s(t,e)&&(o[e]=u[e]=t[e]),l(o,e)&&a++,l(u,e)&&c++}),r[i])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){te(e,function(e){t[e]=n[e]})}u(lD[0],e,i),u(lD[1],e,o)}function lE(e){var t,n;return t={},(n=e)&&t&&te(lT,function(e){n.hasOwnProperty(e)&&(t[e]=n[e])}),t}ta(lA,"vertical"),ta(lA,"horizontal");var lL=iQ(),lN=function(e){var t;function n(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=s0("ec_cpt_model"),i}return eF(n,e),n.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=lP(this),r=n?lE(e):{};e3(e,t.getTheme().get(this.mainType)),e3(e,this.getDefaultOption()),n&&lR(e,r,n)},n.prototype.mergeOption=function(e,t){e3(this.option,e,!0);var n=lP(this);n&&lR(this.option,e,n)},n.prototype.optionUpdated=function(e,t){},n.prototype.getDefaultOption=function(){var e=this.constructor;if(!(e&&e[i9]))return e.defaultOption;var t=lL(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;a>=0;a--)o=e3(o,n[a],!0);t.defaultOption=o}return t.defaultOption},n.prototype.getReferringComponents=function(e,t){return i3(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}(sQ);ot(lN,sQ),oo(lN),bg={},lN.registerSubTypeDefaulter=function(e,t){bg[i7(e).main]=t},lN.determineSubType=function(e,t){var n=t.type;if(!n){var r=i7(e).main;lN.hasSubTypes(e)&&bg[r]&&(n=bg[r](t))}return n},function(e,t){e.topologicalTravel=function(e,r,i,o){if(e.length){var a,s,l,u=(s={},l=[],te(a=r,function(e){var r,i,o,u=n(s,e),c=(r=u.originalDeps=t(e),i=a,o=[],te(r,function(e){e6(i,e)>=0&&o.push(e)}),o);u.entryCount=c.length,0===u.entryCount&&l.push(e),te(c,function(t){0>e6(u.predecessor,t)&&u.predecessor.push(t);var r=n(s,t);0>e6(r.successor,t)&&r.successor.push(e)})}),{graph:s,noEntryList:l}),c=u.graph,h=u.noEntryList,d={};for(te(e,function(e){d[e]=!0});h.length;){var f=h.pop(),p=c[f],g=!!d[f];g&&(i.call(o,f,p.originalDeps.slice()),delete d[f]),te(p.successor,g?v:m)}te(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]}}(lN,function(e){var t=[];return te(lN.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=tt(t,function(e){return i7(e).main}),"dataset"!==e&&0>=e6(t,"dataset")&&t.unshift("dataset"),t});var lB="";"undefined"!=typeof navigator&&(lB=navigator.platform||"");var lF="rgba(0, 0, 0, 0.2)";let lz={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:lF,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:lF,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:lF,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:lF,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:lF,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:lF,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:lB.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 lV=tD(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),lZ="original",lj="arrayRows",lH="objectRows",lW="keyedColumns",l$="typedArray",lG="unknown",lU="column",lq={Must:1,Might:2,Not:3},lY=iQ();function lX(e,t,n){var r,i,o={},a=lQ(t);if(!a||!e)return o;var s=[],l=[],u=lY(t.ecModel).datasetMap,c=a.uid+"_"+n.seriesLayoutBy;te(e=e.slice(),function(t,n){var a=td(t)?t:e[n]={name:t};"ordinal"===a.type&&null==r&&(r=n,i=f(a)),o[a.name]=[]});var h=u.get(c)||u.set(c,{categoryWayDim:i,valueWayDim:0});function d(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function f(e){var t=e.dimsDef;return t?t.length:1}return te(e,function(e,t){var n=e.name,i=f(e);if(null==r){var a=h.valueWayDim;d(o[n],a,i),d(l,a,i),h.valueWayDim+=i}else if(r===t)d(o[n],0,i),d(s,0,i);else{var a=h.categoryWayDim;d(o[n],a,i),d(l,a,i),h.categoryWayDim+=i}}),s.length&&(o.itemName=s),l.length&&(o.seriesName=l),o}function lK(e,t,n){var r,i={};if(!lQ(e))return i;var o=t.sourceFormat,a=t.dimensionsDefine;(o===lH||o===lW)&&te(a,function(e,t){(td(e)?e.name:e)==="name"&&(r=t)});var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=l0(t.data,o,t.seriesLayoutBy,a,t.startIndex,l);s.push(c);var h=c===lq.Not;if(h&&null==e.v&&l!==r&&(e.v=l),null!=e.n&&e.n!==e.v&&(h||s[e.n]!==lq.Not)||(e.n=l),d(e)&&s[e.n]!==lq.Not)return e;h||(c===lq.Might&&null==i.v&&l!==r&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(i)?i:null}();if(s){i.value=[s.v];var l=null!=r?r:s.n;i.itemName=[l],i.seriesName=[l]}return i}function lQ(e){if(!e.get("data",!0))return i3(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},i2).models[0]}function lJ(e,t){return l0(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function l0(e,t,n,r,i,o){var a,s,l;if(tp(e))return lq.Not;if(r){var u=r[o];td(u)?(s=u.name,l=u.type):tu(u)&&(s=u)}if(null!=l)return"ordinal"===l?lq.Must:lq.Not;if(t===lj){if("row"===n){for(var c=e[o],h=0;h<(c||[]).length&&h<5;h++)if(null!=(a=g(c[i+h])))return a}else for(var h=0;h<e.length&&h<5;h++){var d=e[i+h];if(d&&null!=(a=g(d[o])))return a}}else if(t===lH){if(!s)return lq.Not;for(var h=0;h<e.length&&h<5;h++){var f=e[h];if(f&&null!=(a=g(f[s])))return a}}else if(t===lW){if(!s)return lq.Not;var c=e[s];if(!c||tp(c))return lq.Not;for(var h=0;h<c.length&&h<5;h++)if(null!=(a=g(c[h])))return a}else if(t===lZ)for(var h=0;h<e.length&&h<5;h++){var f=e[h],p=i$(f);if(!ts(p))return lq.Not;if(null!=(a=g(p[o])))return a}function g(e){var t=tu(e);return null!=e&&isFinite(e)&&""!==e?t?lq.Might:lq.Not:t&&"-"!==e?lq.Must:void 0}return lq.Not}var l1=tD(),l2=iQ();iQ();var l5=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){return function(e,t,n,r,i,o,a){var s=t(o=o||e),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n;if((c=c||n)&&c.length){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}(this,l2,ij(this.get("color",!0)),this.get("colorLayer",!0),e,t,n)},e.prototype.clearColorPalette=function(){var e,t;e=this,(t=l2)(e).paletteIdx=0,t(e).paletteNameMap={}},e}(),l3="\0_ec_inner",l4=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new sQ(r),this._locale=new sQ(i),this._optionManager=o},t.prototype.setOption=function(e,t,n){var r=l9(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,l9(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var i=r.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(i,t)):bA(this,i),n=!0}if(("timeline"===e||"media"===e)&&this.restoreData(),!e||"recreate"===e||"timeline"===e){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&te(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,r=this._componentsMap,i=this._componentsCount,o=[],a=tD(),s=t&&t.replaceMergeMainTypeMap;lY(this).datasetMap=tD(),te(e,function(e,t){null!=e&&(lN.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?e5(e):e3(n[t],e,!0))}),s&&s.each(function(e,t){lN.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))}),lN.topologicalTravel(o,lN.getAllClassMainTypes(),function(t){var o,a,l,u,c,h,d,f,p,g,m,v,y,x,b,w,S,_,C,M,k=function(e,t,n){var r=l1.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}(this,t,ij(e[t])),T=r.get(t),D=T?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",A=(y=T,x=k,b="normalMerge"===D,w="replaceMerge"===D,S="replaceAll"===D,y=y||[],x=(x||[]).slice(),_=tD(),te(x,function(e,t){if(!td(e)){x[t]=null;return}}),C=function(e,t,n){var r=[];if("replaceAll"===n)return r;for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||iX(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(y,_,D),(b||w)&&(o=C,a=y,l=_,te(u=x,function(e,t){if(e&&null!=e.id){var n=iU(e.id),r=l.get(n);if(null!=r){var i=o[r];tS(!i.newOption,'Duplicated option on id "'+n+'".'),i.newOption=e,i.existing=a[r],u[t]=null}}})),b&&(c=C,te(h=x,function(e,t){if(e&&null!=e.name)for(var n=0;n<c.length;n++){var r=c[n].existing;if(!c[n].newOption&&r&&(null==r.id||null==e.id)&&!iX(e)&&!iX(r)&&iG("name",r,e)){c[n].newOption=e,h[t]=null;return}}})),b||w?(d=C,f=x,p=w,te(f,function(e){if(e){for(var t,n=0;(t=d[n])&&(t.newOption||iX(t.existing)||t.existing&&null!=e.id&&!iG("id",e,t.existing));)n++;t?(t.newOption=e,t.brandNew=p):d.push({newOption:e,brandNew:p,existing:null,keyInfo:null}),n++}})):S&&(g=C,te(x,function(e){g.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})),m=C,v=tD(),te(m,function(e){var t=e.existing;t&&v.set(t.id,e)}),te(m,function(e){var t=e.newOption;tS(!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={})}),te(m,function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(td(r)){if(i.name=null!=r.name?iU(r.name):n?n.name:iV+t,n)i.id=iU(n.id);else if(null!=r.id)i.id=iU(r.id);else{var o=0;do i.id="\0"+i.name+"\0"+o++;while(v.get(i.id))}v.set(i.id,e)}}),C);te(A,function(e){var n,r,i,o,a=e.newOption;td(a)&&(e.keyInfo.mainType=t,e.keyInfo.subType=(n=t,r=a,i=e.existing,o=lN,r.type?r.type:i?i.subType:o.determineSubType(n,r)))}),n[t]=null,r.set(t,null),i.set(t,0);var I=[],O=[],P=0;te(A,function(e,n){var r=e.existing,i=e.newOption;if(i){var o="series"===t,a=lN.getClass(t,e.keyInfo.subType,!o);if(!a)return;if("tooltip"===t){if(M)return;M=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=e4({componentIndex:n},e.keyInfo);e4(r=new a(i,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(I.push(r.option),O.push(r),P++):(I.push(void 0),O.push(void 0))},this),n[t]=I,r.set(t,O),i.set(t,P),"series"===t&&bT(this)},this),this._seriesIndices||bT(this)},t.prototype.getOption=function(){var e=e5(this.option);return te(e,function(t,n){if(lN.hasClass(n)){for(var r=ij(t),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!iX(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,e[n]=r}}),delete e[l3],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 r=n[t||0];if(r)return r;if(null==t){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t,n=e.mainType;if(!n)return[];var r=e.index,i=e.id,o=e.name,a=this._componentsMap.get(n);return a&&a.length?(null!=r?(t=[],te(ij(r),function(e){a[e]&&t.push(a[e])})):t=null!=i?l8("id",i,a):null!=o?l8("name",o,a):tr(a,function(e){return!!e}),l6(t,e)):[]},t.prototype.findComponents=function(e){var t,n,r,i,o,a=e.query,s=e.mainType,l=(t=a,n=s+"Index",r=s+"Id",i=s+"Name",t&&(null!=t[n]||null!=t[r]||null!=t[i])?{mainType:s,index:t[n],id:t[r],name:t[i]}:null);return o=l6(l?this.queryComponents(l):tr(this._componentsMap.get(s),function(e){return!!e}),e),e.filter?tr(o,e.filter):o},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(tl(e))r.each(function(n,r){for(var i=0;n&&i<n.length;i++){var o=n[i];o&&e.call(t,r,o,o.componentIndex)}});else for(var i=tu(e)?r.get(e):td(e)?this.findComponents(e):null,o=0;i&&o<i.length;o++){var a=i[o];a&&t.call(n,a,a.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=iq(e,null);return tr(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 tr(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return tr(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,t){bD(this),te(this._seriesIndices,function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){te(this._componentsMap.get("series"),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){bD(this),te(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return te(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return bD(this),null==this._seriesIndicesMap.get(e.componentIndex)},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){bD(this);var n=[];te(this._seriesIndices,function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=tD(n)},t.prototype.restoreData=function(e){bT(this);var t=this._componentsMap,n=[];t.each(function(e,t){lN.hasClass(t)&&n.push(t)}),lN.topologicalTravel(n,lN.getAllClassMainTypes(),function(n){te(t.get(n),function(t){t&&("series"!==n||!function(e,t){if(t){var n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=i&&e.name!==i}}(t,e))&&t.restoreData()})})},t.internalField=void(bT=function(e){var t=e._seriesIndices=[];te(e._componentsMap.get("series"),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=tD(t)},bD=function(e){},bA=function(e,t){e.option={},e.option[l3]=1,e._componentsMap=tD({series:[]}),e._componentsCount=tD();var n,r,i,o=t.aria;td(o)&&null==o.enabled&&(o.enabled=!0),n=t,r=e._theme.option,i=n.color&&!n.colorLayer,te(r,function(e,t){("colorLayer"!==t||!i)&&(lN.hasClass(t)||("object"==typeof e?n[t]=n[t]?e3(n[t],e,!1):e5(e):null!=n[t]||(n[t]=e)))}),e3(t,lz,!1),e._mergeOption(t,null)}),t}(sQ);function l8(e,t,n){if(ts(t)){var r=tD();return te(t,function(e){null!=e&&null!=iq(e,null)&&r.set(e,!0)}),tr(n,function(t){return t&&r.get(t[e])})}var i=iq(t,null);return tr(n,function(t){return t&&null!=i&&t[e]===i})}function l6(e,t){return t.hasOwnProperty("subType")?tr(e,function(e){return e&&e.subType===t.subType}):e}function l9(e){var t=tD();return e&&te(ij(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}e9(l4,l5);var l7=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"];let ue=function(e){te(l7,function(t){this[t]=to(e[t],e)},this)};var ut={},un=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];te(ut,function(r,i){var o=r.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){te(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){ut[e]=t},e.get=function(e){return ut[e]},e}(),ur=/^(min|max)?(.+)$/,ui=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(te(ij(e.series),function(e){e&&e.data&&tp(e.data)&&(e.data[tC]=!0)}),te(ij(e.dataset),function(e){e&&e.source&&tp(e.source)&&(e.source[tC]=!0)})),e=e5(e);var r=this._optionBackup,i=function(e,t,n){var r,i,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){te(t,function(t){t(e,n)})}return a?(i=a).timeline||(i.timeline=s):((h||c)&&(e.options=e.media=null),i=e),c&&ts(u)&&te(u,function(e){e&&e.option&&(e.query?o.push(e):r||(r=e))}),d(i),te(l,function(e){return d(e)}),te(o,function(e){return d(e.option)}),{baseOption:i,timelineOptions:l||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],e5(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent("timeline");r&&(t=e5(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),i=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 r={width:t,height:n,aspectratio:t/n},i=!0;return te(e,function(e,t){var n=t.match(ur);if(n&&n[1]&&n[2]){var o,a,s,l=n[1];o=r[n[2].toLowerCase()],a=e,("min"===(s=l)?o>=a:"max"===s?o<=a:o===a)||(i=!1)}}),i})(o[u].query,r,i)&&s.push(u);return!s.length&&a&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=tt(s,function(e){return e5(-1===e?a.option:o[e].option)})),this._currentMediaIndices=s,l},e}(),uo=td,ua=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function us(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=ua.length;n<r;n++){var i=ua[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?e3(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?e3(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function ul(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,e8(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function uu(e){ul(e,"itemStyle"),ul(e,"lineStyle"),ul(e,"areaStyle"),ul(e,"label"),ul(e,"labelLine"),ul(e,"upperLabel"),ul(e,"edgeLabel")}function uc(e,t){var n=uo(e)&&e[t],r=uo(n)&&n.textStyle;if(r)for(var i=0,o=iW.length;i<o;i++){var a=iW[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function uh(e){e&&(uu(e),uc(e,"label"),e.emphasis&&uc(e.emphasis,"label"))}function ud(e){return ts(e)?e:e?[e]:[]}function uf(e){return(ts(e)?e[0]:e)||{}}function up(e){e&&te(ug,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var ug=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],um=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],uv=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function uy(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<uv.length;n++){var r=uv[n][1],i=uv[n][0];null!=t[r]&&(t[i]=t[r])}}function ux(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function ub(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function uw(e,t){var n;te(ud(e.series),function(e){uo(e)&&function(e){if(uo(e)){us(e),uu(e),uc(e,"label"),uc(e,"upperLabel"),uc(e,"edgeLabel"),e.emphasis&&(uc(e.emphasis,"label"),uc(e.emphasis,"upperLabel"),uc(e.emphasis,"edgeLabel"));var t=e.markPoint;t&&(us(t),uh(t));var n=e.markLine;n&&(us(n),uh(n));var r=e.markArea;r&&uh(r);var i=e.data;if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!tp(o))for(var a=0;a<o.length;a++)uh(o[a]);te(e.categories,function(e){uu(e)})}if(i&&!tp(i))for(var a=0;a<i.length;a++)uh(i[a]);if((t=e.markPoint)&&t.data)for(var s=t.data,a=0;a<s.length;a++)uh(s[a]);if((n=e.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)ts(l[a])?(uh(l[a][0]),uh(l[a][1])):uh(l[a]);"gauge"===e.type?(uc(e,"axisLabel"),uc(e,"title"),uc(e,"detail")):"treemap"===e.type?(ul(e.breadcrumb,"itemStyle"),te(e.levels,function(e){uu(e)})):"tree"===e.type&&uu(e.leaves)}}(e)}),n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"],t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),te(n,function(t){te(ud(e[t]),function(e){e&&(uc(e,"axisLabel"),uc(e.axisPointer,"label"))})}),te(ud(e.parallel),function(e){var t=e&&e.parallelAxisDefault;uc(t,"axisLabel"),uc(t&&t.axisPointer,"label")}),te(ud(e.calendar),function(e){ul(e,"itemStyle"),uc(e,"dayLabel"),uc(e,"monthLabel"),uc(e,"yearLabel")}),te(ud(e.radar),function(e){uc(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)}),te(ud(e.geo),function(e){uo(e)&&(uh(e),te(ud(e.regions),function(e){uh(e)}))}),te(ud(e.timeline),function(e){uh(e),ul(e,"label"),ul(e,"itemStyle"),ul(e,"controlStyle",!0);var t=e.data;ts(t)&&te(t,function(e){td(e)&&(ul(e,"label"),ul(e,"itemStyle"))})}),te(ud(e.toolbox),function(e){ul(e,"iconStyle"),te(e.feature,function(e){ul(e,"iconStyle")})}),uc(uf(e.axisPointer),"label"),uc(uf(e.tooltip).axisPointer,"label"),e.series=ij(e.series),te(e.series,function(e){if(td(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),ux(e.label);var r=e.data;if(r&&!tp(r))for(var i=0;i<r.length;i++)ux(r[i]);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(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e,"pointer.color");null!=o&&function(e,t,n,r){for(var i,o=t.split(","),a=e,s=0;s<o.length-1;s++)null==a[i=o[s]]&&(a[i]={}),a=a[i];null==a[o[s]]&&(a[o[s]]=n)}(e,"itemStyle.color",o)}else if("bar"===n){uy(e),uy(e.backgroundStyle),uy(e.emphasis);var r=e.data;if(r&&!tp(r))for(var i=0;i<r.length;i++)"object"==typeof r[i]&&(uy(r[i]),uy(r[i]&&r[i].emphasis))}else if("sunburst"===n){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),ub(e),function e(t,n){if(t)for(var r=0;r<t.length;r++)n(t[r]),t[r]&&e(t[r].children,n)}(e.data,ub)}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&&e8(e,e.mapLocation))}null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),up(e)}}),e.dataRange&&(e.visualMap=e.dataRange),te(um,function(t){var n=e[t];n&&(ts(n)||(n=[n]),te(n,function(e){up(e)}))})}function uS(e){te(e,function(t,n){var r=[],i=[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,f=a.get(t.stackedDimension,c);if(isNaN(f))return i;s?d=a.getRawIndex(c):h=a.get(t.stackedByDimension,c);for(var p=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&&f>=0&&v>0||"samesign"===l&&f<=0&&v<0){f=function(e,t){var n=Math.max(iD(e),iD(t)),r=e+t;return n>20?r:ik(r,n)}(f,v),p=v;break}}}return r[0]=f,r[1]=p,r})})}var u_=function(e){this.data=e.data||(e.sourceFormat===lW?{}:[]),this.sourceFormat=e.sourceFormat||lG,this.seriesLayoutBy=e.seriesLayoutBy||lU,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 r=t[n];null==r.type&&lJ(this,n)===lq.Must&&(r.type="ordinal")}};function uC(e){return e instanceof u_}function uM(e,t,n){n=n||uT(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){if(!e)return{dimensionsDefine:uD(i),startIndex:a,dimensionsDetectedCount:o};if(t===lj){var o,a;"auto"===r||null==r?uA(function(e){null!=e&&"-"!==e&&(tu(e)?null==a&&(a=1):a=0)},n,e,10):a=th(r)?r:+!!r,i||1!==a||(i=[],uA(function(e,t){i[t]=null!=e?e+"":""},n,e,1/0)),o=i?i.length:"row"===n?e.length:e[0]?e[0].length:null}else if(t===lH)i||(i=function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return ti(t)}(e));else if(t===lW)i||(i=[],te(e,function(e,t){i.push(t)}));else if(t===lZ){var s=i$(e[0]);o=ts(s)&&s.length||1}return{startIndex:a,dimensionsDefine:uD(i),dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new u_({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:e5(t)})}function uk(e){return new u_({data:e,sourceFormat:tp(e)?l$:lZ})}function uT(e){var t=lG;if(tp(e))t=l$;else if(ts(e)){0===e.length&&(t=lj);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(ts(i)||tp(i)){t=lj;break}else if(td(i)){t=lH;break}}}}else if(td(e)){for(var o in e)if(tO(e,o)&&e7(e[o])){t=lW;break}}return t}function uD(e){if(e){var t=tD();return tt(e,function(e,n){var r={name:(e=td(e)?e:{name:e}).name,displayName:e.displayName,type:e.type};if(null==r.name)return r;r.name+="",null==r.displayName&&(r.displayName=r.name);var i=t.get(r.name);return i?r.name+="-"+i.count++:t.set(r.name,{count:1}),r})}}function uA(e,t,n,r){if("row"===t)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var o=n[0]||[],i=0;i<o.length&&i<r;i++)e(o[i],i)}function uI(e){var t=e.sourceFormat;return t===lH||t===lW}var uO=function(){var e;function t(e,t){var n=uC(e)?e:uk(e);this._source=n;var r=this._data=n.data;n.sourceFormat===l$&&(this._offset=0,this._dimSize=t,this._data=r),bE(this,r,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(){bE=function(e,i,o){var a=o.sourceFormat,s=o.seriesLayoutBy,l=o.startIndex,u=o.dimensionsDefine;if(e4(e,bR[uZ(a,s)]),a===l$)e.getItem=t,e.count=r,e.fillStorage=n;else{var c=function(e,t){return uR[uZ(e,t)]}(a,s);e.getItem=to(c,null,i,l,u);var h=function(e,t){return uN[uZ(e,t)]}(a,s);e.count=to(h,null,i,l,u)}};var e,t=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},n=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[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 f=i[d*o+a];h[e+d]=f,f<l&&(l=f),f>u&&(u=f)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}(e={})[lj+"_"+lU]={pure:!0,appendData:i},e[lj+"_row"]={pure:!0,appendData:function(){throw Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[lH]={pure:!0,appendData:i},e[lW]={pure:!0,appendData:function(e){var t=this._data;te(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[lZ]={appendData:i},e[l$]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},bR=e}(),t}(),uP=function(e,t,n,r){return e[r]},uR=((bI={})[lj+"_"+lU]=function(e,t,n,r){return e[r+t]},bI[lj+"_row"]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=0;a<e.length;a++){var s=e[a];o[a]=s?s[r]:null}return o},bI[lH]=uP,bI[lW]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},bI[lZ]=uP,bI);function uE(e,t){return uR[uZ(e,t)]}var uL=function(e,t,n){return e.length},uN=((bO={})[lj+"_"+lU]=function(e,t,n){return Math.max(0,e.length-t)},bO[lj+"_row"]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},bO[lH]=uL,bO[lW]=function(e,t,n){var r=e[n[0].name];return r?r.length:0},bO[lZ]=uL,bO);function uB(e,t){return uN[uZ(e,t)]}var uF=function(e,t,n){return e[t]},uz=((bP={})[lj]=uF,bP[lH]=function(e,t,n){return e[n]},bP[lW]=uF,bP[lZ]=function(e,t,n){var r=i$(e);return r instanceof Array?r[t]:r},bP[l$]=uF,bP);function uV(e){return uz[e]}function uZ(e,t){return e===lj?e+"_"+t:e}function uj(e,t,n){if(e){var r=e.getRawDataItem(t);if(null!=r){var i=e.getStore(),o=i.getSource().sourceFormat;if(null!=n){var a=e.getDimensionIndex(n),s=i.getDimensionProperty(a);return uz[o](r,a,s)}var l=r;return o===lZ&&(l=i$(r)),l}}}var uH=/\{@(.+?)\}/g,uW=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=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:i,data:a,dataType:t,value:r,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,r,i,o){t=t||"normal";var a=this.getData(n),s=this.getDataParams(e,n);return(o&&(s.value=o.interpolatedValue),null!=r&&ts(s.value)&&(s.value=s.value[r]),i||(i=a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"])),tl(i))?(s.status=t,s.dimensionIndex=r,i(s)):tu(i)?lC(i,s).replace(uH,function(t,n){var r=n.length,i=n;"["===i.charAt(0)&&"]"===i.charAt(r-1)&&(i=+i.slice(1,r-1));var s=uj(a,e,i);if(o&&ts(o.interpolatedValue)){var l=a.getDimensionIndex(i);l>=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},e.prototype.getRawValue=function(e,t){return uj(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function u$(e){var t,n;return td(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function uG(e){return new uU(e)}var uU=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,r,i,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&&(r=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)&&(r="reset"),(this._dirty||"reset"===r)&&(this._dirty=!1,i=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 f=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!a&&(i||f<p)){var g=this._progress;if(ts(g))for(var m=0;m<g.length;m++)this._doProgress(g[m],f,p,c,h);else this._doProgress(g,f,p,c,h)}this._dueIndex=p;var v=null!=this._settedOutputEnd?this._settedOutputEnd:p;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,r,i){uq.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:uq.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),ts(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var t,n,r=this._downstream;return r&&r.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}(),uq=function(){var e,t,n,r,i,o={reset:function(l,u,c,h){t=l,e=u,n=c,i=Math.ceil((r=h)/n),o.next=n>1&&r>0?s:a}};return o;function a(){return t<e?t++:null}function s(){var o=t%i*n+Math.ceil(t/i),a=t>=e?null:o<r?o:t;return t++,a}}();function uY(e){}function uX(e){throw Error(e)}function uK(e,t){var n=t&&t.type;return"ordinal"===n?e:("time"!==n||th(e)||null==e||"-"===e||(e=+iR(e)),null==e||""===e?NaN:+e)}tD({number:function(e){return parseFloat(e)},time:function(e){return+iR(e)},trim:function(e){return tu(e)?t_(e):e}});var uQ={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){th(t)||uX(""),this._opFn=uQ[e],this._rvalFloat=iB(t)}).prototype.evaluate=function(e){return th(e)?this._opFn(e,this._rvalFloat):this._opFn(iB(e),this._rvalFloat)};var uJ=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=th(e)?e:iB(e),r=th(t)?t:iB(t),i=isNaN(n),o=isNaN(r);if(i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o){var a=tu(e),s=tu(t);a&&(n=s?e:0),s&&(r=a?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=iB(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=iB(e)===this._rvalFloat)}return this._isEQ?t:!t};var u0=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 uK(e,t)},e}();function u1(e){return u8(e.sourceFormat)||uX(""),e.data}function u2(e){var t=e.sourceFormat,n=e.data;if(u8(t)||uX(""),t===lj){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===lH){for(var r=[],i=0,o=n.length;i<o;i++)r.push(e4({},n[i]));return r}}function u5(e,t,n){return null==n?void 0:!th(n)&&(isNaN(n)||tO(t,n))?tO(t,n)?t[n]:void 0:e[n]}function u3(e){return e5(e)}var u4=tD();function u8(e){return e===lj||e===lH}var u6="undefined",u9=typeof Uint32Array===u6?Array:Uint32Array,u7=typeof Uint16Array===u6?Array:Uint16Array,ce=typeof Int32Array===u6?Array:Int32Array,ct=typeof Float64Array===u6?Array:Float64Array,cn={float:ct,int:ce,ordinal:Array,number:Array,time:ct};function cr(e){return e>65535?u9:u7}function ci(){return[1/0,-1/0]}function co(e,t,n,r,i){var o=cn[n||"float"];if(i){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;u<s;u++)l[u]=a[u];e[t]=l}}else e[t]=new o(r)}var ca=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=tD()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=bL[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],uI(r),this._dimensions=tt(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,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new cn[t||"float"](this._rawCount),this._rawExtent[i]=ci(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length;0===o&&(i[e]=ci());for(var s=i[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]))}r.ordinalMeta=t,r.ordinalOffset=a,r.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 r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),l=0;l<i;l++){var u=r[l];co(n,l,u.type,s,!0)}for(var c=[],h=a;h<s;h++)for(var d=h-a,f=0;f<i;f++){var u=r[f],p=bL.arrayRows.call(this,e[d]||c,u.property,d,f);n[f][h]=p;var g=o[f];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=tt(o,function(e){return e.property}),u=0;u<a;u++){var c=o[u];s[u]||(s[u]=ci()),co(i,u,c.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var h=[],d=e;d<t;d++){h=r.getItem(d,h);for(var f=0;f<a;f++){var p=i[f],g=this._dimValueGetter(h,l[f],d,f);p[d]=g;var m=s[f];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!r.persistent&&r.clean&&r.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=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,o=r.length;i<o;i++)n.push(this.get(r[i],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 r=0,i=this.count();r<i;r++){var o=this.get(e,r);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}),r=this.count();return 0===r?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/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 r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=o+1;else{if(!(t[o]>e))return o;i=o-1}}return -1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;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-r[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&&(i[s++]=l))}return i.length=s,i},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=cr(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(cr(n._rawCount))(r),o=[],a=e.length,s=0,l=e[0],u=n._chunks,c=0;c<r;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 f=0;f<a;f++)o[f]=u[e[f]][d];o[f]=c,h=t.apply(null,o)}h&&(i[s++]=d)}return s<r&&(n._indices=i),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 r=ti(e),i=r.length;if(!i)return this;var o=t.count(),a=new(cr(t._rawCount))(o),s=0,l=r[0],u=e[l][0],c=e[l][1],h=t._chunks,d=!1;if(!t._indices){var f=0;if(1===i){for(var p=h[r[0]],g=0;g<n;g++){var m=p[g];(m>=u&&m<=c||isNaN(m))&&(a[s++]=f),f++}d=!0}else if(2===i){for(var p=h[r[0]],v=h[r[1]],y=e[r[1]][0],x=e[r[1]][1],g=0;g<n;g++){var m=p[g],b=v[g];(m>=u&&m<=c||isNaN(m))&&(b>=y&&b<=x||isNaN(b))&&(a[s++]=f),f++}d=!0}}if(!d){if(1===i)for(var g=0;g<o;g++){var w=t.getRawIndex(g),m=h[r[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;_<i;_++){var C=r[_],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 r=e._chunks,i=[],o=t.length,a=e.count(),s=[],l=e._rawExtent,u=0;u<t.length;u++)l[t[u]]=ci();for(var c=0;c<a;c++){for(var h=e.getRawIndex(c),d=0;d<o;d++)s[d]=r[t[d]][h];s[o]=c;var f=n&&n.apply(null,s);if(null!=f){"object"!=typeof f&&(i[0]=f,f=i);for(var u=0;u<f.length;u++){var p=t[u],g=f[u],m=l[p],v=r[p];v&&(v[h]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,i,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(cr(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 f=Math.min(d+u,s-1),p=Math.min(d+2*u,s),g=(p+f)/2,m=0,v=f;v<p;v++){var y=this.getRawIndex(v),x=a[y];!isNaN(x)&&(m+=x)}m/=p-f;var b=d,w=Math.min(d+u,s),S=d-1,_=a[c];n=-1,i=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}(r=Math.abs((S-g)*(x-_)-(S-v)*(m-_)))>n&&(n=r,i=y)}M>0&&M<w-b&&(h[l++]=Math.min(C,i),i=Math.max(C,i)),h[l++]=i,c=i}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,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),l=o[e],u=this.count(),c=i._rawExtent[e]=ci(),h=new(cr(this._rawCount))(Math.ceil(u/s)),d=0,f=0;f<u;f+=s){s>u-f&&(s=u-f,a.length=s);for(var p=0;p<s;p++){var g=this.getRawIndex(f+p);a[p]=l[g]}var m=n(a),v=this.getRawIndex(Math.min(f+r(a,m)||0,u-1));l[v]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[d++]=v}return i._count=d,i._indices=h,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,l=[];s<n;s++)l[s]=r[e[s]][a];l[s]=i,t.apply(null,l)}}},e.prototype.getDataExtent=function(e){var t,n=this._chunks[e],r=ci();if(!n)return r;var i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(t=this._extent[e])return t.slice();for(var o=(t=r)[0],a=t[1],s=0;s<i;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=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,o=t&&tn(t,function(e,t){return e[t]=!0,e},{});if(o)for(var a=0;a<i.length;a++)r._chunks[a]=o[a]?function(e){var t=e.constructor;return t===Array?e.slice():new t(e)}(i[a]):i[a];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=e5(this._extent),e._rawExtent=e5(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 r=0;r<n;r++)t[r]=this._indices[r]}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,r){return uK(e[r],this._dimensions[r])}bL={arrayRows:e,objectRows:function(e,t,n,r){return uK(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(null==e.value?e:e.value);return uK(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),cs=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,r=this._getUpstreamSourceManagers(),i=!!r.length;if(cu(n)){var o=void 0,a=void 0,s=void 0;if(i){var l=r[0];l.prepareSource(),o=(s=l.getSource()).data,a=s.sourceFormat,t=[l._getVersionSign()]}else a=tp(o=n.get("data",!0))?l$:lZ,t=[];var u=this._getSourceMetaRawOption()||{},c=s&&s.metaRawOption||{},h=ty(u.seriesLayoutBy,c.seriesLayoutBy)||null,d=ty(u.sourceHeader,c.sourceHeader),f=ty(u.dimensions,c.dimensions);e=h!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||f?[uM(o,{seriesLayoutBy:h,sourceHeader:d,dimensions:f},a)]:[]}else if(i){var p=this._applyTransform(r);e=p.sourceList,t=p.upstreamSignList}else e=[uM(n.get("source",!0),this._getSourceMetaRawOption(),null)],t=[];this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n,r=this._sourceHost,i=r.get("transform",!0),o=r.get("fromTransformResult",!0);null!=o&&1!==e.length&&cc("");var a=[],s=[];return(te(e,function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||cc(""),a.push(t),s.push(e._getVersionSign())}),i)?n=function(e,t,n){var r=ij(e),i=r.length;i||uX("");for(var o=0;o<i;o++)t=function(e,t,n,r){t.length||uX(""),td(e)||uX("");var i=e.type,o=u4.get(i);o||uX("");var a=tt(t,function(e){return function(e,t){var n=new u0,r=e.data,i=n.sourceFormat=e.sourceFormat,o=e.startIndex;e.seriesLayoutBy!==lU&&uX("");var a=[],s={},l=e.dimensionsDefine;if(l)te(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};a.push(r),null!=n&&(tO(s,n)&&uX(""),s[n]=r)});else for(var u=0;u<e.dimensionsDetectedCount;u++)a.push({index:u});var c=uR[uZ(i,lU)];t.__isBuiltIn&&(n.getRawDataItem=function(e){return c(r,o,a,e)},n.getRawData=to(u1,null,e)),n.cloneRawData=to(u2,null,e);var h=uN[uZ(i,lU)];n.count=to(h,null,r,o,a);var d=uz[i];n.retrieveValue=function(e,t){return f(c(r,o,a,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(null!=e){var n=a[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=to(u5,null,a,s),n.cloneAllDimensionInfo=to(u3,null,a),n}(e,o)});return tt(ij(o.transform({upstream:a[0],upstreamList:a,config:e5(e.config)})),function(e,n){td(e)||uX(""),e.data||uX(""),u8(uT(e.data))||uX("");var r,i=t[0];if(i&&0===n&&!e.dimensions){var o=i.startIndex;o&&(e.data=i.data.slice(0,o).concat(e.data)),r={seriesLayoutBy:lU,sourceHeader:o,dimensions:i.metaRawOption.dimensions}}else r={seriesLayoutBy:lU,sourceHeader:0,dimensions:e.dimensions};return uM(e.data,r,null)})}(r[o],t,0,0),o!==i-1&&(t.length=Math.max(t.length,1));return t}(i,a,{datasetIndex:r.componentIndex}):null!=o&&(n=[new u_({data:(t=a[0]).data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:e5(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 r=this._storeList,i=r[0];i||(i=r[0]={});var o=i[n];if(!o){var a=this._getUpstreamSourceManagers()[0];cu(this._sourceHost)&&a?o=a._innerGetDataStore(e,t,n):(o=new ca).initData(new uO(t,e.length),e),i[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(cu(e)){var t=lQ(e);return t?[t.getSourceManager()]:[]}return tt(e.get("transform",!0)||e.get("fromTransformResult",!0)?i3(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},i2).models:[],function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;return cu(r)?(e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)),{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},e}();function cl(e){e.option.transform&&(e.option.transform[tC]=!0)}function cu(e){return"series"===e.mainType}function cc(e){throw Error(e)}var ch="line-height:1";function cd(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14,s=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+t4(r+"")+"px;color:"+t4(n)+";font-weight:"+t4(i+""),valueStyle:"font-size:"+t4(a+"")+"px;color:"+t4(o)+";font-weight:"+t4(s+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:s}}}var cf=[0,10,20,30],cp=["","\n","\n\n","\n\n\n"];function cg(e,t){return t.type=e,t}function cm(e){return"section"===e.type}function cv(e,t,n,r){var i,o=t.noHeader,a={html:cf[i=function e(t){if(cm(t)){var n=0,r=t.blocks.length,i=r>1||r>0&&!t.noHeader;return te(t.blocks,function(t){var r=e(t);r>=n&&(n=r+ +(i&&(!r||cm(t)&&!t.noHeader)))}),n}return 0}(t)],richText:cp[i]},s=[],l=t.blocks||[];tS(!l||ts(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(tO(c,u)){var h=new uJ(c[u],null);l.sort(function(e,t){return h.evaluate(e.sortParam,t.sortParam)})}else"seriesDesc"===u&&l.reverse()}te(l,function(n,i){var o=t.valueFormatter,l=(cm(n)?cv:cy)(o?e4(e4({},e),{valueFormatter:o}):e,n,i>0?a.html:0,r);null!=l&&s.push(l)});var d="richText"===e.renderMode?s.join(a.richText):cb(s.join(""),o?n:a.html);if(o)return d;var f=lw(t.header,"ordinal",e.useUTC),p=cd(r,e.renderMode).nameStyle;return"richText"===e.renderMode?cw(e,f,p)+a.richText+d:cb('<div style="'+p+";"+ch+';">'+t4(f)+"</div>"+d,n)}function cy(e,t,n,r){var i=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 tt(e=ts(e)?e:[e],function(e,t){return lw(e,ts(w)?w[t]:w,u)})};if(!o||!a){var h,d,f,p,g,m,v,y,x=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),b=o?"":lw(l,"ordinal",u),w=t.valueType,S=a?[]:c(t.value,t.dataIndex),_=!s||!o,C=!s&&o,M=cd(r,i),k=M.nameStyle,T=M.valueStyle;return"richText"===i?(s?"":x)+(o?"":cw(e,b,k))+(a?"":(h=e,d=S,f=_,p=C,g=[T],f&&g.push({padding:[0,0,0,p?10:20],align:"right"}),h.markupStyleCreator.wrapRichTextStyle(ts(d)?d.join(" "):d,g))):cb((s?"":x)+(o?"":'<span style="'+k+";"+(s?"":"margin-left:2px")+'">'+t4(b)+"</span>")+(a?"":(m=S,v=_,y=C,'<span style="'+(v?"float:right;margin-left:"+(y?"10px":"20px"):"")+";"+T+'">'+tt(m=ts(m)?m:[m],function(e){return t4(e)}).join(" ")+"</span>")),n)}}function cx(e,t,n,r,i,o){if(e)return(cm(e)?cv:cy)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function cb(e,t){return'<div style="margin: '+t+"px 0 0;"+ch+';">'+e+'<div style="clear:both"></div></div>'}function cw(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function cS(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var c_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=iF()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r,i,o,a,s,l,u="richText"===n?this._generateStyleName():null,c=(a=(o=tu(r={color:t,type:e,renderMode:n,markerId:u})?{color:r,extraCssText:i}:r||{}).color,s=o.type,i=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:'+t4(a)+";"+(i||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+t4(a)+";"+(i||"")+'"></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 tu(c)?c:(this.richTextStyles[u]=c.style,c.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};ts(t)?te(t,function(e){return e4(n,e)}):e4(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}(),cC=iQ();function cM(e,t){return e.getName(t)||e.getId(t)}var ck=function(e){var t;function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return eF(n,e),n.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=uG({count:cD,reset:cA}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(cC(this).sourceManager=new cs(this)).prepareSource();var r=this.getInitialData(e,n);cO(r,this),this.dataTask.context.data=r,cC(this).dataBeforeProcessed=r,cT(this),this._initSelectedMapFromData(r)},n.prototype.mergeDefaultAndTheme=function(e,t){var n=lP(this),r=n?lE(e):{},i=this.subType;lN.hasClass(i)&&(i+="Series"),e3(e,t.getTheme().get(this.subType)),e3(e,this.getDefaultOption()),iH(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&lR(e,r,n)},n.prototype.mergeOption=function(e,t){e=e3(this.option,e,!0),this.fillDataTextStyle(e.data);var n=lP(this);n&&lR(this.option,e,n);var r=cC(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);cO(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,cC(this).dataBeforeProcessed=i,cT(this),this._initSelectedMapFromData(i)},n.prototype.fillDataTextStyle=function(e){if(e&&!tp(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&iH(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=cR(this);if(!t)return cC(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=cR(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}cC(this).data=e},n.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return tD(e)},n.prototype.getSourceManager=function(){return cC(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return cC(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,r,i,o=e.series,a=e.dataIndex,s=e.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,h=o.getRawValue(a),d=ts(h),f=lM(o.getData().getItemVisual(a,"style")[o.visualDrawType]);if(c>1||d&&!c){var p=function(e,t,n,r,i){var o=t.getData(),a=tn(e,function(e,t,n){var r=o.getDimensionInfo(n);return e=e||r&&!1!==r.tooltip&&null!=r.displayName},!1),s=[],l=[],u=[];function c(e,t){var n=o.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(cg("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?te(r,function(e){c(uj(o,n,e),e)}):te(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,f);t=p.inlineValues,n=p.inlineValueTypes,r=p.blocks,i=p.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=t=uj(l,a,u[0]),n=g.type}else i=t=d?h[0]:h;var m=iY(o),v=m&&o.name||"",y=l.getName(a),x=s?v:y;return cg("section",{header:v,noHeader:s||!m,sortParam:i,blocks:[cg("nameValue",{markerType:"item",markerColor:f,name:x,noName:!t_(x),value:t,valueType:n,dataIndex:a})].concat(r||[])})}({series:this,dataIndex:e,multipleSeries:t})},n.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(eV.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 r=this.ecModel,i=l5.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i},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 r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var o=0;o<e.length;o++){var a=cM(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],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=ti(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},n.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[cM(r,e)])&&!r.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,r,i=this.option,o=i.selectedMode,a=t.length;if(o&&a){if("series"===o)i.selectedMap="all";else if("multiple"===o){td(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l<a;l++){var u=t[l],c=cM(e,u);s[c]=!0,this._selectedDataIndicesMap[c]=e.getRawIndex(u)}}else if("single"===o||!0===o){var h=t[a-1],c=cM(e,h);i.selectedMap=((n={})[c]=!0,n),this._selectedDataIndicesMap=((r={})[c]=e.getRawIndex(h),r)}}},n.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},n.registerClass=function(e){return lN.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}(lN);function cT(e){var t,n,r,i=e.name;iY(e)||(e.name=(n=(t=e.getRawData()).mapDimensionsAll("seriesName"),r=[],te(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(" ")||i))}function cD(e){return e.model.getRawData().count()}function cA(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),cI}function cI(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function cO(e,t){te(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ta(cP,t))})}function cP(e,t){var n=cR(e);return n&&n.setOutputEnd((t||this).count()),t}function cR(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}e9(ck,uW),e9(ck,l5),ot(ck,lN);var cE=function(){function e(){this.group=new ix,this.uid=s0("viewComponent")}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();function cL(){var e=iQ();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==a||o!==s)&&"reset"}}oe(cE),oo(cE);var cN=o4.CMD,cB=[[],[],[]],cF=Math.sqrt,cz=Math.atan2,cV=Math.sqrt,cZ=Math.sin,cj=Math.cos,cH=Math.PI;function cW(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function c$(e,t){return(e[0]*t[0]+e[1]*t[1])/(cW(e)*cW(t))}function cG(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(c$(e,t))}function cU(e,t,n,r,i,o,a,s,l,u,c){var h=cH/180*l,d=cj(h)*(e-n)/2+cZ(h)*(t-r)/2,f=-1*cZ(h)*(e-n)/2+cj(h)*(t-r)/2,p=d*d/(a*a)+f*f/(s*s);p>1&&(a*=cV(p),s*=cV(p));var g=(i===o?-1:1)*cV((a*a*(s*s)-a*a*(f*f)-s*s*(d*d))/(a*a*(f*f)+s*s*(d*d)))||0,m=g*a*f/s,v=-(g*s)*d/a,y=(e+n)/2+cj(h)*m-cZ(h)*v,x=(t+r)/2+cZ(h)*m+cj(h)*v,b=cG([1,0],[(d-m)/a,(f-v)/s]),w=[(d-m)/a,(f-v)/s],S=[(-1*d-m)/a,(-1*f-v)/s],_=cG(w,S);if(-1>=c$(w,S)&&(_=cH),c$(w,S)>=1&&(_=0),_<0){var C=Math.round(_/cH*1e6)/1e6;_=2*cH+C%2*cH}c.addData(u,y,x,a,s,b,_,h,o)}var cq=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,cY=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,cX=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tL(t,e),t.prototype.applyTransform=function(e){},t}(au);function cK(e){return null!=e.setData}function cQ(e,t){var n=function(e){var t,n=new o4;if(!e)return n;var r=0,i=0,o=0,a=0,s=o4.CMD,l=e.match(cq);if(!l)return n;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),d=void 0,f=c.match(cY)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v=void 0,y=void 0,x=void 0,b=void 0,w=void 0,S=void 0,_=void 0,C=r,M=i,k=void 0,T=void 0;switch(h){case"l":r+=f[m++],i+=f[m++],d=s.L,n.addData(d,r,i);break;case"L":r=f[m++],i=f[m++],d=s.L,n.addData(d,r,i);break;case"m":r+=f[m++],i+=f[m++],d=s.M,n.addData(d,r,i),o=r,a=i,h="l";break;case"M":r=f[m++],i=f[m++],d=s.M,n.addData(d,r,i),o=r,a=i,h="L";break;case"h":r+=f[m++],d=s.L,n.addData(d,r,i);break;case"H":r=f[m++],d=s.L,n.addData(d,r,i);break;case"v":i+=f[m++],d=s.L,n.addData(d,r,i);break;case"V":i=f[m++],d=s.L,n.addData(d,r,i);break;case"C":d=s.C,n.addData(d,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),r=f[m-2],i=f[m-1];break;case"c":d=s.C,n.addData(d,f[m++]+r,f[m++]+i,f[m++]+r,f[m++]+i,f[m++]+r,f[m++]+i),r+=f[m-2],i+=f[m-1];break;case"S":v=r,y=i,k=n.len(),T=n.data,t===s.C&&(v+=r-T[k-4],y+=i-T[k-3]),d=s.C,C=f[m++],M=f[m++],r=f[m++],i=f[m++],n.addData(d,v,y,C,M,r,i);break;case"s":v=r,y=i,k=n.len(),T=n.data,t===s.C&&(v+=r-T[k-4],y+=i-T[k-3]),d=s.C,C=r+f[m++],M=i+f[m++],r+=f[m++],i+=f[m++],n.addData(d,v,y,C,M,r,i);break;case"Q":C=f[m++],M=f[m++],r=f[m++],i=f[m++],d=s.Q,n.addData(d,C,M,r,i);break;case"q":C=f[m++]+r,M=f[m++]+i,r+=f[m++],i+=f[m++],d=s.Q,n.addData(d,C,M,r,i);break;case"T":v=r,y=i,k=n.len(),T=n.data,t===s.Q&&(v+=r-T[k-4],y+=i-T[k-3]),r=f[m++],i=f[m++],d=s.Q,n.addData(d,v,y,r,i);break;case"t":v=r,y=i,k=n.len(),T=n.data,t===s.Q&&(v+=r-T[k-4],y+=i-T[k-3]),r+=f[m++],i+=f[m++],d=s.Q,n.addData(d,v,y,r,i);break;case"A":x=f[m++],b=f[m++],w=f[m++],S=f[m++],_=f[m++],C=r,M=i,r=f[m++],cU(C,M,r,i=f[m++],S,_,x,b,w,d=s.A,n);break;case"a":x=f[m++],b=f[m++],w=f[m++],S=f[m++],_=f[m++],C=r,M=i,r+=f[m++],cU(C,M,r,i+=f[m++],S,_,x,b,w,d=s.A,n)}}("z"===h||"Z"===h)&&(d=s.Z,n.addData(d),r=o,i=a),t=d}return n.toStatic(),n}(e),r=e4({},t);return r.buildPath=function(e){if(cK(e)){e.setData(n.data);var t=e.getContext();t&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){(function(e,t){if(t){var n,r,i,o,a,s,l=e.data,u=e.len(),c=cN.M,h=cN.C,d=cN.L,f=cN.R,p=cN.A,g=cN.Q;for(i=0,o=0;i<u;){switch(n=l[i++],o=i,r=0,n){case c:case d:r=1;break;case h:r=3;break;case g:r=2;break;case p:var m=t[4],v=t[5],y=cF(t[0]*t[0]+t[1]*t[1]),x=cF(t[2]*t[2]+t[3]*t[3]),b=cz(-t[1]/x,t[0]/y);l[i]*=y,l[i++]+=m,l[i]*=x,l[i++]+=v,l[i++]*=y,l[i++]*=x,l[i++]+=b,l[i++]+=b,i+=2,o=i;break;case f:s[0]=l[i++],s[1]=l[i++],tW(s,s,t),l[o++]=s[0],l[o++]=s[1],s[0]+=l[i++],s[1]+=l[i++],tW(s,s,t),l[o++]=s[0],l[o++]=s[1]}for(a=0;a<r;a++){var w=cB[a];w[0]=l[i++],w[1]=l[i++],tW(w,w,t),l[o++]=w[0],l[o++]=w[1]}}e.increaseVersion()}})(n,e),this.dirtyShape()},r}var cJ=function(){this.cx=0,this.cy=0,this.r=0},c0=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultShape=function(){return new cJ},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}(au);c0.prototype.type="circle";let c1=c0;var c2=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},c5=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultShape=function(){return new c2},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=t.rx,o=t.ry,a=.5522848*i,s=.5522848*o;e.moveTo(n-i,r),e.bezierCurveTo(n-i,r-s,n-a,r-o,n,r-o),e.bezierCurveTo(n+a,r-o,n+i,r-s,n+i,r),e.bezierCurveTo(n+i,r+s,n+a,r+o,n,r+o),e.bezierCurveTo(n-a,r+o,n-i,r+s,n-i,r),e.closePath()},t}(au);c5.prototype.type="ellipse";let c3=c5;var c4=Math.PI,c8=2*c4,c6=Math.sin,c9=Math.cos,c7=Math.acos,he=Math.atan2,ht=Math.abs,hn=Math.sqrt,hr=Math.max,hi=Math.min;function ho(e,t,n,r,i,o,a){var s=e-n,l=t-r,u=(a?o:-o)/hn(s*s+l*l),c=u*l,h=-u*s,d=e+c,f=t+h,p=n+c,g=r+h,m=(d+p)/2,v=(f+g)/2,y=p-d,x=g-f,b=y*y+x*x,w=i-o,S=d*g-p*f,_=(x<0?-1:1)*hn(hr(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,A=M-v,I=k-m,O=T-v;return D*D+A*A>I*I+O*O&&(C=k,M=T),{cx:C,cy:M,x0:-c,y0:-h,x1:C*(i/w-1),y1:M*(i/w-1)}}var ha=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},hs=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultShape=function(){return new ha},t.prototype.buildPath=function(e,t){!function(e,t){var n,r=hr(t.r,0),i=hr(t.r0||0,0),o=r>0,a=i>0;if(o||a){if(o||(r=i,i=0),i>r){var s=r;r=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,h=t.cy,d=!!t.clockwise,f=ht(u-l),p=f>c8&&f%c8;if(p>1e-4&&(f=p),r>1e-4){if(f>c8-1e-4)e.moveTo(c+r*c9(l),h+r*c6(l)),e.arc(c,h,r,l,u,!d),i>1e-4&&(e.moveTo(c+i*c9(u),h+i*c6(u)),e.arc(c,h,i,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,A=void 0,I=void 0,O=r*c9(l),P=r*c6(l),R=i*c9(u),E=i*c6(u),L=f>1e-4;if(L){var N=t.cornerRadius;N&&(g=(n=function(e){var t;if(ts(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}(N))[0],m=n[1],v=n[2],y=n[3]);var B=ht(r-i)/2;if(x=hi(B,v),b=hi(B,y),w=hi(B,g),S=hi(B,m),M=_=hr(x,b),k=C=hr(w,S),(_>1e-4||C>1e-4)&&(T=r*c9(u),D=r*c6(u),A=i*c9(l),I=i*c6(l),f<c4)){var F=function(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a-i,h=s-o,d=h*l-c*u;if(!(d*d<1e-4))return d=(c*(t-o)-h*(e-i))/d,[e+d*l,t+d*u]}(O,P,A,I,T,D,R,E);if(F){var z=O-F[0],V=P-F[1],Z=T-F[0],j=D-F[1],H=1/c6(c7((z*Z+V*j)/(hn(z*z+V*V)*hn(Z*Z+j*j)))/2),W=hn(F[0]*F[0]+F[1]*F[1]);M=hi(_,(r-W)/(H+1)),k=hi(C,(i-W)/(H-1))}}}if(L){if(M>1e-4){var $=hi(v,M),G=hi(y,M),U=ho(A,I,O,P,r,$,d),q=ho(T,D,R,E,r,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,he(U.y0,U.x0),he(q.y0,q.x0),!d):($>0&&e.arc(c+U.cx,h+U.cy,$,he(U.y0,U.x0),he(U.y1,U.x1),!d),e.arc(c,h,r,he(U.cy+U.y1,U.cx+U.x1),he(q.cy+q.y1,q.cx+q.x1),!d),G>0&&e.arc(c+q.cx,h+q.cy,G,he(q.y1,q.x1),he(q.y0,q.x0),!d))}else e.moveTo(c+O,h+P),e.arc(c,h,r,l,u,!d)}else e.moveTo(c+O,h+P);if(i>1e-4&&L){if(k>1e-4){var $=hi(g,k),G=hi(m,k),U=ho(R,E,T,D,i,-G,d),q=ho(O,P,A,I,i,-$,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,he(U.y0,U.x0),he(q.y0,q.x0),!d):(G>0&&e.arc(c+U.cx,h+U.cy,G,he(U.y0,U.x0),he(U.y1,U.x1),!d),e.arc(c,h,i,he(U.cy+U.y1,U.cx+U.x1),he(q.cy+q.y1,q.cx+q.x1),d),$>0&&e.arc(c+q.cx,h+q.cy,$,he(q.y1,q.x1),he(q.y0,q.x0),!d))}else e.lineTo(c+R,h+E),e.arc(c,h,i,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}(au);hs.prototype.type="sector";let hl=hs;var hu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},hc=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultShape=function(){return new hu},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(au);hc.prototype.type="ring";let hh=hc;function hd(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var o=function(e,t,n,r){var i,o,a,s,l=[],u=[],c=[],h=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=e.length;d<f;d++)t$(a,a,e[d]),tG(s,s,e[d]);t$(a,a,r[0]),tG(s,s,r[1])}for(var d=0,f=e.length;d<f;d++){var p,g=e[d];if(n)i=e[d?d-1:f-1],o=e[(d+1)%f];else{if(0===d||d===f-1){l.push([(p=e[d])[0],p[1]]);continue}i=e[d-1],o=e[d+1]}tF(u,o,i),tz(u,u,t);var m=tZ(g,i),v=tZ(g,o),y=m+v;0!==y&&(m/=y,v/=y),tz(c,u,-m),tz(h,u,v);var x=tB([],g,c),b=tB([],g,h);r&&(tG(x,x,a),t$(x,x,s),tG(b,b,a),t$(b,b,s)),l.push(x),l.push(b)}return n&&l.push(l.shift()),l}(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var hf=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},hp=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultShape=function(){return new hf},t.prototype.buildPath=function(e,t){hd(e,t,!0)},t}(au);hp.prototype.type="polygon";let hg=hp;var hm=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},hv=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new hm},t.prototype.buildPath=function(e,t){hd(e,t,!1)},t}(au);hv.prototype.type="polyline";let hy=hv;var hx={},hb=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},hw=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new hb},t.prototype.buildPath=function(e,t){if(this.subPixelOptimize){var n,r,i,o,a=av(hx,t,this.style);n=a.x1,r=a.y1,i=a.x2,o=a.y2}else n=t.x1,r=t.y1,i=t.x2,o=t.y2;var s=t.percent;0!==s&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,o=r*(1-s)+o*s),e.lineTo(i,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}(au);hw.prototype.type="line";let hS=hw;var h_=[],hC=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function hM(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?n0:nJ)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?n0:nJ)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?n4:n3)(e.x1,e.cpx1,e.x2,t),(n?n4:n3)(e.y1,e.cpy1,e.y2,t)]}var hk=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new hC},t.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=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,r),null==l||null==u?(c<1&&(n6(n,a,i,c,h_),a=h_[1],i=h_[2],n6(r,s,o,c,h_),s=h_[1],o=h_[2]),e.quadraticCurveTo(a,s,i,o)):(c<1&&(n5(n,a,l,i,c,h_),a=h_[1],l=h_[2],i=h_[3],n5(r,s,u,o,c,h_),s=h_[1],u=h_[2],o=h_[3]),e.bezierCurveTo(a,s,l,u,i,o)))},t.prototype.pointAt=function(e){return hM(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=hM(this.shape,e,!0);return tV(t,t)},t}(au);hk.prototype.type="bezier-curve";let hT=hk;var hD=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},hA=function(e){function t(t){return e.call(this,t)||this}return tL(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new hD},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=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*i+n,u*i+r),e.arc(n,r,i,o,a,!s)},t}(au);hA.prototype.type="arc";let hI=hA,hO=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="compound",t}return tL(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||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].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),au.prototype.getBoundingRect.call(this)},t}(au);var hP=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}();let hR=function(e){function t(t,n,r,i,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==r?1:r,s.y2=null==i?0:i,s.type="linear",s.global=a||!1,s}return tL(t,e),t}(hP),hE=function(e){function t(t,n,r,i,o){var a=e.call(this,i)||this;return a.x=null==t?.5:t,a.y=null==n?.5:n,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return tL(t,e),t}(hP);var hL=[0,0],hN=[0,0],hB=new ng,hF=new ng;let hz=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ng;for(var n=0;n<2;n++)this._axes[n]=new ng;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width,s=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,s),n[3].set(i,s),t)for(var l=0;l<4;l++)n[l].transform(t);ng.sub(r[0],n[1],n[0]),ng.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var l=0;l<2;l++)this._origin[l]=r[l].dot(n[0])},e.prototype.intersect=function(e,t){var n=!0,r=!t;return hB.set(1/0,1/0),hF.set(0,0),!this._intersectCheckOneSide(this,e,hB,hF,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,hB,hF,r,-1)&&(n=!1,r)||r||ng.copy(t,n?hB:hF),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,hL),this._getProjMinMaxOnAxis(s,t._corners,hN),hL[1]<hN[0]||hL[0]>hN[1]){if(a=!1,i)return a;var u=Math.abs(hN[0]-hL[1]),c=Math.abs(hL[0]-hN[1]);Math.min(u,c)>r.len()&&(u<c?ng.scale(r,l,-u*o):ng.scale(r,l,c*o))}else if(n){var u=Math.abs(hN[0]-hL[1]),c=Math.abs(hL[0]-hN[1]);Math.min(u,c)<n.len()&&(u<c?ng.scale(n,l,u*o):ng.scale(n,l,-c*o))}}return a},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,l=1;l<t.length;l++){var u=t[l].dot(r)+i[e];a=Math.min(u,a),s=Math.max(u,s)}n[0]=a,n[1]=s},e}();var hV=[];let hZ=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 tL(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 nC(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(hV)),e.union(r)}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 r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(oT);var hj=Math.max,hH=Math.min,hW={};function h$(e){return au.extend(e)}var hG=function(e,t){var n=cQ(e,t);return function(e){function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return tL(t,e),t}(cX)};function hU(e,t){return hG(e,t)}function hq(e,t){hW[e]=t}function hY(e){if(hW.hasOwnProperty(e))return hW[e]}function hX(e,t,n,r){var i=new cX(cQ(e,t));return n&&("center"===r&&(n=hQ(n,i.getBoundingRect())),h0(i,n)),i}function hK(e,t,n){var r=new ag({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var i={width:e.width,height:e.height};r.setStyle(hQ(t,i))}}});return r}function hQ(e,t){var n,r=t.width/t.height,i=e.height*r;return n=i<=e.width?e.height:(i=e.width)/r,{x:e.x+e.width/2-i/2,y:e.y+e.height/2-n/2,width:i,height:n}}var hJ=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}var a=new au(t);return a.createPathProxy(),a.buildPath=function(e){if(cK(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},a};function h0(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function h1(e,t){return av(e,e,{lineWidth:t}),e}function h2(e){return ay(e.shape,e.shape,e.style),e}var h5=ax;function h3(e,t){for(var n=nc([]);e&&e!==t;)nh(n,e.getLocalTransform(),n),e=e.parent;return n}function h4(e,t,n){return t&&!e7(t)&&(t=r6.getLocalTransform(t)),n&&(t=np([],t)),tW([],e,t)}function h8(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),o=["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0];return Math.abs((o=h4(o,t,n))[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function h6(e,t,n){if(e&&t){var r,i=(r={},e.traverse(function(e){!e.isGroup&&e.anid&&(r[e.anid]=e)}),r);t.traverse(function(e){if(!e.isGroup&&e.anid){var t=i[e.anid];if(t){var r=o(e);e.attr(o(t)),sw(e,r,n,aF(e).dataIndex)}}})}function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return null!=e.shape&&(t.shape=e4({},e.shape)),t}}function h9(e,t){return tt(e,function(e){var n=e[0];n=hH(n=hj(n,t.x),t.x+t.width);var r=e[1];return[n,r=hH(r=hj(r,t.y),t.y+t.height)]})}function h7(e,t){var n=hj(e.x,t.x),r=hH(e.x+e.width,t.x+t.width),i=hj(e.y,t.y),o=hH(e.y+e.height,t.y+t.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}}function de(e,t,n){var r=e4({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),e8(i,n),new ag(r)):hX(e.replace("path://",""),r,n,"center")}function dt(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(dn(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function dn(e,t,n,r,i,o,a,s){var l,u=n-e,c=r-t,h=a-i,d=s-o,f=h*c-u*d;if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-i,g=t-o,m=(p*c-u*g)/f;if(m<0||m>1)return!1;var v=(p*d-h*g)/f;return!(v<0)&&!(v>1)}function dr(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=tu(t)?{formatter:t}:t,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=e.formatterParamsExtra;l&&te(ti(l),function(e){tO(s,e)||(s[e]=l[e],s.$vars.push(e))});var u=aF(e.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:e8({content:r,formatterParams:s},i)}}function di(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function da(e,t){if(e){if(ts(e))for(var n=0;n<e.length;n++)di(e[n],t);else di(e,t)}}hW.circle=c1,hW.ellipse=c3,hW.sector=hl,hW.ring=hh,hW.polygon=hg,hW.polyline=hy,hW.rect=a_,hW.line=hS,hW.bezierCurve=hT,hW.arc=hI;var ds=iQ(),dl=cL(),du=function(){function e(){this.group=new ix,this.uid=s0("viewChart"),this.renderTask=uG({plan:dd,reset:df}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&dh(i,r,"emphasis")},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&dh(i,r,"normal")},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){da(this.group,e)},e.markUpdateMethod=function(e,t){ds(e).updateMethod=t},e.protoInitialize=void(e.prototype.type="chart"),e}();function dc(e,t,n){e&&sg(e)&&("emphasis"===t?st:sn)(e,n)}function dh(e,t,n){var r,i,o=iK(e,t),a=t&&null!=t.highlightKey?(null==(i=aZ[r=t.highlightKey])&&aV<=32&&(i=aZ[r]=aV++),i):null;null!=o?te(ij(o),function(t){dc(e.getItemGraphicEl(t),n,a)}):e.eachItemGraphicEl(function(e){dc(e,n,a)})}function dd(e){return dl(e.model)}function df(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=e.view,s=i&&ds(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](t,n,r,i),dp[l]}oe(du,["dispose"]),oo(du);var dp={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)}}},dg="\0__throttleOriginMethod",dm="\0__throttleRate",dv="\0__throttleType";function dy(e,t,n){var r,i,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];r=new Date().getTime(),o=this,a=e;var f=s||t,p=s||n;s=null,i=r-(p?l:u)-f,clearTimeout(c),p?c=setTimeout(h,f):i>=0?h():c=setTimeout(h,-i),l=r};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}function dx(e,t,n,r){var i=e[t];if(i){var o=i[dg]||i,a=i[dv];if(i[dm]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=dy(o,n,"debounce"===r))[dg]=o,i[dv]=r,i[dm]=n}return i}}function db(e,t){var n=e[t];n&&n[dg]&&(n.clear&&n.clear(),e[t]=n[dg])}var dw=iQ(),dS={itemStyle:oa(sY,!0),lineStyle:oa(sG,!0)},d_={lineStyle:"stroke",itemStyle:"fill"};function dC(e,t){var n=e.visualStyleMapper||dS[t];return n||(console.warn("Unknown style type '"+t+"'."),dS.itemStyle)}function dM(e,t){var n=e.visualDrawType||d_[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var dk=new sQ,dT=Math.PI,dD=function(){function e(e,t,n,r){this._stageTaskMap=tD(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}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),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,o=r&&r.modDataCount,a=null!=o?Math.ceil(o/i):null;return{step:i,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),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,o=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:i,modDataCount:a,large:o}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=tD();e.eachSeries(function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;te(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});tS(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},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,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}te(e,function(e,s){if(!r.visualType||r.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(r,e)&&(e.dirty(),h=!0)}),h&&c.dirty(),o.updatePayload(c,n);var f=o.getPerformArgs(c,r.block);d.each(function(e){e.perform(f)}),c.perform(f)&&(i=!0)}else u&&u.each(function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)})}}),this.unfinished=i||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,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=tD(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,o&&o.get(s)||uG({plan:dR,reset:dE,count:dB}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,l)}e.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||uG({reset:dA});o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=tD(),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,uG({reset:dI,onDirty:dP})));n.context={model:e,overallProgress:c},n.agent=o,n.__block=c,i._pipe(e,n)}tS(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,d):u?u(n,r).each(d):(c=!1,te(n.getSeries(),d)),h&&o.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);r.head||(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return tl(e)&&(e={overallReset:e,seriesType:function(e){bN=null;try{e(dF,dz)}catch(e){}return bN}(e)}),e.uid=s0("stageHandler"),t&&(e.visualType=t),e},e}();function dA(e){e.overallReset(e.ecModel,e.api,e.payload)}function dI(e){return e.overallProgress&&dO}function dO(){this.agent.dirty(),this.getDownstream().dirty()}function dP(){this.agent&&this.agent.dirty()}function dR(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function dE(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ij(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?tt(t,function(e,t){return dN(t)}):dL}var dL=dN(0);function dN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function dB(e){return e.data.count()}var dF={},dz={};function dV(e,t){for(var n in t.prototype)e[n]=tP}dV(dF,l4),dV(dz,ue),dF.eachSeriesByType=dF.eachRawSeriesByType=function(e){bN=e},dF.eachComponent=function(e){"series"===e.mainType&&e.subType&&(bN=e.subType)};var dZ=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],dj="#B9B8CE",dH="#100C2A",dW=function(){return{axisLine:{lineStyle:{color:dj}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},d$=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],dG={darkMode:!0,color:d$,backgroundColor:dH,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:dj}},textStyle:{color:dj},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:dj}},dataZoom:{borderColor:"#71708A",textStyle:{color:dj},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:dj}},timeline:{lineStyle:{color:dj},label:{color:dj},controlStyle:{color:dj,borderColor:dj}},calendar:{itemStyle:{color:dH},dayLabel:{color:dj},monthLabel:{color:dj},yearLabel:{color:dj}},timeAxis:dW(),logAxis:dW(),valueAxis:dW(),categoryAxis:dW(),line:{symbol:"circle"},graph:{color:d$},gauge:{title:{color:dj},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:dj},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};dG.categoryAxis.splitLine.show=!1;var dU=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(tu(e)){var i=i7(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};te(e,function(e,i){for(var s=!1,l=0;l<o.length;l++){var u=o[l],c=i.lastIndexOf(u);if(c>0&&c===i.length-u.length){var h=i.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=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,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,i));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),dq=["symbol","symbolSize","symbolRotate","symbolOffset"],dY=dq.concat(["symbolKeepAspect"]);function dX(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 dK(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 dQ(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,a=i.selected,s=0;s<a.length;s++)if(a[s].seriesIndex===t){var l=e.getData(),u=iK(l,i.fromActionPayload);n.trigger(o,{type:o,seriesId:e.id,name:ts(u)?l.getName(u[0]):l.getName(u),selected:tu(r)?r:e4({},r)})}})}function dJ(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var d0=Math.round(9*Math.random()),d1="function"==typeof Object.defineProperty,d2=function(){function e(){this._id="__ec_inner_"+d0++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return d1?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}(),d5=au.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r+o),e.lineTo(n-i,r+o),e.closePath()}}),d3=au.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,o=t.height/2;e.moveTo(n,r-o),e.lineTo(n+i,r),e.lineTo(n,r+o),e.lineTo(n-i,r),e.closePath()}}),d4=au.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=Math.max(i,t.height),a=i/2,s=a*a/(o-a),l=r-o+a+s,u=Math.asin(s/a),c=Math.cos(u)*a,h=Math.sin(u),d=Math.cos(u),f=.6*a,p=.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*f,l+s+d*f,n,r-p,n,r),e.bezierCurveTo(n,r-p,n-c+h*f,l+s+d*f,n-c,l+s),e.closePath()}}),d8=au.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,o=t.y,a=r/3*2;e.moveTo(i,o),e.lineTo(i+a,o+n),e.lineTo(i,o+n/4*3),e.lineTo(i-a,o+n),e.lineTo(i,o),e.closePath()}}),d6={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var o=Math.min(n,r);i.x=e,i.y=t,i.width=o,i.height=o},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},d9={};te({line:hS,rect:a_,roundRect:a_,square:a_,circle:c1,diamond:d3,pin:d4,arrow:d8,triangle:d5},function(e,t){d9[t]=new e});var d7=au.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=il(e,t,n),i=this.shape;return i&&"pin"===i.symbolType&&"inside"===t.position&&(r.y=n.y+.4*n.height),r},buildPath:function(e,t,n){var r=t.symbolType;if("none"!==r){var i=d9[r];i||(i=d9[r="rect"]),d6[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function fe(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 ft(e,t,n,r,i,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://")?hK(e.slice(8),new nC(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?hX(e.slice(7),{},new nC(t,n,r,i),a?"center":"cover"):new d7({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=l,s.setColor=fe,o&&s.setColor(o),s}function fn(e){return ts(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function fr(e,t){if(null!=e)return ts(e)||(e=[e,e]),[iM(e[0],t[0])||0,iM(ty(e[1],e[0]),t[1])||0]}function fi(e){return isFinite(e)}function fo(e,t,n){for(var r,i,o,a,s,l,u,c,h,d,f="radial"===t.type?(o=Math.min(r=n.width,i=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*r+n.x,s=s*i+n.y,l*=o),a=fi(a)?a:.5,s=fi(s)?s:.5,l=l>=0&&fi(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=fi(u)?u:0,c=fi(c)?c:1,h=fi(h)?h:0,d=fi(d)?d:0,e.createLinearGradient(u,h,c,d)),p=t.colorStops,g=0;g<p.length;g++)f.addColorStop(p[g].offset,p[g].color);return f}function fa(e){return parseInt(e,10)}function fs(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=n[r]&&"auto"!==n[r])return parseFloat(n[r]);var s=document.defaultView.getComputedStyle(e);return(e[i]||fa(s[r])||fa(e.style[r]))-(fa(s[o])||0)-(fa(s[a])||0)|0}function fl(e){var t,n,r=e.style,i=r.lineDash&&r.lineWidth>0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:th(t)?[t]:ts(t)?t:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(i=tt(i,function(e){return e/a}),o/=a)}return[i,o]}var fu=new o4(!0);function fc(e){var t=e.stroke;return null!=t&&"none"!==t&&e.lineWidth>0}function fh(e){return"string"==typeof e&&"none"!==e}function fd(e){var t=e.fill;return null!=t&&"none"!==t}function ff(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 fp(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 fg(e,t,n){var r=oc(t.image,t.__image,n);if(od(r)){var i=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*tR),o.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(o)}return i}}var fm=["shadowBlur","shadowOffsetX","shadowOffsetY"],fv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function fy(e,t,n,r,i){var o=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){fw(e,i),o=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?o_.opacity:a}(r||t.blend!==n.blend)&&(o||(fw(e,i),o=!0),e.globalCompositeOperation=t.blend||o_.blend);for(var s=0;s<fm.length;s++){var l=fm[s];(r||t[l]!==n[l])&&(o||(fw(e,i),o=!0),e[l]=e.dpr*(t[l]||0))}return(r||t.shadowColor!==n.shadowColor)&&(o||(fw(e,i),o=!0),e.shadowColor=t.shadowColor||o_.shadowColor),o}function fx(e,t,n,r,i){var o=fS(t,i.inHover),a=r?null:n&&fS(n,i.inHover)||{};if(o===a)return!1;var s=fy(e,o,a,r,i);if((r||o.fill!==a.fill)&&(s||(fw(e,i),s=!0),fh(o.fill)&&(e.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(s||(fw(e,i),s=!0),fh(o.stroke)&&(e.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(s||(fw(e,i),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||(fw(e,i),s=!0),e.lineWidth=l)}for(var u=0;u<fv.length;u++){var c=fv[u],h=c[0];(r||o[h]!==a[h])&&(s||(fw(e,i),s=!0),e[h]=o[h]||c[1])}return s}function fb(e,t){var n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function fw(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function fS(e,t){return t&&e.__hoverStyle||e.style}function f_(e,t){fC(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function fC(e,t,n,r){var i,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,f=!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&&(fw(e,n),e.restore(),f=d=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),c&&c.length&&(fw(e,n),e.save(),function(e,t,n){for(var r=!1,i=0;i<e.length;i++){var o=e[i];r=r||o.isZeroArea(),fb(t,o),t.beginPath(),o.buildPath(t,o.shape),t.clip()}n.allClipped=r}(c,e,n),d=!0),n.prevElClipPaths=c),n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var p=n.prevEl;p||(f=d=!0);var g=t instanceof au&&t.autoBatch&&(o=fd(i=t.style),a=fc(i),!(i.lineDash||!(+o^+a)||o&&"string"!=typeof i.fill||a&&"string"!=typeof i.stroke||i.strokePercent<1||i.strokeOpacity<1||i.fillOpacity<1));!d&&(s=p.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||fw(e,n):(fw(e,n),fb(e,t));var m=fS(t,n.inHover);t instanceof au?(1!==n.lastDrawType&&(f=!0,n.lastDrawType=1),fx(e,t,p,f,n),g&&(n.batchFill||n.batchStroke)||e.beginPath(),function(e,t,n,r){var i,o,a,s=fc(n),l=fd(n),u=n.strokePercent,c=u<1,h=!t.path;(!t.silent||c)&&h&&t.createPathProxy();var d=t.path||fu,f=t.__dirty;if(!r){var p=n.fill,g=n.stroke,m=l&&!!p.colorStops,v=s&&!!g.colorStops,y=l&&!!p.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=f?fo(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=b),v&&(w=f?fo(e,g,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=w),y&&(S=f||!t.__canvasFillPattern?fg(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=S),x&&(_=f||!t.__canvasStrokePattern?fg(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=(i=fl(t))[0],a=i[1]);var k=!0;(h||4&f)&&(d.setDPR(e.dpr),c?d.setContext(null):(d.setContext(e),k=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),k&&d.rebuildPath(e,c?u:1),o&&(e.setLineDash(o),e.lineDashOffset=a),!r&&(n.strokeFirst?(s&&fp(e,n),l&&ff(e,n)):(l&&ff(e,n),s&&fp(e,n))),o&&e.setLineDash([])}(e,t,m,g),g&&(n.batchFill=m.fill||"",n.batchStroke=m.stroke||"")):t instanceof ah?(3!==n.lastDrawType&&(f=!0,n.lastDrawType=3),fx(e,t,p,f,n),function(e,t,n){var r,i=n.text;if(null!=i&&(i+=""),i){e.font=n.font||eZ,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var o=void 0,a=void 0;e.setLineDash&&n.lineDash&&(o=(r=fl(t))[0],a=r[1]),o&&(e.setLineDash(o),e.lineDashOffset=a),n.strokeFirst?(fc(n)&&e.strokeText(i,n.x,n.y),fd(n)&&e.fillText(i,n.x,n.y)):(fd(n)&&e.fillText(i,n.x,n.y),fc(n)&&e.strokeText(i,n.x,n.y)),o&&e.setLineDash([])}}(e,t,m)):t instanceof ag?(2!==n.lastDrawType&&(f=!0,n.lastDrawType=2),l=f,fy(e,fS(t,n.inHover),p&&fS(p,n.inHover),l,n),function(e,t,n){var r=t.__image=oc(n.image,t.__image,t,t.onload);if(r&&od(r)){var i=n.x||0,o=n.y||0,a=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){var u=n.sx,c=n.sy,h=a-u,d=s-c;e.drawImage(r,u,c,h,d,i,o,a,s)}else e.drawImage(r,i,o,a,s)}}(e,t,m)):t.getTemporalDisplayables&&(4!==n.lastDrawType&&(f=!0,n.lastDrawType=4),function(e,t,n){var r,i,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(r=t.getCursor(),i=o.length;r<i;r++){var l=o[r];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),fC(e,l,s,r===i-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(),fC(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&&r&&fw(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}var fM=new d2,fk=new rr(100),fT=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function fD(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;e.dirty&&fM.delete(e);var o=fM.get(e);if(o)return o;var a=e8(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<fT.length;++u){var c=a[fT[u]];if(null!=c&&!ts(c)&&!tu(c)&&!th(c)&&"boolean"!=typeof c){l=!1;break}s.push(c)}if(l){t=s.join(",")+(i?"-svg":"");var h=fk.get(t);h&&(i?e.svgElement=h:e.image=h)}var d=function e(t){if(!t||0===t.length)return[[0,0]];if(th(t)){var n=Math.ceil(t);return[[n,n]]}for(var r=!0,i=0;i<t.length;++i)if(!th(t[i])){r=!1;break}if(r)return e([t]);for(var o=[],i=0;i<t.length;++i)if(th(t[i])){var n=Math.ceil(t[i]);o.push([n,n])}else{var n=tt(t[i],function(e){return Math.ceil(e)});n.length%2==1?o.push(n.concat(n)):o.push(n)}return o}(a.dashArrayX),f=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(th(e)){var t=Math.ceil(e);return[t,t]}var n=tt(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}(a.dashArrayY),p=function e(t){if(!t||0===t.length)return[["rect"]];if(tu(t))return[[t]];for(var n=!0,r=0;r<t.length;++r)if(!tu(t[r])){n=!1;break}if(n)return e([t]);for(var i=[],r=0;r<t.length;++r)tu(t[r])?i.push([t[r]]):i.push(t[r]);return i}(a.symbol),g=tt(d,function(e){return fA(e)}),m=fA(f),v=!i&&eH.createCanvas(),y=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=iz(e,g[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=iz(r,p[t].length);e*=r;var i=m*g.length*p.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,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<f.length;++t)e+=f[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%p.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+f[l]*_,k=d[c][b]*a.symbolSize,T=f[l]*a.symbolSize,D=w/2%p[h].length;(function(e,t,s,l,u){var c=i?1:n,h=ft(u,e*c,t*c,s*c,l*c,a.color,a.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(h);d&&y.children.push(d)}else f_(o,h)})(C,M,k,T,p[h][D])}g+=d[c][b],++w,++b===d[c].length&&(b=0)}++c===d.length&&(c=0)}s+=f[l],++u,++l===f.length&&(l=0)}}(),l&&fk.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=i?1:1/n,fM.set(e,s),e.dirty=!1,s}function fA(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var fI=new tY,fO={},fP="__flagInMainProcess",fR="__pendingUpdate",fE="__needsUpdateStatus",fL=/^[a-zA-Z0-9_]+$/,fN="__connectUpdateStatus";function fB(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed()){this.id;return}return fz(this,e,t)}}function fF(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return fz(this,e,t)}}function fz(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),tY.prototype[t].apply(e,n)}var fV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t}(tY),fZ=fV.prototype;fZ.on=fF("on"),fZ.off=fF("off");var fj=function(e){function t(t,n,r){var i=e.call(this,new dU)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},tu(n)&&(n=fK[n]),i._dom=t,r.ssr;var o=i._zr=i_(t,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:ty(r.useDirtyRect,!1),useCoarsePointer:ty(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=dy(to(o.flush,o),17),(n=e5(n))&&uw(n,!0),i._theme=n,i._locale=function(e){if(!tu(e))return e3(e5(e),e5(s2.EN),!1);var t=s2[e.toUpperCase()]||{};return"ZH"===e||"EN"===e?e5(t):e3(e5(t),e5(s2.EN),!1)}(r.locale||s3),i._coordSysMgr=new un;var a=i._api=bK(i);function s(e,t){return e.__prio-t.__prio}return nF(fX,s),nF(fq,s),i._scheduler=new dD(i,a,fq,fX),i._messageCenter=new fV,i._initEvents(),i.resize=to(i.resize,i),o.animation.on("frame",i._onframe,i),bG(o,i),bU(o,i),i[tC]=!0,i}return eF(t,e),t.prototype._onframe=function(){if(!this._disposed){b0(this);var e=this._scheduler;if(this[fR]){var t=this[fR].silent;this[fP]=!0;try{bB(this),bV.update.call(this,null,this[fR].updateParams)}catch(e){throw this[fP]=!1,this[fR]=null,e}this._zr.flush(),this[fP]=!1,this[fR]=null,bW.call(this,t),b$.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),bj(this,r),e.performVisualTasks(r),bX(this,this._model,i,"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[fP]){if(this._disposed){this.id;return}if(td(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[fP]=!0,!this._model||t){var r,i,o,a=new ui(this._api),s=this._theme,l=this._model=new l4;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:i},fY);var u={seriesTransition:o,optionChanged:!0};if(n)this[fR]={silent:r,updateParams:u},this[fP]=!1,this.getZr().wakeUp();else{try{bB(this),bV.update.call(this,null,u)}catch(e){throw this[fR]=null,this[fP]=!1,e}this._ssr||this._zr.flush(),this[fR]=null,this[fP]=!1,bW.call(this,r),b$.call(this,r)}}},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||eV.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(eV.svgSupported){var e=this._zr;return te(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,r=[],i=this;te(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.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 te(r,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,r=Math.min,i=Math.max,o=1/0;if(!f0[n])return this.getDataURL(e);var a=o,s=o,l=-o,u=-o,c=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();te(fJ,function(o,h){if(o.group===n){var d=t?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(e5(e)),f=o.getDom().getBoundingClientRect();a=r(f.left,a),s=r(f.top,s),l=i(f.right,l),u=i(f.bottom,u),c.push({dom:d,left:f.left,top:f.top})}}),a*=h,s*=h,l*=h,u*=h;var d=l-a,f=u-s,p=eH.createCanvas(),g=i_(p,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:f}),!t)return e.connectedBackgroundColor&&g.add(new a_({shape:{x:0,y:0,width:d,height:f},style:{fill:e.connectedBackgroundColor}})),te(c,function(e){var t=new ag({style:{x:e.left*h-a,y:e.top*h-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),p.toDataURL("image/"+(e&&e.type||"png"));var m="";return te(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 bZ(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return bZ(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(this._disposed){this.id;return}return te(i0(this._model,e),function(e,r){r.indexOf("Models")>=0&&te(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(t);else if("seriesModels"===r){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=i0(this._model,e,{defaultMainType:"series"}),r=n.seriesModel.getData(),i=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=i?dX(r,i,t):dK(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;te(fW,function(t){var n=function(n){var r,i=e.getModel(),o=n.target;if("globalout"===t?r={}:o&&dJ(o,function(e){var t=aF(e);if(t&&null!=t.dataIndex){var n=t.dataModel||i.getSeriesByIndex(t.seriesIndex);return r=n&&n.getDataParams(t.dataIndex,t.dataType,o)||{},!0}if(t.eventData)return r=e4({},t.eventData),!0},!0),r){var a=r.componentType,s=r.componentIndex;("markLine"===a||"markPoint"===a||"markArea"===a)&&(a="series",s=r.seriesIndex);var l=a&&null!=s&&i.getComponent(a,s),u=l&&e["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];r.event=n,r.type=t,e._$eventProcessor.eventInfo={targetEl:o,packedEvent:r,model:l,view:u},e.trigger(t,r)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)}),te(fU,function(t,n){e._messageCenter.on(n,function(e){this.trigger(n,e)},e)}),te(["selectchanged"],function(t){e._messageCenter.on(t,function(e){this.trigger(t,e)},e)}),function(e,t,n){e.on("selectchanged",function(e){var r=n.getModel();e.isFromClick?(dQ("map","selectchanged",t,r,e),dQ("pie","selectchanged",t,r,e)):"select"===e.fromAction?(dQ("map","selected",t,r,e),dQ("pie","selected",t,r,e)):"unselect"===e.fromAction&&(dQ("map","unselected",t,r,e),dQ("pie","unselected",t,r,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()&&i4(this.getDom(),f5,"");var e=this._api,t=this._model;te(this._componentsViews,function(n){n.dispose(t,e)}),te(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 fJ[this.id]},t.prototype.resize=function(e){if(!this[fP]){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"),r=e&&e.silent;this[fR]&&(null==r&&(r=this[fR].silent),n=!0,this[fR]=null),this[fP]=!0;try{n&&bB(this),bV.update.call(this,{type:"resize",animation:e4({duration:0},e&&e.animation)})}catch(e){throw this[fP]=!1,e}this[fP]=!1,bW.call(this,r),b$.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(td(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),fQ[e]){var n=fQ[e](this._api,t),r=this._zr;this._loadingFX=n,r.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=e4({},e);return t.type=fU[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(td(t)||(t={silent:!!t}),fG[e.type]&&this._model){if(this[fP]){this._pendingActions.push(e);return}var n=t.silent;bH.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&eV.browser.weChat&&this._throttledZrFlush(),bW.call(this,n),b$.call(this,n)}},t.prototype.updateLabelLayout=function(){fI.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,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function n(e,t){if(!e.preventAutoZ){var n=e.get("z")||0,r=e.get("zlevel")||0;t.eachRendered(function(e){return function e(t,n,r,i){var o=t.getTextContent(),a=t.getTextGuideLine();if(t.isGroup)for(var s=t.childrenRef(),l=0;l<s.length;l++)i=Math.max(e(s[l],n,r,i),i);else t.z=n,t.zlevel=r,i=Math.max(t.z2,i);if(o&&(o.z=n,o.zlevel=r,isFinite(i)&&(o.z2=i+2)),a){var u=t.textGuideLineConfig;a.z=n,a.zlevel=r,isFinite(i)&&(a.z2=i+(u&&u.showAbove?1:-1))}return i}(e,n,r,-1/0),!0})}}function r(e,t){t.eachRendered(function(e){if(!s_(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 i(e,n){var r=e.getModel("stateAnimation"),i=e.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered(function(e){if(e.states&&e.states.emphasis&&!s_(e)){if(e instanceof au){var n,r;(n=aj(e)).normalFill=e.style.fill,n.normalStroke=e.style.stroke,r=e.states.select||{},n.selectFill=r.style&&r.style.fill||null,n.selectStroke=r.style&&r.style.stroke||null}if(e.__dirty){var o=e.prevStates;o&&e.useStates(o)}if(i){e.stateTransition=a;var s=e.getTextContent(),l=e.getTextGuideLine();s&&(s.stateTransition=a),l&&(l.stateTransition=a)}e.__dirty&&t(e)}})}bB=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),bF(e,!0),bF(e,!1),t.plan()},bF=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;l<i.length;l++)i[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=i7(e.type);(c=new(t?cE.getClass(h.main,h.sub):du.getClass(h.sub))).init(n,s),o[u]=c,i.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||r.prepareView(c,e,n,s)}t?n.eachComponent(function(e,t){"series"!==e&&u(t)}):n.eachSeries(u);for(var l=0;l<i.length;){var c=i[l];c.__alive?l++:(t||c.renderTask.dispose(),a.remove(c.group),c.dispose(n,s),i.splice(l,1),o[c.__id]===c&&delete o[c.__id],c.__id=c.group.__ecComponentInfo=null)}},bz=function(e,t,n,r,i){var o,a=e._model;if(a.setUpdatePayload(n),!r){te([].concat(e._componentsViews).concat(e._chartsViews),c);return}var s={};s[r+"Id"]=n[r+"Id"],s[r+"Index"]=n[r+"Index"],s[r+"Name"]=n[r+"Name"];var l={mainType:r,query:s};i&&(l.subType=i);var u=n.excludeSeriesId;function c(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}null!=u&&(o=tD(),te(ij(u),function(e){var t=iq(e,null);null!=t&&o.set(t,!0)})),a&&a.eachComponent(l,function(t){if(!o||null==o.get(t.id)){if(sv(n)){if(t instanceof ck)n.type!==aG||n.notBlur||t.get(["emphasis","disabled"])||function(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var o=iK(i,t);o=(ts(o)?o[0]:o)||0;var a=i.getItemGraphicEl(o);if(!a)for(var s=i.count(),l=0;!a&&l<s;)a=i.getItemGraphicEl(l++);if(a){var u=aF(a);so(r,u.focus,u.blurScope,n)}else{var c=e.get(["emphasis","focus"]),h=e.get(["emphasis","blurScope"]);null!=c&&so(r,c,h,n)}}}(t,n,e._api);else{var r=ss(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===aG&&i&&!n.notBlur&&sa(t.mainType,t.componentIndex,e._api),a&&te(a,function(e){n.type===aG?st(e):sn(e)})}}else sm(n)&&t instanceof ck&&(function(e,t,n){if(sm(t)){var r=t.dataType,i=iK(e.getData(r),t);ts(i)||(i=[i]),e[t.type===aX?"toggleSelect":t.type===aq?"select":"unselect"](i,r)}}(t,n,e._api),sl(t),bJ(e))}},e),a&&a.eachComponent(l,function(t){(!o||null==o.get(t.id))&&c(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])},e)},bV={prepareAndUpdate:function(e){bB(this),bV.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(t,n){var r=this._model,i=this._api,o=this._zr,a=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),a.create(r,i),s.performDataProcessorTasks(r,t),bj(this,r),a.update(r,i),e(r),s.performVisualTasks(r,t),bq(this,r,i,t,n);var l=r.get("backgroundColor")||"transparent",u=r.get("darkMode");o.setBackgroundColor(l),null!=u&&"auto"!==u&&o.setDarkMode(u),fI.trigger("afterupdate",r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var o=[];r.eachComponent(function(e,a){if("series"!==e){var s=n.getViewOfComponentModel(a);if(s&&s.__alive){if(s.updateTransform){var l=s.updateTransform(a,r,i,t);l&&l.update&&o.push(s)}else o.push(s)}}});var a=tD();r.eachSeries(function(e){var o=n._chartsMap[e.__viewId];if(o.updateTransform){var s=o.updateTransform(e,r,i,t);s&&s.update&&a.set(e.uid,1)}else a.set(e.uid,1)}),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:a}),bX(this,r,i,t,{},a),fI.trigger("afterupdate",r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),du.markUpdateMethod(t,"updateView"),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),bq(this,n,this._api,t,{}),fI.trigger("afterupdate",n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries(function(e){e.getData().clearAllVisual()}),du.markUpdateMethod(t,"updateVisual"),e(r),this._scheduler.performVisualTasks(r,t,{visualType:"visual",setDirty:!0}),r.eachComponent(function(e,i){if("series"!==e){var o=n.getViewOfComponentModel(i);o&&o.__alive&&o.updateVisual(i,r,n._api,t)}}),r.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)}),fI.trigger("afterupdate",r,this._api))},updateLayout:function(e){bV.update.call(this,e)}},bZ=function(e,t,n,r){if(e._disposed){e.id;return}for(var i,o=e._model,a=e._coordSysMgr.getCoordinateSystems(),s=i0(o,n),l=0;l<a.length;l++){var u=a[l];if(u[t]&&null!=(i=u[t](o,s,r)))return i}},bj=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},bH=function(e,t){var n,r=this,i=this.getModel(),o=e.type,a=e.escapeConnect,s=fG[o],l=s.actionInfo,u=(l.update||"update").split(":"),c=u.pop(),h=null!=u[0]&&i7(u[0]);this[fP]=!0;var d=[e],f=!1;e.batch&&(f=!0,d=tt(e.batch,function(t){return(t=e8(e4({},t),e)).batch=null,t}));var p=[],g=sm(e),m=sv(e);if(m&&si(this._api),te(d,function(t){if((n=(n=s.action(t,r._model,r._api))||e4({},t)).type=l.event||n.type,p.push(n),m){var i=i1(e),o=i.queryOptionMap;bz(r,c,t,i.mainTypeSpecified?o.keys()[0]:"series"),bJ(r)}else g?(bz(r,c,t,"series"),bJ(r)):h&&bz(r,c,t,h.main,h.sub)}),"none"!==c&&!m&&!g&&!h)try{this[fR]?(bB(this),bV.update.call(this,e),this[fR]=null):bV[c].call(this,e)}catch(e){throw this[fP]=!1,e}if(n=f?{type:l.event||o,escapeConnect:a,batch:p}:p[0],this[fP]=!1,!t){var v=this._messageCenter;if(v.trigger(n.type,n),g){var y,x={type:"selectchanged",escapeConnect:a,selected:(y=[],i.eachSeries(function(e){te(e.getAllData(),function(t){t.data;var n=t.type,r=e.getSelectedDataIndices();if(r.length>0){var i={dataIndex:r,seriesIndex:e.seriesIndex};null!=n&&(i.dataType=n),y.push(i)}})}),y),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};v.trigger(x.type,x)}}},bW=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();bH.call(this,n,e)}},b$=function(e){e||this.trigger("updated")},bG=function(e,t){e.on("rendered",function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[fR]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")})},bU=function(e,t){e.on("mouseover",function(e){var n,r,i,o,a,s=dJ(e.target,sg);s&&(n=t._api,o=(i=ss((r=aF(s)).componentMainType,r.componentIndex,r.componentHighDownName,n)).dispatchers,a=i.focusSelf,o?(a&&sa(r.componentMainType,r.componentIndex,n),te(o,function(t){return a7(t,e)})):(so(r.seriesIndex,r.focus,r.blurScope,n),"self"===r.focus&&sa(r.componentMainType,r.componentIndex,n),a7(s,e)),bJ(t))}).on("mouseout",function(e){var n,r,i,o=dJ(e.target,sg);o&&(si(n=t._api),(i=ss((r=aF(o)).componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers)?te(i,function(t){return se(t,e)}):se(o,e),bJ(t))}).on("click",function(e){var n=dJ(e.target,function(e){return null!=aF(e).dataIndex},!0);if(n){var r=n.selected?"unselect":"select",i=aF(n);t._api.dispatchAction({type:r,dataType:i.dataType,dataIndexInside:i.dataIndex,seriesIndex:i.seriesIndex,isFromClick:!0})}})},bq=function(e,t,n,r,i){(function(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===e?n:t).push({zlevel:o,z:a,idx:i.componentIndex,type:e,key:s})}),r){var i,o,a=t.concat(n);nF(a,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),te(a,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,a=t.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)})}})(t),bY(e,t,n,r,i),te(e._chartsViews,function(e){e.__alive=!1}),bX(e,t,n,r,i),te(e._chartsViews,function(e){e.__alive||e.remove(t,n)})},bY=function(e,t,o,a,s,l){te(l||e._componentsViews,function(e){var s=e.__model;r(s,e),e.render(s,t,o,a),n(s,e),i(s,e)})},bX=function(e,t,o,a,s,l){var u,c,h,d,f=e._scheduler;s=e4(s||{},{updatedSeries:t.getSeries()}),fI.trigger("series:beforeupdate",t,o,s);var p=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;f.updatePayload(i,a),r(t,n),l&&l.get(t.uid)&&i.dirty(),i.perform(f.getPerformArgs(i))&&(p=!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),sl(t)}),f.unfinished=p||f.unfinished,fI.trigger("series:layoutlabels",t,o,s),fI.trigger("series:transition",t,o,s),t.eachSeries(function(t){var r=e._chartsMap[t.__viewId];n(t,r),i(t,r)}),u=e,c=t,h=u._zr.storage,d=0,h.traverse(function(e){!e.isGroup&&d++}),!(d>c.get("hoverLayerThreshold"))||eV.node||eV.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)})}}),fI.trigger("series:afterupdate",t,o,s)},bJ=function(e){e[fE]=!0,e.getZr().wakeUp()},b0=function(e){e[fE]&&(e.getZr().storage.traverse(function(e){!s_(e)&&t(e)}),e[fE]=!1)},bK=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return eF(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){st(t,n),bJ(e)},n.prototype.leaveEmphasis=function(t,n){sn(t,n),bJ(e)},n.prototype.enterBlur=function(t){a4(t,a1),bJ(e)},n.prototype.leaveBlur=function(t){a4(t,a2),bJ(e)},n.prototype.enterSelect=function(t){a4(t,a5),bJ(e)},n.prototype.leaveSelect=function(t){a4(t,a3),bJ(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}(ue))(e)},bQ=function(e){function t(e,t){for(var n=0;n<e.length;n++)e[n][fN]=t}te(fU,function(n,r){e._messageCenter.on(r,function(n){if(f0[e.group]&&0!==e[fN]&&(!n||!n.escapeConnect)){var r=e.makeActionFromEvent(n),i=[];te(fJ,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,0),te(i,function(e){1!==e[fN]&&e.dispatchAction(r)}),t(i,2)}})})}}(),t}(tY),fH=fj.prototype;fH.on=fB("on"),fH.off=fB("off"),fH.one=function(e,t,n){var r=this;this.on.call(this,e,function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)},n)};var fW=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function f$(e){}var fG={},fU={},fq=[],fY=[],fX=[],fK={},fQ={},fJ={},f0={},f1=+new Date-0,f2=+new Date-0,f5="_echarts_instance_";function f3(e){0>e6(fY,e)&&fY.push(e)}function f4(e,t){pe(fq,e,t,2e3)}function f8(e,t){fI.on(e,t)}function f6(e,t,n){tl(t)&&(n=t,t="");var r=td(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),!fU[t=e.event]&&(tS(fL.test(r)&&fL.test(t)),fG[r]||(fG[r]={action:n,actionInfo:e}),fU[t]=r)}function f9(e,t){pe(fX,e,t,3e3,"visual")}var f7=[];function pe(e,t,n,r,i){if((tl(t)||td(t))&&(n=t,t=r),!(e6(f7,n)>=0)){f7.push(n);var o=dD.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}f9(2e3,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=dC(e,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=dM(e,r),l=o[s],u=tl(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||tl(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||tl(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 r=e.getDataParams(n),i=e4({},o);i[s]=u(r),t.setItemVisual(n,"style",i)}}}}),f9(4500,{createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=dC(e,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){dk.option=n[r];var a=i(dk);e4(e.ensureUniqueItemVisual(t,"style"),a),dk.option.decal&&(e.setItemVisual(t,"decal",dk.option.decal),dk.option.decal.dirty=!0),o in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}}),f9(4500,{performRawSeries:!0,overallReset:function(e){var t=tD();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,i=t.get(r);i||(i={},t.set(r,i)),dw(e).scope=i}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),r={},i=t.getData(),o=dw(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=dM(t,a);i.each(function(e){r[i.getRawIndex(e)]=e}),n.each(function(e){var a=r[e];if(i.getItemVisual(a,"colorFromPalette")){var l=i.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,o,c)}})}})}}),f9(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 r={},i={},o=!1,a=0;a<dq.length;a++){var s=dq[a],l=e.get(s);tl(l)?(o=!0,i[s]=l):r[s]=l}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(e4({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},r)),!t.isSeriesFiltered(e)){var u=ti(i);return{dataEach:o?function(t,n){for(var r=e.getRawValue(n),o=e.getDataParams(n),a=0;a<u.length;a++){var s=u[a];t.setItemVisual(n,s,i[s](r,o))}}:null}}}}}),f9(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),r=0;r<dY.length;r++){var i=dY[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}}),f9(7e3,function(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=fD(n,t))});var i=r.getVisual("decal");i&&(r.getVisual("style").decal=fD(i,t))}})}),f3(uw),f4(900,function(e){var t=tD();e.eachSeries(function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;r.length&&i.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}}),t.each(uS)}),bm=function(e,t){e8(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,r=new ix,i=new a_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});r.add(i);var o=new aB({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 a_({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return r.add(a),t.showSpinner&&((n=new hI({shape:{startAngle:-dT/2,endAngle:-dT/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*dT/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*dT/2}).delay(300).start("circularInOut"),r.add(n)),r.resize=function(){var r=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&r?10:0)-r)/2-(t.showSpinner&&r?0:5+r/2)+(t.showSpinner?0:r/2)+(r?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}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r},fQ.default=bm,f6({type:aG,event:aG,update:aG},tP),f6({type:aU,event:aU,update:aU},tP),f6({type:aq,event:aq,update:aq},tP),f6({type:aY,event:aY,update:aY},tP),f6({type:aX,event:aX,update:aX},tP),bv={color:dZ,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],dZ]},fK.light=bv,fK.dark=dG;var pt=[],pn={registerPreprocessor:f3,registerProcessor:f4,registerPostInit:function(e){f8("afterinit",e)},registerPostUpdate:function(e){f8("afterupdate",e)},registerUpdateLifecycle:f8,registerAction:f6,registerCoordinateSystem:function(e,t){un.register(e,t)},registerLayout:function(e,t){pe(fX,e,t,1e3,"layout")},registerVisual:f9,registerTransform:function(e){var t=(e=e5(e)).type;t||uX("");var n=t.split(":");2!==n.length&&uX("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,u4.set(t,e)},registerLoading:function(e,t){fQ[e]=t},registerMap:function(e,t,n){var r=fO.registerMap;r&&r(e,t,n)},registerImpl:function(e,t){fO[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:lN,ComponentView:cE,SeriesModel:ck,ChartView:du,registerComponentModel:function(e){lN.registerClass(e)},registerComponentView:function(e){cE.registerClass(e)},registerSeriesModel:function(e){ck.registerClass(e)},registerChartView:function(e){du.registerClass(e)},registerSubTypeDefaulter:function(e,t){lN.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){ib[e]=t}};function pr(e){if(ts(e)){te(e,function(e){pr(e)});return}!(e6(pt,e)>=0)&&(pt.push(e),tl(e)&&(e={install:e}),e.install(pn))}var pi=iQ(),po={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},pa=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=pu(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return ty(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=uI(this.source),n=!(e>30),r="",i=[],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)}i.push({property:s,type:l,ordinalMeta:u}),!t||null==s||c&&c.isCalculationCoord||(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+="$",r+=po[l]||"f",u&&(r+=u.uid),r+="$"}var d=this.source;return{dimensions:i,hash:[d.seriesLayoutBy,d.startIndex,r].join("$$")}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var o=this.getSourceDimension(t);o&&(r=o.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function ps(e){return e instanceof pa}function pl(e){for(var t=tD(),n=0;n<(e||[]).length;n++){var r=e[n],i=td(r)?r.name:r;null!=i&&null==t.get(i)&&t.set(i,n)}return t}function pu(e){var t=pi(e);return t.dimNameMap||(t.dimNameMap=pl(e.dimensionsDefine))}function pc(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function ph(e,t){return pc(e,t)?e.getCalculationInfo("stackResultDimension"):t}var pd="undefined"!=typeof Float32Array,pf=pd?Float32Array:Array;function pp(e){return ts(e)?pd?new Float32Array(e):e:new pf(e)}var pg="__ec_stack_";function pm(e){return e.get("stack")||pg+e.seriesIndex}function pv(e){return e.dim+e.index}function py(e,t){var n=[];return t.eachSeriesByType(e,function(e){pS(e)&&n.push(e)}),n}function px(e){var t=function(e){var t={};te(e,function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),i=n.dim+"_"+n.index,o=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s<l;++s){var u=a.get(o,s);t[i]?t[i].push(u):t[i]=[u]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort(function(e,t){return e-t});for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];s>0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}(e),n=[];return te(e,function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent();if("category"===i.type)r=i.getBandWidth();else if("value"===i.type||"time"===i.type){var a=t[i.dim+"_"+i.index],s=Math.abs(o[1]-o[0]),l=i.scale.getExtent(),u=Math.abs(l[1]-l[0]);r=a?s/u*a:s}else{var c=e.getData();r=Math.abs(o[1]-o[0])/c.count()}var h=iM(e.get("barWidth"),r),d=iM(e.get("barMaxWidth"),r),f=iM(e.get("barMinWidth")||(p_(e)?.5:1),r),p=e.get("barGap"),g=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:d,barMinWidth:f,barGap:p,barCategoryGap:g,axisKey:pv(i),stackId:pm(e)})}),pb(n)}function pb(e){var t={};te(e,function(e,n){var r=e.axisKey,i=e.bandWidth,o=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;t[r]=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 te(t,function(e,t){n[t]={};var r,i=e.stacks,o=e.bandWidth,a=e.categoryGap;null==a&&(a=Math.max(35-4*ti(i).length,15)+"%");var s=iM(a,o),l=iM(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),te(i,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,u-=r+l*r,c--}else{var r=h;t&&t<r&&(r=Math.min(t,u)),n&&n>r&&(r=n),r!==h&&(e.width=r,u-=r+l*r,c--)}}),h=Math.max(h=(u-s)/(c+(c-1)*l),0);var d=0;te(i,function(e,t){e.width||(e.width=h),r=e,d+=e.width*(1+l)}),r&&(d-=r.width*l);var f=-d/2;te(i,function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)})}),n}function pw(e,t){var n=py(e,t),r=px(n);te(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=pm(e),o=r[pv(n)][i],a=o.offset,s=o.width;t.setLayout({bandWidth:o.bandWidth,offset:a,size:s})})}function pS(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function p_(e){return e.pipelineContext&&e.pipelineContext.large}var pC={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)!isNaN(e[r])&&(t+=e[r],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,r=0;r<e.length;r++){var i=e[r],o=Math.abs(i);o>t&&(t=o,n=i)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},pM=function(e){return Math.round(e.length/2)};function pk(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&i){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"===i&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h));var d=void 0;tu(i)?d=pC[i]:tl(i)&&(d=i),d&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,d,pM))}}}}}function pT(e){return null==e?0:e.length||1}function pD(e){return e}var pA=function(){function e(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||pD,this._newKeyGetter=r||pD,this.context=i,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={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a=r[o],s=n[a],l=pT(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(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],l=n[s],u=r[s],c=pT(l),h=pT(u);if(c>1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),r[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[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,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=pT(i);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a="_ec_"+this[r](e[o],o);if(i||(n[o]=a),t){var s=t[a],l=pT(s);0===l?(t[a]=o,i&&n.push(a)):1===l?t[a]=[s,o]:s.push(o)}}},e}(),pI=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 pO(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}let pP=function(e){this.otherDims={},null!=e&&e4(this,e)};var pR=td,pE="undefined"==typeof Int32Array?Array:Int32Array,pL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],pN=["_approximateExtent"],pB=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,r=!1;ps(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u<n.length;u++){var c=n[u],h=tu(c)?new pP({name:c}):c instanceof pP?c:new pP(c),d=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=d,h.coordDimIndex=0);var f=h.otherDims=h.otherDims||{};o.push(d),i[d]=h,null!=l[d]&&(s=!0),h.createInvertedIndices&&(a[d]=[]),0===f.itemName&&(this._nameDimIdx=u),0===f.itemId&&(this._idDimIdx=u),r&&(h.storeDimIndex=u)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=a,this._dimOmitted){var p=this._dimIdxToName=tD();te(o,function(e){p.set(i[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 r=this._schema.getSourceDimension(t);if(r)return r.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(th(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 r=n.encode[e];return r?r[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 r,i,o,a,s,l,u,c,h,d,f,p,g,m=this;if(e instanceof ca&&(g=e),!g){var v=this.dimensions,y=uC(e)||e7(e)?new uO(e,v.length):e;g=new ca;var x=tt(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=(r=this,i=this._schema,a=(o={}).encode={},s=tD(),l=[],u=[],c={},te(r.dimensions,function(e){var t=r.getDimensionInfo(e),n=t.coordDim;if(n){var i,o=t.coordDimIndex;pO(a,n)[o]=e,t.isExtraCoord||(s.set(n,1),"ordinal"!==(i=t.type)&&"time"!==i&&(l[0]=e),pO(c,n)[o]=r.getDimensionIndex(t.name)),t.defaultTooltip&&u.push(e)}lV.each(function(e,n){var r=pO(a,n),i=t.otherDims[n];null!=i&&!1!==i&&(r[i]=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=tt(h,function(e){return r.getDimensionInfo(e).storeDimIndex}),o.encodeFirstDimNotExtra=d,(f=a.label)&&f.length&&(l=f.slice()),(p=a.tooltip)&&p.length?u=p.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,o.userOutput=new pI(c,i),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),r=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var a=r;a<i;a++){var s=a-r;this._nameList[a]=t[s],o&&b6(this,a)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==l$&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===lZ&&!n.pure)for(var o=[],a=e;a<t;a++){var s,l=n.getItem(a,o);if(!this.hasItemOption&&td(s=l)&&!(s instanceof Array)&&(this.hasItemOption=!0),l){var u=l.name;null==r[a]&&null!=u&&(r[a]=iq(u,null));var c=l.id;null==i[a]&&null!=c&&(i[a]=iq(c,null))}}if(this._shouldMakeIdFromName())for(var a=e;a<t;a++)b6(this,a);b1(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){pR(e)?e4(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=b5(this,this._nameDimIdx,t)),null==n&&(n=""),n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return b2(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.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,r=this._store;return ts(e)?r.getValues(tt(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;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){tl(e)&&(n=t,t=e,e=[]);var r=n||this,i=tt(b3(e),this._getStoreDimIndex,this);this._store.each(i,r?to(t,r):t)},e.prototype.filterSelf=function(e,t,n){tl(e)&&(n=t,t=e,e=[]);var r=n||this,i=tt(b3(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?to(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=ti(e),i=[];return te(r,function(r){var o=t._getStoreDimIndex(r);n[o]=e[r],i.push(o)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){tl(e)&&(n=t,t=e,e=[]),n=n||this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,o=tt(b3(e),this._getStoreDimIndex,this),a=b8(this);return a._store=this._store.map(o,i?to(t,i):t),a},e.prototype.modify=function(e,t,n,r){var i=n||r||this,o=tt(b3(e),this._getStoreDimIndex,this);this._store.modify(o,i?to(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=b8(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.lttbDownSample=function(e,t){var n=b8(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 sQ(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new pA(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return b2(e,t)},function(e){return b2(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||{},pR(e)?e4(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],r=n&&n[t];return null==r?this.getVisual(t):r},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var i=r[t];return null==i&&(ts(i=this.getVisual(t))?i=i.slice():pR(i)&&(i=e4({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,pR(t)?e4(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){pR(e)?e4(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?e4(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){az(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){te(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:tt(this.dimensions,this._getDimInfo,this),this.hostModel)),b4(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];tl(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(tb(arguments)))})},e.internalField=void(b1=function(e){var t=e._invertedIndicesMap;te(t,function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new pE(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(i.storeDimIndex,s)]=s}})},b5=function(e,t,n){return iq(e._getCategory(t,n),null)},b2=function(e,t){var n=e._idList[t];return null==n&&null!=e._idDimIdx&&(n=b5(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n},b3=function(e){return ts(e)||(e=null!=e?[e]:[]),e},b8=function(t){var n=new e(t._schema?t._schema:tt(t.dimensions,t._getDimInfo,t),t.hostModel);return b4(n,t),n},b4=function(e,t){te(pL.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,te(pN,function(n){e[n]=e5(t[n])}),e._calculationInfo=e4({},t._calculationInfo)},b6=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];if(null==a&&null!=i&&(n[t]=a=b5(e,i,t)),null==s&&null!=o&&(r[t]=s=b5(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),r[t]=s}}),e}();function pF(e,t){uC(e)||(e=uk(e));var n,r,i,o,a,s=(t=t||{}).coordDimensions||[],l=t.dimensionsDefine||e.dimensionsDefine||[],u=tD(),c=[],h=(n=e,r=s,i=l,o=t.dimensionsCount,a=Math.max(n.dimensionsDetectedCount||1,r.length,i.length,o||0),te(r,function(e){var t;td(e)&&(t=e.dimsDef)&&(a=Math.max(a,t.length))}),a),d=t.canOmitUnusedDimensions&&h>30,f=l===e.dimensionsDefine,p=f?pu(e):pl(l),g=t.encodeDefine;!g&&t.encodeDefaulter&&(g=t.encodeDefaulter(e,h));for(var m=tD(g),v=new ce(h),y=0;y<v.length;y++)v[y]=-1;function x(e){var t=v[e];if(t<0){var n=l[e],r=td(n)?n:{name:n},i=new pP,o=r.name;null!=o&&null!=p.get(o)&&(i.name=i.displayName=o),null!=r.type&&(i.type=r.type),null!=r.displayName&&(i.displayName=r.displayName);var a=c.length;return v[e]=a,i.storeDimIndex=e,c.push(i),i}return c[t]}if(!d)for(var y=0;y<h;y++)x(y);m.each(function(e,t){var n=ij(e).slice();if(1===n.length&&!tu(n[0])&&n[0]<0){m.set(t,!1);return}var r=m.set(t,[]);te(n,function(e,n){var i=tu(e)?p.get(e):e;null!=i&&i<h&&(r[n]=i,w(x(i),t,n))})});var b=0;function w(e,t,n){null!=lV.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,u.set(t,!0))}te(s,function(e){if(tu(e))t=e,i={};else{t=(i=e).name;var t,n,r,i,o=i.ordinalMeta;i.ordinalMeta=null,(i=e4({},i)).ordinalMeta=o,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var a=m.get(t);if(!1!==a){if(!(a=ij(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++)}te(a,function(e,o){var a=x(e);if(f&&null!=i.type&&(a.type=i.type),w(e8(a,i),t,o),null==a.name&&n){var s=n[o];td(s)||(s={name:s}),a.name=a.displayName=s.name,a.defaultTooltip=s.defaultTooltip}r&&e8(a.otherDims,r)})}});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)te(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 r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}(M,u,C),D.coordDimIndex=0,(!S||_<=0)&&(D.isExtraCoord=!0),_--),k(D),null==D.type&&(lJ(e,T)===lq.Must||D.isExtraCoord&&(null!=D.otherDims.itemName||null!=D.otherDims.seriesName))&&(D.type="ordinal")}return function(e){for(var t=tD(),n=0;n<e.length;n++){var r=e[n],i=r.name,o=t.get(i)||0;o>0&&(r.name=i+(o-1)),o++,t.set(i,o)}}(c),new pa({source:e,dimensions:c,fullDimensionCount:h,dimensionOmitted:d})}var pz=function(e){this.coordSysDims=[],this.axisMap=tD(),this.categoryAxisMap=tD(),this.coordSysName=e},pV={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",i2).models[0],o=e.getReferringComponents("yAxis",i2).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),pZ(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),pZ(o)&&(r.set("y",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents("singleAxis",i2).models[0];t.coordSysDims=["single"],n.set("single",i),pZ(i)&&(r.set("single",i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents("polar",i2).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),pZ(o)&&(r.set("radius",o),t.firstCategoryDimIndex=0),pZ(a)&&(r.set("angle",a),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=i.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();te(o.parallelAxisIndex,function(e,o){var s=i.getComponent("parallelAxis",e),l=a[o];n.set(l,s),pZ(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=o))})}};function pZ(e){return"category"===e.get("type")}let pj=function(e,t,n){n=n||{};var r,i,o,a,s,l,u,c,h=t.getSourceManager(),d=!1;e?(d=!0,c=uk(e)):d=(c=h.getSource()).sourceFormat===lZ;var f=function(e){var t=e.get("coordinateSystem"),n=new pz(t),r=pV[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),p=(i=t.get("coordinateSystem"),o=un.get(i),f&&f.coordSysDims&&(r=tt(f.coordSysDims,function(e){var t={name:e},n=f.axisMap.get(e);if(n){var r=n.get("type");t.type="category"===r?"ordinal":"time"===r?"time":"float"}return t})),r||(r=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),r),g=n.useEncodeDefaulter,m=tl(g)?g:g?ta(lX,p,t):null,v=pF(c,{coordDimensions:p,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:m,canOmitUnusedDimensions:!d}),y=(a=v.dimensions,s=n.createInvertedIndices,f&&te(a,function(e,t){var n=e.coordDim,r=f.categoryAxisMap.get(n);r&&(null==l&&(l=t),e.ordinalMeta=r.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 r,i,o,a,s,l,u,c=(n=n||{}).byIndex,h=n.stackedCoordDimension;ps(t.schema)?(r=(i=t.schema).dimensions,o=t.store):r=t;var d=!!(e&&e.get("stack"));if(te(r,function(e,t){tu(e)&&(r[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 f=s.coordDim,p=s.type,g=0;te(r,function(e){e.coordDim===f&&g++});var m={name:l,coordDim:f,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:u,coordDim:u,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(u,p),v.storeDimIndex=o.ensureCalculationDimension(l,p)),i.appendCalculationDimension(m),i.appendCalculationDimension(v)):(r.push(m),r.push(v))}return{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:c,stackedOverDimension:u,stackResultDimension:l}}(t,{schema:v,store:x}),w=new pB(v,t);w.setCalculationInfo(b);var S=null!=y&&function(e){if(e.sourceFormat===lZ)return!ts(i$(function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[])))}(c)?function(e,t,n,r){return r===y?n:this.defaultDimValueGetter(e,t,n,r)}:null;return w.hasItemOption=!1,w.initData(d?c:x,null,S),w};var pH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.getInitialData=function(e,t){return pj(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)te(r.getAxes(),function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),a=e.getTickModel().get("alignWithLabel"),s=i[n],l="x1"===t[n]||"y1"===t[n];if(l&&!a&&(s+=1),!(r.length<2)){if(2===r.length){o[n]=e.toGlobalCoord(e.getExtent()[+!!l]);return}for(var u=void 0,c=void 0,h=1,d=0;d<r.length;d++){var f=r[d].coord,p=d===r.length-1?r[d-1].tickValue+h:r[d].tickValue;if(p===s){c=f;break}if(p<s)u=f;else if(null!=u&&p>s){c=(f+u)/2;break}1===d&&(h=p-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),o[n]=e.toGlobalCoord(c)}}});else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=+!r.getBaseAxis().isHorizontal();o[u]+=s+l/2}return o}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(ck);ck.registerClass(pH);var pW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.getInitialData=function(){return pj(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=s1(pH.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(pH);function p$(e,t,n,r,i){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 a_({shape:{x:a,y:s,width:l,height:u}});if(t){var d=e.getBaseAxis(),f=d.isHorizontal(),p=d.inverse;f?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var g=tl(i)?function(e){i(e,h)}:null;sS(h,{shape:{width:l,height:u,x:a,y:s}},n,null,r,g)}return h}function pG(e,t,n){var r=e.getArea(),i=ik(r.r0,1),o=ik(r.r,1),a=new hl({shape:{cx:ik(e.cx,1),cy:ik(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,sS(a,{shape:{endAngle:r.endAngle,r:o}},n)),a}function pU(e,t,n,r,i){if(e){if("polar"===e.type)return pG(e,t,n);if("cartesian2d"===e.type)return p$(e,t,n,r,i)}return null}var pq=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},pY=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return eF(t,e),t.prototype.getDefaultShape=function(){return new pq},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=(o-i)*.5,s=i+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 f=Math.cos(l),p=Math.sin(l),g=Math.cos(u),m=Math.sin(u);d?(e.moveTo(f*i+n,p*i+r),e.arc(f*s+n,p*s+r,a,-Math.PI+l,l,!c)):e.moveTo(f*o+n,p*o+r),e.arc(n,r,o,l,u,!c),e.arc(g*s+n,m*s+r,a,u-2*Math.PI,u-Math.PI,!c),0!==i&&e.arc(n,r,i,u,l,c)},t}(au);function pX(e,t){return e.type===t}function pK(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=uj(e,t,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a<n.length;a++)o.push(uj(e,t,n[a]));return o.join(" ")}}function pQ(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!ts(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);o>=0&&r.push(t[o])}return r.join(" ")}function pJ(e,t,n){return t*Math.sin(e)*(n?-1:1)}function p0(e,t,n){return t*Math.cos(e)*(n?1:-1)}function p1(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;ts(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:tt(r,function(e){return is(e,i)})}}var p2=Math.max,p5=Math.min,p3=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return eF(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");("cartesian2d"===i||"polar"===i)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){da(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,h=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);h&&this._enableRealtimeSort(h,a,n);var d=e.get("clip",!0)||h,f=function(e,t){var n=e.getArea&&e.getArea();if(pX(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var i=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}(l,a);o.removeClipPath();var p=e.get("roundCap",!0),g=e.get("showBackground",!0),m=e.getModel("backgroundStyle"),v=m.get("borderRadius")||0,y=[],x=this._backgroundEls,b=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function S(e){var t,n,r,o=gn[l.type](a,e),s=(t=l,n=i,r=o,new("polar"===t.type?hl:a_)({shape:gu(n,r,t),silent:!0,z2:0}));return s.useStyle(m.getItemStyle()),"cartesian2d"===l.type?s.setShape("r",v):s.setShape("cornerRadius",v),y[e]=s,s}a.diff(s).add(function(t){var n=a.getItemModel(t),r=gn[l.type](a,t,n);if(g&&S(t),a.hasValue(t)&>[l.type](r)){var s=!1;d&&(s=p4[l.type](f,r));var m=p8[l.type](e,a,t,r,i,c,u.model,!1,p);h&&(m.forceLabelAnimation=!0),gi(m,a,t,n,r,e,i,"polar"===l.type),b?m.attr({shape:r}):h?p6(h,c,m,r,t,i,!1,!1):sS(m,{shape:r},e,t),a.setItemGraphicEl(t,m),o.add(m),m.ignore=s}}).update(function(t,n){var r=a.getItemModel(t),_=gn[l.type](a,t,r);if(g){var C=void 0;0===x.length?C=S(n):((C=x[n]).useStyle(m.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var M=gn[l.type](a,t);sw(C,{shape:gu(i,M,l)},c,t)}var k=s.getItemGraphicEl(n);if(!a.hasValue(t)||!gt[l.type](_)){o.remove(k);return}var T=!1;if(d&&(T=p4[l.type](f,_))&&o.remove(k),k?sT(k):k=p8[l.type](e,a,t,_,i,c,u.model,!!k,p),h&&(k.forceLabelAnimation=!0),w){var D=k.getTextContent();if(D){var A=sV(D);null!=A.prevValue&&(A.prevValue=A.value)}}else gi(k,a,t,r,_,e,i,"polar"===l.type);b?k.attr({shape:_}):h?p6(h,c,k,_,t,i,!0,w):sw(k,{shape:_},e,t,null),a.setItemGraphicEl(t,k),k.ignore=T,o.add(k)}).remove(function(t){var n=s.getItemGraphicEl(t);n&&sk(n,e,t)}).execute();var _=this._backgroundGroup||(this._backgroundGroup=new ix);_.removeAll();for(var C=0;C<y.length;++C)_.add(y[C]);o.add(_),this._backgroundEls=y,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),gs(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),gs(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&pU(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i=null==i?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:tt(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(a)),u=l<0?Number.MIN_VALUE:t(e.indexOfRawIndex(l));if(u>o)return!0;o=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){sk(t,e,aF(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(du),p4={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,a=p2(t.x,e.x),s=p5(t.x+t.width,i),l=p2(t.y,e.y),u=p5(t.y+t.height,o),c=s<a,h=u<l;return t.x=c&&a>i?s:a,t.y=h&&l>o?u:l,t.width=c?0:s-a,t.height=h?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=p5(t.r,e.r),o=p2(t.r0,e.r0);t.r=i,t.r0=o;var a=i-o<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return a}},p8={cartesian2d:function(e,t,n,r,i,o,a,s,l){var u=new a_({shape:e4({},r),z2:1});return u.__dataIndex=n,u.name="item",o&&(u.shape[i?"height":"width"]=0),u},polar:function(e,t,n,r,i,o,a,s,l){var u,c,h=!i&&l?pY:hl,d=new h({shape:r,z2:1});d.name="item";var f=gr(i);if(d.calculateTextPosition=(c=h===pY,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return il(e,t,n);var i=f(r),o=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,d=(u+h)/2,p=a.startAngle,g=a.endAngle,m=(p+g)/2,v=c?Math.abs(u-h)/2:0,y=Math.cos,x=Math.sin,b=s+u*y(p),w=l+u*x(p),S="left",_="top";switch(i){case"startArc":b=s+(h-o)*y(m),w=l+(h-o)*x(m),S="center",_="top";break;case"insideStartArc":b=s+(h+o)*y(m),w=l+(h+o)*x(m),S="center",_="bottom";break;case"startAngle":b=s+d*y(p)+pJ(p,o+v,!1),w=l+d*x(p)+p0(p,o+v,!1),S="right",_="middle";break;case"insideStartAngle":b=s+d*y(p)+pJ(p,-o+v,!1),w=l+d*x(p)+p0(p,-o+v,!1),S="left",_="middle";break;case"middle":b=s+d*y(m),w=l+d*x(m),S="center",_="middle";break;case"endArc":b=s+(u+o)*y(m),w=l+(u+o)*x(m),S="center",_="bottom";break;case"insideEndArc":b=s+(u-o)*y(m),w=l+(u-o)*x(m),S="center",_="top";break;case"endAngle":b=s+d*y(g)+pJ(g,o+v,!0),w=l+d*x(g)+p0(g,o+v,!0),S="left",_="middle";break;case"insideEndAngle":b=s+d*y(g)+pJ(g,-o+v,!0),w=l+d*x(g)+p0(g,-o+v,!0),S="right",_="middle";break;default:return il(e,t,n)}return(e=e||{}).x=b,e.y=w,e.align=S,e.verticalAlign=_,e}),o){var p=d.shape,g=i?"r":"endAngle",m={};p[g]=i?r.r0:r.startAngle,m[g]=r[g],(s?sw:sS)(d,{shape:m},o)}return d}};function p6(e,t,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?sw:sS)(n,{shape:l},t,i,null),(a?sw:sS)(n,{shape:u},t?e.baseAxis.model:null,i)}function p9(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var p7=["x","y","width","height"],ge=["cx","cy","r","startAngle","endAngle"],gt={cartesian2d:function(e){return!p9(e,p7)},polar:function(e){return!p9(e,ge)}},gn={cartesian2d:function(e,t,n){var r,i,o,a=e.getItemLayout(t),s=n?(r=n,i=a,(o=r.get(["itemStyle","borderColor"]))&&"none"!==o?Math.min(r.get(["itemStyle","borderWidth"])||0,isNaN(i.width)?Number.MAX_VALUE:Math.abs(i.width),isNaN(i.height)?Number.MAX_VALUE:Math.abs(i.height)):0):0,l=a.width>0?1:-1,u=a.height>0?1:-1;return{x:a.x+l*s/2,y:a.y+u*s/2,width:a.width-l*s,height:a.height-u*s}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function gr(e){var t;return t=e?"Arc":"Angle",function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}function gi(e,t,n,r,i,o,a,s){var l=t.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=e.shape,c=p1(r.getModel("itemStyle"),u,!0);e4(u,c),e.setShape(u)}}else{var h=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",h)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var f=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=sP(r);sO(e,p,{labelFetcher:o,labelDataIndex:n,defaultText:pK(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var g=e.getTextContent();if(s&&g){var m=r.get(["label","position"]);e.textConfig.inside="middle"===m||null,function(e,t,n,r){if(th(r)){e.setTextConfig({rotation:r});return}if(ts(t)){e.setTextConfig({rotation:0});return}var i,o=e.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=n(t);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=(a+s)/2;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:e.setTextConfig({rotation:0});return}var u=1.5*Math.PI-i;"middle"===l&&u>Math.PI/2&&u<1.5*Math.PI&&(u-=Math.PI),e.setTextConfig({rotation:u})}(e,"outside"===m?f:m,gr(a),r.get(["label","rotate"]))}sZ(g,p,o.getRawValue(n),function(e){return pQ(t,e)});var v=r.getModel(["emphasis"]);sc(e,v.get("focus"),v.get("blurScope"),v.get("disabled")),sf(e,r),null!=i.startAngle&&null!=i.endAngle&&i.startAngle===i.endAngle&&(e.style.fill="none",e.style.stroke="none",te(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var go=function(){},ga=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return eF(t,e),t.prototype.getDefaultShape=function(){return new go},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l<n.length;l+=3)a[r]=s,a[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],a[0],a[1])},t}(au);function gs(e,t,n,r){var i=e.getData(),o=+!!i.getLayout("valueAxisHorizontal"),a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=e.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new ga({shape:{points:u},incremental:!!r,silent:!0,z2:0});c.baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(l.getItemStyle()),t.add(c),n&&n.push(c)}var h=new ga({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=o,h.largeDataIndices=a,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),aF(h).seriesIndex=e.seriesIndex,e.get("silent")||(h.on("mousedown",gl),h.on("mousemove",gl)),n&&n.push(h)}var gl=dy(function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,h=o.length/3;c<h;c++){var d=3*c;if(l[r]=u,l[i]=o[d+2],s[r]=o[d+r],s[i]=o[d+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return -1}(this,e.offsetX,e.offsetY);aF(this).dataIndex=t>=0?t:null},30,!1);function gu(e,t,n){if(pX(n,"cartesian2d")){var r=n.getArea();return{x:e?t.x:r.x,y:e?r.y:t.y,width:e?t.width:r.width,height:e?r.height:t.height}}var r=n.getArea();return{cx:r.cx,cy:r.cy,r0:e?r.r0:t.r0,r:e?r.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}}function gc(e){e.registerChartView(p3),e.registerSeriesModel(pW),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,ta(pw,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,{seriesType:"bar",plan:cL(),reset:function(e){if(pS(e)){var t,n,r=e.getData(),i=e.coordinateSystem,o=i.getBaseAxis(),a=i.getOtherAxis(o),s=r.getDimensionIndex(r.mapDimension(a.dim)),l=r.getDimensionIndex(r.mapDimension(o.dim)),u=e.get("showBackground",!0),c=r.mapDimension(a.dim),h=r.getCalculationInfo("stackResultDimension"),d=pc(r,c)&&!!r.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),p=(t=0,(n=a).toGlobalCoord(n.dataToCoord(+("log"===n.type)))),g=p_(e),m=e.get("barMinHeight")||0,v=h&&r.getDimensionIndex(h),y=r.getLayout("size"),x=r.getLayout("offset");return{progress:function(e,t){for(var n,r=e.count,o=g&&pp(3*r),a=g&&u&&pp(3*r),c=g&&pp(r),h=i.master.getRect(),b=f?h.width:h.height,w=t.getStore(),S=0;null!=(n=e.next());){var _=w.get(d?v:s,n),C=w.get(l,n),M=p,k=void 0;d&&(k=+_-w.get(s,n));var T=void 0,D=void 0,A=void 0,I=void 0;if(f){var O=i.dataToPoint([_,C]);if(d){var P=i.dataToPoint([k,C]);M=P[0]}T=M,D=O[1]+x,A=O[0]-M,I=y,Math.abs(A)<m&&(A=(A<0?-1:1)*m)}else{var O=i.dataToPoint([C,_]);if(d){var P=i.dataToPoint([C,k]);M=P[1]}T=O[0]+x,D=M,A=y,Math.abs(I=O[1]-M)<m&&(I=(I<=0?-1:1)*m)}g?(o[S]=T,o[S+1]=D,o[S+2]=f?A:I,a&&(a[S]=f?h.x:T,a[S+1]=f?D:h.y,a[S+2]=b),c[n]=n):t.setItemLayout(n,{x:T,y:D,width:A,height:I}),S+=3}g&&t.setLayout({largePoints:o,largeDataIndices:c,largeBackgroundPoints:a,valueAxisHorizontal:f})}}}}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,pk("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})}var gh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(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}(lN),gd=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),gf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",i2).models[0]},t.type="cartesian2dAxis",t}(lN);e9(gf,gd);var gp={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)"]}}},gg=e3({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},gp),gm=e3({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}}},gp),gv=e3({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},gm),gy=e8({logBase:10},gm);let gx={category:gg,value:gm,time:gv,log:gy};var gb=0,gw=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++gb}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&tt(r,gS);return new e({categories:i,needCollect:!i,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(!tu(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var r=this._getOrCreateMap();return null==(t=r.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=tD(this.categories))},e}();function gS(e){return td(e)&&null!=e.value?e.value:e+""}var g_={value:1,category:1,time:1,log:1};function gC(e,t,n,r){te(g_,function(i,o){var a=e3(e3({},gx[o],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+o,n}return eF(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=lP(this),r=n?lE(e):{};e3(e,t.getTheme().get(o+"Axis")),e3(e,this.getDefaultOption()),e.type=gM(e),n&&lR(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=gw.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",gM)}function gM(e){return e.type||(e.data?"category":"value")}var gk=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 gT(e){return"interval"===e.type||"log"===e.type}function gD(e){var t=Math.pow(10,iE(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,ik(n*t)}oo(gk);function gA(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function gI(e,t){return e>=t[0]&&e<=t[1]}function gO(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function gP(e,t){return e*(t[1]-t[0])+t[0]}var gR=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new gw({})),ts(r)&&(r=new gw({categories:tt(r,function(e){return td(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return eF(t,e),t.prototype.parse=function(e){return null==e?NaN:tu(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return gI(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return gO(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(gP(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=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];n[i]=s,r[s]=i}for(var l=0;i<o;++i){for(;null!=r[l];)l++;n.push(l),r[l]=i}},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}(gk);gk.registerClass(gR);var gE=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 eF(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return gI(e,this._extent)},t.prototype.normalize=function(e){return gO(e,this._extent)},t.prototype.scale=function(e){return gP(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=iD(e)+2},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!t)return o;n[0]<r[0]&&(e?o.push({value:ik(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=ik(a+t,i))!==o[o.length-1].value);)if(o.length>1e4)return[];var s=o.length?o[o.length-1].value:r[1];return n[1]>s&&(e?o.push({value:ik(s+t,i)}):o.push({value:n[1]})),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,l=[],u=(o.value-a.value)/e;s<e-1;){var c=ik(a.value+(s+1)*u);c>r[0]&&c<r[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=iD(e.value)||0:"auto"===n&&(n=this._intervalPrecision),lx(ik(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r,i,o,a,s,l=this._extent,u=l[1]-l[0];if(isFinite(u)){u<0&&(u=-u,l.reverse());var c,h,d=(r=e,i={},o=l[1]-l[0],a=i.interval=iL(o/r,!0),null!=t&&a<t&&(a=i.interval=t),null!=n&&a>n&&(a=i.interval=n),s=i.intervalPrecision=iD(a)+2,c=i.niceTickExtent=[ik(Math.ceil(l[0]/a)*a,s),ik(Math.floor(l[1]/a)*a,s)],h=l,isFinite(c[0])||(c[0]=h[0]),isFinite(c[1])||(c[1]=h[1]),gA(c,0,h),gA(c,1,h),c[0]>c[1]&&(c[0]=c[1]),i);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 r=this._interval;e.fixMin||(t[0]=ik(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=ik(Math.ceil(t[1]/r)*r))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type="interval",t}(gk);gk.registerClass(gE);var gL=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},gN=function(e){function t(t){var n=e.call(this,t)||this;return n.type="time",n}return eF(t,e),t.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return lr(e.value,s9[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(ln(this._minLevelUnit))]||s9.second,t,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC");return function(e,t,n,r,i){var o=null;if(tu(n))o=n;else if(tl(n))o=n(e.value,t,{level:e.level});else{var a=e4({},s8);if(e.level>0)for(var s=0;s<s7.length;++s)a[s7[s]]="{primary|"+a[s7[s]]+"}";var l=n?!1===n.inherit?n:e8(n,a):a,u=li(e.value,i);if(l[u])o=l[u];else if(l.inherit){for(var c=le.indexOf(u),s=c-1;s>=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(ts(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 lr(new Date(e.value),o,i,r)}(e,t,n,this.getSetting("locale"),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting("useUTC"),i=function(e,t,n,r){for(var i=0,o=[],a=[],s=0,l=0,u=0;u<le.length&&i++<1e4;++u){var c,h=ln(le[u]);if((c=le[u])===ln(c)&&(function(e,i,o){var a=[],s=!i.length;if(!function(e,t,n,r){var i=iR(t),o=iR(n),a=function(e){return lo(i,e,r)===lo(o,e,r)},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")}}(ln(e),r[0],r[1],n)){s&&(i=[{value:function(e,t,n){var r=new Date(e);switch(ln(t)){case"year":case"month":r[lf(n)](0);case"day":r[lp(n)](1);case"hour":r[lg(n)](0);case"minute":r[lm(n)](0);case"second":r[lv(n)](0),r[ly(n)](0)}return r.getTime()}(new Date(r[0]),e,n)},{value:r[1]}]);for(var l=0;l<i.length-1;l++){var u,c,h,d=i[l].value,f=i[l+1].value;if(d!==f){var p=void 0,g=void 0,m=void 0,v=!1;switch(e){case"year":p=Math.max(1,Math.round(t/864e5/365)),g=la(n),m=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":p=(u=t/2592e6)>6?6:u>3?3:u>2?2:1,g=ls(n),m=lf(n);break;case"week":case"half-week":case"day":p=(c=t/864e5)>16?16:c>7.5?7:c>3.5?4:c>1.5?2:1,g=ll(n),m=lp(n);break;case"half-day":case"quarter-day":case"hour":p=(h=t/36e5)>12?12:h>6?6:h>3.5?4:h>2?2:1,g=lu(n),m=lg(n);break;case"minute":p=gF(t,!0),g=lc(n),m=lm(n);break;case"second":p=gF(t,!1),g=lh(n),m=lv(n);break;case"millisecond":p=iL(t,!0),g=ld(n),m=ly(n)}(function(e,t,n,i,o,a,s){for(var l=new Date(t),u=t,c=l[i]();u<n&&u<=r[1];)s.push({value:u}),c+=e,l[o](c),u=l.getTime();s.push({value:u,notAdd:!0})})(p,d,f,g,m,0,a),"year"===e&&o.length>1&&0===l&&o.unshift({value:o[0].value-p})}}for(var l=0;l<a.length;l++)o.push(a[l])}}(le[u],o[o.length-1]||[],a),h!==(le[u+1]?ln(le[u+1]):null))){if(a.length){l=s,a.sort(function(e,t){return e.value-t.value});for(var d=[],f=0;f<a.length;++f){var p=a[f].value;(0===f||a[f-1].value!==p)&&(d.push(a[f]),p>=r[0]&&p<=r[1]&&s++)}var g=(r[1]-r[0])/t;if(s>1.5*g&&l>g/1.5||(o.push(d),s>g||e===le[u]))break}a=[]}}for(var m=tr(tt(o,function(e){return tr(e,function(e){return e.value>=r[0]&&e.value<=r[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,r,t);return(n=n.concat(i)).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 r=this._extent,i=r[1]-r[0];this._approxInterval=i/e,null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n);var o=gB.length,a=Math.min(gL(gB,this._approxInterval,0,o),o-1);this._interval=gB[a][1],this._minLevelUnit=gB[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return th(e)?e:+iR(e)},t.prototype.contain=function(e){return gI(this.parse(e),this._extent)},t.prototype.normalize=function(e){return gO(this.parse(e),this._extent)},t.prototype.scale=function(e){return gP(e,this._extent)},t.type="time",t}(gE),gB=[["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 gF(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}gk.registerClass(gN);var gz=gk.prototype,gV=gE.prototype,gZ=Math.floor,gj=Math.ceil,gH=Math.pow,gW=Math.log,g$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new gE,t._interval=0,t}return eF(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return tt(gV.getTicks.call(this,e),function(e){var t=e.value,i=ik(gH(this.base,t));return i=t===n[0]&&this._fixMin?ik(i,iD(r[0])):i,{value:i=t===n[1]&&this._fixMax?ik(i,iD(r[1])):i}},this)},t.prototype.setExtent=function(e,t){var n=gW(this.base);e=gW(Math.max(0,e))/n,t=gW(Math.max(0,t))/n,gV.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e,t,n=this.base,r=gz.getExtent.call(this);r[0]=gH(n,r[0]),r[1]=gH(n,r[1]);var i=this._originalScale.getExtent();return this._fixMin&&(r[0]=(e=r[0],ik(e,iD(i[0])))),this._fixMax&&(r[1]=(t=r[1],ik(t,iD(i[1])))),r},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=gW(e[0])/gW(t),e[1]=gW(e[1])/gW(t),gz.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 r=Math.pow(10,iE(n));for(e/n*r<=.5&&(r*=10);!isNaN(r)&&1>Math.abs(r)&&Math.abs(r)>0;)r*=10;var i=[ik(gj(t[0]/r)*r),ik(gZ(t[1]/r)*r)];this._interval=r,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){gV.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 gI(e=gW(e)/gW(this.base),this._extent)},t.prototype.normalize=function(e){return gO(e=gW(e)/gW(this.base),this._extent)},t.prototype.scale=function(e){return e=gP(e,this._extent),gH(this.base,e)},t.type="log",t}(gk),gG=g$.prototype;gG.getMinorTicks=gV.getMinorTicks,gG.getLabel=gV.getLabel,gk.registerClass(g$);var gU=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 r=this._isOrdinal="ordinal"===e.type;this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=this._modelMinRaw=t.get("min",!0);tl(i)?this._modelMinNum=gK(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=gK(e,i));var o=this._modelMaxRaw=t.get("max",!0);if(tl(o)?this._modelMaxNum=gK(e,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=gK(e,o)),r)this._axisDataLen=t.getCategories().length;else{var a=t.get("boundaryGap"),s=ts(a)?a:[a||0,a||0];"boolean"==typeof s[0]||"boolean"==typeof s[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[is(s[0],1),is(s[1],1)]}},e.prototype.calculate=function(){var e,t,n=this._isOrdinal,r=this._dataMin,i=this._dataMax,o=this._axisDataLen,a=this._boundaryGapInner,s=n?null:i-r||Math.abs(r),l="dataMin"===this._modelMinRaw?r:this._modelMinNum,u="dataMax"===this._modelMaxRaw?i:this._modelMaxNum,c=null!=l,h=null!=u;null==l&&(l=n?o?0:NaN:r-a[0]*s),null==u&&(u=n?o?o-1:NaN:i+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 f=this._determinedMin,p=this._determinedMax;return null!=f&&(l=f,c=!0),null!=p&&(u=p,h=!0),{min:l,max:u,minFixed:c,maxFixed:h,isBlank:d}},e.prototype.modifyDataMinMax=function(e,t){this[gY[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[gq[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),gq={min:"_determinedMin",max:"_determinedMax"},gY={min:"_dataMin",max:"_dataMax"};function gX(e,t,n){var r=e.rawExtentInfo;return r||(r=new gU(e,t,n),e.rawExtentInfo=r),r}function gK(e,t){return null==t?null:t!=t?NaN:e.parse(t)}function gQ(e,t){var n=e.type,r=gX(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,o=r.max,a=t.ecModel;if(a&&"time"===n){var s=py("bar",a),l=!1;if(te(s,function(e){l=l||e.getBaseAxis()===t.axis}),l){var u=function(e,t,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=function(e,t,n){if(e&&t)return e[pv(t)]}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;te(a,function(e){s=Math.min(e.offset,s)});var l=-1/0;te(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}}(i,o,t,px(s));i=u.min,o=u.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function gJ(e,t){var n=gQ(e,t),r=n.extent,i=t.get("splitNumber");e instanceof g$&&(e.base=t.get("logBase"));var o=e.type,a=t.get("interval"),s="interval"===o||"time"===o;e.setExtent(r[0],r[1]),e.calcNiceExtent({splitNumber:i,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 g0(e){var t=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?function(n,r){return e.scale.getFormattedLabel(n,r,t)}:tu(t)?function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}:tl(t)?function(r,i){return null!=n&&(i=r.value-n),t(g1(e,r),i,null!=r.level?{level:r.level}:null)}:function(t){return e.scale.getLabel(t)}}function g1(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function g2(e){var t=e.get("interval");return null==t?"auto":t}function g5(e){return"category"===e.type&&0===g2(e.getLabelModel())}function g3(e,t){var n={};return te(e.mapDimensionsAll(t),function(t){n[ph(e,t)]=!0}),ti(n)}var g4=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 tt(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),tr(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}(),g8=["x","y"];function g6(e){return"interval"===e.type||"time"===e.type}var g9=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=g8,t}return eF(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(g6(e)&&g6(t)){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,h=i[1]-r[0]*u,d=this._transform=[l,0,0,u,c,h];this._invTransform=np([],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),r=this.dataToPoint(t),i=this.getArea(),o=new nC(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return tW(n,e,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[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 tW(n,e,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.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(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e,o=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-i+e;return new nC(r,i,o,a)},t}(g4),g7=iQ();function me(e,t){var n,r,i,o,a=mt(e,"labels"),s=g2(t),l=mn(a,s);return l||(tl(s)?i=mo(e,s):(o="auto"===s?null!=(r=g7(n=e).autoInterval)?r:g7(n).autoInterval=n.calculateCategoryInterval():s,i=mi(e,o)),mr(a,s,{labels:i,labelCategoryInterval:o}))}function mt(e,t){return g7(e)[t]||(g7(e)[t]=[])}function mn(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function mr(e,t,n){return e.push({key:t,value:n}),n}function mi(e,t,n){var r=g0(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=g5(e),d=a.get("showMinLabel")||h,f=a.get("showMaxLabel")||h;d&&u!==o[0]&&g(o[0]);for(var p=u;p<=o[1];p+=l)g(p);function g(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return f&&p-l!==o[1]&&g(o[1]),s}function mo(e,t,n){var r=e.scale,i=g0(e),o=[];return te(r.getTicks(),function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})}),o}var ma=[0,1];function ms(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}var ml=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return eF(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]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return iA(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,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&ms(n=n.slice(),r.count()),iC(e,ma,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&ms(n=n.slice(),r.count());var i=iC(e,n,ma,t);return this.scale.scale(i)},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,r,i=mt(e,"ticks"),o=g2(t),a=mn(i,o);if(a)return a;if((!t.get("show")||e.scale.isBlank())&&(n=[]),tl(o))n=mo(e,o,!0);else if("auto"===o){var s=me(e,e.getLabelModel());r=s.labelCategoryInterval,n=tt(s.labels,function(e){return e.tickValue})}else n=mi(e,r=o,!0);return mr(i,o,{ticks:n,tickCategoryInterval:r})}(this,t):{ticks:tt(this.scale.getTicks(),function(e){return e.value})}).ticks,r=tt(n,function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this);return function(e,t,n,r){var i,o,a=t.length;if(e.onBand&&!n&&a){var s=e.getExtent();if(1===a)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;te(t,function(e){e.coord-=u/2}),o=1+e.scale.getExtent()[1]-t[a-1].tickValue,i={coord:t[a-1].coord+u*o},t.push(i)}var c=s[0]>s[1];h(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift()),r&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]}),h(s[1],i.coord)&&(r?i.coord=s[1]:t.pop()),r&&h(i.coord,s[1])&&t.push({coord:s[1]})}function h(e,t){return e=ik(e),t=ik(t),c?e>t:e<t}}(this,r,t.get("alignWithLabel"),e.clamp),r},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),tt(this.scale.getMinorTicks(e),function(e){return tt(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){var e,t,n,r,i,o;return("category"===this.type?(e=this,t=e.getLabelModel(),n=me(e,t),!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n):(r=this,i=r.scale.getTicks(),o=g0(r),{labels:tt(i,function(e,t){return{level:e.level,formattedLabel:o(e,t),rawLabel:r.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,r=(n=(t=e).getLabelModel(),{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}),i=g0(e),o=(r.axisRotate-r.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)),f=Math.abs(h*Math.sin(o)),p=0,g=0;c<=s[1];c+=u){var m=0,v=0,y=ir(i({value:c}),r.font,"center","top");m=1.3*y.width,v=1.3*y.height,p=Math.max(p,m,7),g=Math.max(g,v,7)}var x=p/d,b=g/f;isNaN(x)&&(x=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(x,b))),S=g7(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 mu(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,o={},a=i.getAxesOnZeroOf()[0],s=i.position,l=a?"onZero":s,u=i.dim,c=r.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},f=t.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===u?p[d[l]]:h[0],"x"===u?p[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?p[d[s]]-p[d.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),tv(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 mc(e){return"cartesian2d"===e.get("coordinateSystem")}function mh(e){var t={xAxisModel:null,yAxisModel:null};return te(t,function(n,r){var i=r.replace(/Model$/,""),o=e.getReferringComponents(i,i2).models[0];t[r]=o}),t}var md=Math.log,mf=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=g8,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 r(e){var t,n=ti(e),r=n.length;if(r){for(var i=[],o=r-1;o>=0;o--){var a=e[+n[o]],s=a.model,l=a.scale;gT(l)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(gJ(l,s),gT(l)&&(t=a))}i.length&&(t||gJ((t=i.pop()).scale,t.model),te(i,function(e){!function(e,t,n){var r=gE.prototype,i=r.getTicks.call(n),o=r.getTicks.call(n,!0),a=i.length-1,s=r.getInterval.call(n),l=gQ(e,t),u=l.extent,c=l.fixMin,h=l.fixMax;if("log"===e.type){var d=md(e.base);u=[md(u[0])/d,md(u[1])/d]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var f=r.getExtent.call(e);c&&(u[0]=f[0]),h&&(u[1]=f[1]);var p=r.getInterval.call(e),g=u[0],m=u[1];if(c&&h)p=(m-g)/a;else if(c)for(m=u[0]+p*a;m<u[1]&&isFinite(m)&&isFinite(u[1]);)p=gD(p),m=u[0]+p*a;else if(h)for(g=u[1]-p*a;g>u[0]&&isFinite(g)&&isFinite(u[0]);)p=gD(p),g=u[1]-p*a;else{e.getTicks().length-1>a&&(p=gD(p));var v=p*a;(g=ik((m=Math.ceil(u[1]/p)*p)-v))<0&&u[0]>=0?(g=0,m=ik(v)):m>0&&u[1]<=0&&(m=0,g=-ik(v))}var y=(i[0].value-o[0].value)/s,x=(i[a].value-o[a].value)/s;r.setExtent.call(e,g+p*y,m+p*x),r.setInterval.call(e,p),(y||x)&&r.setNiceExtent.call(e,g+p,m-p)}(e.scale,e.model,t.scale)}))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};te(n.x,function(e){mg(n,"y",e,i)}),te(n.y,function(e){mg(n,"x",e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get("containLabel"),o=lI(r,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var a=this._axesList;function s(){te(a,function(e){var t,n,r,i,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,i=(r=t.getExtent())[0]+r[1],t.toGlobalCoord="x"===t.dim?function(e){return e+n}:function(e){return i-e+n},t.toLocalCoord="x"===t.dim?function(e){return e-n}:function(e){return i-e+n}})}s(),i&&(te(a,function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t,n,r,i=e.model,o=e.scale;if(!(!i.get(["axisLabel","show"])||o.isBlank())){var a=o.getExtent();n=o instanceof gR?o.count():(t=o.getTicks()).length;var s=e.getLabelModel(),l=g0(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,r=e.width,i=e.height,o=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),a=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new nC(e.x,e.y,o,a)}(s.getTextRect(h),s.get("rotate")||0);r?r.union(d):r=d}return r}}(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]);o[n]-=t[n]+r,"top"===e.position?o.y+=t.height+r:"left"===e.position&&(o.x+=t.width+r)}}}),s()),te(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]}td(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis("x").index===e||i[r].getAxis("y").index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",i2).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",i2).models[0],a=e.gridModel,s=this._coordsList;return r?0>e6(s,t=r.coordinateSystem)&&(t=null):i&&o?t=this.getCartesian(i.componentIndex,o.componentIndex):i?n=this.getAxis("x",i.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 r=this,i=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,r){if(mp(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 ml(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new gR({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new gN({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(gk.getClass(t)||gE)}}(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=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++}}}this._axesMap=a,te(a.x,function(t,n){te(a.y,function(i,o){var a="x"+n+"y"+o,s=new g9(a);s.master=r,s.model=e,r._coordsMap[a]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})})},e.prototype._updateScale=function(e,t){function n(e,t){te(g3(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}te(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(mc(e)){var r=mh(e),i=r.xAxisModel,o=r.yAxisModel;if(mp(i,t)&&mp(o,t)){var a=this.getCartesian(i.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 te(this.getCartesians(),function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis(),o=r.getOtherAxis(i);0>e6(t,i)&&t.push(i),0>e6(n,o)&&n.push(o)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent("grid",function(i,o){var a=new e(i,t,n);a.name="grid_"+o,a.resize(i,n,!0),i.coordinateSystem=a,r.push(a)}),t.eachSeries(function(e){if(mc(e)){var t=mh(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=i.getCartesian(n.componentIndex,r.componentIndex)}}),r},e.dimensions=g8,e}();function mp(e,t){return e.getCoordSysModel()===t}function mg(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t],a=n.model,s=a.get(["axisLine","onZero"]),l=a.get(["axisLine","onZeroAxisIndex"]);if(s){if(null!=l)mm(o[l])&&(i=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&mm(o[u])&&!r[c(o[u])]){i=o[u];break}i&&(r[c(i)]=!0)}function c(e){return e.dim+"_"+e.index}}function mm(e){var t,n,r;return e&&"category"!==e.type&&"time"!==e.type&&(n=(t=e.scale.getExtent())[0],r=t[1],!(n>0&&r>0||n<0&&r<0))}var mv=Math.PI,my=function(){function e(e,t){this.group=new ix,this.opt=t,this.axisModel=e,e8(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new ix({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!mx[e]},e.prototype.add=function(e){mx[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,i,o=iI(t-e);return iO(o)?(i=n>0?"top":"bottom",r="center"):iO(o-mv)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o<mv?n>0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},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}(),mx={axisLine:function(e,t,n,r){var i=t.get(["axisLine","show"]);if("auto"===i&&e.handleAutoShown&&(i=e.handleAutoShown("axisLine")),i){var o=t.axis.getExtent(),a=r.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(tW(s,s,a),tW(l,l,a));var c=e4({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new hS({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});h1(h.shape,h.style.lineWidth),h.anid="line",n.add(h);var d=t.get(["axisLine","symbol"]);if(null!=d){var f=t.get(["axisLine","symbolSize"]);tu(d)&&(d=[d,d]),(tu(f)||th(f))&&(f=[f,f]);var p=fr(t.get(["axisLine","symbolOffset"])||0,f),g=f[0],m=f[1];te([{rotate:e.rotation+Math.PI/2,offset:p[0],r:0},{rotate:e.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(t,r){if("none"!==d[r]&&null!=d[r]){var i=ft(d[r],-g/2,-m/2,g,m,c.stroke,!0),o=t.r+t.offset,a=u?l:s;i.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(i)}})}}},axisTickLabel:function(e,t,n,r){var i=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick"),a=o.get("show");if("auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick")),!(!a||i.scale.isBlank())){for(var s=o.getModel("lineStyle"),l=r.tickDirection*o.get("length"),u=m_(i.getTicksCoords(),t.transform,l,e8(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<u.length;c++)e.add(u[c]);return u}}(n,r,t,e),o=function(e,t,n,r){var i=n.axis;if(!(!tv(r.axisLabelShow,n.get(["axisLabel","show"]))||i.scale.isBlank())){var o=n.getModel("axisLabel"),a=o.get("margin"),s=i.getViewLabels(),l=(tv(r.labelRotate,o.get("rotate"))||0)*mv/180,u=my.innerTextLayout(r.rotation,l,r.labelDirection),c=n.getCategories&&n.getCategories(!0),h=[],d=my.isLabelSilent(n),f=n.get("triggerEvent");return te(s,function(l,p){var g="ordinal"===i.scale.type?i.scale.getRawOrdinalNumber(l.tickValue):l.tickValue,m=l.formattedLabel,v=l.rawLabel,y=o;if(c&&c[g]){var x=c[g];td(x)&&x.textStyle&&(y=new sQ(x.textStyle,o,n.ecModel))}var b=y.getTextColor()||n.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(g),S=y.getShallow("align",!0)||u.textAlign,_=ty(y.getShallow("alignMinLabel",!0),S),C=ty(y.getShallow("alignMaxLabel",!0),S),M=y.getShallow("verticalAlign",!0)||y.getShallow("baseline",!0)||u.textVerticalAlign,k=ty(y.getShallow("verticalAlignMinLabel",!0),M),T=ty(y.getShallow("verticalAlignMaxLabel",!0),M),D=new aB({x:w,y:r.labelOffset+r.labelDirection*a,rotation:u.rotation,silent:d,z2:10+(l.level||0),style:sR(y,{text:m,align:0===p?_:p===s.length-1?C:S,verticalAlign:0===p?k:p===s.length-1?T:M,fill:tl(b)?b("category"===i.type?v:"value"===i.type?g+"":g,p):b})});if(D.anid="label_"+g,f){var A=my.makeAxisEventDataBase(n);A.targetType="axisLabel",A.value=v,A.tickIndex=p,"category"===i.type&&(A.dataIndex=g),aF(D).eventData=A}t.add(D),D.updateTransform(),h.push(D),e.add(D),D.decomposeTransform()}),h}}(n,r,t,e);(function(e,t,n){if(!g5(e.axis)){var r=e.get(["axisLabel","showMinLabel"]),i=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===r?(mb(o),mb(u)):mw(o,a)&&(r?(mb(a),mb(c)):(mb(o),mb(u))),!1===i?(mb(s),mb(h)):mw(l,s)&&(i?(mb(l),mb(d)):(mb(s),mb(h)))}})(t,o,i),function(e,t,n,r){var i=n.axis,o=n.getModel("minorTick");if(!(!o.get("show")||i.scale.isBlank())){var a=i.getMinorTicksCoords();if(a.length)for(var s=o.getModel("lineStyle"),l=r*o.get("length"),u=e8(s.getLineStyle(),e8(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),c=0;c<a.length;c++)for(var h=m_(a[c],t.transform,l,u,"minorticks_"+c),d=0;d<h.length;d++)e.add(h[d])}}(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])&&function(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new nC(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState("emphasis");null==t.ignore&&(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var o=e[i],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,f=0;f<t.length;f++){var p=t[f];if(n.intersect(p.rect)&&(a&&p.axisAligned||(p.obb||(p.obb=new hz(p.localRect,p.transform)),h||(h=new hz(s,l)),h.intersect(p.obb)))){d=!0;break}}d?(r(u),c&&r(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 r=e[n];if(!r.defaultAttr.ignore){var i=r.label,o=i.getComputedTransform(),a=i.getBoundingRect(),s=!o||o[1]<1e-5&&o[2]<1e-5,l=i.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 hz(a,o):null;t.push({label:i,labelLine:r.labelLine,rect:u,localRect:a,obb:c,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:o})}}return t}(tt(o,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,r){var i,o,a=tv(e.axisName,t.get("name"));if(a){var s,l,u,c,h,d,f,p,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,mS(m)?e.labelOffset+v*x:0],_=t.get("nameRotate");null!=_&&(_=_*mv/180),mS(m)?i=my.innerTextLayout(e.rotation,null!=_?_:e.rotation,v):(s=e.rotation,l=m,u=_||0,c=b,f=iI(u-s),p=c[0]>c[1],g="start"===l&&!p||"start"!==l&&p,iO(f-mv/2)?(d=g?"bottom":"top",h="center"):iO(f-1.5*mv)?(d=g?"top":"bottom",h="center"):(d="middle",h=f<1.5*mv&&f>mv/2?g?"left":"right":g?"right":"left"),i={rotation:f,textAlign:h,textVerticalAlign:d},null!=(o=e.axisNameAvailableWidth)&&(isFinite(o=Math.abs(o/Math.sin(i.rotation)))||(o=null)));var C=y.getFont(),M=t.get("nameTruncate",!0)||{},k=M.ellipsis,T=tv(e.nameTruncateMaxWidth,M.maxWidth,o),D=new aB({x:S[0],y:S[1],rotation:i.rotation,silent:my.isLabelSilent(t),style:sR(y,{text:a,font:C,overflow:"truncate",width:T,ellipsis:k,fill:y.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:y.get("align")||i.textAlign,verticalAlign:y.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(dr({el:D,componentModel:t,itemName:a}),D.__fullText=a,D.anid="name",t.get("triggerEvent")){var A=my.makeAxisEventDataBase(t);A.targetType="axisName",A.name=a,aF(D).eventData=A}r.add(D),D.updateTransform(),n.add(D),D.decomposeTransform()}}};function mb(e){e&&(e.ignore=!0)}function mw(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var i=nc([]);return nf(i,i,-e.rotation),n.applyTransform(nh([],i,e.getLocalTransform())),r.applyTransform(nh([],i,t.getLocalTransform())),n.intersect(r)}}function mS(e){return"middle"===e||"center"===e}function m_(e,t,n,r,i){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&&(tW(a,a,t),tW(s,s,t));var c=new hS({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});h1(c.shape,c.style.lineWidth),c.anid=i+"_"+e[l].tickValue,o.push(c)}return o}function mC(e,t){return"all"===e||ts(e)&&e6(e,t)>=0||e===t}function mM(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[mT(e)]}function mk(e){return!!e.get(["handle","show"])}function mT(e){return e.type+"||"+e.id}var mD={},mA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(t,n,r,i){this.axisPointerClass&&function(e){var t=mM(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=mk(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a<l[0]&&(a=l[0]),i.value=a,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){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,r){var i,o=t.getAxisPointerClass(this.axisPointerClass);if(o){var a=(i=mM(e))&&i.axisPointerModel;a?(this._axisPointer||(this._axisPointer=new o)).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){mD[e]=t},t.getAxisPointerClass=function(e){return e&&mD[e]},t.type="axis",t}(cE),mI=iQ(),mO=["axisLine","axisTickLabel","axisName"],mP=["splitArea","splitLine","minorSplitLine"],mR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass="CartesianAxisPointer",n}return eF(t,e),t.prototype.render=function(t,n,r,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ix,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),s=mu(a,t),l=new my(t,e4({handleAutoShown:function(e){for(var n=a.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(gT(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},s));te(mO,l.add,l),this._axisGroup.add(l.getGroup()),te(mP,function(e){t.get([e,"show"])&&mE[e](this,this._axisGroup,t,a)},this),i&&"changeAxisOrder"===i.type&&i.isInitSort||h6(o,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){mI(this).splitAreaColors=null},t.type="cartesianAxis",t}(mA),mE={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=ts(s)?s:[s];for(var l=r.coordinateSystem.getRect(),u=i.isHorizontal(),c=0,h=i.getTicksCoords({tickModel:o}),d=[],f=[],p=a.getLineStyle(),g=0;g<h.length;g++){var m=i.toGlobalCoord(h[g].coord);u?(d[0]=m,d[1]=l.y,f[0]=m,f[1]=l.y+l.height):(d[0]=l.x,d[1]=m,f[0]=l.x+l.width,f[1]=m);var v=c++%s.length,y=new hS({anid:null!=h[g].tickValue?"line_"+h[g].tickValue:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},style:e8({stroke:s[v]},p),silent:!0});h1(y.shape,p.lineWidth),t.add(y)}}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=n.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),s=i.isHorizontal(),l=i.getMinorTicksCoords();if(l.length)for(var u=[],c=[],h=o.getLineStyle(),d=0;d<l.length;d++)for(var f=0;f<l[d].length;f++){var p=i.toGlobalCoord(l[d][f].coord);s?(u[0]=p,u[1]=a.y,c[0]=p,c[1]=a.y+a.height):(u[0]=a.x,u[1]=p,c[0]=a.x+a.width,c[1]=p);var g=new hS({anid:"minor_line_"+l[d][f].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:h,silent:!0});h1(g.shape,h.lineWidth),t.add(g)}},splitArea:function(e,t,n,r){!function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var o=n.getModel("splitArea"),a=o.getModel("areaStyle"),s=a.get("color"),l=r.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:o,clamp:!0});if(u.length){var c=s.length,h=mI(e).splitAreaColors,d=tD(),f=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(null!=g){f=(g+(c-1)*p)%c;break}}var m=i.toGlobalCoord(u[0].coord),v=a.getAreaStyle();s=ts(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),x=void 0,b=void 0,w=void 0,S=void 0;i.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[p-1].tickValue;null!=_&&d.set(_,f),t.add(new a_({anid:null!=_?"area_"+_:null,shape:{x:x,y:b,width:w,height:S},style:e8({fill:s[f]},v),autoBatch:!0,silent:!0})),f=(f+1)%c}mI(e).splitAreaColors=d}}}(e,t,n,r)}},mL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.type="xAxis",t}(mR),mN=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=mL.type,t}return eF(t,e),t.type="yAxis",t}(mR),mB=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="grid",t}return eF(t,e),t.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new a_({shape:e.coordinateSystem.getRect(),style:e8({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(cE),mF={offset:0};function mz(e){e.registerComponentView(mB),e.registerComponentModel(gh),e.registerCoordinateSystem("cartesian2d",mf),gC(e,"x",gf,mF),gC(e,"y",gf,mF),e.registerComponentView(mL),e.registerComponentView(mN),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var mV=iQ();function mZ(e,t,n,r){!function e(t,n){if(!(td(t)&&td(n)))return t===n;var r=!0;return te(n,function(n,i){r=r&&e(t[i],n)}),!!r}(mV(n).lastProp,r)&&(mV(n).lastProp=r,t?sw(n,r,e):(n.stopAnimation(),n.attr(r)))}function mj(e,t){e[t.get(["label","show"])?"show":"hide"]()}function mH(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function mW(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse(function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)})}function m$(e,t,n,r,i){e=t.scale.parse(e);var o=t.scale.getLabel({value:e},{precision:i.precision}),a=i.formatter;if(a){var s={value:g1(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};te(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),tu(a)?o=a.replace("{value}",o):tl(a)&&(o=a(s))}return o}function mG(e,t,n){var r=nu();return nf(r,r,n.rotation),nd(r,r,n.position),h4([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var mU=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.makeElOption=function(e,t,n,r,i){var o,a,s,l,u,c,h,d,f,p,g,m,v,y,x,b,w,S,_,C=n.axis,M=C.grid,k=r.get("type"),T=mq(M,C).getOtherAxis(C).getGlobalExtent(),D=C.toGlobalCoord(C.dataToCoord(t,!0));if(k&&"none"!==k){var A,I,O,P=(I=r.get("type"),O=r.getModel(I+"Style"),"line"===I?(A=O.getLineStyle()).fill=null:"shadow"===I&&((A=O.getAreaStyle()).stroke=null),A),R=mY[k](C,D,T);R.style=P,e.graphicKey=R.type,e.pointer=R}var E=mu(M.model,n);h=my.innerTextLayout(E.rotation,0,E.labelDirection),E.labelMargin=r.get(["label","margin"]),d={position:mG(n.axis,t,E),align:h.textAlign,verticalAlign:h.textVerticalAlign},f=m$(r.get("value"),n.axis,n.ecModel,r.get("seriesDataIndices"),{precision:r.get(["label","precision"]),formatter:r.get(["label","formatter"])}),g=tw((p=r.getModel("label")).get("padding")||0),v=ir(f,m=p.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=i).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),(_=p.get("backgroundColor"))&&"auto"!==_||(_=n.get(["axisLine","lineStyle","color"])),e.label={x:y[0],y:y[1],style:sR(p,{text:f,font:m,fill:p.getTextColor(),padding:g,backgroundColor:_}),z2:10}},t.prototype.getHandleTransform=function(e,t,n){var r=mu(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var i=mG(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),s=mq(o,i).getOtherAxis(i).getGlobalExtent(),l=+("x"!==i.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,r){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==o){this._lastValue=i,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,i,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=ta(mZ,t,c);this.updatePointerEl(a,l,h),this.updateLabelEl(a,l,h,t)}else a=this._group=new ix,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);mW(a,t,!0),this._renderHandle(i)}},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"),r=e.axis,i="category"===r.type,o=t.get("snap");if(!o&&!i)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(i&&r.getBandWidth()>a)return!0;if(o){var s=mM(e).seriesDataCount,l=r.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var o=mV(e).pointerEl=new f[i.type](e5(t.pointer));e.add(o)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=mV(e).labelEl=new aB(e5(t.label));e.add(i),mj(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=mV(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=mV(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),mj(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),i=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a){i&&r.remove(i),this._handle=null;return}this._handle||(t=!0,i=this._handle=de(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){ni(e.event)},onmousedown:to(this._onHandleDragMove,this,0,0),drift:to(this._onHandleDragMove,this),ondragend:to(this._onHandleDragEnd,this)}),r.add(i)),mW(i,n,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");ts(s)||(s=[s,s]),i.scaleX=s[0]/2,i.scaleY=s[1]/2,dx(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){mZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,mH(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(mH(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(mH(r)),mV(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,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),db(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 mq(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var mY={line:function(e,t,n){var r,i,o;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],i=[t,n[1]],{x1:r[o=(o=mX(e))||0],y1:r[1-o],x2:i[o],y2:i[1-o]})}},shadow:function(e,t,n){var r,i,o,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],i=[a,s],{x:r[o=(o=mX(e))||0],y:r[1-o],width:i[o],height:i[1-o]})}}};function mX(e){return+("x"!==e.dim)}var mK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(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}(lN),mQ=iQ();function mJ(e,t,n){if(!eV.node){var r=t.getZr();mQ(r).records||(mQ(r).records={}),function(e,t){!mQ(e).initialized&&(mQ(e).initialized=!0,n("click",ta(m1,"click")),n("mousemove",ta(m1,"mousemove")),n("globalout",m0));function n(n,r){e.on(n,function(n){var i,o,a,s,l,u,c,h,d=(i=t,o={showTip:[],hideTip:[]},{dispatchAction:a=function(e){var t=o[e.type];t?t.push(e):(e.dispatchAction=a,i.dispatchAction(e))},pendings:o});te(mQ(e).records,function(e){e&&r(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))})}}(r,t),(mQ(r).records[e]||(mQ(r).records[e]={})).handler=n}}function m0(e,t,n){e.handler("leave",null,n)}function m1(e,t,n,r){t.handler(e,n,r)}function m2(e,t){if(!eV.node){var n=t.getZr();(mQ(n).records||{})[e]&&(mQ(n).records[e]=null)}}var m5=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),i=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";mJ("axisPointer",n,function(e,t,n){"none"!==i&&("leave"===e||i.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){m2("axisPointer",t)},t.prototype.dispose=function(e,t){m2("axisPointer",t)},t.type="axisPointer",t}(cE);function m3(e,t){var n,r=[],i=e.seriesIndex;if(null==i||!(n=t.getSeriesByIndex(i)))return{point:[]};var o=n.getData(),a=iK(o,e);if(null==a||a<0||ts(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)r=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),f=o.mapDimension(h),p=[];p[d]=o.get(f,a),p[1-d]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(p)||[]}else r=l.dataToPoint(o.getValues(tt(l.dimensions,function(e){return o.mapDimension(e)}),a))||[]}else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),r=[g.x+g.width/2,g.y+g.height/2]}return{point:r,el:s}}var m4=iQ();function m8(e,t,n){var r=e.currTrigger,i=[e.x,e.y],o=e.dispatchAction||to(n.dispatchAction,n),a=t.getComponent("axisPointer").coordSysAxesInfo;if(a){vt(i)&&(i=m3({seriesIndex:e.seriesIndex,dataIndex:e.dataIndex},t).point);var s,l,u,c,h,d,f,p,g,m,v,y,x=vt(i),b=e.axesInfo,w=a.axesInfo,S="leave"===r||vt(i),_={},C={},M={list:[],map:{}},k={showPointer:ta(m9,C),showTooltip:ta(m7,M)};te(a.coordSysMap,function(e,t){var n=x||e.containPoint(i);te(a.coordSysAxesInfo[t],function(e,t){var r=e.axis,o=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(b,e);if(!S&&n&&(!b||o)){var a=o&&o.value;null!=a||x||(a=r.pointToData(i)),null!=a&&m6(e,a,k,!1,_)}})});var T={};return te(w,function(e,t){var n=e.linkGroup;n&&!C[t]&&te(n.axesInfo,function(t,r){var i=C[r];if(t!==e&&i){var o=i.value;n.mapper&&(o=e.axis.scale.parse(n.mapper(o,ve(t),ve(e)))),T[e.key]=o}})}),te(T,function(e,t){m6(w[t],e,k,!0,_)}),s=C,l=w,u=_.axesInfo=[],te(l,function(e,t){var n=e.axisPointerModel.option,r=s[t];r?(e.useHandle||(n.status="show"),n.value=r.value,n.seriesDataIndices=(r.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,r){if(vt(t)||!e.list.length){r({type:"hideTip"});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}(M,i,e,o),c=w,h=0,f=(d=n).getZr(),p="axisPointerLastHighlights",g=m4(f)[p]||{},m=m4(f)[p]={},te(c,function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&te(n.seriesDataIndices,function(e){m[e.seriesIndex+" | "+e.dataIndex]=e})}),v=[],y=[],te(g,function(e,t){m[t]||y.push(e)}),te(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 m6(e,t,n,r,i){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,f,p=(a=t,u=(l=(s=e).axis).dim,c=a,h=[],d=Number.MAX_VALUE,f=-1,te(s.seriesModels,function(e,t){var n,r,i=e.getData().mapDimensionsAll(u);if(e.getAxisTooltipData){var o=e.getAxisTooltipData(i,a,l);r=o.dataIndices,n=o.nestestValue}else{if(!(r=e.getData().indicesOfNearest(i[0],a,"category"===l.type?.5:null)).length)return;n=e.getData().get(i[0],r[0])}if(null!=n&&isFinite(n)){var s=a-n,p=Math.abs(s);p<=d&&((p<d||s>=0&&f<0)&&(d=p,f=s,c=n,h.length=0),te(r,function(t){h.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:h,snapToValue:c}),g=p.payloadBatch,m=p.snapToValue;g[0]&&null==i.seriesIndex&&e4(i,g[0]),!r&&e.snap&&o.containData(m)&&null!=m&&(t=m),n.showPointer(e,t,g),n.showTooltip(e,p,m)}}function m9(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function m7(e,t,n,r){var i=n.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var l=t.coordSys.model,u=mT(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:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function ve(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function vt(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function vn(e){mA.registerAxisPointerClass("CartesianAxisPointer",mU),e.registerComponentModel(mK),e.registerComponentView(m5),e.registerPreprocessor(function(e){if(e){e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={});var t=e.axisPointer.link;t&&!ts(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){var n,r,i,o,a,s,l,u;e.getComponent("axisPointer").coordSysAxesInfo=(r=n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}},i=e,o=t,a=i.getComponent("tooltip"),l=(s=i.getComponent("axisPointer")).get("link",!0)||[],u=[],te(o.getCoordinateSystems(),function(e){if(e.axisPointerEnabled){var t=mT(e.model),n=r.coordSysAxesInfo[t]={};r.coordSysMap[t]=e;var o=e.model.getModel("tooltip",a);if(te(e.getAxes(),ta(f,!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)&&te(d.baseAxes,ta(f,!h||"cross",c)),h&&te(d.otherAxes,ta(f,"cross",!1))}}function f(t,a,c){var h=c.model.getModel("axisPointer",s),d=h.get("show");if(d&&("auto"!==d||t||mk(h))){null==a&&(a=h.get("triggerTooltip"));var f=(h=t?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};te(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(e){s[e]=e5(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"===i){var u=a.get(["label","show"]);if(l.show=null==u||u,!o){var c=s.lineStyle=a.get("crossStyle");c&&e8(l,c.textStyle)}}return e.model.getModel("axisPointer",new sQ(s,n,r))}(c,o,s,i,t,a):h).get("snap"),p=h.get("triggerEmphasis"),g=mT(c.model),m=a||f||"category"===c.type,v=r.axesInfo[g]={key:g,axis:c,coordSys:e,axisPointerModel:h,triggerTooltip:a,triggerEmphasis:p,involveSeries:m,snap:f,useHandle:mk(h),seriesModels:[],linkGroup:null};n[g]=v,r.seriesInvolved=r.seriesInvolved||m;var y=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(mC(o[r+"AxisId"],n.id)||mC(o[r+"AxisIndex"],n.componentIndex)||mC(o[r+"AxisName"],n.name))return i}}(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,r=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);n&&"none"!==r&&!1!==r&&"item"!==r&&!1!==i&&!1!==t.get(["axisPointer","show"],!0)&&te(e.coordSysAxesInfo[mT(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(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"},m8)}function vr(e){pr(mz),pr(vn)}var vi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return eF(t,e),t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new cs(this),cl(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),cl(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:lU},t}(lN),vo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return eF(t,e),t.type="dataset",t}(cE);function va(e){e.registerComponentModel(vi),e.registerComponentView(vo)}var vs=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 eF(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}(lN),vl=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),a=e.get("textAlign"),s=ty(e.get("textBaseline"),e.get("textVerticalAlign")),l=new aB({style:sR(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new aB({style:sR(o,{text:c,fill:o.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),f=e.get("sublink"),p=e.get("triggerEvent",!0);l.silent=!d&&!p,h.silent=!f&&!p,d&&l.on("click",function(){lk(d,"_"+e.get("target"))}),f&&h.on("click",function(){lk(f,"_"+e.get("subtarget"))}),aF(l).eventData=aF(h).eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(h);var g=r.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=lI(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"),r.x=v.x,r.y=v.y,r.markRedraw();var y={align:a,verticalAlign:s};l.setStyle(y),h.setStyle(y),g=r.getBoundingRect();var x=v.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var w=new a_({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});r.add(w)}},t.type="title",t}(cE);function vu(e){e.registerComponentModel(vs),e.registerComponentView(vl)}var vc=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(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}(lN);function vh(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function vd(e){if(eV.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var vf=vd(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function vp(e,t){if(!e)return t;t=lb(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var vg=vp(vd(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),vm=vp(vf,"transform"),vv="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(eV.transform3dSupported?"will-change:transform;":"");function vy(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!eV.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=eV.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+vm+":"+a+";":[["top",0],["left",0],[vf,a]]}function vx(e,t,n,r,i){var o=t&&t.painter;if(n){var a=o&&o.getViewportRoot();a&&t1(t0,a,r,i,!0)&&t1(e,n,t0[0],t0[1])}else{e[0]=r,e[1]=i;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 vb=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,eV.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,o=i&&(tu(i)?document.querySelector(i):tg(i)?i:tl(i)&&i(e.getDom()));vx(this._styleCoord,r,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=r.handler;nn(r.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,r=this._api.getDom(),i=(t="position",(n=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r))?t?n[t]:n:null),o=r.style;"absolute"!==o.position&&"absolute"!==i&&(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,r,i,o,a,s,l,u,c,h,d,f,p,g,m,v,y,x,b,w,S,_,C=this.el,M=C.style,k=this._styleCoord;C.innerHTML?M.cssText=vv+(n=!this._firstShow,r=this._longHide,i=[],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=cS(e,"html"),f=u+"px "+c+"px "+s+"px "+l,i.push("box-shadow:"+f),n&&o&&i.push((m="opacity"+(g=" "+o/2+"s "+(p="cubic-bezier(0.23,1,0.32,1)"))+",visibility"+g,r||(g=" "+o+"s "+p,m+=eV.transformSupported?","+vm+g:",left"+g+",top"+g),vg+":"+m)),a&&i.push("background-color:"+a),te(["width","color","radius"],function(t){var n="border-"+t,r=lb(n),o=e.get(r);null!=o&&i.push(n+":"+o+("color"===t?"":"px"))}),i.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),te(["decoration","align"],function(e){var t=h.get(e);t&&v.push("text-"+e+":"+t)}),v.join(";"))),null!=d&&i.push("padding:"+tw(d).join("px ")+"px"),i.join(";")+";")+vy(k[0],k[1],!0)+"border-color:"+lM(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,r,i){var o=this.el;if(null==e){o.innerHTML="";return}var a="";if(tu(i)&&"item"===n.get("trigger")&&!vh(n)&&(a=function(e,t,n){if(!tu(n)||"inside"===n)return"";var r,i,o=e.get("backgroundColor"),a=e.get("borderWidth");t=lM(t);var s=r="left"===(r=n)?"right":"right"===r?"left":"top"===r?"bottom":"top",l=Math.max(1.5*Math.round(a),6),u="",c=vm+":";e6(["left","right"],s)>-1?(u+="top:50%",c+="translateY(-50%) rotate("+(i="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(i="top"===s?225:45)+"deg)");var h=i*Math.PI/180,d=l+a,f=d*Math.abs(Math.cos(h))+d*Math.abs(Math.sin(h));u+=";"+s+":-"+Math.round(((f-Math.SQRT2*a)/2+Math.SQRT2*a-(f-d)/2)*100)/100+"px";var p=t+" solid "+a+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",u+";"+c+";","border-bottom:"+p,"border-right:"+p,"background-color:"+o+";"].join("")+'"></div>'}(n,r,i)),tu(e))o.innerHTML=e+a;else if(e){o.innerHTML="",ts(e)||(e=[e]);for(var s=0;s<e.length;s++)tg(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(vx(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style;te(vy(n[0],n[1]),function(e){r[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",eV.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(to(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}(),vw=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),vC(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,r,i){var o=this;td(e)&&uX(""),this.el&&this._zr.remove(this.el);var a=n.getModel("textStyle");this.el=new aB({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:cS(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),te(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),te(["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=v_(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 r=this._styleCoord;vC(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=vS(i.borderWidth||0),a=v_(i);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(to(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function vS(e){return Math.max(0,e)}function v_(e){var t=vS(e.shadowBlur||0),n=vS(e.shadowOffsetX||0),r=vS(e.shadowOffsetY||0);return{left:vS(t-n),right:vS(t+n),top:vS(t-r),bottom:vS(t+r)}}function vC(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var vM=new a_({shape:{x:-1,y:-1,width:2,height:2}}),vk=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.init=function(e,t){if(!eV.node&&t.getDom()){var n,r=e.getComponent("tooltip"),i=this._renderMode="auto"===(n=r.get("renderMode"))?eV.domSupported?"html":"richText":n||"html";this._tooltipContent="richText"===i?new vw(t):new vb(t,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!eV.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?dx(this,"_updatePosition",50,"fixRate"):db(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");mJ("itemTooltip",this._api,to(function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!eV.node&&n.getDom()){var i=vD(r,n);this._ticket="";var o=r.dataByCoordSys,a=function(e,t,n){var r,i=i1(e).queryOptionMap,o=i.keys()[0];if(o&&"series"!==o){var a=i3(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a&&(n.getViewOfComponentModel(a).group.traverse(function(t){var n=aF(t).tooltipConfig;if(n&&n.name===e.name)return r=t,!0}),r))return{componentMainType:o,componentIndex:a.componentIndex,el:r}}}(r,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:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y)vM.x=r.x,vM.y=r.y,vM.update(),aF(vM).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:vM},i);else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=m3(r,t),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,target:l.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(vD(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a){var s=t.getSeriesByIndex(i);if(s&&"axis"===vT([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n,r,i=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(i){if("legend"===aF(i).ssrType)return;this._lastDataByCoordSys=null,dJ(i,function(e){return null!=aF(e).dataIndex?(n=e,!0):null!=aF(e).tooltipConfig?(r=e,!0):void 0},!0),n?this._showSeriesItemTooltip(e,n,t):r?this._showComponentItemTooltip(e,r,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=to(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=vT([t.tooltipOption],r),a=this._renderMode,s=[],l=cg("section",{blocks:[],noHeader:!0}),u=[],c=new c_;te(e,function(e){te(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value;if(t&&null!=i){var o=m$(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),h=cg("section",{header:o,noHeader:!t_(o),sortBlocks:!0,blocks:[]});l.blocks.push(h),te(e.seriesDataIndices,function(l){var d=n.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,p=d.getDataParams(f);if(!(p.dataIndex<0)){p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=g1(t.axis,{value:i}),p.axisValueLabel=o,p.marker=c.makeTooltipMarker("item",lM(p.color),a);var g=u$(d.formatTooltip(f,!0,null)),m=g.frag;if(m){var v=vT([d],r).get("valueFormatter");h.blocks.push(v?e4({valueFormatter:v},m):m)}g.text&&u.push(g.text),s.push(p)}})}})}),l.blocks.reverse(),u.reverse();var h=t.position,d=cx(l,c,a,o.get("order"),n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"<br/>",p=u.join(f);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,h,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,p,s,Math.random()+"",i[0],i[1],h,null,c)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=aF(t),o=i.seriesIndex,a=r.getSeriesByIndex(o),s=i.dataModel||a,l=i.dataIndex,u=i.dataType,c=s.getData(u),h=this._renderMode,d=e.positionDefault,f=vT([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=f.get("trigger");if(null==p||"item"===p){var g=s.getDataParams(l,u),m=new c_;g.marker=m.makeTooltipMarker("item",lM(g.color),h);var v=u$(s.formatTooltip(l,!1,u)),y=f.get("order"),x=f.get("valueFormatter"),b=v.frag,w=b?cx(x?e4({valueFormatter:x},b):b,m,h,y,r.get("useUTC"),f.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(f,function(){this._showTooltipContent(f,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 r=aF(t),i=r.tooltipConfig.option||{};if(tu(i)){var o=i;i={content:o,formatter:o}}var a=[i],s=this._ecModel.getComponent(r.componentMainType,r.componentIndex);s&&a.push(s),a.push({formatter:i.content});var l=e.positionDefault,u=vT(a,this._tooltipModel,l?{position:l}:null),c=u.get("content"),h=Math.random()+"",d=new c_;this._showOrMove(u,function(){var n=e5(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,r,i,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([i,o],n,e.get("trigger"),e.get("borderColor")).color;if(c){if(tu(c)){var f=e.ecModel.get("useUTC"),p=ts(n)?n[0]:n,g=p&&p.axisType&&p.axisType.indexOf("time")>=0;h=c,g&&(h=lr(p.axisValue,h,f)),h=lC(h,n,!0)}else if(tl(c)){var m=to(function(t,r){t===this._ticket&&(u.setContent(r,l,e,d,a),this._updatePosition(e,a,i,o,u,n,s))},this);this._ticket=r,h=c(n,r,m)}else h=c}u.setContent(h,l,e,d,a),u.show(e,d),this._updatePosition(e,a,i,o,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||ts(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:ts(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=i.getSize(),c=e.get("align"),h=e.get("verticalAlign"),d=a&&a.getBoundingRect().clone();if(a&&d.applyTransform(a.transform),tl(t)&&(t=t([n,r],o,i.el,d,{viewSize:[s,l],contentSize:u.slice()})),ts(t))n=iM(t[0],s),r=iM(t[1],l);else if(td(t)){var f=t;f.width=u[0],f.height=u[1];var p=lI(f,{width:s,height:l});n=p.x,r=p.y,c=null,h=null}else if(tu(t)&&a){var g=function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+c/2-o/2;break;case"top":s=t.x+u/2-i/2,l=t.y-o-a;break;case"bottom":s=t.x+u/2-i/2,l=t.y+c+a;break;case"left":s=t.x-i-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],r=g[1]}else{var m,v,y,x,b,w,S,_,C,M,g=(m=n,v=r,y=i,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],r=g[1]}if(c&&(n-=vA(c)?u[0]/2:"right"===c?u[0]:0),h&&(r-=vA(h)?u[1]/2:"bottom"===h?u[1]:0),vh(e)){var k,T,D,A,I,O,P,R,g=(k=n,T=r,D=i,A=s,I=l,P=(O=D.getSize())[0],R=O[1],k=Math.min(k+P,A)-P,T=Math.min(T+R,I)-R,[k=Math.max(k,0),T=Math.max(T,0)]);n=g[0],r=g[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&te(n,function(n,o){var a=n.dataByAxis||[],s=(e[o]||{}).dataByAxis||[];(i=i&&a.length===s.length)&&te(a,function(e,n){var o=s[n]||{},a=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&a.length===l.length)&&te(a,function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&te(e.seriesDataIndices,function(e){var n=e.seriesIndex,o=t[n],a=r[n];o&&a&&a.data!==o.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!eV.node&&t.getDom()&&(db(this,"_updatePosition"),this._tooltipContent.dispose(),m2("itemTooltip",t))},t.type="tooltip",t}(cE);function vT(e,t,n){var r,i=t.ecModel;n?(r=new sQ(n,i,i),r=new sQ(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var a=e[o];a&&(a instanceof sQ&&(a=a.get("tooltip",!0)),tu(a)&&(a={formatter:a}),a&&(r=new sQ(a,r,i)))}return r}function vD(e,t){return e.dispatchAction||to(t.dispatchAction,t)}function vA(e){return"center"===e||"middle"===e}function vI(e){pr(vn),e.registerComponentModel(vc),e.registerComponentView(vk),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},tP),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},tP)}function vO(e,t,n){var r=eH.createCanvas(),i=t.getWidth(),o=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=o*n,r}var vP=function(e){function t(t,n,r){var i,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,r=r||rJ,"string"==typeof t?i=vO(t,n,r):td(t)&&(t=(i=t).id),o.id=t,o.dom=i;var a=i.style;return a&&(tI(i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return tL(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=vO("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,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new nC(0,0,0,0);function u(e){if(!(!e.isFinite()||e.isZero())){if(0===o.length){var t=new nC(0,0,0,0);t.copy(e),o.push(t)}else{for(var n=!1,r=1/0,i=0,u=0;u<o.length;++u){var c=o[u];if(c.intersect(e)){var h=new nC(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,f=c.width*c.height,p=l.width*l.height-d-f;p<r&&(r=p,i=u)}}if(s&&(o[i].union(e),n=!0),!n){var t=new nC(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,r,!0,!0),f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null;f&&u(f);var p=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null;p&&u(p)}}for(var c=this.__prevStartIndex;c<this.__prevEndIndex;++c){var h=t[c],d=h&&h.shouldBePainted(n,r,!0,!0);if(h&&(!d||!h.__zr)&&h.__isRendered){var f=h.getPrevPaintRect();f&&u(f)}}do{i=!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])?(i=!0,o[c].union(o[g]),o.splice(g,1)):g++;c++}}while(i);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.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 r=this.dom,i=this.ctx,o=r.width,a=r.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(r,0,0,o/u,a/u));var h=this.domBack;function d(e,n,r,o){if(i.clearRect(e,n,r,o),t&&"transparent"!==t){var a=void 0;tm(t)?(a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||fo(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o):null!=t.image&&(t.scaleX=t.scaleX||u,t.scaleY=t.scaleY||u,a=fg(i,t,{dirty:function(){c.setUnpainted(),c.painter.refresh()}})),i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()}s&&(i.save(),i.globalAlpha=l,i.drawImage(h,e,n,r,o),i.restore())}!n||s?d(0,0,o,a):n.length&&te(n,function(e){d(e.x*u,e.y*u,e.width*u,e.height*u)})},t}(tY),vR=function(){function e(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=e4({},n||{}),this.dpr=n.devicePixelRatio||rJ,this._singleCanvas=i,this.root=e,e.style&&(tI(e),e.innerHTML=""),this.storage=t;var o=this._zlevelList;this._prevDisplayList=[];var a=this._layers;if(i){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 vP(e,this,this.dpr);u.__builtin__=!0,u.initContext(),a[314159]=u,u.zlevel=314159,o.push(314159),this._domRoot=e}else{this._width=fs(e,0,n),this._height=fs(e,1,n);var c,h,d,f=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(f)}}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,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o=r[i],a=this._layers[o];if(!a.__builtin__&&a.refresh){var s=0===i?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,r=this._hoverlayer;if(r&&r.clear(),n){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<n;o++){var a=e[o];a.__inHover&&(r||(r=this._hoverlayer=this.getLayer(1e5)),t||(t=r.ctx).save(),fC(t,a,i,o===n-1))}t&&t.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(1e5)},e.prototype.paintOne=function(e,t){f_(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),o=i.finished,a=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),o)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;bk(function(){s._paintList(e,t,n,r)})}}},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(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],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)&&i.push(l)}for(var u=!0,c=!1,h=this,d=0;d<i.length;d++)!function(a){var s,l=i[a],d=l.ctx,f=o&&l.createRepaintRects(e,t,h._width,h._height),p=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,f);else if(p===l.__startIndex){var y=e[p];y.incremental&&y.notClear&&!n||l.clear(!1,v,f)}-1===p&&(console.error("For some unknown reason. drawIndex is -1"),p=l.__startIndex);var x=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(s=p;s<l.__endIndex;s++){var i=e[s];if(i.__inHover&&(c=!0),r._doPaintEl(i,l,o,t,n,s===l.__endIndex-1),g&&Date.now()-m>15)break}n.prevElClipPaths&&d.restore()};if(f){if(0===f.length)s=l.__endIndex;else for(var b=h.dpr,w=0;w<f.length;++w){var S=f[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 eV.wxa&&te(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:u,needsRefreshHover:c}},e.prototype._doPaintEl=function(e,t,n,r,i,o){var a=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(fC(a,e,i,o),e.setPrevPaintRect(s))}else fC(a,e,i,o)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new vP("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?e3(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&e3(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,r=this._zlevelList,i=r.length,o=this._domRoot,a=null,s=-1;if(!n[e]){if(t&&(t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)){if(i>0&&e>r[0]){for(s=0;s<i-1&&(!(r[s]<e)||!(r[s+1]>e));s++);a=n[r[s]]}if(r.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,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},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,r,i=1;i<e.length;i++){var o=e[i];if(o.zlevel!==e[i-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var a=null,s=0;for(r=0;r<e.length;r++){var o=e[r],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__||e2("ZLevel "+l+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,t(r),a=u),1&o.__dirty&&!o.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}t(r),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,te(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?e3(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];(i===e||i===e+.01)&&e3(this._layers[i],n[e],!0)}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(e6(n,e),1))},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=fs(i,0,r),t=fs(i,1,r),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 vP("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 r=t.dom.width,i=t.dom.height;this.eachLayer(function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):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++)fC(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}();function vE(e){e.registerPainter("canvas",vR)}var vL=n(6372);function vN(e){let{children:t,chartsTheme:n,enablePinning:r=!1}=e,[i,o]=(0,g.useState)(null),a=(0,g.useMemo)(()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:i,setLastTooltipPinnedCoords:o}),[n,r,i,o]);return(0,p.jsx)(vB.Provider,{value:a,children:t})}let vB=(0,g.createContext)(void 0);function vF(){let e=(0,g.useContext)(vB);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function vz(){return vF().chartsTheme}var vV=n(6141),vZ=n.n(vV),vj=n(6726),vH=n.n(vj),vW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return eF(t,e),t.prototype.getInitialData=function(e,t){return pj(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}(ck),v$=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o.updateData(t,n,r,i),o}return eF(t,e),t.prototype._createSymbol=function(e,t,n,r,i){this.removeAll();var o=ft(e,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=vG,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(){st(this.childAt(0))},t.prototype.downplay=function(){sn(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,r,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=o!==this._symbolType,u=i&&i.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):sw(h,d,a,n),sT(h)}if(this._updateCommon(e,n,s,r,i),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,sS(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,l,u,c,h,d,f,p=this.childAt(0),g=e.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,h=r.labelStatesModels,d=r.hoverScale,f=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var m=r&&r.itemModel?r.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=sP(m),d=v.getShallow("scale"),f=m.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");p.attr("rotation",(y||0)*Math.PI/180||0);var x=fr(e.getItemVisual(t,"symbolOffset"),n);x&&(p.x=x[0],p.y=x[1]),f&&p.attr("cursor",f);var b=e.getItemVisual(t,"style"),w=b.fill;if(p instanceof ag){var S=p.style;p.useStyle(e4({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else p.__isEmptyBrush?p.useStyle(e4({},b)):p.useStyle(b),p.style.decal=null,p.setColor(w,i&&i.symbolInnerColor),p.style.strokeNoScale=!0;var _=e.getItemVisual(t,"liftZ"),C=this._z2;null!=_?null==C&&(this._z2=p.z2,p.z2+=_):null!=C&&(p.z2=C,this._z2=null);var M=i&&i.useNameLabel;sO(p,h,{labelFetcher:g,labelDataIndex:t,defaultText:function(t){return M?e.getName(t):pK(e,t)},inheritColor:w,defaultOpacity:b.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var k=p.ensureState("emphasis");k.style=o,p.ensureState("select").style=s,p.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),sc(this,l,u,c)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=aF(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&sC(a,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();sC(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},t.getSymbolSize=function(e,t){return fn(e.getItemVisual(t,"symbolSize"))},t}(ix);function vG(e,t){this.parent.drift(e,t)}function vU(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function vq(e){return null==e||td(e)||(e={isIgnore:e}),e||{}}function vY(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:sP(t),cursorStyle:t.get("cursor")}}var vX=function(){function e(e){this.group=new ix,this._SymbolCtor=e||v$}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=vq(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=vY(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=u(r);if(vU(e,i,r,t)){var a=new o(e,r,s,l);a.setPosition(i),e.setItemGraphicEl(r,a),n.add(a)}}).update(function(c,h){var d=i.getItemGraphicEl(h),f=u(c);if(!vU(e,f,c,t)){n.remove(d);return}var p=e.getItemVisual(c,"symbol")||"circle",g=d&&d.getSymbolType&&d.getSymbolType();if(!d||g&&g!==p)n.remove(d),(d=new o(e,c,s,l)).setPosition(f);else{d.updateData(e,c,s,l);var m={x:f[0],y:f[1]};a?d.attr(m):sw(d,m,r)}n.add(d),e.setItemGraphicEl(c,d)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=u,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=vY(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=vq(n);for(var i=e.start;i<e.end;i++){var o=t.getItemLayout(i);if(vU(t,o,i,n)){var a=new this._SymbolCtor(t,i,this._seriesScope);a.traverse(r),a.setPosition(o),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}}},e.prototype.eachRendered=function(e){da(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}(),vK=function(){},vQ=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return eF(t,e),t.prototype.getDefaultShape=function(){return new vK},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,i=t.size,o=this.symbolProxy,a=o.shape,s=e.getContext?e.getContext():e,l=s&&i[0]<4,u=this.softClipShape;if(l){this._ctx=s;return}for(this._ctx=null,n=this._off;n<r.length;){var c=r[n++],h=r[n++];!(isNaN(c)||isNaN(h))&&(!u||u.contain(c,h))&&(a.x=c-i[0]/2,a.y=h-i[1]/2,a.width=i[0],a.height=i[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,r=t.size,i=this._ctx,o=this.softClipShape;if(i){for(e=this._off;e<n.length;){var a=n[e++],s=n[e++];!(isNaN(a)||isNaN(s))&&(!o||o.contain(a,s))&&i.fillRect(a-r[0]/2,s-r[1]/2,r[0],r[1])}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,o=Math.max(i[0],4),a=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var l=2*s,u=r[l]-o/2,c=r[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),r=this.getBoundingRect();return(e=n[0],t=n[1],r.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,r=t.size,i=r[0],o=r[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 nC(a-i/2,s-o/2,l-a+i,u-s+o)}return e},t}(au),vJ=function(){function e(){this.group=new ix}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,r=8*e.startIndex;t=new Float32Array(t.buffer,r,n)}e.setShape("points",t),e.reset()})},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n){var r=this._newAdded[0],i=t.getLayout("points"),o=r&&r.shape.points;if(o&&o.length<2e4){var a=o.length,s=new Float32Array(a+i.length);s.set(o),s.set(i,a),r.endIndex=e.end,r.setShape({points:s})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=!0,l.setShape({points:i}),this._setCommon(l,t,n)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new vQ({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=ft(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=t.getVisual("style"),s=a&&a.fill;s&&e.setColor(s);var l=aF(e);l.seriesIndex=r.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}();function v0(e,t){return{seriesType:e,plan:cL(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(r){var a=tt(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=a.length,l=n.getCalculationInfo("stackResultDimension");pc(n,a[0])&&(a[0]=l),pc(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,i=o&&pp(n*s),a=[],l=[],d=e.start,f=0;d<e.end;d++){var p=void 0;if(1===s){var g=u.get(c,d);p=r.dataToPoint(g,null,l)}else a[0]=u.get(c,d),a[1]=u.get(h,d),p=r.dataToPoint(a,null,l);o?(i[f++]=p[0],i[f++]=p[1]):t.setItemLayout(d,p.slice())}o&&t.setLayout("points",i)}}}}}}var v1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),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 r=e.getData();if(this.group.dirty(),!this._finished||r.count()>1e4)return{update:!0};var i=v0("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(r)},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,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new vJ:new vX,this._isLargeDraw=r,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}(du),v2={color:"fill",borderColor:"stroke"},v5={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},v3=iQ(),v4=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(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 pj(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=v3(r).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(ck);function v8(e,t){return t=t||[0,0],tt(["x","y"],function(n,r){var i=this.getAxis(n),o=t[r],a=e[r]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a))},this)}function v6(e,t){return t=t||[0,0],tt([0,1],function(n){var r=t[n],i=e[n]/2,o=[],a=[];return o[n]=r-i,a[n]=r+i,o[1-n]=a[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])},this)}function v9(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function v7(e,t){return t=t||[0,0],tt(["Radius","Angle"],function(n,r){var i=this["get"+n+"Axis"](),o=t[r],a=e[r]/2,s="category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(o-a)-i.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s},this)}function ye(e,t){t&&(t.font=t.textFont||t.font,tO(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),tO(t,"textAlign")&&(e.align=t.textAlign),tO(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),tO(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),tO(t,"textWidth")&&(e.width=t.textWidth),tO(t,"textHeight")&&(e.height=t.textHeight),tO(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),tO(t,"textPadding")&&(e.padding=t.textPadding),tO(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),tO(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),tO(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),tO(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),tO(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),tO(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),tO(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function yt(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 r=e.textPosition.indexOf("inside")>=0,i=e.fill||"#000";yn(e,t);var o=null==e.textFill;return r?o&&(e.textFill=n.insideFill||"#fff",!e.textStroke&&n.insideStroke&&(e.textStroke=n.insideStroke),e.textStroke||(e.textStroke=i),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,te(t.rich,function(e){yn(e,e)}),e}function yn(e,t){t&&(tO(t,"fill")&&(e.textFill=t.fill),tO(t,"stroke")&&(e.textStroke=t.fill),tO(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),tO(t,"font")&&(e.font=t.font),tO(t,"fontStyle")&&(e.fontStyle=t.fontStyle),tO(t,"fontWeight")&&(e.fontWeight=t.fontWeight),tO(t,"fontSize")&&(e.fontSize=t.fontSize),tO(t,"fontFamily")&&(e.fontFamily=t.fontFamily),tO(t,"align")&&(e.textAlign=t.align),tO(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),tO(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),tO(t,"width")&&(e.textWidth=t.width),tO(t,"height")&&(e.textHeight=t.height),tO(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),tO(t,"padding")&&(e.textPadding=t.padding),tO(t,"borderColor")&&(e.textBorderColor=t.borderColor),tO(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),tO(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),tO(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),tO(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),tO(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),tO(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),tO(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),tO(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),tO(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),tO(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var yr={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},yi=ti(yr);tn(r9,function(e,t){return e[t]=1,e},{}),r9.join(", ");var yo=["","style","shape","extra"],ya=iQ();function ys(e,t,n,r,i){var o=e+"Animation",a=sx(e,r,i)||{},s=ya(t).userDuring;return a.duration>0&&(a.during=s?to(yd,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),e4(a,n[o]),a}function yl(e,t,n,r){if(e){var i=e.parent,o=ya(e).leaveToProps;if(o){var a=ys("update",e,t,n,0);a.done=function(){i.remove(e),r&&r()},e.animateTo(o,a)}else i.remove(e),r&&r()}}function yu(e){return"all"===e}var yc={},yh={setTransform:function(e,t){return yc.el[e]=t,this},getTransform:function(e){return yc.el[e]},setShape:function(e,t){var n=yc.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=yc.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=yc.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=yc.el.style;if(t)return t[e]},setExtra:function(e,t){return(yc.el.extra||(yc.el.extra={}))[e]=t,this},getExtra:function(e){var t=yc.el.extra;if(t)return t[e]}};function yd(){var e=this.el;if(e){var t=ya(e).userDuring,n=this.userDuring;if(t!==n){this.el=this.userDuring=null;return}yc.el=e,n(yh)}}function yf(e,t,n,r){var i,o=n[e];if(o){var a=t[e];if(a){var s=n.transition,l=o.transition;if(l){if(i||(i=r[e]={}),yu(l))e4(i,a);else for(var u=ij(l),c=0;c<u.length;c++){var h=u[c],d=a[h];i[h]=d}}else if(yu(s)||e6(s,e)>=0){i||(i=r[e]={});for(var f=ti(a),c=0;c<f.length;c++){var p,g,h=f[c],d=a[h];p=o[h],g=d,(e7(p)?p!==g:null!=p&&isFinite(p))&&(i[h]=d)}}}}}function yp(e,t,n){var r=t[e];if(r)for(var i=n[e]={},o=ti(r),a=0;a<o.length;a++){var s=o[a];i[s]=rA(r[s])}}var yg=iQ(),ym=["percent","easing","shape","style","extra"],yv="emphasis",yy="normal",yx="blur",yb="select",yw=[yy,yv,yx,yb],yS={normal:["itemStyle"],emphasis:[yv,"itemStyle"],blur:[yx,"itemStyle"],select:[yb,"itemStyle"]},y_={normal:["label"],emphasis:[yv,"label"],blur:[yx,"label"],select:[yb,"label"]},yC=["x","y"],yM={normal:{},emphasis:{},blur:{},select:{}},yk={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:to(v8,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:to(v6,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:to(v9,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),o=n.dataToAngle(r[1]),a=e.coordToPoint([i,o]);return a.push(i,o*Math.PI/180),a},size:to(v7,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 yT(e){return e instanceof au}function yD(e){return e instanceof oT}var yA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,o=e.getData(),a=this.group,s=yR(e,o,t,n);i||a.removeAll(),o.diff(i).add(function(t){yE(n,null,t,s(t,r),e,a,o)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&yl(n,v3(n).option,e)}).update(function(t,l){yE(n,i.getItemGraphicEl(l),t,s(t,r),e,a,o)}).execute();var l=e.get("clip",!0)?pU(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,r,i){var o=t.getData(),a=yR(t,o,n,r),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=yE(null,null,u,a(u,i),t,this.group,o);c&&(c.traverse(l),s.push(c))}},t.prototype.eachRendered=function(e){da(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(null==i||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type="custom",t}(du);function yI(e){var t,n=e.type;if("path"===n){var r=e.shape,i=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=yH(r);v3(t=hX(o,null,i,r.layout||"center")).customPathData=o}else if("image"===n)v3(t=new ag({})).customImagePath=e.style.image;else if("text"===n)t=new aB({});else if("group"===n)t=new ix;else if("compoundPath"===n)throw Error('"compoundPath" is not supported yet.');else{var a=hY(n);a||uX(""),t=new a}return v3(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function yO(e,t,n,r,i,o,a){t.stopAnimation("keyframe"),t.attr(yg(t));var s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&null==r.transition&&(r.transition=yC);var l=r&&r.style;if(l){"text"===t.type&&(tO(l,"textFill")&&(l.fill=l.textFill),tO(l,"textStroke")&&(l.stroke=l.textStroke));var u=void 0,c=yT(t)?l.decal:null;e&&c&&(c.dirty=!0,u=fD(c,e)),l.__decalPattern=u}if(yD(t)&&l){var u=l.__decalPattern;u&&(l.decal=u)}!function(e,t,n,r){var i,o,a=(r=r||{}).dataIndex,s=r.isInit,l=r.clearStyle,u=n.isAnimationEnabled(),c=ya(e),h=t.style;c.userDuring=t.during;var d={},f={};if(function(e,t,n){for(var r=0;r<yi.length;r++){var i=yi[r],o=yr[i],a=t[i];a&&(n[o[0]]=a[0],n[o[1]]=a[1])}for(var r=0;r<r9.length;r++){var s=r9[r];null!=t[s]&&(n[s]=t[s])}}(0,t,f),yp("shape",t,f),yp("extra",t,f),!s&&u&&(function(e,t,n){for(var r=t.transition,i=yu(r)?r9:ij(r||[]),o=0;o<i.length;o++){var a=i[o];if("style"!==a&&"shape"!==a&&"extra"!==a){var s=e[a];n[a]=s}}}(e,t,d),yf("shape",e,t,d),yf("extra",e,t,d),function(e,t,n,r){if(n){var i,o=e.style;if(o){var a=n.transition,s=t.transition;if(a&&!yu(a)){var l=ij(a);i||(i=r.style={});for(var u=0;u<l.length;u++){var c=l[u],h=o[c];i[c]=h}}else if(e.getAnimationStyleProps&&(yu(s)||yu(a)||e6(s,"style")>=0)){var d=e.getAnimationStyleProps(),f=d?d.style:null;if(f){i||(i=r.style={});for(var p=ti(n),u=0;u<p.length;u++){var c=p[u];if(f[c]){var h=o[c];i[c]=h}}}}}}}(e,t,h,d)),f.style=h,function(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,o=0;o<i.length;o++){var a=i[o];"style"===a.targetName&&a.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}(e,f,l),i=e,tO(o=t,"silent")&&(i.silent=o.silent),tO(o,"ignore")&&(i.ignore=o.ignore),i instanceof oT&&tO(o,"invisible")&&(i.invisible=o.invisible),i instanceof au&&tO(o,"autoBatch")&&(i.autoBatch=o.autoBatch),u){if(s){var p={};te(yo,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(p[e]=p[e]||{}),e4(e?p[e]:p,n.enterFrom))});var g=ys("enter",e,t,n,a);g.duration>0&&e.animateFrom(p,g)}else(function(e,t,n,r,i){if(i){var o=ys("update",e,t,r,n);o.duration>0&&e.animateFrom(i,o)}})(e,t,a||0,n,d)}(function(e,t){for(var n=ya(e).leaveToProps,r=0;r<yo.length;r++){var i=yo[r],o=i?t[i]:t;o&&o.leaveTo&&(n||(n=ya(e).leaveToProps={}),i&&(n[i]=n[i]||{}),e4(i?n[i]:n,o.leaveTo))}})(e,t),h?e.dirty():e.markRedraw()}(t,r,o,{dataIndex:n,isInit:a,clearStyle:!0}),function e(t,n,r){if(r.isAnimationEnabled()&&n){if(ts(n)){te(n,function(n){e(t,n,r)});return}var i=n.keyframes,o=n.duration;if(r&&null==o){var a=sx("enter",r,0);o=a&&a.duration}if(i&&o){var s=yg(t);te(yo,function(e){var r;if(!e||t[e])i.sort(function(e,t){return e.percent-t.percent}),te(i,function(i){var a=t.animators,l=e?i[e]:i;if(l){var u=ti(l);if(e||(u=tr(u,function(e){return 0>e6(ym,e)})),u.length){r||((r=t.animate(e,n.loop,!0)).scope="keyframe");for(var c=0;c<a.length;c++)a[c]!==r&&a[c].targetName===r.targetName&&a[c].stopTracks(u);e&&(s[e]=s[e]||{});var h=e?s[e]:s;te(u,function(n){h[n]=((e?t[e]:t)||{})[n]}),r.whenWithKeys(o*i.percent,l,u,i.easing)}}}),r&&r.delay(n.delay||0).duration(o).start(n.easing)})}}}(t,r.keyframeAnimation,o)}function yP(e,t,n,r,i){var o=t.isGroup?null:t,a=i&&i[e].cfg;if(o){var s=o.ensureState(e);if(!1===r){var l=o.getState(e);l&&(l.style=null)}else s.style=r||null;a&&(s.textConfig=a),a9(o)}}function yR(e,t,n,r){var i,o,a,s,l=e.get("renderItem"),u=e.coordinateSystem,c={};u&&(c=u.prepareCustoms?u.prepareCustoms(u):yk[u.type](u));for(var h=e8({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(e,n){return null==n&&(n=a),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,r){null==r&&(r=a);var i=t.getItemVisual(r,"style"),o=i&&i.fill,s=i&&i.opacity,l=b(r,yy).getItemStyle();null!=o&&(l.fill=o),null!=s&&(l.opacity=s);var u={inheritColor:tu(o)?o:"#000"},c=w(r,yy),h=sR(c,null,u,!1,!0);h.text=c.getShallow("show")?ty(e.getFormattedLabel(r,yy),pK(t,r)):null;var d=sE(c,u,!1);return _(n,l),l=yt(l,h,d),n&&S(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=a),e=e||0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var o=t.get(r.name,n),s=r&&r.ordinalMeta;return s?s.categories[o]:o},styleEmphasis:function(n,r){null==r&&(r=a);var i=b(r,yv).getItemStyle(),o=w(r,yv),s=sR(o,null,null,!0,!0);s.text=o.getShallow("show")?tx(e.getFormattedLabel(r,yv),e.getFormattedLabel(r,yy),pK(t,r)):null;var l=sE(o,null,!0);return _(n,i),i=yt(i,s,l),n&&S(i,n),i.legacy=!0,i},visual:function(e,n){if(null==n&&(n=a),tO(v2,e)){var r=t.getItemVisual(n,"style");return r?r[v2[e]]:null}if(tO(v5,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===u.type)return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<e.count;o++)t.push(e8({bandWidth:i,axisKey:r,stackId:pg+o},e));for(var a=pb(t),s=[],o=0;o<e.count;o++){var l=a[r][pg+o];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}(e8({axis:u.getBaseAxis()},e))},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return sz(e,n)}},c.api||{}),d={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:c.coordSys,dataInsideLength:t.count(),encode:(i=e.getData(),o={},te(i.dimensions,function(e){var t=i.getDimensionInfo(e);if(!t.isExtraCoord){var n=t.coordDim;(o[n]=o[n]||[])[t.coordDimIndex]=i.getDimensionIndex(e)}}),o)},f={},p={},g={},m={},v=0;v<yw.length;v++){var y=yw[v];g[y]=e.getModel(yS[y]),m[y]=e.getModel(y_[y])}function x(e){return e===a?s||(s=t.getItemModel(e)):t.getItemModel(e)}function b(e,n){return t.hasItemOption?e===a?f[n]||(f[n]=x(e).getModel(yS[n])):x(e).getModel(yS[n]):g[n]}function w(e,n){return t.hasItemOption?e===a?p[n]||(p[n]=x(e).getModel(y_[n])):x(e).getModel(y_[n]):m[n]}return function(e,n){return a=e,s=null,f={},p={},l&&l(e8({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},d),h)};function S(e,t){for(var n in t)tO(t,n)&&(e[n]=t[n])}function _(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function yE(e,t,n,r,i,o,a){if(!r){o.remove(t);return}var s=yL(e,t,n,r,i,o);return s&&a.setItemGraphicEl(n,s),s&&sc(s,r.focus,r.blurScope,r.emphasisDisabled),s}function yL(e,t,n,r,i,o){var a,s=-1,l=t;t&&yN(t,r,i)&&(s=e6(o.childrenRef(),t),t=null);var u=!t,c=t;c?c.clearStates():(c=yI(r),l&&((a=c).copyTransform(l),yD(a)&&yD(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,yT(a)&&yT(l)&&a.setShape(l.shape)))),!1===r.morph?c.disableMorphing=!0:c.disableMorphing&&(c.disableMorphing=!1),yM.normal.cfg=yM.normal.conOpt=yM.emphasis.cfg=yM.emphasis.conOpt=yM.blur.cfg=yM.blur.conOpt=yM.select.cfg=yM.select.conOpt=null,yM.isLegacy=!1,function(e,t,n,r,i,o){if(!e.isGroup){yB(n,null,o),yB(n,yv,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=yI(a),e.setTextContent(c)),yO(null,c,t,a,null,r,i);for(var h=a&&a.style,d=0;d<yw.length;d++){var f=yw[d];if(f!==yy){var p=o[f].conOpt;yP(f,c,p,yz(a,p,f),null)}}h?c.dirty():c.markRedraw()}}}}(c,n,r,i,u,yM),function(e,t,n,r,i){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var a=e.getClipPath();a&&yN(a,o,r)&&(a=null),!a&&(a=yI(o),e.setClipPath(a)),yO(null,a,t,o,null,r,i)}}(c,n,r,i,u),yO(e,c,n,r,yM,i,u),tO(r,"info")&&(v3(c).info=r.info);for(var h=0;h<yw.length;h++){var d=yw[h];if(d!==yy){var f=yF(r,d),p=yz(r,f,d);yP(d,c,f,p,yM)}}return!function(e,t,n){if(!e.isGroup){var r=n.currentZ,i=n.currentZLevel;e.z=r,e.zlevel=i;var o=t.z2;null!=o&&(e.z2=o||0);for(var a=0;a<yw.length;a++)(function(e,t,n){var r=n===yy,i=r?t:yF(t,n),o=i?i.z2:null;null!=o&&((r?e:e.ensureState(n)).z2=o||0)})(e,t,yw[a])}}(c,r,i),"group"===r.type&&function(e,t,n,r,i){var o=r.children,a=o?o.length:0,s=r.$mergeChildren,l="byName"===s||r.diffChildrenByName,u=!1===s;if(a||l||u){if(l){(function(e){new pA(e.oldChildren,e.newChildren,yV,yV,e).add(yZ).update(yZ).remove(yj).execute()})({api:e,oldChildren:t.children()||[],newChildren:o||[],dataIndex:n,seriesModel:i,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),yL(e,d,n,h,i,t)):d.ignore=!0}for(var f=t.childCount()-1;f>=c;f--){var p,g,m,v=t.childAt(f);p=t,g=v,m=i,g&&yl(g,v3(p).option,m)}}}(e,c,n,r,i),s>=0?o.replaceAt(c,s):o.add(c),c}function yN(e,t,n){var r,i=v3(e),o=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&(r=a)&&(tO(r,"pathData")||tO(r,"d"))&&yH(a)!==i.customPathData||"image"===o&&tO(s,"image")&&s.image!==i.customImagePath}function yB(e,t,n){var r,i,o=t?yF(e,t):e,a=t?yz(e,o,yv):e.style,s=e.type,l=o?o.textConfig:null,u=e.textContent,c=u?t?yF(u,t):u:null;if(a&&(n.isLegacy||(r=!!l,i=!!c,a&&(a.legacy||!1!==a.legacy&&!r&&!i&&"tspan"!==s&&("text"===s||tO(a,"text")))))){n.isLegacy=!0;var h=function(e,t,n){var r,i,o;if("text"===t)o=e;else{o={},tO(e,"text")&&(o.text=e.text),tO(e,"rich")&&(o.rich=e.rich),tO(e,"textFill")&&(o.fill=e.textFill),tO(e,"textStroke")&&(o.stroke=e.textStroke),tO(e,"fontFamily")&&(o.fontFamily=e.fontFamily),tO(e,"fontSize")&&(o.fontSize=e.fontSize),tO(e,"fontStyle")&&(o.fontStyle=e.fontStyle),tO(e,"fontWeight")&&(o.fontWeight=e.fontWeight),i={type:"text",style:o,silent:!0},r={};var a=tO(e,"textPosition");n?r.position=a?e.textPosition:"inside":a&&(r.position=e.textPosition),tO(e,"textPosition")&&(r.position=e.textPosition),tO(e,"textOffset")&&(r.offset=e.textOffset),tO(e,"textRotation")&&(r.rotation=e.textRotation),tO(e,"textDistance")&&(r.distance=e.textDistance)}return ye(o,e),te(o.rich,function(e){ye(e,e)}),{textConfig:r,textContent:i}}(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 f=t?n[t]:n.normal;f.cfg=l,f.conOpt=c}function yF(e,t){return t?e?e[t]:null:e}function yz(e,t,n){var r=t&&t.style;return null==r&&n===yv&&e&&(r=e.styleEmphasis),r}function yV(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function yZ(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;yL(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function yj(e){var t=this.context,n=t.oldChildren[e];n&&yl(n,v3(n).option,t.seriesModel)}function yH(e){return e&&(e.pathData||e.d)}var yW=["x","y","radius","angle","single"],y$=["cartesian2d","polar","singleAxis"];function yG(e){return e+"Axis"}function yU(e){var t=e.ecModel,n={infoList:[],infoMap:tD()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(yG(e),r);if(i){var o=i.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(i)}}}),n}var yq=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}(),yY=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 eF(t,e),t.prototype.init=function(e,t,n){var r=yX(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=yX(e);e3(this.option,e,!0),e3(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;te([["start","startValue"],["end","endValue"]],function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=tD();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 te(yW,function(n){var r=this.getReferringComponents(yG(n),i5);if(r.specified){t=!0;var i=new yq;te(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0,i="vertical"===t?"y":"x",o=n.findComponents({mainType:i+"Axis"});if(a(o,i),r){var o=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});a(o,"single")}function a(t,n){var i=t[0];if(i){var o=new yq;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var a=i.getReferringComponents("grid",i2).models[0];a&&te(t,function(e){i.componentIndex!==e.componentIndex&&a===e.getReferringComponents("grid",i2).models[0]&&o.add(e.componentIndex)})}}}r&&te(yW,function(t){if(r){var i=n.findComponents({mainType:yG(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new yq;o.add(i[0].componentIndex),e.set(t,o),r=!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");te([["start","startValue"],["end","endValue"]],function(r,i){var o=null!=e[r[0]],a=null!=e[r[1]];o&&!a?t[i]="percent":!o&&a?t[i]="value":n?t[i]=n[i]:o&&(t[i]="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(yG(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){te(n.indexList,function(n){e.call(t,r,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(yG(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;te([["start","startValue"],["end","endValue"]],function(r){(null!=e[r[0]]||null!=e[r[1]])&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;te(["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(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),a=0;a<o.indexList.length;a++){var s=this.getAxisProxy(i,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}(lN);function yX(e){var t={};return te(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var yK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.type="dataZoom.inside",t.defaultOption=s1(yY.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(yY),yQ=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(cE);function yJ(e,t,n,r,i,o){e=e||0;var a,s=n[1]-n[0];if(null!=i&&(i=y1(i,[0,s])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var l=Math.abs(t[1]-t[0]);l=y1(l,[0,s]),i=o=y1(l,[i,o]),r=0}t[0]=y1(t[0],n),t[1]=y1(t[1],n);var u=y0(t,r);t[r]+=e;var c=i||0,h=n.slice();return u.sign<0?h[0]+=c:h[1]-=c,t[r]=y1(t[r],h),a=y0(t,r),null!=i&&(a.sign!==u.sign||a.span<i)&&(t[1-r]=t[r]+u.sign*i),a=y0(t,r),null!=o&&a.span>o&&(t[1-r]=t[r]+a.sign*o),t}function y0(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 y1(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var y2="\0_ec_interaction_mutex";function y5(e){return e[y2]||(e[y2]={})}f6({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},tP);var y3=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=to(n._mousedownHandler,n),i=to(n._mousemoveHandler,n),o=to(n._mouseupHandler,n),a=to(n._mousewheelHandler,n),s=to(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=e8(e5(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==e&&(e=!0),(!0===e||"move"===e||"pan"===e)&&(t.on("mousedown",r),t.on("mousemove",i),t.on("mouseup",o)),(!0===e||"scale"===e||"zoom"===e)&&(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",i),t.off("mouseup",o),t.off("mousewheel",a),t.off("pinch",s)},n}return eF(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(!no(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(this._dragging&&y6("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!y5(this._zr).globalPan){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&ni(e.event),y8(this,"pan","moveOnMouseMove",e,{dx:t-r,dy:n-i,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){no(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=y6("zoomOnMouseWheel",e,this._opt),n=y6("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1;y4(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);y4(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!y5(this._zr).globalPan){var t=e.pinchScale>1?1.1:1/1.1;y4(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(tY);function y4(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(ni(r.event),y8(e,t,n,r,i))}function y8(e,t,n,r,i){i.isAvailableBehavior=to(y6,null,n,r),e.trigger(t,i)}function y6(e,t,n){var r=n[e];return!e||r&&(!tu(r)||t.event[r+"Key"])}var y9=iQ();function y7(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function xe(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function xt(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}var xn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return eF(t,e),t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),function(e,t,n){y9(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}(r,t,{pan:to(xr.pan,this),zoom:to(xr.zoom,this),scrollMove:to(xr.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){(function(e,t){for(var n=y9(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],a=n.get(o),s=a.dataZoomInfoMap;if(s){var l=t.uid;s.get(l)&&(s.removeKey(l),s.keys().length||y7(n,a))}}})(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(yQ),xr={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),a=e.axisModels[0];if(a){var s=xo[t](null,[r.originX,r.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/r.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(yJ(0,o,[0,100],0,c.minSpan,c.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}},pan:xi(function(e,t,n,r,i,o){var a=xo[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength}),scrollMove:xi(function(e,t,n,r,i,o){return xo[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta})};function xi(e){return function(t,n,r,i){var o=this.range,a=o.slice(),s=t.axisModels[0];if(s&&(yJ(e(a,s,t,n,r,i),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]))return a}}var xo={grid:function(e,t,n,r,i){var o=n.axis,a={},s=i.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,r,i){var o=n.axis,a={},s=i.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,r,i){var o=n.axis,a=i.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}},xa=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,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(e6(y$,t.get("coordinateSystem"))>=0){var n=yG(this._dimName),r=t.getReferringComponents(n,i2).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return e5(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];te(["start","end"],function(l,u){var c=e[l],h=e[l+"Value"];"percent"===i[u]?(null==c&&(c=o[u]),h=r.parse(iC(c,o,n))):(t=!0,c=iC(h=null==h?n[u]:r.parse(h),n,o)),s[u]=null==h||isNaN(h)?n[u]:h,a[u]=null==c||isNaN(c)?o[u]:c}),iT(s),iT(a);var l=this._minMaxSpan;function u(e,t,n,i,o){var a=o?"Span":"ValueSpan";yJ(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=iC(e[s],n,i,!0),o&&(t[s]=r.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,r,i,o,a=this.getTargetSeriesModels();this._dataExtent=(t=this,n=this._dimName,r=[1/0,-1/0],te(a,function(e){var t;(t=e.getData())&&te(g3(t,n),function(e){var n=t.getApproximateExtent(e);n[0]<r[0]&&(r[0]=n[0]),n[1]>r[1]&&(r[1]=n[1])})}),[(o=gX((i=t.getAxisModel()).axis.scale,i,r).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,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._valueWindow;"none"!==i&&te(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var a=t.getStore(),s=tt(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,l=0;l<r.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&&(i=!0),h&&(t=!0),d&&(n=!0)}return i&&t&&n})}else te(r,function(n){if("empty"===i)e.setData(t=t.map(n,function(e){var t;return(t=e)>=o[0]&&t<=o[1]?e:NaN}));else{var r={};r[n]=o,t.selectRange(r)}});te(r,function(e){t.setApproximateExtent(o,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;te(["min","max"],function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=iC(n[0]+o,n,[0,100],!0):null!=i&&(o=iC(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=iA(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;0!==t[0]&&i.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&i.setDeterminedMinMax("max",+n[1].toFixed(r)),i.freeze()}},e}();let xs={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,i){var o=e.getComponent(yG(r),i);t(r,i,o,n)})})}t(function(e,t,n,r){n.__dzAxisProxy=null});var n=[];t(function(t,r,i,o){i.__dzAxisProxy||(i.__dzAxisProxy=new xa(t,r,o,e),n.push(i.__dzAxisProxy))});var r=tD();return te(n,function(e){te(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}})}};var xl=!1;function xu(e){!xl&&(xl=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,xs),function(e){e.registerAction("dataZoom",function(e,t){te(function(e,t){var n,r=tD(),i=[],o=tD();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 i=r.get(e);i&&i[n]&&(t=!0)}),t)&&(s(e),n=!0)}function s(e){o.set(e.uid,!0),i.push(e),function(e){e.eachTargetAxis(function(e,t){(r.get(e)||r.set(e,[]))[t]=!0})}(e)}return i}(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 xc(e){xu(e),e.registerComponentModel(yK),e.registerComponentView(xn),function(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=y9(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=tD());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){te(yU(e).infoList,function(n){var i,o,a,s=n.model.uid,l=r.get(s)||r.set(s,(a=(o={model:i=n.model,containsPoint:ta(xt,i),dispatchAction:ta(xe,t),dataZoomInfoMap:null,controller:null}).controller=new y3(t.getZr()),te(["pan","zoom","scrollMove"],function(e){a.on(e,function(t){var n=[];o.dataZoomInfoMap.each(function(r){if(t.isAvailableBehavior(r.model.option)){var i=(r.getRange||{})[e],a=i&&i(r.dzReferCoordSysInfo,o.model.mainType,o.controller,t);!r.model.get("disabled",!0)&&a&&n.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}}),n.length&&o.dispatchAction(n)})}),o));(l.dataZoomInfoMap||(l.dataZoomInfoMap=tD())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var t,n,i,o,a,s=e.controller,l=e.dataZoomInfoMap;if(l){var u=l.keys()[0];null!=u&&(a=l.get(u))}if(!a){y7(r,e);return}var c=(n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,l.each(function(e){var r=e.model,a=!r.get("disabled",!0)&&(!r.get("zoomLock",!0)||"move");i[n+a]>i[n+t]&&(t=a),o=o&&r.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}});s.enable(c.controlType,c.opt),s.setPointerChecker(e.containsPoint),dx(e,"dispatchAction",a.model.get("throttle",!0),"fixRate")})})}(e)}var xh=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=s1(yY.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}(yY),xd="horizontal",xf="vertical",xp=["line","bar","candlestick","scatter"],xg={easing:"cubicOut",duration:100,delay:0},xm=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return eF(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=to(this._onBrush,this),this._onBrushEnd=to(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),dx(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}i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){db(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 ix;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"),r=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},o=this._orient===xd?{right:i.width-r.x-r.width,top:i.height-30-7-7*!!n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=lE(e.option);te(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=o[e])});var s=lI(a,i);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===xf&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==xd||i?n===xd&&i?{scaleY:a?1:-1,scaleX:-1}:n!==xf||i?{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,r=e.get("brushSelect");n.add(new a_({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new a_({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:to(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),a=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u,c=i.getDataExtent(a),h=(c[1]-c[0])*.3;c=[c[0]-h,c[1]+h];var d=[0,t[1]],f=[0,t[0]],p=[[t[0],0],[0,0]],g=[],m=f[1]/(i.count()-1),v=0,y=Math.round(i.count()/t[0]);i.each([a],function(e,t){if(y>0&&t%y){v+=m;return}var n=null==e||isNaN(e)||""===e,r=n?0:iC(e,c,d,!0);n&&!u&&t?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&u&&(p.push([v,0]),g.push([v,0])),p.push([v,r]),g.push([v,r]),v+=m,u=n}),s=this._shadowPolygonPts=p,l=this._shadowPolylinePts=g}this._shadowData=i,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 ix,r=new hg({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new hy({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),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 r=this.ecModel;return t.eachTargetAxis(function(i,o){te(t.getAxisProxy(i,o).getTargetSeriesModels(),function(t){if(!(e||!0!==n&&0>e6(xp,t.get("type")))){var a,s=r.getComponent(yG(i),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[i],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),e={thisAxis:s,series:t,thisDim:i,otherDim:l,otherAxisInverse:a}}},this)},this),e}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=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 a_({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});i.add(c),i.add(new a_({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)"}})),te([0,1],function(t){var o=a.get("handleIcon");!d9[o]&&0>o.indexOf("path://")&&0>o.indexOf("image://")&&(o="path://"+o);var s=ft(o,-1,0,2,2,null,!0);s.attr({cursor:xv(this._orient),draggable:!0,drift:to(this._onDragMove,this,t),ondragend:to(this._onDragEnd,this),onmouseover:to(this._showDataInfo,this,!0),onmouseout:to(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=iM(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(),su(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),i.add(n[t]=s);var h=a.getModel("textStyle");e.add(r[t]=new aB({silent:!0,invisible:!0,style:sR(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=iM(a.get("moveHandleSize"),o[1]),f=t.moveHandle=new a_({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),p=.8*d,g=t.moveHandleIcon=ft(a.get("moveHandleIcon"),-p/2,-p/2,p,p,"#fff",!0);g.silent=!0,g.y=o[1]+d/2-.5,f.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(o[1]/2,Math.max(d,10));(h=t.moveZone=new a_({invisible:!0,shape:{y:o[1]-m,height:d+m}})).on("mouseover",function(){s.enterEmphasis(f)}).on("mouseout",function(){s.leaveEmphasis(f)}),i.add(f),i.add(g),i.add(h)}h.attr({draggable:!0,cursor:xv(this._orient),drift:to(this._onDragMove,this,"all"),ondragstart:to(this._showDataInfo,this,!0),ondragend:to(this._onDragEnd,this),onmouseover:to(this._showDataInfo,this,!0),onmouseout:to(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[iC(e[0],[0,100],t,!0),iC(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];yJ(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?iC(o.minSpan,a,i,!0):null,null!=o.maxSpan?iC(o.maxSpan,a,i,!0):null);var s=this._range,l=this._range=iT([iC(r[0],i,a,!0),iC(r[1],i,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=iT(n.slice()),i=this._size;te([0,1],function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[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,r[0],r[1],i[0]],l=0;l<a.length;l++){var u=a[l],c=u.getClipPath();c||(c=new a_,u.setClipPath(c)),c.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=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=iT(this._handleEnds.slice());function h(e){var t=h3(n.handles[e].parent,this.group),a=h8(0===e?"right":"left",t),s=this._handleWidth/2+5,l=h4([c[e]+(0===e?-s:s),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===xd?"middle":a,align:i===xd?a:"center",text:o[e]})}h.call(this,0),h.call(this,1)},t.prototype._formatLabel=function(e,t){var n=this.dataZoomModel,r=n.get("labelFormatter"),i=n.get("labelPrecision");(null==i||"auto"===i)&&(i=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(i,20));return tl(r)?r(e,o):tu(r)?r.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,r){this._dragging=!0,ni(r.event);var i=h4([t,n],this._displayables.sliderGroup.getLocalTransform(),!0),o=this._updateInterval(e,i[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 r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new ng(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 r=this._getViewExtent(),i=[0,100];this._range=iT([iC(n.x,r,i,!0),iC(n.x+n.width,r,i,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(ni(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new a_({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.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),i.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?xg:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=yU(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(yQ);function xv(e){return"vertical"===e?"ns-resize":"ew-resize"}function xy(e){e.registerComponentModel(xh),e.registerComponentView(xm),xu(e)}function xx(e){pr(xc),pr(xy)}var xb=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 eF(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"]),ts(t)&&te(t,function(e,r){var i;tu(e)&&(e={type:e}),t[r]=e3(e,"all"===(i=e.type)?{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])}:"inverse"===i?{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 r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}t||this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var a=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(a)),a.length?t=t.concat(a):i=!0}else i=!0;i&&iY(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get("data")||t,i=tD(),o=tt(r,function(e){return((tu(e)||th(e))&&(e={name:e}),i.get(e.name))?null:(i.set(e.name,!0),new sQ(e,this,this.ecModel))},this);this._data=tr(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")&&te(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;te(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;te(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])&&e6(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}(lN);function xw(e,t){var n=tw(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new a_({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:r,silent:!0,z2:-1})}var xS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return eF(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new ix),this.group.add(this._selectorGroup=new ix),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 r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="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(i,e,t,n,a,o,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=lI(l,u,c),d=this.layoutInner(e,i,h,r,a,s),f=lI(e8({width:d.width,height:d.height},l),u,c);this.group.x=f.x-d.x,this.group.y=f.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=xw(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,r,i,o,a){var s=this.getContentGroup(),l=tD(),u=t.get("selectedMode"),c=[];n.eachRawSeries(function(e){e.get("legendHoverLink")||c.push(e.id)}),te(t.getData(),function(i,o){var a=i.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var h=new ix;h.newline=!0,s.add(h);return}var d=n.getSeriesByName(a)[0];if(!l.get(a)){if(d){var f=d.getData(),p=f.getVisual("legendLineStyle")||{},g=f.getVisual("legendIcon"),m=f.getVisual("style"),v=this._createItem(d,a,o,i,t,e,p,m,g,u,r);v.on("click",ta(x_,a,null,r,c)).on("mouseover",ta(xM,d.name,null,r,c)).on("mouseout",ta(xk,d.name,null,r,c)),n.ssr&&v.eachChild(function(e){var t=aF(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),f=h.getItemVisual(d,"style"),p=h.getItemVisual(d,"legendIcon"),g=rg(f.fill);g&&0===g[3]&&(g[3]=.2,f=e4(e4({},f),{fill:rw(g,"rgba")}));var m=this._createItem(s,a,o,i,t,e,{},f,p,u,r);m.on("click",ta(x_,null,a,r,c)).on("mouseover",ta(xM,null,a,r,c)).on("mouseout",ta(xk,null,a,r,c)),n.ssr&&m.eachChild(function(e){var t=aF(e);t.seriesIndex=s.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),l.set(a,!0)}}},this)}},this),i&&this._createSelector(i,t,r,o,a)},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();te(e,function(e){var r=e.type,i=new aB({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),sO(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),su(i)})},t.prototype._createItem=function(e,t,n,r,i,o,a,s,l,u,c){var h=e.visualDrawType,d=i.get("itemWidth"),f=i.get("itemHeight"),p=i.isSelected(t),g=r.get("symbolRotate"),m=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=2*(t.lineWidth>0)),te(e,function(n,r){"inherit"===e[r]&&(e[r]=t[r])})}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?fD(h,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]),"inherit"===u.stroke&&(u.stroke=r[c]),"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity),s(u,r);var d=t.getModel("lineStyle"),f=d.getLineStyle();if(s(f,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===f.stroke&&(f.stroke=r.fill),!o){var p=t.get("inactiveBorderWidth"),g=u[c];u.lineWidth="auto"===p?r.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),f.stroke=d.get("inactiveColor"),f.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:f}}(l=v||l||"roundRect",r,a,s,h,p,c),x=new ix,b=r.getModel("textStyle");if(tl(e.getLegendIcon)&&(!v||"inherit"===v))x.add(e.getLegendIcon({itemWidth:d,itemHeight:f,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(((_=ft(S=(w={itemWidth:d,itemHeight:f,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=i.get("formatter"),k=t;tu(M)&&M?k=M.replace("{name}",null!=t?t:""):tl(M)&&(k=M(t));var T=p?b.getTextColor():r.get("inactiveColor");x.add(new aB({style:sR(b,{text:k,x:"left"===o?d+5:-5,y:f/2,fill:T,align:o,verticalAlign:"middle"},{inheritColor:T})}));var D=new a_({shape:x.getBoundingRect(),style:{fill:"transparent"}}),A=r.getModel("tooltip");return A.get("show")&&dr({el:D,componentModel:i,itemName:t,itemTooltipOption:A.option}),x.add(D),x.eachChild(function(e){e.silent=!0}),D.silent=!u,this.getContentGroup().add(x),su(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getContentGroup(),s=this.getSelectorGroup();lA(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(),!i)return a.x=u[0],a.y=u[1],this.group.getBoundingRect();lA("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),f=e.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=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[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(cE);function x_(e,t,n,r){xk(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),xM(e,t,n,r)}function xC(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function xM(e,t,n,r){xC(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function xk(e,t,n,r){xC(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function xT(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 xD(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name)),te(n.getData(),function(e){var t=e.get("name");if("\n"!==t&&""!==t){var r=n.isSelected(t);i.hasOwnProperty(t)?i[t]=i[t]&&r:i[t]=r}})}),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function xA(e){e.registerComponentModel(xb),e.registerComponentView(xS),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,xT),e.registerSubTypeDefaulter("legend",function(){return"plain"}),e.registerAction("legendToggleSelect","legendselectchanged",ta(xD,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",ta(xD,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",ta(xD,"inverseSelect")),e.registerAction("legendSelect","legendselected",ta(xD,"select")),e.registerAction("legendUnSelect","legendunselected",ta(xD,"unSelect"))}var xI=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=lE(t);e.prototype.init.call(this,t,n,r),xO(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),xO(this,this.option,t)},t.type="legend.scroll",t.defaultOption=s1(xb.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}(xb);function xO(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,lR(t,n,{type:"box",ignoreSize:!!i})}var xP=["width","height"],xR=["x","y"],xE=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 eF(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new ix),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ix)},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,r,i,o,a,s){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,a,s);var u=this._controllerGroup,c=n.get("pageIconSize",!0),h=ts(c)?c:[c,c];f("pagePrev",0);var d=n.getModel("pageTextStyle");function f(e,t){var r=de(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:to(l._pageGo,l,e+"DataIndex",n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});r.name=e,u.add(r)}u.add(new aB({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),f("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,l=xP[s],u=xR[s],c=xP[1-s],h=xR[1-s];i&&lA("horizontal",a,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),f=a.getBoundingRect(),p=[-f.x,-f.y],g=e5(n);i&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(e,r,g,s,l,c,h,u);if(i){if("end"===o)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[h]+m[c]/2-f[c]/2,m[c]=Math.max(m[c],f[c]),m[h]=Math.min(m[h],f[h]+p[1-s]),a.x=p[0],a.y=p[1],a.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var l=this.getContentGroup(),u=this._containerGroup,c=this._controllerGroup;lA(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),lA("horizontal",c,e.get("pageButtonItemGap",!0));var h=l.getBoundingRect(),d=c.getBoundingRect(),f=this._showController=h[i]>n[i],p=[-h.x,-h.y];t||(p[r]=l[s]);var g=[0,0],m=[-d.x,-d.y],v=ty(e.get("pageButtonGap",!0),e.get("itemGap",!0));f&&("end"===e.get("pageButtonPosition",!0)?m[r]+=n[i]-d[i]:g[r]+=d[i]+v),m[1-r]+=h[o]/2-d[o]/2,l.setPosition(p),u.setPosition(g),c.setPosition(m);var y={x:0,y:0};if(y[i]=f?n[i]:h[i],y[o]=Math.max(h[o],d[o]),y[a]=Math.min(0,d[a]+m[1-r]),u.__rectSize=n[i],f){var x={x:0,y:0};x[i]=Math.max(n[i]-d[i]-v,0),x[o]=y[o],u.setClipPath(new a_({shape:x})),u.__rectSize=x[i]}else c.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return null!=b.pageIndex&&sw(l,{x:b.contentPosition[0],y:b.contentPosition[1]},f?e:null),this._updatePageInfoView(e,b),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;te(["pagePrev","pageNext"],function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")});var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,a=null!=o?o+1:0,s=t.pageCount;r&&i&&r.setStyle("text",tu(i)?i.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):i({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=xP[i],a=xR[i],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 f=y(u);d.contentPosition[i]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+r||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 p=s-1,g=f,m=f,v=null;p>=-1;--p)(!(v=y(l[p]))||!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+r}},t.prototype._findTargetItemIndex=function(e){var t,n;return this._showController?(this.getContentGroup().eachChild(function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)}),null!=t?t:n):0},t.type="legend.scroll",t}(xS);function xL(e){pr(xA),e.registerComponentModel(xI),e.registerComponentView(xE),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)}function xN(e){pr(xA),pr(xL)}pr([va,xx,xN,function(e){pr(mz),e.registerSeriesModel(vW),e.registerChartView(v1),e.registerLayout(v0("scatter"))},function(e){e.registerChartView(yA),e.registerSeriesModel(v4)},vr,vu,vI,vE]);let xB=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"],xF=["datazoom","downplay","highlight"],xz=(0,g.memo)(function({option:e,theme:t,renderer:n,sx:r,style:i,onEvents:o,_instance:a,syncGroup:s,onChartInitialized:l}){let u=(0,g.useRef)(e),c=(0,g.useRef)(e),h=(0,g.useRef)(null),d=(0,g.useRef)(null);return(0,g.useLayoutEffect)(()=>{if(null!==h.current&&null===d.current&&(d.current=function(e,t,n){var r=!(n&&n.ssr);if(r){var i=function(e){return fJ[e.getAttribute?e.getAttribute(f5):e[f5]]}(e);if(i)return i}var o=new fj(e,t,n);return o.id="ec_"+f1++,fJ[o.id]=o,r&&i4(e,f5,o.id),bQ(o),fI.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,g.useEffect)(()=>{d.current&&s&&(d.current.group=s,function(e){if(ts(e)){var t=e;e=null,te(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+f2++,te(t,function(t){t.group=e})}f0[e]=!0}([d.current]))},[s,d]),(0,g.useEffect)(()=>{!(void 0===c.current||vZ()(c.current,e))&&d.current&&(d.current.setOption(e,!0),c.current=e)},[e]),(0,g.useLayoutEffect)(()=>{let e=vH()(()=>{d.current&&d.current.resize()},200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,g.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 r=t[n]??null;r&&function(t,n){var r,i;"function"==typeof n&&((r=t,xB.includes(r))?e.on(t,t=>n(t,e)):(i=t,xF.includes(i))?e.on(t,e=>n(e)):e.on(t,()=>n(null,e)))}(n,r)}}}(e,o),()=>{if(void 0!==e&&!0!==e.isDisposed())for(let t in o)e.off(t)}},[o]),(0,g.useEffect)(()=>{vH()(()=>{d.current&&d.current.resize()},200,{leading:!0})()},[r,i]),(0,p.jsx)(vL.Z,{ref:h,sx:r,style:i})});var xV=n(5409),xZ=n.n(xV);function xj(e,t){return[xZ()({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>eE(e,t)}},e)]}function xH(e){if(0===e.length)return 36e5;let t=e[e.length-1];return void 0===e[0]||void 0===t?36e5:t-e[0]}function xW(e){let{width:t,height:n,data:r,format:i={unit:"decimal"},mode:o="value"}=e,a=vz(),s=(0,g.useMemo)(()=>{if(!r||!r.length)return a.noDataOption;let e=[];return r.map(t=>{e.push([t.label,t.value])}),{title:{show:!1},dataset:[{dimensions:["label","value"],source:e}],xAxis:xj({},i),yAxis:{type:"category",splitLine:{show:!1},axisLabel:{overflow:"truncate",width:t/3}},series:{type:"bar",label:{show:!0,position:"right",formatter:e=>e.data[1]?"percentage"===o?eE(e.data[1],{unit:"percent",decimalPlaces:i.decimalPlaces}):eE(e.data[1],i):void 0,barMinWidth:14,barCategoryGap:6},itemStyle:{borderRadius:4,color:a.echartsTheme[0]}},tooltip:{appendToBody:!0,confine:!0,formatter:e=>e.data[1]&&`<b>${e.name}</b>   ${eE(e.data[1],i)}`},grid:{left:"5%",right:"5%"}}},[r,a,t,o,i]);return(0,p.jsx)(vL.Z,{style:{width:t,height:n},sx:{overflow:"auto"},children:(0,p.jsx)(xz,{sx:{minHeight:n,height:r?20*r.length:"100%"},option:s,theme:a.echartsTheme})})}pr([gc,vr,va,vu,vI,vE]);var x$=n(1170),xG=n(4560),xU=n(2179),xq=n(3772),xY=n(6798),xX=n(3890),xK=n(2664);let xQ=(0,xY.Z)(),xJ=(0,xG.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function x0(e){return(0,xU.Z)({props:e,name:"MuiStack",defaultTheme:xQ})}let x1=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],x2=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...(0,xX.k9)({theme:t},(0,xX.P$)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=(0,xK.hB)(t),i=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,xX.P$)({values:e.direction,base:i}),a=(0,xX.P$)({values:e.spacing,base:i});"object"==typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){let r=t>0?o[n[t-1]]:"column";o[e]=r}}),n=(0,x$.Z)(n,(0,xX.k9)({theme:t},a,(t,n)=>e.useFlexGap?{gap:(0,xK.NA)(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${x1(n?o[n]:e.direction)}`]:(0,xK.NA)(r,t)}}))}return(0,xX.dt)(t.breakpoints,n)};function x5(e={}){let{createStyledComponent:t=xJ,useThemeProps:n=x0,componentName:r="MuiStack"}=e,i=()=>(0,y.Z)({root:["root"]},e=>(0,T.ZP)(r,e),{}),o=t(x2);return g.forwardRef(function(e,t){let r=n(e),{component:a="div",direction:s="column",spacing:l=0,divider:u,children:c,className:h,useFlexGap:d=!1,...f}=(0,xq.Z)(r),m=i();return(0,p.jsx)(o,{as:a,ownerState:{direction:s,spacing:l,useFlexGap:d},ref:t,className:(0,v.Z)(m.root,h),...f,children:u?function(e,t){let n=g.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(g.cloneElement(t,{key:`separator-${i}`})),e),[])}(c,u):c})})}let x3=x5({createStyledComponent:(0,S.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,M.i)({props:e,name:"MuiStack"})});var x4=n(5094),x8=n(8695);function x6(){return(x6=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x9(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function x7(e){var t=(0,g.useRef)(e),n=(0,g.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var be,bt,bn,br,bi,bo,ba,bs,bl,bu,bc,bh,bd,bf,bp,bg,bm,bv,by,bx,bb,bw,bS,b_,bC,bM,bk,bT,bD,bA,bI,bO,bP,bR,bE,bL,bN,bB,bF,bz,bV,bZ,bj,bH,bW,b$,bG,bU,bq,bY,bX,bK,bQ,bJ,b0,b1,b2,b5,b3,b4,b8,b6,b9,b7=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},we=function(e){return"touches"in e},wt=function(e){return e&&e.ownerDocument.defaultView||self},wn=function(e,t,n){var r=e.getBoundingClientRect(),i=we(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:b7((i.pageX-(r.left+wt(e).pageXOffset))/r.width),top:b7((i.pageY-(r.top+wt(e).pageYOffset))/r.height)}},wr=function(e){we(e)||e.preventDefault()},wi=g.memo(function(e){var t=e.onMove,n=e.onKey,r=x9(e,["onMove","onKey"]),i=(0,g.useRef)(null),o=x7(t),a=x7(n),s=(0,g.useRef)(null),l=(0,g.useRef)(!1),u=(0,g.useMemo)(function(){var e=function(e){wr(e),(we(e)?e.touches.length>0:e.buttons>0)&&i.current?o(wn(i.current,e,s.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=l.current,o=wt(i.current),a=n?o.addEventListener:o.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=i.current;if(r&&(wr(t),(!l.current||we(t))&&r)){if(we(t)){l.current=!0;var a=t.changedTouches||[];a.length&&(s.current=a[0].identifier)}r.focus(),o(wn(r,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,g.useEffect)(function(){return d},[d]),g.createElement("div",x6({},r,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:i,onKeyDown:h,tabIndex:0,role:"slider"}))}),wo=function(e){return e.filter(Boolean).join(" ")},wa=function(e){var t=e.color,n=e.left,r=e.top,i=wo(["react-colorful__pointer",e.className]);return g.createElement("div",{className:i,style:{top:100*(void 0===r?.5:r)+"%",left:100*n+"%"}},g.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},ws=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},wl=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?ws(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?ws(parseInt(e.substring(6,8),16)/255,2):1}},wu=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:ws(e.h),s:ws(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:ws(i/2),a:ws(r,2)}},wc=function(e){var t=wu(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},wh=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:ws(255*[r,s,a,a,l,r][u]),g:ws(255*[l,r,r,s,a,a][u]),b:ws(255*[a,a,l,r,r,s][u]),a:ws(i,2)}},wd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wf=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?wd(ws(255*i)):"";return"#"+wd(t)+wd(n)+wd(r)+o},wp=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:ws(60*(s<0?s+6:s)),s:ws(o?a/o*100:0),v:ws(o/255*100),a:i}},wg=g.memo(function(e){var t=e.hue,n=e.onChange,r=wo(["react-colorful__hue",e.className]);return g.createElement("div",{className:r},g.createElement(wi,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:b7(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":ws(t),"aria-valuemax":"360","aria-valuemin":"0"},g.createElement(wa,{className:"react-colorful__hue-pointer",left:t/360,color:wc({h:t,s:100,v:100,a:1})})))}),wm=g.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:wc({h:t.h,s:100,v:100,a:1})};return g.createElement("div",{className:"react-colorful__saturation",style:r},g.createElement(wi,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:b7(t.s+100*e.left,0,100),v:b7(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+ws(t.s)+"%, Brightness "+ws(t.v)+"%"},g.createElement(wa,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:wc(t)})))}),wv=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},wy="undefined"!=typeof window?g.useLayoutEffect:g.useEffect,wb=new Map,ww=function(e){wy(function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!wb.has(t)){var r=t.createElement("style");r.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}',wb.set(t,r);var i=b9||n.nc;i&&r.setAttribute("nonce",i),t.head.appendChild(r)}},[])},wS=function(e){var t,n,r,i,o,a=e.className,s=e.colorModel,l=e.color,u=void 0===l?s.defaultColor:l,c=e.onChange,h=x9(e,["className","colorModel","color","onChange"]),d=(0,g.useRef)(null);ww(d);var f=(t=x7(c),r=(n=(0,g.useState)(function(){return s.toHsva(u)}))[0],i=n[1],o=(0,g.useRef)({color:u,hsva:r}),(0,g.useEffect)(function(){if(!s.equal(u,o.current.color)){var e=s.toHsva(u);o.current={hsva:e,color:u},i(e)}},[u,s]),(0,g.useEffect)(function(){var e;wv(r,o.current.hsva)||s.equal(e=s.fromHsva(r),o.current.color)||(o.current={hsva:r,color:e},t(e))},[r,s,t]),[r,(0,g.useCallback)(function(e){i(function(t){return Object.assign({},t,e)})},[])]),p=f[0],m=f[1],v=wo(["react-colorful",a]);return g.createElement("div",x6({},h,{ref:d,className:v}),g.createElement(wm,{hsva:p,onChange:m}),g.createElement(wg,{hue:p.h,onChange:m,className:"react-colorful__last-control"}))},w_={defaultColor:"000",toHsva:function(e){return wp(wl(e))},fromHsva:function(e){return wf(wh({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||wv(wl(e),wl(t))}},wC=function(e){return g.createElement(wS,x6({},e,{colorModel:w_}))},wM=n(791),wk=n(354);let wT=({color:e,onChange:t,onClear:n,palette:r})=>{let[i,o]=(0,g.useState)(e),a=e=>{o(e),t?.(e)};return(0,p.jsxs)(x3,{spacing:1,children:[(0,p.jsx)(wC,{color:e,onChange:a,style:{width:"100%"}}),(0,p.jsx)(x3,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:r&&r.map((e,t)=>(0,p.jsx)(x4.Z,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>a(e),children:(0,p.jsx)(wM.default,{})},t))}),(0,p.jsxs)(x3,{direction:"row",gap:1,alignItems:"center",children:[(0,p.jsx)(x8.Z,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:i,onChange:e=>{let n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);o(`#${n}`),wD(e.target.value)&&t?.(e.target.value)}}),n&&(0,p.jsx)(x4.Z,{onClick:n,children:(0,p.jsx)(wk.default,{})})]})]})},wD=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var wA=n(6714);function wI({label:e,color:t,onColorChange:n,onClear:r}){let[i,o]=(0,g.useState)(null),a=!!i,{thresholds:{defaultColor:s,palette:l}}=vz();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(wO,{size:"small","aria-label":`change ${e} color`,isSelected:a,iconColor:t,onClick:e=>{o(e.currentTarget)},children:(0,p.jsx)(wM.default,{})}),(0,p.jsx)(wA.ZP,{"data-testid":"options color picker",open:a,anchorEl:i,onClose:()=>{o(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,p.jsx)(wT,{color:t,palette:[s,...l],onChange:n,onClear:r})})]})}let wO=(0,S.ZP)(x4.Z,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var wP=n(4776);let wR=["list","table"],wE=["small","medium"],wL={mode:"list",size:"medium"};function wN(e){return e&&wR.includes(e)?e:wL.mode}var wB=Symbol.for("immer-nothing"),wF=Symbol.for("immer-draftable"),wz=Symbol.for("immer-state");function wV(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var wZ=Object.getPrototypeOf;function wj(e){return!!e&&!!e[wz]}function wH(e){return!!e&&(w$(e)||Array.isArray(e)||!!e[wF]||!!e.constructor?.[wF]||wX(e)||wK(e))}var wW=Object.prototype.constructor.toString();function w$(e){if(!e||"object"!=typeof e)return!1;let t=wZ(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)===wW}function wG(e,t){0===wU(e)?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function wU(e){let t=e[wz];return t?t.type_:Array.isArray(e)?1:wX(e)?2:3*!!wK(e)}function wq(e,t){return 2===wU(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wY(e,t,n){let r=wU(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function wX(e){return e instanceof Map}function wK(e){return e instanceof Set}function wQ(e){return e.copy_||e.base_}function wJ(e,t){if(wX(e))return new Map(e);if(wK(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=w$(e);if(!0!==t&&("class_only"!==t||n)){let t=wZ(e);return null!==t&&n?{...e}:Object.assign(Object.create(t),e)}{let t=Object.getOwnPropertyDescriptors(e);delete t[wz];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(wZ(e),t)}}function w0(e,t=!1){return w2(e)||wj(e)||!wH(e)||(wU(e)>1&&(e.set=e.add=e.clear=e.delete=w1),Object.freeze(e),t&&Object.entries(e).forEach(([e,t])=>w0(t,!0))),e}function w1(){wV(2)}function w2(e){return Object.isFrozen(e)}var w5={};function w3(e){let t=w5[e];return t||wV(0,e),t}function w4(e,t){t&&(w3("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function w8(e){w6(e),e.drafts_.forEach(w7),e.drafts_=null}function w6(e){e===qR&&(qR=e.parent_)}function w9(e){return qR={drafts_:[],parent_:qR,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function w7(e){let t=e[wz];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Se(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return void 0!==e&&e!==n?(n[wz].modified_&&(w8(t),wV(4)),wH(e)&&(e=St(t,e),t.parent_||Sr(t,e)),t.patches_&&w3("Patches").generateReplacementPatches_(n[wz].base_,e,t.patches_,t.inversePatches_)):e=St(t,n,[]),w8(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wB?e:void 0}function St(e,t,n){if(w2(t))return t;let r=t[wz];if(!r)return wG(t,(i,o)=>Sn(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Sr(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let t=r.copy_,i=t,o=!1;3===r.type_&&(i=new Set(t),t.clear(),o=!0),wG(i,(i,a)=>Sn(e,r,t,i,a,n,o)),Sr(e,t,!1),n&&e.patches_&&w3("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Sn(e,t,n,r,i,o,a){if(wj(i)){let a=St(e,i,o&&t&&3!==t.type_&&!wq(t.assigned_,r)?o.concat(r):void 0);if(wY(n,r,a),!wj(a))return;e.canAutoFreeze_=!1}else a&&n.add(i);if(wH(i)&&!w2(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;St(e,i),(!t||!t.scope_.parent_)&&"symbol"!=typeof r&&Object.prototype.propertyIsEnumerable.call(n,r)&&Sr(e,i)}}function Sr(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&w0(t,n)}var Si={get(e,t){if(t===wz)return e;let n=wQ(e);if(!wq(n,t))return function(e,t,n){let r=Ss(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);let r=n[t];return e.finalized_||!wH(r)?r:r===Sa(e.base_,t)?(Su(e),e.copy_[t]=Sc(r,e)):r},has:(e,t)=>t in wQ(e),ownKeys:e=>Reflect.ownKeys(wQ(e)),set(e,t,n){let r=Ss(wQ(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Sa(wQ(e),t),i=r?.[wz];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if((n===r?0!==n||1/n==1/r:n!=n&&r!=r)&&(void 0!==n||wq(e.base_,t)))return!0;Su(e),Sl(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!==Sa(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Su(e),Sl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let n=wQ(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){wV(11)},getPrototypeOf:e=>wZ(e.base_),setPrototypeOf(){wV(12)}},So={};function Sa(e,t){let n=e[wz];return(n?wQ(n):e)[t]}function Ss(e,t){if(!(t in e))return;let n=wZ(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=wZ(n)}}function Sl(e){!e.modified_&&(e.modified_=!0,e.parent_&&Sl(e.parent_))}function Su(e){e.copy_||(e.copy_=wJ(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function Sc(e,t){let n=wX(e)?w3("MapSet").proxyMap_(e,t):wK(e)?w3("MapSet").proxySet_(e,t):function(e,t){let n=Array.isArray(e),r={type_:+!!n,scope_:t?t.scope_:qR,modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=r,o=Si;n&&(i=[r],o=So);let{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:qR).drafts_.push(n),n}wG(Si,(e,t)=>{So[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),So.deleteProperty=function(e,t){return So.set.call(this,e,t,void 0)},So.set=function(e,t,n){return Si.set.call(this,e[0],t,n,e[0])};var Sh=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{let r;if("function"==typeof e&&"function"!=typeof t){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}if("function"!=typeof t&&wV(6),void 0!==n&&"function"!=typeof n&&wV(7),wH(e)){let i=w9(this),o=Sc(e,void 0),a=!0;try{r=t(o),a=!1}finally{a?w8(i):w6(i)}return w4(i,n),Se(r,i)}if(e&&"object"==typeof e)wV(1,e);else{if(void 0===(r=t(e))&&(r=e),r===wB&&(r=void 0),this.autoFreeze_&&w0(r,!0),n){let t=[],i=[];w3("Patches").generateReplacementPatches_(e,r,t,i),n(t,i)}return r}},this.produceWithPatches=(e,t)=>{let n,r;return"function"==typeof e?(t,...n)=>this.produceWithPatches(t,t=>e(t,...n)):[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;wH(e)||wV(8),wj(e)&&(wj(t=e)||wV(10,t),e=function e(t){let n;if(!wH(t)||w2(t))return t;let r=t[wz];if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=wJ(t,r.scope_.immer_.useStrictShallowCopy_)}else n=wJ(t,!0);return wG(n,(t,r)=>{wY(n,t,e(r))}),r&&(r.finalized_=!1),n}(t));let n=w9(this),r=Sc(e,void 0);return r[wz].isManual_=!0,w6(n),r}finishDraft(e,t){let n=e&&e[wz];n&&n.isManual_||wV(9);let{scope_:r}=n;return w4(r,t),Se(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=w3("Patches").applyPatches_;return wj(e)?r(e,t):this.produce(e,e=>r(e,t))}},Sd=Sh.produce;Sh.produceWithPatches.bind(Sh),Sh.setAutoFreeze.bind(Sh),Sh.setUseStrictShallowCopy.bind(Sh),Sh.applyPatches.bind(Sh),Sh.createDraft.bind(Sh),Sh.finishDraft.bind(Sh);var Sf=n(6085);function Sp(e){e()}function Sg(e,t){return n=>e(t(n))}function Sm(e){return void 0!==e}function Sv(){}function Sy(e,t){return t(e)}function Sx(...e){return e}function Sb(e,t){e(0,t)}function Sw(e){e(2)}function SS(e){return e(4)}function S_(e,t){return e(1,e=>t(0,e))}function SC(e,t){let n=e(1,e=>{n(),t(e)});return n}function SM(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function Sk(e,t){return e===t}function ST(e=Sk){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function SD(e){return t=>n=>{e(n)&&t(n)}}function SA(e){return t=>Sg(t,e)}function SI(e){return t=>()=>{t(e)}}function SO(e,...t){let n=function(...e){return t=>e.reduceRight(Sy,t)}(...t);return(t,r)=>{switch(t){case 2:Sw(e);return;case 1:return e(1,n(r))}}}function SP(e,t){return n=>r=>{n(t=e(t,r))}}function SR(e){return t=>n=>{e>0?e--:t(n)}}function SE(e){let t=null,n;return r=>i=>{t=i,n||(n=setTimeout(()=>{n=void 0,r(t)},e))}}function SL(...e){let t=Array(e.length),n=0,r=null,i=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!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{let a=()=>{e([o].concat(t))};n===i?a():r=a}}function SN(e){let t=e,n=SF();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function SB(e,t){var n;return S_(e,n=SN(t)),n}function SF(){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 Sz(e){var t;return S_(e,t=SF()),t}function SV(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:SZ(),singleton:n}}let SZ=()=>Symbol();function Sj(...e){let t=SF(),n=Array(e.length),r=0,i=Math.pow(2,e.length)-1;return e.forEach((e,o)=>{let a=Math.pow(2,o);e(1,e=>{n[o]=e,(r|=a)===i&&t(0,n)})}),function(e,o){switch(e){case 2:Sw(t);return;case 1:return r===i&&o(n),t(1,o)}}}function SH(e,t=Sk){return SO(e,ST(t))}function SW(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(Sp)}}(...e.map(e=>e(1,n)))}}}var S$=((a=S$||{})[a.DEBUG=0]="DEBUG",a[a.INFO=1]="INFO",a[a.WARN=2]="WARN",a[a.ERROR=3]="ERROR",a);let SG={0:"debug",3:"error",1:"log",2:"warn"},SU=()=>typeof globalThis>"u"?window:globalThis,Sq=SV(()=>{let e=SN(3);return{log:SN((t,n,r=1)=>{var i;r>=(null!=(i=SU().VIRTUOSO_LOG_LEVEL)?i:SS(e))&&console[SG[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function SY(e,t,n){return SX(e,t,n).callbackRef}function SX(e,t,n){let r=g.useRef(null),i=e=>{};if("u">typeof ResizeObserver){let o=g.useMemo(()=>new ResizeObserver(t=>{let r=()=>{let n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}),[e]);i=e=>{e&&t?(o.observe(e),r.current=e):(r.current&&o.unobserve(r.current),r.current=null)}}return{callbackRef:i,ref:r}}function SK(e,t,n,r,i,o,a,s,l){return SX(g.useCallback(n=>{let l=function(e,t,n,r){let i=e.length;if(0===i)return null;let o=[];for(let a=0;a<i;a++){let i=e.item(a);if(void 0===i.dataset.index)continue;let s=parseInt(i.dataset.index),l=parseFloat(i.dataset.knownSize),u=t(i,n);if(0===u&&r("Zero-sized element, this should not happen",{child:i},S$.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",i),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;r({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?SQ("column-gap",getComputedStyle(n).columnGap,i):SQ("row-gap",getComputedStyle(n).rowGap,i)),null!==l&&e(l)},[e,t,i,o,a,r]),n,l)}function SQ(e,t,n){return"normal"===t||null!=t&&t.endsWith("px")||n(`${e} was not resolved to pixel value correctly`,t,S$.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}function SJ(e,t,n){let r=g.useRef(null),i=g.useCallback(n=>{let i,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),i=n+t.scrollTop}else o=window.innerHeight-Math.max(0,a.top),i=a.top+window.pageYOffset;r.current={offsetTop:i,visibleHeight:o,visibleWidth:s},e(r.current)},[e,t]),{callbackRef:o,ref:a}=SX(i,!0,n),s=g.useCallback(()=>{i(a.current)},[i,a]);return g.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 S0=SV(()=>{let e=SF(),t=SF(),n=SN(0),r=SF(),i=SN(0),o=SF(),a=SF(),s=SN(0),l=SN(0),u=SN(0),c=SN(0),h=SF(),d=SF(),f=SN(!1),p=SN(!1),g=SN(!1);return S_(SO(e,SA(({scrollTop:e})=>e)),t),S_(SO(e,SA(({scrollHeight:e})=>e)),a),S_(t,i),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:p,scrollBy:d,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:h,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:o}},[],{singleton:!0}),S1={lvl:0};function S2(e,t){let n=e.length;if(0===n)return[];let{index:r,value:i}=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:r,value:i}),r=n,i=s}return o.push({end:1/0,start:r,value:i}),o}function S5(e){return e===S1}function S3(e,t){if(!S5(e))return t===e.k?e.v:t<e.k?S3(e.l,t):S3(e.r,t)}function S4(e,t,n="k"){if(S5(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=S4(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return S4(e.l,t,n)}function S8(e,t,n){return S5(e)?_n(t,n,1):t===e.k?_e(e,{k:t,v:n}):t<e.k?_i(_r(_e(e,{l:S8(e.l,t,n)}))):_i(_r(_e(e,{r:S8(e.r,t,n)})))}function S6(e,t,n){if(S5(e))return[];let r=S4(e,t)[0];return S2(function e(t,n,r){if(S5(t))return[];let{k:i,l:o,r:a,v:s}=t,l=[];return i>n&&(l=l.concat(e(o,n,r))),i>=n&&i<=r&&l.push({k:i,v:s}),i<=r&&(l=l.concat(e(a,n,r))),l}(e,r,n),({k:e,v:t})=>({index:e,value:t}))}function S9(e){return S5(e)?[]:[...S9(e.l),{k:e.k,v:e.v},...S9(e.r)]}function S7(e){let{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(_t(t))return _r(_e(e,{lvl:n-1}));if(!S5(t)&&!S5(t.r))return _e(t.r,{l:_e(t,{r:t.r.l}),lvl:n,r:_e(e,{l:t.r.r,lvl:n-1})});throw Error("Unexpected empty nodes")}if(_t(e))return _i(_e(e,{lvl:n-1}));if(S5(r)||S5(r.l))throw Error("Unexpected empty nodes");{let t=r.l,i=_t(t)?r.lvl-1:r.lvl;return _e(t,{l:_e(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:_i(_e(r,{l:t.r,lvl:i}))})}}function _e(e,t){return _n(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 _t(e){return S5(e)||e.lvl>e.r.lvl}function _n(e,t,n,r=S1,i=S1){return{k:e,l:r,lvl:n,r:i,v:t}}function _r(e){let{l:t}=e;return S5(t)||t.lvl!==e.lvl?e:_e(t,{r:_e(e,{l:t.r})})}function _i(e){let{lvl:t,r:n}=e;return S5(n)||S5(n.r)||n.lvl!==t||n.r.lvl!==t?e:_e(n,{l:_e(e,{r:n.l}),lvl:t+1})}function _o(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function _a(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let _s=SV(()=>({recalcInProgress:SN(!1)}),[],{singleton:!0});function _l(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let o=Math.floor((r+i)/2),a=n(e[o],t);if(0===a)return o;if(-1===a){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function _u(e,t){return Math.round(e.getBoundingClientRect()[t])}function _c(e){return!S5(e.groupOffsetTree)}function _h({index:e},t){return t===e?0:t<e?-1:1}function _d({offset:e},t){return t===e?0:t<e?-1:1}function _f(e,t,n){if(0===t.length)return 0;let{index:r,offset:i,size:o}=t[_l(t,e,_h)],a=e-r,s=o*a+(a-1)*n+i;return s>0?s+n:s}function _p(e,t){if(!_c(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function _g(e,t,n){if("u">typeof e.groupIndex)return t.groupIndices[e.groupIndex]+1;{let r=_p("LAST"===e.index?n:e.index,t);return Math.max(0,r,Math.min(n,r))}}function _m(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,S$.DEBUG);let o=e.sizeTree,a=o,s=0;if(n.length>0&&S5(o)&&2===t.length){let e=t[0].size,r=t[1].size;a=n.reduce((t,n)=>S8(S8(t,n,e),n+1,r),a)}else[a,s]=function(e,t){let n=S5(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),S5(e)){e=S8(e,0,i);continue}let a=S6(e,o-1,t+1);if(a.some(function(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}(r)))continue;let s=!1,l=!1;for(let{end:n,start:r,value:o}of a)s?(t>=r||i===o)&&(e=function e(t,n){if(S5(t))return S1;let{k:r,l:i,r:o}=t;if(n!==r)return n<r?S7(_e(t,{l:e(i,n)})):S7(_e(t,{r:e(o,n)}));if(S5(i))return o;if(S5(o))return i;{let[e,n]=function e(t){return S5(t.r)?[t.k,t.v]:e(t.r)}(i);return S7(_e(t,{k:e,l:function e(t){return S5(t.r)?t.l:S7(_e(t,{r:e(t.r)}))}(i),v:n}))}}(e,r)):(l=o!==i,s=!0),n>t&&t>=r&&o!==i&&(e=S8(e,t+1,o));l&&(e=S8(e,o,i))}return[e,n]}(a,t);if(a===o)return e;let{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:h}=_y(e.offsetTree,s,a,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>S8(e,t,_f(t,h,i)),S1),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:h,sizeTree:a}}function _v(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-+(n!==e)}function _y(e,t,n,r){let i=e,o=0,a=0,s=0,l=0;if(0!==t){l=_l(i,t-1,_h),s=i[l].offset;let e=S4(n,t-1);o=e[0],a=e[1],i.length&&i[l].size===S4(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}else i=[];for(let{start:e,value:l}of S6(n,t,1/0)){let t=e-o,n=t*a+s+t*r;i.push({index:e,offset:n,size:l}),o=e,s=n,a=l}return{lastIndex:o,lastOffset:s,lastSize:a,offsetTree:i}}function _x(e){return{index:e.index,value:e}}let _b={offsetHeight:"height",offsetWidth:"width"},_w=SV(([{log:e},{recalcInProgress:t}])=>{let n=SF(),r=SF(),i=SB(r,0),o=SF(),a=SF(),s=SN(0),l=SN([]),u=SN(void 0),c=SN(void 0),h=SN((e,t)=>_u(e,_b[t])),d=SN(void 0),f=SN(0),p={groupIndices:[],groupOffsetTree:S1,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:S1},g=SB(SO(n,SL(l,e,f),SP(_m,p),ST()),p),m=SB(SO(l,ST(),SP((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),SA(({prev:e})=>e)),[]);S_(SO(l,SD(e=>e.length>0),SL(g,f),SA(([e,t,n])=>{let r=e.reduce((e,r,i)=>S8(e,r,_f(r,t.offsetTree,n)||i),S1);return{...t,groupIndices:e,groupOffsetTree:r}})),g),S_(SO(r,SL(g),SD(([e,{lastIndex:t}])=>e<t),SA(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),S_(u,c);let v=SB(SO(u,SA(e=>void 0===e)),!0);S_(SO(c,SD(e=>void 0!==e&&S5(SS(g).sizeTree)),SA(e=>[{endIndex:0,size:e,startIndex:0}])),n);let y=Sz(SO(n,SL(g),SP(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:p}),SA(e=>e.changed)));SO(s,SP((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),SA(e=>e.diff))(1,e=>{let{groupIndices:n}=SS(g);if(e>0)t(0,!0),o(0,e+_v(e,n));else if(e<0){let t=SS(m);t.length>0&&(e-=_v(-e,t)),a(0,e)}}),SO(s,SL(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},S$.ERROR)});let x=Sz(o);S_(SO(o,SL(g),SA(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=S3(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;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),a++,o+=s+1}let s=S9(t.sizeTree);return o!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return S9(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let b=Sz(SO(a,SL(g,f),SA(([e,{offsetTree:t},n])=>_f(-e,t,n))));return S_(SO(a,SL(g,f),SA(([e,t,n])=>{if(t.groupIndices.length>0){if(S5(t.sizeTree))return t;let r=S1,i=SS(m),o=0,a=0,s=0;for(;o<-e;){s=i[a];let e=i[a+1]-s-1;a++,o+=e+1}return r=S9(t.sizeTree).reduce((t,{k:n,v:r})=>S8(t,Math.max(0,n+e),r),r),o!==-e&&(r=S8(r,0,S3(t.sizeTree,s)),r=S8(r,1,S4(t.sizeTree,-e+1)[1])),{...t,sizeTree:r,..._y(t.offsetTree,0,r,n)}}{let r=S9(t.sizeTree).reduce((t,{k:n,v:r})=>S8(t,Math.max(0,n+e),r),S1);return{...t,sizeTree:r,..._y(t.offsetTree,0,r,n)}}})),g),{beforeUnshiftWith:x,data:d,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,gap:f,groupIndices:l,itemSize:h,listRefresh:y,shiftWith:a,shiftWithOffset:b,sizeRanges:n,sizes:g,statefulTotalCount:i,totalCount:r,trackItemSizes:v,unshiftWith:o}},Sx(Sq,_s),{singleton:!0});function _S(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let __=SV(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let o=SF(),a=SF(),s=Sz(SO(o,SA(_S)));return S_(SO(s,SA(e=>e.totalCount)),n),S_(SO(s,SA(e=>e.groupIndices)),e),S_(SO(Sj(i,t,r),SD(([e,t])=>_c(t)),SA(([e,t,n])=>S4(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),ST(),SA(e=>[e])),a),{groupCounts:o,topItemsIndexes:a}},Sx(_w,S0)),_C=SV(([{log:e}])=>{let t=SN(!1),n=Sz(SO(t,SD(e=>e),ST()));return t(1,t=>{t&&SS(e)("props updated",{},S$.DEBUG)}),{didMount:n,propsReady:t}},Sx(Sq),{singleton:!0}),_M="u">typeof document&&"scrollBehavior"in document.documentElement.style;function _k(e){let t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),t.behavior&&_M||(t.behavior="auto"),t.offset||(t.offset=0),t}let _T=SV(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:h},{log:d}])=>{let f=SF(),p=SF(),g=SN(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 S_(SO(f,SL(n,h,r,g,s,a,d),SL(e,o,i),SA(([[e,n,r,i,o,a,s,u],h,d,g])=>{let b=_k(e),{align:w,behavior:S,offset:_}=b,C=i-1,M=_g(b,n,C),k=_f(M,n.offsetTree,h)+a;"end"===w?(k+=d+S4(n.sizeTree,M)[1]-r+g,M===C&&(k+=s)):"center"===w?k+=(d+S4(n.sizeTree,M)[1]-r+g)/2:k-=o,_&&(k+=_);let T=t=>{x(),t?(u("retrying to scroll to",{location:e},S$.DEBUG),f(0,e)):(p(0,!0),u("list did not change, scroll successful",{},S$.DEBUG))};if(x(),"smooth"===S){let e=!1;y=t(1,t=>{e=e||t}),m=SC(c,()=>{T(e)})}else m=SC(SO(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},S$.DEBUG),{behavior:S,top:k}})),u),{scrollTargetReached:p,scrollToIndex:f,topListHeight:g}},Sx(_w,S0,Sq),{singleton:!0});function _D(e,t){0==e?t():requestAnimationFrame(()=>{_D(e-1,t)})}function _A(e,t){return"number"==typeof e?e:"LAST"===e.index?t-1:e.index}let _I=SV(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:a}])=>{let s=SN(!0),l=SN(0),u=SN(!0);return S_(SO(a,SL(l),SD(([e,t])=>!!t),SI(!1)),s),S_(SO(a,SL(l),SD(([e,t])=>!!t),SI(!1)),u),SO(Sj(t,a),SL(s,n,e,u),SD(([[,e],t,{sizeTree:n},r,i])=>e&&(!S5(n)||Sm(r))&&!t&&!i),SL(l))(1,([,e])=>{SC(i,()=>{u(0,!0)}),_D(4,()=>{SC(r,()=>{s(0,!0)}),o(0,e)})}),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}},Sx(_w,S0,_T,_C),{singleton:!0});function _O(e,t){return 1.01>Math.abs(e-t)}let _P="down",_R={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},_E=SV(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{let a=SN(!1),s=SN(!0),l=SF(),u=SF(),c=SN(4),h=SN(0),d=SB(SO(SW(SO(SH(i),SR(1),SI(!0)),SO(SH(i),SR(1),SI(!1),SM(100))),ST()),!1),f=SB(SO(SW(SO(n,SI(!0)),SO(n,SI(!1),SM(200))),ST()),!1);S_(SO(Sj(SH(i),SH(h)),SA(([e,t])=>e<=t),ST()),s),S_(SO(s,SE(50)),u);let p=Sz(SO(Sj(r,SH(o),SH(t),SH(e),SH(c)),SP((e,[{scrollHeight:t,scrollTop:n},r,i,o,a])=>{let s;let l={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-a){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:l}}return{atBottom:!1,notAtBottomBecause:l.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:l}},_R),ST((e,t)=>e&&e.atBottom===t.atBottom))),g=SB(SO(r,SP((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(_O(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{let i=t-(n+r)<1;return e.scrollTop!==n&&i?{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}),SD(e=>e.changed),SA(e=>e.jump)),0);S_(SO(p,SA(e=>e.atBottom)),a),S_(SO(a,SE(50)),l);let m=SN(_P);S_(SO(r,SA(({scrollTop:e})=>e),ST(),SP((e,t)=>SS(f)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":_P,prevScrollTop:t},{direction:_P,prevScrollTop:0}),SA(e=>e.direction)),m),S_(SO(r,SE(50),SI("none")),m);let v=SN(0);return S_(SO(d,SD(e=>!e),SI(0)),v),S_(SO(i,SE(100),SL(d),SD(([e,t])=>!!t),SP(([e,t],[n])=>[t,n],[0,0]),SA(([e,t])=>t-e)),v),{atBottomState:p,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:h,isAtBottom:a,isAtTop:s,isScrolling:d,lastJumpDueToItemResize:g,scrollDirection:m,scrollVelocity:v}},Sx(S0)),_L="bottom",_N="none";function _B(e,t,n){return"number"==typeof e?"up"===n&&"top"===t||n===_P&&t===_L?e:0:"up"===n?"top"===t?e.main:e.reverse:t===_L?e.main:e.reverse}function _F(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}let _z=SV(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let o=SF(),a=SN(0),s=SN(0),l=SN(0),u=SB(SO(Sj(SH(r),SH(i),SH(n),SH(o,_a),SH(l),SH(a),SH(t),SH(e),SH(s)),SA(([e,t,n,[r,i],o,a,s,l,u])=>{let c=e-l,h=Math.max(n-c,0),d=_N,f=_F(u,"top"),p=_F(u,_L);return r-=l,r+=n+s,i+=n+s,r>e+(a+s)-f&&(d="up"),(i-=l)<e-h+t+p&&(d=_P),d!==_N?[Math.max(c-n-_B(o,"top",d)-f,0),c-h-s+t+_B(o,_L,d)+p]:null}),SD(e=>null!=e),ST(_a)),[0,0]);return{increaseViewportBy:s,listBoundary:o,overscan:l,topListHeight:a,visibleRange:u}},Sx(S0),{singleton:!0}),_V={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function _Z(e,t,n,r,i,o){let{lastIndex:a,lastOffset:s,lastSize:l}=i,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,f=s+h*l+(h-1)*r-c;return{bottom:c,firstItemIndex:o,items:_H(e,i,o),offsetBottom:f,offsetTop:u,top:d,topItems:_H(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function _j(e,t,n,r,i,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=_A(t,s);return _Z(Array.from({length:s}).map((e,t)=>({data:o[t+l],index:t+l,offset:0,size:0})),[],s,i,n,r)}function _H(e,t,n){if(0===e.length)return[];if(!_c(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,o=[],a=S6(t.groupOffsetTree,r,i),s,l=0;for(let r of e){let e;(!s||s.end<r.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start)),e=r.index===s.start?{index:l,type:"group"}:{groupIndex:l,index:r.index-(l+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}let _W=SV(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:u,scrolledToInitialItem:c},{topListHeight:h},d,{didMount:f},{recalcInProgress:p}])=>{let g=SN([]),m=SN(0),v=SF();S_(o.topItemsIndexes,g);let y=SB(SO(Sj(f,p,SH(l,_a),SH(i),SH(r),SH(u),c,SH(g),SH(t),SH(n),e),SD(([e,t,,n,,,,,,,r])=>{let i=r&&r.length!==n;return e&&!t&&!i}),SA(([,,[e,t],n,r,i,o,a,s,l,u])=>{var c;let{offsetTree:h,sizeTree:d}=r,f=SS(m);if(0===n)return{..._V,totalCount:n};if(0===e&&0===t)return 0===f?{..._V,totalCount:n}:_j(f,i,r,s,l,u||[]);if(S5(d))return f>0?null:_Z(function(e,t,n){if(_c(t)){let r=_p(e,t);return[{index:S4(t.groupOffsetTree,r)[0],offset:0,size:0},{data:null==n?void 0:n[0],index:r,offset:0,size:0}]}return[{data:null==n?void 0:n[0],index:e,offset:0,size:0}]}(_A(i,n),r,u),[],n,l,r,s);let p=[];if(a.length>0){let e=a[0],t=a[a.length-1],n=0;for(let r of S6(d,e,t)){let i=r.value,o=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=o;e<=a;e++)p.push({data:null==u?void 0:u[e],index:e,offset:n,size:i}),n+=i}}if(!o)return _Z([],p,n,l,r,s);let g=a.length>0?a[a.length-1]+1:0,v=function(e,t,n,r=0){return r>0&&(t=Math.max(t,e[_l(e,r,_h)].offset)),S2(function(e,t,n,r){let i=_l(e,t,r),o=_l(e,n,r,i);return e.slice(i,o+1)}(e,t,n,_d),_x)}(h,e,t,g);if(0===v.length)return null;let y=n-1;return _Z(((n=>{for(let r of v){let i=r.value,o=i.offset,a=r.start,s=i.size;if(i.offset<e){let t=(a+=Math.floor((e-i.offset+l)/(s+l)))-r.start;o+=t*s+t*l}a<g&&(o+=(g-a)*s,a=g);let c=Math.min(r.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),p,n,l,r,s)}),SD(e=>null!==e),ST()),_V);S_(SO(e,SD(Sm),SA(e=>null==e?void 0:e.length)),i),S_(SO(y,SA(e=>e.topListHeight)),h),S_(h,s),S_(SO(y,SA(e=>[e.top,e.bottom])),a),S_(SO(y,SA(e=>e.items)),v);let x=Sz(SO(y,SD(({items:e})=>e.length>0),SL(i,e),SD(([{items:e},t])=>e[e.length-1].originalIndex===t-1),SA(([,e,t])=>[e-1,t]),ST(_a),SA(([e])=>e))),b=Sz(SO(y,SE(200),SD(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),SA(({items:e})=>e[0].index),ST())),w=Sz(SO(y,SD(({items:e})=>e.length>0),SA(({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}}),ST(_o)));return{endReached:x,initialItemCount:m,itemsRendered:v,listState:y,rangeChanged:w,startReached:b,topItemsIndexes:g,...d}},Sx(_w,__,_z,_I,_T,_E,_C,_s),{singleton:!0}),_$=SV(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let o=SF(),a=SB(SO(Sj(n,e,r,t,i),SA(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return S_(SH(a),o),{totalListHeight:a,totalListHeightChanged:o}},Sx(S0,_W),{singleton:!0}),_G=SV(([{viewportHeight:e},{totalListHeight:t}])=>{let n=SN(!1),r=SB(SO(Sj(n,e,t),SD(([e])=>e),SA(([,e,t])=>Math.max(0,e-t)),SE(0),ST()),0);return{alignToBottom:n,paddingTopAddition:r}},Sx(S0,_$),{singleton:!0});function _U(e){return!!e&&("smooth"===e?"smooth":"auto")}let _q=(e,t)=>"function"==typeof e?_U(e(t)):t&&_U(e),_Y=SV(([{listRefresh:e,totalCount:t},{atBottomState:n,isAtBottom:r},{scrollToIndex:i},{scrolledToInitialItem:o},{didMount:a,propsReady:s},{log:l},{scrollingInProgress:u}])=>{let c=SN(!1),h=SF(),d=null;function f(e){i(0,{align:"end",behavior:e,index:"LAST"})}function p(e){setTimeout(SC(n,t=>{!e||t.atBottom||"SIZE_INCREASED"!==t.notAtBottomBecause||d||(SS(l)("scrolling to bottom due to increased size",{},S$.DEBUG),f("auto"))}),100)}return SO(Sj(SO(SH(t),SR(1)),a),SL(SH(c),r,o,u),SA(([[e,t],n,r,i,o])=>{let a=t&&i,s="auto";return a&&(s=_q(n,r||o),a=a&&!!s),{followOutputBehavior:s,shouldFollow:a,totalCount:e}}),SD(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:n})=>{d&&(d(),d=null),d=SC(e,()=>{SS(l)("following output to ",{totalCount:n},S$.DEBUG),f(t),d=null})}),SO(Sj(SH(c),t,s),SD(([e,,t])=>e&&t),SP(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),SD(({refreshed:e})=>e),SL(c,t))(1,([,e])=>{SS(o)&&p(!1!==e)}),h(1,()=>{p(!1!==SS(c))}),Sj(SH(c),n)(1,([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&f("auto")}),{autoscrollToBottom:h,followOutput:c}},Sx(_w,_E,_T,_I,_C,Sq,S0)),_X=SV(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:a},{didMount:s}])=>(S_(SO(s,SL(o),SD(([,e])=>0!==e),SL(i,r,t,n,e),SA(([[,e],t,n,r,i,o=[]])=>_j(e,t,n,r,i,o))),a),{}),Sx(_w,_I,_W,_C),{singleton:!0}),_K=SV(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=SN(0);return SO(e,SL(r),SD(([,e])=>0!==e),SA(([,e])=>({top:e})))(1,e=>{SC(SO(n,SR(1),SD(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:r}},Sx(_C,S0,_W),{singleton:!0}),_Q=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:a})=>t<a?{...i,align:null!=n?n:"start",behavior:r}:e>o?{...i,align:null!=n?n:"end",behavior:r}:null,_J=SV(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{let c=SF();return S_(SO(c,SL(t,l,n,o,i,r,s),SL(e),SA(([[e,t,n,r,i,o,s,l],u])=>{let{align:c,behavior:h,calculateViewLocation:d=_Q,done:f,...p}=e,g=_g(e,t,r-1),m=_f(g,t.offsetTree,u)+i+o,v=d({itemBottom:m+S4(t.sizeTree,g)[1],itemTop:m,locationParams:{align:c,behavior:h,...p},viewportBottom:l+n-s,viewportTop:l+o});return v?f&&SC(SO(a,SD(e=>!e),SR(SS(a)?1:2)),f):f&&f(),v}),SD(e=>null!==e)),u),{scrollIntoView:c}},Sx(_w,S0,_T,_W,Sq),{singleton:!0}),_0=SV(([{scrollVelocity:e}])=>{let t=SN(!1),n=SF(),r=SN(!1);return S_(SO(e,SL(r,t,n),SD(([e,t])=>!!t),SA(([e,t,n,r])=>{let{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),ST()),t),SO(Sj(t,e,n),SL(r))(1,([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},Sx(_E),{singleton:!0}),_1=SV(([{scrollContainerState:e,scrollTo:t}])=>{let n=SF(),r=SF(),i=SF(),o=SN(!1),a=SN(void 0);return S_(SO(Sj(n,r),SA(([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n}))),e),S_(SO(t,SL(r),SA(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:a,useWindowScroll:o,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},Sx(S0)),_2=SV(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{let u=SF(),c=SN(void 0),h=SN(null),d=SN(null);return S_(s,h),S_(l,d),SO(u,SL(t,r,a,h,d,n))(1,([e,t,n,r,i,o,a])=>{let s=S9(t.sizeTree).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i?i.k-1:1/0,size:t,startIndex:e}});r&&null!==i&&null!==o&&(n=i.scrollTop-o.offsetTop),e({ranges:s,scrollTop:n-=a})}),S_(SO(c,SD(Sm),SA(_5)),i),S_(SO(o,SL(c),SD(([,e])=>void 0!==e),ST(),SA(([,e])=>e.ranges)),e),{getState:u,restoreStateFrom:c}},Sx(_w,S0,_I,_C,_1));function _5(e){return{align:"start",index:0,offset:e.scrollTop}}let _3=SV(([{topItemsIndexes:e}])=>{let t=SN(0);return S_(SO(t,SD(e=>e>=0),SA(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},Sx(_W));function _4(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}let _8=_4(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),_6=SV(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:o,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:h,sizes:d},{log:f},{recalcInProgress:p}])=>{let g=Sz(SO(l,SL(a),SP(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:a},s])=>{let l=r+o,u=0;return t===a&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||0!=(u=l-n)&&(u+=s)),[u,i,a,l]},[0,[],0,0]),SD(([e])=>0!==e),SL(r,s,n,i,f,p),SD(([,e,t,n,,,r])=>!r&&!n&&0!==e&&"up"===t),SA(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},S$.DEBUG),e))));function m(n){var r,i;n>0?(t(0,{behavior:"auto",top:-n}),r=0,e(0,0)):(i=0,e(0,0),t(0,{behavior:"auto",top:-n}))}return SO(g,SL(e,o))(1,([t,n,r])=>{r&&_8()?e(0,n-t):m(-t)}),SO(Sj(SB(o,!1),e,p),SD(([e,t,n])=>!e&&!n&&0!==t),SA(([e,t])=>t),SE(1))(1,m),S_(SO(h,SA(e=>({top:-e}))),t),SO(u,SL(d,c),SA(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{if(0===t.length)return e*(n+i);{let o=0,a=S3(r,0),s=0,l=0;for(;s<e;){s++,o+=a;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;s+r>e&&(o-=a,r=e-s+1),s+=r,o+=r*(n+i),l++}return o}}))(1,n=>{e(0,n),requestAnimationFrame(()=>{t(0,{top:n}),requestAnimationFrame(()=>{var t;t=0,e(0,0),p(0,!1)})})}),{deviation:e}},Sx(S0,_E,_W,_w,Sq,_s)),_9=SV(([e,t,n,r,i,o,a,s,l,u])=>({...e,...t,...n,...r,...i,...o,...a,...s,...l,...u}),Sx(_z,_X,_C,_0,_$,_K,_G,_1,_J,Sq)),_7=SV(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,gap:i,groupIndices:o,itemSize:a,sizeRanges:s,sizes:l,statefulTotalCount:u,totalCount:c,trackItemSizes:h},{initialItemFinalLocationReached:d,initialTopMostItemIndex:f,scrolledToInitialItem:p},g,m,v,{listState:y,topItemsIndexes:x,...b},{scrollToIndex:w},S,{topItemCount:_},{groupCounts:C},M])=>(S_(b.rangeChanged,M.scrollSeekRangeChanged),S_(SO(M.windowViewportRect,SA(e=>e.visibleHeight)),g.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,gap:i,groupCounts:C,initialItemFinalLocationReached:d,initialTopMostItemIndex:f,scrolledToInitialItem:p,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}),Sx(_w,_I,S0,_2,_Y,_W,_T,_6,_3,__,_9)),Ce="u">typeof document?g.useLayoutEffect:g.useEffect;function Ct(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=g.createContext({});function l(e,n){var o,a,s,l;for(let i of(e.propsReady&&(o=e.propsReady,o(0,!1)),r)){a=e[t.required[i]],a(0,n[i])}for(let r of i){r in n&&(s=e[t.optional[r]],s(0,n[r]))}e.propsReady&&(l=e.propsReady,l(0,!0))}function u(e){return a.reduce((n,r)=>(n[r]=function(e){let t,n;let r=()=>null==t?void 0:t();return function(i,o){switch(i){case 1:return o?n===o?void 0:(r(),n=o,t=e(1,o)):(r(),Sv);case 2:r(),n=null;return}}}(e[t.events[r]]),n),{})}return{Component:g.forwardRef((c,h)=>{var d;let{children:f,...m}=c,[v]=g.useState(()=>{var t;return l(t=function(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:o})=>{if(o&&t.has(i))return t.get(i);let a=e(r.map(e=>n(e)));return o&&t.set(i,a),a};return n(e)}(e),m),t}),[y]=g.useState(()=>u(v));return Ce(()=>{for(let e of a)e in m&&(0,y[e])(1,m[e]);return()=>{Object.values(y).map(Sw)}},[m,y,v]),Ce(()=>{l(v,m)}),g.useImperativeHandle(h,(d=o.reduce((e,n)=>(e[n]=e=>{var r;r=v[t.methods[n]],r(0,e)},e),{}),()=>d)),(0,p.jsx)(s.Provider,{value:v,children:n?(0,p.jsx)(n,{...function(e,t){let n={},r={},i=0,o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}([...r,...i,...a],m),children:f}):f})}),useEmitter:(e,t)=>{let n=g.useContext(s)[e];Ce(()=>n(1,t),[t,n])},useEmitterValue:g.version.startsWith("18")?e=>{let t=g.useContext(s)[e],n=g.useCallback(e=>t(1,e),[t]);return g.useSyncExternalStore(n,()=>SS(t),()=>SS(t))}:e=>{let t=g.useContext(s)[e],[n,r]=g.useState(()=>SS(t));return Ce(()=>t(1,e=>{e!==n&&r(()=>e)}),[t,n]),n},usePublisher:e=>{var t;return g.useCallback((t=g.useContext(s)[e],e=>(function(e,t){e(0,t)})(t,e)),[e])}}}let Cn=g.createContext(void 0),Cr=g.createContext(void 0),Ci="u">typeof document?g.useLayoutEffect:g.useEffect;function Co(e,t,n,r=Sv,i,o){let a=g.useRef(null),s=g.useRef(null),l=g.useRef(null),u=g.useCallback(n=>{let r=n.target,i=r===window||r===document,a=o?i?window.pageXOffset||document.documentElement.scrollLeft:r.scrollLeft:i?window.pageYOffset||document.documentElement.scrollTop:r.scrollTop,u=o?i?document.documentElement.scrollWidth:r.scrollWidth:i?document.documentElement.scrollHeight:r.scrollHeight,c=o?i?window.innerWidth:r.offsetWidth:i?window.innerHeight:r.offsetHeight,h=()=>{e({scrollHeight:u,scrollTop:Math.max(a,0),viewportHeight:c})};n.suppressFlushSync?h():Sf.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 g.useEffect(()=>{let e=i||a.current;return r(i||a.current),u({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",u,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",u)}},[a,u,n,r,i]),{scrollByCallback:function(e){o&&(e={behavior:e.behavior,left:e.top}),a.current.scrollBy(e)},scrollerRef:a,scrollToCallback:function(n){let r,i,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?(i=Math.max(_u(document.documentElement,o?"width":"height"),o?document.documentElement.scrollWidth:document.documentElement.scrollHeight),r=o?window.innerWidth:window.innerHeight,u=o?document.documentElement.scrollLeft:document.documentElement.scrollTop):(i=c[o?"scrollWidth":"scrollHeight"],r=_u(c,o?"width":"height"),u=c[o?"scrollLeft":"scrollTop"]);let d=i-r;if(n.top=Math.ceil(Math.max(Math.min(d,n.top),0)),_O(r,i)||n.top===u){e({scrollHeight:i,scrollTop:u,viewportHeight:r}),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 Ca="-webkit-sticky",Cs="sticky",Cl=_4(()=>{if(typeof document>"u")return Cs;let e=document.createElement("div");return e.style.position=Ca,e.style.position===Ca?Ca:Cs});function Cu(e){return e}let Cc=SV(()=>{let e=SN(e=>`Item ${e}`),t=SN(null),n=SN(e=>`Group ${e}`),r=SN({}),i=SN(Cu),o=SN("div"),a=SN(Sv),s=(e,t=null)=>SB(SO(r,SA(t=>t[e]),ST()),t);return{components:r,computeItemKey:i,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")}}),Ch=SV(([e,t])=>({...e,...t}),Sx(_7,Cc)),Cd=({height:e})=>(0,p.jsx)("div",{style:{height:e}}),Cf={overflowAnchor:"none",position:Cl(),zIndex:1},Cp={overflowAnchor:"none"},Cg={...Cp,display:"inline-block",height:"100%"},Cm=g.memo(function({showTopList:e=!1}){let t=CP("listState"),n=CR("sizeRanges"),r=CP("useWindowScroll"),i=CP("customScrollParent"),o=CR("windowScrollContainerState"),a=CR("scrollContainerState"),s=CP("itemContent"),l=CP("context"),u=CP("groupContent"),c=CP("trackItemSizes"),h=CP("itemSize"),d=CP("log"),f=CR("gap"),m=CP("horizontalDirection"),{callbackRef:v}=SK(n,h,c,e?Sv:i||r?o:a,d,f,i,m,CP("skipAnimationFrameInResizeObserver")),[y,x]=g.useState(0);CO("deviation",e=>{y!==e&&x(e)});let b=CP("EmptyPlaceholder"),w=CP("ScrollSeekPlaceholder")||Cd,S=CP("ListComponent"),_=CP("ItemComponent"),C=CP("GroupComponent"),M=CP("computeItemKey"),k=CP("isSeeking"),T=CP("groupIndices").length>0,D=CP("alignToBottom"),A=CP("initialItemFinalLocationReached"),I=e?{}:{boxSizing:"border-box",...m?{display:"inline-block",height:"100%",marginLeft:0!==y?y:D?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==y?y:D?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...A?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&b?(0,p.jsx)(b,{...Cw(b,l)}):(0,p.jsx)(S,{...Cw(S,l),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:v,style:I,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=M(n+t.firstItemIndex,e.data,l);return k?(0,g.createElement)(w,{...Cw(w,l),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,g.createElement)(C,{...Cw(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Cf},u(e.index,l)):(0,g.createElement)(_,{...Cw(_,l),...CS(_,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:m?Cg:Cp},T?s(e.index,e.groupIndex,e.data,l):s(e.index,e.data,l))})})}),Cv={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Cy={outline:"none",overflowX:"auto",position:"relative"},Cx=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Cb={position:Cl(),top:0,width:"100%",zIndex:1};function Cw(e,t){if("string"!=typeof e)return{context:t}}function CS(e,t){return{item:"string"==typeof e?void 0:t}}let C_=g.memo(function(){let e=CP("HeaderComponent"),t=CR("headerHeight"),n=CP("HeaderFooterTag"),r=SY(g.useMemo(()=>e=>{t(_u(e,"height"))},[t]),!0,CP("skipAnimationFrameInResizeObserver")),i=CP("context");return e?(0,p.jsx)(n,{ref:r,children:(0,p.jsx)(e,{...Cw(e,i)})}):null}),CC=g.memo(function(){let e=CP("FooterComponent"),t=CR("footerHeight"),n=CP("HeaderFooterTag"),r=SY(g.useMemo(()=>e=>{t(_u(e,"height"))},[t]),!0,CP("skipAnimationFrameInResizeObserver")),i=CP("context");return e?(0,p.jsx)(n,{ref:r,children:(0,p.jsx)(e,{...Cw(e,i)})}):null});function CM({useEmitter:e,useEmitterValue:t,usePublisher:n}){return g.memo(function({children:r,style:i,...o}){let a=n("scrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),u=t("scrollerRef"),c=t("context"),h=t("horizontalDirection")||!1,{scrollByCallback:d,scrollerRef:f,scrollToCallback:g}=Co(a,l,s,u,void 0,h);return e("scrollTo",g),e("scrollBy",d),(0,p.jsx)(s,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...h?Cy:Cv,...i},tabIndex:0,...o,...Cw(s,c),children:r})})}function Ck({useEmitter:e,useEmitterValue:t,usePublisher:n}){return g.memo(function({children:r,style:i,...o}){let a=n("windowScrollContainerState"),s=t("ScrollerComponent"),l=n("smoothScrollTargetReached"),u=t("totalListHeight"),c=t("deviation"),h=t("customScrollParent"),d=t("context"),{scrollByCallback:f,scrollerRef:g,scrollToCallback:m}=Co(a,l,s,Sv,h);return Ci(()=>(g.current=h||window,()=>{g.current=null}),[g,h]),e("windowScrollTo",m),e("scrollBy",f),(0,p.jsx)(s,{"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0!==u?{height:u+c}:{}},...o,...Cw(s,d),children:r})})}let CT=({children:e})=>{let t=g.useContext(Cn),n=CR("viewportHeight"),r=CR("fixedItemHeight"),i=CP("alignToBottom"),o=CP("horizontalDirection"),a=SY(g.useMemo(()=>Sg(n,e=>_u(e,o?"width":"height")),[n,o]),!0,CP("skipAnimationFrameInResizeObserver"));return g.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,p.jsx)("div",{"data-viewport-type":"element",ref:a,style:Cx(i),children:e})},CD=({children:e})=>{let t=g.useContext(Cn),n=CR("windowViewportRect"),r=CR("fixedItemHeight"),i=SJ(n,CP("customScrollParent"),CP("skipAnimationFrameInResizeObserver")),o=CP("alignToBottom");return g.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,p.jsx)("div",{"data-viewport-type":"window",ref:i,style:Cx(o),children:e})},CA=({children:e})=>{let t=CP("TopItemListComponent")||"div",n=CP("headerHeight"),r={...Cb,marginTop:`${n}px`},i=CP("context");return(0,p.jsx)(t,{style:r,...Cw(t,i),children:e})},{Component:CI,useEmitter:CO,useEmitterValue:CP,usePublisher:CR}=Ct(Ch,{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:{}},g.memo(function(e){let t=CP("useWindowScroll"),n=CP("topItemsIndexes").length>0,r=CP("customScrollParent"),i=CP("context"),o=r||t?CL:CE,a=r||t?CD:CT;return(0,p.jsxs)(o,{...e,...Cw(o,i),children:[n&&(0,p.jsx)(CA,{children:(0,p.jsx)(Cm,{showTopList:!0})}),(0,p.jsxs)(a,{children:[(0,p.jsx)(C_,{}),(0,p.jsx)(Cm,{}),(0,p.jsx)(CC,{})]})]})})),CE=CM({useEmitter:CO,useEmitterValue:CP,usePublisher:CR}),CL=Ck({useEmitter:CO,useEmitterValue:CP,usePublisher:CR}),CN=SV(()=>{let e=SN(e=>(0,p.jsxs)("td",{children:["Item $",e]})),t=SN(null),n=SN(null),r=SN(null),i=SN({}),o=SN(Cu),a=SN(Sv),s=(e,t=null)=>SB(SO(i,SA(t=>t[e]),ST()),t);return{components:i,computeItemKey:o,context:t,EmptyPlaceholder:s("EmptyPlaceholder"),FillerRow:s("FillerRow"),fixedFooterContent:r,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")}}),CB=SV(([e,t])=>({...e,...t}),Sx(_7,CN)),CF=({height:e})=>(0,p.jsx)("tr",{children:(0,p.jsx)("td",{style:{height:e}})}),Cz=({height:e})=>(0,p.jsx)("tr",{children:(0,p.jsx)("td",{style:{border:0,height:e,padding:0}})}),CV={overflowAnchor:"none"},CZ=g.memo(function({showTopList:e=!1}){let t=CU("listState"),n=CU("computeItemKey"),r=CU("firstItemIndex"),i=CU("isSeeking"),o=CU("ScrollSeekPlaceholder")||CF,a=CU("context"),s=CU("TableRowComponent"),l=CU("fixedHeaderHeight"),u=CU("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+r,t.data,a),f=e?0===h?0:c[h-1]:0;return i?(0,g.createElement)(o,{...Cw(o,a),height:t.size,index:t.index,key:d,type:t.type||"item"}):(0,g.createElement)(s,{...Cw(s,a),...CS(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+f,zIndex:2}:CV},u(t.index,t.data,a))});return(0,p.jsx)(p.Fragment,{children:h})}),Cj=g.memo(function(){let e=CU("listState"),t=CU("topItemsIndexes").length>0,n=Cq("sizeRanges"),r=CU("useWindowScroll"),i=CU("customScrollParent"),o=Cq("windowScrollContainerState"),a=Cq("scrollContainerState"),s=CU("trackItemSizes"),{callbackRef:l,ref:u}=SK(n,CU("itemSize"),s,i||r?o:a,CU("log"),void 0,i,!1,CU("skipAnimationFrameInResizeObserver")),[c,h]=g.useState(0);CG("deviation",e=>{c!==e&&(u.current.style.marginTop=`${e}px`,h(e))});let d=CU("EmptyPlaceholder"),f=CU("FillerRow")||Cz,m=CU("TableBodyComponent"),v=CU("paddingTopAddition"),y=CU("statefulTotalCount"),x=CU("context");if(0===y&&d)return(0,p.jsx)(d,{...Cw(d,x)});let b=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),w=e.offsetTop+v+c-b,S=e.offsetBottom,_=w>0?(0,p.jsx)(f,{context:x,height:w},"padding-top"):null,C=S>0?(0,p.jsx)(f,{context:x,height:S},"padding-bottom"):null;return(0,p.jsxs)(m,{"data-testid":"virtuoso-item-list",ref:l,...Cw(m,x),children:[_,t&&(0,p.jsx)(CZ,{showTopList:!0}),(0,p.jsx)(CZ,{}),C]})}),CH=({children:e})=>{let t=g.useContext(Cn),n=Cq("viewportHeight"),r=Cq("fixedItemHeight"),i=SY(g.useMemo(()=>Sg(n,e=>_u(e,"height")),[n]),!0,CU("skipAnimationFrameInResizeObserver"));return g.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,p.jsx)("div",{"data-viewport-type":"element",ref:i,style:Cx(!1),children:e})},CW=({children:e})=>{let t=g.useContext(Cn),n=Cq("windowViewportRect"),r=Cq("fixedItemHeight"),i=SJ(n,CU("customScrollParent"),CU("skipAnimationFrameInResizeObserver"));return g.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,p.jsx)("div",{"data-viewport-type":"window",ref:i,style:Cx(!1),children:e})},{Component:C$,useEmitter:CG,useEmitterValue:CU,usePublisher:Cq}=Ct(CB,{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:{}},g.memo(function(e){let t=CU("useWindowScroll"),n=CU("customScrollParent"),r=Cq("fixedHeaderHeight"),i=Cq("fixedFooterHeight"),o=CU("fixedHeaderContent"),a=CU("fixedFooterContent"),s=CU("context"),l=SY(g.useMemo(()=>Sg(r,e=>_u(e,"height")),[r]),!0,CU("skipAnimationFrameInResizeObserver")),u=SY(g.useMemo(()=>Sg(i,e=>_u(e,"height")),[i]),!0,CU("skipAnimationFrameInResizeObserver")),c=n||t?CX:CY,h=n||t?CW:CH,d=CU("TableComponent"),f=CU("TableHeadComponent"),m=CU("TableFooterComponent"),v=o?(0,p.jsx)(f,{ref:l,style:{position:"sticky",top:0,zIndex:2},...Cw(f,s),children:o()},"TableHead"):null,y=a?(0,p.jsx)(m,{ref:u,style:{bottom:0,position:"sticky",zIndex:1},...Cw(m,s),children:a()},"TableFoot"):null;return(0,p.jsx)(c,{...e,...Cw(c,s),children:(0,p.jsx)(h,{children:(0,p.jsxs)(d,{style:{borderSpacing:0,overflowAnchor:"none"},...Cw(d,s),children:[v,(0,p.jsx)(Cj,{},"TableBody"),y]})})})})),CY=CM({useEmitter:CG,useEmitterValue:CU,usePublisher:Cq}),CX=Ck({useEmitter:CG,useEmitterValue:CU,usePublisher:Cq}),CK={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},CQ={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:CJ,floor:C0,max:C1,min:C2,round:C5}=Math;function C3(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function C4(e,t){return e&&e.width===t.width&&e.height===t.height}function C8(e,t){return e&&e.column===t.column&&e.row===t.row}let C6=SV(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:h},d,f,{didMount:p,propsReady:g},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:x,windowViewportRect:b},w])=>{let S=SN(0),_=SN(0),C=SN(CK),M=SN({height:0,width:0}),k=SN({height:0,width:0}),T=SF(),D=SF(),A=SN(0),I=SN(null),O=SN({column:0,row:0}),P=SF(),R=SF(),E=SN(!1),L=SN(0),N=SN(!0),B=SN(!1),F=SN(!1);SO(p,SL(L),SD(([e,t])=>!!t))(1,()=>{N(0,!1)}),SO(Sj(p,N,k,M,L,B),SD(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i))(1,([,,,,e])=>{B(0,!0),_D(1,()=>{T(0,e)}),SC(SO(u),()=>{t(0,[0,0]),N(0,!0)})}),S_(SO(R,SD(e=>null!=e&&e.scrollTop>0),SI(0)),_),SO(p,SL(R),SD(([,e])=>null!=e))(1,([,e])=>{e&&(M(0,e.viewport),k(0,e.item),O(0,e.gap),e.scrollTop>0&&(E(0,!0),SC(SO(u,SR(1)),e=>{E(0,!1)}),l(0,{top:e.scrollTop})))}),S_(SO(M,SA(({height:e})=>e)),h),S_(SO(Sj(SH(M,C4),SH(k,C4),SH(O,(e,t)=>e&&e.column===t.column&&e.row===t.row),SH(u)),SA(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),P),S_(SO(Sj(SH(S),r,SH(O,C8),SH(k,C4),SH(M,C4),SH(I),SH(_),SH(E),SH(N),SH(L)),SD(([,,,,,,,e])=>!e),SA(([e,[t,n],r,i,o,a,s,,l,u])=>{let c,h;let{column:d,row:f}=r,{height:p,width:g}=i,{width:m}=o;if(0===s&&(0===e||0===m))return CK;if(0===g){var v;let t=_A(u,e),n=t+Math.max(s-1,0);return v=C3(t,n,a),{...CQ,items:v}}let y=C9(m,g,d);l?0===t&&0===n&&s>0?(c=0,h=s-1):(c=y*C0((t+f)/(p+f)),h=C2(e-1,C1(h=y*CJ((n+f)/(p+f))-1,y-1)),c=C2(h,C1(0,c))):(c=0,h=-1);let x=C3(c,h,a),{bottom:b,top:w}=C7(o,r,i,x),S=CJ(e/y);return{bottom:b,itemHeight:p,items:x,itemWidth:g,offsetBottom:S*p+(S-1)*f-b,offsetTop:w,top:w}})),C),S_(SO(I,SD(e=>null!==e),SA(e=>e.length)),S),S_(SO(Sj(M,k,C,O),SD(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),SA(([e,t,{items:n},r])=>{let{bottom:i,top:o}=C7(e,r,t,n);return[o,i]}),ST(_a)),t);let z=SN(!1);S_(SO(u,SL(z),SA(([e,t])=>t||0!==e)),z);let V=Sz(SO(Sj(C,S),SD(([{items:e}])=>e.length>0),SL(z),SD(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),SA(([[,e]])=>e-1),ST())),Z=Sz(SO(SH(C),SD(({items:e})=>e.length>0&&0===e[0].index),SI(0),ST())),j=Sz(SO(SH(C),SL(E),SD(([{items:e},t])=>e.length>0&&!t),SA(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),ST(_o),SE(0)));S_(j,f.scrollSeekRangeChanged),S_(SO(T,SL(M,k,S,O),SA(([e,t,n,r,i])=>{let o=_k(e),{align:a,behavior:s,offset:l}=o,u=o.index;"LAST"===u&&(u=r-1);let c=Me(t,i,n,u=C1(0,u,C2(r-1,u)));return"end"===a?c=C5(c-t.height+n.height):"center"===a&&(c=C5(c-t.height/2+n.height/2)),l&&(c+=l),{behavior:s,top:c}})),l);let H=SB(SO(C,SA(e=>e.offsetBottom+e.bottom)),0);return S_(SO(b,SA(e=>({height:e.visibleHeight,width:e.visibleWidth}))),M),{customScrollParent:m,data:I,deviation:A,footerHeight:i,gap:O,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,...f,gridState:C,horizontalDirection:F,initialTopMostItemIndex:L,totalListHeight:H,...d,endReached:V,propsReady:g,rangeChanged:j,startReached:Z,stateChanged:P,stateRestoreInProgress:E,...w}},Sx(_z,S0,_E,_0,_C,_1,Sq));function C9(e,t,n){return C1(1,C0((e+n)/(C0(t)+n)))}function C7(e,t,n,r){let{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};let o=Me(e,t,n,r[0].index);return{bottom:Me(e,t,n,r[r.length-1].index)+i,top:o}}function Me(e,t,n,r){let i=C0(r/C9(e.width,n.width,t.column)),o=i*n.height+C1(0,i-1)*t.row;return o>0?o+t.row:o}let Mt=SV(()=>{let e=SN(e=>`Item ${e}`),t=SN({}),n=SN(null),r=SN("virtuoso-grid-item"),i=SN("virtuoso-grid-list"),o=SN(Cu),a=SN("div"),s=SN(Sv),l=(e,n=null)=>SB(SO(t,SA(t=>t[e]),ST()),n),u=SN(!1),c=SN(!1);return S_(SH(c),u),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),Mn=SV(([e,t])=>({...e,...t}),Sx(C6,Mt)),Mr=g.memo(function(){let e=Mu("gridState"),t=Mu("listClassName"),n=Mu("itemClassName"),r=Mu("itemContent"),i=Mu("computeItemKey"),o=Mu("isSeeking"),a=Mc("scrollHeight"),s=Mu("ItemComponent"),l=Mu("ListComponent"),u=Mu("ScrollSeekPlaceholder"),c=Mu("context"),h=Mc("itemDimensions"),d=Mc("gap"),f=Mu("log"),m=Mu("stateRestoreInProgress"),v=Mc("reportReadyState"),y=SY(g.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:Mf("column-gap",getComputedStyle(e).columnGap,f),row:Mf("row-gap",getComputedStyle(e).rowGap,f)})},[a,h,d,f]),!0,!1);return Ci(()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)},[e]),m?null:(0,p.jsx)(l,{className:t,ref:y,...Cw(l,c),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let a=i(t.index,t.data,c);return o?(0,p.jsx)(u,{...Cw(u,c),height:e.itemHeight,index:t.index,width:e.itemWidth},a):(0,g.createElement)(s,{...Cw(s,c),className:n,"data-index":t.index,key:a},r(t.index,t.data,c))})})}),Mi=g.memo(function(){let e=Mu("HeaderComponent"),t=Mc("headerHeight"),n=Mu("headerFooterTag"),r=SY(g.useMemo(()=>e=>{t(_u(e,"height"))},[t]),!0,!1),i=Mu("context");return e?(0,p.jsx)(n,{ref:r,children:(0,p.jsx)(e,{...Cw(e,i)})}):null}),Mo=g.memo(function(){let e=Mu("FooterComponent"),t=Mc("footerHeight"),n=Mu("headerFooterTag"),r=SY(g.useMemo(()=>e=>{t(_u(e,"height"))},[t]),!0,!1),i=Mu("context");return e?(0,p.jsx)(n,{ref:r,children:(0,p.jsx)(e,{...Cw(e,i)})}):null}),Ma=({children:e})=>{let t=g.useContext(Cr),n=Mc("itemDimensions"),r=Mc("viewportDimensions"),i=SY(g.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return g.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,p.jsx)("div",{ref:i,style:Cx(!1),children:e})},Ms=({children:e})=>{let t=g.useContext(Cr),n=Mc("windowViewportRect"),r=Mc("itemDimensions"),i=SJ(n,Mu("customScrollParent"),!1);return g.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,p.jsx)("div",{ref:i,style:Cx(!1),children:e})},{useEmitter:Ml,useEmitterValue:Mu,usePublisher:Mc}=Ct(Mn,{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"}},g.memo(function({...e}){let t=Mu("useWindowScroll"),n=Mu("customScrollParent"),r=n||t?Md:Mh,i=n||t?Ms:Ma,o=Mu("context");return(0,p.jsx)(r,{...e,...Cw(r,o),children:(0,p.jsxs)(i,{children:[(0,p.jsx)(Mi,{}),(0,p.jsx)(Mr,{}),(0,p.jsx)(Mo,{})]})})})),Mh=CM({useEmitter:Ml,useEmitterValue:Mu,usePublisher:Mc}),Md=Ck({useEmitter:Ml,useEmitterValue:Mu,usePublisher:Mc});function Mf(e,t,n){return"normal"===t||null!=t&&t.endsWith("px")||n(`${e} was not resolved to pixel value correctly`,t,S$.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var Mp=n(3037),Mg=n(4544),Mm=n(6758),Mv=n(1183),My=n(8849);function Mx(e){return(0,T.ZP)("MuiListItemButton",e)}let Mb=(0,k.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Mw=e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e,l=(0,y.Z)({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},Mx,n);return{...n,...l}},MS=(0,S.ZP)(Mg.Z,{shouldForwardProp:e=>(0,Mp.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,_.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"}},[`&.${Mb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Mb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,x.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,x.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,x.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Mb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Mb.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}}]}))),M_=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:c,selected:h=!1,className:d,...f}=n,m=g.useContext(My.Z),y=g.useMemo(()=>({dense:s||m.dense||!1,alignItems:r,disableGutters:l}),[r,m.dense,s,l]),x=g.useRef(null);(0,Mm.Z)(()=>{i&&x.current&&x.current.focus()},[i]);let b={...n,alignItems:r,dense:y.dense,disableGutters:l,divider:u,selected:h},w=Mw(b),S=(0,Mv.Z)(x,t);return(0,p.jsx)(My.Z.Provider,{value:y,children:(0,p.jsx)(MS,{ref:S,href:f.href||f.to,component:(f.href||f.to)&&"div"===o?"button":o,focusVisibleClassName:(0,v.Z)(w.focusVisible,c),ownerState:b,className:(0,v.Z)(w.root,d),...f,classes:w,children:a})})});var MC=n(2577);function MM(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}let Mk=(0,g.memo)(function({color:e,sx:t,...n}){return(0,p.jsx)(vL.Z,{...n,sx:MM({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})}),MT=(0,g.forwardRef)(function({item:e,sx:t,truncateLabel:n,onClick:r,isVisuallySelected:i,onMouseOver:o,onMouseOut:a,index:s,...l},u){let[c,h]=(0,g.useState)(n);return(0,p.jsxs)(M_,{...l,role:"listitem",sx:MM({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{r(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:i,ref:u,children:[(0,p.jsx)(vL.Z,{sx:{display:"flex",alignItems:"center"},children:(0,p.jsx)(Mk,{color:e.color})}),(0,p.jsx)(MC.Z,{primary:e.label,primaryTypographyProps:{noWrap:c},onMouseOver:function(){n&&h(!1)},onMouseOut:function(){n&&h(!0)}})]})}),MD=(0,g.memo)(MT);function MA(e,t){return"ALL"!==t&&!!t[e.id]}function MI({items:e,height:t,width:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:o,onItemMouseOut:a}){let s=e.length>5;return(0,p.jsx)(CI,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,p.jsx)(MD,{item:t,index:e,truncateLabel:s,isVisuallySelected:MA(t,r),onClick:i,onMouseOver:o,onMouseOut:a,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function MO({height:e,items:t,selectedItems:n,onLegendItemClick:r,onItemMouseOver:i,onItemMouseOut:o}){return(0,p.jsx)(vL.Z,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map((e,t)=>(0,p.jsx)(MD,{item:e,index:t,isVisuallySelected:MA(e,n),onMouseOver:i,onMouseOut:o,onClick:r,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id))})}function MP(e,t){return"function"==typeof e?e(t):e}function MR(e,t){return n=>{t.setState(t=>({...t,[e]:MP(n,t[e])}))}}function ME(e){return e instanceof Function}function ML(e,t,n){let r,i=[];return o=>{let a,s;n.key&&n.debug&&(a=Date.now());let l=e(o);if(!(l.length!==i.length||l.some((e,t)=>i[t]!==e)))return r;if(i=l,n.key&&n.debug&&(s=Date.now()),r=t(...l),null==n||null==n.onChange||n.onChange(r),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,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
|
|
3
|
-
font-size: .6rem;
|
|
4
|
-
font-weight: bold;
|
|
5
|
-
color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return r}}function MN(e,t,n,r){return{debug:()=>{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}let MB="debugHeaders";function MF(e,t,n){var r;let i={id:null!=(r=n.id)?r: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(i),e},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(t=>{null==t.createHeader||t.createHeader(i,e)}),i}function Mz(e,t,n,r){var i,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 i={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},o=[];e.forEach(e=>{let a;let s=[...o].reverse()[0],l=e.column.depth===i.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 i=MF(n,a,{id:[r,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});i.subHeaders.push(e),o.push(i)}i.headers.push(e),e.headerGroup=i}),l.push(i),t>0&&u(o,t-1)};u(t.map((e,t)=>MF(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,r=[0];return e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1,n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(null!=(i=null==(o=l[0])?void 0:o.headers)?i:[]),l}let MV=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,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,r),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,r):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=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);null!=i&&i.length&&r(i)})};return r(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:ML(()=>[e.getAllLeafColumns()],t=>t.map(t=>(function(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=i.getValue())?t:e.options.renderFallbackValue},getContext:ML(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),MN(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{null==r.createCell||r.createCell(i,n,t,e)},{}),i})(e,s,t,t.id)),MN(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ML(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),MN(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},MZ=(e,t,n)=>{var r,i;let o=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return!!(null==(i=e.getValue(t))||null==(i=i.toString())||null==(i=i.toLowerCase())?void 0:i.includes(o))};MZ.autoRemove=e=>MK(e);let Mj=(e,t,n)=>{var r;return!!(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};Mj.autoRemove=e=>MK(e);let MH=(e,t,n)=>{var r;return(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.toLowerCase())===(null==n?void 0:n.toLowerCase())};MH.autoRemove=e=>MK(e);let MW=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};MW.autoRemove=e=>MK(e);let M$=(e,t,n)=>!n.some(n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))});M$.autoRemove=e=>MK(e)||!(null!=e&&e.length);let MG=(e,t,n)=>n.some(n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)});MG.autoRemove=e=>MK(e)||!(null!=e&&e.length);let MU=(e,t,n)=>e.getValue(t)===n;MU.autoRemove=e=>MK(e);let Mq=(e,t,n)=>e.getValue(t)==n;Mq.autoRemove=e=>MK(e);let MY=(e,t,n)=>{let[r,i]=n,o=e.getValue(t);return o>=r&&o<=i};MY.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,i="number"!=typeof n?parseFloat(n):n,o=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(i)?1/0:i;if(o>a){let e=o;o=a,a=e}return[o,a]},MY.autoRemove=e=>MK(e)||MK(e[0])&&MK(e[1]);let MX={includesString:MZ,includesStringSensitive:Mj,equalsString:MH,arrIncludes:MW,arrIncludesAll:M$,arrIncludesSome:MG,equals:MU,weakEquals:Mq,inNumberRange:MY};function MK(e){return null==e||""===e}function MQ(e,t,n){return!!e&&!!e.autoRemove&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}let MJ={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+("number"==typeof r?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(r<n||void 0===r&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);null!=i&&(i*=1)>=i&&(++n,r+=i)}),n)return r/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 r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2!=0?i[r]:(i[r-1]+i[r])/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},M0=()=>({left:[],right:[]}),M1={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},M2=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),M5=null;function M3(e){return"touchstart"===e.type}function M4(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}let M8=()=>({pageIndex:0,pageSize:10}),M6=()=>({top:[],bottom:[]}),M9=(e,t,n,r,i)=>{var o;let a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(o=a.subRows)&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(t=>M9(e,t.id,n,r,i))};function M7(e,t){let n=e.getState().rowSelection,r=[],i={},o=function(e,t){return e.map(e=>{var t;let a=ke(e,n);if(a&&(r.push(e),i[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:r,rowsById:i}}function ke(e,t){var n;return null!=(n=t[e.id])&&n}function kt(e,t,n){var r;if(!(null!=(r=e.subRows)&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(e=>{if((!o||i)&&(e.getCanSelect()&&(ke(e,t)?o=!0:i=!1),e.subRows&&e.subRows.length)){let n=kt(e,t);"all"===n?o=!0:("some"===n&&(o=!0),i=!1)}}),i?"all":!!o&&"some"}let kn=/([0-9]+)/gm;function kr(e,t){return e===t?0:e>t?1:-1}function ki(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function ko(e,t){let n=e.split(kn).filter(Boolean),r=t.split(kn).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),o=parseInt(t,10),a=[i,o].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return -1;continue}if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>o)return 1;if(o>i)return -1}return n.length-r.length}let ka={alphanumeric:(e,t,n)=>ko(ki(e.getValue(n)).toLowerCase(),ki(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>ko(ki(e.getValue(n)),ki(t.getValue(n))),text:(e,t,n)=>kr(ki(e.getValue(n)).toLowerCase(),ki(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>kr(ki(e.getValue(n)),ki(t.getValue(n))),datetime:(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},basic:(e,t,n)=>kr(e.getValue(n),t.getValue(n))},ks=[{createTable:e=>{e.getHeaderGroups=ML(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;let s=null!=(o=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?o:[],l=null!=(a=null==i?void 0:i.map(e=>n.find(t=>t.id===e)).filter(Boolean))?a:[];return Mz(t,[...s,...n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),...l],e)},MN(e.options,MB,"getHeaderGroups")),e.getCenterHeaderGroups=ML(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>Mz(t,n=n.filter(e=>!(null!=r&&r.includes(e.id))&&!(null!=i&&i.includes(e.id))),e,"center"),MN(e.options,MB,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ML(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;return Mz(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"left")},MN(e.options,MB,"getLeftHeaderGroups")),e.getRightHeaderGroups=ML(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;return Mz(t,null!=(i=null==r?void 0:r.map(e=>n.find(t=>t.id===e)).filter(Boolean))?i:[],e,"right")},MN(e.options,MB,"getRightHeaderGroups")),e.getFooterGroups=ML(()=>[e.getHeaderGroups()],e=>[...e].reverse(),MN(e.options,MB,"getFooterGroups")),e.getLeftFooterGroups=ML(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),MN(e.options,MB,"getLeftFooterGroups")),e.getCenterFooterGroups=ML(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),MN(e.options,MB,"getCenterFooterGroups")),e.getRightFooterGroups=ML(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),MN(e.options,MB,"getRightFooterGroups")),e.getFlatHeaders=ML(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),MN(e.options,MB,"getFlatHeaders")),e.getLeftFlatHeaders=ML(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),MN(e.options,MB,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ML(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),MN(e.options,MB,"getCenterFlatHeaders")),e.getRightFlatHeaders=ML(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),MN(e.options,MB,"getRightFlatHeaders")),e.getCenterLeafHeaders=ML(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),MN(e.options,MB,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ML(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),MN(e.options,MB,"getLeftLeafHeaders")),e.getRightLeafHeaders=ML(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}),MN(e.options,MB,"getRightLeafHeaders")),e.getLeafHeaders=ML(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>{var r,i,o,a,s,l;return[...null!=(r=null==(i=e[0])?void 0:i.headers)?r:[],...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()},MN(e.options,MB,"getLeafHeaders"))}},{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:MR("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,r;let i=e.columns;return null==(n=i.length?i.some(e=>e.getIsVisible()):null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},e.getCanHide=()=>{var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},e.getToggleVisibilityHandler=()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ML(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),MN(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ML(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],MN(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(t,n)=>ML(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join("_")],e=>e.filter(e=>null==e.getIsVisible?void 0:e.getIsVisible()),MN(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:MR("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ML(e=>[M4(t,e)],t=>t.findIndex(t=>t.id===e.id),MN(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return(null==(r=M4(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;let i=M4(t,n);return(null==(r=i[i.length-1])?void 0:r.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=ML(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(null!=e&&e.length){let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}else i=r;return function(e,t,n){if(!(null!=t&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return"remove"===n?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}(i,t,n)},MN(e.options,"debugTable","_getOrderColumnsFn"))}},{getInitialState:e=>({columnPinning:M0(),...e}),getDefaultOptions:e=>({onColumnPinningChange:MR("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>{var t,i,o,a,s,l;return"right"===n?{left:(null!=(o=null==e?void 0:e.left)?o:[]).filter(e=>!(null!=r&&r.includes(e))),right:[...(null!=(a=null==e?void 0:e.right)?a:[]).filter(e=>!(null!=r&&r.includes(e))),...r]}:"left"===n?{left:[...(null!=(s=null==e?void 0:e.left)?s:[]).filter(e=>!(null!=r&&r.includes(e))),...r],right:(null!=(l=null==e?void 0:e.right)?l:[]).filter(e=>!(null!=r&&r.includes(e)))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter(e=>!(null!=r&&r.includes(e))),right:(null!=(i=null==e?void 0:e.right)?i:[]).filter(e=>!(null!=r&&r.includes(e)))}})},e.getCanPin=()=>e.getLeafColumns().some(e=>{var n,r,i;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(i=t.options.enableColumnPinning)?i:t.options.enablePinning)||r)}),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==i?void 0:i.includes(e));return o?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();return i?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[i])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ML(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.column.id))},MN(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ML(()=>[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"})),MN(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ML(()=>[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"})),MN(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?M0():null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:M0())},e.getIsSomeColumnsPinned=t=>{var n,r,i;let o=e.getState().columnPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.left)?void 0:r.length)||(null==(i=o.right)?void 0:i.length))},e.getLeftLeafColumns=ML(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),MN(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ML(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(null!=t?t:[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),MN(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ML(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...null!=t?t:[],...null!=n?n:[]];return e.filter(e=>!r.includes(e.id))},MN(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:MR("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?MX.includesString:"number"==typeof r?MX.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?MX.equals:Array.isArray(r)?MX.arrIncludes:MX.weakEquals},e.getFilterFn=()=>{var n,r;return ME(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:MX[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(i=t.options.enableFilters)||i)&&!!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,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex(t=>t.id===e.id))?n:-1},e.setFilterValue=n=>{t.setColumnFilters(t=>{var r,i;let o=e.getFilterFn(),a=null==t?void 0:t.find(t=>t.id===e.id),s=MP(n,a?a.value:void 0);if(MQ(o,s,e))return null!=(r=null==t?void 0:t.filter(t=>t.id!==e.id))?r:[];let l={id:e.id,value:s};return a?null!=(i=null==t?void 0:t.map(t=>t.id===e.id?l:t))?i:[]: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 r;return null==(r=MP(t,e))?void 0:r.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&MQ(t.getFilterFn(),e.value,t))})})},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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:MR("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;let r=null==(n=e.getCoreRowModel().flatRows[0])||null==(n=n._getAllCellsByColumnId()[t.id])?void 0:n.getValue();return"string"==typeof r||"number"==typeof r}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(i=t.options.enableFilters)||i)&&(null==(o=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||o)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>MX.includesString,e.getGlobalFilterFn=()=>{var t,n;let{globalFilterFn:r}=e.options;return ME(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:MX[r]},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:MR("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!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 ka.datetime;if("string"==typeof n&&(r=!0,n.split(kn).length>1))return ka.alphanumeric}return r?ka.text:ka.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,r;if(!e)throw Error();return ME(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:ka[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=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"===i;if("toggle"!=(s=null!=a&&a.length&&e.getCanMultiSort()&&r?l?"toggle":"add":null!=a&&a.length&&u!==a.length-1?"replace":l?"toggle":"replace")||o||i||(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,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;let o=e.getFirstSortDir(),a=e.getIsSorted();return a?(a===o||null!=(r=t.options.enableSortingRemoval)&&!r||!!n&&null!=(i=t.options.enableMultiRemove)&&!i)&&("desc"===a?"asc":"desc"):o},e.getCanSort=()=>{var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},e.getIsSorted=()=>{var n;let r=null==(n=t.getState().sorting)?void 0:n.find(t=>t.id===e.id);return!!r&&(r.desc?"desc":"asc")},e.getSortIndex=()=>{var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.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 r=>{n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}},createTable:e=>{e.setSorting=t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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:MR("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,r;return(null==(n=e.columnDef.enableGrouping)||n)&&(null==(r=t.options.enableGrouping)||r)&&(!!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],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?MJ.sum:"[object Date]"===Object.prototype.toString.call(r)?MJ.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw Error();return ME(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:MJ[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.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 r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{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:MR("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetExpanded)?r:!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,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.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(r=>{var i;let o=!0===r||!!(null!=r&&r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n=null!=(i=n)?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{var n;let r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},e.getCanExpand=()=>{var n,r,i;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!!(null!=(i=e.subRows)&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)n=(r=t.getRow(r.parentId,!0)).getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{...M8(),...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:MR("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if(null!=(r=null!=(i=e.options.autoResetAll)?i:e.options.autoResetPageIndex)?r:!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=>MP(t,e)),e.resetPagination=t=>{var n;e.setPagination(t?M8():null!=(n=e.initialState.pagination)?n:M8())},e.setPageIndex=t=>{e.setPagination(n=>{let r=MP(t,n.pageIndex);return r=Math.max(0,Math.min(r,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n,r;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageIndex)?n:0)},e.resetPageSize=t=>{var n,r;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(r=r.pagination)?void 0:r.pageSize)?n:10)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,MP(t,e.pageSize)),r=Math.floor(e.pageSize*e.pageIndex/n);return{...e,pageIndex:r,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{var r;let i=MP(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof i&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=ML(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},MN(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:M6(),...e}),getDefaultOptions:e=>({onRowPinningChange:MR("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let o=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],a=new Set([...i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],e.id,...o]);t.setRowPinning(e=>{var t,r,i,o,s,l;return"bottom"===n?{top:(null!=(i=null==e?void 0:e.top)?i:[]).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!=(r=null==e?void 0:e.bottom)?r:[]).filter(e=>!(null!=a&&a.has(e)))}})},e.getCanPin=()=>{var n;let{enableRowPinning:r,enablePinning:i}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:i)||n},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(e=>null==r?void 0:r.includes(e)),a=n.some(e=>null==i?void 0:i.includes(e));return o?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;let i=e.getIsPinned();if(!i)return -1;let o=null==(n="top"===i?t.getTopRows():t.getBottomRows())?void 0:n.map(e=>{let{id:t}=e;return t});return null!=(r=null==o?void 0:o.indexOf(e.id))?r:-1}},createTable:e=>{e.setRowPinning=t=>null==e.options.onRowPinningChange?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?M6():null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:M6())},e.getIsSomeRowsPinned=t=>{var n,r,i;let o=e.getState().rowPinning;return t?!!(null==(n=o[t])?void 0:n.length):!!((null==(r=o.top)?void 0:r.length)||(null==(i=o.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var i;return(null==(i=e.options.keepPinnedRows)||i?(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:r}))},e.getTopRows=ML(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),MN(e.options,"debugRows","getTopRows")),e.getBottomRows=ML(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),MN(e.options,"debugRows","getBottomRows")),e.getCenterRows=ML(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter(e=>!r.has(e.id))},MN(e.options,"debugRows","getCenterRows"))}},{getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:MR("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 r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=void 0!==t?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(t=>{M9(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ML(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?M7(e,n):{rows:[],flatRows:[],rowsById:{}},MN(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ML(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?M7(e,n):{rows:[],flatRows:[],rowsById:{}},MN(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ML(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?M7(e,n):{rows:[],flatRows:[],rowsById:{}},MN(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},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,r)=>{let i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=void 0!==n?n:!i,e.getCanSelect()&&i===n)return o;let s={...o};return M9(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return ke(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return"some"===kt(e,n)},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return"all"===kt(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 r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},{getDefaultColumnDef:()=>M1,getInitialState:e=>({columnSizing:{},columnSizingInfo:M2(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:MR("columnSizing",e),onColumnSizingInfoChange:MR("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;let o=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:M1.minSize,null!=(r=null!=o?o:e.columnDef.size)?r:M1.size),null!=(i=e.columnDef.maxSize)?i:M1.maxSize)},e.getStart=ML(e=>[e,M4(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),MN(t.options,"debugColumns","getStart")),e.getAfter=ML(e=>[e,M4(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),MN(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>{var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},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 r;t+=null!=(r=e.column.getSize())?r: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 r=t.getColumn(e.column.id),i=null==r?void 0:r.getCanResize();return o=>{if(!r||!i||(null==o.persist||o.persist(),M3(o)&&o.touches&&o.touches.length>1))return;let a=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],l=M3(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo(e=>{var r,i;let o="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*o,s=Math.max(a/(null!=(i=null==e?void 0:e.startSize)?i: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:[]}))},f=n||"undefined"!=typeof document?document:null,p={moveHandler:e=>h(e.clientX),upHandler:e=>{null==f||f.removeEventListener("mousemove",p.moveHandler),null==f||f.removeEventListener("mouseup",p.upHandler),d(e.clientX)}},g={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0].clientX),!1),upHandler:e=>{var t;null==f||f.removeEventListener("touchmove",g.moveHandler),null==f||f.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 M5)return M5;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 M5=e}()&&{passive:!1};M3(o)?(null==f||f.addEventListener("touchmove",g.moveHandler,m),null==f||f.addEventListener("touchend",g.upHandler,m)):(null==f||f.addEventListener("mousemove",p.moveHandler,m),null==f||f.addEventListener("mouseup",p.upHandler,m)),t.setColumnSizingInfo(e=>({...e,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.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?M2():null!=(n=e.initialState.columnSizingInfo)?n:M2())},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 kl=n(2641);function ku(e){return(0,T.ZP)("MuiTableRow",e)}let kc=(0,k.Z)("MuiTableRow",["root","selected","hover","head","footer"]),kh=e=>{let{classes:t,selected:n,hover:r,head:i,footer:o}=e;return(0,y.Z)({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},ku,t)},kd=(0,S.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,_.Z)(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${kc.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${kc.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.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,x.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),kf=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTableRow"}),{className:r,component:i="tr",hover:o=!1,selected:a=!1,...s}=n,l=g.useContext(kl.Z),u={...n,component:i,hover:o,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant},c=kh(u);return(0,p.jsx)(kd,{as:i,ref:t,className:(0,v.Z)(c.root,r),role:"tr"===i?null:"row",ownerState:u,...s})});var kp=n(9449);let kg=(0,g.forwardRef)(function(e,t){return(0,p.jsx)(kf,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,x.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})});function km(e){return(0,T.ZP)("MuiTableBody",e)}(0,k.Z)("MuiTableBody",["root"]);let kv=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},km,t)},ky=(0,S.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),kx={variant:"body"},kb="tbody",kw=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTableBody"}),{className:r,component:i=kb,...o}=n,a={...n,component:i},s=kv(a);return(0,p.jsx)(kl.Z.Provider,{value:kx,children:(0,p.jsx)(ky,{className:(0,v.Z)(s.root,r),as:i,ref:t,role:i===kb?null:"rowgroup",ownerState:a,...o})})}),kS=(0,g.forwardRef)(function(e,t){return(0,p.jsx)(kw,{...e,ref:t})});var k_=n(2679);function kC(e){return(0,T.ZP)("MuiTable",e)}(0,k.Z)("MuiTable",["root","stickyHeader"]);let kM=e=>{let{classes:t,stickyHeader:n}=e;return(0,y.Z)({root:["root",n&&"stickyHeader"]},kC,t)},kk=(0,S.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((0,_.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"}}]}))),kT="table",kD=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTable"}),{className:r,component:i=kT,padding:o="normal",size:a="medium",stickyHeader:s=!1,...l}=n,u={...n,component:i,padding:o,size:a,stickyHeader:s},c=kM(u),h=g.useMemo(()=>({padding:o,size:a,stickyHeader:s}),[o,a,s]);return(0,p.jsx)(k_.Z.Provider,{value:h,children:(0,p.jsx)(kk,{as:i,role:i===kT?null:"table",ref:t,className:(0,v.Z)(c.root,r),ownerState:u,...l})})}),kA=(0,S.ZP)(kD)(({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default})),kI={compact:"small",standard:"medium",comfortable:"medium"},kO=(0,g.forwardRef)(function({density:e,...t},n){return(0,p.jsx)(kA,{...t,tabIndex:-1,size:kI[e],ref:n,sx:{width:"100%"}})});function kP(e){return(0,T.ZP)("MuiTableHead",e)}(0,k.Z)("MuiTableHead",["root"]);let kR=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},kP,t)},kE=(0,S.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),kL={variant:"head"},kN="thead",kB=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTableHead"}),{className:r,component:i=kN,...o}=n,a={...n,component:i},s=kR(a);return(0,p.jsx)(kl.Z.Provider,{value:kL,children:(0,p.jsx)(kE,{as:i,className:(0,v.Z)(s.root,r),ref:t,role:i===kN?null:"rowgroup",ownerState:a,...o})})}),kF=(0,g.forwardRef)(function(e,t){return(0,p.jsx)(kB,{...e,ref:t})});var kz=n(2054),kV=n(247);let kZ=(0,kV.Z)((0,p.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function kj(e){return(0,T.ZP)("MuiTableSortLabel",e)}let kH=(0,k.Z)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);var kW=n(6351);let k$=e=>{let{classes:t,direction:n,active:r}=e,i={root:["root",r&&"active",`direction${(0,w.Z)(n)}`],icon:["icon",`iconDirection${(0,w.Z)(n)}`]};return(0,y.Z)(i,kj,t)},kG=(0,S.ZP)(Mg.Z,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,_.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,[`& .${kH.icon}`]:{opacity:.5}},[`&.${kH.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${kH.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),kU=(0,S.ZP)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,w.Z)(n.direction)}`]]}})((0,_.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)"}}]}))),kq=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:o,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=kZ,slots:u={},slotProps:c={},...h}=n,d={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},f=k$(d),g={slots:u,slotProps:c},[m,y]=(0,kW.Z)("root",{elementType:kG,externalForwardedProps:g,ownerState:d,className:(0,v.Z)(f.root,o),ref:t}),[x,b]=(0,kW.Z)("icon",{elementType:kU,externalForwardedProps:g,ownerState:d,className:f.icon});return(0,p.jsxs)(m,{disableRipple:!0,component:"span",...y,...h,children:[i,s&&!r?null:(0,p.jsx)(x,{as:l,...b})]})});var kY=n(6205);let kX=150,kK=40;function kQ(e,t,{isHeader:n,isLastColumn:r,isFirstColumn:i,defaultColumnHeight:o}={}){var a,s;let l=e.spacing(1),u=e.spacing(1.25),c=e.spacing(2),h=i?c:u,d=r?c:u,f=e.typography.body1.lineHeight,p=e.typography.body1.fontSize;"compact"===t&&(l=e.spacing(.5),u=e.spacing(.5),c=e.spacing(1),h=i?c:u,d=r?c:u,f=e.typography.body2.lineHeight,p=e.typography.body2.fontSize),"comfortable"===t&&(l=e.spacing(2),u=e.spacing(1.5),c=e.spacing(2),h=i?c:u,d=r?c:u,f=e.typography.body1.lineHeight,p=e.typography.body1.fontSize);let g=n||!o||"auto"===o?(a=f,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:p,lineHeight:f}}function kJ(e){return e.map(({width:e,align:t,headerDescription:n,cellDescription:r,enableSorting:i,...o})=>({...o,..."auto"===e||void 0===e?{size:0,minSize:0,maxSize:0}:{size:e},enableSorting:!!i,meta:{align:t,headerDescription:n,cellDescription:r}}))}let k0=(0,S.ZP)(kY.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 k1({children:e,density:t,variant:n,width:r,defaultColumnHeight:i,focusState:o="none",onFocusTrigger:a,isFirstColumn:s,isLastColumn:l,description:u,align:c,color:h,backgroundColor:d,...f}){let m=(0,wP.Z)(),v=(0,g.useRef)(),y="head"===n;(0,g.useEffect)(()=>{"trigger-focus"===o&&v.current&&v.current.focus()},[o]);let x=e=>{a?.(e)};return(0,p.jsx)(k0,{...f,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:x,onKeyUp:x,style:{width:r},sx:{position:"relative",borderBottom:y?`solid 1px ${m.palette.grey[100]}`:`solid 1px ${m.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??m.palette.background.default} !important`,outline:`solid 1px ${m.palette.info.main}`,outlineOffset:"-1px"}},ref:v,children:(0,p.jsx)(vL.Z,{id:"original-cell",sx:{...kQ(m,t,{isHeader:y,isLastColumn:l,isFirstColumn:s,defaultColumnHeight:i}),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 k2({onSort:e,sortDirection:t,nextSortDirection:n,children:r,...i}){let o=!!e,a=(0,p.jsx)(kz.Z,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:r}),s=!!t;return(0,p.jsx)(k1,{...i,children:o?(0,p.jsx)(kq,{onClick:e,direction:s?t:n,active:s,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${kH.icon}`]:{opacity:s?1:.5}}},children:a}):a})}function k5(e){return(0,T.ZP)("MuiTableContainer",e)}(0,k.Z)("MuiTableContainer",["root"]);let k3=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},k5,t)},k4=(0,S.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),k8=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTableContainer"}),{className:r,component:i="div",...o}=n,a={...n,component:i},s=k3(a);return(0,p.jsx)(k4,{ref:t,as:i,className:(0,v.Z)(s.root,r),ownerState:a,...o})}),k6=(0,g.forwardRef)(function(e,t){return(0,p.jsx)(k8,{...e,tabIndex:-1,ref:t})}),k9={row:0,column:0},k7=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];function Te(e){return(0,T.ZP)("MuiTableFooter",e)}(0,k.Z)("MuiTableFooter",["root"]);let Tt=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},Te,t)},Tn=(0,S.ZP)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),Tr={variant:"footer"},Ti="tfoot",To=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTableFooter"}),{className:r,component:i=Ti,...o}=n,a={...n,component:i},s=Tt(a);return(0,p.jsx)(kl.Z.Provider,{value:Tr,children:(0,p.jsx)(Tn,{as:i,className:(0,v.Z)(s.root,r),ref:t,role:i===Ti?null:"rowgroup",ownerState:a,...o})})}),Ta=(0,g.forwardRef)(function(e,t){return(0,p.jsx)(To,{...e,ref:t})});function Ts({width:e,height:t,density:n,defaultColumnWidth:r,defaultColumnHeight:i,onRowClick:o,onRowMouseOver:a,onRowMouseOut:s,rows:l,columns:u,headers:c,cellConfigs:h,pagination:d,onPaginationChange:f,rowCount:m}){let v=(0,g.useRef)(null),y=(0,g.useRef)({startIndex:0,endIndex:0}),x=function({visibleRange:e,virtualTable:t,maxRows:n,maxColumns:r}){return function({maxRows:e,maxColumns:t,onActiveCellChange:n}){let[r,i]=(0,g.useState)(k9),[o,a]=(0,g.useState)(!1);return{activeCell:r,isActive:o,onTableKeyDown:(0,g.useCallback)(r=>{let o=r.key;(k7.includes(o)||"Home"===o||"End"===o||"PageDown"===o||"PageUp"===o)&&i(i=>{let a=i.row,s=i.column;"ArrowRight"===o&&s<t-1?(r.preventDefault(),s+=1):"ArrowLeft"===o&&s>0?(r.preventDefault(),s-=1):"ArrowDown"===o&&a<e-1?(r.preventDefault(),a+=1):"ArrowUp"===o&&a>0?(r.preventDefault(),a-=1):"Home"===o?(r.preventDefault(),a=0,s=0):"End"===o&&(r.preventDefault(),a=e-1,s=t-1);let l={column:s,row:a},u=n?.(r,i,l)||l;return u.row===i.row&&u.column===i.column?i:u})},[t,e,n]),onCellFocus:e=>{(e.column!==r.column||e.row!==r.row||!o)&&(a(!0),i(e))}}}({maxRows:n,maxColumns:r,onActiveCellChange:(r,i,o)=>{let a=r.key,s=o&&(i.column!==o.column||i.row!==o.row),l=o?.row??i.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){r.preventDefault();let o=i.row;return o=Math.min(n-1,e.current.endIndex+1),t.current?.scrollToIndex({index:o-1,align:"start"}),{row:o,column:i.column}}else if("PageUp"===a){let n=i.row;return n=Math.max(0,e.current.startIndex-1),t.current?.scrollToIndex({index:n-1,align:"end"}),{row:n,column:i.column}}return o}})}({visibleRange:y,virtualTable:v,maxRows:l.length+1,maxColumns:u.length}),b=e=>e.row===x.activeCell.row&&e.column===x.activeCell.column?x.isActive?"trigger-focus":"focus-next":"none",w=(0,g.useMemo)(()=>({Scroller:k6,Table:t=>(0,p.jsx)(kO,{...t,width:e,density:n,onKeyDown:x.onTableKeyDown}),TableHead:kF,TableFoot:Ta,TableRow:({item:e,...t})=>{let r=l[t["data-index"]];if(!r)return null;let i={id:r.id,index:r.index};return(0,p.jsx)(kg,{...t,onClick:e=>o(e,r.id),density:n,onMouseOver:e=>{a?.(e,i)},onMouseOut:e=>{s?.(e,i)}})},TableBody:kS}),[n,x.onTableKeyDown,o,s,a,l,e]),S=(e,t)=>{d&&f&&f({...d,pageIndex:t})},_=e=>{d&&f&&f({pageIndex:0,pageSize:parseInt(e.target.value,10)})};return(0,p.jsx)(vL.Z,{style:{width:e,height:t},children:(0,p.jsx)(C$,{ref:v,totalCount:l.length,components:w,rangeChanged:e=>{y.current=e},fixedHeaderContent:()=>(0,p.jsx)(p.Fragment,{children:c.map(e=>(0,p.jsx)(kg,{density:n,children:e.headers.map((e,t,o)=>{var a,s,l,u,c;let h=e.column,d={row:0,column:t},f=h.getIsSorted(),m=h.getNextSortingOrder();return(0,p.jsx)(k2,{onSort:h.getCanSort()?h.getToggleSortingHandler():void 0,sortDirection:"string"==typeof f?f:void 0,nextSortDirection:"string"==typeof m?m:void 0,width:h.getSize()||r,defaultColumnHeight:i,align:h.columnDef.meta?.align,variant:"head",density:n,description:h.columnDef.meta?.headerDescription,focusState:b(d),onFocusTrigger:()=>x.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)?g.createElement(a,s):a:null)},e.id)})},e.id))}),fixedFooterContent:d?()=>(0,p.jsx)(kf,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,p.jsx)(kp.Z,{colSpan:u.length,count:m,page:d.pageIndex,rowsPerPage:d.pageSize,onPageChange:S,onRowsPerPageChange:_})}):void 0,itemContent:e=>{let t=l[e];return t?(0,p.jsx)(p.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,f="function"==typeof d?d(u):null,g=t.column.columnDef.meta?.cellDescription;return"function"==typeof g?s=g(u):g&&"string"==typeof f&&(s=f),(0,p.jsx)(k1,{"data-testid":t.id,title:s||c?.text||f,width:t.column.getSize()||r,defaultColumnHeight:i,align:t.column.columnDef.meta?.align,density:n,focusState:b(l),onFocusTrigger:()=>x.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||f},t.id)})}):null}})})}var Tl=n(2707);function Tu({color:e,density:t,...n}){let r="compact"===t;return(0,p.jsx)(Tl.Z,{size:r?"small":"medium",...n,focusRipple:!1,tabIndex:-1,sx:{color:e,padding:e=>e.spacing(r?.25:.5),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":{color:e},"&.Mui-focusVisible":{background:e?(0,x.Fq)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:r?16:18}}})}let Tc=(e,t)=>`${t}`,Th={},Td=[];function Tf({data:e,columns:t,cellConfigs:n,density:r="standard",defaultColumnWidth:i=kX,defaultColumnHeight:o="auto",checkboxSelection:a,onRowSelectionChange:s,onSortingChange:l,getCheckboxColor:u,getRowId:c=Tc,rowSelection:h=Th,sorting:d=Td,pagination:f,onPaginationChange:m,rowSelectionVariant:v="standard",...y}){let x=(0,wP.Z)(),b=(0,g.useCallback)((e,t,n)=>{"standard"===v||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():s?.({[t.id]:!0})},[s,v]),w=(0,g.useCallback)((e,t,n)=>{let r=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;b(t,n,!!r?.metaKey||!!r?.shiftKey)},[b]),S=(0,g.useMemo)(()=>({id:"checkboxRowSelect",size:28,header:({table:e})=>(0,p.jsx)(Tu,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),color:x.palette.text.primary,density:r}),cell:({row:e,table:t})=>(0,p.jsx)(Tu,{checked:e.getIsSelected(),indeterminate:e.getIsSomeSelected(),onChange:n=>{w(n,t,e)},color:u?.(e.original),density:r}),enableSorting:!1}),[x.palette.text.primary,r,u,w]),_=function(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=g.useState(()=>({current:function(e){var t,n;let r=[...ks,...null!=(t=e._features)?t:[]],i={_features:r},o=i._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(i)),{}),a=e=>i.options.mergeOptions?i.options.mergeOptions(o,e):{...o,...e},s={...null!=(n=e.initialState)?n:{}};i._features.forEach(e=>{var t;s=null!=(t=null==e.getInitialState?void 0:e.getInitialState(s))?t:s});let l=[],u=!1,c={_features:r,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:()=>{i.setState(i.initialState)},setOptions:e=>{let t=MP(e,i.options);i.options=a(t)},getState:()=>i.options.state,setState:e=>{null==i.options.onStateChange||i.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==i.options.getRowId?void 0:i.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?i.getPrePaginationRowModel():i.getRowModel()).rowsById[e];if(!n&&!(n=i.getCoreRowModel().rowsById[e]))throw Error();return n},_getDefaultColumnDef:ML(()=>[i.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},...i._features.reduce((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef()),{}),...e}},MN(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:ML(()=>[i._getColumnDefs()],e=>{let t=function(e,n,r){return void 0===r&&(r=0),e.map(e=>{let o=function(e,t,n,r){var i,o;let a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=null!=(i=null!=(o=s.id)?o:l?"function"==typeof String.prototype.replaceAll?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)?i:"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:r,depth:n,columnDef:s,columns:[],getFlatColumns:ML(()=>[!0],()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap(e=>e.getFlatColumns())]},MN(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ML(()=>[e._getOrderColumnsFn()],e=>{var t;return null!=(t=c.columns)&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},MN(e.options,"debugColumns","column.getLeafColumns"))};for(let t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(i,e,r,n);return o.columns=e.columns?t(e.columns,o,r+1):[],o})};return t(e)},MN(e,"debugColumns","getAllColumns")),getAllFlatColumns:ML(()=>[i.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),MN(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ML(()=>[i.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),MN(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ML(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),MN(e,"debugColumns","getAllLeafColumns")),getColumn:e=>i._getAllFlatColumnsById()[e]};Object.assign(i,c);for(let e=0;e<i._features.length;e++){let t=i._features[e];null==t||null==t.createTable||t.createTable(i)}return i}(t)})),[r,i]=g.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:e,columns:(0,g.useMemo)(()=>{let e=kJ(t);return a&&e.unshift(S),e},[S,a,t]),getRowId:c,getCoreRowModel:e=>ML(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,o){void 0===i&&(i=0);let a=[];for(let l=0;l<t.length;l++){let u=MV(e,e._getRowId(t[l],l,o),t[l],l,i,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=r(u.originalSubRows,i+1,u))}}return a};return n.rows=r(t),n},MN(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex())),getSortedRowModel:e=>ML(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(null!=t&&t.length))return n;let r=e.getState().sorting,i=[],o=r.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 r=0;r<o.length;r+=1){var n;let i=o[r],s=a[i.id],l=s.sortUndefined,u=null!=(n=null==i?void 0:i.desc)&&n,c=0;if(l){let n=e.getValue(i.id),r=t.getValue(i.id),o=void 0===n,a=void 0===r;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,i.id)),0!==c)return u&&(c*=-1),s.invertSorting&&(c*=-1),c}return e.index-t.index}),t.forEach(e=>{var t;i.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))}),t};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},MN(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex())),getPaginationRowModel:f?e=>ML(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(t,n)=>{let r;if(!n.rows.length)return n;let{pageSize:i,pageIndex:o}=t,{rows:a,flatRows:s,rowsById:l}=n,u=i*o;a=a.slice(u,u+i),(r=e.options.paginateExpandedRows?{rows:a,flatRows:s,rowsById:l}:function(e){let t=[],n=e=>{var r;t.push(e),null!=(r=e.subRows)&&r.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=>{r.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return r.rows.forEach(c),r},MN(e.options,"debugTable","getPaginationRowModel")):void 0,manualPagination:!f,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,...f?{pagination:f}:{}}}),C=(0,g.useCallback)((e,t)=>{let n=_.getRow(t);b(_,n,e.metaKey||e.shiftKey)},[b,_]);return(0,p.jsx)(Ts,{...y,density:r,defaultColumnWidth:i,defaultColumnHeight:o,onRowClick:C,rows:_.getRowModel().rows,columns:_.getAllFlatColumns(),headers:_.getHeaderGroups(),cellConfigs:n,pagination:f,onPaginationChange:m,rowCount:_.getRowCount()})}let Tp=[{accessorKey:"label",header:"Name",enableSorting:!0,cell:({getValue:e})=>(0,p.jsx)("span",{title:e(),children:e()})}],Tg=e=>e.id,Tm=e=>e.color;function Tv({items:e,selectedItems:t,onSelectedItemsChange:n,onItemMouseOver:r,onItemMouseOut:i,height:o,width:a,columns:s=[],sorting:l,onSortingChange:u}){let c=(0,g.useMemo)(()=>"string"!=typeof t?t:e.reduce((e,t,n)=>(e[Tg(t,n)]=!0,e),{}),[t,e]),h=(0,g.useMemo)(()=>[...Tp,...s],[s]);return(0,p.jsx)(Tf,{height:o,width:a,rowSelection:c,onRowSelectionChange:n,onRowMouseOver:r,onRowMouseOut:i,sorting:l,onSortingChange:u,data:e,columns:h,density:"compact",defaultColumnWidth:"auto",getRowId:Tg,getCheckboxColor:Tm,checkboxSelection:!0,rowSelectionVariant:"legend"})}function Ty({width:e,height:t,options:n,data:r,selectedItems:i,onSelectedItemsChange:o,onItemMouseOver:a,onItemMouseOut:s,tableProps:l}){let u;let c=(e,t)=>{let n=e.metaKey||e.shiftKey;o(Sd(i,e=>{if("ALL"===e)return{[t]:!0};let r=!!e[t];return n?(r?delete e[t]:e[t]=!0,e):r?"ALL":{[t]:!0}}))},h=wN(n.mode),d=r.length>=500,f={height:t,items:r,selectedItems:i,onLegendItemClick:c,onItemMouseOver:a,onItemMouseOut:s};return(u="table"===h?(0,p.jsx)(Tv,{...f,onSelectedItemsChange:o,width:e,...l}):"right"===n.position||d?(0,p.jsx)(MI,{...f,width:e,onLegendItemClick:c}):(0,p.jsx)(MO,{...f,onLegendItemClick:c}),"right"===n.position)?(0,p.jsx)(vL.Z,{style:{width:e,height:t},sx:{position:"absolute",top:0,right:0},children:u}):(0,p.jsx)(vL.Z,{style:{width:e,height:t},sx:{position:"absolute",bottom:0},children:u})}let Tx={medium:{bottom:6,right:250},small:{bottom:4,right:150}};function Tb({children:e,legendProps:t,width:n,height:r,spacing:i=0,legendSize:o,minChildrenWidth:a=100,minChildrenHeight:s=100}){let{content:l,legend:u,margin:c}=function({width:e,height:t,legendProps:n,legendSize:r,minChildrenHeight:i,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"===wN(c.mode))l="right"===d?200:e,u=40,"right"===d?u=t:t>=300&&(u=100);else{let i=kQ(s,"compact"),o=(n?.tableProps?.columns||[]).reduce((e,t)=>("number"==typeof t.width&&(e+=t.width),e),0);l="right"===d?Tx[r].right+o:e;let a=Math.min(Tx[r].bottom,n.data.length+1);u="bottom"===d?a*i.height:t}let f="right"===d?e-l-a:e,p="bottom"===d?t-u-a:t;return"right"===d&&f<o||"bottom"===d&&p<i?h:{legend:{width:l,height:u,show:!0},content:{width:f,height:p},margin:{right:"right"===d?a:0,bottom:"bottom"===d?a:0}}}({width:n,height:r,legendProps:t,minChildrenHeight:s,minChildrenWidth:a,spacing:i,theme:(0,wP.Z)(),legendSize:o&&wE.includes(o)?o:wL.size});return(0,p.jsxs)(vL.Z,{style:{width:n,height:r},sx:{position:"relative",overflow:"hidden"},children:[(0,p.jsx)(vL.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,p.jsx)(Ty,{...t,height:u.height,width:u.width})]})}let Tw=(0,g.forwardRef)(function({debounceMs:e=250,value:t,onChange:n,...r},i){let[o,a]=(0,g.useState)(t),s=(0,g.useCallback)(e=>{n?.(e)},[n]),l=(0,g.useMemo)(()=>vH()(s,e),[e,s]);return(0,p.jsx)(x8.Z,{ref:i,value:o,onChange:function(e){a(e.target.value),l(e.target.value)},...r})});function TS(e){return(0,T.ZP)("MuiDialogTitle",e)}Tw.displayName="TextField";let T_=(0,k.Z)("MuiDialogTitle",["root"]),TC=g.createContext({}),TM=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},TS,t)},Tk=(0,S.ZP)(kz.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),TT=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiDialogTitle"}),{className:r,id:i,...o}=n,a=TM(n),{titleId:s=i}=g.useContext(TC);return(0,p.jsx)(Tk,{component:"h2",className:(0,v.Z)(a.root,r),ownerState:n,ref:t,variant:"h6",id:i??s,...o})});function TD(e){return(0,T.ZP)("MuiDialogContent",e)}(0,k.Z)("MuiDialogContent",["root","dividers"]);let TA=e=>{let{classes:t,dividers:n}=e;return(0,y.Z)({root:["root",n&&"dividers"]},TD,t)},TI=(0,S.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,_.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:{[`.${T_.root} + &`]:{paddingTop:0}}}]}))),TO=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiDialogContent"}),{className:r,dividers:i=!1,...o}=n,a={...n,dividers:i},s=TA(a);return(0,p.jsx)(TI,{className:(0,v.Z)(s.root,r),ownerState:a,ref:t,...o})});var TP=n(5056),TR=n(58),TE=n(9761),TL=n(8866);function TN(e){return(0,T.ZP)("MuiDialog",e)}let TB=(0,k.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var TF=n(9090);let Tz=(0,S.ZP)(TF.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),TV=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,a={root:["root"],container:["container",`scroll${(0,w.Z)(n)}`],paper:["paper",`paperScroll${(0,w.Z)(n)}`,`paperWidth${(0,w.Z)(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return(0,y.Z)(a,TN,t)},TZ=(0,S.ZP)(TR.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Tj=(0,S.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${(0,w.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"}}}]}),TH=(0,S.ZP)(TL.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,w.Z)(n.scroll)}`],t[`paperWidth${(0,w.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,_.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)`,[`&.${TB.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}`,[`&.${TB.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,[`&.${TB.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),TW=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiDialog"}),r=(0,wP.Z)(),i={enter:r.transitions.duration.enteringScreen,exit:r.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:f=!1,fullWidth:m=!1,maxWidth:y="sm",onBackdropClick:x,onClick:b,onClose:w,open:S,PaperComponent:_=TL.Z,PaperProps:C={},scroll:k="paper",slots:T={},slotProps:D={},TransitionComponent:A=TE.Z,transitionDuration:I=i,TransitionProps:O,...P}=n,R={...n,disableEscapeKeyDown:d,fullScreen:f,fullWidth:m,maxWidth:y,scroll:k},E=TV(R),L=g.useRef(),N=(0,TP.Z)(a),B=g.useMemo(()=>({titleId:N}),[N]),F={slots:{transition:A,...T},slotProps:{transition:O,paper:C,backdrop:u,...D}},[z,V]=(0,kW.Z)("root",{elementType:TZ,shouldForwardComponentProp:!0,externalForwardedProps:F,ownerState:R,className:(0,v.Z)(E.root,h),ref:t}),[Z,j]=(0,kW.Z)("backdrop",{elementType:Tz,shouldForwardComponentProp:!0,externalForwardedProps:F,ownerState:R}),[H,W]=(0,kW.Z)("paper",{elementType:TH,shouldForwardComponentProp:!0,externalForwardedProps:F,ownerState:R,className:(0,v.Z)(E.paper,C.className)}),[$,G]=(0,kW.Z)("container",{elementType:Tj,externalForwardedProps:F,ownerState:R,className:(0,v.Z)(E.container)}),[U,q]=(0,kW.Z)("transition",{elementType:TE.Z,externalForwardedProps:F,ownerState:R,additionalProps:{appear:!0,in:S,timeout:I,role:"presentation"}});return(0,p.jsx)(z,{closeAfterTransition:!0,slots:{backdrop:Z},slotProps:{backdrop:{transitionDuration:I,as:l,...j}},disableEscapeKeyDown:d,onClose:w,open:S,onClick:e=>{b&&b(e),L.current&&(L.current=null,x&&x(e),w&&w(e,"backdropClick"))},...V,...P,children:(0,p.jsx)(U,{...q,children:(0,p.jsx)($,{onMouseDown:e=>{L.current=e.target===e.currentTarget},...G,children:(0,p.jsx)(H,{as:_,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":N,"aria-modal":s,...W,children:(0,p.jsx)(TC.Provider,{value:B,children:c})})})})})});function T$(e){return(0,T.ZP)("MuiDialogActions",e)}(0,k.Z)("MuiDialogActions",["root","spacing"]);let TG=e=>{let{classes:t,disableSpacing:n}=e;return(0,y.Z)({root:["root",!n&&"spacing"]},T$,t)},TU=(0,S.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}}}]}),Tq=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:i=!1,...o}=n,a={...n,disableSpacing:i},s=TG(a);return(0,p.jsx)(TU,{className:(0,v.Z)(s.root,r),ownerState:a,ref:t,...o})});var TY=n(763);let TX=(0,S.ZP)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),TK=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),TQ=({children:e,...t})=>(0,p.jsx)(TW,{...t,children:e});TQ.Header=({children:e,onClose:t,...n})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(TT,{style:{textOverflow:"ellipsis",overflow:"hidden"},...n,children:e}),t&&(0,p.jsx)(x4.Z,{"aria-label":"Close",onClick:t,sx:TK,children:(0,p.jsx)(TY.default,{})})]}),TQ.Form=TX,TQ.Content=({children:e,sx:t,...n})=>(0,p.jsx)(TO,{dividers:!0,...n,sx:MM({minWidth:"500px",textWrap:"balance"},t),children:e}),TQ.PrimaryButton=({children:e,...t})=>(0,p.jsx)(L.Z,{variant:"contained",type:"submit",...t,children:e}),TQ.SecondaryButton=({children:e,...t})=>(0,p.jsx)(L.Z,{variant:"outlined",color:"secondary",...t,children:e}),TQ.Actions=Tq;let TJ=e=>{let{description:t,isOpen:n,onCancel:r,onDiscardChanges:i}=e;return(0,p.jsxs)(TQ,{open:n,"aria-labelledby":"discard-dialog",children:[(0,p.jsx)(TQ.Header,{children:"Discard Changes"}),(0,p.jsx)(TQ.Content,{children:t}),(0,p.jsxs)(TQ.Actions,{children:[(0,p.jsx)(L.Z,{variant:"contained",onClick:i,children:"Discard Changes"}),(0,p.jsx)(L.Z,{variant:"outlined",color:"secondary",onClick:r,children:"Cancel"})]})]})};var T0=n(192),T1=n(3626),T2=n(9398);function T5(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);let t=(0,g.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var T3=n(2964),T4=n(7143);let T8=({id:e,title:t,description:n,placement:r,children:i,enterDelay:o,enterNextDelay:a})=>{let s=(0,p.jsx)("span",{children:i});return(0,p.jsx)(T9,{arrow:!0,id:e,placement:r??"top",title:(0,p.jsx)(T6,{title:t,description:n}),enterDelay:o??500,enterNextDelay:a??500,children:s})},T6=({title:e,description:t})=>(0,p.jsxs)(p.Fragment,{children:[e&&(0,p.jsx)(kz.Z,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:e}),(0,p.jsx)(kz.Z,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:t})]}),T9=(0,S.ZP)(({className:e,...t})=>(0,p.jsx)(T3.Z,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${T4.Z.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${T4.Z.arrow}`]:{color:e.palette.background.tooltip}})),T7=({label:e,control:t,description:n})=>{let r=T5("EditorSectionControl"),i=`${r}-control`;return(0,p.jsx)(T0.Z,{children:(0,p.jsxs)(x3,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,p.jsxs)(x3,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,p.jsx)(T1.Z,{htmlFor:i,children:e}),n&&(0,p.jsx)(T8,{description:n,enterDelay:100,children:(0,p.jsx)(x4.Z,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,p.jsx)(T2.default,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,p.jsxs)(vL.Z,{sx:{width:"180px",textAlign:"right"},children:[" ",m().cloneElement(t,{id:i})]})]})})};var De=n(1774),Dt=n(678);function Dn({options:e,renderInput:t=e=>(0,p.jsx)(x8.Z,{...e}),...n}){let r=e=>e.label??e.id;return(0,p.jsx)(De.Z,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:r,options:e,renderInput:t,renderOption:({key:e,...t},n)=>(0,p.jsx)("li",{...t,children:(0,p.jsxs)("div",{children:[(0,p.jsx)(kz.Z,{variant:"body1",component:"div",children:r(n)}),n.description&&(0,p.jsx)(kz.Z,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:n.description})]})},e),filterOptions:(0,Dt.D)({stringify:e=>`${r(e)} ${e.description||""}`}),...n})}let Dr=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function Di({onChange:e,value:t="standard"}){return(0,p.jsx)(T7,{label:"Density",control:(0,p.jsx)(Dn,{value:Dr.find(e=>e.id===t),options:Dr,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function Do(){return(0,p.jsxs)(x3,{direction:"row",alignItems:"center",children:[(0,p.jsx)(vL.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,p.jsx)(vL.Z,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}function Da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ds(e,t){if(e){if("string"==typeof e)return Da(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)?Da(e,t):void 0}}function Dl(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 r,i,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=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Ds(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 Du=n(501),Dc="data-pdnd-honey-pot";function Dh(e){return e instanceof Element&&e.hasAttribute(Dc)}function Dd(e){var t=Dl(document.elementsFromPoint(e.x,e.y),2),n=t[0],r=t[1];return n?Dh(n)?null!=r?r:null:n:null}var Df=n(1510);function Dp(e,t,n){return(t=(0,Df.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Dm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(n),!0).forEach(function(t){Dp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dv(e){var t,n,r,i,o={x:Math.min((i={x:Math.max((r={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(r.y,0)}).x,window.innerWidth-2),y:Math.min(i.y,window.innerHeight-2)};return DOMRect.fromRect({x:o.x,y:o.y,width:2,height:2})}function Dy(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 Dx(e){return function(e){if(Array.isArray(e))return Da(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ds(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 Db(e){var t=null;return function(){if(!t){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t={result:e.apply(this,r)}}return t.result}}var Dw=Db(function(){return navigator.userAgent.includes("Firefox")}),DS=Db(function(){var e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}),D_={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};function DC(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(DS()){var e=t();(0,Du.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[D_.isEnteringWindow]=!0),e.isOverWindow=!0,e.enterCount++}},{type:"dragleave",listener:function(t){e.enterCount--,e.isOverWindow&&0===e.enterCount&&(t[D_.isLeavingWindow]=!0,e.isOverWindow=!1)}}],{capture:!0})}}function t(){return{enterCount:0,isOverWindow:!1}}function n(){e=t()}}();var DM=(qy=function(e){return e()},qx=[],qb=null,(qw=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];qx=t,!qb&&(qb=requestAnimationFrame(function(){qb=null,qy.apply(void 0,qx)}))}).cancel=function(){qb&&(cancelAnimationFrame(qb),qb=null)},qw),Dk=(qS=null,{schedule:function(e){qS={frameId:requestAnimationFrame(function(){qS=null,e()}),fn:e}},flush:function(){qS&&(cancelAnimationFrame(qS.frameId),qS.fn(),qS=null)}}),DT={isActive:!1};function DD(){return!DT.isActive}function DA(e){var t,n=e.event,r=null===(t=e.current[0])||void 0===t?void 0:t.dropEffect;null!=r&&n.dataTransfer&&(n.dataTransfer.dropEffect=r)}var DI=function(e){var t,n,r=e.event,i=e.dragType,o=e.getDropTargetsOver,a=e.dispatchEvent;if(DD()){var s=function(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=DC(t);if("external"===n.startedFrom)return{input:i,dropTargets:[]};var o=r({input:i,source:n.payload,target:t.target,current:[]});return{input:i,dropTargets:o}}({event:r,dragType:i,getDropTargetsOver:o});DT.isActive=!0;var l={current:s};DA({event:r,current:s.dropTargets});var u=function(e){var t=e.source,n=e.initial,r=e.dispatchEvent,i={dropTargets:[]};function o(e){r(e),i={dropTargets:e.payload.location.current.dropTargets}}return{start:function(e){var r=e.nativeSetDragImage,a={current:n,previous:i,initial:n};o({eventName:"onGenerateDragPreview",payload:{source:t,location:a,nativeSetDragImage:r}}),Dk.schedule(function(){o({eventName:"onDragStart",payload:{source:t,location:a}})})},dragUpdate:function(e){var r=e.current;Dk.flush(),DM.cancel(),o({eventName:"onDropTargetChange",payload:{source:t,location:{initial:n,previous:i,current:r}}})},drag:function(e){var r=e.current;DM(function(){Dk.flush(),o({eventName:"onDrag",payload:{source:t,location:{initial:n,previous:i,current:r}}})})},drop:function(e){var r=e.current,a=e.updatedSourcePayload;Dk.flush(),DM.cancel(),o({eventName:"onDrop",payload:{source:null!=a?a:t,location:{current:r,previous:i,initial:n}}})}}}({source:i.payload,dispatchEvent:a,initial:s}),c=(0,Du.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,r=t.relatedTarget;return"dragleave"===n&&(DS()?!!DS()&&t.hasOwnProperty(D_.isLeavingWindow):null==r||(Dw()?"nodeName"in r&&r.ownerDocument!==document:r instanceof HTMLIFrameElement))})({dragLeave:e})&&(h({input:l.current.input,dropTargets:[]}),"external"===i.startedFrom&&f())}},{type:"drop",listener:function(e){if(l.current={dropTargets:l.current.dropTargets,input:DC(e)},!l.current.dropTargets.length){f();return}e.preventDefault(),DA({event:e,current:l.current.dropTargets}),u.drop({current:l.current,updatedSourcePayload:"external"===i.type?i.getDropPayload(e):null}),p()}},{type:"dragend",listener:function(e){l.current={dropTargets:l.current.dropTargets,input:DC(e)},f()}}].concat(Dx([{type:"pointermove",listener:(n=0,function(){if(n<20){n++;return}t()})},{type:"pointerdown",listener:t=f}])),{capture:!0});u.start({nativeSetDragImage:r.dataTransfer?r.dataTransfer.setDragImage.bind(r.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 r=0;r<t.length;r++)if(t[r].element!==n[r].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=DC(e),n=o({target:Dh(e.target)?Dd({x:t.clientX,y:t.clientY}):e.target,input:t,source:i.payload,current:l.current.dropTargets});n.length&&(e.preventDefault(),DA({event:e,current:n})),h({dropTargets:n,input:t})}function f(){l.current.dropTargets.length&&h({dropTargets:[],input:l.current.input}),u.drop({current:l.current,updatedSourcePayload:null}),p()}function p(){DT.isActive=!1,c()}},DO=new Map;function DP(){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 DR(e,t){var n=t.attribute,r=t.value;return e.setAttribute(n,r),function(){return e.removeAttribute(n)}}function DE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DE(Object(n),!0).forEach(function(t){Dp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DN(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 DB(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)?DB(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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 DB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DF(e){return e.slice(0).reverse()}function Dz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var DZ=Db(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),Dj="text/plain",DH=new WeakMap,DW=(q_=null,{bindEvents:function(){return q_=null,(0,Du.bind)(window,{type:"pointermove",listener:function(e){q_={x:e.clientX,y:e.clientY}},options:{capture:!0}})},getOnPostDispatch:function(){var e=null;return function(t){var n=t.eventName,r=t.payload;if("onDragStart"===n){var i,o,a,s,l,u=r.location.initial.input;i=({initial:null!==(l=q_)&&void 0!==l?l:{x:u.clientX,y:u.clientY}}).initial,(o=document.createElement("div")).setAttribute(Dc,"true"),a=Dv({client:i}),Object.assign(o.style,Dm(Dm({backgroundColor:"transparent",position:"fixed",padding:0,margin:0,boxSizing:"border-box"},Dy({clientRect:a})),{},{pointerEvents:"auto",zIndex:0x7fffffff})),document.body.appendChild(o),s=(0,Du.bind)(window,{type:"pointermove",listener:function(e){a=Dv({client:{x:e.clientX,y:e.clientY}}),Object.assign(o.style,Dy({clientRect:a}))},options:{capture:!0}}),e=function(e){var t,n,r,i=e.current;if(s(),n=(t={client:i,clientRect:a}).client,r=t.clientRect,n.x>=r.x&&n.x<=r.x+r.width&&n.y>=r.y&&n.y<=r.y+r.height){o.remove();return}function l(){u(),o.remove()}var u=(0,Du.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=r.location.current.input;null===(c=e)||void 0===c||c({current:{x:h.clientX,y:h.clientY}}),e=null,q_=null}}}}),D$=function(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,i=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(r){var i=r.eventName,o=r.payload;if("onGenerateDragPreview"===i){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 Dz(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)?Dz(e,t):void 0}}(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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[i])||void 0===h||h.call(d,o))}"onDrop"===i&&(t.active.clear(),t=null)}},monitorForConsumers:function(r){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DV(Object(n),!0).forEach(function(t){Dp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DV(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},r);return e.add(i),n(i),function(){e.delete(i),t&&t.active.delete(i)}}}}(),s=function(e){var t=e.typeKey,n=e.defaultDropEffect,r=new WeakMap,i="data-drop-target-for-".concat(t),o="[".concat(i,"]");function a(e){var t,n=e.eventName,i=e.payload,o=DN(i.location.current.dropTargets);try{for(o.s();!(t=o.n()).done;){var a,s=t.value,l=r.get(s.element),u=DL(DL({},i),{},{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,i=new Set(n.location.current.dropTargets.map(function(e){return e.element})),o=new Set,a=DN(n.location.previous.dropTargets);try{for(a.s();!(t=a.n()).done;){var s,l,u=t.value;o.add(u.element);var c=r.get(u.element),h=i.has(u.element),d=DL(DL({},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 f,p=DN(n.location.current.dropTargets);try{for(p.s();!(f=p.n()).done;){var g,m,v=f.value;if(!o.has(v.element)){var y=DL(DL({},n),{},{self:v}),x=r.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){p.e(e)}finally{p.f()}}};return{dropTargetForConsumers:function(e){return DP(DR(e.element,{attribute:i,value:"true"}),(r.set(e.element,e),function(){return r.delete(e.element)}))},getIsOver:function(e){var t=e.source,i=e.target,a=e.input,s=e.current,l=function e(t){var i,a,s,l,u=t.source,c=t.target,h=t.input,d=t.result,f=void 0===d?[]:d;if(null==c)return f;if(!(c instanceof Element))return c instanceof Node?e({source:u,target:c.parentElement,input:h,result:f}):f;var p=c.closest(o);if(null==p)return f;var g=r.get(p);if(null==g)return f;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:f});var v=null!==(i=null===(a=g.getData)||void 0===a?void 0:a.call(g,m))&&void 0!==i?i:{},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(Dx(f),[x])})}({source:t,target:i,input:a});if(l.length>=s.length)return l;for(var u=DF(s),c=DF(l),h=[],d=0;d<u.length;d++){var f,p=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=r.get(p.element);if(!y)break;var x={input:a,source:t,element:y.element};if(y.canDrop&&!y.canDrop(x)||!(null!==(f=y.getIsSticky)&&void 0!==f&&f.call(y,x)))break;h.push(DL(DL({},p),{},{isActiveDueToStickiness:!0}))}return DF(h)},dispatchEvent:function(e){s[e.eventName](e)}}}({typeKey:t,defaultDropEffect:o});function l(e){null==r||r(e),s.dispatchEvent(e),a.dispatchEvent(e),null==i||i(e)}function u(e){DI({event:e.event,dragType:e.dragType,getDropTargetsOver:s.getIsOver,dispatchEvent:l})}return{registerUsage:function(){var e,r;return r=function(e){var t=e.typeKey,n=e.mount,r=DO.get(t);if(r)return r.usageCount++,r;var i={typeKey:t,unmount:n(),usageCount:1};return DO.set(t,i),i}(e={typeKey:t,mount:function(){return n({canStart:DD,start:u})}}),function(){r.usageCount--,!(r.usageCount>0)&&(r.unmount(),DO.delete(e.typeKey))}},dropTarget:s.dropTargetForConsumers,monitor:a.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return DP(DW.bindEvents(),(0,Du.bind)(document,{type:"dragstart",listener:function(t){if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var n,r,i,o,a,s,l=t.target;if(!(l instanceof HTMLElement))return null;var u=DH.get(l);if(!u)return null;var c=DC(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=Dd({x:c.clientX,y:c.clientY});if(!u.dragHandle.contains(d))return t.preventDefault(),null}var f=null!==(r=null===(i=u.getInitialDataForExternal)||void 0===i?void 0:i.call(u,h))&&void 0!==r?r:null;if(f)for(var p=0,g=Object.entries(f);p<g.length;p++){var m=Dl(g[p],2),v=m[0],y=m[1];t.dataTransfer.setData(v,null!=y?y:"")}!DZ()||t.dataTransfer.types.includes(Dj)||t.dataTransfer.types.includes("text/uri-list")||t.dataTransfer.setData(Dj,"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,r=e.eventName,i=e.payload;null===(t=DH.get(i.source.element))||void 0===t||null===(n=t[r])||void 0===n||n.call(t,i)},onPostDispatch:DW.getOnPostDispatch()}),DG=D$.dropTarget,DU=D$.monitor;function Dq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dq(Object(n),!0).forEach(function(t){Dp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var DX={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)}},DK=Symbol("closestEdge");function DQ(e){var t;return null!==(t=e[DK])&&void 0!==t?t:null}let DJ={type:"idle"};function D0({elements:e,accessKey:t,axis:n="vertical",onChange:r}){return(0,g.useEffect)(()=>DU({onDrop({location:i,source:o}){var a,s;let l=i.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)&&r(function(e){var t=e.list,n=e.startIndex,r=e.finishIndex;if(-1===n||-1===r)return Array.from(t);var i=Array.from(t),o=Dl(i.splice(n,1),1)[0];return i.splice(r,0,o),i}({list:(a={list:e,startIndex:h,indexOfTarget:d,closestEdgeOfTarget:DQ(c),axis:n}).list,startIndex:s=a.startIndex,finishIndex:function(e){var t=e.startIndex,n=e.closestEdgeOfTarget,r=e.indexOfTarget,i=e.axis;if(-1===t||-1===r||t===r)return t;if(null==n)return r;var o="vertical"===i&&"bottom"===n||"horizontal"===i&&"right"===n;return t<r?o?r:r-1:o?r+1:r}({closestEdgeOfTarget:a.closestEdgeOfTarget,startIndex:s,indexOfTarget:a.indexOfTarget,axis:a.axis})}))}}),[t,n,e,r])}function D1({children:e,data:t}){let n=(0,g.useRef)(null),[r,i]=(0,g.useState)(DJ);return(0,g.useEffect)(()=>{var e;let r=n.current;if(r)return DP((e={element:r,getInitialData:()=>t,onDragStart(){i({type:"is-dragging"})},onDrop(){i(DJ)}},DP(D$.registerUsage(),(DH.set(e.element,e),function(){DH.delete(e.element)}),DR(e.element,{attribute:"draggable",value:"true"}))),DG({element:r,canDrop:({source:e})=>e.element!==r,getData:({input:e})=>{var n,i,o,a,s,l,u,c,h;return a=(n={element:r,input:e,allowedEdges:["top","bottom"]}).element,s=n.input,l=n.allowedEdges,u={x:s.clientX,y:s.clientY},c=a.getBoundingClientRect(),h=null!==(i=null===(o=l.map(function(e){return{edge:e,value:DX[e](c,u)}}).sort(function(e,t){return e.value-t.value})[0])||void 0===o?void 0:o.edge)&&void 0!==i?i:null,DY(DY({},t),{},Dp({},DK,h))},getIsSticky:()=>!0,onDragEnter({self:e}){i({type:"is-dragging-over",closestEdge:DQ(e.data)})},onDrag({self:e}){let t=DQ(e.data);i(e=>"is-dragging-over"===e.type&&e.closestEdge===t?e:{type:"is-dragging-over",closestEdge:t})},onDragLeave(){i(DJ)},onDrop(){i(DJ)}}))},[t]),(0,p.jsxs)(x3,{ref:n,spacing:1,style:{opacity:"is-dragging"===r.type?.5:"unset"},children:["is-dragging-over"===r.type&&"top"===r.closestEdge?(0,p.jsx)(Do,{}):null,e,"is-dragging-over"===r.type&&"bottom"===r.closestEdge?(0,p.jsx)(Do,{}):null]})}var D2=n(5549),D5=n(743),D3=n(1682);function D4(e,t){let n=t.indexOf(e);if(0===n)return t;let r=[...t];return r.splice(n,1),r.splice(n-1,0,e),r}function D8(e,t){let n=t.indexOf(e);if(n===t.length-1)return t;let r=[...t];return r.splice(n,1),r.splice(n+1,0,e),r}let D6=(0,g.forwardRef)(function({onMoveUp:e,onMoveDown:t,onMoveLeft:n,onMoveRight:r,menuSx:i,...o},a){let[s,l]=(0,g.useState)(null),u=!!s;function c(e){l(null),e?.()}return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(x4.Z,{...o,ref:a,"aria-label":"move","aria-haspopup":!0,"aria-expanded":u,size:"small",onClick:function(e){l(e.currentTarget)},children:(0,p.jsx)(D3.default,{})}),(e||t||n||r)&&(0,p.jsxs)(D2.Z,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:s,open:u,onClose:()=>c(void 0),sx:i,children:[e&&(0,p.jsx)(D5.Z,{onClick:()=>c(e),children:"Move Up"}),t&&(0,p.jsx)(D5.Z,{onClick:()=>c(t),children:"Move Down"}),n&&(0,p.jsx)(D5.Z,{onClick:()=>c(n),children:"Move Left"}),r&&(0,p.jsx)(D5.Z,{onClick:()=>c(r),children:"Move Right"}),r&&(0,p.jsx)(D5.Z,{onClick:()=>c(r),children:"Move Right"})]})]})});var D9=n(6858),D7=n(9267),Ae=n(4105);let At={...g}.useSyncExternalStore;function An(e={}){let{themeId:t}=e;return function(e,n={}){let r=(0,Ae.Z)();r&&t&&(r=r[t]||r);let i="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:a=i?window.matchMedia:null,ssrMatchMedia:s=null,noSsr:l=!1}=(0,D7.Z)({name:"MuiUseMediaQuery",props:n,theme:r}),u="function"==typeof e?e(r):e;return(void 0!==At?function(e,t,n,r,i){let o=g.useCallback(()=>t,[t]),a=g.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==r){let{matches:t}=r(e);return()=>t}return o},[o,e,r,i,n]),[s,l]=g.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 At(l,s,a)}:function(e,t,n,r,i){let[o,a]=g.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return(0,D9.Z)(()=>{if(!n)return;let t=n(e),r=()=>{a(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,n]),o})(u=u.replace(/^@media( ?)/m,""),o,a,s,l)}}An();let Ar=An({themeId:n(2994).Z});var Ai=n(6595),Ao=n(1825),Aa=n(4680),As=n(7999),Al=n(2777),Au=n(4255);function Ac(e,t,n){let r=function(e,t,n){let r;let i=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),a=(0,Au.Z)(t);if(t.fakeTransform)r=t.fakeTransform;else{let e=a.getComputedStyle(t);r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(r&&"none"!==r&&"string"==typeof r){let e=r.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-i.left}px)`:`translateX(${a.innerWidth+s-i.left}px)`:"right"===e?o?`translateX(-${i.right-o.left-s}px)`:`translateX(-${i.left+i.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-i.top}px)`:`translateY(${a.innerHeight+l-i.top}px)`:o?`translateY(-${i.top-o.top+i.height-l}px)`:`translateY(-${i.top+i.height-l}px)`}(e,t,"function"==typeof n?n():n);r&&(t.style.webkitTransform=r,t.style.transform=r)}let Ah=g.forwardRef(function(e,t){let n=(0,wP.Z)(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,container:l,direction:u="down",easing:c=r,in:h,onEnter:d,onEntered:f,onEntering:m,onExit:v,onExited:y,onExiting:x,style:b,timeout:w=i,TransitionComponent:S=Ao.ZP,..._}=e,C=g.useRef(null),M=(0,Mv.Z)((0,Aa.Z)(s),C,t),k=e=>t=>{e&&(void 0===t?e(C.current):e(C.current,t))},T=k((e,t)=>{Ac(u,e,l),(0,Al.n)(e),d&&d(e,t)}),D=k((e,t)=>{let r=(0,Al.C)({timeout:w,style:b,easing:c},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",m&&m(e,t)}),A=k(f),I=k(x),O=k(e=>{let t=(0,Al.C)({timeout:w,style:b,easing:c},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),Ac(u,e,l),v&&v(e)}),P=k(e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)}),R=g.useCallback(()=>{C.current&&Ac(u,C.current,l)},[u,l]);return g.useEffect(()=>{if(h||"down"===u||"right"===u)return;let e=(0,As.Z)(()=>{C.current&&Ac(u,C.current,l)}),t=(0,Au.Z)(C.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[u,h,l]),g.useEffect(()=>{h||R()},[h,R]),(0,p.jsx)(S,{nodeRef:C,onEnter:T,onEntered:A,onEntering:D,onExit:O,onExited:P,onExiting:I,addEndListener:e=>{o&&o(C.current,e)},appear:a,in:h,timeout:w,..._,children:(e,{ownerState:t,...n})=>g.cloneElement(s,{ref:M,style:{visibility:"exited"!==e||h?void 0:"hidden",...b,...s.props.style},...n})})});function Ad(e){return(0,T.ZP)("MuiDrawer",e)}(0,k.Z)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var Af=n(7834);let Ap=(e,t)=>{let{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},Ag=e=>{let{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${(0,w.Z)(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,w.Z)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,w.Z)(n)}`]};return(0,y.Z)(i,Ad,t)},Am=(0,S.ZP)(TR.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:Ap})((0,_.Z)(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Av=(0,S.ZP)("div",{shouldForwardProp:Mp.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Ap})({flex:"0 0 auto"}),Ay=(0,S.ZP)(TL.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,w.Z)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,w.Z)(n.anchor)}`]]}})((0,_.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}`}}]}))),Ax={left:"right",right:"left",top:"down",bottom:"up"},Ab=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiDrawer"}),r=(0,wP.Z)(),i=(0,Ai.V)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:s,children:l,className:u,elevation:c=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:d,...f}={},onClose:m,open:y=!1,PaperProps:x={},SlideProps:b,TransitionComponent:w,transitionDuration:S=o,variant:_="temporary",slots:C={},slotProps:k={},...T}=n,D=g.useRef(!1);g.useEffect(()=>{D.current=!0},[]);let A=function({direction:e},t){return"rtl"===e&&["left","right"].includes(t)?Ax[t]:t}({direction:i?"rtl":"ltr"},a),I={...n,anchor:a,elevation:c,open:y,variant:_,...T},O=Ag(I),P={slots:{transition:w,...C},slotProps:{paper:x,transition:b,...k,backdrop:(0,Af.Z)(k.backdrop||{...s,...d},{transitionDuration:S})}},[R,E]=(0,kW.Z)("root",{ref:t,elementType:Am,className:(0,v.Z)(O.root,O.modal,u),shouldForwardComponentProp:!0,ownerState:I,externalForwardedProps:{...P,...T,...f},additionalProps:{open:y,onClose:m,hideBackdrop:h,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[L,N]=(0,kW.Z)("paper",{elementType:Ay,shouldForwardComponentProp:!0,className:(0,v.Z)(O.paper,x.className),ownerState:I,externalForwardedProps:P,additionalProps:{elevation:"temporary"===_?c:0,square:!0}}),[B,F]=(0,kW.Z)("docked",{elementType:Av,ref:t,className:(0,v.Z)(O.root,O.docked,u),ownerState:I,externalForwardedProps:P,additionalProps:T}),[z,V]=(0,kW.Z)("transition",{elementType:Ah,ownerState:I,externalForwardedProps:P,additionalProps:{in:y,direction:Ax[A],timeout:S,appear:D.current}}),Z=(0,p.jsx)(L,{...N,children:l});if("permanent"===_)return(0,p.jsx)(B,{...F,children:Z});let j=(0,p.jsx)(z,{...V,children:Z});return"persistent"===_?(0,p.jsx)(B,{...F,children:j}):(0,p.jsx)(R,{...E,children:j})}),Aw=({anchor:e="right",isOpen:t,onClose:n,PaperProps:r,children:i,...o})=>{let a=Ar("(max-width:1080px)");return(0,p.jsx)(Ab,{...o,open:t,onClose:n,anchor:e,PaperProps:{...r,sx:MM({width:a?"100%":"1080px",overflow:"hidden"},r?.sx)},children:i})};function AS(e){return(0,T.ZP)("MuiAlert",e)}let A_=(0,k.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"]),AC=(0,kV.Z)((0,p.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"),AM=(0,kV.Z)((0,p.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),Ak=(0,kV.Z)((0,p.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"),AT=(0,kV.Z)((0,p.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 AD=n(3049);let AA=e=>{let{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${(0,w.Z)(n||r)}`,`${t}${(0,w.Z)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,y.Z)(o,AS,i)},AI=(0,S.ZP)(TL.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,w.Z)(n.color||n.severity)}`]]}})((0,_.Z)(({theme:e})=>{let t="light"===e.palette.mode?x._j:x.$n,n="light"===e.palette.mode?x.$n:x._j;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,C.Z)(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${A_.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter((0,C.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}`,[`& .${A_.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter((0,C.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)}}}))]}})),AO=(0,S.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),AP=(0,S.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),AR=(0,S.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}),AE={success:(0,p.jsx)(AC,{fontSize:"inherit"}),warning:(0,p.jsx)(AM,{fontSize:"inherit"}),error:(0,p.jsx)(Ak,{fontSize:"inherit"}),info:(0,p.jsx)(AT,{fontSize:"inherit"})},AL=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:u={},icon:c,iconMapping:h=AE,onClose:d,role:f="alert",severity:g="success",slotProps:m={},slots:y={},variant:x="standard",...b}=n,w={...n,color:s,severity:g,variant:x,colorSeverity:s||g},S=AA(w),_={slots:{closeButton:l.CloseButton,closeIcon:l.CloseIcon,...y},slotProps:{...u,...m}},[C,k]=(0,kW.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,v.Z)(S.root,o),elementType:AI,externalForwardedProps:{..._,...b},ownerState:w,additionalProps:{role:f,elevation:0}}),[T,D]=(0,kW.Z)("icon",{className:S.icon,elementType:AO,externalForwardedProps:_,ownerState:w}),[A,I]=(0,kW.Z)("message",{className:S.message,elementType:AP,externalForwardedProps:_,ownerState:w}),[O,P]=(0,kW.Z)("action",{className:S.action,elementType:AR,externalForwardedProps:_,ownerState:w}),[R,E]=(0,kW.Z)("closeButton",{elementType:x4.Z,externalForwardedProps:_,ownerState:w}),[L,N]=(0,kW.Z)("closeIcon",{elementType:AD.Z,externalForwardedProps:_,ownerState:w});return(0,p.jsxs)(C,{...k,children:[!1!==c?(0,p.jsx)(T,{...D,children:c||h[g]||AE[g]}):null,(0,p.jsx)(A,{...I,children:i}),null!=r?(0,p.jsx)(O,{...P,children:r}):null,null==r&&d?(0,p.jsx)(O,{...P,children:(0,p.jsx)(R,{size:"small","aria-label":a,title:a,color:"inherit",onClick:d,...E,children:(0,p.jsx)(L,{fontSize:"small",...N})})}):null]})});function AN(e){let{error:t}=e;return(0,p.jsx)(AL,{severity:"error",children:t.message})}var AB=n(8715);let AF=[{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 Az({value:e,onChange:t}){return(0,p.jsx)(T7,{label:"Font Size",control:(0,p.jsx)(Dn,{value:AF.find(t=>t.value===e),options:AF,getOptionLabel:e=>e.label,onChange:(e,{value:n})=>{t(n)},disableClearable:!0})})}var AV=n(9119);function AZ({action:e,submitText:t="Save",cancelText:n="Cancel",isReadonly:r,isValid:i,onActionChange:o,onSubmit:a,onDelete:s,onCancel:l,...u}){return(0,p.jsx)(x3,{direction:"row",gap:1,sx:{marginLeft:"auto"},...u,children:"read"===e?(0,p.jsxs)(p.Fragment,{children:[o&&(0,p.jsx)(L.Z,{disabled:r,variant:"contained",onClick:()=>o("update"),children:"Edit"}),s&&(0,p.jsx)(L.Z,{color:"error",disabled:r,variant:"outlined",onClick:s,children:"Delete"}),l&&(a||s)&&(0,p.jsx)(AV.Z,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey["500"],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),l&&(0,p.jsx)(L.Z,{color:"secondary",variant:"outlined",onClick:l,children:n})]}):(0,p.jsxs)(p.Fragment,{children:[a&&(0,p.jsx)(L.Z,{variant:"contained",disabled:!i,onClick:a,children:t}),l&&(0,p.jsx)(L.Z,{color:"secondary",variant:"outlined",onClick:l,children:n})]})})}var Aj=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},AH=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return eF(t,e),t.prototype.getDefaultShape=function(){return new Aj},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,o=t.width,a=t.angle,s=t.x-n(a)*o*(o>=i/3?1:2),l=t.y-r(a)*o*(o>=i/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*o,t.y+r(a)*o),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(a)*o,t.y-r(a)*o),e.lineTo(s,l)},t}(au);function AW(e,t){var n=null==e?"":e+"";return t&&(tu(t)?n=t.replace("{value}",n):tl(t)&&(n=t(e))),n}var A$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r,i,o=e.get(["axisLine","lineStyle","color"]),a=(r=e.get("center"),i=Math.min(n.getWidth(),n.getHeight()),{cx:iM(r[0],n.getWidth()),cy:iM(r[1],n.getHeight()),r:iM(e.get("radius"),i/2)});this._renderMain(e,t,n,o,a),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){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")?pY:hl,h=u.get("show"),d=u.getModel("lineStyle"),f=d.get("width"),p=[s,l];o3(p,!a),s=p[0];for(var g=(l=p[1])-s,m=s,v=[],y=0;h&&y<r.length;y++){var x=new c({shape:{startAngle:m,endAngle:l=s+g*Math.min(Math.max(r[y][0],0),1),cx:i.cx,cy:i.cy,clockwise:a,r0:i.r-f,r:i.r},silent:!0});x.setStyle({fill:r[y][1]}),x.setStyle(d.getLineStyle(["color","width"])),v.push(x),m=l}v.reverse(),te(v,function(e){return o.add(e)});var b=function(e){var t;if(e<=0)return r[0][1];for(t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,b,i,s,l,a,f),this._renderTitleAndDetail(e,t,n,b,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,b,i,s,l,a,f)},t.prototype._renderTicks=function(e,t,n,r,i,o,a,s,l){for(var u,c,h=this.group,d=i.cx,f=i.cy,p=i.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=iM(v.get("length"),p),_=iM(y.get("length"),p),C=o,M=(a-o)/b,k=M/w,T=v.getModel("lineStyle").getLineStyle(),D=y.getModel("lineStyle").getLineStyle(),A=v.get("distance"),I=0;I<=b;I++){if(u=Math.cos(C),c=Math.sin(C),v.get("show")){var O=A?A+l:l,P=new hS({shape:{x1:u*(p-O)+d,y1:c*(p-O)+f,x2:u*(p-S-O)+d,y2:c*(p-S-O)+f},style:T,silent:!0});"auto"===T.stroke&&P.setStyle({stroke:r(I/b)}),h.add(P)}if(x.get("show")){var O=x.get("distance")+A,R=AW(ik(I/b*(m-g)+g),x.get("formatter")),E=r(I/b),L=u*(p-S-O)+d,N=c*(p-S-O)+f,B=x.get("rotate"),F=0;"radial"===B?(F=-C+2*Math.PI)>Math.PI/2&&(F+=Math.PI):"tangential"===B?F=-C-Math.PI/2:th(B)&&(F=B*Math.PI/180),0===F?h.add(new aB({style:sR(x,{text:R,x:L,y:N,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):h.add(new aB({style:sR(x,{text:R,x:L,y:N,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:L,originY:N,rotation:F}))}if(y.get("show")&&I!==b){var O=y.get("distance");O=O?O+l:l;for(var z=0;z<=w;z++){var V=new hS({shape:{x1:(u=Math.cos(C))*(p-O)+d,y1:(c=Math.sin(C))*(p-O)+f,x2:u*(p-_-O)+d,y2:c*(p-_-O)+f},silent:!0,style:D});"auto"===D.stroke&&V.setStyle({stroke:r((I+z/w)/b)}),h.add(V),C+=k}C-=k}else C+=M}},t.prototype._renderPointer=function(e,t,n,r,i,o,a,s,l){var u=this.group,c=this._data,h=this._progressEls,d=[],f=e.get(["pointer","show"]),p=e.getModel("progress"),g=p.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 r,o=m.getItemModel(t).getModel("pointer"),a=iM(o.get("width"),i.r),s=iM(o.get("length"),i.r),l=e.get(["pointer","icon"]),u=o.get("offsetCenter"),c=iM(u[0],i.r),h=iM(u[1],i.r),d=o.get("keepAspect");return(r=l?ft(l,c-a/2,h-s,a,s,null,d):new AH({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:h}})).rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function _(e,t){var n=p.get("roundCap")?pY:hl,r=p.get("overlap"),a=r?p.get("width"):l/m.count(),u=r?i.r-a:i.r-(e+1)*a,c=r?i.r:i.r-e*a,h=new n({shape:{startAngle:o,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:u,r:c}});return r&&(h.z2=x-m.get(v,e)%x),h}(g||f)&&(m.diff(c).add(function(t){var n=m.get(v,t);if(f){var r=S(t,o);sS(r,{rotation:-((isNaN(+n)?w[0]:iC(n,b,w,!0))+Math.PI/2)},e),u.add(r),m.setItemGraphicEl(t,r)}if(g){var i=_(t,o);sS(i,{shape:{endAngle:iC(n,b,w,p.get("clip"))}},e),u.add(i),az(e.seriesIndex,m.dataType,t,i),d[t]=i}}).update(function(t,n){var r=m.get(v,t);if(f){var i=c.getItemGraphicEl(n),a=i?i.rotation:o,s=S(t,a);s.rotation=a,sw(s,{rotation:-((isNaN(+r)?w[0]:iC(r,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);sw(y,{shape:{endAngle:iC(r,b,w,p.get("clip"))}},e),u.add(y),az(e.seriesIndex,m.dataType,t,y),d[t]=y}}).execute(),m.each(function(e){var t=m.getItemModel(e),n=t.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(f){var s=m.getItemGraphicEl(e),l=m.getItemVisual(e,"style"),u=l.fill;if(s instanceof ag){var c=s.style;s.useStyle(e4({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",r(iC(m.get(v,e),b,[0,1],!0))),s.z2EmphasisLift=0,sf(s,t),sc(s,i,o,a)}if(g){var h=d[e];h.useStyle(m.getItemVisual(e,"style")),h.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),h.z2EmphasisLift=0,sf(h,t),sc(h,i,o,a)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=ft(i,t.cx-r/2+iM(o[0],t.r),t.cy-r/2+iM(o[1],t.r),r,r,null,a);s.z2=+!!n.get("showAbove"),s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var o=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new ix,h=[],d=[],f=e.isAnimationEnabled(),p=e.get(["pointer","showAbove"]);a.diff(this._data).add(function(e){h[e]=new aB({silent:!0}),d[e]=new aB({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 ix,m=r(iC(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),x=i.cx+iM(y[0],i.r),b=i.cy+iM(y[1],i.r),w=h[t];w.attr({z2:2*!p,style:sR(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=i.cx+iM(_[0],i.r),M=i.cy+iM(_[1],i.r),k=iM(S.get("width"),i.r),T=iM(S.get("height"),i.r),D=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:m,w=d[t],A=S.get("formatter");w.attr({z2:2*!p,style:sR(S,{x:C,y:M,text:AW(o,A),width:isNaN(k)?null:k,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:D})}),sZ(w,{normal:S},o,function(e){return AW(e,A)}),f&&function(e,t,n,r,i){var o=sV(e);if(o.valueAnimation&&o.prevValue!==o.value){var a=o.defaultInterpolatedText,s=ty(o.interpolatedValue,o.prevValue),l=o.value;e.percent=0,(null==o.prevValue?sS:sw)(e,{percent:1},r,t,null,function(r){var u=i8(n,o.precision,s,l,r);o.interpolatedValue=1===r?null:u,sA(e,sI({labelDataIndex:t,labelFetcher:i,defaultText:a?a(u):u+""},o.statesModels,u))})}}(w,t,a,e,{getFormattedLabel:function(e,t,n,r,i,a){return AW(a?a.interpolatedValue:o,A)}}),g.add(w)}c.add(g)}),this.group.add(c),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(du);function AG(e,t,n){t=ts(t)&&{coordDimensions:t}||e4({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=new pB(pF(r,t).dimensions,e);return i.initData(r,n),i}var AU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return eF(t,e),t.prototype.getInitialData=function(e,t){return AG(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}(ck);function Aq(e){let{width:t,height:n,data:r,format:i,axisLine:o,max:a}=e,s=vz(),l=function(e,t){let n=(0,g.useRef)();return(void 0===n.current||!1===vZ()(t,n.current.deps))&&(n.current={value:e(),deps:t}),n.current.value}(()=>{if(void 0===r.value)return s.noDataOption;let e=AY(r.value,i,t,n);return{title:{show:!1},tooltip:{show:!1},series:[{type:"gauge",center:["50%","65%"],radius:"86%",startAngle:200,endAngle:-20,min:0,max:a,silent:!0,progress:{show:!0,width:16,itemStyle:{color:"auto"}},pointer:{show:!1},axisLine:{lineStyle:{color:[[1,"rgba(127,127,127,0.35)"]],width:16}},axisTick:{show:!1,distance:0},splitLine:{show:!1},axisLabel:{show:!1,distance:-18,color:"#999",fontSize:12},anchor:{show:!1},title:{show:!1},detail:{show:!1},data:[{value:r.value}]},{type:"gauge",center:["50%","65%"],radius:"100%",startAngle:200,endAngle:-20,min:0,max:a,pointer:{show:!0,icon:t>170?"path://M12.8,0.7l12,40.1H0.7L12.8,0.7z":"none",length:10,width:5,offsetCenter:[0,"-49%"],itemStyle:{color:"auto"}},axisLine:o,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},detail:{show:!0,width:"60%",borderRadius:8,offsetCenter:[0,"-9%"],color:"inherit",fontSize:e,formatter:null===r.value?()=>"null":e=>eE(e,i)},data:[{value:r.value,name:r.label,title:{show:!0,color:s.echartsTheme.textStyle?.color??"inherit",offsetCenter:[0,"55%"],overflow:"truncate",fontSize:12,width:.8*t}}]}]}},[r,t,n,s,i,o,a]);return(0,p.jsx)(xz,{sx:{width:t,height:n,padding:`${s.container.padding.default}px`},option:l,theme:s.echartsTheme})}function AY(e,t,n,r){let i=Math.min(n,r)/(("number"==typeof e?eE(e,t):`${e}`).length??2)*.7;return`clamp(3px, ${i}px, 24px)`}pr([function(e){e.registerChartView(A$),e.registerSeriesModel(AU)},vr,vu,vI,vE]);var AX=n(252),AK=n(7784);let AQ=[],AJ=[];function A0(e){return e>=127462&&e<=127487}function A1(e,t,n){if(t==e.length)return t;t&&A5(e.charCodeAt(t))&&A3(e.charCodeAt(t-1))&&t--;let r=A2(e,t);for(t+=A4(r);t<e.length;){let i=A2(e,t);if(8205==r||8205==i||n&&function(e){if(e<768)return!1;for(let t=0,n=AQ.length;;){let r=t+n>>1;if(e<AQ[r])n=r;else{if(!(e>=AJ[r]))return!0;t=r+1}if(t==n)return!1}}(i))t+=A4(i),r=i;else if(A0(i)){let n=0,r=t-2;for(;r>=0&&A0(A2(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function A2(e,t){let n=e.charCodeAt(t);if(!A3(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return A5(r)?(n-55296<<10)+(r-56320)+65536:n}function A5(e){return e>=56320&&e<57344}function A3(e){return e>=55296&&e<56320}function A4(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?AJ:AQ).push(n+=e[t])})();class A8{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]=Ii(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),A9.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Ii(this,e,t);let n=[];return this.decompose(e,t,n,0),A9.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),r=new Ie(this),i=new Ie(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new Ie(this,e)}iterRange(e,t=this.length){return new It(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new In(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 A6(e):A9.from(A6.split(e,[])):A8.empty}}class A6 extends A8{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,r){for(let i=0;;i++){let o=this.text[i],a=r+o.length;if((t?n:a)>=e)return new Ir(r,a,n,o);r=a+1,n++}}decompose(e,t,n,r){var i;let o=e<=0&&t>=this.length?this:new A6((i=this.text,A7(i,[""],e,t)),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=A7(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new A6(t,e.length+o.length));else{let e=t.length>>1;n.push(new A6(t.slice(0,e)),new A6(t.slice(e)))}}else n.push(o)}replace(e,t,n){var r,i;if(!(n instanceof A6))return super.replace(e,t,n);[e,t]=Ii(this,e,t);let o=A7(this.text,A7(n.text,(r=this.text,i=0,A7(r,[""],0,e))),t),a=this.length+n.length-(t-e);return o.length<=32?new A6(o,a):A9.from(A6.split(o,[]),a)}sliceString(e,t=this.length,n="\n"){[e,t]=Ii(this,e,t);let r="";for(let i=0,o=0;i<=t&&o<this.text.length;o++){let a=this.text[o],s=i+a.length;i>e&&o&&(r+=n),e<s&&t>i&&(r+=a.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new A6(n,r)),n=[],r=-1);return r>-1&&t.push(new A6(n,r)),t}}class A9 extends A8{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,r){for(let i=0;;i++){let o=this.children[i],a=r+o.length,s=n+o.lines-1;if((t?s:a)>=e)return o.lineInner(e,t,n,r);r=a+1,n=s+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i<this.children.length;i++){let a=this.children[i],s=o+a.length;if(e<=s&&t>=o){let i=r&(+(o<=e)|2*(s>=t));o>=e&&s<=t&&!i?n.push(a):a.decompose(e-o,t-o,n,i)}o=s+1}}replace(e,t,n){if([e,t]=Ii(this,e,t),n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let o=this.children[r],a=i+o.length;if(e>=i&&t<=a){let s=o.replace(e-i,t-i,n),l=this.lines-o.lines+s.lines;if(s.lines<l>>4&&s.lines>l>>6){let i=this.children.slice();return i[r]=s,new A9(i,this.length-(t-e)+n.length)}return super.replace(i,a,s)}i=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=Ii(this,e,t);let r="";for(let i=0,o=0;i<this.children.length&&o<=t;i++){let a=this.children[i],s=o+a.length;o>e&&i&&(r+=n),e<s&&t>o&&(r+=a.sliceString(e-o,t-o,n)),o=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof A9))return 0;let n=0,[r,i,o,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==o||i==a)return n;let s=this.children[r],l=e.children[i];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 A6(n,t)}let r=Math.max(32,n>>5),i=r<<1,o=r>>1,a=[],s=0,l=-1,u=[];function c(){0!=s&&(a.push(1==u.length?u[0]:A9.from(u,l)),l=-1,s=u.length=0)}for(let t of e)!function e(t){let n;if(t.lines>i&&t instanceof A9)for(let n of t.children)e(n);else t.lines>o&&(s>o||!s)?(c(),a.push(t)):t instanceof A6&&s&&(n=u[u.length-1])instanceof A6&&t.lines+n.lines<=32?(s+=t.lines,l+=t.length+1,u[u.length-1]=new A6(n.text.concat(t.text),n.length+1+t.length)):(s+t.lines>r&&c(),s+=t.lines,l+=t.length+1,u.push(t))}(t);return c(),1==a.length?a[0]:new A9(a,t)}}function A7(e,t,n=0,r=1e9){for(let i=0,o=0,a=!0;o<e.length&&i<=r;o++){let s=e[o],l=i+s.length;l>=n&&(l>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),a?(t[t.length-1]+=s,a=!1):t.push(s)),i=l+1}return t}A8.empty=new A6([""],0);class Ie{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 A6?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof A6?r.text.length:r.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&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof A6){let i=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof A6?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class It{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Ie(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:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.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 In{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=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=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(A8.prototype[Symbol.iterator]=function(){return this.iter()},Ie.prototype[Symbol.iterator]=It.prototype[Symbol.iterator]=In.prototype[Symbol.iterator]=function(){return this});class Ir{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function Ii(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function Io(e,t,n=!0,r=!0){return function(e,t,n=!0,r=!0){return(n?A1:function(e,t,n){for(;t>0;){let r=A1(e,t-2,n);if(r<t)return r;t--}return 0})(e,t,r)}(e,t,n,r)}function Ia(e,t){let n=e.charCodeAt(t);if(!(n>=55296&&n<56320)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return r>=56320&&r<57344?(n-55296<<10)+(r-56320)+65536:n}function Is(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function Il(e){return e<65536?1:2}let Iu=/\r\n?|\n/;var Ic=((qC=Ic||(Ic={}))[qC.Simple=0]="Simple",qC[qC.TrackDel=1]="TrackDel",qC[qC.TrackBefore=2]="TrackBefore",qC[qC.TrackAfter=3]="TrackAfter",qC);class Ih{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,r=0;t<this.sections.length;){let i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}iterChangedRanges(e,t=!1){Ig(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new Ih(e)}composeDesc(e){return this.empty?e:e.empty?this:Iv(this,e)}mapDesc(e,t=!1){return e.empty?this:Im(this,e,t)}mapPos(e,t=-1,n=Ic.Simple){let r=0,i=0;for(let o=0;o<this.sections.length;){let a=this.sections[o++],s=this.sections[o++],l=r+a;if(s<0){if(l>e)return i+(e-r);i+=a}else{if(n!=Ic.Simple&&l>=e&&(n==Ic.TrackDel&&r<e&&l>e||n==Ic.TrackBefore&&r<e||n==Ic.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?i:i+s;i+=s}r=l}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],o=this.sections[n++],a=r+i;if(o>=0&&r<=t&&a>=e)return!(r<e)||!(a>t)||"cover";r=a}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}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 Ih(e)}static create(e){return new Ih(e)}}class Id extends Ih{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 Ig(this,(t,n,r,i,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return Im(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r<t.length;r+=2){let o=t[r],a=t[r+1];if(a>=0){t[r]=a,t[r+1]=o;let s=r>>1;for(;n.length<s;)n.push(A8.empty);n.push(o?e.slice(i,i+o):A8.empty)}i+=o}return new Id(t,n)}compose(e){return this.empty?e:e.empty?this:Iv(this,e,!0)}map(e,t=!1){return e.empty?this:Im(this,e,t,!0)}iterChanges(e,t=!1){Ig(this,e,t)}get desc(){return Ih.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new Iy(this);r:for(let o=0,a=0;;){let s=o==e.length?1e9:e[o++];for(;a<s||a==s&&0==i.len;){if(i.done)break r;let e=Math.min(i.len,s-a);If(r,e,-1);let o=-1==i.ins?-1:0==i.off?i.ins:0;If(t,e,o),o>0&&Ip(n,t,i.text),i.forward(e),a+=e}let l=e[o++];for(;a<l;){if(i.done)break r;let e=Math.min(i.len,l-a);If(t,e,-1),If(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),a+=e}}return{changes:new Id(t,n),filtered:Ih.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],o=0,a=null;function s(e=!1){if(!e&&!r.length)return;o<t&&If(r,t-o,-1);let n=new Id(r,i);a=a?a.compose(n.map(a)):n,r=[],i=[],o=0}return!function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof Id){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?A8.of(u.split(n||Iu)):u:A8.empty,h=c.length;if(e==a&&0==h)return;e<o&&s(),e>o&&If(r,e-o,-1),If(r,a-e,h),Ip(i,r,c),o=a}}(e),s(!a),a}static empty(e){return new Id(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if("number"==typeof i)t.push(i,-1);else if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==i.length)t.push(i[0],0);else{for(;n.length<r;)n.push(A8.empty);n[r]=A8.of(i.slice(1)),t.push(i[0],n[r].length)}}return new Id(t,n)}static createSet(e,t){return new Id(e,t)}}function If(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Ip(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(A8.empty);e.push(n)}}function Ig(e,t,n){let r=e.inserted;for(let i=0,o=0,a=0;a<e.sections.length;){let s=e.sections[a++],l=e.sections[a++];if(l<0)i+=s,o+=s;else{let u=i,c=o,h=A8.empty;for(;u+=s,c+=l,l&&r&&(h=h.append(r[a-2>>1])),!n&&a!=e.sections.length&&!(e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(i,u,o,c,h),i=u,o=c}}}function Im(e,t,n,r=!1){let i=[],o=r?[]:null,a=new Iy(e),s=new Iy(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);If(i,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(If(i,s.ins,-1);t;){let n=Math.min(a.len,t);a.ins>=0&&e<a.i&&a.len<=n&&(If(i,0,a.ins),o&&Ip(o,i,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;If(i,t,e<a.i?a.ins:0),o&&e<a.i&&Ip(o,i,a.text),e=a.i,a.forward(a.len-n)}else if(a.done&&s.done)return o?Id.createSet(i,o):Ih.create(i);else throw Error("Mismatched change set lengths")}}function Iv(e,t,n=!1){let r=[],i=n?[]:null,o=new Iy(e),a=new Iy(t);for(let e=!1;;){if(o.done&&a.done)return i?Id.createSet(r,i):Ih.create(r);if(0==o.ins)If(r,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=r.length;if(-1==o.ins){let n=-1==a.ins?-1:a.off?0:a.ins;If(r,t,n,e),i&&n&&Ip(i,r,a.text)}else -1==a.ins?(If(r,o.off?0:o.len,t,e),i&&Ip(i,r,o.textBit(t))):(If(r,o.off?0:o.len,a.off?0:a.ins,e),i&&!a.off&&Ip(i,r,a.text));e=(o.ins>t||a.ins>=0&&a.len>t)&&(e||r.length>n),o.forward2(t),a.forward(t)}}else If(r,0,a.ins,e),i&&Ip(i,r,a.text),a.next()}}class Iy{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?A8.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?A8.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 Ix{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,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new Ix(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return Ib.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return Ib.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 Ib.range(e.anchor,e.head)}static create(e,t,n){return new Ix(e,t,n)}}class Ib{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:Ib.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 Ib([this.main],0)}addRange(e,t=!0){return Ib.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,Ib.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 Ib(e.ranges.map(e=>Ix.fromJSON(e)),e.main)}static single(e,t=e){return new Ib([Ib.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,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return Ib.normalized(e.slice(),t);n=i.to}return new Ib(e,t)}static cursor(e,t=0,n,r){return Ix.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:0xffffff)<<6)}static range(e,t,n,r){let i=(null!=n?n:0xffffff)<<6|(null==r?7:Math.min(6,r));return t<e?Ix.create(t,e,48|i):Ix.create(e,t,8*(t>e)|i)}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 r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let o=i.from,a=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?Ib.range(a,o):Ib.range(o,a))}}return new Ib(e,t)}}function Iw(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let IS=0;class I_{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=IS++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new I_(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:IC),!!e.static,e.enables)}of(e){return new IM([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new IM(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new IM(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function IC(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class IM{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=IS++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>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)||IT(e,u)){let t=n(e);if(a?!Ik(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[i];if(null!=l){let i=IF(t,l);if(this.dependencies.every(n=>n instanceof I_?t.facet(n)===e.facet(n):!(n instanceof IA)||t.field(n,!1)==e.field(n,!1))||(a?Ik(s=n(e),i,r):r(s=n(e),i)))return e.values[o]=i,0}else s=n(e);return e.values[o]=s,1}}}}function Ik(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function IT(e,t){let n=!1;for(let r of t)1&IB(e,r)&&(n=!0);return n}let ID=I_.define({static:!0});class IA{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new IA(IS++,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(ID).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 r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(ID),i=n.facet(ID),o;return(o=r.find(e=>e.field==this))&&o!=i.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,ID.of({field:this,create:e})]}get extension(){return this}}let II={lowest:4,low:3,default:2,high:1,highest:0};function IO(e){return t=>new IR(t,e)}let IP={highest:IO(II.highest),high:IO(II.high),default:IO(II.default),low:IO(II.low),lowest:IO(II.lowest)};class IR{constructor(e,t){this.inner=e,this.prec=t}}class IE{of(e){return new IL(this,e)}reconfigure(e){return IE.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class IL{constructor(e,t){this.compartment=e,this.inner=t}}class IN{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,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 r,i,o;let a,s,l=[],u=Object.create(null),c=new Map;for(let n of(r=e,i=t,o=c,a=[[],[],[],[],[]],s=new Map,!function e(t,n){let r=s.get(t);if(null!=r){if(r<=n)return;let e=a[r].indexOf(t);e>-1&&a[r].splice(e,1),t instanceof IL&&o.delete(t.compartment)}if(s.set(t,n),Array.isArray(t))for(let r of t)e(r,n);else if(t instanceof IL){if(o.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let r=i.get(t.compartment)||t.inner;o.set(t.compartment,r),e(r,n)}else if(t instanceof IR)e(t.inner,t.prec);else if(t instanceof IA)a[n].push(t),t.provides&&e(t.provides,n);else if(t instanceof IM)a[n].push(t),t.facet.extensions&&e(t.facet.extensions,II.default);else{let r=t.extension;if(!r)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(r,n)}}(r,II.default),a.reduce((e,t)=>e.concat(t))))n instanceof IA?l.push(n):(u[n.facet.id]||(u[n.facet.id]=[])).push(n);let h=Object.create(null),d=[],f=[];for(let e of l)h[e.id]=f.length<<1,f.push(t=>e.slot(t));let p=null==n?void 0:n.config.facets;for(let e in u){let t=u[e],r=t[0].facet,i=p&&p[e]||[];if(t.every(e=>0==e.type)){if(h[r.id]=d.length<<1|1,IC(i,t))d.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));d.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}}else{for(let e of t)0==e.type?(h[e.id]=d.length<<1|1,d.push(e.value)):(h[e.id]=f.length<<1,f.push(t=>e.dynamicSlot(t)));h[r.id]=f.length<<1,f.push(e=>(function(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),o=r.filter(e=>!(1&e)),a=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let o=IF(e,r[t]);if(2==i[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of r)IB(e,t);return e.values[a]=s(e),1},update(e,n){if(!IT(e,o))return 0;let r=s(e);return t.compare(r,e.values[a])?0:(e.values[a]=r,1)},reconfigure(e,i){let o=IT(e,r),l=i.config.facets[t.id],u=i.facet(t);if(l&&!o&&IC(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,r,t))}}return new IN(e,c,f.map(e=>e(h)),h,d,u)}}function IB(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function IF(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let Iz=I_.define(),IV=I_.define({combine:e=>e.some(e=>e),static:!0}),IZ=I_.define({combine:e=>e.length?e[0]:void 0,static:!0}),Ij=I_.define(),IH=I_.define(),IW=I_.define(),I$=I_.define({combine:e=>!!e.length&&e[0]});class IG{constructor(e,t){this.type=e,this.value=t}static define(){return new IU}}class IU{of(e){return new IG(this,e)}}class Iq{constructor(e){this.map=e}of(e){return new IY(this,e)}}class IY{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 IY(this.type,t)}is(e){return this.type==e}static define(e={}){return new Iq(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}IY.reconfigure=IY.define(),IY.appendConfig=IY.define();class IX{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&Iw(n,t.newLength),i.some(e=>e.type==IX.time)||(this.annotations=i.concat(IX.time.of(Date.now())))}static create(e,t,n,r,i,o){return new IX(e,t,n,r,i,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(IX.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function IK(e,t,n){var r;let i,o,a;return n?(i=t.changes,o=Id.empty(t.changes.length),a=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(i)),{changes:a,selection:t.selection?t.selection.map(o):null===(r=e.selection)||void 0===r?void 0:r.map(i),effects:IY.mapEffects(e.effects,i).concat(IY.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function IQ(e,t,n){let r=t.selection,i=I0(t.annotations);return t.userEvent&&(i=i.concat(IX.userEvent.of(t.userEvent))),{changes:t.changes instanceof Id?t.changes:Id.of(t.changes||[],n,e.facet(IZ)),selection:r&&(r instanceof Ib?r:Ib.single(r.anchor,r.head)),effects:I0(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}IX.time=IG.define(),IX.userEvent=IG.define(),IX.addToHistory=IG.define(),IX.remote=IG.define();let IJ=[];function I0(e){return null==e?IJ:Array.isArray(e)?e:[e]}var I1=((qM=I1||(I1={}))[qM.Word=0]="Word",qM[qM.Space=1]="Space",qM[qM.Other=2]="Other",qM);let I2=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{r=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class I5{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)IB(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 IB(this,n),IF(this,n)}update(...e){return function e(t,n,r){let i=IQ(t,n.length?n[0]:{},t.doc.length);n.length&&!1===n[0].filter&&(r=!1);for(let e=1;e<n.length;e++){!1===n[e].filter&&(r=!1);let o=!!n[e].sequential;i=IK(i,IQ(t,n[e],o?i.changes.newLength:t.doc.length),o)}let o=IX.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(e){let t=e.startState,n=t.facet(IW),r=e;for(let i=n.length-1;i>=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=IK(r,IQ(t,o,e.changes.newLength),!0))}return r==e?e:IX.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(r?function(t){let n=t.startState,r=!0;for(let e of n.facet(Ij)){let n=e(t);if(!1===n){r=!1;break}Array.isArray(n)&&(r=!0===r?n:function(e,t){let n=[];for(let r=0,i=0;;){let o,a;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],a=e[r++];else{if(!(i<t.length))return n;o=t[i++],a=t[i++]}!n.length||n[n.length-1]<o?n.push(o,a):n[n.length-1]<a&&(n[n.length-1]=a)}}(r,n))}if(!0!==r){let e,i;if(!1===r)i=t.changes.invertedDesc,e=Id.empty(n.doc.length);else{let n=t.changes.filter(r);e=n.changes,i=n.filtered.mapDesc(n.changes).invertedDesc}t=IX.create(n,e,t.selection&&t.selection.map(i),IY.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let i=n.facet(IH);for(let r=i.length-1;r>=0;r--){let o=i[r](t);t=o instanceof IX?o:Array.isArray(o)&&1==o.length&&o[0]instanceof IX?o[0]:e(n,I0(o),!1)}return t}(o):o)}(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(IE.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(IY.reconfigure)?(n=null,r=t.value):t.is(IY.appendConfig)&&(n=null,r=I0(r).concat(t.value));t=n?e.startState.values.slice():new I5(n=IN.resolve(r,i,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let o=e.startState.facet(IV)?e.newSelection:e.newSelection.asSingle();new I5(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:Ib.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=I0(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(r);for(let e=0;e<n;e++)i[e]=i[e].map(l);let u=r.mapDesc(s,!0);i.push(a.range.map(u)),r=r.compose(l),o=IY.mapEffects(o,l).concat(IY.mapEffects(I0(a.effects),u))}return{changes:r,selection:Ib.create(i,t.mainIndex),effects:o}}changes(e=[]){return e instanceof Id?e:Id.of(e,this.doc.length,this.facet(I5.lineSeparator))}toText(e){return A8.of(e.split(this.facet(I5.lineSeparator)||Iu))}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:(IB(this,t),IF(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof IA&&null!=this.config.address[r.id]&&(t[n]=r.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 r=[];if(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],o=e[t];r.push(i.init(e=>i.spec.fromJSON(o,e)))}}return I5.create({doc:e.doc,selection:Ib.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=IN.resolve(e.extensions||[],new Map),n=e.doc instanceof A8?e.doc:A8.of((e.doc||"").split(t.staticFacet(I5.lineSeparator)||Iu)),r=e.selection?e.selection instanceof Ib?e.selection:Ib.single(e.selection.anchor,e.selection.head):Ib.single(0);return Iw(r,n.length),t.staticFacet(IV)||(r=r.asSingle()),new I5(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(I5.tabSize)}get lineBreak(){return this.facet(I5.lineSeparator)||"\n"}get readOnly(){return this.facet(I$)}phrase(e,...t){for(let t of this.facet(I5.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 r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Iz))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){var t;return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return I1.Space;if(function(e){if(r)return r.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||I2.test(n)))return!0}return!1}(e))return I1.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return I1.Word;return I1.Other}}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,a=e-n;for(;o>0;){let e=Io(t,o,!1);if(i(t.slice(e,o))!=I1.Word)break;o=e}for(;a<r;){let e=Io(t,a);if(i(t.slice(a,e))!=I1.Word)break;a=e}return o==a?null:Ib.range(o+n,a+n)}}function I3(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],o=r[e];if(void 0===o)r[e]=i;else if(o===i||void 0===i);else if(Object.hasOwnProperty.call(n,e))r[e]=n[e](o,i);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}I5.allowMultipleSelections=IV,I5.tabSize=I_.define({combine:e=>e.length?e[0]:4}),I5.lineSeparator=IZ,I5.readOnly=I$,I5.phrases=I_.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),I5.languageData=Iz,I5.changeFilter=Ij,I5.transactionFilter=IH,I5.transactionExtender=IW,IE.reconfigure=IY.define();class I4{eq(e){return this==e}range(e,t=e){return I8.create(e,t,this)}}I4.prototype.startSide=I4.prototype.endSide=0,I4.prototype.point=!1,I4.prototype.mapMode=Ic.TrackDel;class I8{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new I8(e,t,n)}}function I6(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class I9{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,a=i.length;;){if(o==a)return o;let r=o+a>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return s>=0?o:a;s>=0?a=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t){let n=[],r=[],i=[],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),r.push(h-o),i.push(d-o))}return{mapped:n.length?new I9(r,i,n,a):null,pos:o}}}class I7{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new I7(e,t,n,r)}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:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(I6)),this.isEmpty)return t.length?I7.of(t):this;let a=new On(this,null,-1).goto(0),s=0,l=[],u=new Oe;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||r>this.chunkEnd(a.chunkIndex)||i<this.chunkPos[a.chunkIndex])&&u.addChunk(this.chunkPos[a.chunkIndex],this.chunk[a.chunkIndex])?a.nextChunk():((!o||r>a.to||i<a.from||o(a.from,a.to,a.value))&&!u.addInner(a.from,a.to,a.value)&&l.push(I8.create(a.from,a.to,a.value)),a.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?I7.empty:this.nextLayer.update({add:l,filter:o,filterFrom:r,filterTo:i}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1;for(let i=0;i<this.chunk.length;i++){let o=this.chunkPos[i],a=this.chunk[i],s=e.touchesRange(o,o+a.length);if(!1===s)r=Math.max(r,a.maxPoint),t.push(a),n.push(e.mapPos(o));else if(!0===s){let{mapped:i,pos:s}=a.map(o,e);i&&(r=Math.max(r,i.maxPoint),t.push(i),n.push(s))}}let i=this.nextLayer.map(e);return 0==t.length?i:new I7(n,t,i||I7.empty,r)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return Or.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Or.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),a=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=Ot(o,a,n),l=new Oo(o,s,i),u=new Oo(a,s,i);n.iterGaps((e,t,n)=>Oa(l,e,u,t,n,r)),n.empty&&0==n.length&&Oa(l,0,u,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=0x3b9ac9ff);let i=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),o=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(i.length!=o.length)return!1;if(!i.length)return!0;let a=Ot(i,o),s=new Oo(i,a,0).goto(n),l=new Oo(o,a,0).goto(n);for(;;){if(s.to!=l.to||!Os(s.active,l.active)||s.point&&(!l.point||!s.point.eq(l.point)))return!1;if(s.to>r)return!0;s.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new Oo(e,null,i).goto(t),a=t,s=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFrom<t?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,s);r.point(a,e,o.point,n,i,o.pointRank),s=Math.min(o.openEnd(e),n.length)}else e>a&&(r.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 Oe;for(let r of e instanceof I8?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(I6(t,r)>0)return e.slice().sort(I6);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return I7.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=I7.empty;r=r.nextLayer)t=new I7(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}I7.empty=new I7([],[],null,-1),I7.empty.nextLayer=I7.empty;class Oe{finishChunk(e){this.chunks.push(new I9(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 Oe)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<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(I7.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=I7.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Ot(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=r.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))||i.add(e.chunk[t])}return i}class On{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}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 r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}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 Or{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let o=e[i];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&r.push(new On(o,t,n,i));return 1==r.length?r[0]:new Or(r)}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--)Oi(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--)Oi(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(),Oi(this.heap,0)}}}function Oi(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),0>n.compare(i))break;e[r]=n,e[t]=i,t=r}}class Oo{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=Or.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){Ol(this.active,e),Ol(this.activeTo,e),Ol(this.activeRank,e),this.minActive=Oc(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Ou(this.active,t,n),Ou(this.activeTo,t,r),Ou(this.activeRank,t,i),e&&Ou(e,t,this.cursor.from),this.minActive=Oc(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&0>(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Ol(n,r)}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 Oa(e,t,n,r,i,o){e.goto(t),n.goto(r);let a=r+i,s=r,l=r-t;for(;;){let t=e.to+l-n.to,r=t||e.endSide-n.endSide,i=r<0?e.to+l:n.to,u=Math.min(i,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Os(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(s,u,e.point,n.point):u>s&&!Os(e.active,n.active)&&o.compareRange(s,u,e.active,n.active),i>a)break;(t||e.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(i),s=i,r<=0&&e.next(),r>=0&&n.next()}}function Os(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 Ol(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Ou(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function Oc(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)0>(t[i]-r||e[i].endSide-e[n].endSide)&&(n=i,r=t[i]);return n}function Oh(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=Io(e,i));return r}function Od(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=Io(e,r)}return!0===r?-1:e.length}let Of="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Op="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Og="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Om{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,i,o,a){let s=[],l=/^@(\w+)\b/.exec(t[0]),u=l&&"keyframes"==l[1];if(l&&null==i)return o.push(t[0]+";");for(let n in i){let a=i[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(r(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(" ")+"}")}(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Og[Of]||1;return Og[Of]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[Op],i=n&&n.nonce;r?i&&r.setNonce(i):r=new Oy(e,i),r.mount(Array.isArray(t)?t:[t],e)}}let Ov=new Map;class Oy{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Ov.get(n);if(t)return e[Op]=t;this.sheet=new r.CSSStyleSheet,Ov.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Op]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let o=e[t],a=this.modules.indexOf(o);if(a<i&&a>-1&&(this.modules.splice(a,1),i--,a=-1),-1==a){if(this.modules.splice(i++,0,o),n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}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 Ox={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:"'"},Ob={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Ow="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),OS="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),O_=0;O_<10;O_++)Ox[48+O_]=Ox[96+O_]=String(O_);for(var O_=1;O_<=24;O_++)Ox[O_+111]="F"+O_;for(var O_=65;O_<=90;O_++)Ox[O_]=String.fromCharCode(O_+32),Ob[O_]=String.fromCharCode(O_);for(var OC in Ox)Ob.hasOwnProperty(OC)||(Ob[OC]=Ox[OC]);function OM(e){let t;return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function Ok(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function OT(e,t){if(!t.anchorNode)return!1;try{return Ok(e,t.anchorNode)}catch(e){return!1}}function OD(e){return 3==e.nodeType?Oz(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function OA(e,t,n,r){return!!n&&(OP(e,t,n,r,-1)||OP(e,t,n,r,1))}function OI(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function OO(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function OP(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:OR(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=OI(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType||1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?OR(e):0}}}function OR(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function OE(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function OL(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(t.width-e.offsetWidth))&&(n=1),(r>.995&&r<1.005||!isFinite(r)||1>Math.abs(t.height-e.offsetHeight))&&(r=1),{scaleX:n,scaleY:r}}class ON{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?OR(t):0),n,Math.min(e.focusOffset,n?OR(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let OB=null;function OF(e){if(e.setActive)return e.setActive();if(OB)return e.focus(OB);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==OB?{get preventScroll(){return OB={preventScroll:!0},!0}}:void 0),!OB){OB=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function Oz(e,t,n=t){let r=i||(i=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function OV(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,e.dispatchEvent(o);let a=new KeyboardEvent("keyup",i);return a.synthetic=!0,e.dispatchEvent(a),o.defaultPrevented||a.defaultPrevented}function OZ(e){for(;e.attributes.length;)e.removeAttributeNode(e.attributes[0])}function Oj(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function OH(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;r=OR(n=n.childNodes[r-1])}else{if(!n.parentNode||OO(n))return null;r=OI(n),n=n.parentNode}}}function OW(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r<n.nodeValue.length)return{node:n,offset:r};if(1==n.nodeType&&r<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[r],r=0}else{if(!n.parentNode||OO(n))return null;r=OI(n)+1,n=n.parentNode}}}class O${constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new O$(e.parentNode,OI(e),t)}static after(e,t){return new O$(e.parentNode,OI(e)+1,t)}}let OG=[];class OU{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,r=null,i;for(let o of this.children){if(7&o.flags){if(!o.dom&&(i=r?r.nextSibling:n.firstChild)){let e=OU.get(i);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(i)}o.sync(e,t),o.flags&=-8}if(i=r?r.nextSibling:n.firstChild,t&&!t.written&&t.node==n&&i!=o.dom&&(t.written=!0),o.dom.parentNode==n)for(;i&&i!=o.dom;)i=Oq(i);else n.insertBefore(o.dom,i);r=o.dom}for((i=r?r.nextSibling:n.firstChild)&&t&&t.node==n&&(t.written=!0);i;)i=Oq(i)}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 r=0==OR(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!OU.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-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==r&&(r=s,i=l),l>t&&n.dom.parentNode==this.dom){o=s,a=u;break}u=c,l=c+n.breakAfter}return{from:i,to:a<0?n+this.length:a,startDOM:(r?this.children[r-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=OG){this.markDirty();for(let r=e;r<t;r++){let e=this.children[r];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 OY(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,r,i,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 Oq(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}OU.prototype.breakAfter=0;class OY{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 OX(e,t,n,r,i,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==r&&c&&!a&&!d&&o.length<2&&c.merge(n,i,o.length?h:null,0==n,s,l))){if(r<u.length){let e=u[r];e&&(i<e.length||e.breakAfter&&(null==h?void 0:h.breakAfter))?(t==r&&(e=e.split(i),i=0),!d&&h&&e.merge(0,i,h,!0,0,l)?o[o.length-1]=e:((i||e.children.length&&!e.children[0].length)&&e.merge(0,i,null,!1,0,l),o.push(e))):(null==e?void 0:e.breakAfter)&&(h?h.breakAfter=1:a=1),r++}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<r&&o.length;)if(u[r-1].become(o[o.length-1]))r--,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&&r<u.length&&!u[t-1].breakAfter&&u[r].merge(0,0,u[t-1],!1,s,l)&&t--,(t<r||o.length)&&e.replaceChildren(t,r,o)}}function OK(e,t,n,r,i,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 r)h+=e.length;e.length+=h,OX(e,u,c,s,l,r,0,i,o)}let OQ="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},OJ="undefined"!=typeof document?document:{documentElement:{style:{}}},O0=/Edge\/(\d+)/.exec(OQ.userAgent),O1=/MSIE \d/.test(OQ.userAgent),O2=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(OQ.userAgent),O5=!!(O1||O2||O0),O3=!O5&&/gecko\/(\d+)/i.test(OQ.userAgent),O4=!O5&&/Chrome\/(\d+)/.exec(OQ.userAgent),O8="webkitFontSmoothing"in OJ.documentElement.style,O6=!O5&&/Apple Computer/.test(OQ.vendor),O9=O6&&(/Mobile\/\w+/.test(OQ.userAgent)||OQ.maxTouchPoints>2);var O7={mac:O9||/Mac/.test(OQ.platform),windows:/Win/.test(OQ.platform),linux:/Linux|X11/.test(OQ.platform),ie:O5,ie_version:O1?OJ.documentMode||6:O2?+O2[1]:O0?+O0[1]:0,gecko:O3,gecko_version:O3?+(/Firefox\/(\d+)/.exec(OQ.userAgent)||[0,0])[1]:0,chrome:!!O4,chrome_version:O4?+O4[1]:0,ios:O9,android:/Android\b/.test(OQ.userAgent),webkit:O8,safari:O6,webkit_version:O8?+(/\bAppleWebKit\/(\d+)/.exec(OQ.userAgent)||[0,0])[1]:0,tabSize:null!=OJ.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Pe extends OU{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 Pe&&!(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 Pe(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 O$(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 r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,a=0;0==t&&n<0||t==r&&n>=0?!(O7.chrome||O7.gecko)&&(t?(i--,a=1):o<r&&(o++,a=-1)):n<0?i--:o<r&&o++;let s=Oz(e,i,o).getClientRects();if(!s.length)return null;let l=s[(a?a<0:n>=0)?0:s.length-1];return O7.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,e=>e.width)||l),a?OE(l,a<0):l||null}(this.dom,e,t)}}class Pt extends OU{constructor(e,t=[],n=0){for(let r of(super(),this.mark=e,this.children=t,this.length=n,t))r.setParent(this)}setAttrs(e){if(OZ(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,r,i,o){return(!n||!!(n instanceof Pt&&n.mark.eq(this.mark))&&(!e||!(i<=0))&&(!(t<this.length)||!(o<=0)))&&(OK(this,e,t,n?n.children.slice():[],i-1,o-1),this.markDirty(),!0)}split(e){let t=[],n=0,r=-1,i=0;for(let o of this.children){let a=n+o.length;a>e&&t.push(n<e?o.split(e-n):o),r<0&&n>=e&&(r=i),n=a,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Pt(this.mark,t,o)}domAtPos(e){return Pi(this,e)}coordsAt(e,t){return Po(this,e,t)}}class Pn extends OU{static create(e,t,n){return new Pn(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Pn.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,r,i,o){return(!n||n instanceof Pn&&!!this.widget.compare(n.widget)&&(!(e>0)||!(i<=0))&&(!(t<this.length)||!(o<=0)))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}become(e){return e instanceof Pn&&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 A8.empty;let e=this;for(;e.parent;)e=e.parent;let{view:t}=e,n=t&&t.state.doc,r=this.posAtStart;return n?n.slice(r,r+this.length):A8.empty}domAtPos(e){return(this.length?0==e:this.side>0)?O$.before(this.dom):O$.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 r=this.dom.getClientRects(),i=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?r.length-1:0;i=r[t],e>0?0!=t:t!=r.length-1&&!(i.top<i.bottom);t+=o?-1:1);return OE(i,!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 Pr extends OU{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Pr&&e.side==this.side}split(){return new Pr(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?O$.before(this.dom):O$.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return A8.empty}get isHidden(){return!0}}function Pi(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;i<r.length;i++){let o=r[i],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=i;e>0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e<r.length;e++){let t=r[e];if(t.dom.parentNode==n)return t.domAtPos(0)}return new O$(n,0)}function Po(e,t,n){let r=null,i=-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)&&(r=c,i=s-u)),u=h}}(e,t);let s=(n<0?r:o)||r||o;return s?s.coordsAt(Math.max(0,s==r?i:a),n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=OD(t);return n[n.length-1]||null}(e)}function Pa(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}Pe.prototype.children=Pn.prototype.children=Pr.prototype.children=OG;let Ps=Object.create(null);function Pl(e,t,n){if(e==t)return!0;e||(e=Ps),t||(t=Ps);let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function Pu(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}class Pc{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 Ph=((qk=Ph||(Ph={}))[qk.Text=0]="Text",qk[qk.WidgetBefore=1]="WidgetBefore",qk[qk.WidgetAfter=2]="WidgetAfter",qk[qk.WidgetRange=3]="WidgetRange",qk);class Pd extends I4{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Pf(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 Pg(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:o}=Pm(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(o?t?2e8:1:-6e8)+1}return new Pg(e,n,r,t,e.widget||null,!0)}static line(e){return new Pp(e)}static set(e,t=!1){return I7.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Pd.none=I7.empty;class Pf extends Pd{constructor(e){let{start:t,end:n}=Pm(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 Pf&&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))&&Pl(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)}}Pf.prototype.point=!1;class Pp extends Pd{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Pp&&this.spec.class==e.spec.class&&Pl(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)}}Pp.prototype.mapMode=Ic.TrackBefore,Pp.prototype.point=!0;class Pg extends Pd{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?Ic.TrackBefore:Ic.TrackAfter:Ic.TrackDel}get type(){return this.startSide!=this.endSide?Ph.WidgetRange:this.startSide<=0?Ph.WidgetBefore:Ph.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){var t,n;return e instanceof Pg&&(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 Pm(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function Pv(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}Pg.prototype.point=!0;class Py extends OU{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,i,o){if(n){if(!(n instanceof Py))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),OK(this,e,t,n?n.children.slice():[],i,o),!0}split(e){let t=new Py;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,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){Pl(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof Pt&&o.length&&(i=o[o.length-1])instanceof Pt&&i.mark.eq(n.mark)?e(i,n.children[0],r-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=Pa(t,this.attrs||{})),n&&(this.attrs=Pa({class:n},this.attrs||{}))}domAtPos(e){return Pi(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(OZ(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&&(Pu(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&OU.get(r)instanceof Pt;)r=r.lastChild;if(!r||!this.length||"BR"!=r.nodeName&&(null===(n=OU.get(r))||void 0===n?void 0:n.isEditable)==!1&&(!O7.ios||!this.children.some(e=>e instanceof Pe))){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 Pe)||/[^ -~]/.test(n.text))return null;let r=OD(n.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=Po(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 r=(t-e.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(e){return e instanceof Py&&0==this.children.length&&0==e.children.length&&Pl(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,t){for(let n=0,r=0;n<e.children.length;n++){let i=e.children[n],o=r+i.length;if(o>=t){if(i instanceof Py)return i;if(o>t)break}r=o+i.breakAfter}return null}}class Px extends OU{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return(!n||n instanceof Px&&!!this.widget.compare(n.widget)&&(!(e>0)||!(i<=0))&&(!(t<this.length)||!(o<=0)))&&(this.length=e+(n?n.length:0)+(this.length-t),!0)}domAtPos(e){return 0==e?O$.before(this.dom):O$.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let n=new Px(this.widget,t,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return OG}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):A8.empty}domBoundsAround(){return null}become(e){return e instanceof Px&&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 Pb?null:OE(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 Pb extends Pc{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 Pw{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,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 Px&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Py),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(PS(new Pr(-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 Px||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)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 r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(PS(new Pe(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof Pg){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 Pg){if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Px(n.widget||P_.block,a,n));else{let o=Pn.create(n.widget||P_.inline,a,a?0:n.startSide),s=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e<t||n.startSide>0),l=!o.isEditable&&(e<t||i>r.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||s||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(u.append(PS(new Pr(1),r),i),i=r.length+Math.max(0,i-r.length)),u.append(PS(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?e<t||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.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=i)}static build(e,t,n,r,i){let o=new Pw(e,t,n,i);return o.openEnd=I7.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function PS(e,t){for(let n of t)e=new Pt(n,[e],e.length);return e}class P_ extends Pc{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}}P_.inline=new P_("span"),P_.block=new P_("div");var PC=((qT=PC||(PC={}))[qT.LTR=0]="LTR",qT[qT.RTL=1]="RTL",qT);let PM=PC.LTR,Pk=PC.RTL;function PT(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}let PD=PT("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),PA=PT("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),PI=Object.create(null),PO=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);PI[t]=n,PI[n]=-t}function PP(e){return e<=247?PD[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?PA[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}let PR=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class PE{get dir(){return this.level%2?Pk:PM}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,r){let i=-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;(i<0||(0!=r?r<0?a.from<t:a.to>t:e[i].level>a.level))&&(i=o)}}if(i<0)throw RangeError("Index out of range");return i}}let PL=[];function PN(e){return[new PE(0,e,0)]}let PB="",PF=I_.define(),Pz=I_.define(),PV=I_.define(),PZ=I_.define(),Pj=I_.define(),PH=I_.define(),PW=I_.define(),P$=I_.define(),PG=I_.define(),PU=I_.define({combine:e=>e.some(e=>e)}),Pq=I_.define({combine:e=>e.some(e=>e)}),PY=I_.define();class PX{constructor(e,t="nearest",n="nearest",r=5,i=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new PX(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 PX(Ib.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let PK=IY.define({map:(e,t)=>e.map(t)}),PQ=IY.define();function PJ(e,t,n){let r=e.facet(PZ);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}let P0=I_.define({combine:e=>!e.length||e[0]}),P1=0,P2=I_.define();class P5{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){let{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new P5(P1++,e,n,r,e=>{let t=[P2.of(e)];return o&&t.push(P6.of(t=>{let n=t.plugin(e);return n?o(n):Pd.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return P5.define(t=>new e(t),t)}}class P3{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(PJ(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){PJ(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){PJ(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let P4=I_.define(),P8=I_.define(),P6=I_.define(),P9=I_.define(),P7=I_.define(),Re=I_.define();function Rt(e,t){let n=e.state.facet(Re);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return I7.spans(r,t.from,t.to,{point(){},span(e,n,r,o){let a=e-t.from,s=n-t.from,l=i;for(let e=r.length-1;e>=0;e--,o--){let n=r[e].spec.bidiIsolate,i;if(null==n&&(n=function(e,t,n){for(let r=t;r<n;r++){let t=PP(e.charCodeAt(r));if(1==t)break;if(2==t||4==t)return Pk}return PM}(t.text,a,s)),o>0&&l.length&&(i=l[l.length-1]).to==a&&i.direction==n)i.to=s,l=i.inner;else{let e={from:a,to:s,direction:n,inner:[]};l.push(e),l=e.inner}}}}),i}let Rn=I_.define();function Rr(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(Rn)){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&&(r=Math.max(r,a.top)),null!=a.bottom&&(i=Math.max(i,a.bottom)))}return{left:t,right:n,top:r,bottom:i}}let Ri=I_.define();class Ro{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new Ro(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 r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),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 r=0,i=0,o=0,a=0;;r++){let s=r==e.length?null:e[r],l=o-a,u=s?s.fromB:1e9;for(;i<t.length&&t[i]<u;){let e=t[i],r=t[i+1],o=Math.max(a,e),s=Math.min(u,r);if(o<=s&&new Ro(o+l,s+l,o,s).addToSet(n),r>u)break;i+=2}if(!s)return n;new Ro(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),o=s.toA,a=s.toB}}}class Ra{constructor(e,t,n){for(let r of(this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Id.empty(this.startState.doc.length),n))this.changes=this.changes.compose(r.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Ro(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new Ra(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 Rs extends OU{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=Pd.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 Py],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Ro(0,0,0,e.state.doc.length)],0,null)}update(e){var t,n,r,i,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,r=this.hasComposition,s=!1,r&&n.iterChangedRanges((e,t)=>{e<r.to&&t>r.from&&(s=!0)}),s||e.selectionSet||(c=e.state.selection.main.head)));let h=c>-1?function(e,t,n){let r=Rl(e,n);if(!r)return null;let{node:i,from:o,to:a}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let l=t.invertedDesc,u=new Ro(l.mapPos(o),l.mapPos(a),o,a),c=[];for(let t=i.parentNode;;t=t.parentNode){let n=OU.get(t);if(n instanceof Pt)c.push({node:t,deco:n.mark});else{if(n instanceof Py||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:u,text:i,marks:c,line:t};if(t==e.contentDOM)return null;c.push({node:t,deco:new Pf({inclusive:!0,attributes:function(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.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 Ro(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,(O7.ie||O7.chrome)&&!h&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let d=(i=this.decorations,o=this.updateDeco(),a=e.changes,l=new Ru,I7.compare(i,o,a,l),l.changes);return u=Ro.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:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=O7.chrome||O7.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.children)e instanceof Px&&e.widget instanceof Pb&&i.push(e.dom);r.updateGaps(i)}updateChildren(e,t,n){let r=n?n.range.addToSet(e.slice()):e,i=this.childCursor(t);for(let e=r.length-1;;e--){let t=e>=0?r[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=Pw.build(this.view.state.doc,s,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=Pw.build(this.view.state.doc,n.range.toB,l,this.decorations,this.dynamicDecorationMap);c=e.breakAtStart,h=e.openStart,d=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),u=e.content.concat(r).concat(t.content)}else({content:u,breakAtStart:c,openStart:h,openEnd:d}=Pw.build(this.view.state.doc,s,l,this.decorations,this.dynamicDecorationMap));let{i:f,off:p}=i.findPos(a,1),{i:g,off:m}=i.findPos(o,-1);OX(this,g,m,f,p,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(PQ)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new Pe(e.text.nodeValue);for(let{deco:n}of(t.flags|=8,e.marks))t=new Pt(n,[t],t.length);let n=new Py;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=OU.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){var n;(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&!(this.view.state.facet(P0)||this.dom.tabIndex>-1)&&OT(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||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(O7.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 O$(e,0),a=!0}let c=this.view.observer.selectionRange;!a&&c.focusNode&&(OA(l.node,l.offset,c.anchorNode,c.anchorOffset)&&OA(u.node,u.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,s))||(this.view.observer.ignore(()=>{O7.android&&O7.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=OM(this.view.root);if(e){if(s.empty){if(O7.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?OH:OW)(l.node,l.offset);t&&(l=new O$(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(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new O$(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new O$(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&OA(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=OM(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=Py.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(r,i)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let r=e.offset;!n&&r<t.childNodes.length;r++){let e=OU.get(t.childNodes[r]);e instanceof Py&&(n=e.domAtPos(0))}for(let r=e.offset-1;!n&&r>=0;r--){let e=OU.get(t.childNodes[r]);e instanceof Py&&(n=e.domAtPos(e.length))}return n?new O$(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let e=OU.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 Py)break;t++,n=0}return this.children[t].domAtPos(n)}coordsAt(e,t){let n=null,r=0;for(let i=this.length,o=this.children.length-1;o>=0;o--){let a=this.children[o],s=i-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 Py&&!(n instanceof Py&&t>=0)))n=a,r=l;else if(n&&l==e&&s==e&&a instanceof Px&&2>Math.abs(t)){if(a.deco.startSide<0)break;o&&(n=null)}i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Py))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof Pe))return null;let i=Io(r.text,n);if(i==n)return null;let o=Oz(r.dom,n,i).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:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==PC.LTR;for(let e=0,l=0;l<this.children.length;l++){let u=this.children[l],c=e+u.length;if(c>r)break;if(e>=n){let n=u.dom.getBoundingClientRect();if(t.push(n.height),o){let t=u.dom.lastChild,r=t?OD(t):[];if(r.length){let t=r[r.length-1],o=s?t.right-n.left:n.right-t.left;o>a&&(a=o,this.minWidth=i,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?PC.RTL:PC.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Py){let t=e.measureTextSize();if(t)return t}let e=document.createElement("div"),t,n,r;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 i=OD(e.firstChild)[0];t=e.getBoundingClientRect().height,n=i?i.width/27:7,r=i?i.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:r}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new OY(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Pd.replace({widget:new Pb(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return Pd.set(e)}updateDeco(){let e=1,t=this.view.state.facet(P6).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),n=!1,r=this.view.state.facet(P9).map((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(I7.join(r))),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(PY))try{if(t(this.view,e.range,e))return!0}catch(e){PJ(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),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=Rr(this.view),o={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,n,r,i,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,f=1,p=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:f,scaleY:p}=OL(c,t)),e={left:t.left,right:t.left+c.clientWidth*f,top:t.top,bottom:t.top+c.clientHeight*p}}let g=0,m=0;if("nearest"==i)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 r=t.bottom-t.top,o=e.bottom-e.top;m=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-a:t.bottom-o+a)-e.top}if("nearest"==r?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"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==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/p,n=(c.scrollTop-e)*p}if(g){let t=c.scrollLeft;c.scrollLeft+=g/f,e=(c.scrollLeft-t)*f}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&1>Math.abs(e-g)&&(r="nearest"),n&&1>Math.abs(n-m)&&(i="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==PC.LTR)}}function Rl(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=OH(n.focusNode,n.focusOffset),i=OW(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let t=OU.get(i.node);if(!t||t instanceof Pe&&t.text!=i.node.nodeValue)o=i;else if(e.docView.lastCompositionAfterCursor){let e=OU.get(r.node);!e||e instanceof Pe&&e.text!=r.node.nodeValue||(o=i)}}if(e.docView.lastCompositionAfterCursor=o!=r,!o)return null;let a=t-o.offset;return{from:a,to:a+o.node.nodeValue.length,node:o.node}}let Ru=class{constructor(){this.changes=[]}compareRange(e,t){Pv(e,t,this.changes)}comparePoint(e,t){Pv(e,t,this.changes)}boundChange(e){Pv(e,e,this.changes)}};function Rc(e,t){return e.top<t.bottom-1&&e.bottom>t.top+1}function Rh(e,t){return t<e.top?{top:t,left:e.left,right:e.right,bottom:e.bottom}:e}function Rd(e,t){return t>e.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function Rf(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;s<r;s++){let r=Oz(e,s,s+1).getClientRects();for(let l=0;l<r.length;l++){let u=r[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,r=n;if((O7.chrome||O7.gecko)&&Oz(e,s).getBoundingClientRect().left==u.right&&(r=!n),c<=0)return{node:e,offset:s+ +!!r};i=s+ +!!r,o=c}}}return{node:e,offset:i>-1?i:a>0?e.nodeValue.length:0}}function Rp(e,t,n,r=-1){var i,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,i=!1;(l=e.elementAtHeight(d)).type!=Ph.Text;)for(;!((d=r>0?l.bottom+t:l.top-t)>=0)||!(d<=u);){if(i)return n?null:0;i=!0,r=-r}h=s+d;let f=l.from;if(f<e.viewport.from)return 0==e.viewport.from?0:n?null:Rg(e,a,l,c,h);if(f>e.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:Rg(e,a,l,c,h);let p=e.dom.ownerDocument,g=e.root.elementFromPoint?e.root:p,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===(i=e.docView.nearest(m))||void 0===i?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let e=p.caretPositionFromPoint(c,h);e&&({offsetNode:v,offset:y}=e)}else if(p.caretRangeFromPoint){let t=p.caretRangeFromPoint(c,h);t&&({startContainer:v,startOffset:y}=t,(!e.contentDOM.contains(v)||O7.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return Oz(e,r-1,r).getBoundingClientRect().left>n}(v,y,c)||O7.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():Oz(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect()).left>5}(v,y,c))&&(v=void 0))}v&&(y=Math.min(OR(v),y))}if(!v||!e.docView.dom.contains(v)){let t=Py.find(e.docView,f);if(!t)return d>l.top+l.height/2?l.to:l.from;({node:v,offset:y}=function e(t,n,r){let i,o,a,s,l,u,c,h,d=!1;for(let g=t.firstChild;g;g=g.nextSibling){let t=OD(g);for(let m=0;m<t.length;m++){var f,p;let v=t[m];u&&Rc(u,v)&&(v=Rh(Rd(v,u.bottom),u.top));let y=(f=v).left>n?f.left-n:Math.max(0,n-f.right),x=(p=v).top>r?p.top-r:Math.max(0,r-p.bottom);if(0==y&&0==x)return 3==g.nodeType?Rf(g,n,r):e(g,n,r);if(!l||h>x||h==x&&c>y){l=g,u=v,c=y,h=x;let e=x?r<v.top?-1:1:y?n<v.left?-1:1:0;d=!e||(e>0?m<t.length-1:m>0)}0==y?r>v.bottom&&(!a||a.bottom<v.bottom)?(i=g,a=v):r<v.top&&(!s||s.top>v.top)&&(o=g,s=v):a&&Rc(a,v)?a=Rd(a,v.bottom):s&&Rc(s,v)&&(s=Rh(s,v.top))}}if(a&&a.bottom>=r?(l=i,u=a):s&&s.top<=r&&(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 Rf(l,g,r);if(d&&"false"!=l.contentEditable)return e(l,g,r);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 Rg(e,t,n,r,i){let o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+Od(a,o,e.state.tabSize)}function Rm(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==Ph.Text))return e}return n}function Rv(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),a=e.textDirectionAt(i.from);for(let s=t,l=null;;){let t=function(e,t,n,r,i){var o;let a=r.head-e.from,s=PE.find(t,a,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc),l=t[s],u=l.side(i,n);if(a==u){let e=s+=i?1:-1;if(e<0||e>=t.length)return null;a=(l=t[s=e]).side(!i,n),u=l.side(i,n)}let c=Io(e.text,a,l.forward(i,n));(c<l.from||c>l.to)&&(c=u),PB=e.text.slice(Math.min(a,c),Math.max(a,c));let h=s==(i?t.length-1:0)?null:t[s+(i?1:-1)];return h&&c==u&&h.level+ +!i<l.level?Ib.cursor(h.side(!i,n)+e.from,h.forward(i,n)?1:-1,h.level):Ib.cursor(c+e.from,l.forward(i,n)?-1:1,l.level)}(i,o,a,s,n),u=PB;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;u="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(l){if(!l(u))return s}else{if(!r)return t;l=r(u)}s=t}}function Ry(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&t<i){let o=r||n||(t-e<i-t?-1:1);t=o<0?e:i,r=o}});if(!r)return t}}function Rx(e,t,n){let r=Ry(e.state.facet(P7).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:Ib.cursor(r,r<n.from?1:-1)}class Rb{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(I5.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let o=OU.get(r),a=OU.get(i);(o&&a?o.breakAfter:(o?o.breakAfter:OO(r))||OO(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}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,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,o=1,a;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(a=r.exec(t))&&(i=a.index,o=a[0].length),this.append(t.slice(n,i<0?t.length:i)),i<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=i+o}}readNode(e){if(e.cmIgnore)return;let t=OU.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<OR(t))return!1;if(t==e)return!0;n=OI(t)+1,t=t.parentNode}}(e,n.node,n.offset)?0:t))}}class Rw{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class RS{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,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=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;return n&&(t.push(new Rw(n,r)),(i!=n||o!=r)&&t.push(new Rw(i,o))),t}(e),n=new Rb(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,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?Ib.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!Ok(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!Ok(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((O7.ios||O7.chrome)&&e.state.selection.main.empty&&n!=r&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),o=a.from-t,s=a.to-i;(0==o||1==o||0==t)&&(0==s||-1==s||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}this.newSel=Ib.single(r,n)}}}function R_(e,t){let n;let{newSel:r}=t,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:a}=t.bounds,s=i.from,l=null;(8===o||O7.android&&t.text.length<a-r)&&(s=i.to,l="end");let u=function(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&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"==r){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(r,a,""),t.text,s-r,l);u&&(O7.chrome&&13==o&&u.toB==u.from+2&&""==t.text.slice(u.from,u.toB)&&u.toB--,n={from:r+u.from,to:r+u.toA,insert:A8.of(t.text.slice(u.from,u.toB).split(""))})}else r&&(!e.hasFocus&&e.state.facet(P0)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:(O7.mac||O7.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=Ib.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:A8.of([n.insert.toString().replace("."," ")])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:O7.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=Ib.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:A8.of([" "])}),n)return RC(e,n,r,o);if(!r||r.main.eq(i))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:r,scrollIntoView:t,userEvent:n}),!0}}function RC(e,t,n,r=-1){let i;if(O7.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(O7.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&&OV(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==r&&t.insert.length<t.to-t.from&&t.to>o.head)&&OV(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&OV(e.contentDOM,"Delete",46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>i||(i=function(e,t,n){let r,i=e.state,o=i.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?i.sliceDoc(o.from,t.from):"",a=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=i.changes(t),s=n&&n.main.to<=a.newLength?n.main:void 0;if(i.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&&Rl(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;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:a,range:s||n.map(a)};let r=n.to-h,c=r-l.length;if(n.to-n.from!=d||e.state.sliceDoc(c,r)!=l||n.to>=u.from&&n.from<=u.to)return{range:n};let f=i.changes({from:c,to:r,insert:t.insert}),p=n.to-o.to;return{changes:f,range:s?Ib.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:a,selection:s&&i.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)),i.update(r,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(PH).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}class RM{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,O7.safari&&e.contentDOM.addEventListener("input",()=>null),O7.gecko&&(t=e.contentDOM.ownerDocument,RX.has(t)||(RX.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,r;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(r=OU.get(n))&&r.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 r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(Rk(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(Rk(t.value,i))}}for(let e in RP)n(e).handlers.push(RP[e]);for(let e in RR)n(e).observers.push(RR[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&!o.handlers.length!=i&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.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>RA.indexOf(e.keyCode)&&(this.tabFocusMode=-1),O7.android&&O7.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))?(this.view.observer.delayAndroidKey(e.key,e.keyCode),!0):O7.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=RT.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||RD.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,OV(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(O7.safari&&!O7.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 Rk(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){PJ(n.state,e)}}}let RT=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],RD="dthko",RA=[16,17,18,20,91,92,224,225];function RI(e){return .7*Math.max(0,e)+8}class RO{constructor(e,t,n,r){var i,o;let a;this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=function(e){let t=e.ownerDocument,n,r;for(let i=e.parentNode;i&&i!=t.body&&(!n||!r);)if(1==i.nodeType)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(11==i.nodeType)i=i.host;else break;return{x:n,y:r}}(e.contentDOM),this.atoms=e.state.facet(P7).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(I5.allowMultipleSelections)&&(i=e,o=t,(a=i.state.facet(PF)).length?a[0](o):O7.mac?o.metaKey:o.ctrlKey),this.dragging=!!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=OM(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[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==RW(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,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=Rr(this.view);e.clientX-l.left<=i+6?n=-RI(i-e.clientX):e.clientX+l.right>=a-6&&(n=RI(e.clientX-a)),e.clientY-l.top<=o+6?r=-RI(o-e.clientY):e.clientY+l.bottom>=s-6&&(r=RI(e.clientY-s)),this.setScrollSpeed(n,r)}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 r=e.ranges[n],i=null;if(r.empty){let e=Ry(this.atoms,r.from,0);e!=r.from&&(i=Ib.cursor(e,-1))}else{let e=Ry(this.atoms,r.from,-1),t=Ry(this.atoms,r.to,1);(e!=r.from||t!=r.to)&&(i=Ib.range(r.from==r.anchor?e:t,r.from==r.head?e:t))}i&&(t||(t=e.ranges.slice()),t[n]=i)}return t?Ib.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 RP=Object.create(null),RR=Object.create(null),RE=O7.ie&&O7.ie_version<15||O7.ios&&O7.webkit_version<604;function RL(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function RN(e,t){t=RL(e.state,P$,t);let{state:n}=e,r,i=1,o=n.toText(t),a=o.lines==n.selection.ranges.length;if(null!=RG&&n.selection.ranges.every(e=>e.empty)&&RG==o.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let l=n.toText((a?o.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:l},range:Ib.cursor(r.from+l.length)}})}else r=a?n.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:Ib.cursor(e.from+t.length)}}):n.replaceSelection(o);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}function RB(e,t,n,r){if(1==r)return Ib.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return Ib.cursor(t);0==o?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=Io(i.text,o,!1):s=Io(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let e=Io(i.text,a,!1);if(r(i.text.slice(e,a))!=l)break;a=e}for(;s<i.length;){let e=Io(i.text,s);if(r(i.text.slice(s,e))!=l)break;s=e}return Ib.range(a+i.from,s+i.from)}(e.state,t,n);{let n=Py.find(e.docView,t),r=e.state.doc.lineAt(n?n.posAtEnd:t),i=n?n.posAtStart:r.from,o=n?n.posAtEnd:r.to;return o<e.state.doc.length&&o==r.to&&o++,Ib.range(i,o)}}RR.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},RP.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),RR.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},RR.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},RP.mousedown=(e,t)=>{var n,r;let i,o,a;if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let s=null;for(let n of e.state.facet(PV))if(s=n(e,t))break;if(s||0!=t.button||(i=Rz(n=e,r=t),o=RW(r),a=n.state.selection,s={update(e){e.docChanged&&(i.pos=e.changes.mapPos(i.pos),a=a.map(e.changes))},get(e,t,r){let s=Rz(n,e),l,u=RB(n,s.pos,s.bias,o);if(i.pos!=s.pos&&!t){let e=RB(n,i.pos,i.bias,o),t=Math.min(e.from,u.from),r=Math.max(e.to,u.to);u=t<u.from?Ib.range(t,r):Ib.range(r,t)}return t?a.replaceRange(a.main.extend(u.from,u.to)):r&&1==o&&a.ranges.length>1&&(l=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return Ib.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:r?a.addRange(u):Ib.create([u])}}),s){let n=!e.hasFocus;e.inputState.startMouseSelection(new RO(e,t,s,n)),n&&e.observer.ignore(()=>{OF(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let r=e.inputState.mouseSelection;if(r)return r.start(t),!1===r.dragging}return!1};let RF=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function Rz(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:function(e,t,n,r){let i=Py.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return -1;let a=i.coordsAt(o,-1);if(a&&RF(n,r,a))return -1;let s=i.coordsAt(o,1);return s&&RF(n,r,s)?1:a&&a.bottom>=r?-1:1}(e,n,t.clientX,t.clientY)}}let RV=O7.ie&&O7.ie_version<=11,RZ=null,Rj=0,RH=0;function RW(e){if(!RV)return e.detail;let t=RZ,n=RH;return RZ=e,RH=Date.now(),Rj=!t||n>Date.now()-400&&2>Math.abs(t.clientX-e.clientX)&&2>Math.abs(t.clientY-e.clientY)?(Rj+1)%3:1}function R$(e,t,n,r){let i;if(!(n=RL(e.state,P$,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,s=r&&a&&((i=e.state.facet(Pz)).length?i[0](t):O7.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}RP.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=Ib.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",RL(e.state,PG,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},RP.dragend=e=>(e.inputState.draggedContent=null,!1),RP.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&R$(e,t,r.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)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return R$(e,t,n,!0),!0}return!1},RP.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=RE?null:t.clipboardData;return n?(RN(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(),RN(e,n.value)},50)}(e),!1)};let RG=null;RP.copy=RP.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:RL(e,PG,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;RG=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=RE?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 r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};let RU=IG.define();function Rq(e,t){let n=[];for(let r of e.facet(PW)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:RU.of(!0)}):null}function RY(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Rq(e.state,t);n?e.dispatch(n):e.update([])}},10)}RR.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),RY(e)},RR.blur=e=>{e.observer.clearSelectionRange(),RY(e)},RR.compositionstart=RR.compositionupdate=e=>{!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},RR.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,O7.chrome&&O7.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},RR.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},RP.beforeinput=(e,t)=>{var n,r;let i;if("insertReplacementText"==t.inputType&&e.observer.editContext){let r=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),i=t.getTargetRanges();if(r&&i.length){let t=i[0],n=e.posAtDOM(t.startContainer,t.startOffset),o=e.posAtDOM(t.endContainer,t.endOffset);return RC(e,{from:n,to:o,insert:e.state.toText(r)},null),!0}}if(O7.chrome&&O7.android&&(i=RT.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let t=(null===(r=window.visualViewport)||void 0===r?void 0:r.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 O7.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),O7.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>RR.compositionend(e,t),20),!1};let RX=new Set,RK=["pre-wrap","normal","pre-line","break-spaces"],RQ=!1;class RJ{constructor(e){this.lineWrapping=e,this.doc=A8.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 RK.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let a=RK.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=r,this.lineLength=i,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 R0{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class R1{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?Ph.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 Pg?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 R1(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var R2=((qD=R2||(R2={}))[qD.ByPos=0]="ByPos",qD[qD.ByHeight=1]="ByHeight",qD[qD.ByPosNoHeight=2]="ByPosNoHeight",qD);class R5{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&&(RQ=!0),this.height=e)}replace(e,t,n){return R5.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:u,toB:c}=r[a],h=i.lineAt(s,R2.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=l?h:i.lineAt(l,R2.ByPosNoHeight,n,0,0);for(c+=d.to-l,l=d.to;a>0&&h.from<=r[a-1].toA;)s=r[a-1].fromA,u=r[a-1].fromB,a--,s<h.from&&(h=i.lineAt(s,R2.ByPosNoHeight,n,0,0));u+=h.from-s,s=h.from;let f=Ee.build(n.setDoc(o),e,u,c);i=R3(i,i.replace(s,l,f))}return i.updateHeight(n,0)}static empty(){return new R8(0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n){if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else if(i>2*r){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,i-=t.size}else break}else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=0;return null==e[t-1]?(o=1,t--):null==e[t]&&(o=1,n++),new R9(R5.of(e.slice(0,t)),o,R5.of(e.slice(n)))}}function R3(e,t){return e==t?e:(e.constructor!=t.constructor&&(RQ=!0),t)}R5.prototype.size=1;class R4 extends R5{constructor(e,t,n){super(e,t),this.deco=n}blockAt(e,t,n,r){return new R1(r,this.length,n,this.height,this.deco||0)}lineAt(e,t,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class R8 extends R4{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new R1(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof R8||r instanceof R6&&4&r.flags)&&10>Math.abs(this.length-r.length)?(r instanceof R6?r=new R8(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):R5.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(r.heights[r.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 R6 extends R5{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,o,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);o=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else o=this.height/i;return{firstLine:n,lastLine:r,perLine:o,perChar:a}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:a,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),o=t.doc.lineAt(i),l=a+o.length*s,u=Math.max(n,e-l/2);return new R1(o.from,o.length,u,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/a))),{from:s,length:l}=t.doc.line(i+r);return new R1(s,l,n+a*r,a,0)}}lineAt(e,t,n,r,i){if(t==R2.ByHeight)return this.blockAt(e,n,r,i);if(t==R2.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new R1(t,r-t,0,0,0)}let{firstLine:o,perLine:a,perChar:s}=this.heightMetrics(n,i),l=n.doc.lineAt(e),u=a+l.length*s,c=l.number-o,h=r+a*c+s*(l.from-i-c);return new R1(l.from,l.length,Math.max(r,Math.min(h,r+this.height-u)),u,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);for(let u=e,c=r;u<=t;){let t=n.doc.lineAt(u);if(u==e){let n=t.number-a;c+=s*n+l*(e-i-n)}let r=s+l*t.length;o(new R1(t.from,t.length,c,r,0)),c+=r,u=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof R6?n[n.length-1]=new R6(e.length+r):n.push(null,new R6(r-1))}if(e>0){let t=n[0];t instanceof R6?n[0]=new R6(e+t.length):n.unshift(new R6(e-1),null)}return R5.of(n)}decomposeLeft(e,t){t.push(new R6(e-1),null)}decomposeRight(e,t){t.push(null,new R6(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),a=-1;for(r.from>t&&n.push(new R6(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==a?a=i:Math.abs(i-a)>=.001&&(a=-2);let s=new R8(t,i);s.outdated=!1,n.push(s),o+=t+1}o<=i&&n.push(null,new R6(i-o).updateHeight(e,o));let s=R5.of(n);return(a<0||Math.abs(s.height-this.height)>=.001||Math.abs(a-this.heightMetrics(e,t).perLine)>=.001)&&(RQ=!0),R3(this,s)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class R9 extends R5{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,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,a=i+this.left.length+this.break,s=t==R2.ByHeight?e<o:e<a,l=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,a);if(this.break||(s?l.to<a:l.from>a))return l;let u=t==R2.ByPosNoHeight?R2.ByPosNoHeight:R2.ByPos;return s?l.join(this.right.lineAt(a,u,n,o,a)):this.left.lineAt(a,u,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let a=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,o),t>=s&&this.right.forEachLine(e,t,n,a,s,o);else{let l=this.lineAt(s,R2.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,l.from-1,n,r,i,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 r=this.left.length+this.break;if(t<r)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-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&R7(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),R7(i,e)}return R5.of(i)}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,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?R5.of(this.break?[e,null,t]:[e,t]):(this.left=R3(this.left,e),this.right=R3(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,r){let{left:i,right:o}=this,a=t+i.length+this.break,s=null;return(r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=a+o.length&&r.more?s=o=o.updateHeight(e,a,n,r):o.updateHeight(e,a,n),s)?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function R7(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof R6&&(r=e[t+1])instanceof R6&&e.splice(t-1,3,new R6(n.length+1+r.length))}class Ee{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 R8?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new R8(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 r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new R4(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,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 R8(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new R6(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 R8)return e;let t=new R8(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 r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.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 R8||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new R8(0,-1));let n=e;for(let e of this.nodes)e instanceof R8&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new Ee(n,e);return I7.spans(t,n,r,i,0),i.finish(n)}}class Et{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&Pv(e,t,this.changes,5)}}class En{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Pd.replace({widget:new Er(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class Er extends Pc{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 Ei{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=El,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=PC.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(P8).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new RJ(t),this.stateDeco=e.facet(P6).filter(e=>"function"!=typeof e),this.heightMap=R5.empty().applyChanges(this.stateDeco,A8.empty,this.heightOracle.setDoc(e.doc),[new Ro(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=Pd.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 r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new Eo(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?El:new Eu(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(Ec(e,this.scaler))})}update(e,t=null){var n,r;let i;this.state=e.state;let o=this.stateDeco;this.stateDeco=this.state.facet(P6).filter(e=>"function"!=typeof e);let a=e.changedRanges,s=Ro.extendWithRanges(a,(n=this.stateDeco,r=e?e.changes:Id.empty(this.state.doc.length),i=new Et,I7.compare(o,n,r,i,0),i.changes)),l=this.heightMap.height,u=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);RQ=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=l||RQ)&&(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(Pq)&&(this.mustEnforceCursorAssoc=!0)}measure(e){var t;let n,r,i=e.contentDOM,o=window.getComputedStyle(i),a=this.heightOracle,s=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?PC.RTL:PC.LTR;let l=this.heightOracle.mustRefreshForWrapping(s),u=i.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}=OL(i,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 f=(parseInt(o.paddingTop)||0)*this.scaleY,p=(parseInt(o.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=p)&&(this.paddingTop=f,this.paddingBottom=p,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=Oj(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(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),a=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(1==t.nodeType){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(t==e.parentNode?i.innerHeight:l,r.bottom)}t="absolute"==r.position||"fixed"==r.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)}})(i,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(),r=t.ownerDocument.defaultView||window,!(n.left<r.innerWidth)||!(n.right>0)||!(n.top<r.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:r,textHeight:i}=e.docView.measureTextSize();(l=n>0&&a.refresh(s,n,r,i,b/r,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)),RQ=!1,this.viewports)){let r=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(l?R5.empty().applyChanges(this.stateDeco,A8.empty,this.heightOracle,[new Ro(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(a,0,l,new R0(n.from,r))}RQ&&(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)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:a}=this,s=new Eo(r.lineAt(o-1e3*n,R2.ByHeight,i,0,0).from,r.lineAt(a+(1-n)*1e3,R2.ByHeight,i,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=r.lineAt(e,R2.ByPos,i,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 Eo(r.lineAt(a-500,R2.ByHeight,i,0,0).from,r.lineAt(a+n+500,R2.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new Eo(this.heightMap.lineAt(n,R2.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,R2.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,R2.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,R2.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:a}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=a+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<a+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new En(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,o=r<<1;if(this.defaultTextDirection!=PC.LTR&&!n)return[];let a=[],s=(r,o,l,u)=>{if(o-r<i)return;let c=this.state.selection.main,h=[c.from];for(let e of(c.empty||h.push(c.to),h))if(e>r&&e<o){s(r,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-r)<i&&Math.abs(e.to-o)<i&&!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(Ib.cursor(o),!1,!0).head;e>r&&(o=e)}let e=this.gapSize(l,r,o,u),i=n||e<2e6?e:2e6;d=new En(r,o,e,i)}a.push(d)},l=t=>{var i,a,l;let u,c,h,d,f;if(t.length<o||t.type!=Ph.Text)return;let p=(i=t.from,a=t.to,l=this.stateDeco,h=[],d=i,f=0,I7.spans(l,i,a,{span(){},point(e,t){e>d&&(h.push({from:d,to:e}),f+=e-d),d=t}},20),d<a&&(h.push({from:d,to:a}),f+=a-d),{total:f,ranges:h});if(p.total<o)return;let g=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,i=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=g){let r=Es(p,g),o=((this.visibleBottom-this.visibleTop)/2+i)/t.height;e=r-o,n=r+o}else e=(this.visibleTop-t.top-i)/t.height,n=(this.visibleBottom-t.top+i)/t.height;u=Ea(p,e),c=Ea(p,n)}else{let n,i,o=p.total*this.heightOracle.charWidth,a=r*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=Es(p,g),t=((h-l)/2+a)/o;n=e-t,i=e+t}else n=(l-a)/o,i=(h+a)/o;u=Ea(p,n),c=Ea(p,i)}u>t.from&&s(t.from,u,t,p),c<t.to&&s(c,t.to,t,p)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return a}gapSize(e,t,n,r){let i=Es(r,n)-Es(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){En.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Pd.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=[];I7.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(8&r);t++){let i=this.visibleRanges[t],o=n[t];i.from==o.from&&i.to==o.to||(r|=4,e&&e.mapPos(i.from,-1)==o.from&&e.mapPos(i.to,1)==o.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Ec(this.heightMap.lineAt(e,R2.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)||Ec(this.heightMap.lineAt(this.scaler.fromDOM(e),R2.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 Ec(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 Eo{constructor(e,t){this.from=e,this.to=t}}function Ea({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function Es(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}let El={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class Eu{constructor(e,t,n){let r=0,i=0,o=0;for(let a of(this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,R2.ByPos,e,0,0).top,a=t.lineAt(i,R2.ByPos,e,0,0).bottom;return r+=a-o,{from:n,to:i,top:o,bottom:a,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r),this.viewports))a.domTop=o+(a.top-i)*this.scale,o=a.domBottom=a.domTop+(a.bottom-a.top),i=a.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(e){return e instanceof Eu&&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 Ec(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new R1(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>Ec(e,t)):e._content)}let Eh=I_.define({combine:e=>e.join(" ")}),Ed=I_.define({combine:e=>e.indexOf(!0)>-1}),Ef=Om.newName(),Ep=Om.newName(),Eg=Om.newName(),Em={"&light":"."+Ep,"&dark":"."+Eg};function Ev(e,t,n){return new Om(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 Ey=Ev("."+Ef,{"&":{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"}},Em),Ex={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Eb=O7.ie&&O7.ie_version<=11;class Ew{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new ON,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);(O7.ie&&O7.ie_version<=11||O7.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&&!(O7.chrome&&O7.chrome_version<126)&&(this.editContext=new EC(e),e.state.facet(P0)&&(e.contentDOM.editContext=this.editContext.editContext)),Eb&&(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,r=this.selectionRange;if(n.state.facet(P0)?n.root.activeElement!=this.dom:!OT(this.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);if(i&&i.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(O7.ie&&O7.ie_version<=11||O7.android&&O7.chrome)&&!n.state.selection.main.empty&&r.focusNode&&OA(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=OM(e.root);if(!t)return!1;let n=O7.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 E_(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?E_(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=OT(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,OR(n));;)if(r){if(1!=n.nodeType)return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:r=OR(n=e)}else{if(n==e)return!0;r=OI(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(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,Ex),Eb&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Eb&&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&&OV(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,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!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:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&OT(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new RS(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}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,r=R_(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}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=ES(t,e.previousSibling||e.target.previousSibling,-1),r=ES(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):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(P0)!=e.state.facet(P0)&&(e.view.contentDOM.editContext=e.state.facet(P0)?this.editContext.editContext:null))}destroy(){var e,t,n;for(let r 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))r.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 ES(e,t,n){for(;t;){let r=OU.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function E_(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return OA(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}class EC{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:r,head:i}=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:A8.of(t.text.split("\n"))};if(s.from==this.from&&r<this.from?s.from=r:s.to==this.to&&r>this.to&&(s.to=r),s.from==s.to&&!s.insert.length){let r=Ib.single(this.toEditorPos(t.selectionStart),this.toEditorPos(t.selectionEnd));r.main.eq(n)||e.dispatch({selection:r,userEvent:"select"});return}if((O7.mac||O7.android)&&s.from==i-1&&/^\. ?$/.test(t.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(s={from:o,to:a,insert:A8.of([t.text.replace("."," ")])}),this.pendingContextChange=s,!e.state.readOnly){let n=this.to-this.from+(s.to-s.from+s.insert.length);RC(e,s,Ib.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 r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);t<o;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if("None"!=t&&"None"!=r){let i=this.toEditorPos(e.rangeStart),o=this.toEditorPos(e.rangeEnd);if(i<o){let e=`text-decoration: underline ${"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${"Thin"==r?1:2}px`;n.push(Pd.mark({attributes:{style:e}}).range(i,o))}}}e.dispatch({effects:PQ.of(Pd.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=OM(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,o,a,s,l)=>{if(n)return;let u=l.length-(o-i);if(r&&o>=r.to){if(r.from==i&&r.to==o&&r.insert.eq(l)){r=this.pendingContextChange=null,t+=u,this.to+=u;return}r=null,this.revertPending(e.state)}if(i+=t,(o+=t)<=this.from)this.from+=u,this.to+=u;else if(i<this.to){if(i<this.from||o>this.to||this.to-this.from+l.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(o),l.toString()),this.to+=u}t+=u}),r&&!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))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}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 EM{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 Ei(e.state||I5.create(e)),e.scrollTo&&e.scrollTo.is(PK)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(P2).map(e=>new P3(e)),this.plugins))t.update(this);this.observer=new Ew(this),this.inputState=new RM(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Rs(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 IX?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,r,i=this.state;for(let t of e){if(t.startState!=i)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed){this.viewState.state=i;return}let o=this.hasFocus,a=0,s=null;e.some(e=>e.annotation(RU))?(this.inputState.notifiedFocused=o,a=1):o==this.inputState.notifiedFocused||(this.inputState.notifiedFocused=o,(s=Rq(i,o))||(a=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),((u=this.observer.readChange())&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(u=null)):this.observer.clear(),i.facet(I5.phrases)!=this.state.facet(I5.phrases))return this.setState(i);r=Ra.create(this,i,e),r.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 PX(e.empty?e:Ib.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(PK)&&(c=e.value.clip(this.state))}this.viewState.update(r,c),this.bidiCache=ED.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(Ri)!=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(r.startState.facet(Eh)!=r.state.facet(Eh)&&(this.viewState.mustMeasureContent=!0),(t||n||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let e of this.state.facet(Pj))try{e(r)}catch(e){PJ(this.state,e,"update listener")}(s||u)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),u&&!R_(this,u)&&l.force&&OV(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 Ei(e),this.plugins=e.facet(P2).map(e=>new P3(e)),this.pluginMap.clear(),this.plugins))t.update(this);this.docView.destroy(),this.docView=new Rs(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(P2),n=e.state.facet(P2);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new P3(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,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){PJ(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,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0){if(Oj(n))i=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=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 PJ(this.state,e),ET}}),u=Ra.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]!=ET)try{let t=s[e];t.write&&t.write(l[e],this)}catch(e){PJ(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=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-o;if(e>1||e<-1){r+=e,n.scrollTop=r/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Pj))e(t)}get themeClasses(){return Ef+" "+(this.state.facet(Ed)?Eg:Ep)+" "+this.state.facet(Eh)}updateAttrs(){let e=EA(this,P4,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(P0)?"true":"false",class:"cm-content",style:`${O7.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),EA(this,P8,t);let n=this.observer.ignore(()=>{let n=Pu(this.contentDOM,this.contentAttrs,t),r=Pu(this.dom,this.editorAttrs,e);return n||r});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(EM.announce)&&(t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(Ri);let e=this.state.facet(EM.cspNonce);Om.mount(this.root,this.styleModules.concat(Ey).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 Rx(this,e,Rv(this,e,t,n))}moveByGroup(e,t){return Rx(this,e,Rv(this,e,t,t=>{var n;let r,i;return n=e.head,i=(r=this.state.charCategorizer(n))(t),e=>{let t=r(e);return i==I1.Space&&(i=t),i==t}}))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return Ib.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=Rm(e,t.head),o=r&&i.type==Ph.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),a=e.posAtCoords({x:n==(r==PC.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=a)return Ib.cursor(a,n?-1:1)}return Ib.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return Rx(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return Ib.cursor(i,t.assoc);let a=t.goalColumn,s,l=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(i,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(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+c}let h=l.left+a,d=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(d+t)*o,r=Rp(e,{x:h,y:n},!1,o);if(n<l.top||n>l.bottom||(o<0?r<i:r>i)){let t=e.docView.coordsForChar(r),i=!t||n<t.top?-1:1;return Ib.cursor(r,i,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(),Rp(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 r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return OE(n,i[PE.find(i,e-r.from,-1,t)].dir==PC.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(PU)||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>Ek)return PN(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||function e(t,n){if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.direction!=o.direction||!e(i.inner,o.inner))return!1}return!0}(r.isolates,n=Rt(this,e))))return r.order;n||(n=Rt(this,e));let r=function(e,t,n){if(!e)return[new PE(0,0,+(t==Pk))];if(t==PM&&!n.length&&!PR.test(e))return PN(e.length);if(n.length)for(;e.length>PL.length;)PL[PL.length]=256;let r=[],i=+(t!=PM);return function e(t,n,r,i,o,a,s){let l=n%2?2:1;!function(e,t,n,r,i){for(let o=0;o<=r.length;o++){let a=o?r[o-1].to:t,s=o<r.length?r[o].from:n,l=o?256:i;for(let t=a,n=l,r=l;t<s;t++){let i=PP(e.charCodeAt(t));512==i?i=n:8==i&&4==r&&(i=16),PL[t]=4==i?2:i,7&i&&(r=i),n=i}for(let e=a,t=l,r=l;e<s;e++){let i=PL[e];if(128==i)e<s-1&&t==PL[e+1]&&24&t?i=PL[e]=t:PL[e]=256;else if(64==i){let i=e+1;for(;i<s&&64==PL[i];)i++;let o=e&&8==t||i<n&&8==PL[i]?1==r?1:8:256;for(let t=e;t<i;t++)PL[t]=o;e=i-1}else 8==i&&1==r&&(PL[e]=1);t=i,7&i&&(r=i)}}}(t,o,a,i,l),function(e,t,n,r,i){let o=1==i?2:1;for(let a=0,s=0,l=0;a<=r.length;a++){let u=a?r[a-1].to:t,c=a<r.length?r[a].from:n;for(let t=u,n,r,a;t<c;t++)if(r=PI[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(PO[e+1]==-r){let n=PO[e+2],r=2&n?i:4&n?1&n?o:i:0;r&&(PL[t]=PL[PO[e]]=r),s=e;break}}else if(189==PO.length)break;else PO[s++]=t,PO[s++]=n,PO[s++]=l}else if(2==(a=PL[t])||1==a){let e=a==i;l=+!e;for(let t=s-3;t>=0;t-=3){let n=PO[t+2];if(2&n)break;if(e)PO[t+2]|=2;else{if(4&n)break;PO[t+2]|=4}}}}}(t,o,a,i,l),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let l=a;l<s;){let a=PL[l];if(256==a){let a=l+1;for(;;)if(a==s){if(i==n.length)break;a=n[i++].to,s=i<n.length?n[i].from:t}else if(256==PL[a])a++;else break;let u=1==o,c=u==((a<t?PL[a]:r)==1)?u?1:2:r;for(let t=a,r=i,o=r?n[r-1].to:e;t>l;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),PL[--t]=c;l=a}else o=a,l++}}}(o,a,i,l),function t(n,r,i,o,a,s,l){let u=o%2?2:1;if(o%2==a%2)for(let c=r,h=0;c<i;){let r=!0,d=!1;if(h==s.length||c<s[h].from){let e=PL[c];e!=u&&(r=!1,d=16==e)}let f=r||1!=u?null:[],p=r?o:o+1,g=c;i:for(;;)if(h<s.length&&g==s[h].from){if(d)break;let t=s[h];if(!r)for(let e=t.to,n=h+1;;){if(e==i)break i;if(n<s.length&&s[n].from==e)e=s[n++].to;else if(PL[e]==u)break i;else break}h++,f?f.push(t):(t.from>c&&l.push(new PE(c,t.from,p)),e(n,t.direction==PM!=!(p%2)?o+1:o,a,t.inner,t.from,t.to,l),c=t.to),g=t.to}else if(g==i||(r?PL[g]!=u:PL[g]==u))break;else g++;f?t(n,c,g,o+1,a,f,l):c<g&&l.push(new PE(c,g,p)),c=g}else for(let c=i,h=s.length;c>r;){let i=!0,d=!1;if(!h||c>s[h-1].to){let e=PL[c-1];e!=u&&(i=!1,d=16==e)}let f=i||1!=u?null:[],p=i?o:o+1,g=c;i:for(;;)if(h&&g==s[h-1].to){if(d)break;let t=s[--h];if(!i)for(let e=t.from,n=h;;){if(e==r)break i;if(n&&s[n-1].to==e)e=s[--n].from;else if(PL[e-1]==u)break i;else break}f?f.push(t):(t.to<c&&l.push(new PE(t.to,c,p)),e(n,t.direction==PM!=!(p%2)?o+1:o,a,t.inner,t.from,t.to,l),c=t.from),g=t.from}else if(g==r||(i?PL[g-1]!=u:PL[g-1]==u))break;else g--;f?t(n,g,c,o+1,a,f,l):g<c&&l.push(new PE(g,c,p)),c=g}}(t,o,a,n,r,i,s)}(e,i,i,n,0,e.length,r),r}(e.text,t,n);return this.bidiCache.push(new ED(e.from,e.to,t,n,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||O7.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{OF(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 PK.of(new PX("number"==typeof e?Ib.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 PK.of(new PX(Ib.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 P5.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return P5.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=Om.newName(),r=[Eh.of(n),Ri.of(Ev(`.${n}`,e))];return t&&t.dark&&r.push(Ed.of(!0)),r}static baseTheme(e){return IP.lowest(Ri.of(Ev("."+Ef,e,Em)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&OU.get(n)||OU.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}EM.styleModule=Ri,EM.inputHandler=PH,EM.clipboardInputFilter=P$,EM.clipboardOutputFilter=PG,EM.scrollHandler=PY,EM.focusChangeEffect=PW,EM.perLineTextDirection=PU,EM.exceptionSink=PZ,EM.updateListener=Pj,EM.editable=P0,EM.mouseSelectionStyle=PV,EM.dragMovesSelection=Pz,EM.clickAddsSelectionRange=PF,EM.decorations=P6,EM.outerDecorations=P9,EM.atomicRanges=P7,EM.bidiIsolatedRanges=Re,EM.scrollMargins=Rn,EM.darkTheme=Ed,EM.cspNonce=I_.define({combine:e=>e.length?e[0]:""}),EM.contentAttributes=P8,EM.editorAttributes=P4,EM.lineWrapping=EM.contentAttributes.of({class:"cm-lineWrapping"}),EM.announce=IY.define();let Ek=4096,ET={};class ED{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:PC.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new ED(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function EA(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&Pa(o,n)}return n}let EI=O7.mac?"mac":O7.windows?"win":O7.linux?"linux":"key";function EO(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 EP=IP.default(EM.domEventHandlers({keydown:(e,t)=>EF(EL(t.state),e,t,"editor")})),ER=I_.define({enables:EP}),EE=new WeakMap;function EL(e){let t=e.facet(ER),n=EE.get(t);return n||EE.set(t,n=function(e,t=EI){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[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,r,o,a,s)=>{var l,u;let c=n[e]||(n[e]=Object.create(null)),h=r.split(/ (?!$)/).map(e=>(function(e,t){let n,r,i,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))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else if(/^mod$/i.test(s))"mac"==t?o=!0:r=!0;else throw Error("Unrecognized modifier name: "+s)}return n&&(s="Alt-"+s),r&&(s="Ctrl-"+s),o&&(s="Meta-"+s),i&&(s="Shift-"+s),s})(e,t));for(let t=1;t<h.length;t++){let n=h.slice(0,t).join(" ");i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=EN={view:t,prefix:n,scope:e};return setTimeout(()=>{EN==r&&(EN=null)},4e3),!0}]})}let d=h.join(" ");i(d,!1);let f=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&&f.run.push(o),a&&(f.preventDefault=!0),s&&(f.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.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:i}=r;for(let t in e)e[t].run.push(e=>i(e,EB))}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let EN=null,EB=null;function EF(e,t,n,r){var i;EB=t;let o=("Esc"==(i=!(Ow&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||OS&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Ob:Ox)[t.keyCode]||t.key||"Unidentified")&&(i="Escape"),"Del"==i&&(i="Delete"),"Left"==i&&(i="ArrowLeft"),"Up"==i&&(i="ArrowUp"),"Right"==i&&(i="ArrowRight"),"Down"==i&&(i="ArrowDown"),i),a=Il(Ia(o,0))==o.length&&" "!=o,s="",l=!1,u=!1,c=!1;EN&&EN.view==n&&EN.scope==r&&(s=EN.prefix+" ",0>RA.indexOf(t.keyCode)&&(u=!0,EN=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},f=e[r],p,g;return f&&(d(f[s+EO(o,t,!a)])?l=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(O7.windows&&t.ctrlKey&&t.altKey)&&(p=Ox[t.keyCode])&&p!=o?d(f[s+EO(p,t,!0)])?l=!0:t.shiftKey&&(g=Ob[t.keyCode])!=o&&g!=p&&d(f[s+EO(g,t,!1)])&&(l=!0):a&&t.shiftKey&&d(f[s+EO(o,t,!0)])&&(l=!0),!l&&d(f._any)&&(l=!0)),u&&(l=!0),l&&c&&t.stopPropagation(),EB=null,l}class Ez{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}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 r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==PC.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=EV(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),f=Rm(e,r),p=Rm(e,i),g=f.type==Ph.Text?f:null,m=p.type==Ph.Text?p:null;if(g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=EZ(e,r,1,g)),m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=EZ(e,i,-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(f,!1),r=m?x(null,n.to,m):b(p,!0),i=[];return(g||f).to<(m||p).from-(g&&m?1:0)||f.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(v(h,t.bottom,d,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==Ph.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),y(t).concat(i).concat(y(r))}function v(e,n,r,i){return new Ez(t,e-l.left,n-l.top,r-e,i-n)}function y({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(v(n[i],e,n[i+1],t));return r}function x(t,n,r){let i=1e9,a=-1e9,s=[];function l(t,n,l,u,c){let f=e.coordsAtPos(t,t==r.to?-2:2),p=e.coordsAtPos(l,l==r.from?2:-2);f&&p&&(i=Math.min(f.top,p.top,i),a=Math.max(f.bottom,p.bottom,a),c==PC.LTR?s.push(o&&n?h:f.left,o&&u?d:p.right):s.push(!o&&u?h:p.left,!o&&n?d:f.right))}let u=null!=t?t:r.from,c=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>u&&r.from<c)for(let i=Math.max(r.from,u),o=Math.min(r.to,c);;){let r=e.state.doc.lineAt(i);for(let a of e.bidiSpans(r)){let e=a.from+r.from,s=a.to+r.from;if(e>=o)break;s>i&&l(Math.max(e,i),null==t&&e<=u,Math.min(s,o),null==n&&s>=c,a.dir)}if((i=r.to+1)>=o)break}return 0==s.length&&l(u,null==t,c,null==n,e.textDirection),{top:i,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 r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=EV(e);return[new Ez(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}}}function EV(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==PC.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function EZ(e,t,n,r){let i=e.coordsAtPos(t,2*n);if(!i)return r;let o=e.dom.getBoundingClientRect(),a=(i.top+i.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?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}class Ej{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(EH)!=e.state.facet(EH)&&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(EH);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 r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.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 EH=I_.define();function EW(e){return[P5.define(t=>new Ej(t,e)),EH.of(e)]}let E$=!(O7.ios&&O7.webkit&&O7.webkit_version<534),EG=I_.define({combine:e=>I3(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function EU(e){return e.startState.facet(EG)!=e.state.facet(EG)}let Eq=EW({above:!0,markers(e){let{state:t}=e,n=t.facet(EG),r=[];for(let i of t.selection.ranges){let o=i==t.selection.main;if(i.empty?!o||E$:n.drawRangeCursor){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:Ib.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Ez.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=EU(e);return n&&EY(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){EY(t.state,e)},class:"cm-cursorLayer"});function EY(e,t){t.style.animationDuration=e.facet(EG).cursorBlinkRate+"ms"}let EX=EW({above:!1,markers:e=>e.state.selection.ranges.map(t=>t.empty?[]:Ez.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t)),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||EU(e),class:"cm-selectionLayer"}),EK={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};E$&&(EK[".cm-line"].caretColor=EK[".cm-content"].caretColor="transparent !important");let EQ=IP.highest(EM.theme(EK)),EJ=IY.define({map:(e,t)=>null==e?null:t.mapPos(e)}),E0=IA.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(EJ)?t.value:e,e))}),E1=P5.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(E0);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(E0)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(E0),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.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(E0)!=e&&this.view.dispatch({effects:EJ.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 E2(e,t,n,r,i){t.lastIndex=0;for(let o=e.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=t.exec(o.value);)i(a+s.index,s)}class E5{constructor(e){let{regexp:t,decoration:n,decorate:r,boundary:i,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,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let o=n(e,t,r);o&&i(r,r+e[0].length,o)};else if(n)this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n);else throw RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=i,this.maxLength=o}createDeco(e){let t=new Oe,n=t.add.bind(t);for(let{from:t,to:r}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 r=[];for(let{from:i,to:o}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}(e,this.maxLength))E2(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return(e.docChanged&&e.changes.iterChanges((t,i,o,a)=>{a>=e.view.viewport.from&&o<=e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(a,r))}),e.viewportMoved||r-n>1e3)?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let o=Math.max(i.from,n),a=Math.min(i.to,r);if(a>o){let n=e.state.doc.lineAt(o),r=n.to<a?e.state.doc.lineAt(a):n,s=Math.max(i.from,n.from),l=Math.min(i.to,r.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){s=o;break}for(;a<r.to;a++)if(this.boundary.test(r.text[a-r.from])){l=a;break}}let u=[],c,h=(e,t,n)=>u.push(n.range(e,t));if(n==r)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 E2(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 E3=null!=/x/.unicode?"gu":"g",E4=RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u2028\u2029\uFEFF-]",E3),E8={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"},E6=null,E9=I_.define({combine(e){let t=I3(e,{render:null,specialChars:E4,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==E6&&"undefined"!=typeof document&&document.body){let t=document.body.style;E6=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)!=null}return E6||!1}())&&(t.specialChars=RegExp(" |"+t.specialChars.source,E3)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,E3)),t}}),E7=null;class Le extends Pc{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),r=e.state.phrase("Control character")+" "+(E8[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Lt extends Pc{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 Ln=Pd.line({class:"cm-activeLine"}),Lr=P5.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 r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(Ln.range(i.from)),t=i.from)}return Pd.set(n)}},{decorations:e=>e.decorations});class Li extends Pc{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?OD(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=OE(t[0],"rtl"!=n.direction),i=parseInt(n.lineHeight);return r.bottom-r.top>1.5*i?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}function Lo(e,t){var n;let r,i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),o=e.state.doc.lineAt(i),a=i-o.from,s=a>2e3?-1:a==o.length?(n=t.clientX,(r=e.coordsAtPos(e.viewport.from))?Math.round(Math.abs((r.left-n)/e.defaultCharacterWidth)):-1):Oh(o.text,e.state.tabSize,i-o.from);return{line:o.number,col:s,off:a}}let La={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},Ls={style:"cursor: crosshair"},Ll="-10000px";class Lu{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===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<i.length;n++){let r=i[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)o[n]=this.createTooltipView(r,n?o[n-1]:null),a&&(a[n]=!!r.above);else{let r=o[n]=this.tooltipViews[s];a&&(a[n]=t[s]),r.update&&r.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=r,this.tooltips=i,this.tooltipViews=o,!0}}function Lc(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}let Lh=I_.define({combine:e=>{var t,n,r;return{position:O7.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===(r=e.find(e=>e.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||Lc}}}),Ld=new WeakMap,Lf=P5.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(Lh);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 Lu(e,Lv,(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,r=e.state.facet(Lh);if(r.position!=this.position&&!this.madeAbsolute){for(let e of(this.position=r.position,this.manager.tooltipViews))e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){for(let e of(this.parent&&this.container.remove(),this.parent=r.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),r=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=Ll,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),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(O7.gecko)n=e.offsetParent!=this.container.ownerDocument.body;else if(e.style.top==Ll&&"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 r=this.view.scrollDOM.getBoundingClientRect(),i=Rr(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.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(Lh).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:r,scaleX:i,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,r.top)||h.top>=Math.min(n.bottom,r.bottom)||h.right<Math.max(n.left,r.left)-.1||h.left>Math.min(n.right,r.right)+.1)){c.style.top=Ll;continue}let f=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=7*!!f,g=d.right-d.left,m=null!==(t=Ld.get(u))&&void 0!==t?t:d.bottom-d.top,v=u.offset||Lm,y=this.view.textDirection==PC.LTR,x=d.width>r.right-r.left?y?r.left:r.right-d.width:y?Math.max(r.left,Math.min(h.left-14*!!f+v.x,r.right-g)):Math.min(Math.max(r.left,h.left-g+14*!!f-v.x),r.right-g),b=this.above[s];!l.strictSide&&(b?h.top-m-p-v.y<r.top:h.bottom+m+p+v.y>r.bottom)&&b==r.bottom-h.bottom>h.top-r.top&&(b=this.above[s]=!b);let w=(b?h.top-r.top:r.bottom-h.bottom)-p;if(w<m&&!1!==u.resize){if(w<this.view.defaultLineHeight){c.style.top=Ll;continue}Ld.set(u,m),c.style.height=(m=w)/o+"px"}else c.style.height&&(c.style.height="");let S=b?h.top-m-p-v.y:h.bottom+p+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-p:e.bottom+p+2);if("absolute"==this.position?(c.style.top=(S-e.parent.top)/o+"px",Lp(c,(x-e.parent.left)/i)):(c.style.top=S/o+"px",Lp(c,x/i)),f){let e=h.left+(y?v.x:-v.x)-(x+14-7);f.style.left=e/i+"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=Ll}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Lp(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}let Lg=EM.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"}}}),Lm={x:0,y:0},Lv=I_.define({enables:[Lf,Lg]}),Ly=I_.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class Lx{static create(e){return new Lx(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Lu(e,Ly,(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 r=n[e];if(void 0!==r){if(void 0===t)t=r;else if(t!==r)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 Lb=Lv.compute([Ly],e=>{let t=e.facet(Ly);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:Lx.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class Lw{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,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 r,i=1;if(n instanceof Pn)r=n.posAtStart;else{if(null==(r=e.posAtCoords(t)))return;let n=e.coordsAtPos(r);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(r)).find(e=>e.from<=r&&e.to>=r),a=o&&o.dir==PC.RTL?-1:1;i=t.x<n.left?-a:a}let o=this.source(e,r,i);if(null==o?void 0:o.then){let t=this.pending={pos:r};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=>PJ(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(Lf),t=e?e.manager.tooltips.findIndex(e=>e.create==Lx.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:r,tooltip:i}=this;if(r.length&&i&&!function(e,t){let{left:n,right:r,top:i,bottom:o}=e.getBoundingClientRect(),a;if(a=e.querySelector(".cm-tooltip-arrow")){let e=a.getBoundingClientRect();i=Math.min(e.top,i),o=Math.max(e.bottom,o)}return t.clientX>=n-4&&t.clientX<=r+4&&t.clientY>=i-4&&t.clientY<=o+4}(i.dom,e)||this.pending){let{pos:i}=r[0]||this.pending,o=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:i;(i==o?this.view.posAtCoords(this.lastMove)!=i:!function(e,t,n,r,i,o){let a=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(a.left>r||a.right<r||a.top>i||Math.min(a.bottom,s)<i)return!1;let l=e.posAtCoords({x:r,y:i},!1);return l>=t&&l<=n}(this.view,i,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 LS(e,t){let n=e.plugin(Lf);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}let L_=IY.define(),LC=I_.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function LM(e,t){let n=e.plugin(Lk),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}let Lk=P5.fromClass(class{constructor(e){this.input=e.state.facet(LA),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(LC);for(let n of(this.top=new LT(e,!0,t.topContainer),this.bottom=new LT(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(LC);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new LT(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new LT(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(LA);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],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),r.push(s),(s.top?i:o).push(s)}for(let e of(this.specs=t,this.panels=r,this.top.sync(i),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=>EM.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class LT{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=LD(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=LD(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 LD(e){let t=e.nextSibling;return e.remove(),t}let LA=I_.define({enables:Lk});class LI extends I4{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}LI.prototype.elementClass="",LI.prototype.toDOM=void 0,LI.prototype.mapMode=Ic.TrackBefore,LI.prototype.startSide=LI.prototype.endSide=-1,LI.prototype.point=!0;let LO=I_.define(),LP=I_.define(),LR={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>I7.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},LE=I_.define();function LL(e){return[LB(),LE.of(Object.assign(Object.assign({},LR),e))]}let LN=I_.define({combine:e=>e.some(e=>e)});function LB(e){let t=[LF];return e&&!1===e.fixed&&t.push(LN.of(!0)),t}let LF=P5.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(LE).map(t=>new Lj(e,t)),this.gutters))this.dom.appendChild(t.dom);this.fixed=!e.state.facet(LN),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,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(LN)!=!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=I7.iter(this.view.state.facet(LO),this.view.viewport.from),r=[],i=this.gutters.map(e=>new LZ(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==Ph.Text&&t){for(let e of(LV(n,r,o.from),i))e.line(this.view,o,r);t=!1}else if(o.widget)for(let e of i)e.widget(this.view,o)}else if(e.type==Ph.Text)for(let t of(LV(n,r,e.from),i))t.line(this.view,e,r);else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(LE),n=e.state.facet(LE),r=e.docChanged||e.heightChanged||e.viewportChanged||!I7.eq(e.startState.facet(LO),e.state.facet(LO),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Lj(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),0>i.indexOf(e)&&e.destroy();for(let e of i)this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>EM.scrollMargins.of(t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==PC.LTR?{left:n.dom.offsetWidth*t.scaleX}:{right:n.dom.offsetWidth*t.scaleX}:null})});function Lz(e){return Array.isArray(e)?e:[e]}function LV(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class LZ{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=I7.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==r.elements.length){let t=new LH(e,o,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,o,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];LV(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(LP)){let i=n(e,t.widget,t);i&&(r||(r=[])).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Lj{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,r=>{let i=r.target,o;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=r.clientY;let a=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,a,r)&&r.preventDefault()});this.markers=Lz(t.markers(e)),t.initialSpacer&&(this.spacer=new LH(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=Lz(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!I7.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 LH{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){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,r)&&this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,o=0;;){let a=o,s=i<t.length?t[i++]: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(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}let LW=I_.define(),L$=I_.define(),LG=I_.define({combine:e=>I3(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class LU extends LI{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Lq(e,t){return e.state.facet(LG).formatNumber(t,e.state)}let LY=LE.compute([LG],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(LW),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new LU(Lq(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(L$)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(LG)!=e.state.facet(LG),initialSpacer:e=>new LU(Lq(e,LX(e.state.doc.lines))),updateSpacer(e,t){let n=Lq(t.view,LX(t.view.state.doc.lines));return n==e.number?e:new LU(n)},domEventHandlers:e.facet(LG).domEventHandlers}));function LX(e){let t=9;for(;t<e;)t=10*t+9;return t}let LK=new class extends LI{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},LQ=LO.compute(["selection"],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(LK.range(i)))}return I7.of(t)}),LJ=0;class L0{constructor(e,t){this.from=e,this.to=t}}class L1{constructor(e={}){this.id=LJ++,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=L3.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}L1.closedBy=new L1({deserialize:e=>e.split(" ")}),L1.openedBy=new L1({deserialize:e=>e.split(" ")}),L1.group=new L1({deserialize:e=>e.split(" ")}),L1.isolate=new L1({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),L1.contextHash=new L1({perNode:!0}),L1.lookAhead=new L1({perNode:!0}),L1.mounted=new L1({perNode:!0});class L2{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[L1.mounted.id]}}let L5=Object.create(null);class L3{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):L5,n=+!!e.top|2*!!e.skipped|4*!!e.error|8*(null==e.name),r=new L3(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(r)),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 r}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(L1.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 r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(L1.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}L3.none=new L3("",Object.create(null),0,8);class L4{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 r=null;for(let t of e){let e=t(n);e&&(r||(r=Object.assign({},n.props)),r[e[0].id]=e[1])}t.push(r?new L3(n.name,r,n.id,n.flags):n)}return new L4(t)}}let L8=new WeakMap,L6=new WeakMap;(qA=qE||(qE={}))[qA.ExcludeBuffers=1]="ExcludeBuffers",qA[qA.IncludeAnonymous=2]="IncludeAnonymous",qA[qA.IgnoreMounts=4]="IgnoreMounts",qA[qA.IgnoreOverlays=8]="IgnoreOverlays";class L9{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length)for(let[e,t]of(this.props=Object.create(null),i))this.props["number"==typeof e?e:e.id]=t}toString(){let e=L2.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 Nh(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new Nh(L8.get(this)||this.topNode);return r.moveTo(e,t),L8.set(this,r._tree),r}get topNode(){return new Ni(this,0,0,null)}resolve(e,t=0){let n=Nn(L8.get(this)||this.topNode,e,t,!1);return L8.set(this,n),n}resolveInner(e,t=0){let n=Nn(L6.get(this)||this.topNode,e,t,!0);return L6.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof Ni?r:r.context.parent;e;e=e.parent)if(e.index<0){let o=e.parent;(i||(i=[r])).push(o.resolve(t,n)),e=o}else{let o=L2.get(e.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let a=new Ni(o.tree,o.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(Nn(a,t,n,!1))}}return i?Nu(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,o=e.mode||0,a=(o&qE.IncludeAnonymous)>0;for(let e=this.cursor(o|qE.IncludeAnonymous);;){let o=!1;if(e.from<=i&&e.to>=r&&(!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:Ng(L3.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new L9(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new L9(L3.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=1024,reused:o=[],minRepeatType:a=r.types.length}=e,s=Array.isArray(n)?new L7(n,n.length):n,l=r.types,u=0,c=0;function h(e,t,n,i,o,a,s,l,u){let c=[],h=[];for(;e.length>i;)c.push(e.pop()),h.push(t.pop()+n-o);e.push(d(r.types[s],c,h,a-o,l-a,u)),t.push(o-n)}function d(e,t,n,r,i,o,a){if(o){let e=[L1.contextHash,o];a=a?[e].concat(a):[e]}if(i>25){let e=[L1.lookAhead,i];a=a?[e].concat(a):[e]}return new L9(e,t,n,r,a)}let f=[],p=[];for(;s.pos>0;)!function e(t,n,f,p,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];f.push(e),p.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<=i&&(M=function(e,t){let n=s.fork(),r=0,o=0,l=0,u=n.end-i,c={size:0,start:0,skip:0};o:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){c.size=r,c.start=o,c.skip=l,l+=4,r+=4,n.next();continue}let s=n.pos-e;if(e<0||s<i||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,r+=e,l+=h}return(t<0||r==e)&&(c.size=r,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,i=e.length;for(;s.pos>n;)i=function e(t,n,r){let{id:i,start:o,end:l,size:h}=s;if(s.next(),h>=0&&i<a){let a=r;if(h>4){let i=s.pos-(h-4);for(;s.pos>i;)r=e(t,n,r)}n[--r]=a,n[--r]=l-t,n[--r]=o-t,n[--r]=i}else -3==h?u=i:-4==h&&(c=i);return r}(M.start,e,i);C=new Ne(e,x-M.start,r),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-i&&(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:r}=s;if(r>4)s.next();else if(u>-1&&t<u)break;else u<0&&(u=n-i),a.push(e,t,n),l++,s.next()}if(l){let t=new Uint16Array(4*l),i=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]-i,t[n++]=a[e+2]-i,t[n++]=n;n.push(new Ne(t,a[2]-i,r)),o.push(i-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,r,i)=>{let o=0,a=n.length-1,s,l;if(a>=0&&(s=n[a])instanceof L9){if(!a&&s.type==e&&s.length==i)return s;(l=s.prop(L1.lookAhead))&&(o=r[a]+s.length+l)}return d(e,n,r,i,o,t)}}(_,S);C=Ng(_,n,o,0,n.length,0,x-y,e,e)}else C=d(_,n,o,x-y,w-x,S)}f.push(C),p.push(k)}(e.start||0,e.bufferStart||0,f,p,-1,0);let g=null!==(t=e.length)&&void 0!==t?t:f.length?p[0]+f[0].length:0;return new L9(l[e.topID],f.reverse(),p.reverse(),g)}(e)}}L9.empty=new L9(L3.none,[],[],0);class L7{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 L7(this.buffer,this.index)}}class Ne{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return L3.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],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}findChild(e,t,n,r,i){let{buffer:o}=this,a=-1;for(let s=e;s!=t&&(!Nt(i,r,o[s+1],o[s+2])||(a=s,!(n>0)));s=o[s+3]);return a}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let a=e,s=0;a<t;){i[s++]=r[a++],i[s++]=r[a++]-n;let t=i[s++]=r[a++]-n;i[s++]=r[a++]-e,o=Math.max(o,t)}return new Ne(i,o,this.set)}}function Nt(e,t,n,r){switch(e){case -2:return n<t;case -1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Nn(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof Ni&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=r?0:qE.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;a=(r=a).parent)r instanceof Ni&&r.index<0&&(null===(i=a.enter(t,n,o))||void 0===i?void 0:i.from)!=r.from&&(e=a);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class Nr{cursor(e=0){return new Nh(this,e)}getChild(e,t=null,n=null){let r=No(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return No(this,e,t,n)}resolve(e,t=0){return Nn(this,e,t,!1)}resolveInner(e,t=0){return Nn(this,e,t,!0)}matchContext(e){return Na(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 Ni extends Nr{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}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,r,i=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(Nt(r,n,u,u+l.length)){if(l instanceof Ne){if(i&qE.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,n-u,r);if(a>-1)return new Nl(new Ns(o,l,e,u),null,a)}else if(i&qE.IncludeAnonymous||!l.type.isAnonymous||Nd(l)){let a;if(!(i&qE.IgnoreMounts)&&(a=L2.get(l))&&!a.overlay)return new Ni(a.tree,u,e,o);let s=new Ni(l,u,e,o);return i&qE.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,n,r)}}}if(i&qE.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 r;if(!(n&qE.IgnoreOverlays)&&(r=L2.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e<n)&&(t<0?i>=n:i>n))return new Ni(r.tree,r.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 No(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return o}for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function Na(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class Ns{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class Nl extends Nr{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:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new Nl(this.context,this,i)}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&qE.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new Nl(this.context,this,i)}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 Nl(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 Nl(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new L9(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Nu(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof Ni&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new Nc(i,n)}class Nc{constructor(e,t){this.heads=e,this.node=t}get next(){return Nu(this.heads)}}class Nh{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 Ni)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:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof Ni?(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:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}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&qE.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&qE.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&qE.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:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&qE.IncludeAnonymous||e instanceof Ne||!e.type.isAnonymous||Nd(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 r=this.index,i=this.stack.length;i>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break o}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new Nl(this.buffer,t,this.stack[e]);return this.bufferNode=new Nl(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return Na(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Na(this._tree,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Nd(e){return e.children.some(e=>e instanceof Ne||!e.type.isAnonymous||Nd(e))}let Nf=new WeakMap;function Np(e,t){if(!e.isAnonymous||t instanceof Ne||t.type!=e)return 1;let n=Nf.get(t);if(null==n){for(let r of(n=1,t.children)){if(r.type!=e||!(r instanceof L9)){n=1;break}n+=Np(e,r)}Nf.set(t,n)}return n}function Ng(e,t,n,r,i,o,a,s,l){let u=0;for(let n=r;n<i;n++)u+=Np(e,t[n]);let c=Math.ceil(1.5*u/8),h=[],d=[];return!function t(n,r,i,a,s){for(let u=i;u<a;){let i=u,f=r[u],p=Np(e,n[u]);for(u++;u<a;u++){let t=Np(e,n[u]);if(p+t>=c)break;p+=t}if(u==i+1){if(p>c){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+s);continue}h.push(n[i])}else{let t=r[u-1]+n[u-1].length-f;h.push(Ng(e,n,r,i,u,f,t,null,l))}d.push(f+s-o)}}(t,n,r,i,0),(s||l)(h,d,a)}class Nm{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=+!!i|2*!!o}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new Nm(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=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 Nm(e,n,t.tree,t.offset+l,a>0,!!u)}if(t&&r.push(t),o.to>c)break;o=i<e.length?e[i++]:null}if(!u)break;s=u.toA,l=u.toA-u.toB}return r}}class Nv{startParse(e,t,n){return"string"==typeof e&&(e=new Ny(e)),n=n?n.length?n.map(e=>new L0(e.from,e.to)):[new L0(0,0)]:[new L0(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class Ny{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 L1({perNode:!0});let Nx=0;class Nb{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Nx++}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 Nb&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new Nb("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 NS(e);return e=>e.modified.indexOf(t)>-1?e:NS.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let Nw=0;class NS{constructor(e){this.name=e,this.instances=[],this.id=Nw++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{var r,i;return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every((e,t)=>e==i[t]))});if(n)return n;let r=[],i=new Nb(e.name,r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].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)r.push(NS.get(t,e));return i}}function N_(e){let t=Object.create(null);for(let n in e){let r=e[n];for(let e of(Array.isArray(r)||(r=[r]),n.split(" ")))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),(t+=r[0].length)==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){i=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 NM(r,i,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return NC.add(t)}let NC=new L1;class NM{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}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 Nk(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:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}NM.empty=new NM([],2,null);class NT{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,r,i){let{type:o,from:a,to:s}=e;if(a>=n||s<=t)return;o.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(o)));let l=r,u=function(e){let t=e.type.prop(NC);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||NM.empty,c=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,u.tags);if(c&&(l&&(l+=" "),l+=c,1==u.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(t,a),l),u.opaque)return;let h=e.tree&&e.tree.prop(L1.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,f=a;;d++){let p=d<h.overlay.length?h.overlay[d]:null,g=p?p.from+a:s,m=Math.max(t,f),v=Math.min(n,g);if(m<v&&c)for(;e.from<v&&(this.highlightRange(e,m,v,r,i),this.startSpan(Math.min(v,e.to),l),!(e.to>=g)&&e.nextSibling()););if(!p||g>n)break;(f=p.to+a)>t&&(this.highlightRange(o.cursor(),Math.max(t,p.from+a),Math.min(n,f),"",u),this.startSpan(Math.min(n,f),l))}c&&e.parent()}else if(e.firstChild()){h&&(r="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}while(e.nextSibling());e.parent()}}}let ND=Nb.define,NA=ND(),NI=ND(),NO=ND(NI),NP=ND(NI),NR=ND(),NE=ND(NR),NL=ND(NR),NN=ND(),NB=ND(NN),NF=ND(),Nz=ND(),NV=ND(),NZ=ND(NV),Nj=ND(),NH={comment:NA,lineComment:ND(NA),blockComment:ND(NA),docComment:ND(NA),name:NI,variableName:ND(NI),typeName:NO,tagName:ND(NO),propertyName:NP,attributeName:ND(NP),className:ND(NI),labelName:ND(NI),namespace:ND(NI),macroName:ND(NI),literal:NR,string:NE,docString:ND(NE),character:ND(NE),attributeValue:ND(NE),number:NL,integer:ND(NL),float:ND(NL),bool:ND(NR),regexp:ND(NR),escape:ND(NR),color:ND(NR),url:ND(NR),keyword:NF,self:ND(NF),null:ND(NF),atom:ND(NF),unit:ND(NF),modifier:ND(NF),operatorKeyword:ND(NF),controlKeyword:ND(NF),definitionKeyword:ND(NF),moduleKeyword:ND(NF),operator:Nz,derefOperator:ND(Nz),arithmeticOperator:ND(Nz),logicOperator:ND(Nz),bitwiseOperator:ND(Nz),compareOperator:ND(Nz),updateOperator:ND(Nz),definitionOperator:ND(Nz),typeOperator:ND(Nz),controlOperator:ND(Nz),punctuation:NV,separator:ND(NV),bracket:NZ,angleBracket:ND(NZ),squareBracket:ND(NZ),paren:ND(NZ),brace:ND(NZ),content:NN,heading:NB,heading1:ND(NB),heading2:ND(NB),heading3:ND(NB),heading4:ND(NB),heading5:ND(NB),heading6:ND(NB),contentSeparator:ND(NN),list:ND(NN),quote:ND(NN),emphasis:ND(NN),strong:ND(NN),link:ND(NN),monospace:ND(NN),strikethrough:ND(NN),inserted:ND(),deleted:ND(),changed:ND(),invalid:ND(),meta:Nj,documentMeta:ND(Nj),annotation:ND(Nj),processingInstruction:ND(Nj),definition:Nb.defineModifier("definition"),constant:Nb.defineModifier("constant"),function:Nb.defineModifier("function"),standard:Nb.defineModifier("standard"),local:Nb.defineModifier("local"),special:Nb.defineModifier("special")};for(let e in NH){let t=NH[e];t instanceof Nb&&(t.name=e)}Nk([{tag:NH.link,class:"tok-link"},{tag:NH.heading,class:"tok-heading"},{tag:NH.emphasis,class:"tok-emphasis"},{tag:NH.strong,class:"tok-strong"},{tag:NH.keyword,class:"tok-keyword"},{tag:NH.atom,class:"tok-atom"},{tag:NH.bool,class:"tok-bool"},{tag:NH.url,class:"tok-url"},{tag:NH.labelName,class:"tok-labelName"},{tag:NH.inserted,class:"tok-inserted"},{tag:NH.deleted,class:"tok-deleted"},{tag:NH.literal,class:"tok-literal"},{tag:NH.string,class:"tok-string"},{tag:NH.number,class:"tok-number"},{tag:[NH.regexp,NH.escape,NH.special(NH.string)],class:"tok-string2"},{tag:NH.variableName,class:"tok-variableName"},{tag:NH.local(NH.variableName),class:"tok-variableName tok-local"},{tag:NH.definition(NH.variableName),class:"tok-variableName tok-definition"},{tag:NH.special(NH.variableName),class:"tok-variableName2"},{tag:NH.definition(NH.propertyName),class:"tok-propertyName tok-definition"},{tag:NH.typeName,class:"tok-typeName"},{tag:NH.namespace,class:"tok-namespace"},{tag:NH.className,class:"tok-className"},{tag:NH.macroName,class:"tok-macroName"},{tag:NH.propertyName,class:"tok-propertyName"},{tag:NH.operator,class:"tok-operator"},{tag:NH.comment,class:"tok-comment"},{tag:NH.meta,class:"tok-meta"},{tag:NH.invalid,class:"tok-invalid"},{tag:NH.punctuation,class:"tok-punctuation"}]);let NW=new L1,N$=new L1;class NG{constructor(e,t,n=[],r=""){this.data=e,this.name=r,I5.prototype.hasOwnProperty("tree")||Object.defineProperty(I5.prototype,"tree",{get(){return NY(this)}}),this.parser=t,this.extension=[N3.of(this),I5.languageData.of((e,t,n)=>{let r=NU(e,t,n),i=r.type.prop(NW);if(!i)return[];let o=e.facet(i),a=r.type.prop(N$);if(a){let i=r.resolve(t-r.from,n);for(let t of a)if(t.test(i,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 NU(e,t,n).type.prop(NW)==this.data}findRegions(e){let t=e.facet(N3);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(NW)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(L1.mounted);if(i){if(i.tree.prop(NW)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof L9&&r(i,e.positions[n]+t)}};return r(NY(e),0),n}get allowsNesting(){return!0}}function NU(e,t,n){let r=e.facet(N3),i=NY(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,qE.ExcludeBuffers))e.type.isTop&&(i=e);return i}NG.setState=IY.define();class Nq extends NG{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){var t;let n=(t=e.languageData,I_.define({combine:t?e=>e.concat(t):void 0}));return new Nq(n,e.parser.configure({props:[NW.add(e=>e.isTop?n:void 0)]}),e.name)}configure(e,t){return new Nq(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function NY(e){let t=e.field(NG.state,!1);return t?t.tree:L9.empty}class NX{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 NK=null;class NQ{constructor(e,t,n=[],r,i,o,a,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new NQ(e,t,[],L9.empty,0,n,[],null)}startParse(){return this.parser.startParse(new NX(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=L9.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 r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(Nm.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,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(Nm.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=NK;NK=this;try{return e()}finally{NK=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=NJ(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=Nm.applyChanges(n,t),r=L9.empty,i=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),r=e.mapPos(t.to,-1);n<r&&a.push({from:n,to:r})}}return new NQ(this.parser,t,n,r,i,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:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=NJ(this.fragments,n,r),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 Nv{createParse(t,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let t=NK;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new L9(L3.none,[],[],o-i)},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 NK}}function NJ(e,t,n){return Nm.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class N0{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 N0(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=NQ.create(e.facet(N3).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new N0(n)}}NG.state=IA.define({create:N0.init,update(e,t){for(let e of t.effects)if(e.is(NG.setState))return e.value;return t.startState.facet(N3)!=t.state.facet(N3)?N0.init(t.state):e.apply(t)}});let N1=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(N1=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let N2="undefined"!=typeof navigator&&(null===(qL=navigator.scheduling)||void 0===qL?void 0:qL.isInputPending)?()=>navigator.scheduling.isInputPending():null,N5=P5.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(NG.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(NG.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=N1(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:r}}=this.view,i=n.field(NG.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!N2?Math.max(25,e.timeRemaining()-5):1e9),a=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>N2&&N2()||Date.now()>o,r+1e5*!a);this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:NG.setState.of(new N0(i.context))})),this.chunkBudget>0&&!(s&&!a)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>PJ(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()}}}),N3=I_.define({combine:e=>e.length?e[0]:null,enables:e=>[NG.state,N5,EM.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class N4{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let N8=I_.define(),N6=I_.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 N9(e){let t=e.facet(N6);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function N7(e,t){let n="",r=e.tabSize,i=e.facet(N6)[0];if(" "==i){for(;t>=r;)n+=" ",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function Be(e,t){for(let n of(e instanceof I5&&(e=new Bt(e)),e.state.facet(N8))){let r=n(e,t);if(void 0!==r)return r}let n=NY(e.state);return n.length>=t?function(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&(t.from!=r.node.from||t.type!=r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Br(r,e,n)}(e,n,t):null}class Bt{constructor(e,t={}){this.state=e,this.options=t,this.unit=N9(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Oh(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let Bn=new L1;function Br(e,t,n){for(let r=e;r;r=r.next){let e=function(e){let t=e.type.prop(Bn);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(L1.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>(function(e,t,n,r,i){let o=e.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==e.pos+a,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),a=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.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=i.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?Bi:null}(r.node);if(e)return e(Bo.create(t,n,r))}return 0}function Bi(){return 0}class Bo extends Bt{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 Bo(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 Br(this.context.next,this.base,this.pos)}}function Ba({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}let Bs=I_.define(),Bl=new L1;function Bu(e,t,n){for(let r of e.facet(Bs)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=NY(e);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let a=i;a;a=a.next){let i=a.node;if(i.to<=n||i.from>n)continue;if(o&&i.from<t)break;let s=i.type.prop(Bl);if(s&&(i.to<r.length-50||r.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(o=r)}}return o}(e,t,n)}function Bc(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}let Bh=IY.define({map:Bc}),Bd=IY.define({map:Bc});function Bf(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 Bp=IA.define({create:()=>Pd.none,update(e,t){for(let n of(e=e.map(t.changes),t.effects))if(n.is(Bh)&&!function(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(Bb),i=r?Pd.replace({widget:new BC(r(t.state,n.value))}):B_;e=e.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Bd)&&(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:r}=t.selection.main;e.between(r,r,(e,t)=>{e<r&&t>r&&(n=!0)}),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>EM.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 r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw RangeError("Invalid JSON for fold state");t.push(B_.range(r,i))}return Pd.set(t,!0)}});function Bg(e,t,n){var r;let i=null;return null===(r=e.field(Bp,!1))||void 0===r||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function Bm(e,t){return e.field(Bp,!1)?t:t.concat(IY.appendConfig.of(Bw()))}function Bv(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return EM.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}let By=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of Bf(e)){let n=Bu(e.state,t.from,t.to);if(n)return e.dispatch({effects:Bm(e.state,[Bh.of(n),Bv(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(Bp,!1))return!1;let t=[];for(let n of Bf(e)){let r=Bg(e.state,n.from,n.to);r&&t.push(Bd.of(r),Bv(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),o=Bu(t,i.from,i.to);o&&n.push(Bh.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:Bm(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(Bp,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(Bd.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],Bx={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Bb=I_.define({combine:e=>I3(e,Bx)});function Bw(e){let t=[Bp,BT];return e&&t.push(Bb.of(e)),t}function BS(e,t){let{state:n}=e,r=n.facet(Bb),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=Bg(e.state,n.from,n.to);r&&e.dispatch({effects:Bd.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}let B_=Pd.replace({widget:new class extends Pc{toDOM(e){return BS(e,null)}}});class BC extends Pc{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return BS(e,this.value)}}let BM={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Bk extends LI{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 BT=EM.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 BD{constructor(e,t){let n;function r(e){let t=Om.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;let i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof NG?e=>e.prop(NW)==o.data:o?e=>e==o:void 0,this.style=Nk(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new Om(n):null,this.themeType=t.themeType}static define(e,t){return new BD(e,t||{})}}let BA=I_.define(),BI=I_.define({combine:e=>e.length?[e[0]]:null});function BO(e){let t=e.facet(BA);return t.length?t:e.facet(BI)}function BP(e,t){let n=[BR],r;return e instanceof BD&&(e.module&&n.push(EM.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(BI.of(e)):r?n.push(BA.computeN([EM.darkTheme],t=>t.facet(EM.darkTheme)==("dark"==r)?[e]:[])):n.push(BA.of(e)),n}let BR=IP.high(P5.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=NY(e.state),this.decorations=this.buildDeco(e,BO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=NY(e.state),n=BO(e.state),r=n!=BO(e.startState),{viewport:i}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&o>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Pd.none;let n=new Oe;for(let{from:r,to:i}of e.visibleRanges)!function(e,t,n,r=0,i=e.length){let o=new NT(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=Pd.mark({class:r})))},r,i);return n.finish()}},{decorations:e=>e.decorations})),BE=BD.define([{tag:NH.meta,color:"#404740"},{tag:NH.link,textDecoration:"underline"},{tag:NH.heading,textDecoration:"underline",fontWeight:"bold"},{tag:NH.emphasis,fontStyle:"italic"},{tag:NH.strong,fontWeight:"bold"},{tag:NH.strikethrough,textDecoration:"line-through"},{tag:NH.keyword,color:"#708"},{tag:[NH.atom,NH.bool,NH.url,NH.contentSeparator,NH.labelName],color:"#219"},{tag:[NH.literal,NH.inserted],color:"#164"},{tag:[NH.string,NH.deleted],color:"#a11"},{tag:[NH.regexp,NH.escape,NH.special(NH.string)],color:"#e40"},{tag:NH.definition(NH.variableName),color:"#00f"},{tag:NH.local(NH.variableName),color:"#30a"},{tag:[NH.typeName,NH.namespace],color:"#085"},{tag:NH.className,color:"#167"},{tag:[NH.special(NH.variableName),NH.macroName],color:"#256"},{tag:NH.definition(NH.propertyName),color:"#00c"},{tag:NH.comment,color:"#940"},{tag:NH.invalid,color:"#f00"}]),BL=EM.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),BN="()[]{}",BB=I_.define({combine:e=>I3(e,{afterCursor:!0,brackets:BN,maxScanDistance:1e4,renderMatch:BV})}),BF=Pd.mark({class:"cm-matchingBracket"}),Bz=Pd.mark({class:"cm-nonmatchingBracket"});function BV(e){let t=[],n=e.matched?BF:Bz;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 BZ=[IA.define({create:()=>Pd.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(BB);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=B$(t.state,e.head,-1,r)||e.head>0&&B$(t.state,e.head-1,1,r)||r.afterCursor&&(B$(t.state,e.head,1,r)||e.head<t.state.doc.length&&B$(t.state,e.head+1,-1,r));i&&(n=n.concat(r.renderMatch(i,t.state)))}return Pd.set(n,!0)},provide:e=>EM.decorations.from(e)}),BL],Bj=new L1;function BH(e,t,n){let r=e.prop(t<0?L1.openedBy:L1.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function BW(e){let t=e.type.prop(Bj);return t?t(e.node):e}function B$(e,t,n,r={}){let i=r.maxScanDistance||1e4,o=r.brackets||BN,a=NY(e),s=a.resolveInner(t,n);for(let e=s;e;e=e.parent){let r=BH(e.type,n,o);if(r&&e.from<e.to){let i=BW(e);if(i&&(n>0?t>=i.from&&t<i.to:t>i.from&&t<=i.to))return function(e,t,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},u=0,c=null==s?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(0==u&&o.indexOf(c.type.name)>-1&&c.from<c.to){let e=BW(c);return{start:l,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(BH(c.type,n,a))u++;else if(BH(c.type,-n,a)){if(0==u){let e=BW(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,i,r,o)}}return function(e,t,n,r,i,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)&&r.resolveInner(s+e,1).type==i){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,i,o)}let BG=Object.create(null),BU=[L3.none],Bq=[],BY=Object.create(null),BX=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"]])BX[e]=function(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||NH[n];r?"function"==typeof r?t.length?t=t.map(r):BK(n,`Modifier ${n} used at start of tag`):t.length?BK(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:BK(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(e=>e.id),o=BY[i];if(o)return o.id;let a=BY[i]=L3.define({id:BU.length,name:r,props:[N_({[r]:n})]});return BU.push(a),a.id}(BG,t);function BK(e,t){Bq.indexOf(e)>-1||(Bq.push(e),console.warn(t))}function BQ(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}PC.RTL,PC.LTR;let BJ=BQ(function(e,t,n=t.selection.ranges){let r=[],i=-1;for(let{from:e,to:o}of n){let n=r.length,a=1e9,s=B2(t,e).line;if(s){for(let n=e;n<=o;){let l=t.doc.lineAt(n);if(l.from>i&&(e==o||o>l.from)){i=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),r.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<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=a);r.length==n+1&&(r[n].single=!0)}}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:a}of r)(a||!o)&&e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null},0),B0=BQ(B5,0),B1=BQ((e,t)=>B5(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function B2(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function B5(e,t,n=t.selection.ranges){let r=n.map(e=>B2(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>(function(e,{open:t,close:n},r,i){let o,a,s=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+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:r-u,margin:u&&1},close:{pos:i+c,margin:c&&1}};i-r<=100?o=a=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+50),a=e.sliceDoc(i-50,i));let d=/^\s*/.exec(o)[0].length,f=/\s*$/.exec(a)[0].length,p=a.length-f-n.length;return o.slice(d,d+t.length)==t&&a.slice(p,p+n.length)==n?{open:{pos:r+d+t.length,margin:+!!/\s/.test(o.charAt(d+t.length))},close:{pos:i-f-n.length,margin:+!!/\s/.test(a.charAt(p-1))}}:null})(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:o,close:a}=n;e.push({from:o.pos-i.open.length,to:o.pos+o.margin},{from:a.pos-a.margin,to:a.pos+i.close.length})}return{changes:e}}return null}let B3=IG.define(),B4=IG.define(),B8=I_.define(),B6=I_.define({combine:e=>I3(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),B9=IA.define({create:()=>Fh.empty,update(e,t){let n=t.state.facet(B6),r=t.annotation(B3);if(r){let i=Fi.fromTransaction(t,r.selection),o=r.side,a=0==o?e.undone:e.done;return a=i?Fo(a,a.length,n.minDepth,i):Fl(a,t.startState.selection),new Fh(0==o?r.rest:a,0==o?a:r.rest)}let i=t.annotation(B4);if(("full"==i||"before"==i)&&(e=e.isolate()),!1===t.annotation(IX.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=Fi.fromTransaction(t),a=t.annotation(IX.time),s=t.annotation(IX.userEvent);return o?e=e.addChanges(o,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),("full"==i||"after"==i)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new Fh(e.done.map(Fi.fromJSON),e.undone.map(Fi.fromJSON))});function B7(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(B9,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}let Fe=B7(0,!1),Ft=B7(1,!1),Fn=B7(0,!0),Fr=B7(1,!0);class Fi{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new Fi(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 Fi(e.changes&&Id.fromJSON(e.changes),[],e.mapped&&Ih.fromJSON(e.mapped),e.startSelection&&Ib.fromJSON(e.startSelection),e.selectionsAfter.map(Ib.fromJSON))}static fromTransaction(e,t){let n=Fs;for(let t of e.startState.facet(B8)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new Fi(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,Fs)}static selection(e){return new Fi(void 0,Fs,void 0,void 0,e)}}function Fo(e,t,n,r){let i=e.slice(t+1>n+20?t-n-1:0,t);return i.push(r),i}function Fa(e,t){return e.length?t.length?e.concat(t):e:t}let Fs=[];function Fl(e,t){if(!e.length)return[Fi.selection([t])];{let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Fo(e,e.length-1,1e9,n.setSelAfter(r)))}}function Fu(e,t){if(!e.length)return e;let n=e.length,r=Fs;for(;n;){let i=function(e,t,n){let r=Fa(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Fs,n);if(!e.changes)return Fi.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(o):o;return new Fi(i,IY.mapEffects(e.effects,t),a,e.startSelection.map(o),r)}(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Fi.selection(r)]:Fs}let Fc=/^(input\.type|delete)($|\.)/;class Fh{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new Fh(this.done,this.undone):this}addChanges(e,t,n,r,i){var o,a;let s,l,u=this.done,c=u[u.length-1];return new Fh(u=c&&c.changes&&!c.changes.empty&&e.changes&&(!n||Fc.test(n))&&(!c.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,(o=c.changes,a=e.changes,s=[],l=!1,o.iterChangedRanges((e,t)=>s.push(e,t)),a.iterChangedRanges((e,t,n,r)=>{for(let e=0;e<s.length;){let t=s[e++],i=s[e++];r>=t&&n<=i&&(l=!0)}}),l))||"input.type.compose"==n)?Fo(u,u.length-1,r.minDepth,new Fi(e.changes.compose(c.changes),Fa(IY.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,Fs)):Fo(u,u.length,r.minDepth,e),Fs,t,n)}addSelection(e,t,n,r){var i;let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Fs;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=o[o.length-1]).ranges.length==e.ranges.length&&0===i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length?this:new Fh(Fl(this.done,e),this.undone,t,n)}addMapping(e){return new Fh(Fu(this.done,e),Fu(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],o=i.selectionsAfter[0]||t.selection;if(n&&i.selectionsAfter.length){let n,a;return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:B3.of({side:e,rest:(n=r[r.length-1],(a=r.slice())[r.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(!i.changes)return null;{let n=1==r.length?Fs:r.slice(0,r.length-1);return i.mapped&&(n=Fu(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:B3.of({side:e,rest:n,selection:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}Fh.empty=new Fh(Fs,Fs);let Fd=[{key:"Mod-z",run:Fe,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Ft,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Ft,preventDefault:!0},{key:"Mod-u",run:Fn,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Fr,preventDefault:!0}];function Ff(e,t){return Ib.create(e.ranges.map(t),e.mainIndex)}function Fp(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Fg({state:e,dispatch:t},n){let r=Ff(e.selection,n);return!r.eq(e.selection,!0)&&(t(Fp(e,r)),!0)}function Fm(e,t){return Ib.cursor(t?e.to:e.from)}function Fv(e,t){return Fg(e,n=>n.empty?e.moveByChar(n,t):Fm(n,t))}function Fy(e){return e.textDirectionAt(e.state.selection.main.head)==PC.LTR}let Fx=e=>Fv(e,!Fy(e)),Fb=e=>Fv(e,Fy(e));function Fw(e,t){return Fg(e,n=>n.empty?e.moveByGroup(n,t):Fm(n,t))}function FS(e,t,n){let r,i,o=NY(e).resolveInner(t.head),a=n?L1.closedBy:L1.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;!function(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,a)?r=n?t.to:t.from:o=t}return i=o.type.prop(a)&&(r=n?B$(e,o.from,1):B$(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,Ib.cursor(i,n?-1:1)}function F_(e,t){return Fg(e,n=>{if(!n.empty)return Fm(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;let FC=e=>F_(e,!1),FM=e=>F_(e,!0);function Fk(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(EM.scrollMargins)){let i=t(e);(null==i?void 0:i.top)&&(n=Math.max(null==i?void 0:i.top,n)),(null==i?void 0:i.bottom)&&(r=Math.max(null==i?void 0:i.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function FT(e,t){let n,r=Fk(e),{state:i}=e,o=Ff(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):Fm(n,t));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;t&&t.top>s&&t.bottom<l&&(n=EM.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-s}))}return e.dispatch(Fp(i,o),{effects:n}),!0}let FD=e=>FT(e,!1),FA=e=>FT(e,!0);function FI(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=Ib.cursor(r.from+n))}return i}function FO(e,t){let n=Ff(e.state.selection,e=>{let n=t(e);return Ib.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(Fp(e.state,n)),!0)}function FP(e,t){return FO(e,n=>e.moveByChar(n,t))}let FR=e=>FP(e,!Fy(e)),FE=e=>FP(e,Fy(e));function FL(e,t){return FO(e,n=>e.moveByGroup(n,t))}function FN(e,t){return FO(e,n=>e.moveVertically(n,t))}let FB=e=>FN(e,!1),FF=e=>FN(e,!0);function Fz(e,t){return FO(e,n=>e.moveVertically(n,t,Fk(e).height))}let FV=e=>Fz(e,!1),FZ=e=>Fz(e,!0),Fj=({state:e,dispatch:t})=>(t(Fp(e,{anchor:0})),!0),FH=({state:e,dispatch:t})=>(t(Fp(e,{anchor:e.doc.length})),!0),FW=({state:e,dispatch:t})=>(t(Fp(e,{anchor:e.selection.main.anchor,head:0})),!0),F$=({state:e,dispatch:t})=>(t(Fp(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function FG(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let a=t(r);a<i?(n="delete.backward",a=FU(e,a,!1)):a>i&&(n="delete.forward",a=FU(e,a,!0)),i=Math.min(i,a),o=Math.max(o,a)}else i=FU(e,i,!1),o=FU(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:Ib.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?EM.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function FU(e,t,n){if(e instanceof EM)for(let r of e.state.facet(EM.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}let Fq=(e,t,n)=>FG(e,r=>{let i=r.from,{state:o}=e,a=o.doc.lineAt(i),s,l;if(n&&!t&&i>a.from&&i<a.from+200&&!/[^ \t]/.test(s=a.text.slice(0,i-a.from))){if(" "==s[s.length-1])return i-1;let e=Oh(s,o.tabSize)%N9(o)||N9(o);for(let t=0;t<e&&" "==s[s.length-1-t];t++)i--;l=i}else(l=Io(a.text,i-a.from,t,t)+a.from)==i&&a.number!=(t?o.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(a.text.slice(l-a.from,i-a.from))&&(l=Io(a.text,l-a.from,!1,!1)+a.from);return l}),FY=e=>Fq(e,!1,!0),FX=e=>Fq(e,!0,!1),FK=(e,t)=>FG(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=Io(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,s)-o.from,Math.max(r,s)-o.from),u=a(l);if(null!=e&&u!=e)break;(" "!=l||r!=n.head)&&(e=u),r=s}return r}),FQ=e=>FK(e,!1);function FJ(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function F0(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of FJ(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(r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))i.push(Ib.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)));else for(let n of(r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))i.push(Ib.range(n.anchor-a,n.head-a))}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:Ib.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function F1(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of FJ(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let F2=F3(!1),F5=F3(!0);function F3(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),a=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=NY(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),o;return r&&i&&r.to<=t&&i.from>=t&&(o=r.type.prop(L1.closedBy))&&o.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let s=new Bt(t,{simulateBreak:r,simulateDoubleBreak:!!a}),l=Be(s,r);for(null==l&&(l=Oh(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;a?{from:r,to:i}=a:r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let u=["",N7(t,l)];return a&&u.push(N7(t,s.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:A8.of(u)},range:Ib.cursor(r+1+u[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function F4(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let a=e.doc.lineAt(o);a.number>n&&(r.empty||r.to>a.from)&&(t(a,i,r),n=a.number),o=a.to+1}let o=e.changes(i);return{changes:i,range:Ib.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}let F8=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(F4(e,(t,n)=>{n.push({from:t.from,insert:e.facet(N6)})}),{userEvent:"input.indent"})),!0),F6=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(F4(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Oh(r,e.tabSize),o=0,a=N7(e,Math.max(0,i-N9(e)));for(;o<r.length&&o<a.length&&r.charCodeAt(o)==a.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+r.length,insert:a.slice(o)})}),{userEvent:"delete.dedent"})),!0),F9=[{key:"Ctrl-b",run:Fx,shift:FR,preventDefault:!0},{key:"Ctrl-f",run:Fb,shift:FE},{key:"Ctrl-p",run:FC,shift:FB},{key:"Ctrl-n",run:FM,shift:FF},{key:"Ctrl-a",run:e=>Fg(e,t=>Ib.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>FO(e,t=>Ib.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>Fg(e,t=>Ib.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>FO(e,t=>Ib.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:FX},{key:"Ctrl-h",run:FY},{key:"Ctrl-k",run:e=>FG(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:FQ},{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:A8.of(["",""])},range:Ib.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,r=e.doc.lineAt(n),i=n==r.from?n-1:Io(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:Io(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:Ib.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:FA}],F7=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Fg(e,t=>FS(e.state,t,!Fy(e))),shift:e=>FO(e,t=>FS(e.state,t,!Fy(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Fg(e,t=>FS(e.state,t,Fy(e))),shift:e=>FO(e,t=>FS(e.state,t,Fy(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>F0(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>F1(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>F0(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>F1(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=Ib.create([n.main]):n.main.empty||(r=Ib.create([Ib.cursor(n.main.head)])),!!r&&(t(Fp(e,r)),!0)}},{key:"Mod-Enter",run:F5},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=FJ(e).map(({from:t,to:n})=>Ib.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:Ib.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=Ff(e.selection,t=>{let n=NY(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;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 Ib.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(Fp(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:F6},{key:"Mod-]",run:F8},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Bt(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=F4(e,(t,i,o)=>{let a=Be(r,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=N7(e,a);(s!=l||o.from<t.from+s.length)&&(n[t.from]=a,i.push({from:t.from,to:t.from+s.length,insert:l}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(FJ(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=Ff(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let n,r;return n=!1,r=Ff(e.selection,t=>{let r=B$(e,t.head,-1)||B$(e,t.head,1)||t.head>0&&B$(e,t.head-1,1)||t.head<e.doc.length&&B$(e,t.head+1,-1);if(!r||!r.end)return t;n=!0;let i=r.start.from==t.head?r.end.to:r.end.from;return Ib.cursor(i)}),!!n&&(t(Fp(e,r)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=B2(e.state,n.from);return r.line?BJ(e):!!r.block&&B1(e)}},{key:"Alt-A",run:B0},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:Fx,shift:FR,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>Fw(e,!Fy(e)),shift:e=>FL(e,!Fy(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Fg(e,t=>FI(e,t,!Fy(e))),shift:e=>FO(e,t=>FI(e,t,!Fy(e))),preventDefault:!0},{key:"ArrowRight",run:Fb,shift:FE,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>Fw(e,Fy(e)),shift:e=>FL(e,Fy(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Fg(e,t=>FI(e,t,Fy(e))),shift:e=>FO(e,t=>FI(e,t,Fy(e))),preventDefault:!0},{key:"ArrowUp",run:FC,shift:FB,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Fj,shift:FW},{mac:"Ctrl-ArrowUp",run:FD,shift:FV},{key:"ArrowDown",run:FM,shift:FF,preventDefault:!0},{mac:"Cmd-ArrowDown",run:FH,shift:F$},{mac:"Ctrl-ArrowDown",run:FA,shift:FZ},{key:"PageUp",run:FD,shift:FV},{key:"PageDown",run:FA,shift:FZ},{key:"Home",run:e=>Fg(e,t=>FI(e,t,!1)),shift:e=>FO(e,t=>FI(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:Fj,shift:FW},{key:"End",run:e=>Fg(e,t=>FI(e,t,!0)),shift:e=>FO(e,t=>FI(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:FH,shift:F$},{key:"Enter",run:F2,shift:F2},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:FY,shift:FY},{key:"Delete",run:FX},{key:"Mod-Backspace",mac:"Alt-Backspace",run:FQ},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>FK(e,!0)},{mac:"Mod-Backspace",run:e=>FG(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=>FG(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})}].concat(F9.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),ze={key:"Tab",run:F8,shift:F6};function zt(){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 r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}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 r=0;r<n.length;r++)e(t,n[r]);else throw RangeError("Unsupported child node: "+n)}(e,arguments[t]);return e}let zn="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class zr{constructor(e,t,n=0,r=e.length,i,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,r),this.bufferStart=n,this.normalize=i?e=>i(zn(e)):zn,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 Ia(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=Is(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=Il(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let o=r.charCodeAt(e),a=this.match(o,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(a)return this.value=a,this;break}i==n&&e<t.length&&t.charCodeAt(e)==o&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],o=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={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?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(zr.prototype[Symbol.iterator]=function(){return this});let zi={from:-1,to:-1,match:/.*/.exec("")},zo="gm"+(null==/x/.unicode?"":"u");class za{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=zi,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new zu(e,t,n,r,i);this.re=new RegExp(t,zo+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=zc(e,r),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,r=n+t[0].length;if(this.matchPos=zc(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,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 zs=new WeakMap;class zl{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=zs.get(e);if(!r||r.from>=n||r.to<=t){let r=new zl(t,e.sliceString(t,n));return zs.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to<n&&(i+=e.sliceString(r.to,n)),zs.set(e,new zl(o,i)),new zl(t,i.slice(t-o,n-o))}}class zu{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=zi,this.matchPos=zc(e,r),this.re=new RegExp(t,zo+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=zl.get(e,r,this.chunkEnd(r+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=zc(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=zl.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function zc(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function zh(e){let t=zt("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:r}=e,i=r.doc.lineAt(r.selection.main.head),[,o,a,s,l]=n,u=s?+s.slice(1):0,c=a?+a:i.number;if(a&&l){let e=c/100;o&&(e=e*("-"==o?-1:1)+i.number/r.doc.lines),c=Math.round(r.doc.lines*e)}else a&&o&&(c=c*("-"==o?-1:1)+i.number);let h=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),d=Ib.cursor(h.from+Math.max(0,Math.min(u,h.length)));e.dispatch({effects:[zd.of(!1),EM.scrollIntoView(d.from,{y:"center"})],selection:d}),e.focus()}return{dom:zt("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:zd.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},zt("label",e.state.phrase("Go to line"),": ",t)," ",zt("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),zt("button",{name:"close",onclick:()=>{e.dispatch({effects:zd.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["\xd7"]))}}"undefined"!=typeof Symbol&&(za.prototype[Symbol.iterator]=zu.prototype[Symbol.iterator]=function(){return this});let zd=IY.define(),zf=IA.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(zd)&&(e=n.value);return e},provide:e=>LA.from(e,e=>e?zh:null)}),zp=EM.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"}}}),zg={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zm=I_.define({combine:e=>I3(e,zg,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),zv=Pd.mark({class:"cm-selectionMatch"}),zy=Pd.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function zx(e,t,n,r){return(0==n||e(t.sliceDoc(n-1,n))!=I1.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=I1.Word)}let zb=P5.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(zm),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Pd.none;let i=r.main,o,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return Pd.none;let e=n.wordAt(i.head);if(!e)return Pd.none;a=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return Pd.none;if(t.wholeWords){var s,l,u;if(o=n.sliceDoc(i.from,i.to),!(zx(a=n.charCategorizer(i.head),n,i.from,i.to)&&(s=a,l=i.from,u=i.to,s(n.sliceDoc(l,l+1))==I1.Word&&s(n.sliceDoc(u-1,u))==I1.Word)))return Pd.none}else if(!(o=n.sliceDoc(i.from,i.to)))return Pd.none}let c=[];for(let r of e.visibleRanges){let e=new zr(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!a||zx(a,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?c.push(zy.range(r,o)):(r>=i.to||o<=i.from)&&c.push(zv.range(r,o)),c.length>t.maxMatches))return Pd.none}}return Pd.set(c)}},{decorations:e=>e.decorations}),zw=EM.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),zS=({state:e,dispatch:t})=>{let{selection:n}=e,r=Ib.create(n.ranges.map(t=>e.wordAt(t.head)||Ib.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)},z_=I_.define({combine:e=>I3(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new zQ(e),scrollToMatch:e=>EM.scrollIntoView(e)})});class zC{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,zo),!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 zO(this):new zT(this)}getCursor(e,t=0,n){let r=e.doc?e:I5.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?zD(this,r,t,n):zk(this,r,t,n)}}class zM{constructor(e){this.spec=e}}function zk(e,t,n,r){var i,o;return new zr(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(i=t.doc,o=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length<t)&&(r=Math.max(0,e-2),n=i.sliceString(r,Math.min(i.length,t+2))),(o(zA(n,e-r))!=I1.Word||o(zI(n,e-r))!=I1.Word)&&(o(zI(n,t-r))!=I1.Word||o(zA(n,t-r))!=I1.Word))):void 0)}class zT extends zM{constructor(e){super(e)}nextMatch(e,t,n){let r=zk(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=zk(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=zk(this.spec,e,n,r),o=null;for(;!i.nextOverlapping().done;)o=i.value;if(o)return o;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=zk(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=zk(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function zD(e,t,n,r){var i;return new za(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(zA(n.input,n.index))!=I1.Word||i(zI(n.input,n.index))!=I1.Word)&&(i(zI(n.input,n.index+n[0].length))!=I1.Word||i(zA(n.input,n.index+n[0].length))!=I1.Word)):void 0},n,r)}function zA(e,t){return e.slice(Io(e,t,!1),t)}function zI(e,t){return e.slice(t,Io(e,t))}class zO extends zM{nextMatch(e,t,n){let r=zD(this.spec,e,n,e.doc.length).next();return r.done&&(r=zD(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=zD(this.spec,e,i,n),a=null;for(;!o.next().done;)a=o.value;if(a&&(i==t||a.from>i+10))return a;if(i==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 r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=zD(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=zD(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}let zP=IY.define(),zR=IY.define(),zE=IA.define({create:e=>new zL(zG(e).create(),null),update(e,t){for(let n of t.effects)n.is(zP)?e=new zL(n.value.create(),e.panel):n.is(zR)&&(e=new zL(e.query,n.value?z$:null));return e},provide:e=>LA.from(e,e=>e.panel)});class zL{constructor(e,t){this.query=e,this.panel=t}}let zN=Pd.mark({class:"cm-searchMatch"}),zB=Pd.mark({class:"cm-searchMatch cm-searchMatch-selected"}),zF=P5.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(zE))}update(e){let t=e.state.field(zE);(t!=e.startState.field(zE)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Pd.none;let{view:n}=this,r=new Oe;for(let t=0,i=n.visibleRanges,o=i.length;t<o;t++){let{from:a,to:s}=i[t];for(;t<o-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,a,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?zB:zN)})}return r.finish()}},{decorations:e=>e.decorations});function zz(e){return t=>{let n=t.state.field(zE,!1);return n&&n.query.spec.valid?e(t,n):zY(t)}}let zV=zz((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=Ib.single(r.from,r.to),o=e.state.facet(z_);return e.dispatch({selection:i,effects:[z1(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),zq(e),!0}),zZ=zz((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=Ib.single(i.from,i.to),a=e.state.facet(z_);return e.dispatch({selection:o,effects:[z1(e,i),a.scrollToMatch(o.main,e)],userEvent:"select.search"}),zq(e),!0}),zj=zz((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!!n&&!!n.length&&(e.dispatch({selection:Ib.create(n.map(e=>Ib.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),zH=zz((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let a=o,s=[],l,u,c=[];if(a.from==r&&a.to==i&&(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(EM.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),a){let t=0==s.length||s[0].from>=o.to?0:o.to-o.from-u.length;l=Ib.single(a.from-t,a.to-t),c.push(z1(e,a)),c.push(n.facet(z_).scrollToMatch(l.main,e))}return e.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),zW=zz((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:EM.announce.of(r),userEvent:"input.replace.all"}),!0});function z$(e){return e.state.facet(z_).createPanel(e)}function zG(e,t){var n,r,i,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(z_);return new zC({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:u.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i: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 zU(e){let t=LM(e,z$);return t&&t.dom.querySelector("[main-field]")}function zq(e){let t=zU(e);t&&t==e.root.activeElement&&t.select()}let zY=e=>{let t=e.state.field(zE,!1);if(t&&t.panel){let n=zU(e);if(n&&n!=e.root.activeElement){let r=zG(e.state,t.query.spec);r.valid&&e.dispatch({effects:zP.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[zR.of(!0),t?zP.of(zG(e.state,t.query.spec)):IY.appendConfig.of(z5)]});return!0},zX=e=>{let t=e.state.field(zE,!1);if(!t||!t.panel)return!1;let n=LM(e,z$);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:zR.of(!1)}),!0},zK=[{key:"Mod-f",run:zY,scope:"editor search-panel"},{key:"F3",run:zV,shift:zZ,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:zV,shift:zZ,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:zX,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:r,to:i}=n.main,o=[],a=0;for(let t=new zr(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(a=o.length),o.push(Ib.range(t.value.from,t.value.to))}return t(e.update({selection:Ib.create(o,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=LM(e,zh);if(!t){let n=[zd.of(!0)];null==e.state.field(zf,!1)&&n.push(IY.appendConfig.of([zf,zp])),e.dispatch({effects:n}),t=LM(e,zh)}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 zS({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new zr(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new zr(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(Ib.range(i.from,i.to),!1),effects:EM.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class zQ{constructor(e){this.view=e;let t=this.query=e.state.field(zE).query.spec;function n(e,t,n){return zt("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=zt("input",{value:t.search,placeholder:zJ(e,"Find"),"aria-label":zJ(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=zt("input",{value:t.replace,placeholder:zJ(e,"Replace"),"aria-label":zJ(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=zt("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=zt("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=zt("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=zt("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>zV(e),[zJ(e,"next")]),n("prev",()=>zZ(e),[zJ(e,"previous")]),n("select",()=>zj(e),[zJ(e,"all")]),zt("label",null,[this.caseField,zJ(e,"match case")]),zt("label",null,[this.reField,zJ(e,"regexp")]),zt("label",null,[this.wordField,zJ(e,"by word")]),...e.state.readOnly?[]:[zt("br"),this.replaceField,n("replace",()=>zH(e),[zJ(e,"replace")]),n("replaceAll",()=>zW(e),[zJ(e,"replace all")])],zt("button",{name:"close",onclick:()=>zX(e),"aria-label":zJ(e,"close"),type:"button"},["\xd7"])])}commit(){let e=new zC({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:zP.of(e)}))}keydown(e){var t,n;(t=this.view,n="search-panel",EF(EL(t.state),e,t,n))?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?zZ:zV)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),zH(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(zP)&&!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(z_).top}}function zJ(e,t){return e.state.phrase(t)}let z0=/[\s\.,:;?!]/;function z1(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-30),a=Math.min(i,n+30),s=e.state.sliceDoc(o,a);if(o!=r.from){for(let e=0;e<30;e++)if(!z0.test(s[e+1])&&z0.test(s[e])){s=s.slice(e);break}}if(a!=i){for(let e=s.length-1;e>s.length-30;e--)if(!z0.test(s[e-1])&&z0.test(s[e])){s=s.slice(0,e);break}}return EM.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`)}let z2=EM.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"}}),z5=[zE,IP.low(zF),z2];class z3{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=NY(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),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(z9(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}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 z4(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 z8{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function z6(e){return e.selection.main.from}function z9(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}let z7=IG.define(),Ve=new WeakMap;function Vt(e){if(!Array.isArray(e))return e;let t=Ve.get(e);return t||Ve.set(e,t=function(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=z4(t)+z4(n)+"*$";return[RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}(e)),t}let Vn=IY.define(),Vr=IY.define();class Vi{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=Ia(e,t),r=Il(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push(Ia(o==i?i.toLowerCase():o,0)),t+=r}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:r,precise:i,byWord:o}=this;if(1==t.length){let r=Ia(e,0),i=Il(r),o=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;o+=-200}return this.ret(o,[0,i])}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 i=0,o=Math.min(e.length,200);i<o&&l<s;){let o=Ia(e,i);(o==t[l]||o==n[l])&&(r[l++]=i),i+=Il(o)}if(l<s)return null}let u=0,c=0,h=!1,d=0,f=-1,p=-1,g=/[a-z]/.test(e),m=!0;for(let r=0,l=Math.min(e.length,200),v=0;r<l&&c<s;){let l=Ia(e,r);a<0&&(u<s&&l==t[u]&&(i[u++]=r),d<s&&(l==t[d]||l==n[d]?(0==d&&(f=r),p=r+1,d++):d=0));let y,x=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(y=Is(l))!=y.toLowerCase()?1:2*(y!=y.toUpperCase());(!r||1==x&&g||0==v&&0!=x)&&(t[c]==l||n[c]==l&&(h=!0)?o[c++]=r:o.length&&(m=!1)),v=x,r+=Il(l)}return c==s&&0==o[0]&&m?this.result(-100+(h?-200:0),o,e):d==s&&0==f?this.ret(-200-e.length+(p==e.length?0:-100),[0,p]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):d==s?this.ret(-900-e.length,[f,p]):c==s?this.result(-100+(h?-200:0)+-700+(m?0:-1100),o,e):2==t.length?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?Il(Ia(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class Vo{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 Va=I_.define({combine:e=>I3(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:Vl,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=>Vs(e(n),t(n)),optionClass:(e,t)=>n=>Vs(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function Vs(e,t){return e?t?e+" "+t:e:t}function Vl(e,t,n,r,i,o){let a=e.textDirection==PC.RTL,s=a,l=!1,u="top",c,h,d=t.left-i.left,f=i.right-t.right,p=r.right-r.left,g=r.bottom-r.top;if(s&&d<Math.min(p,f)?s=!1:!s&&f<Math.min(p,d)&&(s=!0),p<=(s?d:f))c=Math.max(i.top,Math.min(n.top,i.bottom-g))-t.top,h=Math.min(400,s?d:f);else{l=!0,h=Math.min(400,(a?t.right:i.right-t.left)-30);let e=i.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 Vu(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 r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class Vc{constructor(e,t,n){let r;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 i=e.state.field(t),{options:o,selected:a}=i.open,s=e.state.facet(Va);this.optionContent=(r=s.addToOptions.slice(),s.icons&&r.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}),r.push({render(e,t,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let o=e.displayLabel||e.label,a=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>a&&i.appendChild(document.createTextNode(o.slice(a,t)));let s=i.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(o.slice(t,n))),s.className="cm-completionMatchedText",a=n}return a<o.length&&i.appendChild(document.createTextNode(o.slice(a))),i},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}),r.sort((e,t)=>e.position-t.position).map(e=>e.render)),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=Vu(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:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(Va).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:Vr.of(null)})}),this.showOptions(o,i.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),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:o,disabled:a}=n.open;r.open&&r.open.options==i||(this.range=Vu(i.length,o,e.state.facet(Va).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),a!=(null===(t=r.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=Vu(t.options.length,t.selected,this.view.state.facet(Va).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(n);if(!i)return;"then"in i?i.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>PJ(this.view.state,e,"completion info")):this.addInfoPane(i,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:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,n;let r,i,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,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=r.height/t.offsetHeight,i.top<r.top?t.scrollTop-=(r.top-i.top)/o:i.bottom>r.bottom&&(t.scrollTop+=(i.bottom-r.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(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(Va).positionInfo(this.view,t,r,n,i,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 r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",e=>{e.target==r&&e.preventDefault()});let i=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!=i&&(o>n.from||0==n.from)&&(i=e,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=e)}let u=r.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&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Vh(e){return 100*(e.boost||0)+10*!!e.apply+5*!!e.info+ +!!e.type}class Vd{constructor(e,t,n,r,i,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new Vd(this.options,Vm(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i,o){if(r&&!o&&e.some(e=>e.isPending))return r.setDisabled();let a=function(e,t){let n=[],r=null,i=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}},o=t.facet(Va);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)i(new z8(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),a,s=o.filterStrict?new Vo(n):new Vi(n);for(let t of r.result.options)if(a=s.match(t.label)){let n=t.displayLabel?e?e(t,a.matched):[]:a.matched;i(new z8(t,r.source,n,a.score+(t.boost||0)))}}}if(r){let e=Object.create(null),t=0;for(let n of r.sort((e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r: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?Vh(e.completion)>Vh(s)&&(a[a.length-1]=e):a.push(e),s=e.completion}return a}(e,t);if(!a.length)return r&&e.some(e=>e.isPending)?r.setDisabled():null;let s=t.facet(Va).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<a.length;t++)if(a[t].completion==e){s=t;break}}return new Vd(a,Vm(n,s),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:VM,above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new Vd(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 Vd(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Vf{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Vf(Vv,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Va),r=(n.override||t.languageDataAt("autocomplete",z6(t)).map(Vt)).map(t=>(this.active.find(e=>e.source==t)||new Vx(t,+!!this.active.some(e=>0!=e.state))).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open,o=e.effects.some(e=>e.is(Vw));for(let a of(i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)||o?i=Vd.build(r,t,this.id,i,n,o):i&&i.disabled&&!r.some(e=>e.isPending)&&(i=null),!i&&r.every(e=>!e.isPending)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new Vx(e.source,0):e)),e.effects))a.is(VS)&&(i=i&&i.setSelected(a.value,this.id));return r==this.active&&i==this.open?this:new Vf(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Vp:Vg}}let Vp={"aria-autocomplete":"list"},Vg={};function Vm(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}let Vv=[];function Vy(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(z7);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 Vx{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=Vy(e,t),r=this;for(let t of((8&n||16&n&&this.touches(e))&&(r=new Vx(r.source,0)),4&n&&0==r.state&&(r=new Vx(this.source,1)),r=r.updateFor(e,n),e.effects))if(t.is(Vn))r=new Vx(r.source,1,t.value);else if(t.is(Vr))r=new Vx(r.source,0);else if(t.is(Vw))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(z6(e.state))}}class Vb extends Vx{constructor(e,t,n,r,i,o){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),a=z6(e.state);if(a>o||!r||2&t&&(z6(e.startState)==this.from||a<this.limit))return new Vx(this.source,4&t?1:0);let s=e.changes.mapPos(this.limit);return!function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):z9(e,!0).test(i)}(r.validFor,e.state,i,o)?r.update&&(r=r.update(r,i,o,new z3(e.state,a,!1)))?new Vb(this.source,this.explicit,s,r,r.from,null!==(n=r.to)&&void 0!==n?n:z6(e.state)):new Vx(this.source,1,this.explicit):new Vb(this.source,this.explicit,s,r,i,o)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Vb(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Vx(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let Vw=IY.define({map:(e,t)=>e.map(e=>e.map(t))}),VS=IY.define(),V_=IA.define({create:()=>Vf.start(),update:(e,t)=>e.update(t),provide:e=>[Lv.from(e,e=>e.tooltip),EM.contentAttributes.from(e,e=>e.attrs)]});function VC(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(V_).active.find(e=>e.source==t.source);return r instanceof Vb&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+o,s.from+a)!=e.sliceDoc(n,r))return{range:s};let l=e.toText(t);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:Ib.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:z7.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}let VM=e=>new Vc(e,V_,VC);function Vk(e,t="option"){return n=>{let r=n.state.field(V_,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Va).interactionDelay)return!1;let i=1,o;"page"==t&&(o=LS(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(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:VS.of(s)}),!0}}let VT=e=>!!e.state.field(V_,!1)&&(e.dispatch({effects:Vn.of(!0)}),!0);class VD{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}let VA=P5.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(V_).active))t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(V_),n=e.state.facet(Va);if(!e.selectionSet&&!e.docChanged&&e.startState.field(V_)==t)return;let r=e.transactions.some(e=>{let t=Vy(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(r||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){PJ(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(Vn)))&&(this.pendingStart=!0);let i=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(),i):-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(V_);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(Va).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=z6(t),r=new z3(t,n,e.explicit,this.view),i=new VD(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:Vr.of(null)}),PJ(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(Va).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(Va),r=this.view.state.field(V_);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(void 0===o.done)continue;if(this.running.splice(i--,1),o.done){let r=z6(o.updates.length?o.updates[0].startState:this.view.state),i=Math.min(r,o.done.from+ +!o.active.explicit),a=new Vb(o.active.source,o.active.explicit,i,o.done,o.done.from,null!==(e=o.done.to)&&void 0!==e?e:r);for(let e of o.updates)a=a.update(e,n);if(a.hasResult()){t.push(a);continue}}let a=r.active.find(e=>e.source==o.active.source);if(a&&a.isPending){if(null==o.done){let e=new Vx(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||r.open&&r.open.disabled)&&this.view.dispatch({effects:Vw.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(V_,!1);if(t&&t.tooltip&&this.view.state.facet(Va).closeOnBlur){let n=t.open&&LS(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:Vr.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:Vn.of(!1)}),20),this.composing=0}}}),VI="object"==typeof navigator&&/Win/.test(navigator.platform),VO=IP.highest(EM.domEventHandlers({keydown(e,t){let n=t.state.field(V_,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(VI&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&VC(t,r),!1}})),VP=EM.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"}}}),VR={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},VE=IY.define({map(e,t){let n=t.mapPos(e,-1,Ic.TrackAfter);return null==n?void 0:n}}),VL=new class extends I4{};VL.startSide=1,VL.endSide=-1;let VN=IA.define({create:()=>I7.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(VE)&&(e=e.update({add:[VL.range(n.value,n.value+1)]}));return e}}),VB="()[]{}<>\xab\xbb\xbb\xab[]{}";function VF(e){for(let t=0;t<VB.length;t+=2)if(VB.charCodeAt(t)==e)return VB.charAt(t+1);return Is(e<128?e:e+1)}function Vz(e,t){return e.languageDataAt("closeBrackets",t)[0]||VR}let VV="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),VZ=EM.inputHandler.of((e,t,n,r)=>{if((VV?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==Il(Ia(r,0))||t!=i.from||n!=i.to)return!1;let o=function(e,t){let n=Vz(e,e.selection.main.head),r=n.brackets||VR.brackets;for(let i of r){let o=VF(Ia(i,0));if(t==i)return o==i?function(e,t,n,r){let i=r.stringPrefixes||VR.stringPrefixes,o=null,a=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:VE.of(r.to+t.length),range:Ib.range(r.anchor+t.length,r.head+t.length)};let a=r.head,s=VW(e.doc,a),l;if(s==t){if(V$(e,a))return{changes:{insert:t+t,from:a},effects:VE.of(a+t.length),range:Ib.cursor(a+t.length)};if(VH(e,a)){let r=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+r.length,insert:r},range:Ib.cursor(a+r.length)}}}else if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(l=VG(e,a-2*t.length,i))>-1&&V$(e,l))return{changes:{insert:t+t+t+t,from:a},effects:VE.of(a+t.length),range:Ib.cursor(a+t.length)};else if(e.charCategorizer(a)(s)!=I1.Word&&VG(e,a,i)>-1&&!function(e,t,n,r){let i=NY(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let a=0;a<5;a++){let a=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.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=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,a,t,i))return{changes:{insert:t+t,from:a},effects:VE.of(a+t.length),range:Ib.cursor(a+t.length)};return{range:o=r}});return o?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(e,i,r.indexOf(i+i+i)>-1,n):function(e,t,n,r){let i=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:VE.of(o.to+t.length),range:Ib.range(o.anchor+t.length,o.head+t.length)};let a=VW(e.doc,o.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:o.head},effects:VE.of(o.head+t.length),range:Ib.cursor(o.head+t.length)}:{range:i=o}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(e,i,o,n.before||VR.before);if(t==o&&VH(e,e.selection.main.from))return function(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&VW(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:Ib.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}(e,0,o)}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}),Vj=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Vz(e,e.selection.main.head).brackets||VR.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){var i,o;let r;let a=(i=e.doc,o=t.head,Il(Ia(r=i.sliceString(o-2,o),0))==r.length?r:r.slice(1));for(let r of n)if(r==a&&VW(e.doc,t.head)==VF(Ia(r,0)))return{changes:{from:t.head-r.length,to:t.head+r.length},range:Ib.cursor(t.head-r.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function VH(e,t){let n=!1;return e.field(VN).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function VW(e,t){let n=e.sliceString(t,t+2);return n.slice(0,Il(Ia(n,0)))}function V$(e,t){let n=NY(e).resolveInner(t+1);return n.parent&&n.from==t}function VG(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=I1.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=I1.Word)return n}return -1}let VU=[{key:"Ctrl-Space",run:VT},{mac:"Alt-`",run:VT},{key:"Escape",run:e=>{let t=e.state.field(V_,!1);return!!(t&&t.active.some(e=>0!=e.state))&&(e.dispatch({effects:Vr.of(null)}),!0)}},{key:"ArrowDown",run:Vk(!0)},{key:"ArrowUp",run:Vk(!1)},{key:"PageDown",run:Vk(!0,"page")},{key:"PageUp",run:Vk(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(V_,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(Va).interactionDelay)&&VC(e,t.open.options[t.open.selected])}}],Vq=IP.highest(ER.computeN([Va],e=>e.facet(Va).defaultKeymap?[VU]:[]));class VY{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class VX{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(V7).markerFilter;i&&(r=i(r,n));let o=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),a=new Oe,s=[],l=0;for(let e=0;;){let t,r,i=e==o.length?null:o[e];if(!i&&!s.length)break;for(s.length?(t=l,r=s.reduce((e,t)=>Math.min(e,t.to),i&&i.from>t?i.from:1e8)):(t=i.from,r=i.to,s.push(i),e++);e<o.length;){let n=o[e];if(n.from==t&&(n.to>n.from||n.to==t))s.push(n),e++,r=Math.min(n.to,r);else{r=Math.min(n.from,r);break}}let u=Zl(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,Pd.widget({widget:new Zn(u),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");a.add(t,r,Pd.mark({class:"cm-lintRange cm-lintRange-"+u+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}l=r;for(let e=0;e<s.length;e++)s[e].to<=l&&s.splice(e--,1)}let u=a.finish();return new VX(u,t,VK(u))}}function VK(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&0>i.diagnostics.indexOf(t))){if(r){if(0>i.diagnostics.indexOf(r.diagnostic))return!1;r=new VY(r.from,n,r.diagnostic)}else r=new VY(e,n,t||i.diagnostics[0])}}),r}function VQ(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(V7).hideOn(e,n,r);if(null!=i)return i;let o=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(V0))||e.changes.touchesRange(o.from,Math.max(o.to,r)))}function VJ(e,t){return e.field(V5,!1)?t:t.concat(IY.appendConfig.of(Zg))}let V0=IY.define(),V1=IY.define(),V2=IY.define(),V5=IA.define({create:()=>new VX(Pd.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=VK(n,e.selected.diagnostic,i)||VK(n,null,i)}!n.size&&i&&t.state.facet(V7).autoPanel&&(i=null),e=new VX(n,i,r)}for(let n of t.effects)if(n.is(V0)){let r=t.state.facet(V7).autoPanel?n.value.length?Zi.open:null:e.panel;e=VX.init(n.value,r,t.state)}else n.is(V1)?e=new VX(e.diagnostics,n.value?Zi.open:null,e.selected):n.is(V2)&&(e=new VX(e.diagnostics,e.panel,n.value));return e},provide:e=>[LA.from(e,e=>e.panel),EM.decorations.from(e,e=>e.diagnostics)]}),V3=Pd.mark({class:"cm-lintRange cm-lintRange-active"});function V4(e,t){return zt("ul",{class:"cm-tooltip-lint"},t.map(t=>Zt(e,t,!1)))}let V8=e=>{let t=e.state.field(V5,!1);return!!t&&!!t.panel&&(e.dispatch({effects:V1.of(!1)}),!0)},V6=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(V5,!1);t&&t.panel||e.dispatch({effects:VJ(e.state,[V1.of(!0)])});let n=LM(e,Zi.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(V5,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return(!!r.value||!!(r=t.diagnostics.iter(0)).value&&(r.from!=n.from||r.to!=n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],V9=P5.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(V7);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(V7);t.length&&function(e,t,n){let r=[],i=-1;for(let o of e)o.then(n=>{r.push(n),clearTimeout(i),r.length==e.length?t(r):i=setTimeout(()=>t(r),200)},n)}(t.map(e=>Promise.resolve(e(this.view))),t=>{if(this.view.state.doc==e.doc){var n,r;this.view.dispatch((n=this.view.state,r=t.reduce((e,t)=>e.concat(t)),{effects:VJ(n,[V0.of(r)])}))}},e=>{PJ(this.view.state,e)})}}update(e){let t=e.state.facet(V7);(e.docChanged||t!=e.startState.facet(V7)||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)}}),V7=I_.define({combine:e=>Object.assign({sources:e.map(e=>e.source).filter(e=>null!=e)},I3(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 Ze(e){let t=[];if(e)a:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue a}}t.push("")}return t}function Zt(e,t,n){var r;let i=n?Ze(t.actions):[];return zt("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},zt("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let o=!1,a=r=>{if(r.preventDefault(),o)return;o=!0;let i=VK(e.state.field(V5).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,l=i[r]?s.indexOf(i[r]):-1,u=l<0?s:[s.slice(0,l),zt("u",s.slice(l,l+1)),s.slice(l+1)];return zt("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${i[r]})"`}.`},u)}),t.source&&zt("div",{class:"cm-diagnosticSource"},t.source))}class Zn extends Pc{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return zt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Zr{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(0xffffffff*Math.random()).toString(16),this.dom=Zt(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Zi{constructor(e){this.view=e,this.items=[],this.list=zt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)V8(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],r=Ze(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=VK(this.view.state.field(V5).diagnostics,n);t&&n.actions[i].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=zt("div",{class:"cm-panel-lint"},this.list,zt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>V8(this.view)},"\xd7")),this.update()}get selectedIndex(){let e=this.view.state.field(V5).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(V5),n=0,r=!1,i=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 Zr(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[a],a>n&&(this.items.splice(n,a-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute("aria-selected")||(s.dom.setAttribute("aria-selected","true"),i=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);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new Zr(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.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"),r&&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=VK(this.view.state.field(V5).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:V2.of(t)})}static open(e){return new Zi(e)}}function Zo(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 Za(e){return Zo(`<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 Zs=EM.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:Za("#d11")},".cm-lintRange-warning":{backgroundImage:Za("orange")},".cm-lintRange-info":{backgroundImage:Za("#999")},".cm-lintRange-hint":{backgroundImage:Za("#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 Zl(e){let t="hint",n=1;for(let i of e){var r;let e="error"==(r=i.severity)?4:"warning"==r?3:"info"==r?2:1;e>n&&(n=e,t=i.severity)}return t}class Zu extends LI{constructor(e){super(),this.diagnostics=e,this.severity=Zl(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet(Zm).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>(function(e,t,n){function r(){let r,i=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(i.from)&&e.dispatch({effects:Zd.of({pos:i.from,above:!1,clip:!1,create:()=>({dom:V4(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,r=n=>{let i=t.getBoundingClientRect();if(!(n.clientX>i.left-10)||!(n.clientX<i.right+10)||!(n.clientY>i.top-10)||!(n.clientY<i.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",r),e.state.field(Zf)&&e.dispatch({effects:Zd.of(null)})}},window.addEventListener("mousemove",r)}let{hoverTime:i}=e.state.facet(Zm),o=setTimeout(r,i);t.onmouseout=()=>{clearTimeout(o),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(o),o=setTimeout(r,i)}})(e,t,n)),t}}let Zc=LL({class:"cm-gutter-lint",markers:e=>e.state.field(Zh),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(Zh).between(n.from,n.to,(e,t,i)=>{e>n.from&&e<n.to&&r.push(...i.diagnostics)}),r.length?new Zu(r):null}}),Zh=IA.define({create:()=>I7.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet(Zm).markerFilter;for(let r of t.effects)if(r.is(V0)){let i=r.value;n&&(i=n(i||[],t.state)),e=function(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new Zu(n[e]).range(+e));return I7.of(r,!0)}(t.state.doc,i.slice(0))}return e}}),Zd=IY.define(),Zf=IA.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=VQ(t,e)?null:Object.assign(Object.assign({},e),{pos:t.changes.mapPos(e.pos)})),t.effects.reduce((e,t)=>t.is(Zd)?t.value:e,e)),provide:e=>Lv.from(e)}),Zp=EM.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:Zo('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:Zo('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:Zo('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),Zg=[V5,EM.decorations.compute([V5],e=>{let{selected:t,panel:n}=e.field(V5);return t&&n&&t.from!=t.to?Pd.set([V3.range(t.from,t.to)]):Pd.none}),function(e,t={}){let n=IY.define(),r=IA.define({create:()=>[],update(e,r){if(e.length&&(t.hideOnChange&&(r.docChanged||r.selection)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(r,e))),r.docChanged)){let t=[];for(let n of e){let e=r.changes.mapPos(n.pos,-1,Ic.TrackDel);if(null!=e){let i=Object.assign(Object.create(null),n);i.pos=e,null!=i.end&&(i.end=r.changes.mapPos(i.end)),t.push(i)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(L_)&&(e=[]);return e},provide:e=>Ly.from(e)});return{active:r,extension:[r,P5.define(i=>new Lw(i,e,r,n,t.hoverTime||300)),Lb]}}(function(e,t,n){let{diagnostics:r}=e.state.field(V5),i,o=-1,a=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,o=e,a=r,!1});let s=e.state.facet(V7).tooltipFilter;return(i&&s&&(i=s(i,e.state)),i)?{pos:o,end:a,above:e.state.doc.lineAt(o).to<a,create:()=>({dom:V4(e,i)})}:null},{hideOn:VQ}),Zs],Zm=I_.define({combine:e=>I3(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});var Zv=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(Vj)),!1!==e.defaultKeymap&&(n=n.concat(F7)),!1!==e.searchKeymap&&(n=n.concat(zK)),!1!==e.historyKeymap&&(n=n.concat(Fd)),!1!==e.foldKeymap&&(n=n.concat(By)),!1!==e.completionKeymap&&(n=n.concat(VU)),!1!==e.lintKeymap&&(n=n.concat(V6));var r=[];if(!1!==e.lineNumbers&&r.push(function(e={}){return[LG.of(e),LB(),LY]}()),!1!==e.highlightActiveLineGutter&&r.push(LQ),!1!==e.highlightSpecialChars&&r.push(function(e={}){return[E9.of(e),E7||(E7=P5.fromClass(class{constructor(e){this.view=e,this.decorations=Pd.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(E9)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new E5({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,o=Ia(t[0],0);if(9==o){let e=i.lineAt(r),t=n.state.tabSize,o=Oh(e.text,t,r-e.from);return Pd.replace({widget:new Lt((t-o%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Pd.replace({widget:new Le(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(E9);e.startState.facet(E9)!=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&&r.push(function(e={}){return[B9,B6.of(e),EM.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?Fe:"historyRedo"==e.inputType?Ft:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(e={}){let t=Object.assign(Object.assign({},BM),e),n=new Bk(t,!0),r=new Bk(t,!1),i=P5.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(N3)!=e.state.facet(N3)||e.startState.field(Bp,!1)!=e.state.field(Bp,!1)||NY(e.startState)!=NY(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new Oe;for(let i of e.viewportLineBlocks){let o=Bg(e.state,i.from,i.to)?r:Bu(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[i,LL({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||I7.empty},initialSpacer:()=>new Bk(t,!1),domEventHandlers:Object.assign(Object.assign({},o),{click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let r=Bg(e.state,t.from,t.to);if(r)return e.dispatch({effects:Bd.of(r)}),!0;let i=Bu(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:Bh.of(i)}),!0)}})}),Bw()]}()),!1!==e.drawSelection&&r.push(function(e={}){return[EG.of(e),Eq,EX,EQ,Pq.of(!0)]}()),!1!==e.dropCursor&&r.push([E0,E1]),!1!==e.allowMultipleSelections&&r.push(I5.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(I5.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:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);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=Be(a,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=N7(a,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e})),!1!==e.syntaxHighlighting&&r.push(BP(BE,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(e={}){return[BB.of(e),BZ]}()),!1!==e.closeBrackets&&r.push([VZ,VN]),!1!==e.autocompletion&&r.push(function(e={}){return[VO,V_,Va.of(e),VA,Vq,VP]}()),!1!==e.rectangularSelection){let e;r.push((e=e=>e.altKey&&0==e.button,EM.mouseSelectionStyle.of((t,n)=>{let r,i;return e(n)?(r=Lo(t,n),i=t.state.selection,r?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(r.line).from),n=e.state.doc.lineAt(t);r={line:n.number,col:r.col,off:Math.min(r.off,n.length)},i=i.map(e.changes)}},get(e,n,o){let a=Lo(t,e);if(!a)return i;let s=function(e,t,n){let r=Math.min(t.line,n.line),i=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=r;t<=i;t++){let n=e.doc.line(t);n.length<=s&&o.push(Ib.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=r;t<=i;t++){let n=e.doc.line(t),r=Od(n.text,a,e.tabSize,!0);if(r<0)o.push(Ib.cursor(n.to));else{let t=Od(n.text,s,e.tabSize);o.push(Ib.range(n.from+r,n.from+t))}}}return o}(t.state,r,a);return s.length?o?Ib.create(s.concat(i.ranges)):Ib.create(s):i}}:null):null})))}if(!1!==t&&r.push(function(e={}){let[t,n]=La[e.key||"Alt"],r=P5.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[r,EM.contentAttributes.of(e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?Ls:null})]}()),!1!==e.highlightActiveLine&&r.push(Lr),!1!==e.highlightSelectionMatches){let e;r.push(e=[zw,zb])}return e.tabSize&&"number"==typeof e.tabSize&&r.push(N6.of(" ".repeat(e.tabSize))),r.concat([ER.of(n.flat())]).filter(Boolean)};let Zy="#e06c75",Zx="#abb2bf",Zb="#7d8799",Zw="#d19a66",ZS="#2c313a",Z_="#282c34",ZC="#353a42",ZM="#528bff",Zk=[EM.theme({"&":{color:Zx,backgroundColor:Z_},".cm-content":{caretColor:ZM},".cm-cursor, .cm-dropCursor":{borderLeftColor:ZM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:Zx},".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:Z_,color:Zb,border:"none"},".cm-activeLineGutter":{backgroundColor:ZS},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ZC},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ZC,borderBottomColor:ZC},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ZS,color:Zx}}},{dark:!0}),BP(BD.define([{tag:NH.keyword,color:"#c678dd"},{tag:[NH.name,NH.deleted,NH.character,NH.propertyName,NH.macroName],color:Zy},{tag:[NH.function(NH.variableName),NH.labelName],color:"#61afef"},{tag:[NH.color,NH.constant(NH.name),NH.standard(NH.name)],color:Zw},{tag:[NH.definition(NH.name),NH.separator],color:Zx},{tag:[NH.typeName,NH.className,NH.number,NH.changed,NH.annotation,NH.modifier,NH.self,NH.namespace],color:"#e5c07b"},{tag:[NH.operator,NH.operatorKeyword,NH.url,NH.escape,NH.regexp,NH.link,NH.special(NH.string)],color:"#56b6c2"},{tag:[NH.meta,NH.comment],color:Zb},{tag:NH.strong,fontWeight:"bold"},{tag:NH.emphasis,fontStyle:"italic"},{tag:NH.strikethrough,textDecoration:"line-through"},{tag:NH.link,color:Zb,textDecoration:"underline"},{tag:NH.heading,fontWeight:"bold",color:Zy},{tag:[NH.atom,NH.bool,NH.special(NH.variableName)],color:Zw},{tag:[NH.processingInstruction,NH.string,NH.inserted],color:"#98c379"},{tag:NH.invalid,color:"#ffffff"}]))];var ZT=EM.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),ZD=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i="light",placeholder:o="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(ER.of([ze])),a&&("boolean"==typeof a?s.unshift(Zv()):s.unshift(Zv(a))),o&&s.unshift(P5.fromClass(class{constructor(e){this.view=e,this.placeholder=o?Pd.set([Pd.widget({widget:new Li(o),side:1}).range(0)]):Pd.none}get decorations(){return this.view.state.doc.length?Pd.none:this.placeholder}},{decorations:e=>e.decorations})),i){case"light":s.push(ZT);break;case"dark":s.push(Zk);break;case"none":break;default:s.push(i)}return!1===n&&s.push(EM.editable.of(!1)),r&&s.push(I5.readOnly.of(!0)),[...s]},ZA=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)}),ZI=IG.define(),ZO=[],ZP=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],ZR=(0,g.forwardRef)((e,t)=>{var{className:n,value:r="",selection:i,extensions:o=[],onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:u,autoFocus:c,theme:h="light",height:d,minHeight:f,maxHeight:m,width:v,minWidth:y,maxWidth:x,basicSetup:b,placeholder:w,indentWithTab:S,editable:_,readOnly:C,root:M,initialState:k}=e,T=(0,AK.Z)(e,ZP),D=(0,g.useRef)(null),{state:A,view:I,container:O,setContainer:P}=function(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:o,onUpdate:a,extensions:s=ZO,autoFocus:l,theme:u="light",height:c=null,minHeight:h=null,maxHeight:d=null,width:f=null,minWidth:p=null,maxWidth:m=null,placeholder:v="",editable:y=!0,readOnly:x=!1,indentWithTab:b=!0,basicSetup:w=!0,root:S,initialState:_}=e,[C,M]=(0,g.useState)(),[k,T]=(0,g.useState)(),[D,A]=(0,g.useState)(),I=EM.theme({"&":{height:c,minHeight:h,maxHeight:d,width:f,minWidth:p,maxWidth:m},"& .cm-scroller":{height:"100% !important"}}),O=[EM.updateListener.of(e=>{e.docChanged&&"function"==typeof r&&!e.transactions.some(e=>e.annotation(ZI))&&r(e.state.doc.toString(),e),i&&i(ZA(e))}),I,...ZD({theme:u,editable:y,readOnly:x,placeholder:v,indentWithTab:b,basicSetup:w})];return a&&"function"==typeof a&&O.push(EM.updateListener.of(a)),O=O.concat(s),(0,g.useLayoutEffect)(()=>{if(C&&!D){var e={doc:t,selection:n,extensions:O},r=_?I5.fromJSON(_.json,e,_.fields):I5.create(e);if(A(r),!k){var i=new EM({state:r,parent:C,root:S});T(i),o&&o(i,r)}}return()=>{k&&(A(void 0),T(void 0))}},[C,D]),(0,g.useEffect)(()=>{e.container&&M(e.container)},[e.container]),(0,g.useEffect)(()=>()=>{k&&(k.destroy(),T(void 0))},[k]),(0,g.useEffect)(()=>{l&&k&&k.focus()},[l,k]),(0,g.useEffect)(()=>{k&&k.dispatch({effects:IY.reconfigure.of(O)})},[u,s,c,h,d,f,p,m,v,y,x,b,w,r,a]),(0,g.useEffect)(()=>{if(void 0!==t){var e=k?k.state.doc.toString():"";k&&t!==e&&k.dispatch({changes:{from:0,to:e.length,insert:t||""},annotations:[ZI.of(!0)]})}},[t,k]),{state:D,setState:A,view:k,setView:T,container:C,setContainer:M}}({root:M,value:r,autoFocus:c,theme:h,height:d,minHeight:f,maxHeight:m,width:v,minWidth:y,maxWidth:x,basicSetup:b,placeholder:w,indentWithTab:S,editable:_,readOnly:C,selection:i,onChange:a,onStatistics:s,onCreateEditor:l,onUpdate:u,extensions:o,initialState:k});(0,g.useImperativeHandle)(t,()=>({editor:D.current,state:A,view:I}),[D,O,A,I]);var R=(0,g.useCallback)(e=>{D.current=e,P(e)},[P]);if("string"!=typeof r)throw Error("value must be typeof string but got "+typeof r);var E="string"==typeof h?"cm-theme-"+h:"cm-theme";return(0,p.jsx)("div",(0,AX.Z)({ref:R,className:""+E+(n?" "+n:"")},T))});ZR.displayName="CodeMirror";class ZE{constructor(e,t,n,r,i,o,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,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 r=e.parser.context;return new ZE(e,[],t,n,n,0,[],0,r?new ZL(r,r.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,r=65535&e,{parser:i}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let a=i.dynamicPrecedence(r);if(a&&(this.score+=a),0==n){this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,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[r])||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(r<i.minRepeatTerm||131072&e){let e=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,e,h+4,!0)}if(262144&e)this.state=this.stack[s];else{let e=this.stack[s-3];this.state=i.getGoto(e,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(0==r&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t){e.buffer[r-2]=n;return}}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4]){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:i}=this.p;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(e,1)||(this.reducePos=r)),this.pushState(e,n),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,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),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new ZE(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,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 ZN(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 r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}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,r=65535&t,i=this.stack.length-3*n;if(i<0||0>e.getGoto(this.stack[i],r,!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=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+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 ZL(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 ZL{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class ZN{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 ZB{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 ZB(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 ZB(this.stack,this.pos,this.index)}}function ZF(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r<e.length;){let o=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){o=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class Zz{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let ZV=new Zz;class ZZ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ZV,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,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}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,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=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)r=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)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}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=ZV,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 r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class Zj{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;ZH(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}function ZH(e,t,n,r,i,o){let a=0,s=1<<r,{dialect:l}=n.p.parser;o:for(;(s&e[a])!=0;){let n=e[a+1];for(let r=a+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||function(e,t,n,r){let i=ZW(n,r,t);return i<0||ZW(n,r,e)<i}(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=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 i=u+c>>1,o=n+i+(i<<1),s=e[o],l=e[o+1]||65536;if(r<s)c=i;else if(r>=l)u=i+1;else{a=e[o+2],t.advance();continue o}}break}}function ZW(e,t,n){for(let r=t,i;65535!=(i=e[r]);r++)if(i==n)return r-t;return -1}Zj.prototype.contextual=Zj.prototype.fallback=Zj.prototype.extend=!1,(class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?ZF(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(ZH(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}).prototype.contextual=Zj.prototype.fallback=Zj.prototype.extend=!1;let Z$="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),ZG=null;function ZU(e,t,n){let r=e.cursor(qE.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class Zq{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?ZU(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?ZU(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],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],o=this.start[t]+n.positions[r];if(o>e)return this.nextStart=o,null;if(i instanceof L9){if(o==e){if(o<this.safeFrom)return null;let e=o+i.length;if(e<=this.safeTo){let t=i.prop(L1.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,o+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+i.length}}}class ZY{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new Zz)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if((1<<r&o)==0)continue;let l=i[r],u=this.tokens[r];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 r=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>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),n||e.pos!=this.stream.end||((n=new Zz).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 Zz,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){(1&i)==0?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:o}=e.p,{data:a}=o;for(let e=0;e<2;e++)for(let s=o.stateSlot(i,e?2:1);;s+=3){if(65535==a[s]){if(1==a[s+1])s=Z0(a,s+2);else{0==r&&2==a[s+1]&&(r=this.putAction(Z0(a,s+2),t,n,r));break}}a[s]==t&&(r=this.putAction(Z0(a,s+1),t,n,r))}return r}}class ZX{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,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 ZZ(t,r),this.tokens=new ZY(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[ZE.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>4*e.bufferLength?new Zq(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=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>r)i.push(a);else{if(this.advanceStack(a,i,n))continue;e||(e=[],t=[]),e.push(a);let r=this.tokens.getMainToken(a);t.push(r.value,r.end)}break}}if(!i.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 Z$&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw Z$&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+r);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,i);if(n)return Z$&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){n:for(let e=0;e<i.length-1;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let r=i[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500){if((t.score-r.score||t.buffer.length-r.buffer.length)>0)i.splice(n--,1);else{i.splice(e--,1);continue n}}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e<i.length;e++)i[e].pos<this.minStackPos&&(this.minStackPos=i[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 r=e.pos,{parser:i}=this,o=Z$?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>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(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?i.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(L1.contextHash)||0)==n))return e.useNode(a,r),Z$&&console.log(o+this.stackID(e)+` (via reuse of ${i.getName(a.type.id)})`),!0;if(!(a instanceof L9)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(s instanceof L9&&0==a.positions[0])a=s;else break}}let a=i.stateSlot(e.state,4);if(a>0)return e.reduce(a),Z$&&console.log(o+this.stackID(e)+` (via always-reduce ${i.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(),f=this.tokens.mainToken;if(d.apply(l,u,f?f.start:d.pos,c),Z$&&console.log(o+this.stackID(d)+` (via ${(65536&l)==0?"shift":`reduce of ${i.getName(65535&l)}`} for ${i.getName(u)} @ ${r}${d==e?"":", split"})`),h)return!0;d.pos>r?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 ZK(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o<e.length;o++){let a=e[o],s=t[o<<1],l=t[(o<<1)+1],u=Z$?this.stackID(a)+" -> ":"";if(a.deadEnd&&(i||(i=!0,a.restart(),Z$&&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&&(Z$&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));e++)Z$&&(h=this.stackID(c)+" -> ");for(let e of a.recoverByInsert(s))Z$&&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),Z$&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),ZK(a,n)):(!r||r.score<a.score)&&(r=a)}return r}stackToTree(e){return e.close(),L9.build({buffer:ZB.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=(ZG||(ZG=new WeakMap)).get(e);return t||ZG.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function ZK(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class ZQ{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class ZJ extends Nv{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]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=L1[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let o=t[n+-r];for(let a=-r;a>0;a--)i(t[n++],e,o);n++}}}this.nodeSet=new L4(t.map((t,i)=>L3.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=ZF(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(Z1),this.states=ZF(e.states,Uint32Array),this.data=ZF(e.stateData),this.goto=ZF(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new Zj(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 r=new ZX(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return -1;for(let i=r[t+1];;){let t=r[i++],o=1&t,a=r[i++];if(o&&n)return a;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return a;if(o)return -1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),o;;i+=3){if(65535==(o=n[i])){if(1==n[i+1])o=n[i=Z0(n,i+2)];else if(2==n[i+1])return Z0(n,i+2);else break}if(o==t||0==o)return Z0(n,i+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),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=Z0(this.data,n+2);else break}r=t(Z0(this.data,n+1))}return r}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=Z0(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(ZJ.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,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=Z1(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 r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;65535!=(i=this.data[n++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new ZQ(e,n,r)}static deserialize(e){return new ZJ(e)}}function Z0(e,t){return e[t]|e[t+1]<<16}function Z1(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}let Z2=N_({String:NH.string,Number:NH.number,"True False":NH.bool,PropertyName:NH.propertyName,Null:NH.null,", :":NH.separator,"[ ]":NH.squareBracket,"{ }":NH.brace}),Z5=ZJ.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:[Z2],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}),Z3=()=>e=>{try{JSON.parse(e.state.doc.toString())}catch(o){var t,n;let r;if(!(o instanceof SyntaxError))throw o;let i=(t=o,n=e.state.doc,(r=t.message.match(/at position (\d+)/))?Math.min(+r[1],n.length):(r=t.message.match(/at line (\d+) column (\d+)/))?Math.min(n.line(+r[1]).from+ +r[2]-1,n.length):0);return[{from:i,message:o.message,severity:"error",to:i}]}return[]},Z4=Nq.define({name:"json",parser:Z5.configure({props:[Bn.add({Object:Ba({except:/^\s*\}/}),Array:Ba({except:/^\s*\]/})}),Bl.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 Z8(e){let t=(0,wP.Z)(),n="dark"===t.palette.mode,[r,i]=(0,g.useState)(()=>JSON.stringify(e.value,null,2)),[o,a]=(0,g.useState)(r);return(0,p.jsx)(ZR,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[new N4(Z4),function(e,t={}){return[V7.of({source:e,config:t}),V9,Zg]}(Z3()),function(e={}){return[Zm.of(e),Zh,Zc,Zp,Zf]}()],value:r,onChange:t=>{i(t),e.onChange&&e.onChange(t)},onBlur:()=>{o!==r&&void 0!==e.onChange&&(e.onChange(r),a(r))},placeholder:e.placeholder})}var Z6=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return eF(t,e),t.prototype.getInitialData=function(e){return pj(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new ix,n=ft("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual("symbol"),i=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*e.itemHeight,s=ft(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?i: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}(ck);function Z9(e,t,n){var r,i,o,a,s=e.getBaseAxis(),l=e.getOtherAxis(s),u=(r=l,i=n,o=0,a=r.scale.getExtent(),"start"===i?o=a[0]:"end"===i?o=a[1]:th(i)&&!isNaN(i)?o=i:a[0]>0?o=a[0]:a[1]<0&&(o=a[1]),o),c=s.dim,h=l.dim,d=t.mapDimension(h),f=t.mapDimension(c),p=+("x"===h||"radius"===h),g=tt(e.dimensions,function(e){return t.mapDimension(e)}),m=!1,v=t.getCalculationInfo("stackResultDimension");return pc(t,g[0])&&(m=!0,g[0]=v),pc(t,g[1])&&(m=!0,g[1]=v),{dataDimsForPoint:g,valueStart:u,valueAxisDim:h,baseAxisDim:c,stacked:!!m,valueDim:d,baseDim:f,baseDataOffset:p,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Z7(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart);var o=e.baseDataOffset,a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var je=Math.min,jt=Math.max;function jn(e,t){return isNaN(e)||isNaN(t)}function jr(e,t,n,r,i,o,a,s,l){for(var u,c,h,d,f,p,g=n,m=0;m<r;m++){var v=t[2*g],y=t[2*g+1];if(g>=i||g<0)break;if(jn(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<r;)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(;jn(S,_)&&C<r;)C++,w+=o,S=t[2*w],_=t[2*w+1];var M=.5,k=0,T=0,D=void 0,A=void 0;if(C>=r||jn(S,_))f=v,p=y;else{k=S-u,T=_-c;var I=v-u,O=S-v,P=y-c,R=_-y,E=void 0,L=void 0;if("x"===s){E=Math.abs(I),L=Math.abs(O);var N=k>0?1:-1;f=v-N*E*a,p=y,D=v+N*L*a,A=y}else if("y"===s){E=Math.abs(P),L=Math.abs(R);var B=T>0?1:-1;f=v,p=y-B*E*a,D=v,A=y+B*L*a}else E=Math.sqrt(I*I+P*P),f=v-k*a*(1-(M=(L=Math.sqrt(O*O+R*R))/(L+E))),p=y-T*a*(1-M),D=v+k*a*M,A=y+T*a*M,D=je(D,jt(S,v)),A=je(A,jt(_,y)),D=jt(D,je(S,v)),A=jt(A,je(_,y)),k=D-v,T=A-y,f=v-k*E/L,p=y-T*E/L,f=je(f,jt(u,v)),p=je(p,jt(c,y)),f=jt(f,je(u,v)),p=jt(p,je(c,y)),k=v-f,T=y-p,D=v+k*L/E,A=y+T*L/E}e.bezierCurveTo(h,d,f,p,v,y),h=D,d=A}else e.lineTo(v,y)}u=v,c=y,g+=o}return m}var ji=function(){this.smooth=0,this.smoothConstraint=!0},jo=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return eF(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ji},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&jn(n[2*i-2],n[2*i-1]);i--);for(;r<i&&jn(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=jr(e,n,r,i,i,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,r,i=this.path.data,o=o4.CMD,a="x"===t,s=[],l=0;l<i.length;){var u=i[l++],c=void 0,h=void 0,d=void 0,f=void 0,p=void 0,g=void 0,m=void 0;switch(u){case o.M:n=i[l++],r=i[l++];break;case o.L:if(c=i[l++],h=i[l++],(m=a?(e-n)/(c-n):(e-r)/(h-r))<=1&&m>=0){var v=a?(h-r)*m+r:(c-n)*m+n;return a?[e,v]:[v,e]}n=c,r=h;break;case o.C:c=i[l++],h=i[l++],d=i[l++],f=i[l++],p=i[l++],g=i[l++];var y=a?n1(n,c,d,p,e,s):n1(r,h,f,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?nJ(r,h,f,g,b):nJ(n,c,d,p,b);return a?[e,v]:[v,e]}}n=p,r=g}}},t}(au),ja=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t}(ji),js=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return eF(t,e),t.prototype.getDefaultShape=function(){return new ja},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;o>0&&jn(n[2*o-2],n[2*o-1]);o--);for(;i<o&&jn(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=jr(e,n,i,o,o,1,t.smooth,a,t.connectNulls);jr(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}},t}(au);function jl(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function ju(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function jc(e,t){var n=ju(e),r=n[0],i=n[1],o=ju(t),a=o[0],s=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function jh(e){return th(e)?e:.5*!!e}function jd(e,t,n,r){var i=t.getBaseAxis(),o=+("x"!==i.dim&&"radius"!==i.dim),a=[],s=0,l=[],u=[],c=[],h=[];if(r){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,f=[];l[o]=f[o]=d,l[1-o]=u[1-o],f[1-o]=c[1-o],a.push(l[0],l[1]),a.push(f[0],f[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 jf(e,t){return[e[2*t],e[2*t+1]]}function jp(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t<aW.length;t++)if(e.get([aW[t],"endLabel","show"]))return!0;return!1}function jg(e,t,n,r){if(!pX(t,"cartesian2d"))return pG(t,n,r);var i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},l=jp(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,u=t.getBaseAxis().isHorizontal(),c=p$(t,n,r,function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})},l);if(!r.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 jm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.init=function(){var e=new ix,t=new vX;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},t.prototype.render=function(e,t,n){var r,i=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,f=this._symbolDraw,p=this._polyline,g=this._polygon,m=this._lineGroup,v=!t.ssr&&e.get("animation"),y=!u.isEmpty(),x=u.get("origin"),b=Z9(o,s,x),w=y&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=pp(2*r),o=0;o<r;o++){var a=Z7(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(o,s,b),S=e.get("showSymbol"),_=e.get("connectNulls"),C=S&&!h&&function(e,t,n){var r=e.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(!(!o||i&&function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*v$.getSymbolSize(t,a)[+!!e.isHorizontal()]>r)return!1;return!0}(o,t))){var a=t.mapDimension(o.dim),s={};return te(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||f.remove(),a.add(m);var k=!h&&e.get("step");o&&o.getArea&&e.get("clip",!0)&&(null!=(r=o.getArea()).width?(r.x-=.1,r.y-=.1,r.width+=.2,r.height+=.2):r.r0&&(r.r0-=.5,r.r+=.5)),this._clipShapeForSymbol=r;var T=function(e,t,n){var r,i,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"===(r=s&&s.coordDim)||"y"===r){i=o[a];break}}if(i){var l=t.getAxis(r),u=tt(i.stops,function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}}),c=u.length,h=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var d=function(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=e.coord,i=function(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r,i,o,a,s=e*(t.length-1),l=Math.floor(s),u=Math.ceil(s),c=rg(t[l]),h=rg(t[u]),d=s-l;return rw([ro((r=c[0],r+(h[0]-r)*d)),ro((i=c[1],i+(h[1]-i)*d)),ro((o=c[2],o+(h[2]-o)*d)),ra((a=c[3],a+(h[3]-a)*d))],"rgba")}}((n-r)/(t.coord-r),[e.color,t.color]);return{coord:n,color:i}}for(var s=0;s<o;s++){var l=e[s],u=l.coord;if(u<0)n=l;else if(u>t){r?i.push(a(r,l,t)):n&&i.push(a(n,l,0),a(n,l,t));break}else n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}return i}(u,"x"===r?n.getWidth():n.getHeight()),f=d.length;if(!f&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=d[0].coord-10,g=d[f-1].coord+10,m=g-p;if(m<.001)return"transparent";te(d,function(e){e.offset=(e.coord-p)/m}),d.push({offset:f?d[f-1].offset:.5,color:h[1]||"transparent"}),d.unshift({offset:f?d[0].offset:.5,color:h[0]||"transparent"});var v=new hR(0,0,0,0,d,!0);return v[r]=p,v[r+"2"]=g,v}}}(s,o,n)||s.getVisual("style")[s.getVisual("drawType")];if(p&&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,lM(T));var D=m.getClipPath();D?sS(D,{shape:jg(this,o,!1,e).shape},e):m.setClipPath(jg(this,o,!0,e)),S&&f.updateData(s,{isIgnore:C,clipShape:r,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),jl(this._stackedOnPoints,w)&&jl(this._points,c)||(v?this._doUpdateAnimation(s,w,o,n,k,x,_):(k&&(c=jd(c,o,k,_),w&&(w=jd(w,o,k,_))),p.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:w})))}else S&&f.updateData(s,{isIgnore:C,clipShape:r,disableAnimation:!0,getSymbolPoint:function(e){return[c[2*e],c[2*e+1]]}}),v&&this._initSymbolLabelAnimation(s,o,r),k&&(c=jd(c,o,k,_),w&&(w=jd(w,o,k,_))),p=this._newPolyline(c),y?g=this._newPolygon(c,w):g&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,lM(T)),m.setClipPath(jg(this,o,!0,e));var A=e.getModel("emphasis"),I=A.get("focus"),O=A.get("blurScope"),P=A.get("disabled");p.useStyle(e8(l.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"})),sf(p,e,"lineStyle"),p.style.lineWidth>0&&"bolder"===e.get(["emphasis","lineStyle","width"])&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1),aF(p).seriesIndex=e.seriesIndex,sc(p,I,O,P);var R=jh(e.get("smooth")),E=e.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:E,connectNulls:_}),g){var L=s.getCalculationInfo("stackedOnSeries"),N=0;g.useStyle(e8(u.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),L&&(N=jh(L.get("smooth"))),g.setShape({smooth:R,stackedOnSmooth:N,smoothMonotone:E,connectNulls:_}),sf(g,e,"areaStyle"),aF(g).seriesIndex=e.seriesIndex,sc(g,I,O,P)}var B=function(e){i._changePolyState(e)};s.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=B)}),this._polyline.onHoverStateChange=B,this._data=s,this._coordSys=o,this._stackedOnPoints=w,this._points=c,this._step=k,this._valueOrigin=x,e.get("triggerLineEvent")&&(this.packEventData(e,p),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,t){aF(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=iK(i,r);if(this._changePolyState("emphasis"),o instanceof Array||null==o||!(o>=0))du.prototype.highlight.call(this,e,t,n,r);else{var a=i.getLayout("points"),s=i.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 v$(i,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,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),o=iK(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else du.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;a8(this._polyline,e),t&&a8(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new jo({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 js({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o=t.getBaseAxis(),a=o.inverse;"cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0);var s=e.hostModel,l=s.get("animationDuration");tl(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=tl(u)?u(null):u;e.eachItemGraphicEl(function(e,o){if(e){var s=[e.x,e.y],h=void 0,d=void 0,f=void 0;if(n){if(i){var p=t.pointToCoord(s);r?(h=n.startAngle,d=n.endAngle,f=-p[1]/180*Math.PI):(h=n.r0,d=n.r,f=p[0])}else r?(h=n.x,d=n.x+n.width,f=e.x):(h=n.y+n.height,d=n.y,f=e.y)}var g=d===h?0:(f-h)/(d-h);a&&(g=1-g);var m=tl(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 r=e.getModel("endLabel");if(jp(e)){var i,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 aB({z2:200})).ignoreClip=!0,l.setTextContent(this._endLabel),l.disableLabelAnimation=!0);var h=function(e){for(var t,n,r=e.length/2;r>0&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(u);h>=0&&(sO(l,sP(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:h,defaultText:function(e,t,n){return null!=n?pQ(s,n):pK(s,e)},enableTextSetter:!0},(o=(i=t.getBaseAxis()).isHorizontal(),a=i.inverse,{normal:{align:r.get("align")||(o?a?"right":"left":"center"),verticalAlign:r.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,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){e<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),d=o.get("precision"),f=o.get("distance")||0,p=a.getBaseAxis(),g=p.isHorizontal(),m=p.inverse,v=t.shape,y=m?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?f:0)*(m?-1:1),b=(g?0:-f)*(m?-1:1),w=g?"x":"y",S=function(e,t,n){for(var r,i,o=e.length/2,a=+("x"!==n),s=0,l=-1,u=0;u<o;u++)if(!(isNaN(i=e[2*u+a])||isNaN(e[2*u+1-a]))){if(0===u){r=i;continue}if(r<=t&&i>=t||r>=t&&i<=t){l=u;break}s=u,r=i}return{range:[s,l],t:(t-r)/(i-r)}}(u,y,w),_=S.range,C=_[1]-_[0],M=void 0;if(C>=1){if(C>1&&!h){var k=jf(u,_[0]);s.attr({x:k[0]+x,y:k[1]+b}),i&&(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]);i&&(M=i8(n,d,T,D,S.t))}r.lastFrameIndex=_[0]}else{var A=1===e||r.lastFrameIndex>0?_[0]:0,k=jf(u,A);i&&(M=c.getRawValue(A)),s.attr({x:k[0]+x,y:k[1]+b})}if(i){var I=sV(s);"function"==typeof I.setLabelText&&I.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,i,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=[],f=[],p=[],g=[],m=[],v=Z9(i,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]),f.push(r[C],r[C+1]),m.push(t.getRawIndex(w.idx1));break;case"+":var A=w.idx,I=v.dataDimsForPoint,O=i.dataToPoint([t.get(I[0],A),t.get(I[1],A)]);C=2*A,c.push(O[0],O[1]),h.push(x[C],x[C+1]);var P=Z7(v,i,t,A);d.push(P[0],P[1]),f.push(r[C],r[C+1]),m.push(t.getRawIndex(A));break;case"-":S=!1}S&&(p.push(w),g.push(g.length))}g.sort(function(e,t){return m[e]-m[t]});for(var R=c.length,E=pp(R),L=pp(R),N=pp(R),B=pp(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],N[V]=d[Z],N[V+1]=d[Z+1],B[V]=f[Z],B[V+1]=f[Z+1],F[b]=p[z]}return{current:E,next:L,stackedOnCurrent:N,stackedOnNext:B,status:F}}(this._data,e,this._stackedOnPoints,t,this._coordSys,0,this._valueOrigin,0),h=c.current,d=c.stackedOnCurrent,f=c.next,p=c.stackedOnNext;if(i&&(h=jd(c.current,n,i,a),d=jd(c.stackedOnCurrent,n,i,a),f=jd(c.next,n,i,a),p=jd(c.stackedOnNext,n,i,a)),jc(h,f)>3e3||l&&jc(d,p)>3e3){s.stopAnimation(),s.setShape({points:f}),l&&(l.stopAnimation(),l.setShape({points:f,stackedOnPoints:p}));return}s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:f}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),sw(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:d}),l.stopAnimation(),sw(l,{shape:{stackedOnPoints:p}},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,r=2*m[t].ptIdx;n.x=e[r],n.y=e[r+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,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(du);function jv(e){e.registerChartView(jm),e.registerSeriesModel(Z6),e.registerLayout(v0("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,pk("line"))}function jy(e,t){if(!e)return!1;for(var n=ts(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function jx(e){iH(e,"label",["show"])}var jb=iQ(),jw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n}return eF(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(eV.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,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),o=jb(e)[i];if(!n||!n.data){jb(e)[i]=null;return}o?o._mergeOption(n,t,!0):(r&&jx(n),te(n.data,function(e){e instanceof Array?(jx(e[0]),jx(e[1])):jx(e)}),e4(o=this.createMarkerModelFromSeries(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),jb(e)[i]=o},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),o=r.getName(e);return cg("section",{header:this.name,blocks:[cg("nameValue",{name:o,value:i,noName:!o,noValue:null==i})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.getMarkerModelFromSeries=function(e,t){return jb(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(lN);e9(jw,uW.prototype);var jS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},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}(jw);function j_(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function jC(e,t,n,r,i,o){var a=[],s=pc(t,r)?t.getCalculationInfo("stackResultDimension"):r,l=jI(t,s,e),u=t.indicesOfNearest(s,l)[0];a[i]=t.get(n,u),a[o]=t.get(s,u);var c=t.get(r,u),h=iD(t.get(r,u));return(h=Math.min(h,20))>=0&&(a[o]=+a[o].toFixed(h)),[a,c]}var jM={min:ta(jC,"min"),max:ta(jC,"max"),average:ta(jC,"average"),median:ta(jC,"median")};function jk(e,t){if(t){var n,r=e.getData(),i=e.coordinateSystem,o=i&&i.dimensions;if(!(!isNaN(parseFloat((n=t).x))&&!isNaN(parseFloat(n.y)))&&!ts(t.coord)&&ts(o)){var a=jT(t,r,i,e);if((t=e5(t)).type&&jM[t.type]&&a.baseAxis&&a.valueAxis){var s=e6(o,a.baseAxis.dim),l=e6(o,a.valueAxis.dim),u=jM[t.type](r,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&&ts(o))for(var c=t.coord,h=0;h<2;h++)jM[c[h]]&&(c[h]=jI(r,r.mapDimension(o[h]),c[h]));else t.coord=[];return t}}function jT(e,t,n,r){var i,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((i=r,o=s.valueDataDim,(a=i.getData().getDimensionInfo(o))&&a.coordDim)),s.baseAxis=n.getOtherAxis(s.valueAxis),s.baseDataDim=t.mapDimension(s.baseAxis.dim)):(s.baseAxis=r.getBaseAxis(),s.valueAxis=n.getOtherAxis(s.baseAxis),s.baseDataDim=t.mapDimension(s.baseAxis.dim),s.valueDataDim=t.mapDimension(s.valueAxis.dim)),s}function jD(e,t){return!e||!e.containData||!t.coord||!!j_(t)||e.containData(t.coord)}function jA(e,t){return e?function(e,n,r,i){return uK(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return uK(e.value,t[i])}}function jI(e,t,n){if("average"===n){var r=0,i=0;return e.each(t,function(e,t){!isNaN(e)&&(r+=e,i++)}),r/i}return"median"===n?e.getMedian(t):e.getDataExtent(t)[+("max"===n)]}var jO=iQ(),jP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.init=function(){this.markerGroupMap=tD()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){jO(e).keep=!1}),t.eachSeries(function(e){var i=jw.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){jO(e).keep||r.group.remove(e.group)})},t.prototype.markKeep=function(e){jO(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;te(e,function(e){var r=jw.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?a4(e,a1):a4(e,a2))})})},t.type="marker",t}(cE),jR=iQ(),jE=function(e,t,n,r){var i=r[0],o=r[1];if(i&&o){var a=jk(e,i),s=jk(e,o),l=a.coord,u=s.coord;l[0]=tv(l[0],-1/0),l[1]=tv(l[1],-1/0),u[0]=tv(u[0],1/0),u[1]=tv(u[1],1/0);var c=function(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=e3(n,e[r],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 jL(e){return!isNaN(e)&&!isFinite(e)}function jN(e,t,n,r){var i=1-e;return jL(t[i])&&jL(n[i])}function jB(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},o={coord:r,x:t.x1,y:t.y1};if(pX(e,"cartesian2d"))return!!(n&&r&&(jN(1,n,r,e)||jN(0,n,r,e)))||!e||!e.containZone||!i.coord||!o.coord||!!j_(i)||!!j_(o)||e.containZone(i.coord,o.coord);return jD(e,i)||jD(e,o)}function jF(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=iM(s.get(n[0]),i.getWidth()),u=iM(s.get(n[1]),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition){var c=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),d=a.clampData(c),f=a.clampData(h),p=[];"x0"===n[0]?p[0]=d[0]>f[0]?h[0]:c[0]:p[0]=d[0]>f[0]?c[0]:h[0],"y0"===n[1]?p[1]=d[1]>f[1]?h[1]:c[1]:p[1]=d[1]>f[1]?c[1]:h[1],o=r.getMarkerPosition(p,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(pX(a,"cartesian2d")){var y=a.getAxis("x"),x=a.getAxis("y"),g=e.get(n[0],t),m=e.get(n[1],t);jL(g)?o[0]=y.toGlobalCoord(y.getExtent()[+("x0"!==n[0])]):jL(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 jz=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],jV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=jw.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each(function(t){var i=tt(jz,function(i){return jF(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape("points",i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new ix});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){if(e){var r,i,o=tt(e&&e.dimensions,function(e){var n=t.getData();return e4(e4({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});r=new pB(i=tt(["x0","y0","x1","y1"],function(e,t){return{name:e,type:o[t%2].type}}),n)}else r=new pB(i=[{name:"value",type:"float"}],n);var a=tt(n.get("data"),ta(jE,t,e,n));e&&(a=tr(a,ta(jB,e)));var s=e?function(e,t,n,r){return uK(e.coord[Math.floor(r/2)][r%2],i[r])}:function(e,t,n,r){return uK(e.value,i[r])};return r.initData(a,null,s),r.hasItemOption=!0,r}(i,e,t);t.setData(u),u.each(function(t){var n=tt(jz,function(n){return jF(u,t,n,e,r)}),o=i.getAxis("x").scale,s=i.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))];iT(h),iT(d);var f=!(l[0]>h[1]||l[1]<h[0]||c[0]>d[1]||c[1]<d[0]);u.setItemLayout(t,{points:n,allClipped:!f});var p=u.getItemModel(t).getModel("itemStyle").getItemStyle(),g=dK(a,"color");!p.fill&&(p.fill=g,tu(p.fill)&&(p.fill=rb(p.fill,.4))),p.stroke||(p.stroke=g),u.setItemVisual(t,"style",p)}),u.diff(jR(l).data).add(function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new hg({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}}).update(function(e,n){var r=jR(l).data.getItemGraphicEl(n),i=u.getItemLayout(e);i.allClipped?r&&l.group.remove(r):(r?sw(r,{shape:{points:i.points}},t,e):r=new hg({shape:{points:i.points}}),u.setItemGraphicEl(e,r),l.group.add(r))}).remove(function(e){var t=jR(l).data.getItemGraphicEl(e);l.group.remove(t)}).execute(),u.eachItemGraphicEl(function(e,n){var r=u.getItemModel(n),i=u.getItemVisual(n,"style");e.useStyle(u.getItemVisual(n,"style")),sO(e,sP(r),{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:tu(i.fill)?rb(i.fill,1):"#000"}),sf(e,r),sc(e,null,null,r.get(["emphasis","disabled"])),aF(e).dataModel=t}),jR(l).data=u,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(jP);function jZ(e){e.registerComponentModel(jS),e.registerComponentView(jV),e.registerPreprocessor(function(e){jy(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var jj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},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}(jw),jH=hS.prototype,jW=hT.prototype,j$=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function jG(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}eF(function(){return null!==qI&&qI.apply(this,arguments)||this},qI=j$);var jU=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return eF(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new j$},t.prototype.buildPath=function(e,t){jG(t)?jH.buildPath.call(this,e,t):jW.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return jG(this.shape)?jH.pointAt.call(this,e):jW.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=jG(t)?[t.x2-t.x1,t.y2-t.y1]:jW.tangentAt.call(this,e);return tV(n,n)},t}(au),jq=["fromSymbol","toSymbol"];function jY(e){return"_"+e+"Type"}function jX(e,t,n){var r=t.getItemVisual(n,e);if(!r||"none"===r)return r;var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=fn(i),u=fr(a||0,l);return r+l+u+(o||"")+(s||"")}function jK(e,t,n){var r=t.getItemVisual(n,e);if(r&&"none"!==r){var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),a=t.getItemVisual(n,e+"Offset"),s=t.getItemVisual(n,e+"KeepAspect"),l=fn(i),u=fr(a||0,l),c=ft(r,-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 jQ(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 jJ=function(e){function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return eF(t,e),t.prototype._createLine=function(e,t,n){var r,i,o=e.hostModel,a=(r=e.getItemLayout(t),jQ((i=new jU({name:"line",subPixelOptimize:!0})).shape,r),i);a.shape.percent=0,sS(a,{shape:{percent:1}},o,t),this.add(a),te(jq,function(n){var r=jK(n,e,t);this.add(r),this[jY(n)]=jX(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=e.getItemLayout(t),a={shape:{}};jQ(a.shape,o),sw(i,a,r,t),te(jq,function(n){var r=jX(n,e,t),i=jY(n);if(this[i]!==r){this.remove(this.childOfName(n));var o=jK(n,e,t);this.add(o)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=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),f=d.getModel("emphasis");o=f.getModel("lineStyle").getLineStyle(),a=d.getModel(["blur","lineStyle"]).getLineStyle(),s=d.getModel(["select","lineStyle"]).getLineStyle(),u=f.get("disabled"),c=f.get("focus"),h=f.get("blurScope"),l=sP(d)}var p=e.getItemVisual(t,"style"),g=p.stroke;i.useStyle(p),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=o,i.ensureState("blur").style=a,i.ensureState("select").style=s,te(jq,function(e){var t=this.childOfName(e);if(t){t.setColor(g),t.style.opacity=p.opacity;for(var n=0;n<aW.length;n++){var r=aW[n],o=i.getState(r);if(o){var a=o.style||{},s=t.ensureState(r),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=r.getRawValue(t);sO(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:g||"#000",defaultOpacity:p.opacity,defaultText:(null==m?e.getName(t):isFinite(m)?ik(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");ts(x)||(x=[x,x]),v.__labelDistance=x}this.setTextConfig({position:null,local:!0,inside:!1}),sc(this,c,h,u)},t.prototype.highlight=function(){st(this)},t.prototype.downplay=function(){sn(this)},t.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");jQ(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 r=1,i=this.parent;i;)i.scaleX&&(r/=i.scaleX),i=i.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=tF([],l,s);if(tV(u,u),e&&(e.setPosition(s),S(e,0),e.scaleX=e.scaleY=r*a,e.markRedraw()),t&&(t.setPosition(l),S(t,1),t.scaleX=t.scaleY=r*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,f=d[0]*r,p=d[1]*r,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=-p,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=p,h="top";break;default:w=0,h="middle"}switch(n.__position){case"end":n.x=u[0]*f+l[0],n.y=u[1]*p+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]*f+s[0],n.y=-u[1]*p+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=f*x+s[0],n.y=s[1]+w,c=m[0]<0?"right":"left",n.originX=-f*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=-f*x+l[0],n.y=l[1]+w,c=m[0]>=0?"right":"left",n.originX=f*x,n.originY=-w}n.scaleX=n.scaleY=r,n.setStyle({verticalAlign:n.__verticalAlign||h,align:n.__align||c})}}}function S(e,t){var n=e.__specifiedRotation;if(null==n){var r=o.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(ix),j0=function(){function e(e){this.group=new ix,this._LineCtor=e||jJ}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this.group,r=this._lineData;this._lineData=e,r||n.removeAll();var i=j1(e);e.diff(r).add(function(n){t._doAdd(e,n,i)}).update(function(n,o){t._doUpdate(r,e,o,n,i)}).remove(function(e){n.remove(r.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=j1(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 r=e.start;r<e.end;r++)if(j5(t.getItemLayout(r))){var i=new this._LineCtor(t,r,this._seriesScope);i.traverse(n),this.group.add(i),t.setItemGraphicEl(r,i),this._progressiveEls.push(i)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){da(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(j5(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var o=e.getItemGraphicEl(n);if(!j5(t.getItemLayout(r))){this.group.remove(o);return}o?o.updateData(t,r,i):o=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,o),this.group.add(o)},e}();function j1(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:sP(t)}}function j2(e){return isNaN(e[0])||isNaN(e[1])}function j5(e){return e&&!j2(e[0])&&!j2(e[1])}var j3=iQ(),j4=function(e,t,n,r){var i,o=e.getData();if(ts(r))i=r;else{var a=r.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=r.xAxis||null!=r.yAxis){var s=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)s=t.getAxis(null!=r.yAxis?"y":"x"),l=tv(r.yAxis,r.xAxis);else{var u=jT(r,o,t,e);s=u.valueAxis;var c=ph(o,u.valueDataDim);l=jI(o,c,a)}var h=+("x"!==s.dim),d=1-h,f=e5(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var g=n.get("precision");g>=0&&th(l)&&(l=+l.toFixed(Math.min(g,20))),f.coord[h]=p.coord[h]=l,i=[f,p,{type:a,valueIndex:r.valueIndex,value:l}]}else i=[]}var m=[jk(e,i[0]),jk(e,i[1]),e4({},i[2])];return m[2].type=m[2].type||null,e3(m[2],m[0]),e3(m[2],m[1]),m};function j8(e){return!isNaN(e)&&!isFinite(e)}function j6(e,t,n,r){var i=1-e,o=r.dimensions[e];return j8(t[i])&&j8(n[i])&&t[e]===n[e]&&r.getAxis(o).containData(t[e])}function j9(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(j6(1,n,r,e)||j6(0,n,r,e)))return!0}return jD(e,t[0])&&jD(e,t[1])}function j7(e,t,n,r,i){var o,a=r.coordinateSystem,s=e.getItemModel(t),l=iM(s.get("x"),i.getWidth()),u=iM(s.get("y"),i.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)o=r.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(pX(a,"cartesian2d")){var f=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;j8(e.get(c[0],t))?o[0]=f.toGlobalCoord(f.getExtent()[+!n]):j8(e.get(c[1],t))&&(o[1]=p.toGlobalCoord(p.getExtent()[+!n]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];e.setItemLayout(t,o)}var He=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=jw.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),i=j3(t).from,o=j3(t).to;i.each(function(t){j7(i,t,!0,e,n),j7(o,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),o.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i,o,a,s,l,u,c,h,d,f=e.coordinateSystem,p=e.id,g=e.getData(),m=this.markerGroupMap,v=m.get(p)||m.set(p,new j0);this.group.add(v.group);var y=(i=f,o=e,a=t,l=new pB(s=i?tt(i&&i.dimensions,function(e){return e4(e4({},o.getData().getDimensionInfo(o.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],a),u=new pB(s,a),c=new pB([],a),h=tt(a.get("data"),ta(j4,o,i,a)),i&&(h=tr(h,ta(j9,i))),d=jA(!!i,s),l.initData(tt(h,function(e){return e[0]}),null,d),u.initData(tt(h,function(e){return e[1]}),null,d),c.initData(tt(h,function(e){return e[2]})),c.hasItemOption=!0,{from:l,to:u,line:c}),x=y.from,b=y.to,w=y.line;j3(t).from=x,j3(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,i){var o=t.getItemModel(n);j7(t,n,i,e,r);var a=o.getModel("itemStyle").getItemStyle();null==a.fill&&(a.fill=dK(g,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:ty(o.get("symbolOffset",!0),M[+!i]),symbolRotate:ty(o.get("symbolRotate",!0),C[+!i]),symbolSize:ty(o.get("symbolSize"),_[+!i]),symbol:ty(o.get("symbol",!0),S[+!i]),style:a})}ts(S)||(S=[S,S]),ts(_)||(_=[_,_]),ts(C)||(C=[C,C]),ts(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){aF(e).dataModel=t,e.traverse(function(e){aF(e).dataModel=t})}),this.markKeep(v),v.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(jP);function Ht(e){e.registerComponentModel(jj),e.registerComponentView(He),e.registerPreprocessor(function(e){jy(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Hn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},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}(jw);function Hr(e,t,n){var r=t.coordinateSystem;e.each(function(i){var o,a=e.getItemModel(i),s=iM(a.get("x"),n.getWidth()),l=iM(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)o=t.getMarkerPosition(e.getValues(e.dimensions,i));else if(r){var u=e.get(r.dimensions[0],i),c=e.get(r.dimensions[1],i);o=r.dataToPoint([u,c])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),e.setItemLayout(i,o)})}var Hi=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=jw.getMarkerModelFromSeries(e,"markPoint");t&&(Hr(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i,o,a,s,l,u,c,h=e.coordinateSystem,d=e.id,f=e.getData(),p=this.markerGroupMap,g=p.get(d)||p.set(d,new vX),m=(i=h,o=e,a=t,l=new pB(s=i?tt(i&&i.dimensions,function(e){return e4(e4({},o.getData().getDimensionInfo(o.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],a),u=tt(a.get("data"),ta(jk,o)),i&&(u=tr(u,ta(jD,i))),c=jA(!!i,s),l.initData(u,null,c),l);t.setData(m),Hr(t.getData(),e,r),m.each(function(e){var n=m.getItemModel(e),r=n.getShallow("symbol"),i=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),s=n.getShallow("symbolKeepAspect");if(tl(r)||tl(i)||tl(o)||tl(a)){var l=t.getRawValue(e),u=t.getDataParams(e);tl(r)&&(r=r(l,u)),tl(i)&&(i=i(l,u)),tl(o)&&(o=o(l,u)),tl(a)&&(a=a(l,u))}var c=n.getModel("itemStyle").getItemStyle(),h=dK(f,"color");c.fill||(c.fill=h),m.setItemVisual(e,{symbol:r,symbolSize:i,symbolRotate:o,symbolOffset:a,symbolKeepAspect:s,style:c})}),g.updateData(m),this.group.add(g.group),m.eachItemGraphicEl(function(e){e.traverse(function(e){aF(e).dataModel=t})}),this.markKeep(g),g.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(jP);function Ho(e){e.registerComponentModel(Hn),e.registerComponentView(Hi),e.registerPreprocessor(function(e){jy(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var Ha=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.type="dataZoom.select",t}(yY),Hs=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.type="dataZoom.select",t}(yQ);function Hl(e){e.registerComponentModel(Ha),e.registerComponentView(Hs),xu(e)}var Hu=function(){},Hc={},Hh=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;te(this.option.feature,function(e,n){var r=Hc[n];r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),e3(e,r.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}(lN),Hd=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.render=function(e,t,n,r){var i,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={}),f=[];te(h,function(e,t){f.push(t)}),new pA(this._featureNames||[],f).add(p).update(p).remove(ta(p,null)).execute(),this._featureNames=f,i=e.getBoxLayoutParams(),o=e.get("padding"),s=lI(i,a={width:n.getWidth(),height:n.getHeight()},o),lA(e.get("orient"),l,e.get("itemGap"),s.width,s.height),lO(l,i,a,o),l.add(xw(l.getBoundingRect(),e)),c||l.eachChild(function(e){var t=e.__title,r=e.ensureState("emphasis"),i=r.textConfig||(r.textConfig={}),o=e.getTextContent(),a=o&&o.ensureState("emphasis");if(a&&!tl(a)&&t){var s=a.style||(a.style={}),c=ir(t,aB.makeFont(s)),h=e.x+l.x,d=e.y+l.y+u,f=!1;d+c.height>n.getHeight()&&(i.position="top",f=!0);var p=f?-5-c.height:u+10;h+c.width/2>n.getWidth()?(i.position=["100%",p],s.align="right"):h-c.width/2<0&&(i.position=[0,p],s.align="left")}})}function p(i,o){var a,s,p,g,m,v,y,x,b,w,S,_=f[i],C=f[o],M=h[_],k=new sQ(M,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===_&&(M.title=r.newTitle),_&&!C){if(0===_.indexOf("my"))S={onclick:k.option.onclick,featureName:_};else{var T=Hc[_];if(!T)return;S=new T}d[_]=S}else if(!(S=d[C]))return;S.uid=s0("toolbox-feature"),S.model=k,S.ecModel=t,S.api=n;var D=S instanceof Hu;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,p=_,v=a.getModel("iconStyle"),y=a.getModel(["emphasis","iconStyle"]),x=s instanceof Hu&&s.getIcons?s.getIcons():a.get("icon"),b=a.get("title")||{},tu(x)?(g={})[p]=x:g=x,tu(b)?(m={})[p]=b:m=b,w=a.iconPaths={},te(g,function(r,i){var o=de(r,{},{x:-u/2,y:-u/2,width:u,height:u});o.setStyle(v.getItemStyle()),o.ensureState("emphasis").style=y.getItemStyle();var h=new aB({style:{text:m[i],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:sz({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},t)},ignore:!0});o.setTextContent(h),dr({el:o,componentModel:e,itemName:i,formatterParamsExtra:{title:m[i]}}),o.__title=m[i],o.on("mouseover",function(){var t=y.getItemStyle(),r=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")||r}),h.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==a.get(["iconStatus",i])&&n.leaveEmphasis(this),h.hide()}),("emphasis"===a.get(["iconStatus",i])?st:sn)(o),l.add(o),o.on("click",to(s.onclick,s,t,n,i)),w[i]=o}),k.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?st:sn)(r[e])},S instanceof Hu&&S.render&&S.render(k,t,n,r)}},t.prototype.updateView=function(e,t,n,r){te(this._features,function(e){e instanceof Hu&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.remove=function(e,t){te(this._features,function(n){n instanceof Hu&&n.remove&&n.remove(e,t)}),this.group.removeAll()},t.prototype.dispose=function(e,t){te(this._features,function(n){n instanceof Hu&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(cE),Hf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"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=eV.browser;if(tl(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+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||i){var c=a.split(","),h=c[0].indexOf("base64")>-1,d=i?decodeURIComponent(c[1]):c[1];h&&(d=window.atob(d));var f=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var p=d.length,g=new Uint8Array(p);p--;)g[p]=d.charCodeAt(p);var m=new Blob([g]);window.navigator.msSaveOrOpenBlob(m,f)}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,f),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=r}},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}(Hu),Hp="__ec_magicType_stack__",Hg=[["line","bar"],["stack"]],Hm=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return te(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 r,i=this.model,o=i.get(["seriesIndex",n]);if(Hv[n]){var a={series:[]};te(Hg,function(e){e6(e,n)>=0&&te(e,function(e){i.setIconStatus(e,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var t=e.subType,r=e.id,o=Hv[n](t,r,e,i);o&&(e8(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,i2).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&&(r=e3({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:r,featureName:"magicType"})}},t}(Hu),Hv={line:function(e,t,n,r){if("bar"===e)return e3({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return e3({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===Hp;if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),e3({id:t,stack:i?"":Hp},r.get(["option","stack"])||{},!0)}};f6({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var Hy=Array(60).join("-");function Hx(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Hb=RegExp("[ ]+","g"),Hw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n,r,i,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 f=document.createElement("div"),p=document.createElement("textarea");f.style.cssText="overflow:auto";var g=u.get("optionToContent"),m=u.get("contentToOption"),v={value:tr([(a=(n={},r=[],i=[],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:[]},i.push({axisDim:o.dim,axisIndex:o.index})),n[a].series.push(e)}else r.push(e)}else r.push(e)}),o={seriesGroupByCategoryAxis:n,other:r,meta:i}).seriesGroupByCategoryAxis,s=[],te(a,function(e,t){var n=e.categoryAxis,r=e.valueAxis.dim,i=[" "].concat(tt(e.series,function(e){return e.name})),o=[n.model.getCategories()];te(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(r),function(e){return e}))});for(var a=[i.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"+Hy+"\n\n")),tt(o.other,function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){for(var e=arguments.length,i=arguments[e-1],o=t.getName(i),a=0;a<e-1;a++)r[a]=arguments[a];n.push((o?o+" ":"")+r.join(" "))}),n.join("\n")}).join("\n\n"+Hy+"\n\n")],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+Hy+"\n\n"),meta:o.meta};if(tl(g)){var y=g(t.getOption());tu(y)?f.innerHTML=y:tg(y)&&f.appendChild(y)}else{p.readOnly=u.get("readOnly");var x=p.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"),p.value=v.value,f.appendChild(p)}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}nr(_,"click",k),nr(C,"click",function(){var e,n,r;if(null==m&&null!=g||null!=m&&null==g){k();return}try{tl(m)?e=m(f,t.getOption()):(n=p.value.split(RegExp("\n*"+Hy+"\n*","g")),r={series:[]},te(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=Hx(t.shift()).split(Hb),r=[],i=tt(n,function(e){return{name:e,data:[]}}),o=0;o<t.length;o++){var a=Hx(t[o]).split(Hb);r.push(a.shift());for(var s=0;s<a.length;s++)i[s]&&(i[s].data[o]=a[s])}return{series:i,categories:r}}(e),i=b[t],o=i.axisDim+"Axis";i&&(r[o]=r[o]||[],r[o][i.axisIndex]={data:n.categories},r.series=r.series.concat(n.series))}else{var n=function(e){for(var t=e.split(/\n+/g),n=Hx(t.shift()),r=[],i=0;i<t.length;i++){var o=Hx(t[i]);if(o){var a=o.split(Hb),s="",l=void 0,u=!1;isNaN(a[0])?(u=!0,s=a[0],a=a.slice(1),r[i]={name:s,value:[]},l=r[i].value):l=r[i]=[];for(var c=0;c<a.length;c++)l.push(+a[c]);1===l.length&&(u?r[i].value=l[0]:r[i]=l[0])}}return{name:n,data:r}}(e);r.series.push(n)}}),e=r)}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(f),c.appendChild(w),f.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}(Hu);f6({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];te(e.newOption.series,function(e){var r=t.getSeriesByName(e.name)[0];if(r){var i=r.get("data");n.push({name:e.name,data:tt(e.data,function(e,t){var n=i&&i[t];if(!td(n)||ts(n))return e;td(e)&&!ts(e)||(e={value:e});var r=null!=n.name&&null==e.name;return e=e8(e,n),r&&delete e.name,e})})}else n.push(e4({type:"scatter"},e))}),t.mergeOption(e8({series:n},e.newOption))});var HS=iQ();function H_(e){var t=HS(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var HC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.onclick=function(e,t){HS(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}(Hu);f6({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var HM=Math.min,Hk=Math.max,HT=Math.pow,HD="globalPan",HA={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},HI={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},HO={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},HP=0,HR=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new ix,n._uid="brushController_"+HP++,te(H8,function(e,t){this._handlers[t]=to(e,this)},n),n}return eF(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,y5(n)[HD]=t),te(this._handlers,function(e,t){n.on(t,e)}),this._brushType=e.brushType,this._brushOption=e3(e5(HO),e,!0)},t.prototype._doDisableBrush=function(){var e,t,n=this._zr;e=this._uid,(t=y5(n))[HD]===e&&(t[HD]=null),te(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={};te(e,function(e){t[e.panelId]=e5(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=tt(e,function(e){return e3(e5(HO),e,!0)});var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new pA(t,e,function(e,t){return o(e.__brushOption,t)},o).add(a).update(a).remove(function(e){t[e]!==i&&r.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]===i)n[o]=t[a];else{var l=n[o]=null!=a?(t[a].__brushOption=s,t[a]):HL(r,HE(r,s));HF(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),Hj(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(tY);function HE(e,t){var n=H9[t.brushType].createCover(e,t);return n.__brushOption=t,HB(n,t),e.group.add(n),n}function HL(e,t){var n=Hz(t);return n.endCreating&&(n.endCreating(e,t),HB(t,t.__brushOption)),t}function HN(e,t){var n=t.__brushOption;Hz(t).updateCoverShape(e,t,n.range,n)}function HB(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function HF(e,t){Hz(t).updateCommon(e,t),HN(e,t)}function Hz(e){return H9[e.__brushOption.brushType]}function HV(e,t,n){var r,i=e._panels;if(!i)return!0;var o=e._transform;return te(i,function(e){e.isTargetByCursor(t,n,o)&&(r=e)}),r}function HZ(e,t){var n=e._panels;if(!n)return!0;var r=t.__brushOption.panelId;return null==r||n[r]}function Hj(e){var t=e._covers,n=t.length;return te(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function HH(e,t){var n=tt(e._covers,function(e){var t=e.__brushOption,n=e5(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function HW(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function H$(e,t,n,r){var i=new ix;return i.add(new a_({name:"main",style:HY(n),silent:!0,draggable:!0,cursor:"move",drift:ta(HQ,e,t,i,["n","s","w","e"]),ondragend:ta(HH,t,{isEnd:!0})})),te(r,function(n){i.add(new a_({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ta(HQ,e,t,i,n),ondragend:ta(HH,t,{isEnd:!0})}))}),i}function HG(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=Hk(i,6),a=n[0][0],s=n[1][0],l=a-i/2,u=s-i/2,c=n[0][1],h=n[1][1],d=c-o+i/2,f=h-o+i/2,p=c-a,g=h-s,m=p+i,v=g+i;Hq(e,t,"main",a,s,p,g),r.transformable&&(Hq(e,t,"w",l,u,o,v),Hq(e,t,"e",d,u,o,v),Hq(e,t,"n",l,u,m,o),Hq(e,t,"s",l,f,m,o),Hq(e,t,"nw",l,u,o,o),Hq(e,t,"ne",d,u,o,o),Hq(e,t,"sw",l,f,o,o),Hq(e,t,"se",d,f,o,o))}function HU(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(HY(n)),i.attr({silent:!r,cursor:r?"move":"default"}),te([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var i,o,a,s=t.childOfName(n.join("")),l=1===n.length?HK(e,n[0]):(("e"===(a=[HK(i=e,(o=n)[0]),HK(i,o[1])])[0]||"w"===a[0])&&a.reverse(),a.join(""));s&&s.attr({silent:!r,invisible:!r,cursor:r?HI[l]+"-resize":null})})}function Hq(e,t,n,r,i,o,a){var s,l,u,c=t.childOfName(n);c&&c.setShape((l=HM((s=H1(e,t,[[r,i],[r+o,i+a]]))[0][0],s[1][0]),{x:l,y:u=HM(s[0][1],s[1][1]),width:Hk(s[0][0],s[1][0])-l,height:Hk(s[0][1],s[1][1])-u}))}function HY(e){return e8({strokeNoScale:!0},e.brushStyle)}function HX(e,t,n,r){var i=[HM(e,n),HM(t,r)],o=[Hk(e,n),Hk(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function HK(e,t){return({left:"w",right:"e",top:"n",bottom:"s"})[h8({w:"left",e:"right",n:"top",s:"bottom"}[t],h3(e.group))]}function HQ(e,t,n,r,i,o){var a=n.__brushOption,s=e.toRectRange(a.range),l=H0(t,i,o);te(r,function(e){var t=HA[e];s[t[0]][t[1]]+=l[t[0]]}),a.range=e.fromRectRange(HX(s[0][0],s[1][0],s[0][1],s[1][1])),HF(t,n),HH(t,{isEnd:!1})}function HJ(e,t,n,r){var i=t.__brushOption.range,o=H0(e,n,r);te(i,function(e){e[0]+=o[0],e[1]+=o[1]}),HF(e,t),HH(e,{isEnd:!1})}function H0(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function H1(e,t,n){var r=HZ(e,t);return r&&!0!==r?r.clipPath(n,e._transform):e5(n)}function H2(e){var t=e.event;t.preventDefault&&t.preventDefault()}function H5(e,t,n){return e.childOfName("main").contain(t,n)}function H3(e,t,n,r){var i,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],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return HT(i*i+o*o,.5)>6}(e)||o){if(a&&!o){"single"===s.brushMode&&Hj(e);var l=e5(s);l.brushType=H4(l.brushType,a),l.panelId=!0===a?null:a.panelId,o=e._creatingCover=HE(e,l),e._covers.push(o)}if(o){var u=H9[H4(e._brushType,a)];o.__brushOption.range=u.getCreatingRange(H1(e,o,e._track)),r&&(HL(e,o),u.updateCommon(e,o)),HN(e,o),i={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&HV(e,t,n)&&Hj(e)&&(i={isEnd:r,removeOnClick:!0});return i}function H4(e,t){return"auto"===e?t.defaultBrushType:e}var H8={mousedown:function(e){if(this._dragging)H6(this,e);else if(!e.target||!e.target.draggable){H2(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=HV(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(!function(e,t,n){if(!(!e._brushType||(r=e,i=t.offsetX,o=t.offsetY,a=r._zr,i<0||i>a.getWidth()||o<0||o>a.getHeight()))){var r,i,o,a,s=e._zr,l=e._covers,u=HV(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)&&H9[h.brushType].contain(l[c],n[0],n[1]))return}u&&s.setCursorStyle("crosshair")}}(this,e,r),this._dragging){H2(e);var i=H3(this,e,r,!1);i&&HH(this,i)}},mouseup:function(e){H6(this,e)}};function H6(e,t){if(e._dragging){H2(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=H3(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&HH(e,o)}}var H9={lineX:H7(0),lineY:H7(1),rect:{createCover:function(e,t){function n(e){return e}return H$({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=HW(e);return HX(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){HG(e,t,n,r)},updateCommon:HU,contain:H5},polygon:{createCover:function(e,t){var n=new ix;return n.add(new hy({name:"main",style:HY(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new hg({name:"main",draggable:!0,drift:ta(HJ,e,t),ondragend:ta(HH,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:H1(e,t,n)})},updateCommon:HU,contain:H5}};function H7(e){return{createCover:function(t,n){return H$({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=HW(t);return[HM(n[0][e],n[1][e]),Hk(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,a=HZ(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=[r,o];e&&l.reverse(),HG(t,n,l,i)},updateCommon:HU,contain:H5}}var We={axisPointer:1,tooltip:1,brush:1};function Wt(e){return nC.create(e)}var Wn=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Wr=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=Wo(t,e);te(Wa,function(e,t){(!n||!n.include||e6(n.include,t)>=0)&&e(i,r._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 r=Wu[e.brushType](0,n,t);e.__rangeOffset={offset:Wh[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){te(e,function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&te(r.coordSyses,function(r){var i=Wu[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){te(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r,i,o,a,s,l=Wu[e.brushType](0,n.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?Wh[e.brushType](l.values,u.offset,(r=l.xyMinMax,i=u.xyMinMax,o=Wf(r),a=Wf(i),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 tt(this._targetInfoList,function(n){var r,i,o,a,s=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:(r=Wt(r=s),function(e){return h9(e,r)}),isTargetByCursor:(i=n.coordSysModel,o=Wt(s),function(t,n){var r,a;return o.contain(n[0],n[1])&&(a=(r=e.getComponentByElement(t.topTarget))&&r.coordinateSystem,!r||r===i||!!We.hasOwnProperty(r.mainType)||!a||a.model===i)}),getLinearBrushOtherExtent:(a=Wt(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 r=this.findTargetInfo(e,n);return!0===r||r&&e6(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=Wo(t,e),i=0;i<n.length;i++){var o=n[i],a=e.panelId;if(a){if(o.panelId===a)return o}else for(var s=0;s<Ws.length;s++)if(Ws[s](r,o))return o}return!0},e}();function Wi(e){return e[0]>e[1]&&e.reverse(),e}function Wo(e,t){return i0(e,t,{includeMainTypes:Wn})}var Wa={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=tD(),a={},s={};(n||r||i)&&(te(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),te(r,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),te(i,function(e){o.set(e.id,e),a[e.id]=!0,s[e.id]=!0}),o.each(function(e){var i=e.coordinateSystem,o=[];te(i.getCartesians(),function(e,t){(e6(n,e.getAxis("x").model)>=0||e6(r,e.getAxis("y").model)>=0)&&o.push(e)}),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:Wl.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){te(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Wl.geo})})}},Ws=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],Wl={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(h3(e)),t}},Wu={lineX:ta(Wc,0),lineY:ta(Wc,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[Wi([i[0],o[0]]),Wi([i[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:tt(n,function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o}),xyMinMax:i}}};function Wc(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=Wi(tt([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),a=[];return a[e]=o,a[1-e]=[NaN,NaN],{values:o,xyMinMax:a}}var Wh={lineX:ta(Wd,0),lineY:ta(Wd,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 tt(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function Wd(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function Wf(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var Wp=iZ+"toolbox-dataZoom_",Wg=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new HR(n.getZr()),this._brushController.on("brush",to(this._onBrush,this)).mount()),function(e,t,n,r,i){var o=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(o="dataZoomSelect"===r.key&&r.dataZoomSelectActive),n._isZoomActive=o,e.setIconStatus("zoom",o?"emphasis":"normal");var a=new Wr(Wv(e),t,{include:["grid"]}).makePanelOpts(i,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,r,n),function(e,t){e.setIconStatus("back",H_(t).length>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){Wm[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,r,i=e.areas;if(e.isEnd&&i.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new Wr(Wv(this.model),a,{include:["grid"]}).matchOutputRanges(i,a,function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(s("x",n,t[0]),s("y",n,t[1])):s({lineX:"x",lineY:"y"}[r],n,t)}}),t=a,n=o,r=H_(t),te(n,function(e,n){for(var i=r.length-1;i>=0&&!r[i][n];i--);if(i<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var a=o.getPercentRange();r[0][n]={dataZoomId:n,start:a[0],end:a[1]}}}}),r.push(n),this._dispatchZoomAction(o)}function s(e,t,n){var r,i,s,l=t.getAxis(e),u=l.model,c=(r=e,i=u,a.eachComponent({mainType:"dataZoom",subType:"select"},function(e){e.getAxisModel(r,i.componentIndex)&&(s=e)}),s),h=c.findRepresentativeAxisProxy(u).getMinMaxSpan();(null!=h.minValueSpan||null!=h.maxValueSpan)&&(n=yJ(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=[];te(e,function(e,n){t.push(e5(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}(Hu),Wm={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=H_(this.ecModel))[e.length-1],e.length>1&&e.pop(),n={},te(t,function(t,r){for(var i=e.length-1;i>=0;i--)if(t=e[i][r]){n[r]=t;break}}),n))}};function Wv(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}function Wy(e){e.registerComponentModel(Hh),e.registerComponentView(Hd),Hc.saveAsImage=Hf,Hc.magicType=Hm,Hc.dataView=Hw,Hc.dataZoom=Wg,Hc.restore=HC,pr(Hl)}qO="dataZoom",qP=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),i=[],o=i0(e,Wv(r));return te(o.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),te(o.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),i}function a(e,t,n){var o=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:Wp+t+o};a[n]=o,i.push(a)}},tS(null==l1.get(qO)&&qP),l1.set(qO,qP);var Wx=n(4665),Wb=n(461);function Ww(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function WS(e,t,n){let r=n?.toLowerCase();return n&&"local"!==r&&"browser"!==r?(0,Wx.formatInTimeZone)(e,"utc"===r?"UTC":n,t):(0,Wb.format)(e,t)}function W_(e,t,n){let r=Ww({hour:"numeric",minute:"numeric",hourCycle:"h23"},n);return t<=18e5?r.second="numeric":t>=864e5&&(r.month="numeric",r.day="numeric"),new Intl.DateTimeFormat(void 0,r).format(e).replace(/, /g," ")}function WC(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 WM=e=>{if(!e)return{formattedDate:"",formattedTime:""};let t=new Date(e);return{formattedDate:(0,Wb.format)(t,"MMM dd, yyyy - "),formattedTime:(0,Wb.format)(t,"HH:mm:ss")}},Wk=(0,g.createContext)(void 0);function WT(e){let{children:t,timeZone:n}=e;return(0,p.jsx)(Wk.Provider,{value:n,children:t})}function WD(){let e=(0,g.useContext)(Wk);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>WS(t,n,e),dateFormatOptionsWithUserTimeZone:t=>Ww(t,e)}}let WA=375,WI=650,WO=650,WP=500,WR=.75,WE=8,WL=750,WN="nearby series showing in tooltip",WB="emphasized series showing as bold in tooltip",WF="#2E313E",Wz=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),WV={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},WZ=[],Wj=()=>{let[e,t]=(0,g.useState)(null);return(0,g.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},WH={wrapLabels:!0,enablePinning:!0},WW="Click chart to pin",W$="Click chart to unpin";var WG=n(7444);function WU(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 Wq(e){void 0===e&&(e={});var t,n,r,i,o,a,s=e.onResize,l=(0,g.useRef)(void 0);l.current=s;var u=e.round||Math.round,c=(0,g.useRef)(),h=(0,g.useState)({width:void 0,height:void 0}),d=h[0],f=h[1],p=(0,g.useRef)(!1);(0,g.useEffect)(function(){return p.current=!1,function(){p.current=!0}},[]);var m=(0,g.useRef)({width:void 0,height:void 0}),v=(t=(0,g.useCallback)(function(t){return c.current&&c.current.box===e.box&&c.current.round===u||(c.current={box:e.box,round:u,instance:new ResizeObserver(function(t){var n=t[0],r="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",i=WU(n,r,"inlineSize"),o=WU(n,r,"blockSize"),a=i?u(i):void 0,s=o?u(o):void 0;if(m.current.width!==a||m.current.height!==s){var c={width:a,height:s};m.current.width=a,m.current.height=s,l.current?l.current(c):p.current||f(c)}})}),c.current.instance.observe(t,{box:e.box}),function(){c.current&&c.current.instance.unobserve(t)}},[e.box,u]),n=e.ref,r=(0,g.useRef)(null),(i=(0,g.useRef)(null)).current=n,o=(0,g.useRef)(null),(0,g.useEffect)(function(){a()}),a=(0,g.useCallback)(function(){var e=o.current,n=i.current,a=e||(n?n instanceof Element?n:n.current:null);(!r.current||r.current.element!==a||r.current.subscriber!==t)&&(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:a,subscriber:t,cleanup:a?t(a):void 0})},[t]),(0,g.useEffect)(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),(0,g.useCallback)(function(e){o.current=e,a()},[a]));return(0,g.useMemo)(function(){return{ref:v,width:d.width,height:d.height}},[v,d.width,d.height])}function WY(e){let{markerColor:t,sx:n}=e;return(0,p.jsx)(vL.Z,{sx:MM({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function WX(e){let{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,p.jsxs)(x3,{spacing:.5,children:[(0,p.jsxs)(vL.Z,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,p.jsx)(WY,{markerColor:n,sx:{marginTop:.25}}),(0,p.jsxs)(vL.Z,{component:"span",children:[r,(0,p.jsx)(vL.Z,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,p.jsx)(AV.Z,{sx:e=>({borderColor:e.palette.grey["500"]})}),(0,p.jsx)(vL.Z,{sx:e=>({color:e.palette.common.white}),children:i.map(e=>{if(e){let[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,p.jsxs)(vL.Z,{sx:{display:"flex",gap:"4px"},children:[(0,p.jsx)(kz.Z,{sx:{fontSize:"11px"},children:r}),(0,p.jsx)(kz.Z,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}})})]})}function WK(e){let{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:o=!1,wrapLabels:a=!0}=e,s=t.split("{"),l=(s[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&l.length>1){let e=s[0]?`${s[0]}:`:"value:";return(0,p.jsx)(WX,{formattedY:n,metricName:e,metricLabels:l,markerColor:r})}let u=t.replace(/[,]/g,", ");return(0,p.jsxs)(vL.Z,{sx:{display:"table-row",paddingTop:.5},children:[(0,p.jsxs)(vL.Z,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,p.jsx)(WY,{markerColor:r,sx:{marginTop:.5}}),(0,p.jsx)(vL.Z,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:WP,overflow:"hidden",color:e.palette.common.white,fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:a?"normal":"nowrap"}),"aria-label":o?WB:WN,children:u})]}),(0,p.jsx)(vL.Z,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:o?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}function WQ(e){let{series:t,wrapLabels:n}=e,r=(0,g.useMemo)(()=>null===t?null:t.sort((e,t)=>e.y>t.y?-1:1),[t]);return null===t||null===r?null:(0,p.jsx)(vL.Z,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map(({datumIdx:e,seriesIdx:t,seriesName:i,y:o,formattedY:a,markerColor:s,isClosestToCursor:l})=>{if(null===e||null===t)return null;let u=t.toString()+e.toString();return(0,p.jsx)(WK,{seriesName:i,y:o,formattedY:a,markerColor:s,totalSeries:r.length,wrapLabels:n,emphasizeText:l},u)})})}var WJ=n(9140);function W0(e){return(0,T.ZP)("MuiSwitch",e)}let W1=(0,k.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),W2=e=>{let{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&`edge${(0,w.Z)(n)}`,`size${(0,w.Z)(r)}`],switchBase:["switchBase",`color${(0,w.Z)(i)}`,o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,y.Z)(s,W0,t);return{...t,...l}},W5=(0,S.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,w.Z)(n.edge)}`],t[`size${(0,w.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,[`& .${W1.thumb}`]:{width:16,height:16},[`& .${W1.switchBase}`]:{padding:4,[`&.${W1.checked}`]:{transform:"translateX(16px)"}}}}]}),W3=(0,S.ZP)(WJ.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.switchBase,{[`& .${W1.input}`]:t.input},"default"!==n.color&&t[`color${(0,w.Z)(n.color)}`]]}})((0,_.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}),[`&.${W1.checked}`]:{transform:"translateX(20px)"},[`&.${W1.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${W1.checked} + .${W1.track}`]:{opacity:.5},[`&.${W1.disabled} + .${W1.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${"light"===e.palette.mode?.12:.2}`},[`& .${W1.input}`]:{left:"-100%",width:"300%"}})),(0,_.Z)(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,C.Z)(["light"])).map(([t])=>({props:{color:t},style:{[`&.${W1.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,x.Fq)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${W1.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,x.$n)(e.palette[t].main,.62):(0,x._j)(e.palette[t].main,.55)}`}},[`&.${W1.checked} + .${W1.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),W4=(0,S.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,_.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}`}))),W8=(0,S.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,_.Z)(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),W6=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s,...l}=n,u={...n,color:i,edge:o,size:a},c=W2(u),h=(0,p.jsx)(W8,{className:c.thumb,ownerState:u});return(0,p.jsxs)(W5,{className:(0,v.Z)(c.root,r),sx:s,ownerState:u,children:[(0,p.jsx)(W3,{type:"checkbox",icon:h,checkedIcon:h,ref:t,ownerState:u,...l,classes:{...c,root:c.switchBase}}),(0,p.jsx)(W4,{className:c.track,ownerState:u})]})});var W9=n(1889),W7=n(5186);let $e=(0,g.memo)(function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:r,enablePinning:i=!0,onShowAllClick:o,onUnpinClick:a}){let s=e[0]?.date??null;if(null===s)return null;let l=i&&t>5;return(0,p.jsxs)(vL.Z,{sx:e=>({width:"100%",maxWidth:WI,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??WF,position:"sticky",top:0,left:0}),children:[(0,p.jsxs)(vL.Z,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(e=>{let{formattedTime:t,formattedDate:n}=WM(e);return(0,p.jsxs)(vL.Z,{children:[(0,p.jsx)(kz.Z,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:n}),(0,p.jsx)(kz.Z,{variant:"caption",children:(0,p.jsx)("strong",{children:t})})]})})(s),(0,p.jsxs)(x3,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[l&&(0,p.jsxs)(x3,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,p.jsx)(kz.Z,{sx:{fontSize:11},children:"Show All"}),(0,p.jsx)(W6,{checked:r,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}})})]}),i&&(0,p.jsxs)(x3,{direction:"row",alignItems:"center",children:[(0,p.jsx)(kz.Z,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:n?W$:WW}),n?(0,p.jsx)(W9.default,{onClick:()=>{void 0!==a&&a()},sx:{fontSize:16,cursor:"pointer"}}):(0,p.jsx)(W7.default,{sx:{fontSize:16}})]})]})]}),(0,p.jsx)(AV.Z,{sx:e=>({width:"100%",borderColor:e.palette.grey["500"]})})]})}),$t=1e3,$n="Pinned Crosshair",$r={name:$n,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};function $i(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 $o(e){e.dispatchAction({type:"restore"})}function $a(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function $s(e,t,n){if(void 0===n)return null;let r=[e,t];return n.containPixel("grid",r)?n.convertFromPixel("grid",r):null}function $l(e,t,n,r,i,o){let a=o.length>0?o[o.length-1]:i[i.length-1];void 0!==a&&e.dispatchAction({type:"select",seriesIndex:a.seriesIndex,dataIndex:a.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay",seriesIndex:r}),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 $u(e){return e[e.length-1]?.name===$n}function $c(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(let[i]of e){let e=Math.abs(i-t);e<r&&(n=i,r=e)}return n}function $h(e,t){if(void 0===t)return null;let n=e.length,r=null;for(let i=0;i<n;i++){let o=n>0?e[i]:null;if(!o)break;r=$c(o.values,t)}return r}let $d=5.5,$f=30,$p=5;function $g(e,t,n,r,i,o){let a=[],s=n[0]??null,l=n[1]??null;if(null===s||null===l||void 0===i.dispatchAction||!Array.isArray(e))return a;let u=[],c=[],h=[],d=[],f=[],p=e.length,g=new Map,m=$c(e[0]?.values,s);if(null===m)return WZ;for(let n=0;n<p;n++){let s=t[n];if(!s)break;let v=p>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+r&&l>=v-r){let t=$x({valueToCheck:l,baseValue:v,percentage:Math.max(p>$p?2:5,100/p)});if(t){c.push(n);let t=g.get(v)??0;g.set(v,t+1),t>0&&f.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:v}),d.push({seriesIndex:n,dataIndex:e,seriesName:x,yValue:v})}else h.push(n),i.dispatchAction({type:"downplay",seriesIndex:n});let r=eE(v,o);a.push({seriesIdx:n,datumIdx:e,seriesName:x,date:m,x:s,y:v,formattedY:r,markerColor:b.toString(),isClosestToCursor:t}),u.push(n)}}}return $l(i,u,c,h,d,f),a}function $m(e,t,n,r,i){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>=$t)break;let f=d.name?d.name.toString():"",p=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=$x({valueToCheck:s,baseValue:v,percentage:Math.max(h>$p?2:5,100/h)});e?u.push(t):(c.push(t),r?.dispatchAction!==void 0&&r.dispatchAction({type:"downplay",seriesIndex:t}));let n=m>0x174876e7ff?m:1e3*m,a=eE(v,i);o.push({seriesIdx:t,datumIdx:g,seriesName:f,date:n,x:m,y:v,formattedY:a,markerColor:p.toString(),isClosestToCursor:e}),l.push(t)}}}return r?.dispatchAction!==void 0&&(r.dispatchAction({type:"downplay",seriesIndex:c}),u.length>0?r.dispatchAction({type:"highlight",seriesIndex:u,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),o}function $v({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:i,format:o,showAllSeries:a=!1}){if(void 0===i||null===e)return WZ;let s=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(s=!0)}}if(null!==t&&(e=t,s=!0),!1===s||null===n||void 0===i._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return WZ;let l=$s(e.plotCanvas.x,e.plotCanvas.y,i);if(null!==l){let e=$b({yInterval:i._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.length,showAllSeries:a});return $g(n,r,l,e,i,o)}return WZ}function $y({mousePos:e,pinnedPos:t,chartData:n,chart:r,format:i,showAllSeries:o=!1}){if(void 0===r||null===e)return[];let a=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&r.getDom()===e&&(a=!0)}}if(null!==t&&(e=t,a=!0),!1===a||void 0===r._model)return[];let s=$b({yInterval:r._model.getComponent("yAxis").axis.scale._interval,totalSeries:n.timeSeries.length,showAllSeries:o}),l=[e.plotCanvas.x??0,e.plotCanvas.y??0];if(r.containPixel("grid",l)){let e=r.convertFromPixel("grid",l);if(void 0!==e[0]&&void 0!==e[1])return $m(n,e,s,r,i)}return[]}function $x({valueToCheck:e,baseValue:t,percentage:n}){let r=n/100*t;return e>=t-r&&e<=t+r}function $b({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let r=.3*e;return t>$p?Math.max(r,e*$f/t):Math.max(r,e*$d)}function $w(e,t,n,r,i){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(i){let e=i.getBoundingClientRect();o=o-e.left+i.scrollLeft,a=a-e.top+i.scrollTop;let t=e.top+i.scrollHeight;a+n>t&&(a=Math.max(t-n-16,WE/2))}else a+n>window.innerHeight+window.scrollY&&(a=Math.max(window.innerHeight+window.scrollY-n-16,WE/2));return o+r>window.innerWidth&&(o=e.page.x-r-32),o<32&&(o=32),a<WE/2&&(a=WE/2),`translate3d(${o}px, ${a}px, 0)`}function $S(e,t,n){return{minWidth:WA,maxWidth:WI,maxHeight:(n?n-WE:void 0)??WO,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??WF,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 $_=(0,g.memo)(function({chartRef:e,chartData:t,enablePinning:n=!0,wrapLabels:r,format:i,onUnpinClick:o,pinnedPos:a,containerId:s}){let[l,u]=(0,g.useState)(!1),c=Wj(),{height:h,width:d,ref:f}=Wq(),m=(0,g.useRef)(),v=null!==a&&n;if(null===c||null===c.target||null===a&&"CANVAS"!==c.target.tagName)return null;let y=$y({mousePos:c,chartData:t,pinnedPos:a,chart:e.current,format:i,showAllSeries:l});if(0===y.length)return null;let x=t.timeSeries.length,b=s?document.querySelector(s):void 0,w=b?b.getBoundingClientRect().height:void 0;return m.current=$w(c,a,h??0,d??0,b),(0,p.jsx)(WG.Z,{container:b,children:(0,p.jsx)(vL.Z,{ref:f,sx:e=>({minWidth:WA,maxWidth:WI,maxHeight:w??WO,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??WF,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"all 0.1s ease-out",zIndex:null!==a?"auto":e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}),style:{transform:m.current,display:m.current?"block":"none"},children:(0,p.jsxs)(x3,{spacing:.5,children:[(0,p.jsx)($e,{nearbySeries:y,totalSeries:x,enablePinning:n,isTooltipPinned:v,showAllSeries:l,onShowAllClick:e=>u(e),onUnpinClick:o}),(0,p.jsx)(WQ,{series:y,wrapLabels:r})]})})})});pr([jv,vr,xx,jZ,Ht,Ho,vu,Wy,vI,xN,vE]);let $C=(0,g.forwardRef)(function({height:e,data:t,yAxis:n,format:r,grid:i,legend:o,tooltipConfig:a=WH,noDataVariant:s="message",syncGroup:l,onDataZoom:u,onDoubleClick:c,__experimentalEChartsOptionsOverride:h},d){let f=vz(),m=(0,g.useRef)(),[v,y]=(0,g.useState)(!0),[x,b]=(0,g.useState)(null),{timeZone:w}=WD(),[S,_]=(0,g.useState)(!1),[C,M]=(0,g.useState)(0);(0,g.useImperativeHandle)(d,()=>({highlightSeries({id:e}){m.current&&m.current.dispatchAction({type:"highlight",seriesId:e})},clearHighlightedSeries:()=>{m.current&&$a(m.current)}}),[]);let k=(0,g.useMemo)(()=>({datazoom:e=>{if(void 0===u&&setTimeout(()=>{b(null)},10),void 0===u||void 0===e.batch[0])return;let n=e.batch[0].startValue??0,r=e.batch[0].endValue??t.xAxis.length-1,i=t.xAxis[n],o=t.xAxis[r];void 0!==i&&void 0!==o&&u({start:i,end:o,startIndex:n,endIndex:r})}}),[t,u,b]);void 0!==m.current&&$i(m.current);let{noDataOption:T}=f,D=(0,g.useMemo)(()=>{if(void 0===t.timeSeries)return{};if(null===t.timeSeries||0===t.timeSeries.length&&"message"===s)return T;let e=t.rangeMs??xH(t.xAxis),a={series:t.timeSeries,xAxis:{type:"category",data:t.xAxis,max:t.xAxisMax,axisLabel:{formatter:t=>W_(t,e,w)}},yAxis:xj(n,r),animation:!1,tooltip:{show:!0,trigger:"axis",showContent:!1},axisPointer:{type:"line",z:0,triggerEmphasis:!1,triggerTooltip:!1,snap:!0},toolbox:{feature:{dataZoom:{icon:null,yAxisIndex:"none"}}},grid:i,legend:o};return h?h(a):a},[t,n,r,i,o,T,w,h,s]);return(0,p.jsxs)(vL.Z,{style:{height:e},onClick:e=>{a.enablePinning&&e.target instanceof HTMLCanvasElement&&b(t=>null===t?{page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY},target:e.target}:null)},onMouseDown:e=>{let{clientX:t}=e;_(!0),M(t)},onMouseMove:e=>{if(!(e.target instanceof HTMLCanvasElement))return;let{clientX:t}=e;S&&t-C>0&&y(!1)},onMouseUp:()=>{_(!1),M(0),y(!0)},onMouseLeave:()=>{null===x&&y(!1),void 0!==m.current&&$a(m.current)},onMouseEnter:()=>{y(!0),void 0!==m.current&&$i(m.current)},onDoubleClick:e=>{b(null),void 0===c?void 0!==m.current&&$o(m.current):c(e)},children:[!0===v&&D.tooltip?.showContent===!1&&!0!==a.hidden&&(0,p.jsx)($_,{chartRef:m,chartData:t,wrapLabels:a.wrapLabels,enablePinning:a.enablePinning,pinnedPos:x,format:r,onUnpinClick:()=>{b(null)},containerId:f.tooltipPortalContainerId}),(0,p.jsx)(xz,{sx:{width:"100%",height:"100%"},option:D,theme:f.echartsTheme,onEvents:k,_instance:m,syncGroup:l})]})});var $M=n(8797),$k=e=>"checkbox"===e.type,$T=e=>e instanceof Date,$D=e=>null==e;let $A=e=>"object"==typeof e;var $I=e=>!$D(e)&&!Array.isArray(e)&&$A(e)&&!$T(e),$O=e=>$I(e)&&e.target?$k(e.target)?e.target.checked:e.target.value:e,$P=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$R=(e,t)=>e.has($P(t)),$E=e=>{let t=e.constructor&&e.constructor.prototype;return $I(t)&&t.hasOwnProperty("isPrototypeOf")},$L="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function $N(e){let t;let n=Array.isArray(e),r="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(!(!($L&&(e instanceof Blob||r))&&(n||$I(e))))return e;else if(t=n?[]:{},n||$E(e))for(let n in e)e.hasOwnProperty(n)&&(t[n]=$N(e[n]));else t=e;return t}var $B=e=>Array.isArray(e)?e.filter(Boolean):[],$F=e=>void 0===e,$z=(e,t,n)=>{if(!t||!$I(e))return n;let r=$B(t.split(/[,[\].]+?/)).reduce((e,t)=>$D(e)?e:e[t],e);return $F(r)||r===e?$F(e[t])?n:e[t]:r},$V=e=>"boolean"==typeof e,$Z=e=>/^\w*$/.test(e),$j=e=>$B(e.replace(/["|']|\]/g,"").split(/\.|\[/)),$H=(e,t,n)=>{let r=-1,i=$Z(t)?[t]:$j(t),o=i.length,a=o-1;for(;++r<o;){let t=i[r],o=n;if(r!==a){let n=e[t];o=$I(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=o,e=e[t]}return e};let $W={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},$$={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},$G=g.createContext(null),$U=()=>g.useContext($G);var $q=(e,t,n,r=!0)=>{let i={defaultValues:t._defaultValues};for(let o in e)Object.defineProperty(i,o,{get:()=>(t._proxyFormState[o]!==$W.all&&(t._proxyFormState[o]=!r||$W.all),n&&(n[o]=!0),e[o])});return i},$Y=e=>$I(e)&&!Object.keys(e).length,$X=(e,t,n,r)=>{n(e);let{name:i,...o}=e;return $Y(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(e=>t[e]===(!r||$W.all))},$K=e=>Array.isArray(e)?e:[e],$Q=(e,t,n)=>!e||!t||e===t||$K(e).some(e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e)));function $J(e){let t=g.useRef(e);t.current=e,g.useEffect(()=>{let n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var $0=e=>"string"==typeof e,$1=(e,t,n,r,i)=>$0(e)?(r&&t.watch.add(e),$z(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),$z(n,e))):(r&&(t.watchAll=!0),n);let $2=e=>e.render(function(e){let t=$U(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=$R(i._names.array,n),s=function(e){let t=$U(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e||{},s=g.useRef(r);s.current=r,$J({disabled:o,subject:n._subjects.values,next:e=>{$Q(s.current,e.name,a)&&u($N($1(s.current,n._names,e.values||n._formValues,!1,i)))}});let[l,u]=g.useState(n._getWatch(r,i));return g.useEffect(()=>n._removeUnmounted()),l}({control:i,name:n,defaultValue:$z(i._formValues,n,$z(i._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){let t=$U(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[a,s]=g.useState(n._formState),l=g.useRef(!0),u=g.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=g.useRef(i);return c.current=i,$J({disabled:r,next:e=>l.current&&$Q(c.current,e.name,o)&&$X(e,u.current,n._updateFormState)&&s({...n._formState,...e}),subject:n._subjects.state}),g.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),g.useMemo(()=>$q(a,n,u.current,!1),[a,n])}({control:i,name:n,exact:!0}),u=g.useRef(i.register(n,{...e.rules,value:s,...$V(e.disabled)?{disabled:e.disabled}:{}})),c=g.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!$z(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!$z(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!$z(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!$z(l.validatingFields,n)},error:{enumerable:!0,get:()=>$z(l.errors,n)}}),[l,n]),h=g.useMemo(()=>({name:n,value:s,...$V(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:e=>u.current.onChange({target:{value:$O(e),name:n},type:"change"}),onBlur:()=>u.current.onBlur({target:{value:$z(i._formValues,n),name:n},type:"blur"}),ref:e=>{let t=$z(i._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}}),[n,i._formValues,r,l.disabled,s,i._fields]);return g.useEffect(()=>{let e=i._options.shouldUnregister||o,t=(e,t)=>{let n=$z(i._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){let e=$N($z(i._options.defaultValues,n));$H(i._defaultValues,n,e),$F($z(i._formValues,n))&&$H(i._formValues,n,e)}return a||i.register(n),()=>{(a?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,a,o]),g.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),g.useMemo(()=>({field:h,formState:l,fieldState:c}),[h,l,c])}(e));var $5=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},$3=()=>{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)})},$4=(e,t,n={})=>n.shouldFocus||$F(n.shouldFocus)?n.focusName||`${e}.${$F(n.focusIndex)?t:n.focusIndex}.`:"",$8=e=>({isOnSubmit:!e||e===$W.onSubmit,isOnBlur:e===$W.onBlur,isOnChange:e===$W.onChange,isOnAll:e===$W.all,isOnTouch:e===$W.onTouched}),$6=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let $9=(e,t,n,r)=>{for(let i of n||Object.keys(e)){let n=$z(e,i);if(n){let{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if($9(o,t))break}else if($I(o)&&$9(o,t))break}}};var $7=(e,t,n)=>{let r=$K($z(e,n));return $H(r,"root",t[n]),$H(e,n,r),e},Ge=e=>"file"===e.type,Gt=e=>"function"==typeof e,Gn=e=>{if(!$L)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Gr=e=>$0(e),Gi=e=>"radio"===e.type,Go=e=>e instanceof RegExp;let Ga={value:!1,isValid:!1},Gs={value:!0,isValid:!0};var Gl=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&&!$F(e[0].attributes.value)?$F(e[0].value)||""===e[0].value?Gs:{value:e[0].value,isValid:!0}:Gs:Ga}return Ga};let Gu={isValid:!1,value:null};var Gc=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,Gu):Gu;function Gh(e,t,n="validate"){if(Gr(e)||Array.isArray(e)&&e.every(Gr)||$V(e)&&!e)return{type:n,message:Gr(e)?e:"",ref:t}}var Gd=e=>$I(e)&&!Go(e)?e:{value:e,message:""},Gf=async(e,t,n,r,i,o)=>{let{ref:a,refs:s,required:l,maxLength:u,minLength:c,min:h,max:d,pattern:f,validate:p,name:g,valueAsNumber:m,mount:v}=e._f,y=$z(n,g);if(!v||t.has(g))return{};let x=s?s[0]:a,b=e=>{i&&x.reportValidity&&(x.setCustomValidity($V(e)?"":e||""),x.reportValidity())},w={},S=Gi(a),_=$k(a),C=(m||Ge(a))&&$F(a.value)&&$F(y)||Gn(a)&&""===a.value||""===y||Array.isArray(y)&&!y.length,M=$5.bind(null,g,r,w),k=(e,t,n,r=$$.maxLength,i=$$.minLength)=>{let o=e?t:n;w[g]={type:e?r:i,message:o,ref:a,...M(e?r:i,o)}};if(o?!Array.isArray(y)||!y.length:l&&(!(S||_)&&(C||$D(y))||$V(y)&&!y||_&&!Gl(s).isValid||S&&!Gc(s).isValid)){let{value:e,message:t}=Gr(l)?{value:!!l,message:l}:Gd(l);if(e&&(w[g]={type:$$.required,message:t,ref:x,...M($$.required,t)},!r))return b(t),w}if(!C&&(!$D(h)||!$D(d))){let e,t;let n=Gd(d),i=Gd(h);if($D(y)||isNaN(y)){let r=a.valueAsDate||new Date(y),o=e=>new Date(new Date().toDateString()+" "+e),s="time"==a.type,l="week"==a.type;$0(n.value)&&y&&(e=s?o(y)>o(n.value):l?y>n.value:r>new Date(n.value)),$0(i.value)&&y&&(t=s?o(y)<o(i.value):l?y<i.value:r<new Date(i.value))}else{let r=a.valueAsNumber||(y?+y:y);$D(n.value)||(e=r>n.value),$D(i.value)||(t=r<i.value)}if((e||t)&&(k(!!e,n.message,i.message,$$.max,$$.min),!r))return b(w[g].message),w}if((u||c)&&!C&&($0(y)||o&&Array.isArray(y))){let e=Gd(u),t=Gd(c),n=!$D(e.value)&&y.length>+e.value,i=!$D(t.value)&&y.length<+t.value;if((n||i)&&(k(n,e.message,t.message),!r))return b(w[g].message),w}if(f&&!C&&$0(y)){let{value:e,message:t}=Gd(f);if(Go(e)&&!y.match(e)&&(w[g]={type:$$.pattern,message:t,ref:a,...M($$.pattern,t)},!r))return b(t),w}if(p){if(Gt(p)){let e=Gh(await p(y,n),x);if(e&&(w[g]={...e,...M($$.validate,e.message)},!r))return b(e.message),w}else if($I(p)){let e={};for(let t in p){if(!$Y(e)&&!r)break;let i=Gh(await p[t](y,n),x,t);i&&(e={...i,...M(t,i.message)},b(i.message),r&&(w[g]=e))}if(!$Y(e)&&(w[g]={ref:x,...e},!r))return w}}return b(!0),w},Gp=(e,t)=>[...e,...$K(t)],Gg=e=>Array.isArray(e)?e.map(()=>void 0):void 0;function Gm(e,t,n){return[...e.slice(0,t),...$K(n),...e.slice(t)]}var Gv=(e,t,n)=>Array.isArray(e)?($F(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],Gy=(e,t)=>[...$K(t),...$K(e)],Gx=(e,t)=>$F(t)?[]:function(e,t){let n=0,r=[...e];for(let e of t)r.splice(e-n,1),n++;return $B(r).length?r:[]}(e,$K(t).sort((e,t)=>e-t)),Gb=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},Gw=(e,t,n)=>(e[t]=n,e);$W.onSubmit,$W.onChange;var GS=n(3755),G_=n(6396);function GC({control:e,...t}){let{fields:n,append:r,remove:i}=function(e){let t=$U(),{control:n=t.control,name:r,keyName:i="id",shouldUnregister:o,rules:a}=e,[s,l]=g.useState(n._getFieldArray(r)),u=g.useRef(n._getFieldArray(r).map($3)),c=g.useRef(s),h=g.useRef(r),d=g.useRef(!1);h.current=r,c.current=s,n._names.array.add(r),a&&n.register(r,a),$J({next:({values:e,name:t})=>{if(t===h.current||!t){let t=$z(e,h.current);Array.isArray(t)&&(l(t),u.current=t.map($3))}},subject:n._subjects.array});let f=g.useCallback(e=>{d.current=!0,n._updateFieldArray(r,e)},[n,r]);return g.useEffect(()=>{if(n._state.action=!1,$6(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!$8(n._options.mode).isOnSubmit||n._formState.isSubmitted)){if(n._options.resolver)n._executeSchema([r]).then(e=>{let t=$z(e.errors,r),i=$z(n._formState.errors,r);(i?!t&&i.type||t&&(i.type!==t.type||i.message!==t.message):t&&t.type)&&(t?$H(n._formState.errors,r,t):function e(t,n){let r=Array.isArray(n)?n:$Z(n)?[n]:$j(n),i=1===r.length?t:function(e,t){let n=t.slice(0,-1).length,r=0;for(;r<n;)e=$F(e)?r++:e[t[r++]];return e}(t,r),o=r.length-1,a=r[o];return i&&delete i[a],0!==o&&($I(i)&&$Y(i)||Array.isArray(i)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!$F(e[t]))return!1;return!0}(i))&&e(t,r.slice(0,-1)),t}(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{let e=$z(n._fields,r);e&&e._f&&!($8(n._options.reValidateMode).isOnSubmit&&$8(n._options.mode).isOnSubmit)&&Gf(e,n._names.disabled,n._formValues,n._options.criteriaMode===$W.all,n._options.shouldUseNativeValidation,!0).then(e=>!$Y(e)&&n._subjects.state.next({errors:$7(n._formState.errors,e,r)}))}}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&$9(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,r,n]),g.useEffect(()=>($z(n._formValues,r)||n._updateFieldArray(r),()=>{(n._options.shouldUnregister||o)&&n.unregister(r)}),[r,n,i,o]),{swap:g.useCallback((e,t)=>{let i=n._getFieldArray(r);Gb(i,e,t),Gb(u.current,e,t),f(i),l(i),n._updateFieldArray(r,i,Gb,{argA:e,argB:t},!1)},[f,r,n]),move:g.useCallback((e,t)=>{let i=n._getFieldArray(r);Gv(i,e,t),Gv(u.current,e,t),f(i),l(i),n._updateFieldArray(r,i,Gv,{argA:e,argB:t},!1)},[f,r,n]),prepend:g.useCallback((e,t)=>{let i=$K($N(e)),o=Gy(n._getFieldArray(r),i);n._names.focus=$4(r,0,t),u.current=Gy(u.current,i.map($3)),f(o),l(o),n._updateFieldArray(r,o,Gy,{argA:Gg(e)})},[f,r,n]),append:g.useCallback((e,t)=>{let i=$K($N(e)),o=Gp(n._getFieldArray(r),i);n._names.focus=$4(r,o.length-1,t),u.current=Gp(u.current,i.map($3)),f(o),l(o),n._updateFieldArray(r,o,Gp,{argA:Gg(e)})},[f,r,n]),remove:g.useCallback(e=>{let t=Gx(n._getFieldArray(r),e);u.current=Gx(u.current,e),f(t),l(t),Array.isArray($z(n._fields,r))||$H(n._fields,r,void 0),n._updateFieldArray(r,t,Gx,{argA:e})},[f,r,n]),insert:g.useCallback((e,t,i)=>{let o=$K($N(t)),a=Gm(n._getFieldArray(r),e,o);n._names.focus=$4(r,e,i),u.current=Gm(u.current,e,o.map($3)),f(a),l(a),n._updateFieldArray(r,a,Gm,{argA:e,argB:Gg(t)})},[f,r,n]),update:g.useCallback((e,t)=>{let i=$N(t),o=Gw(n._getFieldArray(r),e,i);u.current=[...o].map((t,n)=>t&&n!==e?u.current[n]:$3()),f(o),l([...o]),n._updateFieldArray(r,o,Gw,{argA:e,argB:i},!0,!1)},[f,r,n]),replace:g.useCallback(e=>{let t=$K($N(e));u.current=t.map($3),f([...t]),l([...t]),n._updateFieldArray(r,[...t],e=>e,{},!0,!1)},[f,r,n]),fields:g.useMemo(()=>s.map((e,t)=>({...e,[i]:u.current[t]||$3()})),[s,i])}}({control:e,name:"panelDefinition.spec.links"});return(0,p.jsxs)(x3,{...t,gap:3,children:[n&&n.length>0?n.map((t,n)=>(0,p.jsxs)(g.Fragment,{children:[(0,p.jsxs)(x3,{direction:"row",gap:1,alignItems:"center",children:[(0,p.jsx)(GM,{control:e,index:n}),(0,p.jsx)(x4.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>i(n),children:(0,p.jsx)(G_.default,{})})]}),(0,p.jsx)(AV.Z,{})]},t.id)):(0,p.jsx)(kz.Z,{variant:"subtitle1",mb:2,fontStyle:"italic",children:"No links defined"}),(0,p.jsx)(x4.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>r({url:""}),children:(0,p.jsx)(GS.default,{})})]})}function GM({control:e,index:t}){return(0,p.jsxs)(x3,{gap:2,flexGrow:1,children:[(0,p.jsxs)(x3,{direction:"row",gap:2,children:[(0,p.jsx)($2,{control:e,name:`panelDefinition.spec.links.${t}.url`,render:({field:e,fieldState:t})=>(0,p.jsx)(x8.Z,{...e,required:!0,fullWidth:!0,label:"URL",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})}),(0,p.jsx)($2,{control:e,name:`panelDefinition.spec.links.${t}.name`,render:({field:e,fieldState:t})=>(0,p.jsx)(x8.Z,{...e,fullWidth:!0,label:"Name",defaultValue:"",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})}),(0,p.jsx)($2,{control:e,name:`panelDefinition.spec.links.${t}.tooltip`,render:({field:e,fieldState:t})=>(0,p.jsx)(x8.Z,{...e,fullWidth:!0,label:"Tooltip",defaultValue:"",error:!!t.error,helperText:t.error?.message,onChange:t=>{e.onChange(t)}})})]}),(0,p.jsxs)(x3,{gap:2,direction:"row",alignItems:"center",children:[(0,p.jsx)($2,{control:e,name:`panelDefinition.spec.links.${t}.renderVariables`,render:({field:e})=>(0,p.jsx)($M.Z,{label:"Render Variables",control:(0,p.jsx)(Tl.Z,{...e,checked:e.value,onChange:t=>e.onChange(t.target.checked)})})}),(0,p.jsx)($2,{control:e,name:`panelDefinition.spec.links.${t}.targetBlank`,render:({field:e})=>(0,p.jsx)($M.Z,{label:"Open in new tab",control:(0,p.jsx)(Tl.Z,{...e,checked:e.value,onChange:t=>e.onChange(t.target.checked)})})})]})]})}let Gk=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function GT({disablePercentageMode:e,onChange:t,value:n="value"}){return(0,p.jsx)(T7,{label:"Mode",control:(0,p.jsx)(Dn,{value:Gk.find(e=>e.id===n),options:Gk,getOptionLabel:e=>e.label,getOptionDisabled:t=>"percentage"===t.id&&e,onChange:(e,{id:n})=>{t(n)},disableClearable:!0})})}let GD=g.createContext();function GA(e){return(0,T.ZP)("MuiGrid",e)}let GI=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],GO=(0,k.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}`),...GI.map(e=>`grid-xs-${e}`),...GI.map(e=>`grid-sm-${e}`),...GI.map(e=>`grid-md-${e}`),...GI.map(e=>`grid-lg-${e}`),...GI.map(e=>`grid-xl-${e}`)]);function GP({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(e=>{""===n&&0!==t[e]&&(n=e)});let r=Object.keys(e).sort((t,n)=>e[t]-e[n]);return r.slice(0,r.indexOf(n))}let GR=(0,S.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n,c=[];r&&(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 r=[];return t.forEach(t=>{let i=e[t];Number(i)>0&&r.push(n[`spacing-${t}-${String(i)}`])}),r}(a,u,t));let h=[];return u.forEach(e=>{let r=n[e];r&&h.push(t[`grid-${e}-${String(r)}`])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...c,"row"!==i&&t[`direction-xs-${String(i)}`],"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,xX.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,xX.k9)({theme:e},n,e=>{let t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${GO.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){let{container:n,rowSpacing:r}=t,i={};if(n&&0!==r){let t;let n=(0,xX.P$)({values:r,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=GP({breakpoints:e.breakpoints.values,values:n})),i=(0,xX.k9)({theme:e},n,(n,r)=>{let i=e.spacing(n);return"0px"!==i?{marginTop:`calc(-1 * ${i})`,[`& > .${GO.item}`]:{paddingTop:i}}:t?.includes(r)?{}:{marginTop:0,[`& > .${GO.item}`]:{paddingTop:0}}})}return i},function({theme:e,ownerState:t}){let{container:n,columnSpacing:r}=t,i={};if(n&&0!==r){let t;let n=(0,xX.P$)({values:r,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=GP({breakpoints:e.breakpoints.values,values:n})),i=(0,xX.k9)({theme:e},n,(n,r)=>{let i=e.spacing(n);if("0px"!==i){let e=`calc(-1 * ${i})`;return{width:`calc(100% + ${i})`,marginLeft:e,[`& > .${GO.item}`]:{paddingLeft:i}}}return t?.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${GO.item}`]:{paddingLeft:0}}})}return i},function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,i)=>{let o={};if(t[i]&&(n=t[i]),!n)return r;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,xX.P$)({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof a?a[i]:a;if(null==s)return r;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[i]?Object.assign(r,o):r[e.breakpoints.up(i)]=o,r},{})}),GE=e=>{let{classes:t,container:n,direction:r,item:i,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 r=e[t];if(Number(r)>0){let e=`spacing-${t}-${String(r)}`;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",i&&"item",s&&"zeroMinWidth",...u,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...c]};return(0,y.Z)(h,GA,t)},GL=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiGrid"}),{breakpoints:r}=(0,wP.Z)(),i=(0,xq.Z)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:u=!1,direction:c="row",item:h=!1,rowSpacing:d,spacing:f=0,wrap:m="wrap",zeroMinWidth:y=!1,...x}=i,b=g.useContext(GD),w=u?a||12:b,S={},_={...x};r.keys.forEach(e=>{null!=x[e]&&(S[e]=x[e],delete _[e])});let C={...i,columns:w,container:u,direction:c,item:h,rowSpacing:d||f,columnSpacing:s||f,wrap:m,zeroMinWidth:y,spacing:f,...S,breakpoints:r.keys},k=GE(C);return(0,p.jsx)(GD.Provider,{value:w,children:(0,p.jsx)(GR,{ownerState:C,className:(0,v.Z)(k.root,o),as:l,ref:t,..._})})}),GN=({children:e})=>(0,p.jsx)(GL,{item:!0,xs:4,children:(0,p.jsx)(x3,{spacing:3,children:e})}),GB=({children:e})=>(0,p.jsx)(GL,{container:!0,spacing:8,children:e}),GF=({title:e,children:t,icon:n})=>(0,p.jsxs)(vL.Z,{children:[(0,p.jsxs)(vL.Z,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,p.jsx)(kz.Z,{variant:"overline",component:"h4",children:e}),n&&(0,p.jsx)(vL.Z,{sx:{marginLeft:"auto"},children:n})]}),(0,p.jsx)(x3,{spacing:1,children:t})]});var Gz=n(6224);function GV(e){let{message:t}=e;return(0,p.jsx)(x3,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,p.jsx)(kz.Z,{children:t})})}function GZ(e){let{resource:t}=e;return(0,p.jsx)(GV,{message:`No ${t}`})}function Gj(e){let{variant:t="rounded"}=e;return(0,p.jsx)(x3,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,p.jsx)(Gz.Z,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}let GH=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function GW({onChange:e,value:t="desc"}){return(0,p.jsx)(T7,{label:"Sort",control:(0,p.jsx)(Dn,{value:GH.find(e=>e.id===t),options:GH,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function G$({onChange:e,value:t,...n}){let r=t=>{e(t)};return(0,p.jsxs)(E,{"aria-label":"Sort",...n,children:[(0,p.jsx)(L.Z,{onClick:()=>r(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,p.jsx)(L.Z,{onClick:()=>r("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,p.jsx)(L.Z,{onClick:()=>r("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}function GG({text:e,fontWeight:t,width:n,height:r,lineHeight:i,maxSize:a,fontSizeOverride:s}){let l=function(){if(!o&&null===(o=document.createElement("canvas").getContext("2d")))throw Error("Canvas context is null.");return o}(),{echartsTheme:u}=vz();if(void 0!==s)return Number(s);let c=u.textStyle,h=Number(c?.fontSize)??12,d=c?.fontFamily??"Lato",f=`${t} ${h}px ${d}`;l.font=f;let p=Math.min(r/i,n/l.measureText(e).width*h);return a?Math.min(p,a):p}let GU=(e,t)=>null===e?"null":"number"==typeof e?eE(e,t):void 0===e?"":e;pr([jv,vr,va,vu,vI,vE]);let Gq=e=>{let{width:t,height:n,data:r,sparkline:i,showSeriesName:o,format:a,valueFontSize:s}=e,l=vz(),u=r.color,c=GU(r.calculatedValue,a),h=l.container.padding.default,d=GG({text:r?.seriesData?.name??"",fontWeight:400,width:t,height:.125*n,lineHeight:1.2,maxSize:30}),f=o?1.2*d+h:0,m=t-2*h,v=n-f,y=GG({text:c,fontSizeOverride:s,fontWeight:700,width:i?m:.5*m,height:i?.25*v:.9*v,lineHeight:1.2}),x=1.2*y;d=Math.min(.7*y,d);let b=(0,g.useMemo)(()=>{if(void 0===r.seriesData)return l.noDataOption;let e=r.seriesData,t=[];if(void 0!==i){let n={type:"line",name:e.name,data:e.values,zlevel:1,symbol:"none",animation:!1,silent:!0},r=xZ()(n,i);t.push(r)}return{title:{show:!1},grid:{show:!1,top:"35%",right:0,bottom:0,left:0,containLabel:!1},xAxis:{type:"time",show:!1,boundaryGap:!1},yAxis:{type:"value",show:!1,min:e=>e.min>=0&&e.min<=1?0:e.min},tooltip:{show:!1},series:t}},[r,l,i]),w=i?"auto":"center";return(0,p.jsxs)(vL.Z,{sx:{height:"100%",width:"100%",display:"flex",flexDirection:"column",justifyContent:w,alignItems:w},children:[o&&(0,p.jsx)(GY,{padding:h,fontSize:d,children:r.seriesData?.name}),(0,p.jsx)(GX,{variant:"h3",color:u,fontSize:y,padding:h,children:c}),void 0!==i&&(0,p.jsx)(xz,{sx:{width:"100%"},style:{height:Math.floor(n-f-x)},option:b,theme:l.echartsTheme,renderer:"svg"})]})},GY=(0,S.ZP)(kz.Z,{shouldForwardProp:e=>"padding"!==e&&"fontSize"!==e})(({theme:e,padding:t,fontSize:n})=>({color:e.palette.text.secondary,padding:`${t}px`,fontSize:`${n}px`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),GX=(0,S.ZP)(kz.Z,{shouldForwardProp:e=>"color"!==e&&"padding"!==e&&"fontSize"!==e&&"sparkline"!==e})(({theme:e,color:t,padding:n,fontSize:r,sparkline:i})=>({color:t??e.palette.text.primary,fontSize:`${r}px`,padding:i?`${n}px ${n}px 0 ${n}px`:` 0 ${n}px`,whiteSpace:"nowrap",lineHeight:1.2}));function GK(e){return(0,T.ZP)("MuiToggleButtonGroup",e)}let GQ=(0,k.Z)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),GJ=g.createContext({}),G0=g.createContext(void 0);function G1(e){return(0,T.ZP)("MuiToggleButton",e)}let G2=(0,k.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),G5=e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e,o={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${(0,w.Z)(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,y.Z)(o,GK,t)},G3=(0,S.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${GQ.grouped}`]:t.grouped},{[`& .${GQ.grouped}`]:t[`grouped${(0,w.Z)(n.orientation)}`]},{[`& .${GQ.firstButton}`]:t.firstButton},{[`& .${GQ.lastButton}`]:t.lastButton},{[`& .${GQ.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,_.Z)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${GQ.grouped}`]:{[`&.${GQ.selected} + .${GQ.grouped}.${GQ.selected}`]:{borderTop:0,marginTop:0}},[`& .${GQ.firstButton},& .${GQ.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${GQ.lastButton},& .${GQ.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${GQ.lastButton}.${G2.disabled},& .${GQ.middleButton}.${G2.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${GQ.grouped}`]:{[`&.${GQ.selected} + .${GQ.grouped}.${GQ.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${GQ.firstButton},& .${GQ.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${GQ.lastButton},& .${GQ.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${GQ.lastButton}.${G2.disabled},& .${GQ.middleButton}.${G2.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),G4=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:i,color:o="standard",disabled:a=!1,exclusive:s=!1,fullWidth:l=!1,onChange:u,orientation:c="horizontal",size:h="medium",value:d,...f}=n,m={...n,disabled:a,fullWidth:l,orientation:c,size:h},y=G5(m),x=g.useCallback((e,t)=>{let n;if(!u)return;let r=d&&d.indexOf(t);d&&r>=0?(n=d.slice()).splice(r,1):n=d?d.concat(t):[t],u(e,n)},[u,d]),w=g.useCallback((e,t)=>{u&&u(e,d===t?null:t)},[u,d]),S=g.useMemo(()=>({className:y.grouped,onChange:s?w:x,value:d,size:h,fullWidth:l,color:o,disabled:a}),[y.grouped,s,w,x,d,h,l,o,a]),_=b(r),C=_.length,k=e=>{let t=0===e,n=e===C-1;return t&&n?"":t?y.firstButton:n?y.lastButton:y.middleButton};return(0,p.jsx)(G3,{role:"group",className:(0,v.Z)(y.root,i),ref:t,ownerState:m,...f,children:(0,p.jsx)(GJ.Provider,{value:S,children:_.map((e,t)=>(0,p.jsx)(G0.Provider,{value:k(t),children:e},t))})})});var G8=n(6819);let G6=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:o,color:a}=e,s={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${(0,w.Z)(o)}`,a]};return(0,y.Z)(s,G1,t)},G9=(0,S.ZP)(Mg.Z,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${(0,w.Z)(n.size)}`]]}})((0,_.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,[`&.${G2.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,x.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${G2.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.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,x.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,x.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter((0,C.Z)()).map(([t])=>({props:{color:t},style:{[`&.${G2.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,x.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,x.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,x.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)}}]}))),G7=g.forwardRef(function(e,t){var n;let{value:r,...i}=g.useContext(GJ),o=g.useContext(G0),a=(0,G8.Z)({...i,selected:(n=e.value,void 0!==r&&void 0!==n&&(Array.isArray(r)?r.includes(n):n===r))},e),s=(0,M.i)({props:a,name:"MuiToggleButton"}),{children:l,className:u,color:c="standard",disabled:h=!1,disableFocusRipple:d=!1,fullWidth:f=!1,onChange:m,onClick:y,selected:x,size:b="medium",value:w,...S}=s,_={...s,color:c,disabled:h,disableFocusRipple:d,fullWidth:f,size:b},C=G6(_);return(0,p.jsx)(G9,{className:(0,v.Z)(i.className,C.root,u,o||""),disabled:h,focusRipple:!d,ref:t,onClick:e=>{(!y||(y(e,w),!e.defaultPrevented))&&m&&m(e,w)},onChange:m,value:w,ownerState:_,"aria-pressed":x,...S,children:l})}),Ue=x5();var Ut=n(2446);function Un({inputRef:e,label:t,color:n,value:r,mode:i,onChange:o,onColorChange:a,onBlur:s,onDelete:l}){let[u,c]=(0,g.useState)(0);return(0,p.jsxs)(x3,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,p.jsx)(wI,{label:t,color:n,onColorChange:a}),(0,p.jsx)(T1.Z,{htmlFor:t,children:t}),(0,p.jsx)(x8.Z,{id:t,inputRef:e,type:"number",value:0===r?"":r,placeholder:"0",onChange:o,onBlur:s,onKeyDown:e=>{"Enter"===e.key&&(s(),c(u+1))},InputProps:{endAdornment:"percent"===i?(0,p.jsx)(vL.Z,{paddingX:1,children:"%"}):void 0}},u),(0,p.jsx)(x4.Z,{"aria-label":`delete threshold ${t}`,size:"small",onClick:l,children:(0,p.jsx)(Ut.default,{})})]})}function Ur({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:r}){let{thresholds:{defaultColor:i,palette:o}}=vz(),a=e?.defaultColor??i,[s,l]=(0,g.useState)(e?.steps);(0,g.useEffect)(()=>{l(e?.steps)},[e?.steps]);let u=(0,g.useRef)(null),c=(0,g.useRef)(!1);(0,g.useEffect)(()=>{u.current&&c.current&&(u.current?.focus(),c.current=!1)},[s?.length]);let h=(e,t)=>{l(Sd(s,n=>{let r=n?.[t];r&&(r.value=Number(e.target.value))}))},d=(n,r)=>{void 0!==e&&t(Sd(e,e=>{if(void 0!==e.steps){let t=e.steps[r];t&&(t.color=n)}}))},f=()=>{if(void 0!==s){let n=[...s];n.sort((e,t)=>e.value-t.value),void 0!==e&&t(Sd(e,e=>{e.steps=n}))}},m=n=>{void 0!==e&&t(Sd(e,e=>{e.steps&&e.steps.splice(n,1)}))};return(0,p.jsxs)(GF,{title:"Thresholds",icon:(0,p.jsx)(T8,{description:"Add threshold",children:(0,p.jsx)(x4.Z,{size:"small","aria-label":"add threshold",onClick:()=>{c.current=!0,void 0===e?t({steps:[{value:10}]}):e&&void 0===e.steps?t(Sd(e,e=>{e.steps=[{value:10}]})):t(Sd(e,e=>{let t=e.steps;if(t?.length){let e=t[t.length-1],n=o[t.length]??Ui();t.push({color:n,value:(e?.value??0)+10})}else t&&t.push({value:10})}))},children:(0,p.jsx)(GS.default,{})})}),children:[(0,p.jsx)(T7,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,p.jsxs)(G4,{exclusive:!0,disabled:r,value:e?.mode??"absolute",onChange:(n,r)=>{let i="percent"===r?"percent":void 0;void 0!==e?t(Sd(e,e=>{e.mode=i})):t({mode:i})},sx:{height:"36px",marginLeft:"auto"},children:[(0,p.jsx)(G7,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,p.jsx)(G7,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),s&&s.map((t,n)=>(0,p.jsx)(Un,{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:()=>{m(n)},onBlur:f},n)).reverse(),!n&&(0,p.jsxs)(Ue,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(wI,{label:"default",color:a,onColorChange:n=>{void 0!==e?t(Sd(e,e=>{e.defaultColor=n})):t({defaultColor:n})}}),(0,p.jsx)(kz.Z,{children:"Default"})]})]})}let Ui=()=>"#"+Math.floor(0x1000000*Math.random()).toString(16).padStart(6,"0");function Uo(e){return"number"==typeof e}function Ua(e){return!!e&&"object"==typeof e&&"function"==typeof e.constructor&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function Us(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function Ul(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function Uu(e){return e&&!0===e.constructor.prototype.isUnit||!1}function Uc(e){return"string"==typeof e}var Uh=Array.isArray;function Ud(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function Uf(e){return Array.isArray(e)||Ud(e)}function Up(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function Ug(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function Um(e){return e&&!0===e.constructor.prototype.isRange||!1}function Uv(e){return e&&!0===e.constructor.prototype.isIndex||!1}function Uy(e){return"boolean"==typeof e}function Ux(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function Ub(e){return e&&!0===e.constructor.prototype.isHelp||!1}function Uw(e){return"function"==typeof e}function US(e){return e instanceof Date}function U_(e){return e instanceof RegExp}function UC(e){return!!(e&&"object"==typeof e&&e.constructor===Object&&!Us(e)&&!Ul(e))}function UM(e){return null===e}function Uk(e){return void 0===e}function UT(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function UD(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function UA(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function UI(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function UO(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function UP(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function UR(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function UE(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function UL(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function UN(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function UB(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function UF(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function Uz(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function UV(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function UZ(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function Uj(e){return e&&!0===e.constructor.prototype.isChain||!1}function UH(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":Ua(e)?"BigNumber":Us(e)?"Complex":Ul(e)?"Fraction":Ud(e)?"Matrix":Uu(e)?"Unit":Uv(e)?"Index":Um(e)?"Range":Ux(e)?"ResultSet":UN(e)?e.type:Uj(e)?"Chain":Ub(e)?"Help":"Object":"function"===t?"Function":t}function UW(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return UW(e)});if(e instanceof Date)return new Date(e.valueOf());if(Ua(e))return e;if(e instanceof RegExp)throw TypeError("Cannot clone "+e);return U$(e,UW)}function U$(e,t){var n={};for(var r in e)Uq(e,r)&&(n[r]=t(e[r]));return n}function UG(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!UG(e[r],t[r]))return!1;return!0}if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!UG(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}function UU(e,t,n){var r,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(r=n(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function Uq(e,t){return e&&Object.hasOwnProperty.call(e,t)}function UY(e){return Object.keys(e).map(t=>e[t])}var UX=n(8317);function UK(e,t,n,r){function i(r){var i=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}(r,t.map(UJ));return function(e,t,n){if(!t.filter(e=>{var t;return!((t=e)&&"?"===t[0])}).every(e=>void 0!==n[e])){var r=t.filter(e=>void 0===n[e]);throw Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map(e=>'"'.concat(e,'"')).join(", "),"."))}}(e,t,r),n(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function UQ(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function UJ(e){return e&&"?"===e[0]?e.slice(1):e}function U0(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}function U1(e,t,n){var r="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!U0(n))throw Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!U0(e))throw Error("Value must be an integer");e<0&&(e+=2**n),r="i".concat(n)}var i="";return e<0&&(e=-e,i="-"),"".concat(i).concat({2:"0b",8:"0o",16:"0x"}[t]).concat(e.toString(t)).concat(r)}function U2(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,i="auto";if(t&&(t.notation&&(i=t.notation),Uo(t)?n=t:Uo(t.precision)&&(n=t.precision),t.wordSize&&"number"!=typeof(r=t.wordSize)))throw Error('Option "wordSize" must be a number');switch(i){case"fixed":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=U5(e),r="number"==typeof t?U4(n,n.exponent+1+t):n,i=r.coefficients,o=r.exponent+1,a=o+(t||0);return i.length<a&&(i=i.concat(U8(a-i.length))),o<0&&(i=U8(-o+1).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),r.sign+i.join("")}(e,n);case"exponential":return U3(e,n);case"engineering":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=U4(U5(e),t),r=n.exponent,i=n.coefficients,o=r%3==0?r:r<0?r-3-r%3:r-r%3;if(Uo(t))for(;t>i.length||r-o+1>i.length;)i.push(0);else for(var a=Math.abs(r-o)-(i.length-1),s=0;s<a;s++)i.push(0);for(var l=Math.abs(r-o),u=1;l>0;)u++,l--;var c=i.slice(u).join(""),h=Uo(t)&&c.length||c.match(/[1-9]/)?"."+c:"",d=i.slice(0,u).join("")+h+"e"+(r>=0?"+":"")+o.toString();return n.sign+d}(e,n);case"bin":return U1(e,2,r);case"oct":return U1(e,8,r);case"hex":return U1(e,16,r);case"auto":return(function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=U5(e),a=t?U4(o,t):o;if(a.exponent<r||a.exponent>=i)return U3(e,t);var s=a.coefficients,l=a.exponent;s.length<t&&(s=s.concat(U8(t-s.length))),s=s.concat(U8(l-s.length+1+(s.length<t?t-s.length:0))),s=U8(-l).concat(s);var u=l>0?l:0;return u<s.length-1&&s.splice(u+1,0,"."),a.sign+s.join("")})(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function U5(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}}function U3(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=U5(e),r=t?U4(n,t):n,i=r.coefficients,o=r.exponent;i.length<t&&(i=i.concat(U8(t-i.length)));var a=i.shift();return r.sign+a+(i.length>0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function U4(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}return n}function U8(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}var U6=Number.EPSILON||2220446049250313e-31;function U9(e,t,n){if(null==n)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<U6||r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function U7(e,t,n){var r=new e.constructor(2),i="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!U0(n))throw Error("size must be an integer");if(e.greaterThan(r.pow(n-1).sub(1))||e.lessThan(r.pow(n-1).mul(-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw Error("Value must be an integer");e.lessThan(0)&&(e=e.add(r.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw Error("Base ".concat(t," not supported "))}}function qe(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function qt(e,t){var n=function(e,t){var n;if("number"==typeof e)return U2(e,t);if(Ua(e))return function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto";if(void 0!==t&&(t.notation&&(n=t.notation),"number"==typeof t?h=t:t.precision&&(h=t.precision),t.wordSize&&"number"!=typeof(d=t.wordSize)))throw Error('Option "wordSize" must be a number');switch(n){case"fixed":return r=e,i=h,r.toFixed(i);case"exponential":return qe(e,h);case"engineering":return o=e,a=h,l=(s=o.e)%3==0?s:s<0?s-3-s%3:s-s%3,-1!==(c=(u=o.mul(Math.pow(10,-l))).toPrecision(a)).indexOf("e")&&(c=u.toString()),c+"e"+(s>=0?"+":"")+l.toString();case"bin":return U7(e,2,d);case"oct":return U7(e,8,d);case"hex":return U7(e,16,d);case"auto":var r,i,o,a,s,l,u,c,h,d,f,p=t&&void 0!==t.lowerExp?t.lowerExp:-3,g=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var m=e.toSignificantDigits(h),v=m.e;return(v>=p&&v<g?m.toFixed():qe(e,h)).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(e,t);return(n=e)&&"object"==typeof n&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d?t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d:Array.isArray(e)?function e(t,n){if(!Array.isArray(t))return qt(t,n);for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}(e,t):Uc(e)?'"'+e+'"':"function"==typeof e?e.syntax?String(e.syntax):"function":e&&"object"==typeof e?"function"==typeof e.format?e.format(t):e&&e.toString(t)!==({}).toString()?e.toString(t):"{"+Object.keys(e).map(n=>'"'+n+'": '+qt(e[n],t)).join(", ")+"}":String(e)}(e,t);return t&&"object"==typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function qn(e,t,n){if(!(this instanceof qn))throw SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=Error().stack}function qr(e,t,n){if(!(this instanceof qr))throw SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function qi(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function qo(e,t){if(0===t.length){if(Array.isArray(e))throw new qn(e.length,0)}else!function e(t,n,r){var i,o=t.length;if(o!==n[r])throw new qn(o,n[r]);if(r<n.length-1){var a=r+1;for(i=0;i<o;i++){if(!Array.isArray(t[i]))throw new qn(n.length-1,n.length,"<");e(t[i],n,a)}}else for(i=0;i<o;i++)if(Array.isArray(t[i]))throw new qn(n.length+1,n.length,">")}(e,t,0)}function qa(e,t){if(!Uo(e)||!U0(e))throw TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&e>=t)throw new qr(e,t)}function qs(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!Uo(e)||!U0(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+qt(t)+")")}),function e(t,n,r,i){var o,a,s=t.length,l=n[r],u=Math.min(s,l);if(t.length=l,r<n.length-1){var c=r+1;for(o=0;o<u;o++)Array.isArray(a=t[o])||(a=[a],t[o]=a),e(a,n,c,i);for(o=u;o<l;o++)a=[],t[o]=a,e(a,n,c,i)}else{for(o=0;o<u;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=u;o<l;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function ql(e,t){var n=qu(e),r=e.slice(),i=e.indexOf(-1);if(e.indexOf(-1,i+1)>=0)throw Error("More than one wildcard in sizes");if(i>=0){if(t%n==0)r[i]=-t/n;else throw Error("Could not replace wildcard, since "+t+" is no multiple of "+-n)}return r}function qu(e){return e.reduce((e,t)=>e*t,1)}function qc(e,t,n,r){var i=r||qi(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(var s=r;s<n;s++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function qh(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;var s=a?qh(o,t):t(o);if(void 0===n)n=s;else if(n!==s)return"mixed"}return n}function qd(e,t){return -1!==e.indexOf(t)}function qf(e,t,n,r){if(!(this instanceof qf))throw SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(null!=r?"-"+r:"")+" expected)",this.stack=Error().stack}qn.prototype=RangeError(),qn.prototype.constructor=RangeError,qn.prototype.name="DimensionError",qn.prototype.isDimensionError=!0,qr.prototype=RangeError(),qr.prototype.constructor=RangeError,qr.prototype.name="IndexError",qr.prototype.isIndexError=!0,qf.prototype=Error(),qf.prototype.constructor=Error,qf.prototype.name="ArgumentsError",qf.prototype.isArgumentsError=!0;var qp={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},qg=["Matrix","Array"],qm=["number","BigNumber","Fraction"];function qv(e,t,n){var r;void 0!==e[t]&&(r=e[t],-1===n.indexOf(r))&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}var qy,qx,qb,qw,qS,q_,qC,qM,qk,qT,qD,qA,qI,qO,qP,qR,qE,qL,qN,qB,qF="0123456789abcdef",qz="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",qV="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qZ={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},qj=!0,qH="[DecimalError] ",qW=qH+"Invalid argument: ",q$=qH+"Precision limit exceeded",qG=qH+"crypto unavailable",qU="[object Decimal]",qq=Math.floor,qY=Math.pow,qX=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,qK=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,qQ=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,qJ=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,q0=qz.length-1,q1=qV.length-1,q2={toStringTag:qU};function q5(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=Yi(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=Yi(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function q3(e,t,n){if(e!==~~e||e<t||e>n)throw Error(qW+e)}function q4(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=qY(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(e[i+1]/o/100|0)==qY(10,t-2)-1||(s==o/2||0==s)&&(e[i+1]/o/100|0)==0:t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(e[i+1]/o/1e3|0)==qY(10,t-3)-1,a}function q8(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=qF.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}q2.absoluteValue=q2.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),q9(e)},q2.ceil=function(){return q9(new this.constructor(this),this.e+1,2)},q2.clampedTo=q2.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(qW+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},q2.comparedTo=q2.cmp=function(e){var t,n,r,i,o=this.d,a=(e=new this.constructor(e)).d,s=this.s,l=e.s;if(!o||!a)return s&&l?s!==l?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-l:0;if(s!==l)return s;if(this.e!==e.e)return this.e>e.e^s<0?1:-1;for(t=0,n=(r=o.length)<(i=a.length)?r:i;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^s<0?1:-1;return r===i?0:r>i^s<0?1:-1},q2.cosine=q2.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/Yf(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=Yd(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,Yp(r,n)),r.precision=e,r.rounding=t,q9(2==qB||3==qB?n.neg():n,e,t,!0)):new r(1):new r(NaN)},q2.cubeRoot=q2.cbrt=function(){var e,t,n,r,i,o,a,s,l,u,c=this.constructor;if(!this.isFinite()||this.isZero())return new c(this);for(qj=!1,(o=this.s*qY(this.s*this,1/3))&&Math.abs(o)!=1/0?r=new c(o.toString()):(n=q5(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=qY(n,1/3),e=qq((e+1)/3)-(e%3==(e<0?-1:2)),(r=new c(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=this.s),a=(e=c.precision)+3;;)if(r=q6((u=(l=(s=r).times(s).times(s)).plus(this)).plus(this).times(s),u.plus(l),a+2,1),q5(s.d).slice(0,a)===(n=q5(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(q9(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(q9(s,e+1,0),s.times(s).times(s).eq(this))){r=s;break}a+=4,i=1}return qj=!0,q9(r,e,c.rounding,t)},q2.decimalPlaces=q2.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-qq(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},q2.dividedBy=q2.div=function(e){return q6(this,new this.constructor(e))},q2.dividedToIntegerBy=q2.divToInt=function(e){var t=this.constructor;return q9(q6(this,new t(e),0,1,1),t.precision,t.rounding)},q2.equals=q2.eq=function(e){return 0===this.cmp(e)},q2.floor=function(){return q9(new this.constructor(this),this.e+1,3)},q2.greaterThan=q2.gt=function(e){return this.cmp(e)>0},q2.greaterThanOrEqualTo=q2.gte=function(e){var t=this.cmp(e);return 1==t||0===t},q2.hyperbolicCosine=q2.cosh=function(){var e,t,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?t=(1/Yf(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=Yd(a,1,o.times(t),new a(1),!0);for(var l,u=e,c=new a(8);u--;)l=o.times(o),o=s.minus(l.times(c.minus(l.times(c))));return q9(o,a.precision=n,a.rounding=r,!0)},q2.hyperbolicSine=q2.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=Yd(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=Yd(o,2,i=i.times(1/Yf(5,e)),i,!0);for(var a,s=new o(5),l=new o(16),u=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(l.times(a).plus(u))))}return o.precision=t,o.rounding=n,q9(i,t,n,!0)},q2.hyperbolicTangent=q2.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q6(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},q2.inverseCosine=q2.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return -1!==n?0===n?e.isNeg()?Yn(t,r,i):new t(0):new t(NaN):e.isZero()?Yn(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},q2.inverseHyperbolicCosine=q2.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,qj=!1,n=n.times(n).minus(1).sqrt().plus(n),qj=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},q2.inverseHyperbolicSine=q2.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,qj=!1,n=n.times(n).plus(1).sqrt().plus(n),qj=!0,r.precision=e,r.rounding=t,n.ln())},q2.inverseHyperbolicTangent=q2.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1)?q9(new o(i),e,t,!0):(o.precision=n=r-i.e,i=q6(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5)):new o(NaN)},q2.inverseSine=q2.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t)?0===t?((e=Yn(o,n+4,r).times(.5)).s=i.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2))},q2.inverseTangent=q2.atan=function(){var e,t,n,r,i,o,a,s,l,u=this,c=u.constructor,h=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=q1)return(a=Yn(c,h+4,d).times(.25)).s=u.s,a}else{if(!u.s)return new c(NaN);if(h+4<=q1)return(a=Yn(c,h+4,d).times(.5)).s=u.s,a}for(c.precision=s=h+10,c.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(qj=!1,t=Math.ceil(s/7),r=1,l=u.times(u),a=new c(u),i=u;-1!==e;)if(i=i.times(l),o=a.minus(i.div(r+=2)),i=i.times(l),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),qj=!0,q9(a,c.precision=h,c.rounding=d,!0)},q2.isFinite=function(){return!!this.d},q2.isInteger=q2.isInt=function(){return!!this.d&&qq(this.e/7)>this.d.length-2},q2.isNaN=function(){return!this.s},q2.isNegative=q2.isNeg=function(){return this.s<0},q2.isPositive=q2.isPos=function(){return this.s>0},q2.isZero=function(){return!!this.d&&0===this.d[0]},q2.lessThan=q2.lt=function(e){return 0>this.cmp(e)},q2.lessThanOrEqualTo=q2.lte=function(e){return 1>this.cmp(e)},q2.logarithm=q2.log=function(e){var t,n,r,i,o,a,s,l,u=this.constructor,c=u.precision,h=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new u(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t){if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}}if(qj=!1,q4((l=q6(a=Yu(this,s=c+5),t?Yt(u,s+10):Yu(e,s),s,1)).d,i=c,h))do if(s+=10,l=q6(a=Yu(this,s),t?Yt(u,s+10):Yu(e,s),s,1),!o){+q5(l.d).slice(i+1,i+15)+1==1e14&&(l=q9(l,c+1,0));break}while(q4(l.d,i+=10,h));return qj=!0,q9(l,c,h)},q2.minus=q2.sub=function(e){var t,n,r,i,o,a,s,l,u,c,h,d,f=this.constructor;if(e=new f(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new f(e.d||this.s!==e.s?this:NaN):e=new f(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(u=this.d,d=e.d,s=f.precision,l=f.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!u[0])return new f(3===l?-0:0);e=new f(this)}return qj?q9(e,s,l):e}if(n=qq(e.e/7),c=qq(this.e/7),u=u.slice(),o=c-n){for((h=o<0)?(t=u,o=-o,a=d.length):(t=d,n=c,a=u.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((h=(r=u.length)<(a=d.length))&&(a=r),r=0;r<a;r++)if(u[r]!=d[r]){h=u[r]<d[r];break}o=0}for(h&&(t=u,u=d,d=t,e.s=-e.s),a=u.length,r=d.length-a;r>0;--r)u[a++]=0;for(r=d.length;r>o;){if(u[--r]<d[r]){for(i=r;i&&0===u[--i];)u[i]=1e7-1;--u[i],u[r]+=1e7}u[r]-=d[r]}for(;0===u[--a];)u.pop();for(;0===u[0];u.shift())--n;return u[0]?(e.d=u,e.e=Ye(u,n),qj?q9(e,s,l):e):new f(3===l?-0:0)},q2.modulo=q2.mod=function(e){var t,n=this.constructor;return(e=new n(e),this.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!this.d||this.d[0])?(qj=!1,9==n.modulo?(t=q6(this,e.abs(),0,3,1),t.s*=e.s):t=q6(this,e,0,n.modulo,1),t=t.times(e),qj=!0,this.minus(t)):q9(new n(this),n.precision,n.rounding):new n(NaN)},q2.naturalExponential=q2.exp=function(){return Yl(this)},q2.naturalLogarithm=q2.ln=function(){return Yu(this)},q2.negated=q2.neg=function(){var e=new this.constructor(this);return e.s=-e.s,q9(e)},q2.plus=q2.add=function(e){var t,n,r,i,o,a,s,l,u,c,h=this.constructor;if(e=new h(e),!this.d||!e.d)return this.s&&e.s?this.d||(e=new h(e.d||this.s===e.s?this:NaN)):e=new h(NaN),e;if(this.s!=e.s)return e.s=-e.s,this.minus(e);if(u=this.d,c=e.d,s=h.precision,l=h.rounding,!u[0]||!c[0])return c[0]||(e=new h(this)),qj?q9(e,s,l):e;if(o=qq(this.e/7),r=qq(e.e/7),u=u.slice(),i=o-r){for(i<0?(n=u,i=-i,a=c.length):(n=c,r=o,a=u.length),i>(a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=u.length)-(i=c.length)<0&&(i=a,n=c,c=u,u=n),t=0;i;)t=(u[--i]=u[i]+c[i]+t)/1e7|0,u[i]%=1e7;for(t&&(u.unshift(t),++r),a=u.length;0==u[--a];)u.pop();return e.d=u,e.e=Ye(u,r),qj?q9(e,s,l):e},q2.precision=q2.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(qW+e);return this.d?(t=Yr(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},q2.round=function(){var e=this.constructor;return q9(new e(this),this.e+1,e.rounding)},q2.sine=q2.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:Yd(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=Yd(e,2,t=t.times(1/Yf(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,Yp(r,n)),r.precision=e,r.rounding=t,q9(qB>2?n.neg():n,e,t,!0)):new r(NaN)},q2.squareRoot=q2.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,l=this.s,u=this.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?this:1/0);for(qj=!1,0==(l=Math.sqrt(+this))||l==1/0?(((t=q5(a)).length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=qq((s+1)/2)-(s<0||s%2),r=new u(t=l==1/0?"5e"+s:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new u(l.toString()),n=(s=u.precision)+3;;)if(r=(o=r).plus(q6(this,o,n+2,1)).times(.5),q5(o.d).slice(0,n)===(t=q5(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(q9(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(q9(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return qj=!0,q9(r,s,u.rounding,e)},q2.tangent=q2.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=q6(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,q9(2==qB||4==qB?n.neg():n,e,t,!0)):new r(NaN)},q2.times=q2.mul=function(e){var t,n,r,i,o,a,s,l,u,c=this.constructor,h=this.d,d=(e=new c(e)).d;if(e.s*=this.s,!h||!h[0]||!d||!d[0])return new c(e.s&&(!h||h[0]||d)&&(!d||d[0]||h)?h&&d?0*e.s:e.s/0:NaN);for(n=qq(this.e/7)+qq(e.e/7),(l=h.length)<(u=d.length)&&(o=h,h=d,d=o,a=l,l=u,u=a),o=[],r=a=l+u;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+d[r]*h[i-r-1]+t,o[i--]=s%1e7|0,t=s/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=Ye(o,n),qj?q9(e,c.precision,c.rounding):e},q2.toBinary=function(e,t){return Yg(this,2,e,t)},q2.toDecimalPlaces=q2.toDP=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(q3(e,0,1e9),void 0===t?t=r.rounding:q3(t,0,8),q9(n,e+n.e+1,t))},q2.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=q7(r,!0):(q3(e,0,1e9),void 0===t?t=i.rounding:q3(t,0,8),n=q7(r=q9(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},q2.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=q7(this):(q3(e,0,1e9),void 0===t?t=i.rounding:q3(t,0,8),n=q7(r=q9(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},q2.toFraction=function(e){var t,n,r,i,o,a,s,l,u,c,h,d,f=this.d,p=this.constructor;if(!f)return new p(this);if(u=n=new p(1),r=l=new p(0),a=(o=(t=new p(r)).e=Yr(f)-this.e-1)%7,t.d[0]=qY(10,a<0?7+a:a),null==e)e=o>0?t:u;else{if(!(s=new p(e)).isInt()||s.lt(u))throw Error(qW+s);e=s.gt(t)?o>0?t:u:s}for(qj=!1,s=new p(q5(f)),c=p.precision,p.precision=o=14*f.length;h=q6(s,t,0,1,1),1!=(i=n.plus(h.times(r))).cmp(e);)n=r,r=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=s.minus(h.times(i)),s=i;return i=q6(e.minus(n),r,0,1,1),l=l.plus(i.times(u)),n=n.plus(i.times(r)),l.s=u.s=this.s,d=1>q6(u,r,o,1).minus(this).abs().cmp(q6(l,n,o,1).minus(this).abs())?[u,r]:[l,n],p.precision=c,qj=!0,d},q2.toHexadecimal=q2.toHex=function(e,t){return Yg(this,16,e,t)},q2.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:q3(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(qj=!1,n=q6(n,e,0,t,1).times(e),qj=!0,q9(n)):(e.s=n.s,n=e),n},q2.toNumber=function(){return+this},q2.toOctal=function(e,t){return Yg(this,8,e,t)},q2.toPower=q2.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=+(e=new l(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new l(qY(+s,u));if((s=new l(s)).eq(1))return s;if(r=l.precision,o=l.rounding,e.eq(1))return q9(s,r,o);if((t=qq(e.e/7))>=e.d.length-1&&(n=u<0?-u:u)<=0x1fffffffffffff)return i=Yo(l,s,n,r),e.s<0?new l(1).div(i):q9(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new l(NaN);if((1&e.d[t])==0&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=qY(+s,u))&&isFinite(n)?new l(n+"").e:qq(u*(Math.log("0."+q5(s.d))/Math.LN10+s.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?a/0:0):(qj=!1,l.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=Yl(e.times(Yu(s,r+n)),r)).d&&q4((i=q9(i,r+5,1)).d,r,o)&&(t=r+10,+q5((i=q9(Yl(e.times(Yu(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=q9(i,r+1,0))),i.s=a,qj=!0,l.rounding=o,q9(i,r,o))},q2.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=q7(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(q3(e,1,1e9),void 0===t?t=i.rounding:q3(t,0,8),n=q7(r=q9(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},q2.toSignificantDigits=q2.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(q3(e,1,1e9),void 0===t?t=n.rounding:q3(t,0,8)),q9(new n(this),e,t)},q2.toString=function(){var e=this.constructor,t=q7(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},q2.truncated=q2.trunc=function(){return q9(new this.constructor(this),this.e+1,1)},q2.valueOf=q2.toJSON=function(){var e=this.constructor,t=q7(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var q6=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,a,s,l){var u,c,h,d,f,p,g,m,v,y,x,b,w,S,_,C,M,k,T,D,A=r.constructor,I=r.s==i.s?1:-1,O=r.d,P=i.d;if(!O||!O[0]||!P||!P[0])return new A(r.s&&i.s&&(O?!P||O[0]!=P[0]:P)?O&&0==O[0]||!P?0*I:I/0:NaN);for(l?(f=1,c=r.e-i.e):(l=1e7,f=7,c=qq(r.e/f)-qq(i.e/f)),T=P.length,M=O.length,y=(v=new A(I)).d=[],h=0;P[h]==(O[h]||0);h++);if(P[h]>(O[h]||0)&&c--,null==o?(S=o=A.precision,a=A.rounding):S=s?o+(r.e-i.e)+1:o,S<0)y.push(1),p=!0;else{if(S=S/f+2|0,h=0,1==T){for(d=0,P=P[0],S++;(h<M||d)&&S--;h++)_=d*l+(O[h]||0),y[h]=_/P|0,d=_%P|0;p=d||h<M}else{for((d=l/(P[0]+1)|0)>1&&(P=e(P,d,l),O=e(O,d,l),T=P.length,M=O.length),C=T,b=(x=O.slice(0,T)).length;b<T;)x[b++]=0;(D=P.slice()).unshift(0),k=P[0],P[1]>=l/2&&++k;do d=0,(u=t(P,x,T,b))<0?(w=x[0],T!=b&&(w=w*l+(x[1]||0)),(d=w/k|0)>1?(d>=l&&(d=l-1),m=(g=e(P,d,l)).length,b=x.length,1==(u=t(g,x,m,b))&&(d--,n(g,T<m?D:P,m,l))):(0==d&&(u=d=1),g=P.slice()),(m=g.length)<b&&g.unshift(0),n(x,g,b,l),-1==u&&(b=x.length,(u=t(P,x,T,b))<1&&(d++,n(x,T<b?D:P,b,l))),b=x.length):0===u&&(d++,x=[0]),y[h++]=d,u&&x[0]?x[b++]=O[C]||0:(x=[O[C]],b=1);while((C++<M||void 0!==x[0])&&S--);p=void 0!==x[0]}y[0]||y.shift()}if(1==f)v.e=c,qN=p;else{for(h=1,d=y[0];d>=10;d/=10)h++;v.e=h+c*f-1,q9(v,s?o+v.e+1:o,a,p)}return v}}();function q9(e,t,n,r){var i,o,a,s,l,u,c,h,d,f=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,l=(c=h[d=0])/qY(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(r){for(;s++<=d;)h.push(0);c=l=0,i=1,o%=7,a=o-7+1}else break e}else{for(i=1,c=s=h[d];s>=10;s/=10)i++;o%=7,l=(a=o-7+i)<0?0:c/qY(10,i-a-1)%10|0}if(r=r||t<0||void 0!==h[d+1]||(a<0?c:c%qY(10,i-a-1)),u=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?c/qY(10,i-a):0:h[d-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=qY(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=qY(10,7-o),h[d]=a>0?(c/qY(10,i-a)%qY(10,a)|0)*s:0),u)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,1e7==h[0]&&(h[0]=1));break}if(h[d]+=s,1e7!=h[d])break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return qj&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e<f.minE&&(e.e=0,e.d=[0])),e}function q7(e,t,n){if(!e.isFinite())return Yc(e);var r,i=e.e,o=q5(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Yi(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Yi(-i-1)+o,n&&(r=n-a)>0&&(o+=Yi(r))):i>=a?(o+=Yi(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Yi(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Yi(r))),o}function Ye(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function Yt(e,t,n){if(t>q0)throw qj=!0,n&&(e.precision=n),Error(q$);return q9(new e(qz),t,1,!0)}function Yn(e,t,n){if(t>q1)throw Error(q$);return q9(new e(qV),t,n,!0)}function Yr(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function Yi(e){for(var t="";e--;)t+="0";return t}function Yo(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(qj=!1;;){if(n%2&&Ym((o=o.times(t)).d,a)&&(i=!0),0===(n=qq(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}Ym((t=t.times(t)).d,a)}return qj=!0,o}function Ya(e){return 1&e.d[e.d.length-1]}function Ys(e,t,n){for(var r,i,o=new e(t[0]),a=0;++a<t.length;){if(!(i=new e(t[a])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function Yl(e,t){var n,r,i,o,a,s,l,u=0,c=0,h=0,d=e.constructor,f=d.rounding,p=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(null==t?(qj=!1,l=p):l=t,s=new d(.03125);e.e>-2;)e=e.times(s),h+=5;for(l+=r=Math.log(qY(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=l;;){if(o=q9(o.times(e),l,1),n=n.times(++c),q5((s=a.plus(q6(o,n,l,1))).d).slice(0,l)===q5(a.d).slice(0,l)){for(i=h;i--;)a=q9(a.times(a),l,1);if(null!=t)return d.precision=p,a;if(!(u<3&&q4(a.d,l-r,f,u)))return q9(a,d.precision=p,f,qj=!0);d.precision=l+=10,n=o=s=new d(1),c=0,u++}a=s}}function Yu(e,t){var n,r,i,o,a,s,l,u,c,h,d,f=1,p=e,g=p.d,m=p.constructor,v=m.rounding,y=m.precision;if(p.s<0||!g||!g[0]||!p.e&&1==g[0]&&1==g.length)return new m(g&&!g[0]?-1/0:1!=p.s?NaN:g?0:p);if(null==t?(qj=!1,c=y):c=t,m.precision=c+=10,r=(n=q5(g)).charAt(0),!(15e14>Math.abs(o=p.e)))return u=Yt(m,c+2,y).times(o+""),p=Yu(new m(r+"."+n.slice(1)),c-10).plus(u),m.precision=y,null==t?q9(p,y,v,qj=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=q5((p=p.times(e)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),h=p,l=a=p=q6(p.minus(1),p.plus(1),c,1),d=q9(p.times(p),c,1),i=3;;){if(a=q9(a.times(d),c,1),q5((u=l.plus(q6(a,new m(i),c,1))).d).slice(0,c)===q5(l.d).slice(0,c)){if(l=l.times(2),0!==o&&(l=l.plus(Yt(m,c+2,y).times(o+""))),l=q6(l,new m(f),c,1),null!=t)return m.precision=y,l;if(!q4(l.d,c-10,v,s))return q9(l,m.precision=y,v,qj=!0);m.precision=c+=10,u=a=p=q6(h.minus(1),h.plus(1),c,1),d=q9(p.times(p),c,1),i=s=1}l=u,i+=2}}function Yc(e){return String(e.s*e.s/0)}function Yh(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),qj&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function Yd(e,t,n,r,i){var o,a,s,l,u=e.precision,c=Math.ceil(u/7);for(qj=!1,l=n.times(n),s=new e(r);;){if(a=q6(s.times(l),new e(t++*t++),u,1),s=i?r.plus(a):r.minus(a),r=q6(a.times(l),new e(t++*t++),u,1),void 0!==(a=s.plus(r)).d[c]){for(o=c;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return qj=!0,a.d.length=c+1,a}function Yf(e,t){for(var n=e;--t;)n*=e;return n}function Yp(e,t){var n,r=t.s<0,i=Yn(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return qB=r?4:1,t;if((n=t.divToInt(i)).isZero())qB=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return qB=Ya(n)?r?2:3:r?4:1,t;qB=Ya(n)?r?1:4:r?3:2}return t.minus(i).abs()}function Yg(e,t,n,r){var i,o,a,s,l,u,c,h,d,f=e.constructor,p=void 0!==n;if(p?(q3(n,1,1e9),void 0===r?r=f.rounding:q3(r,0,8)):(n=f.precision,r=f.rounding),e.isFinite()){for(a=(c=q7(e)).indexOf("."),p?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,a>=0&&(c=c.replace(".",""),(d=new f(1)).e=c.length-a,d.d=q8(q7(d),10,i),d.e=d.d.length),o=l=(h=q8(c,10,i)).length;0==h[--l];)h.pop();if(h[0]){if(a<0?o--:((e=new f(e)).d=h,e.e=o,h=(e=q6(e,d,n,r,0,i)).d,o=e.e,u=qN),a=h[n],s=i/2,u=u||void 0!==h[n+1],u=r<4?(void 0!==a||u)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||u||6===r&&1&h[n-1]||r===(e.s<0?8:7)),h.length=n,u)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(a=0,c="";a<l;a++)c+=qF.charAt(h[a]);if(p){if(l>1){if(16==t||8==t){for(a=16==t?4:3,--l;l%a;l++)c+="0";for(l=(h=q8(c,i,t)).length;!h[l-1];--l);for(a=1,c="1.";a<l;a++)c+=qF.charAt(h[a])}else c=c.charAt(0)+"."+c.slice(1)}c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}else c=p?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=Yc(e);return e.s<0?"-"+c:c}function Ym(e,t){if(e.length>t)return e.length=t,!0}function Yv(e){return new this(e).abs()}function Yy(e){return new this(e).acos()}function Yx(e){return new this(e).acosh()}function Yb(e,t){return new this(e).plus(t)}function Yw(e){return new this(e).asin()}function YS(e){return new this(e).asinh()}function Y_(e){return new this(e).atan()}function YC(e){return new this(e).atanh()}function YM(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?Yn(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=Yn(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(q6(e,t,o,1)),t=Yn(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(q6(e,t,o,1)):(n=Yn(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function Yk(e){return new this(e).cbrt()}function YT(e){return q9(e=new this(e),e.e+1,2)}function YD(e,t,n){return new this(e).clamp(t,n)}function YA(e){if(!e||"object"!=typeof e)throw Error(qH+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=qZ[n]),void 0!==(r=e[n])){if(qq(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(qW+n+": "+r)}if(n="crypto",i&&(this[n]=qZ[n]),void 0!==(r=e[n])){if(!0===r||!1===r||0===r||1===r){if(r){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(qG)}else this[n]=!1}else throw Error(qW+n+": "+r)}return this}function YI(e){return new this(e).cos()}function YO(e){return new this(e).cosh()}function YP(e,t){return new this(e).div(t)}function YR(e){return new this(e).exp()}function YE(e){return q9(e=new this(e),e.e+1,3)}function YL(){var e,t,n=new this(0);for(e=0,qj=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return qj=!0,new this(1/0);n=t}return qj=!0,n.sqrt()}function YN(e){return e instanceof Y5||e&&e.toStringTag===qU||!1}function YB(e){return new this(e).ln()}function YF(e,t){return new this(e).log(t)}function Yz(e){return new this(e).log(2)}function YV(e){return new this(e).log(10)}function YZ(){return Ys(this,arguments,-1)}function Yj(){return Ys(this,arguments,1)}function YH(e,t){return new this(e).mod(t)}function YW(e,t){return new this(e).mul(t)}function Y$(e,t){return new this(e).pow(t)}function YG(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:q3(e,1,1e9),r=Math.ceil(e/7),this.crypto){if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else throw Error(qG)}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(r=s[--o],e%=7,r&&e&&(i=qY(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)n=0,s=[0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function YU(e){return q9(e=new this(e),e.e+1,this.rounding)}function Yq(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function YY(e){return new this(e).sin()}function YX(e){return new this(e).sinh()}function YK(e){return new this(e).sqrt()}function YQ(e,t){return new this(e).sub(t)}function YJ(){var e=0,t=arguments,n=new this(t[0]);for(qj=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return qj=!0,q9(n,this.precision,this.rounding)}function Y0(e){return new this(e).tan()}function Y1(e){return new this(e).tanh()}function Y2(e){return q9(e=new this(e),e.e+1,1)}q2[Symbol.for("nodejs.util.inspect.custom")]=q2.toString,q2[Symbol.toStringTag]="Decimal";var Y5=q2.constructor=function e(t){var n,r,i;function o(e){var t,n,r;if(!(this instanceof o))return new o(e);if(this.constructor=o,YN(e)){this.s=e.s,qj?!e.d||e.e>o.maxE?(this.e=NaN,this.d=null):e.e<o.minE?(this.e=0,this.d=[0]):(this.e=e.e,this.d=e.d.slice()):(this.e=e.e,this.d=e.d?e.d.slice():e.d);return}if("number"==(r=typeof e)){if(0===e){this.s=1/e<0?-1:1,this.e=0,this.d=[0];return}if(e<0?(e=-e,this.s=-1):this.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;qj?t>o.maxE?(this.e=NaN,this.d=null):t<o.minE?(this.e=0,this.d=[0]):(this.e=t,this.d=[e]):(this.e=t,this.d=[e]);return}if(0*e!=0){e||(this.s=NaN),this.e=NaN,this.d=null;return}return Yh(this,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),this.s=-1):(43===n&&(e=e.slice(1)),this.s=1),qJ.test(e)?Yh(this,e):function(e,t){var n,r,i,o,a,s,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),qJ.test(t))return Yh(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(qK.test(t))n=16,t=t.toLowerCase();else if(qX.test(t))n=2;else if(qQ.test(t))n=8;else throw Error(qW+t);for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=Yo(r,new r(n),o,2*o)),o=c=(u=q8(t,n,1e7)).length-1;0===u[o];--o)u.pop();return o<0?new r(0*e.s):(e.e=Ye(u,c),e.d=u,qj=!1,a&&(e=q6(e,i,4*s)),l&&(e=e.times(54>Math.abs(l)?qY(2,l):Y5.pow(2,l))),qj=!0,e)}(this,e);if("bigint"===r)return e<0?(e=-e,this.s=-1):this.s=1,Yh(this,e.toString());throw Error(qW+e)}if(o.prototype=q2,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=YA,o.clone=e,o.isDecimal=YN,o.abs=Yv,o.acos=Yy,o.acosh=Yx,o.add=Yb,o.asin=Yw,o.asinh=YS,o.atan=Y_,o.atanh=YC,o.atan2=YM,o.cbrt=Yk,o.ceil=YT,o.clamp=YD,o.cos=YI,o.cosh=YO,o.div=YP,o.exp=YR,o.floor=YE,o.hypot=YL,o.ln=YB,o.log=YF,o.log10=YV,o.log2=Yz,o.max=YZ,o.min=Yj,o.mod=YH,o.mul=YW,o.pow=Y$,o.random=YG,o.round=YU,o.sign=Yq,o.sin=YY,o.sinh=YX,o.sqrt=YK,o.sub=YQ,o.sum=YJ,o.tan=Y0,o.tanh=Y1,o.trunc=Y2,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(qZ);qz=new Y5(qz),qV=new Y5(qV);var Y3={createBigNumberClass:UK("BigNumber",["?on","config"],e=>{var{on:t,config:n}=e,r=Y5.clone({precision:n.precision,modulo:Y5.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},t&&t("config",function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})}),r},{isClass:!0})},Y4={createMatrixClass:UK("Matrix",[],()=>{function e(){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0})},Y8={MatrixDependencies:Y4,createDenseMatrixClass:UK("DenseMatrix",["Matrix"],e=>{var{Matrix:t}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!Uc(t))throw Error("Invalid datatype: "+t);if(Ud(e))"DenseMatrix"===e.type?(this._data=UW(e._data),this._size=UW(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&Uh(e.data)&&Uh(e.size))this._data=e.data,this._size=e.size,qo(this._data,this._size),this._datatype=t||e.datatype;else if(Uh(e))this._data=function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];Uh(i)?t[n]=e(i):i&&!0===i.isMatrix&&(t[n]=e(i.valueOf()))}return t}(e),this._size=qi(this._data),qo(this._data,this._size),this._datatype=t;else if(e)throw TypeError("Unsupported type of data ("+UH(e)+")");else this._data=[],this._size=[0],this._datatype=t}function r(e,t,n){if(0===t.length){for(var r=e._data;Uh(r);)r=r[0];return r}return e._size=t.slice(0),e._data=qs(e._data,e._size,n),e}function i(e,t,n){for(var i=e._size.slice(0),o=!1;i.length<t.length;)i.push(0),o=!0;for(var a=0,s=t.length;a<s;a++)t[a]>i[a]&&(i[a]=t[a],o=!0);o&&r(e,i,n)}return n.prototype=new t,n.prototype.createDenseMatrix=function(e,t){return new n(e,t)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return qh(this._data,UH)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return function(e,t){if(!Uv(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var r=t.size();if(r.length!==e._size.length)throw new qn(r.length,e._size.length);for(var i=t.min(),o=t.max(),a=0,s=e._size.length;a<s;a++)qa(i[a],e._size[a]),qa(o[a],e._size[a]);return new n(function e(t,n,r,i){var o=i===r-1,a=n.dimension(i);return o?a.map(function(e){return qa(e,t.length),t[e]}).valueOf():a.map(function(o){return qa(o,t.length),e(t[o],n,r,i+1)}).valueOf()}(e._data,t,r.length,0),e._datatype)}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var o,a=t.size(),s=t.isScalar();if(Ud(n)?(o=n.size(),n=n.valueOf()):o=qi(n),s){if(0!==o.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(a.length<e._size.length)throw new qn(a.length,e._size.length,"<");if(o.length<a.length){for(var l=0,u=0;1===a[l]&&1===o[l];)l++;for(;1===a[l];)u++,l++;n=qc(n,a.length,u,o)}if(!UG(a,o))throw new qn(a,o,">");i(e,t.max().map(function(e){return e+1}),r);var c=a.length;(function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach(function(e,n){qa(e),t[e]=r[n[0]]}):s.forEach(function(a,s){qa(a),e(t[a],n,r[s[0]],i,o+1)})})(e._data,t,n,c,0)}return e}(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){if(!Uh(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new qn(e.length,this._size.length);for(var t=0;t<e.length;t++)qa(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var o=e[r];qa(o,n.length),n=n[o]}return n},n.prototype.set=function(e,t,n){if(!Uh(e))throw TypeError("Array expected");if(e.length<this._size.length)throw new qn(e.length,this._size.length,"<");i(this,e.map(function(e){return e+1}),n);var r,o,a,s=this._data;for(r=0,o=e.length-1;r<o;r++)qa(a=e[r],s.length),s=s[a];return qa(a=e[e.length-1],s.length),s[a]=t,this},n.prototype.resize=function(e,t,n){if(!Uf(e))throw TypeError("Array or Matrix expected");var i=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);return r(n?this.clone():this,i,t)},n.prototype.reshape=function(e,t){var n=t?this.clone():this;n._data=function(e,t){var n=function(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function e(n){Array.isArray(n)?n.forEach(e):t.push(n)}),t}(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw new qn(0,r,"!=");var i=qu(t=ql(t,r));if(r!==i)throw new qn(i,r,"!=");try{return function(e,t){for(var n,r=e,i=t.length-1;i>0;i--){var o=t[i];n=[];for(var a=r.length/o,s=0;s<a;s++)n.push(r.slice(s*o,(s+1)*o));r=n}return r}(n,t)}catch(e){if(e instanceof qn)throw new qn(i,r,"!=");throw e}}(n._data,e);var r=n._size.reduce((e,t)=>e*t);return n._size=ql(e,r),n},n.prototype.clone=function(){return new n({data:UW(this._data),size:UW(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){var t=this,r=function n(r,i){return Uh(r)?r.map(function(e,t){return n(e,i.concat(t))}):e(r,i,t)}(this._data,[]),i=void 0!==this._datatype?qh(r,UH):void 0;return new n(r,i)},n.prototype.forEach=function(e){var t=this;!function n(r,i){Uh(r)?r.forEach(function(e,t){n(e,i.concat(t))}):e(r,i,t)}(this._data,[])},n.prototype[Symbol.iterator]=function*(){var e=function* e(t,n){if(Uh(t))for(var r=0;r<t.length;r++)yield*e(t[r],n.concat(r));else yield{value:t,index:n}};yield*e(this._data,[])},n.prototype.rows=function(){var e=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var t of this._data)e.push(new n([t],this._datatype));return e},n.prototype.columns=function(){var e=this,t=[],r=this.size();if(2!==r.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=function(r){var o=i.map(e=>[e[r]]);t.push(new n(o,e._datatype))},a=0;a<r[1];a++)o(a);return t},n.prototype.toArray=function(){return UW(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return qt(this._data,e)},n.prototype.toString=function(){return qt(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(Ua(e)&&(e=e.toNumber()),!Uo(e)||!U0(e))throw TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,r=e<0?-e:0,i=Math.min(this._size[0]-r,this._size[1]-t),o=[],a=0;a<i;a++)o[a]=this._data[a+r][a+t];return new n({data:o,size:[i],datatype:this._datatype})},n.diagonal=function(e,t,r,i){if(!Uh(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(Ua(e)&&(e=e.toNumber()),!Uo(e)||!U0(e)||e<1)throw Error("Size values must be positive integers");return e}),r){if(Ua(r)&&(r=r.toNumber()),!Uo(r)||!U0(r))throw TypeError("The parameter k must be an integer number")}else r=0;var o,a=r>0?r:0,s=r<0?-r:0,l=e[0],u=e[1],c=Math.min(l-s,u-a);if(Uh(t)){if(t.length!==c)throw Error("Invalid value array length");o=function(e){return t[e]}}else if(Ud(t)){var h=t.size();if(1!==h.length||h[0]!==c)throw Error("Invalid matrix length");o=function(e){return t.get([e])}}else o=function(){return t};i||(i=Ua(o(0))?o(0).mul(0):0);var d=[];if(e.length>0){d=qs(d,e,i);for(var f=0;f<c;f++)d[f+s][f+a]=o(f)}return new n({data:d,size:[l,u]})},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!Uo(e)||!U0(e)||!Uo(t)||!U0(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return qa(e,this._size[0]),qa(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},n},{isClass:!0})};let Y6=Math.cosh||function(e){return 1e-9>Math.abs(e)?1-e:(Math.exp(e)+Math.exp(-e))*.5},Y9=Math.sinh||function(e){return 1e-9>Math.abs(e)?e:(Math.exp(e)-Math.exp(-e))*.5},Y7=function(e){let t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;let n=e*e;return n*(n*(n*(n*(n*(n*(n*(n/20922789888e3-1/0x144c3b2800)+1/0x1c8cfc00)-1/3628800)+1/40320)-1/720)+1/24)-.5)},Xe=function(e,t){return((e=Math.abs(e))<(t=Math.abs(t))&&([e,t]=[t,e]),e<1e8)?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},Xt=function(){throw SyntaxError("Invalid Param")};function Xn(e,t){let n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e*=.5)*e+(t*=.5)*t)+Math.LN2}let Xr={re:0,im:0},Xi=function(e,t){if(null==e)Xr.re=Xr.im=0;else if(void 0!==t)Xr.re=e,Xr.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)Xr.re=e.re,Xr.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return Xo.INFINITY;Xr.re=e.abs*Math.cos(e.arg),Xr.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return Xo.INFINITY;Xr.re=e.r*Math.cos(e.phi),Xr.im=e.r*Math.sin(e.phi)}else 2===e.length?(Xr.re=e[0],Xr.im=e[1]):Xt();break;case"string":Xr.im=Xr.re=0;let n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;null===n&&Xt();for(let e=0;e<n.length;e++){let t=n[e];" "===t||" "===t||"\n"===t||("+"===t?r++:"-"===t?i++:("i"===t||"I"===t?(r+i===0&&Xt()," "===n[e+1]||isNaN(n[e+1])?Xr.im+=parseFloat((i%2?"-":"")+"1"):(Xr.im+=parseFloat((i%2?"-":"")+n[e+1]),e++)):((r+i===0||isNaN(t))&&Xt(),"i"===n[e+1]||"I"===n[e+1]?(Xr.im+=parseFloat((i%2?"-":"")+t),e++):Xr.re+=parseFloat((i%2?"-":"")+t)),r=i=0))}r+i>0&&Xt();break;case"number":Xr.im=0,Xr.re=e;break;default:Xt()}return isNaN(Xr.re)||isNaN(Xr.im),Xr};function Xo(e,t){if(!(this instanceof Xo))return new Xo(e,t);let n=Xi(e,t);this.re=n.re,this.im=n.im}Xo.prototype={re:0,im:0,sign:function(){let e=Xe(this.re,this.im);return new Xo(this.re/e,this.im/e)},add:function(e,t){let n=Xi(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?Xo.NAN:Xo.INFINITY:new Xo(this.re+n.re,this.im+n.im)},sub:function(e,t){let n=Xi(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?Xo.NAN:Xo.INFINITY:new Xo(this.re-n.re,this.im-n.im)},mul:function(e,t){let n=Xi(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;return r&&a||i&&o?Xo.NAN:r||i?Xo.INFINITY:0===n.im&&0===this.im?new Xo(this.re*n.re,0):new Xo(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){let n=Xi(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,a=0===n.re&&0===n.im;if(o&&a||r&&i)return Xo.NAN;if(a||r)return Xo.INFINITY;if(o||i)return Xo.ZERO;if(0===n.im)return new Xo(this.re/n.re,this.im/n.re);if(Math.abs(n.re)<Math.abs(n.im)){let e=n.re/n.im,t=n.re*e+n.im;return new Xo((this.re*e+this.im)/t,(this.im*e-this.re)/t)}{let e=n.im/n.re,t=n.im*e+n.re;return new Xo((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let n=Xi(e,t),r=0===this.re&&0===this.im;if(0===n.re&&0===n.im)return Xo.ONE;if(0===n.im){if(0===this.im&&this.re>0)return new Xo(Math.pow(this.re,n.re),0);if(0===this.re)switch((n.re%4+4)%4){case 0:return new Xo(Math.pow(this.im,n.re),0);case 1:return new Xo(0,Math.pow(this.im,n.re));case 2:return new Xo(-Math.pow(this.im,n.re),0);case 3:return new Xo(0,-Math.pow(this.im,n.re))}}if(r&&n.re>0)return Xo.ZERO;let i=Math.atan2(this.im,this.re),o=Xn(this.re,this.im),a=Math.exp(n.re*o-n.im*i),s=n.im*o+n.re*i;return new Xo(a*Math.cos(s),a*Math.sin(s))},sqrt:function(){let e=this.re,t=this.im;if(0===t)return e>=0?new Xo(Math.sqrt(e),0):new Xo(0,Math.sqrt(-e));let n=Math.sqrt(.5*(Xe(e,t)+Math.abs(e))),r=Math.abs(t)/(2*n);return e>=0?new Xo(n,t<0?-r:r):new Xo(r,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return 0===this.im?new Xo(e,0):new Xo(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e=this.re,t=this.im;return new Xo(Math.expm1(e)*Math.cos(t)+Y7(t),Math.exp(e)*Math.sin(t))},log:function(){let e=this.re,t=this.im;return 0===t&&e>0?new Xo(Math.log(e),0):new Xo(Xn(e,t),Math.atan2(t,e))},abs:function(){return Xe(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new Xo(Math.sin(e)*Y6(t),Math.cos(e)*Y9(t))},cos:function(){let e=this.re,t=this.im;return new Xo(Math.cos(e)*Y6(t),-Math.sin(e)*Y9(t))},tan:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)+Y6(t);return new Xo(Math.sin(e)/n,Y9(t)/n)},cot:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)-Y6(t);return new Xo(-Math.sin(e)/n,Y9(t)/n)},sec:function(){let e=this.re,t=this.im,n=.5*Y6(2*t)+.5*Math.cos(2*e);return new Xo(Math.cos(e)*Y6(t)/n,Math.sin(e)*Y9(t)/n)},csc:function(){let e=this.re,t=this.im,n=.5*Y6(2*t)-.5*Math.cos(2*e);return new Xo(Math.sin(e)*Y6(t)/n,-Math.cos(e)*Y9(t)/n)},asin:function(){let e=this.re,t=this.im,n=new Xo(t*t-e*e+1,-2*e*t).sqrt(),r=new Xo(n.re-t,n.im+e).log();return new Xo(r.im,-r.re)},acos:function(){let e=this.re,t=this.im,n=new Xo(t*t-e*e+1,-2*e*t).sqrt(),r=new Xo(n.re-t,n.im+e).log();return new Xo(Math.PI/2-r.im,r.re)},atan:function(){let e=this.re,t=this.im;if(0===e){if(1===t)return new Xo(0,1/0);if(-1===t)return new Xo(0,-1/0)}let n=e*e+(1-t)*(1-t),r=new Xo((1-t*t-e*e)/n,-2*e/n).log();return new Xo(-.5*r.im,.5*r.re)},acot:function(){let e=this.re,t=this.im;if(0===t)return new Xo(Math.atan2(1,e),0);let n=e*e+t*t;return 0!==n?new Xo(e/n,-t/n).atan():new Xo(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new Xo(0,1/0);let n=e*e+t*t;return 0!==n?new Xo(e/n,-t/n).acos():new Xo(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new Xo(Math.PI/2,1/0);let n=e*e+t*t;return 0!==n?new Xo(e/n,-t/n).asin():new Xo(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new Xo(Y9(e)*Math.cos(t),Y6(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new Xo(Y6(e)*Math.cos(t),Y9(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,n=Y6(e)+Math.cos(t);return new Xo(Y9(e)/n,Math.sin(t)/n)},coth:function(){let e=2*this.re,t=2*this.im,n=Y6(e)-Math.cos(t);return new Xo(Y9(e)/n,-Math.sin(t)/n)},csch:function(){let e=this.re,t=this.im,n=Math.cos(2*t)-Y6(2*e);return new Xo(-2*Y9(e)*Math.cos(t)/n,2*Y6(e)*Math.sin(t)/n)},sech:function(){let e=this.re,t=this.im,n=Math.cos(2*t)+Y6(2*e);return new Xo(2*Y6(e)*Math.cos(t)/n,-2*Y9(e)*Math.sin(t)/n)},asinh:function(){let e=this.im;this.im=-this.re,this.re=e;let t=this.asin();return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){let e=this.acos();if(e.im<=0){let t=e.re;e.re=-e.im,e.im=t}else{let t=e.im;e.im=-e.re,e.re=t}return e},atanh:function(){let e=this.re,t=this.im,n=1-e,r=1+e,i=n*n+t*t,o=0!==i?new Xo((r*n-t*t)/i,(t*n+r*t)/i):new Xo(-1!==e?e/0:0,0!==t?t/0:0),a=o.re;return o.re=Xn(o.re,o.im)/2,o.im=Math.atan2(o.im,a)/2,e>1&&0===t&&(o.im=-o.im),o},acoth:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new Xo(0,Math.PI/2);let n=e*e+t*t;return 0!==n?new Xo(e/n,-t/n).atanh():new Xo(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){let e=this.re,t=this.im;if(0===t)return new Xo(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);let n=e*e+t*t;return 0!==n?new Xo(e/n,-t/n).asinh():new Xo(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return Xo.INFINITY;let n=e*e+t*t;return 0!==n?new Xo(e/n,-t/n).acosh():new Xo(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return Xo.INFINITY;if(this.isInfinite())return Xo.ZERO;let e=this.re,t=this.im,n=e*e+t*t;return new Xo(e/n,-t/n)},conjugate:function(){return new Xo(this.re,-this.im)},neg:function(){return new Xo(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new Xo(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new Xo(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new Xo(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let n=Xi(e,t);return Math.abs(n.re-this.re)<=Xo.EPSILON&&Math.abs(n.im-this.im)<=Xo.EPSILON},clone:function(){return new Xo(this.re,this.im)},toString:function(){let e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<Xo.EPSILON&&(e=0),Math.abs(t)<Xo.EPSILON&&(t=0),0===t)?n+e:(0!==e?(n+=e,n+=" ",t<0?(t=-t,n+="-"):n+="+",n+=" "):t<0&&(t=-t,n+="-"),1!==t&&(n+=t),n+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},Xo.ZERO=new Xo(0,0),Xo.ONE=new Xo(1,0),Xo.I=new Xo(0,1),Xo.PI=new Xo(Math.PI,0),Xo.E=new Xo(Math.E,0),Xo.INFINITY=new Xo(1/0,1/0),Xo.NAN=new Xo(NaN,NaN),Xo.EPSILON=1e-15;var Xa=UK("Complex",[],()=>(Xo.prototype.type="Complex",Xo.prototype.isComplex=!0,Xo.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Xo.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Xo.prototype.format=function(e){var t="",n=this.im,r=this.re,i=U2(this.re,e),o=U2(this.im,e),a=Uo(e)?e:e?e.precision:null;if(null!==a){var s=Math.pow(10,-a);Math.abs(r/n)<s&&(r=0),Math.abs(n/r)<s&&(n=0)}return 0===n?i:0===r?1===n?"i":-1===n?"-i":o+"i":n<0?-1===n?i+" - i":i+" - "+o.substring(1)+"i":1===n?i+" + i":i+" + "+o+"i"},Xo.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"==typeof t)return Xo(t);throw TypeError("Input has to be an object with r and phi keys.");case 2:var n=arguments[0],r=arguments[1];if(Uo(n)){if(Uu(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),Uo(r))return new Xo({r:n,phi:r});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},Xo.prototype.valueOf=Xo.prototype.toString,Xo.fromJSON=function(e){return new Xo(e)},Xo.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},Xo),{isClass:!0}),Xs={s:1,n:0,d:1};function Xl(e,t){if(isNaN(e=parseInt(e,10)))throw Xg();return e*t}function Xu(e,t){if(0===t)throw Xp();var n=Object.create(Xf.prototype);n.s=e<0?-1:1;var r=Xd(e=e<0?-e:e,t);return n.n=e/r,n.d=t/r,n}function Xc(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r==0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var Xh=function(e,t){var n,r=0,i=1,o=1,a=0,s=0,l=0,u=1,c=1,h=0,d=1,f=1,p=1;if(null==e);else if(void 0!==t){if(o=(r=e)*(i=t),r%1!=0||i%1!=0)throw Xm()}else switch(typeof e){case"object":if("d"in e&&"n"in e)r=e.n,i=e.d,"s"in e&&(r*=e.s);else if(0 in e)r=e[0],1 in e&&(i=e[1]);else throw Xg();o=r*i;break;case"number":if(e<0&&(o=e,e=-e),e%1==0)r=e;else if(e>0){for(e>=1&&(c=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=c);d<=1e7&&p<=1e7;){if(e===(n=(h+f)/(d+p))){d+p<=1e7?(r=h+f,i=d+p):p>d?(r=f,i=p):(r=h,i=d);break}e>n?(h+=f,d+=p):(f+=h,p+=d),d>1e7?(r=f,i=p):(r=h,i=d)}r*=c}else(isNaN(e)||isNaN(t))&&(i=r=NaN);break;case"string":if(null===(d=e.match(/\d+|./g)))throw Xg();if("-"===d[h]?(o=-1,h++):"+"===d[h]&&h++,d.length===h+1?s=Xl(d[h++],o):"."===d[h+1]||"."===d[h]?("."!==d[h]&&(a=Xl(d[h++],o)),(++h+1===d.length||"("===d[h+1]&&")"===d[h+3]||"'"===d[h+1]&&"'"===d[h+3])&&(s=Xl(d[h],o),u=Math.pow(10,d[h].length),h++),("("===d[h]&&")"===d[h+2]||"'"===d[h]&&"'"===d[h+2])&&(l=Xl(d[h+1],o),c=Math.pow(10,d[h+1].length)-1,h+=3)):"/"===d[h+1]||":"===d[h+1]?(s=Xl(d[h],o),u=Xl(d[h+2],1),h+=3):"/"===d[h+3]&&" "===d[h+1]&&(a=Xl(d[h],o),s=Xl(d[h+2],o),u=Xl(d[h+4],1),h+=5),d.length<=h){o=r=l+(i=u*c)*a+c*s;break}default:throw Xg()}if(0===i)throw Xp();Xs.s=o<0?-1:1,Xs.n=Math.abs(r),Xs.d=Math.abs(i)};function Xd(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function Xf(e,t){if(Xh(e,t),!(this instanceof Xf))return Xu(Xs.s*Xs.n,Xs.d);e=Xd(Xs.d,Xs.n),this.s=Xs.s,this.n=Xs.n/e,this.d=Xs.d/e}var Xp=function(){return Error("Division by Zero")},Xg=function(){return Error("Invalid argument")},Xm=function(){return Error("Parameters must be integer")};Xf.prototype={s:1,n:0,d:1,abs:function(){return Xu(this.n,this.d)},neg:function(){return Xu(-this.s*this.n,this.d)},add:function(e,t){return Xh(e,t),Xu(this.s*this.n*Xs.d+Xs.s*this.d*Xs.n,this.d*Xs.d)},sub:function(e,t){return Xh(e,t),Xu(this.s*this.n*Xs.d-Xs.s*this.d*Xs.n,this.d*Xs.d)},mul:function(e,t){return Xh(e,t),Xu(this.s*Xs.s*this.n*Xs.n,this.d*Xs.d)},div:function(e,t){return Xh(e,t),Xu(this.s*Xs.s*this.n*Xs.d,this.d*Xs.n)},clone:function(){return Xu(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new Xf(NaN);if(void 0===e)return Xu(this.s*this.n%this.d,1);if(Xh(e,t),0===Xs.n&&0===this.d)throw Xp();return Xu(this.s*(Xs.d*this.n)%(Xs.n*this.d),Xs.d*this.d)},gcd:function(e,t){return Xh(e,t),Xu(Xd(Xs.n,this.n)*Xd(Xs.d,this.d),Xs.d*this.d)},lcm:function(e,t){return(Xh(e,t),0===Xs.n&&0===this.n)?Xu(0,1):Xu(Xs.n*this.n,Xd(Xs.n,this.n)*Xd(Xs.d,this.d))},ceil:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new Xf(NaN):Xu(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new Xf(NaN):Xu(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new Xf(NaN):Xu(Math.round(e*this.s*this.n/this.d),e)},roundTo:function(e,t){return Xh(e,t),Xu(this.s*Math.round(this.n*Xs.d/(this.d*Xs.n))*Xs.n,Xs.d)},inverse:function(){return Xu(this.s*this.d,this.n)},pow:function(e,t){if(Xh(e,t),1===Xs.d)return Xs.s<0?Xu(Math.pow(this.s*this.d,Xs.n),Math.pow(this.n,Xs.n)):Xu(Math.pow(this.s*this.n,Xs.n),Math.pow(this.d,Xs.n));if(this.s<0)return null;var n=Xc(this.n),r=Xc(this.d),i=1,o=1;for(var a in n)if("1"!==a){if("0"===a){i=0;break}if(n[a]*=Xs.n,n[a]%Xs.d!=0)return null;n[a]/=Xs.d,i*=Math.pow(a,n[a])}for(var a in r)if("1"!==a){if(r[a]*=Xs.n,r[a]%Xs.d!=0)return null;r[a]/=Xs.d,o*=Math.pow(a,r[a])}return Xs.s<0?Xu(o,i):Xu(i,o)},equals:function(e,t){return Xh(e,t),this.s*this.n*Xs.d==Xs.s*Xs.n*this.d},compare:function(e,t){Xh(e,t);var n=this.s*this.n*Xs.d-Xs.s*Xs.n*this.d;return(0<n)-(n<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var t=this.abs(),n=t.toContinued(),r=1;r<n.length;r++){for(var i=Xu(n[r-1],1),o=r-2;o>=0;o--)i=i.inverse().add(n[o]);if(Math.abs(i.sub(t).valueOf())<e)return i.mul(this.s)}return this},divisible:function(e,t){return Xh(e,t),!(!(Xs.n*this.d)||this.n*Xs.d%(Xs.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(t)||isNaN(n))return r;do r.push(Math.floor(t/n)),e=t%n,t=n,n=e;while(1!==t);return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e,t){for(;t%2==0;t/=2);for(;t%5==0;t/=5);if(1===t)return 0;for(var n=10%t,r=1;1!==n;r++)if(n=10*n%t,r>2e3)return 0;return r}(0,n),i=function(e,t,n){for(var r=1,i=function(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,n,t),o=0;o<300;o++){if(r===i)return o;r=10*r%t,i=10*i%t}return 0}(0,n,r),o=this.s<0?"-":"";if(o+=t/n|0,t%=n,(t*=10)&&(o+="."),r){for(var a=i;a--;)o+=t/n|0,t%=n,t*=10;o+="(";for(var a=r;a--;)o+=t/n|0,t%=n,t*=10;o+=")"}else for(var a=e;t&&a--;)o+=t/n|0,t%=n,t*=10;return o}};var Xv=UK("Fraction",[],()=>(Xf.prototype.type="Fraction",Xf.prototype.isFraction=!0,Xf.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Xf.fromJSON=function(e){return new Xf(e)},Xf),{isClass:!0}),Xy=n(7554);function Xx(e,t){return!!e&&"object"==typeof e&&(!!Uq(Xw,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function Xb(e){return"object"==typeof e&&e&&e.constructor===Object}var Xw={length:!0,name:!0},XS={toString:!0,valueOf:!0,toLocaleString:!0};class X_{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return function(e,t){var n,r;if(Xb(e)&&Xx(e,t))return e[t];if("function"==typeof e[t]&&(n=e,r=t,!(null==n||"function"!=typeof n[r]||Uq(n,r)&&Object.getPrototypeOf&&r in Object.getPrototypeOf(n))&&(Uq(XS,r)||!(r in Object.prototype)&&!(r in Function.prototype))))throw Error('Cannot access method "'+t+'" as a property');throw Error('No access to property "'+t+'"')}(this.wrappedObject,e)}set(e,t){return!function(e,t,n){if(Xb(e)&&Xx(e,t))return e[t]=n;throw Error('No access to property "'+t+'"')}(this.wrappedObject,e,t),this}has(e){return e in this.wrappedObject}}function XC(e){return!!e&&(e instanceof Map||e instanceof X_||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}var XM=function(){return XM=Xy.create,Xy};function Xk(e){throw Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function XT(e){throw Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function XD(e){throw Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var XA={BigNumberDependencies:Y3,ComplexDependencies:{createComplexClass:Xa},DenseMatrixDependencies:Y8,FractionDependencies:{createFractionClass:Xv},createTyped:UK("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,o=XM();return o.types=[{name:"number",test:Uo},{name:"Complex",test:Us},{name:"BigNumber",test:Ua},{name:"Fraction",test:Ul},{name:"Unit",test:Uu},{name:"string",test:Uc},{name:"Chain",test:Uj},{name:"Array",test:Uh},{name:"Matrix",test:Ud},{name:"DenseMatrix",test:Up},{name:"SparseMatrix",test:Ug},{name:"Range",test:Um},{name:"Index",test:Uv},{name:"boolean",test:Uy},{name:"ResultSet",test:Ux},{name:"Help",test:Ub},{name:"function",test:Uw},{name:"Date",test:US},{name:"RegExp",test:U_},{name:"null",test:UM},{name:"undefined",test:Uk},{name:"AccessorNode",test:UT},{name:"ArrayNode",test:UD},{name:"AssignmentNode",test:UA},{name:"BlockNode",test:UI},{name:"ConditionalNode",test:UO},{name:"ConstantNode",test:UP},{name:"FunctionNode",test:UE},{name:"FunctionAssignmentNode",test:UR},{name:"IndexNode",test:UL},{name:"Node",test:UN},{name:"ObjectNode",test:UB},{name:"OperatorNode",test:UF},{name:"ParenthesisNode",test:Uz},{name:"RangeNode",test:UV},{name:"SymbolNode",test:UZ},{name:"Map",test:XC},{name:"Object",test:UC}],o.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||Xk(e),e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||XT(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||XT(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||XT(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||XD(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||Xk(e);try{return new t(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||XD(e);try{return new i(e)}catch(t){throw Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||XT(e);try{return new n(e)}catch(t){throw Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||Xk(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||XD(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||function(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],o})},XI="equalScalar",XO=UK(XI,["typed","config"],e=>{var{typed:t,config:n}=e;return t(XI,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return U9(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||function(e,t,n){if(null==n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){var r;return r=n.epsilon,U9(e.re,t.re,r)&&U9(e.im,t.im,r)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw Error("Cannot compare units with different base");return this(e.value,t.value)}})});UK(XI,["typed","config"],e=>{var{typed:t,config:n}=e;return t(XI,{"number, number":function(e,t){return U9(e,t,n.epsilon)}})});var XP={typedDependencies:XA,createEqualScalar:XO},XR=UK("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:r}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");if(t&&!Uc(t))throw Error("Invalid datatype: "+t);if(Ud(e)){var n,r,a;n=this,r=e,a=t,"SparseMatrix"===r.type?(n._values=r._values?UW(r._values):void 0,n._index=UW(r._index),n._ptr=UW(r._ptr),n._size=UW(r._size),n._datatype=a||r._datatype):o(n,r.valueOf(),a||r._datatype)}else if(e&&Uh(e.index)&&Uh(e.ptr)&&Uh(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(Uh(e))o(this,e,t);else if(e)throw TypeError("Unsupported type of data ("+UH(e)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function o(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,a=0,s=n,l=0;if(Uc(i)&&(s=t.find(n,[i,i])||n,l=t.convert(0,i)),o>0){var u=0;do{e._ptr.push(e._index.length);for(var c=0;c<o;c++){var h=r[c];if(Uh(h)){if(0===u&&a<h.length&&(a=h.length),u<h.length){var d=h[u];s(d,l)||(e._values.push(d),e._index.push(c))}}else 0===u&&a<1&&(a=1),s(h,l)||(e._values.push(h),e._index.push(c))}u++}while(u<a)}e._ptr.push(e._index.length),e._size=[o,a]}function a(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function s(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function l(e,r,i,o){var a,s,l,u=o||0,c=n,h=0;Uc(e._datatype)&&(c=t.find(n,[e._datatype,e._datatype])||n,h=t.convert(0,e._datatype),u=t.convert(u,e._datatype));var d=!c(u,h),f=e._size[0],p=e._size[1];if(i>p){for(s=p;s<i;s++)if(e._ptr[s]=e._values.length,d)for(a=0;a<f;a++)e._values.push(u),e._index.push(a);e._ptr[i]=e._values.length}else i<p&&(e._ptr.splice(i+1,p-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(p=i,r>f){if(d){var g=0;for(s=0;s<p;s++){e._ptr[s]=e._ptr[s]+g,l=e._ptr[s+1]+g;var m=0;for(a=f;a<r;a++,m++)e._values.splice(l+m,0,u),e._index.splice(l+m,0,a),g++}e._ptr[p]=e._values.length}}else if(r<f){var v=0;for(s=0;s<p;s++){e._ptr[s]=e._ptr[s]-v;var y=e._ptr[s],x=e._ptr[s+1]-v;for(l=y;l<x;l++)(a=e._index[l])>r-1&&(e._values.splice(l,1),e._index.splice(l,1),v++)}e._ptr[s]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function u(e,t,n,r,i){var o,a,s=r[0],l=r[1],u=[];for(o=0;o<s;o++)for(a=0,u[o]=[];a<l;a++)u[o][a]=0;for(a=0;a<l;a++)for(var c=n[a],h=n[a+1],d=c;d<h;d++)u[o=t[d]][a]=e?i?UW(e[d]):e[d]:1;return u}return i.prototype=new r,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return qh(this._values,UH)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,n){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(e,t){if(!Uv(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var n,r,o,a,s=t.size();if(s.length!==e._size.length)throw new qn(s.length,e._size.length);var l=t.min(),u=t.max();for(n=0,r=e._size.length;n<r;n++)qa(l[n],e._size[n]),qa(u[n],e._size[n]);var c=e._values,h=e._index,d=e._ptr,f=t.dimension(0),p=t.dimension(1),g=[],m=[];f.forEach(function(e,t){m[e]=t[0],g[e]=!0});var v=c?[]:void 0,y=[],x=[];return p.forEach(function(e){for(x.push(y.length),o=d[e],a=d[e+1];o<a;o++)!0===g[n=h[o]]&&(y.push(m[n]),v&&v.push(c[o]))}),x.push(y.length),new i({values:v,index:y,ptr:x,size:s,datatype:e._datatype})}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,o=t.size(),a=t.isScalar();if(Ud(n)?(i=n.size(),n=n.toArray()):i=qi(n),a){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(1!==o.length&&2!==o.length)throw new qn(o.length,e._size.length,"<");if(i.length<o.length){for(var s=0,l=0;1===o[s]&&1===i[s];)s++;for(;1===o[s];)l++,s++;n=qc(n,o.length,l,i)}if(!UG(o,i))throw new qn(o,i,">");if(1===o.length)t.dimension(0).forEach(function(t,i){qa(t),e.set([t,0],n[i[0]],r)});else{var u=t.dimension(0),c=t.dimension(1);u.forEach(function(t,i){qa(t),c.forEach(function(o,a){qa(o),e.set([t,o],n[i[0]][a[0]],r)})})}}return e}(this,e,t,n);default:throw SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!Uh(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new qn(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];qa(t,this._size[0]),qa(n,this._size[1]);var r=a(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},i.prototype.set=function(e,r,i){if(!Uh(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new qn(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var o=e[0],u=e[1],c=this._size[0],h=this._size[1],d=n,f=0;Uc(this._datatype)&&(d=t.find(n,[this._datatype,this._datatype])||n,f=t.convert(0,this._datatype)),(o>c-1||u>h-1)&&(l(this,Math.max(o+1,c),Math.max(u+1,h),i),c=this._size[0],h=this._size[1]),qa(o,c),qa(u,h);var p=a(o,this._ptr[u],this._ptr[u+1],this._index);return p<this._ptr[u+1]&&this._index[p]===o?d(r,f)?function(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+1;o<i.length;o++)i[o]--}(p,u,this._values,this._index,this._ptr):this._values[p]=r:s(p,o,u,r,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,n){if(!Uf(e))throw TypeError("Array or Matrix expected");var r=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw Error("Only two dimensions matrix are supported");return r.forEach(function(e){if(!Uo(e)||!U0(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+qt(r)+")")}),l(n?this.clone():this,r[0],r[1],t)},i.prototype.reshape=function(e,t){if(!Uh(e))throw TypeError("Array expected");if(2!==e.length)throw Error("Sparse matrices can only be reshaped in two dimensions");e.forEach(function(t){if(!Uo(t)||!U0(t)||t<=-2||0===t)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+qt(e)+")")});var n=this._size[0]*this._size[1],r=(e=ql(e,n))[0]*e[1];if(n!==r)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var o=[],l=0;l<i._ptr.length;l++)for(var u=0;u<i._ptr[l+1]-i._ptr[l];u++)o.push(l);for(var c=i._values.slice(),h=i._index.slice(),d=0;d<i._index.length;d++){var f=h[d],p=o[d],g=f*i._size[1]+p;o[d]=g%e[1],h[d]=Math.floor(g/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var m=0;m<i._ptr.length;m++)i._ptr[m]=0;for(var v=0;v<c.length;v++){var y=h[v],x=o[v],b=c[v];s(a(y,i._ptr[x],i._ptr[x+1],i._index),y,x,b,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){return new i({values:this._values?UW(this._values):void 0,index:UW(this._index),ptr:UW(this._ptr),size:UW(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,r){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var o=this;return function(e,r,o,a,s,l,u){var c=[],h=[],d=[],f=n,p=0;Uc(e._datatype)&&(f=t.find(n,[e._datatype,e._datatype])||n,p=t.convert(0,e._datatype));for(var g=function(e,t,n){e=l(e,t,n),f(e,p)||(c.push(e),h.push(t))},m=0;m<=s;m++){d.push(c.length);var v=e._ptr[m],y=e._ptr[m+1];if(u)for(var x=v;x<y;x++){var b=e._index[x];b>=0&&b<=o&&g(e._values[x],b-r,m-a)}else{for(var w={},S=v;S<y;S++)w[e._index[S]]=e._values[S];for(var _=r;_<=o;_++)g(_ in w?w[_]:0,_-r,m-a)}}return d.push(c.length),new i({values:c,index:h,ptr:d,size:[o-r+1,s-a+1]})}(this,0,this._size[0]-1,0,this._size[1]-1,function(t,n,r){return e(t,[n,r],o)},r)},i.prototype.forEach=function(e,t){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],a=this._ptr[i+1];if(t)for(var s=o;s<a;s++){var l=this._index[s];e(this._values[s],[l,i],this)}else{for(var u={},c=o;c<a;c++)u[this._index[c]]=this._values[c];for(var h=0;h<n;h++)e(h in u?u[h]:0,[h,i],this)}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var o=this._index[i];yield{value:this._values[i],index:[o,t]}}},i.prototype.toArray=function(){return u(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return u(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+qt(t,e)+" x "+qt(n,e)+"] density: "+qt(r,e)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],l=a;l<s;l++)i+="\n ("+qt(this._index[l],e)+", "+qt(o,e)+") ==> "+(this._values?qt(this._values[l],e):"X");return i},i.prototype.toString=function(){return qt(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(Ua(e)&&(e=e.toNumber()),!Uo(e)||!U0(e))throw TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,n=e<0?-e:0,r=this._size[0],o=this._size[1],a=Math.min(r-n,o-t),s=[],l=[],u=[];u[0]=0;for(var c=t;c<o&&s.length<a;c++)for(var h=this._ptr[c],d=this._ptr[c+1],f=h;f<d;f++){var p=this._index[f];if(p===c-t+n){s.push(this._values[f]),l[s.length-1]=p-n;break}}return u.push(s.length),new i({values:s,index:l,ptr:u,size:[a,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,o,a,s){if(!Uh(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(Ua(e)&&(e=e.toNumber()),!Uo(e)||!U0(e)||e<1)throw Error("Size values must be positive integers");return e}),o){if(Ua(o)&&(o=o.toNumber()),!Uo(o)||!U0(o))throw TypeError("The parameter k must be an integer number")}else o=0;var l,u=n,c=0;Uc(s)&&(u=t.find(n,[s,s])||n,c=t.convert(0,s));var h=o>0?o:0,d=o<0?-o:0,f=e[0],p=e[1],g=Math.min(f-d,p-h);if(Uh(r)){if(r.length!==g)throw Error("Invalid value array length");l=function(e){return r[e]}}else if(Ud(r)){var m=r.size();if(1!==m.length||m[0]!==g)throw Error("Invalid matrix length");l=function(e){return r.get([e])}}else l=function(){return r};for(var v=[],y=[],x=[],b=0;b<p;b++){x.push(v.length);var w=b-h;if(w>=0&&w<g){var S=l(w);u(S,c)||(y.push(w+d),v.push(S))}}return x.push(v.length),new i({values:v,index:y,ptr:x,size:[f,p]})},i.prototype.swapRows=function(e,t){if(!Uo(e)||!U0(e)||!Uo(t)||!U0(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return qa(e,this._size[0]),qa(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},i._swapRows=function(e,t,n,r,i,o){for(var s=0;s<n;s++){var l=o[s],u=o[s+1],c=a(e,l,u,i),h=a(t,l,u,i);if(c<u&&h<u&&i[c]===e&&i[h]===t){if(r){var d=r[c];r[c]=r[h],r[h]=d}continue}if(c<u&&i[c]===e&&(h>=u||i[h]!==t)){var f=r?r[c]:void 0;i.splice(h,0,t),r&&r.splice(h,0,f),i.splice(h<=c?c+1:c,1),r&&r.splice(h<=c?c+1:c,1);continue}if(h<u&&i[h]===t&&(c>=u||i[c]!==e)){var p=r?r[h]:void 0;i.splice(c,0,e),r&&r.splice(c,0,p),i.splice(c<=h?h+1:h,1),r&&r.splice(c<=h?h+1:h,1)}}},i},{isClass:!0}),XE="matrix",XL=UK(XE,["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,Matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(XE,{"":function(){return o([])},string:function(e){return o([],e)},"string, string":function(e,t){return o([],e,t)},Array:function(e){return o(e)},Matrix:function(e){return o(e,e.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(e,t,n){if("dense"===t||"default"===t||void 0===t)return new r(e,n);if("sparse"===t)return new i(e,n);throw TypeError("Unknown matrix type "+JSON.stringify(t)+".")}}),XN=UK("algorithm01",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a,s=e._data,l=e._size,u=e._datatype,c=n._values,h=n._index,d=n._ptr,f=n._size,p=n._datatype;if(l.length!==f.length)throw new qn(l.length,f.length);if(l[0]!==f[0]||l[1]!==f[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+f+")");if(!c)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var g=l[0],m=l[1],v="string"==typeof u&&u===p?u:void 0,y=v?t.find(r,[v,v]):r,x=[];for(o=0;o<g;o++)x[o]=[];var b=[],w=[];for(a=0;a<m;a++){for(var S=a+1,_=d[a],C=d[a+1],M=_;M<C;M++)b[o=h[M]]=i?y(c[M],s[o][a]):y(s[o][a],c[M]),w[o]=S;for(o=0;o<g;o++)w[o]===S?x[o][a]=b[o]:x[o][a]=s[o][a]}return e.createDenseMatrix({data:x,size:[g,m],datatype:v})}}),XB=UK("algorithm04",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o,a,s,l,u,c,h=e._values,d=e._index,f=e._ptr,p=e._size,g=e._datatype,m=r._values,v=r._index,y=r._ptr,x=r._size,b=r._datatype;if(p.length!==x.length)throw new qn(p.length,x.length);if(p[0]!==x[0]||p[1]!==x[1])throw RangeError("Dimension mismatch. Matrix A ("+p+") must match Matrix B ("+x+")");var w=p[0],S=p[1],_=n,C=0,M=i;"string"==typeof g&&g===b&&(o=g,_=t.find(n,[o,o]),C=t.convert(0,o),M=t.find(i,[o,o]));var k=h&&m?[]:void 0,T=[],D=[],A=h&&m?[]:void 0,I=h&&m?[]:void 0,O=[],P=[];for(s=0;s<S;s++){D[s]=T.length;var R=s+1;for(u=f[s],c=f[s+1],l=u;l<c;l++)a=d[l],T.push(a),O[a]=R,A&&(A[a]=h[l]);for(u=y[s],c=y[s+1],l=u;l<c;l++)if(O[a=v[l]]===R){if(A){var E=M(A[a],m[l]);_(E,C)?O[a]=null:A[a]=E}}else T.push(a),P[a]=R,I&&(I[a]=m[l]);if(A&&I)for(l=D[s];l<T.length;)O[a=T[l]]===R?(k[l]=A[a],l++):P[a]===R?(k[l]=I[a],l++):T.splice(l,1)}return D[S]=T.length,e.createSparseMatrix({values:k,index:T,ptr:D,size:[w,S],datatype:o})}}),XF=UK("algorithm10",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a,s=e._values,l=e._index,u=e._ptr,c=e._size,h=e._datatype;if(!s)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=c[0],f=c[1],p=i;"string"==typeof h&&(a=h,r=t.convert(r,a),p=t.find(i,[a,a]));for(var g=[],m=[],v=[],y=0;y<f;y++){for(var x=y+1,b=u[y],w=u[y+1],S=b;S<w;S++){var _=l[S];m[_]=s[S],v[_]=x}for(var C=0;C<d;C++)0===y&&(g[C]=[]),v[C]===x?g[C][y]=o?p(r,m[C]):p(m[C],r):g[C][y]=r}return new n({data:g,size:[d,f],datatype:a})}}),Xz=UK("algorithm13",["typed"],e=>{var{typed:t}=e;return function(e,n,r){var i,o=e._data,a=e._size,s=e._datatype,l=n._data,u=n._size,c=n._datatype,h=[];if(a.length!==u.length)throw new qn(a.length,u.length);for(var d=0;d<a.length;d++){if(a[d]!==u[d])throw RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+u+")");h[d]=a[d]}var f=r;"string"==typeof s&&s===c&&(i=s,f=t.find(r,[i,i]));var p=h.length>0?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var l=0;l<i;l++)s[l]=t(o[l],a[l]);else for(var u=0;u<i;u++)s[u]=e(t,n+1,r,r[n+1],o[u],a[u]);return s}(f,0,h,h[0],o,l):[];return e.createDenseMatrix({data:p,size:h,datatype:i})}}),XV=UK("algorithm14",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,a=e._data,s=e._size,l=e._datatype,u=r;"string"==typeof l&&(o=l,n=t.convert(n,o),u=t.find(r,[o,o]));var c=s.length>0?function e(t,n,r,i,o,a,s){var l=[];if(n===r.length-1)for(var u=0;u<i;u++)l[u]=s?t(a,o[u]):t(o[u],a);else for(var c=0;c<i;c++)l[c]=e(t,n+1,r,r[n+1],o[c],a,s);return l}(u,0,s,s[0],a,n,i):[];return e.createDenseMatrix({data:c,size:UW(s),datatype:o})}});function XZ(e,t){var n;if(!U0(e)||!U0(t))throw Error("Parameters in function gcd must be integer numbers");for(;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}XZ.signature="number, number";let{gcd:Xj}=function e(t,n){var r,i,o,a=(0,AX.Z)({},qp,n);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var s=(r={isNumber:Uo,isComplex:Us,isBigNumber:Ua,isFraction:Ul,isUnit:Uu,isString:Uc,isArray:Uh,isMatrix:Ud,isCollection:Uf,isDenseMatrix:Up,isSparseMatrix:Ug,isRange:Um,isIndex:Uv,isBoolean:Uy,isResultSet:Ux,isHelp:Ub,isFunction:Uw,isDate:US,isRegExp:U_,isObject:UC,isNull:UM,isUndefined:Uk,isAccessorNode:UT,isArrayNode:UD,isAssignmentNode:UA,isBlockNode:UI,isConditionalNode:UO,isConstantNode:UP,isFunctionAssignmentNode:UR,isFunctionNode:UE,isIndexNode:UL,isNode:UN,isObjectNode:UB,isOperatorNode:UF,isParenthesisNode:Uz,isRangeNode:UV,isSymbolNode:UZ,isChain:Uj},i=new UX,r.on=i.on.bind(i),r.off=i.off.bind(i),r.once=i.once.bind(i),r.emit=i.emit.bind(i),r);s.config=function(e,t){function n(n){if(!n)return U$(e,UW);var r=U$(e,UW);qv(n,"matrix",qg),qv(n,"number",qm),function e(t,n){if(Array.isArray(n))throw TypeError("Arrays are not supported by deepExtend");for(var r in n)if(Uq(n,r)&&!(r in Object.prototype)&&!(r in Function.prototype)){if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r]&&t[r].constructor===Object?e(t[r],n[r]):t[r]=n[r];else if(Array.isArray(n[r]))throw TypeError("Arrays are not supported by deepExtend");else t[r]=n[r]}return t}(e,n);var i=U$(e,UW);return t("config",i,r,U$(n,UW)),i}return n.MATRIX_OPTIONS=qg,n.NUMBER_OPTIONS=qm,Object.keys(qp).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}(a,s.emit),s.expression={transform:{},mathWithTransform:{config:s.config}};var l={},u=function(e,t,n,r){function i(e,t){t&&"function"==typeof t.transform?(n.expression.transform[e]=t.transform,Uq(s,e)||(n.expression.mathWithTransform[e]=t.transform)):(delete n.expression.transform[e],Uq(s,e)||(n.expression.mathWithTransform[e]=t))}function o(e){return"function"==typeof e&&"object"==typeof e.signatures}function a(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var s={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(t,l){var u=arguments.length;if(1!==u&&2!==u)throw new qf("import",u,1,2);l||(l={});var c={};for(var h in!function e(t,n,r){if(Array.isArray(n))n.forEach(n=>e(t,n));else if("object"==typeof n)for(var i in n)Uq(n,i)&&e(t,n[i],i);else if(UQ(n)||void 0!==r){var o=UQ(n)?a(n)?n.fn+".transform":n.fn:r;if(Uq(t,o)&&t[o]!==n&&!l.silent)throw Error('Cannot import "'+o+'" twice');t[o]=n}else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}(c,t),c)if(Uq(c,h)){var d,f=c[h];if(UQ(f))!function(t,i){var l,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.fn;if(qd(u,"."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(u));var c=a(t)?n.expression.transform:n,h=u in n.expression.transform,d=Uq(c,u)?c[u]:void 0,f=function(){var r={};t.dependencies.map(UJ).forEach(e=>{if(qd(e,"."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?r.math=n:"mathWithTransform"===e?r.mathWithTransform=n.expression.mathWithTransform:"classes"===e?r.classes=n:r[e]=n[e]});var a=t(r);if(a&&"function"==typeof a.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===d||i.override)return a;if(o(d)&&o(a))return e(d,a);if(i.silent)return d;throw Error('Cannot import "'+u+'": already exists')};t.meta&&!1===t.meta.lazy?c[u]=f():UU(c,u,f),d&&h?function(e){delete n.expression.transform[e],Uq(s,e)?delete n.expression.mathWithTransform[e]:n.expression.mathWithTransform[e]=n[e]}(u):!a(t)&&(-1!==(l=t).fn.indexOf(".")||Uq(s,l.fn)||l.meta&&l.meta.isClass)||UU(n.expression.mathWithTransform,u,()=>c[u]),r[u]=t,n.emit("import",u,f)}(f,l);else{if("function"==typeof(d=f)||"number"==typeof d||"string"==typeof d||"boolean"==typeof d||null===d||Uu(d)||Us(d)||Ua(d)||Ul(d)||Ud(d)||Array.isArray(d))!function(t,a,s){var l;if(s.wrap&&"function"==typeof a&&(a=function(e){var t=function(){for(var t=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];t[r]=o&&o.valueOf()}return e.apply(n,t)};return e.transform&&(t.transform=e.transform),t}(a)),"function"==typeof(l=a)&&"string"==typeof l.signature&&(a=e(t,{[a.signature]:a})),o(n[t])&&o(a)){a=s.override?e(t,a.signatures):e(n[t],a),n[t]=a,delete r[t],i(t,a),n.emit("import",t,function(){return a});return}if(void 0===n[t]||s.override){n[t]=a,delete r[t],i(t,a),n.emit("import",t,function(){return a});return}if(!s.silent)throw Error('Cannot import "'+t+'": already exists')}(h,f,l);else if(!l.silent)throw TypeError("Factory, Object, or Array expected")}}}}(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.typed.apply(s.typed,t)},0,s,l);return s.import=u,s.on("config",()=>{UY(l).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&u(e,{override:!0})})}),s.create=e.bind(null,t),s.factory=UK,s.import(UY((function e(t,n){for(var r in t)if(Uq(t,r)){var i=t[r];"object"==typeof i&&null!==i?e(i,n):n[r]=i}}(t,o={}),o))),s.ArgumentsError=qf,s.DimensionError=qn,s.IndexError=qr,s}({gcdDependencies:{BigNumberDependencies:Y3,DenseMatrixDependencies:Y8,equalScalarDependencies:XP,matrixDependencies:{DenseMatrixDependencies:Y8,MatrixDependencies:Y4,SparseMatrixDependencies:{MatrixDependencies:Y4,equalScalarDependencies:XP,typedDependencies:XA,createSparseMatrixClass:XR},typedDependencies:XA,createMatrix:XL},typedDependencies:XA,createGcd:UK("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,DenseMatrix:o}=e,a=XN({typed:t}),s=XB({typed:t,equalScalar:r}),l=XF({typed:t,DenseMatrix:o}),u=Xz({typed:t}),c=XV({typed:t});return t("gcd",{"number, number":XZ,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!t.isZero();){var r=e.mod(t);e=t,t=r}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return c(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return c(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})})}}),XH=(0,g.memo)(function({containerId:e,chartRef:t,data:n,seriesMapping:r,enablePinning:i=!0,wrapLabels:o,format:a,onUnpinClick:s,pinnedPos:l}){let[u,c]=(0,g.useState)(!1),h=(0,g.useRef)(),d=Wj(),{height:f,width:m,ref:v}=Wq(),y=null!==l&&i;if(null===d||null===d.target||null===n||null===l&&"CANVAS"!==d.target.tagName)return null;let x=t.current,b=e?document.querySelector(e):void 0,w=b?b.getBoundingClientRect().height:void 0;h.current=$w(d,l,f??0,m??0,b);let S=$v({mousePos:d,data:n,seriesMapping:r,pinnedPos:l,chart:x,format:a,showAllSeries:u});if(0===S.length)return null;let _=n.length;return(0,p.jsx)(WG.Z,{container:b,children:(0,p.jsx)(vL.Z,{ref:v,sx:e=>$S(e,l,w),style:{transform:h.current},children:(0,p.jsxs)(x3,{spacing:.5,children:[(0,p.jsx)($e,{nearbySeries:S,totalSeries:_,enablePinning:i,isTooltipPinned:y,showAllSeries:u,onShowAllClick:e=>c(e),onUnpinClick:s}),(0,p.jsx)(WQ,{series:S,wrapLabels:o})]})})})});pr([jv,gc,vr,va,xx,jZ,Ht,Ho,vu,Wy,vI,vE]);let XW=(0,g.forwardRef)(function({height:e,data:t,seriesMapping:n,timeScale:r,yAxis:i,format:o,grid:a,isStackedBar:s=!1,tooltipConfig:l=WH,noDataVariant:u="message",syncGroup:c,onDataZoom:h,onDoubleClick:d,__experimentalEChartsOptionsOverride:f},m){let v;let{chartsTheme:y,enablePinning:x,lastTooltipPinnedCoords:b,setLastTooltipPinnedCoords:w}=vF(),S=l.enablePinning&&x,_=(0,g.useRef)(),[C,M]=(0,g.useState)(!0),[k,T]=(0,g.useState)(null),[D,A]=(0,g.useState)(null),[I,O]=(0,g.useState)(!1),[P,R]=(0,g.useState)(0),{timeZone:E}=WD();if(void 0===r){let e=function(e){let t,n;let r=[];for(let t of e)if(t&&"timeRange"in t){if(void 0===t||void 0===t.timeRange||void 0===t.stepMs)continue;if(r.push(t.stepMs),void 0===n){n=t.timeRange;continue}t.timeRange.start<n.start&&(n.start=t.timeRange.start),t.timeRange.end>n.end&&(n.end=t.timeRange.end)}else if(t&&"values"in t){for(let e=0;e<t.values.length;e++){let r=t.values[e];if(void 0===r)continue;let[i]=r,o=new Date(i),a=new Date(i);if(void 0===n){n={start:o,end:a};continue}o<n.start&&(n.start=o),a>n.end&&(n.end=a)}if(void 0===n)return;let e=n.start.valueOf(),r=n.end.valueOf(),i=r-e;return{startMs:e,endMs:r,rangeMs:i,stepMs:10}}if(void 0===n)return;if(1===r.length)t=r[0];else{let e=Xj(...r);t=e<10?10:e}let i=n.start.valueOf(),o=n.end.valueOf();return{startMs:i,endMs:o,stepMs:t,rangeMs:o-i}}(t);if(void 0===e){let e=new Date,t=new Date(e);t.setFullYear(e.getFullYear()-5);let n=e.getTime(),r=t.getTime();v={startMs:r,endMs:n,stepMs:1,rangeMs:n-r}}else v=e}else v=r;(0,g.useImperativeHandle)(m,()=>({highlightSeries({name:e}){_.current&&_.current.dispatchAction({type:"highlight",seriesId:e})},clearHighlightedSeries:()=>{_.current&&$a(_.current)}}),[]);let L=(0,g.useMemo)(()=>({datazoom:e=>{if(void 0===h&&setTimeout(()=>{T(null)},10),void 0===h||void 0===e.batch[0])return;let t=e.batch[0].startValue,n=e.batch[0].endValue;void 0!==t&&void 0!==n&&h({start:t,end:n})},finished:()=>{void 0!==_.current&&$i(_.current)}}),[h,T]),{noDataOption:N}=y,B=(0,g.useMemo)(()=>{if(null===t||0===t.length&&"message"===u)return N;let e=[],r="local"===E;t.map((t,n)=>{let i=t.values.map(([e,t])=>[r?e:(0,Wx.toZonedTime)(e,E),null===t?"-":t]);e.push({id:n,source:[...i],dimensions:["time","value"]})});let l={dataset:e,series:x&&null!==D?[...n,D]:n,xAxis:{type:"time",min:r?v.startMs:(0,Wx.toZonedTime)(v.startMs,E),max:r?v.endMs:(0,Wx.toZonedTime)(v.endMs,E),axisLabel:{hideOverlap:!0,formatter:WC(v.rangeMs??0)},axisPointer:{snap:!1}},yAxis:xj(i,o),animation:!1,tooltip:{show:!0,showContent:s,trigger:s?"item":"axis",appendToBody:s},axisPointer:{type:"line",z:0,triggerEmphasis:!1,triggerTooltip:!1,snap:!1},toolbox:{feature:{dataZoom:{icon:null,yAxisIndex:"none"}}},grid:a};return f?f(l):l},[t,n,v,i,o,a,N,f,u,E,s,x,D]);return(0,g.useEffect)(()=>{null===k||null===b||vZ()(b,k)||(T(null),null!==k&&null!==D&&A(null))},[b,n]),(0,p.jsxs)(vL.Z,{style:{height:e},onClick:e=>{let n=e.ctrlKey||e.metaKey;n&&e.preventDefault();let r=$s(e.nativeEvent.offsetX,e.nativeEvent.offsetY,_.current);if(null!==r&&S&&e.target instanceof HTMLCanvasElement){let i={page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY},target:e.target};T(e=>null===e?i:(A(null),null)),A(e=>{if(null!==e)return null;{let e=r[0],n=$c(t[0]?.values,e);return xZ()({},$r,{markLine:{data:[{xAxis:n}]}})}}),n||w(i)}},onMouseDown:e=>{let{clientX:t}=e;O(!0),R(t)},onMouseMove:e=>{if(!(e.target instanceof HTMLCanvasElement))return;let{clientX:t}=e;I&&t-P>0&&M(!1)},onMouseUp:()=>{O(!1),R(0),M(!0)},onMouseLeave:()=>{null===k&&M(!1),void 0!==_.current&&$a(_.current)},onMouseEnter:()=>{M(!0),void 0!==_.current&&$i(_.current)},onDoubleClick:e=>{T(null),void 0===d?void 0!==_.current&&$o(_.current):d(e)},children:[!0===C&&B.tooltip?.showContent===!1&&!0!==l.hidden&&(0,p.jsx)(XH,{containerId:y.tooltipPortalContainerId,chartRef:_,data:t,seriesMapping:n,wrapLabels:l.wrapLabels,enablePinning:S,pinnedPos:k,format:o,onUnpinClick:()=>{T(null),A(null)}}),(0,p.jsx)(xz,{sx:{width:"100%",height:"100%"},option:B,theme:y.echartsTheme,onEvents:L,_instance:_,syncGroup:c})]})});var X$=n(3767),XG=n(9986),XU=n(9085),Xq=n(8014);let XY=["localeText"],XX=g.createContext(null),XK=function(e){let{localeText:t}=e,n=(0,AK.Z)(e,XY),{utils:r,localeText:i}=g.useContext(XX)??{utils:void 0,localeText:void 0},{children:o,dateAdapter:a,dateFormats:s,dateLibInstance:l,adapterLocale:u,localeText:c}=(0,Xq.Z)({props:n,name:"MuiLocalizationProvider"}),h=g.useMemo(()=>(0,AX.Z)({},c,i,t),[c,i,t]),d=g.useMemo(()=>{if(!a)return r||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,r]),f=g.useMemo(()=>d?{minDate:d.date("1900-01-01T00:00:00.000"),maxDate:d.date("2099-12-31T00:00:00.000")}:null,[d]),m=g.useMemo(()=>({utils:d,defaultDates:f,localeText:h}),[f,d,h]);return(0,p.jsx)(XX.Provider,{value:m,children:o})};var XQ=n(3615),XJ=n.n(XQ);let X0={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,r)=>`Select ${e}. ${r||null!==t&&n.isValid(t)?`Selected time is ${r??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,AX.Z)({},X0);let X1=()=>{let e=g.useContext(XX);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=g.useMemo(()=>(0,AX.Z)({},X0,e.localeText),[e.localeText]);return g.useMemo(()=>(0,AX.Z)({},e,{localeText:t}),[e,t])},X2=()=>X1().utils,X5=()=>X1().defaultDates,X3=e=>{let t=X2(),n=g.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},X4=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n))},X8=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:o,utils:a,timezone:s})=>{let l=X4(a,a.date(void 0,s),e);n&&a.isBefore(i,l)&&(i=l),t&&a.isAfter(r,l)&&(r=l);let u=e,c=e;for(a.isBefore(e,i)&&(u=i,c=null),a.isAfter(e,r)&&(c&&(c=r),u=null);u||c;){if(u&&a.isAfter(u,r)&&(u=null),c&&a.isBefore(c,i)&&(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},X6=(e,t,n)=>null!=t&&e.isValid(t)?t:n,X9=(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},X7=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Ke=(e,t)=>{let n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},Kt=["year","month","day"],Kn=e=>Kt.includes(e),Kr=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))};function Ki(e){return(0,T.ZP)("MuiTab",e)}let Ko=(0,k.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),Ka=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:l}=e,u={root:["root",o&&a&&"labelIcon",`textColor${(0,w.Z)(n)}`,r&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return(0,y.Z)(u,Ki,t)},Ks=(0,S.ZP)(Mg.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,w.Z)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Ko.iconWrapper}`]:t.iconWrapper},{[`& .${Ko.icon}`]:t.icon}]}})((0,_.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:{[`& > .${Ko.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${Ko.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${Ko.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${Ko.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Ko.selected}`]:{opacity:1},[`&.${Ko.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Ko.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Ko.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Ko.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Ko.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)}}]}))),Kl=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:a,icon:s,iconPosition:l="top",indicator:u,label:c,onChange:h,onClick:d,onFocus:f,selected:m,selectionFollowsFocus:y,textColor:x="inherit",value:b,wrapped:w=!1,...S}=n,_={...n,disabled:i,disableFocusRipple:o,selected:m,icon:!!s,iconPosition:l,label:!!c,fullWidth:a,textColor:x,wrapped:w},C=Ka(_),k=s&&c&&g.isValidElement(s)?g.cloneElement(s,{className:(0,v.Z)(C.icon,s.props.className)}):s;return(0,p.jsxs)(Ks,{focusRipple:!o,className:(0,v.Z)(C.root,r),ref:t,role:"tab","aria-selected":m,disabled:i,onClick:e=>{!m&&h&&h(e,b),d&&d(e)},onFocus:e=>{y&&!m&&h&&h(e,b),f&&f(e)},ownerState:_,tabIndex:m?0:-1,...S,children:["top"===l||"start"===l?(0,p.jsxs)(g.Fragment,{children:[k,c]}):(0,p.jsxs)(g.Fragment,{children:[c,k]}),u]})});var Ku=n(5399);function Kc(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}let Kh={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Kd=n(7665),Kf=n(3633);function Kp(e){return(0,T.ZP)("MuiTabScrollButton",e)}let Kg=(0,k.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Km=e=>{let{classes:t,orientation:n,disabled:r}=e;return(0,y.Z)({root:["root",n,r&&"disabled"]},Kp,t)},Kv=(0,S.ZP)(Mg.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,[`&.${Kg.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),Ky=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:i={},slotProps:o={},direction:a,orientation:s,disabled:l,...u}=n,c=(0,Ai.V)(),h={isRtl:c,...n},d=Km(h),f=i.StartScrollButtonIcon??Kd.Z,g=i.EndScrollButtonIcon??Kf.Z,m=(0,Ku.Z)({elementType:f,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),y=(0,Ku.Z)({elementType:g,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return(0,p.jsx)(Kv,{component:"div",className:(0,v.Z)(d.root,r),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,p.jsx)(f,{...m}):(0,p.jsx)(g,{...y})})});var Kx=n(7151);function Kb(e){return(0,T.ZP)("MuiTabs",e)}let Kw=(0,k.Z)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var KS=n(2444);let K_=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,KC=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,KM=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||"true"===i.getAttribute("aria-disabled");if(!i.hasAttribute("tabindex")||t)i=n(e,i);else{i.focus();return}}},Kk=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return(0,y.Z)({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Kb,l)},KT=(0,S.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Kw.scrollButtons}`]:t.scrollButtons},{[`& .${Kw.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,_.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:{[`& .${Kw.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),KD=(0,S.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"}}]}),KA=(0,S.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"}}]}),KI=(0,S.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,_.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}}]}))),KO=(0,S.ZP)(function(e){let{onChange:t,...n}=e,r=g.useRef(),i=g.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,Mm.Z)(()=>{let e=(0,As.Z)(()=>{let e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,Au.Z)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),g.useEffect(()=>{o(),t(r.current)},[t]),(0,p.jsx)("div",{style:Kh,...n,ref:i})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),KP={},KR=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiTabs"}),r=(0,wP.Z)(),i=(0,Ai.V)(),{"aria-label":o,"aria-labelledby":a,action:s,centered:l=!1,children:u,className:c,component:h="div",allowScrollButtonsMobile:d=!1,indicatorColor:f="primary",onChange:m,orientation:y="horizontal",ScrollButtonComponent:x,scrollButtons:b="auto",selectionFollowsFocus:w,slots:S={},slotProps:_={},TabIndicatorProps:C={},TabScrollButtonProps:k={},textColor:T="primary",value:D,variant:A="standard",visibleScrollbar:I=!1,...O}=n,P="scrollable"===A,R="vertical"===y,E=R?"scrollTop":"scrollLeft",L=R?"top":"left",N=R?"bottom":"right",B=R?"clientHeight":"clientWidth",F=R?"height":"width",z={...n,component:h,allowScrollButtonsMobile:d,indicatorColor:f,orientation:y,vertical:R,scrollButtons:b,textColor:T,variant:A,visibleScrollbar:I,fixed:!P,hideScrollbar:P&&!I,scrollableX:P&&!R,scrollableY:P&&R,centered:l&&!P,scrollButtonsHideMobile:!d},V=Kk(z),Z=(0,Ku.Z)({elementType:S.StartScrollButtonIcon,externalSlotProps:_.startScrollButtonIcon,ownerState:z}),j=(0,Ku.Z)({elementType:S.EndScrollButtonIcon,externalSlotProps:_.endScrollButtonIcon,ownerState:z}),[H,W]=g.useState(!1),[$,G]=g.useState(KP),[U,q]=g.useState(!1),[Y,X]=g.useState(!1),[K,Q]=g.useState(!1),[J,ee]=g.useState({overflow:"hidden",scrollbarWidth:0}),et=new Map,en=g.useRef(null),er=g.useRef(null),ei={slots:S,slotProps:{indicator:C,scrollButton:k,..._}},eo=()=>{let e,t;let n=en.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!==D){let e=er.current.children;if(e.length>0){let n=e[et.get(D)];t=n?n.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},ea=(0,Kx.Z)(()=>{let e;let{tabsMeta:t,tabMeta:n}=eo(),r=0;R?(e="top",n&&t&&(r=n.top-t.top+t.scrollTop)):(e=i?"right":"left",n&&t&&(r=(i?-1:1)*(n[e]-t[e]+t.scrollLeft)));let o={[e]:r,[F]:n?n[F]:0};if("number"!=typeof $[e]||"number"!=typeof $[F])G(o);else{let t=Math.abs($[e]-o[e]),n=Math.abs($[F]-o[F]);(t>=1||n>=1)&&G(o)}}),es=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=()=>{}){let{ease:o=Kc,duration:a=300}=r,s=null,l=t[e],u=!1,c=()=>{u=!0},h=r=>{if(u){i(Error("Animation cancelled"));return}null===s&&(s=r);let c=Math.min(1,(r-s)/a);if(t[e]=o(c)*(n-l)+l,c>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(h)};return l===n?i(Error("Element already at target position")):requestAnimationFrame(h),c}(E,en.current,e,{duration:r.transitions.duration.standard}):en.current[E]=e},el=e=>{let t=en.current[E];R?t+=e:t+=e*(i?-1:1),es(t)},eu=()=>{let e=en.current[B],t=0,n=Array.from(er.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[B]>e){0===r&&(t=e);break}t+=i[B]}return t},ec=()=>{el(-1*eu())},eh=()=>{el(eu())},[ed,{onChange:ef,...ep}]=(0,kW.Z)("scrollbar",{className:(0,v.Z)(V.scrollableX,V.hideScrollbar),elementType:KO,shouldForwardComponentProp:!0,externalForwardedProps:ei,ownerState:z}),eg=g.useCallback(e=>{ef?.(e),ee({overflow:null,scrollbarWidth:e})},[ef]),[em,ev]=(0,kW.Z)("scrollButtons",{className:(0,v.Z)(V.scrollButtons,k.className),elementType:Ky,externalForwardedProps:ei,ownerState:z,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:S.startScrollButtonIcon||S.StartScrollButtonIcon,EndScrollButtonIcon:S.endScrollButtonIcon||S.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Z,endScrollButtonIcon:j}}}),ey=(0,Kx.Z)(e=>{let{tabsMeta:t,tabMeta:n}=eo();n&&t&&(n[L]<t[L]?es(t[E]+(n[L]-t[L]),{animation:e}):n[N]>t[N]&&es(t[E]+(n[N]-t[N]),{animation:e}))}),ex=(0,Kx.Z)(()=>{P&&!1!==b&&Q(!K)});g.useEffect(()=>{let e,t;let n=(0,As.Z)(()=>{en.current&&ea()}),r=(0,Au.Z)(en.current);return r.addEventListener("resize",n),"undefined"!=typeof ResizeObserver&&(e=new ResizeObserver(n),Array.from(er.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(),ex()})).observe(er.current,{childList:!0}),()=>{n.clear(),r.removeEventListener("resize",n),t?.disconnect(),e?.disconnect()}},[ea,ex]),g.useEffect(()=>{let e=Array.from(er.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&P&&!1!==b){let n=e[0],r=e[t-1],i={root:en.current,threshold:.99},o=new IntersectionObserver(e=>{q(!e[0].isIntersecting)},i);o.observe(n);let a=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[P,b,K,u?.length]),g.useEffect(()=>{W(!0)},[]),g.useEffect(()=>{ea()}),g.useEffect(()=>{ey(KP!==$)},[ey,$]),g.useImperativeHandle(s,()=>({updateIndicator:ea,updateScrollButtons:ex}),[ea,ex]);let[eb,ew]=(0,kW.Z)("indicator",{className:(0,v.Z)(V.indicator,C.className),elementType:KI,externalForwardedProps:ei,ownerState:z,additionalProps:{style:$}}),eS=(0,p.jsx)(eb,{...ew}),e_=0,eC=g.Children.map(u,e=>{if(!g.isValidElement(e))return null;let t=void 0===e.props.value?e_:e.props.value;et.set(t,e_);let n=t===D;return e_+=1,g.cloneElement(e,{fullWidth:"fullWidth"===A,indicator:n&&!H&&eS,selected:n,selectionFollowsFocus:w,onChange:m,textColor:T,value:t,...1!==e_||!1!==D||e.props.tabIndex?{}:{tabIndex:0}})}),eM=e=>{let t=er.current,n=(0,KS.Z)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===y?"ArrowLeft":"ArrowUp",o="horizontal"===y?"ArrowRight":"ArrowDown";switch("horizontal"===y&&i&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),KM(t,n,KC);break;case o:e.preventDefault(),KM(t,n,K_);break;case"Home":e.preventDefault(),KM(t,null,K_);break;case"End":e.preventDefault(),KM(t,null,KC)}},ek=(()=>{let e={};e.scrollbarSizeListener=P?(0,p.jsx)(ed,{...ep,onChange:eg}):null;let t=P&&("auto"===b&&(U||Y)||!0===b);return e.scrollButtonStart=t?(0,p.jsx)(em,{direction:i?"right":"left",onClick:ec,disabled:!U,...ev}):null,e.scrollButtonEnd=t?(0,p.jsx)(em,{direction:i?"left":"right",onClick:eh,disabled:!Y,...ev}):null,e})(),[eT,eD]=(0,kW.Z)("root",{ref:t,className:(0,v.Z)(V.root,c),elementType:KT,externalForwardedProps:{...ei,...O,component:h},ownerState:z}),[eA,eI]=(0,kW.Z)("scroller",{ref:en,className:V.scroller,elementType:KD,externalForwardedProps:ei,ownerState:z,additionalProps:{style:{overflow:J.overflow,[R?`margin${i?"Left":"Right"}`:"marginBottom"]:I?void 0:-J.scrollbarWidth}}}),[eO,eP]=(0,kW.Z)("list",{ref:er,className:(0,v.Z)(V.list,V.flexContainer),elementType:KA,externalForwardedProps:ei,ownerState:z,getSlotProps:e=>({...e,onKeyDown:t=>{eM(t),e.onKeyDown?.(t)}})});return(0,p.jsxs)(eT,{...eD,children:[ek.scrollButtonStart,ek.scrollbarSizeListener,(0,p.jsxs)(eA,{...eI,children:[(0,p.jsx)(eO,{"aria-label":o,"aria-labelledby":a,"aria-orientation":"vertical"===y?"vertical":null,role:"tablist",...eP,children:eC}),H&&eS]}),ek.scrollButtonEnd]})}),KE=(0,kV.Z)((0,p.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),KL=(0,kV.Z)((0,p.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),KN=(0,kV.Z)((0,p.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");(0,kV.Z)((0,p.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,kV.Z)((0,p.jsxs)(g.Fragment,{children:[(0,p.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,p.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");let KB=(0,kV.Z)((0,p.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"),KF=(0,kV.Z)((0,p.jsxs)(g.Fragment,{children:[(0,p.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,p.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Kz=(0,kV.Z)((0,p.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"),KV=()=>X1().localeText;function KZ(e){return(0,T.ZP)("MuiDateTimePickerTabs",e)}(0,k.Z)("MuiDateTimePickerTabs",["root"]);let Kj=e=>Kn(e)?"date":"time",KH=e=>"date"===e?"day":"hours",KW=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},KZ,t)},K$=(0,S.ZP)(KR,{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}`,[`& .${Kw.indicator}`]:{bottom:"auto",top:0}}})),KG=function(e){let t=(0,Xq.Z)({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,p.jsx)(KB,{}),onViewChange:r,timeIcon:i=(0,p.jsx)(KF,{}),view:o,hidden:a="undefined"==typeof window||window.innerHeight<667,className:s,sx:l}=t,u=KV(),c=KW(t);return a?null:(0,p.jsxs)(K$,{ownerState:t,variant:"fullWidth",value:Kj(o),onChange:(e,t)=>{r(KH(t))},className:(0,v.Z)(s,c.root),sx:l,children:[(0,p.jsx)(Kl,{value:"date","aria-label":u.dateTableLabel,icon:(0,p.jsx)(g.Fragment,{children:n})}),(0,p.jsx)(Kl,{value:"time","aria-label":u.timeTableLabel,icon:(0,p.jsx)(g.Fragment,{children:i})})]})};function KU(e){return(0,T.ZP)("MuiPickersToolbarText",e)}let Kq=(0,k.Z)("MuiPickersToolbarText",["root","selected"]),KY=["className","selected","value"],KX=e=>{let{classes:t,selected:n}=e;return(0,y.Z)({root:["root",n&&"selected"]},KU,t)},KK=(0,S.ZP)(kz.Z,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Kq.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${Kq.selected}`]:{color:(e.vars||e).palette.text.primary}})),KQ=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,o=(0,AK.Z)(n,KY),a=KX(n);return(0,p.jsx)(KK,(0,AX.Z)({ref:t,className:(0,v.Z)(a.root,r),component:"span"},o,{children:i}))});function KJ(e){return(0,T.ZP)("MuiPickersToolbar",e)}let K0=(0,k.Z)("MuiPickersToolbar",["root","content"]),K1=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],K2=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],content:["content"]},KJ,t)},K5=(0,S.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"}}]})),K3=(0,S.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"}}]}),K4=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:o,hidden:a,titleId:s}=n,l=(0,AK.Z)(n,K1),u=K2(n);return a?null:(0,p.jsxs)(K5,(0,AX.Z)({ref:t,className:(0,v.Z)(u.root,i),ownerState:n},l,{children:[(0,p.jsx)(kz.Z,{color:"text.secondary",variant:"overline",id:s,children:o}),(0,p.jsx)(K3,{className:u.content,ownerState:n,children:r})]}))}),K8=["align","className","selected","typographyClassName","value","variant","width"],K6=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},KJ,t)},K9=(0,S.ZP)(L.Z,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),K7=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:o,typographyClassName:a,value:s,variant:l,width:u}=n,c=(0,AK.Z)(n,K8),h=K6(n);return(0,p.jsx)(K9,(0,AX.Z)({variant:"text",ref:t,className:(0,v.Z)(h.root,i)},u?{sx:{width:u}}:{},c,{children:(0,p.jsx)(KQ,{align:r,className:a,variant:l,value:s,selected:o})}))});function Qe(e){return(0,T.ZP)("MuiDateTimePickerToolbar",e)}let Qt=(0,k.Z)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Qn=["hours","minutes","seconds"],Qr=e=>Qn.includes(e),Qi=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,Qo=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,Qa=(e,t,n,r)=>{let i=Qo(r.getHours(e),t,n);return r.setHours(e,i)},Qs=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),Ql=(e,t)=>(n,r)=>e?t.isAfter(n,r):Qs(n,t)>Qs(r,t);function Qu(e,t,n,r){let i=X2();return{meridiemMode:Qi(e,i),handleMeridiemChange:g.useCallback(o=>{n(null==e?null:Qa(e,o,!!t,i),r??"partial")},[t,e,n,r,i])}}let Qc=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],Qh=e=>{let{classes:t,isLandscape:n,isRtl:r}=e;return(0,y.Z)({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Qe,t)},Qd=(0,S.ZP)(K4,{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}`,[`& .${K0.content} .${Kq.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}}]})),Qf=(0,S.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),Qp=(0,S.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"}}]}),Qg=(0,S.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}}]}),Qm=(0,S.ZP)(KQ,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),Qv=(0,S.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Qt.ampmLabel}`]:t.ampmLabel},{[`&.${Qt.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Qt.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function Qy(e){let t=(0,Xq.Z)({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:i,onChange:o,view:a,isLandscape:s,onViewChange:l,toolbarFormat:u,toolbarPlaceholder:c="––",views:h,disabled:d,readOnly:f,toolbarVariant:m="mobile",toolbarTitle:y,className:x}=t,b=(0,AK.Z)(t,Qc),w=(0,Ai.V)(),S=(0,AX.Z)({},t,{isRtl:w}),_=X2(),{meridiemMode:C,handleMeridiemChange:M}=Qu(i,n,o),k=!!(n&&!r),T="desktop"===m,D=KV(),A=Qh(S),I=y??D.dateTimePickerToolbarTitle,O=g.useMemo(()=>i?u?_.formatByString(i,u):_.format(i,"shortDate"):c,[i,u,c,_]);return(0,p.jsxs)(Qd,(0,AX.Z)({isLandscape:s,className:(0,v.Z)(A.root,x),toolbarTitle:I},b,{ownerState:S,children:[(0,p.jsxs)(Qf,{className:A.dateContainer,ownerState:S,children:[h.includes("year")&&(0,p.jsx)(K7,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:"year"===a,value:i?_.format(i,"year"):"–"}),h.includes("day")&&(0,p.jsx)(K7,{tabIndex:-1,variant:T?"h5":"h4",onClick:()=>l("day"),selected:"day"===a,value:O})]}),(0,p.jsxs)(Qp,{className:A.timeContainer,ownerState:S,children:[(0,p.jsxs)(Qg,{className:A.timeDigitsContainer,ownerState:S,children:[h.includes("hours")&&(0,p.jsxs)(g.Fragment,{children:[(0,p.jsx)(K7,{variant:T?"h5":"h3",width:T&&!s?48:void 0,onClick:()=>l("hours"),selected:"hours"===a,value:i?n?_.format(i,"hours12h"):_.format(i,"hours24h"):"--"}),(0,p.jsx)(Qm,{variant:T?"h5":"h3",value:":",className:A.separator,ownerState:S}),(0,p.jsx)(K7,{variant:T?"h5":"h3",width:T&&!s?48:void 0,onClick:()=>l("minutes"),selected:"minutes"===a||!h.includes("minutes")&&"hours"===a,value:i?_.format(i,"minutes"):"--",disabled:!h.includes("minutes")})]}),h.includes("seconds")&&(0,p.jsxs)(g.Fragment,{children:[(0,p.jsx)(Qm,{variant:T?"h5":"h3",value:":",className:A.separator,ownerState:S}),(0,p.jsx)(K7,{variant:T?"h5":"h3",width:T&&!s?48:void 0,onClick:()=>l("seconds"),selected:"seconds"===a,value:i?_.format(i,"seconds"):"--"})]})]}),k&&!T&&(0,p.jsxs)(Qv,{className:A.ampmSelection,ownerState:S,children:[(0,p.jsx)(K7,{variant:"subtitle2",selected:"am"===C,typographyClassName:A.ampmLabel,value:Ke(_,"am"),onClick:f?void 0:()=>M("am"),disabled:d}),(0,p.jsx)(K7,{variant:"subtitle2",selected:"pm"===C,typographyClassName:A.ampmLabel,value:Ke(_,"pm"),onClick:f?void 0:()=>M("pm"),disabled:d})]}),n&&T&&(0,p.jsx)(K7,{variant:"h5",onClick:()=>l("meridiem"),selected:"meridiem"===a,value:i&&C?Ke(_,C):"--",width:48})]})]}))}let Qx=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i;let o=n??r;if(null!=e)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}};function Qb(e){return(0,T.ZP)("MuiPickersArrowSwitcher",e)}(0,k.Z)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);let Qw=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],QS=["ownerState"],Q_=["ownerState"],QC=(0,S.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),QM=(0,S.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Qk=(0,S.ZP)(x4.Z,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),QT=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Qb,t)},QD=g.forwardRef(function(e,t){let n=(0,Ai.V)(),r=(0,Xq.Z)({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:o,slots:a,slotProps:s,isNextDisabled:l,isNextHidden:u,onGoToNext:c,nextLabel:h,isPreviousDisabled:d,isPreviousHidden:f,onGoToPrevious:g,previousLabel:m,labelId:y}=r,x=(0,AK.Z)(r,Qw),b=QT(r),w=a?.previousIconButton??Qk,S=(0,Ku.Z)({elementType:w,externalSlotProps:s?.previousIconButton,additionalProps:{size:"medium",title:m,"aria-label":m,disabled:d,edge:"end",onClick:g},ownerState:(0,AX.Z)({},r,{hidden:f}),className:(0,v.Z)(b.button,b.previousIconButton)}),_=a?.nextIconButton??Qk,C=(0,Ku.Z)({elementType:_,externalSlotProps:s?.nextIconButton,additionalProps:{size:"medium",title:h,"aria-label":h,disabled:l,edge:"start",onClick:c},ownerState:(0,AX.Z)({},r,{hidden:u}),className:(0,v.Z)(b.button,b.nextIconButton)}),M=a?.leftArrowIcon??KL,k=(0,Ku.Z)({elementType:M,externalSlotProps:s?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:b.leftArrowIcon}),T=(0,AK.Z)(k,QS),D=a?.rightArrowIcon??KN,A=(0,Ku.Z)({elementType:D,externalSlotProps:s?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:b.rightArrowIcon}),I=(0,AK.Z)(A,Q_);return(0,p.jsxs)(QC,(0,AX.Z)({ref:t,className:(0,v.Z)(b.root,o),ownerState:r},x,{children:[(0,p.jsx)(w,(0,AX.Z)({},S,{children:n?(0,p.jsx)(D,(0,AX.Z)({},I)):(0,p.jsx)(M,(0,AX.Z)({},T))})),i?(0,p.jsx)(kz.Z,{variant:"subtitle1",component:"span",id:y,children:i}):(0,p.jsx)(QM,{className:b.spacer,ownerState:r}),(0,p.jsx)(_,(0,AX.Z)({},C,{children:n?(0,p.jsx)(M,(0,AX.Z)({},T)):(0,p.jsx)(D,(0,AX.Z)({},I))}))]}))});var QA=n(1925),QI=n(9831);function QO({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:a,onFocusedViewChange:s}){let l=g.useRef(n),u=g.useRef(i),c=g.useRef(i.includes(n)?n:i[0]),[h,d]=(0,QI.Z)({name:"useViews",state:"view",controlled:r,default:c.current}),f=g.useRef(o?h:null),[p,m]=(0,QI.Z)({name:"useViews",state:"focusedView",controlled:a,default:f.current});g.useEffect(()=>{(l.current&&l.current!==n||u.current&&u.current.some(e=>!i.includes(e)))&&(d(i.includes(n)?n:i[0]),u.current=i,l.current=n)},[n,d,h,i]);let v=i.indexOf(h),y=i[v-1]??null,x=i[v+1]??null,b=(0,QA.Z)((e,t)=>{t?m(e):m(t=>e===t?null:t),s?.(e,t)}),w=(0,QA.Z)(e=>{b(e,!0),e!==h&&(d(e),t&&t(e))}),S=(0,QA.Z)(()=>{x&&w(x)}),_=(0,QA.Z)((t,n,r)=>{let o="finish"===n,a=r?i.indexOf(r)<i.length-1:!!x;if(e(t,o&&a?"partial":n,r),r&&r!==h){let e=i[i.indexOf(r)+1];e&&w(e)}else o&&S()});return{view:h,setView:w,focusedView:p,setFocusedView:b,nextView:x,previousView:y,defaultView:i.includes(n)?n:i[0],goToNextView:S,setValueAndGoToNextView:_}}let QP=(0,S.ZP)("div")({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function QR(e){return(0,T.ZP)("MuiTimeClock",e)}(0,k.Z)("MuiTimeClock",["root","arrowSwitcher"]);let QE=110,QL=110,QN=QE,QB=0,QF=QN-QE,Qz=QB-QL,QV=e=>180/Math.PI*e,QZ=(e,t,n)=>{let r=t-QE,i=n-QL,o=QV(Math.atan2(QF,Qz)-Math.atan2(r,i));return{value:Math.floor((o=Math.round(o/e)*e%360)/e)||0,distance:Math.sqrt(r**2+i**2)}},Qj=(e,t,n=1)=>{let{value:r}=QZ(6*n,e,t);return r*n%60},QH=(e,t,n)=>{let{value:r,distance:i}=QZ(30,e,t),o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o};function QW(e){return(0,T.ZP)("MuiClockPointer",e)}(0,k.Z)("MuiClockPointer",["root","thumb"]);let Q$=["className","hasSelected","isInner","type","viewValue"],QG=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],thumb:["thumb"]},QW,t)},QU=(0,S.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"])}}]})),Qq=(0,S.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 QY(e){let t;let n=(0,Xq.Z)({props:e,name:"MuiClockPointer"}),{className:r,isInner:i,type:o,viewValue:a}=n,s=(0,AK.Z)(n,Q$),l=g.useRef(o);g.useEffect(()=>{l.current=o},[o]);let u=(0,AX.Z)({},n,{shouldAnimate:l.current!==o}),c=QG(u);return(0,p.jsx)(QU,(0,AX.Z)({style:(t=360/("hours"===o?12:60)*a,"hours"===o&&a>12&&(t-=360),{height:Math.round((i?.26:.4)*220),transform:`rotateZ(${t}deg)`}),className:(0,v.Z)(c.root,r),ownerState:u},s,{children:(0,p.jsx)(Qq,{ownerState:u,className:c.thumb})}))}function QX(e){return(0,T.ZP)("MuiClock",e)}(0,k.Z)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);let QK=e=>{let{classes:t,meridiemMode:n}=e;return(0,y.Z)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]},QX,t)},QQ=(0,S.ZP)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),QJ=(0,S.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"}),Q0=(0,S.ZP)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Q1=(0,S.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"}}}]}),Q2=(0,S.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%)"})),Q5=(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}}}]}),Q3=(0,S.ZP)(x4.Z,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>(0,AX.Z)({},Q5(e,"am"),{position:"absolute",left:8})),Q4=(0,S.ZP)(x4.Z,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>(0,AX.Z)({},Q5(e,"pm"),{position:"absolute",right:8})),Q8=(0,S.ZP)(kz.Z,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Q6(e){let t=(0,Xq.Z)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:u,minutesStep:c=1,onChange:h,selectedId:d,type:f,viewValue:m,viewRange:[y,x],disabled:b=!1,readOnly:w,className:S}=t,_=X2(),C=KV(),M=g.useRef(!1),k=QK(t),T=l(m,f),D=!n&&"hours"===f&&(m<1||m>12),A=(e,t)=>{!(b||w||l(e,f))&&h(e,t)},I=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){let t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}A("seconds"===f||"minutes"===f?Qj(r,i,c):QH(r,i,!!n),t)},O=e=>{M.current=!0,I(e,"shallow")},P=g.useMemo(()=>"hours"===f||m%5==0,[f,m]),R="minutes"===f?c:1,E=g.useRef(null);(0,D9.Z)(()=>{i&&E.current.focus()},[i]);let L=e=>Math.max(y,Math.min(x,e)),N=e=>(e+(x+1))%(x+1);return(0,p.jsxs)(QQ,{className:(0,v.Z)(k.root,S),children:[(0,p.jsxs)(QJ,{className:k.clock,children:[(0,p.jsx)(Q1,{onTouchMove:O,onTouchStart:O,onTouchEnd:e=>{M.current&&(I(e,"finish"),M.current=!1),e.preventDefault()},onMouseUp:e=>{M.current&&(M.current=!1),I(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&I(e.nativeEvent,"shallow")},ownerState:{disabled:b},className:k.squareMask}),!T&&(0,p.jsxs)(g.Fragment,{children:[(0,p.jsx)(Q2,{className:k.pin}),null!=a&&(0,p.jsx)(QY,{type:f,viewValue:m,isInner:D,hasSelected:P})]}),(0,p.jsx)(Q0,{"aria-activedescendant":d,"aria-label":C.clockLabelText(f,a,_,null==a?null:_.format(a,"fullTime")),ref:E,role:"listbox",onKeyDown:e=>{if(!M.current)switch(e.key){case"Home":A(y,"partial"),e.preventDefault();break;case"End":A(x,"partial"),e.preventDefault();break;case"ArrowUp":A(N(m+R),"partial"),e.preventDefault();break;case"ArrowDown":A(N(m-R),"partial"),e.preventDefault();break;case"PageUp":A(L(m+5),"partial"),e.preventDefault();break;case"PageDown":A(L(m-5),"partial"),e.preventDefault();break;case"Enter":case" ":A(m,"finish"),e.preventDefault()}},tabIndex:0,className:k.wrapper,children:o})]}),n&&r&&(0,p.jsxs)(g.Fragment,{children:[(0,p.jsx)(Q3,{onClick:w?void 0:()=>s("am"),disabled:b||null===u,ownerState:t,className:k.amButton,title:Ke(_,"am"),children:(0,p.jsx)(Q8,{variant:"caption",className:k.meridiemText,children:Ke(_,"am")})}),(0,p.jsx)(Q4,{disabled:b||null===u,onClick:w?void 0:()=>s("pm"),ownerState:t,className:k.pmButton,title:Ke(_,"pm"),children:(0,p.jsx)(Q8,{variant:"caption",className:k.meridiemText,children:Ke(_,"pm")})})]})]})}function Q9(e){return(0,T.ZP)("MuiClockNumber",e)}let Q7=(0,k.Z)("MuiClockNumber",["root","selected","disabled"]),Je=["className","disabled","index","inner","label","selected"],Jt=e=>{let{classes:t,selected:n,disabled:r}=e;return(0,y.Z)({root:["root",n&&"selected",r&&"disabled"]},Q9,t)},Jn=(0,S.ZP)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Q7.disabled}`]:t.disabled},{[`&.${Q7.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},[`&.${Q7.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${Q7.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,AX.Z)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function Jr(e){let t=(0,Xq.Z)({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:o,label:a,selected:s}=t,l=(0,AK.Z)(t,Je),u=Jt(t),c=i%12/12*Math.PI*2-Math.PI/2,h=91*(o?.65:1),d=Math.round(Math.cos(c)*h),f=Math.round(Math.sin(c)*h);return(0,p.jsx)(Jn,(0,AX.Z)({className:(0,v.Z)(u.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!s||void 0,role:"option",style:{transform:`translate(${d}px, ${f+92}px`},ownerState:t},l,{children:a}))}let Ji=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,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,p.jsx)(Jr,{id:u?i:void 0,index:t,inner:l,selected:u,disabled:r(t),label:a,"aria-label":n(a)},t))}return s},Jo=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{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,p.jsx)(Jr,{label:o,id:s?i:void 0,index:a+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(o)},e)})},Ja=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:i,valueManager:o})=>{let a;let s=X2(),l=g.useRef(n),u=t??l.current??o.emptyValue,c=g.useMemo(()=>o.getTimezone(s,u),[s,o,u]),h=(0,QA.Z)(e=>null==c?e:o.setTimezone(s,c,e));return a=e||c||(r?s.getTimezone(r):"default"),{value:g.useMemo(()=>o.setTimezone(s,a,u),[o,s,a,u]),handleValueChange:(0,QA.Z)((e,...t)=>{let n=h(e);i?.(n,...t)}),timezone:a}},Js=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:o,valueManager:a})=>{let[s,l]=(0,QI.Z)({name:e,state:"value",controlled:n,default:r??a.emptyValue});return Ja({timezone:t,value:s,defaultValue:void 0,referenceDate:i,onChange:(0,QA.Z)((e,...t)=>{l(e),o?.(e,...t)}),valueManager:a})},Jl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Ju=e=>Math.max(...e.map(e=>Jl[e.type]??1)),Jc=(e,t,n)=>{if(t===Jl.year)return e.startOfYear(n);if(t===Jl.month)return e.startOfMonth(n);if(t===Jl.day)return e.startOfDay(n);let r=n;return t<Jl.minutes&&(r=e.setMinutes(r,0)),t<Jl.seconds&&(r=e.setSeconds(r,0)),t<Jl.milliseconds&&(r=e.setMilliseconds(r,0)),r},Jh=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():Jc(t,n,X7(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=Jc(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=Jc(t,n,e.maxDate));let a=Ql(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,o)&&(o=Jc(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:X4(t,o,e.minTime))),null!=e.maxTime&&a(o,e.maxTime)&&(o=Jc(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:X4(t,o,e.maxTime))),o},Jd=(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}},Jf=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return -1;case"PageUp":return 5;case"PageDown":return -5;default:return 0}},Jp=(e,t)=>{let n=[],r=e.date(void 0,"default"),i=e.startOfWeek(r),o=e.endOfWeek(r),a=i;for(;e.isBefore(a,o);)n.push(a),a=e.addDays(a,1);return n.map(n=>e.formatByString(n,t))},Jg=(e,t,n,r)=>{switch(n){case"month":return X9(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return Jp(e,r);case"meridiem":{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},Jm=["0","1","2","3","4","5","6","7","8","9"],Jv=e=>{let t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?Jm:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),"s"))},Jy=(e,t)=>{if("0"===t[0])return e;let n=[],r="";for(let i=0;i<e.length;i+=1){r+=e[i];let o=t.indexOf(r);o>-1&&(n.push(o.toString()),r="")}return n.join("")},Jx=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),Jb=(e,t)=>{let n=Jy(e,t);return" "!==n&&!Number.isNaN(Number(n))},Jw=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},JS=(e,t,n,r,i)=>{if("day"===i.type&&"digit-with-letter"===i.contentType){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let o=t.toString();return i.hasLeadingZerosInInput&&(o=Jw(o,i.maxLength)),Jx(o,r)},J_=(e,t,n,r,i,o,a,s)=>{let l=Jf(r),u="Home"===r,c="End"===r,h=""===n.value||u||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{let r=i[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),d=t=>JS(e,t,r,o,n),f="minutes"===n.type&&s?.minutesStep?s.minutesStep:1,p=parseInt(Jy(n.value,o),10)+l*f;if(h){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);p=l>0||u?r.minimum:r.maximum}return d((p%f!=0&&((l<0||u)&&(p+=f-(f+p)%f),(l>0||c)&&(p-=p%f)),p>r.maximum)?r.minimum+(p-r.maximum-1)%(r.maximum-r.minimum+1):p<r.minimum?r.maximum-(r.minimum-p-1)%(r.maximum-r.minimum+1):p)})():(()=>{let r=Jg(e,t,n.type,n.format);if(0===r.length)return n.value;if(h)return l>0||u?r[0]:r[r.length-1];let i=((r.indexOf(n.value)+l)%r.length+r.length)%r.length;return r[i]})()},JC=(e,t,n)=>{let r=e.value||e.placeholder,i="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Jy(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!i&&1===r.length&&(r=`${r}\u200e`),"input-rtl"===t&&(r=`\u2068${r}\u2069`),r},JM=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),Jk=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,JT=(e,t,n,r)=>{if("digit"!==t)return!1;let i=e.date(void 0,"default");switch(n){case"year":if(Jk(e,r))return"0001"===e.formatByString(e.setYear(i,1),r);return"01"===e.formatByString(e.setYear(i,2001),r);case"month":return e.formatByString(e.startOfYear(i),r).length>1;case"day":return e.formatByString(e.startOfMonth(i),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),r).length>1;case"hours":return e.formatByString(e.setHours(i,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error("Invalid section type")}},JD=(e,t,n)=>{let r=t.some(e=>"day"===e.type),i=[],o=[];for(let e=0;e<t.length;e+=1){let a=t[e];r&&"weekDay"===a.type||(i.push(a.format),o.push(JC(a,"non-input",n)))}let a=i.join(" "),s=o.join(" ");return e.parse(s,a)},JA=(e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=X9(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:Jk(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+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=Jp(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(o);return Jy(e.formatByString(e.endOfDay(r),n),t)!==i.toString()?{minimum:1,maximum:Number(Jy(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:i}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},JI=(e,t)=>{},JO=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=Jp(e,t.format),i=e.formatByString(n,t.format),o=r.indexOf(i),a=r.indexOf(t.value);return e.addDays(n,a-o)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{let t=12>e.getHours(n),i=e.getHours(r);if(t&&i>=12)return e.addHours(r,-12);if(!t&&i<12)return e.addHours(r,12);return r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},JP={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},JR=(e,t,n,r,i)=>[...n].sort((e,t)=>JP[e.type]-JP[t.type]).reduce((n,r)=>!i||r.modified?JO(e,r,t,n):n,r),JE=()=>navigator.userAgent.toLowerCase().includes("android"),JL=(e,t)=>{let n={};if(!t)return e.forEach((t,r)=>{let i=r===e.length-1?null:r+1;n[r]={leftIndex:0===r?null:r-1,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};let r={},i={},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)i[e]=s,r[s]=e,s-=1;o=a+1}return e.forEach((t,o)=>{let a=i[o],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[o]={leftIndex:s,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},JN=(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},JB=(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}},JF=(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}},Jz=["value","referenceDate"],JV={emptyValue:null,getTodayValue:X7,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,AK.Z)(e,Jz);return null!=t&&r.utils.isValid(t)?t:null!=n?n:Jh(r)},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)},JZ={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{let r=e.map(e=>{let r=JC(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`\u2066${r}\u2069`:r},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)},Jj=({value:e,referenceDate:t,utils:n,props:r,timezone:i})=>{let o=g.useMemo(()=>JV.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Jl.day,timezone:i,getTodayDate:()=>X7(n,i,"date")}),[]);return e??o},JH=["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"],JW=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],arrowSwitcher:["arrowSwitcher"]},QR,t)},J$=(0,S.ZP)(QP,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),JG=(0,S.ZP)(QD,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),JU=["hours","minutes"],Jq=g.forwardRef(function(e,t){let n=X2(),r=(0,Xq.Z)({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:a,slots:s,slotProps:l,value:u,defaultValue:c,referenceDate:h,disableIgnoringDatePartForTimeValidation:d=!1,maxTime:f,minTime:m,disableFuture:y,disablePast:x,minutesStep:b=1,shouldDisableTime:w,showViewSwitcher:S,onChange:_,view:C,views:M=JU,openTo:k,onViewChange:T,focusedView:D,onFocusedViewChange:A,className:I,disabled:O,readOnly:P,timezone:R}=r,E=(0,AK.Z)(r,JH),{value:L,handleValueChange:N,timezone:B}=Js({name:"TimeClock",timezone:R,value:u,defaultValue:c,referenceDate:h,onChange:_,valueManager:JV}),F=Jj({value:L,referenceDate:h,utils:n,props:r,timezone:B}),z=KV(),V=X3(B),{view:Z,setView:j,previousView:H,nextView:W,setValueAndGoToNextView:$}=QO({view:C,views:M,openTo:k,onViewChange:T,onChange:N,focusedView:D,onFocusedViewChange:A}),{meridiemMode:G,handleMeridiemChange:U}=Qu(F,i,$),q=g.useCallback((e,t)=>{let r=Ql(d,n),o="hours"===t||"minutes"===t&&M.includes("seconds"),a=({start:e,end:t})=>!(m&&r(m,t)||f&&r(e,f)||y&&r(e,V)||x&&r(V,o?t:e)),s=(e,r=1)=>{if(e%r!=0)return!1;if(w)switch(t){case"hours":return!w(n.setHours(F,e),"hours");case"minutes":return!w(n.setMinutes(F,e),"minutes");case"seconds":return!w(n.setSeconds(F,e),"seconds");default:return!1}return!0};switch(t){case"hours":{let t=Qo(e,G,i),r=n.setHours(F,t);if(n.getHours(r)!==t)return!0;return!a({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case"minutes":{let t=n.setMinutes(F,e);return!a({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case"seconds":{let t=n.setSeconds(F,e);return!a({start:t,end:t})||!s(e)}default:throw Error("not supported")}},[i,F,d,f,G,m,b,w,n,y,x,V,M]),Y=(0,TP.Z)(),X=g.useMemo(()=>{switch(Z){case"hours":{let e;let t=(e,t)=>{let r=Qo(e,G,i);$(n.setHours(F,r),t,"hours")},r=n.getHours(F);return e=i?r>12?[12,23]:[0,11]:[0,23],{onChange:t,viewValue:r,children:Ji({value:L,utils:n,ampm:i,onChange:t,getClockNumberText:z.hoursClockNumberText,isDisabled:e=>O||q(e,"hours"),selectedId:Y}),viewRange:e}}case"minutes":{let e=n.getMinutes(F),t=(e,t)=>{$(n.setMinutes(F,e),t,"minutes")};return{viewValue:e,onChange:t,children:Jo({utils:n,value:e,onChange:t,getClockNumberText:z.minutesClockNumberText,isDisabled:e=>O||q(e,"minutes"),selectedId:Y}),viewRange:[0,59]}}case"seconds":{let e=n.getSeconds(F),t=(e,t)=>{$(n.setSeconds(F,e),t,"seconds")};return{viewValue:e,onChange:t,children:Jo({utils:n,value:e,onChange:t,getClockNumberText:z.secondsClockNumberText,isDisabled:e=>O||q(e,"seconds"),selectedId:Y}),viewRange:[0,59]}}default:throw Error("You must provide the type for ClockView")}},[Z,n,L,i,z.hoursClockNumberText,z.minutesClockNumberText,z.secondsClockNumberText,G,$,F,q,Y,O]),K=JW(r);return(0,p.jsxs)(J$,(0,AX.Z)({ref:t,className:(0,v.Z)(K.root,I),ownerState:r},E,{children:[(0,p.jsx)(Q6,(0,AX.Z)({autoFocus:a??!!D,ampmInClock:o&&M.includes("hours"),value:L,type:Z,ampm:i,minutesStep:b,isTimeDisabled:q,meridiemMode:G,handleMeridiemChange:U,selectedId:Y,disabled:O,readOnly:P},X)),S&&(0,p.jsx)(JG,{className:K.arrowSwitcher,slots:s,slotProps:l,onGoToPrevious:()=>j(H),isPreviousDisabled:!H,previousLabel:z.openPreviousView,onGoToNext:()=>j(W),isNextDisabled:!W,nextLabel:z.openNextView,ownerState:r})]}))}),JY=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minTime:f,maxTime:g,shouldDisableTime:m,minutesStep:v,ampm:y,ampmInClock:x,slots:b,slotProps:w,readOnly:S,disabled:_,sx:C,autoFocus:M,showViewSwitcher:k,disableIgnoringDatePartForTimeValidation:T,timezone:D})=>(0,p.jsx)(Jq,{view:e,onViewChange:t,focusedView:n&&Qr(n)?n:null,onFocusedViewChange:r,views:i.filter(Qr),value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minTime:f,maxTime:g,shouldDisableTime:m,minutesStep:v,ampm:y,ampmInClock:x,slots:b,slotProps:w,readOnly:S,disabled:_,sx:C,autoFocus:M,showViewSwitcher:k,disableIgnoringDatePartForTimeValidation:T,timezone:D}),JX=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;let{shouldDisableDate:i,shouldDisableMonth:o,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=X6(r.utils,e.minDate,r.defaultDates.minDate),h=X6(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(i&&i(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case!!(c&&r.utils.isBeforeDay(t,c)):return"minDate";case!!(h&&r.utils.isAfterDay(t,h)):return"maxDate";default:return null}};JX.valueManager=JV;let JK=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a,timezone:s})=>{let l=X1();return g.useCallback(u=>null!==JX({adapter:l,value:u,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:a}}),[l,e,t,n,r,i,o,a,s])},JQ=(e,t,n)=>(r,i)=>{switch(i.type){case"changeMonth":return(0,AX.Z)({},r,{slideDirection:i.direction,currentMonth:i.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{let e=i.newTimezone;if(n.getTimezone(r.currentMonth)===e)return r;let t=n.setTimezone(r.currentMonth,e);return n.getMonth(t)!==n.getMonth(r.currentMonth)&&(t=n.setMonth(t,n.getMonth(r.currentMonth))),(0,AX.Z)({},r,{currentMonth:t})}case"finishMonthSwitchingAnimation":return(0,AX.Z)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=i.focusedDay&&n.isSameDay(i.focusedDay,r.focusedDay))return r;let o=null!=i.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,i.focusedDay);return(0,AX.Z)({},r,{focusedDay:i.focusedDay,isMonthSwitchingAnimating:o&&!e&&!i.withoutMonthSwitchingAnimation,currentMonth:o?n.startOfMonth(i.focusedDay):r.currentMonth,slideDirection:null!=i.focusedDay&&n.isAfterDay(i.focusedDay,r.currentMonth)?"left":"right"})}default:throw Error("missing support")}},JJ=e=>{let{value:t,referenceDate:n,disableFuture:r,disablePast:i,disableSwitchToMonthOnDayFocus:o=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:u,shouldDisableDate:c,timezone:h}=e,d=X2(),f=g.useRef(JQ(!!u,o,d)).current,p=g.useMemo(()=>JV.getInitialReferenceValue({value:t,utils:d,timezone:h,props:e,referenceDate:n,granularity:Jl.day}),[n,h]),[m,v]=g.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:p,currentMonth:d.startOfMonth(p),slideDirection:"left"});g.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:d.getTimezone(p)})},[p,d]);let y=g.useCallback(e=>{v((0,AX.Z)({type:"changeMonth"},e)),l&&l(e.newMonth)},[l]),x=g.useCallback(e=>{!d.isSameMonth(e,m.currentMonth)&&y({newMonth:d.startOfMonth(e),direction:d.isAfterDay(e,m.currentMonth)?"left":"right"})},[m.currentMonth,y,d]),b=JK({shouldDisableDate:c,minDate:s,maxDate:a,disableFuture:r,disablePast:i,timezone:h}),w=g.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:p,calendarState:m,changeMonth:x,changeFocusedDay:(0,QA.Z)((e,t)=>{b(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),isDateDisabled:b,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}};var J0=n(6317);let J1=e=>(0,T.ZP)("MuiPickersFadeTransitionGroup",e);(0,k.Z)("MuiPickersFadeTransitionGroup",["root"]);let J2=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},J1,t)},J5=(0,S.ZP)(J0.Z,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function J3(e){let t=(0,Xq.Z)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=J2(t),s=(0,wP.Z)();return i?n:(0,p.jsx)(J5,{className:(0,v.Z)(a.root,r),children:(0,p.jsx)(TE.Z,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},o)})}var J4=n(7048);function J8(e){return(0,T.ZP)("MuiPickersDay",e)}let J6=(0,k.Z)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),J9=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],J7=e=>{let{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,u=a&&!s;return(0,y.Z)({root:["root",t&&!u&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",a&&s&&"dayOutsideMonth",u&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},J8,l)},eee=({theme:e})=>(0,AX.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,x.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,x.Fq)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${J6.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${J6.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}},[`&.${J6.disabled}:not(.${J6.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${J6.disabled}&.${J6.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(.${J6.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),eet=(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]},een=(0,S.ZP)(Mg.Z,{name:"MuiPickersDay",slot:"Root",overridesResolver:eet})(eee),eer=(0,S.ZP)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:eet})(({theme:e})=>(0,AX.Z)({},eee({theme:e}),{opacity:0,pointerEvents:"none"})),eei=()=>{},eeo=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:a=!1,disableHighlightToday:s=!1,disableMargin:l=!1,isAnimating:u,onClick:c,onDaySelect:h,onFocus:d=eei,onBlur:f=eei,onKeyDown:m=eei,onMouseDown:y=eei,onMouseEnter:x=eei,outsideCurrentMonth:b,selected:w=!1,showDaysOutsideCurrentMonth:S=!1,children:_,today:C=!1}=n,M=(0,AK.Z)(n,J9),k=(0,AX.Z)({},n,{autoFocus:r,disabled:a,disableHighlightToday:s,disableMargin:l,selected:w,showDaysOutsideCurrentMonth:S,today:C}),T=J7(k),D=X2(),A=g.useRef(null),I=(0,J4.Z)(A,t);return((0,D9.Z)(()=>{!r||a||u||b||A.current.focus()},[r,a,u,b]),b&&!S)?(0,p.jsx)(eer,{className:(0,v.Z)(T.root,T.hiddenDaySpacingFiller,i),ownerState:k,role:M.role}):(0,p.jsx)(een,(0,AX.Z)({className:(0,v.Z)(T.root,i),ref:I,centerRipple:!0,disabled:a,tabIndex:w?0:-1,onKeyDown:e=>m(e,o),onFocus:e=>d(e,o),onBlur:e=>f(e,o),onMouseEnter:e=>x(e,o),onClick:e=>{a||h(o),b&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{y(e),b&&e.preventDefault()}},M,{ownerState:k,children:_||D.format(o,"dayOfMonth")}))}),eea=g.memo(eeo);var ees=n(4652);function eel(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var eeu=n(8683),eec=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=eel(e.className,t):e.setAttribute("class",eel(e.className&&e.className.baseVal||"",t))})},eeh=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.addClass(i,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,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,r="string"==typeof n,i=r&&n?n+"-":"",o=r?""+i+e:n[e],a=r?o+"-active":n[e+"Active"],s=r?o+"-done":n[e+"Done"];return{baseClassName:o,activeClassName:a,doneClassName:s}},t}(0,ees.Z)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r,i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&(0,eeu.Q)(e),i&&(this.appliedClasses[t][n]=i,r=i,e&&r&&r.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],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&eec(e,r),i&&eec(e,i),o&&eec(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,AK.Z)(e,["classNames"]));return m().createElement(Ao.ZP,(0,AX.Z)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(m().Component);eeh.defaultProps={classNames:""},eeh.propTypes={};let eed=e=>(0,T.ZP)("MuiPickersSlideTransition",e),eef=(0,k.Z)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),eep=["children","className","reduceAnimations","slideDirection","transKey","classes"],eeg=e=>{let{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,y.Z)(r,eed,t)},eem=(0,S.ZP)(J0.Z,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${eef["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${eef["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${eef.slideEnterActive}`]:t.slideEnterActive},{[`.${eef.slideExit}`]:t.slideExit},{[`.${eef["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${eef["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},[`& .${eef["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${eef["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${eef.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${eef.slideExit}`]:{transform:"translate(0%)"},[`& .${eef["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${eef["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),eev=e=>(0,T.ZP)("MuiDayCalendar",e);(0,k.Z)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);let eey=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],eex=["ownerState"],eeb=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},eev,t)},eew=(0,S.ZP)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),eeS=(0,S.ZP)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),ee_=(0,S.ZP)(kz.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})),eeC=(0,S.ZP)(kz.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})),eeM=(0,S.ZP)(kz.Z,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,AX.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"})),eek=(0,S.ZP)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),eeT=(0,S.ZP)(function(e){let t=(0,Xq.Z)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,a=(0,AK.Z)(t,eep),s=eeg(t),l=(0,wP.Z)();if(i)return(0,p.jsx)("div",{className:(0,v.Z)(s.root,r),children:n});let u={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return(0,p.jsx)(eem,{className:(0,v.Z)(s.root,r),childFactory:e=>g.cloneElement(e,{classNames:u}),role:"presentation",children:(0,p.jsx)(eeh,(0,AX.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}),eeD=(0,S.ZP)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),eeA=(0,S.ZP)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function eeI(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:o,currentMonthNumber:a,isViewFocused:s}=e,l=(0,AK.Z)(e,eey),{disabled:u,disableHighlightToday:c,isMonthSwitchingAnimating:h,showDaysOutsideCurrentMonth:d,slots:f,slotProps:m,timezone:v}=t,y=X2(),x=X3(v),b=null!==r&&y.isSameDay(n,r),w=i.some(e=>y.isSameDay(e,n)),S=y.isSameDay(n,x),_=f?.day??eea,C=(0,Ku.Z)({elementType:_,externalSlotProps:m?.day,additionalProps:(0,AX.Z)({disableHighlightToday:c,showDaysOutsideCurrentMonth:d,role:"gridcell",isAnimating:h,"data-timestamp":y.toJsDate(n).valueOf()},l),ownerState:(0,AX.Z)({},t,{day:n,selected:w})}),M=(0,AK.Z)(C,eex),k=g.useMemo(()=>u||o(n),[u,o,n]),T=g.useMemo(()=>y.getMonth(n)!==a,[y,n,a]),D=g.useMemo(()=>{let e=y.startOfMonth(y.setMonth(n,a));return d?y.isSameDay(n,y.startOfWeek(e)):y.isSameDay(n,e)},[a,n,d,y]),A=g.useMemo(()=>{let e=y.endOfMonth(y.setMonth(n,a));return d?y.isSameDay(n,y.endOfWeek(e)):y.isSameDay(n,e)},[a,n,d,y]);return(0,p.jsx)(_,(0,AX.Z)({},M,{day:n,disabled:k,autoFocus:s&&b,today:S,outsideCurrentMonth:T,isFirstVisibleCell:D,isLastVisibleCell:A,selected:w,tabIndex:b?0:-1,"aria-selected":w,"aria-current":S?"date":void 0}))}function eeO(e){let t=(0,Xq.Z)({props:e,name:"MuiDayCalendar"}),n=X2(),{onFocusedDayChange:r,className:i,currentMonth:o,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:c,readOnly:h,reduceAnimations:d,renderLoading:f=()=>(0,p.jsx)("span",{children:"..."}),slideDirection:m,TransitionProps:y,disablePast:x,disableFuture:b,minDate:w,maxDate:S,shouldDisableDate:_,shouldDisableMonth:C,shouldDisableYear:M,dayOfWeekFormatter:k=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:T,onFocusedViewChange:D,gridLabelId:A,displayWeekNumber:I,fixedWeekNumber:O,autoFocus:P,timezone:R}=t,E=X3(R),L=eeb(t),N=(0,Ai.V)(),B=JK({shouldDisableDate:_,shouldDisableMonth:C,shouldDisableYear:M,minDate:w,maxDate:S,disablePast:x,disableFuture:b,timezone:R}),F=KV(),[z,V]=(0,QI.Z)({name:"DayCalendar",state:"hasFocus",controlled:T,default:P??!1}),[Z,j]=g.useState(()=>s||E),H=(0,QA.Z)(e=>{!h&&u(e)}),W=e=>{B(e)||(r(e),j(e),D?.(!0),V(!0))},$=(0,QA.Z)((e,t)=>{switch(e.key){case"ArrowUp":W(n.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":W(n.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{let r=n.addDays(t,N?1:-1),i=n.addMonths(t,N?1:-1);W(X8({utils:n,date:r,minDate:N?r:n.startOfMonth(i),maxDate:N?n.endOfMonth(i):r,isDateDisabled:B,timezone:R})||r),e.preventDefault();break}case"ArrowRight":{let r=n.addDays(t,N?-1:1),i=n.addMonths(t,N?-1:1);W(X8({utils:n,date:r,minDate:N?n.startOfMonth(i):r,maxDate:N?r:n.endOfMonth(i),isDateDisabled:B,timezone:R})||r),e.preventDefault();break}case"Home":W(n.startOfWeek(t)),e.preventDefault();break;case"End":W(n.endOfWeek(t)),e.preventDefault();break;case"PageUp":W(n.addMonths(t,1)),e.preventDefault();break;case"PageDown":W(n.addMonths(t,-1)),e.preventDefault()}}),G=(0,QA.Z)((e,t)=>W(t)),U=(0,QA.Z)((e,t)=>{z&&n.isSameDay(Z,t)&&D?.(!1)}),q=n.getMonth(o),Y=n.getYear(o),X=g.useMemo(()=>a.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,a]),K=`${Y}-${q}`,Q=g.useMemo(()=>g.createRef(),[K]),J=g.useMemo(()=>{let e=n.startOfMonth(o),t=n.endOfMonth(o);return B(Z)||n.isAfterDay(Z,t)||n.isBeforeDay(Z,e)?X8({utils:n,date:Z,minDate:e,maxDate:t,disablePast:x,disableFuture:b,isDateDisabled:B,timezone:R}):Z},[o,b,x,Z,B,n,R]),ee=g.useMemo(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;O&&e.length<O;){let r=n.getWeekArray(t),i=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(+!!i).forEach(t=>{e.length<O&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,O,n]);return(0,p.jsxs)(eew,{role:"grid","aria-labelledby":A,className:L.root,children:[(0,p.jsxs)(eeS,{role:"row",className:L.header,children:[I&&(0,p.jsx)(eeC,{variant:"caption",role:"columnheader","aria-label":F.calendarWeekNumberHeaderLabel,className:L.weekNumberLabel,children:F.calendarWeekNumberHeaderText}),Kr(n,E).map((e,t)=>(0,p.jsx)(ee_,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:L.weekDayLabel,children:k(e)},t.toString()))]}),l?(0,p.jsx)(eek,{className:L.loadingContainer,children:f()}):(0,p.jsx)(eeT,(0,AX.Z)({transKey:K,onExited:c,reduceAnimations:d,slideDirection:m,className:(0,v.Z)(i,L.slideTransition)},y,{nodeRef:Q,children:(0,p.jsx)(eeD,{ref:Q,role:"rowgroup",className:L.monthContainer,children:ee.map((e,r)=>(0,p.jsxs)(eeA,{role:"row",className:L.weekContainer,"aria-rowindex":r+1,children:[I&&(0,p.jsx)(eeM,{className:L.weekNumber,role:"rowheader","aria-label":F.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:F.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>(0,p.jsx)(eeI,{parentProps:t,day:e,selectedDays:X,focusableDay:J,onKeyDown:$,onFocus:G,onBlur:U,onDaySelect:H,isDateDisabled:B,currentMonthNumber:q,isViewFocused:z,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function eeP(e){return(0,T.ZP)("MuiPickersMonth",e)}let eeR=(0,k.Z)("MuiPickersMonth",["root","monthButton","disabled","selected"]),eeE=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],eeL=e=>{let{disabled:t,selected:n,classes:r}=e;return(0,y.Z)({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},eeP,r)},eeN=(0,S.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%"}}]}),eeB=(0,S.ZP)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${eeR.disabled}`]:t.disabled},{[`&.${eeR.selected}`]:t.selected}]})(({theme:e})=>(0,AX.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,x.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,x.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${eeR.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${eeR.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),eeF=g.memo(function(e){let t=(0,Xq.Z)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:h,onBlur:d,"aria-current":f,"aria-label":m,slots:y,slotProps:x}=t,b=(0,AK.Z)(t,eeE),w=g.useRef(null),S=eeL(t);(0,D9.Z)(()=>{n&&w.current?.focus()},[n]);let _=y?.monthButton??eeB,C=(0,Ku.Z)({elementType:_,externalSlotProps:x?.monthButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:w,type:"button",role:"radio","aria-current":f,"aria-checked":a,"aria-label":m,onClick:e=>u(e,s),onKeyDown:e=>c(e,s),onFocus:e=>h(e,s),onBlur:e=>d(e,s)},ownerState:t,className:S.monthButton});return(0,p.jsx)(eeN,(0,AX.Z)({className:(0,v.Z)(S.root,r),ownerState:t},b,{children:(0,p.jsx)(_,(0,AX.Z)({},C))}))});function eez(e){return(0,T.ZP)("MuiMonthCalendar",e)}(0,k.Z)("MuiMonthCalendar",["root"]);let eeV=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],eeZ=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},eez,t)},eej=(0,S.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"}),eeH=g.forwardRef(function(e,t){let n=function(e,t){let n=X2(),r=X5(),i=(0,Xq.Z)({props:e,name:t});return(0,AX.Z)({disableFuture:!1,disablePast:!1},i,{minDate:X6(n,i.minDate,r.minDate),maxDate:X6(n,i.maxDate,r.maxDate)})}(e,"MuiMonthCalendar"),{className:r,value:i,defaultValue:o,referenceDate:a,disabled:s,disableFuture:l,disablePast:u,maxDate:c,minDate:h,onChange:d,shouldDisableMonth:f,readOnly:m,autoFocus:y=!1,onMonthFocus:x,hasFocus:b,onFocusedViewChange:w,monthsPerRow:S=3,timezone:_,gridLabelId:C,slots:M,slotProps:k}=n,T=(0,AK.Z)(n,eeV),{value:D,handleValueChange:A,timezone:I}=Js({name:"MonthCalendar",timezone:_,value:i,defaultValue:o,referenceDate:a,onChange:d,valueManager:JV}),O=X3(I),P=(0,Ai.V)(),R=X2(),E=g.useMemo(()=>JV.getInitialReferenceValue({value:D,utils:R,props:n,timezone:I,referenceDate:a,granularity:Jl.month}),[]),L=eeZ(n),N=g.useMemo(()=>R.getMonth(O),[R,O]),B=g.useMemo(()=>null!=D?R.getMonth(D):null,[D,R]),[F,z]=g.useState(()=>B||R.getMonth(E)),[V,Z]=(0,QI.Z)({name:"MonthCalendar",state:"hasFocus",controlled:b,default:y??!1}),j=(0,QA.Z)(e=>{Z(e),w&&w(e)}),H=g.useCallback(e=>{let t=R.startOfMonth(u&&R.isAfter(O,h)?O:h),n=R.startOfMonth(l&&R.isBefore(O,c)?O:c),r=R.startOfMonth(e);return!!(R.isBefore(r,t)||R.isAfter(r,n))||!!f&&f(r)},[l,u,c,h,O,f,R]),W=(0,QA.Z)((e,t)=>{!m&&A(R.setMonth(D??E,t))}),$=(0,QA.Z)(e=>{!H(R.setMonth(D??E,e))&&(z(e),j(!0),x&&x(e))});g.useEffect(()=>{z(e=>null!==B&&e!==B?B:e)},[B]);let G=(0,QA.Z)((e,t)=>{switch(e.key){case"ArrowUp":$((12+t-3)%12),e.preventDefault();break;case"ArrowDown":$((12+t+3)%12),e.preventDefault();break;case"ArrowLeft":$((12+t+(P?1:-1))%12),e.preventDefault();break;case"ArrowRight":$((12+t+(P?-1:1))%12),e.preventDefault()}}),U=(0,QA.Z)((e,t)=>{$(t)}),q=(0,QA.Z)((e,t)=>{F===t&&j(!1)});return(0,p.jsx)(eej,(0,AX.Z)({ref:t,className:(0,v.Z)(L.root,r),ownerState:n,role:"radiogroup","aria-labelledby":C},T,{children:X9(R,D??E).map(e=>{let t=R.getMonth(e),n=R.format(e,"monthShort"),r=R.format(e,"month"),i=s||H(e);return(0,p.jsx)(eeF,{selected:t===B,value:t,onClick:W,onKeyDown:G,autoFocus:V&&t===F,disabled:i,tabIndex:t!==F||i?-1:0,onFocus:U,onBlur:q,"aria-current":N===t?"date":void 0,"aria-label":r,monthsPerRow:S,slots:M,slotProps:k,children:n},n)})}))});function eeW(e){return(0,T.ZP)("MuiPickersYear",e)}let ee$=(0,k.Z)("MuiPickersYear",["root","yearButton","selected","disabled"]),eeG=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],eeU=e=>{let{disabled:t,selected:n,classes:r}=e;return(0,y.Z)({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},eeW,r)},eeq=(0,S.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%"}}]}),eeY=(0,S.ZP)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${ee$.disabled}`]:t.disabled},{[`&.${ee$.selected}`]:t.selected}]})(({theme:e})=>(0,AX.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,x.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,x.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${ee$.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${ee$.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),eeX=g.memo(function(e){let t=(0,Xq.Z)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:o,selected:a,value:s,tabIndex:l,onClick:u,onKeyDown:c,onFocus:h,onBlur:d,"aria-current":f,slots:m,slotProps:y}=t,x=(0,AK.Z)(t,eeG),b=g.useRef(null),w=eeU(t);(0,D9.Z)(()=>{n&&b.current?.focus()},[n]);let S=m?.yearButton??eeY,_=(0,Ku.Z)({elementType:S,externalSlotProps:y?.yearButton,additionalProps:{children:i,disabled:o,tabIndex:l,ref:b,type:"button",role:"radio","aria-current":f,"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:w.yearButton});return(0,p.jsx)(eeq,(0,AX.Z)({className:(0,v.Z)(w.root,r),ownerState:t},x,{children:(0,p.jsx)(S,(0,AX.Z)({},_))}))});function eeK(e){return(0,T.ZP)("MuiYearCalendar",e)}(0,k.Z)("MuiYearCalendar",["root"]);let eeQ=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],eeJ=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"]},eeK,t)},ee0=(0,S.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"}),ee1=g.forwardRef(function(e,t){let n=function(e,t){let n=X2(),r=X5(),i=(0,Xq.Z)({props:e,name:t});return(0,AX.Z)({disablePast:!1,disableFuture:!1},i,{yearsPerRow:i.yearsPerRow??3,minDate:X6(n,i.minDate,r.minDate),maxDate:X6(n,i.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:r,className:i,value:o,defaultValue:a,referenceDate:s,disabled:l,disableFuture:u,disablePast:c,maxDate:h,minDate:d,onChange:f,readOnly:m,shouldDisableYear:y,onYearFocus:x,hasFocus:b,onFocusedViewChange:w,yearsOrder:S="asc",yearsPerRow:_,timezone:C,gridLabelId:M,slots:k,slotProps:T}=n,D=(0,AK.Z)(n,eeQ),{value:A,handleValueChange:I,timezone:O}=Js({name:"YearCalendar",timezone:C,value:o,defaultValue:a,referenceDate:s,onChange:f,valueManager:JV}),P=X3(O),R=(0,Ai.V)(),E=X2(),L=g.useMemo(()=>JV.getInitialReferenceValue({value:A,utils:E,props:n,timezone:O,referenceDate:s,granularity:Jl.year}),[]),N=eeJ(n),B=g.useMemo(()=>E.getYear(P),[E,P]),F=g.useMemo(()=>null!=A?E.getYear(A):null,[A,E]),[z,V]=g.useState(()=>F||E.getYear(L)),[Z,j]=(0,QI.Z)({name:"YearCalendar",state:"hasFocus",controlled:b,default:r??!1}),H=(0,QA.Z)(e=>{j(e),w&&w(e)}),W=g.useCallback(e=>!!(c&&E.isBeforeYear(e,P)||u&&E.isAfterYear(e,P)||d&&E.isBeforeYear(e,d)||h&&E.isAfterYear(e,h))||!!y&&y(E.startOfYear(e)),[u,c,h,d,P,y,E]),$=(0,QA.Z)((e,t)=>{!m&&I(E.setYear(A??L,t))}),G=(0,QA.Z)(e=>{W(E.setYear(A??L,e))||(V(e),H(!0),x?.(e))});g.useEffect(()=>{V(e=>null!==F&&e!==F?F:e)},[F]);let U="desc"!==S?+_:-1*_,q=R&&"asc"===S||!R&&"desc"===S?-1:1,Y=(0,QA.Z)((e,t)=>{switch(e.key){case"ArrowUp":G(t-U),e.preventDefault();break;case"ArrowDown":G(t+U),e.preventDefault();break;case"ArrowLeft":G(t-q),e.preventDefault();break;case"ArrowRight":G(t+q),e.preventDefault()}}),X=(0,QA.Z)((e,t)=>{G(t)}),K=(0,QA.Z)((e,t)=>{z===t&&H(!1)}),Q=g.useRef(null),J=(0,J4.Z)(t,Q);g.useEffect(()=>{if(r||null===Q.current)return;let e=Q.current.querySelector('[tabindex="0"]');if(!e)return;let t=e.offsetHeight,n=e.offsetTop,i=Q.current.clientHeight,o=Q.current.scrollTop;!(t>i)&&!(n<o)&&(Q.current.scrollTop=n+t-i/2-t/2)},[r]);let ee=E.getYearRange([d,h]);return"desc"===S&&ee.reverse(),(0,p.jsx)(ee0,(0,AX.Z)({ref:J,className:(0,v.Z)(N.root,i),ownerState:n,role:"radiogroup","aria-labelledby":M},D,{children:ee.map(e=>{let t=E.getYear(e),n=l||W(e);return(0,p.jsx)(eeX,{selected:t===F,value:t,onClick:$,onKeyDown:Y,autoFocus:Z&&t===z,disabled:n,tabIndex:t!==z||n?-1:0,onFocus:X,onBlur:K,"aria-current":B===t?"date":void 0,yearsPerRow:_,slots:k,slotProps:T,children:E.format(e,"year")},E.format(e,"year"))})}))}),ee2=e=>(0,T.ZP)("MuiPickersCalendarHeader",e),ee5=(0,k.Z)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),ee3=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],ee4=["ownerState"],ee8=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},ee2,t)},ee6=(0,S.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}),ee9=(0,S.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,AX.Z)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),ee7=(0,S.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),ete=(0,S.ZP)(x4.Z,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${ee5.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),ett=(0,S.ZP)(KE,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),etn=g.forwardRef(function(e,t){let n=KV(),r=X2(),i=(0,Xq.Z)({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:a,currentMonth:s,disabled:l,disableFuture:u,disablePast:c,maxDate:h,minDate:d,onMonthChange:f,onViewChange:m,view:y,reduceAnimations:x,views:b,labelId:w,className:S,timezone:_,format:C=`${r.formats.month} ${r.formats.year}`}=i,M=(0,AK.Z)(i,ee3),k=ee8(i),T=o?.switchViewButton??ete,D=(0,Ku.Z)({elementType:T,externalSlotProps:a?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(y)},ownerState:i,className:k.switchViewButton}),A=o?.switchViewIcon??ett,I=(0,Ku.Z)({elementType:A,externalSlotProps:a?.switchViewIcon,ownerState:i,className:k.switchViewIcon}),O=(0,AK.Z)(I,ee4),P=function(e,{disableFuture:t,maxDate:n,timezone:r}){let i=X2();return g.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isBefore(o,n)?o:n);return!i.isAfter(a,e)},[t,n,e,i,r])}(s,{disableFuture:u,maxDate:h,timezone:_}),R=function(e,{disablePast:t,minDate:n,timezone:r}){let i=X2();return g.useMemo(()=>{let o=i.date(void 0,r),a=i.startOfMonth(t&&i.isAfter(o,n)?o:n);return!i.isBefore(a,e)},[t,n,e,i,r])}(s,{disablePast:c,minDate:d,timezone:_});if(1===b.length&&"year"===b[0])return null;let E=r.formatByString(s,C);return(0,p.jsxs)(ee6,(0,AX.Z)({},M,{ownerState:i,className:(0,v.Z)(k.root,S),ref:t,children:[(0,p.jsxs)(ee9,{role:"presentation",onClick:()=>{if(1!==b.length&&m&&!l){if(2===b.length)m(b.find(e=>e!==y)||b[0]);else{let e=+(0===b.indexOf(y));m(b[e])}}},ownerState:i,"aria-live":"polite",className:k.labelContainer,children:[(0,p.jsx)(J3,{reduceAnimations:x,transKey:E,children:(0,p.jsx)(ee7,{id:w,ownerState:i,className:k.label,children:E})}),b.length>1&&!l&&(0,p.jsx)(T,(0,AX.Z)({},D,{children:(0,p.jsx)(A,(0,AX.Z)({},O))}))]}),(0,p.jsx)(TE.Z,{in:"day"===y,appear:!x,enter:!x,children:(0,p.jsx)(QD,{slots:o,slotProps:a,onGoToPrevious:()=>f(r.addMonths(s,-1),"right"),isPreviousDisabled:R,previousLabel:n.previousMonth,onGoToNext:()=>f(r.addMonths(s,1),"left"),isNextDisabled:P,nextLabel:n.nextMonth})})]}))}),etr="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),eti=etr&&etr[1]?parseInt(etr[1],10):null,eto=etr&&etr[2]?parseInt(etr[2],10):null,eta=eti&&eti<10||eto&&eto<13||!1,ets=()=>Ar("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||eta,etl=e=>(0,T.ZP)("MuiDateCalendar",e);(0,k.Z)("MuiDateCalendar",["root","viewTransitionContainer"]);let etu=["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"],etc=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},etl,t)},eth=(0,S.ZP)(QP,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),etd=(0,S.ZP)(J3,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),etf=g.forwardRef(function(e,t){let n=X2(),r=(0,TP.Z)(),i=function(e,t){let n=X2(),r=X5(),i=ets(),o=(0,Xq.Z)({props:e,name:t});return(0,AX.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??i,renderLoading:o.renderLoading??(()=>(0,p.jsx)("span",{children:"..."})),minDate:X6(n,o.minDate,r.minDate),maxDate:X6(n,o.maxDate,r.maxDate)})}(e,"MuiDateCalendar"),{autoFocus:o,onViewChange:a,value:s,defaultValue:l,referenceDate:u,disableFuture:c,disablePast:h,onChange:d,onYearChange:f,onMonthChange:m,reduceAnimations:y,shouldDisableDate:x,shouldDisableMonth:b,shouldDisableYear:w,view:S,views:_,openTo:C,className:M,disabled:k,readOnly:T,minDate:D,maxDate:A,disableHighlightToday:I,focusedView:O,onFocusedViewChange:P,showDaysOutsideCurrentMonth:R,fixedWeekNumber:E,dayOfWeekFormatter:L,slots:N,slotProps:B,loading:F,renderLoading:z,displayWeekNumber:V,yearsOrder:Z,yearsPerRow:j,monthsPerRow:H,timezone:W}=i,$=(0,AK.Z)(i,etu),{value:G,handleValueChange:U,timezone:q}=Js({name:"DateCalendar",timezone:W,value:s,defaultValue:l,referenceDate:u,onChange:d,valueManager:JV}),{view:Y,setView:X,focusedView:K,setFocusedView:Q,goToNextView:J,setValueAndGoToNextView:ee}=QO({view:S,views:_,openTo:C,onChange:U,onViewChange:a,autoFocus:o,focusedView:O,onFocusedViewChange:P}),{referenceDate:et,calendarState:en,changeFocusedDay:er,changeMonth:ei,handleChangeMonth:eo,isDateDisabled:ea,onMonthSwitchingAnimationEnd:es}=JJ({value:G,referenceDate:u,reduceAnimations:y,onMonthChange:m,minDate:D,maxDate:A,shouldDisableDate:x,disablePast:h,disableFuture:c,timezone:q}),el=k&&G||D,eu=k&&G||A,ec=`${r}-grid-label`,eh=null!==K,ed=N?.calendarHeader??etn,ef=(0,Ku.Z)({elementType:ed,externalSlotProps:B?.calendarHeader,additionalProps:{views:_,view:Y,currentMonth:en.currentMonth,onViewChange:X,onMonthChange:(e,t)=>eo({newMonth:e,direction:t}),minDate:el,maxDate:eu,disabled:k,disablePast:h,disableFuture:c,reduceAnimations:y,timezone:q,labelId:ec},ownerState:i}),ep=(0,QA.Z)(e=>{let t=n.startOfMonth(e),r=n.endOfMonth(e),i=ea(e)?X8({utils:n,date:e,minDate:n.isBefore(D,t)?t:D,maxDate:n.isAfter(A,r)?r:A,disablePast:h,disableFuture:c,isDateDisabled:ea,timezone:q}):e;i?(ee(i,"finish"),m?.(t)):(J(),ei(t)),er(i,!0)}),eg=(0,QA.Z)(e=>{let t=n.startOfYear(e),r=n.endOfYear(e),i=ea(e)?X8({utils:n,date:e,minDate:n.isBefore(D,t)?t:D,maxDate:n.isAfter(A,r)?r:A,disablePast:h,disableFuture:c,isDateDisabled:ea,timezone:q}):e;i?(ee(i,"finish"),f?.(i)):(J(),ei(t)),er(i,!0)}),em=(0,QA.Z)(e=>e?U(X4(n,e,G??et),"finish",Y):U(e,"finish",Y));g.useEffect(()=>{null!=G&&n.isValid(G)&&ei(G)},[G]);let ev=etc(i),ey={disablePast:h,disableFuture:c,maxDate:A,minDate:D},ex={disableHighlightToday:I,readOnly:T,disabled:k,timezone:q,gridLabelId:ec,slots:N,slotProps:B},eb=g.useRef(Y);g.useEffect(()=>{eb.current!==Y&&(K===eb.current&&Q(Y,!0),eb.current=Y)},[K,Q,Y]);let ew=g.useMemo(()=>[G],[G]);return(0,p.jsxs)(eth,(0,AX.Z)({ref:t,className:(0,v.Z)(ev.root,M),ownerState:i},$,{children:[(0,p.jsx)(ed,(0,AX.Z)({},ef,{slots:N,slotProps:B})),(0,p.jsx)(etd,{reduceAnimations:y,className:ev.viewTransitionContainer,transKey:Y,ownerState:i,children:(0,p.jsxs)("div",{children:["year"===Y&&(0,p.jsx)(ee1,(0,AX.Z)({},ey,ex,{value:G,onChange:eg,shouldDisableYear:w,hasFocus:eh,onFocusedViewChange:e=>Q("year",e),yearsOrder:Z,yearsPerRow:j,referenceDate:et})),"month"===Y&&(0,p.jsx)(eeH,(0,AX.Z)({},ey,ex,{hasFocus:eh,className:M,value:G,onChange:ep,shouldDisableMonth:b,onFocusedViewChange:e=>Q("month",e),monthsPerRow:H,referenceDate:et})),"day"===Y&&(0,p.jsx)(eeO,(0,AX.Z)({},en,ey,ex,{onMonthSwitchingAnimationEnd:es,onFocusedDayChange:er,reduceAnimations:y,selectedDays:ew,onSelectedDaysChange:em,shouldDisableDate:x,shouldDisableMonth:b,shouldDisableYear:w,hasFocus:eh,onFocusedViewChange:e=>Q("day",e),showDaysOutsideCurrentMonth:R,fixedWeekNumber:E,dayOfWeekFormatter:L,displayWeekNumber:V,loading:F,renderLoading:z}))]})})]}))}),etp=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minDate:f,maxDate:g,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:x,onMonthChange:b,monthsPerRow:w,onYearChange:S,yearsOrder:_,yearsPerRow:C,slots:M,slotProps:k,loading:T,renderLoading:D,disableHighlightToday:A,readOnly:I,disabled:O,showDaysOutsideCurrentMonth:P,dayOfWeekFormatter:R,sx:E,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:F})=>(0,p.jsx)(etf,{view:e,onViewChange:t,views:n.filter(Kn),focusedView:r&&Kn(r)?r:null,onFocusedViewChange:i,value:o,defaultValue:a,referenceDate:s,onChange:l,className:u,classes:c,disableFuture:h,disablePast:d,minDate:f,maxDate:g,shouldDisableDate:m,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:x,onMonthChange:b,monthsPerRow:w,onYearChange:S,yearsOrder:_,yearsPerRow:C,slots:M,slotProps:k,loading:T,renderLoading:D,disableHighlightToday:A,readOnly:I,disabled:O,showDaysOutsideCurrentMonth:P,dayOfWeekFormatter:R,sx:E,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:F}),etg=({open:e,onOpen:t,onClose:n})=>{let r=g.useRef("boolean"==typeof e).current,[i,o]=g.useState(!1);return g.useEffect(()=>{if(r){if("boolean"!=typeof e)throw Error("You must not mix controlling and uncontrolled mode for `open` prop");o(e)}},[r,e]),{isOpen:i,setIsOpen:g.useCallback(e=>{r||o(e),e&&t&&t(),!e&&n&&n()},[r,t,n])}};function etm(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,a=X1(),s=g.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:i,props:t}),u=n.valueManager.hasError(l);return g.useEffect(()=>{o&&!n.valueManager.isSameError(l,s.current)&&o(l,r),s.current=l},[n,o,l,r]),{validationError:l,hasValidationError:u,getValidationErrorForNewValue:(0,QA.Z)(e=>n({adapter:a,value:e,timezone:i,props:t}))}}let etv=e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i}=e,o=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!!(o&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!o||n(r.lastPublishedValue)))},ety=e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i,closeOnSelect:o}=e,a=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!!(a&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&o?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)},etx=e=>{let{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)},etb=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i})=>{let{onAccept:o,onChange:a,value:s,defaultValue:l,closeOnSelect:u="desktop"===r,timezone:c,referenceDate:h}=e,{current:d}=g.useRef(l),{current:f}=g.useRef(void 0!==s),[p,m]=g.useState(c),v=X2(),y=X1(),{isOpen:x,setIsOpen:b}=etg(e),{timezone:w,value:S,handleValueChange:_}=Ja({timezone:c,value:s,defaultValue:d,referenceDate:h,onChange:a,valueManager:t}),[C,M]=g.useState(()=>{let e;return{draft:e=void 0!==S?S:void 0!==d?d:t.emptyValue,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),k=t.getTimezone(v,C.draft);p!==c&&(m(c),c&&k&&c!==k&&M(e=>(0,AX.Z)({},e,{draft:t.setTimezone(v,c,e.draft)})));let{getValidationErrorForNewValue:T}=etm({props:e,validator:i,timezone:w,value:C.draft,onError:e.onError}),D=(0,QA.Z)(e=>{let n={action:e,dateState:C,hasChanged:n=>!t.areValuesEqual(v,e.value,n),isControlled:f,closeOnSelect:u},r=etv(n),i=ety(n),a=etx(n);M(t=>(0,AX.Z)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:i?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let s=null,l=()=>(s||(s={validationError:"setValueFromField"===e.name?e.context.validationError:T(e.value)},"setValueFromShortcut"!==e.name||(s.shortcut=e.shortcut)),s);r&&_(e.value,l()),i&&o&&o(e.value,l()),a&&b(!1)});if(C.lastControlledValue!==s){let e=t.areValuesEqual(v,C.draft,S);M(t=>(0,AX.Z)({},t,{lastControlledValue:s},e?{}:{lastCommittedValue:S,lastPublishedValue:S,draft:S,hasBeenModifiedSinceMount:!0}))}let A=(0,QA.Z)(()=>{D({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),I=(0,QA.Z)(()=>{D({value:C.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),O=(0,QA.Z)(()=>{D({value:C.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),P=(0,QA.Z)(()=>{D({value:C.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),R=(0,QA.Z)(()=>{D({value:t.getTodayValue(v,w,n),name:"setValueFromAction",pickerAction:"today"})}),E=(0,QA.Z)(e=>{e.preventDefault(),b(!0)}),L=(0,QA.Z)(e=>{e?.preventDefault(),b(!1)}),N=(0,QA.Z)((e,t="partial")=>D({name:"setValueFromView",value:e,selectionState:t})),B=(0,QA.Z)((e,t,n)=>D({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n})),F=(0,QA.Z)((e,t)=>D({name:"setValueFromField",value:e,context:t})),z={onClear:A,onAccept:I,onDismiss:O,onCancel:P,onSetToday:R,onOpen:E,onClose:L},V={value:C.draft,onChange:F},Z=g.useMemo(()=>t.cleanValue(v,C.draft),[v,t,C.draft]),j=(0,AX.Z)({},z,{value:Z,onChange:N,onSelectShortcut:B,isValid:n=>{let r=i({adapter:y,value:n,timezone:w,props:e});return!t.hasError(r)}}),H=g.useMemo(()=>({onOpen:E,onClose:L,open:x}),[x,L,E]);return{open:x,fieldProps:V,viewProps:{value:Z,onChange:N,onClose:L,open:x},layoutProps:j,actions:z,contextValue:H}},etw=["className","sx"],etS=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:i,fieldRef:o})=>{let{onChange:a,open:s,onClose:l}=t,{view:u,views:c,openTo:h,onViewChange:d,viewRenderers:f,timezone:p}=e,m=(0,AK.Z)(e,etw),{view:v,setView:y,defaultView:x,focusedView:b,setFocusedView:w,setValueAndGoToNextView:S}=QO({view:u,views:c,openTo:h,onChange:a,onViewChange:d,autoFocus:r}),{hasUIView:_,viewModeLookup:C}=g.useMemo(()=>c.reduce((e,t)=>{let n;return n=null!=f[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[f,c]),M=g.useMemo(()=>c.reduce((e,t)=>null!=f[t]&&Qr(t)?e+1:e,0),[f,c]),k=C[v],T=(0,QA.Z)(()=>"UI"===k),[D,A]=g.useState("UI"===k?v:null);return D!==v&&"UI"===C[v]&&A(v),(0,D9.Z)(()=>{"field"===k&&s&&(l(),setTimeout(()=>{o?.current?.setSelectedSections(v),o?.current?.focusField(v)}))},[v]),(0,D9.Z)(()=>{if(!s)return;let e=v;"field"===k&&null!=D&&(e=D),e!==x&&"UI"===C[e]&&"UI"===C[x]&&(e=x),e!==v&&y(e),w(e,!0)},[s]),{hasUIView:_,shouldRestoreFocus:T,layoutProps:{views:c,view:D,onViewChange:y},renderCurrentView:()=>{if(null==D)return null;let e=f[D];if(null==e)return null;let r=(0,AX.Z)({},m,n,t,{views:c,timezone:p,onChange:S,view:D,onViewChange:y,focusedView:b,onFocusedViewChange:w,showViewSwitcher:M>1,timeViewsCount:M});return i?i(f,D,r):e(r)}}},et_=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?et_(t.shadowRoot):t:null};function etC(){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 etM=(e,t)=>{var n;let[r,i]=g.useState(etC);return(0,D9.Z)(()=>{let e=()=>{i(etC())};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||r)},etk=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{let{orientation:i}=e,o=etM(n.views,i),a=(0,Ai.V)();return{layoutProps:(0,AX.Z)({},n,t,{isLandscape:o,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}},etT=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:i,validator:o,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{let u=etb({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o}),c=etS({props:e,additionalViewProps:i,autoFocusView:a,fieldRef:l,propsFromPickerValue:u.viewProps,rendererInterceptor:s}),h=etk({props:e,wrapperVariant:r,propsFromPickerValue:u.layoutProps,propsFromPickerViews:c.layoutProps}),d=function(e){let{props:t,pickerValueResponse:n}=e;return g.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 etD(e){return(0,T.ZP)("MuiPickersLayout",e)}let etA=(0,k.Z)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),etI=["onAccept","onClear","onCancel","onSetToday","actions"];function etO(e){let{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,a=(0,AK.Z)(e,etI),s=KV();if(null==o||0===o.length)return null;let l=o?.map(e=>{switch(e){case"clear":return p.jsx(L.Z,{onClick:n,children:s.clearButtonLabel},e);case"cancel":return p.jsx(L.Z,{onClick:r,children:s.cancelButtonLabel},e);case"accept":return p.jsx(L.Z,{onClick:t,children:s.okButtonLabel},e);case"today":return p.jsx(L.Z,{onClick:i,children:s.todayButtonLabel},e);default:return null}});return(0,p.jsx)(Tq,(0,AX.Z)({},a,{children:l}))}var etP=n(1852),etR=n(8653),etE=n(777);function etL(e){return(0,T.ZP)("MuiListItem",e)}function etN(e){return(0,T.ZP)("MuiListItemSecondaryAction",e)}(0,k.Z)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]),(0,k.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);let etB=e=>{let{disableGutters:t,classes:n}=e;return(0,y.Z)({root:["root",t&&"disableGutters"]},etN,n)},etF=(0,S.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}}]}),etz=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...i}=n,o=g.useContext(My.Z),a={...n,disableGutters:o.disableGutters},s=etB(a);return(0,p.jsx)(etF,{className:(0,v.Z)(s.root,r),ownerState:a,ref:t,...i})});etz.muiName="ListItemSecondaryAction";let etV=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:a,hasSecondaryAction:s}=e;return(0,y.Z)({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",a&&"divider","flex-start"===t&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},etL,n)},etZ=(0,S.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,_.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:{[`& > .${Mb.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}}]}))),etj=(0,S.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),etH=g.forwardRef(function(e,t){let n=(0,M.i)({props:e,name:"MuiListItem"}),{alignItems:r="center",children:i,className:o,component:a,components:s={},componentsProps:l={},ContainerComponent:u="li",ContainerProps:{className:c,...h}={},dense:d=!1,disableGutters:f=!1,disablePadding:m=!1,divider:y=!1,secondaryAction:x,slotProps:b={},slots:w={},...S}=n,_=g.useContext(My.Z),C=g.useMemo(()=>({dense:d||_.dense||!1,alignItems:r,disableGutters:f}),[r,_.dense,d,f]),k=g.useRef(null),T=g.Children.toArray(i),D=T.length&&(0,etE.Z)(T[T.length-1],["ListItemSecondaryAction"]),A={...n,alignItems:r,dense:C.dense,disableGutters:f,disablePadding:m,divider:y,hasSecondaryAction:D},I=etV(A),O=(0,Mv.Z)(k,t),P=w.root||s.Root||etZ,R=b.root||l.root||{},E={className:(0,v.Z)(I.root,R.className,o),...S},L=a||"li";return D?(L=E.component||a?L:"div","li"===u&&("li"===L?L="div":"li"===E.component&&(E.component="div")),(0,p.jsx)(My.Z.Provider,{value:C,children:(0,p.jsxs)(etj,{as:u,className:(0,v.Z)(I.container,c),ref:O,ownerState:A,...h,children:[(0,p.jsx)(P,{...R,...!(0,etR.Z)(P)&&{as:L,ownerState:{...A,...R.ownerState}},...E,children:T}),T.pop()]})})):(0,p.jsx)(My.Z.Provider,{value:C,children:(0,p.jsxs)(P,{...R,as:L,ref:O,...!(0,etR.Z)(P)&&{ownerState:{...A,...R.ownerState}},...E,children:[T,x&&(0,p.jsx)(etz,{children:x})]})})});var etW=n(2889);let et$=["items","changeImportance","isLandscape","onChange","isValid"],etG=["getValue"];function etU(e){let{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,o=(0,AK.Z)(e,et$);if(null==t||0===t.length)return null;let a=t.map(e=>{let{getValue:t}=e,o=(0,AK.Z)(e,etG),a=t({isValid:i});return(0,AX.Z)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})});return(0,p.jsx)(etP.Z,(0,AX.Z)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:a.map(e=>(0,p.jsx)(etH,{children:(0,p.jsx)(etW.Z,(0,AX.Z)({},e))},e.id??e.label))}))}let etq=e=>{let{classes:t,isLandscape:n}=e;return(0,y.Z)({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},etD,t)},etY=e=>{let{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:o,view:a,views:s,onViewChange:l,value:u,onChange:c,onSelectShortcut:h,isValid:d,isLandscape:f,disabled:g,readOnly:m,children:v,slots:y,slotProps:x}=e,b=etq(e),w=y?.actionBar??etO,S=(0,Ku.Z)({elementType:w,externalSlotProps:x?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:o,actions:"desktop"===t?[]:["cancel","accept"]},className:b.actionBar,ownerState:(0,AX.Z)({},e,{wrapperVariant:t})}),_=(0,p.jsx)(w,(0,AX.Z)({},S)),C=y?.toolbar,M=(0,Ku.Z)({elementType:C,externalSlotProps:x?.toolbar,additionalProps:{isLandscape:f,onChange:c,value:u,view:a,onViewChange:l,views:s,disabled:g,readOnly:m},className:b.toolbar,ownerState:(0,AX.Z)({},e,{wrapperVariant:t})}),k=null!==M.view&&C?(0,p.jsx)(C,(0,AX.Z)({},M)):null,T=y?.tabs,D=a&&T?(0,p.jsx)(T,(0,AX.Z)({view:a,onViewChange:l,className:b.tabs},x?.tabs)):null,A=y?.shortcuts??etU,I=(0,Ku.Z)({elementType:A,externalSlotProps:x?.shortcuts,additionalProps:{isValid:d,isLandscape:f,onChange:h},className:b.shortcuts,ownerState:{isValid:d,isLandscape:f,onChange:h,wrapperVariant:t}});return{toolbar:k,content:v,tabs:D,actionBar:_,shortcuts:a&&A?(0,p.jsx)(A,(0,AX.Z)({},I)):null}},etX=e=>{let{isLandscape:t,classes:n}=e;return(0,y.Z)({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},etD,n)},etK=(0,S.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",[`& .${etA.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${etA.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${etA.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${etA.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${etA.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${etA.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${etA.shortcuts}`]:{gridColumn:3}}}]}),etQ=(0,S.ZP)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),etJ=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:o,actionBar:a,shortcuts:s}=etY(n),{sx:l,className:u,isLandscape:c,wrapperVariant:h}=n,d=etX(n);return(0,p.jsxs)(etK,{ref:t,sx:l,className:(0,v.Z)(d.root,u),ownerState:n,children:[c?s:r,c?r:s,(0,p.jsx)(etQ,{className:d.contentWrapper,children:"desktop"===h?(0,p.jsxs)(g.Fragment,{children:[i,o]}):(0,p.jsxs)(g.Fragment,{children:[o,i]})}),a]})}),et0=["props","ref"],et1=(0,S.ZP)(etJ)(({theme:e})=>({overflow:"hidden",minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),et2=e=>{let{props:t,ref:n}=e,r=(0,AK.Z)(e,et0),{localeText:i,slots:o,slotProps:a,className:s,sx:l,displayStaticWrapperAs:u,autoFocus:c}=t,{layoutProps:h,renderCurrentView:d}=etT((0,AX.Z)({},r,{props:t,autoFocusView:c??!1,additionalViewProps:{},wrapperVariant:u})),f=o?.layout??et1;return{renderPicker:()=>(0,p.jsx)(XK,{localeText:i,children:(0,p.jsx)(f,(0,AX.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,v.Z)(s,a?.layout?.className),ref:n,children:d()}))})}},et5=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;let{minTime:i,maxTime:o,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=r,h=e.utils.date(void 0,n),d=Ql(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(i&&d(i,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}};et5.valueManager=JV;let et3=({adapter:e,value:t,timezone:n,props:r})=>{let i=JX({adapter:e,value:t,timezone:n,props:r});return null!==i?i:et5({adapter:e,value:t,timezone:n,props:r})};et3.valueManager=JV;let et4=g.forwardRef(function(e,t){let n=function(e,t){let n=X2(),r=X5(),i=(0,Xq.Z)({props:e,name:t}),o=i.ampm??n.is12HourCycleInCurrentLocale(),a=g.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:(0,AX.Z)({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]);return(0,AX.Z)({},i,Qx({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:o,localeText:a,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??!!(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:X6(n,i.minDateTime??i.minDate,r.minDate),maxDate:X6(n,i.maxDateTime??i.maxDate,r.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:(0,AX.Z)({toolbar:Qy,tabs:KG},i.slots),slotProps:(0,AX.Z)({},i.slotProps,{toolbar:(0,AX.Z)({ampm:o},i.slotProps?.toolbar)})})}(e,"MuiStaticDateTimePicker"),r=n.displayStaticWrapperAs??"mobile",i=n.ampmInClock??"desktop"===r,o=(0,AX.Z)({day:etp,month:etp,year:etp,hours:JY,minutes:JY,seconds:JY},n.viewRenderers),{renderPicker:a}=et2({props:(0,AX.Z)({},n,{viewRenderers:o,displayStaticWrapperAs:r,ampmInClock:i,yearsPerRow:n.yearsPerRow??("mobile"===r?3:4),slotProps:(0,AX.Z)({},n.slotProps,{tabs:(0,AX.Z)({hidden:"desktop"===r},n.slotProps?.tabs),toolbar:(0,AX.Z)({hidden:"desktop"===r,ampmInClock:i},n.slotProps?.toolbar)})}),valueManager:JV,valueType:"date-time",validator:et3,ref:t});return a()});et4.propTypes={ampm:XJ().bool,ampmInClock:XJ().bool,autoFocus:XJ().bool,className:XJ().string,dayOfWeekFormatter:XJ().func,defaultValue:XJ().object,disabled:XJ().bool,disableFuture:XJ().bool,disableHighlightToday:XJ().bool,disableIgnoringDatePartForTimeValidation:XJ().bool,disablePast:XJ().bool,displayStaticWrapperAs:XJ().oneOf(["desktop","mobile"]),displayWeekNumber:XJ().bool,fixedWeekNumber:XJ().number,loading:XJ().bool,localeText:XJ().object,maxDate:XJ().object,maxDateTime:XJ().object,maxTime:XJ().object,minDate:XJ().object,minDateTime:XJ().object,minTime:XJ().object,minutesStep:XJ().number,monthsPerRow:XJ().oneOf([3,4]),onAccept:XJ().func,onChange:XJ().func,onClose:XJ().func,onError:XJ().func,onMonthChange:XJ().func,onViewChange:XJ().func,onYearChange:XJ().func,openTo:XJ().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:XJ().oneOf(["landscape","portrait"]),readOnly:XJ().bool,reduceAnimations:XJ().bool,referenceDate:XJ().object,renderLoading:XJ().func,shouldDisableDate:XJ().func,shouldDisableMonth:XJ().func,shouldDisableTime:XJ().func,shouldDisableYear:XJ().func,showDaysOutsideCurrentMonth:XJ().bool,slotProps:XJ().object,slots:XJ().object,sx:XJ().oneOfType([XJ().arrayOf(XJ().oneOfType([XJ().func,XJ().object,XJ().bool])),XJ().func,XJ().object]),timezone:XJ().string,value:XJ().object,view:XJ().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:XJ().shape({day:XJ().func,hours:XJ().func,minutes:XJ().func,month:XJ().func,seconds:XJ().func,year:XJ().func}),views:XJ().arrayOf(XJ().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:XJ().oneOf(["asc","desc"]),yearsPerRow:XJ().oneOf([3,4])};let et8=({utils:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),(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 i},et6=({utils:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,o=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,"g"),a=null;for(;a=o.exec(t);)n.push({start:a.index,end:o.lastIndex-1});return n},et9=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},et7=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:o,token:a,startSeparator:s})=>{if(""===a)throw Error("MUI X: Should not call `commitToken` with an empty token");let l=Jd(e,a),u=JT(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,h=null!=t&&e.isValid(t),d=h?e.formatByString(t,a):"",f=null;if(c){if(u)f=""===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`);f=l.maxLength,h&&(d=Jx(Jw(Jy(d,i),f),i))}}return(0,AX.Z)({},l,{format:a,maxLength:f,value:d,placeholder:et9(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},ene=e=>{let{utils:t,expandedFormat:n,escapedParts:r}=e,i=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=>r.find(t=>t.start<=e&&t.end>=e),d=0;for(;d<n.length;){let t=h(d),r=null!=t,s=l.exec(n.slice(d))?.[1];if(!r&&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(et7((0,AX.Z)({},e,{now:i,token:n,startSeparator:a}))),a=""}d+=s.length}else{let e=n[d];r&&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},ent=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`\u2069${r}\u2066`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}),enn=e=>{let t=et8(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));let n=et6((0,AX.Z)({},e,{expandedFormat:t})),r=ene((0,AX.Z)({},e,{expandedFormat:t,escapedParts:n}));return ent((0,AX.Z)({},e,{sections:r}))},enr=e=>{let t=X2(),n=KV(),r=X1(),i=(0,Ai.V)(),{valueManager:o,fieldValueManager:a,valueType:s,validator:l,internalProps:u,internalProps:{value:c,defaultValue:h,referenceDate:d,onChange:f,format:p,formatDensity:m="dense",selectedSections:v,onSelectedSectionsChange:y,shouldRespectLeadingZeros:x=!1,timezone:b,enableAccessibleFieldDOMStructure:w=!1}}=e,{timezone:S,value:_,handleValueChange:C}=Ja({timezone:b,value:c,defaultValue:h,referenceDate:d,onChange:f,valueManager:o}),M=g.useMemo(()=>Jv(t),[t]),k=g.useMemo(()=>JA(t,M,S),[t,M,S]),T=g.useCallback((e,r=null)=>a.getSectionsFromValue(t,e,r,e=>enn({utils:t,localeText:n,localizedDigits:M,format:p,date:e,formatDensity:m,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:w,isRtl:i})),[a,p,n,M,i,x,t,m,w]),[D,A]=g.useState(()=>{let e=T(_);JI(e,s);let n={sections:e,value:_,referenceValue:o.emptyValue,tempValueStrAndroid:null},r=Ju(e),i=o.getInitialReferenceValue({referenceDate:d,value:_,utils:t,props:u,granularity:r,timezone:S});return(0,AX.Z)({},n,{referenceValue:i})}),[I,O]=(0,QI.Z)({controlled:v,default:null,name:"useField",state:"selectedSections"}),P=e=>{O(e),y?.(e)},R=g.useMemo(()=>JN(I,D.sections),[I,D.sections]),E="all"===R?0:R,L=({value:e,referenceValue:n,sections:i})=>{if(A(t=>(0,AX.Z)({},t,{sections:i,value:e,referenceValue:n,tempValueStrAndroid:null})),o.areValuesEqual(t,D.value,e))return;let a={validationError:l({adapter:r,value:e,timezone:S,props:u})};C(e,a)},N=(e,t)=>{let n=[...D.sections];return n[e]=(0,AX.Z)({},n[e],{value:t,modified:!0}),n};return g.useEffect(()=>{let e=T(D.value);JI(e,s),A(t=>(0,AX.Z)({},t,{sections:e}))},[p,t.locale,i]),g.useEffect(()=>{let e;o.areValuesEqual(t,D.value,_)&&o.getTimezone(t,D.value)===o.getTimezone(t,_)||A(e=>(0,AX.Z)({},e,{value:_,referenceValue:a.updateReferenceValue(t,_,e.referenceValue),sections:T(_)}))},[_]),{state:D,activeSectionIndex:E,parsedSelectedSections:R,setSelectedSections:P,clearValue:()=>{L({value:o.emptyValue,referenceValue:D.referenceValue,sections:T(o.emptyValue)})},clearActiveSection:()=>{if(null==E)return;let e=D.sections[E],n=a.getActiveDateManager(t,D,e),r=n.getSections(D.sections).filter(e=>""!==e.value).length===+(""!==e.value),i=N(E,""),o=r?null:t.getInvalidDate(),s=n.getNewValuesFromNewActiveDate(o);L((0,AX.Z)({},s,{sections:i}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{let i,o;r&&E<D.sections.length-1&&P(E+1);let s=a.getActiveDateManager(t,D,e),l=N(E,n),u=s.getSections(l),c=JD(t,u,M);if(null!=c&&t.isValid(c)){let e=JR(t,c,u,s.referenceDate,!0);i=s.getNewValuesFromNewActiveDate(e),o=!0}else i=s.getNewValuesFromNewActiveDate(c),o=(null!=c&&!t.isValid(c))!=(null!=s.date&&!t.isValid(s.date));return o?L((0,AX.Z)({},i,{sections:l})):A(e=>(0,AX.Z)({},e,i,{sections:l,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{let r=a.parseValueStr(e,D.referenceValue,(e,r)=>{let o=t.parse(e,p);if(null==o||!t.isValid(o))return null;let a=enn({utils:t,localeText:n,localizedDigits:M,format:p,date:o,formatDensity:m,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:w,isRtl:i});return JR(t,o,a,r,!1)}),o=a.updateReferenceValue(t,r,D.referenceValue);L({value:r,referenceValue:o,sections:T(r,D.sections)})},setTempAndroidValueStr:e=>A(t=>(0,AX.Z)({},t,{tempValueStrAndroid:e})),getSectionsFromValue:T,sectionsValueBoundaries:k,localizedDigits:M,timezone:S}},eni=e=>null!=e.saveQuery,eno=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:i,timezone:o})=>{let a=X2(),[s,l]=g.useState(null),u=(0,QA.Z)(()=>l(null));g.useEffect(()=>{null!=s&&e[s.sectionIndex]?.type!==s.sectionType&&u()},[e,s,u]),g.useEffect(()=>{if(null!=s){let e=setTimeout(()=>u(),5e3);return()=>{clearTimeout(e)}}return()=>{}},[s,u]);let c=({keyPressed:t,sectionIndex:n},r,i)=>{let o=t.toLowerCase(),a=e[n];if(null!=s&&(!i||i(s.value))&&s.sectionIndex===n){let e=`${s.value}${o}`,t=r(e,a);if(!eni(t))return l({sectionIndex:n,value:e,sectionType:a.type}),t}let c=r(o,a);return eni(c)&&!c.saveQuery?(u(),null):(l({sectionIndex:n,value:o,sectionType:a.type}),eni(c))?null:c},h=e=>{let t=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},n=(e,n,r,i)=>{let s=e=>Jg(a,o,n.type,e);if("letter"===n.contentType)return t(n.format,s(n.format),e);if(r&&null!=i&&"letter"===Jd(a,r).contentType){let n=s(r),o=t(r,n,e);return eni(o)?{saveQuery:!1}:(0,AX.Z)({},o,{sectionValue:i(o.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case"month":return n(e,t,a.formats.month,e=>JM(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 i=Jy(e,r),o=Number(i),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||i.length===s.maximum.toString().length;return{sectionValue:JS(a,o,s,r,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 r=JT(a,"digit","month","MM"),i=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(eni(i))return i;let o=JM(a,i.sectionValue,"MM",n.format);return(0,AX.Z)({},i,{sectionValue:o})}if("weekDay"===n.type){let r=t(e,n);if(eni(r))return r;let i=Jp(a,n.format)[Number(r.sectionValue)-1];return(0,AX.Z)({},r,{sectionValue:i})}return{saveQuery:!1}},e=>Jb(e,r))};return{applyCharacterEditing:(0,QA.Z)(n=>{let o=e[n.sectionIndex],a=Jb(n.keyPressed,r)?d((0,AX.Z)({},n,{keyPressed:Jx(n.keyPressed,r)})):h(n);if(null==a){i(null);return}t({activeSection:o,newSectionValue:a.sectionValue,shouldGoToNextSection:a.shouldGoToNextSection})}),resetCharacterQuery:u}},ena=e=>{let{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:i,onClick:o,onFocus:a,onInput:s,onPaste:l,focused:u,autoFocus:c=!1},fieldValueManager:h,applyCharacterEditing:d,resetCharacterQuery:f,setSelectedSections:p,parsedSelectedSections:m,state:v,clearActiveSection:y,clearValue:x,updateSectionValue:b,updateValueFromValueStr:w,sectionOrder:S,areAllSectionsEmpty:_,sectionsValueBoundaries:C}=e,M=g.useRef(null),k=(0,J4.Z)(r,M),T=KV(),D=X2(),A=(0,TP.Z)(),[I,O]=g.useState(!1),P=g.useMemo(()=>({syncSelectionToDOM:()=>{let e;if(!M.current)return;let t=document.getSelection();if(!t)return;if(null==m){t.rangeCount>0&&M.current.getRoot().contains(t.getRangeAt(0).startContainer)&&t.removeAllRanges(),I&&M.current.getRoot().blur();return}if(!M.current.getRoot().contains(et_(document)))return;let n=new window.Range;e="all"===m?M.current.getRoot():"empty"===v.sections[m].type?M.current.getSectionContainer(m):M.current.getSectionContent(m),n.selectNodeContents(e),e.focus(),t.removeAllRanges(),t.addRange(n)},getActiveSectionIndexFromDOM:()=>{let e=et_(document);return e&&M.current&&M.current.getRoot().contains(e)?M.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!M.current||null!=P.getActiveSectionIndexFromDOM())return;let t=JN(e,v.sections);O(!0),M.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!M.current)return;let t=JN(e,v.sections);O(null!==("all"===t?0:t)),p(e)},isFieldFocused:()=>{let e=et_(document);return!!M.current&&M.current.getRoot().contains(e)}}),[m,p,v.sections,I]),R=(0,QA.Z)(e=>{if(!M.current)return;let t=v.sections[e];M.current.getSectionContent(e).innerHTML=t.value||t.placeholder,P.syncSelectionToDOM()}),E=(0,QA.Z)((e,...t)=>{!e.isDefaultPrevented()&&M.current&&(O(!0),o?.(e,...t),"all"===m?setTimeout(()=>{let e=document.getSelection().getRangeAt(0).startOffset;if(0===e){p(S.startIndex);return}let t=0,n=0;for(;n<e&&t<v.sections.length;){let e=v.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}p(t-1)}):I?M.current.getRoot().contains(e.target)||p(S.startIndex):(O(!0),p(S.startIndex)))}),L=(0,QA.Z)(e=>{if(s?.(e),!M.current||"all"!==m)return;let t=e.target.textContent??"";M.current.getRoot().innerHTML=v.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),P.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(f(),x(),p("all")):t.length>1?w(t):("all"===m&&p(0),d({keyPressed:t,sectionIndex:0}))}),N=(0,QA.Z)(e=>{if(l?.(e),n||"all"!==m){e.preventDefault();return}let t=e.clipboardData.getData("text");e.preventDefault(),f(),w(t)}),B=(0,QA.Z)((...e)=>{a?.(...e),!I&&M.current&&(O(!0),null==M.current.getSectionIndexFromDOMElement(et_(document))&&p(S.startIndex))}),F=(0,QA.Z)((...e)=>{i?.(...e),setTimeout(()=>{if(!M.current)return;let e=et_(document);M.current.getRoot().contains(e)||(O(!1),p(null))})}),z=(0,QA.Z)(e=>t=>{!t.isDefaultPrevented()&&p(e)}),V=(0,QA.Z)(e=>{e.preventDefault()}),Z=(0,QA.Z)(e=>()=>{p(e)}),j=(0,QA.Z)(e=>{if(e.preventDefault(),n||t||"number"!=typeof m)return;let r=v.sections[m],i=e.clipboardData.getData("text"),o=/^[a-zA-Z]+$/.test(i),a=/^[0-9]+$/.test(i),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(i);"letter"===r.contentType&&o||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(f(),b({activeSection:r,newSectionValue:i,shouldGoToNextSection:!0})):o||a||(f(),w(i))}),H=(0,QA.Z)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),W=(0,QA.Z)(e=>{if(!M.current)return;let t=e.target,r=t.textContent??"",i=M.current.getSectionIndexFromDOMElement(t),o=v.sections[i];if(n||!M.current){R(i);return}if(0===r.length){if(""===o.value){R(i);return}let t=e.nativeEvent.inputType;if("insertParagraph"===t||"insertLineBreak"===t){R(i);return}f(),y();return}d({keyPressed:r,sectionIndex:i}),R(i)});(0,D9.Z)(()=>{if(I&&M.current){if("all"===m)M.current.getRoot().focus();else if("number"==typeof m){let e=M.current.getSectionContent(m);e&&e.focus()}}},[m,I]);let $=g.useMemo(()=>v.sections.reduce((e,t)=>(e[t.type]=C[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e),{}),[C,v.sections]),G="all"===m,U=g.useMemo(()=>v.sections.map((e,r)=>{let i=!G&&!t&&!n;return{container:{"data-sectionindex":r,onClick:z(r)},content:{tabIndex:G||r>0?-1:0,contentEditable:!G&&!t&&!n,role:"spinbutton",id:`${A}-${e.type}`,"aria-labelledby":`${A}-${e.type}`,"aria-readonly":n,"aria-valuenow":JF(e,D),"aria-valuemin":$[e.type].minimum,"aria-valuemax":$[e.type].maximum,"aria-valuetext":e.value?JB(e,D):T.empty,"aria-label":T[e.type],"aria-disabled":t,spellCheck:!i&&void 0,autoCapitalize:i?"off":void 0,autoCorrect:i?"off":void 0,[parseInt(g.version,10)>=17?"enterKeyHint":"enterkeyhint"]:i?"next":void 0,children:e.value||e.placeholder,onInput:W,onPaste:j,onFocus:Z(r),onDragOver:H,onMouseUp:V,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}),[v.sections,Z,j,H,W,z,V,t,n,G,T,D,$,A]),q=(0,QA.Z)(e=>{w(e.target.value)}),Y=g.useMemo(()=>_?"":h.getV7HiddenInputValueFromSections(v.sections),[_,v.sections,h]);return g.useEffect(()=>{if(null==M.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&&M.current&&M.current.getSectionContent(S.startIndex).focus()},[]),{interactions:P,returnedValue:{autoFocus:c,readOnly:n,focused:u??I,sectionListRef:k,onBlur:F,onClick:E,onFocus:B,onInput:L,onPaste:N,enableAccessibleFieldDOMStructure:!0,elements:U,tabIndex:0===m?-1:0,contentEditable:G,value:Y,onChange:q,areAllSectionsEmpty:_}}},ens=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),enl=(e,t,n)=>{let r=0,i=+!!n,o=[];for(let a=0;a<e.length;a+=1){let s=e[a],l=JC(s,n?"input-rtl":"input-ltr",t),u=`${s.startSeparator}${l}${s.endSeparator}`,c=ens(u).length,h=u.length,d=ens(l),f=i+(""===d?0:l.indexOf(d[0]))+s.startSeparator.length,p=f+d.length;o.push((0,AX.Z)({},s,{start:r,end:r+c,startInInput:f,endInInput:p})),r+=c,i+=h}return o},enu=e=>{let t=(0,Ai.V)(),n=g.useRef(void 0),r=g.useRef(void 0),{forwardedProps:{onFocus:i,onClick:o,onPaste:a,onBlur:s,inputRef:l,placeholder:u},internalProps:{readOnly:c=!1,disabled:h=!1},parsedSelectedSections:d,activeSectionIndex:f,state:p,fieldValueManager:m,valueManager:v,applyCharacterEditing:y,resetCharacterQuery:x,updateSectionValue:b,updateValueFromValueStr:w,clearActiveSection:S,clearValue:_,setTempAndroidValueStr:C,setSelectedSections:M,getSectionsFromValue:k,areAllSectionsEmpty:T,localizedDigits:D}=e,A=g.useRef(null),I=(0,J4.Z)(l,A),O=g.useMemo(()=>enl(p.sections,D,t),[p.sections,D,t]),P=g.useMemo(()=>({syncSelectionToDOM:()=>{if(!A.current)return;if(null==d){A.current.scrollLeft&&(A.current.scrollLeft=0);return}if(A.current!==et_(document))return;let e=A.current.scrollTop;if("all"===d)A.current.select();else{let e=O[d],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;(t!==A.current.selectionStart||n!==A.current.selectionEnd)&&A.current===et_(document)&&A.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout(()=>{A.current&&A.current===et_(document)&&A.current.selectionStart===A.current.selectionEnd&&(A.current.selectionStart!==t||A.current.selectionEnd!==n)&&P.syncSelectionToDOM()})}A.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{let e=A.current.selectionStart??0,t=A.current.selectionEnd??0;if(0===e&&0===t)return null;let n=e<=O[0].startInInput?1:O.findIndex(t=>t.startInInput-t.startSeparator.length>e);return -1===n?O.length-1:n-1},focusField:(e=0)=>{et_(document)!==A.current&&(A.current?.focus(),M(e))},setSelectedSections:e=>M(e),isFieldFocused:()=>A.current===et_(document)}),[A,d,O,M]),R=()=>{let e;let t=A.current.selectionStart??0;M(-1===(e=t<=O[0].startInInput?1:t>=O[O.length-1].endInInput?1:O.findIndex(e=>e.startInInput-e.startSeparator.length>t))?O.length-1:e-1)},E=(0,QA.Z)((...e)=>{i?.(...e);let t=A.current;clearTimeout(n.current),n.current=setTimeout(()=>{t&&t===A.current&&null==f&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?M("all"):R())})}),L=(0,QA.Z)((e,...t)=>{!e.isDefaultPrevented()&&(o?.(e,...t),R())}),N=(0,QA.Z)(e=>{if(a?.(e),e.preventDefault(),c||h)return;let t=e.clipboardData.getData("text");if("number"==typeof d){let e=p.sections[d],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&i){x(),b({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});return}if(n||r)return}x(),w(t)}),B=(0,QA.Z)((...e)=>{s?.(...e),M(null)}),F=(0,QA.Z)(e=>{let n;if(c)return;let r=e.target.value;if(""===r){x(),_();return}let i=e.nativeEvent.data,o=i&&i.length>1,a=o?i:r,s=ens(a);if("all"===d&&M(f),null==f||o){w(o?i:s);return}if("all"===d&&1===s.length)n=s;else{let e=ens(m.getV6InputValueFromSections(O,D,t)),r=-1,i=-1;for(let t=0;t<e.length;t+=1)-1===r&&e[t]!==s[t]&&(r=t),-1===i&&e[e.length-t-1]!==s[s.length-t-1]&&(i=t);let o=O[f];if(r<o.start||e.length-i-1>o.end)return;let a=s.length-e.length+o.end-ens(o.endSeparator||"").length;n=s.slice(o.start+ens(o.startSeparator||"").length,a)}if(0===n.length){JE()&&C(a),x(),S();return}y({keyPressed:n,sectionIndex:f})}),z=g.useMemo(()=>void 0!==u?u:m.getV6InputValueFromSections(k(v.emptyValue),D,t),[u,m,k,v.emptyValue,D,t]),V=g.useMemo(()=>p.tempValueStrAndroid??m.getV6InputValueFromSections(p.sections,D,t),[p.sections,m,p.tempValueStrAndroid,D,t]);g.useEffect(()=>(A.current&&A.current===et_(document)&&M("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);let Z=g.useMemo(()=>null==f||"letter"===p.sections[f].contentType?"text":"numeric",[f,p.sections]);return{interactions:P,returnedValue:{readOnly:c,onBlur:B,onClick:L,onFocus:E,onPaste:N,inputRef:I,enableAccessibleFieldDOMStructure:!1,placeholder:z,inputMode:Z,autoComplete:"off",value:!(A.current&&A.current===et_(document))&&T?"":V,onChange:F}}},enc=e=>{let t=X2(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:i,enableAccessibleFieldDOMStructure:o=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:u,clearable:c,onClear:h},fieldValueManager:d,valueManager:f,validator:p}=e,m=(0,Ai.V)(),v=enr(e),{state:y,activeSectionIndex:x,parsedSelectedSections:b,setSelectedSections:w,clearValue:S,clearActiveSection:_,updateSectionValue:C,setTempAndroidValueStr:M,sectionsValueBoundaries:k,localizedDigits:T,timezone:D}=v,A=eno({sections:y.sections,updateSectionValue:C,sectionsValueBoundaries:k,localizedDigits:T,setTempAndroidValueStr:M,timezone:D}),{resetCharacterQuery:I}=A,O=f.areValuesEqual(t,y.value,f.emptyValue),P=o?ena:enu,R=g.useMemo(()=>JL(y.sections,m&&!o),[y.sections,m,o]),{returnedValue:E,interactions:L}=P((0,AX.Z)({},e,v,A,{areAllSectionsEmpty:O,sectionOrder:R})),N=(0,QA.Z)(e=>{if(l?.(e),!a)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),w("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==b)w(R.startIndex);else if("all"===b)w(R.endIndex);else{let e=R.neighbors[b].rightIndex;null!==e&&w(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==b)w(R.endIndex);else if("all"===b)w(R.startIndex);else{let e=R.neighbors[b].leftIndex;null!==e&&w(e)}break;case"Delete"===e.key:if(e.preventDefault(),s)break;null==b||"all"===b?S():_(),I();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),s||null==x)break;"all"===b&&w(x);let n=y.sections[x],r=d.getActiveDateManager(t,y,n),o=J_(t,D,n,e.key,k,T,r.date,{minutesStep:i});C({activeSection:n,newSectionValue:o,shouldGoToNextSection:!1})}}});(0,D9.Z)(()=>{L.syncSelectionToDOM()});let{hasValidationError:B}=etm({props:n,validator:p,timezone:D,value:y.value,onError:n.onError}),F=g.useMemo(()=>void 0!==u?u:B,[B,u]);g.useEffect(()=>{F||null!=x||I()},[y.referenceValue,x,F]),g.useEffect(()=>{null!=y.tempValueStrAndroid&&null!=x&&(I(),_())},[y.sections]),g.useImperativeHandle(r,()=>({getSections:()=>y.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused}));let z={onKeyDown:N,onClear:(0,QA.Z)((e,...t)=>{e.preventDefault(),h?.(e,...t),S(),L.isFieldFocused()?w(R.startIndex):L.focusField(0)}),error:F,clearable:!!(c&&!O&&!s&&!a)};return(0,AX.Z)({},e.forwardedProps,z,{disabled:a,readOnly:s},E)},enh=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],end=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],enf=["minDateTime","maxDateTime"];[...enh,...end,...enf];let enp=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],eng=(e,t)=>g.useMemo(()=>{let n=(0,AX.Z)({},e),r={},i=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return enp.forEach(i),"date"===t?enh.forEach(i):"time"===t?end.forEach(i):"date-time"===t&&(enh.forEach(i),end.forEach(i),enf.forEach(i)),{forwardedProps:n,internalProps:r}},[e,t]),enm=e=>{let t=X2(),n=X5(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return(0,AX.Z)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:X6(t,e.minDateTime??e.minDate,n.minDate),maxDate:X6(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},env=e=>{let{forwardedProps:t,internalProps:n}=eng(enm(e),"date-time");return enc({forwardedProps:t,internalProps:n,valueManager:JV,fieldValueManager:JZ,validator:et3,valueType:"date-time"})};var eny=n(6992);let enx=["clearable","onClear","InputProps","sx","slots","slotProps"],enb=["ownerState"],enw=e=>{let t=KV(),{clearable:n,onClear:r,InputProps:i,sx:o,slots:a,slotProps:s}=e,l=(0,AK.Z)(e,enx),u=a?.clearButton??x4.Z,c=(0,Ku.Z)({elementType:u,externalSlotProps:s?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),h=(0,AK.Z)(c,enb),d=a?.clearIcon??Kz,f=(0,Ku.Z)({elementType:d,externalSlotProps:s?.clearIcon,ownerState:{}});return(0,AX.Z)({},l,{InputProps:(0,AX.Z)({},i,{endAdornment:(0,p.jsxs)(g.Fragment,{children:[n&&(0,p.jsx)(eny.Z,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:(0,p.jsx)(u,(0,AX.Z)({},h,{onClick:r,children:(0,p.jsx)(d,(0,AX.Z)({fontSize:"small"},f))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(o)?o:[o]]})};var enS=n(8808),en_=n(2931);function enC(e){return(0,T.ZP)("MuiPickersTextField",e)}(0,k.Z)("MuiPickersTextField",["root","focused","disabled","error","required"]);var enM=n(6683);function enk(e){return(0,T.ZP)("MuiPickersInputBase",e)}let enT=(0,k.Z)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function enD(e){return(0,T.ZP)("MuiPickersOutlinedInput",e)}let enA=(0,AX.Z)({},enT,(0,k.Z)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),enI=["children","className","label","notched","shrink"],enO=(0,S.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}}),enP=(0,S.ZP)("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),enR=(0,S.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 enE(e){let{className:t,label:n}=e,r=(0,AK.Z)(e,enI),i=null!=n&&""!==n,o=(0,AX.Z)({},e,{withLabel:i});return(0,p.jsx)(enO,(0,AX.Z)({"aria-hidden":!0,className:t},r,{ownerState:o,children:(0,p.jsx)(enR,{ownerState:o,children:i?(0,p.jsx)(enP,{children:n}):(0,p.jsx)(enP,{className:"notranslate",children:""})})}))}var enL=n(3150);function enN(e){return(0,T.ZP)("MuiPickersSectionList",e)}let enB=(0,k.Z)("MuiPickersSectionList",["root","section","sectionContent"]),enF=["slots","slotProps","elements","sectionListRef"],enz=(0,S.ZP)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),enV=(0,S.ZP)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),enZ=(0,S.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),enj=(0,S.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),enH=e=>{let{classes:t}=e;return(0,y.Z)({root:["root"],section:["section"],sectionContent:["sectionContent"]},enN,t)};function enW(e){let{slots:t,slotProps:n,element:r,classes:i}=e,o=t?.section??enV,a=(0,Ku.Z)({elementType:o,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),s=t?.sectionContent??enj,l=(0,Ku.Z)({elementType:s,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),u=t?.sectionSeparator??enZ,c=(0,Ku.Z)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),h=(0,Ku.Z)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,p.jsxs)(o,(0,AX.Z)({},a,{children:[(0,p.jsx)(u,(0,AX.Z)({},c)),(0,p.jsx)(s,(0,AX.Z)({},l)),(0,p.jsx)(u,(0,AX.Z)({},h))]}))}let en$=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:o,sectionListRef:a}=n,s=(0,AK.Z)(n,enF),l=enH(n),u=g.useRef(null),c=(0,J4.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};g.useImperativeHandle(a,()=>({getRoot:()=>h("getRoot"),getSectionContainer:e=>h("getSectionContainer").querySelector(`.${enB.section}[data-sectionindex="${e}"]`),getSectionContent:e=>h("getSectionContent").querySelector(`.${enB.section}[data-sectionindex="${e}"] .${enB.sectionContent}`),getSectionIndexFromDOMElement(e){let t=h("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return(e.classList.contains(enB.section)?n=e:e.classList.contains(enB.sectionContent)&&(n=e.parentElement),null==n)?null:Number(n.dataset.sectionindex)}}));let d=r?.root??enz,f=(0,Ku.Z)({elementType:d,externalSlotProps:i?.root,externalForwardedProps:s,additionalProps:{ref:c,suppressContentEditableWarning:!0},className:l.root,ownerState:{}});return(0,p.jsx)(d,(0,AX.Z)({},f,{children:f.contentEditable?o.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,p.jsx)(g.Fragment,{children:o.map((e,t)=>(0,p.jsx)(enW,{slots:r,slotProps:i,element:e,classes:l},t))})}))}),enG=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],enU=e=>Math.round(1e5*e)/1e5,enq=(0,S.ZP)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>(0,AX.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:`${enU(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),enY=(0,S.ZP)(enz,{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:r})=>!e&&!t&&!n&&null==r,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),enX=(0,S.ZP)(enV,{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"})),enK=(0,S.ZP)(enj,{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"})),enQ=(0,S.ZP)(enZ,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),enJ=(0,S.ZP)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,AX.Z)({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),en0=e=>{let{focused:t,disabled:n,error:r,classes:i,fullWidth:o,readOnly:a,color:s,size:l,endAdornment:u,startAdornment:c}=e,h={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",o&&"fullWidth",`color${(0,enL.Z)(s)}`,"small"===l&&"inputSizeSmall",!!c&&"adornedStart",!!u&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,y.Z)(h,enk,i)},en1=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:a,id:s,endAdornment:l,startAdornment:u,renderSuffix:c,slots:h,slotProps:d,contentEditable:f,tabIndex:m,onInput:v,onPaste:y,onKeyDown:x,name:b,readOnly:w,inputProps:S,inputRef:_,sectionListRef:C}=n,M=(0,AK.Z)(n,enG),k=g.useRef(null),T=(0,J4.Z)(t,k),D=(0,J4.Z)(S?.ref,_),A=(0,Ai.V)(),I=(0,enM.Z)();if(!I)throw Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");g.useEffect(()=>{I&&I.setAdornedStart(!!u)},[I,u]),g.useEffect(()=>{I&&(i?I.onEmpty():I.onFilled())},[I,i]);let O=(0,AX.Z)({},n,I,{isRtl:A}),P=en0(O),R=h?.root||enq,E=(0,Ku.Z)({elementType:R,externalSlotProps:d?.root,externalForwardedProps:M,additionalProps:{"aria-invalid":I.error,ref:T},className:P.root,ownerState:O}),L=h?.input||enY;return(0,p.jsxs)(R,(0,AX.Z)({},E,{children:[u,(0,p.jsx)(en$,{sectionListRef:C,elements:r,contentEditable:f,tabIndex:m,className:P.sectionsContainer,onFocus:e=>{if(I.disabled){e.stopPropagation();return}I.onFocus?.(e)},onBlur:I.onBlur,onInput:v,onPaste:y,onKeyDown:x,slots:{root:L,section:enX,sectionContent:enK,sectionSeparator:enQ},slotProps:{root:{ownerState:O},sectionContent:{className:enT.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?enT.sectionBefore:enT.sectionAfter})}}),l,c?c((0,AX.Z)({},I)):null,(0,p.jsx)(enJ,(0,AX.Z)({name:b,className:P.input,value:o,onChange:a,id:s,"aria-hidden":"true",tabIndex:-1,readOnly:w,required:I.required,disabled:I.disabled},S,{ref:D}))]}))}),en2=["label","autoFocus","ownerState","notched"],en5=(0,S.ZP)(enq,{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 .${enA.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${enA.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${enA.focused} .${enA.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${enA.disabled}`]:{[`& .${enA.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${enA.error} .${enA.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:{[`&.${enA.focused}:not(.${enA.error}) .${enA.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),en3=(0,S.ZP)(enY,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),en4=e=>{let{classes:t}=e,n=(0,y.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},enD,t);return(0,AX.Z)({},t,n)},en8=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:o}=n,a=(0,AK.Z)(n,en2),s=(0,enM.Z)(),l=(0,AX.Z)({},n,i,s,{color:s?.color||"primary"}),u=en4(l);return(0,p.jsx)(en1,(0,AX.Z)({slots:{root:en5,input:en3},renderSuffix:e=>(0,p.jsx)(enE,{shrink:!!(o||e.adornedStart||e.focused||e.filled),notched:!!(o||e.adornedStart||e.focused||e.filled),className:u.notchedOutline,label:null!=r&&""!==r&&s?.required?(0,p.jsxs)(g.Fragment,{children:[r," ","*"]}):r,ownerState:l})},a,{label:r,classes:u,ref:t}))});en8.muiName="Input";var en6=n(5315);function en9(e){return(0,T.ZP)("MuiPickersFilledInput",e)}let en7=(0,AX.Z)({},enT,(0,k.Z)("MuiPickersFilledInput",["root","underline","input"])),ere=["label","autoFocus","disableUnderline","ownerState"],ert=(0,S.ZP)(enq,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,en6.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}},[`&.${en7.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${en7.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"},[`&.${en7.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${en7.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(.${en7.disabled}, .${en7.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${en7.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}}),ern=(0,S.ZP)(enY,{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}}]}),err=e=>{let{classes:t,disableUnderline:n}=e,r=(0,y.Z)({root:["root",!n&&"underline"],input:["input"]},en9,t);return(0,AX.Z)({},t,r)},eri=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,AK.Z)(n,ere),s=(0,enM.Z)(),l=err((0,AX.Z)({},n,o,s,{color:s?.color||"primary"}));return(0,p.jsx)(en1,(0,AX.Z)({slots:{root:ert,input:ern},slotProps:{root:{disableUnderline:i}}},a,{label:r,classes:l,ref:t}))});function ero(e){return(0,T.ZP)("MuiPickersFilledInput",e)}eri.muiName="Input";let era=(0,AX.Z)({},enT,(0,k.Z)("MuiPickersInput",["root","input"])),ers=["label","autoFocus","disableUnderline","ownerState"],erl=(0,S.ZP)(enq,{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"},[`&.${era.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${era.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(.${era.disabled}, .${era.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${era.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),eru=e=>{let{classes:t,disableUnderline:n}=e,r=(0,y.Z)({root:["root",!n&&"underline"],input:["input"]},ero,t);return(0,AX.Z)({},t,r)},erc=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,a=(0,AK.Z)(n,ers),s=(0,enM.Z)(),l=eru((0,AX.Z)({},n,o,s,{disableUnderline:i,color:s?.color||"primary"}));return(0,p.jsx)(en1,(0,AX.Z)({slots:{root:erl}},a,{label:r,classes:l,ref:t}))});erc.muiName="Input";let erh=["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"],erd={standard:erc,filled:eri,outlined:en8},erf=(0,S.ZP)(T0.Z,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),erp=e=>{let{focused:t,disabled:n,classes:r,required:i}=e;return(0,y.Z)({root:["root",t&&!n&&"focused",n&&"disabled",i&&"required"]},enC,r)},erg=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:o,color:a="primary",disabled:s=!1,error:l=!1,variant:u="outlined",required:c=!1,InputProps:h,inputProps:d,inputRef:f,sectionListRef:m,elements:y,areAllSectionsEmpty:x,onClick:b,onKeyDown:w,onKeyUp:S,onPaste:_,onInput:C,endAdornment:M,startAdornment:k,tabIndex:T,contentEditable:D,focused:A,value:I,onChange:O,fullWidth:P,id:R,name:E,helperText:L,FormHelperTextProps:N,label:B,InputLabelProps:F}=n,z=(0,AK.Z)(n,erh),V=g.useRef(null),Z=(0,J4.Z)(t,V),j=(0,TP.Z)(R),H=L&&j?`${j}-helper-text`:void 0,W=B&&j?`${j}-label`:void 0,$=(0,AX.Z)({},n,{color:a,disabled:s,error:l,focused:A,required:c,variant:u}),G=erp($),U=erd[u];return(0,p.jsxs)(erf,(0,AX.Z)({className:(0,v.Z)(G.root,o),ref:Z,focused:A,onFocus:r,onBlur:i,disabled:s,variant:u,error:l,color:a,fullWidth:P,required:c,ownerState:$},z,{children:[(0,p.jsx)(enS.Z,(0,AX.Z)({htmlFor:j,id:W},F,{children:B})),(0,p.jsx)(U,(0,AX.Z)({elements:y,areAllSectionsEmpty:x,onClick:b,onKeyDown:w,onKeyUp:S,onInput:C,onPaste:_,endAdornment:M,startAdornment:k,tabIndex:T,contentEditable:D,value:I,onChange:O,id:j,fullWidth:P,inputProps:d,inputRef:f,sectionListRef:m,label:B,name:E,role:"group","aria-labelledby":W,"aria-describedby":H,"aria-live":H?"polite":void 0},h)),L&&(0,p.jsx)(en_.Z,(0,AX.Z)({id:H},N,{children:L}))]}))}),erm=["enableAccessibleFieldDOMStructure"],erv=["InputProps","readOnly"],ery=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],erx=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,AK.Z)(e,erm);if(t){let{InputProps:e,readOnly:t}=n,r=(0,AK.Z)(n,erv);return(0,AX.Z)({},r,{InputProps:(0,AX.Z)({},e??{},{readOnly:t})})}let{onPaste:r,onKeyDown:i,inputMode:o,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,AK.Z)(n,ery);return(0,AX.Z)({},c,{InputProps:(0,AX.Z)({},s??{},{readOnly:a}),inputProps:(0,AX.Z)({},l??{},{inputMode:o,onPaste:r,onKeyDown:i,ref:u})})},erb=["slots","slotProps","InputProps","inputProps"],erw=g.forwardRef(function(e,t){let n=(0,Xq.Z)({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:o,inputProps:a}=n,s=(0,AK.Z)(n,erb),l=r?.textField??(e.enableAccessibleFieldDOMStructure?erg:x8.Z),u=(0,Ku.Z)({elementType:l,externalSlotProps:i?.textField,externalForwardedProps:s,ownerState:n,additionalProps:{ref:t}});u.inputProps=(0,AX.Z)({},a,u.inputProps),u.InputProps=(0,AX.Z)({},o,u.InputProps);let c=erx(env(u)),h=enw((0,AX.Z)({},c,{slots:r,slotProps:i}));return(0,p.jsx)(l,(0,AX.Z)({},h))});var erS=n(9435),er_=n(2791),erC=n(4336),erM=n(2694),erk=n(5154),erT=n(9489),erD=n(6341),erA=n(3189),erI=n(5918),erO=n(9880),erP=n(8006),erR=n(6332),erE=n(1721),erL=n(1267),erN=n(8904),erB=n(7785),erF=n(8364),erz=n(8340),erV=n(506),erZ=n(4265),erj=n(6635),erH=n(1275),erW=n(4107),er$=n(436),erG=n(7912),erU=n(9250),erq=n(3303),erY=n(8374),erX=n(3743),erK=n(8070),erQ=n(3709),erJ=n(3200),er0=n(6292),er1=n(1136),er2=n(3518),er5=n(4138),er3=n(8140),er4=n(3033),er8=n(7),er6=n(4575),er9=n(5149),er7=n(8874),eie=n(2511),eit=n(4257);let ein={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"},eir={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 eii{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=ein,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:r,lib:i}=e;this.locale=t,this.formats=(0,AX.Z)({},eir,n),this.longFormatters=r,this.lib=i||"date-fns"}}class eio extends eii{constructor({locale:e,formats:t}={}){super({locale:e??eit._,formats:t,longFormatters:erP.G}),this.parse=(e,t)=>""===e?null:(0,erK.Qc)(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&(0,erX.J)(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>(0,erR.WU)(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&(0,er$.X)(e,t),this.isSameYear=(e,t)=>(0,erU.F)(e,t),this.isSameMonth=(e,t)=>(0,erq.x)(e,t),this.isSameDay=(e,t)=>(0,erG.K)(e,t),this.isSameHour=(e,t)=>(0,erY.f)(e,t),this.isAfter=(e,t)=>(0,erH.A)(e,t),this.isAfterYear=(e,t)=>(0,erH.A)(e,(0,erO.w)(t)),this.isAfterDay=(e,t)=>(0,erH.A)(e,(0,erA.i)(t)),this.isBefore=(e,t)=>(0,erW.R)(e,t),this.isBeforeYear=(e,t)=>(0,erW.R)(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>(0,erW.R)(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>(0,eie._)(e,{start:t,end:n}),this.startOfYear=e=>(0,er7.e)(e),this.startOfMonth=e=>(0,er8.N)(e),this.startOfWeek=e=>(0,er9.z)(e,{locale:this.locale}),this.startOfDay=e=>(0,er4.b)(e),this.endOfYear=e=>(0,erO.w)(e),this.endOfMonth=e=>(0,er6.V)(e),this.endOfWeek=e=>(0,erI.v)(e,{locale:this.locale}),this.endOfDay=e=>(0,erA.i)(e),this.addYears=(e,t)=>(0,erD.B)(e,t),this.addMonths=(e,t)=>(0,erT.z)(e,t),this.addWeeks=(e,t)=>(0,erk.j)(e,t),this.addDays=(e,t)=>(0,erS.E)(e,t),this.addHours=(e,t)=>(0,erM.T)(e,t),this.addMinutes=(e,t)=>(0,erC.m)(e,t),this.addSeconds=(e,t)=>(0,er_.v)(e,t),this.getYear=e=>(0,erj.S)(e),this.getMonth=e=>(0,erF.j)(e),this.getDate=e=>(0,erE._)(e),this.getHours=e=>(0,erN.p)(e),this.getMinutes=e=>(0,erB.q)(e),this.getSeconds=e=>(0,erz.C)(e),this.getMilliseconds=e=>(0,erV.p)(e),this.setYear=(e,t)=>(0,er3.M)(e,t),this.setMonth=(e,t)=>(0,er1.q)(e,t),this.setDate=(e,t)=>(0,erQ.G)(e,t),this.setHours=(e,t)=>(0,erJ.B)(e,t),this.setMinutes=(e,t)=>(0,er0.H)(e,t),this.setSeconds=(e,t)=>(0,er2.O)(e,t),this.setMilliseconds=(e,t)=>(0,er5.I)(e,t),this.getDaysInMonth=e=>(0,erL.N)(e),this.getWeekArray=e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,o=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);o[e]=o[e]||[],o[e].push(i),i=this.addDays(i,1),r+=1}return o},this.getWeekNumber=e=>(0,erZ.Q)(e,{locale:this.locale}),this.getYearRange=([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}}let eia="yyyy-MM-dd HH:mm:ss";function eis(e,t){return e?(0,XU.s3)(e)?e.pastDuration:function(e,t,n){let r=WS(e.start,t,n),i=WS(e.end,t,n);return`${r} - ${i}`}(e,eia,t):"Custom Time Range"}let eil=({initialTimeRange:e,onChange:t,onCancel:n})=>{let{formatWithUserTimeZone:r}=WD(),[i,o]=(0,g.useState)(e),[a,s]=(0,g.useState)({start:r(e.start,eia),end:r(e.end,eia)}),[l,u]=(0,g.useState)(!0),c=(e,t)=>{let n="string"==typeof e,i=n?e:r(e,eia);s(e=>({...e,[t]:i})),n||o(n=>({...n,[t]:e}))},h=e=>{c(e,"start")},d=e=>{c(e,"end")},f=()=>{var e,t;let n={start:new Date(a.start),end:new Date(a.end)};if(e=n.start,t=n.end,(0,Wb.isValid)(e)&&(0,Wb.isValid)(t)?!!(0,Wb.isBefore)(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return o(n),n},m=()=>{let e=f();e&&t(e)};return(0,p.jsx)(XK,{dateAdapter:eio,children:(0,p.jsxs)(x3,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[l&&(0,p.jsxs)(vL.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,p.jsx)(kz.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,p.jsx)(et4,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.start,onChange:e=>{null!==e&&h(e)},onAccept:()=>{u(!1)}})]}),!l&&(0,p.jsxs)(vL.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,p.jsx)(kz.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,p.jsx)(et4,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:e.end,minDateTime:i.start,onChange:e=>{null!==e&&d(e)},onAccept:e=>{null!==e&&(u(!0),d(e))}})]}),(0,p.jsxs)(x3,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,p.jsx)(AB.ErrorBoundary,{FallbackComponent:AN,children:(0,p.jsx)(erw,{label:"Start Time",value:new Date(a.start),onChange:e=>{e&&h(e)},onBlur:()=>f(),format:eia})}),(0,p.jsx)(AB.ErrorBoundary,{FallbackComponent:AN,children:(0,p.jsx)(erw,{label:"End Time",value:new Date(a.end),onChange:e=>{e&&d(e)},onBlur:()=>f(),format:eia})})]}),(0,p.jsxs)(x3,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,p.jsx)(L.Z,{variant:"contained",onClick:()=>m(),fullWidth:!0,children:"Apply"}),(0,p.jsx)(L.Z,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function eiu({value:e,timeOptions:t,onChange:n,height:r,showCustomTimeRange:i=!0}){let{timeZone:o}=WD(),a=(0,g.useRef)(),[s,l]=(0,g.useState)(!1),u=(0,g.useMemo)(()=>(0,XU.s3)(e)?(0,XU.sG)(e):e,[e]),c=(0,g.useMemo)(()=>{var t;return{value:t=(0,XU.s3)(e)?void 0:e,display:eis(t,o)}},[e,o]),[h,d]=(0,g.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(wA.ZP,{anchorEl:a.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:s,onClose:()=>l(!1),sx:e=>({padding:e.spacing(2)}),children:(0,p.jsx)(eil,{initialTimeRange:u,onChange:e=>{n(e),l(!1),d(!1)},onCancel:()=>l(!1)})}),(0,p.jsx)(vL.Z,{ref:a,children:(0,p.jsxs)(X$.Z,{open:h,value:eis(e,o),onClick:()=>d(!h),IconComponent:XG.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":r?{lineHeight:r,paddingY:0}:{}},children:[t.map((e,t)=>(0,p.jsx)(D5.Z,{value:eis(e.value,o),onClick:()=>{n(e.value)},children:e.display},t)),i&&(0,p.jsx)(D5.Z,{value:eis(c.value,o),onClick:()=>l(!0),children:c.display})]})})]})}let eic=(0,S.ZP)(L.Z)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),eih=(0,g.forwardRef)(function(e,t){return(0,p.jsx)(eic,{ref:t,variant:"outlined",color:"secondary",...e})}),eid=Object.entries(eR).map(([e,t])=>({id:e,...t})).filter(e=>!e.disableSelectorOption),eif=[{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 eip({value:e,onChange:t,disabled:n=!1}){var r;let i=!!eN(e).decimalPlaces,o=!!eN(e).shortValues,a=({decimalPlaces:n})=>{i&&t({...e,decimalPlaces:n})},s=eR[e.unit];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T7,{label:"Short values",control:(0,p.jsx)(W6,{checked:!!o&&!1!==e.shortValues,onChange:(n,r)=>{o&&t({...e,shortValues:r})},disabled:!o})}),(0,p.jsx)(T7,{label:"Unit",control:(0,p.jsx)(Dn,{value:{id:e.unit,...s},options:eid,groupBy:e=>e.group,onChange:(e,n)=>{t({unit:n.id})},disableClearable:!0,disabled:n})}),(0,p.jsx)(T7,{label:"Decimals",control:(0,p.jsx)(Dn,{value:(r=e.decimalPlaces,eif.find(e=>e.decimalPlaces===r)),options:eif,getOptionLabel:e=>e.label,onChange:(e,t)=>a(t),disabled:!i,disableClearable:!0})})]})}function eig({name:e,height:t}){return(0,p.jsx)(vL.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,p.jsx)(kz.Z,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}let eim=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(r&&(r+=" "),r+=t);return r},eiv={data:""},eiy=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||eiv,eix=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,eib=/\/\*[^]*?\*\/| +/g,eiw=/\n+/g,eiS=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?eiS(a,o):o+"{"+eiS(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=eiS(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(),i+=eiS.p?eiS.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},ei_={},eiC=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+eiC(e[n]);return t}return e},eiM=(e,t,n,r,i)=>{var o;let a=eiC(e),s=ei_[a]||(ei_[a]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(a));if(!ei_[s]){let t=a!==e?e:(e=>{let t,n,r=[{}];for(;t=eix.exec(e.replace(eib,""));)t[4]?r.shift():t[3]?(n=t[3].replace(eiw," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(eiw," ").trim();return r[0]})(e);ei_[s]=eiS(i?{["@keyframes "+s]:t}:t,n?"":"."+s)}let l=n&&ei_.g?ei_.g:null;return n&&(ei_.g=ei_[s]),o=ei_[s],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),s},eik=(e,t,n)=>e.reduce((e,r,i)=>{let o=t[i];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?"":eiS(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"");function eiT(e){let t=this||{},n=e.call?e(t.p):e;return eiM(n.unshift?n.raw?eik(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,eiy(t.target),t.g,t.o,t.k)}function eiD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eiA(e,t,n){return t&&eiD(e.prototype,t),n&&eiD(e,n),e}function eiI(){return(eiI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eiO(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function eiP(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function eiR(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}eiT.bind({g:1}),eiT.bind({k:1});var eiE=function(){return""},eiL=m().createContext({enqueueSnackbar:eiE,closeSnackbar:eiE}),eiN="@media (max-width:599.95px)",eiB="@media (min-width:600px)",eiF=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},eiz=function(e){return""+eiF(e.vertical)+eiF(e.horizontal)},eiV=function(e){return!!e||0===e},eiZ="unmounted",eij="exited",eiH="entering",eiW="entered",ei$="exiting",eiG=function(e){function t(t){n=e.call(this,t)||this;var n,r,i=t.appear;return n.appearStatus=null,t.in?i?(r=eij,n.appearStatus=eiH):r=eiW:r=t.unmountOnExit||t.mountOnEnter?eiZ:eij,n.state={status:r},n.nextCallback=null,n}eiO(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===eiZ?{status:eij}: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!==eiH&&n!==eiW&&(t=eiH):(n===eiH||n===eiW)&&(t=ei$)}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===eiH?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===eij&&this.setState({status:eiZ})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.getTimeouts();if(!e&&!n){this.safeSetState({status:eiW},function(){t.props.onEntered&&t.props.onEntered(t.node,e)});return}this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:eiH},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:eiW},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:eij},function(){e.props.onExited&&e.props.onExited(e.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:ei$},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:eij},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===eiZ)return null;var t=this.props;return(0,t.children)(e,eiP(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},eiA(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}(m().Component);function eiU(){}function eiq(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function eiY(e,t){return(0,g.useMemo)(function(){return null==e&&null==t?null:function(n){eiq(e,n),eiq(t,n)}},[e,t])}function eiX(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}eiG.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:eiU,onEntering:eiU,onEntered:eiU,onExit:eiU,onExiting:eiU,onExited:eiU};var eiK={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)"},eiQ=function(e){e.scrollTop=e.scrollTop},eiJ=function(e){return Math.round(e)+"ms"};function ei0(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,o=n.easing,a=void 0===o?eiK.easeInOut:o,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof i?i:eiJ(i))+" "+a+" "+("string"==typeof l?l:eiJ(l))}).join(",")}function ei1(e){return(e&&e.ownerDocument||document).defaultView||window}function ei2(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=ei1(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=i.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("+(i.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(i.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var ei5=(0,g.forwardRef)(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,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,f=eiP(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),p=(0,g.useRef)(null),m=eiY(n.ref,p),v=eiY(m,t),y=(0,g.useCallback)(function(){p.current&&ei2(i,p.current)},[i]);return(0,g.useEffect)(function(){if(!o&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){p.current&&ei2(i,p.current)}),t=ei1(p.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,o]),(0,g.useEffect)(function(){o||y()},[o,y]),(0,g.createElement)(eiG,Object.assign({appear:!0,nodeRef:p,onEnter:function(e,t){ei2(i,e),eiQ(e),u&&u(e,t)},onEntered:c,onEntering:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||eiK.easeOut,n=eiX({timeout:l,mode:"enter",style:eiI({},a,{transitionTimingFunction:t})});e.style.webkitTransition=ei0("-webkit-transform",n),e.style.transition=ei0("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==a?void 0:a.transitionTimingFunction)||eiK.sharp,n=eiX({timeout:l,mode:"exit",style:eiI({},a,{transitionTimingFunction:t})});e.style.webkitTransition=ei0("-webkit-transform",n),e.style.transition=ei0("transform",n),ei2(i,e),h&&h(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",d&&d(e)},in:o,timeout:l},f),function(e,t){return(0,g.cloneElement)(n,eiI({ref:v,style:eiI({visibility:"exited"!==e||o?void 0:"hidden"},a,{},n.props.style)},t))})});ei5.displayName="Slide";var ei3=function(e){return m().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))},ei4={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:m().createElement(function(){return m().createElement(ei3,null,m().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:m().createElement(function(){return m().createElement(ei3,null,m().createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:m().createElement(function(){return m().createElement(ei3,null,m().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:m().createElement(function(){return m().createElement(ei3,null,m().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:ei5,transitionDuration:{enter:225,exit:195}},ei8=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:ei4.autoHideDuration},ei6=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"])?eiI({},ei4.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?eiI({},ei4.transitionDuration,{},t):ei4.transitionDuration};function ei9(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return eiI({},e,((n={})[r]=eiT(i),n))},{})}var ei7="notistack-CollapseWrapper",eoe=ei9({root:{height:0},entered:{height:"auto"}}),eot=(0,g.forwardRef)(function(e,t){var n=e.children,r=e.in,i=e.onExited,o=(0,g.useRef)(null),a=(0,g.useRef)(null),s=eiY(t,a),l=function(){return o.current?o.current.clientHeight:0};return(0,g.createElement)(eiG,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=eiX({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=l()+"px"},onExited:i,onExiting:function(e){eiQ(e);var t=eiX({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=r||""},nodeRef:a,timeout:175},function(e,t){return(0,g.createElement)("div",Object.assign({ref:s,className:eim(eoe.root,"entered"===e&&eoe.entered),style:eiI({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:ei0("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),(0,g.createElement)("div",{ref:o,className:ei7,style:{display:"flex",width:"100%"}},n))})});eot.displayName="Collapse";var eon={right:"left",left:"right",bottom:"up",top:"down"},eor=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 r;return eiI({},t,((r={})[n]=e[n],r))},{})},eoi=function(){};function eoo(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=[].concat(i);t&&-1===a.indexOf(t)&&a.push(t),e.apply(this,a),n.apply(this,a)}},eoi)}var eoa="undefined"!=typeof window?g.useLayoutEffect:g.useEffect;function eos(e){var t=(0,g.useRef)(e);return eoa(function(){t.current=e}),(0,g.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var eol=(0,g.forwardRef)(function(e,t){var n=e.children,r=e.className,i=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,g.useRef)(),f=eos(function(){s&&s.apply(void 0,arguments)}),p=eos(function(e){s&&null!=e&&(d.current&&clearTimeout(d.current),d.current=setTimeout(function(){f(null,"timeout",l)},e))});(0,g.useEffect)(function(){return u&&p(i),function(){d.current&&clearTimeout(d.current)}},[u,i,p]);var m=function(){d.current&&clearTimeout(d.current)},v=(0,g.useCallback)(function(){null!=i&&p(.5*i)},[i,p]);return(0,g.useEffect)(function(){if(!a&&u)return window.addEventListener("focus",v),window.addEventListener("blur",m),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",m)}},[a,v,u]),(0,g.createElement)("div",Object.assign({ref:t},h,{className:eim("notistack-Snackbar",r),onMouseEnter:function(e){h.onMouseEnter&&h.onMouseEnter(e),m()},onMouseLeave:function(e){h.onMouseLeave&&h.onMouseLeave(e),v()}}),n)});eol.displayName="Snackbar";var eou=ei9({root:((s={display:"flex",flexWrap:"wrap",flexGrow:1})[eiB]={flexGrow:"initial",minWidth:"288px"},s)}),eoc=(0,g.forwardRef)(function(e,t){var n=e.className,r=eiP(e,["className"]);return m().createElement("div",Object.assign({ref:t,className:eim(eou.root,n)},r))});eoc.displayName="SnackbarContent";var eoh=ei9({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"}}),eod="notistack-snackbar",eof=(0,g.forwardRef)(function(e,t){var n=e.id,r=e.message,i=e.action,o=e.iconVariant,a=e.variant,s=e.hideIconVariant,l=e.style,u=e.className,c=o[a],h=i;return"function"==typeof h&&(h=h(n)),m().createElement(eoc,{ref:t,role:"alert","aria-describedby":eod,style:l,className:eim("notistack-MuiContent","notistack-MuiContent-"+a,eoh.root,eoh[a],u,!s&&c&&eoh.lessPadding)},m().createElement("div",{id:eod,className:eoh.message},s?null:c,r),h&&m().createElement("div",{className:eoh.action},h))});eof.displayName="MaterialDesignContent";var eop=(0,g.memo)(eof),eog=ei9({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),eom=function(e){var t,n=(0,g.useRef)(),r=(0,g.useState)(!0),i=r[0],o=r[1],a=eoo([e.snack.onClose,e.onClose]),s=(0,g.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,g.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,u=e.classes,c=e.Component,h=(0,g.useMemo)(function(){return eor(u)},[u]),d=l.open,f=l.SnackbarProps,p=l.TransitionComponent,v=l.TransitionProps,y=l.transitionDuration,x=l.disableWindowBlurListener,b=l.content,w=eiP(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),S=eiI({direction:"center"!==(t=w.anchorOrigin).horizontal?eon[t.horizontal]:eon[t.vertical],timeout:y},v),_=b;"function"==typeof _&&(_=_(w.id,w.message));var C=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return eiI({},t,((r={})[n]=eoo([e.snack[n],e[n]],w.id),r))},{});return m().createElement(eot,{in:i,onExited:C.onExited},m().createElement(eol,{open:d,id:w.id,disableWindowBlurListener:x,autoHideDuration:w.autoHideDuration,className:eim(eog.wrappedRoot,h.root,h["anchorOrigin"+eiz(w.anchorOrigin)]),SnackbarProps:f,onClose:a},m().createElement(p,Object.assign({},S,{appear:!0,in:d,onExit:C.onExit,onExited:s,onEnter:C.onEnter,onEntered:eoo([C.onEntered,function(){e.snack.requestClose&&a(null,"instructed",e.snack.id)}],w.id)}),_||m().createElement(void 0===c?eop:c,Object.assign({},w)))))},eov=20,eoy=6,eox=2,eob="."+ei7,eow=ei9({root:((l={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:ei0(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[eob]={padding:eoy+"px 0px",transition:"padding 300ms ease 0ms"},l.maxWidth="calc(100% - "+2*eov+"px)",l[eiN]={width:"100%",maxWidth:"calc(100% - 32px)"},l),rootDense:((u={})[eob]={padding:eox+"px 0px"},u),top:{top:eov-eoy+"px",flexDirection:"column"},bottom:{bottom:eov-eoy+"px",flexDirection:"column-reverse"},left:((c={left:eov+"px"})[eiB]={alignItems:"flex-start"},c[eiN]={left:"16px"},c),right:((h={right:eov+"px"})[eiB]={alignItems:"flex-end"},h[eiN]={right:"16px"},h),center:((d={left:"50%",transform:"translateX(-50%)"})[eiB]={alignItems:"center"},d)}),eoS=(0,g.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,r=e.anchorOrigin,i=e.dense,o=e.children,a=eim("notistack-SnackbarContainer",eow[r.vertical],eow[r.horizontal],eow.root,n.containerRoot,n["containerAnchorOrigin"+eiz(r)],i&&eow.rootDense);return m().createElement("div",{className:a},o)}),eo_=function(e){return!("string"==typeof e||(0,g.isValidElement)(e))},eoC=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 r,i=eo_(e)?e:t,o=eo_(e)?e.message:e,a=i.key,s=i.preventDuplicate,l=eiP(i,["key","preventDuplicate"]),u=eiV(a),c=u?a:new Date().getTime()+Math.random(),h=(r=n.props,function(e,t){return(void 0===t&&(t=!1),t)?eiI({},ei4[e],{},r[e],{},l[e]):"autoHideDuration"===e?ei8(l.autoHideDuration,r.autoHideDuration):"transitionDuration"===e?ei6(l.transitionDuration,r.transitionDuration):l[e]||r[e]||ei4[e]}),d=eiI({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:eim(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},r=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(eiI({},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?eiI({},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,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?eiI({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),eiI({},e,{open:!1})):eiI({},e,{requestClose:!0})});return eiI({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!eiV(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?eiI({},e,{entered:!0}):eiI({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?eiI({},e,{open:!1}):eiI({},e,{requestClose:!0}):eiI({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});eiV(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!eiV(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(eiI({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(eiR(n)),closeSnackbar:n.closeSnackbar.bind(eiR(n))}},n}return eiO(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,i=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,r=eiz(t.anchorOrigin),i=e[r]||[];return eiI({},e,((n={})[r]=[].concat(i,[t]),n))},{}),h=Object.keys(c).map(function(t){var n=c[t],r=n[0];return m().createElement(eoS,{key:t,dense:a,anchorOrigin:r.anchorOrigin,classes:u},n.map(function(t){return m().createElement(eom,{key:t.id,snack:t,classes:u,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:eoo([e.handleExitedSnack,e.props.onExited],t.id),onEntered:eoo([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return m().createElement(eiL.Provider,{value:t},i,r?(0,Sf.createPortal)(h,r):h)},eiA(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||ei4.maxSnack}}]),t}(g.Component);function eoM(){let{enqueueSnackbar:e,closeSnackbar:t}=(0,g.useContext)(eiL),n=eok(e,"error"),r=eok(e,"info"),i=eok(e,"warning"),o=eok(e,"success"),a=(0,g.useCallback)((e,t)=>n(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:i,successSnackbar:o,exceptionSnackbar:a}}function eok(e,t){return(0,g.useCallback)((n,r)=>e(n,{...r,variant:t}),[e,t])}function eoT(e,t){let n=e.palette.text?.primary??"#222",r={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 xZ()({echartsTheme:r,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)}function eoD(e){return{value:{pastDuration:e},display:`Last ${(0,Wb.formatDuration)((0,XU.Ib)(e),{delimiter:", "})}`}}var eoA=n(6385);let eoI=eoT((0,eoA.Z)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),eoO={chartsTheme:eoI,enablePinning:!1,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null},eoP={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,[`& .${A_.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${A_.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,[`& .${A_.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${A_.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,[`& .${A_.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${A_.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,[`& .${A_.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${A_.icon}`]:{color:e.palette.warning.main}},root:{["& ."+n(757).Z.root]:{textDecoration:"underline"}}}},eoR={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"},eoE={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"},eoL="#FFFFFF",eoN=e=>{let t=eoR["800"],n=eoR["300"];return"light"===e?{navigation:t,accent:n,primary:eoR["800"],secondary:eoR["700"],disabled:eoR["300"],link:eoE["500"],linkHover:eoE["600"]}:{navigation:t,accent:n,primary:eoL,secondary:eoR["50"],disabled:eoR["600"],link:eoE["400"],linkHover:eoE["500"]}},eoB=e=>{let t=eoE["150"],n="rgba(21, 23, 33, 0.75)";return"light"===e?{navigation:t,overlay:n,default:eoL,paper:eoR["50"],code:eoR["50"],tooltip:eoR["100"],lighter:eoR["50"],border:eoR["100"]}:{navigation:t,overlay:n,default:eoR["900"],paper:eoR["850"],code:eoR["800"],tooltip:eoR["600"],lighter:eoR["700"],border:eoR["600"]}},eoF=e=>"light"===e?{50:eoR["50"],100:eoR["100"],200:eoR["200"],300:eoR["300"],400:eoR["400"],500:eoR["500"],600:eoR["600"],700:eoR["700"],800:eoR["800"],900:eoR["900"],950:eoR["950"]}:{50:eoR["950"],100:eoR["900"],200:eoR["800"],300:eoR["700"],400:eoR["600"],500:eoR["500"],600:eoR["400"],700:eoR["300"],800:eoR["200"],900:eoR["100"],950:eoR["50"]},eoz=e=>"light"===e?{main:eoE["500"],dark:eoE["600"],light:eoE["50"]}:{main:eoE["400"],dark:eoE["800"],light:eoE["200"]},eoV=e=>"light"===e?{main:eoR["600"],dark:eoR["900"],light:eoR["100"]}:{main:eoL,dark:eoL,light:eoL},eoZ={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"},eoj={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"},eoH={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"},eoW={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"},eo$=e=>"light"===e?{main:eoW["500"],dark:eoW["600"],light:eoW["50"]}:{main:eoW["400"],dark:eoW["800"],light:eoW["300"]},eoG=e=>"light"===e?{main:eoZ["500"],dark:eoZ["700"],light:eoZ["50"]}:{main:eoZ["400"],dark:eoZ["800"],light:eoZ["300"]},eoU=e=>"light"===e?{main:eoj["500"],dark:eoj["700"],light:eoj["50"]}:{main:eoj["400"],dark:eoj["800"],light:eoj["300"]},eoq={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"}},eoY=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function eoX(e,t={}){return(0,eoA.Z)({palette:{mode:e,primary:eoz(e),secondary:eoV(e),grey:eoF(e),background:eoB(e),text:eoN(e),error:eo$(e),warning:eoU(e),info:eoz(e),success:eoG(e),common:{white:eoL,black:"#000000"},designSystem:{blue:eoE,green:eoZ,grey:eoR,orange:eoj,purple:eoH,red:eoW}},typography:eoq,mixins:{},components:eoK,...t})}let eoK={MuiAlert:eoP,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:{styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:eoY}},MuiDialog:{styleOverrides:{paper:eoY}},MuiPopover:{styleOverrides:{paper:eoY}}};var eoQ=n(4974),eoJ=n(2449),eo0=n(8418),eo1=n(7689);let eo2={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series"};function eo5({value:e,onChange:t}){return(0,p.jsxs)(x3,{direction:"row",children:[(0,p.jsx)(De.Z,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,p.jsx)(x8.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,p.jsx)($M.Z,{label:"Enabled",labelPlacement:"start",control:(0,p.jsx)(W6,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function eo3({value:e,onChange:t}){return(0,p.jsxs)(x3,{direction:"row",gap:1,alignItems:"center",children:[(0,p.jsx)(De.Z,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,p.jsx)(x8.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,p.jsx)(Tw,{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,p.jsx)($M.Z,{label:"Enabled",labelPlacement:"start",control:(0,p.jsx)(W6,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function eo4({value:e,onChange:t}){return(0,p.jsxs)(x3,{direction:"row",children:[(0,p.jsx)(Tw,{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,p.jsx)($M.Z,{label:"Enabled",labelPlacement:"start",control:(0,p.jsx)(W6,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function eo8({value:e,onChange:t}){return(0,p.jsx)(x3,{direction:"row",children:(0,p.jsx)($M.Z,{label:"Enabled",labelPlacement:"start",control:(0,p.jsx)(W6,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function eo6({value:e,onChange:t,...n}){return(0,p.jsxs)(x3,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,p.jsxs)(Tw,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,p.jsx)(D5.Z,{value:"JoinByColumnValue",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Join by column value"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,p.jsx)(D5.Z,{value:"MergeColumns",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Merge columns"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,p.jsx)(D5.Z,{value:"MergeIndexedColumns",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Merge indexed columns"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,p.jsx)(D5.Z,{value:"MergeSeries",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Merge series"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,p.jsx)(eo5,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,p.jsx)(eo3,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,p.jsx)(eo4,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,p.jsx)(eo8,{value:e,onChange:t})]})}function eo9({index:e,value:t,isCollapsed:n,onChange:r,onCollapse:i,onDelete:o,...a}){return(0,p.jsxs)(x3,{...a,children:[(0,p.jsxs)(x3,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,p.jsxs)(x3,{direction:"row",gap:1,children:[(0,p.jsx)(x4.Z,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>i(!n),children:n?(0,p.jsx)(eoQ.default,{}):(0,p.jsx)(eoJ.default,{})}),(0,p.jsx)(kz.Z,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,p.jsx)("span",{children:(0,p.jsx)("strong",{children:eo2[t.kind]})}):(0,p.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,p.jsxs)(x3,{direction:"row",gap:1,children:[n&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T3.Z,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,p.jsx)(x4.Z,{size:"small",sx:{marginLeft:"auto"},onClick:function(){r({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,p.jsx)(eo0.default,{}):(0,p.jsx)(eo1.default,{})})}),(0,p.jsx)(AV.Z,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,p.jsx)(T3.Z,{title:"Remove transformation",placement:"top",children:(0,p.jsx)(x4.Z,{size:"small",sx:{marginLeft:"auto"},onClick:o,children:(0,p.jsx)(Ut.default,{})})})]})]}),!n&&(0,p.jsx)(eo6,{value:t,onChange:r})]})}function eo7({value:e,onChange:t,...n}){let[r,i]=(0,g.useState)(e.map(()=>!0));return(0,p.jsxs)(x3,{gap:1,...n,children:[e.map((n,o)=>(0,p.jsx)(eo9,{index:o,value:n,isCollapsed:r[o]??!0,onChange:n=>(function(n,r){let i=[...e];i[n]=r,t(i)})(o,n),onDelete:()=>(function(n){let r=[...e];r.splice(n,1),t(r),i(e=>(e.splice(n,1),[...e]))})(o),onCollapse:e=>{i(t=>(t[o]=e,[...t]))}},o)),(0,p.jsx)(L.Z,{variant:"contained",startIcon:(0,p.jsx)(GS.default,{}),sx:{marginTop:1},onClick:function(){let n=[...e];n.push({kind:"",spec:{}}),t(n),i(e=>(e.push(!1),[...e]))},children:"Add Transformation"})]})}function eae(e){let{value:t,onChange:n,timeOptions:r,height:i}=e,o=(0,g.useMemo)(()=>{if(t&&!r.some(e=>e.value.pastDuration===t))return(0,p.jsx)(D5.Z,{value:t,children:t})},[r,t]);return(0,p.jsx)(T0.Z,{children:(0,p.jsx)(vL.Z,{children:(0,p.jsxs)(X$.Z,{id:"refreshInterval",value:t,onChange:e=>{n(e.target.value)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":i?{lineHeight:i,paddingY:0}:{}},children:[r.map((e,t)=>(0,p.jsx)(D5.Z,{value:e.value.pastDuration,children:e.display},t)),o]})})})}var eat=2*Math.PI,ean=Math.PI/180;function ear(e,t){return lI(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function eai(e,t){var n,r,i=ear(e,t),o=e.get("center"),a=e.get("radius");ts(a)||(a=[0,a]);var s=iM(i.width,t.getWidth()),l=iM(i.height,t.getHeight()),u=Math.min(s,l),c=iM(a[0],u/2),h=iM(a[1],u/2),d=e.coordinateSystem;if(d){var f=d.dataToPoint(o);n=f[0]||0,r=f[1]||0}else ts(o)||(o=[o,o]),n=iM(o[0],s)+i.x,r=iM(o[1],l)+i.y;return{cx:n,cy:r,r0:c,r:h}}function eao(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension("value"),i=ear(e,n),o=eai(e,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-e.get("startAngle")*ean,h=e.get("endAngle"),d=e.get("padAngle")*ean;h="auto"===h?c-eat:-h*ean;var f=e.get("minAngle")*ean+d,p=0;t.each(r,function(e){!isNaN(e)&&p++});var g=t.getSum(r),m=Math.PI/(g||p)*2,v=e.get("clockwise"),y=e.get("roseType"),x=e.get("stillShowZeroSum"),b=t.getDataExtent(r);b[0]=0;var w=v?1:-1,S=[c,h],_=w*d/2;o3(S,!v),c=S[0];var C=Math.abs((h=S[1])-c),M=C,k=0,T=c;if(t.setLayout({viewRect:i,r:l}),t.each(r,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}(r="area"!==y?0===g&&x?m:e*m:C/p)<f?(r=f,M-=f):k+=e;var r,i=T+w*r,o=0,c=0;d>r?c=o=T+w*r/2:(o=T+_,c=i-_),t.setItemLayout(n,{angle:r,startAngle:o,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?iC(e,b,[u,l]):l}),T=i}),M<eat&&p){if(M<=.001){var D=C/p;t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n);r.angle=D;var i=0,o=0;D<d?o=i=c+w*(n+.5)*D:(i=c+w*n*D+_,o=c+w*(n+1)*D-_),r.startAngle=i,r.endAngle=o}})}else m=M/k,T=c,t.each(r,function(e,n){if(!isNaN(e)){var r=t.getItemLayout(n),i=r.angle===f?f:e*m,o=0,a=0;i<d?a=o=T+w*i/2:(o=T+_,a=T+w*i-_),r.startAngle=o,r.endAngle=a,T+=w*i}})}})}function eaa(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=Math.sqrt(l*l+u*u),h=((i-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,f=a[1]=t+h*u;return Math.sqrt((d-i)*(d-i)+(f-o)*(f-o))}o4.CMD;var eas=new ng,eal=new ng,eau=new ng,eac=new ng,eah=new ng,ead=[],eaf=new ng;function eap(e,t,n,r){var i="normal"===n,o=i?e:e.ensureState(n);o.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?e.useStyle(s):o.style=s}function eag(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=tZ(r[0],r[1]),o=tZ(r[1],r[2]);if(!i||!o){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var a=Math.min(i,o)*n,s=tH([],r[1],r[0],a/i),l=tH([],r[1],r[2],a/o),u=tH([],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],r[2][0],r[2][1])}else for(var c=1;c<r.length;c++)e.lineTo(r[c][0],r[c][1])}}var eam=Math.PI/180;function eav(e,t,n,r,i,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,r,i,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=[],f=0,p=0;p<u;p++){var g=e[p],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),f+=v,c=m[t]+m[n]}f>0&&o&&S(-f/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]-r,l=i-x.rect[t]-x.rect[n]}function w(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,u);var i=r+e;i<0&&_(-i*n,1)}else _(-e*n,1)}}function S(n,r,i){0!==n&&(h=!0);for(var o=r;o<i;o++){var a=e[o],s=a.rect;s[t]+=n,a.label[t]+=n}}function _(r,i){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(r)/a,i);if(r>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)),r=0;r<u-1;r++)if(t>0?S(n,0,r+1):S(-n,u-r-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*i,d=r+l.len,p=Math.abs(h)<d?Math.sqrt(c*c/(1-h*h/d/d)):d;u.rB=p,u.maxY=c}u.list.push(l)}f(o),f(a)}(e)}function f(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=r+l.len,h=t+(Math.sqrt(c*c*(1-Math.abs(u*u/a)))+l.len2)*i,d=h-l.label.x,f=l.targetTextWidth-d*i;eay(l,f,!0),l.label.x=h}}}function eay(e,t,n){if(void 0===n&&(n=!1),null==e.labelStyleWidth){var r=e.label,i=r.style,o=e.rect,a=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=o.width+(a?0:l);if(t<c||n){var h=o.height;if(u&&u.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-l);var d=r.getBoundingRect();r.setStyle("width",Math.ceil(d.width)),r.setStyle("backgroundColor",a)}else{var f=t-l,p=t<c?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle("width",p)}var g=r.getBoundingRect();o.width=g.width;var m=(r.style.margin||0)+2.1;o.height=g.height+m,o.y-=(o.height-h)/2}}}function eax(e){return"center"===e.position}var eab=function(e){function t(t,n,r){var i=e.call(this)||this;i.z2=2;var o=new aB;return i.setTextContent(o),i.updateData(t,n,r,!0),i}return eF(t,e),t.prototype.updateData=function(e,t,n,r){var i=e.hostModel,o=e.getItemModel(t),a=o.getModel("emphasis"),s=e.getItemLayout(t),l=e4(p1(o.getModel("itemStyle"),s,!0),s);if(isNaN(l.startAngle)){this.setShape(l);return}if(r){this.setShape(l);var u=i.getShallow("animationType");i.ecModel.ssr?(sS(this,{scaleX:0,scaleY:0},i,{dataIndex:t,isFrom:!0}),this.originX=l.cx,this.originY=l.cy):"scale"===u?(this.shape.r=s.r0,sS(this,{shape:{r:s.r}},i,t)):null!=n?(this.setShape({startAngle:n,endAngle:n}),sS(this,{shape:{startAngle:s.startAngle,endAngle:s.endAngle}},i,t)):(this.shape.endAngle=s.startAngle,sw(this,{shape:{endAngle:s.endAngle}},i,t))}else sT(this),sw(this,{shape:l},i,t);this.useStyle(e.getItemVisual(t,"style")),sf(this,o);var c=(s.startAngle+s.endAngle)/2,h=i.get("selectedOffset"),d=Math.cos(c)*h,f=Math.sin(c)*h,p=o.getShallow("cursor");p&&this.attr("cursor",p),this._updateLabel(i,e,t),this.ensureState("emphasis").shape=e4({r:s.r+(a.get("scale")&&a.get("scaleSize")||0)},p1(a.getModel("itemStyle"),s)),e4(this.ensureState("select"),{x:d,y:f,shape:p1(o.getModel(["select","itemStyle"]),s)}),e4(this.ensureState("blur"),{shape:p1(o.getModel(["blur","itemStyle"]),s)});var g=this.getTextGuideLine(),m=this.getTextContent();g&&e4(g.ensureState("select"),{x:d,y:f}),e4(m.ensureState("select"),{x:d,y:f}),sc(this,a.get("focus"),a.get("blurScope"),a.get("disabled"))},t.prototype._updateLabel=function(e,t,n){var r=t.getItemModel(n),i=r.getModel("labelLine"),o=t.getItemVisual(n,"style"),a=o&&o.fill,s=o&&o.opacity;sO(this,sP(r),{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 hy,this.setTextGuideLine(c)),function(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var o=t.normal,a=o.get("show"),s=i.ignore,l=0;l<a$.length;l++){var u=a$[l],c=t[u],h="normal"===u;if(c){var d=c.get("show");if((h?s:ty(i.states[u]&&i.states[u].ignore,s))||!ty(d,a)){var f=h?r:r&&r.states[u];f&&(f.ignore=!0),r&&eap(r,!0,u,c);continue}!r&&(r=new hy,e.setTextGuideLine(r),h||!s&&a||eap(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),eap(r,!1,u,c)}}if(r){e8(r.style,n),r.style.fill=null;var p=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=p||!1,r.buildPath=eag}}(this,function(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<aW.length;r++){var i=aW[r];n[i]=e.getModel([i,t])}return n}(r),{stroke:a,opacity:tx(i.get(["lineStyle","opacity"]),s,1)})}},t}(hl),eaw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return eF(t,e),t.prototype.render=function(e,t,n,r){var i,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&&(i=l.startAngle)}if(this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===o.count()&&e.get("showEmptyCircle")){var c=new hl({shape:eai(e,n)});c.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=c,s.add(c)}o.diff(a).add(function(e){var t=new eab(o,e,i);o.setItemGraphicEl(e,t),s.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(o,e,i),n.off("click"),s.add(n),o.setItemGraphicEl(e,n)}).remove(function(t){sk(a.getItemGraphicEl(t),e,t)}).execute(),function(e){var t,n,r=e.getData(),i=[],o=!1,a=(e.get("minShowLabelAngle")||0)*eam,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,h=s.y,d=s.height;function f(e){e.ignore=!0}r.each(function(e){var s,h,d,p,g=r.getItemGraphicEl(e),m=g.shape,v=g.getTextContent(),y=g.getTextGuideLine(),x=r.getItemModel(e),b=x.getModel("label"),w=b.get("position")||x.get(["emphasis","label","position"]),S=b.get("distanceToLabelLine"),_=b.get("alignTo"),C=iM(b.get("edgeDistance"),u),M=b.get("bleedMargin"),k=x.getModel("labelLine"),T=k.get("length");T=iM(T,u);var D=k.get("length2");if(D=iM(D,u),Math.abs(m.endAngle-m.startAngle)<a){te(v.states,f),v.ignore=!0,y&&(te(y.states,f),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 A=(m.startAngle+m.endAngle)/2,I=Math.cos(A),O=Math.sin(A);t=m.cx,n=m.cy;var P="inside"===w||"inner"===w;if("center"===w)s=m.cx,h=m.cy,p="center";else{var R=(P?(m.r+m.r0)/2*I:m.r*I)+t,E=(P?(m.r+m.r0)/2*O:m.r*O)+n;if(s=R+3*I,h=E+3*O,!P){var L=R+I*(T+l-m.r),N=E+O*(T+l-m.r),B=L+(I<0?-1:1)*D;s="edge"===_?I<0?c+C:c+u-C:B+(I<0?-S:S),h=N,d=[[R,E],[L,N],[B,N]]}p=P?"center":"edge"===_?I>0?"right":"left":I>0?"left":"right"}var F=Math.PI,z=0,V=b.get("rotate");if(th(V))z=F/180*V;else if("center"===w)z=0;else if("radial"===V||!0===V)z=I<0?-A+F:-A;else if("tangential"===V&&"outside"!==w&&"outer"!==w){var Z=Math.atan2(I,O);Z<0&&(Z=2*F+Z),O>0&&(Z=F+Z),z=Z-F}if(o=!!z,v.x=s,v.y=h,v.rotation=z,v.setStyle({verticalAlign:"middle"}),P){v.setStyle({align:p});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,i.push({label:v,labelLine:y,position:w,len:T,len2:D,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new ng(I,O),linePoints:d,textAlign:p,labelDistance:S,labelAlignTo:_,edgeDistance:C,bleedMargin:M,rect:H,unconstrainedWidth:H.width,labelStyleWidth:v.style.width})}g.setTextConfig({inside:P})}}),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,r,i,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++){var f=e[d].label;!eax(e[d])&&(f.x<t?(c=Math.min(c,f.x),l.push(e[d])):(h=Math.max(h,f.x),u.push(e[d])))}for(var d=0;d<e.length;d++){var p=e[d];if(!eax(p)&&p.linePoints){if(null!=p.labelStyleWidth)continue;var f=p.label,g=p.linePoints,m=void 0;m="edge"===p.labelAlignTo?f.x<t?g[2][0]-p.labelDistance-a-p.edgeDistance:a+i-p.edgeDistance-g[2][0]-p.labelDistance:"labelLine"===p.labelAlignTo?f.x<t?c-a-p.bleedMargin:a+i-h-p.bleedMargin:f.x<t?f.x-a-p.bleedMargin:a+i-f.x-p.bleedMargin,p.targetTextWidth=m,eay(p,m)}}eav(u,t,n,r,1,i,o,a,s,h),eav(l,t,n,r,-1,i,o,a,s,c);for(var d=0;d<e.length;d++){var p=e[d];if(!eax(p)&&p.linePoints){var f=p.label,g=p.linePoints,v="edge"===p.labelAlignTo,y=f.style.padding,x=y?y[1]+y[3]:0,b=f.style.backgroundColor?0:x,w=p.rect.width+b,S=g[1][0]-g[2][0];v?f.x<t?g[2][0]=a+p.edgeDistance+w+p.labelDistance:g[2][0]=a+i-p.edgeDistance-w-p.labelDistance:(f.x<t?g[2][0]=f.x+p.labelDistance:g[2][0]=f.x-p.labelDistance,g[1][0]=g[2][0]+S),g[1][1]=g[2][1]=f.y}}}(i,t,n,l,u,d,c,h);for(var p=0;p<i.length;p++){var g=i[p],m=g.label,v=g.labelLine,y=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),y&&(te(m.states,f),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?(te(v.states,f),v.ignore=!0):(function(e,t){if(t<=180&&t>0){t=t/180*Math.PI,eas.fromArray(e[0]),eal.fromArray(e[1]),eau.fromArray(e[2]),ng.sub(eac,eas,eal),ng.sub(eah,eau,eal);var n=eac.len(),r=eah.len();if(!(n<.001)&&!(r<.001)&&(eac.scale(1/n),eah.scale(1/r),Math.cos(t)<eac.dot(eah))){var i=eaa(eal.x,eal.y,eau.x,eau.y,eas.x,eas.y,ead,!1);eaf.fromArray(ead),eaf.scaleAndAdd(eah,i/Math.tan(Math.PI-t));var o=eau.x!==eal.x?(eaf.x-eal.x)/(eau.x-eal.x):(eaf.y-eal.y)/(eau.y-eal.y);if(isNaN(o))return;o<0?ng.copy(eaf,eal):o>1&&ng.copy(eaf,eau),eaf.toArray(e[1])}}}(b,g.minTurnAngle),function(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,eas.fromArray(e[0]),eal.fromArray(e[1]),eau.fromArray(e[2]),ng.sub(eac,eal,eas),ng.sub(eah,eau,eal);var r=eac.len(),i=eah.len();if(!(r<.001)&&!(i<.001)&&(eac.scale(1/r),eah.scale(1/i),eac.dot(t)<Math.cos(n))){var o=eaa(eal.x,eal.y,eau.x,eau.y,eas.x,eas.y,ead,!1);eaf.fromArray(ead);var a=Math.PI/2,s=a+Math.acos(eah.dot(t))-n;if(s>=a)ng.copy(eaf,eau);else{eaf.scaleAndAdd(eah,o/Math.tan(Math.PI/2-s));var l=eau.x!==eal.x?(eaf.x-eal.x)/(eau.x-eal.x):(eaf.y-eal.y)/(eau.y-eal.y);if(isNaN(l))return;l<0?ng.copy(eaf,eal):l>1&&ng.copy(eaf,eau)}eaf.toArray(e[1])}}}(b,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new ng(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 r=e[0]-n.cx,i=e[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},t.type="pie",t}(du),eaS=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}(),ea_=iQ(),eaC=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return eF(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new eaS(to(this.getData,this),to(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return AG(this,{coordDimensions:["value"],encodeDefaulter:ta(lK,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=ea_(n),i=r.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(e){o.push(e)}),i=r.seats=function(e,t){var n=tn(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(0===n)return[];for(var r=Math.pow(10,t),i=tt(e,function(e){return(isNaN(e)?0:e)/n*r*100}),o=100*r,a=tt(i,function(e){return Math.floor(e)}),s=tn(a,function(e,t){return e+t},0),l=tt(i,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 tt(a,function(e){return e/r})}(o,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=i[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){iH(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}(ck);function eaM(e){let{width:t,height:n,data:r}=e,i=vz(),o={title:{text:"Referer of a Website",subtext:"Fake Data",left:"center"},tooltip:{trigger:"item",formatter:"{a} <br/>{b} : {c} ({d}%)"},axisLabel:{overflow:"truncate",width:t/3},series:[{name:"Access From",type:"pie",radius:"55%",label:!1,center:["40%","50%"],data:r,emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}],itemStyle:{borderRadius:2,color:i.echartsTheme[0]}};return(0,p.jsx)(vL.Z,{style:{width:t,height:n},sx:{overflow:"auto"},children:(0,p.jsx)(xz,{sx:{minHeight:n,height:r?16*r.length:"100%"},option:o,theme:i.echartsTheme})})}pr([function(e){var t;e.registerChartView(eaw),e.registerSeriesModel(eaC),t=e.registerAction,te([["pieToggleSelect","toggleSelect"],["pieSelect","select"],["pieUnSelect","unselect"]],function(e){t(e[0],function(t,n,r){var i,o;t=e4({},t),r.dispatchAction(e4(t,{type:e[1],seriesIndex:(i=t,o=[],n.eachComponent({mainType:"series",subType:"pie",query:i},function(e){o.push(e.seriesIndex)}),o)}))})}),e.registerLayout(ta(eao,"pie")),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].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"),r=n.get(t,e);return!th(r)||!!isNaN(r)||!(r<0)})}})},vr,va,vu,vI,vE]);var eak=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=eH.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,o){var a=this._getBrush(),s=this._getGradient(i,"inRange"),l=this._getGradient(i,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var f=0;f<d;++f){var p=e[f],g=p[0],m=p[1],v=r(p[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=eH.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,a=0;a<256;a++)e[t](a/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},e}();function eaT(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var eaD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.render=function(e,t,n){t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var r,i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):eaT(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(eaT(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){da(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,i){var o,a,s,l,u=e.coordinateSystem,c=pX(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 f=this.group,p=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=sP(e),b=e.getModel("emphasis"),w=b.get("focus"),S=b.get("blurScope"),_=b.get("disabled"),C=c?[p.mapDimension("x"),p.mapDimension("y"),p.mapDimension("value")]:[p.mapDimension("time"),p.mapDimension("value")],M=n;M<r;M++){var k=void 0,T=p.getItemVisual(M,"style");if(c){var D=p.get(C[0],M),A=p.get(C[1],M);if(isNaN(p.get(C[2],M))||isNaN(D)||isNaN(A)||D<s[0]||D>s[1]||A<l[0]||A>l[1])continue;var I=u.dataToPoint([D,A]);k=new a_({shape:{x:I[0]-o/2,y:I[1]-a/2,width:o,height:a},style:T})}else{if(isNaN(p.get(C[1],M)))continue;k=new a_({z2:1,shape:u.dataToRect([p.get(C[0],M)]).contentShape,style:T})}if(p.hasItemOption){var O=p.getItemModel(M),P=O.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),m=O.getModel(["blur","itemStyle"]).getItemStyle(),v=O.getModel(["select","itemStyle"]).getItemStyle(),y=O.get(["itemStyle","borderRadius"]),w=P.get("focus"),S=P.get("blurScope"),_=P.get("disabled"),x=sP(O)}k.shape.r=y;var R=e.getRawValue(M),E="-";R&&null!=R[2]&&(E=R[2]+""),sO(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,sc(k,w,S,_),k.incremental=i,i&&(k.states.emphasis.hoverLayer=!0),f.add(k),p.setItemGraphicEl(M,k),this._progressiveEls&&this._progressiveEls.push(k)}},t.prototype._renderOnGeo=function(e,t,n,r){var i,o,a,s,l,u,c,h=n.targetVisuals.inRange,d=n.targetVisuals.outOfRange,f=t.getData(),p=this._hmLayer||this._hmLayer||new eak;p.blurSize=t.get("blurSize"),p.pointSize=t.get("pointSize"),p.minOpacity=t.get("minOpacity"),p.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,r.getWidth()),b=Math.min(g.height+g.y,r.getHeight()),w=x-v,S=b-y,_=[f.mapDimension("lng"),f.mapDimension("lat"),f.mapDimension("value")],C=f.mapArray(_,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=v,i[1]-=y,i.push(r),i}),M=n.getExtent(),k="visualMap.continuous"===n.type?(i=n.option.range,o=M[1]-M[0],i=[(i[0]-M[0])/o,(i[1]-M[0])/o],function(e){return e>=i[0]&&e<=i[1]}):(a=n.getPieceList(),s=n.option.selected,l=M[1]-M[0],u=(a=tt(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]});p.update(C,w,S,h.color.getNormalizer(),{inRange:h.color.getColorMapper(),outOfRange:d.color.getColorMapper()},k);var T=new ag({style:{width:w,height:S,x:v,y:y,image:p.canvas},silent:!0});this.group.add(T)},t.type="heatmap",t}(du),eaA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.getInitialData=function(e,t){return pj(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=un.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}(ck),eaI={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 eaO={get:function(e,t,n){var r=e5((eaI[e]||{})[t]);return n&&ts(r)?r[r.length-1]:r}};var eaP=function(){function e(t){var n,r,i=t.mappingMethod,o=t.type,a=this.option=e5(t);this.type=o,this.mappingMethod=i,this._normalizeData=eaj[i];var s=e.visualHandlers[o];this.applyVisual=s.applyVisual,this.getColorMapper=s.getColorMapper,this._normalizedToVisual=s._normalizedToVisual[i],"piecewise"===i?(eaR(a),r=(n=a).pieceList,n.hasSpecialVisual=!1,te(r,function(e,t){e.originIndex=t,null!=e.visual&&(n.hasSpecialVisual=!0)})):"category"===i?a.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(te(t,function(e,t){n[e]=t}),!ts(r)){var i=[];td(r)?te(r,function(e,t){var r=n[t];i[null!=r?r:-1]=e}):i[-1]=r,r=eaZ(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(a):eaR(a,!0):(tS("linear"!==i||a.dataExtent),eaR(a))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return to(this._normalizeData,this)},e.listVisualTypes=function(){return ti(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){td(e)?te(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=ts(t)?[]:td(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var a=n.call(r,e,t);i?o=a:o[t]=a}),o},e.retrieveVisuals=function(t){var n,r={};return t&&te(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)}),n?r:null},e.prepareVisualTypes=function(e){if(ts(e))e=e.slice();else{if(!td(e))return[];var t=[];te(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 r,i=1/0,o=0,a=t.length;o<a;o++){var s=t[o].value;if(null!=s){if(s===e||tu(s)&&s===e+"")return o;n&&_(s,o)}}for(var o=0,a=t.length;o<a;o++){var l,u,c,h,d,f,p,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],f=e,h?d<=f:d<f)return o}else{if(p=S[0],g=w[0],m=e,(p?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:r;function _(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:eaN("color"),getColorMapper:function(){var e=this.option;return to("category"===e.mappingMethod?function(e,t){return t||(e=this._normalizeData(e)),eaB.call(this,e)}:function(t,n,r){var i=!!r;return n||(t=this._normalizeData(t)),r=ry(t,e.parsedVisual,r),i?r:rw(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return rw(ry(e,this.option.parsedVisual),"rgba")},category:eaB,piecewise:function(e,t){var n=eaV.call(this,t);return null==n&&(n=rw(ry(e,this.option.parsedVisual),"rgba")),n},fixed:eaF}},colorHue:eaE(function(e,t){return rx(e,t)}),colorSaturation:eaE(function(e,t){return rx(e,null,t)}),colorLightness:eaE(function(e,t){return rx(e,null,null,t)}),colorAlpha:eaE(function(e,t){return rb(e,t)}),decal:{applyVisual:eaN("decal"),_normalizedToVisual:{linear:null,category:eaB,piecewise:null,fixed:null}},opacity:{applyVisual:eaN("opacity"),_normalizedToVisual:eaz([0,1])},liftZ:{applyVisual:eaN("liftZ"),_normalizedToVisual:{linear:eaF,category:eaF,piecewise:eaF,fixed:eaF}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:eaL,category:eaB,piecewise:function(e,t){var n=eaV.call(this,t);return null==n&&(n=eaL.call(this,e)),n},fixed:eaF}},symbolSize:{applyVisual:eaN("symbolSize"),_normalizedToVisual:eaz([0,1])}},e}();function eaR(e,t){var n=e.visual,r=[];td(n)?te(n,function(e){r.push(e)}):null!=n&&r.push(n),t||1!==r.length||({color:1,symbol:1}).hasOwnProperty(e.type)||(r[1]=r[0]),eaZ(e,r)}function eaE(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:eaz([0,1])}}function eaL(e){var t=this.option.visual;return t[Math.round(iC(e,[0,1],[0,t.length-1],!0))]||{}}function eaN(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function eaB(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function eaF(){return this.option.visual[0]}function eaz(e){return{linear:function(t){return iC(t,e,this.option.visual,!0)},category:eaB,piecewise:function(t,n){var r=eaV.call(this,n);return null==r&&(r=iC(t,e,this.option.visual,!0)),r},fixed:eaF}}function eaV(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=eaP.findPieceIndex(e,n),i=n[r];if(i&&i.visual)return i.visual[this.type]}}function eaZ(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=tt(t,function(e){return rg(e)||[0,0,0,1]})),t}var eaj={linear:function(e){return iC(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=eaP.findPieceIndex(e,t,!0);if(null!=n)return iC(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:tP};function eaH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function eaW(e,t,n){var r={};return te(t,function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);te(e[t],function(e,r){if(eaP.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new eaP(i),"opacity"===r&&((i=e5(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new eaP(i))}})}),r}var ea$=eaP.mapVisual,eaG=eaP.eachVisual,eaU=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 eF(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n,r,i=this.option;t||(te(n=this.replacableOptionKeys,function(t){e.hasOwnProperty(t)&&eaH(e[t])&&(r=!0)}),r&&te(n,function(t){e.hasOwnProperty(t)&&eaH(e[t])?i[t]=e5(e[t]):delete i[t]})),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=to(e,this),this.controllerVisuals=eaW(this.option.controller,t,e),this.targetVisuals=eaW(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=ij(e),t},t.prototype.eachTargetSeries=function(e,t){te(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},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 r,i=this.option,o=i.precision,a=this.dataBound,s=i.formatter;n=n||["<",">"],ts(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);if(tu(s))return s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l);if(tl(s))return r?s(e[0],e[1]):s(e);if(!r)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=iT([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,r=n.length-1;r>=0;r--){var i=n[r],o=e.getDimensionInfo(i);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},r=t.target||(t.target={}),i=t.controller||(t.controller={});e3(r,n),e3(i,n);var o=this.isCategory();function a(n){ts(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}a.call(this,r),a.call(this,i),(function(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},te(r,function(e,t){if(eaP.isValidType(t)){var n=eaO.get(t,"inactive",o);null==n||(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}}))}).call(this,r,"inRange","outOfRange"),(function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";te(this.stateList,function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:o?r:[r]}),null==l.symbol&&(l.symbol=t&&e5(t)||(o?i:[i])),null==l.symbolSize&&(l.symbolSize=n&&e5(n)||(o?s[0]:[s[0],s[0]])),l.symbol=ea$(l.symbol,function(e){return"none"===e?i:e});var u=l.symbolSize;if(null!=u){var c=-1/0;eaG(u,function(e){e>c&&(c=e)}),l.symbolSize=ea$(u,function(e){return iC(e,[0,c],[0,s[0]],!0)})}},this)}).call(this,i)},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}(lN),eaq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(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):ts(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),te(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=iT((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 r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=eaY(this,"outOfRange",this.getExtent()),n=eaY(this,"inRange",this.option.range.slice()),r=[];function i(t,n){r.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]&&i(t[a],"outOfRange");for(var u=1;o<s;o++,u=0)u&&r.length&&i(n[o],"outOfRange"),i(n[o],"inRange");for(var u=1;a<l;a++)(!n.length||n[n.length-1]<t[a])&&(u&&(r.length&&i(r[r.length-1].value,"outOfRange"),u=0),i(t[a],"outOfRange"));var c=r.length;return{stops:r,outerColors:[c?r[0].color:"transparent",c?r[c-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=s1(eaU.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}(eaU);function eaY(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,i=n[0],o=[],a=0;a<=200&&i<n[1];a++)o.push(i),i+=r;return o.push(n[1]),o}var eaX=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 eF(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){if(this.visualMapModel=e,!1===e.get("show")){this.group.removeAll();return}this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=tw(t.get("padding")||0),r=e.getBoundingRect();e.add(new a_({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.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 r=(n=n||{}).forceState,i=this.visualMapModel,o={};if("color"===t){var a=i.get("contentColor");o.color=a}function s(e){return o[e]}function l(e,t){o[e]=t}var u=i.controllerVisuals[r||i.getValueState(e)];return te(eaP.prepareVisualTypes(u),function(r){var i=u[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",i=u.__alphaForOpacity),eaP.dependsOn(r,t)&&i&&i.applyVisual(e,s,l)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api;lO(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},t.prototype.doRender=function(e,t,n,r){},t.type="visualMap",t}(cE),eaK=[["left","right","width"],["top","bottom","height"]];function eaQ(e,t,n){var r=e.option,i=r.align;if(null!=i&&"auto"!==i)return i;for(var o={width:t.getWidth(),height:t.getHeight()},a=+("horizontal"===r.orient),s=eaK[a],l=[0,null,10],u={},c=0;c<3;c++)u[eaK[1-a][c]]=l[c],u[s[c]]=2===c?n[0]:r[s[c]];var h=[["x","width",3],["y","height",0]][a],d=lI(u,o,r.padding);return s[(d.margin[h[2]]||0)+d[h[0]]+.5*d[h[1]]<.5*o[h[1]]?0:1]}function eaJ(e,t){return te(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var ea0=Math.min,ea1=Math.max,ea2=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 eF(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=to(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=to(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&"selectDataRange"===r.type&&r.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 r=t[1-n];r=null!=r?r+"":"";var i=this.visualMapModel,o=i.get("textGap"),a=i.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 aB({style:sR(h,{x:l[0],y:l[1],verticalAlign:"horizontal"===c?"middle":u,align:"horizontal"===c?u:"center",text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,o=this._useHandle,a=eaQ(t,this.api,r),s=n.mainGroup=this._createBarGroup(a),l=new ix;s.add(l),l.add(n.outOfRange=ea5()),l.add(n.inRange=ea5(null,o?ea4(this._orient):null,to(this._dragHandle,this,"all",!1),to(this._dragHandle,this,"all",!0))),l.setClipPath(new a_({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var u=t.textStyleModel.getTextRect("国"),c=ea1(u.width,u.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,c,i),this._createHandle(t,s,1,r,c,i)),this._createIndicator(t,s,r,c,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,o){var a=to(this._dragHandle,this,n,!1),s=to(this._dragHandle,this,n,!0),l=is(e.get("handleSize"),r[0]),u=ft(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),c=ea4(this._orient);u.attr({cursor:c,draggable:!0,drift:a,ondragend:s,onmousemove:function(e){ni(e.event)}}),u.x=r[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(),sp(u,!0),t.add(u);var h=new aB({cursor:c,draggable:!0,drift:a,onmousemove:function(e){ni(e.event)},ondragend:s,style:sR(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],f=this._shapes;f.handleThumbs[n]=u,f.handleLabelPoints[n]=d,f.handleLabels[n]=h},t.prototype._createIndicator=function(e,t,n,r,i){var o=is(e.get("indicatorSize"),n[0]),a=ft(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 ag){var l=a.style;a.useStyle(e4({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 aB({silent:!0,invisible:!0,style:sR(this.visualMapModel.textStyleModel,{x:0,y:0,text:""})});this.group.add(u);var c=[("horizontal"===i?r/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,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[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():ea3(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[iC(t[0],n,r,!0),iC(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];yJ(t,r,i,e,0);var o=n.getExtent();this._dataInterval=[iC(r[0],i,o,!0),iC(r[1],i,o,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],o=e?i:this._handleEnds,a=this._createBarVisual(this._dataInterval,n,o,"inRange"),s=this._createBarVisual(n,n,i,"outOfRange");r.inRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),this._updateHandle(o,a)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,i),a=[this.getControllerVisual(e[0],"symbolSize",i),this.getControllerVisual(e[1],"symbolSize",i)],s=this._createBarPoints(n,a);return{barColor:new hR(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var i=1;i<100;i++){var o=e[0]+r*i;if(o>e[1])break;n.push({color:this.getControllerVisual(o,"color",t),offset:i/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 ix("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,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,a=r.itemSize,s=r.getExtent();te([0,1],function(l){var u=i[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=iC(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=h4(n.handleLabelPoints[l],h3(u,this.group));o[l].setStyle({x:d[0],y:d[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,o=i.getExtent(),a=i.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=iC(e,o,s,!0),f=a[0]-h/2,p={x:u.x,y:u.y};u.y=d,u.x=f;var g=h4(l.indicatorLabelPoint,h3(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||"")+i.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var x={x:f,y:d,style:{fill:c}},b={style:{x:g[0],y:g[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=p.x,u.y=p.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,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=ea0(ea1(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[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,r=n.itemSize;if(n.option.hoverLink){var i,o,a,s,l,u=[0,r[1]],c=n.getExtent();e=ea0(ea1(u[0],e),u[1]);var h=(i=n,o=c,a=u,s=6,(l=i.get("hoverLinkDataSize"))&&(s=iC(l,o,a,!0)/2),s),d=[e-h,e+h],f=iC(e,u,c,!0),p=[iC(d[0],u,c,!0),iC(d[1],u,c,!0)];d[0]<u[0]&&(p[0]=-1/0),d[1]>u[1]&&(p[1]=1/0),t&&(p[0]===-1/0?this._showIndicator(f,p[1],"< ",h):p[1]===1/0?this._showIndicator(f,p[0],"> ",h):this._showIndicator(f,f,"≈ ",h));var g=this._hoverLinkDataIndices,m=[];(t||ea3(n))&&(m=this._hoverLinkDataIndices=n.findTargetDataIndices(p));var v=function(e,t){var n={},r={};return i(e||[],n),i(t||[],r,n),[o(n),o(r)];function i(e,t,n){for(var r=0,i=e.length;r<i;r++){var o=iq(e[r].seriesId,null);if(null==o)return;for(var a=ij(e[r].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 r in e)if(e.hasOwnProperty(r)&&null!=e[r]){if(t)n.push(+r);else{var i=o(e[r],!0);i.length&&n.push({seriesId:r,dataIndex:i})}}return n}}(g,m);this._dispatchHighDown("downplay",eaJ(v[0],n)),this._dispatchHighDown("highlight",eaJ(v[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){if(dJ(e.target,function(e){var n=aF(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var t,n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),o=i.getStore().get(r.getDataDimensionIndex(i),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",eaJ(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,r){var i=h3(t,r?null:this.group);return ts(e)?h4(e,i,n):h8(e,i,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}(eaX);function ea5(e,t,n,r){return new hg({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){ni(e.event)},ondragend:r})}function ea3(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function ea4(e){return"vertical"===e?"ns-resize":"ew-resize"}var ea8={type:"selectDataRange",event:"dataRangeSelected",update:"update"},ea6=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},ea9=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var r,i,o,a,s,l=e.pipelineContext;t.isTargetSeries(e)&&(!l||!l.large)&&n.push((r=t.stateList,i=t.targetVisuals,o=to(t.getValueState,t),a=t.getDataDimensionIndex(e.getData()),s={},te(r,function(e){var t=eaP.prepareVisualTypes(i[e]);s[e]=t}),{progress:function(e,t){function n(e){return dX(t,u,e)}function r(e,n){!function(e,t,n,r){switch(n){case"color":e.ensureUniqueItemVisual(t,"style")[e.getVisual("drawType")]=r,e.setItemVisual(t,"colorFromPalette",!1);break;case"opacity":e.ensureUniqueItemVisual(t,"style").opacity=r;break;case"symbol":case"symbolSize":case"liftZ":e.setItemVisual(t,n,r)}}(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,f=o(d),p=i[f],g=s[f],m=0,v=g.length;m<v;m++){var y=g[m];p[y]&&p[y].applyVisual(d,n,r)}}}}))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(to(ea7,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(i.dimension=o,r.push(i))}}),e.getData().setVisual("visualMeta",r)}}];function ea7(e,t,n,r){for(var i=t.targetVisuals[r],o=eaP.prepareVisualTypes(i),a={color:dK(e.getData(),"color")},s=0,l=o.length;s<l;s++){var u=o[s],c=i["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 ese(e){var t=e&&e.visualMap;ts(t)||(t=t?[t]:[]),te(t,function(e){if(e){est(e,"splitList")&&!est(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&ts(t)&&te(t,function(e){td(e)&&(est(e,"start")&&!est(e,"min")&&(e.min=e.start),est(e,"end")&&!est(e,"max")&&(e.max=e.end))})}})}function est(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var esn=!1;function esr(e){!esn&&(esn=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(ea8,ea6),te(ea9,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(ese))}function esi(e){e.registerComponentModel(eaq),e.registerComponentView(ea2),esr(e)}var eso=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return eF(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],esa[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=e5(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=tt(this._pieceList,function(e){return e=e5(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=eaP.listVisualTypes(),i=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}te(t.pieces,function(e){te(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),te(n,function(e,n){var r=!1;te(this.stateList,function(e){r=r||o(t,e,n)||o(t.target,e,n)},this),r||te(this.stateList,function(e){(t[e]||(t[e]={}))[n]=eaO.get(n,"inRange"===e?"active":"inactive",i)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,te(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),"single"===n.selectedMode){var o=!1;te(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(o?i[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=e5(e)},t.prototype.getValueState=function(e){var t=eaP.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(r){var i=[],o=r.getData();o.each(this.getDataDimensionIndex(o),function(t,r){eaP.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},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=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];o!==-1/0&&i.unshift({interval:[-1/0,o]}),(o=i[i.length-1].interval[1])!==1/0&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var a=-1/0;return te(i,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(i,o){var a=r.getRepresentValue({interval:i});o||(o=r.getValueState(a));var s=e(a,o);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=s1(eaU.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}(eaU),esa={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var o=(r[1]-r[0])/i;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a<i;s+=o,a++){var l=a===i-1?r[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),iN(e),te(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;te(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),ess(t,e)},pieces:function(e){var t=this.option;te(t.pieces,function(t,n){td(t)||(t={value:t});var r={text:"",index:n};if(null!=t.label&&(r.text=t.label),t.hasOwnProperty("value")){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var o=r.interval=[],a=r.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]&&(r.value=o[0])}r.visual=eaP.retrieveVisuals(t),e.push(r)},this),ess(t,e),iN(e),te(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 ess(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var esl=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return eF(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,i=r.getFont(),o=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=tv(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),te(l.viewPieceList,function(r){var l=r.piece,u=new ix;u.onclick=to(this._onItemClick,this,l),this._enableHoverLink(u,r.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 aB({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:i,fill:o,opacity:"outOfRange"===d?.5:1}}))}e.add(u)},this),u&&this._renderEndsText(e,u[1],s,c,a),lA(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 r("highlight")}).on("mouseout",function(){return r("downplay")});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:eaJ(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return eaQ(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var o=new ix,a=this.visualMapModel.textStyleModel;o.add(new aB({style:sR(a,{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=tt(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),r=e.get("orient"),i=e.get("inverse");return("horizontal"===r?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(ft(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,r=n.selectedMode;if(r){var i=e5(n.selected),o=t.getSelectedMapKey(e);"single"===r||!0===r?(i[o]=!0,te(i,function(e,t){i[t]=t===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type="visualMap.piecewise",t}(eaX);function esu(e){e.registerComponentModel(eso),e.registerComponentView(esl),esr(e)}var esc=n(2116);pr([function(e){e.registerChartView(eaD),e.registerSeriesModel(eaA)},function(e){pr(esi),pr(esu)},vr,va,vu,vI,vE]);let esh=e=>{var t;let{height:n,data:r,xAxisCategories:i,yAxisCategories:o,timeScale:a,colors:s}=e,{timeZone:l}=WD(),u=vz(),c=(0,wP.Z)(),h={tooltip:{appendToBody:!0,formatter:e=>(function({data:e,label:t,marker:n,xAxisCategories:r,yAxisCategories:i,theme:o}){let[a,s]=e,{formattedDate:l,formattedTime:u}=WM(r[a]),c=(0,esc.css)`
|
|
8
|
-
border-bottom: 1px solid ${o.palette.grey[500]};
|
|
9
|
-
padding-bottom: 8px;
|
|
10
|
-
`,h=(0,esc.css)`
|
|
11
|
-
display: flex;
|
|
12
|
-
justify-content: space-between;
|
|
13
|
-
padding-top: 8px;
|
|
14
|
-
`,d=(0,esc.css)`
|
|
15
|
-
margin-right: 16px;
|
|
16
|
-
`;return`
|
|
17
|
-
<div>
|
|
18
|
-
<div style="${c.styles}">${l} ${u}</div>
|
|
19
|
-
<div style="${h.styles}">
|
|
20
|
-
<div style="${d.styles}">
|
|
21
|
-
${n}
|
|
22
|
-
<strong>${i[s]}</strong>
|
|
23
|
-
</div>
|
|
24
|
-
<div>
|
|
25
|
-
${t}
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
`})({data:e.data.value,label:e.data.label,marker:e.marker,xAxisCategories:i,yAxisCategories:o,theme:c})},grid:{top:"5%",bottom:"5%"},xAxis:{type:"category",data:i,axisLine:{show:!1},splitArea:{show:!1},axisLabel:{hideOverlap:!0,formatter:(t=a?.rangeMs??0,function(e){let n=new Date(Number(e));return t>15768e7?WS(n,"yyy",l):t>63072e6?WS(n,"MMM yyy",l):t>864e6&&t<1577664e4?WS(n,"dd.MM",l):t>1728e5&&t<=864e6?WS(n,"dd.MM HH:mm",l):WS(n,"HH:mm",l)})}},yAxis:{type:"category",data:o,axisLine:{show:!1},splitArea:{show:!1,interval:0},splitLine:{show:!1},axisLabel:{interval:0}},visualMap:{show:!1,type:"piecewise",pieces:s},series:[{name:"Status history",type:"heatmap",coordinateSystem:"cartesian2d",data:r,label:{show:!1},itemStyle:{borderWidth:1,borderType:"solid",borderColor:"#ffffff"},emphasis:{itemStyle:{opacity:.5}}}]};return(0,p.jsx)(vL.Z,{style:{height:n},sx:{overflow:"auto"},children:(0,p.jsx)(xz,{sx:{width:"100%",height:n},option:h,theme:u.echartsTheme})})},esd="#1f77b4";function esf(e,t){t.match(/^#[0-9A-Fa-f]{6}$/)||(t=esd);try{let[n,r,i]=esg(t);if(isNaN(n)||isNaN(r)||isNaN(i))throw Error("Invalid HSL values");let o=String(e).split("").reduce((e,t)=>e+t.charCodeAt(0),0),a=Math.min(r+10,90),s=esm(Math.abs((n+o%6*60)%360),Math.min(Math.max(a,50),90),Math.min(Math.max(i+(o%2?15:-15),30),70));if(!s.match(/^#[0-9A-Fa-f]{6}$/))throw Error("Invalid generated color");return s}catch(e){return esd}}function esp(e,t){return t.length>=e.length?t.slice(0,e.length):e.map((e,n)=>n<t.length?t[n]||esd:esf(e,t[0]||esd))}function esg(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),o=Math.min(t,n,r),a=0,s=0,l=(i+o)/2;if(i!==o){let e=i-o;switch(s=l>.5?e/(2-i-o):e/(i+o),i){case t:a=(n-r)/e+6*(n<r);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return[360*a,100*s,100*l]}function esm(e,t,n){let r=t*Math.min(n/=100,1-n)/100,i=t=>{let i=(t+e/30)%12;return Math.round(255*(n-r*Math.max(Math.min(i-3,9-i,1),-1))).toString(16).padStart(2,"0")};return`#${i(0)}${i(8)}${i(4)}`}var esv=n(1104),esy=n(8971);let esx=(e,t)=>e.filter(e=>t.includes(e)),esb=(e,t,n)=>{let r=e.keys[0];Array.isArray(t)?t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)}):t&&"object"==typeof t?(Object.keys(t).length>e.keys.length?e.keys:esx(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){let o=t[i];void 0!==o&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},o)}}):("number"==typeof t||"string"==typeof t)&&n((e,t)=>{Object.assign(e,t)},t)};function esw(e){return`--Grid-${e}Spacing`}function esS(e){return`--Grid-parent-${e}Spacing`}let es_="--Grid-columns",esC="--Grid-parent-columns",esM=({theme:e,ownerState:t})=>{let n={};return esb(e.breakpoints,t.size,(e,t)=>{let r={};"grow"===t&&(r={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(r={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(r={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${esC}) - (var(${esC}) - ${t}) * (var(${esS("column")}) / var(${esC})))`}),e(n,r)}),n},esk=({theme:e,ownerState:t})=>{let n={};return esb(e.breakpoints,t.offset,(e,t)=>{let r={};"auto"===t&&(r={marginLeft:"auto"}),"number"==typeof t&&(r={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${esC}) + var(${esS("column")}) * ${t} / var(${esC}))`}),e(n,r)}),n},esT=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[es_]:12};return esb(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[es_]:r,"> *":{[esC]:r}})}),n},esD=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return esb(e.breakpoints,t.rowSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[esw("row")]:i,"> *":{[esS("row")]:i}})}),n},esA=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return esb(e.breakpoints,t.columnSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[esw("column")]:i,"> *":{[esS("column")]:i}})}),n},esI=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return esb(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},esO=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${esw("row")}) var(${esw("column")})`}}),esP=e=>{let t=[];return Object.entries(e).forEach(([e,n])=>{!1!==n&&void 0!==n&&t.push(`grid-${e}-${String(n)}`)}),t},esR=(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,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]},esE=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(e)}`],esL=(0,xY.Z)(),esN=(0,xG.Z)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function esB(e){return(0,xU.Z)({props:e,name:"MuiGrid",defaultTheme:esL})}let esF=function(e={}){let{createStyledComponent:t=esN,useThemeProps:n=esB,useTheme:r=esy.Z,componentName:i="MuiGrid"}=e,o=(e,t)=>{let{container:n,direction:r,spacing:o,wrap:a,size:s}=e,l={root:["root",n&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...esE(r),...esP(s),...n?esR(o,t.breakpoints.keys[0]):[]]};return(0,y.Z)(l,e=>(0,T.ZP)(i,e),{})};function a(e,t,n=()=>!0){let r={};return null===e||(Array.isArray(e)?e.forEach((e,i)=>{null!==e&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{let i=e[t];null!=i&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let s=t(esT,esA,esD,esM,esI,esO,esk),l=g.forwardRef(function(e,t){let i=r(),l=n(e),u=(0,xq.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,i.breakpoints);let{className:c,children:h,columns:d=12,container:f=!1,component:m="div",direction:y="row",wrap:x="wrap",size:b={},offset:w={},spacing:S=0,rowSpacing:_=S,columnSpacing:C=S,unstable_level:M=0,...k}=u,T=a(b,i.breakpoints,e=>!1!==e),D=a(w,i.breakpoints),A=e.columns??(M?void 0:d),I=e.spacing??(M?void 0:S),O=e.rowSpacing??e.spacing??(M?void 0:_),P=e.columnSpacing??e.spacing??(M?void 0:C),R={...u,level:M,columns:A,container:f,direction:y,wrap:x,spacing:I,rowSpacing:O,columnSpacing:P,size:T,offset:D},E=o(R,i);return(0,p.jsx)(s,{ref:t,as:m,ownerState:R,className:(0,v.Z)(E.root,c),...k,children:g.Children.map(h,e=>g.isValidElement(e)&&(0,esv.Z)(e,["Grid"])&&f&&e.props.container?g.cloneElement(e,{unstable_level:e.props?.unstable_level??M+1}):e)})});return l.muiName="Grid",l}({createStyledComponent:(0,S.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,M.i)({props:e,name:"MuiGrid2"}),useTheme:wP.Z}),esz=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,p.jsx)(x3,{gap:1,direction:"row",...n,children:(0,p.jsx)(x8.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,p.jsxs)(x3,{gap:1,direction:"row",...n,children:[(0,p.jsx)(x8.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,p.jsx)(x8.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,p.jsx)(x3,{gap:1,direction:"row",...n,children:(0,p.jsx)(x8.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,p.jsx)(x3,{gap:1,direction:"row",...n,children:(0,p.jsxs)(x8.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,p.jsx)(D5.Z,{value:"empty",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Empty"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches empty string"})]})}),(0,p.jsx)(D5.Z,{value:"null",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Null"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches null or undefined"})]})}),(0,p.jsx)(D5.Z,{value:"NaN",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"NaN"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,p.jsx)(D5.Z,{value:"true",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"True"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches true boolean"})]})}),(0,p.jsx)(D5.Z,{value:"false",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"False"}),(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},esV=({mapping:e,onChange:t,onDelete:n,...r})=>{let i=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,p.jsxs)(esF,{container:!0,spacing:2,...r,children:[(0,p.jsx)(esF,{size:{xs:5},children:(0,p.jsxs)(x3,{direction:"row",gap:1,width:"100%",children:[(0,p.jsxs)(x8.Z,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,p.jsx)(D5.Z,{value:"Value",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Value"}),"Value"!==e.kind&&(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches an exact text value"})]})}),(0,p.jsx)(D5.Z,{value:"Range",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Range"}),"Range"!==e.kind&&(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,p.jsx)(D5.Z,{value:"Regex",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Regex"}),"Regex"!==e.kind&&(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,p.jsx)(D5.Z,{value:"Misc",children:(0,p.jsxs)(x3,{children:[(0,p.jsx)(kz.Z,{children:"Misc"}),"Misc"!==e.kind&&(0,p.jsx)(kz.Z,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,p.jsx)(esz,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,p.jsx)(esF,{size:{xs:4},children:(0,p.jsx)(x8.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,p.jsx)(esF,{size:{xs:1},children:(0,p.jsx)(x3,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,p.jsx)(wI,{label:"Color",color:e.spec.result.color??"#000",onColorChange:i,onClear:()=>i(void 0)}):(0,p.jsx)(x4.Z,{onClick:()=>i("#000"),children:(0,p.jsx)(GS.default,{})})})}),(0,p.jsx)(esF,{size:{xs:1},textAlign:"end",children:(0,p.jsx)(T3.Z,{title:"Remove mapping settings",placement:"top",children:(0,p.jsx)(x4.Z,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,p.jsx)(Ut.default,{})})})})]})},esZ=({mappings:e,onChange:t})=>{let[n,r]=(0,g.useState)(e);return(0,p.jsxs)(x3,{spacing:1,children:[(0,p.jsxs)(esF,{container:!0,spacing:2,children:[(0,p.jsx)(esF,{size:{xs:5},children:(0,p.jsx)(kz.Z,{variant:"subtitle1",children:"Condition"})}),(0,p.jsx)(esF,{size:{xs:4},children:(0,p.jsx)(kz.Z,{variant:"subtitle1",children:"Display Text"})}),(0,p.jsx)(esF,{size:{xs:1},textAlign:"center",children:(0,p.jsx)(kz.Z,{variant:"subtitle1",children:"Color"})}),(0,p.jsx)(esF,{size:{xs:1}})]}),(0,p.jsx)(x3,{gap:1.5,divider:(0,p.jsx)(AV.Z,{flexItem:!0,orientation:"horizontal"}),children:n.map((e,i)=>(0,p.jsx)(esV,{mapping:e,onChange:e=>(function(e,i){let o=[...n];o[e]=i,r(o),t(o)})(i,e),onDelete:()=>(function(e){let i=[...n];i.splice(e,1),r(i),t(i)})(i)},i))}),(0,p.jsx)(L.Z,{variant:"contained",startIcon:(0,p.jsx)(GS.default,{}),sx:{marginTop:1},onClick:function(){let e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),r(e),t(e)},children:"Add value mappings"})]})}},8118:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var i=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:r(r({},t),{options:r(r({},o(n)),o(t.options))});return(0,i.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,r=t.listener,i=t.options;return e.addEventListener(n,r,i),function(){e.removeEventListener(n,r,i)}}},501:function(e,t,n){"use strict";t.bindAll=t.bind=void 0;var r=n(3778);Object.defineProperty(t,"bind",{enumerable:!0,get:function(){return r.bind}});var i=n(8118);Object.defineProperty(t,"bindAll",{enumerable:!0,get:function(){return i.bindAll}})},2545:function(e,t,n){var r=n(1822)(n(7400),"DataView");e.exports=r},6586:function(e,t,n){var r=n(7753),i=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 r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},6301:function(e,t,n){var r=n(9417),i=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 r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},7836:function(e,t,n){var r=n(1822)(n(7400),"Map");e.exports=r},4554:function(e,t,n){var r=n(9448),i=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 r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,e.exports=l},4825:function(e,t,n){var r=n(1822)(n(7400),"Promise");e.exports=r},6151:function(e,t,n){var r=n(1822)(n(7400),"Set");e.exports=r},2485:function(e,t,n){var r=n(4554),i=n(8639),o=n(8379);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a},3694:function(e,t,n){var r=n(6301),i=n(7354),o=n(5863),a=n(2367),s=n(748),l=n(7569);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=i,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 r=n(7400).Symbol;e.exports=r},9942:function(e,t,n){var r=n(7400).Uint8Array;e.exports=r},6902:function(e,t,n){var r=n(1822)(n(7400),"WeakMap");e.exports=r},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,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}},8213:function(e,t,n){var r=n(4701),i=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&&i(e),h=!n&&!c&&a(e),d=!n&&!c&&!h&&l(e),f=n||c||h||d,p=f?r(e.length,String):[],g=p.length;for(var m in e)(t||u.call(e,m))&&!(f&&("length"==m||h&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g)))&&p.push(m);return p}},7141:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},756:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},3140:function(e,t,n){var r=n(8799),i=n(5638);e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},1928:function(e,t,n){var r=n(8799),i=n(5638),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&i(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},3382:function(e,t,n){var r=n(5638);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},8799:function(e,t,n){var r=n(2630);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},158:function(e,t,n){var r=n(1611),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},9819:function(e,t,n){var r=n(8911)();e.exports=r},1324:function(e,t,n){var r=n(7141),i=n(9785);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},9736:function(e,t,n){var r=n(6539),i=n(4840),o=n(1258),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},5829:function(e,t,n){var r=n(9736),i=n(2360);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},2866:function(e,t,n){var r=n(2772),i=n(2360);e.exports=function e(t,n,o,a,s){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,a,e,s):t!=t&&n!=n)}},2772:function(e,t,n){var r=n(3694),i=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]",f="[object Object]",p=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?f:b,w=w==h?f:w;var S=b==f,_=w==f,C=b==w;if(C&&u(e)){if(!u(t))return!1;y=!0,S=!1}if(C&&!S)return v||(v=new r),y||c(e)?i(e,t,n,g,m,v):o(e,t,b,n,g,m,v);if(!(1&n)){var M=S&&p.call(e,"__wrapped__"),k=_&&p.call(t,"__wrapped__");if(M||k){var T=M?e.value():e,D=k?t.value():t;return v||(v=new r),m(T,D,n,g,v)}}return!!C&&(v||(v=new r),a(e,t,n,g,m,v))}},6729:function(e,t,n){var r=n(8338),i=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)||i(e))&&(r(e)?h:s).test(a(e))}},6972:function(e,t,n){var r=n(9736),i=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)&&i(e.length)&&!!a[r(e)]}},186:function(e,t,n){var r=n(6016),i=n(962),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(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 r=n(1611),i=n(6016),o=n(1586),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(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 r=n(3694),i=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 r),s(o))a(t,n,l,c,e,h,d);else{var f=h?h(u(t,l),o,l+"",t,n,d):void 0;void 0===f&&(f=o),i(t,l,f)}},l)}},8867:function(e,t,n){var r=n(3140),i=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),f=n(1611),p=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){r(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(_),A=!T&&!D&&g(_);M=_,T||D||A?u(S)?M=S:c(S)?M=a(S):D?(k=!1,M=i(_,!0)):A?(k=!1,M=o(_,!0)):M=[]:p(_)||l(_)?(M=S,l(S)?M=v(S):(!f(S)||d(S))&&(M=s(_))):k=!1}k&&(w.set(_,M),x(M,_,y,b,w),w.delete(_)),r(e,n,M)}},1197:function(e,t,n){var r=n(1137),i=n(1871),o=n(3132);e.exports=function(e,t){return o(i(e,t,r),e+"")}},4459:function(e,t,n){var r=n(551),i=n(2630),o=n(1137),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=a},4701:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},4833:function(e,t,n){var r=n(6127),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):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 r=n(9942);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},2734:function(e,t,n){e=n.nmd(e);var r=n(7400),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},3428:function(e,t,n){var r=n(5825);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},7561:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},5159:function(e,t,n){var r=n(1928),i=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?i(n,u,c):r(n,u,c)}return n}},4937:function(e,t,n){var r=n(7400)["__core-js_shared__"];e.exports=r},7270:function(e,t,n){var r=n(1197),i=n(7535);e.exports=function(e){return r(function(t,n){var r=-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&&i(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t})}},8911:function(e){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(!1===n(o[l],l,o))break}return t}}},2630:function(e,t,n){var r=n(1822),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},7042:function(e,t,n){var r=n(2485),i=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),f=l.get(t);if(d&&f)return d==t&&f==e;var p=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var v=e[p],y=t[p];if(a)var x=u?a(y,v,p,t,e,l):a(v,y,p,e,t,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!i(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 r=n(6539),i=n(9942),o=n(5638),a=n(7042),s=n(9383),l=n(3735),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,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 i(e),new i(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 f=s;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)break;var g=d.get(e);if(g)return g==t;r|=2,d.set(e,t);var m=a(f(e),f(t),r,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 r=n(1385),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var h=c;h--;){var d=u[h];if(!(l?d in t:i.call(t,d)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==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 r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},1385:function(e,t,n){var r=n(1324),i=n(3080),o=n(98);e.exports=function(e){return r(e,o,i)}},5899:function(e,t,n){var r=n(4479);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},1822:function(e,t,n){var r=n(6729),i=n(5371);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},2173:function(e,t,n){var r=n(8023)(Object.getPrototypeOf,Object);e.exports=r},4840:function(e,t,n){var r=n(6539),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},3080:function(e,t,n){var r=n(263),i=n(5937),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:r(a(e=Object(e)),function(t){return o.call(e,t)})}:i;e.exports=s},3533:function(e,t,n){var r=n(2545),i=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]",f="[object WeakMap]",p="[object DataView]",g=u(r),m=u(i),v=u(o),y=u(a),x=u(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=p||i&&b(new i)!=c||o&&b(o.resolve())!=h||a&&b(new a)!=d||s&&b(new s)!=f)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return p;case m:return c;case v:return h;case y:return d;case x:return f}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 r=n(5718);e.exports=function(){this.__data__=r?r(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 r=n(5718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},8256:function(e,t,n){var r=n(5718),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},7426:function(e,t,n){var r=n(5718);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},7635:function(e,t,n){var r=n(158),i=n(2173),o=n(6016);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},2383:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7535:function(e,t,n){var r=n(5638),i=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?!!(i(n)&&o(t,n.length)):"string"==s&&t in n)&&r(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 r,i=n(4937),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";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 r=n(3382),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},6165:function(e,t,n){var r=n(3382);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},1873:function(e,t,n){var r=n(3382);e.exports=function(e){return r(this.__data__,e)>-1}},2556:function(e,t,n){var r=n(3382);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},9448:function(e,t,n){var r=n(6586),i=n(6301),o=n(7836);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},7738:function(e,t,n){var r=n(5899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=+!!t,t}},6575:function(e,t,n){var r=n(5899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(5899);e.exports=function(e){return r(this,e).has(e)}},8738:function(e,t,n){var r=n(5899);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},9383:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},5718:function(e,t,n){var r=n(1822)(Object,"create");e.exports=r},962:function(e,t,n){var r=n(8023)(Object.keys,Object);e.exports=r},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 r=n(9120),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.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 r=n(9349),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(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),r(e,this,u)}}},7400:function(e,t,n){var r=n(9120),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||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 r=n(4459),i=n(9591)(r);e.exports=i},9591:function(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7354:function(e,t,n){var r=n(6301);e.exports=function(){this.__data__=new r,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 r=n(6301),i=n(7836),o=n(4554);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||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 r=n(1611),i=n(2846),o=n(1936),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,h,d,f,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,p=t,h=e.apply(r,n)}function x(e){var n=e-f,r=e-p;return void 0===f||n>=t||n<0||m&&r>=c}function b(){var e,n,r,o=i();if(x(o))return w(o);d=setTimeout(b,(e=o-f,n=o-p,r=t-e,m?s(r,c-n):r))}function w(e){return(d=void 0,v&&l)?y(e):(l=u=void 0,h)}function S(){var e,n=i(),r=x(n);if(l=arguments,u=this,f=n,r){if(void 0===d)return p=e=f,d=setTimeout(b,t),g?y(e):h;if(m)return clearTimeout(d),d=setTimeout(b,t),y(f)}return void 0===d&&(d=setTimeout(b,t)),h}return t=o(t)||0,r(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),p=0,l=f=u=d=void 0},S.flush=function(){return void 0===d?h:w(i())},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 r=n(5829),i=n(2360),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(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 r=n(8338),i=n(4194);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},6468:function(e,t,n){var r=n(68),i=n(2360);e.exports=function(e){return i(e)&&r(e)}},3854:function(e,t,n){e=n.nmd(e);var r=n(7400),i=n(7714),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=s?s.isBuffer:void 0;e.exports=l||i},6141:function(e,t,n){var r=n(2866);e.exports=function(e,t){return r(e,t)}},8338:function(e,t,n){var r=n(9736),i=n(1611);e.exports=function(e){if(!i(e))return!1;var t=r(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 r=n(9736),i=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]"!=r(e))return!1;var t=i(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 r=n(9736),i=n(2360);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},8519:function(e,t,n){var r=n(6972),i=n(9334),o=n(8125),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},98:function(e,t,n){var r=n(8213),i=n(186),o=n(68);e.exports=function(e){return o(e)?r(e):i(e)}},3893:function(e,t,n){var r=n(8213),i=n(9464),o=n(68);e.exports=function(e){return o(e)?r(e,!0):i(e)}},5409:function(e,t,n){var r=n(15),i=n(7270)(function(e,t,n){r(e,t,n)});e.exports=i},2846:function(e,t,n){var r=n(7400);e.exports=function(){return r.Date.now()}},5937:function(e){e.exports=function(){return[]}},7714:function(e){e.exports=function(){return!1}},1936:function(e,t,n){var r=n(4833),i=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(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(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 r=n(5159),i=n(3893);e.exports=function(e){return r(e,i(e))}},9986:function(e,t,n){"use strict";t.default=void 0;var r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.default)("M19,13H5V11H19V13Z","Minus")},1889:function(e,t,n){"use strict";t.default=void 0;var r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},5186:function(e,t,n){"use strict";t.default=void 0;var r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r,i=(r=n(265))&&r.__esModule?r:{default:r};t.default=(0,i.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 r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}(t);function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=i,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var o=t.prototype;return o.reset=function(){this.setState(i)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,i,o,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(n=e.resetKeys)&&(n=[]),void 0===(r=s)&&(r=[]),n.length!==r.length||n.some(function(e,t){return!Object.is(e,r[t])}))&&(null==(i=(o=this.props).onResetKeysChange)||i.call(o,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,r=t.fallbackRender,i=t.FallbackComponent,o=t.fallback;if(null!==e){var a={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(o))return o;if("function"==typeof r)return r(a);if(i)return n.createElement(i,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),r=t[0],i=t[1];if(null!=e)throw e;if(null!=r)throw r;return i},e.withErrorBoundary=function(e,t){var r=function(r){return n.createElement(o,t,n.createElement(e,r))},i=e.displayName||e.name||"Unknown";return r.displayName="withErrorBoundary("+i+")",r},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(4538))},8317:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,a=r.length;o<a;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},7554:function(e){"use strict";var t;t=function(){function e(){return!0}function t(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},a=[],s=[],l={types:i,conversions:s,ignore:a};function u(e){var t=N(l.types,function(t){return t.name===e});if(t)return t;if("any"===e)return o;var n=N(l.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function c(e){return e===o?999:l.types.indexOf(e)}function h(e){var t=N(l.types,function(t){return t.test(e)});if(t)return t.name;throw TypeError("Value has unknown type. Value: "+e)}function d(e){return e.map(function(e){var t=e.types.map(y);return(e.restParam?"...":"")+t.join("|")}).join(",")}function f(e){var t=E(e);return!!t&&t.restParam}function p(e){return e.types.some(function(e){return null!=e.conversion})}function g(t){if(!t||0===t.types.length)return e;if(1===t.types.length)return u(t.types[0].name).test;if(2===t.types.length){var n=u(t.types[0].name).test,r=u(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map(function(e){return u(e.name).test});return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}function m(e,t){return t<e.params.length?e.params[t]:f(e.params)?E(e.params):null}function v(e,t,n){var r=m(e,t);return(r?n?r.types.filter(x):r.types:[]).map(y)}function y(e){return e.name}function x(e){return null===e.conversion||void 0===e.conversion}function b(e,t){var n=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}(B(e,function(e){return v(e,t,!1)}));return -1!==n.indexOf("any")?["any"]:n}function w(e,t,n){var r,i,o,a=e||"unnamed",s=n;for(o=0;o<t.length;o++){var l=s.filter(function(e){var n=g(m(e,o));return(o<e.params.length||f(e.params))&&n(t[o])});if(0===l.length){if((i=b(s,o)).length>0){var u=h(t[o]);return(r=TypeError("Unexpected type of argument in function "+a+" (expected: "+i.join(" or ")+", actual: "+u+", index: "+o+")")).data={category:"wrongType",fn:a,index:o,actual:u,expected:i},r}}else s=l}var c=s.map(function(e){return f(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,c))return(r=TypeError("Too few arguments in function "+a+" (expected: "+(i=b(s,o)).join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:a,index:t.length,expected:i},r;var d=Math.max.apply(null,c);return t.length>d?(r=TypeError("Too many arguments in function "+a+" (expected: "+d+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:a,index:t.length,expectedLength:d}:(r=TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+a+".")).data={category:"mismatch",actual:t.map(h)},r}function S(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function _(e){for(var t=999,n=0;n<e.types.length;n++)x(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!=(r=e.params.some(p)-t.params.some(p)))return r;for(n=0;n<i;n++)if(0!=(r=p(e.params[n])-p(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=function(e,t){var n;return 0!=(n=e.restParam-t.restParam)||0!=(n=p(e)-p(t))||0!=(n=S(e)-S(t))?n:_(e)-_(t)}(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function M(e){var t,n,r,i,o=[],a=[];switch(e.types.forEach(function(e){e.conversion&&(o.push(u(e.conversion.from).test),a.push(e.conversion.convert))}),a.length){case 0:return function(e){return e};case 1:return t=o[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=a[0],i=a[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(o[t](e))return a[t](e);return e}}}function k(e,t){return function e(n,r,i){if(!(r<n.length))return[i.map(function(e,t){return{types:e,restParam:t===n.length-1&&f(n)}})];var o,a=n[r],s=t?a.types.filter(x):a.types;if(a.restParam){var l=s.filter(x);o=l.length<s.length?[l,s]:[s]}else o=s.map(function(e){return[e]});return B(o,function(t){return e(n,r+1,i.concat([t]))})}(e,0,[])}function T(e,r){if(0===Object.keys(r).length)throw SyntaxError("No signatures provided");var i,o=[];Object.keys(r).map(function(e){var t,n,i;return t=r[e],n=l.conversions,i=[],(""!==e.trim()&&(i=e.split(",").map(I).map(function(e,t,r){var i,o,a,s,l,h,d,f,p=(i=n,o=l=((s=0===e.indexOf("..."))?e.length>3?e.slice(3):"any":e).split("|").map(I).filter(O).filter(A),a={},i.forEach(function(e){-1!==o.indexOf(e.from)||-1===o.indexOf(e.to)||a[e.from]||(a[e.from]=e)}),h=Object.keys(a).map(function(e){return a[e]}),d=l.map(function(e){var t=u(e);return{name:e,typeIndex:c(t),test:t.test,conversion:null,conversionIndex:-1}}),f=h.map(function(e){var t=u(e.from);return{name:e.from,typeIndex:c(t),test:t.test,conversion:e,conversionIndex:n.indexOf(e)}}),{types:d.concat(f),restParam:s});if(p.restParam&&t!==r.length-1)throw SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return p})),i.some(R))?null:{params:i,fn:t}}).filter(P).forEach(function(e){var t=N(o,function(t){return function(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++)if(!function(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],-1!==t.indexOf(n))return!0;return!1}(v(e,r,!0),v(t,r,!0)))return!1;var i=e.params.length,o=t.params.length,a=f(e.params),s=f(t.params);return a?s?i===o:o>=i:s?i>=o:i===o}(t,e)});if(t)throw TypeError('Conflicting signatures "'+d(t.params)+'" and "'+d(e.params)+'".');o.push(e)});var a=B(o,function(e){return(e?k(e.params,!1):[]).map(function(t){return{params:t,fn:e.fn}})}).filter(P);a.sort(C);var s=a[0]&&a[0].params.length<=2&&!f(a[0].params),h=a[1]&&a[1].params.length<=2&&!f(a[1].params),m=a[2]&&a[2].params.length<=2&&!f(a[2].params),y=a[3]&&a[3].params.length<=2&&!f(a[3].params),x=a[4]&&a[4].params.length<=2&&!f(a[4].params),b=a[5]&&a[5].params.length<=2&&!f(a[5].params),w=a.map(function(e){return function(e){var t,n,r;if(f(e)){var i,o=(t=(i=e).slice(0,i.length-1).map(g)).length,a=g(E(e)),s=function(e){for(var t=o;t<e.length;t++)if(!a(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return s(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=g(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=g(e[0]),r=g(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(g),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}(e.params)}),S=s?g(a[0].params[0]):t,_=h?g(a[1].params[0]):t,T=m?g(a[2].params[0]):t,D=y?g(a[3].params[0]):t,F=x?g(a[4].params[0]):t,z=b?g(a[5].params[0]):t,V=s?g(a[0].params[1]):t,Z=h?g(a[1].params[1]):t,j=m?g(a[2].params[1]):t,H=y?g(a[3].params[1]):t,W=x?g(a[4].params[1]):t,$=b?g(a[5].params[1]):t,G=a.map(function(e){return function(e,t){var n=t;if(e.some(p)){var r=f(e),i=e.map(M);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(f(e)){var a=e.length-1;o=function(){return n.apply(this,L(arguments,0,a).concat([L(arguments,a)]))}}return o}(e.params,e.fn)}),U=s?G[0]:n,q=h?G[1]:n,Y=m?G[2]:n,X=y?G[3]:n,K=x?G[4]:n,Q=b?G[5]:n,J=s?a[0].params.length:-1,ee=h?a[1].params.length:-1,et=m?a[2].params.length:-1,en=y?a[3].params.length:-1,er=x?a[4].params.length:-1,ei=b?a[5].params.length:-1,eo=6*!!(s&&h&&m&&y&&x&&b),ea=a.length,es=function(){for(var t=eo;t<ea;t++)if(w[t](arguments))return G[t].apply(this,arguments);return l.onMismatch(e,arguments,a)},el=function e(t,n){return arguments.length===J&&S(t)&&V(n)?U.apply(e,arguments):arguments.length===ee&&_(t)&&Z(n)?q.apply(e,arguments):arguments.length===et&&T(t)&&j(n)?Y.apply(e,arguments):arguments.length===en&&D(t)&&H(n)?X.apply(e,arguments):arguments.length===er&&F(t)&&W(n)?K.apply(e,arguments):arguments.length===ei&&z(t)&&$(n)?Q.apply(e,arguments):es.apply(e,arguments)};try{Object.defineProperty(el,"name",{value:e})}catch(e){}return el.signatures=(i={},a.forEach(function(e){e.params.some(p)||k(e.params,!0).forEach(function(t){i[d(t)]=e.fn})}),i),el}function D(e,t,n){throw w(e,t,n)}function A(e){return -1===l.ignore.indexOf(e)}function I(e){return e.trim()}function O(e){return!!e}function P(e){return null!==e}function R(e){return 0===e.types.length}function E(e){return e[e.length-1]}function L(e,t,n){return Array.prototype.slice.call(e,t,n)}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function B(e,t){return Array.prototype.concat.apply([],e.map(t))}function F(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name){if(""===t)t=r.name;else if(t!==r.name){var i=Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}}return t}function z(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw(t=Error('Signature "'+e+'" is defined twice')).data={signature:e},t}for(var i=0;i<e.length;i++){var o=e[i];if("object"==typeof o.signatures)for(var a in o.signatures)o.signatures.hasOwnProperty(a)&&(r(a,o.signatures[a]),n[a]=o.signatures[a]);else if("string"==typeof o.signature)r(o.signature,o),n[o.signature]=o;else throw(t=TypeError("Function is no typed-function (index: "+i+")")).data={index:i},t}return n}return(l=T("typed",{"string, Object":T,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return T(F(t),e)},"...Function":function(e){return T(F(e),z(e))},"string, ...Function":function(e,t){return T(e,z(t))}})).create=r,l.types=i,l.conversions=s,l.ignore=a,l.onMismatch=D,l.throwMismatchError=D,l.createError=w,l.convert=function(e,t){var n=h(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var i=l.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw Error("Cannot convert from "+n+" to "+t)},l.find=function(e,t){if(!e.signatures)throw TypeError("Function is no typed-function");if("string"==typeof t){n=t.split(",");for(var n,r=0;r<n.length;r++)n[r]=n[r].trim()}else if(Array.isArray(t))n=t;else throw TypeError("String array or a comma separated string expected");var i=n.join(","),o=e.signatures[i];if(o)return o;throw TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")},l.addType=function(e,t){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw TypeError("Object with properties {name: string, test: function} expected");if(!1!==t){for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name){l.types.splice(n,0,e);return}}l.types.push(e)},l.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}()},"function"==typeof define&&define.amd?define([],t):e.exports=t()}}]);
|