/*! For license information please see main.da2ce4f280460e97.js.LICENSE.txt */ (()=>{var e,t,n,r,o,i,a,s,l={40990:function(e,t,n){"use strict";n.d(t,{Z:()=>re});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t2||T(b)>3?"":" "}function I(e,t){for(;--t&&k()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return M(e,_()+(t<6&&32==C()&&32==k()))}function R(e){for(;k();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&R(b);break;case 40:41===e&&R(e);break;case 92:k()}return y}function E(e,t){for(;k()&&e+b!==57&&(e+b!==84||47!==C()););return"/*"+M(t,y-1)+"*"+i(47===e?e:k())}function L(e){for(;!T(C());)k();return M(e,y)}var Z="-ms-",N="-moz-",j="-webkit-",F="comm",z="rule",B="decl",V="@keyframes";function $(e,t){for(var n="",r=p(e),o=0;o0&&h(V)-S&&f(T>32?K(V+";",r,n,S-1):K(l(V," ","")+";",r,n,S-2),p);break;case 59:V+=";";default:if(f(B=q(V,t,n,v,w,o,d,j,F=[],z=[],S),a),123===N)if(0===w)U(V,t,B,B,F,a,S,d,z);else switch(99===M&&110===c(V,3)?100:M){case 100:case 108:case 109:case 115:U(e,B,B,r&&f(q(e,B,B,0,0,o,d,j,o,F=[],S),z),o,z,S,d,r?F:z);break;default:U(V,B,B,B,[""],z,0,d,z)}}v=w=T=0,D=Z=1,j=V="",S=s;break;case 58:S=1+h(V),T=P;default:if(D<1)if(123==N)--D;else if(125==N&&0==D++&&125==(b=y>0?c(x,--y):0,g--,10===b&&(g=1,m--),b))continue;switch(V+=i(N),N*D){case 38:Z=w>0?1:(V+="\f",-1);break;case 44:d[v++]=(h(V)-1)*Z,Z=1;break;case 64:45===C()&&(V+=A(k())),M=C(),w=S=h(j=V+=L(_())),N++;break;case 45:45===P&&2==h(V)&&(D=0)}}return a}function q(e,t,n,r,i,a,u,c,h,f,m){for(var g=i-1,v=0===i?a:[""],y=p(v),b=0,x=0,S=0;b0?v[k]+" "+C:l(C,/&\f/g,v[k])))&&(h[S++]=_);return w(e,t,n,0===i?z:c,h,f,m)}function G(e,t,n){return w(e,t,n,F,i(b),d(e,2,-2),0)}function K(e,t,n,r){return w(e,t,n,B,d(e,0,r),d(e,r+1,-1),r)}var Y=function(e,t,n){for(var r=0,o=0;r=o,o=C(),38===r&&12===o&&(t[n]=1),!T(o);)k();return M(e,y)},X=function(e,t){return D(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===C()&&(t[n]=1),e[n]+=Y(y-1,t,n);break;case 2:e[n]+=A(r);break;case 4:if(44===r){e[++n]=58===C()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=k());return e}(P(e),t))},Q=new WeakMap,J=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var o=[],i=X(t,o),a=n.props,s=0,l=0;s6)switch(c(e,t+1)){case 109:if(45!==c(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+N+(108==c(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==c(e,t+1))break;case 6444:switch(c(e,h(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+j)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(45===c(e,14)?"inline-":"")+"box$3$1"+j+"$2$3$1"+Z+"$2box$3")+e}break;case 5936:switch(c(e,t+11)){case 114:return j+e+Z+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+Z+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+Z+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+Z+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case B:e.return=te(e.value,e.length);break;case V:return $([S(e,{value:l(e.value,"@","@"+j)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return $([S(e,{props:[l(t,/:(plac\w+)/,":"+j+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,Z+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||ne,s={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;nr})},13726:function(e,t,n){"use strict";n.d(t,{E:()=>T,h:()=>k,T:()=>y,_:()=>g,c:()=>_,a:()=>w,u:()=>b,w:()=>v,i:()=>p,b:()=>S,C:()=>m});var r=n(27378),o=n(40990),i=n(70252),a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},s=n(55839),l=n.n(s),u=function(e,t){return l()(e,t)},c=n(53211),d=n(42747),h=n(37164),p=!1,f=r.createContext("undefined"!=typeof HTMLElement?(0,o.Z)({key:"css"}):null),m=f.Provider,g=function(){return(0,r.useContext)(f)},v=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(f);return e(t,o,n)}))},y=r.createContext({}),b=function(){return r.useContext(y)},x=a((function(e){return a((function(t){return function(e,t){return"function"==typeof t?t(e):(0,i.Z)({},e,t)}(e,t)}))})),w=function(e){var t=r.useContext(y);return e.theme!==t&&(t=x(t)(e.theme)),r.createElement(y.Provider,{value:t},e.children)};function S(e){var t=e.displayName||e.name||"Component",n=r.forwardRef((function(t,n){var o=r.useContext(y);return r.createElement(e,(0,i.Z)({theme:o,ref:n},t))}));return n.displayName="WithTheme("+t+")",u(n,e)}var k={}.hasOwnProperty,C="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",_=function(e,t){var n={};for(var r in t)k.call(t,r)&&(n[r]=t[r]);return n[C]=e,n},M=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.hC)(t,n,r),(0,h.L)((function(){return(0,c.My)(t,n,r)})),null},T=v((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var i=e[C],a=[o],s="";"string"==typeof e.className?s=(0,c.fp)(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=(0,d.O)(a,void 0,r.useContext(y));s+=t.key+"-"+l.name;var u={};for(var h in e)k.call(e,h)&&"css"!==h&&h!==C&&!p&&(u[h]=e[h]);return u.className=s,n&&(u.ref=n),r.createElement(r.Fragment,null,r.createElement(M,{cache:t,serialized:l,isStringTag:"string"==typeof i}),r.createElement(i,u))}))},10043:function(e,t,n){"use strict";n.r(t),n.d(t,{CacheProvider:()=>r.C,ClassNames:()=>f,Global:()=>u,ThemeContext:()=>r.T,ThemeProvider:()=>r.a,__unsafe_useEmotionCache:()=>r._,createElement:()=>l,css:()=>c,jsx:()=>l,keyframes:()=>d,useTheme:()=>r.u,withEmotionCache:()=>r.w,withTheme:()=>r.b});var r=n(13726),o=n(27378),i=n(53211),a=n(37164),s=n(42747),l=(n(40990),n(55839),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return o.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;sg});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(17960),i=!1,a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},c=(0,o.Z)((function(e){return l(e)?e:e.replace(a,"-$&").toLowerCase()})),d=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1===r[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"},h="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function p(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return f={name:o.name,styles:o.styles,next:f},o.name;var a=n;if(void 0!==a.styles){var s=a.next;if(void 0!==s)for(;void 0!==s;)f={name:s.name,styles:s.styles,next:f},s=s.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:f}}},51958:function(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(70252),o=n(13726),i=n(42747),a=n(37164),s=n(53211),l=n(27378),u=n(17960),c=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,u.Z)((function(e){return c.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),h=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.hC)(t,n,r),(0,a.L)((function(){return(0,s.My)(t,n,r)})),null},g=function e(t,n){var a,u,c=t.__emotion_real===t,d=c&&t.__emotion_base||t;void 0!==n&&(a=n.label,u=n.target);var h=f(t,n,c),g=h||p(d),v=!g("as");return function(){var y=arguments,b=c&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{var x=y[0];b.push(x[0]);for(var w=y.length,S=1;Sa,j:()=>s});var o=n(27378),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,a=i||function(e){return e()},s=i||o.useLayoutEffect},53211:function(e,t,n){"use strict";n.d(t,{My:()=>i,fp:()=>r,hC:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},315:function(e,t,n){"use strict";n.d(t,{Z:()=>P});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(12709),l=n(82319),u=n(24043),c=n(16351),d=n(51640),h=n(90433),p=n(28866),f=n(79602),m=n(75094),g=n(90247),v=n(24246);const y=(0,g.Z)((0,v.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"),b=(0,g.Z)((0,v.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),x=(0,g.Z)((0,v.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"),w=(0,g.Z)((0,v.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 S=n(23049);const k=(0,s.ZP)(p.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,d.Z)(n.color||n.severity)}`]]}})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?a._j:a.$n,n="light"===e.palette.mode?a.$n:a._j;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,h.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),[`& .${f.Z.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}}))),...Object.entries(e.palette).filter((0,h.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}`,[`& .${f.Z.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}}))),...Object.entries(e.palette).filter((0,h.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)}}})))]}}))),C=(0,s.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),_=(0,s.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),M=(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}),T={success:(0,v.jsx)(y,{fontSize:"inherit"}),warning:(0,v.jsx)(b,{fontSize:"inherit"}),error:(0,v.jsx)(x,{fontSize:"inherit"}),info:(0,v.jsx)(w,{fontSize:"inherit"})},P=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiAlert"}),{action:r,children:a,className:s,closeText:l="Close",color:h,components:p={},componentsProps:g={},icon:y,iconMapping:b=T,onClose:x,role:w="alert",severity:P="success",slotProps:D={},slots:A={},variant:O="standard",...I}=n,R={...n,color:h,severity:P,variant:O,colorSeverity:h||P},E=(e=>{const{variant:t,color:n,severity:r,classes:o}=e,a={root:["root",`color${(0,d.Z)(n||r)}`,`${t}${(0,d.Z)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,i.Z)(a,f.t,o)})(R),L={slots:{closeButton:p.CloseButton,closeIcon:p.CloseIcon,...A},slotProps:{...g,...D}},[Z,N]=(0,c.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,o.Z)(E.root,s),elementType:k,externalForwardedProps:{...L,...I},ownerState:R,additionalProps:{role:w,elevation:0}}),[j,F]=(0,c.Z)("icon",{className:E.icon,elementType:C,externalForwardedProps:L,ownerState:R}),[z,B]=(0,c.Z)("message",{className:E.message,elementType:_,externalForwardedProps:L,ownerState:R}),[V,$]=(0,c.Z)("action",{className:E.action,elementType:M,externalForwardedProps:L,ownerState:R}),[H,W]=(0,c.Z)("closeButton",{elementType:m.Z,externalForwardedProps:L,ownerState:R}),[U,q]=(0,c.Z)("closeIcon",{elementType:S.Z,externalForwardedProps:L,ownerState:R});return(0,v.jsxs)(Z,{...N,children:[!1!==y?(0,v.jsx)(j,{...F,children:y||b[P]||T[P]}):null,(0,v.jsx)(z,{...B,children:a}),null!=r?(0,v.jsx)(V,{...$,children:r}):null,null==r&&x?(0,v.jsx)(V,{...$,children:(0,v.jsx)(H,{size:"small","aria-label":l,title:l,color:"inherit",onClick:x,...W,children:(0,v.jsx)(U,{fontSize:"small",...q})})}):null]})}))},79602:function(e,t,n){"use strict";n.d(t,{Z:()=>a,t:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiAlert",e)}const a=(0,r.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"])},13098:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(51640),c=n(90433),d=n(28866),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiAppBar",e)}(0,h.Z)("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);var m=n(24246);const g=(e,t)=>e?`${e?.replace(")","")}, ${t})`:t,v=(0,a.ZP)(d.Z,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,u.Z)(n.position)}`],t[`color${(0,u.Z)(n.color)}`]]}})((0,s.Z)((({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter((0,c.Z)(["contrastText"])).map((([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}}))),{props:e=>!0===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:e=>!1===e.enableColorOnDark&&!["inherit","transparent"].includes(e.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?g(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?g(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]})))),y=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiAppBar"}),{className:r,color:a="primary",enableColorOnDark:s=!1,position:c="fixed",...d}=n,h={...n,color:a,position:c,enableColorOnDark:s},p=(e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${(0,u.Z)(t)}`,`position${(0,u.Z)(n)}`]};return(0,i.Z)(o,f,r)})(h);return(0,m.jsx)(v,{square:!0,component:"header",ownerState:h,elevation:4,className:(0,o.Z)(p.root,r,"fixed"===c&&"mui-fixed"),ref:t,...d})}))},11774:function(e,t,n){"use strict";n.d(t,{Z:()=>W});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(70678),l=n(75651),u=n(12709),c=n(82319),d=n(24043),h=n(51640),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiListSubheader",e)}(0,p.Z)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);var g=n(24246);const v=(0,u.ZP)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,h.Z)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((0,c.Z)((({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]})))),y=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiListSubheader"}),{className:r,color:a="default",component:s="li",disableGutters:l=!1,disableSticky:u=!1,inset:c=!1,...p}=n,f={...n,color:a,component:s,disableGutters:l,disableSticky:u,inset:c},y=(e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:a}=e,s={root:["root","default"!==n&&`color${(0,h.Z)(n)}`,!r&&"gutters",o&&"inset",!a&&"sticky"]};return(0,i.Z)(s,m,t)})(f);return(0,g.jsx)(v,{as:s,className:(0,o.Z)(y.root,r),ref:t,ownerState:f,...p})}));y&&(y.muiSkipListHighlight=!0);const b=y;var x=n(28866),w=n(75094),S=n(52889),k=n(28678),C=n(3597),_=n(8782),M=n(6499),T=n(23049),P=n(97686);function D(e){return(0,f.ZP)("MuiAutocomplete",e)}const A=(0,p.Z)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var O,I,R=n(16351);const E=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${A.tag}`]:t.tag},{[`& .${A.tag}`]:t[`tagSize${(0,h.Z)(s)}`]},{[`& .${A.inputRoot}`]:t.inputRoot},{[`& .${A.input}`]:t.input},{[`& .${A.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${A.focused} .${A.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${A.clearIndicator}`]:{visibility:"visible"}},[`& .${A.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${A.inputRoot}`]:{[`.${A.hasPopupIcon}&, .${A.hasClearIcon}&`]:{paddingRight:30},[`.${A.hasPopupIcon}.${A.hasClearIcon}&`]:{paddingRight:56},[`& .${A.input}`]:{width:0,minWidth:30}},[`& .${k.Z.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${k.Z.root}.${C.Z.sizeSmall}`]:{[`& .${k.Z.input}`]:{padding:"2px 4px 3px 0"}},[`& .${_.Z.root}`]:{padding:9,[`.${A.hasPopupIcon}&, .${A.hasClearIcon}&`]:{paddingRight:39},[`.${A.hasPopupIcon}.${A.hasClearIcon}&`]:{paddingRight:65},[`& .${A.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${A.endAdornment}`]:{right:9}},[`& .${_.Z.root}.${C.Z.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${A.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${M.Z.root}`]:{paddingTop:19,paddingLeft:8,[`.${A.hasPopupIcon}&, .${A.hasClearIcon}&`]:{paddingRight:39},[`.${A.hasPopupIcon}.${A.hasClearIcon}&`]:{paddingRight:65},[`& .${M.Z.input}`]:{padding:"7px 4px"},[`& .${A.endAdornment}`]:{right:9}},[`& .${M.Z.root}.${C.Z.sizeSmall}`]:{paddingBottom:1,[`& .${M.Z.input}`]:{padding:"2.5px 4px"}},[`& .${C.Z.hiddenLabel}`]:{paddingTop:8},[`& .${M.Z.root}.${C.Z.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${A.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${M.Z.root}.${C.Z.hiddenLabel}.${C.Z.sizeSmall}`]:{[`& .${A.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${A.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${A.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${A.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${A.inputRoot}`]:{flexWrap:"wrap"}}}]}),L=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Z=(0,u.ZP)(w.Z,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),N=(0,u.ZP)(w.Z,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),j=(0,u.ZP)(l.Z,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${A.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((0,c.Z)((({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})))),F=(0,u.ZP)(x.Z,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((0,c.Z)((({theme:e})=>({...e.typography.body1,overflow:"auto"})))),z=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((0,c.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})))),B=(0,u.ZP)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((0,c.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})))),V=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((0,c.Z)((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${A.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${A.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${A.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})))),$=(0,u.ZP)(b,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((0,c.Z)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})))),H=(0,u.ZP)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${A.option}`]:{paddingLeft:24}}),W=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiAutocomplete"}),{autoComplete:a=!1,autoHighlight:u=!1,autoSelect:c=!1,blurOnSelect:p=!1,ChipProps:f,className:m,clearIcon:v=O||(O=(0,g.jsx)(T.Z,{fontSize:"small"})),clearOnBlur:y=!n.freeSolo,clearOnEscape:b=!1,clearText:w="Clear",closeText:k="Close",componentsProps:C,defaultValue:_=(n.multiple?[]:null),disableClearable:M=!1,disableCloseOnSelect:A=!1,disabled:W=!1,disabledItemsFocusable:U=!1,disableListWrap:q=!1,disablePortal:G=!1,filterOptions:K,filterSelectedOptions:Y=!1,forcePopupIcon:X="auto",freeSolo:Q=!1,fullWidth:J=!1,getLimitTagsText:ee=e=>`+${e}`,getOptionDisabled:te,getOptionKey:ne,getOptionLabel:re,isOptionEqualToValue:oe,groupBy:ie,handleHomeEndKeys:ae=!n.freeSolo,id:se,includeInputInList:le=!1,inputValue:ue,limitTags:ce=-1,ListboxComponent:de,ListboxProps:he,loading:pe=!1,loadingText:fe="Loading…",multiple:me=!1,noOptionsText:ge="No options",onChange:ve,onClose:ye,onHighlightChange:be,onInputChange:xe,onOpen:we,open:Se,openOnFocus:ke=!1,openText:Ce="Open",options:_e,PaperComponent:Me,PopperComponent:Te,popupIcon:Pe=I||(I=(0,g.jsx)(P.Z,{})),readOnly:De=!1,renderGroup:Ae,renderInput:Oe,renderOption:Ie,renderTags:Re,selectOnFocus:Ee=!n.freeSolo,size:Le="medium",slots:Ze={},slotProps:Ne={},value:je,...Fe}=n,{getRootProps:ze,getInputProps:Be,getInputLabelProps:Ve,getPopupIndicatorProps:$e,getClearProps:He,getTagProps:We,getListboxProps:Ue,getOptionProps:qe,value:Ge,dirty:Ke,expanded:Ye,id:Xe,popupOpen:Qe,focused:Je,focusedTag:et,anchorEl:tt,setAnchorEl:nt,inputValue:rt,groupedOptions:ot}=(0,s.Z)({...n,componentName:"Autocomplete"}),it=!M&&!W&&Ke&&!De,at=(!Q||!0===X)&&!1!==X,{onMouseDown:st}=Be(),{ref:lt,...ut}=Ue(),ct=re||(e=>e.label??e),dt={...n,disablePortal:G,expanded:Ye,focused:Je,fullWidth:J,getOptionLabel:ct,hasClearIcon:it,hasPopupIcon:at,inputFocused:-1===et,popupOpen:Qe,size:Le},ht=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:s,hasPopupIcon:l,inputFocused:u,popupOpen:c,size:d}=e,p={root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",s&&"hasClearIcon",l&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",u&&"inputFocused"],tag:["tag",`tagSize${(0,h.Z)(d)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,i.Z)(p,D,t)})(dt),pt={slots:{paper:Me,popper:Te,...Ze},slotProps:{chip:f,listbox:he,...C,...Ne}},[ft,mt]=(0,R.Z)("listbox",{elementType:V,externalForwardedProps:pt,ownerState:dt,className:ht.listbox,additionalProps:ut,ref:lt}),[gt,vt]=(0,R.Z)("paper",{elementType:x.Z,externalForwardedProps:pt,ownerState:dt,className:ht.paper}),[yt,bt]=(0,R.Z)("popper",{elementType:l.Z,externalForwardedProps:pt,ownerState:dt,className:ht.popper,additionalProps:{disablePortal:G,style:{width:tt?tt.clientWidth:null},role:"presentation",anchorEl:tt,open:Qe}});let xt;if(me&&Ge.length>0){const e=e=>({className:ht.tag,disabled:W,...We(e)});xt=Re?Re(Ge,e,dt):Ge.map(((t,n)=>{const{key:r,...o}=e({index:n});return(0,g.jsx)(S.Z,{label:ct(t),size:Le,...o,...pt.slotProps.chip},r)}))}if(ce>-1&&Array.isArray(xt)){const e=xt.length-ce;!Je&&e>0&&(xt=xt.splice(0,ce),xt.push((0,g.jsx)("span",{className:ht.tag,children:ee(e)},xt.length)))}const wt=Ae||(e=>(0,g.jsxs)("li",{children:[(0,g.jsx)($,{className:ht.groupLabel,ownerState:dt,component:"div",children:e.group}),(0,g.jsx)(H,{className:ht.groupUl,ownerState:dt,children:e.children})]},e.key)),St=Ie||((e,t)=>{const{key:n,...r}=e;return(0,g.jsx)("li",{...r,children:ct(t)},n)}),kt=(e,t)=>{const n=qe({option:e,index:t});return St({...n,className:ht.option},e,{selected:n["aria-selected"],index:t,inputValue:rt},dt)},Ct=pt.slotProps.clearIndicator,_t=pt.slotProps.popupIndicator;return(0,g.jsxs)(r.Fragment,{children:[(0,g.jsx)(E,{ref:t,className:(0,o.Z)(ht.root,m),ownerState:dt,...ze(Fe),children:Oe({id:Xe,disabled:W,fullWidth:!0,size:"small"===Le?"small":void 0,InputLabelProps:Ve(),InputProps:{ref:nt,className:ht.inputRoot,startAdornment:xt,onMouseDown:e=>{e.target===e.currentTarget&&st(e)},...(it||at)&&{endAdornment:(0,g.jsxs)(L,{className:ht.endAdornment,ownerState:dt,children:[it?(0,g.jsx)(Z,{...He(),"aria-label":w,title:w,ownerState:dt,...Ct,className:(0,o.Z)(ht.clearIndicator,Ct?.className),children:v}):null,at?(0,g.jsx)(N,{...$e(),disabled:W,"aria-label":Qe?k:Ce,title:Qe?k:Ce,ownerState:dt,..._t,className:(0,o.Z)(ht.popupIndicator,_t?.className),children:Pe}):null]})}},inputProps:{className:ht.input,disabled:W,readOnly:De,...Be()}})}),tt?(0,g.jsx)(j,{as:yt,...bt,children:(0,g.jsxs)(F,{as:gt,...vt,children:[pe&&0===ot.length?(0,g.jsx)(z,{className:ht.loading,ownerState:dt,children:fe}):null,0!==ot.length||Q||pe?null:(0,g.jsx)(B,{className:ht.noOptions,ownerState:dt,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:ge}),ot.length>0?(0,g.jsx)(ft,{as:de,...mt,children:ot.map(((e,t)=>ie?wt({key:e.key,group:e.group,children:e.options.map(((t,n)=>kt(t,e.index+n)))}):kt(e,t)))}):null]})}):null]})}))},19090:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(16351),u=n(69761),c=n(44124),d=n(6749);function h(e){return(0,d.ZP)("MuiBackdrop",e)}(0,c.Z)("MuiBackdrop",["root","invisible"]);var p=n(24246);const f=(0,a.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),m=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiBackdrop"}),{children:r,className:a,component:c="div",invisible:d=!1,open:m,components:g={},componentsProps:v={},slotProps:y={},slots:b={},TransitionComponent:x,transitionDuration:w,...S}=n,k={...n,component:c,invisible:d},C=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,i.Z)(r,h,t)})(k),_={slots:{transition:x,root:g.Root,...b},slotProps:{...v,...y}},[M,T]=(0,l.Z)("root",{elementType:f,externalForwardedProps:_,className:(0,o.Z)(C.root,a),ownerState:k}),[P,D]=(0,l.Z)("transition",{elementType:u.Z,externalForwardedProps:_,ownerState:k});return(0,p.jsx)(P,{in:m,timeout:w,...S,...D,children:(0,p.jsx)(M,{"aria-hidden":!0,...T,classes:C,ref:t,children:r})})}))},36372:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(89966),a=n(11652),s=n(93772),l=n(38971),u=n(24246);var c=n(70544),d=n(45178),h=n(92994);const p=(0,n(44124).Z)("MuiBox",["root"]),f=(0,d.Z)(),m=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:c="MuiBox-root",generateClassName:d}=e,h=(0,i.ZP)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(a.Z);return r.forwardRef((function(e,r){const i=(0,l.Z)(n),{className:a,component:p="div",...f}=(0,s.Z)(e);return(0,u.jsx)(h,{as:p,ref:r,className:(0,o.Z)(a,d?d(c):c),theme:t&&i[t]||i,...f})}))}({themeId:h.Z,defaultTheme:f,defaultClassName:p.root,generateClassName:c.Z.generate})},48565:function(e,t,n){"use strict";n.d(t,{Z:()=>A});var r=n(27378),o=n(90496),i=n(16819),a=n(82267),s=n(16838),l=n(56839),u=n(73037),c=n(12709),d=n(82319),h=n(24043),p=n(14544),f=n(50898),m=n(51640),g=n(90433),v=n(44124),y=n(6749);function b(e){return(0,y.ZP)("MuiButton",e)}const x=(0,v.Z)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]);var w=n(55720),S=n(71645),k=n(24246);const C=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],_=(0,c.ZP)(p.Z,{shouldForwardProp:e=>(0,u.Z)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,m.Z)(n.color)}`],t[`size${(0,m.Z)(n.size)}`],t[`${n.variant}Size${(0,m.Z)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,d.Z)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${x.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${x.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${x.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${x.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,g.Z)()).map((([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,s.Fq)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}}))),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${x.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${x.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${x.loading}`]:{color:"transparent"}}}]}}))),M=(0,c.ZP)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,m.Z)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...C]}))),T=(0,c.ZP)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,m.Z)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...C]}))),P=(0,c.ZP)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}))),D=(0,c.ZP)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),A=r.forwardRef((function(e,t){const n=r.useContext(w.Z),s=r.useContext(S.Z),u=(0,i.Z)(n,e),c=(0,h.i)({props:u,name:"MuiButton"}),{children:d,color:p="primary",component:g="button",className:v,disabled:y=!1,disableElevation:x=!1,disableFocusRipple:C=!1,endIcon:A,focusVisibleClassName:O,fullWidth:I=!1,id:R,loading:E=null,loadingIndicator:L,loadingPosition:Z="center",size:N="medium",startIcon:j,type:F,variant:z="text",...B}=c,V=(0,l.Z)(R),$=L??(0,k.jsx)(f.Z,{"aria-labelledby":V,color:"inherit",size:16}),H={...c,color:p,component:g,disabled:y,disableElevation:x,disableFocusRipple:C,fullWidth:I,loading:E,loadingIndicator:$,loadingPosition:Z,size:N,type:F,variant:z},W=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:s,loadingPosition:l,classes:u}=e,c={root:["root",s&&"loading",i,`${i}${(0,m.Z)(t)}`,`size${(0,m.Z)(o)}`,`${i}Size${(0,m.Z)(o)}`,`color${(0,m.Z)(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${(0,m.Z)(l)}`],startIcon:["icon","startIcon",`iconSize${(0,m.Z)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,m.Z)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},d=(0,a.Z)(c,b,u);return{...u,...d}})(H),U=(j||E&&"start"===Z)&&(0,k.jsx)(M,{className:W.startIcon,ownerState:H,children:j||(0,k.jsx)(D,{className:W.loadingIconPlaceholder,ownerState:H})}),q=(A||E&&"end"===Z)&&(0,k.jsx)(T,{className:W.endIcon,ownerState:H,children:A||(0,k.jsx)(D,{className:W.loadingIconPlaceholder,ownerState:H})}),G=s||"",K="boolean"==typeof E?(0,k.jsx)("span",{className:W.loadingWrapper,style:{display:"contents"},children:E&&(0,k.jsx)(P,{className:W.loadingIndicator,ownerState:H,children:$})}):null;return(0,k.jsxs)(_,{ownerState:H,className:(0,o.Z)(n.className,W.root,v,G),component:g,disabled:y||E,focusRipple:!C,focusVisibleClassName:(0,o.Z)(W.focusVisible,O),ref:t,type:F,id:E?V:R,...B,classes:W,children:[U,"end"!==Z&&K,d,"end"===Z&&K,q]})}))},14544:function(e,t,n){"use strict";n.d(t,{Z:()=>O});var r=n(27378),o=n(90496),i=n(82267),a=n(74111),s=n(12709),l=n(24043),u=n(51183),c=n(67151),d=n(99565);class h{static create(){return new h}static use(){const e=(0,d.Z)(h.create).current,[t,n]=r.useState(!1);return e.shouldMount=t,e.setShouldMount=n,r.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then((()=>this.ref.current?.start(...e)))}stop(...e){this.mount().then((()=>this.ref.current?.stop(...e)))}pulsate(...e){this.mount().then((()=>this.ref.current?.pulsate(...e)))}}var p=n(16317),f=n(60203),m=n(10043),g=n(24246);const v=function(e){const{className:t,classes:n,pulsate:i=!1,rippleX:a,rippleY:s,rippleSize:l,in:u,onExited:c,timeout:d}=e,[h,p]=r.useState(!1),f=(0,o.Z)(t,n.ripple,n.rippleVisible,i&&n.ripplePulsate),m={width:l,height:l,top:-l/2+s,left:-l/2+a},v=(0,o.Z)(n.child,h&&n.childLeaving,i&&n.childPulsate);return u||h||p(!0),r.useEffect((()=>{if(!u&&null!=c){const e=setTimeout(c,d);return()=>{clearTimeout(e)}}}),[c,u,d]),(0,g.jsx)("span",{className:f,style:m,children:(0,g.jsx)("span",{className:v})})};var y=n(44124);const b=(0,y.Z)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),x=m.keyframes` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `,w=m.keyframes` 0% { opacity: 1; } 100% { opacity: 0; } `,S=m.keyframes` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `,k=(0,s.ZP)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),C=(0,s.ZP)(v,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; &.${b.rippleVisible} { opacity: 0.3; transform: scale(1); animation-name: ${x}; animation-duration: ${550}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } &.${b.ripplePulsate} { animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; } & .${b.child} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${b.childLeaving} { opacity: 0; animation-name: ${w}; animation-duration: ${550}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } & .${b.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${S}; animation-duration: 2500ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; animation-iteration-count: infinite; animation-delay: 200ms; } `,_=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:s,...u}=n,[c,d]=r.useState([]),h=r.useRef(0),m=r.useRef(null);r.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[c]);const v=r.useRef(!1),y=(0,f.Z)(),x=r.useRef(null),w=r.useRef(null),S=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:s}=e;d((e=>[...e,(0,g.jsx)(C,{classes:{ripple:(0,o.Z)(a.ripple,b.ripple),rippleVisible:(0,o.Z)(a.rippleVisible,b.rippleVisible),ripplePulsate:(0,o.Z)(a.ripplePulsate,b.ripplePulsate),child:(0,o.Z)(a.child,b.child),childLeaving:(0,o.Z)(a.childLeaving,b.childLeaving),childPulsate:(0,o.Z)(a.childPulsate,b.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},h.current)])),h.current+=1,m.current=s}),[a]),_=r.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&v.current)return void(v.current=!1);"touchstart"===e?.type&&(v.current=!0);const s=a?null:w.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===x.current&&(x.current=()=>{S({pulsate:r,rippleX:u,rippleY:c,rippleSize:d,cb:n})},y.start(80,(()=>{x.current&&(x.current(),x.current=null)}))):S({pulsate:r,rippleX:u,rippleY:c,rippleSize:d,cb:n})}),[i,S,y]),M=r.useCallback((()=>{_({},{pulsate:!0})}),[_]),T=r.useCallback(((e,t)=>{if(y.clear(),"touchend"===e?.type&&x.current)return x.current(),x.current=null,void y.start(0,(()=>{T(e,t)}));x.current=null,d((e=>e.length>0?e.slice(1):e)),m.current=t}),[y]);return r.useImperativeHandle(t,(()=>({pulsate:M,start:_,stop:T})),[M,_,T]),(0,g.jsx)(k,{className:(0,o.Z)(b.root,a.root,s),ref:w,...u,children:(0,g.jsx)(p.Z,{component:null,exit:!0,children:c})})}));var M=n(6749);function T(e){return(0,M.ZP)("MuiButtonBase",e)}const P=(0,y.Z)("MuiButtonBase",["root","disabled","focusVisible"]),D=(0,s.ZP)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${P.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function A(e,t,n,r=!1){return(0,c.Z)((o=>(n&&n(o),r||e[t](o),!0)))}const O=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:d=!1,children:p,className:f,component:m="button",disabled:v=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:x=!1,focusVisibleClassName:w,LinkComponent:S="a",onBlur:k,onClick:C,onContextMenu:M,onDragLeave:P,onFocus:O,onFocusVisible:I,onKeyDown:R,onKeyUp:E,onMouseDown:L,onMouseLeave:Z,onMouseUp:N,onTouchEnd:j,onTouchMove:F,onTouchStart:z,tabIndex:B=0,TouchRippleProps:V,touchRippleRef:$,type:H,...W}=n,U=r.useRef(null),q=h.use(),G=(0,u.Z)(q.ref,$),[K,Y]=r.useState(!1);v&&K&&Y(!1),r.useImperativeHandle(s,(()=>({focusVisible:()=>{Y(!0),U.current.focus()}})),[]);const X=q.shouldMount&&!y&&!v;r.useEffect((()=>{K&&x&&!y&&q.pulsate()}),[y,x,K,q]);const Q=A(q,"start",L,b),J=A(q,"stop",M,b),ee=A(q,"stop",P,b),te=A(q,"stop",N,b),ne=A(q,"stop",(e=>{K&&e.preventDefault(),Z&&Z(e)}),b),re=A(q,"start",z,b),oe=A(q,"stop",j,b),ie=A(q,"stop",F,b),ae=A(q,"stop",(e=>{(0,a.Z)(e.target)||Y(!1),k&&k(e)}),!1),se=(0,c.Z)((e=>{U.current||(U.current=e.currentTarget),(0,a.Z)(e.target)&&(Y(!0),I&&I(e)),O&&O(e)})),le=()=>{const e=U.current;return m&&"button"!==m&&!("A"===e.tagName&&e.href)},ue=(0,c.Z)((e=>{x&&!e.repeat&&K&&" "===e.key&&q.stop(e,(()=>{q.start(e)})),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),R&&R(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&!v&&(e.preventDefault(),C&&C(e))})),ce=(0,c.Z)((e=>{x&&" "===e.key&&K&&!e.defaultPrevented&&q.stop(e,(()=>{q.pulsate(e)})),E&&E(e),C&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&C(e)}));let de=m;"button"===de&&(W.href||W.to)&&(de=S);const he={};"button"===de?(he.type=void 0===H?"button":H,he.disabled=v):(W.href||W.to||(he.role="button"),v&&(he["aria-disabled"]=v));const pe=(0,u.Z)(t,U),fe={...n,centerRipple:d,component:m,disabled:v,disableRipple:y,disableTouchRipple:b,focusRipple:x,tabIndex:B,focusVisible:K},me=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a={root:["root",t&&"disabled",n&&"focusVisible"]},s=(0,i.Z)(a,T,o);return n&&r&&(s.root+=` ${r}`),s})(fe);return(0,g.jsxs)(D,{as:de,className:(0,o.Z)(me.root,f),ownerState:fe,onBlur:ae,onClick:C,onContextMenu:J,onFocus:se,onKeyDown:ue,onKeyUp:ce,onMouseDown:Q,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:oe,onTouchMove:ie,onTouchStart:re,ref:pe,tabIndex:v?-1:B,type:H,...he,...W,children:[p,X?(0,g.jsx)(_,{ref:G,center:d,...V}):null]})}))},71645:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext(void 0)},55720:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},84954:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(28866),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiCard",e)}(0,u.Z)("MuiCard",["root"]);var h=n(24246);const p=(0,a.ZP)(l.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),f=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiCard"}),{className:r,raised:a=!1,...l}=n,u={...n,raised:a},c=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(u);return(0,h.jsx)(p,{className:(0,o.Z)(c.root,r),elevation:a?8:void 0,ref:t,ownerState:u,...l})}))},25635:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(44124),u=n(6749);function c(e){return(0,u.ZP)("MuiCardContent",e)}(0,l.Z)("MuiCardContent",["root"]);var d=n(24246);const h=(0,a.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiCardContent"}),{className:r,component:a="div",...l}=n,u={...n,component:a},p=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},c,t)})(u);return(0,d.jsx)(h,{as:a,className:(0,o.Z)(p.root,r),ownerState:u,ref:t,...l})}))},82707:function(e,t,n){"use strict";n.d(t,{Z:()=>D});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(99140),l=n(90247),u=n(24246);const c=(0,l.Z)((0,u.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),d=(0,l.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,l.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var p=n(51640),f=n(73037),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiCheckbox",e)}const y=(0,m.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var b=n(12709),x=n(82319),w=n(90433),S=n(24043),k=n(27834),C=n(16351);const _=(0,b.ZP)(s.Z,{shouldForwardProp:e=>(0,f.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,p.Z)(n.size)}`],"default"!==n.color&&t[`color${(0,p.Z)(n.color)}`]]}})((0,x.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,w.Z)()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter((0,w.Z)()).map((([t])=>({props:{color:t},style:{[`&.${y.checked}, &.${y.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${y.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),M=(0,u.jsx)(d,{}),T=(0,u.jsx)(c,{}),P=(0,u.jsx)(h,{}),D=r.forwardRef((function(e,t){const n=(0,S.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:a=M,color:s="primary",icon:l=T,indeterminate:c=!1,indeterminateIcon:d=P,inputProps:h,size:f="medium",disableRipple:m=!1,className:g,slots:y={},slotProps:b={},...x}=n,w=c?d:l,D=c?d:a,A={...n,disableRipple:m,color:s,indeterminate:c,size:f},O=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,a={root:["root",n&&"indeterminate",`color${(0,p.Z)(r)}`,`size${(0,p.Z)(o)}`]},s=(0,i.Z)(a,v,t);return{...t,...s}})(A),I=b.input??h,[R,E]=(0,C.Z)("root",{ref:t,elementType:_,className:(0,o.Z)(O.root,g),shouldForwardComponentProp:!0,externalForwardedProps:{slots:y,slotProps:b,...x},ownerState:A,additionalProps:{type:"checkbox",icon:r.cloneElement(w,{fontSize:w.props.fontSize??f}),checkedIcon:r.cloneElement(D,{fontSize:D.props.fontSize??f}),disableRipple:m,slots:y,slotProps:{input:(0,k.Z)("function"==typeof I?I(A):I,{"data-indeterminate":c})}}});return(0,u.jsx)(R,{...E,classes:O})}))},52889:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(90247),l=n(24246);const u=(0,s.Z)((0,l.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");var c=n(51183),d=n(51640),h=n(14544),p=n(12709),f=n(82319),m=n(90433),g=n(24043),v=n(44124),y=n(6749);function b(e){return(0,y.ZP)("MuiChip",e)}const x=(0,v.Z)("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),w=(0,p.ZP)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${x.avatar}`]:t.avatar},{[`& .${x.avatar}`]:t[`avatar${(0,d.Z)(s)}`]},{[`& .${x.avatar}`]:t[`avatarColor${(0,d.Z)(r)}`]},{[`& .${x.icon}`]:t.icon},{[`& .${x.icon}`]:t[`icon${(0,d.Z)(s)}`]},{[`& .${x.icon}`]:t[`iconColor${(0,d.Z)(o)}`]},{[`& .${x.deleteIcon}`]:t.deleteIcon},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,d.Z)(s)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIconColor${(0,d.Z)(r)}`]},{[`& .${x.deleteIcon}`]:t[`deleteIcon${(0,d.Z)(l)}Color${(0,d.Z)(r)}`]},t.root,t[`size${(0,d.Z)(s)}`],t[`color${(0,d.Z)(r)}`],i&&t.clickable,i&&"default"!==r&&t[`clickableColor${(0,d.Z)(r)})`],a&&t.deletable,a&&"default"!==r&&t[`deletableColor${(0,d.Z)(r)}`],t[l],t[`${l}${(0,d.Z)(r)}`]]}})((0,f.Z)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${x.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${x.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${x.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${x.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${x.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${x.icon}`]:{marginLeft:5,marginRight:-6},[`& .${x.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,a.Fq)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,a.Fq)(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${x.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${x.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter((0,m.Z)(["contrastText"])).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${x.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].contrastTextChannel} / 0.7)`:(0,a.Fq)(e.palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}}))),{props:e=>e.iconColor===e.color,style:{[`& .${x.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${x.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter((0,m.Z)(["dark"])).map((([t])=>({props:{color:t,onDelete:!0},style:{[`&.${x.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}}))),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.Fq)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter((0,m.Z)(["dark"])).map((([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}}))),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${x.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${x.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${x.avatar}`]:{marginLeft:4},[`& .${x.avatarSmall}`]:{marginLeft:2},[`& .${x.icon}`]:{marginLeft:4},[`& .${x.iconSmall}`]:{marginLeft:2},[`& .${x.deleteIcon}`]:{marginRight:5},[`& .${x.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter((0,m.Z)()).map((([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,a.Fq)(e.palette[t].main,.7)}`,[`&.${x.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)},[`&.${x.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.focusOpacity)},[`& .${x.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,a.Fq)(e.palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}})))]}}))),S=(0,p.ZP)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${(0,d.Z)(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function k(e){return"Backspace"===e.key||"Delete"===e.key}const C=r.forwardRef((function(e,t){const n=(0,g.i)({props:e,name:"MuiChip"}),{avatar:a,className:s,clickable:p,color:f="default",component:m,deleteIcon:v,disabled:y=!1,icon:x,label:C,onClick:_,onDelete:M,onKeyDown:T,onKeyUp:P,size:D="medium",variant:A="filled",tabIndex:O,skipFocusWhenDisabled:I=!1,...R}=n,E=r.useRef(null),L=(0,c.Z)(E,t),Z=e=>{e.stopPropagation(),M&&M(e)},N=!(!1===p||!_)||p,j=N||M?h.Z:m||"div",F={...n,component:j,disabled:y,size:D,color:f,iconColor:r.isValidElement(x)&&x.props.color||f,onDelete:!!M,clickable:N,variant:A},z=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:s,clickable:l,variant:u}=e,c={root:["root",u,n&&"disabled",`size${(0,d.Z)(r)}`,`color${(0,d.Z)(o)}`,l&&"clickable",l&&`clickableColor${(0,d.Z)(o)}`,s&&"deletable",s&&`deletableColor${(0,d.Z)(o)}`,`${u}${(0,d.Z)(o)}`],label:["label",`label${(0,d.Z)(r)}`],avatar:["avatar",`avatar${(0,d.Z)(r)}`,`avatarColor${(0,d.Z)(o)}`],icon:["icon",`icon${(0,d.Z)(r)}`,`iconColor${(0,d.Z)(a)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,d.Z)(r)}`,`deleteIconColor${(0,d.Z)(o)}`,`deleteIcon${(0,d.Z)(u)}Color${(0,d.Z)(o)}`]};return(0,i.Z)(c,b,t)})(F),B=j===h.Z?{component:m||"div",focusVisibleClassName:z.focusVisible,...M&&{disableRipple:!0}}:{};let V=null;M&&(V=v&&r.isValidElement(v)?r.cloneElement(v,{className:(0,o.Z)(v.props.className,z.deleteIcon),onClick:Z}):(0,l.jsx)(u,{className:(0,o.Z)(z.deleteIcon),onClick:Z}));let $=null;a&&r.isValidElement(a)&&($=r.cloneElement(a,{className:(0,o.Z)(z.avatar,a.props.className)}));let H=null;return x&&r.isValidElement(x)&&(H=r.cloneElement(x,{className:(0,o.Z)(z.icon,x.props.className)})),(0,l.jsxs)(w,{as:j,className:(0,o.Z)(z.root,s),disabled:!(!N||!y)||void 0,onClick:_,onKeyDown:e=>{e.currentTarget===e.target&&k(e)&&e.preventDefault(),T&&T(e)},onKeyUp:e=>{e.currentTarget===e.target&&M&&k(e)&&M(e),P&&P(e)},ref:L,tabIndex:I&&y?-1:O,ownerState:F,...B,...R,children:[$||H,(0,l.jsx)(S,{className:(0,o.Z)(z.label),ownerState:F,children:C}),V]})}))},50898:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(27378),o=n(90496),i=n(82267),a=n(10043),s=n(12709),l=n(82319),u=n(24043),c=n(51640),d=n(90433),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiCircularProgress",e)}(0,h.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var m=n(24246);const g=44,v=a.keyframes` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `,y=a.keyframes` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 1px, 200px; stroke-dashoffset: -126px; } `,b="string"!=typeof v?a.css` animation: ${v} 1.4s linear infinite; `:null,x="string"!=typeof y?a.css` animation: ${y} 1.4s ease-in-out infinite; `:null,w=(0,s.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,c.Z)(n.color)}`]]}})((0,l.Z)((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:b||{animation:`${v} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),S=(0,s.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),k=(0,s.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,c.Z)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,l.Z)((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:x||{animation:`${y} 1.4s ease-in-out infinite`}}]})))),C=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiCircularProgress"}),{className:r,color:a="primary",disableShrink:s=!1,size:l=40,style:d,thickness:h=3.6,value:p=0,variant:v="indeterminate",...y}=n,b={...n,color:a,disableShrink:s,size:l,thickness:h,value:p,variant:v},x=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,a={root:["root",n,`color${(0,c.Z)(r)}`],svg:["svg"],circle:["circle",`circle${(0,c.Z)(n)}`,o&&"circleDisableShrink"]};return(0,i.Z)(a,f,t)})(b),C={},_={},M={};if("determinate"===v){const e=2*Math.PI*((g-h)/2);C.strokeDasharray=e.toFixed(3),M["aria-valuenow"]=Math.round(p),C.strokeDashoffset=`${((100-p)/100*e).toFixed(3)}px`,_.transform="rotate(-90deg)"}return(0,m.jsx)(w,{className:(0,o.Z)(x.root,r),style:{width:l,height:l,..._,...d},ownerState:b,ref:t,role:"progressbar",...M,...y,children:(0,m.jsx)(S,{className:x.svg,ownerState:b,viewBox:"22 22 44 44",children:(0,m.jsx)(k,{className:x.circle,style:C,ownerState:b,cx:g,cy:g,r:(g-h)/2,fill:"none",strokeWidth:h})})})}))},24043:function(e,t,n){"use strict";n.d(t,{i:()=>o});n(27378);var r=n(34807);n(24246);function o(e){return(0,r.i)(e)}},56873:function(e,t,n){"use strict";n.d(t,{Z:()=>T});var r=n(27378),o=n(90496),i=n(82267),a=n(5056),s=n(51640),l=n(80058),u=n(69761),c=n(28866),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiDialog",e)}const f=(0,d.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var m=n(56484),g=n(19090),v=n(12709),y=n(94776),b=n(82319),x=n(24043),w=n(16351),S=n(24246);const k=(0,v.ZP)(g.Z,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),C=(0,v.ZP)(l.Z,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),_=(0,v.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,s.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"}}}]}),M=(0,v.ZP)(c.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,s.Z)(n.scroll)}`],t[`paperWidth${(0,s.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,b.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)`,[`&.${f.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}`,[`&.${f.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,[`&.${f.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]})))),T=r.forwardRef((function(e,t){const n=(0,x.i)({props:e,name:"MuiDialog"}),l=(0,y.Z)(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":h,"aria-labelledby":f,"aria-modal":g=!0,BackdropComponent:v,BackdropProps:b,children:T,className:P,disableEscapeKeyDown:D=!1,fullScreen:A=!1,fullWidth:O=!1,maxWidth:I="sm",onBackdropClick:R,onClick:E,onClose:L,open:Z,PaperComponent:N=c.Z,PaperProps:j={},scroll:F="paper",slots:z={},slotProps:B={},TransitionComponent:V=u.Z,transitionDuration:$=d,TransitionProps:H,...W}=n,U={...n,disableEscapeKeyDown:D,fullScreen:A,fullWidth:O,maxWidth:I,scroll:F},q=(e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(n)}`],paper:["paper",`paperScroll${(0,s.Z)(n)}`,`paperWidth${(0,s.Z)(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]};return(0,i.Z)(l,p,t)})(U),G=r.useRef(),K=(0,a.Z)(f),Y=r.useMemo((()=>({titleId:K})),[K]),X={slots:{transition:V,...z},slotProps:{transition:H,paper:j,backdrop:b,...B}},[Q,J]=(0,w.Z)("root",{elementType:C,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:U,className:(0,o.Z)(q.root,P),ref:t}),[ee,te]=(0,w.Z)("backdrop",{elementType:k,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:U}),[ne,re]=(0,w.Z)("paper",{elementType:M,shouldForwardComponentProp:!0,externalForwardedProps:X,ownerState:U,className:(0,o.Z)(q.paper,j.className)}),[oe,ie]=(0,w.Z)("container",{elementType:_,externalForwardedProps:X,ownerState:U,className:(0,o.Z)(q.container)}),[ae,se]=(0,w.Z)("transition",{elementType:u.Z,externalForwardedProps:X,ownerState:U,additionalProps:{appear:!0,in:Z,timeout:$,role:"presentation"}});return(0,S.jsx)(Q,{closeAfterTransition:!0,slots:{backdrop:ee},slotProps:{backdrop:{transitionDuration:$,as:v,...te}},disableEscapeKeyDown:D,onClose:L,open:Z,onClick:e=>{E&&E(e),G.current&&(G.current=null,R&&R(e),L&&L(e,"backdropClick"))},...J,...W,children:(0,S.jsx)(ae,{...se,children:(0,S.jsx)(oe,{onMouseDown:e=>{G.current=e.target===e.currentTarget},...ie,children:(0,S.jsx)(ne,{as:N,elevation:24,role:"dialog","aria-describedby":h,"aria-labelledby":K,"aria-modal":g,...re,children:(0,S.jsx)(m.Z.Provider,{value:Y,children:T})})})})})}))},56484:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},70616:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(44124),u=n(6749);function c(e){return(0,u.ZP)("MuiDialogActions",e)}(0,l.Z)("MuiDialogActions",["root","spacing"]);var d=n(24246);const h=(0,a.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{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}}}]}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:a=!1,...l}=n,u={...n,disableSpacing:a},p=(e=>{const{classes:t,disableSpacing:n}=e,r={root:["root",!n&&"spacing"]};return(0,i.Z)(r,c,t)})(u);return(0,d.jsx)(h,{className:(0,o.Z)(p.root,r),ownerState:u,ref:t,...l})}))},19978:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiDialogContent",e)}(0,u.Z)("MuiDialogContent",["root","dividers"]);var h=n(30138),p=n(24246);const f=(0,a.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,s.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:{[`.${h.Z.root} + &`]:{paddingTop:0}}}]})))),m=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContent"}),{className:r,dividers:a=!1,...s}=n,u={...n,dividers:a},c=(e=>{const{classes:t,dividers:n}=e,r={root:["root",n&&"dividers"]};return(0,i.Z)(r,d,t)})(u);return(0,p.jsx)(f,{className:(0,o.Z)(c.root,r),ownerState:u,ref:t,...s})}))},51602:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(52054),s=n(12709),l=n(24043),u=n(30138),c=n(56484),d=n(24246);const h=(0,s.ZP)(a.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),p=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiDialogTitle"}),{className:a,id:s,...p}=n,f=n,m=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},u.a,t)})(f),{titleId:g=s}=r.useContext(c.Z);return(0,d.jsx)(h,{component:"h2",className:(0,o.Z)(m.root,a),ownerState:f,ref:t,variant:"h6",id:s??g,...p})}))},30138:function(e,t,n){"use strict";n.d(t,{Z:()=>a,a:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiDialogTitle",e)}const a=(0,r.Z)("MuiDialogTitle",["root"])},79119:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(12709),l=n(82319),u=n(24043),c=n(38062),d=n(24246);const h=(0,s.ZP)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((0,l.Z)((({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,a.Fq)(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]})))),p=(0,s.ZP)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((0,l.Z)((({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]})))),f=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:a,className:s,orientation:l="horizontal",component:f=(a||"vertical"===l?"div":"hr"),flexItem:m=!1,light:g=!1,role:v=("hr"!==f?"separator":void 0),textAlign:y="center",variant:b="fullWidth",...x}=n,w={...n,absolute:r,component:f,flexItem:m,light:g,orientation:l,role:v,textAlign:y,variant:b},S=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:a,orientation:s,textAlign:l,variant:u}=e,d={root:["root",t&&"absolute",u,a&&"light","vertical"===s&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===s&&"withChildrenVertical","right"===l&&"vertical"!==s&&"textAlignRight","left"===l&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]};return(0,i.Z)(d,c.V,r)})(w);return(0,d.jsx)(h,{as:f,className:(0,o.Z)(S.root,s),role:v,ref:t,ownerState:w,"aria-orientation":"separator"!==v||"hr"===f&&"vertical"!==l?void 0:l,...x,children:a?(0,d.jsx)(p,{className:S.wrapper,ownerState:w,children:a}):null})}));f&&(f.muiSkipListHighlight=!0);const m=f},38062:function(e,t,n){"use strict";n.d(t,{V:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiDivider",e)}const a=(0,r.Z)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"])},69761:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(27378),o=n(41825),i=n(94680),a=n(94776),s=n(42777),l=n(51183),u=n(24246);const c={entering:{opacity:1},entered:{opacity:1}},d=r.forwardRef((function(e,t){const n=(0,a.Z)(),d={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:h,appear:p=!0,children:f,easing:m,in:g,onEnter:v,onEntered:y,onEntering:b,onExit:x,onExited:w,onExiting:S,style:k,timeout:C=d,TransitionComponent:_=o.ZP,...M}=e,T=r.useRef(null),P=(0,l.Z)(T,(0,i.Z)(f),t),D=e=>t=>{if(e){const n=T.current;void 0===t?e(n):e(n,t)}},A=D(b),O=D(((e,t)=>{(0,s.n)(e);const r=(0,s.C)({style:k,timeout:C,easing:m},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),v&&v(e,t)})),I=D(y),R=D(S),E=D((e=>{const t=(0,s.C)({style:k,timeout:C,easing:m},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),x&&x(e)})),L=D(w);return(0,u.jsx)(_,{appear:p,in:g,nodeRef:T,onEnter:O,onEntered:I,onEntering:A,onExit:E,onExited:L,onExiting:R,addEndListener:e=>{h&&h(T.current,e)},timeout:C,...M,children:(e,{ownerState:t,...n})=>r.cloneElement(f,{style:{opacity:0,visibility:"exited"!==e||g?void 0:"hidden",...c[e],...k,...f.props.style},ref:P,...n})})}))},90222:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(61170),i=n(82267),a=n(55879),s=n(73037),l=n(12709),u=n(82319),c=n(90433),d=n(24043),h=n(6499),p=n(51640),f=n(24246);const m=(0,l.ZP)(a.Ej,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,a.Gx)(e,t),!n.disableUnderline&&t.underline]}})((0,u.Z)((({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,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:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${h.Z.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${h.Z.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,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"},[`&.${h.Z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.Z.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})`:n}`,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(.${h.Z.disabled}, .${h.Z.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${h.Z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}}))),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}}))),g=(0,l.ZP)(a.ni,{name:"MuiFilledInput",slot:"Input",overridesResolver:a._o})((0,u.Z)((({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]})))),v=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:s={},componentsProps:l,fullWidth:u=!1,hiddenLabel:c,inputComponent:v="input",multiline:y=!1,slotProps:b,slots:x={},type:w="text",...S}=n,k={...n,disableUnderline:r,fullWidth:u,inputComponent:v,multiline:y,type:w},C=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:a,hiddenLabel:s,multiline:l}=e,u={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===a&&`size${(0,p.Z)(a)}`,s&&"hiddenLabel",l&&"multiline"],input:["input"]},c=(0,i.Z)(u,h._,t);return{...t,...c}})(n),_={root:{ownerState:k},input:{ownerState:k}},M=b??l?(0,o.Z)(_,b??l):_,T=x.root??s.Root??m,P=x.input??s.Input??g;return(0,f.jsx)(a.ZP,{slots:{root:T,input:P},slotProps:M,fullWidth:u,inputComponent:v,multiline:y,ref:t,type:w,...S,classes:C})}));v.muiName="Input";const y=v},6499:function(e,t,n){"use strict";n.d(t,{Z:()=>a,_:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiFilledInput",e)}const a={...n(3597).Z,...(0,r.Z)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},90192:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(65021),u=n(51640),c=n(70777),d=n(29992),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiFormControl",e)}(0,h.Z)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var m=n(24246);const g=(0,a.ZP)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${(0,u.Z)(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),v=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiFormControl"}),{children:a,className:h,color:p="primary",component:v="div",disabled:y=!1,error:b=!1,focused:x,fullWidth:w=!1,hiddenLabel:S=!1,margin:k="none",required:C=!1,size:_="medium",variant:M="outlined",...T}=n,P={...n,color:p,component:v,disabled:y,error:b,fullWidth:w,hiddenLabel:S,margin:k,required:C,size:_,variant:M},D=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&`margin${(0,u.Z)(n)}`,r&&"fullWidth"]};return(0,i.Z)(o,f,t)})(P),[A,O]=r.useState((()=>{let e=!1;return a&&r.Children.forEach(a,(t=>{if(!(0,c.Z)(t,["Input","Select"]))return;const n=(0,c.Z)(t,["Select"])?t.props.input:t;n&&(0,l.B7)(n.props)&&(e=!0)})),e})),[I,R]=r.useState((()=>{let e=!1;return a&&r.Children.forEach(a,(t=>{(0,c.Z)(t,["Input","Select"])&&((0,l.vd)(t.props,!0)||(0,l.vd)(t.props.inputProps,!0))&&(e=!0)})),e})),[E,L]=r.useState(!1);y&&E&&L(!1);const Z=void 0===x||y?E:x;let N;r.useRef(!1);const j=r.useCallback((()=>{R(!0)}),[]),F=r.useCallback((()=>{R(!1)}),[]),z=r.useMemo((()=>({adornedStart:A,setAdornedStart:O,color:p,disabled:y,error:b,filled:I,focused:Z,fullWidth:w,hiddenLabel:S,size:_,onBlur:()=>{L(!1)},onFocus:()=>{L(!0)},onEmpty:F,onFilled:j,registerEffect:N,required:C,variant:M})),[A,p,y,b,I,Z,w,S,N,F,j,C,_,M]);return(0,m.jsx)(d.Z.Provider,{value:z,children:(0,m.jsx)(g,{as:v,ownerState:P,className:(0,o.Z)(D.root,h),ref:t,...T,children:a})})}))},29992:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext(void 0)},33567:function(e,t,n){"use strict";function r({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}n.d(t,{Z:()=>r})},36683:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(29992);function i(){return r.useContext(o.Z)}},28797:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(27378),o=n(90496),i=n(82267),a=n(36683),s=n(12709),l=n(82319),u=n(24043),c=n(52054),d=n(51640),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiFormControlLabel",e)}const m=(0,h.Z)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var g=n(33567),v=n(16351),y=n(24246);const b=(0,s.ZP)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${m.label}`]:t.label},t.root,t[`labelPlacement${(0,d.Z)(n.labelPlacement)}`]]}})((0,l.Z)((({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${m.disabled}`]:{cursor:"default"},[`& .${m.label}`]:{[`&.${m.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]})))),x=(0,s.ZP)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,l.Z)((({theme:e})=>({[`&.${m.error}`]:{color:(e.vars||e).palette.error.main}})))),w=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiFormControlLabel"}),{checked:s,className:l,componentsProps:h={},control:p,disabled:m,disableTypography:w,inputRef:S,label:k,labelPlacement:C="end",name:_,onChange:M,required:T,slots:P={},slotProps:D={},value:A,...O}=n,I=(0,a.Z)(),R=m??p.props.disabled??I?.disabled,E=T??p.props.required,L={disabled:R,required:E};["checked","name","onChange","value","inputRef"].forEach((e=>{void 0===p.props[e]&&void 0!==n[e]&&(L[e]=n[e])}));const Z=(0,g.Z)({props:n,muiFormControl:I,states:["error"]}),N={...n,disabled:R,labelPlacement:C,required:E,error:Z.error},j=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:a}=e,s={root:["root",n&&"disabled",`labelPlacement${(0,d.Z)(r)}`,o&&"error",a&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,i.Z)(s,f,t)})(N),F={slots:P,slotProps:{...h,...D}},[z,B]=(0,v.Z)("typography",{elementType:c.Z,externalForwardedProps:F,ownerState:N});let V=k;return null==V||V.type===c.Z||w||(V=(0,y.jsx)(z,{component:"span",...B,className:(0,o.Z)(j.label,B?.className),children:V})),(0,y.jsxs)(b,{className:(0,o.Z)(j.root,l),ownerState:N,ref:t,...O,children:[r.cloneElement(p,L),E?(0,y.jsxs)("div",{children:[V,(0,y.jsxs)(x,{ownerState:N,"aria-hidden":!0,className:j.asterisk,children:[" ","*"]})]}):V]})}))},32931:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(27378),o=n(90496),i=n(82267),a=n(33567),s=n(36683),l=n(12709),u=n(82319),c=n(24043),d=n(51640),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiFormHelperText",e)}const m=(0,h.Z)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var g,v=n(24246);const y=(0,l.ZP)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,d.Z)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((0,u.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${m.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${m.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]})))),b=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiFormHelperText"}),{children:r,className:l,component:u="p",disabled:h,error:p,filled:m,focused:b,margin:x,required:w,variant:S,...k}=n,C=(0,s.Z)(),_=(0,a.Z)({props:n,muiFormControl:C,states:["variant","size","disabled","error","filled","focused","required"]}),M={...n,component:u,contained:"filled"===_.variant||"outlined"===_.variant,variant:_.variant,size:_.size,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required};delete M.ownerState;const T=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:a,filled:s,focused:l,required:u}=e,c={root:["root",o&&"disabled",a&&"error",r&&`size${(0,d.Z)(r)}`,n&&"contained",l&&"focused",s&&"filled",u&&"required"]};return(0,i.Z)(c,f,t)})(M);return(0,v.jsx)(y,{as:u,className:(0,o.Z)(T.root,l),ref:t,...k,ownerState:M,children:" "===r?g||(g=(0,v.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})}))},23626:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(33567),s=n(36683),l=n(51640),u=n(12709),c=n(82319),d=n(90433),h=n(24043),p=n(15143),f=n(24246);const m=(0,u.ZP)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})((0,c.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{[`&.${p.Z.focused}`]:{color:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${p.Z.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${p.Z.error}`]:{color:(e.vars||e).palette.error.main}}}]})))),g=(0,u.ZP)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((0,c.Z)((({theme:e})=>({[`&.${p.Z.error}`]:{color:(e.vars||e).palette.error.main}})))),v=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiFormLabel"}),{children:r,className:u,color:c,component:d="label",disabled:v,error:y,filled:b,focused:x,required:w,...S}=n,k=(0,s.Z)(),C=(0,a.Z)({props:n,muiFormControl:k,states:["color","required","focused","disabled","error","filled"]}),_={...n,color:C.color||"primary",component:d,disabled:C.disabled,error:C.error,filled:C.filled,focused:C.focused,required:C.required},M=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:a,filled:s,required:u}=e,c={root:["root",`color${(0,l.Z)(n)}`,o&&"disabled",a&&"error",s&&"filled",r&&"focused",u&&"required"],asterisk:["asterisk",a&&"error"]};return(0,i.Z)(c,p.M,t)})(_);return(0,f.jsxs)(m,{as:d,ownerState:_,className:(0,o.Z)(M.root,u),ref:t,...S,children:[r,C.required&&(0,f.jsxs)(g,{ownerState:_,"aria-hidden":!0,className:M.asterisk,children:[" ","*"]})]})}))},15143:function(e,t,n){"use strict";n.d(t,{M:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiFormLabel",e)}const a=(0,r.Z)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"])},38359:function(e,t,n){"use strict";n.d(t,{ZP:()=>w});var r=n(27378),o=n(90496),i=n(13890),a=n(93772),s=n(82267),l=n(12709),u=n(24043),c=n(94776);const d=r.createContext();var h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiGrid",e)}const m=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],g=(0,h.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}`)),...m.map((e=>`grid-xs-${e}`)),...m.map((e=>`grid-sm-${e}`)),...m.map((e=>`grid-md-${e}`)),...m.map((e=>`grid-lg-${e}`)),...m.map((e=>`grid-xl-${e}`))]);var v=n(24246);function y({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const b=(0,l.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=n;let 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)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(a,u,t));const d=[];return u.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,i&&t.item,l&&t.zeroMinWidth,...c,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({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}){const n=(0,i.P$)({values:t.direction,breakpoints:e.breakpoints.values});return(0,i.k9)({theme:e},n,(e=>{const t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${g.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=(0,i.P$)({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=y({breakpoints:e.breakpoints.values,values:t})),o=(0,i.k9)({theme:e},t,((t,r)=>{const o=e.spacing(t);return"0px"!==o?{marginTop:`calc(-1 * ${o})`,[`& > .${g.item}`]:{paddingTop:o}}:n?.includes(r)?{}:{marginTop:0,[`& > .${g.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=(0,i.P$)({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=y({breakpoints:e.breakpoints.values,values:t})),o=(0,i.k9)({theme:e},t,((t,r)=>{const o=e.spacing(t);if("0px"!==o){return{width:`calc(100% + ${o})`,marginLeft:`calc(-1 * ${o})`,[`& > .${g.item}`]:{paddingLeft:o}}}return n?.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${g.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let a={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=(0,i.P$)({values:t.columns,breakpoints:e.breakpoints.values}),l="object"==typeof s?s[o]:s;if(null==l)return r;const u=Math.round(n/l*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${u} + ${n})`;c={flexBasis:e,maxWidth:e}}}a={flexBasis:u,flexGrow:0,maxWidth:u,...c}}return 0===e.breakpoints.values[o]?Object.assign(r,a):r[e.breakpoints.up(o)]=a,r}),{})}));const x=e=>{const{classes:t,container:n,direction:r,item:o,spacing:i,wrap:a,zeroMinWidth:l,breakpoints:u}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(i,u));const d=[];u.forEach((t=>{const n=e[t];n&&d.push(`grid-${t}-${String(n)}`)}));const h={root:["root",n&&"container",o&&"item",l&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==a&&`wrap-xs-${String(a)}`,...d]};return(0,s.Z)(h,f,t)};const w=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiGrid"}),{breakpoints:i}=(0,c.Z)(),s=(0,a.Z)(n),{className:l,columns:h,columnSpacing:p,component:f="div",container:m=!1,direction:g="row",item:y=!1,rowSpacing:w,spacing:S=0,wrap:k="wrap",zeroMinWidth:C=!1,..._}=s,M=w||S,T=p||S,P=r.useContext(d),D=m?h||12:P,A={},O={..._};i.keys.forEach((e=>{null!=_[e]&&(A[e]=_[e],delete O[e])}));const I={...s,columns:D,container:m,direction:g,item:y,rowSpacing:M,columnSpacing:T,wrap:k,zeroMinWidth:C,spacing:S,...A,breakpoints:i.keys},R=x(I);return(0,v.jsx)(d.Provider,{value:D,children:(0,v.jsx)(b,{ownerState:I,className:(0,o.Z)(R.root,l),as:f,ref:t,...O})})}))},41305:function(e,t,n){"use strict";n.d(t,{Z:()=>L});var r=n(27378),o=n(90496),i=n(11104),a=n(6749),s=n(82267),l=n(4560),u=n(22179),c=n(38971),d=n(93772),h=n(6798);const p=(e,t,n)=>{const r=e.keys[0];if(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)}));else if(t&&"object"==typeof t){(Object.keys(t).length>e.keys.length?e.keys:(o=e.keys,i=Object.keys(t),o.filter((e=>i.includes(e))))).forEach((o=>{if(e.keys.includes(o)){const i=t[o];void 0!==i&&n(((t,n)=>{r===o?Object.assign(t,n):t[e.up(o)]=n}),i)}}))}else"number"!=typeof t&&"string"!=typeof t||n(((e,t)=>{Object.assign(e,t)}),t);var o,i};function f(e){return`--Grid-${e}Spacing`}function m(e){return`--Grid-parent-${e}Spacing`}const g="--Grid-columns",v="--Grid-parent-columns",y=({theme:e,ownerState:t})=>{const n={};return p(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(${v}) - (var(${v}) - ${t}) * (var(${m("column")}) / var(${v})))`}),e(n,r)})),n},b=({theme:e,ownerState:t})=>{const n={};return p(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(${v}) + var(${m("column")}) * ${t} / var(${v}))`}),e(n,r)})),n},x=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[g]:12};return p(e.breakpoints,t.columns,((e,t)=>{const r=t??12;e(n,{[g]:r,"> *":{[v]:r}})})),n},w=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.rowSpacing,((t,r)=>{const o="string"==typeof r?r:e.spacing?.(r);t(n,{[f("row")]:o,"> *":{[m("row")]:o}})})),n},S=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.columnSpacing,((t,r)=>{const o="string"==typeof r?r:e.spacing?.(r);t(n,{[f("column")]:o,"> *":{[m("column")]:o}})})),n},k=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return p(e.breakpoints,t.direction,((e,t)=>{e(n,{flexDirection:t})})),n},C=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${f("row")}) var(${f("column")})`}}),_=e=>{const t=[];return Object.entries(e).forEach((([e,n])=>{!1!==n&&void 0!==n&&t.push(`grid-${e}-${String(n)}`)})),t},M=(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)){const t=[];return Object.entries(e).forEach((([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)})),t}return[]},T=e=>void 0===e?[]:"object"==typeof e?Object.entries(e).map((([e,t])=>`direction-${e}-${t}`)):[`direction-xs-${String(e)}`];var P=n(24246);const D=(0,h.Z)(),A=(0,l.Z)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function O(e){return(0,u.Z)({props:e,name:"MuiGrid",defaultTheme:D})}var I=n(12709),R=n(24043),E=n(94776);const L=function(e={}){const{createStyledComponent:t=A,useThemeProps:n=O,useTheme:l=c.Z,componentName:u="MuiGrid"}=e;function h(e,t,n=()=>!0){const r={};return null===e||(Array.isArray(e)?e.forEach(((e,o)=>{null!==e&&n(e)&&t.keys[o]&&(r[t.keys[o]]=e)})):"object"==typeof e?Object.keys(e).forEach((t=>{const o=e[t];null!=o&&n(o)&&(r[t]=o)})):r[t.keys[0]]=e),r}const p=t(x,S,w,y,k,C,b),f=r.forwardRef((function(e,t){const c=l(),f=n(e),m=(0,d.Z)(f);!function(e,t){const 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])}))}(m,c.breakpoints);const{className:g,children:v,columns:y=12,container:b=!1,component:x="div",direction:w="row",wrap:S="wrap",size:k={},offset:C={},spacing:D=0,rowSpacing:A=D,columnSpacing:O=D,unstable_level:I=0,...R}=m,E=h(k,c.breakpoints,(e=>!1!==e)),L=h(C,c.breakpoints),Z=e.columns??(I?void 0:y),N=e.spacing??(I?void 0:D),j=e.rowSpacing??e.spacing??(I?void 0:A),F=e.columnSpacing??e.spacing??(I?void 0:O),z={...m,level:I,columns:Z,container:b,direction:w,wrap:S,spacing:N,rowSpacing:j,columnSpacing:F,size:E,offset:L},B=((e,t)=>{const{container:n,direction:r,spacing:o,wrap:i,size:l}=e,c={root:["root",n&&"container","wrap"!==i&&`wrap-xs-${String(i)}`,...T(r),..._(l),...n?M(o,t.breakpoints.keys[0]):[]]};return(0,s.Z)(c,(e=>(0,a.ZP)(u,e)),{})})(z,c);return(0,P.jsx)(p,{ref:t,as:x,ownerState:z,className:(0,o.Z)(B.root,g),...R,children:r.Children.map(v,(e=>r.isValidElement(e)&&(0,i.Z)(e,["Grid"])&&b&&e.props.container?r.cloneElement(e,{unstable_level:e.props?.unstable_level??I+1}):e))})}));return f.muiName="Grid",f}({createStyledComponent:(0,I.ZP)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,R.i)({props:e,name:"MuiGrid2"}),useTheme:E.Z})},23382:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(60203),i=n(94680),a=n(41825),s=n(94776),l=n(42777),u=n(51183),c=n(24246);function d(e){return`scale(${e}, ${e**2})`}const h={entering:{opacity:1,transform:d(1)},entered:{opacity:1,transform:"none"}},p="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),f=r.forwardRef((function(e,t){const{addEndListener:n,appear:f=!0,children:m,easing:g,in:v,onEnter:y,onEntered:b,onEntering:x,onExit:w,onExited:S,onExiting:k,style:C,timeout:_="auto",TransitionComponent:M=a.ZP,...T}=e,P=(0,o.Z)(),D=r.useRef(),A=(0,s.Z)(),O=r.useRef(null),I=(0,u.Z)(O,(0,i.Z)(m),t),R=e=>t=>{if(e){const n=O.current;void 0===t?e(n):e(n,t)}},E=R(x),L=R(((e,t)=>{(0,l.n)(e);const{duration:n,delay:r,easing:o}=(0,l.C)({style:C,timeout:_,easing:g},{mode:"enter"});let i;"auto"===_?(i=A.transitions.getAutoHeightDuration(e.clientHeight),D.current=i):i=n,e.style.transition=[A.transitions.create("opacity",{duration:i,delay:r}),A.transitions.create("transform",{duration:p?i:.666*i,delay:r,easing:o})].join(","),y&&y(e,t)})),Z=R(b),N=R(k),j=R((e=>{const{duration:t,delay:n,easing:r}=(0,l.C)({style:C,timeout:_,easing:g},{mode:"exit"});let o;"auto"===_?(o=A.transitions.getAutoHeightDuration(e.clientHeight),D.current=o):o=t,e.style.transition=[A.transitions.create("opacity",{duration:o,delay:n}),A.transitions.create("transform",{duration:p?o:.666*o,delay:p?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=d(.75),w&&w(e)})),F=R(S);return(0,c.jsx)(M,{appear:f,in:v,nodeRef:O,onEnter:L,onEntered:Z,onEntering:E,onExit:j,onExited:F,onExiting:N,addEndListener:e=>{"auto"===_&&P.start(D.current||0,e),n&&n(O.current,e)},timeout:"auto"===_?null:_,...T,children:(e,{ownerState:t,...n})=>r.cloneElement(m,{style:{opacity:0,transform:d(.75),visibility:"exited"!==e||v?void 0:"hidden",...h[e],...C,...m.props.style},ref:I,...n})})}));f&&(f.muiSupportAuto=!0);const m=f},75094:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(27378),o=n(90496),i=n(82267),a=n(56839),s=n(16838),l=n(12709),u=n(82319),c=n(90433),d=n(24043),h=n(14544),p=n(50898),f=n(51640),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiIconButton",e)}const y=(0,m.Z)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]);var b=n(24246);const x=(0,l.ZP)(h.Z,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,f.Z)(n.color)}`],n.edge&&t[`edge${(0,f.Z)(n.edge)}`],t[`size${(0,f.Z)(n.size)}`]]}})((0,u.Z)((({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]}))),(0,u.Z)((({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}}))),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${y.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${y.loading}`]:{color:"transparent"}})))),w=(0,l.ZP)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]}))),S=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:s,className:l,color:u="default",disabled:c=!1,disableFocusRipple:h=!1,size:m="medium",id:g,loading:y=null,loadingIndicator:S,...k}=n,C=(0,a.Z)(g),_=S??(0,b.jsx)(p.Z,{"aria-labelledby":C,color:"inherit",size:16}),M={...n,edge:r,color:u,disabled:c,disableFocusRipple:h,loading:y,loadingIndicator:_,size:m},T=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:a,loading:s}=e,l={root:["root",s&&"loading",n&&"disabled","default"!==r&&`color${(0,f.Z)(r)}`,o&&`edge${(0,f.Z)(o)}`,`size${(0,f.Z)(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,i.Z)(l,v,t)})(M);return(0,b.jsxs)(x,{id:y?C:g,className:(0,o.Z)(T.root,l),centerRipple:!0,focusRipple:!h,disabled:c||y,ref:t,...k,ownerState:M,children:["boolean"==typeof y&&(0,b.jsx)("span",{className:T.loadingWrapper,style:{display:"contents"},children:(0,b.jsx)(w,{className:T.loadingIndicator,ownerState:M,children:y&&_})}),s]})}))},20540:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(82267),i=n(61170),a=n(55879),s=n(73037),l=n(12709),u=n(82319),c=n(90433),d=n(24043),h=n(28678),p=n(24246);const f=(0,l.ZP)(a.Ej,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,a.Gx)(e,t),!n.disableUnderline&&t.underline]}})((0,u.Z)((({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})`),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,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"},[`&.${h.Z.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${h.Z.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(.${h.Z.disabled}, .${h.Z.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${h.Z.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,c.Z)()).map((([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})))]}}))),m=(0,l.ZP)(a.ni,{name:"MuiInput",slot:"Input",overridesResolver:a._o})({}),g=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:s={},componentsProps:l,fullWidth:u=!1,inputComponent:c="input",multiline:g=!1,slotProps:v,slots:y={},type:b="text",...x}=n,w=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,o.Z)(r,h.l,t);return{...t,...i}})(n),S={root:{ownerState:{disableUnderline:r}}},k=v??l?(0,i.Z)(v??l,S):S,C=y.root??s.Root??f,_=y.input??s.Input??m;return(0,p.jsx)(a.ZP,{slots:{root:C,input:_},slotProps:k,fullWidth:u,inputComponent:c,multiline:g,ref:t,type:b,...x,classes:w})}));g.muiName="Input";const v=g},28678:function(e,t,n){"use strict";n.d(t,{Z:()=>a,l:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiInput",e)}const a={...n(3597).Z,...(0,r.Z)("MuiInput",["root","underline","input"])}},76992:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(82267),a=n(51640),s=n(52054),l=n(29992),u=n(36683),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiInputAdornment",e)}const g=(0,p.Z)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var v,y=n(24246);const b=(0,c.ZP)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${(0,a.Z)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((0,d.Z)((({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${g.positionStart}&:not(.${g.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]})))),x=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiInputAdornment"}),{children:c,className:d,component:p="div",disablePointerEvents:f=!1,disableTypography:g=!1,position:x,variant:w,...S}=n,k=(0,u.Z)()||{};let C=w;w&&k.variant,k&&!C&&(C=k.variant);const _={...n,hiddenLabel:k.hiddenLabel,size:k.size,disablePointerEvents:f,position:x,variant:C},M=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:s,variant:l}=e,u={root:["root",n&&"disablePointerEvents",o&&`position${(0,a.Z)(o)}`,l,r&&"hiddenLabel",s&&`size${(0,a.Z)(s)}`]};return(0,i.Z)(u,m,t)})(_);return(0,y.jsx)(l.Z.Provider,{value:null,children:(0,y.jsx)(b,{as:p,ownerState:_,className:(0,o.Z)(M.root,d),ref:t,...S,children:"string"!=typeof c||g?(0,y.jsxs)(r.Fragment,{children:["start"===x?v||(v=(0,y.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,c]}):(0,y.jsx)(s.Z,{color:"textSecondary",children:c})})})}))},55879:function(e,t,n){"use strict";n.d(t,{_o:()=>A,ni:()=>I,ZP:()=>E,Ej:()=>O,Gx:()=>D});var r=n(62220),o=n(27378),i=n(90496),a=n(82267),s=n(97048),l=n(33205),u=n(96858),c=n(24384),d=n(24246);function h(e){return parseInt(e,10)||0}const p={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const f=o.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:f,...m}=e,{current:g}=o.useRef(null!=f),v=o.useRef(null),y=(0,s.Z)(t,v),b=o.useRef(null),x=o.useRef(null),w=o.useCallback((()=>{const t=v.current,n=x.current;if(!t||!n)return;const o=(0,l.Z)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=h(o.paddingBottom)+h(o.paddingTop),u=h(o.borderBottomWidth)+h(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+u:0),overflowing:Math.abs(p-c)<=1}}),[r,i,e.placeholder]),S=o.useCallback((()=>{const e=v.current,t=w();if(!e||!t||(function(e){for(const t in e)return!1;return!0}(n=t)||0===n.outerHeightStyle&&!n.overflowing))return;var n;const r=t.outerHeightStyle;b.current!==r&&(b.current=r,e.style.height=`${r}px`),e.style.overflow=t.overflowing?"hidden":""}),[w]),k=o.useRef(-1);(0,u.Z)((()=>{const e=(0,c.Z)((()=>S())),t=v?.current;if(!t)return;const n=(0,l.Z)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver((()=>{r.unobserve(t),cancelAnimationFrame(k.current),S(),k.current=requestAnimationFrame((()=>{r.observe(t)}))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(k.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[w,S]),(0,u.Z)((()=>{S()}));return(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("textarea",{value:f,onChange:e=>{g||S(),n&&n(e)},ref:y,rows:i,style:a,...m}),(0,d.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:x,tabIndex:-1,style:{...p,...a,paddingTop:0,paddingBottom:0}})]})}));var m,g=n(88653),v=n(33567),y=n(29992),b=n(36683),x=n(12709),w=n(16577),S=n(82319),k=n(24043),C=n(51640),_=n(51183),M=n(16758),T=n(65021),P=n(3597);const D=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,C.Z)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},A=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},O=(0,x.ZP)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:D})((0,S.Z)((({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${P.Z.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]})))),I=(0,x.ZP)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:A})((0,S.Z)((({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${P.Z.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${P.Z.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),R=(0,w.zY)({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),E=o.forwardRef((function(e,t){const n=(0,k.i)({props:e,name:"MuiInputBase"}),{"aria-describedby":s,autoComplete:l,autoFocus:u,className:c,color:h,components:p={},componentsProps:x={},defaultValue:w,disabled:S,disableInjectingGlobalStyles:D,endAdornment:A,error:E,fullWidth:L=!1,id:Z,inputComponent:N="input",inputProps:j={},inputRef:F,margin:z,maxRows:B,minRows:V,multiline:$=!1,name:H,onBlur:W,onChange:U,onClick:q,onFocus:G,onKeyDown:K,onKeyUp:Y,placeholder:X,readOnly:Q,renderSuffix:J,rows:ee,size:te,slotProps:ne={},slots:re={},startAdornment:oe,type:ie="text",value:ae,...se}=n,le=null!=j.value?j.value:ae,{current:ue}=o.useRef(null!=le),ce=o.useRef(),de=o.useCallback((e=>{0}),[]),he=(0,_.Z)(ce,F,j.ref,de),[pe,fe]=o.useState(!1),me=(0,b.Z)();const ge=(0,v.Z)({props:n,muiFormControl:me,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=me?me.focused:pe,o.useEffect((()=>{!me&&S&&pe&&(fe(!1),W&&W())}),[me,S,pe,W]);const ve=me&&me.onFilled,ye=me&&me.onEmpty,be=o.useCallback((e=>{(0,T.vd)(e)?ve&&ve():ye&&ye()}),[ve,ye]);(0,M.Z)((()=>{ue&&be({value:le})}),[le,be,ue]);o.useEffect((()=>{be(ce.current)}),[]);let xe=N,we=j;$&&"input"===xe&&(we=ee?{type:void 0,minRows:ee,maxRows:ee,...we}:{type:void 0,maxRows:B,minRows:V,...we},xe=f);o.useEffect((()=>{me&&me.setAdornedStart(Boolean(oe))}),[me,oe]);const Se={...n,color:ge.color||"primary",disabled:ge.disabled,endAdornment:A,error:ge.error,focused:ge.focused,formControl:me,fullWidth:L,hiddenLabel:ge.hiddenLabel,multiline:$,size:ge.size,startAdornment:oe,type:ie},ke=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:l,fullWidth:u,hiddenLabel:c,multiline:d,readOnly:h,size:p,startAdornment:f,type:m}=e,g={root:["root",`color${(0,C.Z)(n)}`,r&&"disabled",o&&"error",u&&"fullWidth",s&&"focused",l&&"formControl",p&&"medium"!==p&&`size${(0,C.Z)(p)}`,d&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return(0,a.Z)(g,P.u,t)})(Se),Ce=re.root||p.Root||O,_e=ne.root||x.root||{},Me=re.input||p.Input||I;return we={...we,...ne.input??x.input},(0,d.jsxs)(o.Fragment,{children:[!D&&"function"==typeof R&&(m||(m=(0,d.jsx)(R,{}))),(0,d.jsxs)(Ce,{..._e,ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),q&&q(e)},...se,...!(0,g.Z)(Ce)&&{ownerState:{...Se,..._e.ownerState}},className:(0,i.Z)(ke.root,_e.className,c,Q&&"MuiInputBase-readOnly"),children:[oe,(0,d.jsx)(y.Z.Provider,{value:null,children:(0,d.jsx)(Me,{"aria-invalid":ge.error,"aria-describedby":s,autoComplete:l,autoFocus:u,defaultValue:w,disabled:ge.disabled,id:Z,onAnimationStart:e=>{be("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:H,placeholder:X,readOnly:Q,required:ge.required,rows:ee,value:le,onKeyDown:K,onKeyUp:Y,type:ie,...we,...!(0,g.Z)(Me)&&{as:xe,ownerState:{...Se,...we.ownerState}},ref:he,className:(0,i.Z)(ke.input,we.className,Q&&"MuiInputBase-readOnly"),onBlur:e=>{W&&W(e),j.onBlur&&j.onBlur(e),me&&me.onBlur?me.onBlur(e):fe(!1)},onChange:(e,...t)=>{if(!ue){const t=e.target||ce.current;if(null==t)throw new Error((0,r.Z)(1));be({value:t.value})}j.onChange&&j.onChange(e,...t),U&&U(e,...t)},onFocus:e=>{G&&G(e),j.onFocus&&j.onFocus(e),me&&me.onFocus?me.onFocus(e):fe(!0)}})}),A,J?J({...ge,startAdornment:oe}):null]})]})}))},3597:function(e,t,n){"use strict";n.d(t,{Z:()=>a,u:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiInputBase",e)}const a=(0,r.Z)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},65021:function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e,t=!1){return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,{B7:()=>i,vd:()=>o})},68808:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(82267),i=n(90496),a=n(33567),s=n(36683),l=n(23626),u=n(15143),c=n(51640),d=n(73037),h=n(12709),p=n(82319),f=n(24043),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiInputLabel",e)}(0,m.Z)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);var y=n(24246);const b=(0,h.ZP)(l.Z,{shouldForwardProp:e=>(0,d.Z)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${u.Z.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((0,p.Z)((({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]})))),x=r.forwardRef((function(e,t){const n=(0,f.i)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:l,shrink:u,variant:d,className:h,...p}=n,m=(0,s.Z)();let g=u;void 0===g&&m&&(g=m.filled||m.focused||m.adornedStart);const x=(0,a.Z)({props:n,muiFormControl:m,states:["size","variant","required","focused"]}),w={...n,disableAnimation:r,formControl:m,shrink:g,size:x.size,variant:x.variant,required:x.required,focused:x.focused},S=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:s,required:l}=e,u={root:["root",n&&"formControl",!a&&"animated",i&&"shrink",r&&"normal"!==r&&`size${(0,c.Z)(r)}`,s],asterisk:[l&&"asterisk"]},d=(0,o.Z)(u,v,t);return{...t,...d}})(w);return(0,y.jsx)(b,{"data-shrink":g,ref:t,className:(0,i.Z)(S.root,h),...p,ownerState:w,classes:S})}))},37809:function(e,t,n){"use strict";n.d(t,{Z:()=>D});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(6595),l=n(10043),u=n(12709),c=n(82319),d=n(90433),h=n(24043),p=n(51640),f=n(44124),m=n(6749);function g(e){return(0,m.ZP)("MuiLinearProgress",e)}(0,f.Z)("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);var v=n(24246);const y=l.keyframes` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `,b="string"!=typeof y?l.css` animation: ${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `:null,x=l.keyframes` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `,w="string"!=typeof x?l.css` animation: ${x} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `:null,S=l.keyframes` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `,k="string"!=typeof S?l.css` animation: ${S} 3s infinite linear; `:null,C=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?(0,a.$n)(e.palette[t].main,.62):(0,a._j)(e.palette[t].main,.5),_=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${(0,p.Z)(n.color)}`],t[n.variant]]}})((0,c.Z)((({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{backgroundColor:C(e,t)}}))),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]})))),M=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${(0,p.Z)(n.color)}`]]}})((0,c.Z)((({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>{const n=C(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}}))]}))),k||{animation:`${S} 3s infinite linear`}),T=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${(0,p.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar1Indeterminate,"determinate"===n.variant&&t.bar1Determinate,"buffer"===n.variant&&t.bar1Buffer]}})((0,c.Z)((({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}}))),{props:{variant:"determinate"},style:{transition:"transform .4s linear"}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .4s linear"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:b||{animation:`${y} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]})))),P=(0,u.ZP)("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${(0,p.Z)(n.color)}`],("indeterminate"===n.variant||"query"===n.variant)&&t.bar2Indeterminate,"buffer"===n.variant&&t.bar2Buffer]}})((0,c.Z)((({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}}))),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:C(e,t),transition:"transform .4s linear"}}))),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:w||{animation:`${x} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]})))),D=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiLinearProgress"}),{className:r,color:a="primary",value:l,valueBuffer:u,variant:c="indeterminate",...d}=n,f={...n,color:a,variant:c},m=(e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${(0,p.Z)(r)}`,n],dashed:["dashed",`dashedColor${(0,p.Z)(r)}`],bar1:["bar","bar1",`barColor${(0,p.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar1Indeterminate","determinate"===n&&"bar1Determinate","buffer"===n&&"bar1Buffer"],bar2:["bar","bar2","buffer"!==n&&`barColor${(0,p.Z)(r)}`,"buffer"===n&&`color${(0,p.Z)(r)}`,("indeterminate"===n||"query"===n)&&"bar2Indeterminate","buffer"===n&&"bar2Buffer"]};return(0,i.Z)(o,g,t)})(f),y=(0,s.V)(),b={},x={bar1:{},bar2:{}};if("determinate"===c||"buffer"===c)if(void 0!==l){b["aria-valuenow"]=Math.round(l),b["aria-valuemin"]=0,b["aria-valuemax"]=100;let e=l-100;y&&(e=-e),x.bar1.transform=`translateX(${e}%)`}else 0;if("buffer"===c)if(void 0!==u){let e=(u||0)-100;y&&(e=-e),x.bar2.transform=`translateX(${e}%)`}else 0;return(0,v.jsxs)(_,{className:(0,o.Z)(m.root,r),ownerState:f,role:"progressbar",...b,ref:t,...d,children:["buffer"===c?(0,v.jsx)(M,{className:m.dashed,ownerState:f}):null,(0,v.jsx)(T,{className:m.bar1,ownerState:f,style:x.bar1}),"determinate"===c?null:(0,v.jsx)(P,{className:m.bar2,ownerState:f,style:x.bar2})]})}))},60886:function(e,t,n){"use strict";n.d(t,{Z:()=>w});var r=n(27378),o=n(90496),i=n(16838),a=n(82267),s=n(74111),l=n(51640),u=n(12709),c=n(94776),d=n(82319),h=n(90433),p=n(24043),f=n(52054),m=n(757),g=n(33160);const v=({theme:e,ownerState:t})=>{const n=t.color,r=(0,g.DW)(e,`palette.${n}.main`,!1)||(0,g.DW)(e,`palette.${n}`,!1)||t.color,o=(0,g.DW)(e,`palette.${n}.mainChannel`)||(0,g.DW)(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:(0,i.Fq)(r,.4)};var y=n(24246);const b={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},x=(0,u.ZP)(f.Z,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${(0,l.Z)(n.underline)}`],"button"===n.component&&t.button]}})((0,d.Z)((({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:t})=>"always"===e&&"inherit"!==t.color,style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter((0,h.Z)()).map((([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:(0,i.Fq)(e.palette[t].main,.4)}}))),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,i.Fq)(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:(0,i.Fq)(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${m.Z.focusVisible}`]:{outline:"auto"}}}]})))),w=r.forwardRef((function(e,t){const n=(0,p.i)({props:e,name:"MuiLink"}),i=(0,c.Z)(),{className:u,color:d="primary",component:h="a",onBlur:f,onFocus:g,TypographyClasses:w,underline:S="always",variant:k="inherit",sx:C,..._}=n,[M,T]=r.useState(!1),P={...n,color:d,component:h,focusVisible:M,underline:S,variant:k},D=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e,i={root:["root",`underline${(0,l.Z)(o)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,a.Z)(i,m.w,t)})(P);return(0,y.jsx)(x,{color:d,className:(0,o.Z)(D.root,u),classes:w,component:h,onBlur:e=>{(0,s.Z)(e.target)||T(!1),f&&f(e)},onFocus:e=>{(0,s.Z)(e.target)&&T(!0),g&&g(e)},ref:t,ownerState:P,variant:k,..._,sx:[...void 0===b[d]?[{color:d}]:[],...Array.isArray(C)?C:[C]],style:{..._.style,..."always"===S&&"inherit"!==d&&!b[d]&&{"--Link-underlineColor":v({theme:i,ownerState:P})}}})}))},757:function(e,t,n){"use strict";n.d(t,{Z:()=>a,w:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiLink",e)}const a=(0,r.Z)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"])},71852:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(78849),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiList",e)}(0,u.Z)("MuiList",["root","padding","dense","subheader"]);var h=n(24246);const p=(0,a.ZP)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),f=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiList"}),{children:a,className:u,component:c="ul",dense:f=!1,disablePadding:m=!1,subheader:g,...v}=n,y=r.useMemo((()=>({dense:f})),[f]),b={...n,component:c,dense:f,disablePadding:m},x=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,a={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,i.Z)(a,d,t)})(b);return(0,h.jsx)(l.Z.Provider,{value:y,children:(0,h.jsxs)(p,{as:c,className:(0,o.Z)(x.root,u),ref:t,ownerState:b,...v,children:[g,a]})})}))},78849:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},2259:function(e,t,n){"use strict";n.d(t,{ZP:()=>C});var r=n(27378),o=n(90496),i=n(82267),a=n(88653),s=n(12709),l=n(82319),u=n(24043),c=n(70777),d=n(51183),h=n(78849),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiListItem",e)}(0,p.Z)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);var g=n(3552);function v(e){return(0,f.ZP)("MuiListItemSecondaryAction",e)}(0,p.Z)("MuiListItemSecondaryAction",["root","disableGutters"]);var y=n(24246);const b=(0,s.ZP)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{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}}]}),x=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiListItemSecondaryAction"}),{className:a,...s}=n,l=r.useContext(h.Z),c={...n,disableGutters:l.disableGutters},d=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return(0,i.Z)(r,v,n)})(c);return(0,y.jsx)(b,{className:(0,o.Z)(d.root,a),ownerState:c,ref:t,...s})}));x.muiName="ListItemSecondaryAction";const w=x,S=(0,s.ZP)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{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,l.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:{[`& > .${g.Z.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}}]})))),k=(0,s.ZP)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),C=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiListItem"}),{alignItems:s="center",children:l,className:p,component:f,components:g={},componentsProps:v={},ContainerComponent:b="li",ContainerProps:{className:x,...C}={},dense:_=!1,disableGutters:M=!1,disablePadding:T=!1,divider:P=!1,secondaryAction:D,slotProps:A={},slots:O={},...I}=n,R=r.useContext(h.Z),E=r.useMemo((()=>({dense:_||R.dense||!1,alignItems:s,disableGutters:M})),[s,R.dense,_,M]),L=r.useRef(null),Z=r.Children.toArray(l),N=Z.length&&(0,c.Z)(Z[Z.length-1],["ListItemSecondaryAction"]),j={...n,alignItems:s,dense:E.dense,disableGutters:M,disablePadding:T,divider:P,hasSecondaryAction:N},F=(e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:a,divider:s,hasSecondaryAction:l}=e,u={root:["root",r&&"dense",!o&&"gutters",!a&&"padding",s&&"divider","flex-start"===t&&"alignItemsFlexStart",l&&"secondaryAction"],container:["container"]};return(0,i.Z)(u,m,n)})(j),z=(0,d.Z)(L,t),B=O.root||g.Root||S,V=A.root||v.root||{},$={className:(0,o.Z)(F.root,V.className,p),...I};let H=f||"li";return N?(H=$.component||f?H:"div","li"===b&&("li"===H?H="div":"li"===$.component&&($.component="div")),(0,y.jsx)(h.Z.Provider,{value:E,children:(0,y.jsxs)(k,{as:b,className:(0,o.Z)(F.container,x),ref:z,ownerState:j,...C,children:[(0,y.jsx)(B,{...V,...!(0,a.Z)(B)&&{as:H,ownerState:{...j,...V.ownerState}},...$,children:Z}),Z.pop()]})})):(0,y.jsx)(h.Z.Provider,{value:E,children:(0,y.jsxs)(B,{...V,as:H,ref:z,...!(0,a.Z)(B)&&{ownerState:{...j,...V.ownerState}},...$,children:[Z,D&&(0,y.jsx)(w,{children:D})]})})}))},3552:function(e,t,n){"use strict";n.d(t,{Z:()=>a,t:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiListItemButton",e)}const a=(0,r.Z)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"])},12211:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(65479),c=n(78849),d=n(24246);const h=(0,a.ZP)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((0,s.Z)((({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]})))),p=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiListItemIcon"}),{className:a,...s}=n,p=r.useContext(c.Z),f={...n,alignItems:p.alignItems},m=(e=>{const{alignItems:t,classes:n}=e,r={root:["root","flex-start"===t&&"alignItemsFlexStart"]};return(0,i.Z)(r,u.f,n)})(f);return(0,d.jsx)(h,{className:(0,o.Z)(m.root,a),ownerState:f,ref:t,...s})}))},65479:function(e,t,n){"use strict";n.d(t,{Z:()=>a,f:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiListItemIcon",e)}const a=(0,r.Z)("MuiListItemIcon",["root","alignItemsFlexStart"])},12577:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(90496),i=n(82267),a=n(67488),s=n(52054),l=n(78849),u=n(12709),c=n(24043),d=n(14662),h=n(16351),p=n(24246);const f=(0,u.ZP)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${d.Z.primary}`]:t.primary},{[`& .${d.Z.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${a.Z.root}:where(& .${d.Z.primary})`]:{display:"block"},[`.${a.Z.root}:where(& .${d.Z.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),m=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiListItemText"}),{children:a,className:u,disableTypography:m=!1,inset:g=!1,primary:v,primaryTypographyProps:y,secondary:b,secondaryTypographyProps:x,slots:w={},slotProps:S={},...k}=n,{dense:C}=r.useContext(l.Z);let _=null!=v?v:a,M=b;const T={...n,disableTypography:m,inset:g,primary:!!_,secondary:!!M,dense:C},P=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e,s={root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]};return(0,i.Z)(s,d.L,t)})(T),D={slots:w,slotProps:{primary:y,secondary:x,...S}},[A,O]=(0,h.Z)("primary",{className:P.primary,elementType:s.Z,externalForwardedProps:D,ownerState:T}),[I,R]=(0,h.Z)("secondary",{className:P.secondary,elementType:s.Z,externalForwardedProps:D,ownerState:T});return null==_||_.type===s.Z||m||(_=(0,p.jsx)(A,{variant:C?"body2":"body1",component:O?.variant?void 0:"span",...O,children:_})),null==M||M.type===s.Z||m||(M=(0,p.jsx)(I,{variant:"body2",color:"textSecondary",...R,children:M})),(0,p.jsxs)(f,{className:(0,o.Z)(P.root,u),ownerState:T,ref:t,...k,children:[_,M]})}))},14662:function(e,t,n){"use strict";n.d(t,{L:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiListItemText",e)}const a=(0,r.Z)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"])},5549:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(27378),o=n(90496),i=n(82267),a=n(6595),s=n(25399),l=n(18873),u=n(6714),c=n(73037),d=n(12709),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiMenu",e)}(0,p.Z)("MuiMenu",["root","paper","list"]);var g=n(16351),v=n(24246);const y={vertical:"top",horizontal:"right"},b={vertical:"top",horizontal:"left"},x=(0,d.ZP)(u.ZP,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),w=(0,d.ZP)(u.XS,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),S=(0,d.ZP)(l.Z,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),k=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiMenu"}),{autoFocus:l=!0,children:u,className:c,disableAutoFocusItem:d=!1,MenuListProps:p={},onClose:f,open:k,PaperProps:C={},PopoverClasses:_,transitionDuration:M="auto",TransitionProps:{onEntering:T,...P}={},variant:D="selectedMenu",slots:A={},slotProps:O={},...I}=n,R=(0,a.V)(),E={...n,autoFocus:l,disableAutoFocusItem:d,MenuListProps:p,onEntering:T,PaperProps:C,transitionDuration:M,TransitionProps:P,variant:D},L=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],paper:["paper"],list:["list"]},m,t)})(E),Z=l&&!d&&k,N=r.useRef(null);let j=-1;r.Children.map(u,((e,t)=>{r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===D&&e.props.selected||-1===j)&&(j=t))}));const F={slots:A,slotProps:{list:p,transition:P,paper:C,...O}},z=(0,s.Z)({elementType:A.root,externalSlotProps:O.root,ownerState:E,className:[L.root,c]}),[B,V]=(0,g.Z)("paper",{className:L.paper,elementType:w,externalForwardedProps:F,shouldForwardComponentProp:!0,ownerState:E}),[$,H]=(0,g.Z)("list",{className:(0,o.Z)(L.list,p.className),elementType:S,shouldForwardComponentProp:!0,externalForwardedProps:F,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),f&&f(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:E}),W="function"==typeof F.slotProps.transition?F.slotProps.transition(E):F.slotProps.transition;return(0,v.jsx)(x,{onClose:f,anchorOrigin:{vertical:"bottom",horizontal:R?"right":"left"},transformOrigin:R?y:b,slots:{root:A.root,paper:B,backdrop:A.backdrop,...A.transition&&{transition:A.transition}},slotProps:{root:z,paper:V,backdrop:"function"==typeof O.backdrop?O.backdrop(E):O.backdrop,transition:{...W,onEntering:(...e)=>{((e,t)=>{N.current&&N.current.adjustStyleForScrollbar(e,{direction:R?"rtl":"ltr"}),T&&T(e,t)})(...e),W?.onEntering?.(...e)}}},open:k,ref:t,transitionDuration:M,ownerState:E,...I,classes:_,children:(0,v.jsx)($,{actions:N,autoFocus:l&&(-1===j||d),autoFocusItem:Z,variant:D,...H,children:u})})}))},30743:function(e,t,n){"use strict";n.d(t,{Z:()=>C});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(73037),l=n(12709),u=n(82319),c=n(24043),d=n(78849),h=n(14544),p=n(16758),f=n(51183),m=n(38062),g=n(65479),v=n(14662),y=n(44124),b=n(6749);function x(e){return(0,b.ZP)("MuiMenuItem",e)}const w=(0,y.Z)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var S=n(24246);const k=(0,l.ZP)(h.Z,{shouldForwardProp:e=>(0,s.Z)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,u.Z)((({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${w.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${w.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${w.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,a.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,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${w.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${w.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${m.Z.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${m.Z.inset}`]:{marginLeft:52},[`& .${v.Z.root}`]:{marginTop:0,marginBottom:0},[`& .${v.Z.inset}`]:{paddingLeft:36},[`& .${g.Z.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${g.Z.root} svg`]:{fontSize:"1.25rem"}}}]})))),C=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiMenuItem"}),{autoFocus:a=!1,component:s="li",dense:l=!1,divider:u=!1,disableGutters:h=!1,focusVisibleClassName:m,role:g="menuitem",tabIndex:v,className:y,...b}=n,w=r.useContext(d.Z),C=r.useMemo((()=>({dense:l||w.dense||!1,disableGutters:h})),[w.dense,l,h]),_=r.useRef(null);(0,p.Z)((()=>{a&&_.current&&_.current.focus()}),[a]);const M={...n,dense:C.dense,divider:u,disableGutters:h},T=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:s}=e,l={root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},u=(0,i.Z)(l,x,s);return{...s,...u}})(n),P=(0,f.Z)(_,t);let D;return n.disabled||(D=void 0!==v?v:-1),(0,S.jsx)(d.Z.Provider,{value:C,children:(0,S.jsx)(k,{ref:P,role:g,tabIndex:D,component:s,focusVisibleClassName:(0,o.Z)(T.focusVisible,m),className:(0,o.Z)(T.root,y),...b,ownerState:M,classes:T})})}))},18873:function(e,t,n){"use strict";n.d(t,{Z:()=>m});var r=n(27378),o=n(2444),i=n(71852);const a=n(16046).Z;var s=n(51183),l=n(16758),u=n(24255),c=n(24246);function d(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function h(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function p(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function f(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&p(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const m=r.forwardRef((function(e,t){const{actions:n,autoFocus:m=!1,autoFocusItem:g=!1,children:v,className:y,disabledItemsFocusable:b=!1,disableListWrap:x=!1,onKeyDown:w,variant:S="selectedMenu",...k}=e,C=r.useRef(null),_=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,l.Z)((()=>{m&&C.current.focus()}),[m]),r.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!C.current.style.width;if(e.clientHeight{r.isValidElement(e)?(e.props.disabled||("selectedMenu"===S&&e.props.selected||-1===T)&&(T=t),T===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(T+=1,T>=v.length&&(T=-1))):T===t&&(T+=1,T>=v.length&&(T=-1))}));const P=r.Children.map(v,((e,t)=>{if(t===T){const t={};return g&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===S&&(t.tabIndex=0),r.cloneElement(e,t)}return e}));return(0,c.jsx)(i.Z,{role:"menu",ref:M,className:y,onKeyDown:e=>{const t=C.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(w&&w(e));const r=(0,o.Z)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),f(t,r,x,b,d);else if("ArrowUp"===n)e.preventDefault(),f(t,r,x,b,h);else if("Home"===n)e.preventDefault(),f(t,null,x,b,d);else if("End"===n)e.preventDefault(),f(t,null,x,b,h);else if(1===n.length){const o=_.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=r&&!o.repeating&&p(r,o);o.previousKeyMatched&&(s||f(t,r,!1,b,d,o))?e.preventDefault():o.previousKeyMatched=!1}w&&w(e)},tabIndex:m?0:-1,...k,children:P})}))},80058:function(e,t,n){"use strict";n.d(t,{Z:()=>E});var r=n(27378),o=n(90496),i=n(82267),a=n(25188),s=n(7444),l=n(12709),u=n(82319),c=n(24043),d=n(19090),h=n(97048),p=n(80668),f=n(81925),m=n(38543),g=n(92438),v=n(33205),y=n(16046);function b(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function x(e){return parseInt((0,v.Z)(e).getComputedStyle(e).paddingRight,10)||0}function w(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&b(e,o)}))}function S(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function k(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,p.Z)(e);return t.body===e?(0,v.Z)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,y.Z)((0,v.Z)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${x(r)+e}px`;const t=(0,p.Z)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${x(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,p.Z)(r).body;else{const t=r.parentElement,n=(0,v.Z)(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const C=()=>{},_=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&b(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);w(t,e.mount,e.modalRef,r,!0);const o=S(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=S(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=k(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=S(this.containers,(t=>t.modals.includes(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&b(e.modalRef,t),w(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&b(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const M=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:u,open:c,rootRef:d}=e,v=r.useRef({}),y=r.useRef(null),x=r.useRef(null),w=(0,h.Z)(x,d),[S,k]=r.useState(!c),M=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let T=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(T=!1);const P=()=>(v.current.modalRef=x.current,v.current.mount=y.current,v.current),D=()=>{_.mount(P(),{disableScrollLock:o}),x.current&&(x.current.scrollTop=0)},A=(0,f.Z)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,p.Z)(y.current).body;_.add(P(),e),x.current&&D()})),O=()=>_.isTopModal(P()),I=(0,f.Z)((e=>{y.current=e,e&&(c&&O()?D():x.current&&b(x.current,T))})),R=r.useCallback((()=>{_.remove(P(),T)}),[T]);r.useEffect((()=>()=>{R()}),[R]),r.useEffect((()=>{c?A():M&&i||R()}),[c,R,M,i,A]);const E=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&O()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},L=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=(0,g.Z)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:E(r),ref:w}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:L(t),open:c}},getTransitionProps:()=>({onEnter:(0,m.Z)((()=>{k(!1),a&&a()}),l?.props.onEnter??C),onExited:(0,m.Z)((()=>{k(!0),s&&s(),i&&R()}),l?.props.onExited??C)}),rootRef:w,portalRef:I,isTopModal:O,exited:S,hasTransition:M}};var T=n(44124),P=n(6749);function D(e){return(0,P.ZP)("MuiModal",e)}(0,T.Z)("MuiModal",["root","hidden","backdrop"]);var A=n(16351),O=n(24246);const I=(0,l.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,u.Z)((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),R=(0,l.ZP)(d.Z,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),E=r.forwardRef((function(e,t){const n=(0,c.i)({name:"MuiModal",props:e}),{BackdropComponent:l=R,BackdropProps:u,classes:d,className:h,closeAfterTransition:p=!1,children:f,container:m,component:g,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:w=!1,disablePortal:S=!1,disableRestoreFocus:k=!1,disableScrollLock:C=!1,hideBackdrop:_=!1,keepMounted:T=!1,onBackdropClick:P,onClose:E,onTransitionEnter:L,onTransitionExited:Z,open:N,slotProps:j={},slots:F={},theme:z,...B}=n,V={...n,closeAfterTransition:p,disableAutoFocus:b,disableEnforceFocus:x,disableEscapeKeyDown:w,disablePortal:S,disableRestoreFocus:k,disableScrollLock:C,hideBackdrop:_,keepMounted:T},{getRootProps:$,getBackdropProps:H,getTransitionProps:W,portalRef:U,isTopModal:q,exited:G,hasTransition:K}=M({...V,rootRef:t}),Y={...V,exited:G},X=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.Z)(o,D,r)})(Y),Q={};if(void 0===f.props.tabIndex&&(Q.tabIndex="-1"),K){const{onEnter:e,onExited:t}=W();Q.onEnter=e,Q.onExited=t}const J={slots:{root:v.Root,backdrop:v.Backdrop,...F},slotProps:{...y,...j}},[ee,te]=(0,A.Z)("root",{ref:t,elementType:I,externalForwardedProps:{...J,...B,component:g},getSlotProps:$,ownerState:Y,className:(0,o.Z)(h,X?.root,!Y.open&&Y.exited&&X?.hidden)}),[ne,re]=(0,A.Z)("backdrop",{ref:u?.ref,elementType:l,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:u,getSlotProps:e=>H({...e,onClick:t=>{P&&P(t),e?.onClick&&e.onClick(t)}}),className:(0,o.Z)(u?.className,X?.backdrop),ownerState:Y});return T||N||K&&!G?(0,O.jsx)(s.Z,{ref:U,container:m,disablePortal:S,children:(0,O.jsxs)(ee,{...te,children:[!_&&l?(0,O.jsx)(ne,{...re}):null,(0,O.jsx)(a.Z,{disableEnforceFocus:x,disableAutoFocus:b,disableRestoreFocus:k,isEnabled:q,open:N,children:r.cloneElement(f,Q)})]})}):null}))},51857:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r,o=n(27378),i=n(82267),a=n(73037),s=n(12709),l=n(82319),u=n(24246);const c=(0,s.ZP)("fieldset",{shouldForwardProp:a.Z})({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%"}),d=(0,s.ZP)("legend",{shouldForwardProp:a.Z})((0,l.Z)((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,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:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}))));var h=n(36683),p=n(33567),f=n(90433),m=n(24043),g=n(8782),v=n(55879);const y=(0,s.ZP)(v.Ej,{shouldForwardProp:e=>(0,a.Z)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:v.Gx})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.Z.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${g.Z.focused} .${g.Z.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter((0,f.Z)()).map((([t])=>({props:{color:t},style:{[`&.${g.Z.focused} .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${g.Z.error} .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.Z.disabled} .${g.Z.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}}))),b=(0,s.ZP)((function(e){const{children:t,classes:n,className:o,label:i,notched:a,...s}=e,l=null!=i&&""!==i,h={...e,notched:a,withLabel:l};return(0,u.jsx)(c,{"aria-hidden":!0,className:o,ownerState:h,...s,children:(0,u.jsx)(d,{ownerState:h,children:l?(0,u.jsx)("span",{children:i}):r||(r=(0,u.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}))),x=(0,s.ZP)(v.ni,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:v._o})((0,l.Z)((({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]})))),w=o.forwardRef((function(e,t){var n;const r=(0,m.i)({props:e,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:l="input",label:c,multiline:d=!1,notched:f,slots:w={},type:S="text",...k}=r,C=(e=>{const{classes:t}=e,n=(0,i.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.e,t);return{...t,...n}})(r),_=(0,h.Z)(),M=(0,p.Z)({props:r,muiFormControl:_,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T={...r,color:M.color||"primary",disabled:M.disabled,error:M.error,focused:M.focused,formControl:_,fullWidth:s,hiddenLabel:M.hiddenLabel,multiline:d,size:M.size,type:S},P=w.root??a.Root??y,D=w.input??a.Input??x;return(0,u.jsx)(v.ZP,{slots:{root:P,input:D},renderSuffix:e=>(0,u.jsx)(b,{ownerState:T,className:C.notchedOutline,label:null!=c&&""!==c&&M.required?n||(n=(0,u.jsxs)(o.Fragment,{children:[c," ","*"]})):c,notched:void 0!==f?f:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:s,inputComponent:l,multiline:d,ref:t,type:S,...k,classes:{...C,notchedOutline:null}})}));w.muiName="Input";const S=w},8782:function(e,t,n){"use strict";n.d(t,{Z:()=>a,e:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiOutlinedInput",e)}const a={...n(3597).Z,...(0,r.Z)("MuiOutlinedInput",["root","notchedOutline","input"])}},28866:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(12709),l=n(94776),u=n(82319),c=n(24043),d=n(8505),h=n(44124),p=n(6749);function f(e){return(0,p.ZP)("MuiPaper",e)}(0,h.Z)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(24246);const g=(0,s.ZP)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((0,u.Z)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]})))),v=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiPaper"}),r=(0,l.Z)(),{className:s,component:u="div",elevation:h=1,square:p=!1,variant:v="elevation",...y}=n,b={...n,component:u,elevation:h,square:p,variant:v},x=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,a={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,i.Z)(a,f,o)})(b);return(0,m.jsx)(g,{as:u,ownerState:b,className:(0,o.Z)(x.root,s),ref:t,...y,style:{..."elevation"===v&&{"--Paper-shadow":(r.vars||r).shadows[h],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[h]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,a.Fq)("#fff",(0,d.Z)(h))}, ${(0,a.Fq)("#fff",(0,d.Z)(h))})`}},...y.style}})}))},6714:function(e,t,n){"use strict";n.d(t,{XS:()=>M,ZP:()=>T});var r=n(27378),o=n(90496),i=n(82267),a=n(88653),s=n(12709),l=n(24043),u=n(77999),c=n(2444),d=n(24255),h=n(23382),p=n(80058),f=n(28866),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiPopover",e)}(0,m.Z)("MuiPopover",["root","paper"]);var y=n(16351),b=n(27834),x=n(24246);function w(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function S(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function k(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function C(e){return"function"==typeof e?e():e}const _=(0,s.ZP)(p.Z,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),M=(0,s.ZP)(f.Z,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),T=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiPopover"}),{action:s,anchorEl:p,anchorOrigin:f={vertical:"top",horizontal:"left"},anchorPosition:m,anchorReference:g="anchorEl",children:T,className:P,container:D,elevation:A=8,marginThreshold:O=16,open:I,PaperProps:R={},slots:E={},slotProps:L={},transformOrigin:Z={vertical:"top",horizontal:"left"},TransitionComponent:N,transitionDuration:j="auto",TransitionProps:F={},disableScrollLock:z=!1,...B}=n,V=r.useRef(),$={...n,anchorOrigin:f,anchorReference:g,elevation:A,marginThreshold:O,transformOrigin:Z,TransitionComponent:N,transitionDuration:j,TransitionProps:F},H=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],paper:["paper"]},v,t)})($),W=r.useCallback((()=>{if("anchorPosition"===g)return m;const e=C(p),t=(e&&1===e.nodeType?e:(0,c.Z)(V.current).body).getBoundingClientRect();return{top:t.top+w(t,f.vertical),left:t.left+S(t,f.horizontal)}}),[p,f.horizontal,f.vertical,m,g]),U=r.useCallback((e=>({vertical:w(e,Z.vertical),horizontal:S(e,Z.horizontal)})),[Z.horizontal,Z.vertical]),q=r.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=U(t);if("none"===g)return{top:null,left:null,transformOrigin:k(n)};const r=W();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,l=(0,d.Z)(C(p)),u=l.innerHeight-O,c=l.innerWidth-O;if(null!==O&&ou){const e=a-u;o-=e,n.vertical+=e}if(null!==O&&ic){const e=s-c;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:k(n)}}),[p,g,W,U,O]),[G,K]=r.useState(I),Y=r.useCallback((()=>{const e=V.current;if(!e)return;const t=q(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,K(!0)}),[q]);r.useEffect((()=>(z&&window.addEventListener("scroll",Y),()=>window.removeEventListener("scroll",Y))),[p,z,Y]);r.useEffect((()=>{I&&Y()})),r.useImperativeHandle(s,(()=>I?{updatePosition:()=>{Y()}}:null),[I,Y]),r.useEffect((()=>{if(!I)return;const e=(0,u.Z)((()=>{Y()})),t=(0,d.Z)(p);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[p,I,Y]);let X=j;const Q={slots:{transition:N,...E},slotProps:{transition:F,paper:R,...L}},[J,ee]=(0,y.Z)("transition",{elementType:h.Z,externalForwardedProps:Q,ownerState:$,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),Y()},onExited:t=>{e.onExited?.(t),K(!1)}}),additionalProps:{appear:!0,in:I}});"auto"!==j||J.muiSupportAuto||(X=void 0);const te=D||(p?(0,c.Z)(C(p)).body:void 0),[ne,{slots:re,slotProps:oe,...ie}]=(0,y.Z)("root",{ref:t,elementType:_,externalForwardedProps:{...Q,...B},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:E.backdrop},slotProps:{backdrop:(0,b.Z)("function"==typeof L.backdrop?L.backdrop($):L.backdrop,{invisible:!0})},container:te,open:I},ownerState:$,className:(0,o.Z)(H.root,P)}),[ae,se]=(0,y.Z)("paper",{ref:V,className:H.paper,elementType:M,externalForwardedProps:Q,shouldForwardComponentProp:!0,additionalProps:{elevation:A,style:G?void 0:{opacity:0}},ownerState:$});return(0,x.jsx)(ne,{...ie,...!(0,a.Z)(ne)&&{slots:re,slotProps:oe,disableScrollLock:z},children:(0,x.jsx)(J,{...ee,timeout:X,children:(0,x.jsx)(ae,{...se,children:T})})})}))},75651:function(e,t,n){"use strict";n.d(t,{Z:()=>Ie});var r=n(6595),o=n(27378),i=n(97048),a=n(96858),s=n(80668);function l(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function u(e){return e instanceof l(e).Element||e instanceof Element}function c(e){return e instanceof l(e).HTMLElement||e instanceof HTMLElement}function d(e){return"undefined"!=typeof ShadowRoot&&(e instanceof l(e).ShadowRoot||e instanceof ShadowRoot)}var h=Math.max,p=Math.min,f=Math.round;function m(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function g(){return!/^((?!chrome|android).)*safari/i.test(m())}function v(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&c(e)&&(o=e.offsetWidth>0&&f(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&f(r.height)/e.offsetHeight||1);var a=(u(e)?l(e):window).visualViewport,s=!g()&&n,d=(r.left+(s&&a?a.offsetLeft:0))/o,h=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,m=r.height/i;return{width:p,height:m,top:h,right:d+p,bottom:h+m,left:d,x:d,y:h}}function y(e){var t=l(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function b(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){return((u(e)?e.ownerDocument:e.document)||window.document).documentElement}function w(e){return v(x(e)).left+y(e).scrollLeft}function S(e){return l(e).getComputedStyle(e)}function k(e){var t=S(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function C(e,t,n){void 0===n&&(n=!1);var r,o,i=c(t),a=c(t)&&function(e){var t=e.getBoundingClientRect(),n=f(t.width)/e.offsetWidth||1,r=f(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=x(t),u=v(e,a,n),d={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(i||!i&&!n)&&(("body"!==b(t)||k(s))&&(d=(r=t)!==l(r)&&c(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:y(r)),c(t)?((h=v(t,!0)).x+=t.clientLeft,h.y+=t.clientTop):s&&(h.x=w(s))),{x:u.left+d.scrollLeft-h.x,y:u.top+d.scrollTop-h.y,width:u.width,height:u.height}}function _(e){var t=v(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function M(e){return"html"===b(e)?e:e.assignedSlot||e.parentNode||(d(e)?e.host:null)||x(e)}function T(e){return["html","body","#document"].indexOf(b(e))>=0?e.ownerDocument.body:c(e)&&k(e)?e:T(M(e))}function P(e,t){var n;void 0===t&&(t=[]);var r=T(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=l(r),a=o?[i].concat(i.visualViewport||[],k(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(P(M(a)))}function D(e){return["table","td","th"].indexOf(b(e))>=0}function A(e){return c(e)&&"fixed"!==S(e).position?e.offsetParent:null}function O(e){for(var t=l(e),n=A(e);n&&D(n)&&"static"===S(n).position;)n=A(n);return n&&("html"===b(n)||"body"===b(n)&&"static"===S(n).position)?t:n||function(e){var t=/firefox/i.test(m());if(/Trident/i.test(m())&&c(e)&&"fixed"===S(e).position)return null;var n=M(e);for(d(n)&&(n=n.host);c(n)&&["html","body"].indexOf(b(n))<0;){var r=S(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var I="top",R="bottom",E="right",L="left",Z="auto",N=[I,R,E,L],j="start",F="end",z="viewport",B="popper",V=N.reduce((function(e,t){return e.concat([t+"-"+j,t+"-"+F])}),[]),$=[].concat(N,[Z]).reduce((function(e,t){return e.concat([t,t+"-"+j,t+"-"+F])}),[]),H=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function W(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var U={placement:"bottom",modifiers:[],strategy:"absolute"};function q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function J(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Y(o):null,a=o?X(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case I:t={x:s,y:n.y-r.height};break;case R:t={x:s,y:n.y+n.height};break;case E:t={x:n.x+n.width,y:l};break;case L:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var u=i?Q(i):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case j:t[u]=t[u]-(n[c]/2-r[c]/2);break;case F:t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}var ee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function te(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,m=void 0===p?0:p,g=a.y,v=void 0===g?0:g,y="function"==typeof d?d({x:m,y:v}):{x:m,y:v};m=y.x,v=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),k=L,C=I,_=window;if(c){var M=O(n),T="clientHeight",P="clientWidth";if(M===l(n)&&"static"!==S(M=x(n)).position&&"absolute"===s&&(T="scrollHeight",P="scrollWidth"),o===I||(o===L||o===E)&&i===F)C=R,v-=(h&&M===_&&_.visualViewport?_.visualViewport.height:M[T])-r.height,v*=u?1:-1;if(o===L||(o===I||o===R)&&i===F)k=E,m-=(h&&M===_&&_.visualViewport?_.visualViewport.width:M[P])-r.width,m*=u?1:-1}var D,A=Object.assign({position:s},c&&ee),Z=!0===d?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:f(n*o)/o||0,y:f(r*o)/o||0}}({x:m,y:v},l(n)):{x:m,y:v};return m=Z.x,v=Z.y,u?Object.assign({},A,((D={})[C]=w?"0":"",D[k]=b?"0":"",D.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",D)):Object.assign({},A,((t={})[C]=w?v+"px":"",t[k]=b?m+"px":"",t.transform="",t))}var ne={left:"right",right:"left",bottom:"top",top:"bottom"};function re(e){return e.replace(/left|right|bottom|top/g,(function(e){return ne[e]}))}var oe={start:"end",end:"start"};function ie(e){return e.replace(/start|end/g,(function(e){return oe[e]}))}function ae(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&d(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function se(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function le(e,t,n){return t===z?se(function(e,t){var n=l(e),r=x(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;var c=g();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s+w(e),y:u}}(e,n)):u(t)?function(e,t){var n=v(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):se(function(e){var t,n=x(e),r=y(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=h(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=h(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+w(e),l=-r.scrollTop;return"rtl"===S(o||n).direction&&(s+=h(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(x(e)))}function ue(e,t,n,r){var o="clippingParents"===t?function(e){var t=P(M(e)),n=["absolute","fixed"].indexOf(S(e).position)>=0&&c(e)?O(e):e;return u(n)?t.filter((function(e){return u(e)&&ae(e,n)&&"body"!==b(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce((function(t,n){var o=le(e,n,r);return t.top=h(o.top,t.top),t.right=p(o.right,t.right),t.bottom=p(o.bottom,t.bottom),t.left=h(o.left,t.left),t}),le(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ce(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function de(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function he(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,d=void 0===c?z:c,h=n.elementContext,p=void 0===h?B:h,f=n.altBoundary,m=void 0!==f&&f,g=n.padding,y=void 0===g?0:g,b=ce("number"!=typeof y?y:de(y,N)),w=p===B?"reference":B,S=e.rects.popper,k=e.elements[m?w:p],C=ue(u(k)?k:k.contextElement||x(e.elements.popper),l,d,a),_=v(e.elements.reference),M=J({reference:_,element:S,strategy:"absolute",placement:o}),T=se(Object.assign({},S,M)),P=p===B?T:_,D={top:C.top-P.top+b.top,bottom:P.bottom-C.bottom+b.bottom,left:C.left-P.left+b.left,right:P.right-C.right+b.right},A=e.modifiersData.offset;if(p===B&&A){var O=A[o];Object.keys(D).forEach((function(e){var t=[E,R].indexOf(e)>=0?1:-1,n=[I,R].indexOf(e)>=0?"y":"x";D[e]+=O[n]*t}))}return D}function pe(e,t,n){return h(e,p(t,n))}function fe(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function me(e){return[I,E,R,L].some((function(t){return e[t]>=0}))}var ge=G({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,u=l(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,K)})),s&&u.addEventListener("resize",n.update,K),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,K)})),s&&u.removeEventListener("resize",n.update,K)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=J({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:Y(t.placement),variation:X(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,te(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,te(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];c(o)&&b(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});c(r)&&b(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=$.reduce((function(e,n){return e[n]=function(e,t,n){var r=Y(e),o=[L,I].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[L,E].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],l=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=Y(g),y=l||(v===g||!f?[re(g)]:function(e){if(Y(e)===Z)return[];var t=re(e);return[ie(e),t,ie(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(Y(n)===Z?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=void 0===l?$:l,c=X(r),d=c?s?V:V.filter((function(e){return X(e)===c})):N,h=d.filter((function(e){return u.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=he(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Y(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),x=t.rects.reference,w=t.rects.popper,S=new Map,k=!0,C=b[0],_=0;_=0,A=D?"width":"height",O=he(t,{placement:M,boundary:c,rootBoundary:d,altBoundary:h,padding:u}),F=D?P?E:L:P?R:I;x[A]>w[A]&&(F=re(F));var z=re(F),B=[];if(i&&B.push(O[T]<=0),s&&B.push(O[F]<=0,O[z]<=0),B.every((function(e){return e}))){C=M,k=!1;break}S.set(M,B)}if(k)for(var H=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},W=f?3:1;W>0;W--){if("break"===H(W))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,m=void 0===f||f,g=n.tetherOffset,v=void 0===g?0:g,y=he(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Y(t.placement),x=X(t.placement),w=!x,S=Q(b),k="x"===S?"y":"x",C=t.modifiersData.popperOffsets,M=t.rects.reference,T=t.rects.popper,P="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,D="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Z={x:0,y:0};if(C){if(i){var N,F="y"===S?I:L,z="y"===S?R:E,B="y"===S?"height":"width",V=C[S],$=V+y[F],H=V-y[z],W=m?-T[B]/2:0,U=x===j?M[B]:T[B],q=x===j?-T[B]:-M[B],G=t.elements.arrow,K=m&&G?_(G):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=J[F],te=J[z],ne=pe(0,M[B],K[B]),re=w?M[B]/2-W-ne-ee-D.mainAxis:U-ne-ee-D.mainAxis,oe=w?-M[B]/2+W+ne+te+D.mainAxis:q+ne+te+D.mainAxis,ie=t.elements.arrow&&O(t.elements.arrow),ae=ie?"y"===S?ie.clientTop||0:ie.clientLeft||0:0,se=null!=(N=null==A?void 0:A[S])?N:0,le=V+oe-se,ue=pe(m?p($,V+re-se-ae):$,V,m?h(H,le):H);C[S]=ue,Z[S]=ue-V}if(s){var ce,de="x"===S?I:L,fe="x"===S?R:E,me=C[k],ge="y"===k?"height":"width",ve=me+y[de],ye=me-y[fe],be=-1!==[I,L].indexOf(b),xe=null!=(ce=null==A?void 0:A[k])?ce:0,we=be?ve:me-M[ge]-T[ge]-xe+D.altAxis,Se=be?me+M[ge]+T[ge]-xe-D.altAxis:ye,ke=m&&be?function(e,t,n){var r=pe(e,t,n);return r>n?n:r}(we,me,Se):pe(m?we:ve,me,m?Se:ye);C[k]=ke,Z[k]=ke-me}t.modifiersData[r]=Z}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Y(n.placement),l=Q(s),u=[L,E].indexOf(s)>=0?"height":"width";if(i&&a){var c=function(e,t){return ce("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:de(e,N))}(o.padding,n),d=_(i),h="y"===l?I:L,p="y"===l?R:E,f=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],m=a[l]-n.rects.reference[l],g=O(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=c[h],x=v-d[u]-c[p],w=v/2-d[u]/2+y,S=pe(b,w,x),k=l;n.modifiersData[r]=((t={})[k]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ae(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=he(t,{elementContext:"reference"}),s=he(t,{altBoundary:!0}),l=fe(a,r),u=fe(s,o,i),c=me(l),d=me(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}),ve=n(82267),ye=n(25399),be=n(7444),xe=n(44124),we=n(6749);function Se(e){return(0,we.ZP)("MuiPopper",e)}(0,xe.Z)("MuiPopper",["root"]);var ke=n(24246);function Ce(e){return"function"==typeof e?e():e}function _e(e){return void 0!==e.nodeType}const Me={},Te=o.forwardRef((function(e,t){const{anchorEl:n,children:r,direction:s,disablePortal:l,modifiers:u,open:c,placement:d,popperOptions:h,popperRef:p,slotProps:f={},slots:m={},TransitionProps:g,ownerState:v,...y}=e,b=o.useRef(null),x=(0,i.Z)(b,t),w=o.useRef(null),S=(0,i.Z)(w,p),k=o.useRef(S);(0,a.Z)((()=>{k.current=S}),[S]),o.useImperativeHandle(p,(()=>w.current),[]);const C=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(d,s),[_,M]=o.useState(C),[T,P]=o.useState(Ce(n));o.useEffect((()=>{w.current&&w.current.forceUpdate()})),o.useEffect((()=>{n&&P(Ce(n))}),[n]),(0,a.Z)((()=>{if(!T||!c)return;let e=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{M(e.placement)}}];null!=u&&(e=e.concat(u)),h&&null!=h.modifiers&&(e=e.concat(h.modifiers));const t=ge(T,b.current,{placement:C,...h,modifiers:e});return k.current(t),()=>{t.destroy(),k.current(null)}}),[T,l,u,c,h,C]);const D={placement:_};null!==g&&(D.TransitionProps=g);const A=(e=>{const{classes:t}=e;return(0,ve.Z)({root:["root"]},Se,t)})(e),O=m.root??"div",I=(0,ye.Z)({elementType:O,externalSlotProps:f.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:A.root});return(0,ke.jsx)(O,{...I,children:"function"==typeof r?r(D):r})})),Pe=o.forwardRef((function(e,t){const{anchorEl:n,children:r,container:i,direction:a="ltr",disablePortal:l=!1,keepMounted:u=!1,modifiers:c,open:d,placement:h="bottom",popperOptions:p=Me,popperRef:f,style:m,transition:g=!1,slotProps:v={},slots:y={},...b}=e,[x,w]=o.useState(!0);if(!u&&!d&&(!g||x))return null;let S;if(i)S=i;else if(n){const e=Ce(n);S=e&&_e(e)?(0,s.Z)(e).body:(0,s.Z)(null).body}const k=d||!u||g&&!x?void 0:"none",C=g?{in:d,onEnter:()=>{w(!1)},onExited:()=>{w(!0)}}:void 0;return(0,ke.jsx)(be.Z,{disablePortal:l,container:S,children:(0,ke.jsx)(Te,{anchorEl:n,direction:a,disablePortal:l,modifiers:c,ref:t,open:g?!x:d,placement:h,popperOptions:p,popperRef:f,slotProps:v,slots:y,...b,style:{position:"fixed",top:0,left:0,display:k,...m},TransitionProps:C,children:r})})}));var De=n(12709),Ae=n(24043);const Oe=(0,De.ZP)(Pe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ie=o.forwardRef((function(e,t){const n=(0,r.V)(),o=(0,Ae.i)({props:e,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:u,disablePortal:c,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,slots:y,slotProps:b,...x}=o,w=y?.root??s?.Root,S={anchorEl:i,container:u,disablePortal:c,keepMounted:d,modifiers:h,open:p,placement:f,popperOptions:m,popperRef:g,transition:v,...x};return(0,ke.jsx)(Oe,{as:a,direction:n?"rtl":"ltr",slots:{root:w},slotProps:b??l,...S,ref:t})}))},7444:function(e,t,n){"use strict";n.d(t,{Z:()=>u});var r=n(27378),o=n(31542),i=n(97048),a=n(94680),s=n(96858),l=n(85817);const u=r.forwardRef((function(e,t){const{children:n,container:u,disablePortal:c=!1}=e,[d,h]=r.useState(null),p=(0,i.Z)(r.isValidElement(n)?(0,a.Z)(n):null,t);if((0,s.Z)((()=>{c||h(function(e){return"function"==typeof e?e():e}(u)||document.body)}),[u,c]),(0,s.Z)((()=>{if(d&&!c)return(0,l.Z)(t,d),()=>{(0,l.Z)(t,null)}}),[t,d,c]),c){if(r.isValidElement(n)){const e={ref:p};return r.cloneElement(n,e)}return n}return d?o.createPortal(n,d):d}))},63767:function(e,t,n){"use strict";n.d(t,{Z:()=>Y});var r=n(27378),o=n(90496),i=n(61170),a=n(82267),s=n(94680),l=n(62220),u=n(5056),c=n(2444),d=n(51640),h=n(5549),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiNativeSelect",e)}const g=(0,p.Z)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var v=n(12709),y=n(73037),b=n(24246);const x=(0,v.ZP)("select")((({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${g.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]}))),w=(0,v.ZP)(x,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:y.Z,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${g.multiple}`]:t.multiple}]}})({}),S=(0,v.ZP)("svg")((({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${g.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]}))),k=(0,v.ZP)(S,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.Z)(n.variant)}`],n.open&&t.iconOpen]}})({}),C=r.forwardRef((function(e,t){const{className:n,disabled:i,error:s,IconComponent:l,inputRef:u,variant:c="standard",...h}=e,p={...e,disabled:i,variant:c,error:s},f=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${(0,d.Z)(n)}`,i&&"iconOpen",r&&"disabled"]};return(0,a.Z)(l,m,t)})(p);return(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(w,{ownerState:p,className:(0,o.Z)(f.select,n),disabled:i,ref:u||t,...h}),e.multiple?null:(0,b.jsx)(k,{as:l,ownerState:p,className:f.icon})]})}));var _=n(65021),M=n(4005),T=n(51183),P=n(18817);function D(e){return(0,f.ZP)("MuiSelect",e)}const A=(0,p.Z)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var O;const I=(0,v.ZP)(x,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${A.select}`]:t.select},{[`&.${A.select}`]:t[n.variant]},{[`&.${A.error}`]:t.error},{[`&.${A.multiple}`]:t.multiple}]}})({[`&.${A.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),R=(0,v.ZP)(S,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,d.Z)(n.variant)}`],n.open&&t.iconOpen]}})({}),E=(0,v.ZP)("input",{shouldForwardProp:e=>(0,M.Z)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function L(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function Z(e){return null==e||"string"==typeof e&&!e.trim()}const N=r.forwardRef((function(e,t){const{"aria-describedby":n,"aria-label":i,autoFocus:s,autoWidth:p,children:f,className:m,defaultOpen:g,defaultValue:v,disabled:y,displayEmpty:x,error:w=!1,IconComponent:S,inputRef:k,labelId:C,MenuProps:M={},multiple:A,name:N,onBlur:j,onChange:F,onClose:z,onFocus:B,onOpen:V,open:$,readOnly:H,renderValue:W,required:U,SelectDisplayProps:q={},tabIndex:G,type:K,value:Y,variant:X="standard",...Q}=e,[J,ee]=(0,P.Z)({controlled:Y,default:v,name:"Select"}),[te,ne]=(0,P.Z)({controlled:$,default:g,name:"Select"}),re=r.useRef(null),oe=r.useRef(null),[ie,ae]=r.useState(null),{current:se}=r.useRef(null!=$),[le,ue]=r.useState(),ce=(0,T.Z)(t,k),de=r.useCallback((e=>{oe.current=e,e&&ae(e)}),[]),he=ie?.parentNode;r.useImperativeHandle(ce,(()=>({focus:()=>{oe.current.focus()},node:re.current,value:J})),[J]),r.useEffect((()=>{g&&te&&ie&&!se&&(ue(p?null:he.clientWidth),oe.current.focus())}),[ie,p]),r.useEffect((()=>{s&&oe.current.focus()}),[s]),r.useEffect((()=>{if(!C)return;const e=(0,c.Z)(oe.current).getElementById(C);if(e){const t=()=>{getSelection().isCollapsed&&oe.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[C]);const pe=(e,t)=>{e?V&&V(t):z&&z(t),se||(ue(p?null:he.clientWidth),ne(e))},fe=r.Children.toArray(f),me=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(A){n=Array.isArray(J)?J.slice():[];const t=J.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),J!==n&&(ee(n),F)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:N}}),F(o,e)}A||pe(!1,t)}},ge=null!==ie&&te;let ve,ye;delete Q["aria-invalid"];const be=[];let xe=!1,we=!1;((0,_.vd)({value:J})||x)&&(W?ve=W(J):xe=!0);const Se=fe.map((e=>{if(!r.isValidElement(e))return null;let t;if(A){if(!Array.isArray(J))throw new Error((0,l.Z)(2));t=J.some((t=>L(t,e.props.value))),t&&xe&&be.push(e.props.children)}else t=L(J,e.props.value),t&&xe&&(ye=e.props.children);return t&&(we=!0),r.cloneElement(e,{"aria-selected":t?"true":"false",onClick:me(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));xe&&(ve=A?0===be.length?null:be.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon",`icon${(0,d.Z)(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,a.Z)(l,D,t)})(Me),Pe={...M.PaperProps,...M.slotProps?.paper},De=(0,u.Z)();return(0,b.jsxs)(r.Fragment,{children:[(0,b.jsx)(I,{as:"div",ref:de,tabIndex:ke,role:"combobox","aria-controls":ge?De:void 0,"aria-disabled":y?"true":void 0,"aria-expanded":ge?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[C,_e].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":U?"true":void 0,"aria-invalid":w?"true":void 0,onKeyDown:e=>{if(!H){[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),pe(!0,e))}},onMouseDown:y||H?null:e=>{0===e.button&&(e.preventDefault(),oe.current.focus(),pe(!0,e))},onBlur:e=>{!ge&&j&&(Object.defineProperty(e,"target",{writable:!0,value:{value:J,name:N}}),j(e))},onFocus:B,...q,ownerState:Me,className:(0,o.Z)(q.className,Te.select,m),id:_e,children:Z(ve)?O||(O=(0,b.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ve}),(0,b.jsx)(E,{"aria-invalid":w,value:Array.isArray(J)?J.join(","):J,name:N,ref:re,"aria-hidden":!0,onChange:e=>{const t=fe.find((t=>t.props.value===e.target.value));void 0!==t&&(ee(t.props.value),F&&F(e,t))},tabIndex:-1,disabled:y,className:Te.nativeInput,autoFocus:s,required:U,...Q,ownerState:Me}),(0,b.jsx)(R,{as:S,className:Te.icon,ownerState:Me}),(0,b.jsx)(h.Z,{id:`menu-${N||""}`,anchorEl:he,open:ge,onClose:e=>{pe(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...M,slotProps:{...M.slotProps,list:{"aria-labelledby":C,role:"listbox","aria-multiselectable":A?"true":void 0,disableListWrap:!0,id:De,...M.MenuListProps},paper:{...Pe,style:{minWidth:Ce,...null!=Pe?Pe.style:null}}},children:Se})]})}));var j=n(33567),F=n(36683),z=n(97686),B=n(20540),V=n(90222),$=n(51857),H=n(24043);const W={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,y.Z)(e)&&"variant"!==e,slot:"Root"},U=(0,v.ZP)(B.Z,W)(""),q=(0,v.ZP)($.Z,W)(""),G=(0,v.ZP)(V.Z,W)(""),K=r.forwardRef((function(e,t){const n=(0,H.i)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:u,classes:c={},className:d,defaultOpen:h=!1,displayEmpty:p=!1,IconComponent:f=z.Z,id:m,input:g,inputProps:v,label:y,labelId:x,MenuProps:w,multiple:S=!1,native:k=!1,onClose:_,onOpen:M,open:P,renderValue:A,SelectDisplayProps:O,variant:I="outlined",...R}=n,E=k?C:N,L=(0,F.Z)(),Z=(0,j.Z)({props:n,muiFormControl:L,states:["variant","error"]}),B=Z.variant||I,V={...n,variant:B,classes:c},$=(e=>{const{classes:t}=e,n=(0,a.Z)({root:["root"]},D,t);return{...t,...n}})(V),{root:W,...K}=$,Y=g||{standard:(0,b.jsx)(U,{ownerState:V}),outlined:(0,b.jsx)(q,{label:y,ownerState:V}),filled:(0,b.jsx)(G,{ownerState:V})}[B],X=(0,T.Z)(t,(0,s.Z)(Y));return(0,b.jsx)(r.Fragment,{children:r.cloneElement(Y,{inputComponent:E,inputProps:{children:u,error:Z.error,IconComponent:f,variant:B,type:void 0,multiple:S,...k?{id:m}:{autoWidth:l,defaultOpen:h,displayEmpty:p,labelId:x,MenuProps:w,onClose:_,onOpen:M,open:P,renderValue:A,SelectDisplayProps:{id:m,...O}},...v,classes:v?(0,i.Z)(K,v.classes):K,...g?g.props.inputProps:{}},...(S&&k||p)&&"outlined"===B?{notched:!0}:{},ref:X,className:(0,o.Z)(Y.props.className,d,$.root),...!g&&{variant:B},...R})})}));K.muiName="Select";const Y=K},66224:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(27378),o=n(90496),i=n(82267);function a(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function s(e){return parseFloat(e)}var l=n(16838),u=n(10043),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiSkeleton",e)}(0,p.Z)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var g=n(24246);const v=u.keyframes` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `,y=u.keyframes` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `,b="string"!=typeof v?u.css` animation: ${v} 2s ease-in-out 0.5s infinite; `:null,x="string"!=typeof y?u.css` &::after { animation: ${y} 2s linear 0.5s infinite; } `:null,w=(0,c.ZP)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,d.Z)((({theme:e})=>{const t=a(e.shape.borderRadius)||"px",n=s(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,l.Fq)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:b||{animation:`${v} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(\n 90deg,\n transparent,\n ${(e.vars||e).palette.action.hover},\n transparent\n )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:x||{"&::after":{animation:`${y} 2s linear 0.5s infinite`}}}]}}))),S=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:a,component:s="span",height:l,style:u,variant:c="text",width:d,...p}=n,f={...n,animation:r,component:s,variant:c,hasChildren:Boolean(p.children)},v=(e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:a,height:s}=e,l={root:["root",n,r,o&&"withChildren",o&&!a&&"fitContent",o&&!s&&"heightAuto"]};return(0,i.Z)(l,m,t)})(f);return(0,g.jsx)(w,{as:s,ref:t,className:(0,o.Z)(v.root,a),ownerState:f,...p,style:{width:d,height:l,...u}})}))},25283:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(79886),o=n(12709),i=n(24043);const a=(0,r.Z)({createStyledComponent:(0,o.ZP)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,i.i)({props:e,name:"MuiStack"})})},87895:function(e,t,n){"use strict";n.d(t,{Z:()=>S});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(51640),l=n(90433),u=n(99140),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiSwitch",e)}const g=(0,p.Z)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]);var v=n(24246);const y=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${(0,s.Z)(n.edge)}`],t[`size${(0,s.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,[`& .${g.thumb}`]:{width:16,height:16},[`& .${g.switchBase}`]:{padding:4,[`&.${g.checked}`]:{transform:"translateX(16px)"}}}}]}),b=(0,c.ZP)(u.Z,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${g.input}`]:t.input},"default"!==n.color&&t[`color${(0,s.Z)(n.color)}`]]}})((0,d.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}),[`&.${g.checked}`]:{transform:"translateX(20px)"},[`&.${g.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${g.checked} + .${g.track}`]:{opacity:.5},[`&.${g.disabled} + .${g.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${g.input}`]:{left:"-100%",width:"300%"}}))),(0,d.Z)((({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,l.Z)(["light"])).map((([t])=>({props:{color:t},style:{[`&.${g.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.Fq)(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?(0,a.$n)(e.palette[t].main,.62):(0,a._j)(e.palette[t].main,.55)}`}},[`&.${g.checked} + .${g.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}})))]})))),x=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})((0,d.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)})))),w=(0,c.ZP)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})((0,d.Z)((({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})))),S=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiSwitch"}),{className:r,color:a="primary",edge:l=!1,size:u="medium",sx:c,...d}=n,p={...n,color:a,edge:l,size:u},f=(e=>{const{classes:t,edge:n,size:r,color:o,checked:a,disabled:l}=e,u={root:["root",n&&`edge${(0,s.Z)(n)}`,`size${(0,s.Z)(r)}`],switchBase:["switchBase",`color${(0,s.Z)(o)}`,a&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=(0,i.Z)(u,m,t);return{...t,...c}})(p),g=(0,v.jsx)(w,{className:f.thumb,ownerState:p});return(0,v.jsxs)(y,{className:(0,o.Z)(f.root,r),sx:c,ownerState:p,children:[(0,v.jsx)(b,{type:"checkbox",icon:g,checkedIcon:g,ref:t,ownerState:p,...d,classes:{...f,root:f.switchBase}}),(0,v.jsx)(x,{className:f.track,ownerState:p})]})}))},49408:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(14544),s=n(51640),l=n(12709),u=n(82319),c=n(24043),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiTab",e)}const f=(0,d.Z)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]);var m=n(24246);const g=(0,l.ZP)(a.Z,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,s.Z)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${f.iconWrapper}`]:t.iconWrapper},{[`& .${f.icon}`]:t.icon}]}})((0,u.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:{[`& > .${f.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${f.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${f.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${f.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${f.selected}`]:{opacity:1},[`&.${f.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${f.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${f.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${f.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${f.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)}}]})))),v=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiTab"}),{className:a,disabled:l=!1,disableFocusRipple:u=!1,fullWidth:d,icon:h,iconPosition:f="top",indicator:v,label:y,onChange:b,onClick:x,onFocus:w,selected:S,selectionFollowsFocus:k,textColor:C="inherit",value:_,wrapped:M=!1,...T}=n,P={...n,disabled:l,disableFocusRipple:u,selected:S,icon:!!h,iconPosition:f,label:!!y,fullWidth:d,textColor:C,wrapped:M},D=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:l,selected:u,disabled:c}=e,d={root:["root",a&&l&&"labelIcon",`textColor${(0,s.Z)(n)}`,r&&"fullWidth",o&&"wrapped",u&&"selected",c&&"disabled"],icon:["iconWrapper","icon"]};return(0,i.Z)(d,p,t)})(P),A=h&&y&&r.isValidElement(h)?r.cloneElement(h,{className:(0,o.Z)(D.icon,h.props.className)}):h;return(0,m.jsxs)(g,{focusRipple:!u,className:(0,o.Z)(D.root,a),ref:t,role:"tab","aria-selected":S,disabled:l,onClick:e=>{!S&&b&&b(e,_),x&&x(e)},onFocus:e=>{k&&!S&&b&&b(e,_),w&&w(e)},ownerState:P,tabIndex:S?0:-1,...T,children:["top"===f||"start"===f?(0,m.jsxs)(r.Fragment,{children:[A,y]}):(0,m.jsxs)(r.Fragment,{children:[y,A]}),v]})}))},90190:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(27378),o=n(90496),i=n(82267),a=n(72679),s=n(12709),l=n(82319),u=n(24043),c=n(44124),d=n(6749);function h(e){return(0,d.ZP)("MuiTable",e)}(0,c.Z)("MuiTable",["root","stickyHeader"]);var p=n(24246);const f=(0,s.ZP)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((0,l.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"}}]})))),m="table",g=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiTable"}),{className:s,component:l=m,padding:c="normal",size:d="medium",stickyHeader:g=!1,...v}=n,y={...n,component:l,padding:c,size:d,stickyHeader:g},b=(e=>{const{classes:t,stickyHeader:n}=e,r={root:["root",n&&"stickyHeader"]};return(0,i.Z)(r,h,t)})(y),x=r.useMemo((()=>({padding:c,size:d,stickyHeader:g})),[c,d,g]);return(0,p.jsx)(a.Z.Provider,{value:x,children:(0,p.jsx)(f,{as:l,role:l===m?null:"table",ref:t,className:(0,o.Z)(b.root,s),ownerState:y,...v})})}))},72679:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext()},32641:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext()},56174:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(27378),o=n(90496),i=n(82267),a=n(32641),s=n(12709),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiTableBody",e)}(0,u.Z)("MuiTableBody",["root"]);var h=n(24246);const p=(0,s.ZP)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),f={variant:"body"},m="tbody",g=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTableBody"}),{className:r,component:s=m,...u}=n,c={...n,component:s},g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(c);return(0,h.jsx)(a.Z.Provider,{value:f,children:(0,h.jsx)(p,{className:(0,o.Z)(g.root,r),as:s,ref:t,role:s===m?null:"rowgroup",ownerState:c,...u})})}))},96205:function(e,t,n){"use strict";n.d(t,{Z:()=>b});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(51640),l=n(72679),u=n(32641),c=n(12709),d=n(82319),h=n(24043),p=n(44124),f=n(6749);function m(e){return(0,f.ZP)("MuiTableCell",e)}const g=(0,p.Z)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var v=n(24246);const y=(0,c.ZP)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,s.Z)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,s.Z)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,s.Z)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((0,d.Z)((({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?(0,a.$n)((0,a.Fq)(e.palette.divider,1),.88):(0,a._j)((0,a.Fq)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${g.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]})))),b=r.forwardRef((function(e,t){const n=(0,h.i)({props:e,name:"MuiTableCell"}),{align:a="inherit",className:c,component:d,padding:p,scope:f,size:g,sortDirection:b,variant:x,...w}=n,S=r.useContext(l.Z),k=r.useContext(u.Z),C=k&&"head"===k.variant;let _;_=d||(C?"th":"td");let M=f;"td"===_?M=void 0:!M&&C&&(M="col");const T=x||k&&k.variant,P={...n,align:a,component:_,padding:p||(S&&S.padding?S.padding:"normal"),size:g||(S&&S.size?S.size:"medium"),sortDirection:b,stickyHeader:"head"===T&&S&&S.stickyHeader,variant:T},D=(e=>{const{classes:t,variant:n,align:r,padding:o,size:a,stickyHeader:l}=e,u={root:["root",n,l&&"stickyHeader","inherit"!==r&&`align${(0,s.Z)(r)}`,"normal"!==o&&`padding${(0,s.Z)(o)}`,`size${(0,s.Z)(a)}`]};return(0,i.Z)(u,m,t)})(P);let A=null;return b&&(A="asc"===b?"ascending":"descending"),(0,v.jsx)(y,{as:_,ref:t,className:(0,o.Z)(D.root,c),"aria-sort":A,scope:M,ownerState:P,...w})}))},59019:function(e,t,n){"use strict";n.d(t,{Z:()=>p});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(24043),l=n(44124),u=n(6749);function c(e){return(0,u.ZP)("MuiTableContainer",e)}(0,l.Z)("MuiTableContainer",["root"]);var d=n(24246);const h=(0,a.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),p=r.forwardRef((function(e,t){const n=(0,s.i)({props:e,name:"MuiTableContainer"}),{className:r,component:a="div",...l}=n,u={...n,component:a},p=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},c,t)})(u);return(0,d.jsx)(h,{ref:t,as:a,className:(0,o.Z)(p.root,r),ownerState:u,...l})}))},31889:function(e,t,n){"use strict";n.d(t,{Z:()=>g});var r=n(27378),o=n(90496),i=n(82267),a=n(32641),s=n(12709),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiTableHead",e)}(0,u.Z)("MuiTableHead",["root"]);var h=n(24246);const p=(0,s.ZP)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),f={variant:"head"},m="thead",g=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTableHead"}),{className:r,component:s=m,...u}=n,c={...n,component:s},g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d,t)})(c);return(0,h.jsx)(a.Z.Provider,{value:f,children:(0,h.jsx)(p,{as:s,className:(0,o.Z)(g.root,r),ref:t,role:s===m?null:"rowgroup",ownerState:c,...u})})}))},30575:function(e,t,n){"use strict";n.d(t,{Z:()=>Z});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(55879),c=n(30743),d=n(63767),h=n(96205),p=n(35231),f=n(6595),m=n(67665),g=n(63633),v=n(75094),y=n(90247),b=n(24246);const x=(0,y.Z)((0,b.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),w=(0,y.Z)((0,b.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),S=r.forwardRef((function(e,t){const{backIconButtonProps:n,count:r,disabled:o=!1,getItemAriaLabel:i,nextIconButtonProps:a,onPageChange:s,page:l,rowsPerPage:u,showFirstButton:c,showLastButton:d,slots:h={},slotProps:p={},...y}=e,S=(0,f.V)(),k=h.firstButton??v.Z,C=h.lastButton??v.Z,_=h.nextButton??v.Z,M=h.previousButton??v.Z,T=h.firstButtonIcon??w,P=h.lastButtonIcon??x,D=h.nextButtonIcon??g.Z,A=h.previousButtonIcon??m.Z,O=S?C:k,I=S?_:M,R=S?M:_,E=S?k:C,L=S?p.lastButton:p.firstButton,Z=S?p.nextButton:p.previousButton,N=S?p.previousButton:p.nextButton,j=S?p.firstButton:p.lastButton;return(0,b.jsxs)("div",{ref:t,...y,children:[c&&(0,b.jsx)(O,{onClick:e=>{s(e,0)},disabled:o||0===l,"aria-label":i("first",l),title:i("first",l),...L,children:S?(0,b.jsx)(P,{...p.lastButtonIcon}):(0,b.jsx)(T,{...p.firstButtonIcon})}),(0,b.jsx)(I,{onClick:e=>{s(e,l-1)},disabled:o||0===l,color:"inherit","aria-label":i("previous",l),title:i("previous",l),...Z??n,children:S?(0,b.jsx)(D,{...p.nextButtonIcon}):(0,b.jsx)(A,{...p.previousButtonIcon})}),(0,b.jsx)(R,{onClick:e=>{s(e,l+1)},disabled:o||-1!==r&&l>=Math.ceil(r/u)-1,color:"inherit","aria-label":i("next",l),title:i("next",l),...N??a,children:S?(0,b.jsx)(A,{...p.previousButtonIcon}):(0,b.jsx)(D,{...p.nextButtonIcon})}),d&&(0,b.jsx)(E,{onClick:e=>{s(e,Math.max(0,Math.ceil(r/u)-1))},disabled:o||l>=Math.ceil(r/u)-1,"aria-label":i("last",l),title:i("last",l),...j,children:S?(0,b.jsx)(T,{...p.firstButtonIcon}):(0,b.jsx)(P,{...p.lastButtonIcon})})]})}));var k,C=n(56839),_=n(95703),M=n(16351);const T=(0,a.ZP)(h.Z,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((0,s.Z)((({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})))),P=(0,a.ZP)(p.Z,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${_.Z.actions}`]:t.actions,...t.toolbar})})((0,s.Z)((({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${_.Z.actions}`]:{flexShrink:0,marginLeft:20}})))),D=(0,a.ZP)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),A=(0,a.ZP)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((0,s.Z)((({theme:e})=>({...e.typography.body2,flexShrink:0})))),O=(0,a.ZP)(d.Z,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${_.Z.selectIcon}`]:t.selectIcon,[`& .${_.Z.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${_.Z.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),I=(0,a.ZP)(c.Z,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),R=(0,a.ZP)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((0,s.Z)((({theme:e})=>({...e.typography.body2,flexShrink:0}))));function E({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function L(e){return`Go to ${e} page`}const Z=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTablePagination"}),{ActionsComponent:a=S,backIconButtonProps:s,colSpan:c,component:d=h.Z,count:p,disabled:f=!1,getItemAriaLabel:m=L,labelDisplayedRows:g=E,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:x,onRowsPerPageChange:w,page:Z,rowsPerPage:N,rowsPerPageOptions:j=[10,25,50,100],SelectProps:F={},showFirstButton:z=!1,showLastButton:B=!1,slotProps:V={},slots:$={},...H}=n,W=n,U=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},_.U,t)})(W),q=V?.select??F,G=q.native?"option":I;let K;d!==h.Z&&"td"!==d||(K=c||1e3);const Y=(0,C.Z)(q.id),X=(0,C.Z)(q.labelId),Q={slots:$,slotProps:V},[J,ee]=(0,M.Z)("root",{ref:t,className:U.root,elementType:T,externalForwardedProps:{...Q,component:d,...H},ownerState:W,additionalProps:{colSpan:K}}),[te,ne]=(0,M.Z)("toolbar",{className:U.toolbar,elementType:P,externalForwardedProps:Q,ownerState:W}),[re,oe]=(0,M.Z)("spacer",{className:U.spacer,elementType:D,externalForwardedProps:Q,ownerState:W}),[ie,ae]=(0,M.Z)("selectLabel",{className:U.selectLabel,elementType:A,externalForwardedProps:Q,ownerState:W,additionalProps:{id:X}}),[se,le]=(0,M.Z)("select",{className:U.select,elementType:O,externalForwardedProps:Q,ownerState:W}),[ue,ce]=(0,M.Z)("menuItem",{className:U.menuItem,elementType:G,externalForwardedProps:Q,ownerState:W}),[de,he]=(0,M.Z)("displayedRows",{className:U.displayedRows,elementType:R,externalForwardedProps:Q,ownerState:W});return(0,b.jsx)(J,{...ee,children:(0,b.jsxs)(te,{...ne,children:[(0,b.jsx)(re,{...oe}),j.length>1&&(0,b.jsx)(ie,{...ae,children:v}),j.length>1&&(0,b.jsx)(se,{variant:"standard",...!q.variant&&{input:k||(k=(0,b.jsx)(u.ZP,{}))},value:N,onChange:w,id:Y,labelId:X,...q,classes:{...q.classes,root:(0,o.Z)(U.input,U.selectRoot,(q.classes||{}).root),select:(0,o.Z)(U.select,(q.classes||{}).select),icon:(0,o.Z)(U.selectIcon,(q.classes||{}).icon)},disabled:f,...le,children:j.map((e=>(0,r.createElement)(ue,{...ce,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e)))}),(0,b.jsx)(de,{...he,children:g({from:0===p?0:Z*N+1,to:-1===p?(Z+1)*N:-1===N?p:Math.min(p,(Z+1)*N),count:-1===p?-1:p,page:Z})}),(0,b.jsx)(a,{className:U.actions,backIconButtonProps:s,count:p,nextIconButtonProps:y,onPageChange:x,page:Z,rowsPerPage:N,showFirstButton:z,showLastButton:B,slotProps:V.actions,slots:$.actions,getItemAriaLabel:m,disabled:f})]})})}))},95703:function(e,t,n){"use strict";n.d(t,{U:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTablePagination",e)}const a=(0,r.Z)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"])},14968:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(90496),i=n(82267),a=n(16838),s=n(32641),l=n(12709),u=n(82319),c=n(24043),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiTableRow",e)}const f=(0,d.Z)("MuiTableRow",["root","selected","hover","head","footer"]);var m=n(24246);const g=(0,l.ZP)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((0,u.Z)((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${f.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${f.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,a.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,a.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})))),v="tr",y=r.forwardRef((function(e,t){const n=(0,c.i)({props:e,name:"MuiTableRow"}),{className:a,component:l=v,hover:u=!1,selected:d=!1,...h}=n,f=r.useContext(s.Z),y={...n,component:l,hover:u,selected:d,head:f&&"head"===f.variant,footer:f&&"footer"===f.variant},b=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:a}=e,s={root:["root",n&&"selected",r&&"hover",o&&"head",a&&"footer"]};return(0,i.Z)(s,p,t)})(y);return(0,m.jsx)(g,{as:l,ref:t,className:(0,o.Z)(b.root,a),role:l===v?null:"row",ownerState:y,...h})}))},51781:function(e,t,n){"use strict";n.d(t,{Z:()=>z});var r=n(27378),o=n(90496),i=n(82267),a=n(6595),s=n(25399),l=n(12709),u=n(94776),c=n(82319),d=n(24043),h=n(77999);function p(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var f=n(16758),m=n(24255),g=n(24246);const v={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var y=n(67665),b=n(63633),x=n(14544),w=n(44124),S=n(6749);function k(e){return(0,S.ZP)("MuiTabScrollButton",e)}const C=(0,w.Z)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),_=(0,l.ZP)(x.Z,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${C.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),M=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:l={},slotProps:u={},direction:c,orientation:h,disabled:p,...f}=n,m=(0,a.V)(),v={isRtl:m,...n},x=(e=>{const{classes:t,orientation:n,disabled:r}=e,o={root:["root",n,r&&"disabled"]};return(0,i.Z)(o,k,t)})(v),w=l.StartScrollButtonIcon??y.Z,S=l.EndScrollButtonIcon??b.Z,C=(0,s.Z)({elementType:w,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v}),M=(0,s.Z)({elementType:S,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:v});return(0,g.jsx)(_,{component:"div",className:(0,o.Z)(x.root,r),ref:t,role:null,ownerState:v,tabIndex:null,...f,style:{...f.style,..."vertical"===h&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:"left"===c?(0,g.jsx)(w,{...C}):(0,g.jsx)(S,{...M})})}));var T=n(67151),P=n(16052),D=n(2444),A=n(16351);const O=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,I=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,R=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=n(e,o)}},E=(0,l.ZP)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${P.Z.scrollButtons}`]:t.scrollButtons},{[`& .${P.Z.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,c.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:{[`& .${P.Z.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]})))),L=(0,l.ZP)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{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"}}]}),Z=(0,l.ZP)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{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"}}]}),N=(0,l.ZP)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,c.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}}]})))),j=(0,l.ZP)((function(e){const{onChange:t,...n}=e,o=r.useRef(),i=r.useRef(null),a=()=>{o.current=i.current.offsetHeight-i.current.clientHeight};return(0,f.Z)((()=>{const e=(0,h.Z)((()=>{const e=o.current;a(),e!==o.current&&t(o.current)})),n=(0,m.Z)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}}),[t]),r.useEffect((()=>{a(),t(o.current)}),[t]),(0,g.jsx)("div",{style:v,...n,ref:i})}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),F={};const z=r.forwardRef((function(e,t){const n=(0,d.i)({props:e,name:"MuiTabs"}),l=(0,u.Z)(),c=(0,a.V)(),{"aria-label":f,"aria-labelledby":v,action:y,centered:b=!1,children:x,className:w,component:S="div",allowScrollButtonsMobile:k=!1,indicatorColor:C="primary",onChange:_,orientation:z="horizontal",ScrollButtonComponent:B,scrollButtons:V="auto",selectionFollowsFocus:$,slots:H={},slotProps:W={},TabIndicatorProps:U={},TabScrollButtonProps:q={},textColor:G="primary",value:K,variant:Y="standard",visibleScrollbar:X=!1,...Q}=n,J="scrollable"===Y,ee="vertical"===z,te=ee?"scrollTop":"scrollLeft",ne=ee?"top":"left",re=ee?"bottom":"right",oe=ee?"clientHeight":"clientWidth",ie=ee?"height":"width",ae={...n,component:S,allowScrollButtonsMobile:k,indicatorColor:C,orientation:z,vertical:ee,scrollButtons:V,textColor:G,variant:Y,visibleScrollbar:X,fixed:!J,hideScrollbar:J&&!X,scrollableX:J&&!ee,scrollableY:J&&ee,centered:b&&!J,scrollButtonsHideMobile:!k},se=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:s,scrollButtonsHideMobile:l,classes:u}=e,c={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return(0,i.Z)(c,P.m,u)})(ae),le=(0,s.Z)({elementType:H.StartScrollButtonIcon,externalSlotProps:W.startScrollButtonIcon,ownerState:ae}),ue=(0,s.Z)({elementType:H.EndScrollButtonIcon,externalSlotProps:W.endScrollButtonIcon,ownerState:ae});const[ce,de]=r.useState(!1),[he,pe]=r.useState(F),[fe,me]=r.useState(!1),[ge,ve]=r.useState(!1),[ye,be]=r.useState(!1),[xe,we]=r.useState({overflow:"hidden",scrollbarWidth:0}),Se=new Map,ke=r.useRef(null),Ce=r.useRef(null),_e={slots:H,slotProps:{indicator:U,scrollButton:q,...W}},Me=()=>{const e=ke.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==K){const e=Ce.current.children;if(e.length>0){const t=e[Se.get(K)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},Te=(0,T.Z)((()=>{const{tabsMeta:e,tabMeta:t}=Me();let n,r=0;ee?(n="top",t&&e&&(r=t.top-e.top+e.scrollTop)):(n=c?"right":"left",t&&e&&(r=(c?-1:1)*(t[n]-e[n]+e.scrollLeft)));const o={[n]:r,[ie]:t?t[ie]:0};if("number"!=typeof he[n]||"number"!=typeof he[ie])pe(o);else{const e=Math.abs(he[n]-o[n]),t=Math.abs(he[ie]-o[ie]);(e>=1||t>=1)&&pe(o)}})),Pe=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){const{ease:i=p,duration:a=300}=r;let s=null;const l=t[e];let u=!1;const c=()=>{u=!0},d=r=>{if(u)return void o(new Error("Animation cancelled"));null===s&&(s=r);const c=Math.min(1,(r-s)/a);t[e]=i(c)*(n-l)+l,c>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(d)};l===n?o(new Error("Element already at target position")):requestAnimationFrame(d)}(te,ke.current,e,{duration:l.transitions.duration.standard}):ke.current[te]=e},De=e=>{let t=ke.current[te];t+=ee?e:e*(c?-1:1),Pe(t)},Ae=()=>{const e=ke.current[oe];let t=0;const n=Array.from(Ce.current.children);for(let r=0;re){0===r&&(t=e);break}t+=o[oe]}return t},Oe=()=>{De(-1*Ae())},Ie=()=>{De(Ae())},[Re,{onChange:Ee,...Le}]=(0,A.Z)("scrollbar",{className:(0,o.Z)(se.scrollableX,se.hideScrollbar),elementType:j,shouldForwardComponentProp:!0,externalForwardedProps:_e,ownerState:ae}),Ze=r.useCallback((e=>{Ee?.(e),we({overflow:null,scrollbarWidth:e})}),[Ee]),[Ne,je]=(0,A.Z)("scrollButtons",{className:(0,o.Z)(se.scrollButtons,q.className),elementType:M,externalForwardedProps:_e,ownerState:ae,additionalProps:{orientation:z,slots:{StartScrollButtonIcon:H.startScrollButtonIcon||H.StartScrollButtonIcon,EndScrollButtonIcon:H.endScrollButtonIcon||H.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:le,endScrollButtonIcon:ue}}}),Fe=(0,T.Z)((e=>{const{tabsMeta:t,tabMeta:n}=Me();if(n&&t)if(n[ne]t[re]){const r=t[te]+(n[re]-t[re]);Pe(r,{animation:e})}})),ze=(0,T.Z)((()=>{J&&!1!==V&&be(!ye)}));r.useEffect((()=>{const e=(0,h.Z)((()=>{ke.current&&Te()}));let t;const n=n=>{n.forEach((e=>{e.removedNodes.forEach((e=>{t?.unobserve(e)})),e.addedNodes.forEach((e=>{t?.observe(e)}))})),e(),ze()},r=(0,m.Z)(ke.current);let o;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Ce.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(o=new MutationObserver(n),o.observe(Ce.current,{childList:!0})),()=>{e.clear(),r.removeEventListener("resize",e),o?.disconnect(),t?.disconnect()}}),[Te,ze]),r.useEffect((()=>{const e=Array.from(Ce.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&J&&!1!==V){const n=e[0],r=e[t-1],o={root:ke.current,threshold:.99},i=new IntersectionObserver((e=>{me(!e[0].isIntersecting)}),o);i.observe(n);const a=new IntersectionObserver((e=>{ve(!e[0].isIntersecting)}),o);return a.observe(r),()=>{i.disconnect(),a.disconnect()}}}),[J,V,ye,x?.length]),r.useEffect((()=>{de(!0)}),[]),r.useEffect((()=>{Te()})),r.useEffect((()=>{Fe(F!==he)}),[Fe,he]),r.useImperativeHandle(y,(()=>({updateIndicator:Te,updateScrollButtons:ze})),[Te,ze]);const[Be,Ve]=(0,A.Z)("indicator",{className:(0,o.Z)(se.indicator,U.className),elementType:N,externalForwardedProps:_e,ownerState:ae,additionalProps:{style:he}}),$e=(0,g.jsx)(Be,{...Ve});let He=0;const We=r.Children.map(x,(e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?He:e.props.value;Se.set(t,He);const n=t===K;return He+=1,r.cloneElement(e,{fullWidth:"fullWidth"===Y,indicator:n&&!ce&&$e,selected:n,selectionFollowsFocus:$,onChange:_,textColor:G,value:t,...1!==He||!1!==K||e.props.tabIndex?{}:{tabIndex:0}})})),Ue=(()=>{const e={};e.scrollbarSizeListener=J?(0,g.jsx)(Re,{...Le,onChange:Ze}):null;const t=J&&("auto"===V&&(fe||ge)||!0===V);return e.scrollButtonStart=t?(0,g.jsx)(Ne,{direction:c?"right":"left",onClick:Oe,disabled:!fe,...je}):null,e.scrollButtonEnd=t?(0,g.jsx)(Ne,{direction:c?"left":"right",onClick:Ie,disabled:!ge,...je}):null,e})(),[qe,Ge]=(0,A.Z)("root",{ref:t,className:(0,o.Z)(se.root,w),elementType:E,externalForwardedProps:{..._e,...Q,component:S},ownerState:ae}),[Ke,Ye]=(0,A.Z)("scroller",{ref:ke,className:se.scroller,elementType:L,externalForwardedProps:_e,ownerState:ae,additionalProps:{style:{overflow:xe.overflow,[ee?"margin"+(c?"Left":"Right"):"marginBottom"]:X?void 0:-xe.scrollbarWidth}}}),[Xe,Qe]=(0,A.Z)("list",{ref:Ce,className:(0,o.Z)(se.list,se.flexContainer),elementType:Z,externalForwardedProps:_e,ownerState:ae,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{const t=Ce.current,n=(0,D.Z)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===z?"ArrowLeft":"ArrowUp",o="horizontal"===z?"ArrowRight":"ArrowDown";switch("horizontal"===z&&c&&(r="ArrowRight",o="ArrowLeft"),e.key){case r:e.preventDefault(),R(t,n,I);break;case o:e.preventDefault(),R(t,n,O);break;case"Home":e.preventDefault(),R(t,null,O);break;case"End":e.preventDefault(),R(t,null,I)}})(t),e.onKeyDown?.(t)}})});return(0,g.jsxs)(qe,{...Ge,children:[Ue.scrollButtonStart,Ue.scrollbarSizeListener,(0,g.jsxs)(Ke,{...Ye,children:[(0,g.jsx)(Xe,{"aria-label":f,"aria-labelledby":v,"aria-orientation":"vertical"===z?"vertical":null,role:"tablist",...Qe,children:We}),ce&&$e]}),Ue.scrollButtonEnd]})}))},16052:function(e,t,n){"use strict";n.d(t,{Z:()=>a,m:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTabs",e)}const a=(0,r.Z)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"])},8695:function(e,t,n){"use strict";n.d(t,{Z:()=>k});var r=n(27378),o=n(90496),i=n(82267),a=n(5056),s=n(12709),l=n(24043),u=n(20540),c=n(90222),d=n(51857),h=n(68808),p=n(90192),f=n(32931),m=n(63767),g=n(44124),v=n(6749);function y(e){return(0,v.ZP)("MuiTextField",e)}(0,g.Z)("MuiTextField",["root"]);var b=n(16351),x=n(24246);const w={standard:u.Z,filled:c.Z,outlined:d.Z},S=(0,s.ZP)(p.Z,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),k=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:s=!1,children:u,className:c,color:d="primary",defaultValue:p,disabled:g=!1,error:v=!1,FormHelperTextProps:k,fullWidth:C=!1,helperText:_,id:M,InputLabelProps:T,inputProps:P,InputProps:D,inputRef:A,label:O,maxRows:I,minRows:R,multiline:E=!1,name:L,onBlur:Z,onChange:N,onFocus:j,placeholder:F,required:z=!1,rows:B,select:V=!1,SelectProps:$,slots:H={},slotProps:W={},type:U,value:q,variant:G="outlined",...K}=n,Y={...n,autoFocus:s,color:d,disabled:g,error:v,fullWidth:C,multiline:E,required:z,select:V,variant:G},X=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},y,t)})(Y);const Q=(0,a.Z)(M),J=_&&Q?`${Q}-helper-text`:void 0,ee=O&&Q?`${Q}-label`:void 0,te=w[G],ne={slots:H,slotProps:{input:D,inputLabel:T,htmlInput:P,formHelperText:k,select:$,...W}},re={},oe=ne.slotProps.inputLabel;"outlined"===G&&(oe&&void 0!==oe.shrink&&(re.notched=oe.shrink),re.label=O),V&&($&&$.native||(re.id=void 0),re["aria-describedby"]=void 0);const[ie,ae]=(0,b.Z)("input",{elementType:te,externalForwardedProps:ne,additionalProps:re,ownerState:Y}),[se,le]=(0,b.Z)("inputLabel",{elementType:h.Z,externalForwardedProps:ne,ownerState:Y}),[ue,ce]=(0,b.Z)("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:Y}),[de,he]=(0,b.Z)("formHelperText",{elementType:f.Z,externalForwardedProps:ne,ownerState:Y}),[pe,fe]=(0,b.Z)("select",{elementType:m.Z,externalForwardedProps:ne,ownerState:Y}),me=(0,x.jsx)(ie,{"aria-describedby":J,autoComplete:r,autoFocus:s,defaultValue:p,fullWidth:C,multiline:E,name:L,rows:B,maxRows:I,minRows:R,type:U,value:q,id:Q,inputRef:A,onBlur:Z,onChange:N,onFocus:j,placeholder:F,inputProps:ce,slots:{input:H.htmlInput?ue:void 0},...ae});return(0,x.jsxs)(S,{className:(0,o.Z)(X.root,c),disabled:g,error:v,fullWidth:C,ref:t,required:z,color:d,variant:G,ownerState:Y,...K,children:[null!=O&&""!==O&&(0,x.jsx)(se,{htmlFor:Q,id:ee,...le,children:O}),V?(0,x.jsx)(pe,{"aria-describedby":J,id:Q,labelId:ee,value:q,input:me,...fe,children:u}):me,_&&(0,x.jsx)(de,{id:J,...he,children:_})]})}))},98346:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(16819),a=n(82267),s=n(16838),l=n(14544),u=n(51640),c=n(12709),d=n(82319),h=n(90433),p=n(24043),f=n(87462),m=n(94996),g=n(19984);function v(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.includes(e):e===t)}var y=n(24246);const b=(0,c.ZP)(l.Z,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${(0,u.Z)(n.size)}`]]}})((0,d.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,[`&.${f.Z.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,s.Fq)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${f.Z.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.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,s.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,s.Fq)(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter((0,h.Z)()).map((([t])=>({props:{color:t},style:{[`&.${f.Z.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,s.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,s.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,s.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)}}]})))),x=r.forwardRef((function(e,t){const{value:n,...s}=r.useContext(m.Z),l=r.useContext(g.Z),c=(0,i.Z)({...s,selected:v(e.value,n)},e),d=(0,p.i)({props:c,name:"MuiToggleButton"}),{children:h,className:x,color:w="standard",disabled:S=!1,disableFocusRipple:k=!1,fullWidth:C=!1,onChange:_,onClick:M,selected:T,size:P="medium",value:D,...A}=d,O={...d,color:w,disabled:S,disableFocusRipple:k,fullWidth:C,size:P},I=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:s}=e,l={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${(0,u.Z)(i)}`,s]};return(0,a.Z)(l,f.a,t)})(O),R=l||"";return(0,y.jsx)(b,{className:(0,o.Z)(s.className,I.root,x,R),disabled:S,focusRipple:!k,ref:t,onClick:e=>{M&&(M(e,D),e.defaultPrevented)||_&&_(e,D)},onChange:_,value:D,ownerState:O,"aria-pressed":T,...A,children:h})}))},87462:function(e,t,n){"use strict";n.d(t,{Z:()=>a,a:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiToggleButton",e)}const a=(0,r.Z)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"])},5404:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(82267),a=n(65124),s=n(12709),l=n(82319),u=n(24043),c=n(51640),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("MuiToggleButtonGroup",e)}const f=(0,d.Z)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);var m=n(94996),g=n(19984),v=n(87462),y=n(24246);const b=(0,s.ZP)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${f.grouped}`]:t.grouped},{[`& .${f.grouped}`]:t[`grouped${(0,c.Z)(n.orientation)}`]},{[`& .${f.firstButton}`]:t.firstButton},{[`& .${f.lastButton}`]:t.lastButton},{[`& .${f.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,l.Z)((({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${f.grouped}`]:{[`&.${f.selected} + .${f.grouped}.${f.selected}`]:{borderTop:0,marginTop:0}},[`& .${f.firstButton},& .${f.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${f.lastButton},& .${f.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${f.lastButton}.${v.Z.disabled},& .${f.middleButton}.${v.Z.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${f.grouped}`]:{[`&.${f.selected} + .${f.grouped}.${f.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${f.firstButton},& .${f.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${f.lastButton},& .${f.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${f.lastButton}.${v.Z.disabled},& .${f.middleButton}.${v.Z.disabled}`]:{borderLeft:"1px solid transparent"}}}]})))),x=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiToggleButtonGroup"}),{children:s,className:l,color:d="standard",disabled:h=!1,exclusive:f=!1,fullWidth:v=!1,onChange:x,orientation:w="horizontal",size:S="medium",value:k,...C}=n,_={...n,disabled:h,fullWidth:v,orientation:w,size:S},M=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,a={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${(0,c.Z)(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,i.Z)(a,p,t)})(_),T=r.useCallback(((e,t)=>{if(!x)return;const n=k&&k.indexOf(t);let r;k&&n>=0?(r=k.slice(),r.splice(n,1)):r=k?k.concat(t):[t],x(e,r)}),[x,k]),P=r.useCallback(((e,t)=>{x&&x(e,k===t?null:t)}),[x,k]),D=r.useMemo((()=>({className:M.grouped,onChange:f?P:T,value:k,size:S,fullWidth:v,color:d,disabled:h})),[M.grouped,f,P,T,k,S,v,d,h]),A=(0,a.Z)(s),O=A.length,I=e=>{const t=0===e,n=e===O-1;return t&&n?"":t?M.firstButton:n?M.lastButton:M.middleButton};return(0,y.jsx)(b,{role:"group",className:(0,o.Z)(M.root,l),ref:t,ownerState:_,...C,children:(0,y.jsx)(m.Z.Provider,{value:D,children:A.map(((e,t)=>(0,y.jsx)(g.Z.Provider,{value:I(t),children:e},t)))})})}))},19984:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext(void 0)},94996:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(27378).createContext({})},35231:function(e,t,n){"use strict";n.d(t,{Z:()=>f});var r=n(27378),o=n(90496),i=n(82267),a=n(12709),s=n(82319),l=n(24043),u=n(44124),c=n(6749);function d(e){return(0,c.ZP)("MuiToolbar",e)}(0,u.Z)("MuiToolbar",["root","gutters","regular","dense"]);var h=n(24246);const p=(0,a.ZP)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((0,s.Z)((({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]})))),f=r.forwardRef((function(e,t){const n=(0,l.i)({props:e,name:"MuiToolbar"}),{className:r,component:a="div",disableGutters:s=!1,variant:u="regular",...c}=n,f={...n,component:a,disableGutters:s,variant:u},m=(e=>{const{classes:t,disableGutters:n,variant:r}=e,o={root:["root",!n&&"gutters",r]};return(0,i.Z)(o,d,t)})(f);return(0,h.jsx)(p,{as:a,className:(0,o.Z)(m.root,r),ref:t,ownerState:f,...c})}))},32964:function(e,t,n){"use strict";n.d(t,{Z:()=>I});var r=n(27378),o=n(90496),i=n(60203),a=n(82267),s=n(16838),l=n(6595),u=n(74111),c=n(94680),d=n(12709),h=n(94776),p=n(82319),f=n(24043),m=n(51640),g=n(23382),v=n(75651),y=n(67151),b=n(51183),x=n(56839),w=n(18817),S=n(16351),k=n(87143),C=n(24246);const _=(0,d.ZP)(v.Z,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((0,p.Z)((({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${k.Z.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${k.Z.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${k.Z.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${k.Z.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${k.Z.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${k.Z.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${k.Z.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${k.Z.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]})))),M=(0,d.ZP)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,m.Z)(n.placement.split("-")[0])}`]]}})((0,p.Z)((({theme:e})=>{return{backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,s.Fq)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${k.Z.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${k.Z.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${k.Z.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${k.Z.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(t=16/14,Math.round(1e5*t)/1e5)+"em",fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${k.Z.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${k.Z.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${k.Z.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${k.Z.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${k.Z.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${k.Z.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${k.Z.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${k.Z.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${k.Z.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${k.Z.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]};var t}))),T=(0,d.ZP)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((0,p.Z)((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,s.Fq)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))));let P=!1;const D=new i.V;let A={x:0,y:0};function O(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const I=r.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiTooltip"}),{arrow:s=!1,children:d,classes:p,components:I={},componentsProps:R={},describeChild:E=!1,disableFocusListener:L=!1,disableHoverListener:Z=!1,disableInteractive:N=!1,disableTouchListener:j=!1,enterDelay:F=100,enterNextDelay:z=0,enterTouchDelay:B=700,followCursor:V=!1,id:$,leaveDelay:H=0,leaveTouchDelay:W=1500,onClose:U,onOpen:q,open:G,placement:K="bottom",PopperComponent:Y,PopperProps:X={},slotProps:Q={},slots:J={},title:ee,TransitionComponent:te,TransitionProps:ne,...re}=n,oe=r.isValidElement(d)?d:(0,C.jsx)("span",{children:d}),ie=(0,h.Z)(),ae=(0,l.V)(),[se,le]=r.useState(),[ue,ce]=r.useState(null),de=r.useRef(!1),he=N||V,pe=(0,i.Z)(),fe=(0,i.Z)(),me=(0,i.Z)(),ge=(0,i.Z)(),[ve,ye]=(0,w.Z)({controlled:G,default:!1,name:"Tooltip",state:"open"});let be=ve;const xe=(0,x.Z)($),we=r.useRef(),Se=(0,y.Z)((()=>{void 0!==we.current&&(document.body.style.WebkitUserSelect=we.current,we.current=void 0),ge.clear()}));r.useEffect((()=>Se),[Se]);const ke=e=>{D.clear(),P=!0,ye(!0),q&&!be&&q(e)},Ce=(0,y.Z)((e=>{D.start(800+H,(()=>{P=!1})),ye(!1),U&&be&&U(e),pe.start(ie.transitions.duration.shortest,(()=>{de.current=!1}))})),_e=e=>{de.current&&"touchstart"!==e.type||(se&&se.removeAttribute("title"),fe.clear(),me.clear(),F||P&&z?fe.start(P?z:F,(()=>{ke(e)})):ke(e))},Me=e=>{fe.clear(),me.start(H,(()=>{Ce(e)}))},[,Te]=r.useState(!1),Pe=e=>{(0,u.Z)(e.target)||(Te(!1),Me(e))},De=e=>{se||le(e.currentTarget),(0,u.Z)(e.target)&&(Te(!0),_e(e))},Ae=e=>{de.current=!0;const t=oe.props;t.onTouchStart&&t.onTouchStart(e)},Oe=e=>{Ae(e),me.clear(),pe.clear(),Se(),we.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ge.start(B,(()=>{document.body.style.WebkitUserSelect=we.current,_e(e)}))},Ie=e=>{oe.props.onTouchEnd&&oe.props.onTouchEnd(e),Se(),me.start(W,(()=>{Ce(e)}))};r.useEffect((()=>{if(be)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&Ce(e)}}),[Ce,be]);const Re=(0,b.Z)((0,c.Z)(oe),le,t);ee||0===ee||(be=!1);const Ee=r.useRef(),Le={},Ze="string"==typeof ee;E?(Le.title=be||!Ze||Z?null:ee,Le["aria-describedby"]=be?xe:null):(Le["aria-label"]=Ze?ee:null,Le["aria-labelledby"]=be&&!Ze?xe:null);const Ne={...Le,...re,...oe.props,className:(0,o.Z)(re.className,oe.props.className),onTouchStart:Ae,ref:Re,...V?{onMouseMove:e=>{const t=oe.props;t.onMouseMove&&t.onMouseMove(e),A={x:e.clientX,y:e.clientY},Ee.current&&Ee.current.update()}}:{}};const je={};j||(Ne.onTouchStart=Oe,Ne.onTouchEnd=Ie),Z||(Ne.onMouseOver=O(_e,Ne.onMouseOver),Ne.onMouseLeave=O(Me,Ne.onMouseLeave),he||(je.onMouseOver=_e,je.onMouseLeave=Me)),L||(Ne.onFocus=O(De,Ne.onFocus),Ne.onBlur=O(Pe,Ne.onBlur),he||(je.onFocus=De,je.onBlur=Pe));const Fe={...n,isRtl:ae,arrow:s,disableInteractive:he,placement:K,PopperComponentProp:Y,touch:de.current},ze="function"==typeof Q.popper?Q.popper(Fe):Q.popper,Be=r.useMemo((()=>{let e=[{name:"arrow",enabled:Boolean(ue),options:{element:ue,padding:4}}];return X.popperOptions?.modifiers&&(e=e.concat(X.popperOptions.modifiers)),ze?.popperOptions?.modifiers&&(e=e.concat(ze.popperOptions.modifiers)),{...X.popperOptions,...ze?.popperOptions,modifiers:e}}),[ue,X.popperOptions,ze?.popperOptions]),Ve=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${(0,m.Z)(i.split("-")[0])}`],arrow:["arrow"]};return(0,a.Z)(s,k.Q,t)})(Fe),$e="function"==typeof Q.transition?Q.transition(Fe):Q.transition,He={slots:{popper:I.Popper,transition:I.Transition??te,tooltip:I.Tooltip,arrow:I.Arrow,...J},slotProps:{arrow:Q.arrow??R.arrow,popper:{...X,...ze??R.popper},tooltip:Q.tooltip??R.tooltip,transition:{...ne,...$e??R.transition}}},[We,Ue]=(0,S.Z)("popper",{elementType:_,externalForwardedProps:He,ownerState:Fe,className:(0,o.Z)(Ve.popper,X?.className)}),[qe,Ge]=(0,S.Z)("transition",{elementType:g.Z,externalForwardedProps:He,ownerState:Fe}),[Ke,Ye]=(0,S.Z)("tooltip",{elementType:M,className:Ve.tooltip,externalForwardedProps:He,ownerState:Fe}),[Xe,Qe]=(0,S.Z)("arrow",{elementType:T,className:Ve.arrow,externalForwardedProps:He,ownerState:Fe,ref:ce});return(0,C.jsxs)(r.Fragment,{children:[r.cloneElement(oe,Ne),(0,C.jsx)(We,{as:Y??v.Z,placement:K,anchorEl:V?{getBoundingClientRect:()=>({top:A.y,left:A.x,right:A.x,bottom:A.y,width:0,height:0})}:se,popperRef:Ee,open:!!se&&be,id:xe,transition:!0,...je,...Ue,popperOptions:Be,children:({TransitionProps:e})=>(0,C.jsx)(qe,{timeout:ie.transitions.duration.shorter,...e,...Ge,children:(0,C.jsxs)(Ke,{...Ye,children:[ee,s?(0,C.jsx)(Xe,{...Qe}):null]})})})]})}))},87143:function(e,t,n){"use strict";n.d(t,{Q:()=>i,Z:()=>a});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTooltip",e)}const a=(0,r.Z)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"])},52054:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(90496),i=n(82267),a=n(16577),s=n(12709),l=n(82319),u=n(24043),c=n(51640),d=n(90433),h=n(67488),p=n(24246);const f={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},m=(0,a.u7)(),g=(0,s.ZP)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${(0,c.Z)(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((0,l.Z)((({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter((([e,t])=>"inherit"!==e&&t&&"object"==typeof t)).map((([e,t])=>({props:{variant:e},style:t}))),...Object.entries(e.palette).filter((0,d.Z)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))),...Object.entries(e.palette?.text||{}).filter((([,e])=>"string"==typeof e)).map((([t])=>({props:{color:`text${(0,c.Z)(t)}`},style:{color:(e.vars||e).palette.text[t]}}))),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]})))),v={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},y=r.forwardRef((function(e,t){const{color:n,...r}=(0,u.i)({props:e,name:"MuiTypography"}),a=m({...r,...!f[n]&&{color:n}}),{align:s="inherit",className:l,component:d,gutterBottom:y=!1,noWrap:b=!1,paragraph:x=!1,variant:w="body1",variantMapping:S=v,...k}=a,C={...a,align:s,color:n,className:l,component:d,gutterBottom:y,noWrap:b,paragraph:x,variant:w,variantMapping:S},_=d||(x?"p":S[w]||v[w])||"span",M=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:s}=e,l={root:["root",a,"inherit"!==e.align&&`align${(0,c.Z)(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,i.Z)(l,h.f,s)})(C);return(0,p.jsx)(g,{as:_,ref:t,className:(0,o.Z)(M.root,l),...k,ownerState:C,style:{..."inherit"!==s&&{"--Typography-textAlign":s},...k.style}})}))},67488:function(e,t,n){"use strict";n.d(t,{Z:()=>a,f:()=>i});var r=n(44124),o=n(6749);function i(e){return(0,o.ZP)("MuiTypography",e)}const a=(0,r.Z)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"])},25188:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(27378),o=n(97048),i=n(94680),a=n(80668),s=n(24246);const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function u(e){const t=[],n=[];return Array.from(e.querySelectorAll(l)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function c(){return!0}const d=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:l=!1,disableRestoreFocus:d=!1,getTabbable:h=u,isEnabled:p=c,open:f}=e,m=r.useRef(!1),g=r.useRef(null),v=r.useRef(null),y=r.useRef(null),b=r.useRef(null),x=r.useRef(!1),w=r.useRef(null),S=(0,o.Z)((0,i.Z)(t),w),k=r.useRef(null);r.useEffect((()=>{f&&w.current&&(x.current=!n)}),[n,f]),r.useEffect((()=>{if(!f||!w.current)return;const e=(0,a.Z)(w.current);return w.current.contains(e.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),x.current&&w.current.focus()),()=>{d||(y.current&&y.current.focus&&(m.current=!0,y.current.focus()),y.current=null)}}),[f]),r.useEffect((()=>{if(!f||!w.current)return;const e=(0,a.Z)(w.current),t=t=>{k.current=t,!l&&p()&&"Tab"===t.key&&e.activeElement===w.current&&t.shiftKey&&(m.current=!0,v.current&&v.current.focus())},n=()=>{const t=w.current;if(null===t)return;if(!e.hasFocus()||!p()||m.current)return void(m.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==g.current&&e.activeElement!==v.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!x.current)return;let n=[];if(e.activeElement!==g.current&&e.activeElement!==v.current||(n=h(w.current)),n.length>0){const e=Boolean(k.current?.shiftKey&&"Tab"===k.current?.key),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,l,d,p,f,h]);const C=e=>{null===y.current&&(y.current=e.relatedTarget),x.current=!0};return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:C,ref:g,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:S,onFocus:e=>{null===y.current&&(y.current=e.relatedTarget),x.current=!0,b.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,s.jsx)("div",{tabIndex:f?0:-1,onFocus:C,ref:v,"data-testid":"sentinelEnd"})]})}},99140:function(e,t,n){"use strict";n.d(t,{Z:()=>y});var r=n(27378),o=n(82267),i=n(51640),a=n(73037),s=n(12709),l=n(18817),u=n(36683),c=n(14544),d=n(44124),h=n(6749);function p(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,d.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var f=n(16351),m=n(24246);const g=(0,s.ZP)(c.Z)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),v=(0,s.ZP)("input",{shouldForwardProp:a.Z})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=r.forwardRef((function(e,t){const{autoFocus:n,checked:r,checkedIcon:a,defaultChecked:s,disabled:c,disableFocusRipple:d=!1,edge:h=!1,icon:y,id:b,inputProps:x,inputRef:w,name:S,onBlur:k,onChange:C,onFocus:_,readOnly:M,required:T=!1,tabIndex:P,type:D,value:A,slots:O={},slotProps:I={},...R}=e,[E,L]=(0,l.Z)({controlled:r,default:Boolean(s),name:"SwitchBase",state:"checked"}),Z=(0,u.Z)();let N=c;Z&&void 0===N&&(N=Z.disabled);const j="checkbox"===D||"radio"===D,F={...e,checked:E,disabled:N,disableFocusRipple:d,edge:h},z=(e=>{const{classes:t,checked:n,disabled:r,edge:a}=e,s={root:["root",n&&"checked",r&&"disabled",a&&`edge${(0,i.Z)(a)}`],input:["input"]};return(0,o.Z)(s,p,t)})(F),B={slots:O,slotProps:{input:x,...I}},[V,$]=(0,f.Z)("root",{ref:t,elementType:g,className:z.root,shouldForwardComponentProp:!0,externalForwardedProps:{...B,component:"span",...R},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{_&&_(e),Z&&Z.onFocus&&Z.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{k&&k(e),Z&&Z.onBlur&&Z.onBlur(e)})(t)}}),ownerState:F,additionalProps:{centerRipple:!0,focusRipple:!d,disabled:N,role:void 0,tabIndex:null}}),[H,W]=(0,f.Z)("input",{ref:w,elementType:v,className:z.input,externalForwardedProps:B,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;L(t),C&&C(e,t)})(t)}}),ownerState:F,additionalProps:{autoFocus:n,checked:r,defaultChecked:s,disabled:N,id:j?b:void 0,name:S,readOnly:M,required:T,tabIndex:P,type:D,..."checkbox"===D&&void 0===A?{}:{value:A}}});return(0,m.jsxs)(V,{...$,children:[(0,m.jsx)(H,{...W}),E?a:y]})}))},97686:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},23049:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M19 6.41L17.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"}),"Close")},67665:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft")},63633:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(90247),o=n(24246);const i=(0,r.Z)((0,o.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight")},45178:function(e,t,n){"use strict";n.d(t,{Z:()=>Q});var r=n(62220),o=n(61170),i=n(16838);const a={black:"#000",white:"#fff"},s={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},l={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},u={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},c={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},d={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},h={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},p={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function f(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:a.white,default:a.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const m=f();function g(){return{text:{primary:a.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:a.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const v=g();function y(e,t,n,r){const o=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,i.$n)(e.main,o):"dark"===t&&(e.dark=(0,i._j)(e.main,a)))}function b(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:b=.2,...x}=e,w=e.primary||function(e="light"){return"dark"===e?{main:d[200],light:d[50],dark:d[400]}:{main:d[700],light:d[400],dark:d[800]}}(t),S=e.secondary||function(e="light"){return"dark"===e?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),k=e.error||function(e="light"){return"dark"===e?{main:u[500],light:u[300],dark:u[700]}:{main:u[700],light:u[400],dark:u[800]}}(t),C=e.info||function(e="light"){return"dark"===e?{main:h[400],light:h[300],dark:h[700]}:{main:h[700],light:h[500],dark:h[900]}}(t),_=e.success||function(e="light"){return"dark"===e?{main:p[400],light:p[300],dark:p[700]}:{main:p[800],light:p[500],dark:p[900]}}(t),M=e.warning||function(e="light"){return"dark"===e?{main:c[400],light:c[300],dark:c[700]}:{main:"#ed6c02",light:c[500],dark:c[900]}}(t);function T(e){return(0,i.mi)(e,v.text.primary)>=n?v.text.primary:m.text.primary}const P=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,r.Z)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error((0,r.Z)(12,t?` (${t})`:"",JSON.stringify(e.main)));return y(e,"light",o,b),y(e,"dark",i,b),e.contrastText||(e.contrastText=T(e.main)),e};let D;"light"===t?D=f():"dark"===t&&(D=g());return(0,o.Z)({common:{...a},mode:t,primary:P({color:w,name:"primary"}),secondary:P({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:P({color:k,name:"error"}),warning:P({color:M,name:"warning"}),info:P({color:C,name:"info"}),success:P({color:_,name:"success"}),grey:s,contrastThreshold:n,getContrastText:T,augmentColor:P,tonalOffset:b,...D},x)}function x(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}var w=n(4715),S=n(82664);function k(e){const t={};return Object.entries(e).forEach((e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const C=(e,t,n,r=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function _(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),C(i,e,`var(${r})`,s),C(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const M=function(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...u}=e,{vars:c,css:d,varsWithDefaults:h}=_(u,t);let p=h;const f={},{[l]:m,...g}=a;if(Object.entries(g||{}).forEach((([e,n])=>{const{vars:r,css:i,varsWithDefaults:a}=_(n,t);p=(0,o.Z)(p,a),f[e]={css:i,vars:r}})),m){const{css:e,vars:n,varsWithDefaults:r}=_(m,t);p=(0,o.Z)(p,r),f[l]={css:e,vars:n}}function v(t,n){let r=i;if("class"===i&&(r=".%s"),"data"===i&&(r="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(r=`[${i}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...c};return Object.entries(f).forEach((([,{vars:t}])=>{e=(0,o.Z)(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function i(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}i(n(void 0,{...d}),d);const{[o]:s,...l}=f;if(s){const{css:e}=s,t=a[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};i(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=a[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};i(n(e,{...s}),s)})),t}}};var T=n(40273),P=n(11652),D=n(6798);var A=n(50971);function O(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const I=["none",O(0,2,1,-1,0,1,1,0,0,1,3,0),O(0,3,1,-2,0,2,2,0,0,1,5,0),O(0,3,3,-2,0,3,4,0,0,1,8,0),O(0,2,4,-1,0,4,5,0,0,1,10,0),O(0,3,5,-1,0,5,8,0,0,1,14,0),O(0,3,5,-1,0,6,10,0,0,1,18,0),O(0,4,5,-2,0,7,10,1,0,2,16,1),O(0,5,5,-3,0,8,10,1,0,3,14,2),O(0,5,6,-3,0,9,12,1,0,3,16,2),O(0,6,6,-3,0,10,14,1,0,4,18,3),O(0,6,7,-4,0,11,15,1,0,4,20,3),O(0,7,8,-4,0,12,17,2,0,5,22,4),O(0,7,8,-4,0,13,19,2,0,5,24,4),O(0,7,9,-4,0,14,21,2,0,5,26,4),O(0,8,9,-5,0,15,22,2,0,6,28,5),O(0,8,10,-5,0,16,24,2,0,6,30,5),O(0,8,11,-5,0,17,26,2,0,6,32,5),O(0,9,11,-5,0,18,28,2,0,7,34,6),O(0,9,12,-6,0,19,29,2,0,7,36,6),O(0,10,13,-6,0,20,31,3,0,8,38,7),O(0,10,13,-6,0,21,33,3,0,8,40,7),O(0,10,14,-6,0,22,35,3,0,8,42,7),O(0,11,14,-7,0,23,36,3,0,9,44,8),O(0,11,15,-7,0,24,38,3,0,9,46,8)];var R=n(39508);const E={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function L(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let i=0;i(0,o.Z)(e,t)),f),f.unstable_sxConfig={...T.Z,...d?.unstable_sxConfig},f.unstable_sx=function(e){return(0,P.Z)({sx:e,theme:this})},f.toRuntimeSource=L,f}const N=Z;var j=n(8505);const F=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=(0,j.Z)(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function z(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function B(e){return"dark"===e?F:[]}function V(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const $=e=>[...[...Array(25)].map(((t,n)=>`--${e?`${e}-`:""}overlays-${n}`)),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],H=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return $(e.cssVarPrefix).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function W(e,t,n){!e[t]&&n&&(e[t]=n)}function U(e){return"string"==typeof e&&e.startsWith("hsl")?(0,i.ve)(e):e}function q(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,i.LR)(U(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const G=e=>{try{return e()}catch(e){}},K=(e="mui")=>x(e);function Y(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=b(t);return{palette:i,opacity:{...z(i.mode),...n},overlays:r||B(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=N({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...z(o),...t?.opacity},overlays:t?.overlays||B(o)},a}function X(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:b({...!0===n?{}:n.palette,mode:t})})}function Q(e={},...t){const{palette:n,cssVariables:a=!1,colorSchemes:s=(n?void 0:{light:!0}),defaultColorScheme:l=n?.mode,...u}=e,c=l||"light",d=s?.[c],h={...s,...n?{[c]:{..."boolean"!=typeof d&&d,palette:n}}:void 0};if(!1===a){if(!("colorSchemes"in e))return N(e,...t);let r=n;"palette"in e||h[c]&&(!0!==h[c]?r=h[c].palette:"dark"===c&&(r={mode:"dark"}));const o=N({...e,palette:r},...t);return o.defaultColorScheme=c,o.colorSchemes=h,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==h.light&&h.light,palette:o.palette},X(o,"dark",h.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==h.dark&&h.dark,palette:o.palette},X(o,"light",h.light)),o}return n||"light"in h||"light"!==c||(h.light=!0),function(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:a,disableCssColorScheme:s=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:u=V,colorSchemeSelector:c=(n.light&&n.dark?"media":void 0),rootSelector:d=":root",...h}=e,p=Object.keys(n)[0],f=a||(n.light&&"light"!==p?"light":p),m=K(l),{[f]:g,light:v,dark:y,...b}=n,x={...b};let C=g;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(C=!0),!C)throw new Error((0,r.Z)(21,f));const _=Y(x,C,h,f);v&&!x.light&&Y(x,v,void 0,"light"),y&&!x.dark&&Y(x,y,void 0,"dark");let D={defaultColorScheme:f,..._,cssVarPrefix:l,colorSchemeSelector:c,rootSelector:d,getCssVar:m,colorSchemes:x,font:{...k(_.typography),..._.font},spacing:(A=h.spacing,"number"==typeof A?`${A}px`:"string"==typeof A||"function"==typeof A||Array.isArray(A)?A:"8px")};var A;Object.keys(D.colorSchemes).forEach((e=>{const t=D.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return m(e,t[r][o])};var r;if("light"===t.mode&&(W(t.common,"background","#fff"),W(t.common,"onBackground","#000")),"dark"===t.mode&&(W(t.common,"background","#000"),W(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){W(t.Alert,"errorColor",(0,i.q8)(t.error.light,.6)),W(t.Alert,"infoColor",(0,i.q8)(t.info.light,.6)),W(t.Alert,"successColor",(0,i.q8)(t.success.light,.6)),W(t.Alert,"warningColor",(0,i.q8)(t.warning.light,.6)),W(t.Alert,"errorFilledBg",n("palette-error-main")),W(t.Alert,"infoFilledBg",n("palette-info-main")),W(t.Alert,"successFilledBg",n("palette-success-main")),W(t.Alert,"warningFilledBg",n("palette-warning-main")),W(t.Alert,"errorFilledColor",G((()=>t.getContrastText(t.error.main)))),W(t.Alert,"infoFilledColor",G((()=>t.getContrastText(t.info.main)))),W(t.Alert,"successFilledColor",G((()=>t.getContrastText(t.success.main)))),W(t.Alert,"warningFilledColor",G((()=>t.getContrastText(t.warning.main)))),W(t.Alert,"errorStandardBg",(0,i.ux)(t.error.light,.9)),W(t.Alert,"infoStandardBg",(0,i.ux)(t.info.light,.9)),W(t.Alert,"successStandardBg",(0,i.ux)(t.success.light,.9)),W(t.Alert,"warningStandardBg",(0,i.ux)(t.warning.light,.9)),W(t.Alert,"errorIconColor",n("palette-error-main")),W(t.Alert,"infoIconColor",n("palette-info-main")),W(t.Alert,"successIconColor",n("palette-success-main")),W(t.Alert,"warningIconColor",n("palette-warning-main")),W(t.AppBar,"defaultBg",n("palette-grey-100")),W(t.Avatar,"defaultBg",n("palette-grey-400")),W(t.Button,"inheritContainedBg",n("palette-grey-300")),W(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),W(t.Chip,"defaultBorder",n("palette-grey-400")),W(t.Chip,"defaultAvatarColor",n("palette-grey-700")),W(t.Chip,"defaultIconColor",n("palette-grey-700")),W(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(t.LinearProgress,"primaryBg",(0,i.ux)(t.primary.main,.62)),W(t.LinearProgress,"secondaryBg",(0,i.ux)(t.secondary.main,.62)),W(t.LinearProgress,"errorBg",(0,i.ux)(t.error.main,.62)),W(t.LinearProgress,"infoBg",(0,i.ux)(t.info.main,.62)),W(t.LinearProgress,"successBg",(0,i.ux)(t.success.main,.62)),W(t.LinearProgress,"warningBg",(0,i.ux)(t.warning.main,.62)),W(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),W(t.Slider,"primaryTrack",(0,i.ux)(t.primary.main,.62)),W(t.Slider,"secondaryTrack",(0,i.ux)(t.secondary.main,.62)),W(t.Slider,"errorTrack",(0,i.ux)(t.error.main,.62)),W(t.Slider,"infoTrack",(0,i.ux)(t.info.main,.62)),W(t.Slider,"successTrack",(0,i.ux)(t.success.main,.62)),W(t.Slider,"warningTrack",(0,i.ux)(t.warning.main,.62));const e=(0,i.fk)(t.background.default,.8);W(t.SnackbarContent,"bg",e),W(t.SnackbarContent,"color",G((()=>t.getContrastText(e)))),W(t.SpeedDialAction,"fabHoverBg",(0,i.fk)(t.background.paper,.15)),W(t.StepConnector,"border",n("palette-grey-400")),W(t.StepContent,"border",n("palette-grey-400")),W(t.Switch,"defaultColor",n("palette-common-white")),W(t.Switch,"defaultDisabledColor",n("palette-grey-100")),W(t.Switch,"primaryDisabledColor",(0,i.ux)(t.primary.main,.62)),W(t.Switch,"secondaryDisabledColor",(0,i.ux)(t.secondary.main,.62)),W(t.Switch,"errorDisabledColor",(0,i.ux)(t.error.main,.62)),W(t.Switch,"infoDisabledColor",(0,i.ux)(t.info.main,.62)),W(t.Switch,"successDisabledColor",(0,i.ux)(t.success.main,.62)),W(t.Switch,"warningDisabledColor",(0,i.ux)(t.warning.main,.62)),W(t.TableCell,"border",(0,i.ux)((0,i.zp)(t.divider,1),.88)),W(t.Tooltip,"bg",(0,i.zp)(t.grey[700],.92))}if("dark"===t.mode){W(t.Alert,"errorColor",(0,i.ux)(t.error.light,.6)),W(t.Alert,"infoColor",(0,i.ux)(t.info.light,.6)),W(t.Alert,"successColor",(0,i.ux)(t.success.light,.6)),W(t.Alert,"warningColor",(0,i.ux)(t.warning.light,.6)),W(t.Alert,"errorFilledBg",n("palette-error-dark")),W(t.Alert,"infoFilledBg",n("palette-info-dark")),W(t.Alert,"successFilledBg",n("palette-success-dark")),W(t.Alert,"warningFilledBg",n("palette-warning-dark")),W(t.Alert,"errorFilledColor",G((()=>t.getContrastText(t.error.dark)))),W(t.Alert,"infoFilledColor",G((()=>t.getContrastText(t.info.dark)))),W(t.Alert,"successFilledColor",G((()=>t.getContrastText(t.success.dark)))),W(t.Alert,"warningFilledColor",G((()=>t.getContrastText(t.warning.dark)))),W(t.Alert,"errorStandardBg",(0,i.q8)(t.error.light,.9)),W(t.Alert,"infoStandardBg",(0,i.q8)(t.info.light,.9)),W(t.Alert,"successStandardBg",(0,i.q8)(t.success.light,.9)),W(t.Alert,"warningStandardBg",(0,i.q8)(t.warning.light,.9)),W(t.Alert,"errorIconColor",n("palette-error-main")),W(t.Alert,"infoIconColor",n("palette-info-main")),W(t.Alert,"successIconColor",n("palette-success-main")),W(t.Alert,"warningIconColor",n("palette-warning-main")),W(t.AppBar,"defaultBg",n("palette-grey-900")),W(t.AppBar,"darkBg",n("palette-background-paper")),W(t.AppBar,"darkColor",n("palette-text-primary")),W(t.Avatar,"defaultBg",n("palette-grey-600")),W(t.Button,"inheritContainedBg",n("palette-grey-800")),W(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),W(t.Chip,"defaultBorder",n("palette-grey-700")),W(t.Chip,"defaultAvatarColor",n("palette-grey-300")),W(t.Chip,"defaultIconColor",n("palette-grey-300")),W(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(t.LinearProgress,"primaryBg",(0,i.q8)(t.primary.main,.5)),W(t.LinearProgress,"secondaryBg",(0,i.q8)(t.secondary.main,.5)),W(t.LinearProgress,"errorBg",(0,i.q8)(t.error.main,.5)),W(t.LinearProgress,"infoBg",(0,i.q8)(t.info.main,.5)),W(t.LinearProgress,"successBg",(0,i.q8)(t.success.main,.5)),W(t.LinearProgress,"warningBg",(0,i.q8)(t.warning.main,.5)),W(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),W(t.Slider,"primaryTrack",(0,i.q8)(t.primary.main,.5)),W(t.Slider,"secondaryTrack",(0,i.q8)(t.secondary.main,.5)),W(t.Slider,"errorTrack",(0,i.q8)(t.error.main,.5)),W(t.Slider,"infoTrack",(0,i.q8)(t.info.main,.5)),W(t.Slider,"successTrack",(0,i.q8)(t.success.main,.5)),W(t.Slider,"warningTrack",(0,i.q8)(t.warning.main,.5));const e=(0,i.fk)(t.background.default,.98);W(t.SnackbarContent,"bg",e),W(t.SnackbarContent,"color",G((()=>t.getContrastText(e)))),W(t.SpeedDialAction,"fabHoverBg",(0,i.fk)(t.background.paper,.15)),W(t.StepConnector,"border",n("palette-grey-600")),W(t.StepContent,"border",n("palette-grey-600")),W(t.Switch,"defaultColor",n("palette-grey-300")),W(t.Switch,"defaultDisabledColor",n("palette-grey-600")),W(t.Switch,"primaryDisabledColor",(0,i.q8)(t.primary.main,.55)),W(t.Switch,"secondaryDisabledColor",(0,i.q8)(t.secondary.main,.55)),W(t.Switch,"errorDisabledColor",(0,i.q8)(t.error.main,.55)),W(t.Switch,"infoDisabledColor",(0,i.q8)(t.info.main,.55)),W(t.Switch,"successDisabledColor",(0,i.q8)(t.success.main,.55)),W(t.Switch,"warningDisabledColor",(0,i.q8)(t.warning.main,.55)),W(t.TableCell,"border",(0,i.q8)((0,i.zp)(t.divider,1),.68)),W(t.Tooltip,"bg",(0,i.zp)(t.grey[700],.92))}q(t.background,"default"),q(t.background,"paper"),q(t.common,"background"),q(t.common,"onBackground"),q(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&W(t[e],"mainChannel",(0,i.LR)(U(n.main))),n.light&&W(t[e],"lightChannel",(0,i.LR)(U(n.light))),n.dark&&W(t[e],"darkChannel",(0,i.LR)(U(n.dark))),n.contrastText&&W(t[e],"contrastTextChannel",(0,i.LR)(U(n.contrastText))),"text"===e&&(q(t[e],"primary"),q(t[e],"secondary")),"action"===e&&(n.active&&q(t[e],"active"),n.selected&&q(t[e],"selected")))}))})),D=t.reduce(((e,t)=>(0,o.Z)(e,t)),D);const O={prefix:l,disableCssColorScheme:s,shouldSkipGeneratingVar:u,getSelector:H(D)},{vars:I,generateThemeVars:R,generateStyleSheets:E}=M(D,O);return D.vars=I,Object.entries(D.colorSchemes[D.defaultColorScheme]).forEach((([e,t])=>{D[e]=t})),D.generateThemeVars=R,D.generateStyleSheets=E,D.generateSpacing=function(){return(0,w.Z)(h.spacing,(0,S.hB)(this))},D.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(c),D.spacing=D.generateSpacing(),D.shouldSkipGeneratingVar=u,D.unstable_sxConfig={...T.Z,...h?.unstable_sxConfig},D.unstable_sx=function(e){return(0,P.Z)({sx:e,theme:this})},D.toRuntimeSource=L,D}({...u,colorSchemes:h,defaultColorScheme:c,..."boolean"!=typeof a&&a},...t)}},39508:function(e,t,n){"use strict";n.d(t,{ZP:()=>s,x9:()=>o});const r={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i(e){return`${Math.round(e)}ms`}function a(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function s(e){const t={...r,...e.easing},n={...o,...e.duration};return{getAutoHeightDuration:a,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:s=0,...l}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:i(o)} ${a} ${"string"==typeof s?s:i(s)}`)).join(",")},...e,easing:t,duration:n}}},50971:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(61170);const o={textTransform:"uppercase"},i='"Roboto", "Helvetica", "Arial", sans-serif';function a(e,t){const{fontFamily:n=i,fontSize:a=14,fontWeightLight:s=300,fontWeightRegular:l=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:d=16,allVariants:h,pxToRem:p,...f}="function"==typeof t?t(e):t;const m=a/14,g=p||(e=>e/d*m+"rem"),v=(e,t,r,o,a)=>{return{fontFamily:n,fontWeight:e,fontSize:g(t),lineHeight:r,...n===i?{letterSpacing:(s=o/t,Math.round(1e5*s)/1e5)+"em"}:{},...a,...h};var s},y={h1:v(s,96,1.167,-1.5),h2:v(s,60,1.2,-.5),h3:v(l,48,1.167,0),h4:v(l,34,1.235,.25),h5:v(l,24,1.334,0),h6:v(u,20,1.6,.15),subtitle1:v(l,16,1.75,.15),subtitle2:v(u,14,1.57,.1),body1:v(l,16,1.5,.15),body2:v(l,14,1.43,.15),button:v(u,14,1.75,.4,o),caption:v(l,12,1.66,.4),overline:v(l,12,2.66,1,o),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,r.Z)({htmlFontSize:d,pxToRem:g,fontFamily:n,fontSize:a,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:u,fontWeightBold:c,...y},f,{clone:!1})}},53126:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=(0,n(45178).Z)()},8505:function(e,t,n){"use strict";function r(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}n.d(t,{Z:()=>r})},92994:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r="$$material"},73037:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(4005);const o=e=>(0,r.Z)(e)&&"classes"!==e},4005:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},12709:function(e,t,n){"use strict";n.d(t,{ZP:()=>s});var r=n(35315),o=n(53126),i=n(92994),a=n(73037);const s=(0,r.ZP)({themeId:i.Z,defaultTheme:o.Z,rootShouldForwardProp:a.Z})},94776:function(e,t,n){"use strict";n.d(t,{Z:()=>a});n(27378);var r=n(38971),o=n(53126),i=n(92994);function a(){const e=(0,r.Z)(o.Z);return e[i.Z]||e}},68014:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(22179),o=n(53126),i=n(92994);function a({props:e,name:t}){return(0,r.Z)({props:e,name:t,defaultTheme:o.Z,themeId:i.Z})}},42777:function(e,t,n){"use strict";n.d(t,{C:()=>o,n:()=>r});const r=e=>e.scrollTop;function o(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}},70678:function(e,t,n){"use strict";n.d(t,{D:()=>c,Z:()=>m});var r=n(27378),o=n(5056),i=n(9831),a=n(7860),s=n(81925),l=n(85817);function u(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function c(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let c=a?s.trim():s;n&&(c=c.toLowerCase()),t&&(c=u(c));const d=c?e.filter((e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=u(r)),"start"===o?r.startsWith(c):r.includes(c)})):e;return"number"==typeof r?d.slice(0,r):d}}const d=c(),h=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),p=[];function f(e,t,n){if(t||null==e)return"";const r=n(e);return"string"==typeof r?r:""}const m=function(e){const{unstable_isActiveElementInListbox:t=h,unstable_classNamePrefix:n="Mui",autoComplete:u=!1,autoHighlight:c=!1,autoSelect:m=!1,blurOnSelect:g=!1,clearOnBlur:v=!e.freeSolo,clearOnEscape:y=!1,componentName:b="useAutocomplete",defaultValue:x=(e.multiple?p:null),disableClearable:w=!1,disableCloseOnSelect:S=!1,disabled:k,disabledItemsFocusable:C=!1,disableListWrap:_=!1,filterOptions:M=d,filterSelectedOptions:T=!1,freeSolo:P=!1,getOptionDisabled:D,getOptionKey:A,getOptionLabel:O=e=>e.label??e,groupBy:I,handleHomeEndKeys:R=!e.freeSolo,id:E,includeInputInList:L=!1,inputValue:Z,isOptionEqualToValue:N=(e,t)=>e===t,multiple:j=!1,onChange:F,onClose:z,onHighlightChange:B,onInputChange:V,onOpen:$,open:H,openOnFocus:W=!1,options:U,readOnly:q=!1,selectOnFocus:G=!e.freeSolo,value:K}=e,Y=(0,o.Z)(E);let X=O;X=e=>{const t=O(e);return"string"!=typeof t?String(t):t};const Q=r.useRef(!1),J=r.useRef(!0),ee=r.useRef(null),te=r.useRef(null),[ne,re]=r.useState(null),[oe,ie]=r.useState(-1),ae=c?0:-1,se=r.useRef(ae),le=r.useRef(f(x,j,X)).current,[ue,ce]=(0,i.Z)({controlled:K,default:x,name:b}),[de,he]=(0,i.Z)({controlled:Z,default:le,name:b,state:"inputValue"}),[pe,fe]=r.useState(!1),me=r.useCallback(((e,t,n)=>{if(!(j?ue.length!T||!(j?ue:[ue]).some((t=>null!==t&&N(e,t))))),{inputValue:xe&&ye?"":de,getOptionLabel:X}):[],ke=(0,a.Z)({filteredOptions:Se,value:ue,inputValue:de});r.useEffect((()=>{const e=ue!==ke.value;pe&&!e||P&&!e||me(null,ue,"reset")}),[ue,me,pe,ke.value,P]);const Ce=ge&&Se.length>0&&!q,_e=(0,s.Z)((e=>{-1===e?ee.current.focus():ne.querySelector(`[data-tag-index="${e}"]`).focus()}));r.useEffect((()=>{j&&oe>ue.length-1&&(ie(-1),_e(-1))}),[ue,j,oe,_e]);const Me=(0,s.Z)((({event:e,index:t,reason:r="auto"})=>{if(se.current=t,-1===t?ee.current.removeAttribute("aria-activedescendant"):ee.current.setAttribute("aria-activedescendant",`${Y}-option-${t}`),B&&B(e,-1===t?null:Se[t],r),!te.current)return;const o=te.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));let i=te.current;if("listbox"!==te.current.getAttribute("role")&&(i=te.current.parentElement.querySelector('[role="listbox"]')),!i)return;if(-1===t)return void(i.scrollTop=0);const a=te.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r&&"touch"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(I?1.3:0){if(!we)return;const o=function(e,t){if(!te.current||e<0||e>=Se.length)return-1;let n=e;for(;;){const r=te.current.querySelector(`[data-option-index="${n}"]`),o=!C&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!o)return n;if(n="next"===t?(n+1)%Se.length:(n-1+Se.length)%Se.length,n===e)return-1}}((()=>{const e=Se.length-1;if("reset"===t)return ae;if("start"===t)return 0;if("end"===t)return e;const n=se.current+t;return n<0?-1===n&&L?-1:_&&-1!==se.current||Math.abs(t)>1?0:e:n>e?n===e+1&&L?-1:_||Math.abs(t)>1?e:0:n})(),n);if(Me({index:o,reason:r,event:e}),u&&"reset"!==t)if(-1===o)ee.current.value=de;else{const e=X(Se[o]);ee.current.value=e;0===e.toLowerCase().indexOf(de.toLowerCase())&&de.length>0&&ee.current.setSelectionRange(de.length,e.length)}})),Pe=r.useCallback((()=>{if(!we)return;const e=(()=>{if(-1!==se.current&&ke.filteredOptions&&ke.filteredOptions.length!==Se.length&&ke.inputValue===de&&(j?ue.length===ke.value.length&&ke.value.every(((e,t)=>X(ue[t])===X(e))):(e=ke.value,t=ue,(e?X(e):"")===(t?X(t):"")))){const e=ke.filteredOptions[se.current];if(e)return Se.findIndex((t=>X(t)===X(e)))}var e,t;return-1})();if(-1!==e)return void(se.current=e);const t=j?ue[0]:ue;if(0!==Se.length&&null!=t){if(te.current)if(null==t)se.current>=Se.length-1?Me({index:Se.length-1}):Me({index:se.current});else{const e=Se[se.current];if(j&&e&&-1!==ue.findIndex((t=>N(e,t))))return;const n=Se.findIndex((e=>N(e,t)));-1===n?Te({diff:"reset"}):Me({index:n})}}else Te({diff:"reset"})}),[Se.length,!j&&ue,T,Te,Me,we,de,j]),De=(0,s.Z)((e=>{(0,l.Z)(te,e),e&&Pe()}));r.useEffect((()=>{Pe()}),[Pe]);const Ae=e=>{ge||(ve(!0),be(!0),$&&$(e))},Oe=(e,t)=>{ge&&(ve(!1),z&&z(e,t))},Ie=(e,t,n,r)=>{if(j){if(ue.length===t.length&&ue.every(((e,n)=>e===t[n])))return}else if(ue===t)return;F&&F(e,t,n,r),ce(t)},Re=r.useRef(!1),Ee=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(j){i=Array.isArray(ue)?ue.slice():[];const e=i.findIndex((e=>N(t,e)));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}me(e,i,o),Ie(e,i,o,{option:t}),S||e&&(e.ctrlKey||e.metaKey)||Oe(e,o),(!0===g||"touch"===g&&Re.current||"mouse"===g&&!Re.current)&&ee.current.blur()},Le=(e,t)=>{if(!j)return;""===de&&Oe(e,"toggleInput");let n=oe;-1===oe?""===de&&"previous"===t&&(n=ue.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===ue.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===ue.length||"previous"===t&&-1===n)return-1;const e=ne.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),ie(n),_e(n)},Ze=e=>{Q.current=!0,he(""),V&&V(e,"","clear"),Ie(e,j?[]:null,"clear")},Ne=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===oe||["ArrowLeft","ArrowRight"].includes(t.key)||(ie(-1),_e(-1)),229!==t.which))switch(t.key){case"Home":we&&R&&(t.preventDefault(),Te({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":we&&R&&(t.preventDefault(),Te({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Te({diff:-5,direction:"previous",reason:"keyboard",event:t}),Ae(t);break;case"PageDown":t.preventDefault(),Te({diff:5,direction:"next",reason:"keyboard",event:t}),Ae(t);break;case"ArrowDown":t.preventDefault(),Te({diff:1,direction:"next",reason:"keyboard",event:t}),Ae(t);break;case"ArrowUp":t.preventDefault(),Te({diff:-1,direction:"previous",reason:"keyboard",event:t}),Ae(t);break;case"ArrowLeft":Le(t,"previous");break;case"ArrowRight":Le(t,"next");break;case"Enter":if(-1!==se.current&&we){const e=Se[se.current],n=!!D&&D(e);if(t.preventDefault(),n)return;Ee(t,e,"selectOption"),u&&ee.current.setSelectionRange(ee.current.value.length,ee.current.value.length)}else P&&""!==de&&!1===xe&&(j&&t.preventDefault(),Ee(t,de,"createOption","freeSolo"));break;case"Escape":we?(t.preventDefault(),t.stopPropagation(),Oe(t,"escape")):y&&(""!==de||j&&ue.length>0)&&(t.preventDefault(),t.stopPropagation(),Ze(t));break;case"Backspace":if(j&&!q&&""===de&&ue.length>0){const e=-1===oe?ue.length-1:oe,n=ue.slice();n.splice(e,1),Ie(t,n,"removeOption",{option:ue[e]})}break;case"Delete":if(j&&!q&&""===de&&ue.length>0&&-1!==oe){const e=oe,n=ue.slice();n.splice(e,1),Ie(t,n,"removeOption",{option:ue[e]})}}},je=e=>{fe(!0),W&&!Q.current&&Ae(e)},Fe=e=>{t(te)?ee.current.focus():(fe(!1),J.current=!0,Q.current=!1,m&&-1!==se.current&&we?Ee(e,Se[se.current],"blur"):m&&P&&""!==de?Ee(e,de,"blur","freeSolo"):v&&me(e,ue,"blur"),Oe(e,"blur"))},ze=e=>{const t=e.target.value;de!==t&&(he(t),be(!1),V&&V(e,t,"input")),""===t?w||j||Ie(e,null,"clear"):Ae(e)},Be=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));se.current!==t&&Me({event:e,index:t,reason:"mouse"})},Ve=e=>{Me({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Re.current=!0},$e=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));Ee(e,Se[t],"selectOption"),Re.current=!1},He=e=>t=>{const n=ue.slice();n.splice(e,1),Ie(t,n,"removeOption",{option:ue[e]})},We=e=>{ge?Oe(e,"toggleInput"):Ae(e)},Ue=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==Y&&e.preventDefault()},qe=e=>{e.currentTarget.contains(e.target)&&(ee.current.focus(),G&&J.current&&ee.current.selectionEnd-ee.current.selectionStart==0&&ee.current.select(),J.current=!1)},Ge=e=>{k||""!==de&&ge||We(e)};let Ke=P&&de.length>0;Ke=Ke||(j?ue.length>0:null!==ue);let Ye=Se;if(I){new Map;Ye=Se.reduce(((e,t,n)=>{const r=I(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e}),[])}return k&&pe&&Fe(),{getRootProps:(e={})=>({...e,onKeyDown:Ne(e),onMouseDown:Ue,onClick:qe}),getInputLabelProps:()=>({id:`${Y}-label`,htmlFor:Y}),getInputProps:()=>({id:Y,value:de,onBlur:Fe,onFocus:je,onChange:ze,onMouseDown:Ge,"aria-activedescendant":we?"":null,"aria-autocomplete":u?"both":"list","aria-controls":Ce?`${Y}-listbox`:void 0,"aria-expanded":Ce,autoComplete:"off",ref:ee,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:k}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Ze}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:We}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!q&&{onDelete:He(e)}}),getListboxProps:()=>({role:"listbox",id:`${Y}-listbox`,"aria-labelledby":`${Y}-label`,ref:De,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(j?ue:[ue]).some((e=>null!=e&&N(t,e))),r=!!D&&D(t);return{key:A?.(t)??X(t),tabIndex:-1,role:"option",id:`${Y}-option-${e}`,onMouseMove:Be,onClick:$e,onTouchStart:Ve,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:Y,inputValue:de,value:ue,dirty:Ke,expanded:we&&ne,popupOpen:we,focused:pe||-1!==oe,anchorEl:ne,setAnchorEl:re,focusedTag:oe,groupedOptions:Ye}}},76439:function(e,t,n){"use strict";n.d(t,{Z:()=>h});var r=n(27378),o=n.t(r,2),i=n(96858),a=n(49267),s=n(24105);function l(e,t,n,o,a){const[s,l]=r.useState((()=>a&&n?n(e).matches:o?o(e).matches:t));return(0,i.Z)((()=>{if(!n)return;const t=n(e),r=()=>{l(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}}),[e,n]),s}const u={...o}.useSyncExternalStore;function c(e,t,n,o,i){const a=r.useCallback((()=>t),[t]),s=r.useMemo((()=>{if(i&&n)return()=>n(e).matches;if(null!==o){const{matches:t}=o(e);return()=>t}return a}),[a,e,o,i,n]),[l,c]=r.useMemo((()=>{if(null===n)return[a,()=>()=>{}];const t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]}),[a,n,e]);return u(c,l,s)}function d(e={}){const{themeId:t}=e;return function(e,n={}){let r=(0,s.Z)();r&&t&&(r=r[t]||r);const o="undefined"!=typeof window&&void 0!==window.matchMedia,{defaultMatches:i=!1,matchMedia:d=(o?window.matchMedia:null),ssrMatchMedia:h=null,noSsr:p=!1}=(0,a.Z)({name:"MuiUseMediaQuery",props:n,theme:r});let f="function"==typeof e?e(r):e;f=f.replace(/^@media( ?)/m,"");return(void 0!==u?c:l)(f,i,d,h,p)}}d();const h=d({themeId:n(92994).Z})},51640:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(3150).Z},65698:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(38543).Z},90433:function(e,t,n){"use strict";function r(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}n.d(t,{Z:()=>r})},90247:function(e,t,n){"use strict";n.d(t,{Z:()=>v});var r=n(27378),o=n(90496),i=n(82267),a=n(51640),s=n(12709),l=n(82319),u=n(24043),c=n(44124),d=n(6749);function h(e){return(0,d.ZP)("MuiSvgIcon",e)}(0,c.Z)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var p=n(24246);const f=(0,s.ZP)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,a.Z)(n.color)}`],t[`fontSize${(0,a.Z)(n.fontSize)}`]]}})((0,l.Z)((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),m=r.forwardRef((function(e,t){const n=(0,u.i)({props:e,name:"MuiSvgIcon"}),{children:s,className:l,color:c="inherit",component:d="svg",fontSize:m="medium",htmlColor:g,inheritViewBox:v=!1,titleAccess:y,viewBox:b="0 0 24 24",...x}=n,w=r.isValidElement(s)&&"svg"===s.type,S={...n,color:c,component:d,fontSize:m,instanceFontSize:e.fontSize,inheritViewBox:v,viewBox:b,hasSvgAsChild:w},k={};v||(k.viewBox=b);const C=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&`color${(0,a.Z)(t)}`,`fontSize${(0,a.Z)(n)}`]};return(0,i.Z)(o,h,r)})(S);return(0,p.jsxs)(f,{as:d,className:(0,o.Z)(C.root,l),focusable:"false",color:g,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t,...k,...x,...w&&s.props,ownerState:S,children:[w?s.props.children:s,y?(0,p.jsx)("title",{children:y}):null]})}));m.muiName="SvgIcon";const g=m;function v(e,t){function n(n,r){return(0,p.jsx)(g,{"data-testid":`${t}Icon`,ref:r,...n,children:e})}return n.muiName=g.muiName,r.memo(r.forwardRef(n))}},77999:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(24384).Z},87554:function(e,t,n){"use strict";n.r(t),n.d(t,{requirePropFactory:()=>p,unstable_useEnhancedEffect:()=>m.Z,ownerDocument:()=>d.Z,setRef:()=>f,useControlled:()=>y.Z,unstable_ClassNameGenerator:()=>S,isMuiElement:()=>u.Z,unstable_memoTheme:()=>c.Z,ownerWindow:()=>h.Z,useEventCallback:()=>b.Z,deprecatedPropType:()=>l,useForkRef:()=>x.Z,createSvgIcon:()=>a.Z,capitalize:()=>o.Z,debounce:()=>s.Z,unsupportedProp:()=>v,mergeSlotProps:()=>w.Z,unstable_useId:()=>g.Z,createChainedFunction:()=>i.Z});var r=n(70544),o=n(51640),i=n(65698),a=n(90247),s=n(77999);const l=function(e,t){return()=>null};var u=n(70777),c=n(82319),d=n(2444),h=n(24255);const p=function(e,t){return()=>null};const f=n(85817).Z;var m=n(16758),g=n(56839);const v=function(e,t,n,r,o){return null};var y=n(18817),b=n(67151),x=n(51183),w=n(27834);const S={configure:e=>{r.Z.configure(e)}}},88653:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e){return"string"==typeof e}},70777:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(11104).Z},82319:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(83606);const o={theme:void 0};const i=function(e){let t,n;return function(i){let a=t;return void 0!==a&&i.theme===n||(o.theme=i.theme,a=(0,r.Z)(e(o)),t=a,n=i.theme),a}}},27834:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(90496);function o(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return n=>{const o="function"==typeof t?t(n):t,i="function"==typeof e?e({...n,...o}):e,a=(0,r.Z)(n?.className,o?.className,i?.className);return{...o,...i,...!!a&&{className:a},...o?.style&&i?.style&&{style:{...o.style,...i.style}},...o?.sx&&i?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(i.sx)?i.sx:[i.sx]]}}};const n=t,o=(0,r.Z)(n?.className,e?.className);return{...t,...e,...!!o&&{className:o},...n?.style&&e?.style&&{style:{...n.style,...e.style}},...n?.sx&&e?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}},2444:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(80668).Z},24255:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(33205).Z},18817:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(9831).Z},16758:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(96858).Z},67151:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(81925).Z},51183:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(97048).Z},56839:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=n(5056).Z},16351:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(97048),o=n(60206),i=n(85480),a=n(92729);function s(e,t){const{className:n,elementType:s,ownerState:l,externalForwardedProps:u,internalForwardedProps:c,shouldForwardComponentProp:d=!1,...h}=t,{component:p,slots:f={[e]:void 0},slotProps:m={[e]:void 0},...g}=u,v=f[e]||s,y=(0,i.Z)(m[e],l),{props:{component:b,...x},internalRef:w}=(0,a.Z)({className:n,...h,externalForwardedProps:"root"===e?g:void 0,externalSlotProps:y}),S=(0,r.Z)(w,y?.ref,t.ref),k="root"===e?b||p:b;return[v,(0,o.Z)(v,{..."root"===e&&!p&&!f[e]&&c,..."root"!==e&&!f[e]&&c,...x,...k&&!d&&{as:k},...k&&d&&{component:k},ref:S},l)]}},16577:function(e,t,n){"use strict";n.d(t,{zY:()=>d,u7:()=>h});n(27378);var r=n(93772),o=n(69118),i=n(38971),a=n(24246);const s=function({styles:e,themeId:t,defaultTheme:n={}}){const r=(0,i.Z)(n),s="function"==typeof e?e(t&&r[t]||r):e;return(0,a.jsx)(o.Z,{styles:s})};var l=n(53126),u=n(92994);const c=function(e){return(0,a.jsx)(s,{...e,defaultTheme:l.Z,themeId:u.Z})};function d(e){return function(t){return(0,a.jsx)(c,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}function h(){return r.Z}},69118:function(e,t,n){"use strict";n.d(t,{Z:()=>i});n(27378);var r=n(10043),o=n(24246);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.Global,{styles:i})}},89966:function(e,t,n){"use strict";n.d(t,{ZP:()=>i,bu:()=>l,nf:()=>a});var r=n(51958),o=n(42747);function i(e,t){return(0,r.default)(e,t)}function a(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const s=[];function l(e){return s[0]=e,(0,o.O)(s)}},34807:function(e,t,n){"use strict";n.d(t,{Z:()=>l,i:()=>s});var r=n(27378),o=n(16819),i=n(24246);const a=r.createContext(void 0);function s({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.Z)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.Z)(i,r)}({props:e,name:t,theme:{components:r.useContext(a)}})}const l=function({value:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}},6595:function(e,t,n){"use strict";n.d(t,{V:()=>a,Z:()=>s});var r=n(27378),o=n(24246);const i=r.createContext();const a=()=>r.useContext(i)??!1,s=function({value:e,...t}){return(0,o.jsx)(i.Provider,{value:e??!0,...t})}},79886:function(e,t,n){"use strict";n.d(t,{Z:()=>x});var r=n(27378),o=n(90496),i=n(61170),a=n(6749),s=n(82267),l=n(4560),u=n(22179),c=n(93772),d=n(6798),h=n(13890),p=n(82664),f=n(24246);const m=(0,d.Z)(),g=(0,l.Z)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function v(e){return(0,u.Z)({props:e,name:"MuiStack",defaultTheme:m})}function y(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i{let n={display:"flex",flexDirection:"column",...(0,h.k9)({theme:t},(0,h.P$)({values:e.direction,breakpoints:t.breakpoints.values}),(e=>({flexDirection:e})))};if(e.spacing){const r=(0,p.hB)(t),o=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)),{}),a=(0,h.P$)({values:e.direction,base:o}),s=(0,h.P$)({values:e.spacing,base:o});"object"==typeof a&&Object.keys(a).forEach(((e,t,n)=>{if(!a[e]){const r=t>0?a[n[t-1]]:"column";a[e]=r}}));const l=(t,n)=>{return e.useFlexGap?{gap:(0,p.NA)(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${o=n?a[n]:e.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]}`]:(0,p.NA)(r,t)}};var o};n=(0,i.Z)(n,(0,h.k9)({theme:t},s,l))}return n=(0,h.dt)(t.breakpoints,n),n};function x(e={}){const{createStyledComponent:t=g,useThemeProps:n=v,componentName:i="MuiStack"}=e,l=t(b);return r.forwardRef((function(e,t){const r=n(e),u=(0,c.Z)(r),{component:d="div",direction:h="column",spacing:p=0,divider:m,children:g,className:v,useFlexGap:b=!1,...x}=u,w={direction:h,spacing:p,useFlexGap:b},S=(0,s.Z)({root:["root"]},(e=>(0,a.ZP)(i,e)),{});return(0,f.jsx)(l,{as:d,ownerState:w,ref:t,className:(0,o.Z)(S.root,v),...x,children:m?y(g,m):g})}))}},13890:function(e,t,n){"use strict";n.d(t,{L7:()=>c,P$:()=>h,VO:()=>i,W8:()=>u,dt:()=>d,k9:()=>l});var r=n(61170),o=n(58787);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},a={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`},s={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:i[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function l(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||a;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||a;return Object.keys(t).reduce(((a,l)=>{if((0,o.WX)(e.keys,l)){const e=(0,o.ue)(r.containerQueries?r:s,l);e&&(a[e]=n(t[l],l))}else if(Object.keys(e.values||i).includes(l)){a[e.up(l)]=n(t[l],l)}else{const e=l;a[e]=t[e]}return a}),{})}return n(t)}function u(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function c(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function d(e,...t){const n=u(e),o=[n,...t].reduce(((e,t)=>(0,r.Z)(e,t)),{});return c(Object.keys(n),o)}function h({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}},16838:function(e,t,n){"use strict";n.d(t,{q8:()=>m,_j:()=>f,mi:()=>d,wy:()=>l,$n:()=>g,zp:()=>p,LR:()=>s,fk:()=>b,ux:()=>v,Fq:()=>h,tB:()=>a,ve:()=>u,_4:()=>y});var r=n(62220);const o=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))};function i(e,t=0,n=1){return o(e,t,n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error((0,r.Z)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error((0,r.Z)(10,o))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:o}}const s=(e,t)=>{try{return(e=>{const t=a(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(t){return e}};function l(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function u(e){e=a(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let u="rgb";const c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(u+="a",c.push(t[3])),l({type:u,values:c})}function c(e){let t="hsl"===(e=a(e)).type||"hsla"===e.type?a(u(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function h(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function p(e,t,n){try{return h(e,t)}catch(t){return e}}function f(e,t){if(e=a(e),t=i(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function m(e,t,n){try{return f(e,t)}catch(t){return e}}function g(e,t){if(e=a(e),t=i(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}function v(e,t,n){try{return g(e,t)}catch(t){return e}}function y(e,t=.15){return c(e)>.5?f(e,t):g(e,t)}function b(e,t,n){try{return y(e,t)}catch(t){return e}}},35315:function(e,t,n){"use strict";n.d(t,{ZP:()=>p,x9:()=>u});var r=n(89966),o=n(61170),i=n(6798),a=n(11652),s=n(83606);const l=(0,i.Z)();function u(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function c(e){return e?(t,n)=>n[e]:null}function d(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>d(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return h(e,n.variants,[t])}return n?.isProcessed?n.style:n}function h(e,t,n=[]){let r;e:for(let o=0;o{(0,r.nf)(e,(e=>e.filter((e=>e!==a.Z))));const{name:n,slot:l,skipVariantsResolver:v,skipSx:y,overridesResolver:b=c(m(l)),...x}=t,w=void 0!==v?v:l&&"Root"!==l&&"root"!==l||!1,S=y||!1;let k=u;"Root"===l||"root"===l?k=i:l?k=p:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(k=void 0);const C=(0,r.ZP)(e,{shouldForwardProp:k,label:f(n,l),...x}),_=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return d(t,e)};if((0,o.P)(e)){const t=(0,s.Z)(e);return t.variants?function(e){return d(e,t)}:t.style}return e},M=(...t)=>{const r=[],o=t.map(_),i=[];if(r.push(g),n&&b&&i.push((function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=d(e,r[t]);return b(e,o)})),n&&!w&&i.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?h(e,r):null})),S||i.push(a.Z),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(i.length).fill("");let a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}const s=[...r,...o,...i],l=C(...s);return e.muiName&&(l.muiName=e.muiName),l};return C.withConfig&&(M.withConfig=C.withConfig),M}}function f(e,t){}function m(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}},4715:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(82664);function o(e=8,t=(0,r.hB)({spacing:e})){if(e.mui)return e;const n=(...e)=>{return(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}},6798:function(e,t,n){"use strict";n.d(t,{Z:()=>d});var r=n(61170);function o(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:u,only:function(e){return a.indexOf(e)+1(0,r.Z)(e,t)),v),v.unstable_sxConfig={...u.Z,...f?.unstable_sxConfig},v.unstable_sx=function(e){return(0,l.Z)({sx:e,theme:this})},v}},58787:function(e,t,n){"use strict";function r(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}function o(e,t){return"@"===t||t.startsWith("@")&&(e.some((e=>t.startsWith(`@${e}`)))||!!t.match(/^@\d/))}function i(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function a(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}n.d(t,{WX:()=>o,ZP:()=>a,ar:()=>r,ue:()=>i})},76360:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(61170);const o=function(e,t){return t?(0,r.Z)(e,t,{clone:!1}):e}},83606:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(89966);function o(e){const{variants:t,...n}=e,o={variants:t,style:(0,r.bu)(n),isProcessed:!0};return o.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=(0,r.bu)(e.style))})),o}},82664:function(e,t,n){"use strict";n.d(t,{hB:()=>f,eI:()=>p,NA:()=>m,e6:()=>y,o3:()=>b});var r=n(13890),o=n(33160),i=n(76360);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],o=s[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),c=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...c,...d];function p(e,t,n,r){const i=(0,o.DW)(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e);const n=i[t];return e>=0?n:"number"==typeof n?-n:`-${n}`}:"function"==typeof i?i:()=>{}}function f(e){return p(e,"spacing",8)}function m(e,t){return"string"==typeof t||null==t?t:e(t)}function g(e,t,n,o){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(u(n),o),a=e[n];return(0,r.k9)(e,a,i)}function v(e,t){const n=f(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(i.Z,{})}function y(e){return v(e,c)}function b(e){return v(e,d)}function x(e){return v(e,h)}y.propTypes={},y.filterProps=c,b.propTypes={},b.filterProps=d,x.propTypes={},x.filterProps=h},33160:function(e,t,n){"use strict";n.d(t,{DW:()=>i,Jq:()=>a,ZP:()=>s});var r=n(3150),o=n(13890);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function a(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:i(e,n)||r,t&&(o=t(o,r,e)),o}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,u=e=>{if(null==e[t])return null;const u=e[t],c=i(e.theme,s)||{};return(0,o.k9)(e,u,(e=>{let o=a(c,l,e);return e===o&&"string"==typeof e&&(o=a(c,l,`${t}${"default"===e?"":(0,r.Z)(e)}`,e)),!1===n?o:{[n]:o}}))};return u.propTypes={},u.filterProps=[t],u}},40273:function(e,t,n){"use strict";n.d(t,{Z:()=>E});var r=n(82664),o=n(33160),i=n(76360);const a=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?(0,i.Z)(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};var s=n(13890);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,o.ZP)({prop:e,themeKey:"borders",transform:t})}const c=u("border",l),d=u("borderTop",l),h=u("borderRight",l),p=u("borderBottom",l),f=u("borderLeft",l),m=u("borderColor"),g=u("borderTopColor"),v=u("borderRightColor"),y=u("borderBottomColor"),b=u("borderLeftColor"),x=u("outline",l),w=u("outlineColor"),S=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.eI)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r.NA)(t,e)});return(0,s.k9)(e,e.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"];a(c,d,h,p,f,m,g,v,y,b,S,x,w);const k=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.eI)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.gap,n)}return null};k.propTypes={},k.filterProps=["gap"];const C=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.eI)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.columnGap,n)}return null};C.propTypes={},C.filterProps=["columnGap"];const _=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.eI)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r.NA)(t,e)});return(0,s.k9)(e,e.rowGap,n)}return null};_.propTypes={},_.filterProps=["rowGap"];a(k,C,_,(0,o.ZP)({prop:"gridColumn"}),(0,o.ZP)({prop:"gridRow"}),(0,o.ZP)({prop:"gridAutoFlow"}),(0,o.ZP)({prop:"gridAutoColumns"}),(0,o.ZP)({prop:"gridAutoRows"}),(0,o.ZP)({prop:"gridTemplateColumns"}),(0,o.ZP)({prop:"gridTemplateRows"}),(0,o.ZP)({prop:"gridTemplateAreas"}),(0,o.ZP)({prop:"gridArea"}));function M(e,t){return"grey"===t?t:e}a((0,o.ZP)({prop:"color",themeKey:"palette",transform:M}),(0,o.ZP)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:M}),(0,o.ZP)({prop:"backgroundColor",themeKey:"palette",transform:M}));function T(e){return e<=1&&0!==e?100*e+"%":e}const P=(0,o.ZP)({prop:"width",transform:T}),D=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||s.VO[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:T(t)}};return(0,s.k9)(e,e.maxWidth,t)}return null};D.filterProps=["maxWidth"];const A=(0,o.ZP)({prop:"minWidth",transform:T}),O=(0,o.ZP)({prop:"height",transform:T}),I=(0,o.ZP)({prop:"maxHeight",transform:T}),R=(0,o.ZP)({prop:"minHeight",transform:T}),E=((0,o.ZP)({prop:"size",cssProperty:"width",transform:T}),(0,o.ZP)({prop:"size",cssProperty:"height",transform:T}),a(P,D,A,O,I,R,(0,o.ZP)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:M},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:M},backgroundColor:{themeKey:"palette",transform:M},p:{style:r.o3},pt:{style:r.o3},pr:{style:r.o3},pb:{style:r.o3},pl:{style:r.o3},px:{style:r.o3},py:{style:r.o3},padding:{style:r.o3},paddingTop:{style:r.o3},paddingRight:{style:r.o3},paddingBottom:{style:r.o3},paddingLeft:{style:r.o3},paddingX:{style:r.o3},paddingY:{style:r.o3},paddingInline:{style:r.o3},paddingInlineStart:{style:r.o3},paddingInlineEnd:{style:r.o3},paddingBlock:{style:r.o3},paddingBlockStart:{style:r.o3},paddingBlockEnd:{style:r.o3},m:{style:r.e6},mt:{style:r.e6},mr:{style:r.e6},mb:{style:r.e6},ml:{style:r.e6},mx:{style:r.e6},my:{style:r.e6},margin:{style:r.e6},marginTop:{style:r.e6},marginRight:{style:r.e6},marginBottom:{style:r.e6},marginLeft:{style:r.e6},marginX:{style:r.e6},marginY:{style:r.e6},marginInline:{style:r.e6},marginInlineStart:{style:r.e6},marginInlineEnd:{style:r.e6},marginBlock:{style:r.e6},marginBlockStart:{style:r.e6},marginBlockEnd:{style:r.e6},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:k},rowGap:{style:_},columnGap:{style:C},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:T},maxWidth:{style:D},minWidth:{transform:T},height:{transform:T},maxHeight:{transform:T},minHeight:{transform:T},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},93772:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(61170),o=n(40273);const i=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??o.Z;return Object.keys(e).forEach((r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t};function a(e){const{sx:t,...n}=e,{systemProps:o,otherProps:a}=i(n);let s;return s=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return(0,r.P)(n)?{...o,...n}:o}:{...o,...t},{...a,sx:s}}},11652:function(e,t,n){"use strict";n.d(t,{Z:()=>c});var r=n(3150),o=n(76360),i=n(33160),a=n(13890),s=n(58787),l=n(40273);const u=function(){function e(e,t,n,o){const s={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:c,transform:d,style:h}=l;if(null==t)return null;if("typography"===c&&"inherit"===t)return{[e]:t};const p=(0,i.DW)(n,c)||{};if(h)return h(s);return(0,a.k9)(s,t,(t=>{let n=(0,i.Jq)(p,d,t);return t===n&&"string"==typeof t&&(n=(0,i.Jq)(p,d,`${e}${"default"===t?"":(0,r.Z)(t)}`,t)),!1===u?n:{[u]:n}}))}return function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const u=i.unstable_sxConfig??l.Z;function c(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const l=(0,a.W8)(i.breakpoints),c=Object.keys(l);let d=l;return Object.keys(r).forEach((n=>{const s=(l=r[n],c=i,"function"==typeof l?l(c):l);var l,c;if(null!=s)if("object"==typeof s)if(u[n])d=(0,o.Z)(d,e(n,s,i,u));else{const e=(0,a.k9)({theme:i},s,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,s)?d=(0,o.Z)(d,e):d[n]=t({sx:s,theme:i})}else d=(0,o.Z)(d,e(n,s,i,u))})),(0,s.ar)(i,(0,a.L7)(c,d))}return Array.isArray(r)?r.map(c):c(r)}}();u.filterProps=["sx"];const c=u},4560:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=(0,n(35315).ZP)()},38971:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(6798),o=n(24105);const i=(0,r.Z)();const a=function(e=i){return(0,o.Z)(e)}},49267:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(16819);function o(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.Z)(t.components[n].defaultProps,o):o}},22179:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(49267),o=n(38971);function i({props:e,name:t,defaultTheme:n,themeId:i}){let a=(0,o.Z)(n);return i&&(a=a[i]||a),(0,r.Z)({theme:a,name:t,props:e})}},24105:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(13726);const i=function(e=null){const t=r.useContext(o.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},70544:function(e,t,n){"use strict";n.d(t,{Z:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},60206:function(e,t,n){"use strict";n.d(t,{Z:()=>o});const r=function(e){return"string"==typeof e};const o=function(e,t,n){return void 0===e||r(e)?t:{...t,ownerState:{...t.ownerState,...n}}}},3150:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(62220);function o(e){if("string"!=typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},82267:function(e,t,n){"use strict";function r(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;er})},38543:function(e,t,n){"use strict";function r(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}n.d(t,{Z:()=>r})},24384:function(e,t,n){"use strict";function r(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}n.d(t,{Z:()=>r})},61170:function(e,t,n){"use strict";n.d(t,{P:()=>i,Z:()=>s});var r=n(27378),o=n(41453);function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(r.isValidElement(e)||(0,o.isValidElementType)(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=a(e[n])})),t}function s(e,t,n={clone:!0}){const l=n.clone?{...e}:e;return i(e)&&i(t)&&Object.keys(t).forEach((u=>{r.isValidElement(t[u])||(0,o.isValidElementType)(t[u])?l[u]=t[u]:i(t[u])&&Object.prototype.hasOwnProperty.call(e,u)&&i(e[u])?l[u]=s(e[u],t[u],n):n.clone?l[u]=i(t[u])?a(t[u]):t[u]:l[u]=t[u]})),l}},92438:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},62220:function(e,t,n){"use strict";function r(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}n.d(t,{Z:()=>r})},6749:function(e,t,n){"use strict";n.d(t,{ZP:()=>i});var r=n(70544);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t,n="Mui"){const i=o[t];return i?`${n}-${i}`:`${r.Z.generate(e)}-${t}`}},44124:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(6749);function o(e,t,n="Mui"){const o={};return t.forEach((t=>{o[t]=(0,r.ZP)(e,t,n)})),o}},94680:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o(e){return parseInt(r.version,10)>=19?e?.props?.ref||null:e?.ref||null}},16046:function(e,t,n){"use strict";function r(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}n.d(t,{Z:()=>r})},65124:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o(e){return r.Children.toArray(e).filter((e=>r.isValidElement(e)))}},74111:function(e,t,n){"use strict";function r(e){try{return e.matches(":focus-visible")}catch(e){0}return!1}n.d(t,{Z:()=>r})},11104:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)}},92729:function(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(90496),o=n(92438);const i=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t};const a=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:s,className:l}=e;if(!t){const e=(0,r.Z)(n?.className,l,s?.className,a?.className),t={...n?.style,...s?.style,...a?.style},o={...n,...s,...a};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}const u=(0,o.Z)({...s,...a}),c=i(a),d=i(s),h=t(u),p=(0,r.Z)(h?.className,n?.className,l,s?.className,a?.className),f={...h?.style,...n?.style,...s?.style,...a?.style},m={...h,...n,...d,...c};return p.length>0&&(m.className=p),Object.keys(f).length>0&&(m.style=f),{props:m,internalRef:h.ref}}},80668:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:()=>r})},33205:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(80668);function o(e){return(0,r.Z)(e).defaultView||window}},85480:function(e,t,n){"use strict";n.d(t,{Z:()=>r});const r=function(e,t,n){return"function"==typeof e?e(t,n):e}},16819:function(e,t,n){"use strict";function r(e,t){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){n[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;n[i][t]=r(o[t],a[t])}}else n[i]=a;else n[i]=o||{}}else void 0===n[i]&&(n[i]=e[i])}return n}n.d(t,{Z:()=>r})},85817:function(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{Z:()=>r})},9831:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);function o({controlled:e,default:t,name:n,state:o="value"}){const{current:i}=r.useRef(void 0!==e),[a,s]=r.useState(t);return[i?e:a,r.useCallback((e=>{i||s(e)}),[])]}},96858:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);const o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},81925:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(96858);const i=function(e){const t=r.useRef(e);return(0,o.Z)((()=>{t.current=e})),r.useRef(((...e)=>(0,t.current)(...e))).current}},97048:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378),o=n(85817);function i(...e){return r.useMemo((()=>e.every((e=>null==e))?null:t=>{e.forEach((e=>{(0,o.Z)(e,t)}))}),e)}},5056:function(e,t,n){"use strict";var r;n.d(t,{Z:()=>s});var o=n(27378);let i=0;const a={...r||(r=n.t(o,2))}.useId;function s(e){if(void 0!==a){const t=a();return e??t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n(`mui-${i}`))}),[t]),r}(e)}},99565:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378);const o={};function i(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}},28154:function(e,t,n){"use strict";n.d(t,{Z:()=>i});var r=n(27378);const o=[];function i(e){r.useEffect(e,o)}},7860:function(e,t,n){"use strict";n.d(t,{Z:()=>o});var r=n(27378);const o=e=>{const t=r.useRef({});return r.useEffect((()=>{t.current=e})),t.current}},25399:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(97048),o=n(60206),i=n(92729),a=n(85480);const s=function(e){const{elementType:t,externalSlotProps:n,ownerState:s,skipResolvingSlotProps:l=!1,...u}=e,c=l?{}:(0,a.Z)(n,s),{props:d,internalRef:h}=(0,i.Z)({...u,externalSlotProps:c}),p=(0,r.Z)(h,c?.ref,e.additionalProps?.ref);return(0,o.Z)(t,{...d,ref:p},s)}},60203:function(e,t,n){"use strict";n.d(t,{V:()=>i,Z:()=>a});var r=n(99565),o=n(28154);class i{static create(){return new i}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function a(){const e=(0,r.Z)(i.create).current;return(0,o.Z)(e.disposeEffect),e}},41453:function(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler");Symbol.for("react.provider");var s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.for("react.client.reference");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case a:case i:case c:case d:return e;default:switch(e=e&&e.$$typeof){case l:case u:case p:case h:case s:return e;default:return t}}case r:return t}}}t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===a||e===i||e===c||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===l||e.$$typeof===s||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)}},89461:function(e,t,n){"use strict";n.r(t),n.d(t,{SeriesLabelsStack:()=>gae,getTooltipStyles:()=>jae,TimeRangeSelector:()=>pae,ChartsThemeContext:()=>pe,DiscardChangesConfirmationDialog:()=>Dd,DEFAULT_TOOLTIP_CONFIG:()=>Oae,OptionsEditorGrid:()=>Bd,TOOLTIP_BG_COLOR_FALLBACK:()=>Mae,DEFAULT_PINNED_CROSSHAIR:()=>kn,FontSizeSelector:()=>LW,TOOLTIP_MAX_WIDTH:()=>yae,InfoTooltip:()=>Nd,parseFormat:()=>lr,TOOLTIP_MIN_WIDTH:()=>vae,SortSelector:()=>n7,SettingsAutocomplete:()=>Wd,getClosestTimestamp:()=>Hn,DragButton:()=>lp,useDeepMemo:()=>Go,NEARBY_SERIES_DESCRIPTION:()=>Cae,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>zae,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>wae,getTimeZoneOptions:()=>Nn,SHOW_FEWER_SERIES_LIMIT:()=>Bae,replaceVariables:()=>tr,useId:()=>qn,getNearbySeriesData:()=>Hae,getFormattedMultipleYAxes:()=>bn,legacyCheckforNearbySeries:()=>$ae,ColorPicker:()=>ue,TooltipHeader:()=>Yae,checkforNearbyTimeSeries:()=>Vae,FALLBACK_CHART_WIDTH:()=>kae,getYBuffer:()=>Uae,SortSelectorButtons:()=>r7,YAxisLabel:()=>sse,extractFieldNames:()=>fr,OptionsEditorGroup:()=>Vd,handleMoveDown:()=>sp,TOOLTIP_DATE_FORMAT:()=>Tae,hasIndexedPatterns:()=>hr,useSelection:()=>Me,dateFormatOptionsWithTimeZone:()=>Bo,mockChartsContext:()=>cse,assembleTransform:()=>Nae,restoreChart:()=>Fn,EMPTY_TOOLTIP_DATA:()=>Dae,persesColumnsToTanstackColumns:()=>zc,TextField:()=>xd,parseVariables:()=>Jn,TimeZoneSelector:()=>fae,OptionsColorPicker:()=>ni,useLocalStorage:()=>xn,TimeChartTooltip:()=>Qae,buildRelativeTimeOption:()=>Zn,useMousePosition:()=>Aae,PINNED_CROSSHAIR_SERIES_NAME:()=>Sn,batchDispatchNearbySeriesActions:()=>Vn,getClosestTimestampInFullDataset:()=>Wn,DEFAULT_COLUMN_WIDTH:()=>Nc,ModeSelector:()=>Y8,ThresholdsEditor:()=>c7,DragAndDropElement:()=>np,useSnackbar:()=>dn,useTimeZone:()=>ti,getPointInGrid:()=>Bn,isWithinPercentageRange:()=>Wae,clearHighlightedSeries:()=>zn,PIN_TOOLTIP_HELP_TEXT:()=>Iae,ContentWithLegend:()=>vd,FormActions:()=>NW,OPTIMIZED_MODE_SERIES_LIMIT:()=>wn,getTableCellLayout:()=>Fc,getFormattedAxis:()=>yn,hasBatchPatterns:()=>dr,interpolate:()=>Yn,EMPHASIZED_SERIES_DESCRIPTION:()=>_ae,parseVariablesAndFormat:()=>er,FormatControls:()=>ase,ErrorAlert:()=>IW,ItemActionsProvider:()=>ve,useMemoized:()=>qo,OptionsEditorControl:()=>zd,formatWithTimeZone:()=>Vo,testChartsTheme:()=>use,interpolateSelectionIndividual:()=>Ko,combineSx:()=>Un,ErrorBoundary:()=>RW.ErrorBoundary,LoadingOverlay:()=>e7,TransformsEditor:()=>Gse,interpolateSelectionBatch:()=>Yo,SnackbarProvider:()=>cn,SeriesInfo:()=>Eae,Table:()=>ad,UNPIN_TOOLTIP_HELP_TEXT:()=>Rae,getTheme:()=>Lse,SeriesMarker:()=>mae,LinksEditor:()=>q8,LinkEditorForm:()=>U8,TimeZoneContext:()=>Jo,DEFAULT_COLUMN_HEIGHT:()=>jc,TOOLTIP_PADDING:()=>Sae,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>Fae,ToolbarIconButton:()=>tse,enableDataZoom:()=>jn,hasDataFieldPatterns:()=>pr,replaceVariable:()=>Xn,NoDataOverlay:()=>J8,RefreshIntervalPicker:()=>Kse,AlignSelector:()=>C,TOOLTIP_MAX_HEIGHT:()=>bae,DensitySelector:()=>qd,DropIndicator:()=>Gd,InterpolationFormat:()=>Gn,Drawer:()=>Pp,TextOverlay:()=>Q8,TooltipContent:()=>Xae,getDateAndTime:()=>Ho,UnitSelector:()=>ose,replaceDataFields:()=>ur,useChartsContext:()=>fe,typography:()=>Rse,isLegendItemVisuallySelected:()=>gu,EChart:()=>AW,JSONEditor:()=>B8,TOOLTIP_LABELS_MAX_WIDTH:()=>xae,Legend:()=>hd,replaceDataFieldsBatch:()=>cr,OptionsEditorColumn:()=>Od,ValueMappingsEditor:()=>Jse,Dialog:()=>Pd,useItemActions:()=>xe,TimeZoneProvider:()=>ei,ChartsProvider:()=>he,SelectionProvider:()=>ke,useChartsTheme:()=>me,handleMoveUp:()=>ap,getFormattedAxisLabel:()=>$o,useDragAndDropMonitor:()=>tp,checkCrosshairPinnedStatus:()=>$n,generateChartsTheme:()=>Qo,defaultCursorData:()=>Pae,DateTimeRangePicker:()=>hae});var r={};n.r(r),n.d(r,{Arc:()=>AP,BezierCurve:()=>TP,BoundingRect:()=>Ym,Circle:()=>$T,CompoundPath:()=>IP,Ellipse:()=>UT,Group:()=>Zy,Image:()=>Sw,IncrementalDisplayable:()=>$P,Line:()=>SP,LinearGradient:()=>EP,OrientedBoundingRect:()=>zP,Path:()=>mw,Point:()=>zm,Polygon:()=>mP,Polyline:()=>yP,RadialGradient:()=>LP,Rect:()=>Aw,Ring:()=>dP,Sector:()=>lP,Text:()=>Ww,applyTransform:()=>sD,clipPointsByRect:()=>dD,clipRectByRect:()=>hD,createIcon:()=>pD,extendPath:()=>KP,extendShape:()=>qP,getShapeClass:()=>XP,getTransform:()=>aD,groupTransition:()=>cD,initProps:()=>US,isElementRemoved:()=>qS,lineLineIntersect:()=>mD,linePolygonIntersect:()=>fD,makeImage:()=>JP,makePath:()=>QP,mergePath:()=>tD,registerShape:()=>YP,removeElement:()=>GS,removeElementWithFadeOut:()=>YS,resizePath:()=>nD,setTooltipConfig:()=>vD,subPixelOptimize:()=>iD,subPixelOptimizeLine:()=>rD,subPixelOptimizeRect:()=>oD,transformDirection:()=>lD,traverseElements:()=>bD,updateProps:()=>WS});var o=n(24246),i=n(27378),a=n(90496),s=n(82267),l=n(16838),u=n(65124),c=n(51640),d=n(12709),h=n(82319),p=n(90433),f=n(24043),m=n(44124),g=n(6749);function v(e){return(0,g.ZP)("MuiButtonGroup",e)}const y=(0,m.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 b=n(55720),x=n(71645);const w=(0,d.ZP)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${y.grouped}`]:t.grouped},{[`& .${y.grouped}`]:t[`grouped${(0,c.Z)(n.orientation)}`]},{[`& .${y.grouped}`]:t[`grouped${(0,c.Z)(n.variant)}`]},{[`& .${y.grouped}`]:t[`grouped${(0,c.Z)(n.variant)}${(0,c.Z)(n.orientation)}`]},{[`& .${y.grouped}`]:t[`grouped${(0,c.Z)(n.variant)}${(0,c.Z)(n.color)}`]},{[`& .${y.firstButton}`]:t.firstButton},{[`& .${y.lastButton}`]:t.lastButton},{[`& .${y.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,h.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",[`& .${y.lastButton},& .${y.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${y.firstButton},& .${y.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${y.lastButton},& .${y.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${y.firstButton},& .${y.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)"),[`&.${y.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${y.firstButton},& .${y.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)"),[`&.${y.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,p.Z)()).flatMap((([t])=>[{props:{variant:"text",color:t},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,l.Fq)(e.palette[t].main,.5)}}}])),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${y.lastButton},& .${y.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${y.lastButton},& .${y.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${y.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${y.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,p.Z)(["dark"])).map((([t])=>({props:{variant:"contained",color:t},style:{[`& .${y.firstButton},& .${y.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}})))],[`& .${y.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}})))),S=i.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiButtonGroup"}),{children:r,className:l,color:d="primary",component:h="div",disabled:p=!1,disableElevation:m=!1,disableFocusRipple:g=!1,disableRipple:y=!1,fullWidth:S=!1,orientation:k="horizontal",size:C="medium",variant:_="outlined",...M}=n,T={...n,color:d,component:h,disabled:p,disableElevation:m,disableFocusRipple:g,disableRipple:y,fullWidth:S,orientation:k,size:C,variant:_},P=(e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:l}=e,u={root:["root",l,a,i&&"fullWidth",o&&"disableElevation",`color${(0,c.Z)(n)}`],grouped:["grouped",`grouped${(0,c.Z)(a)}`,`grouped${(0,c.Z)(l)}`,`grouped${(0,c.Z)(l)}${(0,c.Z)(a)}`,`grouped${(0,c.Z)(l)}${(0,c.Z)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,s.Z)(u,v,t)})(T),D=i.useMemo((()=>({className:P.grouped,color:d,disabled:p,disableElevation:m,disableFocusRipple:g,disableRipple:y,fullWidth:S,size:C,variant:_})),[d,p,m,g,y,S,C,_,P.grouped]),A=(0,u.Z)(r),O=A.length,I=e=>{const t=0===e,n=e===O-1;return t&&n?"":t?P.firstButton:n?P.lastButton:P.middleButton};return(0,o.jsx)(w,{as:h,role:"group",className:(0,a.Z)(P.root,l),ref:t,ownerState:T,...M,children:(0,o.jsx)(b.Z.Provider,{value:D,children:A.map(((e,t)=>(0,o.jsx)(x.Z.Provider,{value:I(t),children:e},t)))})})}));var k=n(48565);function C({onChange:e,value:t="left",...n}){const r=t=>{e(t)};return(0,o.jsxs)(S,{"aria-label":"Alignement",...n,children:[(0,o.jsx)(k.Z,{onClick:()=>r("left"),variant:"left"===t?"contained":"outlined",children:"Left"},"left"),(0,o.jsx)(k.Z,{onClick:()=>r("center"),variant:"center"===t?"contained":"outlined",children:"Center"},"center"),(0,o.jsx)(k.Z,{onClick:()=>r("right"),variant:"right"===t?"contained":"outlined",children:"Right"},"right")]})}var _=n(25283),M=n(75094),T=n(8695);function P(){return(P=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function A(e){var t=(0,i.useRef)(e),n=(0,i.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var O=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e0:e.buttons>0)&&o.current?a(E(o.current,e,l.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=u.current,i=R(o.current),a=n?i.addEventListener:i.removeEventListener;a(r?"touchmove":"mousemove",e),a(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(L(t),!function(e,t){return t&&!I(e)}(t,u.current)&&r)){if(I(t)){u.current=!0;var i=t.changedTouches||[];i.length&&(l.current=i[0].identifier)}r.focus(),a(E(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,a]),d=c[0],h=c[1],p=c[2];return(0,i.useEffect)((function(){return p}),[p]),i.createElement("div",P({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:h,tabIndex:0,role:"slider"}))})),N=function(e){return e.filter(Boolean).join(" ")},j=function(e){var t=e.color,n=e.left,r=e.top,o=void 0===r?.5:r,a=N(["react-colorful__pointer",e.className]);return i.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},i.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},F=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},z=(Math.PI,function(e){return G(B(e))}),B=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?F(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?F(parseInt(e.substring(6,8),16)/255,2):1}},V=function(e){return q(W(e))},$=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:F(e.h),s:F(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:F(o/2),a:F(r,2)}},H=function(e){var t=$(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},W=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var i=Math.floor(t),a=r*(1-n),s=r*(1-(t-i)*n),l=r*(1-(1-t+i)*n),u=i%6;return{r:F(255*[r,s,a,a,l,r][u]),g:F(255*[l,r,r,s,a,a][u]),b:F(255*[a,a,l,r,r,s][u]),a:F(o,2)}},U=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},q=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=o<1?U(F(255*o)):"";return"#"+U(t)+U(n)+U(r)+i},G=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,i=Math.max(t,n,r),a=i-Math.min(t,n,r),s=a?i===t?(n-r)/a:i===n?2+(r-t)/a:4+(t-n)/a:0;return{h:F(60*(s<0?s+6:s)),s:F(i?a/i*100:0),v:F(i/255*100),a:o}},K=i.memo((function(e){var t=e.hue,n=e.onChange,r=N(["react-colorful__hue",e.className]);return i.createElement("div",{className:r},i.createElement(Z,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:O(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":F(t),"aria-valuemax":"360","aria-valuemin":"0"},i.createElement(j,{className:"react-colorful__hue-pointer",left:t/360,color:H({h:t,s:100,v:100,a:1})})))})),Y=i.memo((function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:H({h:t.h,s:100,v:100,a:1})};return i.createElement("div",{className:"react-colorful__saturation",style:r},i.createElement(Z,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:O(t.s+100*e.left,0,100),v:O(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+F(t.s)+"%, Brightness "+F(t.v)+"%"},i.createElement(j,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:H(t)})))})),X=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},Q=function(e,t){return e.toLowerCase()===t.toLowerCase()||X(B(e),B(t))};function J(e,t,n){var r=A(n),o=(0,i.useState)((function(){return e.toHsva(t)})),a=o[0],s=o[1],l=(0,i.useRef)({color:t,hsva:a});(0,i.useEffect)((function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},s(n)}}),[t,e]),(0,i.useEffect)((function(){var t;X(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},r(t))}),[a,e,r]);var u=(0,i.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[a,u]}var ee,te="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,ne=new Map,re=function(e){te((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!ne.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,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',ne.set(t,r);var o=ee||n.nc;o&&r.setAttribute("nonce",o),t.head.appendChild(r)}}),[])},oe=function(e){var t=e.className,n=e.colorModel,r=e.color,o=void 0===r?n.defaultColor:r,a=e.onChange,s=D(e,["className","colorModel","color","onChange"]),l=(0,i.useRef)(null);re(l);var u=J(n,o,a),c=u[0],d=u[1],h=N(["react-colorful",t]);return i.createElement("div",P({},s,{ref:l,className:h}),i.createElement(Y,{hsva:c,onChange:d}),i.createElement(K,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},ie={defaultColor:"000",toHsva:z,fromHsva:function(e){return V({h:e.h,s:e.s,v:e.v,a:1})},equal:Q},ae=function(e){return i.createElement(oe,P({},e,{colorModel:ie}))},se=n(20791),le=n(80354);const ue=({color:e,onChange:t,onClear:n,palette:r})=>{const[a,s]=(0,i.useState)(e),l=e=>{s(e),t?.(e)};return(0,o.jsxs)(_.Z,{spacing:1,children:[(0,o.jsx)(ae,{color:e,onChange:l,style:{width:"100%"}}),(0,o.jsx)(_.Z,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:r&&r.map(((e,t)=>(0,o.jsx)(M.Z,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>l(e),children:(0,o.jsx)(se.default,{})},t)))}),(0,o.jsxs)(_.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(T.Z,{inputProps:{"aria-label":"enter hex color"},fullWidth:!0,value:a,onChange:e=>{const n=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);s(`#${n}`),ce(e.target.value)&&t?.(e.target.value)}}),n&&(0,o.jsx)(M.Z,{onClick:n,children:(0,o.jsx)(le.default,{})})]})]})},ce=(e,t)=>{const 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 de=n(6714);function he(e){const{children:t,chartsTheme:n,enablePinning:r=!1,enableSyncGrouping:a=!0}=e,[s,l]=(0,i.useState)(null),u=(0,i.useMemo)((()=>({chartsTheme:n,enablePinning:r,lastTooltipPinnedCoords:s,enableSyncGrouping:a,setLastTooltipPinnedCoords:l})),[n,r,a,s,l]);return(0,o.jsx)(pe.Provider,{value:u,children:t})}const pe=(0,i.createContext)(void 0);function fe(){const e=(0,i.useContext)(pe);if(void 0===e)throw new Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function me(){return fe().chartsTheme}const ge=(0,i.createContext)(void 0);function ve({children:e}){const[t,n]=(0,i.useState)(new Map),r=(0,i.useCallback)(((e,t,r)=>{n((n=>{const o=new Map(n),i=o.get(e)||{loading:!1};if(void 0!==r){const n=new Map(i.itemStatuses||new Map),a=n.get(r)||{loading:!1};n.set(r,{...a,...t}),o.set(e,{...i,itemStatuses:n})}else o.set(e,{...i,...t});return o}))}),[]),a=(0,i.useCallback)((e=>{n((t=>{if(void 0===e)return new Map;if(!t.has(e))return t;const n=new Map(t);return n.delete(e),n}))}),[]),s=(0,i.useMemo)((()=>({actionStatuses:t,setActionStatus:r,clearActionStatus:a})),[t,r,a]);return(0,o.jsx)(ge.Provider,{value:s,children:e})}const ye=()=>{},be={actionStatuses:new Map,setActionStatus:ye,clearActionStatus:ye,hasContext:!1};function xe(){const e=(0,i.useContext)(ge);return(0,i.useMemo)((()=>e?{...e,hasContext:!0}:be),[e])}const we=(0,i.createContext)(void 0),Se=(e,t)=>t;function ke({children:e}){const[t,n]=(0,i.useState)(new Map),r=(0,i.useRef)(Se),a=(0,i.useCallback)((e=>{r.current=e}),[]),s=(0,i.useCallback)((e=>{const t=new Map;e.forEach((({item:e,id:n})=>t.set(n,e))),n(t)}),[]),l=(0,i.useCallback)(((e,t)=>{n((n=>{const r=new Map(n);return r.has(t)?r.delete(t):r.set(t,e),r}))}),[]),u=(0,i.useCallback)((e=>{n((t=>{if(!t.has(e))return t;const n=new Map(t);return n.delete(e),n}))}),[]),c=(0,i.useCallback)((()=>n(new Map)),[]),d=(0,i.useCallback)(((e,n)=>t.has(r.current(e,n))),[t]),h=(0,i.useMemo)((()=>({selectionMap:t,setSelection:s,toggleSelection:l,removeFromSelection:u,clearSelection:c,isSelected:d,registerGetId:a})),[t,s,l,u,c,d,a]);return(0,o.jsx)(we.Provider,{value:h,children:e})}const Ce=()=>{},_e={selectionMap:new Map,setSelection:Ce,toggleSelection:Ce,removeFromSelection:Ce,clearSelection:Ce,isSelected:()=>!1,hasContext:!1};function Me(e){const t=(0,i.useContext)(we);(0,i.useEffect)((()=>{t&&e?.getId&&t.registerGetId(e.getId)}),[t,e?.getId]);return(0,i.useMemo)((()=>{if(!t)return _e;const{registerGetId:e,...n}=t;return{...n,hasContext:!0}}),[t])}var Te=n(31542);function Pe(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Ae},Ie=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Re=/\/\*[^]*?\*\/| +/g,Ee=/\n+/g,Le=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?Le(a,i):i+"{"+Le(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=Le(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Le.p?Le.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},Ze={},Ne=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+Ne(e[n]);return t}return e};function je(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=Ne(e),a=Ze[i]||(Ze[i]=(e=>{let t=0,n=11;for(;t>>0;return"go"+n})(i));if(!Ze[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=Ie.exec(e.replace(Re,""));)t[4]?r.shift():t[3]?(n=t[3].replace(Ee," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(Ee," ").trim();return r[0]})(e);Ze[a]=Le(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&Ze.g?Ze.g:null;return n&&(Ze.g=Ze[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Ze[a],t,r,s),a})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":Le(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,Oe(t.target),t.g,t.o,t.k)}je.bind({g:1}),je.bind({k:1});function Fe(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}function He(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var We=function(){return""},Ue=i.createContext({enqueueSnackbar:We,closeSnackbar:We}),qe="@media (max-width:599.95px)",Ge="@media (min-width:600px)",Ke=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Ye=function(e){return""+Ke(e.vertical)+Ke(e.horizontal)},Xe=function(e){return!!e||0===e},Qe="unmounted",Je="exited",et="entering",tt="entered",nt="exiting",rt=function(e){function t(t){var n;n=e.call(this,t)||this;var r,o=t.appear;return n.appearStatus=null,t.in?o?(r=Je,n.appearStatus=et):r=tt:r=t.unmountOnExit||t.mountOnEnter?Qe:Je,n.state={status:r},n.nextCallback=null,n}Ve(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Qe?{status:Je}: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!==et&&n!==tt&&(t=et):n!==et&&n!==tt||(t=nt)}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===et?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===Je&&this.setState({status:Qe})},n.performEnter=function(e){var t=this,n=this.props.enter,r=e,o=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,r),this.safeSetState({status:et},(function(){t.props.onEntering&&t.props.onEntering(t.node,r),t.onTransitionEnd(o.enter,(function(){t.safeSetState({status:tt},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))}))}))):this.safeSetState({status:tt},(function(){t.props.onEntered&&t.props.onEntered(t.node,r)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:nt},(function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Je},(function(){e.props.onExited&&e.props.onExited(e.node)}))}))}))):this.safeSetState({status:Je},(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;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Qe)return null;var t=this.props;return(0,t.children)(e,$e(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},ze(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(i.Component);function ot(){}function it(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function at(e,t){return(0,i.useMemo)((function(){return null==e&&null==t?null:function(n){it(e,n),it(t,n)}}),[e,t])}function st(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,o=e.mode;return{duration:"object"==typeof t?t[o]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}rt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ot,onEntering:ot,onEntered:ot,onExit:ot,onExiting:ot,onExited:ot};var lt="cubic-bezier(0.4, 0, 0.2, 1)",ut="cubic-bezier(0.0, 0, 0.2, 1)",ct="cubic-bezier(0.4, 0, 0.6, 1)",dt=function(e){e.scrollTop=e.scrollTop},ht=function(e){return Math.round(e)+"ms"};function pt(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,o=void 0===r?300:r,i=n.easing,a=void 0===i?lt:i,s=n.delay,l=void 0===s?0:s;return(Array.isArray(e)?e:[e]).map((function(e){var t="string"==typeof o?o:ht(o),n="string"==typeof l?l:ht(l);return e+" "+t+" "+a+" "+n})).join(",")}function ft(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function mt(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),o=ft(t);if(t.fakeTransform)n=t.fakeTransform;else{var i=o.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.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("+(o.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(o.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 gt=(0,i.forwardRef)((function(e,t){var n=e.children,r=e.direction,o=void 0===r?"down":r,a=e.in,s=e.style,l=e.timeout,u=void 0===l?0:l,c=e.onEnter,d=e.onEntered,h=e.onExit,p=e.onExited,f=$e(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,i.useRef)(null),g=at(n.ref,m),v=at(g,t),y=(0,i.useCallback)((function(){m.current&&mt(o,m.current)}),[o]);return(0,i.useEffect)((function(){if(!a&&"down"!==o&&"right"!==o){var e=function(e,t){var n;function r(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(Be({},e,{queue:[].concat(e.queue,[d])}))})),u},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?Be({},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 o=e.snacks.map((function(e){return t||e.persist&&!r?Be({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Be({},e,{open:!1})):Be({},e,{requestClose:!0}))}));return Be({},e,{snacks:o})},n.handleEnteredSnack=function(e,t,r){if(!Xe(r))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState((function(e){return{snacks:e.snacks.map((function(e){return e.id===r?Be({},e,{entered:!0}):Be({},e)}))}}))},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var o=void 0===r;n.setState((function(e){var t=e.snacks,n=e.queue;return{snacks:t.map((function(e){return o||e.id===r?e.entered?Be({},e,{open:!1}):Be({},e,{requestClose:!0}):Be({},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}));Xe(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!Xe(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState((function(e){var r=n.processQueue(Be({},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(He(n)),closeSnackbar:n.closeSnackbar.bind(He(n))}},n}return Ve(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,o=n.children,a=n.dense,s=void 0!==a&&a,l=n.Components,u=void 0===l?{}:l,c=n.classes,d=this.state.snacks.reduce((function(e,t){var n,r=Ye(t.anchorOrigin),o=e[r]||[];return Be({},e,((n={})[r]=[].concat(o,[t]),n))}),{}),h=Object.keys(d).map((function(t){var n=d[t],r=n[0];return i.createElement(an,{key:t,dense:s,anchorOrigin:r.anchorOrigin,classes:c},n.map((function(t){return i.createElement(Jt,{key:t.id,snack:t,classes:c,Component:u[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:Zt([e.handleExitedSnack,e.props.onExited],t.id),onEntered:Zt([e.handleEnteredSnack,e.props.onEntered],t.id)})})))}));return i.createElement(Ue.Provider,{value:t},o,r?(0,Te.createPortal)(h,r):h)},ze(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||St.maxSnack}}]),t}(i.Component),un=function(){return(0,i.useContext)(Ue)};function cn({children:e,...t}){return(0,o.jsx)(ln,{...t,Components:{error:(0,d.ZP)(Xt)((()=>({"&.notistack-MuiContent-error":{whiteSpace:"pre-wrap"}})))},children:e})}function dn(){const{enqueueSnackbar:e,closeSnackbar:t}=un(),n=hn(e,"error"),r=hn(e,"info"),o=hn(e,"warning"),a=hn(e,"success"),s=(0,i.useCallback)(((e,t)=>{const r=e instanceof Error?e.message:`An unexpected error occurred: ${e}`;return n(r,t)}),[n]);return{enqueueSnackbar:e,closeSnackbar:t,errorSnackbar:n,infoSnackbar:r,warningSnackbar:o,successSnackbar:a,exceptionSnackbar:s}}function hn(e,t){return(0,i.useCallback)(((n,r)=>{const o={...r,variant:t};return e(n,o)}),[e,t])}var pn=n(15409),fn=n.n(pn),mn=n(81620);const gn=6,vn=10;function yn(e,t){const n={type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>(0,mn.Bw)(e,t)}};return[fn()(n,e)]}function bn(e,t,n,r){const o=[],i=fn()({type:"value",position:"left",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>(0,mn.Bw)(e,t),overflow:"truncate"}},e);o.push(i);let a=0;return n.forEach(((t,n)=>{const i={type:"value",position:"right",offset:a,boundaryGap:[0,"10%"],axisLabel:{formatter:e=>(0,mn.Bw)(e,t)},splitLine:{show:!1},show:e?.show};o.push(i),r&&(a+=function(e,t){const n=(0,mn.Bw)(t,e),r=document.createElement("canvas").getContext("2d");return r?(r.font="12px sans-serif",r.measureText(n).width):n.length*gn}(t,r[n]??1e3)+vn)})),o}function xn(e,t){const{value:n,setValueAndStore:r}=function(e,t,n){const[r,o]=(0,i.useState)((()=>{try{const n=e.getItem(t);if(null!==n)return JSON.parse(n)}catch{}return e.setItem(t,JSON.stringify(n)),n})),a=(0,i.useCallback)((n=>{o(n),e.setItem(t,JSON.stringify(n))}),[o,e,t]);return{value:r,setValue:o,setValueAndStore:a}}(window.localStorage,e,t);return[n,r]}const wn=1e3,Sn="Pinned Crosshair",kn={name:Sn,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};var Cn=n(46310);const _n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Mn(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Tn={date:Mn({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Mn({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Mn({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Pn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Dn(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function An(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;ne.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,(e=>e.test(a)));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;return{value:u,rest:t.slice(a.length)}}}var On;const In={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=_n[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Tn,formatRelative:(e,t,n,r)=>Pn[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Dn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Dn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Dn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Dn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Dn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(On={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(On.matchPattern);if(!n)return null;const r=n[0],o=e.match(On.parsePattern);if(!o)return null;let i=On.valueCallback?On.valueCallback(o[0]):o[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:An({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:An({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:An({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:An({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:An({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Rn=n(85095);const En=["years","months","weeks","days","hours","minutes","seconds"];function Ln(e,t){const n=(0,Rn.j)(),r=t?.locale??n.locale??In,o=t?.format??En,i=t?.zero??!1,a=t?.delimiter??" ";if(!r.formatDistance)return"";return o.reduce(((t,n)=>{const o=`x${n.replace(/(^.)/,(e=>e.toUpperCase()))}`,a=e[n];return void 0!==a&&(i||e[n])?t.concat(r.formatDistance(o,a)):t}),[]).join(a)}function Zn(e){return{value:{pastDuration:e},display:`Last ${Ln((0,Cn.Ib)(e),{delimiter:", "})}`}}function Nn(){return["local","UTC",...Intl.supportedValuesOf?.("timeZone")??[]].filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>({value:e,display:"local"===e?"Local":e.replace(/_/g," ")})))}function jn(e){const 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 Fn(e){e.dispatchAction({type:"restore"})}function zn(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function Bn(e,t,n){if(void 0===n)return null;const r=[e,t];if(!n.containPixel("grid",r))return null;return n.convertFromPixel("grid",r)}function Vn(e,t,n,r,o,i){const a=i.length>0?i[i.length-1]:o[o.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 $n(e){return e[e.length-1]?.name===Sn}function Hn(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(const[o]of e){const e=Math.abs(o-t);e0?e[o]:null;if(!i)break;r=Hn(i.values,t)}return r}function Un(...e){return e.flatMap((e=>void 0===e?[]:Array.isArray(e)?e:[e]))}function qn(e){void 0===globalThis.useIdValue&&(globalThis.useIdValue=0);const t=(0,i.useRef)(void 0);return void 0===t.current&&(t.current=`${e}-${globalThis.useIdValue++}`),t.current}var Gn=function(e){return e.CSV="csv",e.DISTRIBUTED="distributed",e.DOUBLEQUOTE="doublequote",e.GLOB="glob",e.JSON="json",e.LUCENE="lucene",e.PERCENTENCODE="percentencode",e.PIPE="pipe",e.PROMETHEUS="prometheus",e.RAW="raw",e.REGEX="regex",e.SINGLEQUOTE="singlequote",e.SQLSTRING="sqlstring",e.TEXT="text",e.QUERYPARAM="queryparam",e}({});function Kn(e){if(!e)return;const t=e.toLowerCase();return Object.values(Gn).find((e=>e===t))||void 0}function Yn(e,t,n){switch(n){case"csv":case"raw":return e.join(",");case"distributed":{const[n,...r]=e;return`${[n,...r.map((e=>`${t}=${e}`))].join(",")}`}case"doublequote":return e.map((e=>`"${e}"`)).join(",");case"glob":return`{${e.join(",")}}`;case"json":{const t=e.map((e=>{try{return JSON.parse(e)}catch{return e}}));return JSON.stringify(t)}case"lucene":return`(${e.map((e=>`"${e}"`)).join(" OR ")})`;case"percentencode":return encodeURIComponent(e.join(","));case"pipe":return e.join("|");case"regex":return`(${e.map((e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")})`;case"singlequote":return e.map((e=>`'${e}'`)).join(",");case"sqlstring":return e.map((e=>`'${e.replace(/'/g,"''")}'`)).join(",");case"text":return e.join(" + ");case"queryparam":return e.map((e=>`${t}=${encodeURIComponent(e)}`)).join("&");default:return`(${e.join("|")})`}}function Xn(e,t,n,r){const o="$"+t,i="${"+t+(r?":"+r:"")+"}";let a="";return Array.isArray(n)&&(a=Yn(n,t,r||"prometheus")),"string"==typeof n&&(a=Yn([n],t,r||"raw")),(e=e.replaceAll(o,a)).replaceAll(i,a)}const Qn=/\$(\w+)|\${(\w+)(?:\.([^:^}]+))?(?::([^}]+))?}/gm;function Jn(e){const t=new Set;let n;for(;null!==(n=Qn.exec(e));)n&&(n[1]?t.add(n[1]):n[2]&&t.add(n[2]));return Array.from(t.values())}function er(e){const t=new Map;let n;for(;null!==(n=Qn.exec(e));)if(n){let e;n[4]&&(e=n[4]),n[1]?t.set(n[1],Kn(e)):n[2]&&t.set(n[2],Kn(e))}return t}function tr(e,t){const n=er(e),r=Array.from(n.keys());let o=e;return r.sort(((e,t)=>t.length-e.length)).forEach((e=>{const r=t[e];r&&void 0!==r.value&&(o=Xn(o,e,r?.value,n.get(e)))})),o}const nr=/\$\{__data\.fields(?:\[(?:"|')([^"']+)(?:"|')\]|\.([a-zA-Z_][a-zA-Z0-9_]*))(?::([a-z]+))?\}/g,rr=/\$\{__data\[(\d+)\]\.fields\[(?:"|')([^"']+)(?:"|')\]\}/g,or=/\$\{__data\.index\}/g,ir=/\$\{__data\.count\}/g,ar=/("|')?\$\{__data(?::([a-z]+))?\}("|')?/g;function sr(e,t){if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];return null==n?"":"object"==typeof n?JSON.stringify(n):String(n)}if(t.includes(".")){const n=t.split(".");let r=e;for(const e of n){if(null==r)return"";if("object"!=typeof r)return"";r=r[e]}return null==r?"":"object"==typeof r?JSON.stringify(r):String(r)}return""}function lr(e){if(!e)return;const t=e.toLowerCase();return Object.values(Gn).find((e=>e===t))}function ur(e,t,n={}){const{urlEncode:r=!0,index:o,count:i}=n;let a=e;const s=[];return void 0!==o&&(a=a.replaceAll(or,String(o))),void 0!==i&&(a=a.replaceAll(ir,String(i))),a=a.replaceAll(ar,((e,n,r,o)=>{const i=lr(r)??Gn.RAW;let a="";return a=i===Gn.JSON?JSON.stringify(t):Yn(Object.values(t).map((e=>JSON.stringify(e))),"",i),a})),nr.lastIndex=0,a=a.replaceAll(nr,((e,n,o,i)=>{const a=n??o??"",l=sr(t,a);""===l&&void 0===t[a]&&s.push(`Field "${a}" not found in data`);const u=lr(i);if(u)return Yn([l],a,u);if(r){if(u===Gn.RAW)return l;if(u!==Gn.QUERYPARAM&&u!==Gn.PERCENTENCODE)return encodeURIComponent(l)}return l})),{text:a,errors:s.length>0?s:void 0}}function cr(e,t,n={}){const{urlEncode:r=!0}=n;let o=e;const i=[];return o=o.replaceAll(ir,String(t.length)),rr.lastIndex=0,nr.lastIndex=0,o=o.replaceAll(ar,((e,n,r,o)=>{const i=lr(r)??Gn.RAW,a=Yn(Object.values(t).map((e=>JSON.stringify(e))),"",i);return n&&o?a:`${n??""}${a}${o??""}`})),o=o.replaceAll(rr,((e,n,o)=>{const a=parseInt(n,10);if(a<0||a>=t.length)return i.push(`Index ${a} out of bounds (0-${t.length-1})`),e;const s=sr(t[a],o);return""===s&&void 0===t[a][o]&&i.push(`Field "${o}" not found in data at index ${a}`),r?encodeURIComponent(s):s})),o=o.replaceAll(nr,((e,n,r,o)=>{const i=n??r??"",a=t.map((e=>sr(e,i))),s=lr(o)||Gn.CSV;return Yn(a,i,s)})),{text:o,errors:i.length>0?i:void 0}}function dr(e){return rr.lastIndex=0,rr.test(e)||/\$\{__data\.fields(?:\[["'][^"']+["']\]|\.[a-zA-Z_][a-zA-Z0-9_]*):[a-z]+\}/.test(e)}function hr(e){return rr.lastIndex=0,rr.test(e)}function pr(e){return nr.lastIndex=0,rr.lastIndex=0,nr.test(e)||rr.test(e)}function fr(e){const t=new Set;let n;for(nr.lastIndex=0,rr.lastIndex=0;null!==(n=nr.exec(e));)t.add(n[1]??n[2]);for(;null!==(n=rr.exec(e));)t.add(n[2]);return Array.from(t)}var mr=n(56512),gr=n(55753);function vr(e,t){const n=(0,gr.Q)(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function yr(e,t){const n=(0,gr.Q)(e,t?.in);return(0,mr.w)(n,vr(n))+1}var br=n(25274),xr=n(5149);function wr(e,t){return(0,xr.z)(e,{...t,weekStartsOn:1})}var Sr=n(63879);function kr(e,t){const n=(0,gr.Q)(e,t?.in),r=n.getFullYear(),o=(0,Sr.L)(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=wr(o),a=(0,Sr.L)(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=wr(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Cr(e,t){const n=kr(e,t),r=(0,Sr.L)(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),wr(r)}function _r(e,t){const n=(0,gr.Q)(e,t?.in),r=+wr(n)-+Cr(n);return Math.round(r/br.jE)+1}function Mr(e,t){const n=(0,gr.Q)(e,t?.in),r=n.getFullYear(),o=(0,Rn.j)(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=(0,Sr.L)(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=(0,xr.z)(a,t),l=(0,Sr.L)(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=(0,xr.z)(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Tr(e,t){const n=(0,Rn.j)(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Mr(e,t),i=(0,Sr.L)(t?.in||e,0);i.setFullYear(o,0,r),i.setHours(0,0,0,0);return(0,xr.z)(i,t)}function Pr(e,t){const n=(0,gr.Q)(e,t?.in),r=+(0,xr.z)(n,t)-+Tr(n,t);return Math.round(r/br.jE)+1}function Dr(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Ar={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Dr("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Dr(n+1,2)},d:(e,t)=>Dr(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Dr(e.getHours()%12||12,t.length),H:(e,t)=>Dr(e.getHours(),t.length),m:(e,t)=>Dr(e.getMinutes(),t.length),s:(e,t)=>Dr(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Dr(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Or="midnight",Ir="noon",Rr="morning",Er="afternoon",Lr="evening",Zr="night",Nr={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Ar.y(e,t)},Y:function(e,t,n,r){const o=Mr(e,r),i=o>0?o:1-o;if("YY"===t){return Dr(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Dr(i,t.length)},R:function(e,t){return Dr(kr(e),t.length)},u:function(e,t){return Dr(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Dr(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Dr(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ar.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Dr(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Pr(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Dr(o,t.length)},I:function(e,t,n){const r=_r(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Dr(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Ar.d(e,t)},D:function(e,t,n){const r=yr(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Dr(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Dr(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Dr(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Dr(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?Ir:0===r?Or:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?Lr:r>=12?Er:r>=4?Rr:Zr,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Ar.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ar.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Dr(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Dr(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ar.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ar.s(e,t)},S:function(e,t){return Ar.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Fr(r);case"XXXX":case"XX":return zr(r);default:return zr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Fr(r);case"xxxx":case"xx":return zr(r);default:return zr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+jr(r,":");default:return"GMT"+zr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+jr(r,":");default:return"GMT"+zr(r,":")}},t:function(e,t,n){return Dr(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Dr(+e,t.length)}};function jr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Dr(i,2)}function Fr(e,t){if(e%60==0){return(e>0?"-":"+")+Dr(Math.abs(e)/60,2)}return zr(e,t)}function zr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Dr(Math.trunc(r/60),2)+t+Dr(r%60,2)}const Br=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Vr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},$r={p:Vr,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Br(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Br(r,t)).replace("{{time}}",Vr(o,t))}},Hr=/^D+$/,Wr=/^Y+$/,Ur=["D","DD","YY","YYYY"];function qr(e){return Hr.test(e)}function Gr(e){return Wr.test(e)}function Kr(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Ur.includes(e))throw new RangeError(r)}var Yr=n(95090);function Xr(e){return!(!(0,Yr.J)(e)&&"number"!=typeof e||isNaN(+(0,gr.Q)(e)))}const Qr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eo=/^'([^]*?)'?$/,to=/''/g,no=/[a-zA-Z]/;function ro(e,t,n){const r=(0,Rn.j)(),o=n?.locale??r.locale??In,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=(0,gr.Q)(e,n?.in);if(!Xr(s))throw new RangeError("Invalid time value");let l=t.match(Jr).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,$r[t])(e,o.formatLong)}return e})).join("").match(Qr).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:oo(e)};if(Nr[t])return{isToken:!0,value:e};if(t.match(no))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map((r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&Gr(i)||!n?.useAdditionalDayOfYearTokens&&qr(i))&&Kr(i,t,String(e));return(0,Nr[i[0]])(s,i,o.localize,u)})).join("")}function oo(e){const t=e.match(eo);return t?t[1].replace(to,"'"):e}function io(){return Object.assign({},(0,Rn.j)())}function ao(e,t,n){const r=io(),o=function(e,t,n){return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale??r.locale);return"formatToParts"in o?function(e,t){const n=e.formatToParts(t);for(let e=n.length-1;e>=0;--e)if("timeZoneName"===n[e].type)return n[e].value;return}(o,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(o,t)}function so(e,t){const n=function(e){uo[e]||(uo[e]=ho?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));return uo[e]}(t);return"formatToParts"in n?function(e,t){try{const n=e.formatToParts(t),r=[];for(let e=0;e=0?i:1e3+i,r-o}function bo(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}const xo={};const wo={X:function(e,t,n){const r=So(n.timeZone,e);if(0===r)return"Z";switch(t){case"X":return _o(r);case"XXXX":case"XX":return Co(r);default:return Co(r,":")}},x:function(e,t,n){const r=So(n.timeZone,e);switch(t){case"x":return _o(r);case"xxxx":case"xx":return Co(r);default:return Co(r,":")}},O:function(e,t,n){const r=So(n.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);return n+String(o)+t+ko(i,2)}(r,":");default:return"GMT"+Co(r,":")}},z:function(e,t,n){switch(t){case"z":case"zz":case"zzz":return ao("short",e,n);default:return ao("long",e,n)}}};function So(e,t){const n=e?vo(e,t,!0)/6e4:t?.getTimezoneOffset()??0;if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ko(e,t){const n=e<0?"-":"";let r=Math.abs(e).toString();for(;r.length0?"-":"+",r=Math.abs(e);return n+ko(Math.floor(r/60),2)+t+ko(Math.floor(r%60),2)}function _o(e,t){if(e%60==0){return(e>0?"-":"+")+ko(Math.abs(e)/60,2)}return Co(e,t)}function Mo(e){const t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+e-+t}const To=36e5,Po=6e4,Do=2,Ao={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Oo(e,t={}){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);const n=null==t.additionalDigits?Do:Number(t.additionalDigits);if(2!==n&&1!==n&&0!==n)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);const r=function(e){const t={};let n,r=Ao.dateTimePattern.exec(e);r?(t.date=r[1],n=r[3]):(r=Ao.datePattern.exec(e),r?(t.date=r[1],n=r[2]):(t.date=null,n=e));if(n){const e=Ao.timeZone.exec(n);e?(t.time=n.replace(e[1],""),t.timeZone=e[1].trim()):t.time=n}return t}(e),{year:o,restDateString:i}=function(e,t){if(e){const n=Ao.YYY[t],r=Ao.YYYYY[t];let o=Ao.YYYY.exec(e)||r.exec(e);if(o){const t=o[1];return{year:parseInt(t,10),restDateString:e.slice(t.length)}}if(o=Ao.YY.exec(e)||n.exec(e),o){const t=o[1];return{year:100*parseInt(t,10),restDateString:e.slice(t.length)}}}return{year:null}}(r.date,n),a=function(e,t){if(null===t)return null;let n,r,o;if(!e||!e.length)return n=new Date(0),n.setUTCFullYear(t),n;let i=Ao.MM.exec(e);if(i)return n=new Date(0),r=parseInt(i[1],10)-1,Zo(t,r)?(n.setUTCFullYear(t,r),n):new Date(NaN);if(i=Ao.DDD.exec(e),i){n=new Date(0);const e=parseInt(i[1],10);return function(e,t){if(t<1)return!1;const n=Lo(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,e)?(n.setUTCFullYear(t,0,e),n):new Date(NaN)}if(i=Ao.MMDD.exec(e),i){n=new Date(0),r=parseInt(i[1],10)-1;const e=parseInt(i[2],10);return Zo(t,r,e)?(n.setUTCFullYear(t,r,e),n):new Date(NaN)}if(i=Ao.Www.exec(e),i)return o=parseInt(i[1],10)-1,No(o)?Io(t,o):new Date(NaN);if(i=Ao.WwwD.exec(e),i){o=parseInt(i[1],10)-1;const e=parseInt(i[2],10)-1;return No(o,e)?Io(t,o,e):new Date(NaN)}return null}(i,o);if(null===a||isNaN(a.getTime()))return new Date(NaN);if(a){const e=a.getTime();let n,o=0;if(r.time&&(o=function(e){let t,n,r=Ao.HH.exec(e);if(r)return t=parseFloat(r[1].replace(",",".")),jo(t)?t%24*To:NaN;if(r=Ao.HHMM.exec(e),r)return t=parseInt(r[1],10),n=parseFloat(r[2].replace(",",".")),jo(t,n)?t%24*To+n*Po:NaN;if(r=Ao.HHMMSS.exec(e),r){t=parseInt(r[1],10),n=parseInt(r[2],10);const e=parseFloat(r[3].replace(",","."));return jo(t,n,e)?t%24*To+n*Po+1e3*e:NaN}return null}(r.time),null===o||isNaN(o)))return new Date(NaN);if(r.timeZone||t.timeZone){if(n=vo(r.timeZone||t.timeZone,new Date(e+o)),isNaN(n))return new Date(NaN)}else n=Mo(new Date(e+o)),n=Mo(new Date(e+o+n));return new Date(e+o+n)}return new Date(NaN)}function Io(e,t,n){t=t||0,n=n||0;const r=new Date(0);r.setUTCFullYear(e,0,4);const o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}const Ro=[31,28,31,30,31,30,31,31,30,31,30,31],Eo=[31,29,31,30,31,30,31,31,30,31,30,31];function Lo(e){return e%400==0||e%4==0&&e%100!=0}function Zo(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;const r=Lo(e);if(r&&n>Eo[t])return!1;if(!r&&n>Ro[t])return!1}return!0}function No(e,t){return!(e<0||e>52)&&(null==t||!(t<0||t>6))}function jo(e,t,n){return!(e<0||e>=25)&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}const Fo=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function zo(e,t,n,r){return function(e,t,n={}){const r=(t=String(t)).match(Fo);if(r){const o=Oo(n.originalDate||e,n);t=r.reduce((function(e,t){if("'"===t[0])return e;const r=e.indexOf(t),i="'"===e[r-1],a=e.replace(t,"'"+wo[t[0]](o,t,n)+"'");return i?a.substring(0,r-1)+a.substring(r+1):a}),t)}return ro(e,t,n)}(function(e,t,n){const r=vo(t,e=Oo(e,n),!0),o=new Date(e.getTime()-r),i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}(e,t,{timeZone:(r={...r,timeZone:t,originalDate:e}).timeZone}),n,r)}function Bo(e,t){if(t){const n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function Vo(e,t,n){const r=n?.toLowerCase();return n&&"local"!==r&&"browser"!==r?zo(e,"utc"===r?"UTC":n,t):ro(e,t)}function $o(e){const t=864e5,n=31536e6;return e>5*n?"{yyyy}":e>2*n?"{MMM} {yyyy}":e>5*t&&e<1577664e4?"{MM}/{dd}":e>2*t&&e<=5*t?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}const Ho=e=>{if(!e)return{formattedDate:"",formattedTime:""};const t=new Date(e);return{formattedDate:ro(t,"MMM dd, yyyy - "),formattedTime:ro(t,"HH:mm:ss")}};var Wo=n(56141),Uo=n.n(Wo);function qo(e,t){const n=(0,i.useRef)();let r=!0;for(let e=0;ee.replace("in data","in selection data")))),o&&(a=tr(a,o)),{text:a,errors:s.length>0?s:void 0}}function Yo(e,t,n){const r=cr(e,t);let o=r.text;const i=[];return r.errors&&i.push(...r.errors.map((e=>e.replace("in data","in selection data")))),n&&(o=tr(o,n)),{text:o,errors:i.length>0?i:void 0}}const Xo="#222";function Qo(e,t){const n=e.palette.text?.primary??Xo,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 fn()({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)}const Jo=(0,i.createContext)(void 0);function ei(e){const{children:t,timeZone:n}=e;return(0,o.jsx)(Jo.Provider,{value:n,children:t})}function ti(){const e=(0,i.useContext)(Jo);return{timeZone:e??"local",formatWithUserTimeZone:(t,n)=>Vo(t,n,e),dateFormatOptionsWithUserTimeZone:t=>Bo(t,e)}}function ni({label:e,color:t,onColorChange:n,onClear:r}){const[a,s]=(0,i.useState)(null),l=Boolean(a),{thresholds:{defaultColor:u,palette:c}}=me();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ri,{size:"small","aria-label":`change ${e} color`,isSelected:l,iconColor:t,onClick:e=>{s(e.currentTarget)},children:(0,o.jsx)(se.default,{})}),(0,o.jsx)(de.ZP,{"data-testid":"options color picker",open:l,anchorEl:a,onClose:()=>{s(null)},slotProps:{paper:{sx:{padding:e=>e.spacing(2)}}},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,o.jsx)(ue,{color:t,palette:[u,...c],onChange:n,onClear:r})})]})}const ri=(0,d.ZP)(M.Z,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})((({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e})));var oi=n(94776),ii=n(36372),ai=n(83773),si=n(75586);function li(e){return()=>e}function ui(e){e()}function ci(e,t){return n=>e(t(n))}function di(e,t){return()=>e(t)}function hi(e){return void 0!==e}function pi(){}function fi(e,t){return t(e),e}function mi(e,t){return t(e)}function gi(...e){return e}function vi(e,t){return e(1,t)}function yi(e,t){e(0,t)}function bi(e){e(2)}function xi(e){return e(4)}function wi(e,t){return vi(e,function(e,t){return n=>e(t,n)}(t,0))}function Si(e,t){const n=e(1,(e=>{n(),t(e)}));return n}function ki(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout((()=>{r(t)}),e)}}function Ci(e,t){return e===t}function _i(e=Ci){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Mi(e){return t=>n=>{e(n)&&t(n)}}function Ti(e){return t=>ci(t,e)}function Pi(e){return t=>()=>{t(e)}}function Di(e,...t){const n=function(...e){return t=>e.reduceRight(mi,t)}(...t);return(t,r)=>{switch(t){case 2:return void bi(e);case 1:return vi(e,n(r))}}}function Ai(e,t){return n=>r=>{n(t=e(t,r))}}function Oi(e){return t=>n=>{e>0?e--:t(n)}}function Ii(e){let t,n=null;return r=>o=>{n=o,!t&&(t=setTimeout((()=>{t=void 0,r(n)}),e))}}function Ri(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach(((e,i)=>{const a=Math.pow(2,i);vi(e,(e=>{const s=n;n|=a,t[i]=e,s!==o&&n===o&&r&&(r(),r=null)}))})),e=>i=>{const a=()=>{e([i].concat(t))};n===o?a():r=a}}function Ei(e){let t=e;const n=Zi();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function Li(e,t){return fi(Ei(t),(t=>wi(e,t)))}function Zi(){const e=[];return(t,n)=>{switch(t){case 0:return void e.slice().forEach((e=>{e(n)}));case 2:return void e.splice(0,e.length);case 1:return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function Ni(e){return fi(Zi(),(t=>wi(e,t)))}function ji(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:Fi(),singleton:n}}const Fi=()=>Symbol();function zi(...e){const t=Zi(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach(((e,i)=>{const a=Math.pow(2,i);vi(e,(e=>{n[i]=e,r|=a,r===o&&yi(t,n)}))})),function(e,i){switch(e){case 2:return void bi(t);case 1:return r===o&&i(n),vi(t,i)}}}function Bi(e,t=Ci){return Di(e,_i(t))}function Vi(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(ui)}}(...e.map((e=>vi(e,n))))}}}var $i=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))($i||{});const Hi={0:"debug",3:"error",1:"log",2:"warn"},Wi=ji((()=>{const e=Ei(3);return{log:Ei(((t,n,r=1)=>{var o;r>=(null!=(o=(typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL)?o:xi(e))&&console[Hi[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)})),logLevel:e}}),[],{singleton:!0});function Ui(e,t,n){return qi(e,t,n).callbackRef}function qi(e,t,n){const r=i.useRef(null);let o=e=>{};const a=i.useMemo((()=>typeof ResizeObserver<"u"?new ResizeObserver((t=>{const r=()=>{const n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)})):null),[e,n]);return o=e=>{e&&t?(null==a||a.observe(e),r.current=e):(r.current&&(null==a||a.unobserve(r.current)),r.current=null)},{callbackRef:o,ref:r}}function Gi(e,t,n,r,o,a,s,l,u){const c=i.useCallback((n=>{const i=function(e,t,n,r){const o=e.length;if(0===o)return null;const i=[];for(let a=0;a{if(null==n||!n.offsetParent)return;const o=n.getBoundingClientRect(),i=o.width;let a,l;if(t){const e=t.getBoundingClientRect(),n=o.top-e.top;l=e.height-Math.max(0,n),a=n+t.scrollTop}else{const e=s.current.ownerDocument.defaultView;l=e.innerHeight-Math.max(0,o.top),a=o.top+e.scrollY}r.current={offsetTop:a,visibleHeight:l,visibleWidth:i},e(r.current)}),[e,t]),{callbackRef:a,ref:s}=qi(o,!0,n),l=i.useCallback((()=>{o(s.current)}),[o,s]);return i.useEffect((()=>{var e;if(t){t.addEventListener("scroll",l);const e=new ResizeObserver((()=>{requestAnimationFrame(l)}));return e.observe(t),()=>{t.removeEventListener("scroll",l),e.unobserve(t)}}{const t=null==(e=s.current)?void 0:e.ownerDocument.defaultView;return null==t||t.addEventListener("scroll",l),null==t||t.addEventListener("resize",l),()=>{null==t||t.removeEventListener("scroll",l),null==t||t.removeEventListener("resize",l)}}}),[l,t,s]),a}const Xi=ji((()=>{const e=Zi(),t=Zi(),n=Ei(0),r=Zi(),o=Ei(0),i=Zi(),a=Zi(),s=Ei(0),l=Ei(0),u=Ei(0),c=Ei(0),d=Zi(),h=Zi(),p=Ei(!1),f=Ei(!1),m=Ei(!1);return wi(Di(e,Ti((({scrollTop:e})=>e))),t),wi(Di(e,Ti((({scrollHeight:e})=>e))),a),wi(t,o),{deviation:n,fixedFooterHeight:u,fixedHeaderHeight:l,footerHeight:c,headerHeight:s,horizontalDirection:f,scrollBy:h,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:m,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}}),[],{singleton:!0}),Qi={lvl:0};function Ji(e,t){const n=e.length;if(0===n)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a({index:e,value:t})))}(la(e,na(e,t)[0],n))}function aa(e,t){if(ea(e))return Qi;const{k:n,l:r,r:o}=e;if(t===n){if(ea(r))return o;if(ea(o))return r;{const[t,n]=pa(r);return ua(ca(e,{k:t,l:da(r),v:n}))}}return ua(ca(e,tt&&(s=s.concat(la(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(la(i,t,n))),s}function ua(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(ha(t))return ga(ca(e,{lvl:n-1}));if(!ea(t)&&!ea(t.r))return ca(t.r,{l:ca(t,{r:t.r.l}),lvl:n,r:ca(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}if(ha(e))return va(ca(e,{lvl:n-1}));if(ea(r)||ea(r.l))throw new Error("Unexpected empty nodes");{const t=r.l,o=ha(t)?r.lvl-1:r.lvl;return ca(t,{l:ca(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:va(ca(r,{l:t.r,lvl:o}))})}}function ca(e,t){return fa(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 da(e){return ea(e.r)?e.l:ua(ca(e,{r:da(e.r)}))}function ha(e){return ea(e)||e.lvl>e.r.lvl}function pa(e){return ea(e.r)?[e.k,e.v]:pa(e.r)}function fa(e,t,n,r=Qi,o=Qi){return{k:e,l:r,lvl:n,r:o,v:t}}function ma(e){return va(ga(e))}function ga(e){const{l:t}=e;return ea(t)||t.lvl!==e.lvl?e:ca(t,{r:ca(e,{l:t.r})})}function va(e){const{lvl:t,r:n}=e;return ea(n)||ea(n.r)||n.lvl!==t||n.r.lvl!==t?e:ca(n,{l:ca(e,{r:n.l}),lvl:t+1})}function ya(e,t){return!(!e||e.startIndex!==t.startIndex||e.endIndex!==t.endIndex)}function ba(e,t){return!(!e||e[0]!==t[0]||e[1]!==t[1])}const xa=ji((()=>({recalcInProgress:Ei(!1)})),[],{singleton:!0});function wa(e,t,n){return e[Sa(e,t,n)]}function Sa(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=n(e[i],t);if(0===a)return i;if(-1===a){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function ka(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ca(e){return!ea(e.groupOffsetTree)}function _a({index:e},t){return t===e?0:t0?s+n:s}function Pa(e,t){if(!Ca(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Da(e,t,n){if(function(e){return typeof e.groupIndex<"u"}(e))return t.groupIndices[e.groupIndex]+1;{let r=Pa("LAST"===e.index?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}}function Aa(e,t,n,r=0){return r>0&&(t=Math.max(t,wa(e,r,_a).offset)),Ji(function(e,t,n,r){const o=Sa(e,t,r),i=Sa(e,n,r,o);return e.slice(o,i+1)}(e,t,n,Ma),Ea)}function Oa(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,$i.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ea(i)&&2===t.length){const e=t[0].size,r=t[1].size;a=n.reduce(((t,n)=>ra(ra(t,n,e),n+1,r)),a)}else[a,s]=function(e,t){let n=ea(e)?0:1/0;for(const r of t){const{endIndex:t,size:o,startIndex:i}=r;if(n=Math.min(n,i),ea(e)){e=ra(e,0,o);continue}const a=ia(e,i-1,t+1);if(a.some(La(r)))continue;let s=!1,l=!1;for(const{end:n,start:r,value:i}of a)s?(t>=r||o===i)&&(e=aa(e,r)):(l=i!==o,s=!0),n>t&&t>=r&&i!==o&&(e=ra(e,t+1,i));l&&(e=ra(e,i,o))}return[e,n]}(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d}=Ra(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce(((e,t)=>ra(e,t,Ta(t,d,o))),oa()),lastIndex:l,lastOffset:u,lastSize:c,offsetTree:d,sizeTree:a}}function Ia(e,t){let n=0,r=0;for(;ne.start===r&&(e.end===t||e.end===1/0)&&e.value===n}const Za={offsetHeight:"height",offsetWidth:"width"},Na=ji((([{log:e},{recalcInProgress:t}])=>{const n=Zi(),r=Zi(),o=Li(r,0),i=Zi(),a=Zi(),s=Ei(0),l=Ei([]),u=Ei(void 0),c=Ei(void 0),d=Ei(void 0),h=Ei(void 0),p=Ei(((e,t)=>ka(e,Za[t]))),f=Ei(void 0),m=Ei(0),g={groupIndices:[],groupOffsetTree:oa(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:oa()},v=Li(Di(n,Ri(l,e,m),Ai(Oa,g),_i()),g),y=Li(Di(l,_i(),Ai(((e,t)=>({current:t,prev:e.current})),{current:[],prev:[]}),Ti((({prev:e})=>e))),[]);wi(Di(l,Mi((e=>e.length>0)),Ri(v,m),Ti((([e,t,n])=>{const r=e.reduce(((e,r,o)=>ra(e,r,Ta(r,t.offsetTree,n)||o)),oa());return{...t,groupIndices:e,groupOffsetTree:r}}))),v),wi(Di(r,Ri(v),Mi((([e,{lastIndex:t}])=>e[{endIndex:t,size:n,startIndex:e}]))),n),wi(u,c);const b=Li(Di(u,Ti((e=>void 0===e))),!0);wi(Di(c,Mi((e=>void 0!==e&&ea(xi(v).sizeTree))),Ti((e=>{const t=xi(d),n=xi(l).length>0;return t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]}))),n),wi(Di(h,Mi((e=>void 0!==e&&e.length>0&&ea(xi(v).sizeTree))),Ti((e=>{const t=[];let n=e[0],r=0;for(let o=1;ovoid 0!==e&&void 0!==t)),Ti((([e,t,n])=>{const r=[];for(let o=0;o({changed:n!==e,sizes:n})),{changed:!1,sizes:g}),Ti((e=>e.changed))));vi(Di(s,Ai(((e,t)=>({diff:e.prev-t,prev:t})),{diff:0,prev:0}),Ti((e=>e.diff))),(e=>{const{groupIndices:n}=xi(v);if(e>0)yi(t,!0),yi(i,e+Ia(e,n));else if(e<0){const t=xi(y);t.length>0&&(e-=Ia(-e,t)),yi(a,e)}})),vi(Di(s,Ri(e)),(([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},$i.ERROR)}));const w=Ni(i);wi(Di(i,Ri(v),Ti((([e,t])=>{const n=t.groupIndices.length>0,r=[],o=t.lastSize;if(n){const n=ta(t.sizeTree,0);let i=0,a=0;for(;i{let o=t.ranges;return 0!==t.prevSize&&(o=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:o}}),{prevIndex:e,prevSize:0,ranges:r}).ranges}return sa(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:o,ranges:[]}).ranges}))),n);const S=Ni(Di(a,Ri(v,m),Ti((([e,{offsetTree:t},n])=>Ta(-e,t,n)))));return wi(Di(a,Ri(v,m),Ti((([e,t,n])=>{if(t.groupIndices.length>0){if(ea(t.sizeTree))return t;let r=oa();const o=xi(y);let i=0,a=0,s=0;for(;i<-e;){s=o[a];const e=o[a+1]-s-1;a++,i+=e+1}if(r=sa(t.sizeTree).reduce(((t,{k:n,v:r})=>ra(t,Math.max(0,n+e),r)),r),i!==-e){r=ra(r,0,ta(t.sizeTree,s));r=ra(r,1,na(t.sizeTree,1-e)[1])}return{...t,sizeTree:r,...Ra(t.offsetTree,0,r,n)}}{const r=sa(t.sizeTree).reduce(((t,{k:n,v:r})=>ra(t,Math.max(0,n+e),r)),oa());return{...t,sizeTree:r,...Ra(t.offsetTree,0,r,n)}}}))),v),{beforeUnshiftWith:w,data:f,defaultItemSize:c,firstItemIndex:s,fixedItemSize:u,fixedGroupSize:d,gap:m,groupIndices:l,heightEstimates:h,itemSize:p,listRefresh:x,shiftWith:a,shiftWithOffset:S,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:b,unshiftWith:i}}),gi(Wi,xa),{singleton:!0});function ja(e){return e.reduce(((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e)),{groupIndices:[],totalCount:0})}const Fa=ji((([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Zi(),a=Zi(),s=Ni(Di(i,Ti(ja)));return wi(Di(s,Ti((e=>e.totalCount))),n),wi(Di(s,Ti((e=>e.groupIndices))),e),wi(Di(zi(o,t,r),Mi((([e,t])=>Ca(t))),Ti((([e,t,n])=>na(t.groupOffsetTree,Math.max(e-n,0),"v")[0])),_i(),Ti((e=>[e]))),a),{groupCounts:i,topItemsIndexes:a}}),gi(Na,Xi)),za=ji((([{log:e}])=>{const t=Ei(!1),n=Ni(Di(t,Mi((e=>e)),_i()));return vi(t,(t=>{t&&xi(e)("props updated",{},$i.DEBUG)})),{didMount:n,propsReady:t}}),gi(Wi),{singleton:!0}),Ba=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Va(e){const t="number"==typeof e?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Ba)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const $a=ji((([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:u,smoothScrollTargetReached:c,viewportHeight:d},{log:h}])=>{const p=Zi(),f=Zi(),m=Ei(0);let g=null,v=null,y=null;function b(){g&&(g(),g=null),y&&(y(),y=null),v&&(clearTimeout(v),v=null),yi(l,!1)}return wi(Di(p,Ri(n,d,r,m,s,a,h),Ri(e,i,o),Ti((([[e,n,r,o,i,a,s,u],d,h,m])=>{const x=Va(e),{align:w,behavior:S,offset:k}=x,C=o-1,_=Da(x,n,C);let M=Ta(_,n.offsetTree,d)+a;"end"===w?(M+=h+na(n.sizeTree,_)[1]-r+m,_===C&&(M+=s)):"center"===w?M+=(h+na(n.sizeTree,_)[1]-r+m)/2:M-=i,k&&(M+=k);const T=t=>{b(),t?(u("retrying to scroll to",{location:e},$i.DEBUG),yi(p,e)):(yi(f,!0),u("list did not change, scroll successful",{},$i.DEBUG))};if(b(),"smooth"===S){let e=!1;y=vi(t,(t=>{e=e||t})),g=Si(c,(()=>{T(e)}))}else g=Si(Di(t,function(e){return t=>{const n=setTimeout((()=>{t(!1)}),e);return e=>{e&&(t(!0),clearTimeout(n))}}}(150)),T);return v=setTimeout((()=>{b()}),1200),yi(l,!0),u("scrolling from index to",{behavior:S,index:_,top:M},$i.DEBUG),{behavior:S,top:M}}))),u),{scrollTargetReached:f,scrollToIndex:p,topListHeight:m}}),gi(Na,Xi,Wi),{singleton:!0});function Ha(e,t){0==e?t():requestAnimationFrame((()=>{Ha(e-1,t)}))}function Wa(e,t){const n=t-1;return"number"==typeof e?e:"LAST"===e.index?n:e.index}const Ua=ji((([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=Ei(!0),l=Ei(0),u=Ei(!0);return wi(Di(a,Ri(l),Mi((([e,t])=>!!t)),Pi(!1)),s),wi(Di(a,Ri(l),Mi((([e,t])=>!!t)),Pi(!1)),u),vi(Di(zi(t,a),Ri(s,n,e,u),Mi((([[,e],t,{sizeTree:n},r,o])=>e&&(!ea(n)||hi(r))&&!t&&!o)),Ri(l)),(([,e])=>{Si(o,(()=>{yi(u,!0)})),Ha(4,(()=>{Si(r,(()=>{yi(s,!0)})),yi(i,e)}))})),{initialItemFinalLocationReached:u,initialTopMostItemIndex:l,scrolledToInitialItem:s}}),gi(Na,Xi,$a,za),{singleton:!0});function qa(e,t){return Math.abs(e-t)<1.01}const Ga="up",Ka="down",Ya={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},Xa=ji((([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=Ei(!1),s=Ei(!0),l=Zi(),u=Zi(),c=Ei(4),d=Ei(0),h=Li(Di(Vi(Di(Bi(o),Oi(1),Pi(!0)),Di(Bi(o),Oi(1),Pi(!1),ki(100))),_i()),!1),p=Li(Di(Vi(Di(n,Pi(!0)),Di(n,Pi(!1),ki(200))),_i()),!1);wi(Di(zi(Bi(o),Bi(d)),Ti((([e,t])=>e<=t)),_i()),s),wi(Di(s,Ii(50)),u);const f=Ni(Di(zi(r,Bi(i),Bi(t),Bi(e),Bi(c)),Ai(((e,[{scrollHeight:t,scrollTop:n},r,o,i,a])=>{const s={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:s}}let l;return l=s.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":re&&e.atBottom===t.atBottom)))),m=Li(Di(r,Ai(((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(qa(e.scrollHeight,t))return{changed:!1,jump:0,scrollHeight:t,scrollTop:n};{const o=t-(n+r)<1;return e.scrollTop!==n&&o?{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}),Mi((e=>e.changed)),Ti((e=>e.jump))),0);wi(Di(f,Ti((e=>e.atBottom))),a),wi(Di(a,Ii(50)),l);const g=Ei(Ka);wi(Di(r,Ti((({scrollTop:e})=>e)),_i(),Ai(((e,t)=>xi(p)?{direction:e.direction,prevScrollTop:t}:{direction:te.direction))),g),wi(Di(r,Ii(50),Pi("none")),g);const v=Ei(0);return wi(Di(h,Mi((e=>!e)),Pi(0)),v),wi(Di(o,Ii(100),Ri(h),Mi((([e,t])=>!!t)),Ai((([e,t],[n])=>[t,n]),[0,0]),Ti((([e,t])=>t-e))),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:c,atTopStateChange:u,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:h,lastJumpDueToItemResize:m,scrollDirection:g,scrollVelocity:v}}),gi(Xi)),Qa="top",Ja="bottom",es="none";function ts(e,t,n){return"number"==typeof e?n===Ga&&t===Qa||n===Ka&&t===Ja?e:0:n===Ga?t===Qa?e.main:e.reverse:t===Ja?e.main:e.reverse}function ns(e,t){var n;return"number"==typeof e?e:null!=(n=e[t])?n:0}const rs=ji((([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Zi(),a=Ei(0),s=Ei(0),l=Ei(0);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:Li(Di(zi(Bi(r),Bi(o),Bi(n),Bi(i,ba),Bi(l),Bi(a),Bi(t),Bi(e),Bi(s)),Ti((([e,t,n,[r,o],i,a,s,l,u])=>{const c=e-l,d=a+s,h=Math.max(n-c,0);let p=es;const f=ns(u,Qa),m=ns(u,Ja);return r-=l,o+=n+s,(r+=n+s)>e+d-f&&(p=Ga),(o-=l)null!=e)),_i(ba)),[0,0])}}),gi(Xi),{singleton:!0});const os={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function is(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let u=0,c=0;if(e.length>0){u=e[0].offset;const t=e[e.length-1];c=t.offset+t.size}const d=n-a,h=u,p=s+d*l+(d-1)*r-c;return{bottom:c,firstItemIndex:i,items:ss(e,o,i),offsetBottom:p,offsetTop:u,top:h,topItems:ss(t,o,i),topListHeight:t.reduce(((e,t)=>t.size+e),0),totalCount:n}}function as(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const t of n.groupIndices){if(t-a>=e)break;a++}const s=e+a,l=Wa(t,s);return is(Array.from({length:s}).map(((e,t)=>({data:i[t+l],index:t+l,offset:0,size:0}))),[],s,o,n,r)}function ss(e,t,n){if(0===e.length)return[];if(!Ca(t))return e.map((e=>({...e,index:e.index+n,originalIndex:e.index})));const r=e[0].index,o=e[e.length-1].index,i=[],a=ia(t.groupOffsetTree,r,o);let s,l=0;for(const r of e){let e;(!s||s.end{const m=Ei([]),g=Ei(0),v=Zi();wi(i.topItemsIndexes,m);const y=Li(Di(zi(p,f,Bi(l,ba),Bi(o),Bi(r),Bi(u),c,Bi(m),Bi(t),Bi(n),e),Mi((([e,t,,n,,,,,,,r])=>{const o=r&&r.length!==n;return e&&!t&&!o})),Ti((([,,[e,t],n,r,o,i,a,s,l,u])=>{const c=r,{offsetTree:d,sizeTree:h}=c,p=xi(g);if(0===n)return{...os,totalCount:n};if(0===e&&0===t)return 0===p?{...os,totalCount:n}:as(p,o,r,s,l,u||[]);if(ea(h))return p>0?null:is(function(e,t,n){if(Ca(t)){const r=Pa(e,t);return[{index:na(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}]}(Wa(o,n),c,u),[],n,l,c,s);const f=[];if(a.length>0){const e=a[0],t=a[a.length-1];let n=0;for(const r of ia(h,e,t)){const o=r.value,i=Math.max(r.start,e),a=Math.min(r.end,t);for(let e=i;e<=a;e++)f.push({data:null==u?void 0:u[e],index:e,offset:n,size:o}),n+=o}}if(!i)return is([],f,n,l,c,s);const m=a.length>0?a[a.length-1]+1:0,v=Aa(d,e,t,m);if(0===v.length)return null;const y=n-1;return is(fi([],(n=>{for(const r of v){const o=r.value;let i=o.offset,a=r.start;const s=o.size;if(o.offset=t);e++)n.push({data:null==u?void 0:u[e],index:e,offset:i,size:s}),i+=s+l}})),f,n,l,c,s)})),Mi((e=>null!==e)),_i()),os);wi(Di(e,Mi(hi),Ti((e=>null==e?void 0:e.length))),o),wi(Di(y,Ti((e=>e.topListHeight))),d),wi(d,s),wi(Di(y,Ti((e=>[e.top,e.bottom]))),a),wi(Di(y,Ti((e=>e.items))),v);const b=Ni(Di(y,Mi((({items:e})=>e.length>0)),Ri(o,e),Mi((([{items:e},t])=>e[e.length-1].originalIndex===t-1)),Ti((([,e,t])=>[e-1,t])),_i(ba),Ti((([e])=>e)))),x=Ni(Di(y,Ii(200),Mi((({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length)),Ti((({items:e})=>e[0].index)),_i())),w=Ni(Di(y,Mi((({items:e})=>e.length>0)),Ti((({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&tt;)n--;return{endIndex:e[n].index,startIndex:e[t].index}})),_i(ya)));return{endReached:b,initialItemCount:g,itemsRendered:v,listState:y,rangeChanged:w,startReached:x,topItemsIndexes:m,...h}}),gi(Na,Fa,rs,Ua,$a,Xa,za,xa),{singleton:!0}),us=ji((([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Zi(),a=Li(Di(zi(n,e,r,t,o),Ti((([e,t,n,r,o])=>e+t+n+r+o.offsetBottom+o.bottom))),0);return wi(Bi(a),i),{totalListHeight:a,totalListHeightChanged:i}}),gi(Xi,ls),{singleton:!0}),cs=ji((([{viewportHeight:e},{totalListHeight:t}])=>{const n=Ei(!1);return{alignToBottom:n,paddingTopAddition:Li(Di(zi(n,e,t),Mi((([e])=>e)),Ti((([,e,t])=>Math.max(0,e-t))),Ii(0),_i()),0)}}),gi(Xi,us),{singleton:!0}),ds=ji((()=>({context:Ei(null)}))),hs=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>ti?{...o,align:null!=n?n:"end",behavior:r}:null,ps=ji((([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:u}])=>{const c=Zi();return wi(Di(c,Ri(t,l,n,i,o,r,s),Ri(e),Ti((([[e,t,n,r,o,i,s,l],u])=>{const{align:c,behavior:d,calculateViewLocation:h=hs,done:p,...f}=e,m=Da(e,t,r-1),g=Ta(m,t.offsetTree,u)+o+i,v=h({itemBottom:g+na(t.sizeTree,m)[1],itemTop:g,locationParams:{align:c,behavior:d,...f},viewportBottom:l+n-s,viewportTop:l+i});return v?p&&Si(Di(a,Mi((e=>!e)),Oi(xi(a)?1:2)),p):p&&p(),v})),Mi((e=>null!==e))),u),{scrollIntoView:c}}),gi(Na,Xi,$a,ls,Wi),{singleton:!0});function fs(e){return!!e&&("smooth"===e?"smooth":"auto")}const ms=ji((([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:u},{log:c},{scrollingInProgress:d},{context:h},{scrollIntoView:p}])=>{const f=Ei(!1),m=Zi();let g=null;function v(e){yi(a,{align:"end",behavior:e,index:"LAST"})}function y(e){const t=Si(o,(t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&!g&&(xi(c)("scrolling to bottom due to increased size",{},$i.DEBUG),v("auto"))}));setTimeout(t,100)}vi(Di(zi(Di(Bi(t),Oi(1)),l),Ri(Bi(f),i,s,d),Ti((([[e,t],n,r,o,i])=>{let a=t&&o,s="auto";return a&&(s=((e,t)=>"function"==typeof e?fs(e(t)):t&&fs(e))(n,r||i),a=a&&!!s),{followOutputBehavior:s,shouldFollow:a,totalCount:e}})),Mi((({shouldFollow:e})=>e))),(({followOutputBehavior:t,totalCount:r})=>{g&&(g(),g=null),xi(n)?requestAnimationFrame((()=>{xi(c)("following output to ",{totalCount:r},$i.DEBUG),v(t)})):g=Si(e,(()=>{xi(c)("following output to ",{totalCount:r},$i.DEBUG),v(t),g=null}))})),vi(Di(zi(Bi(f),t,u),Mi((([e,,t])=>e&&t)),Ai((({value:e},[,t])=>({refreshed:e===t,value:t})),{refreshed:!1,value:0}),Mi((({refreshed:e})=>e)),Ri(f,t)),(([,e])=>{xi(s)&&y(!1!==e)})),vi(m,(()=>{y(!1!==xi(f))})),vi(zi(Bi(f),o),(([e,t])=>{e&&!t.atBottom&&"VIEWPORT_HEIGHT_DECREASING"===t.notAtBottomBecause&&v("auto")}));const b=Ei(null),x=Zi();return wi(Vi(Di(Bi(r),Ti((e=>{var t;return null!=(t=null==e?void 0:e.length)?t:0}))),Di(Bi(t))),x),vi(Di(zi(Di(x,Oi(1)),l),Ri(Bi(b),s,d,h),Ti((([[e,t],n,r,o,i])=>t&&r&&(null==n?void 0:n({context:i,totalCount:e,scrollingInProgress:o})))),Mi((e=>!!e)),Ii(0)),(t=>{g&&(g(),g=null),xi(n)?requestAnimationFrame((()=>{xi(c)("scrolling into view",{}),yi(p,t)})):g=Si(e,(()=>{xi(c)("scrolling into view",{}),yi(p,t),g=null}))})),{autoscrollToBottom:m,followOutput:f,scrollIntoViewOnChange:b}}),gi(Na,Xa,$a,Ua,za,Wi,Xi,ds,ps)),gs=ji((([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(wi(Di(s,Ri(i),Mi((([,e])=>0!==e)),Ri(o,r,t,n,e),Ti((([[,e],t,n,r,o,i=[]])=>as(e,t,n,r,o,i)))),a),{})),gi(Na,Ua,ls,za),{singleton:!0}),vs=ji((([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=Ei(0);return vi(Di(e,Ri(r),Mi((([,e])=>0!==e)),Ti((([,e])=>({top:e})))),(e=>{Si(Di(n,Oi(1),Mi((e=>e.items.length>1))),(()=>{requestAnimationFrame((()=>{yi(t,e)}))}))})),{initialScrollTop:r}}),gi(za,Xi,ls),{singleton:!0}),ys=ji((([{scrollVelocity:e}])=>{const t=Ei(!1),n=Zi(),r=Ei(!1);return wi(Di(e,Ri(r,t,n),Mi((([e,t])=>!!t)),Ti((([e,t,n,r])=>{const{enter:o,exit:i}=t;if(n){if(i(e,r))return!1}else if(o(e,r))return!0;return n})),_i()),t),vi(Di(zi(t,e,n),Ri(r)),(([[e,t,n],r])=>{e&&r&&r.change&&r.change(t,n)})),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}}),gi(Xa),{singleton:!0}),bs=ji((([{scrollContainerState:e,scrollTo:t}])=>{const n=Zi(),r=Zi(),o=Zi(),i=Ei(!1),a=Ei(void 0);return wi(Di(zi(n,r),Ti((([{scrollHeight:e,scrollTop:t,viewportHeight:n},{offsetTop:r}])=>({scrollHeight:e,scrollTop:Math.max(0,t-r),viewportHeight:n})))),e),wi(Di(t,Ri(r),Ti((([e,{offsetTop:t}])=>({...e,top:e.top+t})))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}}),gi(Xi)),xs=ji((([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const u=Zi(),c=Ei(void 0),d=Ei(null),h=Ei(null);return wi(s,d),wi(l,h),vi(Di(u,Ri(t,r,a,d,h,n)),(([e,t,n,r,o,i,a])=>{const s=function(e){return sa(e).map((({k:e,v:t},n,r)=>{const o=r[n+1];return{endIndex:o?o.k-1:1/0,size:t,startIndex:e}}))}(t.sizeTree);r&&null!==o&&null!==i&&(n=o.scrollTop-i.offsetTop),e({ranges:s,scrollTop:n-=a})})),wi(Di(c,Mi(hi),Ti(ws)),o),wi(Di(i,Ri(c),Mi((([,e])=>void 0!==e)),_i(),Ti((([,e])=>e.ranges))),e),{getState:u,restoreStateFrom:c}}),gi(Na,Xi,Ua,za,bs));function ws(e){return{align:"start",index:0,offset:e.scrollTop}}const Ss=ji((([{topItemsIndexes:e}])=>{const t=Ei(0);return wi(Di(t,Mi((e=>e>=0)),Ti((e=>Array.from({length:e}).map(((e,t)=>t))))),e),{topItemCount:t}}),gi(ls));function ks(e){let t,n=!1;return()=>(n||(n=!0,t=e()),t)}const Cs=ks((()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent))),_s=ji((([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:u,gap:c,shiftWithOffset:d,sizes:h},{log:p},{recalcInProgress:f}])=>{const m=Ni(Di(l,Ri(a),Ai((([,e,t,n],[{bottom:r,items:o,offsetBottom:i,totalCount:a},s])=>{const l=r+i;let u=0;return t===a&&e.length>0&&o.length>0&&(0===o[0].originalIndex&&0===e[0].originalIndex||(u=l-n,0!==u&&(u+=s))),[u,o,a,l]}),[0,[],0,0]),Mi((([e])=>0!==e)),Ri(r,s,n,o,p,f),Mi((([,e,t,n,,,r])=>!r&&!n&&0!==e&&t===Ga)),Ti((([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},$i.DEBUG),e)))));function g(n){n>0?(yi(t,{behavior:"auto",top:-n}),yi(e,0)):(yi(e,0),yi(t,{behavior:"auto",top:-n}))}return vi(Di(m,Ri(e,i)),(([t,n,r])=>{r&&Cs()?yi(e,n-t):g(-t)})),vi(Di(zi(Li(i,!1),e,f),Mi((([e,t,n])=>!e&&!n&&0!==t)),Ti((([e,t])=>t)),Ii(1)),g),wi(Di(d,Ti((e=>({top:-e})))),t),vi(Di(u,Ri(h,c),Ti((([e,{groupIndices:t,lastSize:n,sizeTree:r},o])=>{function i(e){return e*(n+o)}if(0===t.length)return i(e);{let n=0;const o=ta(r,0);let a=0,s=0;for(;ae&&(n-=o,r=e-a+1),a+=r,n+=i(r),s++}return n}}))),(n=>{yi(e,n),requestAnimationFrame((()=>{yi(t,{top:n}),requestAnimationFrame((()=>{yi(e,0),yi(f,!1)}))}))})),{deviation:e}}),gi(Xi,Xa,ls,Na,Wi,xa)),Ms=ji((([e,t,n,r,o,i,a,s,l,u,c])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...u,...c})),gi(rs,gs,za,ys,us,vs,cs,bs,ps,Wi,ds)),Ts=ji((([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:u,sizes:c,statefulTotalCount:d,totalCount:h,trackItemSizes:p},{initialItemFinalLocationReached:f,initialTopMostItemIndex:m,scrolledToInitialItem:g},v,y,b,{listState:x,topItemsIndexes:w,...S},{scrollToIndex:k},C,{topItemCount:_},{groupCounts:M},T])=>(wi(S.rangeChanged,T.scrollSeekRangeChanged),wi(Di(T.windowViewportRect,Ti((e=>e.visibleHeight))),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:M,heightEstimates:s,initialItemFinalLocationReached:f,initialTopMostItemIndex:m,scrolledToInitialItem:g,sizeRanges:u,topItemCount:_,topItemsIndexes:w,totalCount:h,...b,groupIndices:a,itemSize:l,listState:x,scrollToIndex:k,statefulTotalCount:d,trackItemSizes:p,...S,...T,...v,sizes:c,...y})),gi(Na,Ua,Xi,xs,ms,ls,$a,_s,Ss,Fa,Ms));function Ps(e,t){const n={},r={};let o=0;const i=e.length;for(;o(n[r]=function(e){let t,n;const r=()=>null==t?void 0:t();return function(o,i){switch(o){case 1:return i?n===i?void 0:(r(),n=i,t=vi(e,i),t):(r(),pi);case 2:return r(),void(n=null)}}}(e[t.events[r]]),n)),{})}const h=i.forwardRef(((h,p)=>{const{children:f,...m}=h,[g]=i.useState((()=>fi(function(e){const t=new Map,n=({constructor:e,dependencies:r,id:o,singleton:i})=>{if(i&&t.has(o))return t.get(o);const a=e(r.map((e=>n(e))));return i&&t.set(o,a),a};return n(e)}(e),(e=>{c(e,m)})))),[v]=i.useState(di(d,g));Ds((()=>{for(const e of l)e in m&&vi(v[e],m[e]);return()=>{Object.values(v).map(bi)}}),[m,v,g]),Ds((()=>{c(g,m)})),i.useImperativeHandle(p,li(function(e){return s.reduce(((n,r)=>(n[r]=n=>{yi(e[t.methods[r]],n)},n)),{})}(g)));const y=n;return(0,o.jsx)(u.Provider,{value:g,children:n?(0,o.jsx)(y,{...Ps([...r,...a,...l],m),children:f}):f})}));return{Component:h,useEmitter:(e,t)=>{const n=i.useContext(u)[e];Ds((()=>vi(n,t)),[t,n])},useEmitterValue:i.version.startsWith("18")?e=>{const t=i.useContext(u)[e],n=i.useCallback((e=>vi(t,e)),[t]);return i.useSyncExternalStore(n,(()=>xi(t)),(()=>xi(t)))}:e=>{const t=i.useContext(u)[e],[n,r]=i.useState(di(xi,t));return Ds((()=>vi(t,(e=>{e!==n&&r(li(e))}))),[t,n]),n},usePublisher:e=>{const t=i.useContext(u);return i.useCallback((n=>{yi(t[e],n)}),[t,e])}}}const Os=i.createContext(void 0),Is=i.createContext(void 0),Rs=typeof document<"u"?i.useLayoutEffect:i.useEffect;function Es(e){return"self"in e}function Ls(e,t,n,r=pi,o,a){const s=i.useRef(null),l=i.useRef(null),u=i.useRef(null),c=i.useCallback((n=>{let r,o,i;const s=n.target;if(function(e){return"body"in e}(s)||Es(s)){const e=Es(s)?s:s.defaultView;i=a?e.scrollX:e.scrollY,r=a?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,o=a?e.innerWidth:e.innerHeight}else i=a?s.scrollLeft:s.scrollTop,r=a?s.scrollWidth:s.scrollHeight,o=a?s.offsetWidth:s.offsetHeight;const c=()=>{e({scrollHeight:r,scrollTop:Math.max(i,0),viewportHeight:o})};n.suppressFlushSync?c():Te.flushSync(c),null!==l.current&&(i===l.current||i<=0||i===r-o)&&(l.current=null,t(!0),u.current&&(clearTimeout(u.current),u.current=null))}),[e,t,a]);return i.useEffect((()=>{const e=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",c,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",c)}}),[s,c,n,r,o]),{scrollByCallback:function(e){a&&(e={behavior:e.behavior,left:e.top}),s.current.scrollBy(e)},scrollerRef:s,scrollToCallback:function(n){const r=s.current;if(!r||(a?"offsetWidth"in r&&0===r.offsetWidth:"offsetHeight"in r&&0===r.offsetHeight))return;const o="smooth"===n.behavior;let i,c,d;Es(r)?(c=Math.max(ka(r.document.documentElement,a?"width":"height"),a?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),i=a?r.innerWidth:r.innerHeight,d=a?window.scrollX:window.scrollY):(c=r[a?"scrollWidth":"scrollHeight"],i=ka(r,a?"width":"height"),d=r[a?"scrollLeft":"scrollTop"]);const h=c-i;if(n.top=Math.ceil(Math.max(Math.min(h,n.top),0)),qa(i,c)||n.top===d)return e({scrollHeight:c,scrollTop:d,viewportHeight:i}),void(o&&t(!0));o?(l.current=n.top,u.current&&clearTimeout(u.current),u.current=setTimeout((()=>{u.current=null,l.current=null,t(!0)}),1e3)):l.current=null,a&&(n={behavior:n.behavior,left:n.top}),r.scrollTo(n)}}}const Zs="-webkit-sticky",Ns="sticky",js=ks((()=>{if(typeof document>"u")return Ns;const e=document.createElement("div");return e.style.position=Zs,e.style.position===Zs?Zs:Ns}));function Fs(e){return e}const zs=ji((([e,t])=>({...e,...t})),gi(Ts,ji((()=>{const e=Ei((e=>`Item ${e}`)),t=Ei((e=>`Group ${e}`)),n=Ei({}),r=Ei(Fs),o=Ei("div"),i=Ei(pi),a=(e,t=null)=>Li(Di(n,Ti((t=>t[e])),_i()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}})))),Bs=({height:e})=>(0,o.jsx)("div",{style:{height:e}}),Vs={overflowAnchor:"none",position:js(),zIndex:1},$s={overflowAnchor:"none"},Hs={...$s,display:"inline-block",height:"100%"},Ws=i.memo((function({showTopList:e=!1}){const t=ll("listState"),n=ul("sizeRanges"),r=ll("useWindowScroll"),a=ll("customScrollParent"),s=ul("windowScrollContainerState"),l=ul("scrollContainerState"),u=a||r?s:l,c=ll("itemContent"),d=ll("context"),h=ll("groupContent"),p=ll("trackItemSizes"),f=ll("itemSize"),m=ll("log"),g=ul("gap"),v=ll("horizontalDirection"),{callbackRef:y}=Gi(n,f,p,e?pi:u,m,g,a,v,ll("skipAnimationFrameInResizeObserver")),[b,x]=i.useState(0);sl("deviation",(e=>{b!==e&&x(e)}));const w=ll("EmptyPlaceholder"),S=ll("ScrollSeekPlaceholder")||Bs,k=ll("ListComponent"),C=ll("ItemComponent"),_=ll("GroupComponent"),M=ll("computeItemKey"),T=ll("isSeeking"),P=ll("groupIndices").length>0,D=ll("alignToBottom"),A=ll("initialItemFinalLocationReached"),O=e?{}:{boxSizing:"border-box",...v?{display:"inline-block",height:"100%",marginLeft:0!==b?b:D?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:0!==b?b:D?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...A?{}:{visibility:"hidden"}};return!e&&0===t.totalCount&&w?(0,o.jsx)(w,{...Ys(w,d)}):(0,o.jsx)(k,{...Ys(k,d),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:y,style:O,children:(e?t.topItems:t.items).map((e=>{const n=e.originalIndex,r=M(n+t.firstItemIndex,e.data,d);return T?(0,i.createElement)(S,{...Ys(S,d),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,i.createElement)(_,{...Ys(_,d),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:Vs},h(e.index,d)):(0,i.createElement)(C,{...Ys(C,d),...Xs(C,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:v?Hs:$s},P?c(e.index,e.groupIndex,e.data,d):c(e.index,e.data,d))}))})})),Us={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},qs={outline:"none",overflowX:"auto",position:"relative"},Gs=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),Ks={position:js(),top:0,width:"100%",zIndex:1};function Ys(e,t){if("string"!=typeof e)return{context:t}}function Xs(e,t){return{item:"string"==typeof e?void 0:t}}const Qs=i.memo((function(){const e=ll("HeaderComponent"),t=ul("headerHeight"),n=ll("HeaderFooterTag"),r=Ui(i.useMemo((()=>e=>{t(ka(e,"height"))}),[t]),!0,ll("skipAnimationFrameInResizeObserver")),a=ll("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ys(e,a)})}):null})),Js=i.memo((function(){const e=ll("FooterComponent"),t=ul("footerHeight"),n=ll("HeaderFooterTag"),r=Ui(i.useMemo((()=>e=>{t(ka(e,"height"))}),[t]),!0,ll("skipAnimationFrameInResizeObserver")),a=ll("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ys(e,a)})}):null}));function el({useEmitter:e,useEmitterValue:t,usePublisher:n}){return i.memo((function({children:r,style:i,context:a,...s}){const l=n("scrollContainerState"),u=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),d=t("scrollerRef"),h=t("horizontalDirection")||!1,{scrollByCallback:p,scrollerRef:f,scrollToCallback:m}=Ls(l,c,u,d,void 0,h);return e("scrollTo",m),e("scrollBy",p),(0,o.jsx)(u,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...h?qs:Us,...i},tabIndex:0,...s,...Ys(u,a),children:r})}))}function tl({useEmitter:e,useEmitterValue:t,usePublisher:n}){return i.memo((function({children:r,style:a,context:s,...l}){const u=n("windowScrollContainerState"),c=t("ScrollerComponent"),d=n("smoothScrollTargetReached"),h=t("totalListHeight"),p=t("deviation"),f=t("customScrollParent"),m=i.useRef(null),g=t("scrollerRef"),{scrollByCallback:v,scrollerRef:y,scrollToCallback:b}=Ls(u,d,c,g,f);return Rs((()=>{var e;return y.current=f||(null==(e=m.current)?void 0:e.ownerDocument.defaultView),()=>{y.current=null}}),[y,f]),e("windowScrollTo",b),e("scrollBy",v),(0,o.jsx)(c,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...a,...0!==h?{height:h+p}:{}},...l,...Ys(c,s),children:r})}))}const nl=({children:e})=>{const t=i.useContext(Os),n=ul("viewportHeight"),r=ul("fixedItemHeight"),a=ll("alignToBottom"),s=ll("horizontalDirection"),l=Ui(i.useMemo((()=>ci(n,(e=>ka(e,s?"width":"height")))),[n,s]),!0,ll("skipAnimationFrameInResizeObserver"));return i.useEffect((()=>{t&&(n(t.viewportHeight),r(t.itemHeight))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"element",ref:l,style:Gs(a),children:e})},rl=({children:e})=>{const t=i.useContext(Os),n=ul("windowViewportRect"),r=ul("fixedItemHeight"),a=ll("customScrollParent"),s=Yi(n,a,ll("skipAnimationFrameInResizeObserver")),l=ll("alignToBottom");return i.useEffect((()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"window",ref:s,style:Gs(l),children:e})},ol=({children:e})=>{const t=ll("TopItemListComponent")||"div",n=ll("headerHeight"),r={...Ks,marginTop:`${n}px`},i=ll("context");return(0,o.jsx)(t,{style:r,...Ys(t,i),children:e})},il=i.memo((function(e){const t=ll("useWindowScroll"),n=ll("topItemsIndexes").length>0,r=ll("customScrollParent"),i=ll("context");return(0,o.jsxs)(r||t?dl:cl,{...e,context:i,children:[n&&(0,o.jsx)(ol,{children:(0,o.jsx)(Ws,{showTopList:!0})}),(0,o.jsxs)(r||t?rl:nl,{children:[(0,o.jsx)(Qs,{}),(0,o.jsx)(Ws,{}),(0,o.jsx)(Js,{})]})]})})),{Component:al,useEmitter:sl,useEmitterValue:ll,usePublisher:ul}=As(zs,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},il),cl=el({useEmitter:sl,useEmitterValue:ll,usePublisher:ul}),dl=tl({useEmitter:sl,useEmitterValue:ll,usePublisher:ul}),hl=al,pl=ji((([e,t])=>({...e,...t})),gi(Ts,ji((()=>{const e=Ei((e=>(0,o.jsxs)("td",{children:["Item $",e]}))),t=Ei(null),n=Ei((e=>(0,o.jsxs)("td",{colSpan:1e3,children:["Group ",e]}))),r=Ei(null),i=Ei(null),a=Ei({}),s=Ei(Fs),l=Ei(pi),u=(e,t=null)=>Li(Di(a,Ti((t=>t[e])),_i()),t);return{components:a,computeItemKey:s,context:t,EmptyPlaceholder:u("EmptyPlaceholder"),FillerRow:u("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:u("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:u("ScrollSeekPlaceholder"),TableBodyComponent:u("TableBody","tbody"),TableComponent:u("Table","table"),TableFooterComponent:u("TableFoot","tfoot"),TableHeadComponent:u("TableHead","thead"),TableRowComponent:u("TableRow","tr"),GroupComponent:u("Group","tr")}})))),fl=({height:e})=>(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:{height:e}})}),ml=({height:e})=>(0,o.jsx)("tr",{children:(0,o.jsx)("td",{style:{border:0,height:e,padding:0}})}),gl={overflowAnchor:"none"},vl={position:js(),zIndex:2,overflowAnchor:"none"},yl=i.memo((function({showTopList:e=!1}){const t=_l("listState"),n=_l("computeItemKey"),r=_l("firstItemIndex"),a=_l("context"),s=_l("isSeeking"),l=_l("fixedHeaderHeight"),u=_l("groupIndices").length>0,c=_l("itemContent"),d=_l("groupContent"),h=_l("ScrollSeekPlaceholder")||fl,p=_l("GroupComponent"),f=_l("TableRowComponent"),m=(e?t.topItems:[]).reduce(((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e)),[]),g=(e?t.topItems:t.items).map((t=>{const o=t.originalIndex,g=n(o+r,t.data,a),v=e?0===o?0:m[o-1]:0;return s?(0,i.createElement)(h,{...Ys(h,a),height:t.size,index:t.index,key:g,type:t.type||"item"}):"group"===t.type?(0,i.createElement)(p,{...Ys(p,a),"data-index":o,"data-item-index":t.index,"data-known-size":t.size,key:g,style:{...vl,top:l}},d(t.index,a)):(0,i.createElement)(f,{...Ys(f,a),...Xs(f,t.data),"data-index":o,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:g,style:e?{...vl,top:l+v}:gl},u?c(t.index,t.groupIndex,t.data,a):c(t.index,t.data,a))}));return(0,o.jsx)(o.Fragment,{children:g})})),bl=i.memo((function(){const e=_l("listState"),t=_l("topItemsIndexes").length>0,n=Ml("sizeRanges"),r=_l("useWindowScroll"),a=_l("customScrollParent"),s=Ml("windowScrollContainerState"),l=Ml("scrollContainerState"),u=a||r?s:l,c=_l("trackItemSizes"),d=_l("itemSize"),h=_l("log"),{callbackRef:p,ref:f}=Gi(n,d,c,u,h,void 0,a,!1,_l("skipAnimationFrameInResizeObserver")),[m,g]=i.useState(0);Cl("deviation",(e=>{m!==e&&(f.current.style.marginTop=`${e}px`,g(e))}));const v=_l("EmptyPlaceholder"),y=_l("FillerRow")||ml,b=_l("TableBodyComponent"),x=_l("paddingTopAddition"),w=_l("statefulTotalCount"),S=_l("context");if(0===w&&v)return(0,o.jsx)(v,{...Ys(v,S)});const k=(t?e.topItems:[]).reduce(((e,t)=>e+t.size),0),C=e.offsetTop+x+m-k,_=e.offsetBottom,M=C>0?(0,o.jsx)(y,{context:S,height:C},"padding-top"):null,T=_>0?(0,o.jsx)(y,{context:S,height:_},"padding-bottom"):null;return(0,o.jsxs)(b,{"data-testid":"virtuoso-item-list",ref:p,...Ys(b,S),children:[M,t&&(0,o.jsx)(yl,{showTopList:!0}),(0,o.jsx)(yl,{}),T]})})),xl=({children:e})=>{const t=i.useContext(Os),n=Ml("viewportHeight"),r=Ml("fixedItemHeight"),a=Ui(i.useMemo((()=>ci(n,(e=>ka(e,"height")))),[n]),!0,_l("skipAnimationFrameInResizeObserver"));return i.useEffect((()=>{t&&(n(t.viewportHeight),r(t.itemHeight))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"element",ref:a,style:Gs(!1),children:e})},wl=({children:e})=>{const t=i.useContext(Os),n=Ml("windowViewportRect"),r=Ml("fixedItemHeight"),a=_l("customScrollParent"),s=Yi(n,a,_l("skipAnimationFrameInResizeObserver"));return i.useEffect((()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))}),[t,n,r]),(0,o.jsx)("div",{"data-viewport-type":"window",ref:s,style:Gs(!1),children:e})},Sl=i.memo((function(e){const t=_l("useWindowScroll"),n=_l("customScrollParent"),r=Ml("fixedHeaderHeight"),a=Ml("fixedFooterHeight"),s=_l("fixedHeaderContent"),l=_l("fixedFooterContent"),u=_l("context"),c=Ui(i.useMemo((()=>ci(r,(e=>ka(e,"height")))),[r]),!0,_l("skipAnimationFrameInResizeObserver")),d=Ui(i.useMemo((()=>ci(a,(e=>ka(e,"height")))),[a]),!0,_l("skipAnimationFrameInResizeObserver")),h=n||t?Pl:Tl,p=n||t?wl:xl,f=_l("TableComponent"),m=_l("TableHeadComponent"),g=_l("TableFooterComponent"),v=s?(0,o.jsx)(m,{ref:c,style:{position:"sticky",top:0,zIndex:2},...Ys(m,u),children:s()},"TableHead"):null,y=l?(0,o.jsx)(g,{ref:d,style:{bottom:0,position:"sticky",zIndex:1},...Ys(g,u),children:l()},"TableFoot"):null;return(0,o.jsx)(h,{...e,...Ys(h,u),children:(0,o.jsx)(p,{children:(0,o.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:"none"},...Ys(f,u),children:[v,(0,o.jsx)(bl,{},"TableBody"),y]})})})})),{Component:kl,useEmitter:Cl,useEmitterValue:_l,usePublisher:Ml}=As(pl,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Sl),Tl=el({useEmitter:Cl,useEmitterValue:_l,usePublisher:Ml}),Pl=tl({useEmitter:Cl,useEmitterValue:_l,usePublisher:Ml}),Dl=kl,Al={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Ol={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Il,floor:Rl,max:El,min:Ll,round:Zl}=Math;function Nl(e,t,n){return Array.from({length:t-e+1}).map(((t,r)=>({data:null===n?null:n[r+e],index:r+e})))}function jl(e,t){return e&&e.width===t.width&&e.height===t.height}function Fl(e,t){return e&&e.column===t.column&&e.row===t.row}const zl=ji((([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:u,smoothScrollTargetReached:c,viewportHeight:d},h,p,{didMount:f,propsReady:m},{customScrollParent:g,useWindowScroll:v,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:x},w])=>{const S=Ei(0),k=Ei(0),C=Ei(Al),_=Ei({height:0,width:0}),M=Ei({height:0,width:0}),T=Zi(),P=Zi(),D=Ei(0),A=Ei(null),O=Ei({column:0,row:0}),I=Zi(),R=Zi(),E=Ei(!1),L=Ei(0),Z=Ei(!0),N=Ei(!1),j=Ei(!1);vi(Di(f,Ri(L),Mi((([e,t])=>!!t))),(()=>{yi(Z,!1)})),vi(Di(zi(f,Z,M,_,L,N),Mi((([e,t,n,r,,o])=>e&&!t&&0!==n.height&&0!==r.height&&!o))),(([,,,,e])=>{yi(N,!0),Ha(1,(()=>{yi(T,e)})),Si(Di(u),(()=>{yi(t,[0,0]),yi(Z,!0)}))})),wi(Di(R,Mi((e=>null!=e&&e.scrollTop>0)),Pi(0)),k),vi(Di(f,Ri(R),Mi((([,e])=>null!=e))),(([,e])=>{e&&(yi(_,e.viewport),yi(M,e.item),yi(O,e.gap),e.scrollTop>0&&(yi(E,!0),Si(Di(u,Oi(1)),(e=>{yi(E,!1)})),yi(l,{top:e.scrollTop})))})),wi(Di(_,Ti((({height:e})=>e))),d),wi(Di(zi(Bi(_,jl),Bi(M,jl),Bi(O,((e,t)=>e&&e.column===t.column&&e.row===t.row)),Bi(u)),Ti((([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e})))),I),wi(Di(zi(Bi(S),r,Bi(O,Fl),Bi(M,jl),Bi(_,jl),Bi(A),Bi(k),Bi(E),Bi(Z),Bi(L)),Mi((([,,,,,,,e])=>!e)),Ti((([e,[t,n],r,o,i,a,s,,l,u])=>{const{column:c,row:d}=r,{height:h,width:p}=o,{width:f}=i;if(0===s&&(0===e||0===f))return Al;if(0===p){const t=Wa(u,e);return function(e){return{...Ol,items:e}}(Nl(t,t+Math.max(s-1,0),a))}const m=Bl(f,p,c);let g,v;l?0===t&&0===n&&s>0?(g=0,v=s-1):(g=m*Rl((t+d)/(h+d)),v=m*Il((n+d)/(h+d))-1,v=Ll(e-1,El(v,m-1)),g=Ll(v,El(0,g))):(g=0,v=-1);const y=Nl(g,v,a),{bottom:b,top:x}=Vl(i,r,o,y),w=Il(e/m);return{bottom:b,itemHeight:h,items:y,itemWidth:p,offsetBottom:w*h+(w-1)*d-b,offsetTop:x,top:x}}))),C),wi(Di(A,Mi((e=>null!==e)),Ti((e=>e.length))),S),wi(Di(zi(_,M,C,O),Mi((([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height)),Ti((([e,t,{items:n},r])=>{const{bottom:o,top:i}=Vl(e,r,t,n);return[i,o]})),_i(ba)),t);const F=Ei(!1);wi(Di(u,Ri(F),Ti((([e,t])=>t||0!==e))),F);const z=Ni(Di(zi(C,S),Mi((([{items:e}])=>e.length>0)),Ri(F),Mi((([[e,t],n])=>{const 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})),Ti((([[,e]])=>e-1)),_i())),B=Ni(Di(Bi(C),Mi((({items:e})=>e.length>0&&0===e[0].index)),Pi(0),_i())),V=Ni(Di(Bi(C),Ri(E),Mi((([{items:e},t])=>e.length>0&&!t)),Ti((([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index}))),_i(ya),Ii(0)));wi(V,p.scrollSeekRangeChanged),wi(Di(T,Ri(_,M,S,O),Ti((([e,t,n,r,o])=>{const i=Va(e),{align:a,behavior:s,offset:l}=i;let u=i.index;"LAST"===u&&(u=r-1),u=El(0,u,Ll(r-1,u));let c=$l(t,o,n,u);return"end"===a?c=Zl(c-t.height+n.height):"center"===a&&(c=Zl(c-t.height/2+n.height/2)),l&&(c+=l),{behavior:s,top:c}}))),l);const $=Li(Di(C,Ti((e=>e.offsetBottom+e.bottom))),0);return wi(Di(x,Ti((e=>({height:e.visibleHeight,width:e.visibleWidth})))),_),{customScrollParent:g,data:A,deviation:D,footerHeight:o,gap:O,headerHeight:i,increaseViewportBy:e,initialItemCount:k,itemDimensions:M,overscan:n,restoreStateFrom:R,scrollBy:a,scrollContainerState:s,scrollHeight:P,scrollTo:l,scrollToIndex:T,scrollTop:u,smoothScrollTargetReached:c,totalCount:S,useWindowScroll:v,viewportDimensions:_,windowScrollContainerState:y,windowScrollTo:b,windowViewportRect:x,...p,gridState:C,horizontalDirection:j,initialTopMostItemIndex:L,totalListHeight:$,...h,endReached:z,propsReady:m,rangeChanged:V,startReached:B,stateChanged:I,stateRestoreInProgress:E,...w}}),gi(rs,Xi,Xa,ys,za,bs,Wi));function Bl(e,t,n){return El(1,Rl((e+n)/(Rl(t)+n)))}function Vl(e,t,n,r){const{height:o}=n;if(void 0===o||0===r.length)return{bottom:0,top:0};const i=$l(e,t,n,r[0].index);return{bottom:$l(e,t,n,r[r.length-1].index)+o,top:i}}function $l(e,t,n,r){const o=Bl(e.width,n.width,t.column),i=Rl(r/o),a=i*n.height+El(0,i-1)*t.row;return a>0?a+t.row:a}const Hl=ji((([e,t])=>({...e,...t})),gi(zl,ji((()=>{const e=Ei((e=>`Item ${e}`)),t=Ei({}),n=Ei(null),r=Ei("virtuoso-grid-item"),o=Ei("virtuoso-grid-list"),i=Ei(Fs),a=Ei("div"),s=Ei(pi),l=(e,n=null)=>Li(Di(t,Ti((t=>t[e])),_i()),n),u=Ei(!1),c=Ei(!1);return wi(Bi(c),u),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:u,reportReadyState:c,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}})))),Wl=i.memo((function(){const e=Jl("gridState"),t=Jl("listClassName"),n=Jl("itemClassName"),r=Jl("itemContent"),a=Jl("computeItemKey"),s=Jl("isSeeking"),l=eu("scrollHeight"),u=Jl("ItemComponent"),c=Jl("ListComponent"),d=Jl("ScrollSeekPlaceholder"),h=Jl("context"),p=eu("itemDimensions"),f=eu("gap"),m=Jl("log"),g=Jl("stateRestoreInProgress"),v=eu("reportReadyState"),y=Ui(i.useMemo((()=>e=>{const t=e.parentElement.parentElement.scrollHeight;l(t);const n=e.firstChild;if(n){const{height:e,width:t}=n.getBoundingClientRect();p({height:e,width:t})}f({column:ru("column-gap",getComputedStyle(e).columnGap,m),row:ru("row-gap",getComputedStyle(e).rowGap,m)})}),[l,p,f,m]),!0,!1);return Rs((()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)}),[e]),g?null:(0,o.jsx)(c,{className:t,ref:y,...Ys(c,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map((t=>{const l=a(t.index,t.data,h);return s?(0,o.jsx)(d,{...Ys(d,h),height:e.itemHeight,index:t.index,width:e.itemWidth},l):(0,i.createElement)(u,{...Ys(u,h),className:n,"data-index":t.index,key:l},r(t.index,t.data,h))}))})})),Ul=i.memo((function(){const e=Jl("HeaderComponent"),t=eu("headerHeight"),n=Jl("headerFooterTag"),r=Ui(i.useMemo((()=>e=>{t(ka(e,"height"))}),[t]),!0,!1),a=Jl("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ys(e,a)})}):null})),ql=i.memo((function(){const e=Jl("FooterComponent"),t=eu("footerHeight"),n=Jl("headerFooterTag"),r=Ui(i.useMemo((()=>e=>{t(ka(e,"height"))}),[t]),!0,!1),a=Jl("context");return e?(0,o.jsx)(n,{ref:r,children:(0,o.jsx)(e,{...Ys(e,a)})}):null})),Gl=({children:e})=>{const t=i.useContext(Is),n=eu("itemDimensions"),r=eu("viewportDimensions"),a=Ui(i.useMemo((()=>e=>{r(e.getBoundingClientRect())}),[r]),!0,!1);return i.useEffect((()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))}),[t,r,n]),(0,o.jsx)("div",{ref:a,style:Gs(!1),children:e})},Kl=({children:e})=>{const t=i.useContext(Is),n=eu("windowViewportRect"),r=eu("itemDimensions"),a=Jl("customScrollParent"),s=Yi(n,a,!1);return i.useEffect((()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))}),[t,n,r]),(0,o.jsx)("div",{ref:s,style:Gs(!1),children:e})},Yl=i.memo((function({...e}){const t=Jl("useWindowScroll"),n=Jl("customScrollParent"),r=n||t?nu:tu,i=n||t?Kl:Gl,a=Jl("context");return(0,o.jsx)(r,{...e,...Ys(r,a),children:(0,o.jsxs)(i,{children:[(0,o.jsx)(Ul,{}),(0,o.jsx)(Wl,{}),(0,o.jsx)(ql,{})]})})})),{Component:Xl,useEmitter:Ql,useEmitterValue:Jl,usePublisher:eu}=As(Hl,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Yl),tu=el({useEmitter:Ql,useEmitterValue:Jl,usePublisher:eu}),nu=tl({useEmitter:Ql,useEmitterValue:Jl,usePublisher:eu});function ru(e,t,n){return"normal"!==t&&!(null!=t&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,$i.WARN),"normal"===t?0:parseInt(null!=t?t:"0",10)}var ou=n(73037),iu=n(14544),au=n(16758),su=n(51183),lu=n(78849),uu=n(3552);const cu=(0,d.ZP)(iu.Z,{shouldForwardProp:e=>(0,ou.Z)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{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,h.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"}},[`&.${uu.Z.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${uu.Z.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${uu.Z.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,l.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,l.Fq)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${uu.Z.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${uu.Z.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}}]})))),du=i.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:l=!1,component:u="div",children:c,dense:d=!1,disableGutters:h=!1,divider:p=!1,focusVisibleClassName:m,selected:g=!1,className:v,...y}=n,b=i.useContext(lu.Z),x=i.useMemo((()=>({dense:d||b.dense||!1,alignItems:r,disableGutters:h})),[r,b.dense,d,h]),w=i.useRef(null);(0,au.Z)((()=>{l&&w.current&&w.current.focus()}),[l]);const S={...n,alignItems:r,dense:x.dense,disableGutters:h,divider:p,selected:g},k=(e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:l}=e,u={root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",l&&"selected"]},c=(0,s.Z)(u,uu.t,n);return{...n,...c}})(S),C=(0,su.Z)(w,t);return(0,o.jsx)(lu.Z.Provider,{value:x,children:(0,o.jsx)(cu,{ref:C,href:y.href||y.to,component:(y.href||y.to)&&"div"===u?"button":u,focusVisibleClassName:(0,a.Z)(k.focusVisible,m),ownerState:S,className:(0,a.Z)(k.root,v),...y,classes:k,children:c})})}));var hu=n(12577);const pu=(0,i.memo)((function({color:e,sx:t,...n}){return(0,o.jsx)(ii.Z,{...n,sx:Un({height:4,width:16,margin:e=>e.spacing(.5)},t),style:{backgroundColor:e}})})),fu=(0,i.forwardRef)((function({item:e,sx:t,truncateLabel:n,onClick:r,isVisuallySelected:a,onMouseOver:s,onMouseOut:l,index:u,...c},d){const[h,p]=(0,i.useState)(n);return(0,o.jsxs)(du,{...c,role:"listitem",sx:Un({padding:0,cursor:"pointer"},t),dense:!0,onClick:t=>{r(t,e.id),e.onClick?.(t)},onMouseOver:t=>s?.(t,{id:e.id,index:u}),onMouseOut:t=>l?.(t,{id:e.id,index:u}),selected:a,ref:d,children:[(0,o.jsx)(ii.Z,{sx:{display:"flex",alignItems:"center"},children:(0,o.jsx)(pu,{color:e.color})}),(0,o.jsx)(hu.Z,{primary:e.label,primaryTypographyProps:{noWrap:h},onMouseOver:function(){n&&p(!1)},onMouseOut:function(){n&&p(!0)}})]})})),mu=(0,i.memo)(fu);function gu(e,t){return"ALL"!==t&&!!t[e.id]}function vu({items:e,height:t,width:n,selectedItems:r,onLegendItemClick:i,onItemMouseOver:a,onItemMouseOut:s}){const l=e.length>5;return(0,o.jsx)(hl,{style:{height:t,width:n},data:e,itemContent:(e,t)=>(0,o.jsx)(mu,{item:t,index:e,truncateLabel:l,isVisuallySelected:gu(t,r),onClick:i,onMouseOver:a,onMouseOut:s,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),role:"list"})}function yu({height:e,items:t,selectedItems:n,onLegendItemClick:r,onItemMouseOver:i,onItemMouseOut:a}){return(0,o.jsx)(ii.Z,{component:"ul",sx:{width:"100%",height:e,padding:[0,1,0,0],overflowY:"scroll",margin:0},children:t.map(((e,t)=>(0,o.jsx)(mu,{item:e,index:t,isVisuallySelected:gu(e,n),onMouseOver:i,onMouseOut:a,onClick:r,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id)))})}function bu(e,t){return"function"==typeof e?e(t):e}function xu(e,t){return n=>{t.setState((t=>({...t,[e]:bu(n,t[e])})))}}function wu(e){return e instanceof Function}function Su(e,t){const n=[],r=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&r(o)}))};return r(e),n}function ku(e,t,n){let r,o=[];return i=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(i);if(!(s.length!==o.length||s.some(((e,t)=>o[t]!==e))))return r;let l;if(o=s,n.key&&n.debug&&(l=Date.now()),r=t(...s),null==n||null==n.onChange||n.onChange(r),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-a))/100,t=Math.round(100*(Date.now()-l))/100,r=t/16,o=(e,t)=>{for(e=String(e);e.length{var n;return null!=(n=null==e?void 0:e.debugAll)?n:e[t]},key:!1,onChange:r}}const _u="debugHeaders";function Mu(e,t,n){var r;let o={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:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach((t=>{null==t.createHeader||t.createHeader(o,e)})),o}const Tu={createTable:e=>{e.getHeaderGroups=ku((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>{var i,a;const s=null!=(i=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?i:[],l=null!=(a=null==o?void 0:o.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?a:[];return Pu(t,[...s,...n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),...l],e)}),Cu(e.options,_u)),e.getCenterHeaderGroups=ku((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,r,o)=>Pu(t,n=n.filter((e=>!(null!=r&&r.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),Cu(e.options,_u)),e.getLeftHeaderGroups=ku((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,r)=>{var o;return Pu(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"left")}),Cu(e.options,_u)),e.getRightHeaderGroups=ku((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,r)=>{var o;return Pu(t,null!=(o=null==r?void 0:r.map((e=>n.find((t=>t.id===e)))).filter(Boolean))?o:[],e,"right")}),Cu(e.options,_u)),e.getFooterGroups=ku((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),Cu(e.options,_u)),e.getLeftFooterGroups=ku((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),Cu(e.options,_u)),e.getCenterFooterGroups=ku((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),Cu(e.options,_u)),e.getRightFooterGroups=ku((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),Cu(e.options,_u)),e.getFlatHeaders=ku((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Cu(e.options,_u)),e.getLeftFlatHeaders=ku((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Cu(e.options,_u)),e.getCenterFlatHeaders=ku((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Cu(e.options,_u)),e.getRightFlatHeaders=ku((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),Cu(e.options,_u)),e.getCenterLeafHeaders=ku((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Cu(e.options,_u)),e.getLeftLeafHeaders=ku((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Cu(e.options,_u)),e.getRightLeafHeaders=ku((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),Cu(e.options,_u)),e.getLeafHeaders=ku((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var r,o,i,a,s,l;return[...null!=(r=null==(o=e[0])?void 0:o.headers)?r:[],...null!=(i=null==(a=t[0])?void 0:a.headers)?i:[],...null!=(s=null==(l=n[0])?void 0:l.headers)?s:[]].map((e=>e.getLeafHeaders())).flat()}),Cu(e.options,_u))}};function Pu(e,t,n,r){var o,i;let a=0;const 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=[];const u=(e,t)=>{const o={depth:t,id:[r,`${t}`].filter(Boolean).join("_"),headers:[]},i=[];e.forEach((e=>{const a=[...i].reverse()[0];let s,l=!1;if(e.column.depth===o.depth&&e.column.parent?s=e.column.parent:(s=e.column,l=!0),a&&(null==a?void 0:a.column)===s)a.subHeaders.push(e);else{const o=Mu(n,s,{id:[r,t,s.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:l,placeholderId:l?`${i.filter((e=>e.column===s)).length}`:void 0,depth:t,index:i.length});o.subHeaders.push(e),i.push(o)}o.headers.push(e),e.headerGroup=o})),l.push(o),t>0&&u(i,t-1)},c=t.map(((e,t)=>Mu(n,e,{depth:a,index:t})));u(c,a-1),l.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,r.push(o)}))):t=1;return n+=Math.min(...r),e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}const Du=(e,t,n,r,o,i,a)=>{let s={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];const n=e.getColumn(t);return null!=n&&n.accessorFn?(s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]):void 0},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];const 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._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!=i?i:[],getLeafRows:()=>Su(s.subRows,(e=>e.subRows)),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){const n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:ku((()=>[e.getAllLeafColumns()]),(t=>t.map((t=>function(e,t,n,r){const o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>{var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:ku((()=>[e,n,t,o]),((e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue})),Cu(e.options,"debugCells"))};return e._features.forEach((r=>{null==r.createCell||r.createCell(o,n,t,e)}),{}),o}(e,s,t,t.id)))),Cu(e.options,"debugRows")),_getAllCellsByColumnId:ku((()=>[s.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.column.id]=t,e)),{})),Cu(e.options,"debugRows"))};for(let t=0;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()}}},Ou=(e,t,n)=>{var r,o;const i=null==n||null==(r=n.toString())?void 0:r.toLowerCase();return Boolean(null==(o=e.getValue(t))||null==(o=o.toString())||null==(o=o.toLowerCase())?void 0:o.includes(i))};Ou.autoRemove=e=>Bu(e);const Iu=(e,t,n)=>{var r;return Boolean(null==(r=e.getValue(t))||null==(r=r.toString())?void 0:r.includes(n))};Iu.autoRemove=e=>Bu(e);const Ru=(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())};Ru.autoRemove=e=>Bu(e);const Eu=(e,t,n)=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};Eu.autoRemove=e=>Bu(e);const Lu=(e,t,n)=>!n.some((n=>{var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}));Lu.autoRemove=e=>Bu(e)||!(null!=e&&e.length);const Zu=(e,t,n)=>n.some((n=>{var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}));Zu.autoRemove=e=>Bu(e)||!(null!=e&&e.length);const Nu=(e,t,n)=>e.getValue(t)===n;Nu.autoRemove=e=>Bu(e);const ju=(e,t,n)=>e.getValue(t)==n;ju.autoRemove=e=>Bu(e);const Fu=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};Fu.resolveFilterValue=e=>{let[t,n]=e,r="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,i=null===t||Number.isNaN(r)?-1/0:r,a=null===n||Number.isNaN(o)?1/0:o;if(i>a){const e=i;i=a,a=e}return[i,a]},Fu.autoRemove=e=>Bu(e)||Bu(e[0])&&Bu(e[1]);const zu={includesString:Ou,includesStringSensitive:Iu,equalsString:Ru,arrIncludes:Eu,arrIncludesAll:Lu,arrIncludesSome:Zu,equals:Nu,weakEquals:ju,inNumberRange:Fu};function Bu(e){return null==e||""===e}const Vu={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xu("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"==typeof r?zu.includesString:"number"==typeof r?zu.inNumberRange:"boolean"==typeof r||null!==r&&"object"==typeof r?zu.equals:Array.isArray(r)?zu.arrIncludes:zu.weakEquals},e.getFilterFn=()=>{var n,r;return wu(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:zu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!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=>{const r=e.getFilterFn(),o=null==t?void 0:t.find((t=>t.id===e.id)),i=bu(n,o?o.value:void 0);var a;if($u(r,i,e))return null!=(a=null==t?void 0:t.filter((t=>t.id!==e.id)))?a:[];const s={id:e.id,value:i};var l;return o?null!=(l=null==t?void 0:t.map((t=>t.id===e.id?s:t)))?l:[]:null!=t&&t.length?[...t,s]:[s]}))}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var r;return null==(r=bu(t,e))?void 0:r.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if($u(t.getFilterFn(),e.value,t))return!1}return!0}))}))},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())}};function $u(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const Hu={sum:(e,t,n)=>n.reduce(((t,n)=>{const r=n.getValue(e);return t+("number"==typeof r?r:0)}),0),min:(e,t,n)=>{let r;return n.forEach((t=>{const 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=>{const n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:(e,t,n)=>{let r,o;return n.forEach((t=>{const n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o{let n=0,r=0;if(t.forEach((t=>{let o=t.getValue(e);null!=o&&(o=+o)>=o&&(++n,r+=o)})),n)return r/n},median:(e,t)=>{if(!t.length)return;const n=t.map((t=>t.getValue(e)));if(r=n,!Array.isArray(r)||!r.every((e=>"number"==typeof e)))return;var r;if(1===n.length)return n[0];const o=Math.floor(n.length/2),i=n.sort(((e,t)=>e-t));return n.length%2!=0?i[o]:(i[o-1]+i[o])/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},Wu={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:xu("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=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"==typeof r?Hu.sum:"[object Date]"===Object.prototype.toString.call(r)?Hu.extent:void 0},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return wu(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:Hu[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];const 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)}}};const Uu={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xu("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ku((e=>[Qu(t,e)]),(t=>t.findIndex((t=>t.id===e.id))),Cu(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return(null==(r=Qu(t,n)[0])?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=Qu(t,n);return(null==(r=o[o.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=ku((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>r=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...r];for(;n.length&&t.length;){const e=t.shift(),r=n.findIndex((t=>t.id===e));r>-1&&o.push(n.splice(r,1)[0])}o=[...o,...n]}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;const r=e.filter((e=>!t.includes(e.id)));return"remove"===n?r:[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...r]}(o,t,n)}),Cu(e.options,"debugTable"))}},qu={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:xu("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,i,a,s,l;return"right"===n?{left:(null!=(i=null==e?void 0:e.left)?i:[]).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!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=r&&r.includes(e))))}}))},e.getCanPin=()=>e.getLeafColumns().some((e=>{var n,r,o;return(null==(n=e.columnDef.enablePinning)||n)&&(null==(r=null!=(o=t.options.enableColumnPinning)?o:t.options.enablePinning)||r)})),e.getIsPinned=()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:r,right:o}=t.getState().columnPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"left":!!a&&"right"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?null!=(n=null==(r=t.getState().columnPinning)||null==(r=r[o])?void 0:r.indexOf(e.id))?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ku((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.column.id)))}),Cu(t.options,"debugRows")),e.getLeftVisibleCells=ku((()=>[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"})))),Cu(t.options,"debugRows")),e.getRightVisibleCells=ku((()=>[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"})))),Cu(t.options,"debugRows"))},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?{left:[],right:[]}:null!=(n=null==(r=e.initialState)?void 0:r.columnPinning)?n:{left:[],right:[]})},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.left)?void 0:o.length)||(null==(i=r.right)?void 0:i.length))},e.getLeftLeafColumns=ku((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),Cu(e.options,"debugColumns")),e.getRightLeafColumns=ku((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),Cu(e.options,"debugColumns")),e.getCenterLeafColumns=ku((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const r=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!r.includes(e.id)))}),Cu(e.options,"debugColumns"))}};const Gu={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Ku={getDefaultColumnDef:()=>Gu,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xu("columnSizing",e),onColumnSizingInfoChange:xu("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:Gu.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:Gu.size),null!=(o=e.columnDef.maxSize)?o:Gu.maxSize)},e.getStart=ku((e=>[e,Qu(t,e),t.getState().columnSizing]),((t,n)=>n.slice(0,e.getIndex(t)).reduce(((e,t)=>e+t.getSize()),0)),Cu(t.options,"debugColumns")),e.getAfter=ku((e=>[e,Qu(t,e),t.getState().columnSizing]),((t,n)=>n.slice(e.getIndex(t)+1).reduce(((e,t)=>e+t.getSize()),0)),Cu(t.options,"debugColumns")),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;const n=e=>{var r;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(r=e.column.getSize())?r:0};return n(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),o=null==r?void 0:r.getCanResize();return i=>{if(!r||!o)return;if(null==i.persist||i.persist(),Xu(i)&&i.touches&&i.touches.length>1)return;const a=e.getSize(),s=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[r.id,r.getSize()]],l=Xu(i)?Math.round(i.touches[0].clientX):i.clientX,u={},c=(e,n)=>{"number"==typeof n&&(t.setColumnSizingInfo((e=>{var r,o;const i="rtl"===t.options.columnResizeDirection?-1:1,a=(n-(null!=(r=null==e?void 0:e.startOffset)?r:0))*i,s=Math.max(a/(null!=(o=null==e?void 0:e.startSize)?o: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}))))},d=e=>c("move",e),h=e=>{c("end",e),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))},p=n||("undefined"!=typeof document?document:null);const f={moveHandler:e=>d(e.clientX),upHandler:e=>{null==p||p.removeEventListener("mousemove",f.moveHandler),null==p||p.removeEventListener("mouseup",f.upHandler),h(e.clientX)}},m={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{var t;null==p||p.removeEventListener("touchmove",m.moveHandler),null==p||p.removeEventListener("touchend",m.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(null==(t=e.touches[0])?void 0:t.clientX)}},g=!!function(){if("boolean"==typeof Yu)return Yu;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return Yu=e,Yu}()&&{passive:!1};Xu(i)?(null==p||p.addEventListener("touchmove",m.moveHandler,g),null==p||p.addEventListener("touchend",m.upHandler,g)):(null==p||p.addEventListener("mousemove",f.moveHandler,g),null==p||p.addEventListener("mouseup",f.upHandler,g)),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?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},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}}};let Yu=null;function Xu(e){return"touchstart"===e.type}function Qu(e,t){return t?"center"===t?e.getCenterVisibleLeafColumns():"left"===t?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ju={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xu("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();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{e.getCanSelect()&&(r[e.id]=!0)})):o.forEach((e=>{delete r[e.id]})),r}))},e.toggleAllPageRowsSelected=t=>e.setRowSelection((n=>{const r=void 0!==t?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach((t=>{ec(o,t.id,r,!0,e)})),o})),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ku((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?tc(e,n):{rows:[],flatRows:[],rowsById:{}}),Cu(e.options,"debugTable")),e.getFilteredSelectedRowModel=ku((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?tc(e,n):{rows:[],flatRows:[],rowsById:{}}),Cu(e.options,"debugTable")),e.getGroupedSelectedRowModel=ku((()=>[e.getState().rowSelection,e.getSortedRowModel()]),((t,n)=>Object.keys(t).length?tc(e,n):{rows:[],flatRows:[],rowsById:{}}),Cu(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=Boolean(t.length&&Object.keys(n).length);return r&&t.some((e=>e.getCanSelect()&&!n[e.id]))&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter((e=>e.getCanSelect())),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some((e=>!n[e.id]))&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length;return n>0&&n{const 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)=>{const o=e.getIsSelected();t.setRowSelection((i=>{var a;if(n=void 0!==n?n:!o,e.getCanSelect()&&o===n)return i;const s={...i};return ec(s,e.id,n,null==(a=null==r?void 0:r.selectChildren)||a,t),s}))},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return nc(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return"some"===rc(e,n)},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return"all"===rc(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=()=>{const t=e.getCanSelect();return n=>{var r;t&&e.toggleSelected(null==(r=n.target)?void 0:r.checked)}}}},ec=(e,t,n,r,o)=>{var i;const a=o.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach((t=>delete e[t])),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&null!=(i=a.subRows)&&i.length&&a.getCanSelectSubRows()&&a.subRows.forEach((t=>ec(e,t.id,n,r,o)))};function tc(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(e,t){return e.map((e=>{var t;const a=nc(e,n);if(a&&(r.push(e),o[e.id]=e),null!=(t=e.subRows)&&t.length&&(e={...e,subRows:i(e.subRows)}),a)return e})).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function nc(e,t){var n;return null!=(n=t[e.id])&&n}function rc(e,t,n){var r;if(null==(r=e.subRows)||!r.length)return!1;let o=!0,i=!1;return e.subRows.forEach((e=>{if((!i||o)&&(e.getCanSelect()&&(nc(e,t)?i=!0:o=!1),e.subRows&&e.subRows.length)){const n=rc(e,t);"all"===n?i=!0:"some"===n?(i=!0,o=!1):o=!1}})),o?"all":!!i&&"some"}const oc=/([0-9]+)/gm;function ic(e,t){return e===t?0:e>t?1:-1}function ac(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}function sc(e,t){const n=e.split(oc).filter(Boolean),r=t.split(oc).filter(Boolean);for(;n.length&&r.length;){const e=n.shift(),t=r.shift(),o=parseInt(e,10),i=parseInt(t,10),a=[o,i].sort();if(isNaN(a[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(a[1]))return isNaN(o)?-1:1;if(o>i)return 1;if(i>o)return-1}}return n.length-r.length}const lc={alphanumeric:(e,t,n)=>sc(ac(e.getValue(n)).toLowerCase(),ac(t.getValue(n)).toLowerCase()),alphanumericCaseSensitive:(e,t,n)=>sc(ac(e.getValue(n)),ac(t.getValue(n))),text:(e,t,n)=>ic(ac(e.getValue(n)).toLowerCase(),ac(t.getValue(n)).toLowerCase()),textCaseSensitive:(e,t,n)=>ic(ac(e.getValue(n)),ac(t.getValue(n))),datetime:(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:ric(e.getValue(n),t.getValue(n))},uc=[Tu,{getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xu("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;const o=e.columns;return null==(n=o.length?o.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=ku((()=>[e.getAllCells(),t.getState().columnVisibility]),(e=>e.filter((e=>e.column.getIsVisible()))),Cu(t.options,"debugRows")),e.getVisibleCells=ku((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),Cu(t.options,"debugRows"))},createTable:e=>{const t=(t,n)=>ku((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),Cu(e.options,"debugColumns"));e.getVisibleFlatColumns=t(0,(()=>e.getAllFlatColumns())),e.getVisibleLeafColumns=t(0,(()=>e.getAllLeafColumns())),e.getLeftVisibleLeafColumns=t(0,(()=>e.getLeftLeafColumns())),e.getRightVisibleLeafColumns=t(0,(()=>e.getRightLeafColumns())),e.getCenterVisibleLeafColumns=t(0,(()=>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)}}},Uu,qu,Au,Vu,{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:xu("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const 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,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>zu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return wu(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:zu[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:xu("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return lc.datetime;if("string"==typeof n&&(r=!0,n.split(oc).length>1))return lc.alphanumeric}return r?lc.text:lc.basic},e.getAutoSortDir=()=>{const 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 new Error;return wu(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:lc[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=null!=n;t.setSorting((a=>{const s=null==a?void 0:a.find((t=>t.id===e.id)),l=null==a?void 0:a.findIndex((t=>t.id===e.id));let u,c=[],d=i?n:"desc"===o;var h;(u=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&l!==a.length-1?"replace":s?"toggle":"replace","toggle"===u&&(i||o||(u="remove")),"add"===u)?(c=[...a,{id:e.id,desc:d}],c.splice(0,c.length-(null!=(h=t.options.maxMultiSortColCount)?h:Number.MAX_SAFE_INTEGER))):c="toggle"===u?a.map((t=>t.id===e.id?{...t,desc:d}:t)):"remove"===u?a.filter((t=>t.id!==e.id)):[{id:e.id,desc:d}];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,o;const i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},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;const 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=()=>{const 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())}},Wu,{getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xu("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((()=>{e.resetExpanded(),n=!1}))}}else e._queue((()=>{t=!0}))},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=()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{const 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=>{const 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 o;const i=!0===r||!(null==r||!r[e.id]);let a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((e=>{a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){const{[e.id]:t,...n}=a;return n}return r}))},e.getIsExpanded=()=>{var n;const 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,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},{getInitialState:e=>({...e,pagination:{pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xu("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((()=>{e.resetPageIndex(),n=!1}))}}else e._queue((()=>{t=!0}))},e.setPagination=t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>bu(t,e))),e.resetPagination=t=>{var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},e.setPageIndex=t=>{e.setPagination((n=>{let r=bu(t,n.pageIndex);const o=void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...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=>{const n=Math.max(1,bu(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return{...e,pageIndex:o,pageSize:n}}))},e.setPageCount=t=>e.setPagination((n=>{var r;let o=bu(t,null!=(r=e.options.pageCount)?r:-1);return"number"==typeof o&&(o=Math.max(-1,o)),{...n,pageCount:o}})),e.getPageOptions=ku((()=>[e.getPageCount()]),(e=>{let t=[];return e&&e>0&&(t=[...new Array(e)].fill(null).map(((e,t)=>t))),t}),Cu(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&te.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:{top:[],bottom:[]},...e}),getDefaultOptions:e=>({onRowPinningChange:xu("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map((e=>{let{id:t}=e;return t})):[],a=o?e.getParentRows().map((e=>{let{id:t}=e;return t})):[],s=new Set([...a,e.id,...i]);t.setRowPinning((e=>{var t,r,o,i,a,l;return"bottom"===n?{top:(null!=(o=null==e?void 0:e.top)?o:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:[...(null!=(i=null==e?void 0:e.bottom)?i:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)]}:"top"===n?{top:[...(null!=(a=null==e?void 0:e.top)?a:[]).filter((e=>!(null!=s&&s.has(e)))),...Array.from(s)],bottom:(null!=(l=null==e?void 0:e.bottom)?l:[]).filter((e=>!(null!=s&&s.has(e))))}:{top:(null!=(t=null==e?void 0:e.top)?t:[]).filter((e=>!(null!=s&&s.has(e)))),bottom:(null!=(r=null==e?void 0:e.bottom)?r:[]).filter((e=>!(null!=s&&s.has(e))))}}))},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return"function"==typeof r?r(e):null==(n=null!=r?r:o)||n},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some((e=>null==r?void 0:r.includes(e))),a=n.some((e=>null==o?void 0:o.includes(e)));return i?"top":!!a&&"bottom"},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=null==(n="top"===o?t.getTopRows():t.getBottomRows())?void 0:n.map((e=>{let{id:t}=e;return t}));return null!=(r=null==i?void 0:i.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?{top:[],bottom:[]}:null!=(n=null==(r=e.initialState)?void 0:r.rowPinning)?n:{top:[],bottom:[]})},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;var o,i;return t?Boolean(null==(n=r[t])?void 0:n.length):Boolean((null==(o=r.top)?void 0:o.length)||(null==(i=r.bottom)?void 0:i.length))},e._getPinnedRows=(t,n,r)=>{var o;return(null==(o=e.options.keepPinnedRows)||o?(null!=n?n:[]).map((t=>{const 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=ku((()=>[e.getRowModel().rows,e.getState().rowPinning.top]),((t,n)=>e._getPinnedRows(t,n,"top")),Cu(e.options,"debugRows")),e.getBottomRows=ku((()=>[e.getRowModel().rows,e.getState().rowPinning.bottom]),((t,n)=>e._getPinnedRows(t,n,"bottom")),Cu(e.options,"debugRows")),e.getCenterRows=ku((()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom]),((e,t,n)=>{const r=new Set([...null!=t?t:[],...null!=n?n:[]]);return e.filter((e=>!r.has(e.id)))}),Cu(e.options,"debugRows"))}},Ju,Ku];function cc(e){var t,n;const r=[...uc,...null!=(t=e._features)?t:[]];let o={_features:r};const i=o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(o))),{});let a={...null!=(n=e.initialState)?n:{}};o._features.forEach((e=>{var t;a=null!=(t=null==e.getInitialState?void 0:e.getInitialState(a))?t:a}));const s=[];let l=!1;const u={_features:r,options:{...i,...e},initialState:a,_queue:e=>{s.push(e),l||(l=!0,Promise.resolve().then((()=>{for(;s.length;)s.shift()();l=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{o.setState(o.initialState)},setOptions:e=>{const t=bu(e,o.options);o.options=(e=>o.options.mergeOptions?o.options.mergeOptions(i,e):{...i,...e})(t)},getState:()=>o.options.state,setState:e=>{null==o.options.onStateChange||o.options.onStateChange(e)},_getRowId:(e,t,n)=>{var r;return null!=(r=null==o.options.getRowId?void 0:o.options.getRowId(e,t,n))?r:`${n?[n.id,t].join("."):t}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(e,t)=>{let n=(t?o.getPrePaginationRowModel():o.getRowModel()).rowsById[e];if(!n&&(n=o.getCoreRowModel().rowsById[e],!n))throw new Error;return n},_getDefaultColumnDef:ku((()=>[o.options.defaultColumn]),(e=>{var t;return e=null!=(t=e)?t:{},{header:e=>{const 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},...o._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())),{}),...e}}),Cu(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:ku((()=>[o._getColumnDefs()]),(e=>{const t=function(e,n,r){return void 0===r&&(r=0),e.map((e=>{const i=function(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},s=a.accessorKey;let l,u=null!=(o=null!=(i=a.id)?i:s?"function"==typeof String.prototype.replaceAll?s.replaceAll(".","_"):s.replace(/\./g,"_"):void 0)?o:"string"==typeof a.header?a.header:void 0;if(a.accessorFn?l=a.accessorFn:s&&(l=s.includes(".")?e=>{let t=e;for(const e of s.split(".")){var n;t=null==(n=t)?void 0:n[e]}return t}:e=>e[a.accessorKey]),!u)throw new Error;let c={id:`${String(u)}`,accessorFn:l,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:ku((()=>[!0]),(()=>{var e;return[c,...null==(e=c.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),Cu(e.options,"debugColumns")),getLeafColumns:ku((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=c.columns)&&t.length){let t=c.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[c]}),Cu(e.options,"debugColumns"))};for(const t of e._features)null==t.createColumn||t.createColumn(c,e);return c}(o,e,r,n),a=e;return i.columns=a.columns?t(a.columns,i,r+1):[],i}))};return t(e)}),Cu(e,"debugColumns")),getAllFlatColumns:ku((()=>[o.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),Cu(e,"debugColumns")),_getAllFlatColumnsById:ku((()=>[o.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),Cu(e,"debugColumns")),getAllLeafColumns:ku((()=>[o.getAllColumns(),o._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),Cu(e,"debugColumns")),getColumn:e=>o._getAllFlatColumnsById()[e]};Object.assign(o,u);for(let e=0;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}}function hc(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(n=e)||"function"==typeof n||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(n)?i.createElement(e,t):e:null;var n}var pc=n(82707);function fc({color:e,density:t,...n}){const r="compact"===t;return(0,o.jsx)(pc.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,l.Fq)(e,.5):void 0},"& .MuiSvgIcon-root":{fontSize:r?16:18}}})}var mc=n(14968),gc=n(30575);const vc=(0,i.forwardRef)((function(e,t){return(0,o.jsx)(mc.Z,{...e,ref:t,sx:{backgroundColor:e=>e.palette.background.default,"&:hover":{backgroundColor:e=>(0,l.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity)}}})}));var yc=n(56174);const bc=(0,i.forwardRef)((function(e,t){return(0,o.jsx)(yc.Z,{...e,ref:t})}));var xc=n(90190);const wc=(0,d.ZP)(xc.Z)((({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default}))),Sc={compact:"small",standard:"medium",comfortable:"medium"},kc=(0,i.forwardRef)((function({density:e,...t},n){return(0,o.jsx)(wc,{...t,tabIndex:-1,size:Sc[e],ref:n,sx:{width:"100%"}})}));var Cc=n(31889);const _c=(0,i.forwardRef)((function(e,t){return(0,o.jsx)(Cc.Z,{...e,ref:t})}));var Mc=n(52054),Tc=n(90247);const Pc=(0,Tc.Z)((0,o.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function Dc(e){return(0,g.ZP)("MuiTableSortLabel",e)}const Ac=(0,m.Z)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);var Oc=n(16351);const Ic=(0,d.ZP)(iu.Z,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,h.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,[`& .${Ac.icon}`]:{opacity:.5}},[`&.${Ac.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${Ac.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),Rc=(0,d.ZP)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,c.Z)(n.direction)}`]]}})((0,h.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)"}}]})))),Ec=i.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:l,direction:u="asc",hideSortIcon:d=!1,IconComponent:h=Pc,slots:p={},slotProps:m={},...g}=n,v={...n,active:r,direction:u,hideSortIcon:d,IconComponent:h},y=(e=>{const{classes:t,direction:n,active:r}=e,o={root:["root",r&&"active",`direction${(0,c.Z)(n)}`],icon:["icon",`iconDirection${(0,c.Z)(n)}`]};return(0,s.Z)(o,Dc,t)})(v),b={slots:p,slotProps:m},[x,w]=(0,Oc.Z)("root",{elementType:Ic,externalForwardedProps:b,ownerState:v,className:(0,a.Z)(y.root,l),ref:t}),[S,k]=(0,Oc.Z)("icon",{elementType:Rc,externalForwardedProps:b,ownerState:v,className:y.icon});return(0,o.jsxs)(x,{disableRipple:!0,component:"span",...w,...g,children:[i,d&&!r?null:(0,o.jsx)(S,{as:h,...k})]})}));var Lc=n(96205),Zc=n(60886);const Nc=150,jc=40;function Fc(e,t,{isHeader:n,isLastColumn:r,isFirstColumn:o,defaultColumnHeight:i}={}){let a=e.spacing(1),s=e.spacing(1.25),l=e.spacing(2),u=o?l:s,c=r?l:s,d=e.typography.body1.lineHeight,h=e.typography.body1.fontSize;"compact"===t&&(a=e.spacing(.5),s=e.spacing(.5),l=e.spacing(1),u=o?l:s,c=r?l:s,d=e.typography.body2.lineHeight,h=e.typography.body2.fontSize),"comfortable"===t&&(a=e.spacing(2),s=e.spacing(1.5),l=e.spacing(2),u=o?l:s,c=r?l:s,d=e.typography.body1.lineHeight,h=e.typography.body1.fontSize);const p=n||!i||"auto"===i?function(e,t){return("string"==typeof e?parseInt(e,10):e??0)+2*("string"==typeof t?parseInt(t,10):t)}(d,a):i;return{padding:`${a} ${c} ${a} ${u}`,height:p,fontSize:h,lineHeight:d}}function zc(e){return e.map((({width:e,align:t,headerDescription:n,cellDescription:r,enableSorting:o,dataLink:i,...a})=>({...a,..."auto"===e||void 0===e?{size:0,minSize:0,maxSize:0}:{size:e},enableSorting:!!o,meta:{align:t,headerDescription:n,cellDescription:r,dataLink:i}})))}const Bc=(0,d.ZP)(Lc.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 Vc({children:e,density:t,variant:n,width:r,defaultColumnHeight:a,focusState:s="none",onFocusTrigger:l,isFirstColumn:u,isLastColumn:c,description:d,align:h,color:p,backgroundColor:f,dataLink:m,adjacentCellsValuesMap:g,...v}){const y=(0,oi.Z)(),b=(0,i.useRef)(),x="head"===n;(0,i.useEffect)((()=>{"trigger-focus"===s&&b.current&&b.current.focus()}),[s]);const w=e=>{l?.(e)},S=(0,i.useMemo)((()=>{if(m){if(g&&pr(m.url)){const{text:e}=ur(m.url,g,{urlEncode:!0});return{...m,url:e}}return m}}),[m,g]);return(0,o.jsx)(Bc,{...v,tabIndex:"none"!==s?0:-1,onFocus:e=>{const t=e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');t&&t.focus()},onClick:w,onKeyUp:w,style:{width:r},sx:{position:"relative",borderBottom:x?`solid 1px ${y.palette.grey[100]}`:`solid 1px ${y.palette.grey[50]}`,"&:hover #original-cell":{position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:`${f??y.palette.background.default} !important`,outline:`solid 1px ${y.palette.info.main}`,outlineOffset:"-1px"}},ref:b,children:(0,o.jsx)(ii.Z,{id:"original-cell",sx:{...Fc(y,t,{isHeader:x,isLastColumn:c,isFirstColumn:u,defaultColumnHeight:a}),position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},style:{backgroundColor:f??"inherit",color:p??"inherit"},title:d,"aria-label":d,textAlign:h,children:S?(0,o.jsx)(Zc.Z,{href:S.url,target:S.targetBlank?"_blank":"_self",rel:S.targetBlank?"noopener noreferrer":void 0,children:e}):e})})}function $c({onSort:e,sortDirection:t,nextSortDirection:n,children:r,...i}){const a=!!e,s=(0,o.jsx)(Mc.Z,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:r}),l=!!t,u=l?t:n;return(0,o.jsx)(Vc,{...i,children:a?(0,o.jsx)(Ec,{onClick:e,direction:u,active:l,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${Ac.icon}`]:{opacity:l?1:.5}}},children:s}):s})}var Hc=n(59019);const Wc=(0,i.forwardRef)((function(e,t){return(0,o.jsx)(Hc.Z,{...e,tabIndex:-1,ref:t})})),Uc={row:0,column:0},qc=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"];function Gc({maxRows:e,maxColumns:t,onActiveCellChange:n}){const[r,o]=(0,i.useState)(Uc),[a,s]=(0,i.useState)(!1),l=(0,i.useCallback)((r=>{const i=r.key;(function(e){return qc.includes(e)}(i)||"Home"===i||"End"===i||"PageDown"===i||"PageUp"===i)&&o((o=>{let a=o.row,s=o.column;"ArrowRight"===i&&s0?(r.preventDefault(),s-=1):"ArrowDown"===i&&a0?(r.preventDefault(),a-=1):"Home"===i?(r.preventDefault(),a=0,s=0):"End"===i&&(r.preventDefault(),a=e-1,s=t-1);const l={column:s,row:a},u=n?.(r,o,l)||l;return u.row===o.row&&u.column===o.column?o:u}))}),[t,e,n]);return{activeCell:r,isActive:a,onTableKeyDown:l,onCellFocus:e=>{e.column===r.column&&e.row===r.row&&a||(s(!0),o(e))}}}var Kc=n(32641);function Yc(e){return(0,g.ZP)("MuiTableFooter",e)}(0,m.Z)("MuiTableFooter",["root"]);const Xc=(0,d.ZP)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),Qc={variant:"footer"},Jc="tfoot",ed=i.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiTableFooter"}),{className:r,component:i=Jc,...l}=n,u={...n,component:i},c=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},Yc,t)})(u);return(0,o.jsx)(Kc.Z.Provider,{value:Qc,children:(0,o.jsx)(Xc,{as:i,className:(0,a.Z)(c.root,r),ref:t,role:i===Jc?null:"rowgroup",ownerState:u,...l})})})),td=(0,i.forwardRef)((function(e,t){return(0,o.jsx)(ed,{...e,ref:t})}));function nd({width:e,height:t,density:n,defaultColumnWidth:r,defaultColumnHeight:a,onRowClick:s,onRowMouseOver:l,onRowMouseOut:u,rows:c,columns:d,headers:h,cellConfigs:p,pagination:f,onPaginationChange:m,rowCount:g}){const v=(0,i.useRef)(null),y=(0,i.useRef)({startIndex:0,endIndex:0}),b=function({visibleRange:e,virtualTable:t,maxRows:n,maxColumns:r}){return Gc({maxRows:n,maxColumns:r,onActiveCellChange:(r,o,i)=>{const a=r.key,s=i&&(o.column!==i.column||o.row!==i.row),l=i?.row??o.row;if("ArrowDown"===a&&s)(l-1e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"end"});else if("ArrowUp"===a&&s)(l-1e.current.endIndex)&&t.current?.scrollToIndex({index:l-1,align:"start"});else if(!s||"Home"!==a&&"End"!==a){if("PageDown"===a){r.preventDefault();let i=o.row;return i=Math.min(n-1,e.current.endIndex+1),t.current?.scrollToIndex({index:i-1,align:"start"}),{row:i,column:o.column}}if("PageUp"===a){let n=o.row;return n=Math.max(0,e.current.startIndex-1),t.current?.scrollToIndex({index:n-1,align:"end"}),{row:n,column:o.column}}}else t.current?.scrollToIndex({index:Math.max(l-1,0),align:"start"});return i}})}({visibleRange:y,virtualTable:v,maxRows:c.length+1,maxColumns:d.length}),x=e=>e.row===b.activeCell.row&&e.column===b.activeCell.column?b.isActive?"trigger-focus":"focus-next":"none",w=(0,i.useMemo)((()=>({Scroller:Wc,Table:t=>(0,o.jsx)(kc,{...t,width:e,density:n,onKeyDown:b.onTableKeyDown}),TableHead:_c,TableFoot:td,TableRow:({item:e,...t})=>{const r=t["data-index"],i=c[r];if(!i)return null;const a={id:i.id,index:i.index};return(0,o.jsx)(vc,{...t,onClick:e=>s(e,i.id),density:n,onMouseOver:e=>{l?.(e,a)},onMouseOut:e=>{u?.(e,a)}})},TableBody:bc})),[n,b.onTableKeyDown,s,u,l,c,e]),S=(e,t)=>{f&&m&&m({...f,pageIndex:t})},k=e=>{f&&m&&m({pageIndex:0,pageSize:parseInt(e.target.value,10)})};return(0,o.jsx)(ii.Z,{style:{width:e,height:t},children:(0,o.jsx)(Dl,{ref:v,totalCount:c.length,components:w,rangeChanged:e=>{y.current=e},fixedHeaderContent:()=>(0,o.jsx)(o.Fragment,{children:h.map((e=>(0,o.jsx)(vc,{density:n,children:e.headers.map(((e,t,i)=>{const s=e.column,l={row:0,column:t},u=s.getIsSorted(),c=s.getNextSortingOrder();return(0,o.jsx)($c,{onSort:s.getCanSort()?s.getToggleSortingHandler():void 0,sortDirection:"string"==typeof u?u:void 0,nextSortDirection:"string"==typeof c?c:void 0,width:s.getSize()||r,defaultColumnHeight:a,align:s.columnDef.meta?.align,variant:"head",density:n,description:s.columnDef.meta?.headerDescription,focusState:x(l),onFocusTrigger:()=>b.onCellFocus(l),isFirstColumn:0===t,isLastColumn:t===i.length-1,children:hc(s.columnDef.header,e.getContext())},e.id)}))},e.id)))}),fixedFooterContent:f?()=>(0,o.jsx)(mc.Z,{sx:{backgroundColor:e=>e.palette.background.default},children:(0,o.jsx)(gc.Z,{colSpan:d.length,count:g,page:f.pageIndex,rowsPerPage:f.pageSize,onPageChange:S,onRowsPerPageChange:k})}):void 0,itemContent:e=>{const t=c[e];return t?(0,o.jsx)(o.Fragment,{children:t.getVisibleCells().map(((i,s,l)=>{const u={row:e+1,column:s},c=i.getContext(),d=p?.[c.cell.id],h=i.column.columnDef.cell,f="function"==typeof h?h(c):null,m=i.column.columnDef.meta?.cellDescription;let g;"function"==typeof m?g=m(c):m&&"string"==typeof f&&(g=f);const v=Object.entries(t.original)?.filter((([e,t])=>["string","number"].includes(typeof t))).reduce(((e,[t,n])=>({...e,[t]:String(n)})),{});return(0,o.jsx)(Vc,{"data-testid":i.id,title:g||d?.text||f,width:i.column.getSize()||r,defaultColumnHeight:a,align:i.column.columnDef.meta?.align,density:n,focusState:x(u),onFocusTrigger:()=>b.onCellFocus(u),isFirstColumn:0===s,isLastColumn:s===l.length-1,description:g,color:d?.textColor??void 0,backgroundColor:d?.backgroundColor??void 0,dataLink:i.column.columnDef.meta?.dataLink,adjacentCellsValuesMap:v,children:d?.text||f},i.id)}))}):null}})})}const rd=(e,t)=>`${t}`,od={},id=[];function ad({data:e,columns:t,cellConfigs:n,density:r="standard",defaultColumnWidth:a=Nc,defaultColumnHeight:s="auto",checkboxSelection:l,onRowSelectionChange:u,onSortingChange:c,getCheckboxColor:d,getRowId:h=rd,rowSelection:p=od,sorting:f=id,getItemActions:m,hasItemActions:g,pagination:v,onPaginationChange:y,rowSelectionVariant:b="standard",...x}){const w=(0,oi.Z)(),S=(0,i.useCallback)(((e,t,n)=>{"standard"===b||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():u?.({[t.id]:!0})}),[u,b]),k=(0,i.useCallback)(((e,t,n)=>{const r=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;S(t,n,!!r?.metaKey||!!r?.shiftKey)}),[S]),C=(0,i.useMemo)((()=>({id:"itemActions",header:"Actions",cell:({row:e})=>(0,o.jsx)(_.Z,{direction:"row",alignItems:"center",children:m?.({id:e.id,data:e.original})}),enableSorting:!1})),[m]),M=(0,i.useMemo)((()=>({id:"checkboxRowSelect",size:28,header:({table:e})=>(0,o.jsx)(fc,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler(),color:w.palette.text.primary,density:r}),cell:({row:e,table:t})=>(0,o.jsx)(fc,{checked:e.getIsSelected(),indeterminate:e.getIsSomeSelected(),onChange:n=>{k(n,t,e)},color:d?.(e.original),density:r}),enableSorting:!1})),[w.palette.text.primary,r,d,k]),T=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=i.useState((()=>({current:cc(t)}))),[r,o]=i.useState((()=>n.current.initialState));return n.current.setOptions((t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}}))),n.current}({data:e,columns:(0,i.useMemo)((()=>{const e=zc(t);return g&&e.unshift(C),l&&e.unshift(M),e}),[M,l,t,g,C]),getRowId:h,getCoreRowModel:e=>ku((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;le._autoResetPageIndex()))),getSortedRowModel:e=>ku((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const r=e.getState().sorting,o=[],i=r.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),a={};i.forEach((t=>{const n=e.getColumn(t.id);n&&(a[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const s=e=>{const t=e.map((e=>({...e})));return t.sort(((e,t)=>{for(let r=0;r{var t;o.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=s(e.subRows))})),t};return{rows:s(n.rows),flatRows:o,rowsById:n.rowsById}}),Cu(e.options,"debugTable",0,(()=>e._autoResetPageIndex()))),getPaginationRowModel:v?e=>ku((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:r,pageIndex:o}=t;let{rows:i,flatRows:a,rowsById:s}=n;const l=r*o,u=l+r;let c;i=i.slice(l,u),c=e.options.paginateExpandedRows?{rows:i,flatRows:a,rowsById:s}:dc({rows:i,flatRows:a,rowsById:s}),c.flatRows=[];const d=e=>{c.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d)};return c.rows.forEach(d),c}),Cu(e.options,"debugTable")):void 0,manualPagination:!v,enableRowSelection:!!l,onRowSelectionChange:e=>{const t="function"==typeof e?e(p):e;u?.(t)},onSortingChange:e=>{const t="function"==typeof e?e(f):e;c?.(t)},sortDescFirst:!0,state:{rowSelection:p,sorting:f,...v?{pagination:v}:{}}}),P=(0,i.useCallback)(((e,t)=>{const n=T.getRow(t),r=e.metaKey||e.shiftKey;S(T,n,r)}),[S,T]);return(0,o.jsx)(nd,{...x,density:r,defaultColumnWidth:a,defaultColumnHeight:s,onRowClick:P,rows:T.getRowModel().rows,columns:T.getAllFlatColumns(),headers:T.getHeaderGroups(),cellConfigs:n,pagination:v,onPaginationChange:y,rowCount:T.getRowCount()})}const sd=[{accessorKey:"label",header:"Name",enableSorting:!0,cell:({getValue:e})=>(0,o.jsx)("span",{title:e(),children:e()})}],ld=e=>e.id,ud=e=>e.color;function cd({items:e,selectedItems:t,onSelectedItemsChange:n,onItemMouseOver:r,onItemMouseOut:a,height:s,width:l,columns:u=[],sorting:c,onSortingChange:d}){const h=(0,i.useMemo)((()=>"string"!=typeof t?t:e.reduce(((e,t,n)=>(e[ld(t,n)]=!0,e)),{})),[t,e]),p=(0,i.useMemo)((()=>[...sd,...u]),[u]);return(0,o.jsx)(ad,{height:s,width:l,rowSelection:h,onRowSelectionChange:n,onRowMouseOver:r,onRowMouseOut:a,sorting:c,onSortingChange:d,data:e,columns:p,density:"compact",defaultColumnWidth:"auto",getRowId:ld,getCheckboxColor:ud,checkboxSelection:!0,rowSelectionVariant:"legend"})}const dd=500;function hd({width:e,height:t,options:n,data:r,selectedItems:i,onSelectedItemsChange:a,onItemMouseOver:s,onItemMouseOut:l,tableProps:u}){const c=(e,t)=>{const n=e.metaKey||e.shiftKey,r=(0,si.Uy)(i,(e=>{if("ALL"===e)return{[t]:!0};const r=!!e[t];return n?(r?delete e[t]:e[t]=!0,e):r?"ALL":{[t]:!0}}));a(r)},d=(0,ai.bk)(n.mode),h=r.length>=dd,p={height:t,items:r,selectedItems:i,onLegendItemClick:c,onItemMouseOver:s,onItemMouseOut:l};let f;return f="table"===d?(0,o.jsx)(cd,{...p,onSelectedItemsChange:a,width:e,...u}):"right"===n.position||h?(0,o.jsx)(vu,{...p,width:e,onLegendItemClick:c}):(0,o.jsx)(yu,{...p,onLegendItemClick:c}),"right"===n.position?(0,o.jsx)(ii.Z,{style:{width:e,height:t},sx:{position:"absolute",top:0,right:0,backgroundColor:e=>`${e.palette.background.default}`},children:f}):(0,o.jsx)(ii.Z,{style:{width:e,height:t},sx:{position:"absolute",bottom:0,backgroundColor:e=>`${e.palette.background.default}`},children:f})}const pd={medium:{bottom:6,right:250},small:{bottom:4,right:150}},fd=300,md=40,gd=100;function vd({children:e,legendProps:t,width:n,height:r,spacing:i=0,legendSize:a,minChildrenWidth:s=100,minChildrenHeight:l=100}){const u=(0,oi.Z)(),{content:c,legend:d,margin:h}=function({width:e,height:t,legendProps:n,legendSize:r,minChildrenHeight:o,minChildrenWidth:i,spacing:a,theme:s}){const l=n?.options,u={legend:{show:!1,width:0,height:0},content:{width:e,height:t},margin:{right:0,bottom:0}};if(!l)return u;const{position:c}=l;let d,h;if("list"===(0,ai.bk)(l.mode))d="right"===c?200:e,h=md,"right"===c?h=t:t>=fd&&(h=gd);else{const o=Fc(s,"compact"),i=(n?.tableProps?.columns||[]).reduce(((e,t)=>("number"==typeof t.width&&(e+=t.width),e)),0);d="right"===c?pd[r].right+i:e;const a=Math.min(pd[r].bottom,n.data.length+1);h="bottom"===c?a*o.height:t}const p="right"===c?e-d-a:e,f="bottom"===c?t-h-a:t;return"right"===c&&p{n?.(e)}),[n]),c=(0,i.useMemo)((()=>bd()(u,e)),[e,u]);return(0,o.jsx)(T.Z,{ref:a,value:s,onChange:function(e){l(e.target.value),c(e.target.value)},...r})}));xd.displayName="TextField";var wd=n(51602),Sd=n(19978),kd=n(56873),Cd=n(70616),_d=n(10763);const Md=(0,d.ZP)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),Td=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),Pd=({children:e,...t})=>(0,o.jsx)(kd.Z,{...t,children:e});Pd.Header=({children:e,onClose:t,...n})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(wd.Z,{style:{textOverflow:"ellipsis",overflow:"hidden"},...n,children:e}),t&&(0,o.jsx)(M.Z,{"aria-label":"Close",onClick:t,sx:Td,children:(0,o.jsx)(_d.default,{})})]}),Pd.Form=Md,Pd.Content=({children:e,sx:t,...n})=>(0,o.jsx)(Sd.Z,{dividers:!0,...n,sx:Un({minWidth:"500px",textWrap:"balance"},t),children:e}),Pd.PrimaryButton=({children:e,...t})=>(0,o.jsx)(k.Z,{variant:"contained",type:"submit",...t,children:e}),Pd.SecondaryButton=({children:e,...t})=>(0,o.jsx)(k.Z,{variant:"outlined",color:"secondary",...t,children:e}),Pd.Actions=Cd.Z;const Dd=e=>{const{description:t,isOpen:n,onCancel:r,onDiscardChanges:i}=e;return(0,o.jsxs)(Pd,{open:n,"aria-labelledby":"discard-dialog",children:[(0,o.jsx)(Pd.Header,{children:"Discard Changes"}),(0,o.jsx)(Pd.Content,{children:t}),(0,o.jsxs)(Pd.Actions,{children:[(0,o.jsx)(k.Z,{variant:"contained",onClick:i,children:"Discard Changes"}),(0,o.jsx)(k.Z,{variant:"outlined",color:"secondary",onClick:r,children:"Cancel"})]})]})};var Ad=n(38359);const Od=({children:e})=>(0,o.jsx)(Ad.ZP,{item:!0,xs:4,children:(0,o.jsx)(_.Z,{spacing:3,children:e})});var Id=n(90192),Rd=n(23626),Ed=n(39398),Ld=n(32964),Zd=n(87143);const Nd=({id:e,title:t,description:n,placement:r,children:i,enterDelay:a,enterNextDelay:s})=>{const l=(0,o.jsx)("span",{children:i});return(0,o.jsx)(Fd,{arrow:!0,id:e,placement:r??"top",title:(0,o.jsx)(jd,{title:t,description:n}),enterDelay:a??500,enterNextDelay:s??500,children:l})},jd=({title:e,description:t})=>(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(Mc.Z,{variant:"body2",sx:e=>({color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}),children:e}),(0,o.jsx)(Mc.Z,{variant:"caption",sx:e=>({color:e.palette.text.primary,whiteSpace:"pre-line"}),children:t})]}),Fd=(0,d.ZP)((({className:e,...t})=>(0,o.jsx)(Ld.Z,{...t,classes:{popper:e}})))((({theme:e})=>({[`& .${Zd.Z.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${Zd.Z.arrow}`]:{color:e.palette.background.tooltip}}))),zd=({label:e,control:t,description:n})=>{const r=qn("EditorSectionControl"),a=`${r}-control`,s=`${r}-label`,l={id:a,"aria-labelledby":s};return(0,o.jsx)(Id.Z,{children:(0,o.jsxs)(_.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,o.jsxs)(_.Z,{direction:"row",alignItems:"center",justifyContent:"center",children:[(0,o.jsx)(Rd.Z,{id:s,htmlFor:a,children:e}),n&&(0,o.jsx)(Nd,{description:n,enterDelay:100,children:(0,o.jsx)(M.Z,{size:"small",sx:e=>({borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}),children:(0,o.jsx)(Ed.default,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:e=>e.palette.grey[700]}})})})]}),(0,o.jsxs)(ii.Z,{sx:{width:"180px",textAlign:"right"},children:[" ",i.cloneElement(t,l)]})]})})},Bd=({children:e})=>(0,o.jsx)(Ad.ZP,{container:!0,spacing:8,children:e}),Vd=({title:e,children:t,icon:n})=>(0,o.jsxs)(ii.Z,{children:[(0,o.jsxs)(ii.Z,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:e=>e.spacing(1),children:[(0,o.jsx)(Mc.Z,{variant:"overline",component:"h4",children:e}),n&&(0,o.jsx)(ii.Z,{sx:{marginLeft:"auto"},children:n})]}),(0,o.jsx)(_.Z,{spacing:1,children:t})]});var $d=n(11774),Hd=n(70678);function Wd({options:e,renderInput:t=e=>(0,o.jsx)(T.Z,{...e}),id:n,"aria-labelledby":r,...i}){const a=e=>e.label??e.id;return(0,o.jsx)($d.Z,{isOptionEqualToValue:(e,t)=>e.id===t.id,getOptionDisabled:e=>!!e.disabled,getOptionLabel:a,options:e,renderInput:e=>{const o={...e,inputProps:{...e.inputProps,id:n,"aria-labelledby":r}};return t(o)},renderOption:({key:e,...t},n)=>(0,o.jsx)("li",{...t,children:(0,o.jsxs)("div",{children:[(0,o.jsx)(Mc.Z,{variant:"body1",component:"div",children:a(n)}),n.description&&(0,o.jsx)(Mc.Z,{variant:"body2",component:"div",sx:{color:e=>e.palette.text.secondary},children:n.description})]})},e),filterOptions:(0,Hd.D)({stringify:e=>`${a(e)} ${e.description||""}`}),...i})}const Ud=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function qd({onChange:e,value:t="standard"}){return(0,o.jsx)(zd,{label:"Density",control:(0,o.jsx)(Wd,{value:Ud.find((e=>e.id===t)),options:Ud,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function Gd(){return(0,o.jsxs)(_.Z,{direction:"row",alignItems:"center",children:[(0,o.jsx)(ii.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,o.jsx)(ii.Z,{sx:{content:'""',height:2,background:e=>e.palette.info.main,width:"100%"}})]})}function Kd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0||(t.unmount(),Mh.delete(e.typeKey))}}function Ph(){for(var e=arguments.length,t=new Array(e),n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Rh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=i.length)return s;for(var l=Eh(i),u=Eh(s),c=[],d=0;d=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,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,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Nh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}({client:t,clientRect:r}))n.remove();else var i=(0,eh.bindAll)(window,[{type:"pointerdown",listener:a},{type:"pointermove",listener:a},{type:"focusin",listener:a},{type:"focusout",listener:a},{type:"dragstart",listener:a},{type:"dragenter",listener:a},{type:"dragover",listener:a}],{capture:!0});function a(){i(),n.remove()}}}({initial:i})}if("onDrop"===n){var a,s=r.location.current.input;null===(a=e)||void 0===a||a({current:{x:s.clientX,y:s.clientY}}),e=null,$h=null}}}}),Wh=function(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,o=e.onPostDispatch,i=e.defaultDropEffect,a=Fh(),s=Lh({typeKey:t,defaultDropEffect:i});function l(e){null==r||r(e),s.dispatchEvent(e),a.dispatchEvent(e),null==o||o(e)}function u(e){var t=e.event,n=e.dragType;_h.start({event:t,dragType:n,getDropTargetsOver:s.getIsOver,dispatchEvent:l})}return{registerUsage:function(){return Th({typeKey:t,mount:function(){var e={canStart:_h.canStart,start:u};return n(e)}})},dropTarget:s.dropTargetForConsumers,monitor:a.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return Ph(Hh.bindEvents(),(0,eh.bind)(document,{type:"dragstart",listener:function(t){var n,r,o,i,a,s;if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var l=t.target;if(l instanceof HTMLElement){var u=Vh.get(l);if(u){var c=gh(t),d={element:u.element,dragHandle:null!==(n=u.dragHandle)&&void 0!==n?n:null,input:c};if(!u.canDrag||u.canDrag(d)){if(u.dragHandle){var h=rh({x:c.clientX,y:c.clientY});if(!u.dragHandle.contains(h))return void t.preventDefault()}var p=null!==(r=null===(o=u.getInitialDataForExternal)||void 0===o?void 0:o.call(u,d))&&void 0!==r?r:null;if(p)for(var f=0,m=Object.entries(p);fqh({onDrop({location:o,source:i}){const a=o.current.dropTargets[0];if(!a)return;const s=i.data,l=a.data,u=e.findIndex((e=>e[t]===s[t])),c=e.findIndex((e=>e[t]===l[t]));if(c<0||u<0)return;const d=Jh(l);r(Jd({list:e,startIndex:u,indexOfTarget:c,closestEdgeOfTarget:d,axis:n}))}})),[t,n,e,r])}function np({children:e,data:t}){const n=(0,i.useRef)(null),[r,a]=(0,i.useState)(ep);return(0,i.useEffect)((()=>{const e=n.current;if(e)return Ph(Gh({element:e,getInitialData:()=>t,onDragStart(){a({type:"is-dragging"})},onDrop(){a(ep)}}),Uh({element:e,canDrop:({source:t})=>t.element!==e,getData:({input:n})=>function(e,t){var n,r,o=t.element,i=t.input,a=t.allowedEdges,s={x:i.clientX,y:i.clientY},l=o.getBoundingClientRect(),u=null!==(n=null===(r=a.map((function(e){return{edge:e,value:Xh[e](l,s)}})).sort((function(e,t){return e.value-t.value}))[0])||void 0===r?void 0:r.edge)&&void 0!==n?n:null;return Yh(Yh({},e),{},ih({},Qh,u))}(t,{element:e,input:n,allowedEdges:["top","bottom"]}),getIsSticky:()=>!0,onDragEnter({self:e}){const t=Jh(e.data);a({type:"is-dragging-over",closestEdge:t})},onDrag({self:e}){const t=Jh(e.data);a((e=>"is-dragging-over"===e.type&&e.closestEdge===t?e:{type:"is-dragging-over",closestEdge:t}))},onDragLeave(){a(ep)},onDrop(){a(ep)}}))}),[t]),(0,o.jsxs)(_.Z,{ref:n,spacing:1,style:{opacity:"is-dragging"===r.type?.5:"unset"},children:["is-dragging-over"===r.type&&"top"===r.closestEdge?(0,o.jsx)(Gd,{}):null,e,"is-dragging-over"===r.type&&"bottom"===r.closestEdge?(0,o.jsx)(Gd,{}):null]})}var rp=n(5549),op=n(30743),ip=n(11682);function ap(e,t){const n=t.indexOf(e);if(0===n)return t;const r=[...t];return r.splice(n,1),r.splice(n-1,0,e),r}function sp(e,t){const n=t.indexOf(e);if(n===t.length-1)return t;const r=[...t];return r.splice(n,1),r.splice(n+1,0,e),r}const lp=(0,i.forwardRef)((function({onMoveUp:e,onMoveDown:t,onMoveLeft:n,onMoveRight:r,menuSx:a,...s},l){const[u,c]=(0,i.useState)(null),d=Boolean(u);function h(e){c(null),e?.()}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(M.Z,{...s,ref:l,"aria-label":"move","aria-haspopup":!0,"aria-expanded":d,size:"small",onClick:function(e){c(e.currentTarget)},children:(0,o.jsx)(ip.default,{})}),(e||t||n||r)&&(0,o.jsxs)(rp.Z,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:u,open:d,onClose:()=>h(void 0),sx:a,children:[e&&(0,o.jsx)(op.Z,{onClick:()=>h(e),children:"Move Up"}),t&&(0,o.jsx)(op.Z,{onClick:()=>h(t),children:"Move Down"}),n&&(0,o.jsx)(op.Z,{onClick:()=>h(n),children:"Move Left"}),r&&(0,o.jsx)(op.Z,{onClick:()=>h(r),children:"Move Right"}),r&&(0,o.jsx)(op.Z,{onClick:()=>h(r),children:"Move Right"})]})]})}));var up=n(76439),cp=n(6595),dp=n(80058),hp=n(41825),pp=n(94680),fp=n(77999),mp=n(42777),gp=n(24255);function vp(e,t,n){var r;const o=function(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=(0,gp.Z)(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const e=i.getComputedStyle(t);a=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let s=0,l=0;if(a&&"none"!==a&&"string"==typeof a){const e=a.split("(")[1].split(")")[0].split(",");s=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:"right"===e?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:"up"===e?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}(e,t,"function"==typeof(r=n)?r():r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const yp=i.forwardRef((function(e,t){const n=(0,oi.Z)(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},a={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:s,appear:l=!0,children:u,container:c,direction:d="down",easing:h=r,in:p,onEnter:f,onEntered:m,onEntering:g,onExit:v,onExited:y,onExiting:b,style:x,timeout:w=a,TransitionComponent:S=hp.ZP,...k}=e,C=i.useRef(null),_=(0,su.Z)((0,pp.Z)(u),C,t),M=e=>t=>{e&&(void 0===t?e(C.current):e(C.current,t))},T=M(((e,t)=>{vp(d,e,c),(0,mp.n)(e),f&&f(e,t)})),P=M(((e,t)=>{const r=(0,mp.C)({timeout:w,style:x,easing:h},{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",g&&g(e,t)})),D=M(m),A=M(b),O=M((e=>{const t=(0,mp.C)({timeout:w,style:x,easing:h},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),vp(d,e,c),v&&v(e)})),I=M((e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)})),R=i.useCallback((()=>{C.current&&vp(d,C.current,c)}),[d,c]);return i.useEffect((()=>{if(p||"down"===d||"right"===d)return;const e=(0,fp.Z)((()=>{C.current&&vp(d,C.current,c)})),t=(0,gp.Z)(C.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[d,p,c]),i.useEffect((()=>{p||R()}),[p,R]),(0,o.jsx)(S,{nodeRef:C,onEnter:T,onEntered:D,onEntering:P,onExit:O,onExited:I,onExiting:A,addEndListener:e=>{s&&s(C.current,e)},appear:l,in:p,timeout:w,...k,children:(e,{ownerState:t,...n})=>i.cloneElement(u,{ref:_,style:{visibility:"exited"!==e||p?void 0:"hidden",...x,...u.props.style},...n})})}));var bp=n(28866);function xp(e){return(0,g.ZP)("MuiDrawer",e)}(0,m.Z)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);var wp=n(27834);const Sp=(e,t)=>{const{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},kp=(0,d.ZP)(dp.Z,{name:"MuiDrawer",slot:"Root",overridesResolver:Sp})((0,h.Z)((({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})))),Cp=(0,d.ZP)("div",{shouldForwardProp:ou.Z,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Sp})({flex:"0 0 auto"}),_p=(0,d.ZP)(bp.Z,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,c.Z)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,c.Z)(n.anchor)}`]]}})((0,h.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}`}}]})))),Mp={left:"right",right:"left",top:"down",bottom:"up"};const Tp=i.forwardRef((function(e,t){const n=(0,f.i)({props:e,name:"MuiDrawer"}),r=(0,oi.Z)(),l=(0,cp.V)(),u={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:d="left",BackdropProps:h,children:p,className:m,elevation:g=16,hideBackdrop:v=!1,ModalProps:{BackdropProps:y,...b}={},onClose:x,open:w=!1,PaperProps:S={},SlideProps:k,TransitionComponent:C,transitionDuration:_=u,variant:M="temporary",slots:T={},slotProps:P={},...D}=n,A=i.useRef(!1);i.useEffect((()=>{A.current=!0}),[]);const O=function({direction:e},t){return"rtl"===e&&function(e){return["left","right"].includes(e)}(t)?Mp[t]:t}({direction:l?"rtl":"ltr"},d),I=d,R={...n,anchor:I,elevation:g,open:w,variant:M,...D},E=(e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root",`anchor${(0,c.Z)(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,c.Z)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,c.Z)(n)}`]};return(0,s.Z)(o,xp,t)})(R),L={slots:{transition:C,...T},slotProps:{paper:S,transition:k,...P,backdrop:(0,wp.Z)(P.backdrop||{...h,...y},{transitionDuration:_})}},[Z,N]=(0,Oc.Z)("root",{ref:t,elementType:kp,className:(0,a.Z)(E.root,E.modal,m),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...L,...D,...b},additionalProps:{open:w,onClose:x,hideBackdrop:v,slots:{backdrop:L.slots.backdrop},slotProps:{backdrop:L.slotProps.backdrop}}}),[j,F]=(0,Oc.Z)("paper",{elementType:_p,shouldForwardComponentProp:!0,className:(0,a.Z)(E.paper,S.className),ownerState:R,externalForwardedProps:L,additionalProps:{elevation:"temporary"===M?g:0,square:!0}}),[z,B]=(0,Oc.Z)("docked",{elementType:Cp,ref:t,className:(0,a.Z)(E.root,E.docked,m),ownerState:R,externalForwardedProps:L,additionalProps:D}),[V,$]=(0,Oc.Z)("transition",{elementType:yp,ownerState:R,externalForwardedProps:L,additionalProps:{in:w,direction:Mp[O],timeout:_,appear:A.current}}),H=(0,o.jsx)(j,{...F,children:p});if("permanent"===M)return(0,o.jsx)(z,{...B,children:H});const W=(0,o.jsx)(V,{...$,children:H});return"persistent"===M?(0,o.jsx)(z,{...B,children:W}):(0,o.jsx)(Z,{...N,children:W})})),Pp=({anchor:e="right",isOpen:t,onClose:n,PaperProps:r,children:i,...a})=>{const s=(0,up.Z)("(max-width:1080px)");return(0,o.jsx)(Tp,{...a,open:t,onClose:n,anchor:e,PaperProps:{...r,sx:Un({width:s?"100%":"1080px",overflow:"hidden"},r?.sx)},"aria-hidden":!t,children:i})};var Dp=function(e,t){return Dp=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])},Dp(e,t)};function Ap(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Dp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;var Op=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Ip=new function(){this.browser=new Op,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?(Ip.wxa=!0,Ip.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Ip.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(Ip.node=!0,Ip.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);o&&(n.ie=!0,n.version=o[1]);i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Ip);const Rp=Ip;var Ep="12px sans-serif";var Lp,Zp,Np=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n=0)i=o*e.length;else for(var a=0;a>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,i),s=function(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,h=c.left,p=c.top;a.push(h,p),l=l&&i&&h===i[d]&&p===i[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?pm(s,a):pm(a,s))}(a,i,o);if(s)return s(e,n,r),!0}return!1}function vm(e){return"CANVAS"===e.nodeName.toUpperCase()}var ym=/([&<>"'])/g,bm={"&":"&","<":"<",">":">",'"':""","'":"'"};function xm(e){return null==e?"":(e+"").replace(ym,(function(e,t){return bm[t]}))}var wm=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Sm=[],km=Rp.browser.firefox&&+Rp.browser.version.split(".")[0]<39;function Cm(e,t,n,r){return n=n||{},r?_m(e,t,n):km&&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):_m(e,t,n),n}function _m(e,t,n){if(Rp.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(vm(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(gm(Sm,e,r,o))return n.zrX=Sm[0],void(n.zrY=Sm[1])}n.zrX=n.zrY=0}function Mm(e){return e||window.event}function Tm(e,t,n){if(null!=(t=Mm(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&Cm(e,o,t,n)}else{Cm(e,t,t,n);var i=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&wm.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Pm(e,t,n,r){e.addEventListener(t,n,r)}var Dm=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Am(e){return 2===e.which||3===e.which}var Om=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 o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i1&&o&&o.length>1){var a=Im(o)/Im(i);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function Em(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Lm(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Zm(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=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]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function Nm(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 jm(e,t,n,r){void 0===r&&(r=[0,0]);var o=t[0],i=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),d=Math.cos(n);return e[0]=o*d+s*c,e[1]=-o*c+s*d,e[2]=i*d+l*c,e[3]=-i*c+d*l,e[4]=d*(a-r[0])+c*(u-r[1])+r[0],e[5]=d*(u-r[1])-c*(a-r[0])+r[1],e}function Fm(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}const zm=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 o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}();var Bm=Math.min,Vm=Math.max,$m=new zm,Hm=new zm,Wm=new zm,Um=new zm,qm=new zm,Gm=new zm,Km=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=Bm(e.x,this.x),n=Bm(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Vm(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Vm(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=[1,0,0,1,0,0];return Nm(o,o,[-t.x,-t.y]),function(e,t,n){var r=n[0],o=n[1];e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o}(o,o,[n,r]),Nm(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,h=!(if&&(f=b,mf&&(f=x,v=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}$m.x=Wm.x=n.x,$m.y=Um.y=n.y,Hm.x=Um.x=n.x+n.width,Hm.y=Wm.y=n.y+n.height,$m.transform(r),Um.transform(r),Hm.transform(r),Wm.transform(r),t.x=Bm($m.x,Hm.x,Wm.x,Um.x),t.y=Bm($m.y,Hm.y,Wm.y,Um.y);var l=Vm($m.x,Hm.x,Wm.x,Um.x),u=Vm($m.y,Hm.y,Wm.y,Um.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}();const Ym=Km;var Xm="silent";function Qm(){Dm(this.event)}var Jm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return Wf(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(cm),eg=function(e,t){this.x=e,this.y=t},tg=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ng=new Ym(0,0,0,0),rg=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new eg(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new Jm,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new lm(a),a}return Wf(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(sf(tg,(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=ag(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new eg(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&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 eg(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=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Qm}}(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new eg(e,t);if(ig(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new Ym(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||(ng.copy(c.getBoundingRect()),c.transform&&ng.applyTransform(c.transform),ng.intersect(l)&&i.push(c))}if(i.length)for(var d=Math.PI/12,h=2*Math.PI,p=0;p=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=og(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==Xm)){t.target=a;break}}}function ag(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}sf(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){rg.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=ag(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).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||tm(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));const sg=rg;function lg(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o=0;)o++;return o-t}function ug(e,t,n,r,o){for(r===t&&r++;r>>1])<0?l=i:s=i+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 cg(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=a;a=o-l,l=o-u}for(a++;a>>1);i(e,t[n+c])>0?a=c+1:l=c}return l}function dg(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;ls&&(l=s);var u=a;a=o-l,l=o-u}else{for(s=r-o;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a>>1);i(e,t[n+c])<0?l=c:a=c+1}return l}function hg(e,t){var n,r,o=7,i=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var h=dg(e[c],e,l,u,0,t);l+=h,0!==(u-=h)&&0!==(d=cg(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,i,s){var l=0;for(l=0;l=7||p>=7);if(f)break;m<0&&(m=0),m+=2}if((o=m)<1&&(o=1),1===r){for(l=0;l=0;l--)e[p+l]=e[h+l];return void(e[d]=a[c])}var f=o;for(;;){var m=0,g=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],m++,g=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],g++,m=0,1==--s){v=!0;break}}while((m|g)=0;l--)e[p+l]=e[h+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1==--s){v=!0;break}if(0!==(g=s-cg(e[u],a,0,s,s-1,t))){for(s-=g,p=(d-=g)+1,h=(c-=g)+1,l=0;l=7||g>=7);if(v)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=1);if(1===s){for(p=(d-=r)+1,h=(u-=r)+1,l=r-1;l>=0;l--)e[p+l]=e[h+l];e[d]=a[c]}else{if(0===s)throw new Error;for(h=d-(s-1),l=0;l1;){var e=i-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])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]=32;)t|=1&e,e>>=1;return e+t}(o);do{if((i=lg(e,n,r,t))s&&(l=s),ug(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var fg=!1;function mg(){fg||(fg=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function gg(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}const vg=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=gg}return e.prototype.traverse=function(e,t){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(mg(),u.z=0),isNaN(u.z2)&&(mg(),u.z2=0),isNaN(u.zlevel)&&(mg(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var c=e.getDecalElement&&e.getDecalElement();c&&this._updateAndAddDisplayable(c,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var h=e.getTextContent();h&&this._updateAndAddDisplayable(h,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t=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}();const yg=Rp.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var bg={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-bg.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*bg.bounceIn(2*e):.5*bg.bounceOut(2*e-1)+.5}};const xg=bg;var wg=Math.pow,Sg=Math.sqrt,kg=1e-8,Cg=1e-4,_g=Sg(3),Mg=1/3,Tg=Uf(),Pg=Uf(),Dg=Uf();function Ag(e){return e>-1e-8&&ekg||e<-1e-8}function Ig(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function Rg(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function Eg(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,d=s*l-9*a*u,h=l*l-3*s*u,p=0;if(Ag(c)&&Ag(d)){if(Ag(s))i[0]=0;else(C=-l/s)>=0&&C<=1&&(i[p++]=C)}else{var f=d*d-4*c*h;if(Ag(f)){var m=d/c,g=-m/2;(C=-s/a+m)>=0&&C<=1&&(i[p++]=C),g>=0&&g<=1&&(i[p++]=g)}else if(f>0){var v=Sg(f),y=c*s+1.5*a*(-d+v),b=c*s+1.5*a*(-d-v);(C=(-s-((y=y<0?-wg(-y,Mg):wg(y,Mg))+(b=b<0?-wg(-b,Mg):wg(b,Mg))))/(3*a))>=0&&C<=1&&(i[p++]=C)}else{var x=(2*c*s-3*a*d)/(2*Sg(c*c*c)),w=Math.acos(x)/3,S=Sg(c),k=Math.cos(w),C=(-s-2*S*k)/(3*a),_=(g=(-s+S*(k+_g*Math.sin(w)))/(3*a),(-s+S*(k-_g*Math.sin(w)))/(3*a));C>=0&&C<=1&&(i[p++]=C),g>=0&&g<=1&&(i[p++]=g),_>=0&&_<=1&&(i[p++]=_)}}return p}function Lg(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Ag(a)){if(Og(i))(c=-s/i)>=0&&c<=1&&(o[l++]=c)}else{var u=i*i-4*a*s;if(Ag(u))o[0]=-i/(2*a);else if(u>0){var c,d=Sg(u),h=(-i-d)/(2*a);(c=(-i+d)/(2*a))>=0&&c<=1&&(o[l++]=c),h>=0&&h<=1&&(o[l++]=h)}}return l}function Zg(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,u=(s-a)*o+a,c=(l-s)*o+s,d=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=r}function Ng(e,t,n,r,o,i,a,s,l){for(var u=e,c=t,d=0,h=1/l,p=1;p<=l;p++){var f=p*h,m=Ig(e,n,o,a,f),g=Ig(t,r,i,s,f),v=m-u,y=g-c;d+=Math.sqrt(v*v+y*y),u=m,c=g}return d}function jg(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function Fg(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function zg(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function Bg(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function Vg(e,t,n,r,o,i,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var h=d*c,p=jg(e,n,o,h),f=jg(t,r,i,h),m=p-s,g=f-l;u+=Math.sqrt(m*m+g*g),s=p,l=f}return u}var $g=/cubic-bezier\(([0-9,\.e ]+)\)/;function Hg(e){var t=e&&$g.exec(e);if(t){var n=t[1].split(","),r=+Of(n[0]),o=+Of(n[1]),i=+Of(n[2]),a=+Of(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Eg(0,r,i,1,e,s)&&Ig(0,o,a,1,s[0])}}}const Wg=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||Vf,this.ondestroy=e.ondestroy||Vf,this.onrestart=e.onrestart||Vf,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=mf(e)?e:xg[e]||Hg(e)},e}();var Ug=function(e){this.value=e},qg=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Ug(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}();const Gg=function(){function e(e){this._list=new qg,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Ug(t),a.key=e,n.insertEntry(a),r[e]=a}return o},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}();var Kg={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Yg(e){return(e=Math.round(e))<0?0:e>255?255:e}function Xg(e){return e<0?0:e>1?1:e}function Qg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Yg(parseFloat(t)/100*255):Yg(parseInt(t,10))}function Jg(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?Xg(parseFloat(t)/100):Xg(parseFloat(t))}function ev(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 tv(e,t,n){return e+(t-e)*n}function nv(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function rv(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var ov=new Gg(20),iv=null;function av(e,t){iv&&rv(iv,t),iv=ov.put(e,iv||t.slice())}function sv(e,t){if(e){t=t||[];var n=ov.get(e);if(n)return rv(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Kg)return rv(t,Kg[r]),av(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(nv(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),av(e,t),t):void nv(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(nv(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),av(e,t),t):void nv(t,0,0,0,1):void 0;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?nv(t,+u[0],+u[1],+u[2],1):nv(t,0,0,0,1);c=Jg(u.pop());case"rgb":return u.length>=3?(nv(t,Qg(u[0]),Qg(u[1]),Qg(u[2]),3===u.length?c:Jg(u[3])),av(e,t),t):void nv(t,0,0,0,1);case"hsla":return 4!==u.length?void nv(t,0,0,0,1):(u[3]=Jg(u[3]),lv(u,t),av(e,t),t);case"hsl":return 3!==u.length?void nv(t,0,0,0,1):(lv(u,t),av(e,t),t);default:return}}nv(t,0,0,0,1)}}function lv(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Jg(e[1]),o=Jg(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return nv(t=t||[],Yg(255*ev(a,i,n+1/3)),Yg(255*ev(a,i,n)),Yg(255*ev(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function uv(e,t){var n=sv(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return fv(n,4===n.length?"rgba":"rgb")}}function cv(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=Yg(tv(a[0],s[0],l)),n[1]=Yg(tv(a[1],s[1],l)),n[2]=Yg(tv(a[2],s[2],l)),n[3]=Xg(tv(a[3],s[3],l)),n}}function dv(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=sv(t[o]),s=sv(t[i]),l=r-o,u=fv([Yg(tv(a[0],s[0],l)),Yg(tv(a[1],s[1],l)),Yg(tv(a[2],s[2],l)),Xg(tv(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:o,rightIndex:i,value:r}:u}}function hv(e,t,n,r){var o,i=sv(e);if(e)return i=function(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),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,d=((s-o)/6+l/2)/l,h=((s-i)/6+l/2)/l;r===s?t=h-d:o===s?t=1/3+c-h:i===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(i),null!=t&&(i[0]=(o=t,(o=Math.round(o))<0?0:o>360?360:o)),null!=n&&(i[1]=Jg(n)),null!=r&&(i[2]=Jg(r)),fv(lv(i),"rgba")}function pv(e,t){var n=sv(e);if(n&&null!=t)return n[3]=Xg(t),fv(n,"rgba")}function fv(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 mv(e,t){var n=sv(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var gv=new Gg(100);function vv(e){if(gf(e)){var t=gv.get(e);return t||(t=uv(e,-.1),gv.put(e,t)),t}if(kf(e)){var n=tf({},e);return n.colorStops=lf(e.colorStops,(function(e){return{offset:e.offset,color:uv(e.color,-.1)}})),n}return e}Rp.hasGlobalWindow&&mf(window.btoa);var yv=Array.prototype.slice;function bv(e,t,n){return(t-e)*n+e}function xv(e,t,n,r){for(var o=t.length,i=0;ir?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;sa)r.length=a;else for(var s=i;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,o=r.length,i=!1,a=6,s=t;if(af(t)){var l=function(e){return af(e&&e[0])?2:1}(t);a=l,(1===l&&!yf(t[0])||2===l&&!yf(t[0][0]))&&(i=!0)}else if(yf(t)&&!Cf(t))a=0;else if(gf(t))if(isNaN(+t)){var u=sv(t);u&&(s=u,a=3)}else a=0;else if(kf(t)){var c=tf({},s);c.colorStops=lf(t.colorStops,(function(e){return{offset:e.offset,color:sv(e.color)}})),"linear"===t.type?a=4:function(e){return"radial"===e.type}(t)&&(a=5),s=c}0===o?this.valType=a:a===this.valType&&6!==a||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=mf(n)?n:xg[n]||Hg(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=Pv(r),l=Tv(r),u=0;u=0&&!(l[n].percent<=t);n--);n=p(n,u-2)}else{for(n=h;nt);n++);n=p(n-1,u-2)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,m=0===f?1:p((t-r.percent)/f,1);o.easingFunc&&(m=o.easingFunc(m));var g=i?this._additiveValue:d?Dv:e[c];if(!Pv(s)&&!d||g||(g=this._additiveValue=[]),this.discrete)e[c]=m<1?r.rawValue:o.rawValue;else if(Pv(s))1===s?xv(g,r[a],o[a],m):function(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a0&&s.addKeyframe(0,_v(l),r),this._trackKeys.push(a)}s.addKeyframe(e,_v(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;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}();const Iv=Ov;function Rv(){return(new Date).getTime()}var Ev=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 Wf(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=Rv()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,yg((function t(){e._running&&(yg(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=Rv(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Rv(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Rv()-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 Iv(e,t.loop);return this.addAnimator(n),n},t}(cm);const Lv=Ev;var Zv,Nv,jv=Rp.domSupported,Fv=(Nv={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Zv=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:lf(Zv,(function(e){var t=e.replace("mouse","pointer");return Nv.hasOwnProperty(t)?t:e}))}),zv=["mousemove","mouseup"],Bv=["pointermove","pointerup"],Vv=!1;function $v(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Hv(e){e&&(e.zrByTouch=!0)}function Wv(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 Uv=function(e,t){this.stopPropagation=Vf,this.stopImmediatePropagation=Vf,this.preventDefault=Vf,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},qv={mousedown:function(e){e=Tm(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Tm(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=Tm(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Wv(this,(e=Tm(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){Vv=!0,e=Tm(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){Vv||(e=Tm(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Hv(e=Tm(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),qv.mousemove.call(this,e),qv.mousedown.call(this,e)},touchmove:function(e){Hv(e=Tm(this.dom,e)),this.handler.processGesture(e,"change"),qv.mousemove.call(this,e)},touchend:function(e){Hv(e=Tm(this.dom,e)),this.handler.processGesture(e,"end"),qv.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&qv.click.call(this,e)},pointerdown:function(e){qv.mousedown.call(this,e)},pointermove:function(e){$v(e)||qv.mousemove.call(this,e)},pointerup:function(e){qv.mouseup.call(this,e)},pointerout:function(e){$v(e)||qv.mouseout.call(this,e)}};sf(["click","dblclick","contextmenu"],(function(e){qv[e]=function(t){t=Tm(this.dom,t),this.trigger(e,t)}}));var Gv={pointermove:function(e){$v(e)||Gv.mousemove.call(this,e)},pointerup:function(e){Gv.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 Kv(e,t){var n=t.domHandlers;Rp.pointerEventsSupported?sf(Fv.pointer,(function(r){Xv(t,r,(function(t){n[r].call(e,t)}))})):(Rp.touchEventsSupported&&sf(Fv.touch,(function(r){Xv(t,r,(function(o){n[r].call(e,o),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),sf(Fv.mouse,(function(r){Xv(t,r,(function(o){o=Mm(o),t.touching||n[r].call(e,o)}))})))}function Yv(e,t){function n(n){Xv(t,n,(function(r){r=Mm(r),Wv(e,r.target)||(r=function(e,t){return Tm(e.dom,new Uv(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}Rp.pointerEventsSupported?sf(Bv,n):Rp.touchEventsSupported||sf(zv,n)}function Xv(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Pm(e.domTarget,t,n,r)}function Qv(e){var t,n,r,o,i=e.mounted;for(var a in i)i.hasOwnProperty(a)&&(t=e.domTarget,n=a,r=i[a],o=e.listenerOpts[a],t.removeEventListener(n,r,o));e.mounted={}}var Jv=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t};const ey=function(e){function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new Jv(t,qv),jv&&(r._globalHandlerScope=new Jv(document,Gv)),Kv(r,r._localHandlerScope),r}return Wf(t,e),t.prototype.dispose=function(){Qv(this._localHandlerScope),jv&&Qv(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,jv&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?Yv(this,t):Qv(t)}},t}(cm);var ty=1;Rp.hasGlobalWindow&&(ty=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ny=ty,ry="#333",oy="#ccc",iy=Em,ay=5e-5;function sy(e){return e>ay||e<-5e-5}var ly=[],uy=[],cy=[1,0,0,1,0,0],dy=Math.abs,hy=function(){function e(){}var t;return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return sy(this.rotation)||sy(this.x)||sy(this.y)||sy(this.scaleX-1)||sy(this.scaleY-1)||sy(this.skewX)||sy(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):iy(n),e&&(t?Zm(n,e,n):Lm(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(iy(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(ly);var n=ly[0]<0?-1:1,r=ly[1]<0?-1:1,o=((ly[0]-n)*t+n)/ly[0]||0,i=((ly[1]-r)*t+r)/ly[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||[1,0,0,1,0,0],Fm(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,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}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||[1,0,0,1,0,0],Zm(uy,e.invTransform,t),t=uy);var n=this.originX,r=this.originY;(n||r)&&(cy[4]=n,cy[5]=r,Zm(uy,t,cy),uy[4]-=n,uy[5]-=r,t=uy),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&om(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&om(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&dy(e[0]-1)>1e-10&&dy(e[3]-1)>1e-10?Math.sqrt(dy(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){!function(e,t){for(var n=0;n=0?parseFloat(e)/100*t:parseFloat(e):e}function ky(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=Sy(r[0],n.width),u+=Sy(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=o,u+=s,c="right",d="middle";break;case"right":l+=o+a,u+=s,d="middle";break;case"top":l+=a/2,u-=o,c="center",d="bottom";break;case"bottom":l+=a/2,u+=i+o,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=o,u+=s,d="middle";break;case"insideRight":l+=a-o,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=o,c="center";break;case"insideBottom":l+=a/2,u+=i-o,c="center",d="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,c="right";break;case"insideBottomLeft":l+=o,u+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,u+=i-o,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var Cy="__zr_normal__",_y=py.concat(["ignore"]),My=uf(py,(function(e,t){return e[t]=!0,e}),{ignore:!1}),Ty={},Py=new Ym(0,0,0,0),Dy=function(){function e(e){this.id=Xp(),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,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var u=Py;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ty,n,u):ky(Ty,n,u),o.x=Ty.x,o.y=Ty.y,i=Ty.align,a=Ty.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,h=void 0;"center"===c?(d=.5*u.width,h=.5*u.height):(d=Sy(c[0],u.width),h=Sy(c[1],u.height)),l=!0,o.originX=-o.x+d+(r?0:u.x),o.originY=-o.y+h+(r?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var p=n.offset;p&&(o.x+=p[0],o.y+=p[1],l||(o.originX=-p[0],o.originY=-p[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(g=n.insideFill,v=n.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(g),y=!0)):(g=n.outsideFill,v=n.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(g),y=!0)),(g=g||"#000")===m.fill&&v===m.stroke&&y===m.autoStroke&&i===m.align&&a===m.verticalAlign||(s=!0,m.fill=g,m.stroke=v,m.autoStroke=y,m.align=i,m.verticalAlign=a,t.setDefaultTextStyle(m)),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()?oy:ry},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&sv(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,fv(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||{},tf(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(bf(e))for(var n=df(e),r=0;r0},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(Cy,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===Cy;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(rf(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),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),s}Qp("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s0,p);var f=this._textContent,m=this._textGuide;f&&f.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},e.prototype._updateAnimationTargets=function(){for(var e=0;e=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(),o=rf(r,e),i=rf(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&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=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,o=[],i=0;i0&&n.during&&i[0].during((function(e,t){n.during(t)}));for(var h=0;h0||o.force&&!a.length){var S,k=void 0,C=void 0,_=void 0;if(s){C={},h&&(k={});for(x=0;x=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=rf(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 o=this.__zr;o&&r.removeSelfFromZr(o),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=rf(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;n0&&(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;t0){if(e<=o)return a;if(e>=i)return s}else{if(e>=o)return a;if(e<=i)return s}else{if(e===o)return a;if(e===i)return s}return(e-o)/l*u+a}function $y(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 gf(e)?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n}function Hy(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Wy(e){return e.sort((function(e,t){return e-t})),e}function Uy(e){if(e=+e,isNaN(e))return 0;if(e>1e-14)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return function(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,o=n>0?n:t.length,i=t.indexOf("."),a=i<0?0:o-1-i;return Math.max(0,a-r)}(e)}function qy(e,t){var n=Math.log,r=Math.LN10,o=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),a=Math.min(Math.max(-o+i,0),20);return isFinite(a)?a:20}function Gy(e,t){var n=uf(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return[];for(var r=Math.pow(10,t),o=lf(e,(function(e){return(isNaN(e)?0:e)/n*r*100})),i=100*r,a=lf(o,(function(e){return Math.floor(e)})),s=uf(a,(function(e,t){return e+t}),0),l=lf(o,(function(e,t){return e-a[t]}));su&&(u=l[d],c=d);++a[c],l[c]=0,++s}return lf(a,(function(e){return e/r}))}function Ky(e,t){var n=Math.max(Uy(e),Uy(t)),r=e+t;return n>20?r:Hy(r,n)}function Yy(e){var t=2*Math.PI;return(e%t+t)%t}function Xy(e){return e>-1e-4&&e=10&&t++,t}function tb(e,t){var n=eb(e),r=Math.pow(10,n),o=e/r;return e=(t?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function nb(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,r=0;r=0||o&&rf(o,s)<0)){var l=n.getShallow(s,t);null!=l&&(i[e[a][0]]=l)}}return i}}var Bb=zb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Vb=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Bb(this,e,t)},e}(),$b=new Gg(50);function Hb(e){if("string"==typeof e){var t=$b.get(e);return t&&t.image}return e}function Wb(e,t,n,r,o){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var i=$b.get(e),a={hostEl:n,cb:r,cbPayload:o};return i?!qb(t=i.image)&&i.pending.push(a):((t=jp.loadImage(e,Ub,Ub)).__zrImageSrc=e,$b.put(e,t.__cachedImgObj={image:t,pending:[a]})),t}return e}return t}function Ub(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=a;l++)s-=a;var u=gy(n,t);return u>s&&(n="",u=0),s=e-u,o.ellipsis=n,o.ellipsisWidth=u,o.contentWidth=s,o.containerWidth=e,o}function Xb(e,t){var n=t.containerWidth,r=t.font,o=t.contentWidth;if(!n)return"";var i=gy(e,r);if(i<=n)return e;for(var a=0;;a++){if(i<=o||a>=t.maxIterations){e+=t.ellipsis;break}var s=0===a?Qb(e,o,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*o/i):0;i=gy(e=e.substr(0,s),r)}return""===e&&(e=t.placeholder),e}function Qb(e,t,n,r){for(var o=0,i=0,a=e.length;i0&&f+r.accumWidth>r.width&&(i=t.split("\n"),d=!0),r.accumWidth=f}else{var m=ix(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=m.accumWidth+p,a=m.linesWidths,i=m.lines}}else i=t.split("\n");for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}(e)||!!rx[e]}function ix(e,t,n,r,o){for(var i=[],a=[],s="",l="",u=0,c=0,d=0;dn:o+c+p>n)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),i.push(s),a.push(c-u),l+=h,s="",c=u+=p):(l&&(s+=l,l="",u=0),i.push(s),a.push(c),s=h,c=p)):f?(i.push(l),a.push(u),l=h,u=p):(i.push(h),a.push(p)):(c+=p,f?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h))}else l&&(s+=l,c+=u),i.push(s),a.push(c),s="",l="",u=0,c=0}return i.length||s||(s=e,l="",u=0),l&&(s+=l),s&&(i.push(s),a.push(c)),1===i.length&&(c+=o),{accumWidth:c,lines:i,linesWidths:a}}var ax="__zr_style_"+Math.round(10*Math.random()),sx={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},lx={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};sx[ax]=!0;var ux=["z","z2","invisible"],cx=["invisible"],dx=function(e){function t(t){return e.call(this,t)||this}var n;return Wf(t,e),t.prototype._init=function(t){for(var n=df(t),r=0;r1e-4)return s[0]=e-n,s[1]=t-r,l[0]=e+n,void(l[1]=t+r);if(xx[0]=yx(o)*n+e,xx[1]=vx(o)*r+t,Sx[0]=yx(i)*n+e,Sx[1]=vx(i)*r+t,u(s,xx,Sx),c(l,xx,Sx),(o%=bx)<0&&(o+=bx),(i%=bx)<0&&(i+=bx),o>i&&!a?i+=bx:oo&&(kx[0]=yx(p)*n+e,kx[1]=vx(p)*r+t,u(s,kx,s),c(l,kx,l))}var Ax={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ox=[],Ix=[],Rx=[],Ex=[],Lx=[],Zx=[],Nx=Math.min,jx=Math.max,Fx=Math.cos,zx=Math.sin,Bx=Math.abs,Vx=Math.PI,$x=2*Vx,Hx="undefined"!=typeof Float32Array,Wx=[];function Ux(e){return Math.round(e/Vx*1e8)/1e8%2*Vx}function qx(e,t){var n=Ux(e[0]);n<0&&(n+=$x);var r=n-e[0],o=e[1];o+=r,!t&&o-n>=$x?o=n+$x:t&&n-o>=$x?o=n-$x:!t&&n>o?o=n+($x-Ux(n-o)):t&&n0&&(this._ux=Bx(n/ny/e)||0,this._uy=Bx(n/ny/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ax.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Bx(e-this._xi),r=Bx(t-this._yi),o=n>this._ux||r>this._uy;if(this.addData(Ax.L,e,t),this._ctx&&o&&this._ctx.lineTo(e,t),o)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var i=n*n+r*r;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,o,i){return this._drawPendingPt(),this.addData(Ax.C,e,t,n,r,o,i),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,o,i),this._xi=o,this._yi=i,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Ax.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,o,i){this._drawPendingPt(),Wx[0]=r,Wx[1]=o,qx(Wx,i),r=Wx[0];var a=(o=Wx[1])-r;return this.addData(Ax.A,e,t,n,n,r,a,0,i?0:1),this._ctx&&this._ctx.arc(e,t,n,r,o,i),this._xi=Fx(o)*n+e,this._yi=zx(o)*n+t,this},e.prototype.arcTo=function(e,t,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,o),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Ax.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ax.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!Hx||(this.data=new Float32Array(t));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Rx[0]=Rx[1]=Lx[0]=Lx[1]=Number.MAX_VALUE,Ex[0]=Ex[1]=Zx[0]=Zx[1]=-Number.MAX_VALUE;var e,t=this.data,n=0,r=0,o=0,i=0;for(e=0;en||Bx(g)>r||d===t-1)&&(f=Math.sqrt(D*D+g*g),o=m,i=b);break;case Ax.C:var v=e[d++],y=e[d++],b=(m=e[d++],e[d++]),x=e[d++],w=e[d++];f=Ng(o,i,v,y,m,b,x,w,10),o=x,i=w;break;case Ax.Q:f=Vg(o,i,v=e[d++],y=e[d++],m=e[d++],b=e[d++],10),o=m,i=b;break;case Ax.A:var S=e[d++],k=e[d++],C=e[d++],_=e[d++],M=e[d++],T=e[d++],P=T+M;d+=1,p&&(a=Fx(M)*C+S,s=zx(M)*_+k),f=jx(C,_)*Nx($x,Math.abs(T)),o=Fx(P)*C+S,i=zx(P)*_+k;break;case Ax.R:a=o=e[d++],s=i=e[d++],f=2*e[d++]+2*e[d++];break;case Ax.Z:var D=a-o;g=s-i;f=Math.sqrt(D*D+g*g),o=a,i=s}f>=0&&(l[c++]=f,u+=f)}return this._pathLen=u,u},e.prototype.rebuildPath=function(e,t){var n,r,o,i,a,s,l,u,c,d,h=this.data,p=this._ux,f=this._uy,m=this._len,g=t<1,v=0,y=0,b=0;if(!g||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=t*this._pathLen))e:for(var x=0;x0&&(e.lineTo(c,d),b=0),w){case Ax.M:n=o=h[x++],r=i=h[x++],e.moveTo(o,i);break;case Ax.L:a=h[x++],s=h[x++];var k=Bx(a-o),C=Bx(s-i);if(k>p||C>f){if(g){if(v+(G=l[y++])>u){var _=(u-v)/G;e.lineTo(o*(1-_)+a*_,i*(1-_)+s*_);break e}v+=G}e.lineTo(a,s),o=a,i=s,b=0}else{var M=k*k+C*C;M>b&&(c=a,d=s,b=M)}break;case Ax.C:var T=h[x++],P=h[x++],D=h[x++],A=h[x++],O=h[x++],I=h[x++];if(g){if(v+(G=l[y++])>u){Zg(o,T,D,O,_=(u-v)/G,Ox),Zg(i,P,A,I,_,Ix),e.bezierCurveTo(Ox[1],Ix[1],Ox[2],Ix[2],Ox[3],Ix[3]);break e}v+=G}e.bezierCurveTo(T,P,D,A,O,I),o=O,i=I;break;case Ax.Q:T=h[x++],P=h[x++],D=h[x++],A=h[x++];if(g){if(v+(G=l[y++])>u){Bg(o,T,D,_=(u-v)/G,Ox),Bg(i,P,A,_,Ix),e.quadraticCurveTo(Ox[1],Ix[1],Ox[2],Ix[2]);break e}v+=G}e.quadraticCurveTo(T,P,D,A),o=D,i=A;break;case Ax.A:var R=h[x++],E=h[x++],L=h[x++],Z=h[x++],N=h[x++],j=h[x++],F=h[x++],z=!h[x++],B=L>Z?L:Z,V=Bx(L-Z)>.001,$=N+j,H=!1;if(g)v+(G=l[y++])>u&&($=N+j*(u-v)/G,H=!0),v+=G;if(V&&e.ellipse?e.ellipse(R,E,L,Z,F,N,$,z):e.arc(R,E,B,N,$,z),H)break e;S&&(n=Fx(N)*L+R,r=zx(N)*Z+E),o=Fx($)*L+R,i=zx($)*Z+E;break;case Ax.R:n=o=h[x],r=i=h[x+1],a=h[x++],s=h[x++];var W=h[x++],U=h[x++];if(g){if(v+(G=l[y++])>u){var q=u-v;e.moveTo(a,s),e.lineTo(a+Nx(q,W),s),(q-=W)>0&&e.lineTo(a+W,s+Nx(q,U)),(q-=U)>0&&e.lineTo(a+jx(W-q,0),s+U),(q-=W)>0&&e.lineTo(a,s+jx(U-q,0));break e}v+=G}e.rect(a,s,W,U);break;case Ax.Z:if(g){var G;if(v+(G=l[y++])>u){_=(u-v)/G;e.lineTo(o*(1-_)+n*_,i*(1-_)+r*_);break e}v+=G}e.closePath(),o=n,i=r}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Ax,e.initDefaultProps=((t=e.prototype)._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,void(t._version=0)),e}();const Kx=Gx;function Yx(e,t,n,r,o,i,a){if(0===o)return!1;var s=o,l=0;if(a>t+s&&a>r+s||ae+s&&i>n+s||it+d&&c>r+d&&c>i+d&&c>s+d||ce+d&&u>n+d&&u>o+d&&u>a+d||u=0&&ft+u&&l>r+u&&l>i+u||le+u&&s>n+u&&s>o+u||s=0&&gn||c+uo&&(o+=tw);var h=Math.atan2(l,s);return h<0&&(h+=tw),h>=r&&h<=o||h+tw>=r&&h+tw<=o}function rw(e,t,n,r,o,i){if(i>t&&i>r||io?s:0}var ow=Kx.CMD,iw=2*Math.PI;var aw=[-1,-1,-1],sw=[-1,-1];function lw(e,t,n,r,o,i,a,s,l,u){if(u>t&&u>r&&u>i&&u>s||u1&&(c=void 0,c=sw[0],sw[0]=sw[1],sw[1]=c),f=Ig(t,r,i,s,sw[0]),p>1&&(m=Ig(t,r,i,s,sw[1]))),2===p?vt&&s>r&&s>i||s=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*i*s;if(Ag(u))(c=-a/(2*i))>=0&&c<=1&&(o[l++]=c);else if(u>0){var c,d=Sg(u),h=(-a-d)/(2*i);(c=(-a+d)/(2*i))>=0&&c<=1&&(o[l++]=c),h>=0&&h<=1&&(o[l++]=h)}}return l}(t,r,i,s,aw);if(0===l)return 0;var u=zg(t,r,i);if(u>=0&&u<=1){for(var c=0,d=jg(t,r,i,u),h=0;hn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);aw[0]=-l,aw[1]=l;var u=Math.abs(r-o);if(u<1e-4)return 0;if(u>=iw-1e-4){r=0,o=iw;var c=i?1:-1;return a>=aw[0]+e&&a<=aw[1]+e?c:0}if(r>o){var d=r;r=o,o=d}r<0&&(r+=iw,o+=iw);for(var h=0,p=0;p<2;p++){var f=aw[p];if(f+e>a){var m=Math.atan2(s,f);c=i?1:-1;m<0&&(m=iw+m),(m>=r&&m<=o||m+iw>=r&&m+iw<=o)&&(m>Math.PI/2&&m<1.5*Math.PI&&(c=-c),h+=c)}}return h}function dw(e,t,n,r,o){for(var i,a,s=e.data,l=e.len(),u=0,c=0,d=0,h=0,p=0,f=0;f1&&(n||(u+=rw(c,d,h,p,r,o))),g&&(h=c=s[f],p=d=s[f+1]),m){case ow.M:c=h=s[f++],d=p=s[f++];break;case ow.L:if(n){if(Yx(c,d,s[f],s[f+1],t,r,o))return!0}else u+=rw(c,d,s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case ow.C:if(n){if(Xx(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=lw(c,d,s[f++],s[f++],s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case ow.Q:if(n){if(Qx(c,d,s[f++],s[f++],s[f],s[f+1],t,r,o))return!0}else u+=uw(c,d,s[f++],s[f++],s[f],s[f+1],r,o)||0;c=s[f++],d=s[f++];break;case ow.A:var v=s[f++],y=s[f++],b=s[f++],x=s[f++],w=s[f++],S=s[f++];f+=1;var k=!!(1-s[f++]);i=Math.cos(w)*b+v,a=Math.sin(w)*x+y,g?(h=i,p=a):u+=rw(c,d,i,a,r,o);var C=(r-v)*x/b+v;if(n){if(nw(v,y,x,w,w+S,k,t,C,o))return!0}else u+=cw(v,y,x,w,w+S,k,C,o);c=Math.cos(w+S)*b+v,d=Math.sin(w+S)*x+y;break;case ow.R:if(h=c=s[f++],p=d=s[f++],i=h+s[f++],a=p+s[f++],n){if(Yx(h,p,i,p,t,r,o)||Yx(i,p,i,a,t,r,o)||Yx(i,a,h,a,t,r,o)||Yx(h,a,h,p,t,r,o))return!0}else u+=rw(i,p,i,a,r,o),u+=rw(h,a,h,p,r,o);break;case ow.Z:if(n){if(Yx(c,d,h,p,t,r,o))return!0}else u+=rw(c,d,h,p,r,o);c=h,d=p}}return n||function(e,t){return Math.abs(e-t)<1e-4}(d,p)||(u+=rw(c,d,h,p,r,o)||0),0!==u}var hw=nf({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},sx),pw={style:nf({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},lx.style)},fw=py.concat(["invisible","culling","z","z2","zlevel","parent"]);const mw=function(e){function t(t){return e.call(this,t)||this}var n;return Wf(t,e),t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(e){n.buildPath(e,n.shape)}),o.silent=!0;var i=o.style;for(var a in r)i[a]!==r[a]&&(i[a]=r[a]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s.5?ry:t>.2?"#eee":oy}if(e)return oy}return ry},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(gf(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())===mv(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Kx(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||4&this.__dirty)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var i=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){i.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&&(i.width+=s/a,i.height+=s/a,i.x-=s/a/2,i.y-=s/a/2)}return i}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),o=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var i=this.path;if(this.hasStroke()){var a=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(e,t,n,r){return dw(e,t,!0,n,r)}(i,a/s,e,t)))return!0}if(this.hasFill())return function(e,t,n){return dw(e,0,!1,t,n)}(i,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){"shape"===t?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||(n=this.shape={}),"string"==typeof e?n[e]=t:tf(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(e){return Ff(hw,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=tf({},this.shape))},t.prototype._applyStateObj=function(t,n,r,o,i,a){e.prototype._applyStateObj.call(this,t,n,r,o,i,a);var s,l=!(n&&o);if(n&&n.shape?i?o?s=n.shape:(s=tf({},r.shape),tf(s,n.shape)):(s=tf({},o?this.shape:r.shape),tf(s,n.shape)):l&&(s=r.shape),s)if(i){this.shape=tf({},this.shape);for(var u={},c=df(s),d=0;d0},t.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},t.prototype.createStyle=function(e){return Ff(gw,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=yy(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}(fx);vw.prototype.type="tspan";const yw=vw;var bw=nf({x:0,y:0},sx),xw={style:nf({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},lx.style)};var ww=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wf(t,e),t.prototype.createStyle=function(e){return Ff(bw,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(null!=n)return n;var r,o=(r=t.image)&&"string"!=typeof r&&r.width&&r.height?t.image:this.__image;if(!o)return 0;var i="width"===e?"height":"width",a=t[i];return null==a?o[e]:o[e]/o[i]*a},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return xw},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Ym(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(fx);ww.prototype.type="image";const Sw=ww;var kw=Math.round;function Cw(e,t,n){if(t){var r=t.x1,o=t.x2,i=t.y1,a=t.y2;e.x1=r,e.x2=o,e.y1=i,e.y2=a;var s=n&&n.lineWidth;return s?(kw(2*r)===kw(2*o)&&(e.x1=e.x2=Mw(r,s,!0)),kw(2*i)===kw(2*a)&&(e.y1=e.y2=Mw(i,s,!0)),e):e}}function _w(e,t,n){if(t){var r=t.x,o=t.y,i=t.width,a=t.height;e.x=r,e.y=o,e.width=i,e.height=a;var s=n&&n.lineWidth;return s?(e.x=Mw(r,s,!0),e.y=Mw(o,s,!0),e.width=Math.max(Mw(r+i,s,!1)-e.x,0===i?0:1),e.height=Math.max(Mw(o+a,s,!1)-e.y,0===a?0:1),e):e}}function Mw(e,t,n){if(!t)return e;var r=kw(2*e);return(r+kw(t))%2==0?r/2:(r+(n?1:-1))/2}var Tw=function(){this.x=0,this.y=0,this.width=0,this.height=0},Pw={},Dw=function(e){function t(t){return e.call(this,t)||this}return Wf(t,e),t.prototype.getDefaultShape=function(){return new Tw},t.prototype.buildPath=function(e,t){var n,r,o,i;if(this.subPixelOptimize){var a=_w(Pw,t,this.style);n=a.x,r=a.y,o=a.width,i=a.height,a.r=t.r,t=a}else n=t.x,r=t.y,o=t.width,i=t.height;t.r?function(e,t){var n,r,o,i,a,s=t.x,l=t.y,u=t.width,c=t.height,d=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof d?n=r=o=i=d:d instanceof Array?1===d.length?n=r=o=i=d[0]:2===d.length?(n=o=d[0],r=i=d[1]):3===d.length?(n=d[0],r=i=d[1],o=d[2]):(n=d[0],r=d[1],o=d[2],i=d[3]):n=r=o=i=0,n+r>u&&(n*=u/(a=n+r),r*=u/a),o+i>u&&(o*=u/(a=o+i),i*=u/a),r+o>c&&(r*=c/(a=r+o),o*=c/a),n+i>c&&(n*=c/(a=n+i),i*=c/a),e.moveTo(s+n,l),e.lineTo(s+u-r,l),0!==r&&e.arc(s+u-r,l+r,r,-Math.PI/2,0),e.lineTo(s+u,l+c-o),0!==o&&e.arc(s+u-o,l+c-o,o,0,Math.PI/2),e.lineTo(s+i,l+c),0!==i&&e.arc(s+i,l+c-i,i,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(e,t):e.rect(n,r,o,i)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(mw);Dw.prototype.type="rect";const Aw=Dw;var Ow={fill:"#000"},Iw={style:nf({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},lx.style)},Rw=function(e){function t(t){var n=e.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ow,n.attr(t),n}return Wf(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;tp&&c){var f=Math.floor(p/l);n=n.slice(0,f)}if(e&&a&&null!=d)for(var m=Yb(d,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g0,_=null!=e.width&&("truncate"===e.overflow||"break"===e.overflow||"breakAll"===e.overflow),M=r.calculatedLineHeight,T=0;Tl&&nx(n,e.substring(l,u),t,s),nx(n,r[2],t,s,r[1]),l=Gb.lastIndex}li){w>0?(y.tokens=y.tokens.slice(0,w),g(y,x,b),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break e}var T=S.width,P=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))I.percentWidth=T,c.push(I),I.contentWidth=gy(I.text,_);else{if(P){var D=S.backgroundColor,A=D&&D.image;A&&qb(A=Hb(A))&&(I.width=Math.max(I.width,A.width*M/A.height))}var O=f&&null!=o?o-x:null;null!=O&&O=0&&"right"===(T=b[M]).align;)this._placeToken(T,e,w,f,_,"right",g),S-=T.width,_-=T.width,M--;for(C+=(n-(C-p)-(m-_)-S)/2;k<=M;)T=b[k],this._placeToken(T,e,w,f,C+T.width/2,"center",g),C+=T.width,k++;f+=w}},t.prototype._placeToken=function(e,t,n,r,o,i,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&&Hw(s)&&this._renderBackground(s,t,"right"===i?o-e.width:"center"===i?o-e.width/2:o,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,d=e.textPadding;d&&(o=Vw(o,i,d),u-=e.height/2-d[0]-e.innerHeight/2);var h=this._getOrCreateChild(yw),p=h.createStyle();h.useStyle(p);var f=this._defaultStyle,m=!1,g=0,v=Bw("fill"in s?s.fill:"fill"in t?t.fill:(m=!0,f.fill)),y=zw("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||f.autoStroke&&!m?null:(g=2,f.stroke)),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=o,p.y=u,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=i,p.textBaseline="middle",p.font=e.font||Ep,p.opacity=Tf(s.opacity,t.opacity,1),jw(p,s),y&&(p.lineWidth=Tf(s.lineWidth,t.lineWidth,g),p.lineDash=Mf(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v);var x=e.contentWidth,w=e.contentHeight;h.setBoundingRect(new Ym(by(p.x,x,p.textAlign),xy(p.y,w,p.textBaseline),x,w))},t.prototype._renderBackground=function(e,t,n,r,o,i){var a,s,l,u=e.backgroundColor,c=e.borderWidth,d=e.borderColor,h=u&&u.image,p=u&&!h,f=e.borderRadius,m=this;if(p||e.lineHeight||c&&d){(a=this._getOrCreateChild(Aw)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=r,g.width=o,g.height=i,g.r=f,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=Mf(e.fillOpacity,1);else if(h){(s=this._getOrCreateChild(Sw)).onload=function(){m.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=r,v.width=o,v.height=i}c&&d&&((l=a.style).lineWidth=c,l.stroke=d,l.strokeOpacity=Mf(e.strokeOpacity,1),l.lineDash=e.borderDash,l.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||s).style;y.shadowBlur=e.shadowBlur||0,y.shadowColor=e.shadowColor||"transparent",y.shadowOffsetX=e.shadowOffsetX||0,y.shadowOffsetY=e.shadowOffsetY||0,y.opacity=Tf(e.opacity,t.opacity,1)},t.makeFont=function(e){var t="";return function(e){return null!=e.fontSize||e.fontFamily||e.fontWeight}(e)&&(t=[e.fontStyle,e.fontWeight,Nw(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),t&&Of(t)||e.textFont||e.font},t}(fx),Ew={left:!0,right:1,center:1},Lw={top:1,bottom:1,middle:1},Zw=["fontStyle","fontWeight","fontSize","fontFamily"];function Nw(e){return"string"!=typeof e||-1===e.indexOf("px")&&-1===e.indexOf("rem")&&-1===e.indexOf("em")?isNaN(+e)?"12px":e+"px":e}function jw(e,t){for(var n=0;n=0,i=!1;if(e instanceof mw){var a=Yw(e),s=o&&a.selectFill||a.normalFill,l=o&&a.selectStroke||a.normalStroke;if(iS(s)||iS(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(i=!0,r=tf({},r),(u=tf({},u)).fill=s):!iS(u.fill)&&iS(s)?(i=!0,r=tf({},r),(u=tf({},u)).fill=vv(s)):!iS(u.stroke)&&iS(l)&&(i||(r=tf({},r),u=tf({},u)),u.stroke=vv(l)),r.style=u}}if(r&&null==r.z2){i||(r=tf({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(null!=c?c:10)}return r}(this,0,t,n);if("blur"===e)return function(e,t,n){var r=rf(e.currentStates,t)>=0,o=e.style.opacity,i=r?null:function(e,t,n,r){for(var o=e.style,i={},a=0;a0){var i={dataIndex:o,seriesIndex:e.seriesIndex};null!=r&&(i.dataType=r),t.push(i)}}))})),t}function RS(e,t,n){jS(e,!0),fS(e,vS),function(e,t,n){var r=Uw(e);null!=t?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}(e,t,n)}function ES(e,t,n,r){r?function(e){jS(e,!1)}(e):RS(e,t,n)}var LS=["emphasis","blur","select"],ZS={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function NS(e,t,n,r){n=n||"itemStyle";for(var o=0;o0){var d={duration:c.duration,delay:c.delay||0,easing:c.easing,done:i,force:!!i||!!a,setToFinal:!u,scope:e,during:a};l?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!l&&t.attr(n),a&&a(1),i&&i()}function WS(e,t,n,r,o,i){HS("update",e,t,n,r,o,i)}function US(e,t,n,r,o,i){HS("enter",e,t,n,r,o,i)}function qS(e){if(!e.__zr)return!0;for(var t=0;t-1?Dk:Ok;function Lk(e,t){e=e.toUpperCase(),Rk[e]=new _k(t),Ik[e]=t}Lk(Ak,{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:". "}}}}),Lk(Dk,{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 Zk=1e3,Nk=6e4,jk=36e5,Fk=864e5,zk=31536e6,Bk={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}"},Vk="{yyyy}-{MM}-{dd}",$k={year:"{yyyy}",month:"{yyyy}-{MM}",day:Vk,hour:Vk+" "+Bk.hour,minute:Vk+" "+Bk.minute,second:Vk+" "+Bk.second,millisecond:Bk.none},Hk=["year","month","day","hour","minute","second","millisecond"],Wk=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Uk(e,t){return"0000".substr(0,t-(e+="").length)+e}function qk(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 Gk(e){return e===qk(e)}function Kk(e,t,n,r){var o=Jy(e),i=o[Qk(n)](),a=o[Jk(n)]()+1,s=Math.floor((a-1)/3)+1,l=o[eC(n)](),u=o["get"+(n?"UTC":"")+"Day"](),c=o[tC(n)](),d=(c-1)%12+1,h=o[nC(n)](),p=o[rC(n)](),f=o[oC(n)](),m=r instanceof _k?r:function(e){return Rk[e]}(r||Ek)||Rk[Ok],g=m.getModel("time"),v=g.get("month"),y=g.get("monthAbbr"),b=g.get("dayOfWeek"),x=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Uk(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,v[a-1]).replace(/{MMM}/g,y[a-1]).replace(/{MM}/g,Uk(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Uk(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Uk(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Uk(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Uk(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Uk(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,Uk(f,3)).replace(/{S}/g,f+"")}function Yk(e,t){var n=Jy(e),r=n[Jk(t)]()+1,o=n[eC(t)](),i=n[tC(t)](),a=n[nC(t)](),s=n[rC(t)](),l=0===n[oC(t)](),u=l&&0===s,c=u&&0===a,d=c&&0===i,h=d&&1===o;return h&&1===r?"year":h?"month":d?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Xk(e,t,n){var r=yf(e)?Jy(e):e;switch(t=t||Yk(e,n)){case"year":return r[Qk(n)]();case"half-year":return r[Jk(n)]()>=6?1:0;case"quarter":return Math.floor((r[Jk(n)]()+1)/4);case"month":return r[Jk(n)]();case"day":return r[eC(n)]();case"half-day":return r[tC(n)]()/24;case"hour":return r[tC(n)]();case"minute":return r[nC(n)]();case"second":return r[rC(n)]();case"millisecond":return r[oC(n)]()}}function Qk(e){return e?"getUTCFullYear":"getFullYear"}function Jk(e){return e?"getUTCMonth":"getMonth"}function eC(e){return e?"getUTCDate":"getDate"}function tC(e){return e?"getUTCHours":"getHours"}function nC(e){return e?"getUTCMinutes":"getMinutes"}function rC(e){return e?"getUTCSeconds":"getSeconds"}function oC(e){return e?"getUTCMilliseconds":"getMilliseconds"}function iC(e){return e?"setUTCFullYear":"setFullYear"}function aC(e){return e?"setUTCMonth":"setMonth"}function sC(e){return e?"setUTCDate":"setDate"}function lC(e){return e?"setUTCHours":"setHours"}function uC(e){return e?"setUTCMinutes":"setMinutes"}function cC(e){return e?"setUTCSeconds":"setSeconds"}function dC(e){return e?"setUTCMilliseconds":"setMilliseconds"}function hC(e){if(isNaN(rb(e)))return gf(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function pC(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var fC=Df;function mC(e,t,n){function r(e){return e&&Of(e)?e:"-"}function o(e){return!(null==e||isNaN(e)||!isFinite(e))}var i="time"===t,a=e instanceof Date;if(i||a){var s=i?Jy(e):e;if(!isNaN(+s))return Kk(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===t)return vf(e)?r(e):yf(e)&&o(e)?e+"":"-";var l=rb(e);return o(l)?hC(l):vf(e)?r(e):"boolean"==typeof e?e+"":"-"}var gC=["a","b","c","d","e","f","g"],vC=function(e,t){return"{"+e+(null==t?"":t)+"}"};function yC(e,t,n){ff(t)||(t=[t]);var r=t.length;if(!r)return"";for(var o=t[0].$vars||[],i=0;ir||l.newline?(i=0,c=m,a+=s+n,s=h.height):s=Math.max(s,h.height)}else{var g=h.height+(f?-f.y+h.y:0);(d=a+g)>o||l.newline?(i+=s+n,a=0,d=g,s=h.width):s=Math.max(s,h.width)}l.newline||(l.x=i,l.y=a,l.markRedraw(),"horizontal"===e?i=c+n:a=d+n)}))}var _C=CC;pf(CC,"vertical"),pf(CC,"horizontal");function MC(e,t,n){n=fC(n||0);var r=t.width,o=t.height,i=$y(e.left,r),a=$y(e.top,o),s=$y(e.right,r),l=$y(e.bottom,o),u=$y(e.width,r),c=$y(e.height,o),d=n[2]+n[0],h=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=r-s-h-i),isNaN(c)&&(c=o-l-d-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/o?u=.8*r:c=.8*o),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(i)&&(i=r-s-u-h),isNaN(a)&&(a=o-l-c-d),e.left||e.right){case"center":i=r/2-u/2-n[3];break;case"right":i=r-u-h}switch(e.top||e.bottom){case"middle":case"center":a=o/2-c/2-n[0];break;case"bottom":a=o-c-d}i=i||0,a=a||0,isNaN(u)&&(u=r-h-i-(s||0)),isNaN(c)&&(c=o-d-a-(l||0));var f=new Ym(i+n[3],a+n[0],u,c);return f.margin=n,f}function TC(e,t,n,r,o,i){var a,s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if((i=i||e).x=e.x,i.y=e.y,!s&&!l)return!1;if("raw"===u)a="group"===e.type?new Ym(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(a=e.getBoundingRect(),e.needLocalTransform()){var c=e.getLocalTransform();(a=a.clone()).applyTransform(c)}var d=MC(nf({width:a.width,height:a.height},t),n,r),h=s?d.x-a.x:0,p=l?d.y-a.y:0;return"raw"===u?(i.x=h,i.y=p):(i.x+=h,i.y+=p),i===e&&e.markRedraw(),!0}function PC(e){var t=e.layoutMode||e.constructor.layoutMode;return bf(t)?t:t?{type:t}:null}function DC(e,t,n){var r=n&&n.ignoreSize;!ff(r)&&(r=[r,r]);var o=a(kC[0],0),i=a(kC[1],1);function a(n,o){var i={},a=0,u={},c=0;if(wC(n,(function(t){u[t]=e[t]})),wC(n,(function(e){s(t,e)&&(i[e]=u[e]=t[e]),l(i,e)&&a++,l(u,e)&&c++})),r[o])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&a){if(a>=2)return i;for(var d=0;d=0;a--)i=ef(i,n[a],!0);t.defaultOption=i}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+"Index",r=e+"Id";return Pb(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=((n=t.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),t}(_k);Lb(IC,_k),Fb(IC),function(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Rb(e);t[r.main]=n},e.determineSubType=function(n,r){var o=r.type;if(!o){var i=Rb(n).main;e.hasSubTypes(n)&&t[i]&&(o=t[i](r))}return o}}(IC),function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,r,o,i){if(e.length){var a=function(e){var r={},o=[];return sf(e,(function(i){var a=n(r,i),s=function(e,t){var n=[];return sf(e,(function(e){rf(t,e)>=0&&n.push(e)})),n}(a.originalDeps=t(i),e);a.entryCount=s.length,0===a.entryCount&&o.push(i),sf(s,(function(e){rf(a.predecessor,e)<0&&a.predecessor.push(e);var t=n(r,e);rf(t.successor,e)<0&&t.successor.push(i)}))})),{graph:r,noEntryList:o}}(r),s=a.graph,l=a.noEntryList,u={};for(sf(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),d=s[c],h=!!u[c];h&&(o.call(i,c,d.originalDeps.slice()),delete u[c]),sf(d.successor,h?f:p)}sf(u,(function(){throw new Error("")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}(IC,(function(e){var t=[];sf(IC.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=lf(t,(function(e){return Rb(e).main})),"dataset"!==e&&rf(t,"dataset")<=0&&t.unshift("dataset");return t}));const RC=IC;var EC="";"undefined"!=typeof navigator&&(EC=navigator.platform||"");var LC="rgba(0, 0, 0, 0.2)";const ZC={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:LC,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:LC,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:LC,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:LC,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:LC,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:LC,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:EC.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 NC=jf(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),jC="original",FC="arrayRows",zC="objectRows",BC="keyedColumns",VC="typedArray",$C="unknown",HC="column",WC="row",UC=1,qC=2,GC=3,KC=Sb();function YC(e,t,n){var r={},o=QC(t);if(!o||!e)return r;var i,a,s=[],l=[],u=t.ecModel,c=KC(u).datasetMap,d=o.uid+"_"+n.seriesLayoutBy;sf(e=e.slice(),(function(t,n){var o=bf(t)?t:e[n]={name:t};"ordinal"===o.type&&null==i&&(i=n,a=f(o)),r[o.name]=[]}));var h=c.get(d)||c.set(d,{categoryWayDim:a,valueWayDim:0});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}(r,a):n;if((c=c||n)&&c.length){var d=c[l];return o&&(u[o]=d),s.paletteIdx=(l+1)%c.length,d}}var l_="\0_ec_inner";var u_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.init=function(e,t,n,r,o,i){r=r||{},this.option=null,this._theme=new _k(r),this._locale=new _k(o),this._optionManager=i},t.prototype.setOption=function(e,t,n){var r=h_(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,h_(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||"recreate"===e){var o=r.mountOption("recreate"===e);0,this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(o,t)):o_(this,o),n=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var i=r.getTimelineOption(this);i&&(n=!0,this._mergeOption(i,t))}if(!e||"recreate"===e||"media"===e){var a=r.getMediaOption(this);a.length&&sf(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,o=this._componentsCount,i=[],a=jf(),s=t&&t.replaceMergeMainTypeMap;KC(this).datasetMap=jf(),sf(e,(function(e,t){null!=e&&(RC.hasClass(t)?t&&(i.push(t),a.set(t,!0)):n[t]=null==n[t]?Jp(e):ef(n[t],e,!0))})),s&&s.each((function(e,t){RC.hasClass(t)&&!a.get(t)&&(i.push(t),a.set(t,!0))})),RC.topologicalTravel(i,RC.getAllClassMainTypes(),(function(t){var i=function(e,t,n){var r=t_.get(t);if(!r)return n;var o=r(e);return o?n.concat(o):n}(this,t,cb(e[t])),a=r.get(t),l=a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll",u=mb(a,i,l);(function(e,t,n){sf(e,(function(e){var r=e.newOption;bf(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=function(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}(t,r,e.existing,n))}))})(u,t,RC),n[t]=null,r.set(t,null),o.set(t,0);var c,d=[],h=[],p=0;sf(u,(function(e,n){var r=e.existing,o=e.newOption;if(o){var i="series"===t,a=RC.getClass(t,e.keyInfo.subType,!i);if(!a)return;if("tooltip"===t){if(c)return void 0;c=!0}if(r&&r.constructor===a)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var s=tf({componentIndex:n},e.keyInfo);tf(r=new a(o,this,this,s),s),e.brandNew&&(r.__requireNewView=!0),r.init(o,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(d.push(r.option),h.push(r),p++):(d.push(void 0),h.push(void 0))}),this),n[t]=d,r.set(t,h),o.set(t,p),"series"===t&&n_(this)}),this),this._seriesIndices||n_(this)},t.prototype.getOption=function(){var e=Jp(this.option);return sf(e,(function(t,n){if(RC.hasClass(n)){for(var r=cb(t),o=r.length,i=!1,a=o-1;a>=0;a--)r[a]&&!xb(r[a])?i=!0:(r[a]=null,!i&&o--);r.length=o,e[n]=r}})),delete e[l_],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 o=0;o=t:"max"===n?e<=t:e===t})(r[a],e,i)||(o=!1)}})),o}const w_=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(sf(cb(e.series),(function(e){e&&e.data&&wf(e.data)&&Rf(e.data)})),sf(cb(e.dataset),(function(e){e&&e.source&&wf(e.source)&&Rf(e.source)}))),e=Jp(e);var r=this._optionBackup,o=function(e,t,n){var r,o,i=[],a=e.baseOption,s=e.timeline,l=e.options,u=e.media,c=!!e.media,d=!!(l||s||a&&a.timeline);a?(o=a).timeline||(o.timeline=s):((d||c)&&(e.options=e.media=null),o=e);c&&ff(u)&&sf(u,(function(e){e&&e.option&&(e.query?i.push(e):r||(r=e))}));function h(e){sf(t,(function(t){t(e,n)}))}return h(o),sf(l,(function(e){return h(e)})),sf(i,(function(e){return h(e.option)})),{baseOption:o,timelineOptions:l||[],mediaDefault:r,mediaList:i}}(e,t,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Jp(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=Jp(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t,n,r=this._api.getWidth(),o=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,s=[],l=[];if(!i.length&&!a)return l;for(var u=0,c=i.length;u=0;m--){var g=e[m];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,d)),h>=0){var v=g.data.getByRawIndex(g.stackResultDimension,h);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&p>=0&&v>0||"samesign"===l&&p<=0&&v<0){p=Ky(p,v),f=v;break}}}return r[0]=p,r[1]=f,r}))}))}var $_,H_,W_,U_,q_,G_=function(e){this.data=e.data||(e.sourceFormat===BC?{}:[]),this.sourceFormat=e.sourceFormat||$C,this.seriesLayoutBy=e.seriesLayoutBy||HC,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;nu&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(e){for(var t=0;t=0&&(s=i.interpolatedValue[l])}return null!=s?s+"":""})):void 0},e.prototype.getRawValue=function(e,t){return pM(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function gM(e){var t,n;return bf(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function vM(e){return new yM(e)}var yM=function(){function e(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t,n=this._upstream,r=e&&e.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(t=this._plan(this.context));var i,a=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}a===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,i=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(null!=d?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(i||h1&&r>0?s:a}};return i;function a(){return t=e?null:it},gte:function(e,t){return e>=t}},CM=(function(){function e(e,t){if(!yf(t)){0,wM("")}this._opFn=kM[e],this._rvalFloat=rb(t)}e.prototype.evaluate=function(e){return yf(e)?this._opFn(e,this._rvalFloat):this._opFn(rb(e),this._rvalFloat)}}(),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=yf(e)?e:rb(e),r=yf(t)?t:rb(t),o=isNaN(n),i=isNaN(r);if(o&&(n=this._incomparable),i&&(r=this._incomparable),o&&i){var a=gf(e),s=gf(t);a&&(n=s?e:0),s&&(r=a?t:0)}return nr?-this._resultLT:0},e}());!function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=rb(t)}e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(t=rb(e)===this._rvalFloat)}return this._isEQ?t:!t}}();var _M=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(e){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return SM(e,t)},e}();function MM(e){if(!IM(e.sourceFormat)){0,wM("")}return e.data}function TM(e){var t=e.sourceFormat,n=e.data;if(!IM(t)){0,wM("")}if(t===FC){for(var r=[],o=0,i=n.length;o65535?LM:ZM}function BM(e,t,n,r,o){var i=FM[n||"float"];if(o){var a=e[t],s=a&&a.length;if(s!==r){for(var l=new i(r),u=0;um[1]&&(m[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,o=this._chunks,i=this._dimensions,a=i.length,s=this._rawExtent,l=lf(i,(function(e){return e.property})),u=0;ug[1]&&(g[1]=m)}}!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=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&ne))return i;o=i-1}}return-1},e.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],o=[];if(!r)return o;null==n&&(n=1/0);for(var i=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(i=d,a=c,s=0),c===a&&(o[s++]=l))}return o.length=s,o},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 o=0;o=u&&b<=c||isNaN(b))&&(a[s++]=p),p++}h=!0}else if(2===o){f=d[r[0]];var g=d[r[1]],v=e[r[1]][0],y=e[r[1]][1];for(m=0;m=u&&b<=c||isNaN(b))&&(x>=v&&x<=y||isNaN(x))&&(a[s++]=p),p++}h=!0}}if(!h)if(1===o)for(m=0;m=u&&b<=c||isNaN(b))&&(a[s++]=w)}else for(m=0;me[C][1])&&(S=!1)}S&&(a[s++]=t.getRawIndex(m))}return sg[1]&&(g[1]=m)}}}},e.prototype.lttbDownSample=function(e,t){var n,r,o,i=this.clone([e],!0),a=i._chunks[e],s=this.count(),l=0,u=Math.floor(1/t),c=this.getRawIndex(0),d=new(zM(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));d[l++]=c;for(var h=1;hn&&(n=r,o=_)}C>0&&Cu-p&&(s=u-p,a.length=s);for(var f=0;fc[1]&&(c[1]=g),d[h++]=v}return o._count=h,o._indices=d,o._updateGetRawIdx(),o},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,o=0,i=this.count();oa&&(a=l)}return r=[i,a],this._extent[e]=r,r},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,o=0;o=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 SM(e[r],this._dimensions[r])}RM={arrayRows:e,objectRows:function(e,t,n,r){return SM(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var o=e&&(null==e.value?e:e.value);return SM(o instanceof Array?o[r]:o,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}();const $M=VM;var HM=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(),o=!!r.length;if(UM(n)){var i=n,a=void 0,s=void 0,l=void 0;if(o){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,t=[u._getVersionSign()]}else s=wf(a=i.get("data",!0))?VC:jC,t=[];var c=this._getSourceMetaRawOption()||{},d=l&&l.metaRawOption||{},h=Mf(c.seriesLayoutBy,d.seriesLayoutBy)||null,p=Mf(c.sourceHeader,d.sourceHeader),f=Mf(c.dimensions,d.dimensions);e=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||f?[Y_(a,{seriesLayoutBy:h,sourceHeader:p,dimensions:f},s)]:[]}else{var m=n;if(o){var g=this._applyTransform(r);e=g.sourceList,t=g.upstreamSignList}else{e=[Y_(m.get("source",!0),this._getSourceMetaRawOption(),null)],t=[]}}this._setLocalSource(e,t)},e.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==e.length&&qM("")}var i,a=[],s=[];return sf(e,(function(e){e.prepareSource();var t=e.getSource(o||0);null==o||t||qM(""),a.push(t),s.push(e._getVersionSign())})),r?t=function(e,t){var n=cb(e),r=n.length;r||wM("");for(var o=0,i=r;o1||n>0&&!e.noHeader;return sf(e.blocks,(function(e){var n=tT(e);n>=t&&(t=n+ +(r&&(!n||JM(e)&&!e.noHeader)))})),t}return 0}function nT(e,t,n,r){var o,i=t.noHeader,a=(o=tT(t),{html:YM[o],richText:XM[o]}),s=[],l=t.blocks||[];Af(!l||ff(l)),l=l||[];var u=e.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Bf(c,u)){var d=new CM(c[u],null);l.sort((function(e,t){return d.evaluate(e.sortParam,t.sortParam)}))}else"seriesDesc"===u&&l.reverse()}sf(l,(function(n,o){var i=t.valueFormatter,l=eT(n)(i?tf(tf({},e),{valueFormatter:i}):e,n,o>0?a.html:0,r);null!=l&&s.push(l)}));var h="richText"===e.renderMode?s.join(a.richText):iT(s.join(""),i?n:a.html);if(i)return h;var p=mC(t.header,"ordinal",e.useUTC),f=KM(r,e.renderMode).nameStyle;return"richText"===e.renderMode?aT(e,p,f)+a.richText+h:iT('
'+xm(p)+"
"+h,n)}function rT(e,t,n,r){var o=e.renderMode,i=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(e){return lf(e=ff(e)?e:[e],(function(e,t){return mC(e,ff(p)?p[t]:p,u)}))};if(!i||!a){var d=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",o),h=i?"":mC(l,"ordinal",u),p=t.valueType,f=a?[]:c(t.value,t.dataIndex),m=!s||!i,g=!s&&i,v=KM(r,o),y=v.nameStyle,b=v.valueStyle;return"richText"===o?(s?"":d)+(i?"":aT(e,h,y))+(a?"":function(e,t,n,r,o){var i=[o],a=r?10:20;return n&&i.push({padding:[0,0,0,a],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ff(t)?t.join(" "):t,i)}(e,f,m,g,b)):iT((s?"":d)+(i?"":function(e,t,n){return''+xm(e)+""}(h,!s,y))+(a?"":function(e,t,n,r){var o=n?"10px":"20px",i=t?"float:right;margin-left:"+o:"";return e=ff(e)?e:[e],''+lf(e,(function(e){return xm(e)})).join("  ")+""}(f,m,g,b)),n)}}function oT(e,t,n,r,o,i){if(e)return eT(e)({useUTC:o,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,i)}function iT(e,t){return'
'+e+'
'}function aT(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function sT(e,t){var n=e.get("padding");return null!=n?n:"richText"===t?[8,10]:10}var lT=function(){function e(){this.richTextStyles={},this._nextStyleNameId=ob()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r="richText"===n?this._generateStyleName():null,o=function(e,t){var n=gf(e)?{color:e,extraCssText:t}:e||{},r=n.color,o=n.type;t=n.extraCssText;var i=n.renderMode||"html";return r?"html"===i?"subItem"===o?'':'':{renderMode:i,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:t,type:e,renderMode:n,markerId:r});return gf(o)?o:(this.richTextStyles[r]=o.style,o.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};ff(t)?sf(t,(function(e){return tf(n,e)})):tf(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,"{"+r+"|"+e+"}"},e}();function uT(e){var t,n,r,o,i=e.series,a=e.dataIndex,s=e.multipleSeries,l=i.getData(),u=l.mapDimensionsAll("defaultedTooltip"),c=u.length,d=i.getRawValue(a),h=ff(d),p=function(e,t){return bC(e.getData().getItemVisual(t,"style")[e.visualDrawType])}(i,a);if(c>1||h&&!c){var f=function(e,t,n,r,o){var i=t.getData(),a=uf(e,(function(e,t,n){var r=i.getDimensionInfo(n);return e||r&&!1!==r.tooltip&&null!=r.displayName}),!1),s=[],l=[],u=[];function c(e,t){var n=i.getDimensionInfo(t);n&&!1!==n.otherDims.tooltip&&(a?u.push(QM("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:e,valueType:n.type})):(s.push(e),l.push(n.type)))}return r.length?sf(r,(function(e){c(pM(i,n,e),e)})):sf(e,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(d,i,a,u,p);t=f.inlineValues,n=f.inlineValueTypes,r=f.blocks,o=f.inlineValues[0]}else if(c){var m=l.getDimensionInfo(u[0]);o=t=pM(l,a,u[0]),n=m.type}else o=t=h?d[0]:d;var g=bb(i),v=g&&i.name||"",y=l.getName(a),b=s?v:y;return QM("section",{header:v,noHeader:s||!g,sortParam:o,blocks:[QM("nameValue",{markerType:"item",markerColor:p,name:b,noName:!Of(b),value:t,valueType:n,dataIndex:a})].concat(r||[])})}var cT=Sb();function dT(e,t){return e.getName(t)||e.getId(t)}var hT=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}var n;return Ap(t,e),t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=vM({count:fT,reset:mT}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(cT(this).sourceManager=new HM(this)).prepareSource();var r=this.getInitialData(e,n);vT(r,this),this.dataTask.context.data=r,cT(this).dataBeforeProcessed=r,pT(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=PC(this),r=n?AC(e):{},o=this.subType;RC.hasClass(o)&&(o+="Series"),ef(e,t.getTheme().get(this.subType)),ef(e,this.getDefaultOption()),db(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&DC(e,r,n)},t.prototype.mergeOption=function(e,t){e=ef(this.option,e,!0),this.fillDataTextStyle(e.data);var n=PC(this);n&&DC(this.option,e,n);var r=cT(this).sourceManager;r.dirty(),r.prepareSource();var o=this.getInitialData(e,t);vT(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,cT(this).dataBeforeProcessed=o,pT(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!wf(e))for(var t=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,o=a_.prototype.getColorFromPalette.call(this,e,t,n);return o||(o=r.getColorFromPalette(e,t,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,o=this.getData(t);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i=0&&n.push(o)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return("all"===n||n[dT(r,e)])&&!r.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(!0===e||e&&e.enabled)},t.prototype._innerSelect=function(e,t){var n,r,o=this.option,i=o.selectedMode,a=t.length;if(i&&a)if("series"===i)o.selectedMap="all";else if("multiple"===i){bf(o.selectedMap)||(o.selectedMap={});for(var s=o.selectedMap,l=0;l0&&this._innerSelect(e,t)}},t.registerClass=function(e){return RC.registerClass(e)},t.protoInitialize=((n=t.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),t}(RC);function pT(e){var t=e.name;bb(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return sf(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)})),r.join(" ")}(e)||t)}function fT(e){return e.model.getRawData().count()}function mT(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),gT}function gT(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function vT(e,t){sf(function(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r1&&(a*=PT(f),s*=PT(f));var m=(o===i?-1:1)*PT((a*a*(s*s)-a*a*(p*p)-s*s*(h*h))/(a*a*(p*p)+s*s*(h*h)))||0,g=m*a*p/s,v=m*-s*h/a,y=(e+n)/2+AT(d)*g-DT(d)*v,b=(t+r)/2+DT(d)*g+AT(d)*v,x=ET([1,0],[(h-g)/a,(p-v)/s]),w=[(h-g)/a,(p-v)/s],S=[(-1*h-g)/a,(-1*p-v)/s],k=ET(w,S);if(RT(w,S)<=-1&&(k=OT),RT(w,S)>=1&&(k=0),k<0){var C=Math.round(k/OT*1e6)/1e6;k=2*OT+C%2*OT}c.addData(u,y,b,a,s,x,k,d,i)}var ZT=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,NT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var jT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wf(t,e),t.prototype.applyTransform=function(e){},t}(mw);function FT(e){return null!=e.setData}function zT(e,t){var n=function(e){var t=new Kx;if(!e)return t;var n,r=0,o=0,i=r,a=o,s=Kx.CMD,l=e.match(ZT);if(!l)return t;for(var u=0;uA*A+O*O&&(C=M,_=T),{cx:C,cy:_,x0:-c,y0:-d,x1:C*(o/w-1),y1:_*(o/w-1)}}function iP(e,t){var n,r=tP(t.r,0),o=tP(t.r0||0,0),i=r>0;if(i||o>0){if(i||(r=o,o=0),o>r){var a=r;r=o,o=a}var s=t.startAngle,l=t.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=t.cx,c=t.cy,d=!!t.clockwise,h=JT(l-s),p=h>GT&&h%GT;if(p>rP&&(h=p),r>rP)if(h>GT-rP)e.moveTo(u+r*YT(s),c+r*KT(s)),e.arc(u,c,r,s,l,!d),o>rP&&(e.moveTo(u+o*YT(l),c+o*KT(l)),e.arc(u,c,o,l,s,d));else{var f=void 0,m=void 0,g=void 0,v=void 0,y=void 0,b=void 0,x=void 0,w=void 0,S=void 0,k=void 0,C=void 0,_=void 0,M=void 0,T=void 0,P=void 0,D=void 0,A=r*YT(s),O=r*KT(s),I=o*YT(l),R=o*KT(l),E=h>rP;if(E){var L=t.cornerRadius;L&&(f=(n=function(e){var t;if(ff(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}(L))[0],m=n[1],g=n[2],v=n[3]);var Z=JT(r-o)/2;if(y=nP(Z,g),b=nP(Z,v),x=nP(Z,f),w=nP(Z,m),C=S=tP(y,b),_=k=tP(x,w),(S>rP||k>rP)&&(M=r*YT(l),T=r*KT(l),P=o*YT(s),D=o*KT(s),hrP){var H=nP(g,C),W=nP(v,C),U=oP(P,D,A,O,r,H,d),q=oP(M,T,I,R,r,W,d);e.moveTo(u+U.cx+U.x0,c+U.cy+U.y0),C0&&e.arc(u+U.cx,c+U.cy,H,QT(U.y0,U.x0),QT(U.y1,U.x1),!d),e.arc(u,c,r,QT(U.cy+U.y1,U.cx+U.x1),QT(q.cy+q.y1,q.cx+q.x1),!d),W>0&&e.arc(u+q.cx,c+q.cy,W,QT(q.y1,q.x1),QT(q.y0,q.x0),!d))}else e.moveTo(u+A,c+O),e.arc(u,c,r,s,l,!d);else e.moveTo(u+A,c+O);if(o>rP&&E)if(_>rP){H=nP(f,_),U=oP(I,R,M,T,o,-(W=nP(m,_)),d),q=oP(A,O,P,D,o,-H,d);e.lineTo(u+U.cx+U.x0,c+U.cy+U.y0),_0&&e.arc(u+U.cx,c+U.cy,W,QT(U.y0,U.x0),QT(U.y1,U.x1),!d),e.arc(u,c,o,QT(U.cy+U.y1,U.cx+U.x1),QT(q.cy+q.y1,q.cx+q.x1),d),H>0&&e.arc(u+q.cx,c+q.cy,H,QT(q.y1,q.x1),QT(q.y0,q.x0),!d))}else e.lineTo(u+I,c+R),e.arc(u,c,o,l,s,d);else e.lineTo(u+I,c+R)}else e.moveTo(u,c);e.closePath()}}}var aP=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},sP=function(e){function t(t){return e.call(this,t)||this}return Wf(t,e),t.prototype.getDefaultShape=function(){return new aP},t.prototype.buildPath=function(e,t){iP(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(mw);sP.prototype.type="sector";const lP=sP;var uP=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},cP=function(e){function t(t){return e.call(this,t)||this}return Wf(t,e),t.prototype.getDefaultShape=function(){return new uP},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,o,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,o,!0)},t}(mw);cP.prototype.type="ring";const dP=cP;function hP(e,t,n){var r=t.smooth,o=t.points;if(o&&o.length>=2){if(r){var i=function(e,t,n,r){var o,i,a,s,l=[],u=[],c=[],d=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,p=e.length;hNP[1]){if(a=!1,o)return a;var u=Math.abs(NP[0]-ZP[1]),c=Math.abs(ZP[0]-NP[1]);Math.min(u,c)>r.len()&&(uMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function uD(e){return!e.isGroup}function cD(e,t,n){if(e&&t){var r,o=(r={},e.traverse((function(e){uD(e)&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(uD(e)&&e.anid){var t=o[e.anid];if(t){var r=i(e);e.attr(i(t)),WS(e,r,n,Uw(e).dataIndex)}}}))}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return function(e){return null!=e.shape}(e)&&(t.shape=tf({},e.shape)),t}}function dD(e,t){return lf(e,(function(e){var n=e[0];n=HP(n,t.x),n=WP(n,t.x+t.width);var r=e[1];return r=HP(r,t.y),[n,r=WP(r,t.y+t.height)]}))}function hD(e,t){var n=HP(e.x,t.x),r=WP(e.x+e.width,t.x+t.width),o=HP(e.y,t.y),i=WP(e.y+e.height,t.y+t.height);if(r>=n&&i>=o)return{x:n,y:o,width:r-n,height:i-o}}function pD(e,t,n){var r=tf({rectHover:!0},t),o=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(o.image=e.slice(8),nf(o,n),new Sw(r)):QP(e.replace("path://",""),r,n,"center")}function fD(e,t,n,r,o){for(var i=0,a=o[o.length-1];i=-1e-6)return!1;var f=e-o,m=t-i,g=gD(f,m,u,c)/p;if(g<0||g>1)return!1;var v=gD(f,m,d,h)/p;return!(v<0||v>1)}function gD(e,t,n,r){return e*r-n*t}function vD(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,o=gf(t)?{formatter:t}:t,i=n.mainType,a=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=a;var l=e.formatterParamsExtra;l&&sf(df(l),(function(e){Bf(s,e)||(s[e]=l[e],s.$vars.push(e))}));var u=Uw(e.el);u.componentMainType=i,u.componentIndex=a,u.tooltipConfig={name:r,option:nf({content:r,formatterParams:s},o)}}function yD(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function bD(e,t){if(e)if(ff(e))for(var n=0;n=0?d():c=setTimeout(d,-o),l=r};return h.clear=function(){c&&(clearTimeout(c),c=null)},h.debounceNextCall=function(e){s=e},h}function RD(e,t,n,r){var o=e[t];if(o){var i=o[DD]||o,a=o[OD];if(o[AD]!==n||a!==r){if(null==n||!r)return e[t]=i;(o=e[t]=ID(i,n,"debounce"===r))[DD]=i,o[OD]=r,o[AD]=n}return o}}function ED(e,t){var n=e[t];n&&n[DD]&&(n.clear&&n.clear(),e[t]=n[DD])}var LD=Sb(),ZD={itemStyle:zb(wk,!0),lineStyle:zb(yk,!0)},ND={lineStyle:"stroke",itemStyle:"fill"};function jD(e,t){var n=e.visualStyleMapper||ZD[t];return n||(console.warn("Unknown style type '"+t+"'."),ZD.itemStyle)}function FD(e,t){var n=e.visualDrawType||ND[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var zD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=e.getModel(r),i=jD(e,r)(o),a=o.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=FD(e,r),l=i[s],u=mf(l)?l:null,c="auto"===i.fill||"auto"===i.stroke;if(!i[s]||u||c){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());i[s]||(i[s]=d,n.setVisual("colorFromPalette",!0)),i.fill="auto"===i.fill||mf(i.fill)?d:i.fill,i.stroke="auto"===i.stroke||mf(i.stroke)?d:i.stroke}if(n.setVisual("style",i),n.setVisual("drawType",s),!t.isSeriesFiltered(e)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),o=tf({},i);o[s]=u(r),t.setItemVisual(n,"style",o)}}}},BD=new _k,VD={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e)){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",o=jD(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){BD.option=n[r];var a=o(BD);tf(e.ensureUniqueItemVisual(t,"style"),a),BD.option.decal&&(e.setItemVisual(t,"decal",BD.option.decal),BD.option.decal.dirty=!0),i in a&&e.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},$D={performRawSeries:!0,overallReset:function(e){var t=jf();e.eachSeries((function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+n,o=t.get(r);o||(o={},t.set(r,o)),LD(e).scope=o}})),e.eachSeries((function(t){if(!t.isColorBySeries()&&!e.isSeriesFiltered(t)){var n=t.getRawData(),r={},o=t.getData(),i=LD(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=FD(t,a);o.each((function(e){var t=o.getRawIndex(e);r[t]=e})),n.each((function(e){var a=r[e];if(o.getItemVisual(a,"colorFromPalette")){var l=o.ensureUniqueItemVisual(a,"style"),u=n.getName(e)||e+"",c=n.count();l[s]=t.getColorFromPalette(u,i,c)}}))}}))}},HD=Math.PI;var WD=function(){function e(e,t,n,r){this._stageTaskMap=jf(),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,o=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,i=r&&r.modDataCount;return{step:o,modBy:null!=i?Math.ceil(i/o):null,modDataCount:i}}},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(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,i=e.get("large")&&r>=e.get("largeThreshold"),a="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:a,large:i}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=jf();e.eachSeries((function(e){var r=e.getProgressive(),o=e.uid;n.set(o,{id:o,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;sf(this._allHandlers,(function(r){var o=e.get(r.uid)||e.set(r.uid,{});Af(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,t,n),r.overallReset&&this._createOverallStageTask(r,o,t,n)}),this)},e.prototype.prepareView=function(e,t,n,r){var o=e.renderTask,i=o.context;i.model=t,i.ecModel=n,i.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(t,o)},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 o=!1,i=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}sf(e,(function(e,s){if(!r.visualType||r.visualType===e.visualType){var l=i._stageTaskMap.get(e.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var d,h=c.agentStubMap;h.each((function(e){a(r,e)&&(e.dirty(),d=!0)})),d&&c.dirty(),i.updatePayload(c,n);var p=i.getPerformArgs(c,r.block);h.each((function(e){e.perform(p)})),c.perform(p)&&(o=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=i.getPerformArgs(s,r.block);u.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),i.updatePayload(s,n),s.perform(u)&&(o=!0)}))}})),this.unfinished=o||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 o=this,i=t.seriesTaskMap,a=t.seriesTaskMap=jf(),s=e.seriesType,l=e.getTargetSeries;function u(t){var s=t.uid,l=a.set(s,i&&i.get(s)||vM({plan:YD,reset:XD,count:eA}));l.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._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 o=this,i=t.overallTask=t.overallTask||vM({reset:UD});i.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:o};var a=i.agentStubMap,s=i.agentStubMap=jf(),l=e.seriesType,u=e.getTargetSeries,c=!0,d=!1;function h(e){var t=e.uid,n=s.set(t,a&&a.get(t)||(d=!0,vM({reset:qD,onDirty:KD})));n.context={model:e,overallProgress:c},n.agent=i,n.__block=c,o._pipe(e,n)}Af(!e.createOnAllSeries,""),l?n.eachRawSeriesByType(l,h):u?u(n,r).each(h):(c=!1,sf(n.getSeries(),h)),d&&i.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 mf(e)&&(e={overallReset:e,seriesType:tA(e)}),e.uid=Tk("stageHandler"),t&&(e.visualType=t),e},e}();function UD(e){e.overallReset(e.ecModel,e.api,e.payload)}function qD(e){return e.overallProgress&&GD}function GD(){this.agent.dirty(),this.getDownstream().dirty()}function KD(){this.agent&&this.agent.dirty()}function YD(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function XD(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=cb(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?lf(t,(function(e,t){return JD(t)})):QD}var QD=JD(0);function JD(e){return function(t,n){var r=n.data,o=n.resetDefines[e];if(o&&o.dataEach)for(var i=t.start;i0&&c===o.length-u.length){var d=o.slice(0,c);"data"!==d&&(t.mainType=d,t[u.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(r[o]=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,o=n.packedEvent,i=n.model,a=n.view;if(!i||!a)return!0;var s=t.cptQuery,l=t.dataQuery;return u(s,i,"mainType")&&u(s,i,"subType")&&u(s,i,"index","componentIndex")&&u(s,i,"name")&&u(s,i,"id")&&u(l,o,"name")&&u(l,o,"dataIndex")&&u(l,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,t.otherQuery,r,o));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),gA=["symbol","symbolSize","symbolRotate","symbolOffset"],vA=gA.concat(["symbolKeepAspect"]),yA={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={},o={},i=!1,a=0;a=0&&FA(l)?l:.5,e.createRadialGradient(a,s,0,a,s,l)}(e,t,n):function(e,t,n){var r=null==t.x?0:t.x,o=null==t.x2?1:t.x2,i=null==t.y?0:t.y,a=null==t.y2?0:t.y2;return t.global||(r=r*n.width+n.x,o=o*n.width+n.x,i=i*n.height+n.y,a=a*n.height+n.y),r=FA(r)?r:0,o=FA(o)?o:1,i=FA(i)?i:0,a=FA(a)?a:0,e.createLinearGradient(r,i,o,a)}(e,t,n),o=t.colorStops,i=0;i0&&(t=r.lineDash,n=r.lineWidth,t&&"solid"!==t&&n>0?"dashed"===t?[4*n,2*n]:"dotted"===t?[n]:yf(t)?[t]:ff(t)?t:null:null),i=r.lineDashOffset;if(o){var a=r.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&1!==a&&(o=lf(o,(function(e){return e/a})),i/=a)}return[o,i]}var HA=new Kx(!0);function WA(e){var t=e.stroke;return!(null==t||"none"===t||!(e.lineWidth>0))}function UA(e){return"string"==typeof e&&"none"!==e}function qA(e){var t=e.fill;return null!=t&&"none"!==t}function GA(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 KA(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 YA(e,t,n){var r=Wb(t.image,t.__image,n);if(qb(r)){var o=e.createPattern(r,t.repeat||"repeat");if("function"==typeof DOMMatrix&&o&&o.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*$f),i.scaleSelf(t.scaleX||1,t.scaleY||1),o.setTransform(i)}return o}}var XA=["shadowBlur","shadowOffsetX","shadowOffsetY"],QA=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function JA(e,t,n,r,o){var i=!1;if(!r&&t===(n=n||{}))return!1;if(r||t.opacity!==n.opacity){nO(e,o),i=!0;var a=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(a)?sx.opacity:a}(r||t.blend!==n.blend)&&(i||(nO(e,o),i=!0),e.globalCompositeOperation=t.blend||sx.blend);for(var s=0;s0&&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[yO])if(this._disposed)KO(this.id);else{var r,o,i;if(bf(t)&&(n=t.lazyUpdate,r=t.silent,o=t.replaceMerge,i=t.transition,t=t.notMerge),this[yO]=!0,!this._model||t){var a=new w_(this._api),s=this._theme,l=this._model=new p_;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(e,{replaceMerge:o},JO);var u={seriesTransition:i,optionChanged:!0};if(n)this[bO]={silent:r,updateParams:u},this[yO]=!1,this.getZr().wakeUp();else{try{MO(this),DO.update.call(this,null,u)}catch(e){throw this[bO]=null,this[yO]=!1,e}this._ssr||this._zr.flush(),this[bO]=null,this[yO]=!1,RO.call(this,r),EO.call(this,r)}}},t.prototype.setTheme=function(){xM()},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||Rp.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(Rp.svgSupported){var e=this._zr;return sf(e.storage.getDisplayList(),(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,r=[],o=this;sf(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=o._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)}))}));var i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return sf(r,(function(e){e.group.ignore=!1})),i}KO(this.id)},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var t="svg"===e.type,n=this.group,r=Math.min,o=Math.max,i=1/0;if(oI[n]){var a=i,s=i,l=-1/0,u=-1/0,c=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();sf(rI,(function(i,d){if(i.group===n){var h=t?i.getZr().painter.getSvgDom().innerHTML:i.renderToCanvas(Jp(e)),p=i.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=o(p.right,l),u=o(p.bottom,u),c.push({dom:h,left:p.left,top:p.top})}}));var h=(l*=d)-(a*=d),p=(u*=d)-(s*=d),f=jp.createCanvas(),m=zy(f,{renderer:t?"svg":"canvas"});if(m.resize({width:h,height:p}),t){var g="";return sf(c,(function(e){var t=e.left-a,n=e.top-s;g+=''+e.dom+""})),m.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new Aw({shape:{x:0,y:0,width:h,height:p},style:{fill:e.connectedBackgroundColor}})),sf(c,(function(e){var t=new Sw({style:{x:e.left*d-a,y:e.top*d-s,image:e.dom}});m.add(t)})),m.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}KO(this.id)},t.prototype.convertToPixel=function(e,t){return AO(this,"convertToPixel",e,t)},t.prototype.convertFromPixel=function(e,t){return AO(this,"convertFromPixel",e,t)},t.prototype.containPixel=function(e,t){var n;if(!this._disposed)return sf(Cb(this._model,e),(function(e,r){r.indexOf("Models")>=0&&sf(e,(function(e){var o=e.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(t);else if("seriesModels"===r){var i=this._chartsMap[e.__viewId];i&&i.containPoint&&(n=n||i.containPoint(t,e))}else 0}),this)}),this),!!n;KO(this.id)},t.prototype.getVisual=function(e,t){var n=Cb(this._model,e,{defaultMainType:"series"});var r=n.seriesModel.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?xA(r,o,t):wA(r,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,t,n,r=this;sf(GO,(function(e){var t=function(t){var n,o=r.getModel(),i=t.target;if("globalout"===e?n={}:i&&kA(i,(function(e){var t=Uw(e);if(t&&null!=t.dataIndex){var r=t.dataModel||o.getSeriesByIndex(t.seriesIndex);return n=r&&r.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return n=tf({},t.eventData),!0}),!0),n){var a=n.componentType,s=n.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",s=n.seriesIndex);var l=a&&null!=s&&o.getComponent(a,s),u=l&&r["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];0,n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:i,packedEvent:n,model:l,view:u},r.trigger(e,n)}};t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),sf(XO,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),sf(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,t=this,n=this._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(SA("map","selectchanged",t,r,e),SA("pie","selectchanged",t,r,e)):"select"===e.fromAction?(SA("map","selected",t,r,e),SA("pie","selected",t,r,e)):"unselect"===e.fromAction&&(SA("map","unselected",t,r,e),SA("pie","unselected",t,r,e))}))},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?KO(this.id):this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)KO(this.id);else{this._disposed=!0,this.getDom()&&Db(this.getDom(),sI,"");var e=this,t=e._api,n=e._model;sf(e._componentsViews,(function(e){e.dispose(n,t)})),sf(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete rI[e.id]}},t.prototype.resize=function(e){if(!this[yO])if(this._disposed)KO(this.id);else{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[bO]&&(null==r&&(r=this[bO].silent),n=!0,this[bO]=null),this[yO]=!0;try{n&&MO(this),DO.update.call(this,{type:"resize",animation:tf({duration:0},e&&e.animation)})}catch(e){throw this[yO]=!1,e}this[yO]=!1,RO.call(this,r),EO.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed)KO(this.id);else if(bf(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),nI[e]){var n=nI[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?KO(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=tf({},e);return t.type=XO[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)KO(this.id);else if(bf(t)||(t={silent:!!t}),YO[e.type]&&this._model)if(this[yO])this._pendingActions.push(e);else{var n=t.silent;IO.call(this,e,n);var r=t.flush;r?this._zr.flush():!1!==r&&Rp.browser.weChat&&this._throttledZrFlush(),RO.call(this,n),EO.call(this,n)}},t.prototype.updateLabelLayout=function(){pO.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)KO(this.id);else{var t=e.seriesIndex;0,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;r0?{duration:i,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered((function(e){if(e.states&&e.states.emphasis){if(qS(e))return;if(e instanceof mw&&function(e){var t=Yw(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(o){e.stateTransition=a;var r=e.getTextContent(),i=e.getTextGuideLine();r&&(r.stateTransition=a),i&&(i.stateTransition=a)}e.__dirty&&t(e)}}))}MO=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),TO(e,!0),TO(e,!1),t.plan()},TO=function(e,t){for(var n=e._model,r=e._scheduler,o=t?e._componentsViews:e._chartsViews,i=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,l=0;lt.get("hoverLayerThreshold")&&!Rp.node&&!Rp.worker&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))}}))}(e,t),pO.trigger("series:afterupdate",t,r,s)},VO=function(e){e[xO]=!0,e.getZr().wakeUp()},$O=function(e){e[xO]&&(e.getZr().storage.traverse((function(e){qS(e)||t(e)})),e[xO]=!1)},zO=function(e){return new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return Ap(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){xS(t,n),VO(e)},n.prototype.leaveEmphasis=function(t,n){wS(t,n),VO(e)},n.prototype.enterBlur=function(t){SS(t),VO(e)},n.prototype.leaveBlur=function(t){kS(t),VO(e)},n.prototype.enterSelect=function(t){CS(t),VO(e)},n.prototype.leaveSelect=function(t){_S(t),VO(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}(m_))(e)},BO=function(e){function t(e,t){for(var n=0;n=0)){mI.push(n);var i=aA.wrapStageHandler(n,o);i.__prio=t,i.__raw=n,e.push(i)}}function vI(e,t){nI[e]=t}var yI=function(e){var t=(e=Jp(e)).type;t||wM("");var n=t.split(":");2!==n.length&&wM("");var r=!1;"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,AM.set(t,e)};fI(mO,zD),fI(gO,VD),fI(gO,$D),fI(mO,yA),fI(gO,bA),fI(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=uO(n,t))}));var o=r.getVisual("decal");if(o)r.getVisual("style").decal=uO(o,t)}}))})),cI(B_),dI(900,(function(e){var t=jf();e.eachSeries((function(e){var n=e.get("stack");if(n){var r=t.get(n)||t.set(n,[]),o=e.getData(),i={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!i.stackedDimension||!i.isStackedByIndex&&!i.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(i)}})),t.each(V_)})),vI("default",(function(e,t){nf(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Zy,r=new Aw({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var o,i=new Ww({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 Aw({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return n.add(a),t.showSpinner&&((o=new AP({shape:{startAngle:-HD/2,endAngle:-HD/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*HD/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*HD/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),pI({type:eS,event:eS,update:eS},Vf),pI({type:tS,event:tS,update:tS},Vf),pI({type:nS,event:nS,update:nS},Vf),pI({type:rS,event:rS,update:rS},Vf),pI({type:oS,event:oS,update:oS},Vf),uI("light",lA),uI("dark",fA);var bI=[],xI={registerPreprocessor:cI,registerProcessor:dI,registerPostInit:function(e){hI("afterinit",e)},registerPostUpdate:function(e){hI("afterupdate",e)},registerUpdateLifecycle:hI,registerAction:pI,registerCoordinateSystem:function(e,t){y_.register(e,t)},registerLayout:function(e,t){gI(eI,e,t,1e3,"layout")},registerVisual:fI,registerTransform:yI,registerLoading:vI,registerMap:function(e,t,n){var r=fO["registerMap"];r&&r(e,t,n)},registerImpl:function(e,t){fO[e]=t},PRIORITY:vO,ComponentModel:RC,ComponentView:ST,SeriesModel:xT,ChartView:PD,registerComponentModel:function(e){RC.registerClass(e)},registerComponentView:function(e){ST.registerClass(e)},registerSeriesModel:function(e){xT.registerClass(e)},registerChartView:function(e){PD.registerClass(e)},registerSubTypeDefaulter:function(e,t){RC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){var n;n=t,Ny[e]=n}};function wI(e){ff(e)?sf(e,(function(e){wI(e)})):rf(bI,e)>=0||(bI.push(e),mf(e)&&(e={install:e}),e.install(xI))}var SI=Sb(),kI={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},CI=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=TI(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Mf(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=tM(this.source),n=!PI(e),r="",o=[],i=0,a=0;i30}function DI(e,t,n){var r,o,i,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(e){return!_I(e.schema)}(t)?(o=t.schema,r=o.dimensions,i=t.store):r=t;var l,u,c,d,h=!(!e||!e.get("stack"));if(sf(r,(function(e,t){gf(e)&&(r[t]=e={name:e}),h&&!e.isExtraCoord&&(a||l||!e.ordinalMeta||(l=e),u||"ordinal"===e.type||"time"===e.type||s&&s!==e.coordDim||(u=e))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,f=u.type,m=0;sf(r,(function(e){e.coordDim===p&&m++}));var g={name:c,coordDim:p,coordDimIndex:m,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},v={name:d,coordDim:d,coordDimIndex:m+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};o?(i&&(g.storeDimIndex=i.ensureCalculationDimension(d,f),v.storeDimIndex=i.ensureCalculationDimension(c,f)),o.appendCalculationDimension(g),o.appendCalculationDimension(v)):(r.push(g),r.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:d,stackResultDimension:c}}function AI(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function OI(e,t){return AI(e,t)?e.getCalculationInfo("stackResultDimension"):t}var II="undefined"!=typeof Float32Array,RI=II?Float32Array:Array;function EI(e){return ff(e)?II?new Float32Array(e):e:new RI(e)}var LI="__ec_stack_";function ZI(e){return e.get("stack")||LI+e.seriesIndex}function NI(e){return e.dim+e.index}function jI(e,t){var n=[];return t.eachSeriesByType(e,(function(e){VI(e)&&n.push(e)})),n}function FI(e){var t=function(e){var t={};sf(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var r=e.getData(),o=n.dim+"_"+n.index,i=r.getDimensionIndex(r.mapDimension(n.dim)),a=r.getStore(),s=0,l=a.count();s0&&(i=null===i?s:Math.min(i,s))}n[r]=i}}return n}(e),n=[];return sf(e,(function(e){var r,o=e.coordinateSystem.getBaseAxis(),i=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var a=o.dim+"_"+o.index,s=t[a],l=Math.abs(i[1]-i[0]),u=o.scale.getExtent(),c=Math.abs(u[1]-u[0]);r=s?l/c*s:l}else{var d=e.getData();r=Math.abs(i[1]-i[0])/d.count()}var h=$y(e.get("barWidth"),r),p=$y(e.get("barMaxWidth"),r),f=$y(e.get("barMinWidth")||($I(e)?.5:1),r),m=e.get("barGap"),g=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:h,barMaxWidth:p,barMinWidth:f,barGap:m,barCategoryGap:g,axisKey:NI(o),stackId:ZI(e)})})),zI(n)}function zI(e){var t={};sf(e,(function(e,n){var r=e.axisKey,o=e.bandWidth,i=t[r]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=i.stacks;t[r]=i;var s=e.stackId;a[s]||i.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(i.remainedWidth,l),i.remainedWidth-=l);var u=e.barMaxWidth;u&&(a[s].maxWidth=u);var c=e.barMinWidth;c&&(a[s].minWidth=c);var d=e.barGap;null!=d&&(i.gap=d);var h=e.barCategoryGap;null!=h&&(i.categoryGap=h)}));var n={};return sf(t,(function(e,t){n[t]={};var r=e.stacks,o=e.bandWidth,i=e.categoryGap;if(null==i){var a=df(r).length;i=Math.max(35-4*a,15)+"%"}var s=$y(i,o),l=$y(e.gap,1),u=e.remainedWidth,c=e.autoWidthCount,d=(u-s)/(c+(c-1)*l);d=Math.max(d,0),sf(r,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){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=d;t&&tr&&(r=n),r!==d&&(e.width=r,u-=r+l*r,c--)}})),d=(u-s)/(c+(c-1)*l),d=Math.max(d,0);var h,p=0;sf(r,(function(e,t){e.width||(e.width=d),h=e,p+=e.width*(1+l)})),h&&(p-=h.width*l);var f=-p/2;sf(r,(function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:f,width:e.width},f+=e.width*(1+l)}))})),n}function BI(e,t){var n=jI(e,t),r=FI(n);sf(n,(function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),o=ZI(e),i=r[NI(n)][o],a=i.offset,s=i.width;t.setLayout({bandWidth:i.bandWidth,offset:a,size:s})}))}function VI(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function $I(e){return e.pipelineContext&&e.pipelineContext.large}var HI={average:function(e){for(var t=0,n=0,r=0;rt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;nt&&(t=i,n=o)}return isFinite(n)?n:NaN},nearest:function(e){return e[0]}},WI=function(e){return Math.round(e.length/2)};function UI(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),o=e.get("sampling"),i=e.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===i.type&&o){var s=i.getBaseAxis(),l=i.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),d=Math.abs(u[1]-u[0])*(c||1),h=Math.round(a/d);if(isFinite(h)&&h>1){"lttb"===o&&e.setData(r.lttbDownSample(r.mapDimension(l.dim),1/h));var p=void 0;gf(o)?p=HI[o]:mf(o)&&(p=o),p&&e.setData(r.downSample(r.mapDimension(l.dim),1/h,p,WI))}}}}}function qI(e){return null==e?0:e.length||1}function GI(e){return e}const KI=function(){function e(e,t,n,r,o,i){this._old=e,this._new=t,this._oldKeyGetter=n||GI,this._newKeyGetter=r||GI,this.context=o,this._diffModeMultiple="multiple"===i}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=new Array(e.length),o=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var i=0;i1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,i)}else 1===l?(n[a]=null,this._update&&this._update(s,i)):this._remove&&this._remove(i)}this._performRestAdd(o,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},o=[],i=[];this._initIndexMap(e,n,o,"_oldKeyGetter"),this._initIndexMap(t,r,i,"_newKeyGetter");for(var a=0;a1&&1===d)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&d>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===d)this._update&&this._update(u,l),r[s]=null;else if(c>1&&d>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var h=0;h1)for(var a=0;a=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===jC&&!n.pure)for(var i=[],a=e;a0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||(r=n[e]={});var o=r[t];return null==o&&(ff(o=this.getVisual(t))?o=o.slice():aR(o)&&(o=tf({},o)),r[t]=o),o},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,aR(t)?tf(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){aR(e)?tf(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?tf(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;qw(n,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){sf(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:sR(this.dimensions,this._getDimInfo,this),this.hostModel)),rR(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];mf(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Pf(arguments)))})},e.internalField=(JI=function(e){var t=e._invertedIndicesMap;sf(t,(function(n,r){var o=e._dimInfos[r],i=o.ordinalMeta,a=e._store;if(i){n=t[r]=new lR(i.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[t]=s}})),e}();const hR=dR;function pR(e,t){K_(e)||(e=X_(e));var n=(t=t||{}).coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],o=jf(),i=[],a=function(e,t,n,r){var o=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return sf(t,(function(e){var t;bf(e)&&(t=e.dimsDef)&&(o=Math.max(o,t.length))})),o}(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&PI(a),l=r===e.dimensionsDefine,u=l?TI(e):MI(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,a));for(var d=jf(c),h=new NM(a),p=0;p0&&(r.name=o+(i-1)),i++,t.set(o,i)}}(i),new CI({source:e,dimensions:i,fullDimensionCount:a,dimensionOmitted:s})}function fR(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}var mR=function(e){this.coordSysDims=[],this.axisMap=jf(),this.categoryAxisMap=jf(),this.coordSysName=e};var gR={cartesian2d:function(e,t,n,r){var o=e.getReferringComponents("xAxis",Mb).models[0],i=e.getReferringComponents("yAxis",Mb).models[0];t.coordSysDims=["x","y"],n.set("x",o),n.set("y",i),vR(o)&&(r.set("x",o),t.firstCategoryDimIndex=0),vR(i)&&(r.set("y",i),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var o=e.getReferringComponents("singleAxis",Mb).models[0];t.coordSysDims=["single"],n.set("single",o),vR(o)&&(r.set("single",o),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var o=e.getReferringComponents("polar",Mb).models[0],i=o.findAxisModel("radiusAxis"),a=o.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",a),vR(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),vR(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 o=e.ecModel,i=o.getComponent("parallel",e.get("parallelIndex")),a=t.coordSysDims=i.dimensions.slice();sf(i.parallelAxisIndex,(function(e,i){var s=o.getComponent("parallelAxis",e),l=a[i];n.set(l,s),vR(s)&&(r.set(l,s),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=i))}))}};function vR(e){return"category"===e.get("type")}const yR=function(e,t,n){n=n||{};var r,o=t.getSourceManager(),i=!1;e?(i=!0,r=X_(e)):i=(r=o.getSource()).sourceFormat===jC;var a=function(e){var t=e.get("coordinateSystem"),n=new mR(t),r=gR[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}(t),s=function(e,t){var n,r=e.get("coordinateSystem"),o=y_.get(r);return t&&t.coordSysDims&&(n=lf(t.coordSysDims,(function(e){var n={name:e},r=t.axisMap.get(e);if(r){var o=r.get("type");n.type=function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}(o)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(t,a),l=n.useEncodeDefaulter,u=mf(l)?l:l?pf(YC,s,t):null,c=pR(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i}),d=function(e,t,n){var r,o;return n&&sf(e,(function(e,i){var a=e.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=i),e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(o=!0)})),o||null==r||(e[r].otherDims.itemName=0),r}(c.dimensions,n.createInvertedIndices,a),h=i?null:o.getSharedDataStore(c),p=DI(t,{schema:c,store:h}),f=new hR(c,t);f.setCalculationInfo(p);var m=null!=d&&function(e){if(e.sourceFormat===jC){return!ff(pb(function(e){var t=0;for(;ts){c=(p+u)/2;break}1===h&&(d=f-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),i[n]=e.toGlobalCoord(c)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;i[u]+=s+l/2}return i}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}(xT);xT.registerClass(bR);const xR=bR;var wR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.getInitialData=function(){return yR(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=Pk(xR.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}(xR);const SR=wR;function kR(e,t,n,r,o){var i=e.getArea(),a=i.x,s=i.y,l=i.width,u=i.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 d=new Aw({shape:{x:a,y:s,width:l,height:u}});if(t){var h=e.getBaseAxis(),p=h.isHorizontal(),f=h.inverse;p?(f&&(d.shape.x+=l),d.shape.width=0):(f||(d.shape.y+=u),d.shape.height=0);var m=mf(o)?function(e){o(e,d)}:null;US(d,{shape:{width:l,height:u,x:a,y:s}},n,null,r,m)}return d}function CR(e,t,n){var r=e.getArea(),o=Hy(r.r0,1),i=Hy(r.r,1),a=new lP({shape:{cx:Hy(e.cx,1),cy:Hy(e.cy,1),r0:o,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=o,US(a,{shape:{endAngle:r.endAngle,r:i}},n));return a}function _R(e,t,n,r,o){return e?"polar"===e.type?CR(e,t,n):"cartesian2d"===e.type?kR(e,t,n,r,o):null:null}var MR=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};const TR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return Ap(t,e),t.prototype.getDefaultShape=function(){return new MR},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,o=Math.max(t.r0||0,0),i=Math.max(t.r,0),a=.5*(i-o),s=o+a,l=t.startAngle,u=t.endAngle,c=t.clockwise,d=2*Math.PI,h=c?u-l=0&&r.push(t[i])}return r.join(" ")}function OR(e,t,n){return t*Math.sin(e)*(n?-1:1)}function IR(e,t,n){return t*Math.cos(e)*(n?1:-1)}function RR(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;ff(r)||(r=[r,r,r,r]);var o=Math.abs(t.r||0-t.r0||0);return{cornerRadius:lf(r,(function(e){return Sy(e,o)}))}}var ER=Math.max,LR=Math.min;var ZR=function(e){function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}return Ap(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var o=e.get("coordinateSystem");("cartesian2d"===o||"polar"===o)&&(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){bD(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 o,i=this.group,a=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?o=u.isHorizontal():"polar"===l.type&&(o="angle"===u.dim);var c=e.isAnimationEnabled()?e:null,d=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();0;if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);d&&this._enableRealtimeSort(d,a,n);var h=e.get("clip",!0)||d,p=function(e,t){var n=e.getArea&&e.getArea();if(PR(e,"cartesian2d")){var r=e.getBaseAxis();if("category"!==r.type||!r.onBand){var o=t.getLayout("bandWidth");r.isHorizontal()?(n.x-=o,n.width+=2*o):(n.y-=o,n.height+=2*o)}}return n}(l,a);i.removeClipPath();var f=e.get("roundCap",!0),m=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),v=g.get("borderRadius")||0,y=[],b=this._backgroundEls,x=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function S(e){var t=HR[l.type](a,e),n=function(e,t,n){var r="polar"===e.type?lP:Aw;return new r({shape:XR(t,n,e),silent:!0,z2:0})}(l,o,t);return n.useStyle(g.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",v):n.setShape("cornerRadius",v),y[e]=n,n}a.diff(s).add((function(t){var n=a.getItemModel(t),r=HR[l.type](a,t,n);if(m&&S(t),a.hasValue(t)&&$R[l.type](r)){var s=!1;h&&(s=NR[l.type](p,r));var g=jR[l.type](e,a,t,r,o,c,u.model,!1,f);d&&(g.forceLabelAnimation=!0),UR(g,a,t,n,r,e,o,"polar"===l.type),x?g.attr({shape:r}):d?FR(d,c,g,r,t,o,!1,!1):US(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=s}})).update((function(t,n){var r=a.getItemModel(t),k=HR[l.type](a,t,r);if(m){var C=void 0;0===b.length?C=S(n):((C=b[n]).useStyle(g.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var _=HR[l.type](a,t);WS(C,{shape:XR(o,_,l)},c,t)}var M=s.getItemGraphicEl(n);if(a.hasValue(t)&&$R[l.type](k)){var T=!1;if(h&&(T=NR[l.type](p,k))&&i.remove(M),M?XS(M):M=jR[l.type](e,a,t,k,o,c,u.model,!!M,f),d&&(M.forceLabelAnimation=!0),w){var P=M.getTextContent();if(P){var D=ck(P);null!=D.prevValue&&(D.prevValue=D.value)}}else UR(M,a,t,r,k,e,o,"polar"===l.type);x?M.attr({shape:k}):d?FR(d,c,M,k,t,o,!0,w):WS(M,{shape:k},e,t,null),a.setItemGraphicEl(t,M),M.ignore=T,i.add(M)}else i.remove(M)})).remove((function(t){var n=s.getItemGraphicEl(t);n&&YS(n,e,t)})).execute();var k=this._backgroundGroup||(this._backgroundGroup=new Zy);k.removeAll();for(var C=0;Ci)return!0;i=u}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),o=Math.max(0,r[0]),i=Math.min(r[1],n.getOrdinalMeta().categories.length-1);o<=i;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var o=this._dataSort(e,n,t);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,o=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:o})},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){YS(t,e,Uw(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(PD),NR={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 o=e.x+e.width,i=e.y+e.height,a=ER(t.x,e.x),s=LR(t.x+t.width,o),l=ER(t.y,e.y),u=LR(t.y+t.height,i),c=so?s:a,t.y=d&&l>i?u:l,t.width=c?0:s-a,t.height=d?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var o=LR(t.r,e.r),i=ER(t.r0,e.r0);t.r=o,t.r0=i;var a=o-i<0;if(n<0){r=t.r;t.r=t.r0,t.r0=r}return a}},jR={cartesian2d:function(e,t,n,r,o,i,a,s,l){var u=new Aw({shape:tf({},r),z2:1});(u.__dataIndex=n,u.name="item",i)&&(u.shape[o?"height":"width"]=0);return u},polar:function(e,t,n,r,o,i,a,s,l){var u=!o&&l?TR:lP,c=new u({shape:r,z2:1});c.name="item";var d,h,p=WR(o);if(c.calculateTextPosition=(d=p,h=({isRoundCap:u===TR}||{}).isRoundCap,function(e,t,n){var r=t.position;if(!r||r instanceof Array)return ky(e,t,n);var o=d(r),i=null!=t.distance?t.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,f=a.startAngle,m=a.endAngle,g=(f+m)/2,v=h?Math.abs(u-c)/2:0,y=Math.cos,b=Math.sin,x=s+u*y(f),w=l+u*b(f),S="left",k="top";switch(o){case"startArc":x=s+(c-i)*y(g),w=l+(c-i)*b(g),S="center",k="top";break;case"insideStartArc":x=s+(c+i)*y(g),w=l+(c+i)*b(g),S="center",k="bottom";break;case"startAngle":x=s+p*y(f)+OR(f,i+v,!1),w=l+p*b(f)+IR(f,i+v,!1),S="right",k="middle";break;case"insideStartAngle":x=s+p*y(f)+OR(f,-i+v,!1),w=l+p*b(f)+IR(f,-i+v,!1),S="left",k="middle";break;case"middle":x=s+p*y(g),w=l+p*b(g),S="center",k="middle";break;case"endArc":x=s+(u+i)*y(g),w=l+(u+i)*b(g),S="center",k="bottom";break;case"insideEndArc":x=s+(u-i)*y(g),w=l+(u-i)*b(g),S="center",k="top";break;case"endAngle":x=s+p*y(m)+OR(m,i+v,!0),w=l+p*b(m)+IR(m,i+v,!0),S="left",k="middle";break;case"insideEndAngle":x=s+p*y(m)+OR(m,-i+v,!0),w=l+p*b(m)+IR(m,-i+v,!0),S="right",k="middle";break;default:return ky(e,t,n)}return(e=e||{}).x=x,e.y=w,e.align=S,e.verticalAlign=k,e}),i){var f=o?"r":"endAngle",m={};c.shape[f]=o?r.r0:r.startAngle,m[f]=r[f],(s?WS:US)(c,{shape:m},i)}return c}};function FR(e,t,n,r,o,i,a,s){var l,u;i?(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?WS:US)(n,{shape:l},t,o,null),(a?WS:US)(n,{shape:u},t?e.baseAxis.model:null,o)}function zR(e,t){for(var n=0;n0?1:-1,a=r.height>0?1:-1;return{x:r.x+i*o/2,y:r.y+a*o/2,width:r.width-i*o,height:r.height-a*o}},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 WR(e){return function(e){var t=e?"Arc":"Angle";return function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}(e)}function UR(e,t,n,r,o,i,a,s){var l=t.getItemVisual(n,"style");if(s){if(!i.get("roundCap")){var u=e.shape;tf(u,RR(r.getModel("itemStyle"),u,!0)),e.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",c)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var h=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?o.height>=0?"bottom":"top":o.width>=0?"right":"left",p=nk(r);tk(e,p,{labelFetcher:i,labelDataIndex:n,defaultText:DR(i.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var f=e.getTextContent();if(s&&f){var m=r.get(["label","position"]);e.textConfig.inside="middle"===m||null,function(e,t,n,r){if(yf(r))e.setTextConfig({rotation:r});else if(ff(t))e.setTextConfig({rotation:0});else{var o,i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,s=i.clockwise?i.endAngle:i.startAngle,l=(a+s)/2,u=n(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return void e.setTextConfig({rotation:0})}var c=1.5*Math.PI-o;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}}(e,"outside"===m?h:m,WR(a),r.get(["label","rotate"]))}dk(f,p,i.getRawValue(n),(function(e){return AR(t,e)}));var g=r.getModel(["emphasis"]);ES(e,g.get("focus"),g.get("blurScope"),g.get("disabled")),NS(e,r),function(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}(o)&&(e.style.fill="none",e.style.stroke="none",sf(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var qR=function(){},GR=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return Ap(t,e),t.prototype.getDefaultShape=function(){return new qR},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,o=1-this.baseDimIdx,i=[],a=[],s=this.barWidth,l=0;l=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);Uw(this).dataIndex=t>=0?t:null}),30,!1);function XR(e,t,n){if(PR(n,"cartesian2d")){var r=t,o=n.getArea();return{x:e?r.x:o.x,y:e?o.y:r.y,width:e?r.width:o.width,height:e?o.height:r.height}}var i=t;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:e?o.r0:i.r0,r:e?o.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:2*Math.PI}}const QR=ZR;var JR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Ap(t,e),t.prototype.getInitialData=function(e){return yR(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Zy,n=ZA("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"),o=this.getData().getVisual("symbolRotate"),i="none"===r?"circle":r,a=.8*e.itemHeight,s=ZA(i,(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?o:e.iconRotate||0;return s.rotation=l*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),i.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}(xT);const eE=JR;var tE=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.updateData(t,n,r,o),i}return Ap(t,e),t.prototype._createSymbol=function(e,t,n,r,o){this.removeAll();var i=ZA(e,-1,-1,2,2,null,o);i.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),i.drift=nE,this._symbolType=e,this.add(i)},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(){xS(this.childAt(0))},t.prototype.downplay=function(){wS(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,o){this.silent=!1;var i=e.getItemVisual(n,"symbol")||"circle",a=e.hostModel,s=t.getSymbolSize(e,n),l=i!==this._symbolType,u=o&&o.disableAnimation;if(l){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(i,e,n,s,c)}else{(h=this.childAt(0)).silent=!1;var d={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(d):WS(h,d,a,n),XS(h)}if(this._updateCommon(e,n,s,r,o),l){var h=this.childAt(0);if(!u){d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,US(h,d,a,n)}}u&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,t,n,r,o){var i,a,s,l,u,c,d,h,p,f=this.childAt(0),m=e.hostModel;if(r&&(i=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,d=r.labelStatesModels,h=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),v=g.getModel("emphasis");i=v.getModel("itemStyle").getItemStyle(),s=g.getModel(["select","itemStyle"]).getItemStyle(),a=g.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),c=v.get("disabled"),d=nk(g),h=v.getShallow("scale"),p=g.getShallow("cursor")}var y=e.getItemVisual(t,"symbolRotate");f.attr("rotation",(y||0)*Math.PI/180||0);var b=jA(e.getItemVisual(t,"symbolOffset"),n);b&&(f.x=b[0],f.y=b[1]),p&&f.attr("cursor",p);var x=e.getItemVisual(t,"style"),w=x.fill;if(f instanceof Sw){var S=f.style;f.useStyle(tf({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},x))}else f.__isEmptyBrush?f.useStyle(tf({},x)):f.useStyle(x),f.style.decal=null,f.setColor(w,o&&o.symbolInnerColor),f.style.strokeNoScale=!0;var k=e.getItemVisual(t,"liftZ"),C=this._z2;null!=k?null==C&&(this._z2=f.z2,f.z2+=k):null!=C&&(f.z2=C,this._z2=null);var _=o&&o.useNameLabel;tk(f,d,{labelFetcher:m,labelDataIndex:t,defaultText:function(t){return _?e.getName(t):DR(e,t)},inheritColor:w,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var M=f.ensureState("emphasis");M.style=i,f.ensureState("select").style=s,f.ensureState("blur").style=a;var T=null==h||!0===h?Math.max(1.1,3/this._sizeY):isFinite(h)&&h>0?+h:1;M.scaleX=this._sizeX*T,M.scaleY=this._sizeY*T,this.setSymbolScale(1),ES(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),o=Uw(this).dataIndex,i=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&GS(a,{style:{opacity:0}},t,{dataIndex:o,removeOpt:i,cb:function(){r.removeTextContent()}})}else r.removeTextContent();GS(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:o,cb:e,removeOpt:i})},t.getSymbolSize=function(e,t){return NA(e.getItemVisual(t,"symbolSize"))},t}(Zy);function nE(e,t){this.parent.drift(e,t)}const rE=tE;function oE(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 iE(e){return null==e||bf(e)||(e={isIgnore:e}),e||{}}function aE(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:nk(t),cursorStyle:t.get("cursor")}}var sE=function(){function e(e){this.group=new Zy,this._SymbolCtor=e||rE}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=iE(t);var n=this.group,r=e.hostModel,o=this._data,i=this._SymbolCtor,a=t.disableAnimation,s=aE(e),l={disableAnimation:a},u=t.getSymbolPoint||function(t){return e.getItemLayout(t)};o||n.removeAll(),e.diff(o).add((function(r){var o=u(r);if(oE(e,o,r,t)){var a=new i(e,r,s,l);a.setPosition(o),e.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,d){var h=o.getItemGraphicEl(d),p=u(c);if(oE(e,p,c,t)){var f=e.getItemVisual(c,"symbol")||"circle",m=h&&h.getSymbolType&&h.getSymbolType();if(!h||m&&m!==f)n.remove(h),(h=new i(e,c,s,l)).setPosition(p);else{h.updateData(e,c,s,l);var g={x:p[0],y:p[1]};a?h.attr(g):WS(h,g,r)}n.add(h),e.setItemGraphicEl(c,h)}else n.remove(h)})).remove((function(e){var t=o.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=aE(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=iE(n);for(var o=e.start;o0?n=r[0]:r[1]<0&&(n=r[1]);return n}(o,n),a=r.dim,s=o.dim,l=t.mapDimension(s),u=t.mapDimension(a),c="x"===s||"radius"===s?1:0,d=lf(e.dimensions,(function(e){return t.mapDimension(e)})),h=!1,p=t.getCalculationInfo("stackResultDimension");return AI(t,d[0])&&(h=!0,d[0]=p),AI(t,d[1])&&(h=!0,d[1]=p),{dataDimsForPoint:d,valueStart:i,valueAxisDim:s,baseAxisDim:a,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function cE(e,t,n,r){var o=NaN;e.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(o)&&(o=e.valueStart);var i=e.baseDataOffset,a=[];return a[i]=n.get(e.baseDim,r),a[1-i]=o,t.dataToPoint(a)}var dE=Math.min,hE=Math.max;function pE(e,t){return isNaN(e)||isNaN(t)}function fE(e,t,n,r,o,i,a,s,l){for(var u,c,d,h,p,f,m=n,g=0;g=o||m<0)break;if(pE(v,y)){if(l){m+=i;continue}break}if(m===n)e[i>0?"moveTo":"lineTo"](v,y),d=v,h=y;else{var b=v-u,x=y-c;if(b*b+x*x<.5){m+=i;continue}if(a>0){for(var w=m+i,S=t[2*w],k=t[2*w+1];S===v&&k===y&&g=r||pE(S,k))p=v,f=y;else{M=S-u,T=k-c;var A=v-u,O=S-v,I=y-c,R=k-y,E=void 0,L=void 0;if("x"===s){var Z=M>0?1:-1;p=v-Z*(E=Math.abs(A))*a,f=y,P=v+Z*(L=Math.abs(O))*a,D=y}else if("y"===s){var N=T>0?1:-1;p=v,f=y-N*(E=Math.abs(I))*a,P=v,D=y+N*(L=Math.abs(R))*a}else E=Math.sqrt(A*A+I*I),p=v-M*a*(1-(_=(L=Math.sqrt(O*O+R*R))/(L+E))),f=y-T*a*(1-_),D=y+T*a*_,P=dE(P=v+M*a*_,hE(S,v)),D=dE(D,hE(k,y)),P=hE(P,dE(S,v)),f=y-(T=(D=hE(D,dE(k,y)))-y)*E/L,p=dE(p=v-(M=P-v)*E/L,hE(u,v)),f=dE(f,hE(c,y)),P=v+(M=v-(p=hE(p,dE(u,v))))*L/E,D=y+(T=y-(f=hE(f,dE(c,y))))*L/E}e.bezierCurveTo(d,h,p,f,v,y),d=P,h=D}else e.lineTo(v,y)}u=v,c=y,m+=i}return g}var mE=function(){this.smooth=0,this.smoothConstraint=!0},gE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polyline",n}return Ap(t,e),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new mE},t.prototype.buildPath=function(e,t){var n=t.points,r=0,o=n.length/2;if(t.connectNulls){for(;o>0&&pE(n[2*o-2],n[2*o-1]);o--);for(;r=0){var g=a?(c-r)*m+r:(u-n)*m+n;return a?[e,g]:[g,e]}n=u,r=c;break;case i.C:u=o[l++],c=o[l++],d=o[l++],h=o[l++],p=o[l++],f=o[l++];var v=a?Eg(n,u,d,p,e,s):Eg(r,c,h,f,e,s);if(v>0)for(var y=0;y=0){g=a?Ig(r,c,h,f,b):Ig(n,u,d,p,b);return a?[e,g]:[g,e]}}n=p,r=f}}},t}(mw),vE=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t}(mE),yE=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-polygon",n}return Ap(t,e),t.prototype.getDefaultShape=function(){return new vE},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,o=0,i=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;i>0&&pE(n[2*i-2],n[2*i-1]);i--);for(;o=0;a--){var s=e.getDimensionInfo(r[a].dimension);if("x"===(o=s&&s.coordDim)||"y"===o){i=r[a];break}}if(i){var l=t.getAxis(o),u=lf(i.stops,(function(e){return{coord:l.toGlobalCoord(l.dataToCoord(e.value)),color:e.color}})),c=u.length,d=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var h=function(e,t){var n,r,o=[],i=e.length;function a(e,t,n){var r=e.coord;return{coord:n,color:dv((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;st){r?o.push(a(r,l,t)):n&&o.push(a(n,l,0),a(n,l,t));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),r=l}}return o}(u,"x"===o?n.getWidth():n.getHeight()),p=h.length;if(!p&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var f=h[0].coord-10,m=h[p-1].coord+10,g=m-f;if(g<.001)return"transparent";sf(h,(function(e){e.offset=(e.coord-f)/g})),h.push({offset:p?h[p-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:p?h[0].offset:.5,color:d[0]||"transparent"});var v=new EP(0,0,0,0,h,!0);return v[o]=f,v[o+"2"]=m,v}}}function _E(e,t,n){var r=e.get("showAllSymbol"),o="auto"===r;if(!r||o){var i=n.getAxesByScale("ordinal")[0];if(i&&(!o||!function(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var o=t.count(),i=Math.max(1,Math.round(o/5)),a=0;ar)return!1;return!0}(i,t))){var a=t.mapDimension(i.dim),s={};return sf(i.getViewLabels(),(function(e){var t=i.scale.getRawOrdinalNumber(e.tickValue);s[t]=1})),function(e){return!s.hasOwnProperty(t.get(a,e))}}}}function ME(e,t){return[e[2*t],e[2*t+1]]}function TE(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&"bolder"===e.get(["emphasis","lineStyle","width"]))&&(p.getState("emphasis").style.lineWidth=+p.style.lineWidth+1);Uw(p).seriesIndex=e.seriesIndex,ES(p,A,O,I);var R=SE(e.get("smooth")),E=e.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:E,connectNulls:S}),f){var L=a.getCalculationInfo("stackedOnSeries"),Z=0;f.useStyle(nf(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),L&&(Z=SE(L.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:Z,smoothMonotone:E,connectNulls:S}),NS(f,e,"areaStyle"),Uw(f).seriesIndex=e.seriesIndex,ES(f,A,O,I)}var N=function(e){r._changePolyState(e)};a.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=N)})),this._polyline.onHoverStateChange=N,this._data=a,this._coordSys=o,this._stackedOnPoints=x,this._points=u,this._step=M,this._valueOrigin=y,e.get("triggerLineEvent")&&(this.packEventData(e,p),f&&this.packEventData(e,f))},t.prototype.packEventData=function(e,t){Uw(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 o=e.getData(),i=wb(o,r);if(this._changePolyState("emphasis"),!(i instanceof Array)&&null!=i&&i>=0){var a=o.getLayout("points"),s=o.getItemGraphicEl(i);if(!s){var l=a[2*i],u=a[2*i+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=e.get("zlevel")||0,d=e.get("z")||0;(s=new rE(o,i)).x=l,s.y=u,s.setZ(c,d);var h=s.getSymbolPath().getTextContent();h&&(h.zlevel=c,h.z=d,h.z2=this._polyline.z2+1),s.__temp=!0,o.setItemGraphicEl(i,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else PD.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var o=e.getData(),i=wb(o,r);if(this._changePolyState("normal"),null!=i&&i>=0){var a=o.getItemGraphicEl(i);a&&(a.__temp?(o.setItemGraphicEl(i,null),this.group.remove(a)):a.downplay())}else PD.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;mS(this._polyline,e),t&&mS(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new gE({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 yE({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,o,i=t.getBaseAxis(),a=i.inverse;"cartesian2d"===t.type?(r=i.isHorizontal(),o=!1):"polar"===t.type&&(r="angle"===i.dim,o=!0);var s=e.hostModel,l=s.get("animationDuration");mf(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=mf(u)?u(null):u;e.eachItemGraphicEl((function(e,i){var s=e;if(s){var d=[e.x,e.y],h=void 0,p=void 0,f=void 0;if(n)if(o){var m=n,g=t.pointToCoord(d);r?(h=m.startAngle,p=m.endAngle,f=-g[1]/180*Math.PI):(h=m.r0,p=m.r,f=g[0])}else{var v=n;r?(h=v.x,p=v.x+v.width,f=e.x):(h=v.y+v.height,p=v.y,f=e.y)}var y=p===h?0:(f-h)/(p-h);a&&(y=1-y);var b=mf(u)?u(i):l*y+c,x=s.getSymbolPath(),w=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:b}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:b}),x.disableLabelAnimation=!0}}))},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel("endLabel");if(TE(e)){var o=e.getData(),i=this._polyline,a=o.getLayout("points");if(!a)return i.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Ww({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0);var l=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}(a);l>=0&&(tk(i,nk(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:l,defaultText:function(e,t,n){return null!=n?AR(o,n):DR(o,e)},enableTextSetter:!0},function(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),o=n.inverse,i=r?o?"right":"left":"center",a=r?"middle":o?"top":"bottom";return{normal:{align:e.get("align")||i,verticalAlign:e.get("verticalAlign")||a}}}(r,t)),i.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,t,n,r,o,i,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,d=c.get("connectNulls"),h=i.get("precision"),p=i.get("distance")||0,f=a.getBaseAxis(),m=f.isHorizontal(),g=f.inverse,v=t.shape,y=g?m?v.x:v.y+v.height:m?v.x+v.width:v.y,b=(m?p:0)*(g?-1:1),x=(m?0:-p)*(g?-1:1),w=m?"x":"y",S=function(e,t,n){for(var r,o,i=e.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=t||r>=t&&o<=t){l=u;break}s=u,r=o}else r=o;return{range:[s,l],t:(t-r)/(o-r)}}(u,y,w),k=S.range,C=k[1]-k[0],_=void 0;if(C>=1){if(C>1&&!d){var M=ME(u,k[0]);s.attr({x:M[0]+b,y:M[1]+x}),o&&(_=c.getRawValue(k[0]))}else{(M=l.getPointOn(y,w))&&s.attr({x:M[0]+b,y:M[1]+x});var T=c.getRawValue(k[0]),P=c.getRawValue(k[1]);o&&(_=Ab(n,h,T,P,S.t))}r.lastFrameIndex=k[0]}else{var D=1===e||r.lastFrameIndex>0?k[0]:0;M=ME(u,D);o&&(_=c.getRawValue(D)),s.attr({x:M[0]+b,y:M[1]+x})}if(o){var A=ck(s);"function"==typeof A.setLabelText&&A.setLabelText(_)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,o,i,a){var s=this._polyline,l=this._polygon,u=e.hostModel,c=function(e,t,n,r,o,i,a){for(var s=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),l=[],u=[],c=[],d=[],h=[],p=[],f=[],m=uE(o,t,a),g=e.getLayout("points")||[],v=t.getLayout("points")||[],y=0;y3e3||l&&wE(h,f)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:f})));s.shape.__points=c.current,s.shape.points=d;var m={shape:{points:p}};c.current!==d&&(m.shape.__points=c.next),s.stopAnimation(),WS(s,m,u),l&&(l.setShape({points:d,stackedOnPoints:h}),l.stopAnimation(),WS(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var g=[],v=c.status,y=0;y=o/3?1:2),l=t.y-r(a)*i*(i>=o/3?1:2);a=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(a)*i,t.y+r(a)*i),e.lineTo(t.x+n(t.angle)*o,t.y+r(t.angle)*o),e.lineTo(t.x-n(a)*i,t.y-r(a)*i),e.lineTo(s,l)},t}(mw);function EE(e,t){var n=null==e?"":e+"";return t&&(gf(t)?n=t.replace("{value}",n):mf(t)&&(n=t(e))),n}var LE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r=e.get(["axisLine","lineStyle","color"]),o=function(e,t){var n=e.get("center"),r=t.getWidth(),o=t.getHeight(),i=Math.min(r,o);return{cx:$y(n[0],t.getWidth()),cy:$y(n[1],t.getHeight()),r:$y(e.get("radius"),i/2)}}(e,n);this._renderMain(e,t,n,r,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,o){var i=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")?TR:lP,d=u.get("show"),h=u.getModel("lineStyle"),p=h.get("width"),f=[s,l];qx(f,!a);for(var m=(l=f[1])-(s=f[0]),g=s,v=[],y=0;d&&y=e&&(0===t?0:r[t-1][0])Math.PI/2&&(j+=Math.PI):"tangential"===N?j=-C-Math.PI/2:yf(N)&&(j=N*Math.PI/180),0===j?d.add(new Ww({style:rk(b,{text:R,x:L,y:Z,verticalAlign:c<-.8?"top":c>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:E}),silent:!0})):d.add(new Ww({style:rk(b,{text:R,x:L,y:Z,verticalAlign:"middle",align:"center"},{inheritColor:E}),silent:!0,originX:L,originY:Z,rotation:j}))}if(y.get("show")&&A!==x){I=(I=y.get("distance"))?I+l:l;for(var F=0;F<=w;F++){u=Math.cos(C),c=Math.sin(C);var z=new SP({shape:{x1:u*(f-I)+h,y1:c*(f-I)+p,x2:u*(f-k-I)+h,y2:c*(f-k-I)+p},silent:!0,style:P});"auto"===P.stroke&&z.setStyle({stroke:r((A+F/w)/x)}),d.add(z),C+=M}C-=M}else C+=_}},t.prototype._renderPointer=function(e,t,n,r,o,i,a,s,l){var u=this.group,c=this._data,d=this._progressEls,h=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),m=f.get("show"),g=e.getData(),v=g.mapDimension("value"),y=+e.get("min"),b=+e.get("max"),x=[y,b],w=[i,a];function S(t,n){var r,i=g.getItemModel(t).getModel("pointer"),a=$y(i.get("width"),o.r),s=$y(i.get("length"),o.r),l=e.get(["pointer","icon"]),u=i.get("offsetCenter"),c=$y(u[0],o.r),d=$y(u[1],o.r),h=i.get("keepAspect");return(r=l?ZA(l,c-a/2,d-s,a,s,null,h):new RE({shape:{angle:-Math.PI/2,width:a,r:s,x:c,y:d}})).rotation=-(n+Math.PI/2),r.x=o.cx,r.y=o.cy,r}function k(e,t){var n=f.get("roundCap")?TR:lP,r=f.get("overlap"),a=r?f.get("width"):l/g.count(),u=r?o.r-a:o.r-(e+1)*a,c=r?o.r:o.r-e*a,d=new n({shape:{startAngle:i,endAngle:t,cx:o.cx,cy:o.cy,clockwise:s,r0:u,r:c}});return r&&(d.z2=b-g.get(v,e)%b),d}(m||p)&&(g.diff(c).add((function(t){var n=g.get(v,t);if(p){var r=S(t,i);US(r,{rotation:-((isNaN(+n)?w[0]:Vy(n,x,w,!0))+Math.PI/2)},e),u.add(r),g.setItemGraphicEl(t,r)}if(m){var o=k(t,i),a=f.get("clip");US(o,{shape:{endAngle:Vy(n,x,w,a)}},e),u.add(o),qw(e.seriesIndex,g.dataType,t,o),h[t]=o}})).update((function(t,n){var r=g.get(v,t);if(p){var o=c.getItemGraphicEl(n),a=o?o.rotation:i,s=S(t,a);s.rotation=a,WS(s,{rotation:-((isNaN(+r)?w[0]:Vy(r,x,w,!0))+Math.PI/2)},e),u.add(s),g.setItemGraphicEl(t,s)}if(m){var l=d[n],y=k(t,l?l.shape.endAngle:i),b=f.get("clip");WS(y,{shape:{endAngle:Vy(r,x,w,b)}},e),u.add(y),qw(e.seriesIndex,g.dataType,t,y),h[t]=y}})).execute(),g.each((function(e){var t=g.getItemModel(e),n=t.getModel("emphasis"),o=n.get("focus"),i=n.get("blurScope"),a=n.get("disabled");if(p){var s=g.getItemGraphicEl(e),l=g.getItemVisual(e,"style"),u=l.fill;if(s instanceof Sw){var c=s.style;s.useStyle(tf({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(Vy(g.get(v,e),x,[0,1],!0))),s.z2EmphasisLift=0,NS(s,t),ES(s,o,i,a)}if(m){var d=h[e];d.useStyle(g.getItemVisual(e,"style")),d.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),d.z2EmphasisLift=0,NS(d,t),ES(d,o,i,a)}})),this._progressEls=h)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),o=n.get("icon"),i=n.get("offsetCenter"),a=n.get("keepAspect"),s=ZA(o,t.cx-r/2+$y(i[0],t.r),t.cy-r/2+$y(i[1],t.r),r,r,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,o){var i=this,a=e.getData(),s=a.mapDimension("value"),l=+e.get("min"),u=+e.get("max"),c=new Zy,d=[],h=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);a.diff(this._data).add((function(e){d[e]=new Ww({silent:!0}),h[e]=new Ww({silent:!0})})).update((function(e,t){d[e]=i._titleEls[t],h[e]=i._detailEls[t]})).execute(),a.each((function(t){var n=a.getItemModel(t),i=a.get(s,t),m=new Zy,g=r(Vy(i,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),b=o.cx+$y(y[0],o.r),x=o.cy+$y(y[1],o.r);(P=d[t]).attr({z2:f?0:2,style:rk(v,{x:b,y:x,text:a.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:g})}),m.add(P)}var w=n.getModel("detail");if(w.get("show")){var S=w.get("offsetCenter"),k=o.cx+$y(S[0],o.r),C=o.cy+$y(S[1],o.r),_=$y(w.get("width"),o.r),M=$y(w.get("height"),o.r),T=e.get(["progress","show"])?a.getItemVisual(t,"style").fill:g,P=h[t],D=w.get("formatter");P.attr({z2:f?0:2,style:rk(w,{x:k,y:C,text:EE(i,D),width:isNaN(_)?null:_,height:isNaN(M)?null:M,align:"center",verticalAlign:"middle"},{inheritColor:T})}),dk(P,{normal:w},i,(function(e){return EE(e,D)})),p&&function(e,t,n,r,o){var i=ck(e);if(i.valueAnimation&&i.prevValue!==i.value){var a=i.defaultInterpolatedText,s=Mf(i.interpolatedValue,i.prevValue),l=i.value;e.percent=0,(null==i.prevValue?US:WS)(e,{percent:1},r,t,null,(function(r){var u=Ab(n,i.precision,s,l,r);i.interpolatedValue=1===r?null:u;var c=ek({labelDataIndex:t,labelFetcher:o,defaultText:a?a(u):u+""},i.statesModels,u);JS(e,c)}))}}(P,t,a,e,{getFormattedLabel:function(e,t,n,r,o,a){return EE(a?a.interpolatedValue:i,D)}}),m.add(P)}c.add(m)})),this.group.add(c),this._titleEls=d,this._detailEls=h},t.type="gauge",t}(PD);const ZE=LE;function NE(e,t,n){t=ff(t)&&{coordDimensions:t}||tf({encodeDefine:e.getEncode()},t);var r=e.getSource(),o=pR(r,t).dimensions,i=new hR(o,e);return i.initData(r,n),i}var jE=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return Ap(t,e),t.prototype.getInitialData=function(e,t){return NE(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}(xT);const FE=jE;var zE=2*Math.PI,BE=Math.PI/180;function VE(e,t){return MC(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function $E(e,t){var n=VE(e,t),r=e.get("center"),o=e.get("radius");ff(o)||(o=[0,o]);var i,a,s=$y(n.width,t.getWidth()),l=$y(n.height,t.getHeight()),u=Math.min(s,l),c=$y(o[0],u/2),d=$y(o[1],u/2),h=e.coordinateSystem;if(h){var p=h.dataToPoint(r);i=p[0]||0,a=p[1]||0}else ff(r)||(r=[r,r]),i=$y(r[0],s)+n.x,a=$y(r[1],l)+n.y;return{cx:i,cy:a,r0:c,r:d}}function HE(e,t,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),r=t.mapDimension("value"),o=VE(e,n),i=$E(e,n),a=i.cx,s=i.cy,l=i.r,u=i.r0,c=-e.get("startAngle")*BE,d=e.get("endAngle"),h=e.get("padAngle")*BE;d="auto"===d?c-zE:-d*BE;var p=e.get("minAngle")*BE+h,f=0;t.each(r,(function(e){!isNaN(e)&&f++}));var m=t.getSum(r),g=Math.PI/(m||f)*2,v=e.get("clockwise"),y=e.get("roseType"),b=e.get("stillShowZeroSum"),x=t.getDataExtent(r);x[0]=0;var w=v?1:-1,S=[c,d],k=w*h/2;qx(S,!v),c=S[0],d=S[1];var C=Math.abs(d-c),_=C,M=0,T=c;if(t.setLayout({viewRect:o,r:l}),t.each(r,(function(e,n){var r;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:y?NaN:l});else{(r="area"!==y?0===m&&b?g:e*g:C/f)r?c=i=T+w*r/2:(i=T+k,c=o-k),t.setItemLayout(n,{angle:r,startAngle:i,endAngle:c,clockwise:v,cx:a,cy:s,r0:u,r:y?Vy(e,x,[u,l]):l}),T=o}})),_0){t=t/180*Math.PI,UE.fromArray(e[0]),qE.fromArray(e[1]),GE.fromArray(e[2]),zm.sub(KE,UE,qE),zm.sub(YE,GE,qE);var n=KE.len(),r=YE.len();if(!(n<.001||r<.001)){KE.scale(1/n),YE.scale(1/r);var o=KE.dot(YE);if(Math.cos(t)1&&zm.copy(QE,GE),QE.toArray(e[1])}}}}function eL(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,UE.fromArray(e[0]),qE.fromArray(e[1]),GE.fromArray(e[2]),zm.sub(KE,qE,UE),zm.sub(YE,GE,qE);var r=KE.len(),o=YE.len();if(!(r<.001||o<.001))if(KE.scale(1/r),YE.scale(1/o),KE.dot(t)=a)zm.copy(QE,GE);else{QE.scaleAndAdd(YE,i/Math.tan(Math.PI/2-s));var l=GE.x!==qE.x?(QE.x-qE.x)/(GE.x-qE.x):(QE.y-qE.y)/(GE.y-qE.y);if(isNaN(l))return;l<0?zm.copy(QE,qE):l>1&&zm.copy(QE,GE)}QE.toArray(e[1])}}}function tL(e,t,n,r){var o="normal"===n,i=o?e:e.ensureState(n);i.ignore=t;var a=r.get("smooth");a&&!0===a&&(a=.3),i.shape=i.shape||{},a>0&&(i.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();o?e.useStyle(s):i.style=s}function nL(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 o=tm(r[0],r[1]),i=tm(r[1],r[2]);if(!o||!i)return e.lineTo(r[1][0],r[1][1]),void e.lineTo(r[2][0],r[2][1]);var a=Math.min(o,i)*n,s=rm([],r[1],r[0],a/o),l=rm([],r[1],r[2],a/i),u=rm([],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;c0&&i&&S(-d/a,0,a);var g,v,y=e[0],b=e[a-1];return x(),g<0&&k(-g,.8),v<0&&k(v,.8),x(),w(g,v,1),w(v,g,-1),x(),g<0&&C(-g),v<0&&C(v),u}function x(){g=y.rect[t]-r,v=o-b.rect[t]-b.rect[n]}function w(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var o=r+e;o<0&&k(-o*n,1)}else k(-e*n,1)}}function S(n,r,o){0!==n&&(u=!0);for(var i=r;i0)for(l=0;l0;l--){S(-(i[l-1]*d),l,a)}}}function C(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),(e-=n)<=0)return}}var oL=Math.PI/180;function iL(e,t,n,r,o,i,a,s,l,u){if(!(e.length<2)){for(var c=e.length,d=0;dn?a:i,c=Math.abs(l.label.y-n);if(c>=u.maxY){var d=l.label.x-t-l.len2*o,h=r+l.len,f=Math.abs(d)e.unconstrainedWidth?null:p:null;r.setStyle("width",f)}var m=r.getBoundingRect();i.width=m.width;var g=(r.style.margin||0)+2.1;i.height=m.height+g,i.y-=(i.height-d)/2}}}function sL(e){return"center"===e.position}function lL(e){var t,n,r=e.getData(),o=[],i=!1,a=(e.get("minShowLabelAngle")||0)*oL,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,d=s.y,h=s.height;function p(e){e.ignore=!0}r.each((function(e){var s=r.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),f=s.getTextGuideLine(),m=r.getItemModel(e),g=m.getModel("label"),v=g.get("position")||m.get(["emphasis","label","position"]),y=g.get("distanceToLabelLine"),b=g.get("alignTo"),x=$y(g.get("edgeDistance"),u),w=g.get("bleedMargin"),S=m.getModel("labelLine"),k=S.get("length");k=$y(k,u);var C=S.get("length2");if(C=$y(C,u),Math.abs(d.endAngle-d.startAngle)0?"right":"left":A>0?"left":"right"}var j=Math.PI,F=0,z=g.get("rotate");if(yf(z))F=z*(j/180);else if("center"===v)F=0;else if("radial"===z||!0===z){F=A<0?-D+j:-D}else if("tangential"===z&&"outside"!==v&&"outer"!==v){var B=Math.atan2(A,O);B<0&&(B=2*j+B),O>0&&(B=j+B),F=B-j}if(i=!!F,h.x=_,h.y=M,h.rotation=F,h.setStyle({verticalAlign:"middle"}),I){h.setStyle({align:P});var V=h.states.select;V&&(V.x+=h.x,V.y+=h.y)}else{var $=h.getBoundingRect().clone();$.applyTransform(h.getComputedTransform());var H=(h.style.margin||0)+2.1;$.y-=H/2,$.height+=H,o.push({label:h,labelLine:f,position:v,len:k,len2:C,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new zm(A,O),linePoints:T,textAlign:P,labelDistance:y,labelAlignTo:b,edgeDistance:x,bleedMargin:w,rect:$,unconstrainedWidth:$.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:I})}})),!i&&e.get("avoidLabelOverlap")&&function(e,t,n,r,o,i,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,d=-Number.MAX_VALUE,h=0;h0){for(var l=i.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},t.type="pie",t}(PD);const dL=cL;const hL=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}();var pL=Sb(),fL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new hL(hf(this.getData,this),hf(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return NE(this,{coordDimensions:["value"],encodeDefaulter:pf(XC,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=pL(n),o=r.seats;if(!o){var i=[];n.each(n.mapDimension("value"),(function(e){i.push(e)})),o=r.seats=Gy(i,n.hostModel.get("percentPrecision"))}var a=e.prototype.getDataParams.call(this,t);return a.percent=o[t]||0,a.$vars.push("percent"),a},t.prototype._defaultLabelLine=function(e){db(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}(xT);const mL=fL;var gL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return Ap(t,e),t.prototype.getInitialData=function(e,t){return yR(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}(xT);const vL=gL;var yL=function(){},bL=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return Ap(t,e),t.prototype.getDefaultShape=function(){return new yL},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,t){var n,r=t.points,o=t.size,i=this.symbolProxy,a=i.shape,s=e.getContext?e.getContext():e,l=s&&o[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=r[l]-i/2,c=r[l+1]-a/2;if(e>=u&&t>=c&&e<=u+i&&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,o=r[0],i=r[1],a=1/0,s=1/0,l=-1/0,u=-1/0,c=0;c=0&&(l.dataIndex=n+(e.startIndex||0))}))},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}();var wL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(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 o=OE("").reset(e,t,n);o.progress&&o.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 xL:new lE,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}(PD);const SL=wL;var kL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(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}(RC);const CL=kL;var _L=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),ML=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Mb).models[0]},t.type="cartesian2dAxis",t}(RC);of(ML,_L);var TL={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)"]}}},PL=ef({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},TL),DL=ef({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}}},TL);const AL={category:PL,value:DL,time:ef({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},DL),log:nf({logBase:10},DL)};var OL=0;function IL(e){return bf(e)&&null!=e.value?e.value:e+""}const RL=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++OL}return e.createByAxisModel=function(t){var n=t.option,r=n.data,o=r&&lf(r,IL);return new e({categories:o,needCollect:!o,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(!gf(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=jf(this.categories))},e}();var EL={value:1,category:1,time:1,log:1};function LL(e,t,n,r){sf(EL,(function(o,i){var a=ef(ef({},AL[i],!0),r,!0),s=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t+"Axis."+i,n}return Ap(n,e),n.prototype.mergeDefaultAndTheme=function(e,t){var n=PC(this),r=n?AC(e):{};ef(e,t.getTheme().get(i+"Axis")),ef(e,this.getDefaultOption()),e.type=ZL(e),n&&DC(e,r,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=RL.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."+i,n.defaultOption=a,n}(n);e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",ZL)}function ZL(e){return e.type||(e.data?"category":"value")}var NL=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[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}();Fb(NL);const jL=NL;function FL(e){return"interval"===e.type||"log"===e.type}function zL(e,t,n,r){var o={},i=e[1]-e[0],a=o.interval=tb(i/t,!0);null!=n&&ar&&(a=o.interval=r);var s=o.intervalPrecision=VL(a);return function(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),$L(e,0,t),$L(e,1,t),e[0]>e[1]&&(e[0]=e[1])}(o.niceTickExtent=[Hy(Math.ceil(e[0]/a)*a,s),Hy(Math.floor(e[1]/a)*a,s)],e),o}function BL(e){var t=Math.pow(10,eb(e)),n=e/t;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Hy(n*t)}function VL(e){return Uy(e)+2}function $L(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function HL(e,t){return e>=t[0]&&e<=t[1]}function WL(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function UL(e,t){return e*(t[1]-t[0])+t[0]}var qL=function(e){function t(t){var n=e.call(this,t)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new RL({})),ff(r)&&(r=new RL({categories:lf(r,(function(e){return bf(e)?e.value:e}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return Ap(t,e),t.prototype.parse=function(e){return null==e?NaN:gf(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return HL(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},t.prototype.normalize=function(e){return WL(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(UL(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(null!=e){for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],o=0,i=this._ordinalMeta.categories.length,a=Math.min(i,t.length);o=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(jL);jL.registerClass(qL);const GL=qL;var KL=Hy,YL=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 Ap(t,e),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return HL(e,this._extent)},t.prototype.normalize=function(e){return WL(e,this._extent)},t.prototype.scale=function(e){return UL(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[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=VL(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,o=this._intervalPrecision,i=[];if(!t)return i;n[0]1e4)return[];var s=i.length?i[i.length-1].value:r[1];return n[1]>s&&(e?i.push({value:KL(s+t,o)}):i.push({value:n[1]})),i},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),o=1;or[0]&&c0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||a.none}if(ff(i)){var c=null==e.level?0:e.level>=0?e.level:i.length+e.level;i=i[c=Math.min(c,i.length-1)]}}return Kk(new Date(e.value),i,o,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"),o=function(e,t,n,r){var o=1e4,i=Wk,a=0;function s(e,t,n,o,i,a,s){for(var l=new Date(t),u=t,c=l[o]();u1&&0===u&&i.unshift({value:i[0].value-h})}}for(u=0;u=r[0]&&v<=r[1]&&d++)}var y=(r[1]-r[0])/t;if(d>1.5*y&&h>y/1.5)break;if(u.push(m),d>y||e===i[p])break}c=[]}}0;var b=cf(lf(u,(function(e){return cf(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return e.length>0})),x=[],w=b.length-1;for(p=0;pn&&(this._approxInterval=n);var i=JL.length,a=Math.min(function(e,t,n,r){for(;n>>1;e[o][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function tZ(e){return(e/=2592e6)>6?6:e>3?3:e>2?2:1}function nZ(e){return(e/=jk)>12?12:e>6?6:e>3.5?4:e>2?2:1}function rZ(e,t){return(e/=t?Nk:Zk)>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function oZ(e){return tb(e,!0)}function iZ(e,t,n){var r=new Date(e);switch(qk(t)){case"year":case"month":r[aC(n)](0);case"day":r[sC(n)](1);case"hour":r[lC(n)](0);case"minute":r[uC(n)](0);case"second":r[cC(n)](0),r[dC(n)](0)}return r.getTime()}jL.registerClass(QL);const aZ=QL;var sZ=jL.prototype,lZ=XL.prototype,uZ=Hy,cZ=Math.floor,dZ=Math.ceil,hZ=Math.pow,pZ=Math.log,fZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new XL,t._interval=0,t}return Ap(t,e),t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return lf(lZ.getTicks.call(this,e),(function(e){var t=e.value,o=Hy(hZ(this.base,t));return o=t===n[0]&&this._fixMin?gZ(o,r[0]):o,{value:o=t===n[1]&&this._fixMax?gZ(o,r[1]):o}}),this)},t.prototype.setExtent=function(e,t){var n=pZ(this.base);e=pZ(Math.max(0,e))/n,t=pZ(Math.max(0,t))/n,lZ.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=sZ.getExtent.call(this);t[0]=hZ(e,t[0]),t[1]=hZ(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=gZ(t[0],n[0])),this._fixMax&&(t[1]=gZ(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=pZ(e[0])/pZ(t),e[1]=pZ(e[1])/pZ(t),sZ.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,o=(r=n,Math.pow(10,eb(r)));for(e/n*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var i=[Hy(dZ(t[0]/o)*o),Hy(cZ(t[1]/o)*o)];this._interval=o,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){lZ.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 HL(e=pZ(e)/pZ(this.base),this._extent)},t.prototype.normalize=function(e){return WL(e=pZ(e)/pZ(this.base),this._extent)},t.prototype.scale=function(e){return e=UL(e,this._extent),hZ(this.base,e)},t.type="log",t}(jL),mZ=fZ.prototype;function gZ(e,t){return uZ(e,Uy(t))}mZ.getMinorTicks=lZ.getMinorTicks,mZ.getLabel=lZ.getLabel,jL.registerClass(fZ);const vZ=fZ;var yZ=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var d=this._determinedMin,h=this._determinedMax;return null!=d&&(a=d,l=!0),null!=h&&(s=h,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},e.prototype.modifyDataMinMax=function(e,t){this[xZ[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){this[bZ[e]]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),bZ={min:"_determinedMin",max:"_determinedMax"},xZ={min:"_dataMin",max:"_dataMax"};function wZ(e,t,n){var r=e.rawExtentInfo;return r||(r=new yZ(e,t,n),e.rawExtentInfo=r,r)}function SZ(e,t){return null==t?null:Cf(t)?NaN:e.parse(t)}function kZ(e,t){var n=e.type,r=wZ(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var o=r.min,i=r.max,a=t.ecModel;if(a&&"time"===n){var s=jI("bar",a),l=!1;if(sf(s,(function(e){l=l||e.getBaseAxis()===t.axis})),l){var u=FI(s),c=function(e,t,n,r){var o=n.axis.getExtent(),i=o[1]-o[0],a=function(e,t,n){if(e&&t){var r=e[NI(t)];return null!=r&&null!=n?r[ZI(n)]:r}}(r,n.axis);if(void 0===a)return{min:e,max:t};var s=1/0;sf(a,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;sf(a,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,d=c/(1-(s+l)/i)-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}(o,i,t,u);o=c.min,i=c.max}}return{extent:[o,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function CZ(e,t){var n=t,r=kZ(e,n),o=r.extent,i=n.get("splitNumber");e instanceof vZ&&(e.base=n.get("logBase"));var a=e.type,s=n.get("interval"),l="interval"===a||"time"===a;e.setExtent(o[0],o[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&e.setInterval&&e.setInterval(s)}function _Z(e){var t,n,r=e.getLabelModel().get("formatter"),o="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(n=r,function(t,r){return e.scale.getFormattedLabel(t,r,n)}):gf(r)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace("{value}",null!=r?r:"")}}(r):mf(r)?(t=r,function(n,r){return null!=o&&(r=n.value-o),t(MZ(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function MZ(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function TZ(e){var t=e.get("interval");return null==t?"auto":t}function PZ(e){return"category"===e.type&&0===TZ(e.getLabelModel())}function DZ(e,t){var n={};return sf(e.mapDimensionsAll(t),(function(t){n[OI(e,t)]=!0})),df(n)}var AZ=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 lf(this._dimList,(function(e){return this._axes[e]}),this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),cf(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}();var OZ=["x","y"];function IZ(e){return"interval"===e.type||"time"===e.type}var RZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=OZ,t}return Ap(t,e),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,t=this.getAxis("y").scale;if(IZ(e)&&IZ(t)){var n=e.getExtent(),r=t.getExtent(),o=this.dataToPoint([n[0],r[0]]),i=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(i[0]-o[0])/a,u=(i[1]-o[1])/s,c=o[0]-n[0]*l,d=o[1]-r[0]*u,h=this._transform=[l,0,0,u,c,d];this._invTransform=Fm([],h)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),o=this.getArea(),i=new Ym(n[0],n[1],r[0]-n[0],r[1]-n[1]);return o.intersect(i)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],o=e[1];if(this._transform&&null!=r&&isFinite(r)&&null!=o&&isFinite(o))return om(n,e,this._transform);var i=this.getAxis("x"),a=this.getAxis("y");return n[0]=i.toGlobalCoord(i.dataToCoord(r,t)),n[1]=a.toGlobalCoord(a.dataToCoord(o,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,o=n.getExtent(),i=r.getExtent(),a=n.parse(e[0]),s=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),a),Math.max(o[0],o[1])),t[1]=Math.min(Math.max(Math.min(i[0],i[1]),s),Math.max(i[0],i[1])),t},t.prototype.pointToData=function(e,t){var n=[];if(this._invTransform)return om(n,e,this._invTransform);var r=this.getAxis("x"),o=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=o.coordToData(o.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,o=Math.min(n[0],n[1])-e,i=Math.max(t[0],t[1])-r+e,a=Math.max(n[0],n[1])-o+e;return new Ym(r,o,i,a)},t}(AZ);const EZ=RZ;var LZ=Sb();function ZZ(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=jZ(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=_Z(e);return{labels:lf(t,(function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}}))}}(e)}function NZ(e,t){return"category"===e.type?function(e,t){var n,r,o=FZ(e,"ticks"),i=TZ(t),a=zZ(o,i);if(a)return a;t.get("show")&&!e.scale.isBlank()||(n=[]);if(mf(i))n=$Z(e,i,!0);else if("auto"===i){var s=jZ(e,e.getLabelModel());r=s.labelCategoryInterval,n=lf(s.labels,(function(e){return e.tickValue}))}else n=VZ(e,r=i,!0);return BZ(o,i,{ticks:n,tickCategoryInterval:r})}(e,t):{ticks:lf(e.scale.getTicks(),(function(e){return e.value}))}}function jZ(e,t){var n,r,o=FZ(e,"labels"),i=TZ(t),a=zZ(o,i);return a||(mf(i)?n=$Z(e,i):(r="auto"===i?function(e){var t=LZ(e).autoInterval;return null!=t?t:LZ(e).autoInterval=e.calculateCategoryInterval()}(e):i,n=VZ(e,r)),BZ(o,i,{labels:n,labelCategoryInterval:r}))}function FZ(e,t){return LZ(e)[t]||(LZ(e)[t]=[])}function zZ(e,t){for(var n=0;n1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=PZ(e),h=a.get("showMinLabel")||d,p=a.get("showMaxLabel")||d;h&&u!==i[0]&&m(i[0]);for(var f=u;f<=i[1];f+=l)m(f);function m(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:o.getLabel(t),tickValue:e})}return p&&f-l!==i[1]&&m(i[1]),s}function $Z(e,t,n){var r=e.scale,o=_Z(e),i=[];return sf(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&i.push(n?s:{formattedLabel:o(e),rawLabel:a,tickValue:s})})),i}var HZ=[0,1];function WZ(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}const UZ=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,r)||this;return a.index=0,a.type=o||"value",a.position=i||"bottom",a}return Ap(t,e),t.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(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 qy(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&&WZ(n=n.slice(),r.count()),Vy(e,HZ,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&WZ(n=n.slice(),r.count());var o=Vy(e,n,HZ,t);return this.scale.scale(o)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=lf(NZ(this,t).ticks,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this);return function(e,t,n,r){var o=t.length;if(!e.onBand||n||!o)return;var i,a,s=e.getExtent();if(1===o)t[0].coord=s[0],i=t[1]={coord:s[1]};else{var l=t[o-1].tickValue-t[0].tickValue,u=(t[o-1].coord-t[0].coord)/l;sf(t,(function(e){e.coord-=u/2})),a=1+e.scale.getExtent()[1]-t[o-1].tickValue,i={coord:t[o-1].coord+u*a},t.push(i)}var c=s[0]>s[1];d(t[0].coord,s[0])&&(r?t[0].coord=s[0]:t.shift());r&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],i.coord)&&(r?i.coord=s[1]:t.pop());r&&d(i.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Hy(e),t=Hy(t),c?e>t:e0&&e<100||(e=5),lf(this.scale.getMinorTicks(e),(function(e){return lf(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},e.prototype.getViewLabels=function(){return ZZ(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=_Z(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,o=e.scale,i=o.getExtent(),a=o.count();if(i[1]-i[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=i[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),d=Math.abs(u*Math.sin(r)),h=0,p=0;l<=i[1];l+=s){var f,m,g=yy(n({value:l}),t.font,"center","top");f=1.3*g.width,m=1.3*g.height,h=Math.max(h,f,7),p=Math.max(p,m,7)}var v=h/c,y=p/d;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(v,y))),x=LZ(e.model),w=e.getExtent(),S=x.lastAutoInterval,k=x.lastTickCount;return null!=S&&null!=k&&Math.abs(S-b)<=1&&Math.abs(k-a)<=1&&S>b&&x.axisExtent0===w[0]&&x.axisExtent1===w[1]?b=S:(x.lastTickCount=a,x.lastAutoInterval=b,x.axisExtent0=w[0],x.axisExtent1=w[1]),b}(this)},e}());function qZ(e,t,n){n=n||{};var r=e.coordinateSystem,o=t.axis,i={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,c=r.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(a){var m=a.toGlobalCoord(a.dataToCoord(0));f[h.onZero]=Math.max(Math.min(m,f[1]),f[0])}i.position=["y"===u?f[h[l]]:d[0],"x"===u?f[h[l]]:d[3]],i.rotation=Math.PI/2*("x"===u?0:1);i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],i.labelOffset=a?f[h[s]]-f[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),_f(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var g=t.get(["axisLabel","rotate"]);return i.labelRotate="top"===l?-g:g,i.z2=1,i}function GZ(e){return"cartesian2d"===e.get("coordinateSystem")}function KZ(e){var t={xAxisModel:null,yAxisModel:null};return sf(t,(function(n,r){var o=r.replace(/Model$/,""),i=e.getReferringComponents(o,Mb).models[0];t[r]=i})),t}var YZ=Math.log;var XZ=function(){function e(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=OZ,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=df(e),r=n.length;if(r){for(var o=[],i=r-1;i>=0;i--){var a=e[+n[i]],s=a.model,l=a.scale;FL(l)&&s.get("alignTicks")&&null==s.get("interval")?o.push(a):(CZ(l,s),FL(l)&&(t=a))}o.length&&(t||CZ((t=o.pop()).scale,t.model),sf(o,(function(e){!function(e,t,n){var r=XL.prototype,o=r.getTicks.call(n),i=r.getTicks.call(n,!0),a=o.length-1,s=r.getInterval.call(n),l=kZ(e,t),u=l.extent,c=l.fixMin,d=l.fixMax;if("log"===e.type){var h=YZ(e.base);u=[YZ(u[0])/h,YZ(u[1])/h]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:d});var p=r.getExtent.call(e);c&&(u[0]=p[0]),d&&(u[1]=p[1]);var f=r.getInterval.call(e),m=u[0],g=u[1];if(c&&d)f=(g-m)/a;else if(c)for(g=u[0]+f*a;gu[0]&&isFinite(m)&&isFinite(u[0]);)f=BL(f),m=u[1]-f*a;else{e.getTicks().length-1>a&&(f=BL(f));var v=f*a;(m=Hy((g=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(m=0,g=Hy(v)):g>0&&u[1]<=0&&(g=0,m=-Hy(v))}var y=(o[0].value-i[0].value)/s,b=(o[a].value-i[a].value)/s;r.setExtent.call(e,m+f*y,g+f*b),r.setInterval.call(e,f),(y||b)&&r.setNiceExtent.call(e,m+f,g-f)}(e.scale,e.model,t.scale)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var o={};sf(n.x,(function(e){JZ(n,"y",e,o)})),sf(n.y,(function(e){JZ(n,"x",e,o)})),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),o=!n&&e.get("containLabel"),i=MC(r,{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function s(){sf(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return r-e+t}}(e,t?i.x:i.y)}))}s(),o&&(sf(a,(function(e){if(!e.model.get(["axisLabel","inside"])){var t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,o,i=n.getExtent();o=n instanceof GL?n.count():(r=n.getTicks()).length;var a,s,l,u,c,d,h,p=e.getLabelModel(),f=_Z(e),m=1;o>40&&(m=Math.ceil(o/40));for(var g=0;g0&&r>0||n<0&&r<0)}(e)}const tN=XZ;var nN=Math.PI,rN=function(){function e(e,t){this.group=new Zy,this.opt=t,this.axisModel=e,nf(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Zy({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!oN[e]},e.prototype.add=function(e){oN[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r,o,i=Yy(t-e);return Xy(i)?(o=n>0?"top":"bottom",r="center"):Xy(i-nN)?(o=n>0?"bottom":"top",r="center"):(o="middle",r=i>0&&i0?"right":"left":n>0?"left":"right"),{rotation:i,textAlign:r,textVerticalAlign:o}},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}(),oN={axisLine:function(e,t,n,r){var o=t.get(["axisLine","show"]);if("auto"===o&&e.handleAutoShown&&(o=e.handleAutoShown("axisLine")),o){var i=t.axis.getExtent(),a=r.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];a&&(om(s,s,a),om(l,l,a));var c=tf({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),d=new SP({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});rD(d.shape,d.style.lineWidth),d.anid="line",n.add(d);var h=t.get(["axisLine","symbol"]);if(null!=h){var p=t.get(["axisLine","symbolSize"]);gf(h)&&(h=[h,h]),(gf(p)||yf(p))&&(p=[p,p]);var f=jA(t.get(["axisLine","symbolOffset"])||0,p),m=p[0],g=p[1];sf([{rotate:e.rotation+Math.PI/2,offset:f[0],r:0},{rotate:e.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(t,r){if("none"!==h[r]&&null!=h[r]){var o=ZA(h[r],-m/2,-g/2,m,g,c.stroke,!0),i=t.r+t.offset,a=u?l:s;o.attr({rotation:t.rotate,x:a[0]+i*Math.cos(e.rotation),y:a[1]-i*Math.sin(e.rotation),silent:!0,z2:11}),n.add(o)}}))}}},axisTickLabel:function(e,t,n,r){var o=function(e,t,n,r){var o=n.axis,i=n.getModel("axisTick"),a=i.get("show");"auto"===a&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var s=i.getModel("lineStyle"),l=r.tickDirection*i.get("length"),u=lN(o.getTicksCoords(),t.transform,l,nf(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cd[1]?-1:1,p=["start"===s?d[0]-h*c:"end"===s?d[1]+h*c:(d[0]+d[1])/2,sN(s)?e.labelOffset+l*c:0],f=t.get("nameRotate");null!=f&&(f=f*nN/180),sN(s)?i=rN.innerTextLayout(e.rotation,null!=f?f:e.rotation,l):(i=function(e,t,n,r){var o,i,a=Yy(n-e),s=r[0]>r[1],l="start"===t&&!s||"start"!==t&&s;Xy(a-nN/2)?(i=l?"bottom":"top",o="center"):Xy(a-1.5*nN)?(i=l?"top":"bottom",o="center"):(i="middle",o=a<1.5*nN&&a>nN/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:o,textVerticalAlign:i}}(e.rotation,s,f||0,d),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var m=u.getFont(),g=t.get("nameTruncate",!0)||{},v=g.ellipsis,y=_f(e.nameTruncateMaxWidth,g.maxWidth,a),b=new Ww({x:p[0],y:p[1],rotation:i.rotation,silent:rN.isLabelSilent(t),style:rk(u,{text:o,font:m,overflow:"truncate",width:y,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||i.textAlign,verticalAlign:u.get("verticalAlign")||i.textVerticalAlign}),z2:1});if(vD({el:b,componentModel:t,itemName:o}),b.__fullText=o,b.anid="name",t.get("triggerEvent")){var x=rN.makeAxisEventDataBase(t);x.targetType="axisName",x.name=o,Uw(b).eventData=x}r.add(b),b.updateTransform(),n.add(b),b.decomposeTransform()}}};function iN(e){e&&(e.ignore=!0)}function aN(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var o=Em([]);return jm(o,o,-e.rotation),n.applyTransform(Zm([],o,e.getLocalTransform())),r.applyTransform(Zm([],o,t.getLocalTransform())),n.intersect(r)}}function sN(e){return"middle"===e||"center"===e}function lN(e,t,n,r,o){for(var i=[],a=[],s=[],l=0;l=0||e===t}function hN(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[fN(e)]}function pN(e){return!!e.get(["handle","show"])}function fN(e){return e.type+"||"+e.id}var mN={},gN=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.render=function(t,n,r,o){this.axisPointerClass&&function(e){var t=hN(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,o=n.option,i=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=pN(n);null==i&&(o.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=0,i=e.fill||"#000";FN(r,t);var a=null==r.textFill;return o?a&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=i),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(a&&(r.textFill=e.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,sf(t.rich,(function(e){FN(e,e)})),r}function FN(e,t){t&&(Bf(t,"fill")&&(e.textFill=t.fill),Bf(t,"stroke")&&(e.textStroke=t.fill),Bf(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),Bf(t,"font")&&(e.font=t.font),Bf(t,"fontStyle")&&(e.fontStyle=t.fontStyle),Bf(t,"fontWeight")&&(e.fontWeight=t.fontWeight),Bf(t,"fontSize")&&(e.fontSize=t.fontSize),Bf(t,"fontFamily")&&(e.fontFamily=t.fontFamily),Bf(t,"align")&&(e.textAlign=t.align),Bf(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),Bf(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),Bf(t,"width")&&(e.textWidth=t.width),Bf(t,"height")&&(e.textHeight=t.height),Bf(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),Bf(t,"padding")&&(e.textPadding=t.padding),Bf(t,"borderColor")&&(e.textBorderColor=t.borderColor),Bf(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),Bf(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),Bf(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),Bf(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),Bf(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),Bf(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),Bf(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),Bf(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),Bf(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),Bf(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var zN={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},BN=df(zN),VN=(uf(py,(function(e,t){return e[t]=1,e}),{}),py.join(", "),["","style","shape","extra"]),$N=Sb();function HN(e,t,n,r,o){var i=e+"Animation",a=$S(e,r,o)||{},s=$N(t).userDuring;return a.duration>0&&(a.during=s?hf(YN,{el:t,userDuring:s}):null,a.setToFinal=!0,a.scope=e),tf(a,n[i]),a}function WN(e,t,n,r){var o=(r=r||{}).dataIndex,i=r.isInit,a=r.clearStyle,s=n.isAnimationEnabled(),l=$N(e),u=t.style;l.userDuring=t.during;var c={},d={};if(function(e,t,n){for(var r=0;r=0)){var d=e.getAnimationStyleProps(),h=d?d.style:null;if(h){!o&&(o=r.style={});var p=df(n);for(u=0;u0&&e.animateFrom(h,p)}else!function(e,t,n,r,o){if(o){var i=HN("update",e,t,r,n);i.duration>0&&e.animateFrom(o,i)}}(e,t,o||0,n,c);!function(e,t){for(var n=$N(e).leaveToProps,r=0;r=0){!i&&(i=r[e]={});var h=df(a);for(c=0;cr[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var o=t.dataToRadius(r[0]),i=n.dataToAngle(r[1]),a=e.coordToPoint([o,i]);return a.push(o,i*Math.PI/180),a},size:hf(ZN,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 pj(e){return e instanceof mw}function fj(e){return e instanceof fx}var mj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var o=this._data,i=e.getData(),a=this.group,s=wj(e,i,t,n);o||a.removeAll(),i.diff(o).add((function(t){kj(n,null,t,s(t,r),e,a,i)})).remove((function(t){var n=o.getItemGraphicEl(t);n&&UN(n,AN(n).option,e)})).update((function(t,l){var u=o.getItemGraphicEl(l);kj(n,u,t,s(t,r),e,a,i)})).execute();var l=e.get("clip",!0)?_R(e.coordinateSystem,!1,e):null;l?a.setClipPath(l):a.removeClipPath(),this._data=i},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,o){var i=t.getData(),a=wj(t,i,n,r),s=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}for(var u=e.start;u=0?t.getStore().get(o,n):void 0}var i=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[i]:i},styleEmphasis:function(n,r){0;null==r&&(r=s);var o=y(r,rj).getItemStyle(),i=b(r,rj),a=rk(i,null,null,!0,!0);a.text=i.getShallow("show")?Tf(e.getFormattedLabel(r,rj),e.getFormattedLabel(r,oj),DR(t,r)):null;var l=ok(i,null,!0);return w(n,o),o=jN(o,a,l),n&&x(o,n),o.legacy=!0,o},visual:function(e,n){if(null==n&&(n=s),Bf(PN,e)){var r=t.getItemVisual(n,"style");return r?r[PN[e]]:null}if(Bf(DN,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===i.type){return function(e){var t=[],n=e.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),i=0;i=d;f--){var m=t.childAt(f);Dj(t,m,o)}}(e,d,n,r,o),a>=0?i.replaceAt(d,a):i.add(d),d}function _j(e,t,n){var r,o=AN(e),i=t.type,a=t.shape,s=t.style;return n.isUniversalTransitionEnabled()||null!=i&&i!==o.customGraphicType||"path"===i&&((r=a)&&(Bf(r,"pathData")||Bf(r,"d")))&&Rj(a)!==o.customPathData||"image"===i&&Bf(s,"image")&&s.image!==o.customImagePath}function Mj(e,t,n){var r=t?Tj(e,t):e,o=t?Pj(e,r,rj):e.style,i=e.type,a=r?r.textConfig:null,s=e.textContent,l=s?t?Tj(s,t):s:null;if(o&&(n.isLegacy||function(e,t,n,r){return e&&(e.legacy||!1!==e.legacy&&!n&&!r&&"tspan"!==t&&("text"===t||Bf(e,"text")))}(o,i,!!a,!!l))){n.isLegacy=!0;var u=function(e,t,n){var r,o,i,a=e;if("text"===t)i=a;else{i={},Bf(a,"text")&&(i.text=a.text),Bf(a,"rich")&&(i.rich=a.rich),Bf(a,"textFill")&&(i.fill=a.textFill),Bf(a,"textStroke")&&(i.stroke=a.textStroke),Bf(a,"fontFamily")&&(i.fontFamily=a.fontFamily),Bf(a,"fontSize")&&(i.fontSize=a.fontSize),Bf(a,"fontStyle")&&(i.fontStyle=a.fontStyle),Bf(a,"fontWeight")&&(i.fontWeight=a.fontWeight),o={type:"text",style:i,silent:!0},r={};var s=Bf(a,"textPosition");n?r.position=s?a.textPosition:"inside":s&&(r.position=a.textPosition),Bf(a,"textPosition")&&(r.position=a.textPosition),Bf(a,"textOffset")&&(r.offset=a.textOffset),Bf(a,"textRotation")&&(r.rotation=a.textRotation),Bf(a,"textDistance")&&(r.distance=a.textDistance)}return NN(i,e),sf(i.rich,(function(e){NN(e,e)})),{textConfig:r,textContent:o}}(o,i,!t);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!t&&l){var c=l;!c.type&&(c.type="text")}var d=t?n[t]:n.normal;d.cfg=a,d.conOpt=l}function Tj(e,t){return t?e?e[t]:null:e}function Pj(e,t,n){var r=t&&t.style;return null==r&&n===rj&&e&&(r=e.styleEmphasis),r}function Dj(e,t,n){t&&UN(t,AN(e).option,n)}function Aj(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function Oj(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,o=null!=t?n.oldChildren[t]:null;Cj(n.api,o,n.dataIndex,r,n.seriesModel,n.group)}function Ij(e){var t=this.context,n=t.oldChildren[e];n&&UN(n,AN(n).option,t.seriesModel)}function Rj(e){return e&&(e.pathData||e.d)}const Ej=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=jp.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,o,i){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,d=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p0){var _=i(v)?s:l;v>0&&(v=v*k+S),b[x++]=_[C],b[x++]=_[C+1],b[x++]=_[C+2],b[x++]=_[C+3]*v*256}else x+=4}return d.putImageData(y,0,0),c},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=jp.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)),o=[0,0,0,0],i=0,a=0;a<256;a++)e[t](a/255,!0,o),r[i++]=o[0],r[i++]=o[1],r[i++]=o[2],r[i++]=o[3];return r},e}();function Lj(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var Zj=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.render=function(e,t,n){var r;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(r=t)}))})),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):Lj(o)&&this._renderOnGeo(o,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var o=t.coordinateSystem;o&&(Lj(o)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){bD(this._progressiveEls||this.group,e)},t.prototype._renderOnCartesianAndCalendar=function(e,t,n,r,o){var i,a,s,l,u=e.coordinateSystem,c=PR(u,"cartesian2d");if(c){var d=u.getAxis("x"),h=u.getAxis("y");0,i=d.getBandWidth()+.5,a=h.getBandWidth()+.5,s=d.scale.getExtent(),l=h.scale.getExtent()}for(var p=this.group,f=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),g=e.getModel(["blur","itemStyle"]).getItemStyle(),v=e.getModel(["select","itemStyle"]).getItemStyle(),y=e.get(["itemStyle","borderRadius"]),b=nk(e),x=e.getModel("emphasis"),w=x.get("focus"),S=x.get("blurScope"),k=x.get("disabled"),C=c?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],_=n;_s[1]||Dl[1])continue;var A=u.dataToPoint([P,D]);M=new Aw({shape:{x:A[0]-i/2,y:A[1]-a/2,width:i,height:a},style:T})}else{if(isNaN(f.get(C[1],_)))continue;M=new Aw({z2:1,shape:u.dataToRect([f.get(C[0],_)]).contentShape,style:T})}if(f.hasItemOption){var O=f.getItemModel(_),I=O.getModel("emphasis");m=I.getModel("itemStyle").getItemStyle(),g=O.getModel(["blur","itemStyle"]).getItemStyle(),v=O.getModel(["select","itemStyle"]).getItemStyle(),y=O.get(["itemStyle","borderRadius"]),w=I.get("focus"),S=I.get("blurScope"),k=I.get("disabled"),b=nk(O)}M.shape.r=y;var R=e.getRawValue(_),E="-";R&&null!=R[2]&&(E=R[2]+""),tk(M,b,{labelFetcher:e,labelDataIndex:_,defaultOpacity:T.opacity,defaultText:E}),M.ensureState("emphasis").style=m,M.ensureState("blur").style=g,M.ensureState("select").style=v,ES(M,w,S,k),M.incremental=o,o&&(M.states.emphasis.hoverLayer=!0),p.add(M),f.setItemGraphicEl(_,M),this._progressiveEls&&this._progressiveEls.push(M)}},t.prototype._renderOnGeo=function(e,t,n,r){var o=n.targetVisuals.inRange,i=n.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new Ej;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),d=Math.max(l.y,0),h=Math.min(l.width+l.x,r.getWidth()),p=Math.min(l.height+l.y,r.getHeight()),f=h-c,m=p-d,g=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(g,(function(t,n,r){var o=e.dataToPoint([t,n]);return o[0]-=c,o[1]-=d,o.push(r),o})),y=n.getExtent(),b="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var r=e[1]-e[0],o=(t=lf(t,(function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}}))).length,i=0;return function(e){var r;for(r=i;r=0;r--){var a;if((a=t[r].interval)[0]<=e&&e<=a[1]){i=r;break}}return r>=0&&r0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");sf([["start","startValue"],["end","endValue"]],(function(r,o){var i=null!=e[r[0]],a=null!=e[r[1]];i&&!a?t[o]="percent":!i&&a?t[o]="value":n?t[o]=n[o]:i&&(t[o]="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(Hj(t),n))}),this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each((function(n,r){sf(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(Hj(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;sf([["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;sf(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;ri&&(t[1-r]=t[r]+u.sign*i),t}function nF(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 rF(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var oF="\0_ec_interaction_mutex";function iF(e,t){return!!aF(e)[t]}function aF(e){return e[oF]||(e[oF]={})}function sF(e,t,n,r,o){e.pointerChecker&&e.pointerChecker(r,o.originX,o.originY)&&(Dm(r.event),lF(e,t,n,r,o))}function lF(e,t,n,r,o){o.isAvailableBehavior=hf(uF,null,n,r),e.trigger(t,o)}function uF(e,t,n){var r=n[e];return!e||r&&(!gf(r)||t.event[r+"Key"])}pI({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},Vf);const cF=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=hf(n._mousedownHandler,n),o=hf(n._mousemoveHandler,n),i=hf(n._mouseupHandler,n),a=hf(n._mousewheelHandler,n),s=hf(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=nf(Jp(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",o),t.on("mouseup",i)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",a),t.on("pinch",s))},n.disable=function(){t.off("mousedown",r),t.off("mousemove",o),t.off("mouseup",i),t.off("mousewheel",a),t.off("pinch",s)},n}return Ap(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(!Am(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&&uF("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!iF(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,r=this._x,o=this._y,i=t-r,a=n-o;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Dm(e.event),lF(this,"pan","moveOnMouseMove",e,{dx:i,dy:a,oldX:r,oldY:o,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){Am(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=uF("zoomOnMouseWheel",e,this._opt),n=uF("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,o=Math.abs(r),i=e.offsetX,a=e.offsetY;if(0!==r&&(t||n)){if(t){var s=o>3?1.4:o>1?1.2:1.1;sF(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?s:1/s,originX:i,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(r);sF(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:i,originY:a,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){iF(this._zr,"globalPan")||sF(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(cm);var dF=Sb();function hF(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function pF(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function fF(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function mF(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,(function(e,t){var n=dF(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=jf());r.each((function(e){e.dataZoomInfoMap=null})),e.eachComponent({mainType:"dataZoom",subType:"inside"},(function(e){sf(Uj(e).infoList,(function(n){var o=n.model.uid,i=r.get(o)||r.set(o,function(e,t){var n={model:t,containsPoint:pf(fF,t),dispatchAction:pf(pF,e),dataZoomInfoMap:null,controller:null},r=n.controller=new cF(e.getZr());return sf(["pan","zoom","scrollMove"],(function(e){r.on(e,(function(t){var r=[];n.dataZoomInfoMap.each((function(o){if(t.isAvailableBehavior(o.model.option)){var i=(o.getRange||{})[e],a=i&&i(o.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!o.model.get("disabled",!0)&&a&&r.push({dataZoomId:o.model.id,start:a[0],end:a[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(t,n.model));(i.dataZoomInfoMap||(i.dataZoomInfoMap=jf())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})}))})),r.each((function(e){var t,n=e.controller,o=e.dataZoomInfoMap;if(o){var i=o.keys()[0];null!=i&&(t=o.get(i))}if(t){var a=function(e){var t,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return e.each((function(e){var i=e.model,a=!i.get("disabled",!0)&&(!i.get("zoomLock",!0)||"move");r[n+a]>r[n+t]&&(t=a),o=o&&i.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(a.controlType,a.opt),n.setPointerChecker(e.containsPoint),RD(e,"dispatchAction",t.model.get("throttle",!0),"fixRate")}else hF(r,e)}))}))}var gF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return Ap(t,e),t.prototype.render=function(t,n,r){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),function(e,t,n){dF(e).coordSysRecordMap.each((function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)}))}(r,t,{pan:hf(vF.pan,this),zoom:hf(vF.zoom,this),scrollMove:hf(vF.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=dF(e).coordSysRecordMap,r=n.keys(),o=0;o0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/r.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return tF(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,o[0]!==i[0]||o[1]!==i[1]?i:void 0}},pan:yF((function(e,t,n,r,o,i){var a=bF[r]([i.oldX,i.oldY],[i.newX,i.newY],t,o,n);return a.signal*(e[1]-e[0])*a.pixel/a.pixelLength})),scrollMove:yF((function(e,t,n,r,o,i){return bF[r]([0,0],[i.scrollDelta,i.scrollDelta],t,o,n).signal*(e[1]-e[0])*i.scrollDelta}))};function yF(e){return function(t,n,r,o){var i=this.range,a=i.slice(),s=t.axisModels[0];if(s)return tF(e(a,s,t,n,r,o),a,[0,100],"all"),this.range=a,i[0]!==a[0]||i[1]!==a[1]?a:void 0}}var bF={grid:function(e,t,n,r,o){var i=n.axis,a={},s=o.model.coordinateSystem.getRect();return e=e||[0,0],"x"===i.dim?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=i.inverse?-1:1),a},polar:function(e,t,n,r,o){var i=n.axis,a={},s=o.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=i.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=i.inverse?-1:1),a},singleAxis:function(e,t,n,r,o){var i=n.axis,a=o.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===i.orient?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=i.inverse?-1:1),s}};const xF=gF;var wF=sf,SF=Wy;const kF=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(function(e){var t=e.get("coordinateSystem");return rf($j,t)>=0}(t)){var n=Hj(this._dimName),r=t.getReferringComponents(n,Mb).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 Jp(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],s=[];wF(["start","end"],(function(l,u){var c=e[l],d=e[l+"Value"];"percent"===o[u]?(null==c&&(c=i[u]),d=r.parse(Vy(c,i,n))):(t=!0,c=Vy(d=null==d?n[u]:r.parse(d),n,i)),s[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==c||isNaN(c)?i[u]:c})),SF(s),SF(a);var l=this._minMaxSpan;function u(e,t,n,o,i){var a=i?"Span":"ValueSpan";tF(0,e,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)t[s]=Vy(e[s],n,o,!0),i&&(t[s]=r.parse(t[s]))}return t?u(s,a,n,i,!1):u(a,s,i,n,!0),{valueWindow:s,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var r=[1/0,-1/0];wF(n,(function(e){!function(e,t,n){t&&sf(DZ(t,n),(function(n){var r=t.getApproximateExtent(n);r[0]e[1]&&(e[1]=r[1])}))}(r,e.getData(),t)}));var o=e.getAxisModel(),i=wZ(o.axis.scale,o,r).calculate();return[i.min,i.max]}(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=e.get("filterMode"),i=this._valueWindow;"none"!==o&&wF(r,(function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var a=t.getStore(),s=lf(r,(function(e){return t.getDimensionIndex(e)}),t);t.filterSelf((function(e){for(var t,n,o,l=0;li[1];if(c&&!d&&!h)return!0;c&&(o=!0),d&&(t=!0),h&&(n=!0)}return o&&t&&n}))}else wF(r,(function(n){if("empty"===o)e.setData(t=t.map(n,(function(e){return function(e){return e>=i[0]&&e<=i[1]}(e)?e:NaN})));else{var r={};r[n]=i,t.selectRange(r)}}));wF(r,(function(e){t.setApproximateExtent(i,e)}))}}))}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;wF(["min","max"],(function(r){var o=t.get(r+"Span"),i=t.get(r+"ValueSpan");null!=i&&(i=this.getAxisModel().axis.scale.parse(i)),null!=i?o=Vy(n[0]+i,n,[0,100],!0):null!=o&&(i=Vy(o,[0,100],n,!0)-n[0]),e[r+"Span"]=o,e[r+"ValueSpan"]=i}),this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=qy(n,[0,500]);r=Math.min(r,20);var o=e.axis.scale.rawExtentInfo;0!==t[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==t[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(r)),o.freeze()}},e}();const CF={getTargetSeries:function(e){function t(t){e.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,o){var i=e.getComponent(Hj(r),o);t(r,o,i,n)}))}))}t((function(e,t,n,r){n.__dzAxisProxy=null}));var n=[];t((function(t,r,o,i){o.__dzAxisProxy||(o.__dzAxisProxy=new kF(t,r,i,e),n.push(o.__dzAxisProxy))}));var r=jf();return sf(n,(function(e){sf(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 _F=!1;function MF(e){_F||(_F=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,CF),function(e){e.registerAction("dataZoom",(function(e,t){sf(Wj(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 TF(e){MF(e),e.registerComponentModel(Qj),e.registerComponentView(xF),mF(e)}var PF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Pk(Yj.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}(Yj);const DF=PF;var AF=Aw,OF="horizontal",IF="vertical",RF=["line","bar","candlestick","scatter"],EF={easing:"cubicOut",duration:100,delay:0},LF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return Ap(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=hf(this._onBrush,this),this._onBrushEnd=hf(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,o){if(e.prototype.render.apply(this,arguments),RD(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){ED(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 Zy;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect")?7:0,r=this._findCoordRect(),o={width:t.getWidth(),height:t.getHeight()},i=this._orient===OF?{right:o.width-r.x-r.width,top:o.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},a=AC(e.option);sf(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=i[e])}));var s=MC(a,o);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===IF&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),o=r&&r.get("inverse"),i=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;i.attr(n!==OF||o?n===OF&&o?{scaleY:a?1:-1,scaleX:-1}:n!==IF||o?{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([i]);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 AF({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new AF({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:hf(this._onClickPanel,this)}),i=this.api.getZr();r?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",i.on("mousemove",this._onBrush),i.on("mouseup",this._onBrushEnd)):(i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)),n.add(o)},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,o=r.getRawData(),i=r.getShadowDim&&r.getShadowDim(),a=i&&o.getDimensionInfo(i)?r.getShadowDim():e.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(o!==this._shadowData||a!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var u=o.getDataExtent(a),c=.3*(u[1]-u[0]);u=[u[0]-c,u[1]+c];var d,h=[0,t[1]],p=[0,t[0]],f=[[t[0],0],[0,0]],m=[],g=p[1]/(o.count()-1),v=0,y=Math.round(o.count()/t[0]);o.each([a],(function(e,t){if(y>0&&t%y)v+=g;else{var n=null==e||isNaN(e)||""===e,r=n?0:Vy(e,u,h,!0);n&&!d&&t?(f.push([f[f.length-1][0],0]),m.push([m[m.length-1][0],0])):!n&&d&&(f.push([v,0]),m.push([v,0])),f.push([v,r]),m.push([v,r]),v+=g,d=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=m}this._shadowData=o,this._shadowDim=a,this._shadowSize=[t[0],t[1]];for(var b=this.dataZoomModel,x=0;x<3;x++){var w=S(1===x);this._displayables.sliderGroup.add(w),this._displayables.dataShadowSegs.push(w)}}}function S(e){var t=b.getModel(e?"selectedDataBackground":"dataBackground"),n=new Zy,r=new mP({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),o=new yP({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(o),n}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,r=this.ecModel;return e.eachTargetAxis((function(o,i){sf(e.getAxisProxy(o,i).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&rf(RF,e.get("type"))<0)){var a,s=r.getComponent(Hj(o),i).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[o],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:o,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],o=this._displayables.sliderGroup,i=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),c=t.filler=new AF({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new AF({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:i[0],height:i[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),sf([0,1],(function(t){var i=a.get("handleIcon");!RA[i]&&i.indexOf("path://")<0&&i.indexOf("image://")<0&&(i="path://"+i);var s=ZA(i,-1,0,2,2,null,!0);s.attr({cursor:ZF(this._orient),draggable:!0,drift:hf(this._onDragMove,this,t),ondragend:hf(this._onDragEnd,this),onmouseover:hf(this._showDataInfo,this,!0),onmouseout:hf(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=$y(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(),RS(s);var c=a.get("handleColor");null!=c&&(s.style.fill=c),o.add(n[t]=s);var d=a.getModel("textStyle");e.add(r[t]=new Ww({silent:!0,invisible:!0,style:rk(d,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:d.getTextColor(),font:d.getFont()}),z2:10}))}),this);var d=c;if(u){var h=$y(a.get("moveHandleSize"),i[1]),p=t.moveHandle=new Aw({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:i[1]-.5,height:h}}),f=.8*h,m=t.moveHandleIcon=ZA(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);m.silent=!0,m.y=i[1]+h/2-.5,p.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var g=Math.min(i[1]/2,Math.max(h,10));(d=t.moveZone=new Aw({invisible:!0,shape:{y:i[1]-g,height:h+g}})).on("mouseover",(function(){s.enterEmphasis(p)})).on("mouseout",(function(){s.leaveEmphasis(p)})),o.add(p),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:ZF(this._orient),drift:hf(this._onDragMove,this,"all"),ondragstart:hf(this._showDataInfo,this,!0),ondragend:hf(this._onDragEnd,this),onmouseover:hf(this._showDataInfo,this,!0),onmouseout:hf(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Vy(e[0],[0,100],t,!0),Vy(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,o=this._getViewExtent(),i=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];tF(t,r,o,n.get("zoomLock")?"all":e,null!=i.minSpan?Vy(i.minSpan,a,o,!0):null,null!=i.maxSpan?Vy(i.maxSpan,a,o,!0):null);var s=this._range,l=this._range=Wy([Vy(r[0],o,a,!0),Vy(r[1],o,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=Wy(n.slice()),o=this._size;sf([0,1],(function(e){var r=t.handles[e],i=this._handleHeight;r.attr({scaleX:i/2,scaleY:i/2,x:n[e]+(e?-1:1),y:o[1]/2-i/2})}),this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:o[1]});var i={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(i),t.moveZone.setShape(i),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",i.x+i.width/2));for(var a=t.dataShadowSegs,s=[0,r[0],r[1],o[0]],l=0;lt[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,o=(r[0]+r[1])/2,i=this._updateInterval("all",n[0]-o);this._updateView(),i&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new zm(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=Wy([Vy(n.x,r,o,!0),Vy(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Dm(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new AF({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var i=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(e,t),l=a.transformCoordToLocal(i.x,i.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),o.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?EF:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=Uj(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(),o=this.api.getHeight();e={x:.2*r,y:.2*o,width:.6*r,height:.6*o}}return e},t.type="dataZoom.slider",t}(eF);function ZF(e){return"vertical"===e?"ns-resize":"ew-resize"}const NF=LF;function jF(e){e.registerComponentModel(DF),e.registerComponentView(NF),MF(e)}var FF=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 Ap(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"]),ff(t)&&sf(t,(function(e,r){gf(e)&&(e={type:e}),t[r]=ef(e,function(e,t){return"all"===t?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(n,e.type))}))},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n=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}(RC);const zF=FF;function BF(e,t){var n=fC(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new Aw({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 VF=pf,$F=sf,HF=Zy,WF=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return Ap(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new HF),this.group.add(this._selectorGroup=new HF),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 o=e.get("align"),i=e.get("orient");o&&"auto"!==o||(o="right"===e.get("left")&&"vertical"===i?"right":"left");var a=e.get("selector",!0),s=e.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===i?"end":"start"),this.renderInner(o,e,t,n,a,i,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),d=MC(l,u,c),h=this.layoutInner(e,o,d,r,a,s),p=MC(nf({width:h.width,height:h.height},l),u,c);this.group.x=p.x-h.x,this.group.y=p.y-h.y,this.group.markRedraw(),this.group.add(this._backgroundEl=BF(h,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,o,i,a){var s=this.getContentGroup(),l=jf(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),$F(t.getData(),(function(o,i){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var d=new HF;return d.newline=!0,void s.add(d)}var h=n.getSeriesByName(a)[0];if(!l.get(a)){if(h){var p=h.getData(),f=p.getVisual("legendLineStyle")||{},m=p.getVisual("legendIcon"),g=p.getVisual("style"),v=this._createItem(h,a,i,o,t,e,f,g,m,u,r);v.on("click",VF(UF,a,null,r,c)).on("mouseover",VF(GF,h.name,null,r,c)).on("mouseout",VF(KF,h.name,null,r,c)),n.ssr&&v.eachChild((function(e){var t=Uw(e);t.seriesIndex=h.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(a))return;var h=d.indexOfName(a),p=d.getItemVisual(h,"style"),f=d.getItemVisual(h,"legendIcon"),m=sv(p.fill);m&&0===m[3]&&(m[3]=.2,p=tf(tf({},p),{fill:fv(m,"rgba")}));var g=this._createItem(s,a,i,o,t,e,{},p,f,u,r);g.on("click",VF(UF,null,a,r,c)).on("mouseover",VF(GF,null,a,r,c)).on("mouseout",VF(KF,null,a,r,c)),n.ssr&&g.eachChild((function(e){var t=Uw(e);t.seriesIndex=s.seriesIndex,t.dataIndex=i,t.ssrType="legend"})),l.set(a,!0)}}),this);0}}),this),o&&this._createSelector(o,t,r,i,a)},t.prototype._createSelector=function(e,t,n,r,o){var i=this.getSelectorGroup();$F(e,(function(e){var r=e.type,o=new Ww({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});i.add(o),tk(o,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),RS(o)}))},t.prototype._createItem=function(e,t,n,r,o,i,a,s,l,u,c){var d=e.visualDrawType,h=o.get("itemWidth"),p=o.get("itemHeight"),f=o.isSelected(t),m=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,o,i,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=t.lineWidth>0?2:0),$F(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",d=l.getShallow("decal");u.decal=d&&"inherit"!==d?uO(d,a):r.decal,"inherit"===u.fill&&(u.fill=r[o]);"inherit"===u.stroke&&(u.stroke=r[c]);"inherit"===u.opacity&&(u.opacity=("fill"===o?r:n).opacity);s(u,r);var h=t.getModel("lineStyle"),p=h.getLineStyle();if(s(p,n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!i){var f=t.get("inactiveBorderWidth"),m=u[c];u.lineWidth="auto"===f?r.lineWidth>0&&m?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),p.stroke=h.get("inactiveColor"),p.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:p}}(l=v||l||"roundRect",r,a,s,d,f,c),b=new HF,x=r.getModel("textStyle");if(!mf(e.getLegendIcon)||v&&"inherit"!==v){var w="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add(function(e){var t=e.icon||"roundRect",n=ZA(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:h,itemHeight:p,icon:l,iconRotate:w,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}))}else b.add(e.getLegendIcon({itemWidth:h,itemHeight:p,icon:l,iconRotate:m,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}));var S="left"===i?h+5:-5,k=i,C=o.get("formatter"),_=t;gf(C)&&C?_=C.replace("{name}",null!=t?t:""):mf(C)&&(_=C(t));var M=f?x.getTextColor():r.get("inactiveColor");b.add(new Ww({style:rk(x,{text:_,x:S,y:p/2,fill:M,align:k,verticalAlign:"middle"},{inheritColor:M})}));var T=new Aw({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=r.getModel("tooltip");return P.get("show")&&vD({el:T,componentModel:o,itemName:t,itemTooltipOption:P.option}),b.add(T),b.eachChild((function(e){e.silent=!0})),T.silent=!u,this.getContentGroup().add(b),RS(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,t,n,r,o,i){var a=this.getContentGroup(),s=this.getSelectorGroup();_C(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(),o){_C("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),d=[-c.x,-c.y],h=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",m=0===p?"height":"width",g=0===p?"y":"x";"end"===i?d[p]+=l[f]+h:u[p]+=c[f]+h,d[1-p]+=l[m]/2-c[m]/2,s.x=d[0],s.y=d[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+h+c[f],v[m]=Math.max(l[m],c[m]),v[g]=Math.min(0,c[g]+d[1-p]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(ST);function UF(e,t,n,r){KF(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),GF(e,t,n,r)}function qF(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,o=n.length;rn[o],f=[-d.x,-d.y];t||(f[r]=l[s]);var m=[0,0],g=[-h.x,-h.y],v=Mf(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?g[r]+=n[o]-h[o]:m[r]+=h[o]+v);g[1-r]+=d[i]/2-h[i]/2,l.setPosition(f),u.setPosition(m),c.setPosition(g);var y={x:0,y:0};if(y[o]=p?n[o]:d[o],y[i]=Math.max(d[i],h[i]),y[a]=Math.min(0,h[a]+g[1-r]),u.__rectSize=n[o],p){var b={x:0,y:0};b[o]=Math.max(n[o]-h[o]-v,0),b[i]=y[i],u.setClipPath(new Aw({shape:b})),u.__rectSize=b[o]}else c.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&WS(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),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;sf(["pagePrev","pageNext"],(function(r){var o=null!=t[r+"DataIndex"],i=n.childOfName(r);i&&(i.setStyle("fill",o?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),i.cursor=o?"pointer":"default")}));var r=n.childOfName("pageText"),o=e.get("pageFormatter"),i=t.pageIndex,a=null!=i?i+1:0,s=t.pageCount;r&&o&&r.setStyle("text",gf(o)?o.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):o({current:a,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,o=e.getOrient().index,i=oz[o],a=iz[o],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,d=c?1:0,h={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return h;var p=y(u);h.contentPosition[o]=-p.s;for(var f=s+1,m=p,g=p,v=null;f<=c;++f)(!(v=y(l[f]))&&g.e>m.s+r||v&&!b(v,m.s))&&(m=g.i>m.i?g:v)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=m.i),++h.pageCount),g=v;for(f=s-1,m=p,g=p,v=null;f>=-1;--f)(v=y(l[f]))&&b(g,v.s)||!(m.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild((function(r,o){var i=r.__legendDataIndex;null==n&&null!=i&&(n=o),i===e&&(t=o)})),null!=t?t:n):0;var t,n},t.type="legend.scroll",t}(YF);const sz=az;function lz(e){wI(JF),e.registerComponentModel(nz),e.registerComponentView(sz),function(e){e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}(e)}var uz=Sb(),cz=Jp,dz=hf;function hz(e,t,n,r){pz(uz(n).lastProp,r)||(uz(n).lastProp=r,t?WS(n,r,e):(n.stopAnimation(),n.attr(r)))}function pz(e,t){if(bf(e)&&bf(t)){var n=!0;return sf(t,(function(t,r){n=n&&pz(e[r],t)})),!!n}return e===t}function fz(e,t){e[t.get(["label","show"])?"show":"hide"]()}function mz(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function gz(e,t,n){var r=t.get("z"),o=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=o&&(e.zlevel=o),e.silent=n)}))}function vz(e,t,n,r,o){var i=yz(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=fC(a.get("padding")||0),l=a.getFont(),u=yy(i,l),c=o.position,d=u.width+s[1]+s[3],h=u.height+s[0]+s[2],p=o.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var f=o.verticalAlign;"bottom"===f&&(c[1]-=h),"middle"===f&&(c[1]-=h/2),function(e,t,n,r){var o=r.getWidth(),i=r.getHeight();e[0]=Math.min(e[0]+t,o)-t,e[1]=Math.min(e[1]+n,i)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,d,h,r);var m=a.get("backgroundColor");m&&"auto"!==m||(m=t.get(["axisLine","lineStyle","color"])),e.label={x:c[0],y:c[1],style:rk(a,{text:i,font:l,fill:a.getTextColor(),padding:s,backgroundColor:m}),z2:10}}function yz(e,t,n,r,o){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:o.precision}),a=o.formatter;if(a){var s={value:MZ(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};sf(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,o=t&&t.getDataParams(r);o&&s.seriesData.push(o)})),gf(a)?i=a.replace("{value}",i):mf(a)&&(i=a(s))}return i}function bz(e,t,n){var r=[1,0,0,1,0,0];return jm(r,r,n.rotation),Nm(r,r,n.position),sD([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}var xz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.makeElOption=function(e,t,n,r,o){var i=n.axis,a=i.grid,s=r.get("type"),l=wz(a,i).getOtherAxis(i).getGlobalExtent(),u=i.toGlobalCoord(i.dataToCoord(t,!0));if(s&&"none"!==s){var c=function(e){var t,n=e.get("type"),r=e.getModel(n+"Style");return"line"===n?(t=r.getLineStyle()).fill=null:"shadow"===n&&((t=r.getAreaStyle()).stroke=null),t}(r),d=Sz[s](i,u,l);d.style=c,e.graphicKey=d.type,e.pointer=d}!function(e,t,n,r,o,i){var a=uN.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),vz(t,r,o,i,{position:bz(r.axis,e,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(t,e,qZ(a.model,n),n,r,o)},t.prototype.getHandleTransform=function(e,t,n){var r=qZ(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=bz(t.axis,e,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var o=n.axis,i=o.grid,a=o.getGlobalExtent(!0),s=wz(i,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=[e.x,e.y];u[l]+=t[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var c=(s[1]+s[0])/2,d=[c,c];d[l]=u[l];return{x:u[0],y:u[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},t}(function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var o=t.get("value"),i=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==o||this._lastStatus!==i){this._lastValue=o,this._lastStatus=i;var a=this._group,s=this._handle;if(!i||"hide"===i)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,o,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(a){var d=pf(hz,t,c);this.updatePointerEl(a,l,d),this.updateLabelEl(a,l,d,t)}else a=this._group=new Zy,this.createPointerEl(a,l,e,t),this.createLabelEl(a,l,e,t),n.getZr().add(a);gz(a,t,!0),this._renderHandle(o)}},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,o="category"===r.type,i=t.get("snap");if(!i&&!o)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(o&&r.getBandWidth()>a)return!0;if(i){var s=hN(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,o){},e.prototype.createPointerEl=function(e,t,n,o){var i=t.pointer;if(i){var a=uz(e).pointerEl=new r[i.type](cz(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var o=uz(e).labelEl=new Ww(cz(t.label));e.add(o),fz(o,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=uz(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 o=uz(e).labelEl;o&&(o.setStyle(t.label.style),n(o,{x:t.label.x,y:t.label.y}),fz(o,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,i=n.getModel("handle"),a=n.get("status");if(!i.get("show")||!a||"hide"===a)return o&&r.remove(o),void(this._handle=null);this._handle||(t=!0,o=this._handle=pD(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Dm(e.event)},onmousedown:dz(this._onHandleDragMove,this,0,0),drift:dz(this._onHandleDragMove,this),ondragend:dz(this._onHandleDragEnd,this)}),r.add(o)),gz(o,n,!1),o.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=i.get("size");ff(s)||(s=[s,s]),o.scaleX=s[0]/2,o.scaleY=s[1]/2,RD(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},e.prototype._moveHandleToValue=function(e,t){hz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,mz(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(mz(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(mz(r)),uz(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),ED(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 wz(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Sz={line:function(e,t,n){var r,o,i;return{type:"Line",subPixelOptimize:!0,shape:(r=[t,n[0]],o=[t,n[1]],i=kz(e),{x1:r[i=i||0],y1:r[1-i],x2:o[i],y2:o[1-i]})}},shadow:function(e,t,n){var r,o,i,a=Math.max(1,e.getBandWidth()),s=n[1]-n[0];return{type:"Rect",shape:(r=[t-a/2,n[0]],o=[a,s],i=kz(e),{x:r[i=i||0],y:r[1-i],width:o[i],height:o[1-i]})}}};function kz(e){return"x"===e.dim?0:1}const Cz=xz;var _z=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(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}(RC);const Mz=_z;var Tz=Sb(),Pz=sf;function Dz(e,t,n){if(!Rp.node){var r=t.getZr();Tz(r).records||(Tz(r).records={}),function(e,t){if(Tz(e).initialized)return;function n(n,r){e.on(n,(function(n){var o=function(e){var t={showTip:[],hideTip:[]},n=function(r){var o=t[r.type];o?o.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}(t);Pz(Tz(e).records,(function(e){e&&r(e,n,o.dispatchAction)})),function(e,t){var n,r=e.showTip.length,o=e.hideTip.length;r?n=e.showTip[r-1]:o&&(n=e.hideTip[o-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(o.pendings,t)}))}Tz(e).initialized=!0,n("click",pf(Oz,"click")),n("mousemove",pf(Oz,"mousemove")),n("globalout",Az)}(r,t),(Tz(r).records[e]||(Tz(r).records[e]={})).handler=n}}function Az(e,t,n){e.handler("leave",null,n)}function Oz(e,t,n,r){t.handler(e,n,r)}function Iz(e,t){if(!Rp.node){var n=t.getZr();(Tz(n).records||{})[e]&&(Tz(n).records[e]=null)}}var Rz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.render=function(e,t,n){var r=t.getComponent("tooltip"),o=e.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";Dz("axisPointer",n,(function(e,t,n){"none"!==o&&("leave"===e||o.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},t.prototype.remove=function(e,t){Iz("axisPointer",t)},t.prototype.dispose=function(e,t){Iz("axisPointer",t)},t.type="axisPointer",t}(ST);const Ez=Rz;function Lz(e,t){var n,r=[],o=e.seriesIndex;if(null==o||!(n=t.getSeriesByIndex(o)))return{point:[]};var i=n.getData(),a=wb(i,e);if(null==a||a<0||ff(a))return{point:[]};var s=i.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,d=u.dim,h="x"===c||"radius"===c?1:0,p=i.mapDimension(d),f=[];f[h]=i.get(p,a),f[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),a),r=l.dataToPoint(f)||[]}else r=l.dataToPoint(i.getValues(lf(l.dimensions,(function(e){return i.mapDimension(e)})),a))||[];else if(s){var m=s.getBoundingRect().clone();m.applyTransform(s.transform),r=[m.x+m.width/2,m.y+m.height/2]}return{point:r,el:s}}var Zz=Sb();function Nz(e,t,n){var r=e.currTrigger,o=[e.x,e.y],i=e,a=e.dispatchAction||hf(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Vz(o)&&(o=Lz({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Vz(o),u=i.axesInfo,c=s.axesInfo,d="leave"===r||Vz(o),h={},p={},f={list:[],map:{}},m={showPointer:pf(Fz,p),showTooltip:pf(zz,f)};sf(s.coordSysMap,(function(e,t){var n=l||e.containPoint(o);sf(s.coordSysAxesInfo[t],(function(e,t){var r=e.axis,i=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}}(u,e);if(!d&&n&&(!u||i)){var a=i&&i.value;null!=a||l||(a=r.pointToData(o)),null!=a&&jz(e,a,m,!1,h)}}))}));var g={};return sf(c,(function(e,t){var n=e.linkGroup;n&&!p[t]&&sf(n.axesInfo,(function(t,r){var o=p[r];if(t!==e&&o){var i=o.value;n.mapper&&(i=e.axis.scale.parse(n.mapper(i,Bz(t),Bz(e)))),g[e.key]=i}}))})),sf(g,(function(e,t){jz(c[t],e,m,!0,h)})),function(e,t,n){var r=n.axesInfo=[];sf(t,(function(t,n){var o=t.axisPointerModel.option,i=e[n];i?(!t.useHandle&&(o.status="show"),o.value=i.value,o.seriesDataIndices=(i.payloadBatch||[]).slice()):!t.useHandle&&(o.status="hide"),"show"===o.status&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:o.value})}))}(p,c,h),function(e,t,n,r){if(Vz(t)||!e.list.length)return void r({type:"hideTip"});var o=((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:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:e.list})}(f,o,e,a),function(e,t,n){var r=n.getZr(),o="axisPointerLastHighlights",i=Zz(r)[o]||{},a=Zz(r)[o]={};sf(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&sf(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var s=[],l=[];sf(i,(function(e,t){!a[t]&&l.push(e)})),sf(a,(function(e,t){!i[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(c,0,n),h}}function jz(e,t,n,r,o){var i=e.axis;if(!i.scale.isBlank()&&i.containData(t))if(e.involveSeries){var a=function(e,t){var n=t.axis,r=n.dim,o=e,i=[],a=Number.MAX_VALUE,s=-1;return sf(t.seriesModels,(function(t,l){var u,c,d=t.getData().mapDimensionsAll(r);if(t.getAxisTooltipData){var h=t.getAxisTooltipData(d,e,n);c=h.dataIndices,u=h.nestestValue}else{if(!(c=t.getData().indicesOfNearest(d[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(d[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=a&&((f=0&&s<0)&&(a=f,s=p,o=u,i.length=0),sf(c,(function(e){i.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:i,snapToValue:o}}(t,e),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==o.seriesIndex&&tf(o,s[0]),!r&&e.snap&&i.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,a,l)}else n.showPointer(e,t)}function Fz(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function zz(e,t,n,r){var o=n.payloadBatch,i=t.axis,a=i.model,s=t.axisPointerModel;if(t.triggerTooltip&&o.length){var l=t.coordSys.model,u=fN(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:i.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function Bz(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 Vz(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function $z(e){vN.registerAxisPointerClass("CartesianAxisPointer",Cz),e.registerComponentModel(Mz),e.registerComponentView(Ez),e.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!ff(t)&&(e.axisPointer.link=[t])}})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=cN(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Nz)}var Hz=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 Ap(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}(RC),Wz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,o=e.getModel("textStyle"),i=e.getModel("subtextStyle"),a=e.get("textAlign"),s=Mf(e.get("textBaseline"),e.get("textVerticalAlign")),l=new Ww({style:rk(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),d=new Ww({style:rk(i,{text:c,fill:i.getTextColor(),y:u.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),h=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!h&&!f,d.silent=!p&&!f,h&&l.on("click",(function(){xC(h,"_"+e.get("target"))})),p&&d.on("click",(function(){xC(p,"_"+e.get("subtarget"))})),Uw(l).eventData=Uw(d).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),c&&r.add(d);var m=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=m.width,g.height=m.height;var v=MC(g,{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),d.setStyle(y),m=r.getBoundingRect();var b=v.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var w=new Aw({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});r.add(w)}},t.type="title",t}(ST);var Uz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.type="dataZoom.select",t}(Yj);const qz=Uz;var Gz=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.type="dataZoom.select",t}(eF);const Kz=Gz;function Yz(e){e.registerComponentModel(qz),e.registerComponentView(Kz),MF(e)}var Xz=function(){},Qz={};function Jz(e,t){Qz[e]=t}function eB(e){return Qz[e]}var tB=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.optionUpdated=function(){e.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;sf(this.option.feature,(function(e,n){var r=eB(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(t)),ef(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}(RC);const nB=tB;var rB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.render=function(e,t,n,r){var o=this.group;if(o.removeAll(),e.get("show")){var i=+e.get("itemSize"),a="vertical"===e.get("orient"),s=e.get("feature")||{},l=this._features||(this._features={}),u=[];sf(s,(function(e,t){u.push(t)})),new KI(this._featureNames||[],u).add(c).update(c).remove(pf(c,null)).execute(),this._featureNames=u,function(e,t,n){var r=t.getBoxLayoutParams(),o=t.get("padding"),i={width:n.getWidth(),height:n.getHeight()},a=MC(r,i,o);_C(t.get("orient"),e,t.get("itemGap"),a.width,a.height),TC(e,r,i,o)}(o,e,n),o.add(BF(o.getBoundingRect(),e)),a||o.eachChild((function(e){var t=e.__title,r=e.ensureState("emphasis"),a=r.textConfig||(r.textConfig={}),s=e.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!mf(l)&&t){var u=l.style||(l.style={}),c=yy(t,Ww.makeFont(u)),d=e.x+o.x,h=!1;e.y+o.y+i+c.height>n.getHeight()&&(a.position="top",h=!0);var p=h?-5-c.height:i+10;d+c.width/2>n.getWidth()?(a.position=["100%",p],u.align="right"):d-c.width/2<0&&(a.position=[0,p],u.align="left")}}))}function c(c,d){var h,p=u[c],f=u[d],m=s[p],g=new _k(m,e,e.ecModel);if(r&&null!=r.newTitle&&r.featureName===p&&(m.title=r.newTitle),p&&!f){if(function(e){return 0===e.indexOf("my")}(p))h={onclick:g.option.onclick,featureName:p};else{var v=eB(p);if(!v)return;h=new v}l[p]=h}else if(!(h=l[f]))return;h.uid=Tk("toolbox-feature"),h.model=g,h.ecModel=t,h.api=n;var y=h instanceof Xz;p||!f?!g.get("show")||y&&h.unusable?y&&h.remove&&h.remove(t,n):(!function(r,s,l){var u,c,d=r.getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),p=s instanceof Xz&&s.getIcons?s.getIcons():r.get("icon"),f=r.get("title")||{};gf(p)?(u={})[l]=p:u=p;gf(f)?(c={})[l]=f:c=f;var m=r.iconPaths={};sf(u,(function(l,u){var p=pD(l,{},{x:-i/2,y:-i/2,width:i,height:i});p.setStyle(d.getItemStyle()),p.ensureState("emphasis").style=h.getItemStyle();var f=new Ww({style:{text:c[u],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:uk({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},t)},ignore:!0});p.setTextContent(f),vD({el:p,componentModel:e,itemName:u,formatterParamsExtra:{title:c[u]}}),p.__title=c[u],p.on("mouseover",(function(){var t=h.getItemStyle(),r=a?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";f.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),p.setTextConfig({position:h.get("textPosition")||r}),f.ignore=!e.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===r.get(["iconStatus",u])?xS:wS)(p),o.add(p),p.on("click",hf(s.onclick,s,t,n,u)),m[u]=p}))}(g,h,p),g.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?xS:wS)(r[e])},h instanceof Xz&&h.render&&h.render(g,t,n,r)):y&&h.dispose&&h.dispose(t,n)}},t.prototype.updateView=function(e,t,n,r){sf(this._features,(function(e){e instanceof Xz&&e.updateView&&e.updateView(e.model,t,n,r)}))},t.prototype.remove=function(e,t){sf(this._features,(function(n){n instanceof Xz&&n.remove&&n.remove(e,t)})),this.group.removeAll()},t.prototype.dispose=function(e,t){sf(this._features,(function(n){n instanceof Xz&&n.dispose&&n.dispose(e,t)}))},t.type="toolbox",t}(ST);const oB=rB;var iB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",o="svg"===t.getZr().painter.getType(),i=o?"svg":n.get("type",!0)||"png",a=t.getConnectedDataURL({type:i,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),s=Rp.browser;if(mf(MouseEvent)&&(s.newEdge||!s.ie&&!s.edge)){var l=document.createElement("a");l.download=r+"."+i,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||o){var c=a.split(","),d=c[0].indexOf("base64")>-1,h=o?decodeURIComponent(c[1]):c[1];d&&(h=window.atob(h));var p=r+"."+i;if(window.navigator.msSaveOrOpenBlob){for(var f=h.length,m=new Uint8Array(f);f--;)m[f]=h.charCodeAt(f);var g=new Blob([m]);window.navigator.msSaveOrOpenBlob(g,p)}else{var v=document.createElement("iframe");document.body.appendChild(v);var y=v.contentWindow,b=y.document;b.open("image/svg+xml","replace"),b.write(h),b.close(),y.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(v)}}else{var x=n.get("lang"),w='',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}(Xz);const aB=iB;var sB="__ec_magicType_stack__",lB=[["line","bar"],["stack"]],uB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return sf(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=this.model,o=r.get(["seriesIndex",n]);if(cB[n]){var i,a={series:[]};sf(lB,(function(e){rf(e,n)>=0&&sf(e,(function(e){r.setIconStatus(e,"normal")}))})),r.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(e){var t=e.subType,o=e.id,i=cB[n](t,o,e,r);i&&(nf(i,e.option),a.series.push(i));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,Mb).models[0].componentIndex;a[u]=a[u]||[];for(var d=0;d<=c;d++)a[u][c]=a[u][c]||{};a[u][c].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(i=ef({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(s="tiled")),t.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:i,featureName:"magicType"})}},t}(Xz),cB={line:function(e,t,n,r){if("bar"===e)return ef({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 ef({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 o=n.get("stack")===sB;if("line"===e||"bar"===e)return r.setIconStatus("stack",o?"normal":"emphasis"),ef({id:t,stack:o?"":sB},r.get(["option","stack"])||{},!0)}};pI({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)}));const dB=uB;var hB=new Array(60).join("-"),pB="\t";function fB(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var mB=new RegExp("[\t]+","g");function gB(e,t){var n=e.split(new RegExp("\n*"+hB+"\n*","g")),r={series:[]};return sf(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(pB)>=0)return!0}(e)){var o=function(e){for(var t=e.split(/\n+/g),n=[],r=lf(fB(t.shift()).split(mB),(function(e){return{name:e,data:[]}})),o=0;o6}(e)||i){if(a&&!i){"single"===s.brushMode&&$B(e);var l=Jp(s);l.brushType=aV(l.brushType,a),l.panelId=a===_B?null:a.panelId,i=e._creatingCover=LB(e,l),e._covers.push(i)}if(i){var u=uV[aV(e._brushType,a)];i.__brushOption.range=u.getCreatingRange(nV(e,i,e._track)),r&&(ZB(e,i),u.updateCommon(e,i)),NB(e,i),o={isEnd:r}}}else r&&"single"===s.brushMode&&s.removeOnClick&&BB(e,t,n)&&$B(e)&&(o={isEnd:r,removeOnClick:!0});return o}function aV(e,t){return"auto"===e?t.defaultBrushType:e}var sV={mousedown:function(e){if(this._dragging)lV(this,e);else if(!e.target||!e.target.draggable){rV(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=BB(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&&!function(e,t,n){var r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}(e,t.offsetX,t.offsetY)){var r=e._zr,o=e._covers,i=BB(e,t,n);if(!e._dragging)for(var a=0;a=0)&&e(o,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=CV[e.brushType](0,n,t);e.__rangeOffset={offset:MV[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}})),e},e.prototype.matchOutputRanges=function(e,t,n){sf(e,(function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&sf(r.coordSyses,(function(r){var o=CV[e.brushType](1,r,e.range,!0);n(e,o.values,r,t)}))}),this)},e.prototype.setInputRanges=function(e,t){sf(e,(function(e){var n,r,o,i,a,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=CV[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?MV[e.brushType](l.values,u.offset,(n=l.xyMinMax,r=u.xyMinMax,o=PV(n),i=PV(r),a=[o[0]/i[0],o[1]/i[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},e.prototype.makePanelOpts=function(e,t){return lf(this._targetInfoList,(function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:pV(r),isTargetByCursor:mV(r,e,n.coordSysModel),getLinearBrushOtherExtent:fV(r)}}))},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&rf(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=xV(t,e),o=0;oe[1]&&e.reverse(),e}function xV(e,t){return Cb(e,t,{includeMainTypes:vV})}var wV={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,o=e.gridModels,i=jf(),a={},s={};(n||r||o)&&(sf(n,(function(e){var t=e.axis.grid.model;i.set(t.id,t),a[t.id]=!0})),sf(r,(function(e){var t=e.axis.grid.model;i.set(t.id,t),s[t.id]=!0})),sf(o,(function(e){i.set(e.id,e),a[e.id]=!0,s[e.id]=!0})),i.each((function(e){var o=e.coordinateSystem,i=[];sf(o.getCartesians(),(function(e,t){(rf(n,e.getAxis("x").model)>=0||rf(r,e.getAxis("y").model)>=0)&&i.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:i[0],coordSyses:i,getPanelRect:kV.grid,xAxisDeclared:a[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){sf(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:kV.geo})}))}},SV=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,o=e.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&r&&(o=r.axis.grid.model),o&&o===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],kV={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(aD(e)),t}},CV={lineX:pf(_V,0),lineY:pf(_V,1),rect:function(e,t,n,r){var o=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),i=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),a=[bV([o[0],i[0]]),bV([o[1],i[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:lf(n,(function(n){var i=e?t.pointToData(n,r):t.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],i[0]),o[1][0]=Math.min(o[1][0],i[1]),o[0][1]=Math.max(o[0][1],i[0]),o[1][1]=Math.max(o[1][1],i[1]),i})),xyMinMax:o}}};function _V(e,t,n,r){var o=n.getAxis(["x","y"][e]),i=bV(lf([0,1],(function(e){return t?o.coordToData(o.toLocalCoord(r[e]),!0):o.toGlobalCoord(o.dataToCoord(r[e]))}))),a=[];return a[e]=i,a[1-e]=[NaN,NaN],{values:i,xyMinMax:a}}var MV={lineX:pf(TV,0),lineY:pf(TV,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 lf(e,(function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]}))}};function TV(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function PV(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}const DV=yV;var AV,OV,IV=sf,RV=ub+"toolbox-dataZoom_",EV=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ap(t,e),t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new dV(n.getZr()),this._brushController.on("brush",hf(this._onBrush,this)).mount()),function(e,t,n,r,o){var i=n._isZoomActive;r&&"takeGlobalCursor"===r.type&&(i="dataZoomSelect"===r.key&&r.dataZoomSelectActive);n._isZoomActive=i,e.setIconStatus("zoom",i?"emphasis":"normal");var a=new DV(ZV(e),t,{include:["grid"]}),s=a.makePanelOpts(o,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!i||!s.length)&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,r,n),function(e,t){e.setIconStatus("back",function(e){return SB(e).length}(t)>1?"emphasis":"normal")}(e,t)},t.prototype.onclick=function(e,t,n){LV[n].call(this)},t.prototype.remove=function(e,t){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new DV(ZV(this.model),r,{include:["grid"]}).matchOutputRanges(t,r,(function(e,t,n){if("cartesian2d"===n.type){var r=e.brushType;"rect"===r?(o("x",n,t[0]),o("y",n,t[1])):o({lineX:"x",lineY:"y"}[r],n,t)}})),function(e,t){var n=SB(e);xB(t,(function(t,r){for(var o=n.length-1;o>=0&&!n[o][r];o--);if(o<0){var i=e.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(i){var a=i.getPercentRange();n[0][r]={dataZoomId:r,start:a[0],end:a[1]}}}})),n.push(t)}(r,n),this._dispatchZoomAction(n)}function o(e,t,o){var i=t.getAxis(e),a=i.model,s=function(e,t,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)})),r}(e,a,r),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(o=tF(0,o.slice(),i.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:o[0],endValue:o[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];IV(e,(function(e,n){t.push(Jp(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}(Xz),LV={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=SB(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return xB(n,(function(e,n){for(var o=t.length-1;o>=0;o--)if(e=t[o][n]){r[n]=e;break}})),r}(this.ecModel))}};function ZV(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}AV="dataZoom",OV=function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),o=[],i=Cb(e,ZV(r));return IV(i.xAxisModels,(function(e){return a(e,"xAxis","xAxisIndex")})),IV(i.yAxisModels,(function(e){return a(e,"yAxis","yAxisIndex")})),o}function a(e,t,n){var i=e.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:RV+t+i};a[n]=i,o.push(a)}},Af(null==t_.get(AV)&&OV),t_.set(AV,OV);const NV=EV;var jV=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(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}(RC);const FV=jV;function zV(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function BV(e){if(Rp.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n-1?(u+="top:50%",c+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",c+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var d=a*Math.PI/180,h=l+o,p=h*Math.abs(Math.cos(d))+h*Math.abs(Math.sin(d)),f=t+" solid "+o+"px;";return'
'}(n,r,o)),gf(e))i.innerHTML=e+a;else if(e){i.innerHTML="",ff(e)||(e=[e]);for(var s=0;s=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 o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(e,t,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Rp.node&&n.getDom()){var o=o$(r,n);this._ticket="";var i=r.dataByCoordSys,a=function(e,t,n){var r=_b(e).queryOptionMap,o=r.keys()[0];if(!o||"series"===o)return;var i=Pb(t,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),a=i.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(t){var n=Uw(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0})),s)return{componentMainType:o,componentIndex:a.componentIndex,el:s}}(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"},o)}else if(r.tooltip&&null!=r.x&&null!=r.y){var l=t$;l.x=r.x,l.y=r.y,l.update(),Uw(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},o)}else if(i)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:i,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=Lz(r,t),c=u.point[0],d=u.point[1];null!=c&&null!=d&&this._tryShow({offsetX:c,offsetY:d,target:u.el,position:r.position,positionDefault:"bottom"},o)}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},o))}},t.prototype.manuallyHideTip=function(e,t,n,r){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(o$(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var o=r.seriesIndex,i=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=i&&null!=a){var s=t.getSeriesByIndex(o);if(s)if("axis"===r$([s.getData().getItemModel(i),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:i,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){var o,i;if("legend"===Uw(n).ssrType)return;this._lastDataByCoordSys=null,kA(n,(function(e){return null!=Uw(e).dataIndex?(o=e,!0):null!=Uw(e).tooltipConfig?(i=e,!0):void 0}),!0),o?this._showSeriesItemTooltip(e,o,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=hf(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,o=[t.offsetX,t.offsetY],i=r$([t.tooltipOption],r),a=this._renderMode,s=[],l=QM("section",{blocks:[],noHeader:!0}),u=[],c=new lT;sf(e,(function(e){sf(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),o=e.value;if(t&&null!=o){var i=yz(o,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=QM("section",{header:i,noHeader:!Of(i),sortBlocks:!0,blocks:[]});l.blocks.push(d),sf(e.seriesDataIndices,(function(l){var h=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,f=h.getDataParams(p);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=MZ(t.axis,{value:o}),f.axisValueLabel=i,f.marker=c.makeTooltipMarker("item",bC(f.color),a);var m=gM(h.formatTooltip(p,!0,null)),g=m.frag;if(g){var v=r$([h],r).get("valueFormatter");d.blocks.push(v?tf({valueFormatter:v},g):g)}m.text&&u.push(m.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var d=t.position,h=i.get("order"),p=oT(l,c,a,h,n.get("useUTC"),i.get("textStyle"));p&&u.unshift(p);var f="richText"===a?"\n\n":"
",m=u.join(f);this._showOrMove(i,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(i,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(i,m,s,Math.random()+"",o[0],o[1],d,null,c)}))},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,o=Uw(t),i=o.seriesIndex,a=r.getSeriesByIndex(i),s=o.dataModel||a,l=o.dataIndex,u=o.dataType,c=s.getData(u),d=this._renderMode,h=e.positionDefault,p=r$([c.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,h?{position:h}:null),f=p.get("trigger");if(null==f||"item"===f){var m=s.getDataParams(l,u),g=new lT;m.marker=g.makeTooltipMarker("item",bC(m.color),d);var v=gM(s.formatTooltip(l,!1,u)),y=p.get("order"),b=p.get("valueFormatter"),x=v.frag,w=x?oT(b?tf({valueFormatter:b},x):x,g,d,y,r.get("useUTC"),p.get("textStyle")):v.text,S="item_"+s.name+"_"+l;this._showOrMove(p,(function(){this._showTooltipContent(p,w,m,S,e.offsetX,e.offsetY,e.position,e.target,g)})),n({type:"showTip",dataIndexInside:l,dataIndex:c.getRawIndex(l),seriesIndex:i,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=Uw(t),o=r.tooltipConfig.option||{};if(gf(o)){o={content:o,formatter:o}}var i=[o],a=this._ecModel.getComponent(r.componentMainType,r.componentIndex);a&&i.push(a),i.push({formatter:o.content});var s=e.positionDefault,l=r$(i,this._tooltipModel,s?{position:s}:null),u=l.get("content"),c=Math.random()+"",d=new lT;this._showOrMove(l,(function(){var n=Jp(l.get("formatterParams")||{});this._showTooltipContent(l,u,n,c,e.offsetX,e.offsetY,e.position,t,d)})),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,o,i,a,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent;u.setEnterable(e.get("enterable"));var c=e.get("formatter");a=a||e.get("position");var d=t,h=this._getNearestPoint([o,i],n,e.get("trigger"),e.get("borderColor")).color;if(c)if(gf(c)){var p=e.ecModel.get("useUTC"),f=ff(n)?n[0]:n;d=c,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(d=Kk(f.axisValue,d,p)),d=yC(d,n,!0)}else if(mf(c)){var m=hf((function(t,r){t===this._ticket&&(u.setContent(r,l,e,h,a),this._updatePosition(e,a,o,i,u,n,s))}),this);this._ticket=r,d=c(n,r,m)}else d=c;u.setContent(d,l,e,h,a),u.show(e,h),this._updatePosition(e,a,o,i,u,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||ff(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:ff(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,o,i,a){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=o.getSize(),c=e.get("align"),d=e.get("verticalAlign"),h=a&&a.getBoundingRect().clone();if(a&&h.applyTransform(a.transform),mf(t)&&(t=t([n,r],i,o.el,h,{viewSize:[s,l],contentSize:u.slice()})),ff(t))n=$y(t[0],s),r=$y(t[1],l);else if(bf(t)){var p=t;p.width=u[0],p.height=u[1];var f=MC(p,{width:s,height:l});n=f.x,r=f.y,c=null,d=null}else if(gf(t)&&a){var m=function(e,t,n,r){var o=n[0],i=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-o/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-o/2,l=t.y-i-a;break;case"bottom":s=t.x+u/2-o/2,l=t.y+c+a;break;case"left":s=t.x-o-a,l=t.y+c/2-i/2;break;case"right":s=t.x+u+a,l=t.y+c/2-i/2}return[s,l]}(t,h,u,e.get("borderWidth"));n=m[0],r=m[1]}else{m=function(e,t,n,r,o,i,a){var s=n.getSize(),l=s[0],u=s[1];null!=i&&(e+l+i+2>r?e-=l+i:e+=i);null!=a&&(t+u+a>o?t-=u+a:t+=a);return[e,t]}(n,r,o,s,l,c?null:20,d?null:20);n=m[0],r=m[1]}if(c&&(n-=i$(c)?u[0]/2:"right"===c?u[0]:0),d&&(r-=i$(d)?u[1]/2:"bottom"===d?u[1]:0),zV(e)){m=function(e,t,n,r,o){var i=n.getSize(),a=i[0],s=i[1];return e=Math.min(e+a,r)-a,t=Math.min(t+s,o)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,r,o,s,l);n=m[0],r=m[1]}o.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,o=!!n&&n.length===e.length;return o&&sf(n,(function(n,i){var a=n.dataByAxis||[],s=(e[i]||{}).dataByAxis||[];(o=o&&a.length===s.length)&&sf(a,(function(e,n){var i=s[n]||{},a=e.seriesDataIndices||[],l=i.seriesDataIndices||[];(o=o&&e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===l.length)&&sf(a,(function(e,t){var n=l[t];o=o&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex})),r&&sf(e.seriesDataIndices,(function(e){var n=e.seriesIndex,i=t[n],a=r[n];i&&a&&a.data!==i.data&&(o=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!Rp.node&&t.getDom()&&(ED(this,"_updatePosition"),this._tooltipContent.dispose(),Iz("itemTooltip",t))},t.type="tooltip",t}(ST);function r$(e,t,n){var r,o=t.ecModel;n?(r=new _k(n,o,o),r=new _k(t.option,r,o)):r=t;for(var i=e.length-1;i>=0;i--){var a=e[i];a&&(a instanceof _k&&(a=a.get("tooltip",!0)),gf(a)&&(a={formatter:a}),a&&(r=new _k(a,r,o)))}return r}function o$(e,t){return e.dispatchAction||hf(t.dispatchAction,t)}function i$(e){return"center"===e||"middle"===e}const a$=n$;var s$={get:function(e,t,n){var r=Jp((l$[e]||{})[t]);return n&&ff(r)?r[r.length-1]:r}},l$={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]}};const u$=s$;var c$=sf,d$=bf,h$=-1,p$=function(){function e(t){var n=t.mappingMethod,r=t.type,o=this.option=Jp(t);this.type=r,this.mappingMethod=n,this._normalizeData=k$[n];var i=e.visualHandlers[r];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[n],"piecewise"===n?(f$(o),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,sf(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(o)):"category"===n?o.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(c$(t,(function(e,t){n[e]=t})),!ff(r)){var o=[];bf(r)?c$(r,(function(e,t){var r=n[t];o[null!=r?r:h$]=e})):o[-1]=r,r=S$(e,o)}for(var i=t.length-1;i>=0;i--)null==r[i]&&(delete n[t[i]],t.pop())}(o):f$(o,!0):(Af("linear"!==n||o.dataExtent),f$(o))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return hf(this._normalizeData,this)},e.listVisualTypes=function(){return df(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){bf(e)?sf(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var o,i=ff(t)?[]:bf(t)?{}:(o=!0,null);return e.eachVisual(t,(function(e,t){var a=n.call(r,e,t);o?i=a:i[t]=a})),i},e.retrieveVisuals=function(t){var n,r={};return t&&c$(e.visualHandlers,(function(e,o){t.hasOwnProperty(o)&&(r[o]=t[o],n=!0)})),n?r:null},e.prepareVisualTypes=function(e){if(ff(e))e=e.slice();else{if(!d$(e))return[];var t=[];c$(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,o=1/0,i=0,a=t.length;i"],ff(e)&&(e=e.slice(),r=!0);var l=t?e:r?[u(e[0]),u(e[1])]:u(e);return gf(s)?s.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l):mf(s)?r?s(e[0],e[1]):s(e):r?e[0]===a[0]?n[0]+" "+l[1]:e[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(e){return e===a[0]?"min":e===a[1]?"max":(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=R$([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 o=n[r],i=e.getDimensionInfo(o);if(!i.isCalculationCoord)return i.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={}),o=t.controller||(t.controller={});ef(r,n),ef(o,n);var i=this.isCategory();function a(n){O$(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,o),function(e,t,n){var r=e[t],o=e[n];r&&!o&&(o=e[n]={},I$(r,(function(e,t){if(_$.isValidType(t)){var n=u$.get(t,"inactive",i);null!=n&&(o[t]=n,"color"!==t||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.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"),o=this.getItemSymbol()||"roundRect";I$(this.stateList,(function(a){var s=this.itemSize,l=e[a];l||(l=e[a]={color:i?r:[r]}),null==l.symbol&&(l.symbol=t&&Jp(t)||(i?o:[o])),null==l.symbolSize&&(l.symbolSize=n&&Jp(n)||(i?s[0]:[s[0],s[0]])),l.symbol=D$(l.symbol,(function(e){return"none"===e?o:e}));var u=l.symbolSize;if(null!=u){var c=-1/0;A$(u,(function(e){e>c&&(c=e)})),l.symbolSize=D$(u,(function(e){return E$(e,[0,c],[0,s[0]],!0)}))}}),this)}.call(this,o)},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}(RC);const Z$=L$;var N$=[20,140],j$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(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]=N$[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=N$[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):ff(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),sf(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=Wy((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries((function(n){var r=[],o=n.getData();o.each(this.getDataDimensionIndex(o),(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=F$(this,"outOfRange",this.getExtent()),n=F$(this,"inRange",this.option.range.slice()),r=[];function o(t,n){r.push({value:t,color:e(t,n)})}for(var i=0,a=0,s=n.length,l=t.length;ae[1])break;n.push({color:this.getControllerVisual(i,"color",t),offset:o/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 Zy("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,o=n.handleThumbs,i=n.handleLabels,a=r.itemSize,s=r.getExtent();q$([0,1],(function(l){var u=o[l];u.setStyle("fill",t.handlesColor[l]),u.y=e[l];var c=U$(e[l],[0,a[1]],s,!0),d=this.getControllerVisual(c,"symbolSize");u.scaleX=u.scaleY=d/a[0],u.x=a[0]-d/2;var h=sD(n.handleLabelPoints[l],aD(u,this.group));i[l].setStyle({x:h[0],y:h[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 o=this.visualMapModel,i=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var c=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),h=U$(e,i,s,!0),p=a[0]-d/2,f={x:u.x,y:u.y};u.y=h,u.x=p;var m=sD(l.indicatorLabelPoint,aD(u,this.group)),g=l.indicatorLabel;g.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;g.setStyle({text:(n||"")+o.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var b={x:p,y:h,style:{fill:c}},x={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(b,w),g.animateTo(x,w)}else u.attr(b),g.attr(x);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var k=0;ko[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var c=this._hoverLinkDataIndices,d=[];(t||Q$(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var h=function(e,t){var n={},r={};return o(e||[],n),o(t||[],r,n),[i(n),i(r)];function o(e,t,n){for(var r=0,o=e.length;r=0&&(o.dimension=i,r.push(o))}})),e.getData().setVisual("visualMeta",r)}}];function oH(e,t,n,r){for(var o=t.targetVisuals[r],i=_$.prepareVisualTypes(o),a={color:wA(e.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"})),e.registerAction(tH,nH),sf(rH,(function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)})),e.registerPreprocessor(aH))}function cH(e){e.registerComponentModel(z$),e.registerComponentView(eH),uH(e)}var dH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return Ap(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],hH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var o=this.option.categories;this.resetVisual((function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=Jp(o)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=lf(this._pieceList,(function(e){return e=Jp(e),"inRange"!==t&&(e.visual=null),e})))}))},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=_$.listVisualTypes(),o=this.isCategory();function i(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}sf(t.pieces,(function(e){sf(r,(function(t){e.hasOwnProperty(t)&&(n[t]=1)}))})),sf(n,(function(e,n){var r=!1;sf(this.stateList,(function(e){r=r||i(t,e,n)||i(t.target,e,n)}),this),!r&&sf(this.stateList,(function(e){(t[e]||(t[e]={}))[n]=u$.get(n,"inRange"===e?"active":"inactive",o)}))}),this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,o=(t?n:e).selected||{};if(n.selected=o,sf(r,(function(e,t){var n=this.getSelectedMapKey(e);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var i=!1;sf(r,(function(e,t){var n=this.getSelectedMapKey(e);o[n]&&(i?o[n]=!1:i=!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=Jp(e)},t.prototype.getValueState=function(e){var t=_$.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 o=[],i=r.getData();i.each(this.getDataDimensionIndex(i),(function(t,r){_$.findPieceIndex(t,n)===e&&o.push(r)}),this),t.push({seriesId:r.id,dataIndex:o})}),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,o=this._pieceList.slice();if(o.length){var i=o[0].interval[0];i!==-1/0&&o.unshift({interval:[-1/0,i]}),(i=o[o.length-1].interval[1])!==1/0&&o.push({interval:[i,1/0]})}else o.push({interval:[-1/0,1/0]});var a=-1/0;return sf(o,(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(o,i){var a=r.getRepresentValue({interval:o});i||(i=r.getValueState(a));var s=e(a,i);o[0]===-1/0?n[0]=s:o[1]===1/0?n[1]=s:t.push({value:o[0],color:s},{value:o[1],color:s})}},t.type="visualMap.piecewise",t.defaultOption=Pk(Z$.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}(Z$),hH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var i=(r[1]-r[0])/o;+i.toFixed(n)!==i&&n<5;)n++;t.precision=n,i=+i.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var a=0,s=r[0];a","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function pH(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}const fH=dH;var mH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,o=r.getFont(),i=r.getTextColor(),a=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=_f(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,a),sf(l.viewPieceList,(function(r){var l=r.piece,u=new Zy;u.onclick=hf(this._onItemClick,this,l),this._enableHoverLink(u,r.indexInModelPieceList);var d=t.getRepresentValue(l);if(this._createItemSymbol(u,d,[0,0,s[0],s[1]]),c){var h=this.visualMapModel.getValueState(d);u.add(new Ww({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:o,fill:i,opacity:"outOfRange"===h?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,a),_C(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:W$(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return H$(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,o){if(t){var i=new Zy,a=this.visualMapModel.textStyleModel;i.add(new Ww({style:rk(a,{x:r?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?o:"center",text:t})})),e.add(i)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=lf(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),r=e.get("orient"),o=e.get("inverse");return("horizontal"===r?o:!o)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n){e.add(ZA(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 o=Jp(n.selected),i=t.getSelectedMapKey(e);"single"===r||!0===r?(o[i]=!0,sf(o,(function(e,t){o[t]=t===i}))):o[i]=!o[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t}(V$);const gH=mH;function vH(e){e.registerComponentModel(fH),e.registerComponentView(gH),uH(e)}function yH(e,t){if(!e)return!1;for(var n=ff(e)?e:[e],r=0;r=0&&(a[i]=+a[i].toFixed(d)),[a,c]}var TH={min:pf(MH,"min"),max:pf(MH,"max"),average:pf(MH,"average"),median:pf(MH,"median")};function PH(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,o=r&&r.dimensions;if(!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!ff(t.coord)&&ff(o)){var i=DH(t,n,r,e);if((t=Jp(t)).type&&TH[t.type]&&i.baseAxis&&i.valueAxis){var a=rf(o,i.baseAxis.dim),s=rf(o,i.valueAxis.dim),l=TH[t.type](n,i.baseDataDim,i.valueDataDim,a,s);t.coord=l[0],t.value=l[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&ff(o))for(var u=t.coord,c=0;c<2;c++)TH[u[c]]&&(u[c]=IH(n,n.mapDimension(o[c]),u[c]));else t.coord=[];return t}}function DH(e,t,n,r){var o={};return null!=e.valueIndex||null!=e.valueDim?(o.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,o.valueAxis=n.getAxis(function(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}(r,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim)):(o.baseAxis=r.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=t.mapDimension(o.baseAxis.dim),o.valueDataDim=t.mapDimension(o.valueAxis.dim)),o}function AH(e,t){return!(e&&e.containData&&t.coord&&!_H(t))||e.containData(t.coord)}function OH(e,t){return e?function(e,n,r,o){return SM(o<2?e.coord&&e.coord[o]:e.value,t[o])}:function(e,n,r,o){return SM(e.value,t[o])}}function IH(e,t,n){if("average"===n){var r=0,o=0;return e.each(t,(function(e,t){isNaN(e)||(r+=e,o++)})),r/o}return"median"===n?e.getMedian(t):e.getDataExtent(t)["max"===n?1:0]}var RH=Sb(),EH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.init=function(){this.markerGroupMap=jf()},t.prototype.render=function(e,t,n){var r=this,o=this.markerGroupMap;o.each((function(e){RH(e).keep=!1})),t.eachSeries((function(e){var o=SH.getMarkerModelFromSeries(e,r.type);o&&r.renderSeries(e,o,t,n)})),o.each((function(e){!RH(e).keep&&r.group.remove(e.group)}))},t.prototype.markKeep=function(e){RH(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;sf(e,(function(e){var r=SH.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl((function(e){e&&(t?SS(e):kS(e))}))}))},t.type="marker",t}(ST);const LH=EH;var ZH=Sb(),NH=function(e,t,n,r){var o=r[0],i=r[1];if(o&&i){var a=PH(e,o),s=PH(e,i),l=a.coord,u=s.coord;l[0]=_f(l[0],-1/0),l[1]=_f(l[1],-1/0),u[0]=_f(u[0],1/0),u[1]=_f(u[1],1/0);var c=function(e,t){for(var n=e[0],r=1,o=e.length;rp[0]?d[0]:c[0]:f[0]=h[0]>p[0]?c[0]:d[0],"y0"===n[1]?f[1]=h[1]>p[1]?d[1]:c[1]:f[1]=h[1]>p[1]?c[1]:d[1],i=r.getMarkerPosition(f,n,!0)}else{var m=[y=e.get(n[0],t),b=e.get(n[1],t)];a.clampData&&a.clampData(m,m),i=a.dataToPoint(m,!0)}if(PR(a,"cartesian2d")){var g=a.getAxis("x"),v=a.getAxis("y"),y=e.get(n[0],t),b=e.get(n[1],t);jH(y)?i[0]=g.toGlobalCoord(g.getExtent()["x0"===n[0]?0:1]):jH(b)&&(i[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];return i}var VH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],$H=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=SH.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each((function(t){var o=lf(VH,(function(o){return BH(r,t,o,e,n)}));r.setItemLayout(t,o),r.getItemGraphicEl(t).setShape("points",o)}))}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,{group:new Zy});this.group.add(l.group),this.markKeep(l);var u=function(e,t,n){var r,o,i=["x0","y0","x1","y1"];if(e){var a=lf(e&&e.dimensions,(function(e){var n=t.getData();return tf(tf({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}));o=lf(i,(function(e,t){return{name:e,type:a[t%2].type}})),r=new hR(o,n)}else r=new hR(o=[{name:"value",type:"float"}],n);var s=lf(n.get("data"),pf(NH,t,e,n));e&&(s=cf(s,pf(zH,e)));var l=e?function(e,t,n,r){return SM(e.coord[Math.floor(r/2)][r%2],o[r])}:function(e,t,n,r){return SM(e.value,o[r])};return r.initData(s,null,l),r.hasItemOption=!0,r}(o,e,t);t.setData(u),u.each((function(t){var n=lf(VH,(function(n){return BH(u,t,n,e,r)})),i=o.getAxis("x").scale,s=o.getAxis("y").scale,l=i.getExtent(),c=s.getExtent(),d=[i.parse(u.get("x0",t)),i.parse(u.get("x1",t))],h=[s.parse(u.get("y0",t)),s.parse(u.get("y1",t))];Wy(d),Wy(h);var p=!!(l[0]>d[1]||l[1]h[1]||c[1]0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if("start"!==r.__position&&"end"!==r.__position){var w=-Math.atan2(v[1],v[0]);u[0].8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":r.x=-c[0]*f+l[0],r.y=-c[1]*m+l[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":r.x=f*x+l[0],r.y=l[1]+S,d=v[0]<0?"right":"left",r.originX=-f*x,r.originY=-S;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":r.x=b[0],r.y=b[1]+S,d="center",r.originY=-S;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":r.x=-f*x+u[0],r.y=u[1]+S,d=v[0]>=0?"right":"left",r.originX=f*x,r.originY=-S}r.scaleX=r.scaleY=o,r.setStyle({verticalAlign:r.__verticalAlign||h,align:r.__align||d})}}}function k(e,t){var n=e.__specifiedRotation;if(null==n){var r=a.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(Zy);const oW=rW;function iW(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:nk(t)}}function aW(e){return isNaN(e[0])||isNaN(e[1])}function sW(e){return e&&!aW(e[0])&&!aW(e[1])}const lW=function(){function e(e){this.group=new Zy,this._LineCtor=e||oW}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,o=n._lineData;n._lineData=e,o||r.removeAll();var i=iW(e);e.diff(o).add((function(n){t._doAdd(e,n,i)})).update((function(n,r){t._doUpdate(o,e,r,n,i)})).remove((function(e){r.remove(o.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=iW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=e.start;r=0&&yf(l)&&(l=+l.toFixed(Math.min(f,20))),h.coord[c]=p.coord[c]=l,o=[h,p,{type:a,valueIndex:r.valueIndex,value:l}]}else o=[]}var m=[PH(e,o[0]),PH(e,o[1]),tf({},o[2])];return m[2].type=m[2].type||null,ef(m[2],m[0]),ef(m[2],m[1]),m};function dW(e){return!isNaN(e)&&!isFinite(e)}function hW(e,t,n,r){var o=1-e,i=r.dimensions[e];return dW(t[o])&&dW(n[o])&&t[e]===n[e]&&r.getAxis(i).containData(t[e])}function pW(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(hW(1,n,r,e)||hW(0,n,r,e)))return!0}return AH(e,t[0])&&AH(e,t[1])}function fW(e,t,n,r,o){var i,a=r.coordinateSystem,s=e.getItemModel(t),l=$y(s.get("x"),o.getWidth()),u=$y(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(r.getMarkerPosition)i=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=a.dimensions,d=e.get(c[0],t),h=e.get(c[1],t);i=a.dataToPoint([d,h])}if(PR(a,"cartesian2d")){var p=a.getAxis("x"),f=a.getAxis("y");c=a.dimensions;dW(e.get(c[0],t))?i[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):dW(e.get(c[1],t))&&(i[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(i[0]=l),isNaN(u)||(i[1]=u)}else i=[l,u];e.setItemLayout(t,i)}var mW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=SH.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),o=uW(t).from,i=uW(t).to;o.each((function(t){fW(o,t,!0,e,n),fW(i,t,!1,e,n)})),r.each((function(e){r.setItemLayout(e,[o.getItemLayout(e),i.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new lW);this.group.add(l.group);var u=function(e,t,n){var r;r=e?lf(e&&e.dimensions,(function(e){return tf(tf({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new hR(r,n),i=new hR(r,n),a=new hR([],n),s=lf(n.get("data"),pf(cW,t,e,n));e&&(s=cf(s,pf(pW,e)));var l=OH(!!e,r);return o.initData(lf(s,(function(e){return e[0]})),null,l),i.initData(lf(s,(function(e){return e[1]})),null,l),a.initData(lf(s,(function(e){return e[2]}))),a.hasItemOption=!0,{from:o,to:i,line:a}}(o,e,t),c=u.from,d=u.to,h=u.line;uW(t).from=c,uW(t).to=d,t.setData(h);var p=t.get("symbol"),f=t.get("symbolSize"),m=t.get("symbolRotate"),g=t.get("symbolOffset");function v(t,n,o){var i=t.getItemModel(n);fW(t,n,o,e,r);var s=i.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=wA(a,"color")),t.setItemVisual(n,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:Mf(i.get("symbolOffset",!0),g[o?0:1]),symbolRotate:Mf(i.get("symbolRotate",!0),m[o?0:1]),symbolSize:Mf(i.get("symbolSize"),f[o?0:1]),symbol:Mf(i.get("symbol",!0),p[o?0:1]),style:s})}ff(p)||(p=[p,p]),ff(f)||(f=[f,f]),ff(m)||(m=[m,m]),ff(g)||(g=[g,g]),u.from.each((function(e){v(c,e,!0),v(d,e,!1)})),h.each((function(e){var t=h.getItemModel(e).getModel("lineStyle").getLineStyle();h.setItemLayout(e,[c.getItemLayout(e),d.getItemLayout(e)]),null==t.stroke&&(t.stroke=c.getItemVisual(e,"style").fill),h.setItemVisual(e,{fromSymbolKeepAspect:c.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(e,"symbolOffset"),fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolKeepAspect:d.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(e,"symbolOffset"),toSymbolRotate:d.getItemVisual(e,"symbolRotate"),toSymbolSize:d.getItemVisual(e,"symbolSize"),toSymbol:d.getItemVisual(e,"symbol"),style:t})})),l.updateData(h),u.line.eachItemGraphicEl((function(e){Uw(e).dataModel=t,e.traverse((function(e){Uw(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(LH);const gW=mW;var vW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(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}(SH);const yW=vW;function bW(e,t,n){var r=t.coordinateSystem;e.each((function(o){var i,a=e.getItemModel(o),s=$y(a.get("x"),n.getWidth()),l=$y(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)i=t.getMarkerPosition(e.getValues(e.dimensions,o));else if(r){var u=e.get(r.dimensions[0],o),c=e.get(r.dimensions[1],o);i=r.dataToPoint([u,c])}}else i=[s,l];isNaN(s)||(i[0]=s),isNaN(l)||(i[1]=l),e.setItemLayout(o,i)}))}var xW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return Ap(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries((function(e){var t=SH.getMarkerModelFromSeries(e,"markPoint");t&&(bW(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())}),this)},t.prototype.renderSeries=function(e,t,n,r){var o=e.coordinateSystem,i=e.id,a=e.getData(),s=this.markerGroupMap,l=s.get(i)||s.set(i,new lE),u=function(e,t,n){var r;r=e?lf(e&&e.dimensions,(function(e){return tf(tf({},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{}),{name:e,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new hR(r,n),i=lf(n.get("data"),pf(PH,t));e&&(i=cf(i,pf(AH,e)));var a=OH(!!e,r);return o.initData(i,null,a),o}(o,e,t);t.setData(u),bW(t.getData(),e,r),u.each((function(e){var n=u.getItemModel(e),r=n.getShallow("symbol"),o=n.getShallow("symbolSize"),i=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(mf(r)||mf(o)||mf(i)||mf(s)){var c=t.getRawValue(e),d=t.getDataParams(e);mf(r)&&(r=r(c,d)),mf(o)&&(o=o(c,d)),mf(i)&&(i=i(c,d)),mf(s)&&(s=s(c,d))}var h=n.getModel("itemStyle").getItemStyle(),p=wA(a,"color");h.fill||(h.fill=p),u.setItemVisual(e,{symbol:r,symbolSize:o,symbolRotate:i,symbolOffset:s,symbolKeepAspect:l,style:h})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){Uw(e).dataModel=t}))})),this.markKeep(l),l.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(LH);const wW=xW;function SW(e,t,n){var r=jp.createCanvas(),o=t.getWidth(),i=t.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=o+"px",a.height=i+"px",r.setAttribute("data-zr-dom-id",e)),r.width=o*n,r.height=i*n,r}const kW=function(e){function t(t,n,r){var o,i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null,r=r||ny,"string"==typeof t?o=SW(t,n,r):bf(t)&&(t=(o=t).id),i.id=t,i.dom=o;var a=o.style;return a&&(zf(o),o.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),i.painter=n,i.dpr=r,i}return Wf(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=SW("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 o,i=[],a=this.maxRepaintRectCount,s=!1,l=new Ym(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===i.length){(t=new Ym(0,0,0,0)).copy(e),i.push(t)}else{for(var t,n=!1,r=1/0,o=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}n.prevElClipPaths&&d.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=h.dpr,w=0;w0&&e>r[0]){for(s=0;se);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?i.insertBefore(t.dom,l.nextSibling):i.appendChild(t.dom)}else i.firstChild?i.insertBefore(t.dom,i.firstChild):i.appendChild(t.dom);t.painter||(t.painter=this)}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r0?MW:0),this._needsManuallyCompositing),u.__builtin__||Qp("ZLevel "+l+" has been used by unkown layer "+u.id),u!==i&&(u.__used=!0,u.__startIndex!==o&&(u.__dirty=!0),u.__startIndex=o,u.incremental?u.__drawIndex=-1:u.__drawIndex=o,t(o),i=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=o))}t(o),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,sf(this._layers,(function(e){e.setUnpainted()}))},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ef(n[e],t,!0):n[e]=t;for(var r=0;r{if(null!==p.current&&null===f.current&&(f.current=function(e,t,n){var r=!(n&&n.ssr);if(r){var o=lI(e);if(o)return o}var i=new UO(e,t,n);return i.id="ec_"+iI++,rI[i.id]=i,r&&Db(e,sI,i.id),BO(i),pO.trigger("afterinit",i),i}(p.current,t,{renderer:n??"canvas"}),void 0!==f.current))return f.current.setOption(d.current,!0),c?.(f.current),void 0!==l&&(l.current=f.current),()=>{null!==f.current&&(f.current.dispose(),f.current=null)}}),[l,c,t,n]),(0,i.useEffect)((()=>{f.current&&u&&(f.current.group=u,function(e){if(ff(e)){var t=e;e=null,sf(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+aI++,sf(t,(function(t){t.group=e}))}oI[e]=!0}([f.current]))}),[u,f]),(0,i.useEffect)((()=>{void 0===h.current||Uo()(h.current,e)||f.current&&(f.current.setOption(e,!0),h.current=e)}),[e]),(0,i.useLayoutEffect)((()=>{const e=bd()((()=>{f.current&&f.current.resize()}),200);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[]),(0,i.useEffect)((()=>{const e=f.current;if(e&&void 0!==s)return function(e,t){if(void 0===t)return;function n(t,n){"function"==typeof n&&(!function(e){return PW.includes(e)}(t)?!function(e){return DW.includes(e)}(t)?e.on(t,(()=>n(null,e))):e.on(t,(e=>n(e))):e.on(t,(t=>n(t,e))))}for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const r=t[e]??null;r&&n(e,r)}}(e,s),()=>{if(void 0!==e&&!0!==e.isDisposed())for(const t in s)e.off(t)}}),[s]),(0,i.useEffect)((()=>{bd()((()=>{f.current&&f.current.resize()}),200,{leading:!0})()}),[r,a]),(0,o.jsx)(ii.Z,{ref:p,sx:r,style:a})}));var OW=n(315);function IW(e){const{error:t}=e;return(0,o.jsx)(OW.Z,{severity:"error",children:t.message})}var RW=n(68715);const EW=[{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 LW({value:e,onChange:t}){return(0,o.jsx)(zd,{label:"Font Size",control:(0,o.jsx)(Wd,{value:EW.find((t=>t.value===e)),options:EW,getOptionLabel:e=>e.label,onChange:(e,{value:n})=>{t(n)},disableClearable:!0})})}var ZW=n(79119);function NW({action:e,submitText:t="Save",cancelText:n="Cancel",isReadonly:r,isValid:i,onActionChange:a,onSubmit:s,onDelete:l,onCancel:u,...c}){return(0,o.jsx)(_.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},...c,children:"read"===e?(0,o.jsxs)(o.Fragment,{children:[a&&(0,o.jsx)(k.Z,{disabled:r,variant:"contained",onClick:()=>a("update"),children:"Edit"}),l&&(0,o.jsx)(k.Z,{color:"error",disabled:r,variant:"outlined",onClick:l,children:"Delete"}),u&&(s||l)&&(0,o.jsx)(ZW.Z,{orientation:"vertical",flexItem:!0,sx:{borderColor:e=>e.palette.grey[500],"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),u&&(0,o.jsx)(k.Z,{color:"secondary",variant:"outlined",onClick:u,children:n})]}):(0,o.jsxs)(o.Fragment,{children:[s&&(0,o.jsx)(k.Z,{variant:"contained",disabled:!i,onClick:s,children:t}),u&&(0,o.jsx)(k.Z,{color:"secondary",variant:"outlined",onClick:u,children:n})]})})}var jW=n(70252),FW=n(97784);let zW=[],BW=[];function VW(e){if(e<768)return!1;for(let t=0,n=zW.length;;){let r=t+n>>1;if(e=BW[r]))return!0;t=r+1}if(t==n)return!1}}function $W(e){return e>=127462&&e<=127487}(()=>{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=0&&$W(qW(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function UW(e,t,n){for(;t>0;){let r=WW(e,t-2,n);if(r=56320&&e<57344}function KW(e){return e>=55296&&e<56320}function YW(e){return e<65536?1:2}class XW{lineAt(e){if(e<0||e>this.length)throw new 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 new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=aU(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),JW.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]=aU(this,e,t);let n=[];return this.decompose(e,t,n,0),JW.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 nU(this),o=new nU(e);for(let e=t,i=t;;){if(r.next(e),o.next(e),e=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(i+=r.value.length,r.done||i>=n)return!0}}iter(e=1){return new nU(this,e)}iterRange(e,t=this.length){return new rU(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 oU(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new QW(e):JW.from(QW.split(e,[])):XW.empty}}class QW extends XW{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 o=0;;o++){let i=this.text[o],a=r+i.length;if((t?n:a)>=e)return new iU(r,a,n,i);r=a+1,n++}}decompose(e,t,n,r){let o=e<=0&&t>=this.length?this:new QW(tU(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=eU(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new QW(t,e.length+o.length));else{let e=t.length>>1;n.push(new QW(t.slice(0,e)),new QW(t.slice(e)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof QW))return super.replace(e,t,n);[e,t]=aU(this,e,t);let r=eU(this.text,eU(n.text,tU(this.text,0,e)),t),o=this.length+n.length-(t-e);return r.length<=32?new QW(r,o):JW.from(QW.split(r,[]),o)}sliceString(e,t=this.length,n="\n"){[e,t]=aU(this,e,t);let r="";for(let o=0,i=0;o<=t&&ie&&i&&(r+=n),eo&&(r+=a.slice(Math.max(0,e-o),t-o)),o=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 o of e)n.push(o),r+=o.length+1,32==n.length&&(t.push(new QW(n,r)),n=[],r=-1);return r>-1&&t.push(new QW(n,r)),t}}class JW extends XW{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.children[o],a=r+i.length,s=n+i.lines-1;if((t?s:a)>=e)return i.lineInner(e,t,n,r);r=a+1,n=s+1}}decompose(e,t,n,r){for(let o=0,i=0;i<=t&&o=i){let o=r&((i<=e?1:0)|(s>=t?2:0));i>=e&&s<=t&&!o?n.push(a):a.decompose(e-i,t-i,n,o)}i=s+1}}replace(e,t,n){if([e,t]=aU(this,e,t),n.lines=o&&t<=a){let s=i.replace(e-o,t-o,n),l=this.lines-i.lines+s.lines;if(s.lines>4&&s.lines>l>>6){let o=this.children.slice();return o[r]=s,new JW(o,this.length-(t-e)+n.length)}return super.replace(o,a,s)}o=a+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=aU(this,e,t);let r="";for(let o=0,i=0;oe&&o&&(r+=n),ei&&(r+=a.sliceString(e-i,t-i,n)),i=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof JW))return 0;let n=0,[r,o,i,a]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,o+=t){if(r==i||o==a)return n;let s=this.children[r],l=e.children[o];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 QW(n,t)}let r=Math.max(32,n>>5),o=r<<1,i=r>>1,a=[],s=0,l=-1,u=[];function c(e){let t;if(e.lines>o&&e instanceof JW)for(let t of e.children)c(t);else e.lines>i&&(s>i||!s)?(d(),a.push(e)):e instanceof QW&&s&&(t=u[u.length-1])instanceof QW&&e.lines+t.lines<=32?(s+=e.lines,l+=e.length+1,u[u.length-1]=new QW(t.text.concat(e.text),t.length+1+e.length)):(s+e.lines>r&&d(),s+=e.lines,l+=e.length+1,u.push(e))}function d(){0!=s&&(a.push(1==u.length?u[0]:JW.from(u,l)),l=-1,s=u.length=0)}for(let t of e)c(t);return d(),1==a.length?a[0]:new JW(a,t)}}function eU(e,t,n=0,r=1e9){for(let o=0,i=0,a=!0;i=n&&(l>r&&(s=s.slice(0,r-o)),o0?1:(e instanceof QW?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],o=this.offsets[n],i=o>>1,a=r instanceof QW?r.text.length:r.children.length;if(i==(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&o)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof QW){let o=r.text[i+(t<0?-1:0)];if(this.offsets[n]+=t,o.length>Math.max(0,e))return this.value=0==e?o:t>0?o.slice(e):o.slice(0,o.length-e),this;e-=o.length}else{let o=r.children[i+(t<0?-1:0)];e>o.length?(e-=o.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(o),this.offsets.push(t>0?1:(o instanceof QW?o.text.length:o.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class rU{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new nU(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 oU{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&&(XW.prototype[Symbol.iterator]=function(){return this.iter()},nU.prototype[Symbol.iterator]=rU.prototype[Symbol.iterator]=oU.prototype[Symbol.iterator]=function(){return this});class iU{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 aU(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function sU(e,t,n=!0,r=!0){return HW(e,t,n,r)}function lU(e,t){let n=e.charCodeAt(t);if(!(r=n,r>=55296&&r<56320&&t+1!=e.length))return n;var r;let o=e.charCodeAt(t+1);return function(e){return e>=56320&&e<57344}(o)?o-56320+(n-55296<<10)+65536:n}function uU(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function cU(e){return e<65536?1:2}const dU=/\r\n?|\n/;var hU=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(hU||(hU={}));class pU{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return o+(e-r);o+=a}else{if(n!=hU.Simple&&l>=e&&(n==hU.TrackDel&&re||n==hU.TrackBefore&&re))return null;if(l>e||l==e&&t<0&&!a)return e==r||t<0?o:o+s;o+=s}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&o>=e)return!(rt)||"cover";r=o}return!1}toString(){let e="";for(let t=0;t=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 new RangeError("Invalid JSON representation of ChangeDesc");return new pU(e)}static create(e){return new pU(e)}}class fU extends pU{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return vU(this,((t,n,r,o,i)=>e=e.replace(r,r+(n-t),i)),!1),e}mapDesc(e,t=!1){return yU(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,o=0;r=0){t[r]=a,t[r+1]=i;let s=r>>1;for(;n.length0&&gU(n,t,o.text),o.forward(e),a+=e}let l=e[i++];for(;a>1].toJSON()))}return e}static of(e,t,n){let r=[],o=[],i=0,a=null;function s(e=!1){if(!e&&!r.length)return;ia||e<0||a>t)throw new RangeError(`Invalid change range ${e} to ${a} (in doc of length ${t})`);let c=u?"string"==typeof u?XW.of(u.split(n||dU)):u:XW.empty,d=c.length;if(e==a&&0==d)return;ei&&mU(r,e-i,-1),mU(r,a-e,d),gU(o,r,c),i=a}}(e),s(!a),a}static empty(e){return new fU(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)t.push(o[0],0);else{for(;n.length=0&&n<=0&&n==e[o+1]?e[o]+=t:o>=0&&0==t&&0==e[o]?e[o+1]+=n:r?(e[o]+=t,e[o+1]+=n):e.push(t,n)}function gU(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!(n||a==e.sections.length||e.sections[a+1]<0);)s=e.sections[a++],l=e.sections[a++];t(o,u,i,c,d),o=u,i=c}}}function yU(e,t,n,r=!1){let o=[],i=r?[]:null,a=new xU(e),s=new xU(t);for(let e=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(-1==a.ins&&-1==s.ins){let e=Math.min(a.len,s.len);mU(o,e,-1),a.forward(e),s.forward(e)}else if(s.ins>=0&&(a.ins<0||e==a.i||0==a.off&&(s.len=0&&e=0)){if(a.done&&s.done)return i?fU.createSet(o,i):pU.create(o);throw new Error("Mismatched change set lengths")}{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.lent||a.ins>=0&&a.len>t)&&(e||r.length>n),i.forward2(t),a.forward(t)}}else mU(r,0,a.ins,e),o&&gU(o,r,a.text),a.next()}}class xU{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?XW.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?XW.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 wU{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 16777215==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 wU(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return SU.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return SU.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 new RangeError("Invalid JSON representation for SelectionRange");return SU.range(e.anchor,e.head)}static create(e,t,n){return new wU(e,t,n)}}class SU{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:SU.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;ne.toJSON())),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new SU(e.ranges.map((e=>wU.fromJSON(e))),e.main)}static single(e,t=e){return new SU([SU.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;re?8:0)|o)}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;nr.head?SU.range(a,i):SU.range(i,a))}}return new SU(e,t)}}function kU(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let CU=0;class _U{constructor(e,t,n,r,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=CU++,this.default=e([]),this.extensions="function"==typeof o?o(this):o}get reader(){return this}static define(e={}){return new _U(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:MU),!!e.static,e.enables)}of(e){return new TU([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new TU(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new TU(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],(n=>t(n.field(e))))}}function MU(e,t){return e==t||e.length==t.length&&e.every(((e,n)=>e===t[n]))}class TU{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=CU++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,o=this.id,i=e[o]>>1,a=2==this.type,s=!1,l=!1,u=[];for(let n of this.dependencies)"doc"==n?s=!0:"selection"==n?l=!0:1&(null!==(t=e[n.id])&&void 0!==t?t:1)||u.push(e[n.id]);return{create:e=>(e.values[i]=n(e),1),update(e,t){if(s&&t.docChanged||l&&(t.docChanged||t.selection)||DU(e,u)){let t=n(e);if(a?!PU(t,e.values[i],r):!r(t,e.values[i]))return e.values[i]=t,1}return 0},reconfigure:(e,t)=>{let s,l=t.config.address[o];if(null!=l){let o=HU(t,l);if(this.dependencies.every((n=>n instanceof _U?t.facet(n)===e.facet(n):!(n instanceof IU)||t.field(n,!1)==e.field(n,!1)))||(a?PU(s=n(e),o,r):r(s=n(e),o)))return e.values[i]=o,0}else s=n(e);return e.values[i]=s,1}}}}function PU(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id])),o=n.map((e=>e.type)),i=r.filter((e=>!(1&e))),a=e[t.id]>>1;function s(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(OU).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],o=this.updateF(r,n);return this.compareF(r,o)?0:(e.values[t]=o,1)},reconfigure:(e,n)=>{let r,o=e.facet(OU),i=n.facet(OU);return(r=o.find((e=>e.field==this)))&&r!=i.find((e=>e.field==this))?(e.values[t]=r.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,OU.of({field:this,create:e})]}get extension(){return this}}const RU=4,EU=3,LU=2,ZU=1;function NU(e){return t=>new FU(t,e)}const jU={highest:NU(0),high:NU(ZU),default:NU(LU),low:NU(EU),lowest:NU(RU)};class FU{constructor(e,t){this.inner=e,this.prec=t}}class zU{of(e){return new BU(this,e)}reconfigure(e){return zU.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class BU{constructor(e,t){this.compartment=e,this.inner=t}}class VU{constructor(e,t,n,r,o,i){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=o,this.facets=i,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],o=Object.create(null),i=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],o=new Map;function i(e,a){let s=o.get(e);if(null!=s){if(s<=a)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof BU&&n.delete(e.compartment)}if(o.set(e,a),Array.isArray(e))for(let t of e)i(t,a);else if(e instanceof BU){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),i(r,a)}else if(e instanceof FU)i(e.inner,e.prec);else if(e instanceof IU)r[a].push(e),e.provides&&i(e.provides,a);else if(e instanceof TU)r[a].push(e),e.facet.extensions&&i(e.facet.extensions,LU);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(t,a)}}return i(e,LU),r.reduce(((e,t)=>e.concat(t)))}(e,t,i))n instanceof IU?r.push(n):(o[n.facet.id]||(o[n.facet.id]=[])).push(n);let a=Object.create(null),s=[],l=[];for(let e of r)a[e.id]=l.length<<1,l.push((t=>e.slot(t)));let u=null==n?void 0:n.config.facets;for(let e in o){let t=o[e],r=t[0].facet,i=u&&u[e]||[];if(t.every((e=>0==e.type)))if(a[r.id]=s.length<<1|1,MU(i,t))s.push(n.facet(r));else{let e=r.combine(t.map((e=>e.value)));s.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(a[e.id]=s.length<<1|1,s.push(e.value)):(a[e.id]=l.length<<1,l.push((t=>e.dynamicSlot(t))));a[r.id]=l.length<<1,l.push((e=>AU(e,r,t)))}}let c=l.map((e=>e(a)));return new VU(e,i,c,a,s,o)}}function $U(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function HU(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const WU=_U.define(),UU=_U.define({combine:e=>e.some((e=>e)),static:!0}),qU=_U.define({combine:e=>e.length?e[0]:void 0,static:!0}),GU=_U.define(),KU=_U.define(),YU=_U.define(),XU=_U.define({combine:e=>!!e.length&&e[0]});class QU{constructor(e,t){this.type=e,this.value=t}static define(){return new JU}}class JU{of(e){return new QU(this,e)}}class eq{constructor(e){this.map=e}of(e){return new tq(this,e)}}class tq{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 tq(this.type,t)}is(e){return this.type==e}static define(e={}){return new eq(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}}tq.reconfigure=tq.define(),tq.appendConfig=tq.define();class nq{constructor(e,t,n,r,o,i){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n&&kU(n,t.newLength),o.some((e=>e.type==nq.time))||(this.annotations=o.concat(nq.time.of(Date.now())))}static create(e,t,n,r,o,i){return new nq(e,t,n,r,o,i)}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(nq.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function rq(e,t){let n=[];for(let r=0,o=0;;){let i,a;if(r=e[r]))i=e[r++],a=e[r++];else{if(!(o=0;o--){let i=n[o](e);i&&Object.keys(i).length&&(r=oq(r,iq(t,i,e.changes.newLength),!0))}return r==e?e:nq.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(GU)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:rq(n,t))}if(!0!==n){let r,o;if(!1===n)o=e.changes.invertedDesc,r=fU.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,o=t.filtered.mapDesc(t.changes).invertedDesc}e=nq.create(t,r,e.selection&&e.selection.map(o),tq.mapEffects(e.effects,o),e.annotations,e.scrollIntoView)}let r=t.facet(KU);for(let n=r.length-1;n>=0;n--){let o=r[n](e);e=o instanceof nq?o:Array.isArray(o)&&1==o.length&&o[0]instanceof nq?o[0]:aq(t,lq(o),!1)}return e}(o):o)}nq.time=QU.define(),nq.userEvent=QU.define(),nq.addToHistory=QU.define(),nq.remote=QU.define();const sq=[];function lq(e){return null==e?sq:Array.isArray(e)?e:[e]}var uq=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(uq||(uq={}));const cq=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let dq;try{dq=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function hq(e){return t=>{if(!/\S/.test(t))return uq.Space;if(function(e){if(dq)return dq.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||cq.test(n)))return!0}return!1}(t))return uq.Word;for(let n=0;n-1)return uq.Word;return uq.Other}}class pq{constructor(e,t,n,r,o,i){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,i&&(i._state=this);for(let e=0;eo.set(t,e))),n=null),o.set(t.value.compartment,t.value.extension)):t.is(tq.reconfigure)?(n=null,r=t.value):t.is(tq.appendConfig)&&(n=null,r=lq(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=VU.resolve(r,o,this),t=new pq(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((e,t)=>t.reconfigure(e,this)),null).values}let i=e.startState.facet(UU)?e.newSelection:e.newSelection.asSingle();new pq(n,e.newDoc,i,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:SU.cursor(t.from+e.length)})))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),o=[n.range],i=lq(n.effects);for(let n=1;no.spec.fromJSON(i,e))))}return pq.create({doc:e.doc,selection:SU.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=VU.resolve(e.extensions||[],new Map),n=e.doc instanceof XW?e.doc:XW.of((e.doc||"").split(t.staticFacet(pq.lineSeparator)||dU)),r=e.selection?e.selection instanceof SU?e.selection:SU.single(e.selection.anchor,e.selection.head):SU.single(0);return kU(r,n.length),t.staticFacet(UU)||(r=r.asSingle()),new pq(t,n,r,t.dynamicSlots.map((()=>null)),((e,t)=>t.create(e)),null)}get tabSize(){return this.facet(pq.tabSize)}get lineBreak(){return this.facet(pq.lineSeparator)||"\n"}get readOnly(){return this.facet(XU)}phrase(e,...t){for(let t of this.facet(pq.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 o of this.facet(WU))for(let i of o(this,t,n))Object.prototype.hasOwnProperty.call(i,e)&&r.push(i[e]);return r}charCategorizer(e){return hq(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-n,a=e-n;for(;i>0;){let e=sU(t,i,!1);if(o(t.slice(e,i))!=uq.Word)break;i=e}for(;ae.length?e[0]:4}),pq.lineSeparator=qU,pq.readOnly=XU,pq.phrases=_U.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]))}}),pq.languageData=WU,pq.changeFilter=GU,pq.transactionFilter=KU,pq.transactionExtender=YU,zU.reconfigure=tq.define();class mq{eq(e){return this==e}range(e,t=e){return gq.create(e,t,this)}}mq.prototype.startSide=mq.prototype.endSide=0,mq.prototype.point=!1,mq.prototype.mapMode=hU.TrackDel;class gq{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new gq(e,t,n)}}function vq(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class yq{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 o=n?this.to:this.from;for(let i=r,a=o.length;;){if(i==a)return i;let r=i+a>>1,s=o[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==i)return s>=0?i:a;s>=0?a=r:i=r+1}}between(e,t,n,r){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);ou||l==u&&c.startSide>0&&c.endSide<=0)continue;(u-l||c.endSide-c.startSide)<0||(i<0&&(i=l),c.point&&(a=Math.max(a,u-l)),n.push(c),r.push(l-i),o.push(u-i))}return{mapped:n.length?new yq(r,o,n,a):null,pos:i}}}class bq{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 bq(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:o=this.length}=e,i=e.filter;if(0==t.length&&!i)return this;if(n&&(t=t.slice().sort(vq)),this.isEmpty)return t.length?bq.of(t):this;let a=new Sq(this,null,-1).goto(0),s=0,l=[],u=new xq;for(;a.value||s=0){let e=t[s++];u.addInner(e.from,e.to,e.value)||l.push(e)}else 1==a.rangeIndex&&a.chunkIndexthis.chunkEnd(a.chunkIndex)||oa.to||o=o&&e<=o+i.length&&!1===i.between(o,e-o,t-o,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return kq.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return kq.from(e).goto(t)}static compare(e,t,n,r,o=-1){let i=e.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),a=t.filter((e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=o)),s=wq(i,a,n),l=new _q(i,s,o),u=new _q(a,s,o);n.iterGaps(((e,t,n)=>Mq(l,e,u,t,n,r))),n.empty&&0==n.length&&Mq(l,0,u,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0)),i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));if(o.length!=i.length)return!1;if(!o.length)return!0;let a=wq(o,i),s=new _q(o,a,0).goto(n),l=new _q(i,a,0).goto(n);for(;;){if(s.to!=l.to||!Tq(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,o=-1){let i=new _q(e,null,o).goto(t),a=t,s=i.openStart;for(;;){let e=Math.min(i.to,n);if(i.point){let n=i.activeForPoint(i.to),o=i.pointFroma&&(r.span(a,e,i.active,s),s=i.openEnd(e));if(i.to>n)return s+(i.point&&i.to>n?1:0);a=i.to,i.next()}}static of(e,t=!1){let n=new xq;for(let r of e instanceof gq?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(vq);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return bq.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=bq.empty;r=r.nextLayer)t=new bq(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}bq.empty=new bq([],[],null,-1),bq.empty.nextLayer=bq.empty;class xq{finishChunk(e){this.chunks.push(new yq(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 xq)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new 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((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)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(bq.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=bq.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function wq(e,t,n){let r=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new Sq(i,t,n,o));return 1==r.length?r[0]:new kq(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--)Cq(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--)Cq(this.heap,e);(this.to-e||this.value.endSide-t)<0&&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(),Cq(this.heap,0)}}}function Cq(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let o=e[r];if(r+1=0&&(o=e[r+1],r++),n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}class _q{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=kq.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&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Pq(this.active,e),Pq(this.activeTo,e),Pq(this.activeRank,e),this.minActive=Aq(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:o}=this.cursor;for(;t0;)t++;Dq(this.active,t,n),Dq(this.activeTo,t,r),Dq(this.activeRank,t,o),e&&Dq(e,t,this.cursor.from),this.minActive=Aq(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&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Pq(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}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=0&&n[t]=0&&!(this.activeRank[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 Mq(e,t,n,r,o,i){e.goto(t),n.goto(r);let a=r+o,s=r,l=r-t;for(;;){let t=e.to+l-n.to,r=t||e.endSide-n.endSide,o=r<0?e.to+l:n.to,u=Math.min(o,a);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Tq(e.activeForPoint(e.to),n.activeForPoint(n.to))||i.comparePoint(s,u,e.point,n.point):u>s&&!Tq(e.active,n.active)&&i.compareRange(s,u,e.active,n.active),o>a)break;(t||e.openEnd!=n.openEnd)&&i.boundChange&&i.boundChange(o),s=o,r<=0&&e.next(),r>=0&&n.next()}}function Tq(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function Aq(e,t){let n=-1,r=1e9;for(let o=0;o=t)return r;if(r==e.length)break;o+=9==e.charCodeAt(r)?n-o%n:1,r=sU(e,r)}return!0===r?-1:e.length}const Rq="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Eq="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Lq="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Zq{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function o(e,t,i,a){let s=[],l=/^@(\w+)\b/.exec(e[0]),u=l&&"keyframes"==l[1];if(l&&null==t)return i.push(e[0]+";");for(let n in t){let a=t[n];if(/&/.test(n))o(n.split(/,\s*/).map((t=>e.map((e=>t.replace(/&/,e))))).reduce(((e,t)=>e.concat(t))),a,i);else if(a&&"object"==typeof a){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");o(r(n),a,s,u)}else null!=a&&s.push(n.replace(/_.*/,"").replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))+": "+a+";")}(s.length||u)&&i.push((!n||l||a?e:e.map(n)).join(", ")+" {"+s.join(" ")+"}")}for(let t in e)o(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Lq[Rq]||1;return Lq[Rq]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[Eq],o=n&&n.nonce;r?o&&r.setNonce(o):r=new jq(e,o),r.mount(Array.isArray(t)?t:[t],e)}}let Nq=new Map;class jq{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=Nq.get(n);if(t)return e[Eq]=t;this.sheet=new r.CSSStyleSheet,Nq.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[Eq]=this}mount(e,t){let n=this.sheet,r=0,o=0;for(let t=0;t-1&&(this.modules.splice(a,1),o--,a=-1),-1==a){if(this.modules.splice(o++,0,i),n)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Bq="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Vq="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),$q=0;$q<10;$q++)Fq[48+$q]=Fq[96+$q]=String($q);for($q=1;$q<=24;$q++)Fq[$q+111]="F"+$q;for($q=65;$q<=90;$q++)Fq[$q]=String.fromCharCode($q+32),zq[$q]=String.fromCharCode($q);for(var Hq in Fq)zq.hasOwnProperty(Hq)||(zq[Hq]=Fq[Hq]);let Wq="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Uq="undefined"!=typeof document?document:{documentElement:{style:{}}};const qq=/Edge\/(\d+)/.exec(Wq.userAgent),Gq=/MSIE \d/.test(Wq.userAgent),Kq=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wq.userAgent),Yq=!!(Gq||Kq||qq),Xq=!Yq&&/gecko\/(\d+)/i.test(Wq.userAgent),Qq=!Yq&&/Chrome\/(\d+)/.exec(Wq.userAgent),Jq="webkitFontSmoothing"in Uq.documentElement.style,eG=!Yq&&/Apple Computer/.test(Wq.vendor),tG=eG&&(/Mobile\/\w+/.test(Wq.userAgent)||Wq.maxTouchPoints>2);var nG={mac:tG||/Mac/.test(Wq.platform),windows:/Win/.test(Wq.platform),linux:/Linux|X11/.test(Wq.platform),ie:Yq,ie_version:Gq?Uq.documentMode||6:Kq?+Kq[1]:qq?+qq[1]:0,gecko:Xq,gecko_version:Xq?+(/Firefox\/(\d+)/.exec(Wq.userAgent)||[0,0])[1]:0,chrome:!!Qq,chrome_version:Qq?+Qq[1]:0,ios:tG,android:/Android\b/.test(Wq.userAgent),webkit:Jq,webkit_version:Jq?+(/\bAppleWebKit\/(\d+)/.exec(Wq.userAgent)||[0,0])[1]:0,safari:eG,safari_version:eG?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Wq.userAgent)||[0,0])[1]:0,tabSize:null!=Uq.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function rG(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function oG(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function iG(e,t){if(!t.anchorNode)return!1;try{return oG(e,t.anchorNode)}catch(e){return!1}}function aG(e){return 3==e.nodeType?bG(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function sG(e,t,n,r){return!!n&&(cG(e,t,n,r,-1)||cG(e,t,n,r,1))}function lG(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function uG(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function cG(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:dG(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=lG(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(o<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=o<0?dG(e):0}}}function dG(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function hG(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function pG(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}}function fG(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class mG{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?dG(t):0),n,Math.min(e.focusOffset,n?dG(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let gG,vG=null;function yG(e){if(e.setActive)return e.setActive();if(vG)return e.focus(vG);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==vG?{get preventScroll(){return vG={preventScroll:!0},!0}}:void 0),!vG){vG=!1;for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}function kG(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;n=n.childNodes[r-1],r=dG(n)}else{if(!n.parentNode||uG(n))return null;r=lG(n),n=n.parentNode}}}function CG(e,t){for(let n=e,r=t;;){if(3==n.nodeType&&r=26&&(vG=!1);class _G{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new _G(e.parentNode,lG(e),t)}static after(e,t){return new _G(e.parentNode,lG(e)+1,t)}}const MG=[];class TG{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 new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,o=null;for(let i of this.children){if(7&i.flags){if(!i.dom&&(n=o?o.nextSibling:r.firstChild)){let e=TG.get(n);(!e||!e.parent&&e.canReuseDOM(i))&&i.reuseDOM(n)}i.sync(e,t),i.flags&=-8}if(n=o?o.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=i.dom&&(t.written=!0),i.dom.parentNode==r)for(;n&&n!=i.dom;)n=PG(n);else r.insertBefore(i.dom,n);o=i.dom}for(n=o?o.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=PG(n)}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==dG(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&&!TG.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,o=-1,i=-1,a=-1;for(let s=0,l=n,u=n;st)return n.domBoundsAround(e,t,l);if(c>=e&&-1==r&&(r=s,o=l),l>t&&n.dom.parentNode==this.dom){i=s,a=u;break}u=c,l=c+n.breakAfter}return{from:o,to:a<0?n+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:i=0?this.children[i].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=MG){this.markDirty();for(let r=e;rthis.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 AG(e,t,n,r,o,i,a,s,l){let{children:u}=e,c=u.length?u[t]:null,d=i.length?i[i.length-1]:null,h=d?d.breakAfter:a;if(!(t==r&&c&&!a&&!h&&i.length<2&&c.merge(n,o,i.length?d:null,0==n,s,l))){if(r0&&(!a&&i.length&&c.merge(n,c.length,i[0],!1,s,0)?c.breakAfter=i.shift().breakAfter:(n256||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 IG(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 _G(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 o=t,i=t,a=0;0==t&&n<0||t==r&&n>=0?nG.chrome||nG.gecko||(t?(o--,a=1):i=0)?0:s.length-1];nG.safari&&!a&&0==l.width&&(l=Array.prototype.find.call(s,(e=>e.width))||l);return a?hG(l,a<0):l||null}(this.dom,e,t)}}class RG extends TG{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(wG(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)&&!(8&(this.flags|e.flags))}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,o,i){return(!n||!(!(n instanceof RG&&n.mark.eq(this.mark))||e&&o<=0||te&&t.push(n=e&&(r=o),n=a,o++}let i=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new RG(this.mark,t,i)}domAtPos(e){return ZG(this,e)}coordsAt(e,t){return jG(this,e,t)}}class EG extends TG{static create(e,t,n){return new EG(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=EG.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,o,i){return!(n&&(!(n instanceof EG&&this.widget.compare(n.widget))||e>0&&o<=0||t0)?_G.before(this.dom):_G.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(),o=null;if(!r.length)return null;let i=this.side?this.side<0:e>0;for(let t=i?r.length-1:0;o=r[t],!(e>0?0==t:t==r.length-1||o.top0?_G.before(this.dom):_G.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return XW.empty}get isHidden(){return!0}}function ZG(e,t){let n=e.dom,{children:r}=e,o=0;for(let e=0;oe&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=o;e0&&t instanceof RG&&o.length&&(r=o[o.length-1])instanceof RG&&r.mark.eq(t.mark)?NG(r,t.children[0],n-1):(o.push(t),t.setParent(e)),e.length+=t.length}function jG(e,t,n){let r=null,o=-1,i=null,a=-1;!function e(t,s){for(let l=0,u=0;l=s&&(c.children.length?e(c,s-u):(!i||i.isHidden&&(n>0||FG(i,c)))&&(d>s||u==d&&c.getSide()>0)?(i=c,a=s-u):(u-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(-1==o.indexOf(i)||e[i]!==t[i]))return!1;return!0}function $G(e,t,n){let r=!1;if(t)for(let o in t)n&&o in n||(r=!0,"style"==o?e.style.cssText="":e.removeAttribute(o));if(n)for(let o in n)t&&t[o]==n[o]||(r=!0,"style"==o?e.style.cssText=n[o]:e.setAttribute(o,n[o]));return r}function HG(e){let t=Object.create(null);for(let n=0;n0?3e8:-4e8:t>0?1e8:-1e8,new YG(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:o,end:i}=XG(e,r);t=(o?r?-3e8:-1:5e8)-1,n=1+(i?r?2e8:1:-6e8)}return new YG(e,t,n,r,e.widget||null,!0)}static line(e){return new KG(e)}static set(e,t=!1){return bq.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}qG.none=bq.empty;class GG extends qG{constructor(e){let{start:t,end:n}=XG(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 GG&&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))&&VG(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}GG.prototype.point=!1;class KG extends qG{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof KG&&this.spec.class==e.spec.class&&VG(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}KG.prototype.mapMode=hU.TrackBefore,KG.prototype.point=!0;class YG extends qG{constructor(e,t,n,r,o,i){super(t,n,o,e),this.block=r,this.isReplace=i,this.mapMode=r?t<=0?hU.TrackBefore:hU.TrackAfter:hU.TrackDel}get type(){return this.startSide!=this.endSide?UG.WidgetRange:this.startSide<=0?UG.WidgetBefore:UG.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof YG&&function(e,t){return e==t||!!(e&&t&&e.compare(t))}(this.widget,e.widget)&&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 new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function XG(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 QG(e,t,n,r=0){let o=n.length-1;o>=0&&n[o]+r>=e?n[o]=Math.max(n[o],t):n.push(e,t)}YG.prototype.point=!0;class JG extends TG{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,o,i){if(n){if(!(n instanceof JG))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),OG(this,e,t,n?n.children.slice():[],o,i),!0}split(e){let t=new JG;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;e0&&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){VG(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){NG(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=zG(t,this.attrs||{})),n&&(this.attrs=zG({class:n},this.attrs||{}))}domAtPos(e){return ZG(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(wG(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&&($G(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&&TG.get(r)instanceof RG;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=TG.get(r))||void 0===n?void 0:n.isEditable)||nG.ios&&this.children.some((e=>e instanceof IG))))){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,t=0;for(let n of this.children){if(!(n instanceof IG)||/[^ -~]/.test(n.text))return null;let r=aG(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=jG(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(o instanceof JG)return o;if(i>t)break}r=i+o.breakAfter}return null}}class eK extends TG{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,o,i){return!(n&&(!(n instanceof eK&&this.widget.compare(n.widget))||e>0&&o<=0||t0)}}class tK extends WG{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 nK{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 eK&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new JG),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(rK(new LG(-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 eK||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 new 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),o=Math.min(r,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(rK(new IG(this.text.slice(this.textOff,this.textOff+o)),t),n),this.atCursorPos=!0,this.textOff+=o,e-=o,n=r<=o?0:t.length}}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,o,i){if(this.disallowBlockEffectsFor[i]&&n instanceof YG){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let a=t-e;if(n instanceof YG)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new eK(n.widget||oK.block,a,n));else{let i=EG.create(n.widget||oK.inline,a,a?0:n.startSide),s=this.atCursorPos&&!i.isEditable&&o<=r.length&&(e0),l=!i.isEditable&&(er.length||n.startSide<=0),u=this.getLine();2!=this.pendingBuffer||s||i.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),s&&(u.append(rK(new LG(1),r),o),o=r.length+Math.max(0,o-r.length)),u.append(rK(i,r),o),this.atCursorPos=l,this.pendingBuffer=l?er.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=o)}static build(e,t,n,r,o){let i=new nK(e,t,n,o);return i.openEnd=bq.spans(r,t,n,i),i.openStart<0&&(i.openStart=i.openEnd),i.finish(i.openEnd),i}}function rK(e,t){for(let n of t)e=new RG(n,[e],e.length);return e}class oK extends WG{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}}oK.inline=new oK("span"),oK.block=new oK("div");var iK=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(iK||(iK={}));const aK=iK.LTR,sK=iK.RTL;function lK(e){let t=[];for(let n=0;n=t){if(a.level==n)return i;(o<0||(0!=r?r<0?a.fromt:e[o].level>a.level))&&(o=i)}}if(o<0)throw new RangeError("Index out of range");return o}}function gK(e,t){if(e.length!=t.length)return!1;for(let n=0;nl&&a.push(new mK(l,f.from,h)),bK(e,f.direction==aK!=!(h%2)?r+1:r,o,f.inner,f.from,f.to,a),l=f.to}p=f.to}else{if(p==n||(t?vK[p]!=s:vK[p]==s))break;p++}d?yK(e,l,p,r+1,o,d,a):lt;){let n=!0,c=!1;if(!u||l>i[u-1].to){let e=vK[l-1];e!=s&&(n=!1,c=16==e)}let d=n||1!=s?null:[],h=n?r:r+1,p=l;e:for(;;)if(u&&p==i[u-1].to){if(c)break e;let f=i[--u];if(!n)for(let e=f.from,n=u;;){if(e==t)break e;if(!n||i[n-1].to!=e){if(vK[e-1]==s)break e;break}e=i[--n].from}if(d)d.push(f);else{f.to=0;e-=3)if(hK[e+1]==-n){let t=hK[e+2],n=2&t?o:4&t?1&t?i:o:0;n&&(vK[a]=vK[hK[e]]=n),s=e;break}}else{if(189==hK.length)break;hK[s++]=a,hK[s++]=t,hK[s++]=l}else if(2==(r=vK[a])||1==r){let e=r==o;l=e?0:1;for(let t=s-3;t>=0;t-=3){let n=hK[t+2];if(2&n)break;if(e)hK[t+2]|=2;else{if(4&n)break;hK[t+2]|=4}}}}}(e,o,i,r,s),function(e,t,n,r){for(let o=0,i=r;o<=n.length;o++){let a=o?n[o-1].to:e,s=ol;)t==i&&(t=n[--r].from,i=r?n[r-1].to:e),vK[--t]=c;l=a}else i=a,l++}}}(o,i,r,s),yK(e,o,i,t,n,r,a)}function xK(e,t,n){if(!e)return[new mK(0,0,t==sK?1:0)];if(t==aK&&!n.length&&!fK.test(e))return wK(e.length);if(n.length)for(;e.length>vK.length;)vK[vK.length]=256;let r=[],o=t==aK?0:1;return bK(e,o,o,n,0,e.length,r),r}function wK(e){return[new mK(0,e,0)]}let SK="";function kK(e,t,n,r,o){var i;let a=r.head-e.from,s=mK.find(t,a,null!==(i=r.bidiLevel)&&void 0!==i?i:-1,r.assoc),l=t[s],u=l.side(o,n);if(a==u){let e=s+=o?1:-1;if(e<0||e>=t.length)return null;l=t[s=e],a=l.side(!o,n),u=l.side(o,n)}let c=sU(e.text,a,l.forward(o,n));(cl.to)&&(c=u),SK=e.text.slice(Math.min(a,c),Math.max(a,c));let d=s==(o?t.length-1:0)?null:t[s+(o?1:-1)];return d&&c==u&&d.level+(o?0:1)e.some((e=>e))}),LK=_U.define({combine:e=>e.some((e=>e))}),ZK=_U.define();class NK{constructor(e,t="nearest",n="nearest",r=5,o=5,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new NK(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 NK(SU.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const jK=tq.define({map:(e,t)=>e.map(t)}),FK=tq.define();function zK(e,t,n){let r=e.facet(PK);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))}const BK=_U.define({combine:e=>!e.length||e[0]});let VK=0;const $K=_U.define({combine:e=>e.filter(((t,n)=>{for(let r=0;r{let t=[];return i&&t.push(GK.of((t=>{let n=t.plugin(e);return n?i(n):qG.none}))),o&&t.push(o(e)),t}))}static fromClass(e,t){return HK.define(((t,n)=>new e(t,n)),t)}}class WK{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}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(zK(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.plugin.create(e,this.spec.arg)}catch(t){zK(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){zK(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const UK=_U.define(),qK=_U.define(),GK=_U.define(),KK=_U.define(),YK=_U.define(),XK=_U.define();function QK(e,t){let n=e.state.facet(XK);if(!n.length)return n;let r=n.map((t=>t instanceof Function?t(e):t)),o=[];return bq.spans(r,t.from,t.to,{point(){},span(e,n,r,i){let a=e-t.from,s=n-t.from,l=o;for(let e=r.length-1;e>=0;e--,i--){let n,o=r[e].spec.bidiIsolate;if(null==o&&(o=CK(t.text,a,s)),i>0&&l.length&&(n=l[l.length-1]).to==a&&n.direction==o)n.to=s,l=n.inner;else{let e={from:a,to:s,direction:o,inner:[]};l.push(e),l=e.inner}}}}),o}const JK=_U.define();function eY(e){let t=0,n=0,r=0,o=0;for(let i of e.state.facet(JK)){let a=i(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&&(o=Math.max(o,a.bottom)))}return{left:t,right:n,top:r,bottom:o}}const tY=_U.define();class nY{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new nY(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.toAu)break;o+=2}if(!s)return n;new nY(s.fromA,s.toA,s.fromB,s.toB).addToSet(n),i=s.toA,a=s.toB}}}class rY{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=fU.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges(((e,t,n,o)=>r.push(new nY(e,t,n,o)))),this.changedRanges=r}static create(e,t,n){return new rY(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 oY extends TG{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=qG.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 JG],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new nY(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:e,toA:t})=>tthis.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 r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges(((e,r)=>{et.from&&(n=!0)}));return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let o=r>-1?function(e,t,n){let r=iY(e,n);if(!r)return null;let{node:o,from:i,to:a}=r,s=o.nodeValue;if(/[\n\r]/.test(s))return null;if(e.state.doc.sliceString(r.from,r.to)!=s)return null;let l=t.invertedDesc,u=new nY(l.mapPos(i),l.mapPos(a),i,a),c=[];for(let t=o.parentNode;;t=t.parentNode){let n=TG.get(t);if(n instanceof RG)c.push({node:t,deco:n.mark});else{if(n instanceof JG||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:u,text:o,marks:c,line:t};if(t==e.contentDOM)return null;c.push({node:t,deco:new GG({inclusive:!0,attributes:HG(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new nY(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(nG.ie||nG.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=function(e,t,n){let r=new aY;return bq.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=nY.extendWithRanges(n,i),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,o),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=nG.chrome||nG.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 o=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let i,a,s,l,{fromA:u,toA:c,fromB:d,toB:h}=t;if(n&&n.range.fromBd){let e=nK.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=nK.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);a=e.breakAtStart,s=e.openStart,l=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(),i=e.content.concat(r).concat(t.content)}else({content:i,breakAtStart:a,openStart:s,openEnd:l}=nK.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=o.findPos(c,1),{i:m,off:g}=o.findPos(u,-1);AG(this,m,g,p,f,i,a,s,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(FK)&&(this.editContextFormatting=e.value)}compositionView(e){let t=new IG(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new RG(n,[t],t.length);let n=new JG;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some((e=>7&e.flags))?1:0),this.markedForComposition.add(t);let n=TG.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 o=e.marks.length-1;o>=-1;o--)n=r.childPos(n.off,1),r=r.children[n.i],t(o>=0?e.marks[o].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,o=!r&&!(this.view.state.facet(BK)||this.dom.tabIndex>-1)&&iG(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||o))return;let i=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,s=this.moveToLine(this.domAtPos(a.anchor)),l=a.empty?s:this.moveToLine(this.domAtPos(a.head));if(nG.gecko&&a.empty&&!this.hasComposition&&(1==(u=s).node.nodeType&&u.node.firstChild&&(0==u.offset||"false"==u.node.childNodes[u.offset-1].contentEditable)&&(u.offset==u.node.childNodes.length||"false"==u.node.childNodes[u.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore((()=>s.node.insertBefore(e,s.node.childNodes[s.offset]||null))),s=l=new _G(e,0),i=!0}var u;let c=this.view.observer.selectionRange;!i&&c.focusNode&&(sG(s.node,s.offset,c.anchorNode,c.anchorOffset)&&sG(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,a))||(this.view.observer.ignore((()=>{nG.android&&nG.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=rG(this.view.root);if(e)if(a.empty){if(nG.gecko){let e=(t=s.node,r=s.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(ra.head&&([s,l]=[l,s]),t.setEnd(l.node,l.offset),t.setStart(s.node,s.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(s,l)),this.impreciseAnchor=s.precise?null:new _G(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new _G(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&sG(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=rG(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let i=JG.find(this,t.head);if(!i)return;let a=i.posAtStart;if(t.head==a||t.head==a+i.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,o)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=TG.get(n.childNodes[r]);e instanceof JG&&(t=e.domAtPos(e.length))}return t?new _G(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=TG.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 new 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=0;i--){let a=this.children[i],s=o-a.breakAfter,l=s-a.length;if(se||a.covers(1))&&(!n||a instanceof JG&&!(n instanceof JG&&t>=0)))n=a,r=l;else if(n&&l==e&&s==e&&a instanceof eK&&Math.abs(t)<2){if(a.deco.startSide<0)break;i&&(n=null)}o=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 JG))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 IG))return null;let o=sU(r.text,n);if(o==n)return null;let i=bG(r.dom,n,o).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,a=-1,s=this.view.textDirection==iK.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=u.dom.getBoundingClientRect();if(t.push(n.height),i){let t=u.dom.lastChild,r=t?aG(t):[];if(r.length){let t=r[r.length-1],i=s?t.right-n.left:n.right-t.left;i>a&&(a=i,this.minWidth=o,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?iK.RTL:iK.LTR}measureTextSize(){for(let e of this.children)if(e instanceof JG){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let o=aG(r.firstChild)[0];e=r.getBoundingClientRect().height,t=o?o.width/27:7,n=o?o.height:e,r.remove()})),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new DG(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.length;if(i>n){let r=(t.lineBlockAt(i).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(qG.replace({widget:new tK(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return qG.set(e)}updateDeco(){let e=1,t=this.view.state.facet(GK).map((t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t)),n=!1,r=this.view.state.facet(KK).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(bq.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let o=eY(this.view),i={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:a,offsetHeight:s}=this.view.scrollDOM;!function(e,t,n,r,o,i,a,s){let l=e.ownerDocument,u=l.defaultView||window;for(let c=e,d=!1;c&&!d;)if(1==c.nodeType){let e,h=c==l.body,p=1,f=1;if(h)e=pG(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let t=c.getBoundingClientRect();({scaleX:p,scaleY:f}=fG(c,t)),e={left:t.left,right:t.left+c.clientWidth*p,top:t.top,bottom:t.top+c.clientHeight*f}}let m=0,g=0;if("nearest"==o)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+a)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+a,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+i)):t.right>e.right&&(m=t.right-e.right+i,n<0&&t.lefte.bottom||t.lefte.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)break;c=c.host}}(this.view.scrollDOM,i,n.heade instanceof EG||e.children.some(n);return n(this.children[t])}}function iY(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=kG(n.focusNode,n.focusOffset),o=CG(n.focusNode,n.focusOffset),i=r||o;if(o&&r&&o.node!=r.node){let t=TG.get(o.node);if(!t||t instanceof IG&&t.text!=o.node.nodeValue)i=o;else if(e.docView.lastCompositionAfterCursor){let e=TG.get(r.node);!e||e instanceof IG&&e.text!=r.node.nodeValue||(i=o)}}if(e.docView.lastCompositionAfterCursor=i!=r,!i)return null;let a=t-i.offset;return{from:a,to:a+i.node.nodeValue.length,node:i.node}}let aY=class{constructor(){this.changes=[]}compareRange(e,t){QG(e,t,this.changes)}comparePoint(e,t){QG(e,t,this.changes)}boundChange(e){QG(e,e,this.changes)}};function sY(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function lY(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function uY(e,t){return e.topt.top+1}function cY(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function hY(e,t,n){let r,o,i,a,s,l,u,c,d=!1;for(let h=e.firstChild;h;h=h.nextSibling){let e=aG(h);for(let p=0;pg||a==g&&i>m)&&(r=h,o=f,i=m,a=g,d=!m||(t0:pf.bottom&&(!u||u.bottomf.top)&&(l=h,c=f):u&&uY(u,f)?u=dY(u,f.bottom):c&&uY(c,f)&&(c=cY(c,f.top))}}if(u&&u.bottom>=n?(r=s,o=u):c&&c.top<=n&&(r=l,o=c),!r)return{node:e,offset:0};let h=Math.max(o.left,Math.min(o.right,t));return 3==r.nodeType?pY(r,h,n):d&&"false"!=r.contentEditable?hY(r,h,n):{node:e,offset:Array.prototype.indexOf.call(e.childNodes,r)+(t>=(o.left+o.right)/2?1:0)}}function pY(e,t,n){let r=e.nodeValue.length,o=-1,i=1e9,a=0;for(let s=0;sn?u.top-n:n-u.bottom)-1;if(u.left-1<=t&&u.right+1>=t&&c=(u.left+u.right)/2,r=n;if(nG.chrome||nG.gecko){let t=bG(e,s).getBoundingClientRect();Math.abs(t.left-u.right)<.1&&(r=!n)}if(c<=0)return{node:e,offset:s+(r?1:0)};o=s+(r?1:0),i=c}}}return{node:e,offset:o>-1?o:a>0?e.nodeValue.length:0}}function fY(e,t,n,r=-1){var o,i;let a,s=e.contentDOM.getBoundingClientRect(),l=s.top+e.viewState.paddingTop,{docHeight:u}=e.viewState,{x:c,y:d}=t,h=d-l;if(h<0)return 0;if(h>u)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,o=!1;a=e.elementAtHeight(h),a.type!=UG.Text;)for(;h=r>0?a.bottom+t:a.top-t,!(h>=0&&h<=u);){if(o)return n?null:0;o=!0,r=-r}d=l+h;let p=a.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:mY(e,s,a,c,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(c,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(c=Math.max(s.left+1,Math.min(s.right-1,c)),g=m.elementFromPoint(c,d),g&&!e.contentDOM.contains(g)&&(g=null));let v,y=-1;if(g&&0!=(null===(o=e.docView.nearest(g))||void 0===o?void 0:o.isEditable)){if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(c,d);e&&({offsetNode:v,offset:y}=e)}else if(f.caretRangeFromPoint){let e=f.caretRangeFromPoint(c,d);e&&({startContainer:v,startOffset:y}=e)}v&&(!e.contentDOM.contains(v)||nG.safari&&function(e,t,n){return gY(e,t,n)}(v,y,c)||nG.chrome&&function(e,t,n){if(0!=t)return gY(e,t,n);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}let r=1==e.nodeType?e.getBoundingClientRect():bG(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(v,y,c))&&(v=void 0),v&&(y=Math.min(dG(v),y))}if(!v||!e.docView.dom.contains(v)){let t=JG.find(e.docView,p);if(!t)return h>a.top+a.height/2?a.to:a.from;({node:v,offset:y}=hY(t.dom,c,d))}let b=e.docView.nearest(v);if(!b)return null;if(b.isWidget&&1==(null===(i=b.dom)||void 0===i?void 0:i.nodeType)){let e=b.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;i+=Math.floor((o-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let a=e.state.sliceDoc(n.from,n.to);return n.from+Iq(a,i,e.state.tabSize)}function gY(e,t,n){let r,o=e;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(;;){let e=o.nextSibling;if(e){if("BR"==e.nodeName)break;return!1}{let e=o.parentNode;if(!e||"DIV"==e.nodeName)break;o=e}}return bG(e,r-1,r).getBoundingClientRect().right>n}function vY(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let o of r.type){if(o.from>t)break;if(!(o.tot)return o;e&&(o.type!=UG.Text||e.type==o.type&&!(n<0?o.fromt))||(e=o)}}return e||r}return r}function yY(e,t,n,r){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),a=e.textDirectionAt(o.from);for(let s=t,l=null;;){let t=kK(o,i,a,s,n),u=SK;if(!t){if(o.number==(n?e.state.doc.lines:1))return s;u="\n",o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),t=e.visualLineSide(o,!n)}if(l){if(!l(u))return s}else{if(!r)return t;l=r(u)}s=t}}function bY(e,t,n){for(;;){let r=0;for(let o of e)o.between(t-1,t+1,((e,o,i)=>{if(t>e&&tt(e))),n.from,t.head>n.from?-1:1);return r==n.from?n:SU.cursor(r,re)&&!_Y(o,t)&&this.lineBreak(),r=o}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 o,i=-1,a=1;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){if(e.cmIgnore)return;let t=TG.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+(CY(e,n.node,n.offset)?t:0))}}function CY(e,t,n){for(;;){if(!t||n-1;let{impreciseHead:o,impreciseAnchor:i}=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=o||i?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=e.observer.selectionRange;n&&(t.push(new MY(n,r)),o==n&&i==r||t.push(new MY(o,i)));return t}(e),n=new kY(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?SU.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=o&&o.node==t.focusNode&&o.offset==t.focusOffset||!oG(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=i&&i.node==t.anchorNode&&i.offset==t.anchorOffset||!oG(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((nG.ios||nG.chrome)&&e.state.selection.main.empty&&n!=r&&(a.from>0||a.to-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(SU.range(r,n)):this.newSel=SU.single(r,n)}}}function PY(e,t){let n,{newSel:r}=t,o=e.state.selection.main,i=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:a}=t.bounds,s=o.from,l=null;(8===i||nG.android&&t.text.length=o.from&&n.to<=o.to&&(n.from!=o.from||n.to!=o.to)&&o.to-o.from-(n.to-n.from)<=4?n={from:o.from,to:o.to,insert:e.state.doc.slice(o.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,o.to))}:e.state.doc.lineAt(o.from).toDate.now()-50?n={from:o.from,to:o.to,insert:e.state.toText(e.inputState.insertingText)}:nG.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=SU.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:XW.of([" "])}),n)return DY(e,n,r,i);if(r&&!r.main.eq(o)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin,"select.pointer"==n&&(r=xY(e.state.facet(YK).map((t=>t(e))),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function DY(e,t,n,r=-1){if(nG.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(nG.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&&xG(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==r&&t.insert.lengtho.head)&&xG(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&xG(e.contentDOM,"Delete",46)))return!0;let i,a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let s=()=>i||(i=function(e,t,n){let r,o=e.state,i=o.selection.main,a=-1;if(t.from==t.to&&t.fromi.to){let n=t.fromt(e))),r,n);t.from==s&&(a=s)}if(a>-1)r={changes:t,selection:SU.cursor(t.from+t.insert.length,-1)};else if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=i.fromt.to?o.sliceDoc(t.to,i.to):"";r=o.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+a))}else{let a=o.changes(t),s=n&&n.main.to<=a.newLength?n.main:void 0;if(o.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=i.to+10&&t.to>=i.to-10){let l,u=e.state.sliceDoc(t.from,t.to),c=n&&iY(e,n.main.head);if(c){let e=t.insert.length-(t.to-t.from);l={from:c.from,to:c.to-e}}else l=e.state.doc.lineAt(i.head);let d=i.to-t.to;r=o.changeByRange((n=>{if(n.from==i.from&&n.to==i.to)return{changes:a,range:s||n.map(a)};let r=n.to-d,c=r-u.length;if(e.state.sliceDoc(c,r)!=u||r>=l.from&&c<=l.to)return{range:n};let h=o.changes({from:c,to:r,insert:t.insert}),p=n.to-i.to;return{changes:h,range:s?SU.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(h)}}))}else r={changes:a,selection:s&&o.selection.replaceRange(s)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return o.update(r,{userEvent:s,scrollIntoView:!0})}(e,t,n));return e.state.facet(AK).some((n=>n(e,t.from,t.to,a,s)))||e.dispatch(s()),!0}function AY(e,t,n,r){let o=Math.min(e.length,t.length),i=0;for(;i0&&s>0&&e.charCodeAt(a-1)==t.charCodeAt(s-1);)a--,s--;if("end"==r){n-=a+Math.max(0,i-Math.min(a,s))-i}if(a=a?i-n:0,s=i+(s-a),a=i}else if(s=s?i-n:0,a=i+(a-s),s=i}return{from:i,toA:a,toB:s}}class OY{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.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,nG.safari&&e.contentDOM.addEventListener("input",(()=>null)),nG.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,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=TG.get(r))&&n.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,r=e&&e.plugin.domEventHandlers,o=e&&e.plugin.domEventObservers;if(r)for(let e in r){let o=r[e];o&&n(e).handlers.push(IY(t.value,o))}if(o)for(let e in o){let r=o[e];r&&n(e).observers.push(IY(t.value,r))}}for(let e in jY)n(e).handlers.push(jY[e]);for(let e in FY)n(e).observers.push(FY[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let o=!t[e].handlers.length,i=n[e];i&&o!=!i.handlers.length&&(r.removeEventListener(e,this.handleEvent),i=null),i||r.addEventListener(e,this.handleEvent,{passive:o})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&LY.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),nG.android&&nG.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return!nG.ios||e.synthetic||e.altKey||e.metaKey||!((t=RY.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||EY.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(!("Enter"==t.key&&e&&e.from0||!!(nG.safari&&!nG.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 IY(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){zK(n.state,e)}}}const RY=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],EY="dthko",LY=[16,17,18,20,91,92,224,225];function ZY(e){return.7*Math.max(0,e)+8}class NY{constructor(e,t,n,r){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,n,r=e.ownerDocument;for(let o=e.parentNode;o&&!(o==r.body||t&&n);)if(1==o.nodeType)!n&&o.scrollHeight>o.clientHeight&&(n=o),!t&&o.scrollWidth>o.clientWidth&&(t=o),o=o.assignedSlot||o.parentNode;else{if(11!=o.nodeType)break;o=o.host}return{x:t,y:n}}(e.contentDOM),this.atoms=e.state.facet(YK).map((t=>t(e)));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(pq.allowMultipleSelections)&&function(e,t){let n=e.state.facet(_K);return n.length?n[0](t):nG.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=rG(e.root);if(!r||0==r.rangeCount)return!0;let o=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=XY(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,o=0,i=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:i}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let s=eY(this.view);e.clientX-s.left<=r+6?t=-ZY(r-e.clientX):e.clientX+s.right>=i-6&&(t=ZY(e.clientX-i)),e.clientY-s.top<=o+6?n=-ZY(o-e.clientY):e.clientY+s.bottom>=a-6&&(n=ZY(e.clientY-a)),this.setScrollSpeed(t,n)}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)}select(e){let{view:t}=this,n=xY(this.atoms,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)}}const jY=Object.create(null),FY=Object.create(null),zY=nG.ie&&nG.ie_version<15||nG.ios&&nG.webkit_version<604;function BY(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function VY(e,t){t=BY(e.state,IK,t);let n,{state:r}=e,o=1,i=r.toText(t),a=i.lines==r.selection.ranges.length;if(null!=JY&&r.selection.ranges.every((e=>e.empty))&&JY==i.toString()){let e=-1;n=r.changeByRange((n=>{let s=r.doc.lineAt(n.from);if(s.from==e)return{range:n};e=s.from;let l=r.toText((a?i.line(o++).text:t)+r.lineBreak);return{changes:{from:s.from,insert:l},range:SU.cursor(n.from+l.length)}}))}else n=a?r.changeByRange((e=>{let t=i.line(o++);return{changes:{from:e.from,to:e.to,insert:t.text},range:SU.cursor(e.from+t.length)}})):r.replaceSelection(i);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function $Y(e,t,n,r){if(1==r)return SU.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(0==o.length)return SU.cursor(t);0==i?n=1:i==o.length&&(n=-1);let a=i,s=i;n<0?a=sU(o.text,i,!1):s=sU(o.text,i);let l=r(o.text.slice(a,s));for(;a>0;){let e=sU(o.text,a,!1);if(r(o.text.slice(e,a))!=l)break;a=e}for(;s{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},jY.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),FY.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},FY.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},jY.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(TK))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=UY(e,t),r=XY(t),o=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),o=o.map(e.changes))},get(t,i,a){let s,l=UY(e,t),u=$Y(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!i){let t=$Y(e,n.pos,n.bias,r),o=Math.min(t.from,u.from),i=Math.max(t.to,u.to);u=o1&&(s=function(e,t){for(let n=0;n=t)return SU.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(o,l.pos))?s:a?o.addRange(u):SU.create([u])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new NY(e,t,n,r)),r&&e.observer.ignore((()=>{yG(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()}));let o=e.inputState.mouseSelection;if(o)return o.start(t),!1===o.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};let HY=(e,t,n)=>t>=n.top&&t<=n.bottom&&e>=n.left&&e<=n.right;function WY(e,t,n,r){let o=JG.find(e.docView,t);if(!o)return 1;let i=t-o.posAtStart;if(0==i)return 1;if(i==o.length)return-1;let a=o.coordsAt(i,-1);if(a&&HY(n,r,a))return-1;let s=o.coordsAt(i,1);return s&&HY(n,r,s)?1:a&&a.bottom>=r?-1:1}function UY(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:WY(e,n,t.clientX,t.clientY)}}const qY=nG.ie&&nG.ie_version<=11;let GY=null,KY=0,YY=0;function XY(e){if(!qY)return e.detail;let t=GY,n=YY;return GY=e,YY=Date.now(),KY=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(KY+1)%3:1}function QY(e,t,n,r){if(!(n=BY(e.state,IK,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,a=r&&i&&function(e,t){let n=e.state.facet(MK);return n.length?n[0](t):nG.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:i.from,to:i.to}:null,s={from:o,insert:n},l=e.state.changes(a?[a,s]:s);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}jY.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=SU.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",BY(e.state,RK,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},jY.dragend=e=>(e.inputState.draggedContent=null,!1),jY.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),o=0,i=()=>{++o==n.length&&QY(e,t,r.filter((e=>null!=e)).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),i()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return QY(e,t,n,!0),!0}return!1},jY.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=zY?null:t.clipboardData;return n?(VY(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(),VY(e,n.value)}),50)}(e),!1)};let JY=null;jY.copy=jY.cut=(e,t)=>{let{text:n,ranges:r,linewise:o}=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 o=-1;for(let{from:r}of e.selection.ranges){let i=e.doc.lineAt(r);i.number>o&&(t.push(i.text),n.push({from:i.from,to:Math.min(e.doc.length,i.to+1)})),o=i.number}r=!0}return{text:BY(e,RK,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!o)return!1;JY=o?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=zY?null:t.clipboardData;return i?(i.clearData(),i.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)};const eX=QU.define();function tX(e,t){let n=[];for(let r of e.facet(OK)){let o=r(e,t);o&&n.push(o)}return n.length?e.update({effects:n,annotations:eX.of(!0)}):null}function nX(e){setTimeout((()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=tX(e.state,t);n?e.dispatch(n):e.update([])}}),10)}FY.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),nX(e)},FY.blur=e=>{e.observer.clearSelectionRange(),nX(e)},FY.compositionstart=FY.compositionupdate=e=>{e.observer.editContext||(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},FY.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,nG.chrome&&nG.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then((()=>e.observer.flush())):setTimeout((()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])}),50))},FY.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},jY.beforeinput=(e,t)=>{var n,r;if("insertText"!=t.inputType&&"insertCompositionText"!=t.inputType||(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let r=null===(n=t.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),o=t.getTargetRanges();if(r&&o.length){let t=o[0],n=e.posAtDOM(t.startContainer,t.startOffset),i=e.posAtDOM(t.endContainer,t.endOffset);return DY(e,{from:n,to:i,insert:e.state.toText(r)},null),!0}}let o;if(nG.chrome&&nG.android&&(o=RY.find((e=>e.inputType==t.inputType)))&&(e.observer.delayAndroidKey(o.key,o.keyCode),"Backspace"==o.key||"Delete"==o.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 nG.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),nG.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout((()=>FY.compositionend(e,t)),20),!1};const rX=new Set;const oX=["pre-wrap","normal","pre-line","break-spaces"];let iX=!1;function aX(){iX=!1}class sX{constructor(e){this.lineWrapping=e,this.doc=XW.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){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return oX.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-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=o,s){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>dX&&(iX=!0),this.height=e)}replace(e,t,n){return hX.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let o=this,i=n.doc;for(let a=r.length-1;a>=0;a--){let{fromA:s,toA:l,fromB:u,toB:c}=r[a],d=o.lineAt(s,cX.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:o.lineAt(l,cX.ByPosNoHeight,n,0,0);for(c+=h.to-l,l=h.to;a>0&&d.from<=r[a-1].toA;)s=r[a-1].fromA,u=r[a-1].fromB,a--,s2*o){let o=e[t-1];o.break?e.splice(--t,1,o.left,null,o.right):e.splice(--t,1,o.left,o.right),n+=1+o.break,r-=o.size}else{if(!(o>2*r))break;{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,o-=t.size}}else if(r=o&&i(this.blockAt(0,n,r,o))}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 mX extends fX{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new uX(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof mX||r instanceof gX&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof gX?r=new mX(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):hX.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 gX extends hX{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,o=e.doc.lineAt(t+this.length).number,i=o-r+1,a=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);n=t/i,this.length>i+1&&(a=(this.height-t)/(this.length-i-1))}else n=this.height/i;return{firstLine:r,lastLine:o,perLine:n,perChar:a}}blockAt(e,t,n,r){let{firstLine:o,lastLine:i,perLine:a,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let o=r+(e0){let e=n[n.length-1];e instanceof gX?n[n.length-1]=new gX(e.length+r):n.push(null,new gX(r-1))}if(e>0){let t=n[0];t instanceof gX?n[0]=new gX(e+t.length):n.unshift(new gX(e-1),null)}return hX.of(n)}decomposeLeft(e,t){t.push(new gX(e-1),null)}decomposeRight(e,t){t.push(null,new gX(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],i=Math.max(t,r.from),a=-1;for(r.from>t&&n.push(new gX(r.from-t-1).updateHeight(e,t));i<=o&&r.more;){let t=e.doc.lineAt(i).length;n.length&&n.push(null);let o=r.heights[r.index++];-1==a?a=o:Math.abs(o-a)>=dX&&(a=-2);let s=new mX(t,o);s.outdated=!1,n.push(s),i+=t+1}i<=o&&n.push(null,new gX(o-i).updateHeight(e,i));let s=hX.of(n);return(a<0||Math.abs(s.height-this.height)>=dX||Math.abs(a-this.heightMetrics(e,t).perLine)>=dX)&&(iX=!0),pX(this,s)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class vX extends hX{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 o=n+this.left.height;return ea))return l;let u=t==cX.ByPosNoHeight?cX.ByPosNoHeight:cX.ByPos;return s?l.join(this.right.lineAt(a,u,n,i,a)):this.left.lineAt(a,u,n,r,o).join(l)}forEachLine(e,t,n,r,o,i){let a=r+this.left.height,s=o+this.left.length+this.break;if(this.break)e=s&&this.right.forEachLine(e,t,n,a,s,i);else{let l=this.lineAt(s,cX.ByPos,n,r,o);e=e&&l.from<=t&&i(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,a,s,i)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let o=[];e>0&&this.decomposeLeft(e,o);let i=o.length;for(let e of n)o.push(e);if(e>0&&yX(o,i-1),t=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);e2*t.size||t.size>2*e.size?hX.of(this.break?[e,null,t]:[e,t]):(this.left=pX(this.left,e),this.right=pX(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:o,right:i}=this,a=t+o.length+this.break,s=null;return r&&r.from<=t+o.length&&r.more?s=o=o.updateHeight(e,t,n,r):o.updateHeight(e,t,n),r&&r.from<=a+i.length&&r.more?s=i=i.updateHeight(e,a,n,r):i.updateHeight(e,a,n),s?this.balanced(o,i):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function yX(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof gX&&(r=e[t+1])instanceof gX&&e.splice(t-1,3,new gX(n.length+1+r.length))}class bX{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 mX?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new mX(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=5)&&this.addLineDeco(r,o,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new mX(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new gX(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 mX)return e;let t=new mX(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 mX||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();i=Math.max(i,r.left),a=Math.min(a,r.right),s=Math.max(s,r.top),l=Math.min(t==e.parentNode?o.innerHeight:l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:i-n.left,right:Math.max(i,a)-n.left,top:s-(n.top+t),bottom:Math.max(s,l)-(n.top+t)}}function SX(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class kX{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"function"!=typeof e&&"cm-lineWrapping"==e.class));this.heightOracle=new sX(t),this.stateDeco=e.facet(GK).filter((e=>"function"!=typeof e)),this.heightMap=hX.empty().applyChanges(this.stateDeco,XW.empty,this.heightOracle.setDoc(e.doc),[new nY(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=qG.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 MX(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?DX:new AX(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e=>{this.viewportLines.push(OX(e,this.scaler))}))}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(GK).filter((e=>"function"!=typeof e));let r=e.changedRanges,o=nY.extendWithRanges(r,function(e,t,n){let r=new xX;return bq.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:fU.empty(this.state.doc.length))),i=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);aX(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=i||iX)&&(e.flags|=2),a?(this.scrollAnchorPos=e.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=i);let s=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let l=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(l||!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(LK)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?iK.RTL:iK.LTR;let i=this.heightOracle.mustRefreshForWrapping(o),a=t.getBoundingClientRect(),s=i||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let l=0,u=0;if(a.width&&a.height){let{scaleX:e,scaleY:n}=fG(t,a);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,l|=16,i=s=!0)}let c=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==d||(this.paddingTop=c,this.paddingBottom=d,l|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=16);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=SG(e.scrollDOM);let p=(this.printing?SX:wX)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget&&!function(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left0&&t.top0}(e.dom))return 0;let v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(i=!0),i||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:a,textHeight:s}=e.docView.measureTextSize();i=n>0&&r.refresh(o,n,a,s,Math.max(5,v/a),t),i&&(e.docView.minWidth=0,l|=16)}f>0&&m>0?u=Math.max(f,m):f<0&&m<0&&(u=Math.min(f,m)),aX();for(let n of this.viewports){let o=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(i?hX.empty().applyChanges(this.stateDeco,XW.empty,this.heightOracle,[new nY(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new lX(n.from,o))}iX&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),l|=this.updateForViewport()),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}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,o=this.heightOracle,{visibleTop:i,visibleBottom:a}=this,s=new MX(r.lineAt(i-1e3*n,cX.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-n),cX.ByHeight,o,0,0).to);if(t){let{head:e}=t.range;if(es.to){let n,i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,cX.ByPos,o,0,0);n="center"==t.y?(a.top+a.bottom)/2-i/2:"start"==t.y||"nearest"==t.y&&e=a+Math.max(10,Math.min(n,250)))&&r>i-2e3&&o>1,i=r<<1;if(this.defaultTextDirection!=iK.LTR&&!n)return[];let a=[],s=(r,i,l,u)=>{if(i-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt))));if(!h){if(ie.from<=i&&e.to>=i))){let e=t.moveToLineBoundary(SU.cursor(i),!1,!0).head;e>r&&(i=e)}let e=this.gapSize(l,r,i,u);h=new kX(r,i,e,n||e<2e6?e:2e6)}a.push(h)},l=t=>{if(t.lengtho&&(r.push({from:o,to:e}),i+=e-o),o=t}},20),o2e6)for(let n of e)n.from>=t.from&&n.fromt.from&&s(t.from,a,t,o),le.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];bq.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=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t=>t.from<=e&&t.to>=e))||OX(this.heightMap.lineAt(e,cX.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))||OX(this.heightMap.lineAt(this.scaler.fromDOM(e),cX.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 OX(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 MX{constructor(e,t){this.from=e,this.to=t}}function TX({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:o}=t[e],i=o-n;if(r<=i)return n+r;r-=i}}function PX(e,t){let n=0;for(let{from:r,to:o}of e.ranges){if(t<=o){n+=t-r;break}n+=o-r}return n/e.total}const DX={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};class AX{constructor(e,t,n){let r=0,o=0,i=0;this.viewports=n.map((({from:n,to:o})=>{let i=t.lineAt(n,cX.ByPos,e,0,0).top,a=t.lineAt(o,cX.ByPos,e,0,0).bottom;return r+=a-i,{from:n,to:o,top:i,bottom:a,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=i+(e.top-o)*this.scale,i=e.domBottom=e.domTop+(e.bottom-e.top),o=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let o=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to)))}}function OX(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new uX(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map((e=>OX(e,t))):e._content)}const IX=_U.define({combine:e=>e.join(" ")}),RX=_U.define({combine:e=>e.indexOf(!0)>-1}),EX=Zq.newName(),LX=Zq.newName(),ZX=Zq.newName(),NX={"&light":"."+LX,"&dark":"."+ZX};function jX(e,t,n){return new Zq(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,(t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError(`Unsupported selector: ${t}`);return n[t]})):e+" "+t})}const FX=jX("."+EX,{"&":{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",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&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-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".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",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',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"}},NX),zX={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},BX=nG.ie&&nG.ie_version<=11;class VX{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new mG,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);(nG.ie&&nG.ie_version<=11||nG.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||!nG.android||!1===e.constructor.EDIT_CONTEXT||nG.chrome&&nG.chrome_version<126||(this.editContext=new WX(e),e.state.facet(BK)&&(e.contentDOM.editContext=this.editContext.editContext)),BX&&(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){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])))){this.gapIntersection.disconnect();for(let t of 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(BK)?n.root.activeElement!=this.dom:!iG(this.dom,r))return;let o=r.anchorNode&&n.docView.nearest(r.anchorNode);o&&o.ignoreEvent(e)?t||(this.selectionChanged=!1):(nG.ie&&nG.ie_version<=11||nG.android&&nG.chrome)&&!n.state.selection.main.empty&&r.focusNode&&sG(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=rG(e.root);if(!t)return!1;let n=nG.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 HX(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?HX(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=iG(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&xG(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{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 o of e){let e=this.readMutation(o);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&&iG(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 o=new TY(this.view,e,t,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}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=PY(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=$X(t,e.previousSibling||e.target.previousSibling,-1),r=$X(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(BK)!=e.state.facet(BK)&&(e.view.contentDOM.editContext=e.state.facet(BK)?this.editContext.editContext:null))}destroy(){var e,t,n;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();for(let e of this.scrollTargets)e.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 $X(e,t,n){for(;t;){let r=TG.get(t);if(r&&r.parent==e)return r;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function HX(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,i=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);return sG(a.node,a.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}class WX{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)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:o,head:i}=r,a=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let l=s-a>n.text.length;a==this.from&&othis.to&&(s=o);let u=AY(e.state.sliceDoc(a,s),n.text,(l?r.from:r.to)-a,l?"end":null);if(!u){let t=SU.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));return void(t.main.eq(r)||e.dispatch({selection:t,userEvent:"select"}))}let c={from:u.from+a,to:u.toA+a,insert:XW.of(n.text.slice(u.from,u.toB).split("\n"))};if((nG.mac||nG.android)&&c.from==i-1&&/^\. ?$/.test(n.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(c={from:a,to:s,insert:XW.of([n.text.replace("."," ")])}),this.pendingContextChange=c,!e.state.readOnly){let t=this.to-this.from+(c.to-c.from+c.insert.length);DY(e,c,SU.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),c.from=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],o=null;for(let t=this.toEditorPos(n.rangeStart),i=this.toEditorPos(n.rangeEnd);t{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let o=this.toEditorPos(e.rangeStart),i=this.toEditorPos(e.rangeEnd);if(o{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)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=rG(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(((o,i,a,s,l)=>{if(n)return;let u=l.length-(i-o);if(r&&i>=r.to){if(r.from==o&&r.to==i&&r.insert.eq(l))return r=this.pendingContextChange=null,t+=u,void(this.to+=u);r=null,this.revertPending(e.state)}if(o+=t,(i+=t)<=this.from)this.from+=u,this.to+=u;else if(othis.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),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.to3e4)}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 UX{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&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&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;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 _X(e.state||pq.create(e)),e.scrollTo&&e.scrollTo.is(jK)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet($K).map((e=>new WK(e)));for(let e of this.plugins)e.update(this);this.observer=new VX(this),this.inputState=new OY(this),this.inputState.ensureHandlers(this.plugins),this.docView=new oY(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 nq?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 new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,o=this.state;for(let t of e){if(t.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=t.state}if(this.destroyed)return void(this.viewState.state=o);let i=this.hasFocus,a=0,s=null;e.some((e=>e.annotation(eX)))?(this.inputState.notifiedFocused=i,a=1):i!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=i,s=tX(o,i),s||(a=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(u=null)):this.observer.clear(),o.facet(pq.phrases)!=this.state.facet(pq.phrases))return this.setState(o);t=rY.create(this,o,e),t.flags|=a;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(c&&(c=c.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;c=new NK(e.empty?e:SU.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(jK)&&(c=e.value.clip(this.state))}this.viewState.update(t,c),this.bidiCache=KX.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(tY)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some((e=>e.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(t.startState.facet(IX)!=t.state.facet(IX)&&(this.viewState.mustMeasureContent=!0),(n||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!t.empty)for(let e of this.state.facet(DK))try{e(t)}catch(e){zK(this.state,e,"update listener")}(s||u)&&Promise.resolve().then((()=>{s&&this.state==s.startState&&this.dispatch(s),u&&!PY(this,u)&&l.force&&xG(this.contentDOM,l.key,l.keyCode)}))}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new _X(e),this.plugins=e.facet($K).map((e=>new WK(e))),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new oY(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($K),n=e.state.facet($K);if(t!=n){let r=[];for(let o of n){let n=t.indexOf(o);if(n<0)r.push(new WK(o));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-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:i}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(i=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(i<0)if(SG(n))o=-1,i=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);o=e.from,i=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 zK(this.state,e),GX}})),u=rY.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),c&&this.docViewUpdate());for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,i=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(DK))e(t)}get themeClasses(){return EX+" "+(this.state.facet(RX)?ZX:LX)+" "+this.state.facet(IX)}updateAttrs(){let e=YX(this,UK,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(BK)?"true":"false",class:"cm-content",style:`${nG.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),YX(this,qK,t);let n=this.observer.ignore((()=>{let n=$G(this.contentDOM,this.contentAttrs,t),r=$G(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)if(e.is(UX.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(tY);let e=this.state.facet(UX.cspNonce);Zq.mount(this.root,this.styleModules.concat(FX).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new 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){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.plugin==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 wY(this,e,yY(this,e,t,n))}moveByGroup(e,t){return wY(this,e,yY(this,e,t,(t=>function(e,t,n){let r=e.state.charCategorizer(t),o=r(n);return e=>{let t=r(e);return o==uq.Space&&(o=t),o==t}}(this,e.head,t))))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),o=n[t?n.length-1:0];return SU.cursor(o.side(t,r)+e.from,o.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let o=vY(e,t.head,t.assoc||-1),i=r&&o.type==UG.Text&&(e.lineWrapping||o.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head):null;if(i){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(o.from),a=e.posAtCoords({x:n==(r==iK.LTR)?t.right-1:t.left+1,y:(i.top+i.bottom)/2});if(null!=a)return SU.cursor(a,n?-1:1)}return SU.cursor(n?o.to:o.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return wY(this,e,function(e,t,n,r){let o=t.head,i=n?1:-1;if(o==(n?e.state.doc.length:0))return SU.cursor(o,t.assoc);let a,s=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),u=e.coordsAtPos(o,t.assoc||-1),c=e.documentTop;if(u)null==s&&(s=u.left-l.left),a=i<0?u.top:u.bottom;else{let t=e.viewState.lineBlockAt(o);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-t.from))),a=(i<0?t.top:t.bottom)+c}let d=l.left+s,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=a+(h+t)*i,r=fY(e,{x:d,y:n},!1,i);if(nl.bottom||(i<0?ro)){let t=e.docView.coordsForChar(r),o=!t||n0)}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(EK)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>qX)return wK(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||gK(r.isolates,t=QK(this,e))))return r.order;t||(t=QK(this,e));let r=xK(e.text,n,t);return this.bidiCache.push(new KX(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||nG.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{yG(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(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of 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 jK.of(new NK("number"==typeof e?SU.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 jK.of(new NK(SU.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 HK.define((()=>({})),{eventHandlers:e})}static domEventObservers(e){return HK.define((()=>({})),{eventObservers:e})}static theme(e,t){let n=Zq.newName(),r=[IX.of(n),tY.of(jX(`.${n}`,e))];return t&&t.dark&&r.push(RX.of(!0)),r}static baseTheme(e){return jU.lowest(tY.of(jX("."+EX,e,NX)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&TG.get(n)||TG.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}UX.styleModule=tY,UX.inputHandler=AK,UX.clipboardInputFilter=IK,UX.clipboardOutputFilter=RK,UX.scrollHandler=ZK,UX.focusChangeEffect=OK,UX.perLineTextDirection=EK,UX.exceptionSink=PK,UX.updateListener=DK,UX.editable=BK,UX.mouseSelectionStyle=TK,UX.dragMovesSelection=MK,UX.clickAddsSelectionRange=_K,UX.decorations=GK,UX.outerDecorations=KK,UX.atomicRanges=YK,UX.bidiIsolatedRanges=XK,UX.scrollMargins=JK,UX.darkTheme=RX,UX.cspNonce=_U.define({combine:e=>e.length?e[0]:""}),UX.contentAttributes=qK,UX.editorAttributes=UK,UX.lineWrapping=UX.contentAttributes.of({class:"cm-lineWrapping"}),UX.announce=tq.define();const qX=4096,GX={};class KX{constructor(e,t,n,r,o,i){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some((e=>e.fresh)))return e;let n=[],r=e.length?e[e.length-1].dir:iK.LTR;for(let o=Math.max(0,e.length-10);o=0;o--){let t=r[o],i="function"==typeof t?t(e):t;i&&zG(i,n)}return n}const XX=nG.mac?"mac":nG.windows?"win":nG.linux?"linux":"key";function QX(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}const JX=jU.default(UX.domEventHandlers({keydown:(e,t)=>aQ(nQ(t.state),e,t,"editor")})),eQ=_U.define({enables:JX}),tQ=new WeakMap;function nQ(e){let t=e.facet(eQ),n=tQ.get(t);return n||tQ.set(t,n=function(e,t=XX){let n=Object.create(null),r=Object.create(null),o=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},i=(e,r,i,a,s)=>{var l,u;let c=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map((e=>function(e,t){const n=e.split(/-(?!$)/);let r,o,i,a,s=n[n.length-1];"Space"==s&&(s=" ");for(let e=0;e{let r=rQ={view:t,prefix:n,scope:e};return setTimeout((()=>{rQ==r&&(rQ=null)}),oQ),!0}]})}let h=d.join(" ");o(h,!1);let p=c[h]||(c[h]={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())||[]});i&&p.run.push(i),a&&(p.preventDefault=!0),s&&(p.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:o}=r;for(let t in e)e[t].run.push((e=>o(e,iQ)))}let o=r[t]||r.key;if(o)for(let t of e)i(t,o,r.run,r.preventDefault,r.stopPropagation),r.shift&&i(t,"Shift-"+o,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce(((e,t)=>e.concat(t)),[]))),n}let rQ=null;const oQ=4e3;let iQ=null;function aQ(e,t,n,r){iQ=t;let o=function(e){var t=!(Bq&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Vq&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?zq:Fq)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(t),i=cU(lU(o,0))==o.length&&" "!=o,a="",s=!1,l=!1,u=!1;rQ&&rQ.view==n&&rQ.scope==r&&(a=rQ.prefix+" ",LY.indexOf(t.keyCode)<0&&(l=!0,rQ=null));let c,d,h=new Set,p=e=>{if(e){for(let t of e.run)if(!h.has(t)&&(h.add(t),t(n)))return e.stopPropagation&&(u=!0),!0;e.preventDefault&&(e.stopPropagation&&(u=!0),l=!0)}return!1},f=e[r];return f&&(p(f[a+QX(o,t,!i)])?s=!0:!i||!(t.altKey||t.metaKey||t.ctrlKey)||nG.windows&&t.ctrlKey&&t.altKey||nG.mac&&t.altKey&&!t.ctrlKey&&!t.metaKey||!(c=Fq[t.keyCode])||c==o?i&&t.shiftKey&&p(f[a+QX(o,t,!0)])&&(s=!0):(p(f[a+QX(c,t,!0)])||t.shiftKey&&(d=zq[t.keyCode])!=o&&d!=c&&p(f[a+QX(d,t,!1)]))&&(s=!0),!s&&p(f._any)&&(s=!0)),l&&(s=!0),s&&u&&t.stopPropagation(),iQ=null,s}class sQ{constructor(e,t,n,r,o){this.className=e,this.left=t,this.top=n,this.width=r,this.height=o}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){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let o=lQ(e);return[new sQ(t,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}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),o=Math.min(n.to,e.viewport.to),i=e.textDirection==iK.LTR,a=e.contentDOM,s=a.getBoundingClientRect(),l=lQ(e),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=s.right-(c?parseInt(c.paddingRight):0),p=vY(e,r,1),f=vY(e,o,-1),m=p.type==UG.Text?p:null,g=f.type==UG.Text?f:null;m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=uQ(e,r,1,m));g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=uQ(e,o,-1,g));if(m&&g&&m.from==g.from&&m.to==g.to)return y(b(n.from,n.to,m));{let t=m?b(n.from,null,m):x(p,!1),r=g?b(null,n.to,g):x(f,!0),o=[];return(m||p).to<(g||f).from-(m&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2u&&r.from=i)break;s>o&&l(Math.max(e,o),null==t&&e<=u,Math.min(s,i),null==n&&s>=c,a.dir)}if(o=r.to+1,o>=i)break}return 0==s.length&&l(u,null==t,c,null==n,e.textDirection),{top:o,bottom:a,horizontal:s}}function x(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function lQ(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==iK.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function uQ(e,t,n,r){let o=e.coordsAtPos(t,2*n);if(!o)return r;let i=e.dom.getBoundingClientRect(),a=(o.top+o.bottom)/2,s=e.posAtCoords({x:i.left+1,y:a}),l=e.posAtCoords({x:i.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 cQ{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(dQ)!=e.state.facet(dQ)&&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(dQ);for(;t!function(e,t){return e.constructor==t.constructor&&e.eq(t)}(e,this.drawn[t])))){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,nG.safari&&nG.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const dQ=_U.define();function hQ(e){return[HK.define((t=>new cQ(t,e))),dQ.of(e)]}const pQ=_U.define({combine:e=>fq(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function fQ(e){return e.startState.facet(pQ)!=e.state.facet(pQ)}const mQ=hQ({above:!0,markers(e){let{state:t}=e,n=t.facet(pQ),r=[];for(let o of t.selection.ranges){let i=o==t.selection.main;if(o.empty||n.drawRangeCursor){let t=i?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=o.empty?o:SU.cursor(o.head,o.head>o.anchor?-1:1);for(let o of sQ.forRange(e,t,n))r.push(o)}}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=fQ(e);return n&&gQ(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){gQ(t.state,e)},class:"cm-cursorLayer"});function gQ(e,t){t.style.animationDuration=e.facet(pQ).cursorBlinkRate+"ms"}const vQ=hQ({above:!1,markers:e=>e.state.selection.ranges.map((t=>t.empty?[]:sQ.forRange(e,"cm-selectionBackground",t))).reduce(((e,t)=>e.concat(t))),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||fQ(e),class:"cm-selectionLayer"}),yQ=jU.highest(UX.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),bQ=tq.define({map:(e,t)=>null==e?null:t.mapPos(e)}),xQ=IU.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce(((e,t)=>t.is(bQ)?t.value:e),e))}),wQ=HK.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(xQ);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(xQ)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(xQ),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(xQ)!=e&&this.view.dispatch({effects:bQ.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 SQ(e,t,n,r,o){t.lastIndex=0;for(let i,a=e.iterRange(n,r),s=n;!a.next().done;s+=a.value.length)if(!a.lineBreak)for(;i=t.exec(a.value);)o(s+i.index,i)}class kQ{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:o,maxLength:i=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,o)=>r(o,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,o)=>{let i=n(e,t,r);i&&o(r,r+e[0].length,i)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,o)=>o(r,r+e[0].length,n)}this.boundary=o,this.maxLength=i}createDeco(e){let t=new xq,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:o,to:i}of n)o=Math.max(e.state.doc.lineAt(o).from,o-t),i=Math.min(e.state.doc.lineAt(i).to,i+t),r.length&&r[r.length-1].to>=o?r[r.length-1].to=i:r.push({from:o,to:i});return r}(e,this.maxLength))SQ(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,o,i,a)=>{a>=e.view.viewport.from&&i<=e.view.viewport.to&&(n=Math.min(i,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 o of e.visibleRanges){let i=Math.max(o.from,n),a=Math.min(o.to,r);if(a>=i){let n=e.state.doc.lineAt(i),r=n.ton.from;i--)if(this.boundary.test(n.text[i-1-n.from])){s=i;break}for(;ac.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=s-n.from;(u=this.regexp.exec(n.text))&&u.indexthis.addMatch(n,e,t,d)));t=t.update({filterFrom:s,filterTo:l,filter:(e,t)=>el,add:c})}}return t}}const CQ=null!=/x/.unicode?"gu":"g",_Q=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",CQ),MQ={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"};let TQ=null;const PQ=_U.define({combine(e){let t=fq(e,{render:null,specialChars:_Q,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==TQ&&"undefined"!=typeof document&&document.body){let t=document.body.style;TQ=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return TQ||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,CQ)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,CQ)),t}});let DQ=null;class AQ extends WG{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=(n=this.code)>=32?"•":10==n?"␤":String.fromCharCode(9216+n);var n;let r=e.state.phrase("Control character")+" "+(MQ[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,r,t);if(o)return o;let i=document.createElement("span");return i.textContent=t,i.title=r,i.setAttribute("aria-label",r),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class OQ extends WG{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const IQ=qG.line({class:"cm-activeLine"}),RQ=HK.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 o=e.lineBlockAt(r.head);o.from>t&&(n.push(IQ.range(o.from)),t=o.from)}return qG.set(n)}},{decorations:e=>e.decorations});class EQ extends WG{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)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?aG(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=hG(t[0],"rtl"!=n.direction),o=parseInt(n.lineHeight);return r.bottom-r.top>1.5*o?{left:r.left,right:r.right,top:r.top,bottom:r.top+o}:r}ignoreEvent(){return!1}}const LQ=2e3;function ZQ(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),o=n-r.from,i=o>LQ?-1:o==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Oq(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:i,off:o}}function NQ(e,t){let n=ZQ(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),o=e.state.doc.lineAt(t);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},r=r.map(e.changes)}},get(t,o,i){let a=ZQ(e,t);if(!a)return r;let s=function(e,t,n){let r=Math.min(t.line,n.line),o=Math.max(t.line,n.line),i=[];if(t.off>LQ||n.off>LQ||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<=o;t++){let n=e.doc.line(t);n.length<=s&&i.push(SU.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<=o;t++){let n=e.doc.line(t),r=Iq(n.text,a,e.tabSize,!0);if(r<0)i.push(SU.cursor(n.to));else{let t=Iq(n.text,s,e.tabSize);i.push(SU.range(n.from+r,n.from+t))}}}return i}(e.state,n,a);return s.length?i?SU.create(s.concat(r.ranges)):SU.create(s):r}}:null}const jQ={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},FQ={style:"cursor: crosshair"};const zQ="-10000px";class BQ{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 o=null;this.tooltipViews=this.tooltips.map((e=>o=n(e,o)))}update(e,t){var n;let r=e.state.facet(this.facet),o=r.filter((e=>e));if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[],a=t?[]:null;for(let n=0;nt[n]=e)),t.length=a.length),this.input=r,this.tooltips=o,this.tooltipViews=i,!0}}function VQ(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}const $Q=_U.define({combine:e=>{var t,n,r;return{position:nG.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)||VQ}}}),HQ=new WeakMap,WQ=HK.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($Q);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 BQ(e,KQ,((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){this.intersectionObserver.disconnect();for(let e of 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($Q);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of 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=zQ,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;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of 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(nG.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}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(),o=eY(this.view);return{visible:{left:r.left+o.left,top:r.top+o.top,right:r.right-o.right,bottom:r.bottom-o.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($Q).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let e of this.manager.tooltipViews)e.dom.style.position="absolute"}let{visible:n,space:r,scaleX:o,scaleY:i}=e,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1)){c.style.top=zQ;continue}let p=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,f=p?7:0,m=h.right-h.left,g=null!==(t=HQ.get(u))&&void 0!==t?t:h.bottom-h.top,v=u.offset||GQ,y=this.view.textDirection==iK.LTR,b=h.width>r.right-r.left?y?r.left:r.right-h.width:y?Math.max(r.left,Math.min(d.left-(p?14:0)+v.x,r.right-m)):Math.min(Math.max(r.left,d.left-m+(p?14:0)-v.x),r.right-m),x=this.above[s];!l.strictSide&&(x?d.top-g-f-v.yr.bottom)&&x==r.bottom-d.bottom>d.top-r.top&&(x=this.above[s]=!x);let w=(x?d.top-r.top:r.bottom-d.bottom)-f;if(wb&&e.topS&&(S=x?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(c.style.top=(S-e.parent.top)/i+"px",UQ(c,(b-e.parent.left)/o)):(c.style.top=S/i+"px",UQ(c,b/o)),p){let e=d.left+(y?v.x:-v.x)-(b+14-7);p.style.left=e/o+"px"}!0!==u.overlap&&a.push({left:b,top:S,right:k,bottom:S+g}),c.classList.toggle("cm-tooltip-above",x),c.classList.toggle("cm-tooltip-below",!x),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=zQ}},{eventObservers:{scroll(){this.maybeMeasure()}}});function UQ(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}const qQ=UX.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"}}}),GQ={x:0,y:0},KQ=_U.define({enables:[WQ,qQ]}),YQ=_U.define({combine:e=>e.reduce(((e,t)=>e.concat(t)),[])});class XQ{static create(e){return new XQ(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new BQ(e,YQ,((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")}}const QQ=KQ.compute([YQ],(e=>{let t=e.facet(YQ);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:XQ.create,above:t[0].above,arrow:t.some((e=>e.arrow))}}));class JQ{constructor(e,t,n,r,o){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=o,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;en.bottom||t.xn.right+e.defaultCharacterWidth)return;let i=e.bidiSpans(e.state.doc.lineAt(r)).find((e=>e.from<=r&&e.to>=r)),a=i&&i.dir==iK.RTL?-1:1;o=t.x{this.pending==t&&(this.pending=null,!n||Array.isArray(n)&&!n.length||e.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(t=>zK(e.state,t,"hover tooltip")))}else!i||Array.isArray(i)&&!i.length||e.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])})}get tooltip(){let e=this.view.plugin(WQ),t=e?e.manager.tooltips.findIndex((e=>e.create==XQ.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:o}=this;if(r.length&&o&&!function(e,t){let n,{left:r,right:o,top:i,bottom:a}=e.getBoundingClientRect();if(n=e.querySelector(".cm-tooltip-arrow")){let e=n.getBoundingClientRect();i=Math.min(e.top,i),a=Math.max(e.bottom,a)}return t.clientX>=r-eJ&&t.clientX<=o+eJ&&t.clientY>=i-eJ&&t.clientY<=a+eJ}(o.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,i=null!==(n=null===(t=r[0])||void 0===t?void 0:t.end)&&void 0!==n?n:o;(o==i?this.view.posAtCoords(this.lastMove)==o:function(e,t,n,r,o){let i=e.scrollDOM.getBoundingClientRect(),a=e.documentTop+e.documentPadding.top+e.contentHeight;if(i.left>r||i.righto||Math.min(i.bottom,a)=t&&s<=n}(this.view,o,i,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)}}const eJ=4;function tJ(e,t={}){let n=tq.define(),r=IU.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,hU.TrackDel);if(null!=e){let o=Object.assign(Object.create(null),n);o.pos=e,null!=o.end&&(o.end=r.changes.mapPos(o.end)),t.push(o)}}e=t}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(rJ)&&(e=[]);return e},provide:e=>YQ.from(e)});return{active:r,extension:[r,HK.define((o=>new JQ(o,e,r,n,t.hoverTime||300))),QQ]}}function nJ(e,t){let n=e.plugin(WQ);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const rJ=tq.define();const oJ=_U.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 iJ(e,t){let n=e.plugin(aJ),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const aJ=HK.fromClass(class{constructor(e){this.input=e.state.facet(uJ),this.specs=this.input.filter((e=>e)),this.panels=this.specs.map((t=>t(e)));let t=e.state.facet(oJ);this.top=new sJ(e,!0,t.topContainer),this.bottom=new sJ(e,!1,t.bottomContainer),this.top.sync(this.panels.filter((e=>e.top))),this.bottom.sync(this.panels.filter((e=>!e.top)));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(oJ);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new sJ(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new sJ(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(uJ);if(n!=this.input){let t=n.filter((e=>e)),r=[],o=[],i=[],a=[];for(let n of t){let t,s=this.specs.indexOf(n);s<0?(t=n(e.view),a.push(t)):(t=this.panels[s],t.update&&t.update(e)),r.push(t),(t.top?o:i).push(t)}this.specs=t,this.panels=r,this.top.sync(o),this.bottom.sync(i);for(let e of 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=>UX.scrollMargins.of((t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class sJ{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&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));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=lJ(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=lJ(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 lJ(e){let t=e.nextSibling;return e.remove(),t}const uJ=_U.define({enables:aJ});class cJ extends mq{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}cJ.prototype.elementClass="",cJ.prototype.toDOM=void 0,cJ.prototype.mapMode=hU.TrackBefore,cJ.prototype.startSide=cJ.prototype.endSide=-1,cJ.prototype.point=!0;const dJ=_U.define(),hJ=_U.define(),pJ={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>bq.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},fJ=_U.define();function mJ(e){return[vJ(),fJ.of({...pJ,...e})]}const gJ=_U.define({combine:e=>e.some((e=>e))});function vJ(e){let t=[yJ];return e&&!1===e.fixed&&t.push(gJ.of(!0)),t}const yJ=HK.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(fJ).map((t=>new SJ(e,t))),this.fixed=!e.state.facet(gJ);for(let e of this.gutters)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}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<.8*(n.to-n.from))}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(gJ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=bq.iter(this.view.state.facet(dJ),this.view.viewport.from),r=[],o=this.gutters.map((e=>new wJ(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 i of e.type)if(i.type==UG.Text&&t){xJ(n,r,i.from);for(let e of o)e.line(this.view,i,r);t=!1}else if(i.widget)for(let e of o)e.widget(this.view,i)}else if(e.type==UG.Text){xJ(n,r,e.from);for(let t of o)t.line(this.view,e,r)}else if(e.widget)for(let t of o)t.widget(this.view,e);for(let e of o)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(fJ),n=e.state.facet(fJ),r=e.docChanged||e.heightChanged||e.viewportChanged||!bq.eq(e.startState.facet(dJ),e.state.facet(dJ),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 o=[];for(let r of n){let n=t.indexOf(r);n<0?o.push(new SJ(this.view,r)):(this.gutters[n].update(e),o.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),o.indexOf(e)<0&&e.destroy();for(let e of o)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=o}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>UX.scrollMargins.of((t=>{let n=t.plugin(e);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,o=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==iK.LTR?{left:r,right:o}:{right:r,left:o}}))});function bJ(e){return Array.isArray(e)?e:[e]}function xJ(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class wJ{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=bq.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,o=(t.top-this.height)/e.scaleY,i=t.height/e.scaleY;if(this.i==r.elements.length){let t=new kJ(e,i,o,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,i,o,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];xJ(this.cursor,r,t.from),n.length&&(r=r.concat(n));let o=this.gutter.config.lineMarker(e,t,r);o&&r.unshift(o);let i=this.gutter;(0!=r.length||i.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(hJ)){let o=n(e,t.widget,t);o&&(r||(r=[])).push(o)}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 SJ{constructor(e,t){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:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,(r=>{let o,i=r.target;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=bJ(t.markers(e)),t.initialSpacer&&(this.spacer=new kJ(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=bJ(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!bq.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 kJ{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;nfq(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],o=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||o(e,t,n):o}return n}})});class TJ extends cJ{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function PJ(e,t){return e.state.facet(MJ).formatNumber(t,e.state)}const DJ=fJ.compute([MJ],(e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(CJ),lineMarker:(e,t,n)=>n.some((e=>e.toDOM))?null:new TJ(PJ(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(_J)){let o=r(e,t,n);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(MJ)!=e.state.facet(MJ),initialSpacer:e=>new TJ(PJ(e,AJ(e.state.doc.lines))),updateSpacer(e,t){let n=PJ(t.view,AJ(t.view.state.doc.lines));return n==e.number?e:new TJ(n)},domEventHandlers:e.facet(MJ).domEventHandlers,side:"before"})));function AJ(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.head).from;o>n&&(n=o,t.push(OJ.range(o)))}return bq.of(t)}));const RJ=1024;let EJ=0;class LJ{constructor(e,t){this.from=e,this.to=t}}class ZJ{constructor(e={}){this.id=EJ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=FJ.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}ZJ.closedBy=new ZJ({deserialize:e=>e.split(" ")}),ZJ.openedBy=new ZJ({deserialize:e=>e.split(" ")}),ZJ.group=new ZJ({deserialize:e=>e.split(" ")}),ZJ.isolate=new ZJ({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw new RangeError("Invalid value for isolate: "+e);return e||"auto"}}),ZJ.contextHash=new ZJ({perNode:!0}),ZJ.lookAhead=new ZJ({perNode:!0}),ZJ.mounted=new ZJ({perNode:!0});class NJ{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[ZJ.mounted.id]}}const jJ=Object.create(null);class FJ{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):jJ,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new FJ(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 new 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(ZJ.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(ZJ.group),r=-1;r<(n?n.length:0);r++){let o=t[r<0?e.name:n[r]];if(o)return o}}}}FJ.none=new FJ("",Object.create(null),0,8);class zJ{constructor(e){this.types=e;for(let t=0;t=t){let a=new XJ(i.tree,i.overlay[0].from+e.from,-1,e);(o||(o=[r])).push(KJ(a,t,n,!1))}}return o?n0(o):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:o=this.length}=e,i=e.mode||0,a=(i&$J.IncludeAnonymous)>0;for(let e=this.cursor(i|$J.IncludeAnonymous);;){let i=!1;if(e.from<=o&&e.to>=r&&(!a&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&n&&(a||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;i=!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:l0(FJ.none,this.children,this.positions,0,this.children.length,0,this.length,((e,t,n)=>new WJ(this.type,e,t,n,this.propValues)),e.makeTree||((e,t,n)=>new WJ(FJ.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:o=RJ,reused:i=[],minRepeatType:a=r.types.length}=e,s=Array.isArray(n)?new UJ(n,n.length):n,l=r.types,u=0,c=0;function d(e,t,n,y,b,x){let{id:w,start:S,end:k,size:C}=s,_=c,M=u;if(C<0){if(s.next(),-1==C){let t=i[w];return n.push(t),void y.push(S-e)}if(-3==C)return void(u=w);if(-4==C)return void(c=w);throw new RangeError(`Unrecognized record size: ${C}`)}let T,P,D=l[w],A=S-e;if(k-S<=o&&(P=g(s.pos-t,b))){let t=new Uint16Array(P.size-P.skip),n=s.pos-P.size,o=t.length;for(;s.pos>n;)o=v(P.start,t,o);T=new qJ(t,k-P.start,r),A=P.start-e}else{let e=s.pos-C;s.next();let t=[],n=[],r=w>=a?w:-1,i=0,l=k;for(;s.pos>e;)r>=0&&s.id==r&&s.size>=0?(s.end<=l-o&&(f(t,n,S,i,s.end,l,r,_,M),i=t.length,l=s.end),s.next()):x>2500?h(S,e,t,n):d(S,e,t,n,r,x+1);if(r>=0&&i>0&&i-1&&i>0){let e=p(D,M);T=l0(D,t,n,0,t.length,0,k-S,e,e)}else T=m(D,t,n,k-S,_-k,M)}n.push(T),y.push(A)}function h(e,t,n,i){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=0;e-=3)t[n++]=a[e],t[n++]=a[e+1]-o,t[n++]=a[e+2]-o,t[n++]=n;n.push(new qJ(t,a[2]-o,r)),i.push(o-e)}}function p(e,t){return(n,r,o)=>{let i,a,s=0,l=n.length-1;if(l>=0&&(i=n[l])instanceof WJ){if(!l&&i.type==e&&i.length==o)return i;(a=i.prop(ZJ.lookAhead))&&(s=r[l]+i.length+a)}return m(e,n,r,o,s,t)}}function f(e,t,n,o,i,a,s,l,u){let c=[],d=[];for(;e.length>o;)c.push(e.pop()),d.push(t.pop()+n-i);e.push(m(r.types[s],c,d,a-i,l-a,u)),t.push(i-n)}function m(e,t,n,r,o,i,a){if(i){let e=[ZJ.contextHash,i];a=a?[e].concat(a):[e]}if(o>25){let e=[ZJ.lookAhead,o];a=a?[e].concat(a):[e]}return new WJ(e,t,n,r,a)}function g(e,t){let n=s.fork(),r=0,i=0,l=0,u=n.end-o,c={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){c.size=r,c.start=i,c.skip=l,l+=4,r+=4,n.next();continue}let s=n.pos-e;if(e<0||s=a?4:0,h=n.start;for(n.next();n.pos>s;){if(n.size<0){if(-3!=n.size&&-4!=n.size)break e;d+=4}else n.id>=a&&(d+=4);n.next()}i=h,r+=e,l+=d}return(t<0||r==e)&&(c.size=r,c.start=i,c.skip=l),c.size>4?c:void 0}function v(e,t,n){let{id:r,start:o,end:i,size:l}=s;if(s.next(),l>=0&&r4){let r=s.pos-(l-4);for(;s.pos>r;)n=v(e,t,n)}t[--n]=a,t[--n]=i-e,t[--n]=o-e,t[--n]=r}else-3==l?u=r:-4==l&&(c=r);return n}let y=[],b=[];for(;s.pos>0;)d(e.start||0,e.bufferStart||0,y,b,-1,0);let x=null!==(t=e.length)&&void 0!==t?t:y.length?b[0]+y[0].length:0;return new WJ(l[e.topID],y.reverse(),b.reverse(),x)}(e)}}WJ.empty=new WJ(FJ.none,[],[],0);class UJ{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 UJ(this.buffer,this.index)}}class qJ{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return FJ.none}toString(){let e=[];for(let t=0;t0));s=i[s+3]);return a}slice(e,t,n){let r=this.buffer,o=new Uint16Array(t-e),i=0;for(let a=e,s=0;a=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function KJ(e,t,n,r){for(var o;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?a.length:-1;e!=l;e+=t){let l=a[e],u=s[e]+i.from;if(GJ(r,n,u,u+l.length))if(l instanceof qJ){if(o&$J.ExcludeBuffers)continue;let a=l.findChild(0,l.buffer.length,t,n-u,r);if(a>-1)return new t0(new e0(i,l,e,u),null,a)}else if(o&$J.IncludeAnonymous||!l.type.isAnonymous||i0(l)){let a;if(!(o&$J.IgnoreMounts)&&(a=NJ.get(l))&&!a.overlay)return new XJ(a.tree,u,e,i);let s=new XJ(l,u,e,i);return o&$J.IncludeAnonymous||!s.type.isAnonymous?s:s.nextChild(t<0?l.children.length-1:0,t,n,r)}}if(o&$J.IncludeAnonymous||!i.type.isAnonymous)return null;if(e=i.index>=0?i.index+t:t<0?-1:i._parent._tree.children.length,i=i._parent,!i)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)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let r;if(!(n&$J.IgnoreOverlays)&&(r=NJ.get(this._tree))&&r.overlay){let n=e-this.from;for(let{from:e,to:o}of r.overlay)if((t>0?e<=n:e=n:o>n))return new XJ(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 QJ(e,t,n,r){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(null!=n)for(let e=!1;!e;)if(e=o.type.is(n),!o.nextSibling())return i;for(;;){if(null!=r&&o.type.is(r))return i;if(o.type.is(t)&&i.push(o.node),!o.nextSibling())return null==r?i:[]}}function JJ(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 e0{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class t0 extends YJ{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,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new t0(this.context,this,o)}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)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&$J.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new t0(this.context,this,o)}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 t0(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 t0(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,o=n.buffer[this.index+3];if(o>r){let i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),t.push(0)}return new WJ(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function n0(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;rn.from||o.to0){if(this.index-1)for(let r=t+e,o=e<0?-1:n._tree.children.length;r!=o;r+=e){let e=n._tree.children[r];if(this.mode&$J.IncludeAnonymous||e instanceof qJ||!e.type.isAnonymous||i0(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=0;){for(let i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}for(let e=n;e=0;o--){if(o<0)return JJ(this._tree,e,r);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}}function i0(e){return e.children.some((e=>e instanceof qJ||!e.type.isAnonymous||i0(e)))}const a0=new WeakMap;function s0(e,t){if(!e.isAnonymous||t instanceof qJ||t.type!=e)return 1;let n=a0.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof WJ)){n=1;break}n+=s0(e,r)}a0.set(t,n)}return n}function l0(e,t,n,r,o,i,a,s,l){let u=0;for(let n=r;n=c)break;f+=t}if(u==o+1){if(f>c){let e=n[o];t(e.children,e.positions,0,e.children.length,r[o]+s);continue}d.push(n[o])}else{let t=r[u-1]+n[u-1].length-p;d.push(l0(e,n,r,o,u,p,t,null,l))}h.push(p+s-i)}}(t,n,r,o,0),(s||l)(d,h,a)}class u0{constructor(e,t,n,r,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(o?1:0)|(i?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new u0(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=[],o=1,i=e.length?e[0]:null;for(let a=0,s=0,l=0;;a++){let u=a=n)for(;i&&i.from=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 u0(e,n,t.tree,t.offset+l,a>0,!!u)}if(t&&r.push(t),i.to>c)break;i=onew LJ(e.from,e.to))):[new LJ(0,0)]:[new LJ(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 d0{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 ZJ({perNode:!0});let h0=0;class p0{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=h0++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n="string"==typeof e?e:"?";if(e instanceof p0&&(t=e),null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let r=new p0(n,[],null,[]);if(r.set.push(r),t)for(let e of t.set)r.set.push(e);return r}static defineModifier(e){let t=new m0(e);return e=>e.modified.indexOf(t)>-1?e:m0.get(e.base||e,e.modified.concat(t).sort(((e,t)=>e.id-t.id)))}}let f0=0;class m0{constructor(e){this.name=e,this.instances=[],this.id=f0++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((n=>n.base==e&&function(e,t){return e.length==t.length&&e.every(((e,n)=>e==t[n]))}(t,n.modified)));if(n)return n;let r=[],o=new p0(e.name,r,e,t);for(let e of t)e.instances.push(o);let i=function(e){let t=[[]];for(let n=0;nt.length-e.length))}(t);for(let t of e.set)if(!t.modified.length)for(let e of i)r.push(m0.get(t,e));return o}}function g0(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],o=2,i=e;for(let t=0;;){if("..."==i&&t>0&&t+3==e.length){o=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(i);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let a=e[t++];if(t==e.length&&"!"==a){o=0;break}if("/"!=a)throw new RangeError("Invalid path: "+e);i=e.slice(t)}let a=n.length-1,s=n[a];if(!s)throw new RangeError("Invalid path: "+e);let l=new y0(r,o,a>0?n.slice(0,a):null);t[s]=l.sort(t[s])}}return v0.add(t)}const v0=new ZJ({combine(e,t){let n,r,o;for(;e||t;){if(!e||t&&e.depth>=t.depth?(o=t,t=t.next):(o=e,e=e.next),n&&n.mode==o.mode&&!o.context&&!n.context)continue;let i=new y0(o.tags,o.mode,o.context);n?n.next=i:r=i,n=i}return r}});class y0{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{let t=o;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}}function x0(e,t,n,r=0,o=e.length){let i=new w0(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}y0.empty=new y0([],2,null);class w0{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,o){let{type:i,from:a,to:s}=e;if(a>=n||s<=t)return;i.isTop&&(o=this.highlighters.filter((e=>!e.scope||e.scope(i))));let l=r,u=function(e){let t=e.type.prop(v0);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||y0.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}(o,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 d=e.tree&&e.tree.prop(ZJ.mounted);if(d&&d.overlay){let i=e.node.enter(d.overlay[0].from+a,1),u=this.highlighters.filter((e=>!e.scope||e.scope(d.tree.type))),c=e.firstChild();for(let h=0,p=a;;h++){let f=h=m)&&e.nextSibling()););if(!f||m>n)break;p=f.to+a,p>t&&(this.highlightRange(i.cursor(),Math.max(t,f.from+a),Math.min(n,p),"",u),this.startSpan(Math.min(n,p),l))}c&&e.parent()}else if(e.firstChild()){d&&(r="");do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const S0=p0.define,k0=S0(),C0=S0(),_0=S0(C0),M0=S0(C0),T0=S0(),P0=S0(T0),D0=S0(T0),A0=S0(),O0=S0(A0),I0=S0(),R0=S0(),E0=S0(),L0=S0(E0),Z0=S0(),N0={comment:k0,lineComment:S0(k0),blockComment:S0(k0),docComment:S0(k0),name:C0,variableName:S0(C0),typeName:_0,tagName:S0(_0),propertyName:M0,attributeName:S0(M0),className:S0(C0),labelName:S0(C0),namespace:S0(C0),macroName:S0(C0),literal:T0,string:P0,docString:S0(P0),character:S0(P0),attributeValue:S0(P0),number:D0,integer:S0(D0),float:S0(D0),bool:S0(T0),regexp:S0(T0),escape:S0(T0),color:S0(T0),url:S0(T0),keyword:I0,self:S0(I0),null:S0(I0),atom:S0(I0),unit:S0(I0),modifier:S0(I0),operatorKeyword:S0(I0),controlKeyword:S0(I0),definitionKeyword:S0(I0),moduleKeyword:S0(I0),operator:R0,derefOperator:S0(R0),arithmeticOperator:S0(R0),logicOperator:S0(R0),bitwiseOperator:S0(R0),compareOperator:S0(R0),updateOperator:S0(R0),definitionOperator:S0(R0),typeOperator:S0(R0),controlOperator:S0(R0),punctuation:E0,separator:S0(E0),bracket:L0,angleBracket:S0(L0),squareBracket:S0(L0),paren:S0(L0),brace:S0(L0),content:A0,heading:O0,heading1:S0(O0),heading2:S0(O0),heading3:S0(O0),heading4:S0(O0),heading5:S0(O0),heading6:S0(O0),contentSeparator:S0(A0),list:S0(A0),quote:S0(A0),emphasis:S0(A0),strong:S0(A0),link:S0(A0),monospace:S0(A0),strikethrough:S0(A0),inserted:S0(),deleted:S0(),changed:S0(),invalid:S0(),meta:Z0,documentMeta:S0(Z0),annotation:S0(Z0),processingInstruction:S0(Z0),definition:p0.defineModifier("definition"),constant:p0.defineModifier("constant"),function:p0.defineModifier("function"),standard:p0.defineModifier("standard"),local:p0.defineModifier("local"),special:p0.defineModifier("special")};for(let e in N0){let t=N0[e];t instanceof p0&&(t.name=e)}b0([{tag:N0.link,class:"tok-link"},{tag:N0.heading,class:"tok-heading"},{tag:N0.emphasis,class:"tok-emphasis"},{tag:N0.strong,class:"tok-strong"},{tag:N0.keyword,class:"tok-keyword"},{tag:N0.atom,class:"tok-atom"},{tag:N0.bool,class:"tok-bool"},{tag:N0.url,class:"tok-url"},{tag:N0.labelName,class:"tok-labelName"},{tag:N0.inserted,class:"tok-inserted"},{tag:N0.deleted,class:"tok-deleted"},{tag:N0.literal,class:"tok-literal"},{tag:N0.string,class:"tok-string"},{tag:N0.number,class:"tok-number"},{tag:[N0.regexp,N0.escape,N0.special(N0.string)],class:"tok-string2"},{tag:N0.variableName,class:"tok-variableName"},{tag:N0.local(N0.variableName),class:"tok-variableName tok-local"},{tag:N0.definition(N0.variableName),class:"tok-variableName tok-definition"},{tag:N0.special(N0.variableName),class:"tok-variableName2"},{tag:N0.definition(N0.propertyName),class:"tok-propertyName tok-definition"},{tag:N0.typeName,class:"tok-typeName"},{tag:N0.namespace,class:"tok-namespace"},{tag:N0.className,class:"tok-className"},{tag:N0.macroName,class:"tok-macroName"},{tag:N0.propertyName,class:"tok-propertyName"},{tag:N0.operator,class:"tok-operator"},{tag:N0.comment,class:"tok-comment"},{tag:N0.meta,class:"tok-meta"},{tag:N0.invalid,class:"tok-invalid"},{tag:N0.punctuation,class:"tok-punctuation"}]);var j0;const F0=new ZJ;function z0(e){return _U.define({combine:e?t=>t.concat(e):void 0})}const B0=new ZJ;class V0{constructor(e,t,n=[],r=""){this.data=e,this.name=r,pq.prototype.hasOwnProperty("tree")||Object.defineProperty(pq.prototype,"tree",{get(){return W0(this)}}),this.parser=t,this.extension=[e1.of(this),pq.languageData.of(((e,t,n)=>{let r=$0(e,t,n),o=r.type.prop(F0);if(!o)return[];let i=e.facet(o),a=r.type.prop(B0);if(a){let o=r.resolve(t-r.from,n);for(let t of a)if(t.test(o,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(i)}}return i}))].concat(n)}isActiveAt(e,t,n=-1){return $0(e,t,n).type.prop(F0)==this.data}findRegions(e){let t=e.facet(e1);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(F0)==this.data)return void n.push({from:t,to:t+e.length});let o=e.prop(ZJ.mounted);if(o){if(o.tree.prop(F0)==this.data){if(o.overlay)for(let e of o.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(o.overlay){let e=n.length;if(r(o.tree,o.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0))]}),e.name)}configure(e,t){return new H0(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function W0(e){let t=e.field(V0.state,!1);return t?t.tree:WJ.empty}class U0{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=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let q0=null;class G0{constructor(e,t,n=[],r,o,i,a,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=o,this.viewport=i,this.skipped=a,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new G0(e,t,[],WJ.empty,0,n,[],null)}startParse(){return this.parser.startParse(new U0(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=WJ.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.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(u0.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=q0;q0=this;try{return e()}finally{q0=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=K0(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:o,viewport:i,skipped:a}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges(((e,n,r,o)=>t.push({fromA:e,toA:n,fromB:r,toB:o}))),n=u0.applyChanges(n,t),r=WJ.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){a=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=K0(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 c0{createParse(t,n,r){let o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,advance(){let t=q0;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=i,new WJ(FJ.none,[],[],i-o)},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 q0}}function K0(e,t,n){return u0.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class Y0{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 Y0(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=G0.create(e.facet(e1).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Y0(n)}}V0.state=IU.define({create:Y0.init,update(e,t){for(let e of t.effects)if(e.is(V0.setState))return e.value;return t.startState.facet(e1)!=t.state.facet(e1)?Y0.init(t.state):e.apply(t)}});let X0=e=>{let t=setTimeout((()=>e()),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(X0=e=>{let t=-1,n=setTimeout((()=>{t=requestIdleCallback(e,{timeout:400})}),100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const Q0="undefined"!=typeof navigator&&(null===(j0=navigator.scheduling)||void 0===j0?void 0:j0.isInputPending)?()=>navigator.scheduling.isInputPending():null,J0=HK.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(V0.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(V0.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=X0(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,s=o.context.work((()=>Q0&&Q0()||Date.now()>i),r+(a?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:V0.setState.of(new Y0(o.context))})),this.chunkBudget>0&&(!s||a)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then((()=>this.scheduleWork())).catch((e=>zK(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()}}}),e1=_U.define({combine:e=>e.length?e[0]:null,enables:e=>[V0.state,J0,UX.contentAttributes.compute([e],(t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}}))]});class t1{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const n1=_U.define(),r1=_U.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 new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function o1(e){let t=e.facet(r1);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function i1(e,t){let n="",r=e.tabSize,o=e.facet(r1)[0];if("\t"==o){for(;t>=r;)n+="\t",t-=r;o=" "}for(let e=0;e=t?function(e,t,n){let r=t.resolveStack(n),o=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(o!=r.node){let e=[];for(let t=o;t&&!(t.fromr.node.to||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 u1(r,e,n)}(e,n,t):null}class s1{constructor(e,t={}){this.state=e,this.options=t,this.unit=o1(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return null!=r&&r>=n.from&&r<=n.to?o&&r==e?{text:"",from:e}:(t<0?r-1&&(o+=i-this.countColumn(n,n.search(/\S|$/))),o}countColumn(e,t=e.length){return Oq(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let e=o(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const l1=new ZJ;function u1(e,t,n){for(let r=e;r;r=r.next){let e=c1(r.node);if(e)return e(h1.create(t,n,r))}return 0}function c1(e){let t=e.type.prop(l1);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(ZJ.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>f1(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?d1:null}function d1(){return 0}class h1 extends s1{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 h1(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(p1(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return u1(this.context.next,this.base,this.pos)}}function p1(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function f1(e,t,n,r,o){let i=e.textAfter,a=i.match(/^\s*/)[0].length,s=r&&i.slice(a,a+r.length)==r||o==e.pos+a,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),a=null==o||o<=i.from?i.to:Math.min(i.to,o);for(let e=n.to;;){let o=t.childAfter(e);if(!o||o==r)return null;if(!o.type.isSkipped){if(o.from>=a)return null;let e=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+e}}e=o.to}}(e):null;return l?s?e.column(l.from):e.column(l.to):e.baseIndent+(s?0:e.unit*n)}function m1({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const g1=_U.define(),v1=new ZJ;function y1(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function b1(e,t,n){for(let r of e.facet(g1)){let o=r(e,t,n);if(o)return o}return function(e,t,n){let r=W0(e);if(r.lengthn)continue;if(o&&a.from=t&&r.to>n&&(o=r)}}return o}(e,t,n)}function x1(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const w1=tq.define({map:x1}),S1=tq.define({map:x1});function k1(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}const C1=IU.define({create:()=>qG.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges(((t,n)=>e=_1(e,t,n))),e=e.map(t.changes);for(let n of t.effects)if(n.is(w1)&&!T1(e,n.value.from,n.value.to)){let{preparePlaceholder:r}=t.state.facet(I1),o=r?qG.replace({widget:new Z1(r(t.state,n.value))}):L1;e=e.update({add:[o.range(n.value.from,n.value.to)]})}else n.is(S1)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));return t.selection&&(e=_1(e,t.selection.main.head)),e},provide:e=>UX.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 new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{et&&(r=!0)})),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function M1(e,t,n){var r;let o=null;return null===(r=e.field(C1,!1))||void 0===r||r.between(t,n,((e,t)=>{(!o||o.from>e)&&(o={from:e,to:t})})),o}function T1(e,t,n){let r=!1;return e.between(t,t,((e,o)=>{e==t&&o==n&&(r=!0)})),r}function P1(e,t){return e.field(C1,!1)?t:t.concat(tq.appendConfig.of(R1()))}function D1(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,o=e.state.doc.lineAt(t.to).number;return UX.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${o}.`)}const A1=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of k1(e)){let n=b1(e.state,t.from,t.to);if(n)return e.dispatch({effects:P1(e.state,[w1.of(n),D1(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(C1,!1))return!1;let t=[];for(let n of k1(e)){let r=M1(e.state,n.from,n.to);r&&t.push(S1.of(r),D1(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{let t=e.state.field(C1,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,((e,t)=>{n.push(S1.of({from:e,to:t}))})),e.dispatch({effects:n}),!0}}],O1={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},I1=_U.define({combine:e=>fq(e,O1)});function R1(e){let t=[C1,F1];return e&&t.push(I1.of(e)),t}function E1(e,t){let{state:n}=e,r=n.facet(I1),o=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=M1(e.state,n.from,n.to);r&&e.dispatch({effects:S1.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,o,t);let i=document.createElement("span");return i.textContent=r.placeholderText,i.setAttribute("aria-label",n.phrase("folded code")),i.title=n.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=o,i}const L1=qG.replace({widget:new class extends WG{toDOM(e){return E1(e,null)}}});class Z1 extends WG{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return E1(e,this.value)}}const N1={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class j1 extends cJ{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}}const F1=UX.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 z1{constructor(e,t){let n;function r(e){let t=Zq.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const o="string"==typeof t.all?t.all:t.all?r(t.all):void 0,i=t.scope;this.scope=i instanceof V0?e=>e.prop(F0)==i.data:i?e=>e==i:void 0,this.style=b0(e.map((e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))}))),{all:o}).style,this.module=n?new Zq(n):null,this.themeType=t.themeType}static define(e,t){return new z1(e,t||{})}}const B1=_U.define(),V1=_U.define({combine:e=>e.length?[e[0]]:null});function $1(e){let t=e.facet(B1);return t.length?t:e.facet(V1)}function H1(e,t){let n,r=[U1];return e instanceof z1&&(e.module&&r.push(UX.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push(V1.of(e)):n?r.push(B1.computeN([UX.darkTheme],(t=>t.facet(UX.darkTheme)==("dark"==n)?[e]:[]))):r.push(B1.of(e)),r}class W1{constructor(e){this.markCache=Object.create(null),this.tree=W0(e.state),this.decorations=this.buildDeco(e,$1(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=W0(e.state),n=$1(e.state),r=n!=$1(e.startState),{viewport:o}=e.view,i=e.changes.mapPos(this.decoratedTo,1);t.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=i):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to)}buildDeco(e,t){if(!t||!this.tree.length)return qG.none;let n=new xq;for(let{from:r,to:o}of e.visibleRanges)x0(this.tree,t,((e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=qG.mark({class:r})))}),r,o);return n.finish()}}const U1=jU.high(HK.fromClass(W1,{decorations:e=>e.decorations})),q1=z1.define([{tag:N0.meta,color:"#404740"},{tag:N0.link,textDecoration:"underline"},{tag:N0.heading,textDecoration:"underline",fontWeight:"bold"},{tag:N0.emphasis,fontStyle:"italic"},{tag:N0.strong,fontWeight:"bold"},{tag:N0.strikethrough,textDecoration:"line-through"},{tag:N0.keyword,color:"#708"},{tag:[N0.atom,N0.bool,N0.url,N0.contentSeparator,N0.labelName],color:"#219"},{tag:[N0.literal,N0.inserted],color:"#164"},{tag:[N0.string,N0.deleted],color:"#a11"},{tag:[N0.regexp,N0.escape,N0.special(N0.string)],color:"#e40"},{tag:N0.definition(N0.variableName),color:"#00f"},{tag:N0.local(N0.variableName),color:"#30a"},{tag:[N0.typeName,N0.namespace],color:"#085"},{tag:N0.className,color:"#167"},{tag:[N0.special(N0.variableName),N0.macroName],color:"#256"},{tag:N0.definition(N0.propertyName),color:"#00c"},{tag:N0.comment,color:"#940"},{tag:N0.invalid,color:"#f00"}]),G1=UX.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),K1="()[]{}",Y1=_U.define({combine:e=>fq(e,{afterCursor:!0,brackets:K1,maxScanDistance:1e4,renderMatch:J1})}),X1=qG.mark({class:"cm-matchingBracket"}),Q1=qG.mark({class:"cm-nonmatchingBracket"});function J1(e){let t=[],n=e.matched?X1:Q1;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const e2=[IU.define({create:()=>qG.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(Y1);for(let e of t.state.selection.ranges){if(!e.empty)continue;let o=o2(t.state,e.head,-1,r)||e.head>0&&o2(t.state,e.head-1,1,r)||r.afterCursor&&(o2(t.state,e.head,1,r)||e.headUX.decorations.from(e)}),G1];const t2=new ZJ;function n2(e,t,n){let r=e.prop(t<0?ZJ.openedBy:ZJ.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function r2(e){let t=e.type.prop(t2);return t?t(e.node):e}function o2(e,t,n,r={}){let o=r.maxScanDistance||1e4,i=r.brackets||K1,a=W0(e),s=a.resolveInner(t,n);for(let r=s;r;r=r.parent){let o=n2(r.type,n,i);if(o&&r.from0?t>=a.from&&ta.from&&t<=a.to))return i2(e,t,n,r,a,o,i)}}return function(e,t,n,r,o,i,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),d=0;for(let e=0;!c.next().done&&e<=i;){let i=c.value;n<0&&(e+=i.length);let s=t+e*n;for(let e=n>0?0:i.length-1,t=n>0?i.length:-1;e!=t;e+=n){let t=a.indexOf(i[e]);if(!(t<0||r.resolveInner(s+e,1).type!=o))if(t%2==0==n>0)d++;else{if(1==d)return{start:u,end:{from:s+e,to:s+e+1},matched:t>>1==l>>1};d--}}n>0&&(e+=i.length)}return c.done?{start:u,matched:!1}:null}(e,t,n,a,s.type,o,i)}function i2(e,t,n,r,o,i,a){let s=r.parent,l={from:o.from,to:o.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&&i.indexOf(c.type.name)>-1&&c.from-1||(l2.push(e),console.warn(t))}function h2(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||N0[n];r?"function"==typeof r?t.length?t=t.map(r):d2(n,`Modifier ${n} used at start of tag`):t.length?d2(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:d2(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),o=r+" "+n.map((e=>e.id)),i=u2[o];if(i)return i.id;let a=u2[o]=FJ.define({id:s2.length,name:r,props:[g0({[r]:n})]});return s2.push(a),a.id}iK.RTL,iK.LTR;function p2(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);return!!o&&(r(n.update(o)),!0)}}const f2=p2(x2,0),m2=p2(b2,0),g2=p2(((e,t)=>b2(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to);o.from>r.from&&o.from==n.to&&(o=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let i=t.length-1;i>=0&&t[i].to>r.from?t[i].to=o.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}(t))),0);function v2(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}const y2=50;function b2(e,t,n=t.selection.ranges){let r=n.map((e=>v2(t,e.from).block));if(!r.every((e=>e)))return null;let o=n.map(((e,n)=>function(e,{open:t,close:n},r,o){let i,a,s=e.sliceDoc(r-y2,r),l=e.sliceDoc(o,o+y2),u=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(l)[0].length,d=s.length-u;if(s.slice(d-t.length,d)==t&&l.slice(c,c+n.length)==n)return{open:{pos:r-u,margin:u&&1},close:{pos:o+c,margin:c&&1}};o-r<=2*y2?i=a=e.sliceDoc(r,o):(i=e.sliceDoc(r,r+y2),a=e.sliceDoc(o-y2,o));let h=/^\s*/.exec(i)[0].length,p=/\s*$/.exec(a)[0].length,f=a.length-p-n.length;return i.slice(h,h+t.length)==t&&a.slice(f,f+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(i.charAt(h+t.length))?1:0},close:{pos:o-p-n.length,margin:/\s/.test(a.charAt(f-1))?1:0}}:null}(t,r[n],e.from,e.to)));if(2!=e&&!o.every((e=>e)))return{changes:t.changes(n.map(((e,t)=>o[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}])))};if(1!=e&&o.some((e=>e))){let e=[];for(let t,n=0;no&&(e==i||i>l.from)){o=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;ee.comment<0&&(!e.empty||e.single)))){let e=[];for(let{line:t,token:n,indent:o,empty:i,single:a}of r)!a&&i||e.push({from:t.from+o,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:o}of r)if(n>=0){let r=t.from+n,i=r+o.length;" "==t.text[i-t.from]&&i++,e.push({from:r,to:i})}return{changes:e}}return null}const w2=QU.define(),S2=QU.define(),k2=_U.define(),C2=_U.define({combine:e=>fq(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)})}),_2=IU.define({create:()=>B2.empty,update(e,t){let n=t.state.facet(C2),r=t.annotation(w2);if(r){let o=O2.fromTransaction(t,r.selection),i=r.side,a=0==i?e.undone:e.done;return a=o?I2(a,a.length,n.minDepth,o):Z2(a,t.startState.selection),new B2(0==i?r.rest:a,0==i?a:r.rest)}let o=t.annotation(S2);if("full"!=o&&"before"!=o||(e=e.isolate()),!1===t.annotation(nq.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let i=O2.fromTransaction(t),a=t.annotation(nq.time),s=t.annotation(nq.userEvent);return i?e=e.addChanges(i,a,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,a,s,n.newGroupDelay)),"full"!=o&&"after"!=o||(e=e.isolate()),e},toJSON:e=>({done:e.done.map((e=>e.toJSON())),undone:e.undone.map((e=>e.toJSON()))}),fromJSON:e=>new B2(e.done.map(O2.fromJSON),e.undone.map(O2.fromJSON))});function M2(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(_2,!1);if(!o)return!1;let i=o.pop(e,n,t);return!!i&&(r(i),!0)}}const T2=M2(0,!1),P2=M2(1,!1),D2=M2(0,!0),A2=M2(1,!0);class O2{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new O2(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 O2(e.changes&&fU.fromJSON(e.changes),[],e.mapped&&pU.fromJSON(e.mapped),e.startSelection&&SU.fromJSON(e.startSelection),e.selectionsAfter.map(SU.fromJSON))}static fromTransaction(e,t){let n=E2;for(let t of e.startState.facet(k2)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new O2(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,E2)}static selection(e){return new O2(void 0,E2,void 0,void 0,e)}}function I2(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function R2(e,t){return e.length?t.length?e.concat(t):e:t}const E2=[],L2=200;function Z2(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-L2));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),I2(e,e.length-1,1e9,n.setSelAfter(r)))}return[O2.selection([t])]}function N2(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function j2(e,t){if(!e.length)return e;let n=e.length,r=E2;for(;n;){let o=F2(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let t=e.slice(0,n);return t[n-1]=o,t}t=o.mapped,n--,r=o.selectionsAfter}return r.length?[O2.selection(r)]:E2}function F2(e,t,n){let r=R2(e.selectionsAfter.length?e.selectionsAfter.map((e=>e.map(t))):E2,n);if(!e.changes)return O2.selection(r);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),a=e.mapped?e.mapped.composeDesc(i):i;return new O2(o,tq.mapEffects(e.effects,t),a,e.startSelection.map(i),r)}const z2=/^(input\.type|delete)($|\.)/;class B2{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new B2(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,a=i[i.length-1];return i=a&&a.changes&&!a.changes.empty&&e.changes&&(!n||z2.test(n))&&(!a.selectionsAfter.length&&t-this.prevTimen.push(e,t))),t.iterChangedRanges(((e,t,o,i)=>{for(let e=0;e=t&&o<=a&&(r=!0)}})),r}(a.changes,e.changes))||"input.type.compose"==n)?I2(i,i.length-1,r.minDepth,new O2(e.changes.compose(a.changes),R2(tq.mapEffects(e.effects,a.changes),a.effects),a.mapped,a.startSelection,E2)):I2(i,i.length,r.minDepth,e),new B2(i,E2,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:E2;return o.length>0&&t-this.prevTimee.empty!=t.ranges[n].empty)).length}(o[o.length-1],e)?this:new B2(Z2(this.done,e),this.undone,t,n)}addMapping(e){return new B2(j2(this.done,e),j2(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 o=r[r.length-1],i=o.selectionsAfter[0]||t.selection;if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:w2.of({side:e,rest:N2(r),selection:i}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let n=1==r.length?E2:r.slice(0,r.length-1);return o.mapped&&(n=j2(n,o.mapped)),t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:w2.of({side:e,rest:n,selection:i}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}B2.empty=new B2(E2,E2);const V2=[{key:"Mod-z",run:T2,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:P2,preventDefault:!0},{linux:"Ctrl-Shift-z",run:P2,preventDefault:!0},{key:"Mod-u",run:D2,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:A2,preventDefault:!0}];function $2(e,t){return SU.create(e.ranges.map(t),e.mainIndex)}function H2(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function W2({state:e,dispatch:t},n){let r=$2(e.selection,n);return!r.eq(e.selection,!0)&&(t(H2(e,r)),!0)}function U2(e,t){return SU.cursor(t?e.to:e.from)}function q2(e,t){return W2(e,(n=>n.empty?e.moveByChar(n,t):U2(n,t)))}function G2(e){return e.textDirectionAt(e.state.selection.main.head)==iK.LTR}const K2=e=>q2(e,!G2(e)),Y2=e=>q2(e,G2(e));function X2(e,t){return W2(e,(n=>n.empty?e.moveByGroup(n,t):U2(n,t)))}"undefined"!=typeof Intl&&Intl.Segmenter;function Q2(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}function J2(e,t,n){let r,o,i=W0(e).resolveInner(t.head),a=n?ZJ.closedBy:ZJ.openedBy;for(let r=t.head;;){let t=n?i.childAfter(r):i.childBefore(r);if(!t)break;Q2(e,t,a)?i=t:r=n?t.to:t.from}return o=i.type.prop(a)&&(r=n?o2(e,i.from,1):o2(e,i.to,-1))&&r.matched?n?r.end.to:r.end.from:n?i.to:i.from,SU.cursor(o,n?-1:1)}function e5(e,t){return W2(e,(n=>{if(!n.empty)return U2(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)}))}const t5=e=>e5(e,!1),n5=e=>e5(e,!0);function r5(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):U2(n,t)));if(i.eq(o.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(o.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),s=a.top+r.marginTop,l=a.bottom-r.marginBottom;t&&t.top>s&&t.bottomo5(e,!1),a5=e=>o5(e,!0);function s5(e,t,n){let r=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from)&&(o=e.moveToLineBoundary(t,n,!1)),!n&&o.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&&(o=SU.cursor(r.from+n))}return o}function l5(e,t,n){let r=!1,o=$2(e.selection,(t=>{let o=o2(e,t.head,-1)||o2(e,t.head,1)||t.head>0&&o2(e,t.head-1,1)||t.head{let n=t(e);return SU.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(e.state.selection)&&(e.dispatch(H2(e.state,n)),!0)}function c5(e,t){return u5(e,(n=>e.moveByChar(n,t)))}const d5=e=>c5(e,!G2(e)),h5=e=>c5(e,G2(e));function p5(e,t){return u5(e,(n=>e.moveByGroup(n,t)))}function f5(e,t){return u5(e,(n=>e.moveVertically(n,t)))}const m5=e=>f5(e,!1),g5=e=>f5(e,!0);function v5(e,t){return u5(e,(n=>e.moveVertically(n,t,r5(e).height)))}const y5=e=>v5(e,!1),b5=e=>v5(e,!0),x5=({state:e,dispatch:t})=>(t(H2(e,{anchor:0})),!0),w5=({state:e,dispatch:t})=>(t(H2(e,{anchor:e.doc.length})),!0),S5=({state:e,dispatch:t})=>(t(H2(e,{anchor:e.selection.main.anchor,head:0})),!0),k5=({state:e,dispatch:t})=>(t(H2(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function C5(e,t){let{state:n}=e,r=n.selection,o=n.selection.ranges.slice();for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head);if(t?i.to0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.headi.to){o.some((e=>e.head==r.head))||o.push(r);break}if(r.head==n.head)break;n=r}}return o.length!=r.ranges.length&&(e.dispatch(H2(n,SU.create(o,o.length-1))),!0)}function _5(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,o=r.changeByRange((r=>{let{from:o,to:i}=r;if(o==i){let a=t(r);ao&&(n="delete.forward",a=M5(e,a,!0)),o=Math.min(o,a),i=Math.max(i,a)}else o=M5(e,o,!1),i=M5(e,i,!0);return o==i?{range:r}:{changes:{from:o,to:i},range:SU.cursor(o,ot(e))))r.between(t,t,((e,r)=>{et&&(t=n?r:e)}));return t}const T5=(e,t,n)=>_5(e,(r=>{let o,i,a=r.from,{state:s}=e,l=s.doc.lineAt(a);if(n&&!t&&a>l.from&&aT5(e,!1,!0),D5=e=>T5(e,!0,!1),A5=(e,t)=>_5(e,(n=>{let r=n.head,{state:o}=e,i=o.doc.lineAt(r),a=o.charCategorizer(r);for(let e=null;;){if(r==(t?i.to:i.from)){r==n.head&&i.number!=(t?o.doc.lines:1)&&(r+=t?1:-1);break}let s=sU(i.text,r-i.from,t)+i.from,l=i.text.slice(Math.min(r,s)-i.from,Math.max(r,s)-i.from),u=a(l);if(null!=e&&u!=e)break;" "==l&&r==n.head||(e=u),r=s}return r})),O5=e=>A5(e,!1);function I5(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(r.empty||r.to!=i.from||(i=e.doc.lineAt(r.to-1)),n>=o.number){let e=t[t.length-1];e.to=i.to,e.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function R5(e,t,n){if(e.readOnly)return!1;let r=[],o=[];for(let t of I5(e)){if(n?t.to==e.doc.length:0==t.from)continue;let i=e.doc.lineAt(n?t.to+1:t.from-1),a=i.length+1;if(n){r.push({from:t.to,to:i.to},{from:t.from,insert:i.text+e.lineBreak});for(let n of t.ranges)o.push(SU.range(Math.min(e.doc.length,n.anchor+a),Math.min(e.doc.length,n.head+a)))}else{r.push({from:i.from,to:t.from},{from:t.to,insert:e.lineBreak+i.text});for(let e of t.ranges)o.push(SU.range(e.anchor-a,e.head-a))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:SU.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0)}function E5(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of I5(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}const L5=N5(!1),Z5=N5(!0);function N5(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange((n=>{let{from:r,to:o}=n,i=t.doc.lineAt(r),a=!e&&r==o&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=W0(e).resolveInner(t),o=r.childBefore(t),i=r.childAfter(t);return o&&i&&o.to<=t&&i.from>=t&&(n=o.type.prop(ZJ.closedBy))&&n.indexOf(i.name)>-1&&e.doc.lineAt(o.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(o.to,i.from))?{from:o.to,to:i.from}:null}(t,r);e&&(r=o=(o<=i.to?i:t.doc.lineAt(o)).to);let s=new s1(t,{simulateBreak:r,simulateDoubleBreak:!!a}),l=a1(s,r);for(null==l&&(l=Oq(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));oi.from&&r{let o=[];for(let i=r.from;i<=r.to;){let a=e.doc.lineAt(i);a.number>n&&(r.empty||r.to>a.from)&&(t(a,o,r),n=a.number),i=a.to+1}let i=e.changes(o);return{changes:o,range:SU.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}}))}const F5=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(j5(e,((t,n)=>{n.push({from:t.from,insert:e.facet(r1)})})),{userEvent:"input.indent"})),!0),z5=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(j5(e,((t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let o=Oq(r,e.tabSize),i=0,a=i1(e,Math.max(0,o-o1(e)));for(;iX2(e,!G2(e)),shift:e=>p5(e,!G2(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>W2(e,(t=>s5(e,t,!G2(e)))),shift:e=>u5(e,(t=>s5(e,t,!G2(e)))),preventDefault:!0},{key:"ArrowRight",run:Y2,shift:h5,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>X2(e,G2(e)),shift:e=>p5(e,G2(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>W2(e,(t=>s5(e,t,G2(e)))),shift:e=>u5(e,(t=>s5(e,t,G2(e)))),preventDefault:!0},{key:"ArrowUp",run:t5,shift:m5,preventDefault:!0},{mac:"Cmd-ArrowUp",run:x5,shift:S5},{mac:"Ctrl-ArrowUp",run:i5,shift:y5},{key:"ArrowDown",run:n5,shift:g5,preventDefault:!0},{mac:"Cmd-ArrowDown",run:w5,shift:k5},{mac:"Ctrl-ArrowDown",run:a5,shift:b5},{key:"PageUp",run:i5,shift:y5},{key:"PageDown",run:a5,shift:b5},{key:"Home",run:e=>W2(e,(t=>s5(e,t,!1))),shift:e=>u5(e,(t=>s5(e,t,!1))),preventDefault:!0},{key:"Mod-Home",run:x5,shift:S5},{key:"End",run:e=>W2(e,(t=>s5(e,t,!0))),shift:e=>u5(e,(t=>s5(e,t,!0))),preventDefault:!0},{key:"Mod-End",run:w5,shift:k5},{key:"Enter",run:L5,shift:L5},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:P5,shift:P5,preventDefault:!0},{key:"Delete",run:D5,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:O5,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>A5(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>_5(e,(t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})),preventDefault:!0},{mac:"Mod-Delete",run:e=>_5(e,(t=>{let n=e.moveToLineBoundary(t,!0).head;return t.headW2(e,(t=>SU.cursor(e.lineBlockAt(t.head).from,1))),shift:e=>u5(e,(t=>SU.cursor(e.lineBlockAt(t.head).from)))},{key:"Ctrl-e",run:e=>W2(e,(t=>SU.cursor(e.lineBlockAt(t.head).to,-1))),shift:e=>u5(e,(t=>SU.cursor(e.lineBlockAt(t.head).to)))},{key:"Ctrl-d",run:D5},{key:"Ctrl-h",run:P5},{key:"Ctrl-k",run:e=>_5(e,(t=>{let n=e.lineBlockAt(t.head).to;return t.head{if(e.readOnly)return!1;let n=e.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:XW.of(["",""])},range:SU.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),o=n==r.from?n-1:sU(r.text,n-r.from,!1)+r.from,i=n==r.to?n+1:sU(r.text,n-r.from,!0)+r.from;return{changes:{from:o,to:i,insert:e.doc.slice(n,i).append(e.doc.slice(o,n))},range:SU.cursor(i)}}));return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:a5}].map((e=>({mac:e.key,run:e.run,shift:e.shift})))),V5=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>W2(e,(t=>J2(e.state,t,!G2(e)))),shift:e=>u5(e,(t=>J2(e.state,t,!G2(e))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>W2(e,(t=>J2(e.state,t,G2(e)))),shift:e=>u5(e,(t=>J2(e.state,t,G2(e))))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>R5(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>E5(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>R5(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>E5(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>C5(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>C5(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=SU.create([n.main]):n.main.empty||(r=SU.create([SU.cursor(n.main.head)])),!!r&&(t(H2(e,r)),!0)}},{key:"Mod-Enter",run:Z5},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=I5(e).map((({from:t,to:n})=>SU.range(t,Math.min(n+1,e.doc.length))));return t(e.update({selection:SU.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=$2(e.selection,(t=>{let n=W0(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.to||n.to>t.to&&n.from<=t.from)&&e.next)return SU.range(n.to,n.from)}return t}));return!n.eq(e.selection)&&(t(H2(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:z5},{key:"Mod-]",run:F5},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new s1(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),o=j5(e,((t,o,i)=>{let a=a1(r,t.from);if(null==a)return;/\S/.test(t.text)||(a=0);let s=/^\s*/.exec(t.text)[0],l=i1(e,a);(s!=l||i.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(I5(t).map((({from:e,to:n})=>(e>0?e--:n{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),o=e.coordsAtPos(t.head,t.assoc||1);o&&(n=r.bottom+e.documentTop-o.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})=>l5(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=v2(e.state,n.from);return r.line?f2(e):!!r.block&&g2(e)}},{key:"Alt-A",run:m2},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat(B5),$5={key:"Tab",run:F5,shift:z5};function H5(){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 o=n[r];"string"==typeof o?e.setAttribute(r,o):null!=o&&(e[r]=o)}t++}for(;te.normalize("NFKD"):e=>e;class q5{constructor(e,t,n=0,r=e.length,o,i){this.test=i,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=o?e=>o(U5(e)):U5,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 lU(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=uU(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=cU(e);let r=this.normalize(t);if(r.length)for(let e=0,o=n;;e++){let i=r.charCodeAt(e),a=this.match(i,o,this.bufferPos+this.bufferStart);if(e==r.length-1){if(a)return this.value=a,this;break}o==n&&ethis.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=e3(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.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=n||r.to<=t){let r=new Q5(t,e.sliceString(t,n));return X5.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:o,from:i}=r;return i>t&&(o=e.sliceString(t,i)+o,i=t),r.to=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=e3(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Q5.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function e3(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function t3(e){let t=H5("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,o=r.doc.lineAt(r.selection.main.head),[,i,a,s,l]=n,u=s?+s.slice(1):0,c=a?+a:o.number;if(a&&l){let e=c/100;i&&(e=e*("-"==i?-1:1)+o.number/r.doc.lines),c=Math.round(r.doc.lines*e)}else a&&i&&(c=c*("-"==i?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),h=SU.cursor(d.from+Math.max(0,Math.min(u,d.length)));e.dispatch({effects:[n3.of(!1),UX.scrollIntoView(h.from,{y:"center"})],selection:h}),e.focus()}return{dom:H5("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:n3.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},H5("label",e.state.phrase("Go to line"),": ",t)," ",H5("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),H5("button",{name:"close",onclick:()=>{e.dispatch({effects:n3.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["×"]))}}"undefined"!=typeof Symbol&&(Y5.prototype[Symbol.iterator]=J5.prototype[Symbol.iterator]=function(){return this});const n3=tq.define(),r3=IU.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(n3)&&(e=n.value);return e},provide:e=>uJ.from(e,(e=>e?t3:null))}),o3=UX.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"}}}),i3={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},a3=_U.define({combine:e=>fq(e,i3,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});const s3=qG.mark({class:"cm-selectionMatch"}),l3=qG.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function u3(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==uq.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==uq.Word)}const c3=HK.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(a3),{state:n}=e,r=n.selection;if(r.ranges.length>1)return qG.none;let o,i=r.main,a=null;if(i.empty){if(!t.highlightWordAroundCursor)return qG.none;let e=n.wordAt(i.head);if(!e)return qG.none;a=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e200)return qG.none;if(t.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!u3(a,n,i.from,i.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==uq.Word&&e(t.sliceDoc(r-1,r))==uq.Word}(a,n,i.from,i.to))return qG.none}else if(o=n.sliceDoc(i.from,i.to),!o)return qG.none}let s=[];for(let r of e.visibleRanges){let e=new q5(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!a||u3(a,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?s.push(l3.range(r,o)):(r>=i.to||o<=i.from)&&s.push(s3.range(r,o)),s.length>t.maxMatches))return qG.none}}return qG.set(s)}},{decorations:e=>e.decorations}),d3=UX.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const h3=_U.define({combine:e=>fq(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new B3(e),scrollToMatch:e=>UX.scrollIntoView(e)})});class p3{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,K5),!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?"\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 x3(this):new g3(this)}getCursor(e,t=0,n){let r=e.doc?e:pq.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?v3(this,r,t,n):m3(this,r,t,n)}}class f3{constructor(e){this.spec=e}}function m3(e,t,n,r){return new q5(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(o=t.doc,i=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=m3(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function v3(e,t,n,r){return new Y5(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(o=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(o(y3(n.input,n.index))!=uq.Word||o(b3(n.input,n.index))!=uq.Word)&&(o(b3(n.input,n.index+n[0].length))!=uq.Word||o(y3(n.input,n.index+n[0].length))!=uq.Word)):void 0},n,r);var o}function y3(e,t){return e.slice(sU(e,t,!1),t)}function b3(e,t){return e.slice(t,sU(e,t))}class x3 extends f3{nextMatch(e,t,n){let r=v3(this.spec,e,n,e.doc.length).next();return r.done&&(r=v3(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let o=Math.max(t,n-1e4*r),i=v3(this.spec,e,o,n),a=null;for(;!i.next().done;)a=i.value;if(a&&(o==t||a.from>o+10))return a;if(o==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=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let o=v3(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const w3=tq.define(),S3=tq.define(),k3=IU.define({create:e=>new C3(L3(e).create(),null),update(e,t){for(let n of t.effects)n.is(w3)?e=new C3(n.value.create(),e.panel):n.is(S3)&&(e=new C3(e.query,n.value?E3:null));return e},provide:e=>uJ.from(e,(e=>e.panel))});class C3{constructor(e,t){this.query=e,this.panel=t}}const _3=qG.mark({class:"cm-searchMatch"}),M3=qG.mark({class:"cm-searchMatch cm-searchMatch-selected"}),T3=HK.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(k3))}update(e){let t=e.state.field(k3);(t!=e.startState.field(k3)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return qG.none;let{view:n}=this,r=new xq;for(let t=0,o=n.visibleRanges,i=o.length;to[t+1].from-500;)s=o[++t].to;e.highlight(n.state,a,s,((e,t)=>{let o=n.state.selection.ranges.some((n=>n.from==e&&n.to==t));r.add(e,t,o?M3:_3)}))}return r.finish()}},{decorations:e=>e.decorations});function P3(e){return t=>{let n=t.state.field(k3,!1);return n&&n.query.spec.valid?e(t,n):j3(t)}}const D3=P3(((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let o=SU.single(r.from,r.to),i=e.state.facet(h3);return e.dispatch({selection:o,effects:[W3(e,r),i.scrollToMatch(o.main,e)],userEvent:"select.search"}),N3(e),!0})),A3=P3(((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,o=t.prevMatch(n,r,r);if(!o)return!1;let i=SU.single(o.from,o.to),a=e.state.facet(h3);return e.dispatch({selection:i,effects:[W3(e,o),a.scrollToMatch(i.main,e)],userEvent:"select.search"}),N3(e),!0})),O3=P3(((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:SU.create(n.map((e=>SU.range(e.from,e.to)))),userEvent:"select.search.matches"}),!0)})),I3=P3(((e,{query:t})=>{let{state:n}=e,{from:r,to:o}=n.selection.main;if(n.readOnly)return!1;let i=t.nextMatch(n,r,r);if(!i)return!1;let a,s,l=i,u=[],c=[];l.from==r&&l.to==o&&(s=n.toText(t.getReplacement(l)),u.push({from:l.from,to:l.to,insert:s}),l=t.nextMatch(n,l.from,l.to),c.push(UX.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+".")));let d=e.state.changes(u);return l&&(a=SU.single(l.from,l.to).map(d),c.push(W3(e,l)),c.push(n.facet(h3).scrollToMatch(a.main,e))),e.dispatch({changes:d,selection:a,effects:c,userEvent:"input.replace"}),!0})),R3=P3(((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:UX.announce.of(r),userEvent:"input.replace.all"}),!0}));function E3(e){return e.state.facet(h3).createPanel(e)}function L3(e,t){var n,r,o,i,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(h3);return new p3({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!==(o=null==t?void 0:t.literal)&&void 0!==o?o:u.literal,regexp:null!==(i=null==t?void 0:t.regexp)&&void 0!==i?i:u.regexp,wholeWord:null!==(a=null==t?void 0:t.wholeWord)&&void 0!==a?a:u.wholeWord})}function Z3(e){let t=iJ(e,E3);return t&&t.dom.querySelector("[main-field]")}function N3(e){let t=Z3(e);t&&t==e.root.activeElement&&t.select()}const j3=e=>{let t=e.state.field(k3,!1);if(t&&t.panel){let n=Z3(e);if(n&&n!=e.root.activeElement){let r=L3(e.state,t.query.spec);r.valid&&e.dispatch({effects:w3.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[S3.of(!0),t?w3.of(L3(e.state,t.query.spec)):tq.appendConfig.of(q3)]});return!0},F3=e=>{let t=e.state.field(k3,!1);if(!t||!t.panel)return!1;let n=iJ(e,E3);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:S3.of(!1)}),!0},z3=[{key:"Mod-f",run:j3,scope:"editor search-panel"},{key:"F3",run:D3,shift:A3,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:D3,shift:A3,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:F3,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:o}=n.main,i=[],a=0;for(let t=new q5(e.doc,e.sliceDoc(r,o));!t.next().done;){if(i.length>1e3)return!1;t.value.from==r&&(a=i.length),i.push(SU.range(t.value.from,t.value.to))}return t(e.update({selection:SU.create(i,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{let t=iJ(e,t3);if(!t){let n=[n3.of(!0)];null==e.state.field(r3,!1)&&n.push(tq.appendConfig.of([r3,o3])),e.dispatch({effects:n}),t=iJ(e,t3)}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(({state:e,dispatch:t})=>{let{selection:n}=e,r=SU.create(n.ranges.map((t=>e.wordAt(t.head)||SU.cursor(t.head))),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({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 o=function(e,t){let{main:n,ranges:r}=e.selection,o=e.wordAt(n.head),i=o&&o.from==n.from&&o.to==n.to;for(let n=!1,o=new q5(e.doc,t,r[r.length-1].to);;){if(o.next(),!o.done){if(n&&r.some((e=>e.from==o.value.from)))continue;if(i){let t=e.wordAt(o.value.from);if(!t||t.from!=o.value.from||t.to!=o.value.to)continue}return o.value}if(n)return null;o=new q5(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!o&&(t(e.update({selection:e.selection.addRange(SU.range(o.from,o.to),!1),effects:UX.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class B3{constructor(e){this.view=e;let t=this.query=e.state.field(k3).query.spec;function n(e,t,n){return H5("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=H5("input",{value:t.search,placeholder:V3(e,"Find"),"aria-label":V3(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=H5("input",{value:t.replace,placeholder:V3(e,"Replace"),"aria-label":V3(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=H5("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=H5("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=H5("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=H5("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",(()=>D3(e)),[V3(e,"next")]),n("prev",(()=>A3(e)),[V3(e,"previous")]),n("select",(()=>O3(e)),[V3(e,"all")]),H5("label",null,[this.caseField,V3(e,"match case")]),H5("label",null,[this.reField,V3(e,"regexp")]),H5("label",null,[this.wordField,V3(e,"by word")]),...e.state.readOnly?[]:[H5("br"),this.replaceField,n("replace",(()=>I3(e)),[V3(e,"replace")]),n("replaceAll",(()=>R3(e)),[V3(e,"replace all")])],H5("button",{name:"close",onclick:()=>F3(e),"aria-label":V3(e,"close"),type:"button"},["×"])])}commit(){let e=new p3({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:w3.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",aQ(nQ(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?A3:D3)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),I3(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(w3)&&!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(h3).top}}function V3(e,t){return e.state.phrase(t)}const $3=30,H3=/[\s\.,:;?!]/;function W3(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),o=e.state.doc.lineAt(n).to,i=Math.max(r.from,t-$3),a=Math.min(o,n+$3),s=e.state.sliceDoc(i,a);if(i!=r.from)for(let e=0;e<$3;e++)if(!H3.test(s[e+1])&&H3.test(s[e])){s=s.slice(e);break}if(a!=o)for(let e=s.length-1;e>s.length-$3;e--)if(!H3.test(s[e-1])&&H3.test(s[e])){s=s.slice(0,e);break}return UX.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`)}const U3=UX.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"}}),q3=[k3,jU.low(T3),U3];class G3{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=W0(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)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),o=r.search(J3(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}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 K3(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,"\\$&")}]`}function Y3(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{let o=e.matchBefore(r);return o||e.explicit?{from:o?o.from:e.pos,options:t,validFor:n}:null}}class X3{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function Q3(e){return e.selection.main.from}function J3(e,t){var n;let{source:r}=e,o=t&&"^"!=r[0],i="$"!=r[r.length-1];return o||i?new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const e4=QU.define();function t4(e,t,n,r){let{main:o}=e.selection,i=n-o.from,a=r-o.from;return{...e.changeByRange((s=>{if(s!=o&&n!=r&&e.sliceDoc(s.from+i,s.from+a)!=e.sliceDoc(n,r))return{range:s};let l=e.toText(t);return{changes:{from:s.from+i,to:r==o.from?s.to:s.from+a,insert:l},range:SU.cursor(s.from+i+l.length)}})),scrollIntoView:!0,userEvent:"input.complete"}}const n4=new WeakMap;function r4(e){if(!Array.isArray(e))return e;let t=n4.get(e);return t||n4.set(e,t=Y3(e)),t}const o4=tq.define(),i4=tq.define();class a4{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=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=uU(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!r||1==b&&m||0==v&&0!=b)&&(t[c]==l||n[c]==l&&(d=!0)?i[c++]=r:i.length&&(g=!1)),v=b,r+=cU(l)}return c==s&&0==i[0]&&g?this.result((d?-200:0)-100,i,e):h==s&&0==p?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):a>-1?this.ret(-700-e.length,[a,a+this.pattern.length]):h==s?this.ret(-900-e.length,[p,f]):c==s?this.result((d?-200:0)-100-700+(g?0:-1100),i,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[],o=0;for(let e of t){let t=e+(this.astral?cU(lU(n,e)):1);o&&r[o-1]==e?r[o-1]=t:(r[o++]=e,r[o++]=t)}return this.ret(e-n.length,r)}}class s4{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.lengthfq(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:c4,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||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=>u4(e(n),t(n)),optionClass:(e,t)=>n=>u4(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function u4(e,t){return e?t?e+" "+t:e:t}function c4(e,t,n,r,o,i){let a,s,l=e.textDirection==iK.RTL,u=l,c=!1,d="top",h=t.left-o.left,p=o.right-t.right,f=r.right-r.left,m=r.bottom-r.top;if(u&&h=m||e>t.top?a=n.bottom-t.top:(d="bottom",a=t.bottom-n.top)}return{style:`${d}: ${a/((t.bottom-t.top)/i.offsetHeight)}px; max-width: ${s/((t.right-t.left)/i.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":u?"left":"right")}}function d4(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 h4{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:i}=r.open,a=e.state.facet(l4);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.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}),t.push({render(e,t,n,r){let o=document.createElement("span");o.className="cm-completionLabel";let i=e.displayLabel||e.label,a=0;for(let e=0;ea&&o.appendChild(document.createTextNode(i.slice(a,t)));let s=o.appendChild(document.createElement("span"));s.appendChild(document.createTextNode(i.slice(t,n))),s.className="cm-completionMatchedText",a=n}return ae.position-t.position)).map((e=>e.render))}(a),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=d4(o.length,i,a.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,o=n.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(t=/-(\d+)$/.exec(o.id))&&+t[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(l4).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:i4.of(null)})})),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:o,selected:i,disabled:a}=n.open;r.open&&r.open.options==o||(this.range=d4(o.length,i,e.state.facet(l4).maxRenderedOptions),this.showOptions(o,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;(t.selected>-1&&t.selected=this.range.to)&&(this.range=d4(t.options.length,t.selected,this.view.state.facet(l4).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:o}=r;if(!o)return;let i="string"==typeof o?document.createTextNode(o):o(r);if(!i)return;"then"in i?i.then((t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)})).catch((e=>zK(this.view.state,e,"completion info"))):(this.addInfoPane(i,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),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){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby")):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.height/e.offsetHeight;r.topn.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/o)}(this.list,t),t}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(),o=this.space;if(!o){let e=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(o.bottom,t.bottom)-10||r.bottom{e.target==r&&e.preventDefault()}));let o=null;for(let i=n.from;in.from||0==n.from))if(o=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const u=r.appendChild(document.createElement("li"));u.id=t+"-"+i,u.setAttribute("role","option");let c=this.optionClass(a);c&&(u.className=c);for(let e of 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.tonew h4(n,e,t)}function f4(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class m4{constructor(e,t,n,r,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new m4(this.options,b4(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,o,i){if(r&&!i&&e.some((e=>e.isPending)))return r.setDisabled();let a=function(e,t){let n=[],r=null,o=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)}},a=t.facet(l4);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 X3(t,r.source,e?e(t):[],1e9-n.length));else{let n,s=t.sliceDoc(r.from,r.to),l=a.filterStrict?new s4(s):new a4(s);for(let t of r.result.options)if(n=l.match(t.label)){let a=t.displayLabel?e?e(t,n.matched):[]:n.matched,s=n.score+(t.boost||0);if(i(new X3(t,r.source,a,s)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;o||(o=Object.create(null)),o[e]=Math.max(s,o[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,i=(e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?o[t.name]-o[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.namet.score-e.score||u(e.completion,t.completion)))){let t=e.completion;!l||l.label!=t.label||l.detail!=t.detail||null!=l.type&&null!=t.type&&l.type!=t.type||l.apply!=t.apply||l.boost!=t.boost?s.push(e):f4(e.completion)>f4(l)&&(s[s.length-1]=e),l=e.completion}return s}(e,t);if(!a.length)return r&&e.some((e=>e.isPending))?r.setDisabled():null;let s=t.facet(l4).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e),1e8),create:P4,above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(e){return new m4(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new m4(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class g4{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new g4(x4,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(l4),r=(n.override||t.languageDataAt("autocomplete",Q3(t)).map(r4)).map((t=>(this.active.find((e=>e.source==t))||new S4(t,this.active.some((e=>0!=e.state))?1:0)).update(e,n)));r.length==this.active.length&&r.every(((e,t)=>e==this.active[t]))&&(r=this.active);let o=this.open,i=e.effects.some((e=>e.is(C4)));o&&e.docChanged&&(o=o.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(;ne.isPending))&&(o=null),!o&&r.every((e=>!e.isPending))&&r.some((e=>e.hasResult()))&&(r=r.map((e=>e.hasResult()?new S4(e.source,0):e)));for(let t of e.effects)t.is(_4)&&(o=o&&o.setSelected(t.value,this.id));return r==this.active&&o==this.open?this:new g4(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?v4:y4}}const v4={"aria-autocomplete":"list"},y4={};function b4(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const x4=[];function w4(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(e4);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:e.docChanged?16:0}class S4{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=w4(e,t),r=this;(8&n||16&n&&this.touches(e))&&(r=new S4(r.source,0)),4&n&&0==r.state&&(r=new S4(this.source,1)),r=r.updateFor(e,n);for(let t of e.effects)if(t.is(o4))r=new S4(r.source,1,t.value);else if(t.is(i4))r=new S4(r.source,0);else if(t.is(C4))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(Q3(e.state))}}class k4 extends S4{constructor(e,t,n,r,o,i){super(e,3,t),this.limit=n,this.result=r,this.from=o,this.to=i}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 o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),a=Q3(e.state);if(a>i||!r||2&t&&(Q3(e.startState)==this.from||ae.map((e=>e.map(t)))}),_4=tq.define(),M4=IU.define({create:()=>g4.start(),update:(e,t)=>e.update(t),provide:e=>[KQ.from(e,(e=>e.tooltip)),UX.contentAttributes.from(e,(e=>e.attrs))]});function T4(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(M4).active.find((e=>e.source==t.source));return r instanceof k4&&("string"==typeof n?e.dispatch({...t4(e.state,n,r.from,r.to),annotations:e4.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}const P4=p4(M4,T4);function D4(e,t="option"){return n=>{let r=n.state.field(M4,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-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:_4.of(s)}),!0}}const A4=e=>!!e.state.field(M4,!1)&&(e.dispatch({effects:o4.of(!0)}),!0);class O4{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const I4=HK.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(M4).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(M4),n=e.state.facet(l4);if(!e.selectionSet&&!e.docChanged&&e.startState.field(M4)==t)return;let r=e.transactions.some((e=>{let t=w4(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)}));for(let t=0;t50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){zK(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(o4)))))&&(this.pendingStart=!0);let o=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()),o):-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(M4);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(l4).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=Q3(t),r=new G3(t,n,e.explicit,this.view),o=new O4(e,r);this.running.push(o),Promise.resolve(e.source(r)).then((e=>{o.context.aborted||(o.done=e||null,this.scheduleAccept())}),(e=>{this.view.dispatch({effects:i4.of(null)}),zK(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(l4).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(l4),r=this.view.state.field(M4);for(let o=0;oe.source==i.active.source));if(a&&a.isPending)if(null==i.done){let e=new S4(i.active.source,0);for(let t of i.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:C4.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(M4,!1);if(t&&t.tooltip&&this.view.state.facet(l4).closeOnBlur){let n=t.open&&nJ(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:i4.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:o4.of(!1)})),20),this.composing=0}}}),R4="object"==typeof navigator&&/Win/.test(navigator.platform),E4=jU.highest(UX.domEventHandlers({keydown(e,t){let n=t.state.field(M4,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&(!R4||!e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],o=n.active.find((e=>e.source==r.source)),i=r.completion.commitCharacters||o.result.commitCharacters;return i&&i.indexOf(e.key)>-1&&T4(t,r),!1}})),L4=UX.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:'"···"',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:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const Z4={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},N4=tq.define({map(e,t){let n=t.mapPos(e,-1,hU.TrackAfter);return null==n?void 0:n}}),j4=new class extends mq{};j4.startSide=1,j4.endSide=-1;const F4=IU.define({create:()=>bq.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(N4)&&(e=e.update({add:[j4.range(n.value,n.value+1)]}));return e}});const z4="()[]{}<>«»»«[]{}";function B4(e){for(let t=0;t<16;t+=2)if(z4.charCodeAt(t)==e)return z4.charAt(t+1);return uU(e<128?e:e+1)}function V4(e,t){return e.languageDataAt("closeBrackets",t)[0]||Z4}const $4="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),H4=UX.inputHandler.of(((e,t,n,r)=>{if(($4?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(r.length>2||2==r.length&&1==cU(lU(r,0))||t!=o.from||n!=o.to)return!1;let i=function(e,t){let n=V4(e,e.selection.main.head),r=n.brackets||Z4.brackets;for(let o of r){let i=B4(lU(o,0));if(t==o)return i==o?Y4(e,o,r.indexOf(o+o+o)>-1,n):G4(e,o,i,n.before||Z4.before);if(t==i&&U4(e,e.selection.main.from))return K4(e,o,i)}return null}(e.state,r);return!!i&&(e.dispatch(i),!0)})),W4=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=V4(e,e.selection.main.head).brackets||Z4.brackets,r=null,o=e.changeByRange((t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return cU(lU(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let o of n)if(o==r&&q4(e.doc,t.head)==B4(lU(o,0)))return{changes:{from:t.head-o.length,to:t.head+o.length},range:SU.cursor(t.head-o.length)}}return{range:r=t}}));return r||t(e.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function U4(e,t){let n=!1;return e.field(F4).between(0,e.doc.length,(e=>{e==t&&(n=!0)})),n}function q4(e,t){let n=e.sliceString(t,t+2);return n.slice(0,cU(lU(n,0)))}function G4(e,t,n,r){let o=null,i=e.changeByRange((i=>{if(!i.empty)return{changes:[{insert:t,from:i.from},{insert:n,from:i.to}],effects:N4.of(i.to+t.length),range:SU.range(i.anchor+t.length,i.head+t.length)};let a=q4(e.doc,i.head);return!a||/\s/.test(a)||r.indexOf(a)>-1?{changes:{insert:t+n,from:i.head},effects:N4.of(i.head+t.length),range:SU.cursor(i.head+t.length)}:{range:o=i}}));return o?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function K4(e,t,n){let r=null,o=e.changeByRange((t=>t.empty&&q4(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:SU.cursor(t.head+n.length)}:r={range:t}));return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Y4(e,t,n,r){let o=r.stringPrefixes||Z4.stringPrefixes,i=null,a=e.changeByRange((r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:N4.of(r.to+t.length),range:SU.range(r.anchor+t.length,r.head+t.length)};let a,s=r.head,l=q4(e.doc,s);if(l==t){if(X4(e,s))return{changes:{insert:t+t,from:s},effects:N4.of(s+t.length),range:SU.cursor(s+t.length)};if(U4(e,s)){let r=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:SU.cursor(s+r.length)}}}else{if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(a=Q4(e,s-2*t.length,o))>-1&&X4(e,a))return{changes:{insert:t+t+t+t,from:s},effects:N4.of(s+t.length),range:SU.cursor(s+t.length)};if(e.charCategorizer(s)(l)!=uq.Word&&Q4(e,s,o)>-1&&!function(e,t,n,r){let o=W0(e).resolveInner(t,-1),i=r.reduce(((e,t)=>Math.max(e,t.length)),0);for(let a=0;a<5;a++){let a=e.sliceDoc(o.from,Math.min(o.to,o.from+n.length+i)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=o.firstChild;for(;t&&t.from==o.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=o.to==t&&o.parent;if(!l)break;o=l}return!1}(e,s,t,o))return{changes:{insert:t+t,from:s},effects:N4.of(s+t.length),range:SU.cursor(s+t.length)}}return{range:i=r}}));return i?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function X4(e,t){let n=W0(e).resolveInner(t+1);return n.parent&&n.from==t}function Q4(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=uq.Word)return t;for(let o of n){let n=t-o.length;if(e.sliceDoc(n,t)==o&&r(e.sliceDoc(n-1,n))!=uq.Word)return n}return-1}const J4=[{key:"Ctrl-Space",run:A4},{mac:"Alt-`",run:A4},{mac:"Alt-i",run:A4},{key:"Escape",run:e=>{let t=e.state.field(M4,!1);return!(!t||!t.active.some((e=>0!=e.state)))&&(e.dispatch({effects:i4.of(null)}),!0)}},{key:"ArrowDown",run:D4(!0)},{key:"ArrowUp",run:D4(!1)},{key:"PageDown",run:D4(!0,"page")},{key:"PageUp",run:D4(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(M4,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestampe.facet(l4).defaultKeymap?[J4]:[])));class t6{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class n6{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=n.facet(g6).markerFilter;r&&(e=r(e,n));let o=e.slice().sort(((e,t)=>e.from-t.from||e.to-t.to)),i=new xq,a=[],s=0,l=n.doc.iter(),u=0,c=n.doc.length;for(let e=0;;){let t,n,r=e==o.length?null:o[e];if(!r&&!a.length)break;if(a.length)t=s,n=a.reduce(((e,t)=>Math.min(e,t.to)),r&&r.from>t?r.from:1e8);else{if(t=r.from,t>c)break;n=r.to,a.push(r),e++}for(;er.from||r.to==t)){n=Math.min(r.from,n);break}a.push(r),e++,n=Math.min(r.to,n)}n=Math.min(n,c);let d=!1;if(a.some((e=>e.from==t&&(e.to==n||n==c)))&&(d=t==n,!d&&n-t<10)){let e=t-(u+l.value.length);e>0&&(l.next(e),u=t);for(let e=t;;){if(e>=n){d=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let h=P6(a);if(d)i.add(t,t,qG.widget({widget:new w6(h),diagnostics:a.slice()}));else{let e=a.reduce(((e,t)=>t.markClass?e+" "+t.markClass:e),"");i.add(t,n,qG.mark({class:"cm-lintRange cm-lintRange-"+h+e,diagnostics:a.slice(),inclusiveEnd:a.some((e=>e.to>n))}))}if(s=n,s==c)break;for(let e=0;e{if(!(t&&o.diagnostics.indexOf(t)<0))if(r){if(o.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new t6(r.from,n,r.diagnostic)}else r=new t6(e,n,t||o.diagnostics[0])})),r}function o6(e,t){let n=t.pos,r=t.end||n,o=e.state.facet(g6).hideOn(e,n,r);if(null!=o)return o;let i=e.startState.doc.lineAt(t.pos);return!(!e.effects.some((e=>e.is(a6)))&&!e.changes.touchesRange(i.from,Math.max(i.to,r)))}function i6(e,t){return e.field(u6,!1)?t:t.concat(tq.appendConfig.of(Z6))}const a6=tq.define(),s6=tq.define(),l6=tq.define(),u6=IU.define({create:()=>new n6(qG.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,o=e.panel;if(e.selected){let o=t.changes.mapPos(e.selected.from,1);r=r6(n,e.selected.diagnostic,o)||r6(n,null,o)}!n.size&&o&&t.state.facet(g6).autoPanel&&(o=null),e=new n6(n,o,r)}for(let n of t.effects)if(n.is(a6)){let r=t.state.facet(g6).autoPanel?n.value.length?k6.open:null:e.panel;e=n6.init(n.value,r,t.state)}else n.is(s6)?e=new n6(e.diagnostics,n.value?k6.open:null,e.selected):n.is(l6)&&(e=new n6(e.diagnostics,e.panel,n.value));return e},provide:e=>[uJ.from(e,(e=>e.panel)),UX.decorations.from(e,(e=>e.diagnostics))]});const c6=qG.mark({class:"cm-lintRange cm-lintRange-active"});function d6(e,t,n){let r,{diagnostics:o}=e.state.field(u6),i=-1,a=-1;o.between(t-(n<0?1:0),t+(n>0?1:0),((e,o,{spec:s})=>{if(t>=e&&t<=o&&(e==o||(t>e||n>0)&&(t({dom:h6(e,r)})}:null}function h6(e,t){return H5("ul",{class:"cm-tooltip-lint"},t.map((t=>x6(e,t,!1))))}const p6=e=>{let t=e.state.field(u6,!1);return!(!t||!t.panel)&&(e.dispatch({effects:s6.of(!1)}),!0)},f6=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(u6,!1);t&&t.panel||e.dispatch({effects:i6(e.state,[s6.of(!0)])});let n=iJ(e,k6.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(u6,!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),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],m6=HK.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(g6);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{r.push(n),clearTimeout(o),r.length==e.length?t(r):o=setTimeout((()=>t(r)),200)}),n)}(t.map((e=>Promise.resolve(e(this.view)))),(t=>{this.view.state.doc==e.doc&&this.view.dispatch(function(e,t){return{effects:i6(e,[a6.of(t)])}}(this.view.state,t.reduce(((e,t)=>e.concat(t)))))}),(e=>{zK(this.view.state,e)}))}}update(e){let t=e.state.facet(g6);(e.docChanged||t!=e.startState.facet(g6)||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)}});const g6=_U.define({combine:e=>({sources:e.map((e=>e.source)).filter((e=>null!=e)),...fq(e.map((e=>e.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:v6,tooltipFilter:v6,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,o)=>e(n,r,o)||t(n,r,o):e:t,autoPanel:(e,t)=>e||t})})});function v6(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function y6(e,t={}){return[g6.of({source:e,config:t}),m6,Z6]}function b6(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase()))){t.push(r);continue e}}t.push("")}return t}function x6(e,t,n){var r;let o=n?b6(t.actions):[];return H5("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},H5("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 i=!1,a=r=>{if(r.preventDefault(),i)return;i=!0;let o=r6(e.state.field(u6).diagnostics,t);o&&n.apply(e,o.from,o.to)},{name:s}=n,l=o[r]?s.indexOf(o[r]):-1,u=l<0?s:[s.slice(0,l),H5("u",s.slice(l,l+1)),s.slice(l+1)];return H5("button",{type:"button",class:"cm-diagnosticAction"+(n.markClass?" "+n.markClass:""),onclick:a,onmousedown:a,"aria-label":` Action: ${s}${l<0?"":` (access key "${o[r]})"`}.`},u)})),t.source&&H5("div",{class:"cm-diagnosticSource"},t.source))}class w6 extends WG{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return H5("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class S6{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=x6(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class k6{constructor(e){this.view=e,this.items=[];this.list=H5("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)p6(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=b6(n.actions);for(let o=0;o{for(let t=0;tp6(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(u6).selected;if(!e)return-1;for(let t=0;t{for(let e of s.diagnostics){if(i.has(e))continue;i.add(e);let a,s=-1;for(let t=n;tn&&(this.items.splice(n,s-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),o=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}}));n({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.topt.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=r6(this.view.state.field(u6).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:l6.of(t)})}static open(e){return new k6(e)}}function C6(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function _6(e){return C6(``,'width="6" height="3"')}const M6=UX.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:_6("#d11")},".cm-lintRange-warning":{backgroundImage:_6("orange")},".cm-lintRange-info":{backgroundImage:_6("#999")},".cm-lintRange-hint":{backgroundImage:_6("#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 T6(e){return"error"==e?4:"warning"==e?3:"info"==e?2:1}function P6(e){let t="hint",n=1;for(let r of e){let e=T6(r.severity);e>n&&(n=e,t=r.severity)}return t}class D6 extends cJ{constructor(e){super(),this.diagnostics=e,this.severity=P6(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(N6).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>function(e,t,n){function r(){let r=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(r.from)&&e.dispatch({effects:R6.of({pos:r.from,above:!1,clip:!1,create:()=>({dom:h6(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,function(e,t){let n=r=>{let o=t.getBoundingClientRect();if(!(r.clientX>o.left-10&&r.clientXo.top-10&&r.clientY{clearTimeout(i),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(i),i=setTimeout(r,o)}}(e,t,n)),t}}function A6(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 D6(n[e]).range(+e));return bq.of(r,!0)}const O6=mJ({class:"cm-gutter-lint",markers:e=>e.state.field(I6),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(I6).between(n.from,n.to,((e,t,o)=>{e>n.from&&ebq.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet(N6).markerFilter;for(let r of t.effects)if(r.is(a6)){let o=r.value;n&&(o=n(o||[],t.state)),e=A6(t.state.doc,o.slice(0))}return e}}),R6=tq.define(),E6=IU.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=o6(t,e)?null:{...e,pos:t.changes.mapPos(e.pos)}),t.effects.reduce(((e,t)=>t.is(R6)?t.value:e),e)),provide:e=>KQ.from(e)}),L6=UX.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:C6('')},".cm-lint-marker-warning":{content:C6('')},".cm-lint-marker-error":{content:C6('')}}),Z6=[u6,UX.decorations.compute([u6],(e=>{let{selected:t,panel:n}=e.field(u6);return t&&n&&t.from!=t.to?qG.set([c6.range(t.from,t.to)]):qG.none})),tJ(d6,{hideOn:o6}),M6],N6=_U.define({combine:e=>fq(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function j6(e={}){return[N6.of(e),I6,O6,L6,E6]}var F6=function(e){void 0===e&&(e={});var{crosshairCursor:t=!1}=e,n=[];!1!==e.closeBracketsKeymap&&(n=n.concat(W4)),!1!==e.defaultKeymap&&(n=n.concat(V5)),!1!==e.searchKeymap&&(n=n.concat(z3)),!1!==e.historyKeymap&&(n=n.concat(V2)),!1!==e.foldKeymap&&(n=n.concat(A1)),!1!==e.completionKeymap&&(n=n.concat(J4)),!1!==e.lintKeymap&&(n=n.concat(f6));var r=[];return!1!==e.lineNumbers&&r.push(function(e={}){return[MJ.of(e),vJ(),DJ]}()),!1!==e.highlightActiveLineGutter&&r.push(IJ),!1!==e.highlightSpecialChars&&r.push(function(e={}){return[PQ.of(e),DQ||(DQ=HK.fromClass(class{constructor(e){this.view=e,this.decorations=qG.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(PQ)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new kQ({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:o}=n.state,i=lU(t[0],0);if(9==i){let e=o.lineAt(r),t=n.state.tabSize,i=Oq(e.text,t,r-e.from);return qG.replace({widget:new OQ((t-i%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[i]||(this.decorationCache[i]=qG.replace({widget:new AQ(e,i)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(PQ);e.startState.facet(PQ)!=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[_2,C2.of(e),UX.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?T2:"historyRedo"==e.inputType?P2:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&r.push(function(e={}){let t={...N1,...e},n=new j1(t,!0),r=new j1(t,!1),o=HK.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(e1)!=e.state.facet(e1)||e.startState.field(C1,!1)!=e.state.field(C1,!1)||W0(e.startState)!=W0(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new xq;for(let o of e.viewportLineBlocks){let i=M1(e.state,o.from,o.to)?r:b1(e.state,o.from,o.to)?n:null;i&&t.add(o.from,o.from,i)}return t.finish()}}),{domEventHandlers:i}=t;return[o,mJ({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(o))||void 0===t?void 0:t.markers)||bq.empty},initialSpacer:()=>new j1(t,!1),domEventHandlers:{...i,click:(e,t,n)=>{if(i.click&&i.click(e,t,n))return!0;let r=M1(e.state,t.from,t.to);if(r)return e.dispatch({effects:S1.of(r)}),!0;let o=b1(e.state,t.from,t.to);return!!o&&(e.dispatch({effects:w1.of(o)}),!0)}}}),R1()]}()),!1!==e.drawSelection&&r.push(function(e={}){return[pQ.of(e),mQ,vQ,yQ,LK.of(!0)]}()),!1!==e.dropCursor&&r.push([xQ,wQ]),!1!==e.allowMultipleSelections&&r.push(pq.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&r.push(pq.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,o=n.lineAt(r);if(r>o.from+200)return e;let i=n.sliceString(o.from,r);if(!t.some((e=>e.test(i))))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=a1(a,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],o=i1(a,n);r!=o&&l.push({from:t.from,to:t.from+r.length,insert:o})}return l.length?[e,{changes:l,sequential:!0}]:e}))),!1!==e.syntaxHighlighting&&r.push(H1(q1,{fallback:!0})),!1!==e.bracketMatching&&r.push(function(e={}){return[Y1.of(e),e2]}()),!1!==e.closeBrackets&&r.push([H4,F4]),!1!==e.autocompletion&&r.push(function(e={}){return[E4,M4,l4.of(e),I4,e6,L4]}()),!1!==e.rectangularSelection&&r.push(function(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return UX.mouseSelectionStyle.of(((e,n)=>t(n)?NQ(e,n):null))}()),!1!==t&&r.push(function(e={}){let[t,n]=jQ[e.key||"Alt"],r=HK.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,UX.contentAttributes.of((e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?FQ:null}))]}()),!1!==e.highlightActiveLine&&r.push(RQ),!1!==e.highlightSelectionMatches&&r.push(function(e){let t=[d3,c3];return e&&t.push(a3.of(e)),t}()),e.tabSize&&"number"==typeof e.tabSize&&r.push(r1.of(" ".repeat(e.tabSize))),r.concat([eQ.of(n.flat())]).filter(Boolean)};const z6="#e5c07b",B6="#e06c75",V6="#56b6c2",$6="#ffffff",H6="#abb2bf",W6="#7d8799",U6="#61afef",q6="#98c379",G6="#d19a66",K6="#c678dd",Y6="#21252b",X6="#2c313a",Q6="#282c34",J6="#353a42",e8="#3E4451",t8="#528bff",n8=[UX.theme({"&":{color:H6,backgroundColor:Q6},".cm-content":{caretColor:t8},".cm-cursor, .cm-dropCursor":{borderLeftColor:t8},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e8},".cm-panels":{backgroundColor:Y6,color:H6},".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:Q6,color:W6,border:"none"},".cm-activeLineGutter":{backgroundColor:X6},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:J6},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:J6,borderBottomColor:J6},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:X6,color:H6}}},{dark:!0}),H1(z1.define([{tag:N0.keyword,color:K6},{tag:[N0.name,N0.deleted,N0.character,N0.propertyName,N0.macroName],color:B6},{tag:[N0.function(N0.variableName),N0.labelName],color:U6},{tag:[N0.color,N0.constant(N0.name),N0.standard(N0.name)],color:G6},{tag:[N0.definition(N0.name),N0.separator],color:H6},{tag:[N0.typeName,N0.className,N0.number,N0.changed,N0.annotation,N0.modifier,N0.self,N0.namespace],color:z6},{tag:[N0.operator,N0.operatorKeyword,N0.url,N0.escape,N0.regexp,N0.link,N0.special(N0.string)],color:V6},{tag:[N0.meta,N0.comment],color:W6},{tag:N0.strong,fontWeight:"bold"},{tag:N0.emphasis,fontStyle:"italic"},{tag:N0.strikethrough,textDecoration:"line-through"},{tag:N0.link,color:W6,textDecoration:"underline"},{tag:N0.heading,fontWeight:"bold",color:B6},{tag:[N0.atom,N0.bool,N0.special(N0.variableName)],color:G6},{tag:[N0.processingInstruction,N0.string,N0.inserted],color:q6},{tag:N0.invalid,color:$6}]))];var r8=UX.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),o8=function(e){void 0===e&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:o="light",placeholder:i="",basicSetup:a=!0}=e,s=[];switch(t&&s.unshift(eQ.of([$5])),a&&("boolean"==typeof a?s.unshift(F6()):s.unshift(F6(a))),i&&s.unshift(function(e){let t=HK.fromClass(class{constructor(t){this.view=t,this.placeholder=e?qG.set([qG.widget({widget:new EQ(e),side:1}).range(0)]):qG.none}get decorations(){return this.view.state.doc.length?qG.none:this.placeholder}},{decorations:e=>e.decorations});return"string"==typeof e?[t,UX.contentAttributes.of({"aria-placeholder":e})]:t}(i)),o){case"light":s.push(r8);break;case"dark":s.push(n8);break;case"none":break;default:s.push(o)}return!1===n&&s.push(UX.editable.of(!1)),r&&s.push(pq.readOnly.of(!0)),[...s]};class i8{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach((e=>{try{e()}catch(e){console.error("TimeoutLatch callback error:",e)}}))}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class a8{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),0===this.latches.size&&this.stop()}start(){null===this.interval&&(this.interval=setInterval((()=>{this.latches.forEach((e=>{e.tick(),e.isDone&&this.remove(e)}))}),1))}stop(){null!==this.interval&&(clearInterval(this.interval),this.interval=null)}}var s8=null,l8=QU.define(),u8=[];function c8(e){var{value:t,selection:n,onChange:r,onStatistics:o,onCreateEditor:a,onUpdate:s,extensions:l=u8,autoFocus:u,theme:c="light",height:d=null,minHeight:h=null,maxHeight:p=null,width:f=null,minWidth:m=null,maxWidth:g=null,placeholder:v="",editable:y=!0,readOnly:b=!1,indentWithTab:x=!0,basicSetup:w=!0,root:S,initialState:k}=e,[C,_]=(0,i.useState)(),[M,T]=(0,i.useState)(),[P,D]=(0,i.useState)(),A=(0,i.useState)((()=>({current:null})))[0],O=(0,i.useState)((()=>({current:null})))[0],I=UX.theme({"&":{height:d,minHeight:h,maxHeight:p,width:f,minWidth:m,maxWidth:g},"& .cm-scroller":{height:"100% !important"}}),R=UX.updateListener.of((e=>{if(e.docChanged&&"function"==typeof r&&!e.transactions.some((e=>e.annotation(l8)))){A.current?A.current.reset():(A.current=new i8((()=>{if(O.current){var e=O.current;O.current=null,e()}A.current=null}),200),("undefined"==typeof window?new a8:(s8||(s8=new a8),s8)).add(A.current));var t=e.state.doc.toString();r(t,e)}o&&o((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))}))(e))})),E=[R,I,...o8({theme:c,editable:y,readOnly:b,placeholder:v,indentWithTab:x,basicSetup:w})];return s&&"function"==typeof s&&E.push(UX.updateListener.of(s)),E=E.concat(l),(0,i.useLayoutEffect)((()=>{if(C&&!P){var e={doc:t,selection:n,extensions:E},r=k?pq.fromJSON(k.json,e,k.fields):pq.create(e);if(D(r),!M){var o=new UX({state:r,parent:C,root:S});T(o),a&&a(o,r)}}return()=>{M&&(D(void 0),T(void 0))}}),[C,P]),(0,i.useEffect)((()=>{e.container&&_(e.container)}),[e.container]),(0,i.useEffect)((()=>()=>{M&&(M.destroy(),T(void 0)),A.current&&(A.current.cancel(),A.current=null)}),[M]),(0,i.useEffect)((()=>{u&&M&&M.focus()}),[u,M]),(0,i.useEffect)((()=>{M&&M.dispatch({effects:tq.reconfigure.of(E)})}),[c,l,d,h,p,f,m,g,v,y,b,x,w,r,s]),(0,i.useEffect)((()=>{if(void 0!==t){var e=M?M.state.doc.toString():"";if(M&&t!==e){var n=()=>{M&&t!==M.state.doc.toString()&&M.dispatch({changes:{from:0,to:M.state.doc.toString().length,insert:t||""},annotations:[l8.of(!0)]})};A.current&&!A.current.isDone?O.current=n:n()}}}),[t,M]),{state:P,setState:D,view:M,setView:T,container:C,setContainer:_}}var d8=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],h8=(0,i.forwardRef)(((e,t)=>{var{className:n,value:r="",selection:a,extensions:s=[],onChange:l,onStatistics:u,onCreateEditor:c,onUpdate:d,autoFocus:h,theme:p="light",height:f,minHeight:m,maxHeight:g,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:w,indentWithTab:S,editable:k,readOnly:C,root:_,initialState:M}=e,T=(0,FW.Z)(e,d8),P=(0,i.useRef)(null),{state:D,view:A,container:O,setContainer:I}=c8({root:_,value:r,autoFocus:h,theme:p,height:f,minHeight:m,maxHeight:g,width:v,minWidth:y,maxWidth:b,basicSetup:x,placeholder:w,indentWithTab:S,editable:k,readOnly:C,selection:a,onChange:l,onStatistics:u,onCreateEditor:c,onUpdate:d,extensions:s,initialState:M});(0,i.useImperativeHandle)(t,(()=>({editor:P.current,state:D,view:A})),[P,O,D,A]);var R=(0,i.useCallback)((e=>{P.current=e,I(e)}),[I]);if("string"!=typeof r)throw new Error("value must be typeof string but got "+typeof r);var E="string"==typeof p?"cm-theme-"+p:"cm-theme";return(0,o.jsx)("div",(0,jW.Z)({ref:R,className:E+(n?" "+n:"")},T))}));h8.displayName="CodeMirror";const p8=h8;class f8{constructor(e,t,n,r,o,i,a,s,l,u=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=o,this.score=i,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 f8(e,[],t,n,n,0,[],0,r?new m8(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:o}=this.p,i=this.reducePos=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.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,o=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(o&&this.pos!=n){let o=this.buffer.length;if(o>0&&(0!=this.buffer[o-4]||this.buffer[o-1]<0)){let e=!1;for(let t=o;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+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)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let o=e,{parser:i}=this.p;(r>this.pos||t<=i.maxNode)&&(this.pos=r,i.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,n),this.shiftContext(t,n),t<=i.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 f8(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 g8(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))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,o=0;o1&t&&e==r))||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&t,o=this.stack.length-3*n;if(o<0||e.getGoto(this.stack[o],r,!1)<0){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,o)=>{if(!t.includes(r))return t.push(r),e.allActions(r,(t=>{if(393216&t);else if(65536&t){let n=(t>>19)-o;if(n>1){let r=65535&t,o=this.stack.length-3*n;if(o>=0&&e.getGoto(this.stack[o],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,o+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;t0&&this.emitLookAhead()}}class m8{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class g8{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class v8{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 v8(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 v8(this.stack,this.pos,this.index)}}function y8(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,o=0;r=92&&t--,t>=34&&t--;let o=t-32;if(o>=46&&(o-=46,n=!0),i+=o,n)break;i*=46}n?n[o++]=i:n=new t(i)}return n}class b8{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const x8=new b8;class w8{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=x8,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,o=this.pos+e;for(;on.to:o>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];o+=e.from-n.to,n=e}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.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=x8,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&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 S8{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;k8(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}S8.prototype.contextual=S8.prototype.fallback=S8.prototype.extend=!1;S8.prototype.fallback=S8.prototype.extend=!1;function k8(e,t,n,r,o,i){let a=0,s=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||_8(n,t.token.value,o,i))){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])){for(;u>1,i=n+o+(o<<1),s=e[i],l=e[i+1]||65536;if(r=l)){a=e[i+2],t.advance();continue e}u=o+1}}break}a=e[n+3*c-1]}}function C8(e,t,n){for(let r,o=t;65535!=(r=e[o]);o++)if(r==n)return o-t;return-1}function _8(e,t,n,r){let o=C8(n,r,t);return o<0||C8(n,r,e)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 D8{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?P8(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?P8(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(ee)return this.nextStart=i,null;if(o instanceof WJ){if(i==e){if(i=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(i),this.index.push(0))}else this.index[t]++,this.nextStart=i+o.length}}}class A8{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((e=>new b8))}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:o}=r,i=r.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,s=0;for(let r=0;ru.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 b8,n.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 b8,{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=0&&n.p.parser.dialect.allows(o>>1)){1&o?e.extended=o>>1:e.value=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new D8(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,o=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 i=0;ir)o.push(a);else{if(this.advanceStack(a,o,n))continue;{e||(e=[],t=[]),e.push(a);let n=this.tokens.getMainToken(a);t.push(n.value,n.end)}}break}}if(!o.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.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,o);if(n)return M8&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(o.length>e)for(o.sort(((e,t)=>t.score-e.score));o.length>e;)o.pop();o.some((e=>e.reducePos>r))&&this.recovering--}else if(o.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){o.splice(e--,1);continue e}o.splice(n--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let e=1;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?o.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(ZJ.contextHash)||0)==n))return e.useNode(a,r),M8&&console.log(i+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof WJ)||0==a.children.length||a.positions[0]>0)break;let s=a.children[0];if(!(s instanceof WJ&&0==a.positions[0]))break;a=s}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),M8&&console.log(i+this.stackID(e)+` (via always-reduce ${o.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;ar?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return I8(e,t),!0}}runRecovery(e,t,n){let r=null,o=!1;for(let i=0;i ":"";if(a.deadEnd){if(o)continue;if(o=!0,a.restart(),M8&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,n))continue}let c=a.split(),d=u;for(let e=0;e<10&&c.forceReduce();e++){if(M8&&console.log(d+this.stackID(c)+" (via force-reduce)"),this.advanceFully(c,n))break;M8&&(d=this.stackID(c)+" -> ")}for(let e of a.recoverByInsert(s))M8&&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),M8&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(s)})`),I8(a,n)):(!r||r.scoree.topRules[t][1])),r=[];for(let e=0;e=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let a=-r;a>0;a--)o(t[n++],e,i);n++}}}this.nodeSet=new zJ(t.map(((t,o)=>FJ.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1})))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=RJ;let i=y8(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new S8(i,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 O8(this,e,t,n);for(let o of this.wrappers)r=o(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let o=r[t+1];;){let t=r[o++],i=1&t,a=r[o++];if(i&&n)return a;for(let n=o+(t>>1);o0}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])break;n=L8(this.data,n+2)}r=t(L8(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])break;n=L8(this.data,n+2)}if(!(1&this.data[n+2])){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(E8.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new 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 o=e.specializers.find((e=>e.from==n.external));if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[r]=Z8(i),i}))),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;ee.external(n,r)<<1|t}return e.get}const N8=g0({String:N0.string,Number:N0.number,"True False":N0.bool,PropertyName:N0.propertyName,Null:N0.null,", :":N0.separator,"[ ]":N0.squareBracket,"{ }":N0.brace}),j8=E8.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:[N8],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}),F8=()=>e=>{try{JSON.parse(e.state.doc.toString())}catch(t){if(!(t instanceof SyntaxError))throw t;const n=function(e,t){let n;return(n=e.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=e.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0}(t,e.state.doc);return[{from:n,message:t.message,severity:"error",to:n}]}return[]};const z8=H0.define({name:"json",parser:j8.configure({props:[l1.add({Object:m1({except:/^\s*\}/}),Array:m1({except:/^\s*\]/})}),v1.add({"Object Array":function(e){let t=e.firstChild,n=e.lastChild;return t&&t.toJSON.stringify(e.value,null,2))),[s,l]=(0,i.useState)(r);return(0,o.jsx)(p8,{...e,style:{border:`1px solid ${t.palette.divider}`},theme:n?"dark":"light",extensions:[new t1(z8),y6(F8()),j6()],value:r,onChange:t=>{a(t),e.onChange&&e.onChange(t)},onBlur:()=>{s!==r&&void 0!==e.onChange&&(e.onChange(r),l(r))},placeholder:e.placeholder})}var V8=n(36679),$8=n(33755),H8=n(86396),W8=n(28797);const U8=e=>{const{mode:t,url:n,name:r,newTabOpen:i,renderVariables:a,tooltip:s}=e;return(0,o.jsxs)(_.Z,{direction:"column",gap:2,flexGrow:1,children:[(0,o.jsx)(xd,{label:n.label,error:n.error?.hasError,helperText:n.error?.helperText,onChange:n.onChange,placeholder:n.placeholder,multiline:!0,maxRows:5,required:!0,fullWidth:!0,value:n.value}),(r||s)&&(0,o.jsxs)(_.Z,{gap:1,direction:"inline"===t?"row":"column",children:[r&&(0,o.jsx)(xd,{sx:{flexGrow:"1"},label:r.label,onChange:r?.onChange,placeholder:r?.placeholder,value:r?.value}),s&&(0,o.jsx)(xd,{sx:{flexGrow:"1"},label:s.label,onChange:s?.onChange,placeholder:s?.placeholder,value:s?.value})]}),(0,o.jsxs)(_.Z,{direction:"row",gap:1,children:[a&&(0,o.jsx)(W8.Z,{label:a.label,control:(0,o.jsx)(pc.Z,{checked:a.value,onChange:e=>{a?.onChange(e.target.checked)}})}),(0,o.jsx)(W8.Z,{label:i.label,control:(0,o.jsx)(pc.Z,{checked:i.value,onChange:e=>{i?.onChange(e.target.checked)}})})]})]})};function q8({control:e,...t}){const{fields:n,append:r,remove:a}=(0,V8.useFieldArray)({control:e,name:"panelDefinition.spec.links"});return(0,o.jsxs)(_.Z,{...t,gap:3,children:[n&&n.length>0?n.map(((t,n)=>(0,o.jsxs)(i.Fragment,{children:[(0,o.jsxs)(_.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)(G8,{control:e,index:n}),(0,o.jsx)(M.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>a(n),children:(0,o.jsx)(H8.default,{})})]}),(0,o.jsx)(ZW.Z,{})]},t.id))):(0,o.jsx)(Mc.Z,{variant:"subtitle1",mb:2,fontStyle:"italic",children:"No links defined"}),(0,o.jsx)(M.Z,{style:{width:"fit-content",height:"fit-content"},onClick:()=>r({url:"",name:"",tooltip:"",renderVariables:!1,targetBlank:!1}),children:(0,o.jsx)($8.default,{})})]})}function G8({control:e,index:t}){const n={url:"",name:"",tooltip:"",renderVariables:!1,targetBlank:!1};return(0,o.jsx)(V8.Controller,{control:e,name:`panelDefinition.spec.links.${t}`,render:({field:e,field:{value:t},fieldState:r})=>{const i=t??n;return(0,o.jsx)(U8,{mode:"inline",url:{value:i.url,label:"URL",error:{hasError:!!r.error,helperText:r.error?.message},onChange:n=>{e.onChange({...t,url:n})}},newTabOpen:{value:!!i.targetBlank,onChange:n=>{e.onChange({...t,targetBlank:n})},label:"Open in new tab"},name:{value:i.name??"",label:"Name",onChange:n=>{e.onChange({...t,name:n})}},renderVariables:{value:!!i.renderVariables,label:"Render variables",onChange:n=>{e.onChange({...t,renderVariables:n})}},tooltip:{value:i.tooltip??"",label:"Tooltip",onChange:n=>{e.onChange({...t,tooltip:n})}}})}})}const K8=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function Y8({disablePercentageMode:e,onChange:t,value:n="value"}){return(0,o.jsx)(zd,{label:"Mode",control:(0,o.jsx)(Wd,{value:K8.find((e=>e.id===n)),options:K8,getOptionLabel:e=>e.label,getOptionDisabled:t=>"percentage"===t.id&&e,onChange:(e,{id:n})=>{t(n)},disableClearable:!0})})}var X8=n(66224);function Q8(e){const{message:t}=e;return(0,o.jsx)(_.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center"},children:(0,o.jsx)(Mc.Z,{children:t})})}function J8(e){const{resource:t}=e;return(0,o.jsx)(Q8,{message:`No ${t}`})}function e7(e){const{variant:t="rounded"}=e;return(0,o.jsx)(_.Z,{sx:{height:"100%",alignItems:"center",justifyContent:"center",px:1},children:(0,o.jsx)(X8.Z,{variant:t,width:"100%",height:"30%","aria-label":"Loading..."})})}const t7=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function n7({onChange:e,value:t="desc"}){return(0,o.jsx)(zd,{label:"Sort",control:(0,o.jsx)(Wd,{value:t7.find((e=>e.id===t)),options:t7,getOptionLabel:e=>e.label,onChange:(t,{id:n})=>{e(n)},disableClearable:!0})})}function r7({onChange:e,value:t,...n}){const r=t=>{e(t)};return(0,o.jsxs)(S,{"aria-label":"Sort",...n,children:[(0,o.jsx)(k.Z,{onClick:()=>r(void 0),variant:void 0===t?"contained":"outlined",children:"None"}),(0,o.jsx)(k.Z,{onClick:()=>r("asc"),variant:"asc"===t?"contained":"outlined",children:"Asc"}),(0,o.jsx)(k.Z,{onClick:()=>r("desc"),variant:"desc"===t?"contained":"outlined",children:"Desc"})]})}var o7=n(5404),i7=n(98346);const a7=(0,n(79886).Z)();var s7=n(22446);function l7({inputRef:e,label:t,color:n,value:r,mode:a,onChange:s,onColorChange:l,onBlur:u,onDelete:c}){const[d,h]=(0,i.useState)(0);return(0,o.jsxs)(_.Z,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,o.jsx)(ni,{label:t,color:n,onColorChange:l}),(0,o.jsx)(Rd.Z,{htmlFor:t,children:t}),(0,o.jsx)(T.Z,{id:t,inputRef:e,type:"number",value:0===r?"":r,placeholder:"0",onChange:s,onBlur:u,onKeyDown:e=>{"Enter"===e.key&&(u(),h(d+1))},InputProps:{endAdornment:"percent"===a?(0,o.jsx)(ii.Z,{paddingX:1,children:"%"}):void 0}},d),(0,o.jsx)(M.Z,{"aria-label":`delete threshold ${t}`,size:"small",onClick:c,children:(0,o.jsx)(s7.default,{})})]})}const u7=10;function c7({thresholds:e,onChange:t,hideDefault:n,disablePercentMode:r}){const a=me(),{thresholds:{defaultColor:s,palette:l}}=a,u=e?.defaultColor??s,[c,d]=(0,i.useState)(e?.steps);(0,i.useEffect)((()=>{d(e?.steps)}),[e?.steps]);const h=(0,i.useRef)(null),p=(0,i.useRef)(!1);(0,i.useEffect)((()=>{h.current&&p.current&&(h.current?.focus(),p.current=!1)}),[c?.length]);const f=()=>{if(void 0!==c){const n=[...c];n.sort(((e,t)=>e.value-t.value)),void 0!==e&&t((0,si.Uy)(e,(e=>{e.steps=n})))}};return(0,o.jsxs)(Vd,{title:"Thresholds",icon:(0,o.jsx)(Nd,{description:"Add threshold",children:(0,o.jsx)(M.Z,{size:"small","aria-label":"add threshold",onClick:()=>{p.current=!0,void 0===e?t({steps:[{value:u7}]}):e&&void 0===e.steps?t((0,si.Uy)(e,(e=>{e.steps=[{value:u7}]}))):t((0,si.Uy)(e,(e=>{const t=e.steps;if(t?.length){const e=t[t.length-1],n=l[t.length]??d7();t.push({color:n,value:(e?.value??0)+u7})}else t&&t.push({value:u7})})))},children:(0,o.jsx)($8.default,{})})}),children:[(0,o.jsx)(zd,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,o.jsxs)(o7.Z,{exclusive:!0,disabled:r,value:e?.mode??"absolute",onChange:(n,r)=>{const o="percent"===r?"percent":void 0;t(void 0!==e?(0,si.Uy)(e,(e=>{e.mode=o})):{mode:o})},sx:{height:"36px",marginLeft:"auto"},children:[(0,o.jsx)(i7.Z,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),(0,o.jsx)(i7.Z,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"})]})}),c&&c.map(((n,r)=>(0,o.jsx)(l7,{inputRef:r===c.length-1?h:void 0,label:`T${r+1}`,color:n.color??l[r]??u,value:n.value,mode:e?.mode,onColorChange:n=>((n,r)=>{void 0!==e&&t((0,si.Uy)(e,(e=>{if(void 0!==e.steps){const t=e.steps[r];t&&(t.color=n)}})))})(n,r),onChange:e=>{((e,t)=>{d((0,si.Uy)(c,(n=>{const r=n?.[t];r&&(r.value=Number(e.target.value))})))})(e,r)},onDelete:()=>{(n=>{if(void 0!==e){const r=(0,si.Uy)(e,(e=>{e.steps&&e.steps.splice(n,1)}));t(r)}})(r)},onBlur:f},r))).reverse(),!n&&(0,o.jsxs)(a7,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,o.jsx)(ni,{label:"default",color:u,onColorChange:n=>{t(void 0!==e?(0,si.Uy)(e,(e=>{e.defaultColor=n})):{defaultColor:n})}}),(0,o.jsx)(Mc.Z,{children:"Default"})]})]})}const d7=()=>"#"+Math.floor(16777216*Math.random()).toString(16).padStart(6,"0");var h7=n(63767),p7=n(59986),f7=n(60917),m7=n(68014);const g7=["localeText"],v7=i.createContext(null);const y7=function(e){const{localeText:t}=e,n=(0,FW.Z)(e,g7),{utils:r,localeText:a}=i.useContext(v7)??{utils:void 0,localeText:void 0},s=(0,m7.Z)({props:n,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:u,dateFormats:c,dateLibInstance:d,adapterLocale:h,localeText:p}=s,f=i.useMemo((()=>(0,jW.Z)({},p,a,t)),[p,a,t]),m=i.useMemo((()=>{if(!u)return r||null;const e=new u({locale:h,formats:c,instance:d});if(!e.isMUIAdapter)throw new 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("\n"));return e}),[u,h,c,d,r]),g=i.useMemo((()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null),[m]),v=i.useMemo((()=>({utils:m,defaultDates:g,localeText:f})),[g,m,f]);return(0,o.jsx)(v7.Provider,{value:v,children:l})};var b7=n(23615),x7=n.n(b7);const w7={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"},S7=w7;k7=w7,(0,jW.Z)({},k7);var k7;const C7=()=>{const e=i.useContext(v7);if(null===e)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));if(null===e.utils)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));const t=i.useMemo((()=>(0,jW.Z)({},S7,e.localeText)),[e.localeText]);return i.useMemo((()=>(0,jW.Z)({},e,{localeText:t})),[e,t])},_7=()=>C7().utils,M7=()=>C7().defaultDates,T7=e=>{const t=_7(),n=i.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},P7=(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)),r},D7=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=P7(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let u=e,c=e;for(a.isBefore(e,o)&&(u=o,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,o)&&(c=null),u){if(!i(u))return u;u=a.addDays(u,1)}if(c){if(!i(c))return c;c=a.addDays(c,-1)}}return null},A7=(e,t,n)=>null!=t&&e.isValid(t)?t:n,O7=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const t=n[n.length-1];n.push(e.addMonths(t,1))}return n},I7=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),R7=(e,t)=>{const n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},E7=["year","month","day"],L7=e=>E7.includes(e),Z7=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map((t=>e.addDays(n,t)))};var N7=n(49408),j7=n(51781),F7=n(16052);const z7=(0,Tc.Z)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),B7=(0,Tc.Z)((0,o.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),V7=(0,Tc.Z)((0,o.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),$7=((0,Tc.Z)((0,o.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,Tc.Z)((0,o.jsxs)(i.Fragment,{children:[(0,o.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,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),(0,Tc.Z)((0,o.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")),H7=(0,Tc.Z)((0,o.jsxs)(i.Fragment,{children:[(0,o.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,o.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),W7=(0,Tc.Z)((0,o.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"),U7=()=>C7().localeText;function q7(e){return(0,g.ZP)("MuiDateTimePickerTabs",e)}(0,m.Z)("MuiDateTimePickerTabs",["root"]);const G7=e=>L7(e)?"date":"time",K7=(0,d.ZP)(j7.Z,{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}`,[`& .${F7.Z.indicator}`]:{bottom:"auto",top:0}}}))),Y7=function(e){const t=(0,m7.Z)({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,o.jsx)($7,{}),onViewChange:r,timeIcon:l=(0,o.jsx)(H7,{}),view:u,hidden:c="undefined"==typeof window||window.innerHeight<667,className:d,sx:h}=t,p=U7(),f=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},q7,t)})(t);return c?null:(0,o.jsxs)(K7,{ownerState:t,variant:"fullWidth",value:G7(u),onChange:(e,t)=>{r("date"===t?"day":"hours")},className:(0,a.Z)(d,f.root),sx:h,children:[(0,o.jsx)(N7.Z,{value:"date","aria-label":p.dateTableLabel,icon:(0,o.jsx)(i.Fragment,{children:n})}),(0,o.jsx)(N7.Z,{value:"time","aria-label":p.timeTableLabel,icon:(0,o.jsx)(i.Fragment,{children:l})})]})};function X7(e){return(0,g.ZP)("MuiPickersToolbarText",e)}const Q7=(0,m.Z)("MuiPickersToolbarText",["root","selected"]),J7=["className","selected","value"],e9=(0,d.ZP)(Mc.Z,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Q7.selected}`]:t.selected}]})((({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${Q7.selected}`]:{color:(e.vars||e).palette.text.primary}}))),t9=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,l=(0,FW.Z)(n,J7),u=(e=>{const{classes:t,selected:n}=e,r={root:["root",n&&"selected"]};return(0,s.Z)(r,X7,t)})(n);return(0,o.jsx)(e9,(0,jW.Z)({ref:t,className:(0,a.Z)(u.root,r),component:"span"},l,{children:i}))}));function n9(e){return(0,g.ZP)("MuiPickersToolbar",e)}const r9=(0,m.Z)("MuiPickersToolbar",["root","content"]),o9=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],i9=(0,d.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"}}]}))),a9=(0,d.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"}}]}),s9=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:l,hidden:u,titleId:c}=n,d=(0,FW.Z)(n,o9),h=n,p=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],content:["content"]},n9,t)})(h);return u?null:(0,o.jsxs)(i9,(0,jW.Z)({ref:t,className:(0,a.Z)(p.root,i),ownerState:h},d,{children:[(0,o.jsx)(Mc.Z,{color:"text.secondary",variant:"overline",id:c,children:l}),(0,o.jsx)(a9,{className:p.content,ownerState:h,children:r})]}))})),l9=["align","className","selected","typographyClassName","value","variant","width"],u9=(0,d.ZP)(k.Z,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),c9=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:l,typographyClassName:u,value:c,variant:d,width:h}=n,p=(0,FW.Z)(n,l9),f=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},n9,t)})(n);return(0,o.jsx)(u9,(0,jW.Z)({variant:"text",ref:t,className:(0,a.Z)(f.root,i)},h?{sx:{width:h}}:{},p,{children:(0,o.jsx)(t9,{align:r,className:u,variant:d,value:c,selected:l})}))}));function d9(e){return(0,g.ZP)("MuiDateTimePickerToolbar",e)}const h9=(0,m.Z)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),p9=["hours","minutes","seconds"],f9=e=>p9.includes(e),m9=(e,t,n)=>{if(n){if((e>=12?"pm":"am")!==t)return"am"===t?e-12:e+12}return e},g9=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),v9=(e,t)=>(n,r)=>e?t.isAfter(n,r):g9(n,t)>g9(r,t);function y9(e,t,n,r){const o=_7(),a=((e,t)=>e?t.getHours(e)>=12?"pm":"am":null)(e,o),s=i.useCallback((i=>{const a=null==e?null:((e,t,n,r)=>{const o=m9(r.getHours(e),t,n);return r.setHours(e,o)})(e,i,Boolean(t),o);n(a,r??"partial")}),[t,e,n,r,o]);return{meridiemMode:a,handleMeridiemChange:s}}const b9=320,x9=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],w9=(0,d.ZP)(s9,{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}`,[`& .${r9.content} .${Q7.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}}]}))),S9=(0,d.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),k9=(0,d.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"}}]}),C9=(0,d.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}}]}),_9=(0,d.ZP)(t9,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),M9=(0,d.ZP)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${h9.ampmLabel}`]:t.ampmLabel},{[`&.${h9.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${h9.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function T9(e){const t=(0,m7.Z)({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:l,onChange:u,view:c,isLandscape:d,onViewChange:h,toolbarFormat:p,toolbarPlaceholder:f="––",views:m,disabled:g,readOnly:v,toolbarVariant:y="mobile",toolbarTitle:b,className:x}=t,w=(0,FW.Z)(t,x9),S=(0,cp.V)(),k=(0,jW.Z)({},t,{isRtl:S}),C=_7(),{meridiemMode:_,handleMeridiemChange:M}=y9(l,n,u),T=Boolean(n&&!r),P="desktop"===y,D=U7(),A=(e=>{const{classes:t,isLandscape:n,isRtl:r}=e,o={root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]};return(0,s.Z)(o,d9,t)})(k),O=b??D.dateTimePickerToolbarTitle,I=i.useMemo((()=>l?p?C.formatByString(l,p):C.format(l,"shortDate"):f),[l,p,f,C]);return(0,o.jsxs)(w9,(0,jW.Z)({isLandscape:d,className:(0,a.Z)(A.root,x),toolbarTitle:O},w,{ownerState:k,children:[(0,o.jsxs)(S9,{className:A.dateContainer,ownerState:k,children:[m.includes("year")&&(0,o.jsx)(c9,{tabIndex:-1,variant:"subtitle1",onClick:()=>h("year"),selected:"year"===c,value:l?C.format(l,"year"):"–"}),m.includes("day")&&(0,o.jsx)(c9,{tabIndex:-1,variant:P?"h5":"h4",onClick:()=>h("day"),selected:"day"===c,value:I})]}),(0,o.jsxs)(k9,{className:A.timeContainer,ownerState:k,children:[(0,o.jsxs)(C9,{className:A.timeDigitsContainer,ownerState:k,children:[m.includes("hours")&&(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(c9,{variant:P?"h5":"h3",width:P&&!d?48:void 0,onClick:()=>h("hours"),selected:"hours"===c,value:l?(R=l,n?C.format(R,"hours12h"):C.format(R,"hours24h")):"--"}),(0,o.jsx)(_9,{variant:P?"h5":"h3",value:":",className:A.separator,ownerState:k}),(0,o.jsx)(c9,{variant:P?"h5":"h3",width:P&&!d?48:void 0,onClick:()=>h("minutes"),selected:"minutes"===c||!m.includes("minutes")&&"hours"===c,value:l?C.format(l,"minutes"):"--",disabled:!m.includes("minutes")})]}),m.includes("seconds")&&(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(_9,{variant:P?"h5":"h3",value:":",className:A.separator,ownerState:k}),(0,o.jsx)(c9,{variant:P?"h5":"h3",width:P&&!d?48:void 0,onClick:()=>h("seconds"),selected:"seconds"===c,value:l?C.format(l,"seconds"):"--"})]})]}),T&&!P&&(0,o.jsxs)(M9,{className:A.ampmSelection,ownerState:k,children:[(0,o.jsx)(c9,{variant:"subtitle2",selected:"am"===_,typographyClassName:A.ampmLabel,value:R7(C,"am"),onClick:v?void 0:()=>M("am"),disabled:g}),(0,o.jsx)(c9,{variant:"subtitle2",selected:"pm"===_,typographyClassName:A.ampmLabel,value:R7(C,"pm"),onClick:v?void 0:()=>M("pm"),disabled:g})]}),n&&P&&(0,o.jsx)(c9,{variant:"h5",onClick:()=>h("meridiem"),selected:"meridiem"===c,value:l&&_?R7(C,_):"--",width:48})]})]}));var R}function P9(e,t){const n=_7(),r=M7(),o=(0,m7.Z)({props:e,name:t}),a=o.ampm??n.is12HourCycleInCurrentLocale(),s=i.useMemo((()=>null==o.localeText?.toolbarTitle?o.localeText:(0,jW.Z)({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})),[o.localeText]);return(0,jW.Z)({},o,(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(null!=e)i=e;else if(o.includes(t))i=t;else{if(!(o.length>0))throw new Error("MUI X: The `views` prop must contain at least one view.");i=o[0]}return{views:o,openTo:i}})({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:a,localeText:s,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??Boolean(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:A7(n,o.minDateTime??o.minDate,r.minDate),maxDate:A7(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:(0,jW.Z)({toolbar:T9,tabs:Y7},o.slots),slotProps:(0,jW.Z)({},o.slotProps,{toolbar:(0,jW.Z)({ampm:a},o.slotProps?.toolbar)})})}var D9=n(5056),A9=n(25399);function O9(e){return(0,g.ZP)("MuiPickersArrowSwitcher",e)}(0,m.Z)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const I9=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],R9=["ownerState"],E9=["ownerState"],L9=(0,d.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Z9=(0,d.ZP)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})((({theme:e})=>({width:e.spacing(3)}))),N9=(0,d.ZP)(M.Z,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),j9=i.forwardRef((function(e,t){const n=(0,cp.V)(),r=(0,m7.Z)({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:l,slots:u,slotProps:c,isNextDisabled:d,isNextHidden:h,onGoToNext:p,nextLabel:f,isPreviousDisabled:m,isPreviousHidden:g,onGoToPrevious:v,previousLabel:y,labelId:b}=r,x=(0,FW.Z)(r,I9),w=r,S=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},O9,t)})(w),k={isDisabled:d,isHidden:h,goTo:p,label:f},C={isDisabled:m,isHidden:g,goTo:v,label:y},_=u?.previousIconButton??N9,M=(0,A9.Z)({elementType:_,externalSlotProps:c?.previousIconButton,additionalProps:{size:"medium",title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:"end",onClick:C.goTo},ownerState:(0,jW.Z)({},w,{hidden:C.isHidden}),className:(0,a.Z)(S.button,S.previousIconButton)}),T=u?.nextIconButton??N9,P=(0,A9.Z)({elementType:T,externalSlotProps:c?.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:(0,jW.Z)({},w,{hidden:k.isHidden}),className:(0,a.Z)(S.button,S.nextIconButton)}),D=u?.leftArrowIcon??B7,A=(0,A9.Z)({elementType:D,externalSlotProps:c?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:w,className:S.leftArrowIcon}),O=(0,FW.Z)(A,R9),I=u?.rightArrowIcon??V7,R=(0,A9.Z)({elementType:I,externalSlotProps:c?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:w,className:S.rightArrowIcon}),E=(0,FW.Z)(R,E9);return(0,o.jsxs)(L9,(0,jW.Z)({ref:t,className:(0,a.Z)(S.root,l),ownerState:w},x,{children:[(0,o.jsx)(_,(0,jW.Z)({},M,{children:n?(0,o.jsx)(I,(0,jW.Z)({},E)):(0,o.jsx)(D,(0,jW.Z)({},O))})),i?(0,o.jsx)(Mc.Z,{variant:"subtitle1",component:"span",id:b,children:i}):(0,o.jsx)(Z9,{className:S.spacer,ownerState:w}),(0,o.jsx)(T,(0,jW.Z)({},P,{children:n?(0,o.jsx)(D,(0,jW.Z)({},O)):(0,o.jsx)(I,(0,jW.Z)({},E))}))]}))}));var F9=n(81925),z9=n(9831);function B9({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:a,focusedView:s,onFocusedViewChange:l}){const u=i.useRef(n),c=i.useRef(o),d=i.useRef(o.includes(n)?n:o[0]),[h,p]=(0,z9.Z)({name:"useViews",state:"view",controlled:r,default:d.current}),f=i.useRef(a?h:null),[m,g]=(0,z9.Z)({name:"useViews",state:"focusedView",controlled:s,default:f.current});i.useEffect((()=>{(u.current&&u.current!==n||c.current&&c.current.some((e=>!o.includes(e))))&&(p(o.includes(n)?n:o[0]),c.current=o,u.current=n)}),[n,p,h,o]);const v=o.indexOf(h),y=o[v-1]??null,b=o[v+1]??null,x=(0,F9.Z)(((e,t)=>{g(t?e:t=>e===t?null:t),l?.(e,t)})),w=(0,F9.Z)((e=>{x(e,!0),e!==h&&(p(e),t&&t(e))})),S=(0,F9.Z)((()=>{b&&w(b)})),k=(0,F9.Z)(((t,n,r)=>{const i="finish"===n,a=r?o.indexOf(r){const r=t-q9.x,o=n-q9.y,i=Math.atan2(G9,K9)-Math.atan2(r,o);let a=i*(180/Math.PI);a=Math.round(a/e)*e,a%=360;const s=r**2+o**2;return{value:Math.floor(a/e)||0,distance:Math.sqrt(s)}};function X9(e){return(0,g.ZP)("MuiClockPointer",e)}(0,m.Z)("MuiClockPointer",["root","thumb"]);const Q9=["className","hasSelected","isInner","type","viewValue"],J9=(0,d.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"])}}]}))),eee=(0,d.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 tee(e){const t=(0,m7.Z)({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:l,viewValue:u}=t,c=(0,FW.Z)(t,Q9),d=i.useRef(l);i.useEffect((()=>{d.current=l}),[l]);const h=(0,jW.Z)({},t,{shouldAnimate:d.current!==l}),p=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],thumb:["thumb"]},X9,t)})(h);return(0,o.jsx)(J9,(0,jW.Z)({style:(()=>{let e=360/("hours"===l?12:60)*u;return"hours"===l&&u>12&&(e-=360),{height:Math.round((r?.26:.4)*W9),transform:`rotateZ(${e}deg)`}})(),className:(0,a.Z)(p.root,n),ownerState:h},c,{children:(0,o.jsx)(eee,{ownerState:h,className:p.thumb})}))}function nee(e){return(0,g.ZP)("MuiClock",e)}(0,m.Z)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const ree=(0,d.ZP)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)}))),oee=(0,d.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"}),iee=(0,d.ZP)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),aee=(0,d.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"}}}]}),see=(0,d.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%)"}))),lee=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:U9,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}}}]}),uee=(0,d.ZP)(M.Z,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})((({theme:e})=>(0,jW.Z)({},lee(e,"am"),{position:"absolute",left:8}))),cee=(0,d.ZP)(M.Z,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})((({theme:e})=>(0,jW.Z)({},lee(e,"pm"),{position:"absolute",right:8}))),dee=(0,d.ZP)(Mc.Z,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function hee(e){const t=(0,m7.Z)({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:l,children:u,value:c,handleMeridiemChange:d,isTimeDisabled:h,meridiemMode:p,minutesStep:f=1,onChange:m,selectedId:g,type:v,viewValue:y,viewRange:[b,x],disabled:w=!1,readOnly:S,className:k}=t,C=t,_=_7(),M=U7(),T=i.useRef(!1),P=(e=>{const{classes:t,meridiemMode:n}=e,r={root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]};return(0,s.Z)(r,nee,t)})(C),D=h(y,v),A=!n&&"hours"===v&&(y<1||y>12),O=(e,t)=>{w||S||h(e,v)||m(e,t)},I=(e,t)=>{let{offsetX:r,offsetY:o}=e;if(void 0===r){const t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,o=e.changedTouches[0].clientY-t.top}const i="seconds"===v||"minutes"===v?((e,t,n=1)=>{const r=6*n;let{value:o}=Y9(r,e,t);return o=o*n%60,o})(r,o,f):((e,t,n)=>{const{value:r,distance:o}=Y9(30,e,t);let i=r||12;return n?i%=12:o<74&&(i+=12,i%=24),i})(r,o,Boolean(n));O(i,t)},R=e=>{T.current=!0,I(e,"shallow")},E=i.useMemo((()=>"hours"===v||y%5==0),[v,y]),L="minutes"===v?f:1,Z=i.useRef(null);(0,H9.Z)((()=>{l&&Z.current.focus()}),[l]);const N=e=>Math.max(b,Math.min(x,e)),j=e=>(e+(x+1))%(x+1);return(0,o.jsxs)(ree,{className:(0,a.Z)(P.root,k),children:[(0,o.jsxs)(oee,{className:P.clock,children:[(0,o.jsx)(aee,{onTouchMove:R,onTouchStart:R,onTouchEnd:e=>{T.current&&(I(e,"finish"),T.current=!1),e.preventDefault()},onMouseUp:e=>{T.current&&(T.current=!1),I(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&I(e.nativeEvent,"shallow")},ownerState:{disabled:w},className:P.squareMask}),!D&&(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(see,{className:P.pin}),null!=c&&(0,o.jsx)(tee,{type:v,viewValue:y,isInner:A,hasSelected:E})]}),(0,o.jsx)(iee,{"aria-activedescendant":g,"aria-label":M.clockLabelText(v,c,_,null==c?null:_.format(c,"fullTime")),ref:Z,role:"listbox",onKeyDown:e=>{if(!T.current)switch(e.key){case"Home":O(b,"partial"),e.preventDefault();break;case"End":O(x,"partial"),e.preventDefault();break;case"ArrowUp":O(j(y+L),"partial"),e.preventDefault();break;case"ArrowDown":O(j(y-L),"partial"),e.preventDefault();break;case"PageUp":O(N(y+5),"partial"),e.preventDefault();break;case"PageDown":O(N(y-5),"partial"),e.preventDefault();break;case"Enter":case" ":O(y,"finish"),e.preventDefault()}},tabIndex:0,className:P.wrapper,children:u})]}),n&&r&&(0,o.jsxs)(i.Fragment,{children:[(0,o.jsx)(uee,{onClick:S?void 0:()=>d("am"),disabled:w||null===p,ownerState:C,className:P.amButton,title:R7(_,"am"),children:(0,o.jsx)(dee,{variant:"caption",className:P.meridiemText,children:R7(_,"am")})}),(0,o.jsx)(cee,{disabled:w||null===p,onClick:S?void 0:()=>d("pm"),ownerState:C,className:P.pmButton,title:R7(_,"pm"),children:(0,o.jsx)(dee,{variant:"caption",className:P.meridiemText,children:R7(_,"pm")})})]})]})}function pee(e){return(0,g.ZP)("MuiClockNumber",e)}const fee=(0,m.Z)("MuiClockNumber",["root","selected","disabled"]),mee=["className","disabled","index","inner","label","selected"],gee=(0,d.ZP)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${fee.disabled}`]:t.disabled},{[`&.${fee.selected}`]:t.selected}]})((({theme:e})=>({height:U9,width:U9,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},[`&.${fee.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${fee.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,jW.Z)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]})));function vee(e){const t=(0,m7.Z)({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:l,label:u,selected:c}=t,d=(0,FW.Z)(t,mee),h=t,p=(e=>{const{classes:t,selected:n,disabled:r}=e,o={root:["root",n&&"selected",r&&"disabled"]};return(0,s.Z)(o,pee,t)})(h),f=i%12/12*Math.PI*2-Math.PI/2,m=91*(l?.65:1),g=Math.round(Math.cos(f)*m),v=Math.round(Math.sin(f)*m);return(0,o.jsx)(gee,(0,jW.Z)({className:(0,a.Z)(p.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!c||void 0,role:"option",style:{transform:`translate(${g}px, ${v+92}px`},ownerState:h},d,{children:u}))}const yee=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,utils:a})=>{const s=t?a.getHours(t):null,l=[],u=e?12:23,c=t=>null!==s&&(e?12===t?12===s||0===s:s===t||s-12===t:s===t);for(let t=e?1:0;t<=u;t+=1){let s=t.toString();0===t&&(s="00");const u=!e&&(0===t||t>12);s=a.formatNumber(s);const d=c(t);l.push((0,o.jsx)(vee,{id:d?i:void 0,index:t,inner:u,selected:d,disabled:r(t),label:s,"aria-label":n(s)},t))}return l},bee=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{const a=e.formatNumber;return[[5,a("05")],[10,a("10")],[15,a("15")],[20,a("20")],[25,a("25")],[30,a("30")],[35,a("35")],[40,a("40")],[45,a("45")],[50,a("50")],[55,a("55")],[0,a("00")]].map((([e,a],s)=>{const l=e===t;return(0,o.jsx)(vee,{label:a,id:l?i:void 0,index:s+1,inner:!1,disabled:n(e),selected:l,"aria-label":r(a)},e)}))},xee=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:o,valueManager:a})=>{const s=_7(),l=i.useRef(n),u=t??l.current??a.emptyValue,c=i.useMemo((()=>a.getTimezone(s,u)),[s,a,u]),d=(0,F9.Z)((e=>null==c?e:a.setTimezone(s,c,e)));let h;h=e||(c||(r?s.getTimezone(r):"default"));return{value:i.useMemo((()=>a.setTimezone(s,h,u)),[a,s,h,u]),handleValueChange:(0,F9.Z)(((e,...t)=>{const n=d(e);o?.(n,...t)})),timezone:h}},wee=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:o,onChange:i,valueManager:a})=>{const[s,l]=(0,z9.Z)({name:e,state:"value",controlled:n,default:r??a.emptyValue}),u=(0,F9.Z)(((e,...t)=>{l(e),i?.(e,...t)}));return xee({timezone:t,value:s,defaultValue:void 0,referenceDate:o,onChange:u,valueManager:a})},See={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},kee=(e,t,n)=>{if(t===See.year)return e.startOfYear(n);if(t===See.month)return e.startOfMonth(n);if(t===See.day)return e.startOfDay(n);let r=n;return t{const n=e.formatTokenMap[t];if(null==n)throw new Error([`MUI X: The token "${t}" is not supported by the Date and Time Pickers.`,"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."].join("\n"));return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},_ee=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map((n=>e.formatByString(n,t)))},Mee=(e,t,n,r)=>{switch(n){case"month":return O7(e,e.date(void 0,t)).map((t=>e.formatByString(t,r)));case"weekDay":return _ee(e,r);case"meridiem":{const n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map((t=>e.formatByString(t,r)))}default:return[]}},Tee=["0","1","2","3","4","5","6","7","8","9"],Pee=(e,t)=>{if("0"===t[0])return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},Dee=(e,t)=>"0"===t[0]?e:e.split("").map((e=>t[Number(e)])).join(""),Aee=(e,t)=>{const n=Pee(e,t);return" "!==n&&!Number.isNaN(Number(n))},Oee=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if("day"===o.type&&"digit-with-letter"===o.contentType){const r=e.setDate(n.longestMonth,t);return e.formatByString(r,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Oee(i,o.maxLength)),Dee(i,r)},Ree=(e,t,n,r,o,i,a,s)=>{const l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}})(r),u="Home"===r,c="End"===r,d=""===n.value||u||c;return"digit"===n.contentType||"digit-with-letter"===n.contentType?(()=>{const r=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),h=t=>Iee(e,t,r,i,n),p="minutes"===n.type&&s?.minutesStep?s.minutesStep:1;let f;if(d){if("year"===n.type&&!c&&!u)return e.formatByString(e.date(void 0,t),n.format);f=l>0||u?r.minimum:r.maximum}else f=parseInt(Pee(n.value,i),10)+l*p;return f%p!=0&&((l<0||u)&&(f+=p-(p+f)%p),(l>0||c)&&(f-=f%p)),f>r.maximum?h(r.minimum+(f-r.maximum-1)%(r.maximum-r.minimum+1)):f{const r=Mee(e,t,n.type,n.format);if(0===r.length)return n.value;if(d)return l>0||u?r[0]:r[r.length-1];const o=r.indexOf(n.value);return r[((o+l)%r.length+r.length)%r.length]})()},Eee=(e,t,n)=>{let r=e.value||e.placeholder;const o="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Pee(r,n)).toString());return["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!o&&1===r.length&&(r=`${r}‎`),"input-rtl"===t&&(r=`⁨${r}⁩`),r},Lee=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),Zee=(e,t)=>4===e.formatByString(e.date(void 0,"system"),t).length,Nee=(e,t,n,r)=>{if("digit"!==t)return!1;const o=e.date(void 0,"default");switch(n){case"year":return"dayjs"===e.lib&&"YY"===r||e.formatByString(e.setYear(o,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}};const jee=(e,t)=>{0},Fee={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},zee=(e,t,n,r,o)=>[...n].sort(((e,t)=>Fee[e.type]-Fee[t.type])).reduce(((n,r)=>!o||r.modified?((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":{const r=_ee(e,t.format),o=e.formatByString(n,t.format),i=r.indexOf(o),a=r.indexOf(t.value)-i;return e.addDays(n,a)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const t=e.getHours(n)<12,o=e.getHours(r);return t&&o>=12?e.addHours(r,-12):!t&&o<12?e.addHours(r,12):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}})(e,r,t,n):n),r),Bee=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){const n=t.findIndex((t=>t.type===e));return-1===n?null:n}return e},Vee=(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");const 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}},$ee=(e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}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);const 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}},Hee=["value","referenceDate"],Wee={emptyValue:null,getTodayValue:I7,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,FW.Z)(e,Hee);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:o})=>{let i=o?o():kee(t,n,I7(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,i)&&(i=kee(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,i)&&(i=kee(t,n,e.maxDate));const a=v9(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&a(e.minTime,i)&&(i=kee(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:P7(t,i,e.minTime))),null!=e.maxTime&&a(i,e.maxTime)&&(i=kee(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:P7(t,i,e.maxTime))),i})(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)},Uee={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)=>{const r=e.map((e=>{const r=Eee(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`})).join("");return n?`⁦${r}⁩`: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)},qee=["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"],Gee=(0,d.ZP)(V9,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),Kee=(0,d.ZP)(j9,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),Yee=["hours","minutes"],Xee=i.forwardRef((function(e,t){const n=_7(),r=(0,m7.Z)({props:e,name:"MuiTimeClock"}),{ampm:l=n.is12HourCycleInCurrentLocale(),ampmInClock:u=!1,autoFocus:c,slots:d,slotProps:h,value:p,defaultValue:f,referenceDate:m,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:v,minTime:y,disableFuture:b,disablePast:x,minutesStep:w=1,shouldDisableTime:S,showViewSwitcher:k,onChange:C,view:_,views:M=Yee,openTo:T,onViewChange:P,focusedView:D,onFocusedViewChange:A,className:O,disabled:I,readOnly:R,timezone:E}=r,L=(0,FW.Z)(r,qee),{value:Z,handleValueChange:N,timezone:j}=wee({name:"TimeClock",timezone:E,value:p,defaultValue:f,referenceDate:m,onChange:C,valueManager:Wee}),F=(({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const a=i.useMemo((()=>Wee.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:See.day,timezone:o,getTodayDate:()=>I7(n,o,"date")})),[]);return e??a})({value:Z,referenceDate:m,utils:n,props:r,timezone:j}),z=U7(),B=T7(j),{view:V,setView:$,previousView:H,nextView:W,setValueAndGoToNextView:U}=B9({view:_,views:M,openTo:T,onViewChange:P,onChange:N,focusedView:D,onFocusedViewChange:A}),{meridiemMode:q,handleMeridiemChange:G}=y9(F,l,U),K=i.useCallback(((e,t)=>{const r=v9(g,n),o="hours"===t||"minutes"===t&&M.includes("seconds"),i=({start:e,end:t})=>(!y||!r(y,t))&&((!v||!r(e,v))&&((!b||!r(e,B))&&(!x||!r(B,o?t:e)))),a=(e,r=1)=>{if(e%r!=0)return!1;if(S)switch(t){case"hours":return!S(n.setHours(F,e),"hours");case"minutes":return!S(n.setMinutes(F,e),"minutes");case"seconds":return!S(n.setSeconds(F,e),"seconds");default:return!1}return!0};switch(t){case"hours":{const t=m9(e,q,l),r=n.setHours(F,t);if(n.getHours(r)!==t)return!0;return!i({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!a(t)}case"minutes":{const t=n.setMinutes(F,e);return!i({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!a(e,w)}case"seconds":{const t=n.setSeconds(F,e);return!i({start:t,end:t})||!a(e)}default:throw new Error("not supported")}}),[l,F,g,v,q,y,w,S,n,b,x,B,M]),Y=(0,D9.Z)(),X=i.useMemo((()=>{switch(V){case"hours":{const e=(e,t)=>{const r=m9(e,q,l);U(n.setHours(F,r),t,"hours")},t=n.getHours(F);let r;return r=l?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:yee({value:Z,utils:n,ampm:l,onChange:e,getClockNumberText:z.hoursClockNumberText,isDisabled:e=>I||K(e,"hours"),selectedId:Y}),viewRange:r}}case"minutes":{const e=n.getMinutes(F),t=(e,t)=>{U(n.setMinutes(F,e),t,"minutes")};return{viewValue:e,onChange:t,children:bee({utils:n,value:e,onChange:t,getClockNumberText:z.minutesClockNumberText,isDisabled:e=>I||K(e,"minutes"),selectedId:Y}),viewRange:[0,59]}}case"seconds":{const e=n.getSeconds(F),t=(e,t)=>{U(n.setSeconds(F,e),t,"seconds")};return{viewValue:e,onChange:t,children:bee({utils:n,value:e,onChange:t,getClockNumberText:z.secondsClockNumberText,isDisabled:e=>I||K(e,"seconds"),selectedId:Y}),viewRange:[0,59]}}default:throw new Error("You must provide the type for ClockView")}}),[V,n,Z,l,z.hoursClockNumberText,z.minutesClockNumberText,z.secondsClockNumberText,q,U,F,K,Y,I]),Q=r,J=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],arrowSwitcher:["arrowSwitcher"]},$9,t)})(Q);return(0,o.jsxs)(Gee,(0,jW.Z)({ref:t,className:(0,a.Z)(J.root,O),ownerState:Q},L,{children:[(0,o.jsx)(hee,(0,jW.Z)({autoFocus:c??!!D,ampmInClock:u&&M.includes("hours"),value:Z,type:V,ampm:l,minutesStep:w,isTimeDisabled:K,meridiemMode:q,handleMeridiemChange:G,selectedId:Y,disabled:I,readOnly:R},X)),k&&(0,o.jsx)(Kee,{className:J.arrowSwitcher,slots:d,slotProps:h,onGoToPrevious:()=>$(H),isPreviousDisabled:!H,previousLabel:z.openPreviousView,onGoToNext:()=>$(W),isNextDisabled:!W,nextLabel:z.openNextView,ownerState:Q})]}))})),Qee=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minTime:f,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:y,ampmInClock:b,slots:x,slotProps:w,readOnly:S,disabled:k,sx:C,autoFocus:_,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:T,timezone:P})=>(0,o.jsx)(Xee,{view:e,onViewChange:t,focusedView:n&&f9(n)?n:null,onFocusedViewChange:r,views:i.filter(f9),value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minTime:f,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:y,ampmInClock:b,slots:x,slotProps:w,readOnly:S,disabled:k,sx:C,autoFocus:_,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:T,timezone:P}),Jee=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,u=r.utils.date(void 0,n),c=A7(r.utils,e.minDate,r.defaultDates.minDate),d=A7(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case Boolean(o&&o(t)):return"shouldDisableDate";case Boolean(i&&i(t)):return"shouldDisableMonth";case Boolean(a&&a(t)):return"shouldDisableYear";case Boolean(l&&r.utils.isAfterDay(t,u)):return"disableFuture";case Boolean(s&&r.utils.isBeforeDay(t,u)):return"disablePast";case Boolean(c&&r.utils.isBeforeDay(t,c)):return"minDate";case Boolean(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};Jee.valueManager=Wee;const ete=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:s,timezone:l})=>{const u=C7();return i.useCallback((i=>null!==Jee({adapter:u,value:i,timezone:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:a,disablePast:s}})),[u,e,t,n,r,o,a,s,l])},tte=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:l,onMonthChange:u,reduceAnimations:c,shouldDisableDate:d,timezone:h}=e,p=_7(),f=i.useRef(((e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return(0,jW.Z)({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const e=o.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,jW.Z)({},r,{currentMonth:t})}case"finishMonthSwitchingAnimation":return(0,jW.Z)({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=r.focusedDay&&null!=o.focusedDay&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=null!=o.focusedDay&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return(0,jW.Z)({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:null!=o.focusedDay&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}})(Boolean(c),a,p)).current,m=i.useMemo((()=>Wee.getInitialReferenceValue({value:t,utils:p,timezone:h,props:e,referenceDate:n,granularity:See.day})),[n,h]),[g,v]=i.useReducer(f,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:p.startOfMonth(m),slideDirection:"left"});i.useEffect((()=>{v({type:"changeMonthTimezone",newTimezone:p.getTimezone(m)})}),[m,p]);const y=i.useCallback((e=>{v((0,jW.Z)({type:"changeMonth"},e)),u&&u(e.newMonth)}),[u]),b=i.useCallback((e=>{const t=e;p.isSameMonth(t,g.currentMonth)||y({newMonth:p.startOfMonth(t),direction:p.isAfterDay(t,g.currentMonth)?"left":"right"})}),[g.currentMonth,y,p]),x=ete({shouldDisableDate:d,minDate:l,maxDate:s,disableFuture:r,disablePast:o,timezone:h}),w=i.useCallback((()=>{v({type:"finishMonthSwitchingAnimation"})}),[]),S=(0,F9.Z)(((e,t)=>{x(e)||v({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}));return{referenceDate:m,calendarState:g,changeMonth:b,changeFocusedDay:S,isDateDisabled:x,onMonthSwitchingAnimationEnd:w,handleChangeMonth:y}};var nte=n(16317),rte=n(69761);const ote=e=>(0,g.ZP)("MuiPickersFadeTransitionGroup",e),ite=((0,m.Z)("MuiPickersFadeTransitionGroup",["root"]),(0,d.ZP)(nte.Z,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"}));function ate(e){const t=(0,m7.Z)({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:l}=t,u=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},ote,t)})(t),c=(0,oi.Z)();return i?n:(0,o.jsx)(ite,{className:(0,a.Z)(u.root,r),children:(0,o.jsx)(rte.Z,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:c.transitions.duration.enteringScreen,enter:c.transitions.duration.enteringScreen,exit:0},children:n},l)})}var ste=n(97048);function lte(e){return(0,g.ZP)("MuiPickersDay",e)}const ute=(0,m.Z)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),cte=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],dte=({theme:e})=>(0,jW.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,l.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,l.Fq)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${ute.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${ute.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}},[`&.${ute.disabled}:not(.${ute.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${ute.disabled}&.${ute.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(.${ute.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),hte=(e,t)=>{const{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]},pte=(0,d.ZP)(iu.Z,{name:"MuiPickersDay",slot:"Root",overridesResolver:hte})(dte),fte=(0,d.ZP)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:hte})((({theme:e})=>(0,jW.Z)({},dte({theme:e}),{opacity:0,pointerEvents:"none"}))),mte=()=>{},gte=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:l,day:u,disabled:c=!1,disableHighlightToday:d=!1,disableMargin:h=!1,isAnimating:p,onClick:f,onDaySelect:m,onFocus:g=mte,onBlur:v=mte,onKeyDown:y=mte,onMouseDown:b=mte,onMouseEnter:x=mte,outsideCurrentMonth:w,selected:S=!1,showDaysOutsideCurrentMonth:k=!1,children:C,today:_=!1}=n,M=(0,FW.Z)(n,cte),T=(0,jW.Z)({},n,{autoFocus:r,disabled:c,disableHighlightToday:d,disableMargin:h,selected:S,showDaysOutsideCurrentMonth:k,today:_}),P=(e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:l,classes:u}=e,c=a&&!l,d={root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&l&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]};return(0,s.Z)(d,lte,u)})(T),D=_7(),A=i.useRef(null),O=(0,ste.Z)(A,t);(0,H9.Z)((()=>{!r||c||p||w||A.current.focus()}),[r,c,p,w]);return w&&!k?(0,o.jsx)(fte,{className:(0,a.Z)(P.root,P.hiddenDaySpacingFiller,l),ownerState:T,role:M.role}):(0,o.jsx)(pte,(0,jW.Z)({className:(0,a.Z)(P.root,l),ref:O,centerRipple:!0,disabled:c,tabIndex:S?0:-1,onKeyDown:e=>y(e,u),onFocus:e=>g(e,u),onBlur:e=>v(e,u),onMouseEnter:e=>x(e,u),onClick:e=>{c||m(u),w&&e.currentTarget.focus(),f&&f(e)},onMouseDown:e=>{b(e),w&&e.preventDefault()}},M,{ownerState:T,children:C||D.format(u,"dayOfMonth")}))})),vte=i.memo(gte);var yte=n(54652);function bte(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var xte=n(98683),wte=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=bte(n.className,r):n.setAttribute("class",bte(n.className&&n.className.baseVal||"",r)));var n,r}))},Ste=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o(0,g.ZP)("MuiPickersSlideTransition",e),_te=(0,m.Z)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),Mte=["children","className","reduceAnimations","slideDirection","transKey","classes"],Tte=(0,d.ZP)(nte.Z,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${_te["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${_te["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${_te.slideEnterActive}`]:t.slideEnterActive},{[`.${_te.slideExit}`]:t.slideExit},{[`.${_te["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${_te["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})((({theme:e})=>{const 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},[`& .${_te["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${_te["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${_te.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${_te.slideExit}`]:{transform:"translate(0%)"},[`& .${_te["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${_te["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}));const Pte=e=>(0,g.ZP)("MuiDayCalendar",e),Dte=((0,m.Z)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]),["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"]),Ate=["ownerState"],Ote=(0,d.ZP)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ite=(0,d.ZP)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Rte=(0,d.ZP)(Mc.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}))),Ete=(0,d.ZP)(Mc.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}))),Lte=(0,d.ZP)(Mc.Z,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})((({theme:e})=>(0,jW.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"}))),Zte=(0,d.ZP)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),Nte=(0,d.ZP)((function(e){const t=(0,m7.Z)({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:l,transKey:u}=t,c=(0,FW.Z)(t,Mte),d=(e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,s.Z)(r,Cte,t)})(t),h=(0,oi.Z)();if(l)return(0,o.jsx)("div",{className:(0,a.Z)(d.root,r),children:n});const p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return(0,o.jsx)(Tte,{className:(0,a.Z)(d.root,r),childFactory:e=>i.cloneElement(e,{classNames:p}),role:"presentation",children:(0,o.jsx)(kte,(0,jW.Z)({mountOnEnter:!0,unmountOnExit:!0,timeout:h.transitions.duration.complex,classNames:p},c,{children:n}),u)})}),{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),jte=(0,d.ZP)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Fte=(0,d.ZP)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function zte(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:a,isDateDisabled:s,currentMonthNumber:l,isViewFocused:u}=e,c=(0,FW.Z)(e,Dte);const{disabled:d,disableHighlightToday:h,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:f,slots:m,slotProps:g,timezone:v}=t,y=_7(),b=T7(v),x=null!==r&&y.isSameDay(n,r),w=a.some((e=>y.isSameDay(e,n))),S=y.isSameDay(n,b),k=m?.day??vte,C=(0,A9.Z)({elementType:k,externalSlotProps:g?.day,additionalProps:(0,jW.Z)({disableHighlightToday:h,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:p,"data-timestamp":y.toJsDate(n).valueOf()},c),ownerState:(0,jW.Z)({},t,{day:n,selected:w})}),_=(0,FW.Z)(C,Ate),M=i.useMemo((()=>d||s(n)),[d,s,n]),T=i.useMemo((()=>y.getMonth(n)!==l),[y,n,l]),P=i.useMemo((()=>{const e=y.startOfMonth(y.setMonth(n,l));return f?y.isSameDay(n,y.startOfWeek(e)):y.isSameDay(n,e)}),[l,n,f,y]),D=i.useMemo((()=>{const e=y.endOfMonth(y.setMonth(n,l));return f?y.isSameDay(n,y.endOfWeek(e)):y.isSameDay(n,e)}),[l,n,f,y]);return(0,o.jsx)(k,(0,jW.Z)({},_,{day:n,disabled:M,autoFocus:u&&x,today:S,outsideCurrentMonth:T,isFirstVisibleCell:P,isLastVisibleCell:D,selected:w,tabIndex:x?0:-1,"aria-selected":w,"aria-current":S?"date":void 0}))}function Bte(e){const t=(0,m7.Z)({props:e,name:"MuiDayCalendar"}),n=_7(),{onFocusedDayChange:r,className:l,currentMonth:u,selectedDays:c,focusedDay:d,loading:h,onSelectedDaysChange:p,onMonthSwitchingAnimationEnd:f,readOnly:m,reduceAnimations:g,renderLoading:v=()=>(0,o.jsx)("span",{children:"..."}),slideDirection:y,TransitionProps:b,disablePast:x,disableFuture:w,minDate:S,maxDate:k,shouldDisableDate:C,shouldDisableMonth:_,shouldDisableYear:M,dayOfWeekFormatter:T=e=>n.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:P,onFocusedViewChange:D,gridLabelId:A,displayWeekNumber:O,fixedWeekNumber:I,autoFocus:R,timezone:E}=t,L=T7(E),Z=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Pte,t)})(t),N=(0,cp.V)(),j=ete({shouldDisableDate:C,shouldDisableMonth:_,shouldDisableYear:M,minDate:S,maxDate:k,disablePast:x,disableFuture:w,timezone:E}),F=U7(),[z,B]=(0,z9.Z)({name:"DayCalendar",state:"hasFocus",controlled:P,default:R??!1}),[V,$]=i.useState((()=>d||L)),H=(0,F9.Z)((e=>{m||p(e)})),W=e=>{j(e)||(r(e),$(e),D?.(!0),B(!0))},U=(0,F9.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":{const r=n.addDays(t,N?1:-1),o=n.addMonths(t,N?1:-1),i=D7({utils:n,date:r,minDate:N?r:n.startOfMonth(o),maxDate:N?n.endOfMonth(o):r,isDateDisabled:j,timezone:E});W(i||r),e.preventDefault();break}case"ArrowRight":{const r=n.addDays(t,N?-1:1),o=n.addMonths(t,N?-1:1),i=D7({utils:n,date:r,minDate:N?n.startOfMonth(o):r,maxDate:N?r:n.endOfMonth(o),isDateDisabled:j,timezone:E});W(i||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()}})),q=(0,F9.Z)(((e,t)=>W(t))),G=(0,F9.Z)(((e,t)=>{z&&n.isSameDay(V,t)&&D?.(!1)})),K=n.getMonth(u),Y=n.getYear(u),X=i.useMemo((()=>c.filter((e=>!!e)).map((e=>n.startOfDay(e)))),[n,c]),Q=`${Y}-${K}`,J=i.useMemo((()=>i.createRef()),[Q]),ee=i.useMemo((()=>{const e=n.startOfMonth(u),t=n.endOfMonth(u);return j(V)||n.isAfterDay(V,t)||n.isBeforeDay(V,e)?D7({utils:n,date:V,minDate:e,maxDate:t,disablePast:x,disableFuture:w,isDateDisabled:j,timezone:E}):V}),[u,w,x,V,j,n,E]),te=i.useMemo((()=>{const e=n.getWeekArray(u);let t=n.addMonths(u,1);for(;I&&e.length{e.length(0,o.jsx)(Rte,{variant:"caption",role:"columnheader","aria-label":n.format(e,"weekday"),className:Z.weekDayLabel,children:T(e)},t.toString())))]}),h?(0,o.jsx)(Zte,{className:Z.loadingContainer,children:v()}):(0,o.jsx)(Nte,(0,jW.Z)({transKey:Q,onExited:f,reduceAnimations:g,slideDirection:y,className:(0,a.Z)(l,Z.slideTransition)},b,{nodeRef:J,children:(0,o.jsx)(jte,{ref:J,role:"rowgroup",className:Z.monthContainer,children:te.map(((e,r)=>(0,o.jsxs)(Fte,{role:"row",className:Z.weekContainer,"aria-rowindex":r+1,children:[O&&(0,o.jsx)(Lte,{className:Z.weekNumber,role:"rowheader","aria-label":F.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:F.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map(((e,n)=>(0,o.jsx)(zte,{parentProps:t,day:e,selectedDays:X,focusableDay:ee,onKeyDown:U,onFocus:q,onBlur:G,onDaySelect:H,isDateDisabled:j,currentMonthNumber:K,isViewFocused:z,"aria-colindex":n+1},e.toString())))]},`week-${e[0]}`)))})}))]})}function Vte(e){return(0,g.ZP)("MuiPickersMonth",e)}const $te=(0,m.Z)("MuiPickersMonth",["root","monthButton","disabled","selected"]),Hte=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Wte=(0,d.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%"}}]}),Ute=(0,d.ZP)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${$te.disabled}`]:t.disabled},{[`&.${$te.selected}`]:t.selected}]})((({theme:e})=>(0,jW.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,l.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,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${$te.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${$te.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}}))),qte=i.memo((function(e){const t=(0,m7.Z)({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:l,disabled:u,selected:c,value:d,tabIndex:h,onClick:p,onKeyDown:f,onFocus:m,onBlur:g,"aria-current":v,"aria-label":y,slots:b,slotProps:x}=t,w=(0,FW.Z)(t,Hte),S=i.useRef(null),k=(e=>{const{disabled:t,selected:n,classes:r}=e,o={root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]};return(0,s.Z)(o,Vte,r)})(t);(0,H9.Z)((()=>{n&&S.current?.focus()}),[n]);const C=b?.monthButton??Ute,_=(0,A9.Z)({elementType:C,externalSlotProps:x?.monthButton,additionalProps:{children:l,disabled:u,tabIndex:h,ref:S,type:"button",role:"radio","aria-current":v,"aria-checked":c,"aria-label":y,onClick:e=>p(e,d),onKeyDown:e=>f(e,d),onFocus:e=>m(e,d),onBlur:e=>g(e,d)},ownerState:t,className:k.monthButton});return(0,o.jsx)(Wte,(0,jW.Z)({className:(0,a.Z)(k.root,r),ownerState:t},w,{children:(0,o.jsx)(C,(0,jW.Z)({},_))}))}));function Gte(e){return(0,g.ZP)("MuiMonthCalendar",e)}(0,m.Z)("MuiMonthCalendar",["root"]);const Kte=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"];const Yte=(0,d.ZP)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:b9,boxSizing:"border-box"}),Xte=i.forwardRef((function(e,t){const n=function(e,t){const n=_7(),r=M7(),o=(0,m7.Z)({props:e,name:t});return(0,jW.Z)({disableFuture:!1,disablePast:!1},o,{minDate:A7(n,o.minDate,r.minDate),maxDate:A7(n,o.maxDate,r.maxDate)})}(e,"MuiMonthCalendar"),{className:r,value:l,defaultValue:u,referenceDate:c,disabled:d,disableFuture:h,disablePast:p,maxDate:f,minDate:m,onChange:g,shouldDisableMonth:v,readOnly:y,autoFocus:b=!1,onMonthFocus:x,hasFocus:w,onFocusedViewChange:S,monthsPerRow:k=3,timezone:C,gridLabelId:_,slots:M,slotProps:T}=n,P=(0,FW.Z)(n,Kte),{value:D,handleValueChange:A,timezone:O}=wee({name:"MonthCalendar",timezone:C,value:l,defaultValue:u,referenceDate:c,onChange:g,valueManager:Wee}),I=T7(O),R=(0,cp.V)(),E=_7(),L=i.useMemo((()=>Wee.getInitialReferenceValue({value:D,utils:E,props:n,timezone:O,referenceDate:c,granularity:See.month})),[]),Z=n,N=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},Gte,t)})(Z),j=i.useMemo((()=>E.getMonth(I)),[E,I]),F=i.useMemo((()=>null!=D?E.getMonth(D):null),[D,E]),[z,B]=i.useState((()=>F||E.getMonth(L))),[V,$]=(0,z9.Z)({name:"MonthCalendar",state:"hasFocus",controlled:w,default:b??!1}),H=(0,F9.Z)((e=>{$(e),S&&S(e)})),W=i.useCallback((e=>{const t=E.startOfMonth(p&&E.isAfter(I,m)?I:m),n=E.startOfMonth(h&&E.isBefore(I,f)?I:f),r=E.startOfMonth(e);return!!E.isBefore(r,t)||(!!E.isAfter(r,n)||!!v&&v(r))}),[h,p,f,m,I,v,E]),U=(0,F9.Z)(((e,t)=>{if(y)return;const n=E.setMonth(D??L,t);A(n)})),q=(0,F9.Z)((e=>{W(E.setMonth(D??L,e))||(B(e),H(!0),x&&x(e))}));i.useEffect((()=>{B((e=>null!==F&&e!==F?F:e))}),[F]);const G=(0,F9.Z)(((e,t)=>{const n=12;switch(e.key){case"ArrowUp":q((n+t-3)%n),e.preventDefault();break;case"ArrowDown":q((n+t+3)%n),e.preventDefault();break;case"ArrowLeft":q((n+t+(R?1:-1))%n),e.preventDefault();break;case"ArrowRight":q((n+t+(R?-1:1))%n),e.preventDefault()}})),K=(0,F9.Z)(((e,t)=>{q(t)})),Y=(0,F9.Z)(((e,t)=>{z===t&&H(!1)}));return(0,o.jsx)(Yte,(0,jW.Z)({ref:t,className:(0,a.Z)(N.root,r),ownerState:Z,role:"radiogroup","aria-labelledby":_},P,{children:O7(E,D??L).map((e=>{const t=E.getMonth(e),n=E.format(e,"monthShort"),r=E.format(e,"month"),i=t===F,a=d||W(e);return(0,o.jsx)(qte,{selected:i,value:t,onClick:U,onKeyDown:G,autoFocus:V&&t===z,disabled:a,tabIndex:t!==z||a?-1:0,onFocus:K,onBlur:Y,"aria-current":j===t?"date":void 0,"aria-label":r,monthsPerRow:k,slots:M,slotProps:T,children:n},n)}))}))}));function Qte(e){return(0,g.ZP)("MuiPickersYear",e)}const Jte=(0,m.Z)("MuiPickersYear",["root","yearButton","selected","disabled"]),ene=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],tne=(0,d.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%"}}]}),nne=(0,d.ZP)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Jte.disabled}`]:t.disabled},{[`&.${Jte.selected}`]:t.selected}]})((({theme:e})=>(0,jW.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,l.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,l.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Jte.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Jte.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}}))),rne=i.memo((function(e){const t=(0,m7.Z)({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:l,disabled:u,selected:c,value:d,tabIndex:h,onClick:p,onKeyDown:f,onFocus:m,onBlur:g,"aria-current":v,slots:y,slotProps:b}=t,x=(0,FW.Z)(t,ene),w=i.useRef(null),S=(e=>{const{disabled:t,selected:n,classes:r}=e,o={root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]};return(0,s.Z)(o,Qte,r)})(t);(0,H9.Z)((()=>{n&&w.current?.focus()}),[n]);const k=y?.yearButton??nne,C=(0,A9.Z)({elementType:k,externalSlotProps:b?.yearButton,additionalProps:{children:l,disabled:u,tabIndex:h,ref:w,type:"button",role:"radio","aria-current":v,"aria-checked":c,onClick:e=>p(e,d),onKeyDown:e=>f(e,d),onFocus:e=>m(e,d),onBlur:e=>g(e,d)},ownerState:t,className:S.yearButton});return(0,o.jsx)(tne,(0,jW.Z)({className:(0,a.Z)(S.root,r),ownerState:t},x,{children:(0,o.jsx)(k,(0,jW.Z)({},C))}))}));function one(e){return(0,g.ZP)("MuiYearCalendar",e)}(0,m.Z)("MuiYearCalendar",["root"]);const ine=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"];const ane=(0,d.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:b9,maxHeight:280,boxSizing:"border-box",position:"relative"}),sne=i.forwardRef((function(e,t){const n=function(e,t){const n=_7(),r=M7(),o=(0,m7.Z)({props:e,name:t});return(0,jW.Z)({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:A7(n,o.minDate,r.minDate),maxDate:A7(n,o.maxDate,r.maxDate)})}(e,"MuiYearCalendar"),{autoFocus:r,className:l,value:u,defaultValue:c,referenceDate:d,disabled:h,disableFuture:p,disablePast:f,maxDate:m,minDate:g,onChange:v,readOnly:y,shouldDisableYear:b,onYearFocus:x,hasFocus:w,onFocusedViewChange:S,yearsOrder:k="asc",yearsPerRow:C,timezone:_,gridLabelId:M,slots:T,slotProps:P}=n,D=(0,FW.Z)(n,ine),{value:A,handleValueChange:O,timezone:I}=wee({name:"YearCalendar",timezone:_,value:u,defaultValue:c,referenceDate:d,onChange:v,valueManager:Wee}),R=T7(I),E=(0,cp.V)(),L=_7(),Z=i.useMemo((()=>Wee.getInitialReferenceValue({value:A,utils:L,props:n,timezone:I,referenceDate:d,granularity:See.year})),[]),N=n,j=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"]},one,t)})(N),F=i.useMemo((()=>L.getYear(R)),[L,R]),z=i.useMemo((()=>null!=A?L.getYear(A):null),[A,L]),[B,V]=i.useState((()=>z||L.getYear(Z))),[$,H]=(0,z9.Z)({name:"YearCalendar",state:"hasFocus",controlled:w,default:r??!1}),W=(0,F9.Z)((e=>{H(e),S&&S(e)})),U=i.useCallback((e=>{if(f&&L.isBeforeYear(e,R))return!0;if(p&&L.isAfterYear(e,R))return!0;if(g&&L.isBeforeYear(e,g))return!0;if(m&&L.isAfterYear(e,m))return!0;if(!b)return!1;const t=L.startOfYear(e);return b(t)}),[p,f,m,g,R,b,L]),q=(0,F9.Z)(((e,t)=>{if(y)return;const n=L.setYear(A??Z,t);O(n)})),G=(0,F9.Z)((e=>{U(L.setYear(A??Z,e))||(V(e),W(!0),x?.(e))}));i.useEffect((()=>{V((e=>null!==z&&e!==z?z:e))}),[z]);const K="desc"!==k?1*C:-1*C,Y=E&&"asc"===k||!E&&"desc"===k?-1:1,X=(0,F9.Z)(((e,t)=>{switch(e.key){case"ArrowUp":G(t-K),e.preventDefault();break;case"ArrowDown":G(t+K),e.preventDefault();break;case"ArrowLeft":G(t-Y),e.preventDefault();break;case"ArrowRight":G(t+Y),e.preventDefault()}})),Q=(0,F9.Z)(((e,t)=>{G(t)})),J=(0,F9.Z)(((e,t)=>{B===t&&W(!1)})),ee=i.useRef(null),te=(0,ste.Z)(t,ee);i.useEffect((()=>{if(r||null===ee.current)return;const e=ee.current.querySelector('[tabindex="0"]');if(!e)return;const t=e.offsetHeight,n=e.offsetTop,o=ee.current.clientHeight,i=ee.current.scrollTop,a=n+t;t>o||n{const t=L.getYear(e),n=t===z,r=h||U(e);return(0,o.jsx)(rne,{selected:n,value:t,onClick:q,onKeyDown:X,autoFocus:$&&t===B,disabled:r,tabIndex:t!==B||r?-1:0,onFocus:Q,onBlur:J,"aria-current":F===t?"date":void 0,yearsPerRow:C,slots:T,slotProps:P,children:L.format(e,"year")},L.format(e,"year"))}))}))})),lne=e=>(0,g.ZP)("MuiPickersCalendarHeader",e),une=(0,m.Z)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),cne=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],dne=["ownerState"],hne=(0,d.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}),pne=(0,d.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})((({theme:e})=>(0,jW.Z)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium}))),fne=(0,d.ZP)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),mne=(0,d.ZP)(M.Z,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${une.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),gne=(0,d.ZP)(z7,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})((({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"}))),vne=i.forwardRef((function(e,t){const n=U7(),r=_7(),l=(0,m7.Z)({props:e,name:"MuiPickersCalendarHeader"}),{slots:u,slotProps:c,currentMonth:d,disabled:h,disableFuture:p,disablePast:f,maxDate:m,minDate:g,onMonthChange:v,onViewChange:y,view:b,reduceAnimations:x,views:w,labelId:S,className:k,timezone:C,format:_=`${r.formats.month} ${r.formats.year}`}=l,M=(0,FW.Z)(l,cne),T=l,P=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},lne,t)})(l),D=u?.switchViewButton??mne,A=(0,A9.Z)({elementType:D,externalSlotProps:c?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(b)},ownerState:T,className:P.switchViewButton}),O=u?.switchViewIcon??gne,I=(0,A9.Z)({elementType:O,externalSlotProps:c?.switchViewIcon,ownerState:T,className:P.switchViewIcon}),R=(0,FW.Z)(I,dne),E=function(e,{disableFuture:t,maxDate:n,timezone:r}){const o=_7();return i.useMemo((()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)}),[t,n,e,o,r])}(d,{disableFuture:p,maxDate:m,timezone:C}),L=function(e,{disablePast:t,minDate:n,timezone:r}){const o=_7();return i.useMemo((()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)}),[t,n,e,o,r])}(d,{disablePast:f,minDate:g,timezone:C});if(1===w.length&&"year"===w[0])return null;const Z=r.formatByString(d,_);return(0,o.jsxs)(hne,(0,jW.Z)({},M,{ownerState:T,className:(0,a.Z)(P.root,k),ref:t,children:[(0,o.jsxs)(pne,{role:"presentation",onClick:()=>{if(1!==w.length&&y&&!h)if(2===w.length)y(w.find((e=>e!==b))||w[0]);else{const e=0!==w.indexOf(b)?0:1;y(w[e])}},ownerState:T,"aria-live":"polite",className:P.labelContainer,children:[(0,o.jsx)(ate,{reduceAnimations:x,transKey:Z,children:(0,o.jsx)(fne,{id:S,ownerState:T,className:P.label,children:Z})}),w.length>1&&!h&&(0,o.jsx)(D,(0,jW.Z)({},A,{children:(0,o.jsx)(O,(0,jW.Z)({},R))}))]}),(0,o.jsx)(rte.Z,{in:"day"===b,appear:!x,enter:!x,children:(0,o.jsx)(j9,{slots:u,slotProps:c,onGoToPrevious:()=>v(r.addMonths(d,-1),"right"),isPreviousDisabled:L,previousLabel:n.previousMonth,onGoToNext:()=>v(r.addMonths(d,1),"left"),isNextDisabled:E,nextLabel:n.nextMonth})})]}))})),yne="undefined"!=typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),bne=yne&&yne[1]?parseInt(yne[1],10):null,xne=yne&&yne[2]?parseInt(yne[2],10):null,wne=bne&&bne<10||xne&&xne<13||!1,Sne=e=>(0,g.ZP)("MuiDateCalendar",e),kne=((0,m.Z)("MuiDateCalendar",["root","viewTransitionContainer"]),["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"]);function Cne(e,t){const n=_7(),r=M7(),i=(0,up.Z)("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||wne,a=(0,m7.Z)({props:e,name:t});return(0,jW.Z)({},a,{loading:a.loading??!1,disablePast:a.disablePast??!1,disableFuture:a.disableFuture??!1,openTo:a.openTo??"day",views:a.views??["year","day"],reduceAnimations:a.reduceAnimations??i,renderLoading:a.renderLoading??(()=>(0,o.jsx)("span",{children:"..."})),minDate:A7(n,a.minDate,r.minDate),maxDate:A7(n,a.maxDate,r.maxDate)})}const _ne=(0,d.ZP)(V9,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),Mne=(0,d.ZP)(ate,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Tne=i.forwardRef((function(e,t){const n=_7(),r=(0,D9.Z)(),l=Cne(e,"MuiDateCalendar"),{autoFocus:u,onViewChange:c,value:d,defaultValue:h,referenceDate:p,disableFuture:f,disablePast:m,onChange:g,onYearChange:v,onMonthChange:y,reduceAnimations:b,shouldDisableDate:x,shouldDisableMonth:w,shouldDisableYear:S,view:k,views:C,openTo:_,className:M,disabled:T,readOnly:P,minDate:D,maxDate:A,disableHighlightToday:O,focusedView:I,onFocusedViewChange:R,showDaysOutsideCurrentMonth:E,fixedWeekNumber:L,dayOfWeekFormatter:Z,slots:N,slotProps:j,loading:F,renderLoading:z,displayWeekNumber:B,yearsOrder:V,yearsPerRow:$,monthsPerRow:H,timezone:W}=l,U=(0,FW.Z)(l,kne),{value:q,handleValueChange:G,timezone:K}=wee({name:"DateCalendar",timezone:W,value:d,defaultValue:h,referenceDate:p,onChange:g,valueManager:Wee}),{view:Y,setView:X,focusedView:Q,setFocusedView:J,goToNextView:ee,setValueAndGoToNextView:te}=B9({view:k,views:C,openTo:_,onChange:G,onViewChange:c,autoFocus:u,focusedView:I,onFocusedViewChange:R}),{referenceDate:ne,calendarState:re,changeFocusedDay:oe,changeMonth:ie,handleChangeMonth:ae,isDateDisabled:se,onMonthSwitchingAnimationEnd:le}=tte({value:q,referenceDate:p,reduceAnimations:b,onMonthChange:y,minDate:D,maxDate:A,shouldDisableDate:x,disablePast:m,disableFuture:f,timezone:K}),ue=T&&q||D,ce=T&&q||A,de=`${r}-grid-label`,he=null!==Q,pe=N?.calendarHeader??vne,fe=(0,A9.Z)({elementType:pe,externalSlotProps:j?.calendarHeader,additionalProps:{views:C,view:Y,currentMonth:re.currentMonth,onViewChange:X,onMonthChange:(e,t)=>ae({newMonth:e,direction:t}),minDate:ue,maxDate:ce,disabled:T,disablePast:m,disableFuture:f,reduceAnimations:b,timezone:K,labelId:de},ownerState:l}),me=(0,F9.Z)((e=>{const t=n.startOfMonth(e),r=n.endOfMonth(e),o=se(e)?D7({utils:n,date:e,minDate:n.isBefore(D,t)?t:D,maxDate:n.isAfter(A,r)?r:A,disablePast:m,disableFuture:f,isDateDisabled:se,timezone:K}):e;o?(te(o,"finish"),y?.(t)):(ee(),ie(t)),oe(o,!0)})),ge=(0,F9.Z)((e=>{const t=n.startOfYear(e),r=n.endOfYear(e),o=se(e)?D7({utils:n,date:e,minDate:n.isBefore(D,t)?t:D,maxDate:n.isAfter(A,r)?r:A,disablePast:m,disableFuture:f,isDateDisabled:se,timezone:K}):e;o?(te(o,"finish"),v?.(o)):(ee(),ie(t)),oe(o,!0)})),ve=(0,F9.Z)((e=>G(e?P7(n,e,q??ne):e,"finish",Y)));i.useEffect((()=>{null!=q&&n.isValid(q)&&ie(q)}),[q]);const ye=l,be=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Sne,t)})(ye),xe={disablePast:m,disableFuture:f,maxDate:A,minDate:D},we={disableHighlightToday:O,readOnly:P,disabled:T,timezone:K,gridLabelId:de,slots:N,slotProps:j},Se=i.useRef(Y);i.useEffect((()=>{Se.current!==Y&&(Q===Se.current&&J(Y,!0),Se.current=Y)}),[Q,J,Y]);const ke=i.useMemo((()=>[q]),[q]);return(0,o.jsxs)(_ne,(0,jW.Z)({ref:t,className:(0,a.Z)(be.root,M),ownerState:ye},U,{children:[(0,o.jsx)(pe,(0,jW.Z)({},fe,{slots:N,slotProps:j})),(0,o.jsx)(Mne,{reduceAnimations:b,className:be.viewTransitionContainer,transKey:Y,ownerState:ye,children:(0,o.jsxs)("div",{children:["year"===Y&&(0,o.jsx)(sne,(0,jW.Z)({},xe,we,{value:q,onChange:ge,shouldDisableYear:S,hasFocus:he,onFocusedViewChange:e=>J("year",e),yearsOrder:V,yearsPerRow:$,referenceDate:ne})),"month"===Y&&(0,o.jsx)(Xte,(0,jW.Z)({},xe,we,{hasFocus:he,className:M,value:q,onChange:me,shouldDisableMonth:w,onFocusedViewChange:e=>J("month",e),monthsPerRow:H,referenceDate:ne})),"day"===Y&&(0,o.jsx)(Bte,(0,jW.Z)({},re,xe,we,{onMonthSwitchingAnimationEnd:le,onFocusedDayChange:oe,reduceAnimations:b,selectedDays:ke,onSelectedDaysChange:ve,shouldDisableDate:x,shouldDisableMonth:w,shouldDisableYear:S,hasFocus:he,onFocusedViewChange:e=>J("day",e),showDaysOutsideCurrentMonth:E,fixedWeekNumber:L,dayOfWeekFormatter:Z,displayWeekNumber:B,loading:F,renderLoading:z}))]})})]}))})),Pne=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:b,onMonthChange:x,monthsPerRow:w,onYearChange:S,yearsOrder:k,yearsPerRow:C,slots:_,slotProps:M,loading:T,renderLoading:P,disableHighlightToday:D,readOnly:A,disabled:O,showDaysOutsideCurrentMonth:I,dayOfWeekFormatter:R,sx:E,autoFocus:L,fixedWeekNumber:Z,displayWeekNumber:N,timezone:j})=>(0,o.jsx)(Tne,{view:e,onViewChange:t,views:n.filter(L7),focusedView:r&&L7(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:s,referenceDate:l,onChange:u,className:c,classes:d,disableFuture:h,disablePast:p,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:b,onMonthChange:x,monthsPerRow:w,onYearChange:S,yearsOrder:k,yearsPerRow:C,slots:_,slotProps:M,loading:T,renderLoading:P,disableHighlightToday:D,readOnly:A,disabled:O,showDaysOutsideCurrentMonth:I,dayOfWeekFormatter:R,sx:E,autoFocus:L,fixedWeekNumber:Z,displayWeekNumber:N,timezone:j});function Dne(e){const{props:t,validator:n,value:r,timezone:o,onError:a}=e,s=C7(),l=i.useRef(n.valueManager.defaultErrorState),u=n({adapter:s,value:r,timezone:o,props:t}),c=n.valueManager.hasError(u);i.useEffect((()=>{a&&!n.valueManager.isSameError(u,l.current)&&a(u,r),l.current=u}),[n,a,u,r]);const d=(0,F9.Z)((e=>n({adapter:s,value:e,timezone:o,props:t})));return{validationError:u,hasValidationError:c,getValidationErrorForNewValue:d}}const Ane=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:a,onChange:s,value:l,defaultValue:u,closeOnSelect:c="desktop"===r,timezone:d,referenceDate:h}=e,{current:p}=i.useRef(u),{current:f}=i.useRef(void 0!==l),[m,g]=i.useState(d);const v=_7(),y=C7(),{isOpen:b,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{const r=i.useRef("boolean"==typeof e).current,[o,a]=i.useState(!1);return i.useEffect((()=>{if(r){if("boolean"!=typeof e)throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");a(e)}}),[r,e]),{isOpen:o,setIsOpen:i.useCallback((e=>{r||a(e),e&&t&&t(),!e&&n&&n()}),[r,t,n])}})(e),{timezone:w,value:S,handleValueChange:k}=xee({timezone:d,value:l,defaultValue:p,referenceDate:h,onChange:s,valueManager:t}),[C,_]=i.useState((()=>{let e;return e=void 0!==S?S:void 0!==p?p:t.emptyValue,{draft:e,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:l,hasBeenModifiedSinceMount:!1}})),M=t.getTimezone(v,C.draft);m!==d&&(g(d),d&&M&&d!==M&&_((e=>(0,jW.Z)({},e,{draft:t.setTimezone(v,d,e.draft)}))));const{getValidationErrorForNewValue:T}=Dne({props:e,validator:o,timezone:w,value:C.draft,onError:e.onError}),P=(0,F9.Z)((e=>{const n={action:e,dateState:C,hasChanged:n=>!t.areValuesEqual(v,e.value,n),isControlled:f,closeOnSelect:c},r=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!(!i||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!i||n(r.lastPublishedValue)))})(n),o=(e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!(!a||!["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&i?!!a||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(n),i=(e=>{const{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(n);_((t=>(0,jW.Z)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:o?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0})));let s=null;const l=()=>{if(!s){const t="setValueFromField"===e.name?e.context.validationError:T(e.value);s={validationError:t},"setValueFromShortcut"===e.name&&(s.shortcut=e.shortcut)}return s};r&&k(e.value,l()),o&&a&&a(e.value,l()),i&&x(!1)}));if(C.lastControlledValue!==l){const e=t.areValuesEqual(v,C.draft,S);_((t=>(0,jW.Z)({},t,{lastControlledValue:l},e?{}:{lastCommittedValue:S,lastPublishedValue:S,draft:S,hasBeenModifiedSinceMount:!0})))}const D=(0,F9.Z)((()=>{P({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})})),A=(0,F9.Z)((()=>{P({value:C.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})})),O=(0,F9.Z)((()=>{P({value:C.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})})),I=(0,F9.Z)((()=>{P({value:C.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})})),R=(0,F9.Z)((()=>{P({value:t.getTodayValue(v,w,n),name:"setValueFromAction",pickerAction:"today"})})),E=(0,F9.Z)((e=>{e.preventDefault(),x(!0)})),L=(0,F9.Z)((e=>{e?.preventDefault(),x(!1)})),Z=(0,F9.Z)(((e,t="partial")=>P({name:"setValueFromView",value:e,selectionState:t}))),N=(0,F9.Z)(((e,t,n)=>P({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n}))),j=(0,F9.Z)(((e,t)=>P({name:"setValueFromField",value:e,context:t}))),F={onClear:D,onAccept:A,onDismiss:O,onCancel:I,onSetToday:R,onOpen:E,onClose:L},z={value:C.draft,onChange:j},B=i.useMemo((()=>t.cleanValue(v,C.draft)),[v,t,C.draft]),V={value:B,onChange:Z,onClose:L,open:b},$=(0,jW.Z)({},F,{value:B,onChange:Z,onSelectShortcut:N,isValid:n=>{const r=o({adapter:y,value:n,timezone:w,props:e});return!t.hasError(r)}}),H=i.useMemo((()=>({onOpen:E,onClose:L,open:b})),[b,L,E]);return{open:b,fieldProps:z,viewProps:V,layoutProps:$,actions:F,contextValue:H}},One=["className","sx"];const Ine=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Ine(t.shadowRoot):t:null};function Rne(){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"}const Ene=(e,t)=>{const[n,r]=i.useState(Rne);if((0,H9.Z)((()=>{const e=()=>{r(Rne())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}}),[]),o=e,a=["hours","minutes","seconds"],Array.isArray(a)?a.every((e=>-1!==o.indexOf(e))):-1!==o.indexOf(a))return!1;var o,a;return"landscape"===(t||n)};const Lne=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:a,autoFocusView:s,rendererInterceptor:l,fieldRef:u})=>{const c=Ane({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:a}),d=(({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:a})=>{const{onChange:s,open:l,onClose:u}=t,{view:c,views:d,openTo:h,onViewChange:p,viewRenderers:f,timezone:m}=e,g=(0,FW.Z)(e,One),{view:v,setView:y,defaultView:b,focusedView:x,setFocusedView:w,setValueAndGoToNextView:S}=B9({view:c,views:d,openTo:h,onChange:s,onViewChange:p,autoFocus:r}),{hasUIView:k,viewModeLookup:C}=i.useMemo((()=>d.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,d]),_=i.useMemo((()=>d.reduce(((e,t)=>null!=f[t]&&f9(t)?e+1:e),0)),[f,d]),M=C[v],T=(0,F9.Z)((()=>"UI"===M)),[P,D]=i.useState("UI"===M?v:null);return P!==v&&"UI"===C[v]&&D(v),(0,H9.Z)((()=>{"field"===M&&l&&(u(),setTimeout((()=>{a?.current?.setSelectedSections(v),a?.current?.focusField(v)})))}),[v]),(0,H9.Z)((()=>{if(!l)return;let e=v;"field"===M&&null!=P&&(e=P),e!==b&&"UI"===C[e]&&"UI"===C[b]&&(e=b),e!==v&&y(e),w(e,!0)}),[l]),{hasUIView:k,shouldRestoreFocus:T,layoutProps:{views:d,view:P,onViewChange:y},renderCurrentView:()=>{if(null==P)return null;const e=f[P];if(null==e)return null;const r=(0,jW.Z)({},g,n,t,{views:d,timezone:m,onChange:S,view:P,onViewChange:y,focusedView:x,onFocusedViewChange:w,showViewSwitcher:_>1,timeViewsCount:_});return o?o(f,P,r):e(r)}}})({props:e,additionalViewProps:o,autoFocusView:s,fieldRef:u,propsFromPickerValue:c.viewProps,rendererInterceptor:l}),h=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=Ene(n.views,o),a=(0,cp.V)();return{layoutProps:(0,jW.Z)({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:d.layoutProps}),p=function(e){const{props:t,pickerValueResponse:n}=e;return i.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:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:d.renderCurrentView,hasUIView:d.hasUIView,shouldRestoreFocus:d.shouldRestoreFocus,layoutProps:h.layoutProps,contextValue:c.contextValue,ownerState:p}};function Zne(e){return(0,g.ZP)("MuiPickersLayout",e)}const Nne=(0,m.Z)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),jne=["onAccept","onClear","onCancel","onSetToday","actions"];function Fne(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:a}=e,s=(0,FW.Z)(e,jne),l=U7();if(null==a||0===a.length)return null;const u=a?.map((e=>{switch(e){case"clear":return(0,o.jsx)(k.Z,{onClick:n,children:l.clearButtonLabel},e);case"cancel":return(0,o.jsx)(k.Z,{onClick:r,children:l.cancelButtonLabel},e);case"accept":return(0,o.jsx)(k.Z,{onClick:t,children:l.okButtonLabel},e);case"today":return(0,o.jsx)(k.Z,{onClick:i,children:l.todayButtonLabel},e);default:return null}}));return(0,o.jsx)(Cd.Z,(0,jW.Z)({},s,{children:u}))}var zne=n(71852),Bne=n(2259),Vne=n(52889);const $ne=["items","changeImportance","isLandscape","onChange","isValid"],Hne=["getValue"];function Wne(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,a=(0,FW.Z)(e,$ne);if(null==t||0===t.length)return null;const s=t.map((e=>{let{getValue:t}=e,o=(0,FW.Z)(e,Hne);const a=t({isValid:i});return(0,jW.Z)({},o,{label:o.label,onClick:()=>{r(a,n,o)},disabled:!i(a)})}));return(0,o.jsx)(zne.Z,(0,jW.Z)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(a.sx)?a.sx:[a.sx]]},a,{children:s.map((e=>(0,o.jsx)(Bne.ZP,{children:(0,o.jsx)(Vne.Z,(0,jW.Z)({},e))},e.id??e.label)))}))}const Une=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:a,view:l,views:u,onViewChange:c,value:d,onChange:h,onSelectShortcut:p,isValid:f,isLandscape:m,disabled:g,readOnly:v,children:y,slots:b,slotProps:x}=e,w=(e=>{const{classes:t,isLandscape:n}=e,r={root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]};return(0,s.Z)(r,Zne,t)})(e),S=b?.actionBar??Fne,k=(0,A9.Z)({elementType:S,externalSlotProps:x?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:a,actions:"desktop"===t?[]:["cancel","accept"]},className:w.actionBar,ownerState:(0,jW.Z)({},e,{wrapperVariant:t})}),C=(0,o.jsx)(S,(0,jW.Z)({},k)),_=b?.toolbar,M=(0,A9.Z)({elementType:_,externalSlotProps:x?.toolbar,additionalProps:{isLandscape:m,onChange:h,value:d,view:l,onViewChange:c,views:u,disabled:g,readOnly:v},className:w.toolbar,ownerState:(0,jW.Z)({},e,{wrapperVariant:t})}),T=function(e){return null!==e.view}(M)&&_?(0,o.jsx)(_,(0,jW.Z)({},M)):null,P=y,D=b?.tabs,A=l&&D?(0,o.jsx)(D,(0,jW.Z)({view:l,onViewChange:c,className:w.tabs},x?.tabs)):null,O=b?.shortcuts??Wne,I=(0,A9.Z)({elementType:O,externalSlotProps:x?.shortcuts,additionalProps:{isValid:f,isLandscape:m,onChange:p},className:w.shortcuts,ownerState:{isValid:f,isLandscape:m,onChange:p,wrapperVariant:t}});return{toolbar:T,content:P,tabs:A,actionBar:C,shortcuts:l&&O?(0,o.jsx)(O,(0,jW.Z)({},I)):null}},qne=(0,d.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",[`& .${Nne.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Nne.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Nne.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Nne.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Nne.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Nne.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Nne.shortcuts}`]:{gridColumn:3}}}]}),Gne=(0,d.ZP)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Kne=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:l,tabs:u,actionBar:c,shortcuts:d}=Une(n),{sx:h,className:p,isLandscape:f,wrapperVariant:m}=n,g=(e=>{const{isLandscape:t,classes:n}=e,r={root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]};return(0,s.Z)(r,Zne,n)})(n);return(0,o.jsxs)(qne,{ref:t,sx:h,className:(0,a.Z)(g.root,p),ownerState:n,children:[f?d:r,f?r:d,(0,o.jsx)(Gne,{className:g.contentWrapper,children:"desktop"===m?(0,o.jsxs)(i.Fragment,{children:[l,u]}):(0,o.jsxs)(i.Fragment,{children:[u,l]})}),c]})})),Yne=["props","ref"],Xne=(0,d.ZP)(Kne)((({theme:e})=>({overflow:"hidden",minWidth:b9,backgroundColor:(e.vars||e).palette.background.paper}))),Qne=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:u,disableFuture:c}=r,d=e.utils.date(void 0,n),h=v9(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case Boolean(o&&h(o,t)):return"minTime";case Boolean(i&&h(t,i)):return"maxTime";case Boolean(c&&e.utils.isAfter(t,d)):return"disableFuture";case Boolean(u&&e.utils.isBefore(t,d)):return"disablePast";case Boolean(s&&s(t,"hours")):return"shouldDisableTime-hours";case Boolean(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case Boolean(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case Boolean(a&&e.utils.getMinutes(t)%a!=0):return"minutesStep";default:return null}};Qne.valueManager=Wee;const Jne=({adapter:e,value:t,timezone:n,props:r})=>{const o=Jee({adapter:e,value:t,timezone:n,props:r});return null!==o?o:Qne({adapter:e,value:t,timezone:n,props:r})};Jne.valueManager=Wee;const ere=i.forwardRef((function(e,t){const n=P9(e,"MuiStaticDateTimePicker"),r=n.displayStaticWrapperAs??"mobile",i=n.ampmInClock??"desktop"===r,s=(0,jW.Z)({day:Pne,month:Pne,year:Pne,hours:Qee,minutes:Qee,seconds:Qee},n.viewRenderers),l=(0,jW.Z)({},n,{viewRenderers:s,displayStaticWrapperAs:r,ampmInClock:i,yearsPerRow:n.yearsPerRow??("mobile"===r?3:4),slotProps:(0,jW.Z)({},n.slotProps,{tabs:(0,jW.Z)({hidden:"desktop"===r},n.slotProps?.tabs),toolbar:(0,jW.Z)({hidden:"desktop"===r,ampmInClock:i},n.slotProps?.toolbar)})}),{renderPicker:u}=(e=>{let{props:t,ref:n}=e,r=(0,FW.Z)(e,Yne);const{localeText:i,slots:s,slotProps:l,className:u,sx:c,displayStaticWrapperAs:d,autoFocus:h}=t,{layoutProps:p,renderCurrentView:f}=Lne((0,jW.Z)({},r,{props:t,autoFocusView:h??!1,additionalViewProps:{},wrapperVariant:d})),m=s?.layout??Xne;return{renderPicker:()=>(0,o.jsx)(y7,{localeText:i,children:(0,o.jsx)(m,(0,jW.Z)({},p,l?.layout,{slots:s,slotProps:l,sx:[...Array.isArray(c)?c:[c],...Array.isArray(l?.layout?.sx)?l.layout.sx:[l?.layout?.sx]],className:(0,a.Z)(u,l?.layout?.className),ref:n,children:f()}))})}})({props:l,valueManager:Wee,valueType:"date-time",validator:Jne,ref:t});return u()}));ere.propTypes={ampm:x7().bool,ampmInClock:x7().bool,autoFocus:x7().bool,className:x7().string,dayOfWeekFormatter:x7().func,defaultValue:x7().object,disabled:x7().bool,disableFuture:x7().bool,disableHighlightToday:x7().bool,disableIgnoringDatePartForTimeValidation:x7().bool,disablePast:x7().bool,displayStaticWrapperAs:x7().oneOf(["desktop","mobile"]),displayWeekNumber:x7().bool,fixedWeekNumber:x7().number,loading:x7().bool,localeText:x7().object,maxDate:x7().object,maxDateTime:x7().object,maxTime:x7().object,minDate:x7().object,minDateTime:x7().object,minTime:x7().object,minutesStep:x7().number,monthsPerRow:x7().oneOf([3,4]),onAccept:x7().func,onChange:x7().func,onClose:x7().func,onError:x7().func,onMonthChange:x7().func,onViewChange:x7().func,onYearChange:x7().func,openTo:x7().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:x7().oneOf(["landscape","portrait"]),readOnly:x7().bool,reduceAnimations:x7().bool,referenceDate:x7().object,renderLoading:x7().func,shouldDisableDate:x7().func,shouldDisableMonth:x7().func,shouldDisableTime:x7().func,shouldDisableYear:x7().func,showDaysOutsideCurrentMonth:x7().bool,slotProps:x7().object,slots:x7().object,sx:x7().oneOfType([x7().arrayOf(x7().oneOfType([x7().func,x7().object,x7().bool])),x7().func,x7().object]),timezone:x7().string,value:x7().object,view:x7().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:x7().shape({day:x7().func,hours:x7().func,minutes:x7().func,month:x7().func,seconds:x7().func,year:x7().func}),views:x7().arrayOf(x7().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:x7().oneOf(["asc","desc"]),yearsPerRow:x7().oneOf([3,4])};const tre=(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}},nre=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(""===a)throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=Cee(e,a),u=Nee(e,l.contentType,l.type,a),c=n?u:"digit"===l.contentType,d=null!=t&&e.isValid(t);let h=d?e.formatByString(t,a):"",p=null;if(c)if(u)p=""===h?e.formatByString(i,a).length:h.length;else{if(null==l.maxLength)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(h=Dee(Oee(Pee(h,o),p),o))}return(0,jW.Z)({},l,{format:a,maxLength:p,value:h,placeholder:tre(e,r,l,a),hasLeadingZerosInFormat:u,hasLeadingZerosInInput:c,startSeparator:s,endSeparator:"",modified:!1})},rre=e=>{let t=(({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new 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 o})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=(({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n})((0,jW.Z)({},e,{expandedFormat:t})),r=(e=>{const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort(((e,t)=>t.length-e.length)),l=/^([a-zA-Z]+)/,u=new RegExp(`^(${s.join("|")})*$`),c=new RegExp(`^(${s.join("|")})`),d=e=>r.find((t=>t.start<=e&&t.end>=e));let h=0;for(;h0;){const n=c.exec(t)[1];t=t.slice(n.length),i.push(nre((0,jW.Z)({},e,{now:o,token:n,startSeparator:a}))),a=""}h+=s.length}else{const e=n[h];r&&t?.start===h||t?.end===h||(0===i.length?a+=e:i[i.length-1].endSeparator+=e),h+=1}}return 0===i.length&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i})((0,jW.Z)({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map((n=>{const r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`⁩${r}⁦`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n})))((0,jW.Z)({},e,{sections:r}))},ore=e=>{const t=_7(),n=U7(),r=C7(),o=(0,cp.V)(),{valueManager:a,fieldValueManager:s,valueType:l,validator:u,internalProps:c,internalProps:{value:d,defaultValue:h,referenceDate:p,onChange:f,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:y,shouldRespectLeadingZeros:b=!1,timezone:x,enableAccessibleFieldDOMStructure:w=!1}}=e,{timezone:S,value:k,handleValueChange:C}=xee({timezone:x,value:d,defaultValue:h,referenceDate:p,onChange:f,valueManager:a}),_=i.useMemo((()=>(e=>{const t=e.date(void 0);return"0"===e.formatByString(e.setSeconds(t,0),"s")?Tee:Array.from({length:10}).map(((n,r)=>e.formatByString(e.setSeconds(t,r),"s")))})(t)),[t]),M=i.useMemo((()=>((e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=O7(e,r).reduce(((t,n)=>{const r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t}),{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:Zee(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+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){const n=_ee(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{const o=e.getHours(i);return Pee(e.formatByString(e.endOfDay(r),n),t)!==o.toString()?{minimum:1,maximum:Number(Pee(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,_,S)),[t,_,S]),T=i.useCallback(((e,r=null)=>s.getSectionsFromValue(t,e,r,(e=>rre({utils:t,localeText:n,localizedDigits:_,format:m,date:e,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:o})))),[s,m,n,_,o,b,t,g,w]),[P,D]=i.useState((()=>{const e=T(k);jee();const n={sections:e,value:k,referenceValue:a.emptyValue,tempValueStrAndroid:null},r=(e=>Math.max(...e.map((e=>See[e.type]??1))))(e),o=a.getInitialReferenceValue({referenceDate:p,value:k,utils:t,props:c,granularity:r,timezone:S});return(0,jW.Z)({},n,{referenceValue:o})})),[A,O]=(0,z9.Z)({controlled:v,default:null,name:"useField",state:"selectedSections"}),I=e=>{O(e),y?.(e)},R=i.useMemo((()=>Bee(A,P.sections)),[A,P.sections]),E="all"===R?0:R,L=({value:e,referenceValue:n,sections:o})=>{if(D((t=>(0,jW.Z)({},t,{sections:o,value:e,referenceValue:n,tempValueStrAndroid:null}))),a.areValuesEqual(t,P.value,e))return;const i={validationError:u({adapter:r,value:e,timezone:S,props:c})};C(e,i)},Z=(e,t)=>{const n=[...P.sections];return n[e]=(0,jW.Z)({},n[e],{value:t,modified:!0}),n};return i.useEffect((()=>{const e=T(P.value);jee(),D((t=>(0,jW.Z)({},t,{sections:e})))}),[m,t.locale,o]),i.useEffect((()=>{let e;e=!a.areValuesEqual(t,P.value,k)||a.getTimezone(t,P.value)!==a.getTimezone(t,k),e&&D((e=>(0,jW.Z)({},e,{value:k,referenceValue:s.updateReferenceValue(t,k,e.referenceValue),sections:T(k)})))}),[k]),{state:P,activeSectionIndex:E,parsedSelectedSections:R,setSelectedSections:I,clearValue:()=>{L({value:a.emptyValue,referenceValue:P.referenceValue,sections:T(a.emptyValue)})},clearActiveSection:()=>{if(null==E)return;const e=P.sections[E],n=s.getActiveDateManager(t,P,e),r=n.getSections(P.sections).filter((e=>""!==e.value)).length===(""===e.value?0:1),o=Z(E,""),i=r?null:t.getInvalidDate(),a=n.getNewValuesFromNewActiveDate(i);L((0,jW.Z)({},a,{sections:o}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{r&&E{const r=t.some((e=>"day"===e.type)),o=[],i=[];for(let e=0;e(0,jW.Z)({},e,u,{sections:i,tempValueStrAndroid:null})))},updateValueFromValueStr:e=>{const r=s.parseValueStr(e,P.referenceValue,((e,r)=>{const i=t.parse(e,m);if(null==i||!t.isValid(i))return null;const a=rre({utils:t,localeText:n,localizedDigits:_,format:m,date:i,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:o});return zee(t,i,a,r,!1)})),i=s.updateReferenceValue(t,r,P.referenceValue);L({value:r,referenceValue:i,sections:T(r,P.sections)})},setTempAndroidValueStr:e=>D((t=>(0,jW.Z)({},t,{tempValueStrAndroid:e}))),getSectionsFromValue:T,sectionsValueBoundaries:M,localizedDigits:_,timezone:S}},ire=e=>null!=e.saveQuery,are=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:a})=>{const s=_7(),[l,u]=i.useState(null),c=(0,F9.Z)((()=>u(null)));i.useEffect((()=>{null!=l&&e[l.sectionIndex]?.type!==l.sectionType&&c()}),[e,l,c]),i.useEffect((()=>{if(null!=l){const e=setTimeout((()=>c()),5e3);return()=>{clearTimeout(e)}}return()=>{}}),[l,c]);const d=({keyPressed:t,sectionIndex:n},r,o)=>{const i=t.toLowerCase(),a=e[n];if(null!=l&&(!o||o(l.value))&&l.sectionIndex===n){const e=`${l.value}${i}`,t=r(e,a);if(!ire(t))return u({sectionIndex:n,value:e,sectionType:a.type}),t}const s=r(i,a);return ire(s)&&!s.saveQuery?(c(),null):(u({sectionIndex:n,value:i,sectionType:a.type}),ire(s)?null:s)};return{applyCharacterEditing:(0,F9.Z)((i=>{const l=e[i.sectionIndex],u=Aee(i.keyPressed,r)?(e=>{const t=(e,t)=>{const o=Pee(e,r),i=Number(o),a=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(i>a.maximum)return{saveQuery:!1};if(ia.maximum||o.length===a.maximum.toString().length;return{sectionValue:Iee(s,i,a,r,t),shouldGoToNextSection:l}};return d(e,((e,n)=>{if("digit"===n.contentType||"digit-with-letter"===n.contentType)return t(e,n);if("month"===n.type){const r=Nee(s,"digit","month","MM"),o=t(e,{type:n.type,format:"MM",hasLeadingZerosInFormat:r,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ire(o))return o;const i=Lee(s,o.sectionValue,"MM",n.format);return(0,jW.Z)({},o,{sectionValue:i})}if("weekDay"===n.type){const r=t(e,n);if(ire(r))return r;const o=_ee(s,n.format)[Number(r.sectionValue)-1];return(0,jW.Z)({},r,{sectionValue:o})}return{saveQuery:!1}}),(e=>Aee(e,r)))})((0,jW.Z)({},i,{keyPressed:Dee(i.keyPressed,r)})):(e=>{const t=(e,t,n)=>{const 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,o)=>{const i=e=>Mee(s,a,n.type,e);if("letter"===n.contentType)return t(n.format,i(n.format),e);if(r&&null!=o&&"letter"===Cee(s,r).contentType){const n=i(r),a=t(0,n,e);return ire(a)?{saveQuery:!1}:(0,jW.Z)({},a,{sectionValue:o(a.sectionValue,n)})}return{saveQuery:!1}};return d(e,((e,t)=>{switch(t.type){case"month":{const r=e=>Lee(s,e,s.formats.month,t.format);return n(e,t,s.formats.month,r)}case"weekDay":{const r=(e,t)=>t.indexOf(e).toString();return n(e,t,s.formats.weekday,r)}case"meridiem":return n(e,t);default:return{saveQuery:!1}}}))})(i);null!=u?t({activeSection:l,newSectionValue:u.sectionValue,shouldGoToNextSection:u.shouldGoToNextSection}):o(null)})),resetCharacterQuery:c}},sre=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:a,onFocus:s,onInput:l,onPaste:u,focused:c,autoFocus:d=!1},fieldValueManager:h,applyCharacterEditing:p,resetCharacterQuery:f,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:y,clearValue:b,updateSectionValue:x,updateValueFromValueStr:w,sectionOrder:S,areAllSectionsEmpty:k,sectionsValueBoundaries:C}=e,_=i.useRef(null),M=(0,ste.Z)(r,_),T=U7(),P=_7(),D=(0,D9.Z)(),[A,O]=i.useState(!1),I=i.useMemo((()=>({syncSelectionToDOM:()=>{if(!_.current)return;const e=document.getSelection();if(!e)return;if(null==g)return e.rangeCount>0&&_.current.getRoot().contains(e.getRangeAt(0).startContainer)&&e.removeAllRanges(),void(A&&_.current.getRoot().blur());if(!_.current.getRoot().contains(Ine(document)))return;const t=new window.Range;let n;if("all"===g)n=_.current.getRoot();else{n="empty"===v.sections[g].type?_.current.getSectionContainer(g):_.current.getSectionContent(g)}t.selectNodeContents(n),n.focus(),e.removeAllRanges(),e.addRange(t)},getActiveSectionIndexFromDOM:()=>{const e=Ine(document);return e&&_.current&&_.current.getRoot().contains(e)?_.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!_.current||null!=I.getActiveSectionIndexFromDOM())return;const t=Bee(e,v.sections);O(!0),_.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!_.current)return;const t=Bee(e,v.sections);O(null!==("all"===t?0:t)),m(e)},isFieldFocused:()=>{const e=Ine(document);return!!_.current&&_.current.getRoot().contains(e)}})),[g,m,v.sections,A]),R=(0,F9.Z)((e=>{if(!_.current)return;const t=v.sections[e];_.current.getSectionContent(e).innerHTML=t.value||t.placeholder,I.syncSelectionToDOM()})),E=(0,F9.Z)(((e,...t)=>{if(!e.isDefaultPrevented()&&_.current)if(O(!0),a?.(e,...t),"all"===g)setTimeout((()=>{const e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void m(S.startIndex);let t=0,n=0;for(;n{if(l?.(e),!_.current||"all"!==g)return;const t=e.target.textContent??"";_.current.getRoot().innerHTML=v.sections.map((e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`)).join(""),I.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(f(),b(),m("all")):t.length>1?w(t):("all"===g&&m(0),p({keyPressed:t,sectionIndex:0}))})),Z=(0,F9.Z)((e=>{if(u?.(e),n||"all"!==g)return void e.preventDefault();const t=e.clipboardData.getData("text");e.preventDefault(),f(),w(t)})),N=(0,F9.Z)(((...e)=>{if(s?.(...e),A||!_.current)return;O(!0);null!=_.current.getSectionIndexFromDOMElement(Ine(document))||m(S.startIndex)})),j=(0,F9.Z)(((...e)=>{o?.(...e),setTimeout((()=>{if(!_.current)return;const e=Ine(document);!_.current.getRoot().contains(e)&&(O(!1),m(null))}))})),F=(0,F9.Z)((e=>t=>{t.isDefaultPrevented()||m(e)})),z=(0,F9.Z)((e=>{e.preventDefault()})),B=(0,F9.Z)((e=>()=>{m(e)})),V=(0,F9.Z)((e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;const r=v.sections[g],o=e.clipboardData.getData("text"),i=/^[a-zA-Z]+$/.test(o),a=/^[0-9]+$/.test(o),s=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(o);"letter"===r.contentType&&i||"digit"===r.contentType&&a||"digit-with-letter"===r.contentType&&s?(f(),x({activeSection:r,newSectionValue:o,shouldGoToNextSection:!0})):i||a||(f(),w(o))})),$=(0,F9.Z)((e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"})),H=(0,F9.Z)((e=>{if(!_.current)return;const t=e.target,r=t.textContent??"",o=_.current.getSectionIndexFromDOMElement(t),i=v.sections[o];if(!n&&_.current){if(0===r.length){if(""===i.value)return void R(o);const t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void R(o):(f(),void y())}p({keyPressed:r,sectionIndex:o}),R(o)}else R(o)}));(0,H9.Z)((()=>{if(A&&_.current)if("all"===g)_.current.getRoot().focus();else if("number"==typeof g){const e=_.current.getSectionContent(g);e&&e.focus()}}),[g,A]);const W=i.useMemo((()=>v.sections.reduce(((e,t)=>(e[t.type]=C[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e)),{})),[C,v.sections]),U="all"===g,q=i.useMemo((()=>v.sections.map(((e,r)=>{const o=!U&&!t&&!n;return{container:{"data-sectionindex":r,onClick:F(r)},content:{tabIndex:U||r>0?-1:0,contentEditable:!U&&!t&&!n,role:"spinbutton",id:`${D}-${e.type}`,"aria-labelledby":`${D}-${e.type}`,"aria-readonly":n,"aria-valuenow":$ee(e,P),"aria-valuemin":W[e.type].minimum,"aria-valuemax":W[e.type].maximum,"aria-valuetext":e.value?Vee(e,P):T.empty,"aria-label":T[e.type],"aria-disabled":t,spellCheck:!o&&void 0,autoCapitalize:o?"off":void 0,autoCorrect:o?"off":void 0,[parseInt(i.version,10)>=17?"enterKeyHint":"enterkeyhint"]:o?"next":void 0,children:e.value||e.placeholder,onInput:H,onPaste:V,onFocus:B(r),onDragOver:$,onMouseUp:z,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}))),[v.sections,B,V,$,H,F,z,t,n,U,T,P,W,D]),G=(0,F9.Z)((e=>{w(e.target.value)})),K=i.useMemo((()=>k?"":h.getV7HiddenInputValueFromSections(v.sections)),[k,v.sections,h]);return i.useEffect((()=>{if(null==_.current)throw new Error(["MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`","You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.","","If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:","","","","Learn 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"].join("\n"));d&&_.current&&_.current.getSectionContent(S.startIndex).focus()}),[]),{interactions:I,returnedValue:{autoFocus:d,readOnly:n,focused:c??A,sectionListRef:M,onBlur:j,onClick:E,onFocus:N,onInput:L,onPaste:Z,enableAccessibleFieldDOMStructure:!0,elements:q,tabIndex:0===g?-1:0,contentEditable:U,value:K,onChange:G,areAllSectionsEmpty:k}}},lre=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),ure=e=>{const t=(0,cp.V)(),n=i.useRef(void 0),r=i.useRef(void 0),{forwardedProps:{onFocus:o,onClick:a,onPaste:s,onBlur:l,inputRef:u,placeholder:c},internalProps:{readOnly:d=!1,disabled:h=!1},parsedSelectedSections:p,activeSectionIndex:f,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:y,resetCharacterQuery:b,updateSectionValue:x,updateValueFromValueStr:w,clearActiveSection:S,clearValue:k,setTempAndroidValueStr:C,setSelectedSections:_,getSectionsFromValue:M,areAllSectionsEmpty:T,localizedDigits:P}=e,D=i.useRef(null),A=(0,ste.Z)(u,D),O=i.useMemo((()=>((e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a({syncSelectionToDOM:()=>{if(!D.current)return;if(null==p)return void(D.current.scrollLeft&&(D.current.scrollLeft=0));if(D.current!==Ine(document))return;const e=D.current.scrollTop;if("all"===p)D.current.select();else{const e=O[p],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;t===D.current.selectionStart&&n===D.current.selectionEnd||D.current===Ine(document)&&D.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout((()=>{!D.current||D.current!==Ine(document)||D.current.selectionStart!==D.current.selectionEnd||D.current.selectionStart===t&&D.current.selectionEnd===n||I.syncSelectionToDOM()}))}D.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{const e=D.current.selectionStart??0,t=D.current.selectionEnd??0;if(0===e&&0===t)return null;const 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)=>{Ine(document)!==D.current&&(D.current?.focus(),_(e))},setSelectedSections:e=>_(e),isFieldFocused:()=>D.current===Ine(document)})),[D,p,O,_]),R=()=>{const e=D.current.selectionStart??0;let t;t=e<=O[0].startInInput||e>=O[O.length-1].endInInput?1:O.findIndex((t=>t.startInInput-t.startSeparator.length>e));const n=-1===t?O.length-1:t-1;_(n)},E=(0,F9.Z)(((...e)=>{o?.(...e);const t=D.current;clearTimeout(n.current),n.current=setTimeout((()=>{t&&t===D.current&&null==f&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?_("all"):R())}))})),L=(0,F9.Z)(((e,...t)=>{e.isDefaultPrevented()||(a?.(e,...t),R())})),Z=(0,F9.Z)((e=>{if(s?.(e),e.preventDefault(),d||h)return;const t=e.clipboardData.getData("text");if("number"==typeof p){const e=m.sections[p],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),o=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&o)return b(),void x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});if(n||r)return}b(),w(t)})),N=(0,F9.Z)(((...e)=>{l?.(...e),_(null)})),j=(0,F9.Z)((e=>{if(d)return;const n=e.target.value;if(""===n)return b(),void k();const r=e.nativeEvent.data,o=r&&r.length>1,i=o?r:n,a=lre(i);if("all"===p&&_(f),null==f||o)return void w(o?r:a);let s;if("all"===p&&1===a.length)s=a;else{const e=lre(g.getV6InputValueFromSections(O,P,t));let n=-1,r=-1;for(let t=0;to.end)return;const i=a.length-e.length+o.end-lre(o.endSeparator||"").length;s=a.slice(o.start+lre(o.startSeparator||"").length,i)}if(0===s.length)return navigator.userAgent.toLowerCase().includes("android")&&C(i),b(),void S();y({keyPressed:s,sectionIndex:f})})),F=i.useMemo((()=>void 0!==c?c:g.getV6InputValueFromSections(M(v.emptyValue),P,t)),[c,g,M,v.emptyValue,P,t]),z=i.useMemo((()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,P,t)),[m.sections,g,m.tempValueStrAndroid,P,t]);i.useEffect((()=>(D.current&&D.current===Ine(document)&&_("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)})),[]);const B=i.useMemo((()=>null==f||"letter"===m.sections[f].contentType?"text":"numeric"),[f,m.sections]),V=D.current&&D.current===Ine(document);return{interactions:I,returnedValue:{readOnly:d,onBlur:N,onClick:L,onFocus:E,onPaste:Z,inputRef:A,enableAccessibleFieldDOMStructure:!1,placeholder:F,inputMode:B,autoComplete:"off",value:!V&&T?"":z,onChange:j}}},cre=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],dre=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],hre=["minDateTime","maxDateTime"],pre=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],fre=e=>{const t=(e=>{const t=_7(),n=M7(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return(0,jW.Z)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:Boolean(e.minDateTime||e.maxDateTime),minDate:A7(t,e.minDateTime??e.minDate,n.minDate),maxDate:A7(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})})(e),{forwardedProps:n,internalProps:r}=((e,t)=>i.useMemo((()=>{const n=(0,jW.Z)({},e),r={},o=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return pre.forEach(o),"date"===t?cre.forEach(o):"time"===t?dre.forEach(o):"date-time"===t&&(cre.forEach(o),dre.forEach(o),hre.forEach(o)),{forwardedProps:n,internalProps:r}}),[e,t]))(t,"date-time");return(e=>{const t=_7(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:a=!1,disabled:s=!1,readOnly:l=!1},forwardedProps:{onKeyDown:u,error:c,clearable:d,onClear:h},fieldValueManager:p,valueManager:f,validator:m}=e,g=(0,cp.V)(),v=ore(e),{state:y,activeSectionIndex:b,parsedSelectedSections:x,setSelectedSections:w,clearValue:S,clearActiveSection:k,updateSectionValue:C,setTempAndroidValueStr:_,sectionsValueBoundaries:M,localizedDigits:T,timezone:P}=v,D=are({sections:y.sections,updateSectionValue:C,sectionsValueBoundaries:M,localizedDigits:T,setTempAndroidValueStr:_,timezone:P}),{resetCharacterQuery:A}=D,O=f.areValuesEqual(t,y.value,f.emptyValue),I=a?sre:ure,R=i.useMemo((()=>((e,t)=>{const n={};if(!t)return e.forEach(((t,r)=>{const o=0===r?null:r-1,i=r===e.length-1?null:r+1;n[r]={leftIndex:o,rightIndex:i}})),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex(((e,t)=>t>=i&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator)),-1===a&&(a=e.length-1);for(let e=a;e>=i;e-=1)o[e]=s,r[s]=e,s-=1;i=a+1}return e.forEach(((t,i)=>{const a=o[i],s=0===a?null:r[a-1],l=a===e.length-1?null:r[a+1];n[i]={leftIndex:s,rightIndex:l}})),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(y.sections,g&&!a)),[y.sections,g,a]),{returnedValue:E,interactions:L}=I((0,jW.Z)({},e,v,D,{areAllSectionsEmpty:O,sectionOrder:R})),Z=(0,F9.Z)((e=>{if(u?.(e),!s)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==x)w(R.startIndex);else if("all"===x)w(R.endIndex);else{const e=R.neighbors[x].rightIndex;null!==e&&w(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)w(R.endIndex);else if("all"===x)w(R.startIndex);else{const e=R.neighbors[x].leftIndex;null!==e&&w(e)}break;case"Delete"===e.key:if(e.preventDefault(),l)break;null==x||"all"===x?S():k(),A();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),l||null==b)break;"all"===x&&w(b);const n=y.sections[b],r=p.getActiveDateManager(t,y,n),i=Ree(t,P,n,e.key,M,T,r.date,{minutesStep:o});C({activeSection:n,newSectionValue:i,shouldGoToNextSection:!1});break}}}));(0,H9.Z)((()=>{L.syncSelectionToDOM()}));const{hasValidationError:N}=Dne({props:n,validator:m,timezone:P,value:y.value,onError:n.onError}),j=i.useMemo((()=>void 0!==c?c:N),[N,c]);i.useEffect((()=>{j||null!=b||A()}),[y.referenceValue,b,j]),i.useEffect((()=>{null!=y.tempValueStrAndroid&&null!=b&&(A(),k())}),[y.sections]),i.useImperativeHandle(r,(()=>({getSections:()=>y.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused})));const F=(0,F9.Z)(((e,...t)=>{e.preventDefault(),h?.(e,...t),S(),L.isFieldFocused()?w(R.startIndex):L.focusField(0)})),z={onKeyDown:Z,onClear:F,error:j,clearable:Boolean(d&&!O&&!l&&!s)},B={disabled:s,readOnly:l};return(0,jW.Z)({},e.forwardedProps,z,B,E)})({forwardedProps:n,internalProps:r,valueManager:Wee,fieldValueManager:Uee,validator:Jne,valueType:"date-time"})};var mre=n(76992);const gre=["clearable","onClear","InputProps","sx","slots","slotProps"],vre=["ownerState"];var yre=n(68808),bre=n(32931);function xre(e){return(0,g.ZP)("MuiPickersTextField",e)}(0,m.Z)("MuiPickersTextField",["root","focused","disabled","error","required"]);var wre=n(36683);function Sre(e){return(0,g.ZP)("MuiPickersInputBase",e)}const kre=(0,m.Z)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Cre(e){return(0,g.ZP)("MuiPickersOutlinedInput",e)}const _re=(0,jW.Z)({},kre,(0,m.Z)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Mre=["children","className","label","notched","shrink"],Tre=(0,d.ZP)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((({theme:e})=>{const 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}})),Pre=(0,d.ZP)("span")((({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"}))),Dre=(0,d.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 Are(e){const{className:t,label:n}=e,r=(0,FW.Z)(e,Mre),i=null!=n&&""!==n,a=(0,jW.Z)({},e,{withLabel:i});return(0,o.jsx)(Tre,(0,jW.Z)({"aria-hidden":!0,className:t},r,{ownerState:a,children:(0,o.jsx)(Dre,{ownerState:a,children:i?(0,o.jsx)(Pre,{children:n}):(0,o.jsx)(Pre,{className:"notranslate",children:"​"})})}))}var Ore=n(3150);const Ire={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Rre(e){return(0,g.ZP)("MuiPickersSectionList",e)}const Ere=(0,m.Z)("MuiPickersSectionList",["root","section","sectionContent"]),Lre=["slots","slotProps","elements","sectionListRef"],Zre=(0,d.ZP)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Nre=(0,d.ZP)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),jre=(0,d.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Fre=(0,d.ZP)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function zre(e){const{slots:t,slotProps:n,element:r,classes:i}=e,a=t?.section??Nre,s=(0,A9.Z)({elementType:a,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),l=t?.sectionContent??Fre,u=(0,A9.Z)({elementType:l,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),c=t?.sectionSeparator??jre,d=(0,A9.Z)({elementType:c,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),h=(0,A9.Z)({elementType:c,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,o.jsxs)(a,(0,jW.Z)({},s,{children:[(0,o.jsx)(c,(0,jW.Z)({},d)),(0,o.jsx)(l,(0,jW.Z)({},u)),(0,o.jsx)(c,(0,jW.Z)({},h))]}))}const Bre=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:a,elements:l,sectionListRef:u}=n,c=(0,FW.Z)(n,Lre),d=(e=>{const{classes:t}=e;return(0,s.Z)({root:["root"],section:["section"],sectionContent:["sectionContent"]},Rre,t)})(n),h=i.useRef(null),p=(0,ste.Z)(t,h),f=e=>{if(!h.current)throw new Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return h.current};i.useImperativeHandle(u,(()=>({getRoot:()=>f("getRoot"),getSectionContainer:e=>f("getSectionContainer").querySelector(`.${Ere.section}[data-sectionindex="${e}"]`),getSectionContent:e=>f("getSectionContent").querySelector(`.${Ere.section}[data-sectionindex="${e}"] .${Ere.sectionContent}`),getSectionIndexFromDOMElement(e){const t=f("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return e.classList.contains(Ere.section)?n=e:e.classList.contains(Ere.sectionContent)&&(n=e.parentElement),null==n?null:Number(n.dataset.sectionindex)}})));const m=r?.root??Zre,g=(0,A9.Z)({elementType:m,externalSlotProps:a?.root,externalForwardedProps:c,additionalProps:{ref:p,suppressContentEditableWarning:!0},className:d.root,ownerState:{}});return(0,o.jsx)(m,(0,jW.Z)({},g,{children:g.contentEditable?l.map((({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`)).join(""):(0,o.jsx)(i.Fragment,{children:l.map(((e,t)=>(0,o.jsx)(zre,{slots:r,slotProps:a,element:e,classes:d},t)))})}))})),Vre=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],$re=(0,d.ZP)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{return(0,jW.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:(t=.15/16,Math.round(1e5*t)/1e5)+"em",variants:[{props:{fullWidth:!0},style:{width:"100%"}}]});var t})),Hre=(0,d.ZP)(Zre,{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}}]}))),Wre=(0,d.ZP)(Nre,{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"}))),Ure=(0,d.ZP)(Fre,{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"}))),qre=(0,d.ZP)(jre,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})((()=>({whiteSpace:"pre",letterSpacing:"inherit"}))),Gre=(0,d.ZP)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,jW.Z)({},Ire)),Kre=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:a,value:l,onChange:u,id:c,endAdornment:d,startAdornment:h,renderSuffix:p,slots:f,slotProps:m,contentEditable:g,tabIndex:v,onInput:y,onPaste:b,onKeyDown:x,name:w,readOnly:S,inputProps:k,inputRef:C,sectionListRef:_}=n,M=(0,FW.Z)(n,Vre),T=i.useRef(null),P=(0,ste.Z)(t,T),D=(0,ste.Z)(k?.ref,C),A=(0,cp.V)(),O=(0,wre.Z)();if(!O)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");i.useEffect((()=>{O&&O.setAdornedStart(Boolean(h))}),[O,h]),i.useEffect((()=>{O&&(a?O.onEmpty():O.onFilled())}),[O,a]);const I=(0,jW.Z)({},n,O,{isRtl:A}),R=(e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:l,size:u,endAdornment:c,startAdornment:d}=e,h={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${(0,Ore.Z)(l)}`,"small"===u&&"inputSizeSmall",Boolean(d)&&"adornedStart",Boolean(c)&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,s.Z)(h,Sre,o)})(I),E=f?.root||$re,L=(0,A9.Z)({elementType:E,externalSlotProps:m?.root,externalForwardedProps:M,additionalProps:{"aria-invalid":O.error,ref:P},className:R.root,ownerState:I}),Z=f?.input||Hre;return(0,o.jsxs)(E,(0,jW.Z)({},L,{children:[h,(0,o.jsx)(Bre,{sectionListRef:_,elements:r,contentEditable:g,tabIndex:v,className:R.sectionsContainer,onFocus:e=>{O.disabled?e.stopPropagation():O.onFocus?.(e)},onBlur:O.onBlur,onInput:y,onPaste:b,onKeyDown:x,slots:{root:Z,section:Wre,sectionContent:Ure,sectionSeparator:qre},slotProps:{root:{ownerState:I},sectionContent:{className:kre.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?kre.sectionBefore:kre.sectionAfter})}}),d,p?p((0,jW.Z)({},O)):null,(0,o.jsx)(Gre,(0,jW.Z)({name:w,className:R.input,value:l,onChange:u,id:c,"aria-hidden":"true",tabIndex:-1,readOnly:S,required:O.required,disabled:O.disabled},k,{ref:D}))]}))})),Yre=["label","autoFocus","ownerState","notched"],Xre=(0,d.ZP)($re,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})((({theme:e})=>{const 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 .${_re.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${_re.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${_re.focused} .${_re.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${_re.disabled}`]:{[`& .${_re.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${_re.error} .${_re.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:{[`&.${_re.focused}:not(.${_re.error}) .${_re.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})))}})),Qre=(0,d.ZP)(Hre,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),Jre=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:a,notched:l}=n,u=(0,FW.Z)(n,Yre),c=(0,wre.Z)(),d=(0,jW.Z)({},n,a,c,{color:c?.color||"primary"}),h=(e=>{const{classes:t}=e,n=(0,s.Z)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Cre,t);return(0,jW.Z)({},t,n)})(d);return(0,o.jsx)(Kre,(0,jW.Z)({slots:{root:Xre,input:Qre},renderSuffix:e=>(0,o.jsx)(Are,{shrink:Boolean(l||e.adornedStart||e.focused||e.filled),notched:Boolean(l||e.adornedStart||e.focused||e.filled),className:h.notchedOutline,label:null!=r&&""!==r&&c?.required?(0,o.jsxs)(i.Fragment,{children:[r," ","*"]}):r,ownerState:d})},u,{label:r,classes:h,ref:t}))}));Jre.muiName="Input";var eoe=n(35315);function toe(e){return(0,g.ZP)("MuiPickersFilledInput",e)}const noe=(0,jW.Z)({},kre,(0,m.Z)("MuiPickersFilledInput",["root","underline","input"])),roe=["label","autoFocus","disableUnderline","ownerState"],ooe=(0,d.ZP)($re,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,eoe.x9)(e)&&"disableUnderline"!==e})((({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,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:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${noe.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${noe.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},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"},[`&.${noe.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${noe.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})`:n}`,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(.${noe.disabled}, .${noe.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${noe.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}})),ioe=(0,d.ZP)(Hre,{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}}]}),aoe=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=n,l=(0,FW.Z)(n,roe),u=(0,wre.Z)(),c=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,s.Z)(r,toe,t);return(0,jW.Z)({},t,o)})((0,jW.Z)({},n,a,u,{color:u?.color||"primary"}));return(0,o.jsx)(Kre,(0,jW.Z)({slots:{root:ooe,input:ioe},slotProps:{root:{disableUnderline:i}}},l,{label:r,classes:c,ref:t}))}));function soe(e){return(0,g.ZP)("MuiPickersFilledInput",e)}aoe.muiName="Input";const loe=(0,jW.Z)({},kre,(0,m.Z)("MuiPickersInput",["root","input"])),uoe=["label","autoFocus","disableUnderline","ownerState"],coe=(0,d.ZP)($re,{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"},[`&.${loe.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${loe.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(.${loe.disabled}, .${loe.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${loe.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}})),doe=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:a}=n,l=(0,FW.Z)(n,uoe),u=(0,wre.Z)(),c=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},o=(0,s.Z)(r,soe,t);return(0,jW.Z)({},t,o)})((0,jW.Z)({},n,a,u,{disableUnderline:i,color:u?.color||"primary"}));return(0,o.jsx)(Kre,(0,jW.Z)({slots:{root:coe}},l,{label:r,classes:c,ref:t}))}));doe.muiName="Input";const hoe=["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"],poe={standard:doe,filled:aoe,outlined:Jre},foe=(0,d.ZP)(Id.Z,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),moe=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:l,className:u,color:c="primary",disabled:d=!1,error:h=!1,variant:p="outlined",required:f=!1,InputProps:m,inputProps:g,inputRef:v,sectionListRef:y,elements:b,areAllSectionsEmpty:x,onClick:w,onKeyDown:S,onKeyUp:k,onPaste:C,onInput:_,endAdornment:M,startAdornment:T,tabIndex:P,contentEditable:D,focused:A,value:O,onChange:I,fullWidth:R,id:E,name:L,helperText:Z,FormHelperTextProps:N,label:j,InputLabelProps:F}=n,z=(0,FW.Z)(n,hoe),B=i.useRef(null),V=(0,ste.Z)(t,B),$=(0,D9.Z)(E),H=Z&&$?`${$}-helper-text`:void 0,W=j&&$?`${$}-label`:void 0,U=(0,jW.Z)({},n,{color:c,disabled:d,error:h,focused:A,required:f,variant:p}),q=(e=>{const{focused:t,disabled:n,classes:r,required:o}=e,i={root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]};return(0,s.Z)(i,xre,r)})(U),G=poe[p];return(0,o.jsxs)(foe,(0,jW.Z)({className:(0,a.Z)(q.root,u),ref:V,focused:A,onFocus:r,onBlur:l,disabled:d,variant:p,error:h,color:c,fullWidth:R,required:f,ownerState:U},z,{children:[(0,o.jsx)(yre.Z,(0,jW.Z)({htmlFor:$,id:W},F,{children:j})),(0,o.jsx)(G,(0,jW.Z)({elements:b,areAllSectionsEmpty:x,onClick:w,onKeyDown:S,onKeyUp:k,onInput:_,onPaste:C,endAdornment:M,startAdornment:T,tabIndex:P,contentEditable:D,value:O,onChange:I,id:$,fullWidth:R,inputProps:g,inputRef:v,sectionListRef:y,label:j,name:L,role:"group","aria-labelledby":W,"aria-describedby":H,"aria-live":H?"polite":void 0},m)),Z&&(0,o.jsx)(bre.Z,(0,jW.Z)({id:H},N,{children:Z}))]}))})),goe=["enableAccessibleFieldDOMStructure"],voe=["InputProps","readOnly"],yoe=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],boe=["slots","slotProps","InputProps","inputProps"],xoe=i.forwardRef((function(e,t){const n=(0,m7.Z)({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:a,InputProps:s,inputProps:l}=n,u=(0,FW.Z)(n,boe),c=n,d=r?.textField??(e.enableAccessibleFieldDOMStructure?moe:T.Z),h=(0,A9.Z)({elementType:d,externalSlotProps:a?.textField,externalForwardedProps:u,ownerState:c,additionalProps:{ref:t}});h.inputProps=(0,jW.Z)({},l,h.inputProps),h.InputProps=(0,jW.Z)({},s,h.InputProps);const p=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,FW.Z)(e,goe);if(t){const{InputProps:e,readOnly:t}=n,r=(0,FW.Z)(n,voe);return(0,jW.Z)({},r,{InputProps:(0,jW.Z)({},e??{},{readOnly:t})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:u}=n,c=(0,FW.Z)(n,yoe);return(0,jW.Z)({},c,{InputProps:(0,jW.Z)({},s??{},{readOnly:a}),inputProps:(0,jW.Z)({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:u})})})(fre(h)),f=(e=>{const t=U7(),{clearable:n,onClear:r,InputProps:a,sx:s,slots:l,slotProps:u}=e,c=(0,FW.Z)(e,gre),d=l?.clearButton??M.Z,h=(0,A9.Z)({elementType:d,externalSlotProps:u?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),p=(0,FW.Z)(h,vre),f=l?.clearIcon??W7,m=(0,A9.Z)({elementType:f,externalSlotProps:u?.clearIcon,ownerState:{}});return(0,jW.Z)({},c,{InputProps:(0,jW.Z)({},a,{endAdornment:(0,o.jsxs)(i.Fragment,{children:[n&&(0,o.jsx)(mre.Z,{position:"end",sx:{marginRight:a?.endAdornment?-1:-1.5},children:(0,o.jsx)(d,(0,jW.Z)({},p,{onClick:r,children:(0,o.jsx)(f,(0,jW.Z)({fontSize:"small"},m))}))}),a?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s)?s:[s]]})})((0,jW.Z)({},p,{slots:r,slotProps:a}));return(0,o.jsx)(d,(0,jW.Z)({},f))}));var woe=n(29435);function Soe(e,t,n){return(0,Sr.L)(n?.in||e,+(0,gr.Q)(e)+t)}function koe(e,t,n){return Soe(e,1e3*t,n)}function Coe(e,t,n){const r=(0,gr.Q)(e,n?.in);return r.setTime(r.getTime()+t*br.yJ),r}function _oe(e,t,n){return Soe(e,t*br.vh,n)}function Moe(e,t,n){return(0,woe.E)(e,7*t,n)}var Toe=n(39489);function Poe(e,t,n){return(0,Toe.z)(e,12*t,n)}function Doe(e,t){const n=(0,gr.Q)(e,t?.in);return n.setHours(23,59,59,999),n}function Aoe(e,t){const n=(0,Rn.j)(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=(0,gr.Q)(e,t?.in),i=o.getDay(),a=6+(i+(0,gr.Q)(t)}function Boe(e,t){return+(0,gr.Q)(e)<+(0,gr.Q)(t)}function Voe(e,t){return+(0,gr.Q)(e)==+(0,gr.Q)(t)}var $oe=n(5643),Hoe=n(23033);function Woe(e,t,n){const[r,o]=(0,$oe.d)(n?.in,e,t);return+(0,Hoe.b)(r)==+(0,Hoe.b)(o)}function Uoe(e,t,n){const[r,o]=(0,$oe.d)(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function qoe(e,t,n){const[r,o]=(0,$oe.d)(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Goe(e,t){const n=(0,gr.Q)(e,t?.in);return n.setMinutes(0,0,0),n}function Koe(e,t,n){const[r,o]=(0,$oe.d)(n?.in,e,t);return+Goe(r)==+Goe(o)}function Yoe(e,t){const n=function(e){return"function"==typeof e&&e.prototype?.constructor===e}(t)?new t(0):(0,Sr.L)(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}class Xoe{subPriority=0;validate(e,t){return!0}}class Qoe extends Xoe{constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class Joe extends Xoe{priority=10;subPriority=-1;constructor(e,t){super(),this.context=e||(e=>(0,Sr.L)(t,e))}set(e,t){return t.timestampIsSet?e:(0,Sr.L)(e,Yoe(e,this.context))}}class eie{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new Qoe(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}const tie=/^(1[0-2]|0?\d)/,nie=/^(3[0-1]|[0-2]?\d)/,rie=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,oie=/^(5[0-3]|[0-4]?\d)/,iie=/^(2[0-3]|[0-1]?\d)/,aie=/^(2[0-4]|[0-1]?\d)/,sie=/^(1[0-1]|0?\d)/,lie=/^(1[0-2]|0?\d)/,uie=/^[0-5]?\d/,cie=/^[0-5]?\d/,die=/^\d/,hie=/^\d{1,2}/,pie=/^\d{1,3}/,fie=/^\d{1,4}/,mie=/^-?\d+/,gie=/^-?\d/,vie=/^-?\d{1,2}/,yie=/^-?\d{1,3}/,bie=/^-?\d{1,4}/,xie=/^([+-])(\d{2})(\d{2})?|Z/,wie=/^([+-])(\d{2})(\d{2})|Z/,Sie=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,kie=/^([+-])(\d{2}):(\d{2})|Z/,Cie=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function _ie(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Mie(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Tie(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};const r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*br.vh+i*br.yJ+a*br.qk),rest:t.slice(n[0].length)}}function Pie(e){return Mie(mie,e)}function Die(e,t){switch(e){case 1:return Mie(die,t);case 2:return Mie(hie,t);case 3:return Mie(pie,t);case 4:return Mie(fie,t);default:return Mie(new RegExp("^\\d{1,"+e+"}"),t)}}function Aie(e,t){switch(e){case 1:return Mie(gie,t);case 2:return Mie(vie,t);case 3:return Mie(yie,t);case 4:return Mie(bie,t);default:return Mie(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Oie(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Iie(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function Rie(e){return e%400==0||e%4==0&&e%100!=0}function Eie(e,t,n){const r=(0,gr.Q)(e,n?.in),o=Pr(r,n)-t;return r.setDate(r.getDate()-7*o),(0,gr.Q)(r,n?.in)}function Lie(e,t,n){const r=(0,gr.Q)(e,n?.in),o=_r(r,n)-t;return r.setDate(r.getDate()-7*o),r}const Zie=[31,28,31,30,31,30,31,31,30,31,30,31],Nie=[31,29,31,30,31,30,31,31,30,31,30,31];function jie(e,t,n){const r=(0,Rn.j)(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=(0,gr.Q)(e,n?.in),a=i.getDay(),s=7-o,l=t<0||t>6?t-(a+s)%7:((t%7+7)%7+s)%7-(a+s)%7;return(0,woe.E)(i,l,n)}function Fie(e,t){const n=(0,gr.Q)(e,t?.in).getDay();return 0===n?7:n}function zie(e,t,n){const r=(0,gr.Q)(e,n?.in),o=t-Fie(r,n);return(0,woe.E)(r,o,n)}var Bie=n(67337);const Vie={G:new class extends eie{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends eie{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return _ie(Die(4,e),r);case"yo":return _ie(n.ordinalNumber(e,{unit:"year"}),r);default:return _ie(Die(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Iie(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}},Y:new class extends eie{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return _ie(Die(4,e),r);case"Yo":return _ie(n.ordinalNumber(e,{unit:"year"}),r);default:return _ie(Die(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=Mr(e,r);if(n.isTwoDigitYear){const t=Iie(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,xr.z)(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),(0,xr.z)(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends eie{priority=130;parse(e,t){return Aie("R"===t?4:t.length,e)}set(e,t,n){const r=(0,Sr.L)(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),wr(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends eie{priority=130;parse(e,t){return Aie("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends eie{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return Die(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends eie{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return Die(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends eie{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return _ie(Mie(tie,e),r);case"MM":return _ie(Die(2,e),r);case"Mo":return _ie(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends eie{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return _ie(Mie(tie,e),r);case"LL":return _ie(Die(2,e),r);case"Lo":return _ie(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends eie{priority=100;parse(e,t,n){switch(t){case"w":return Mie(oie,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Die(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return(0,xr.z)(Eie(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends eie{priority=100;parse(e,t,n){switch(t){case"I":return Mie(oie,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Die(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return wr(Lie(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends eie{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return Mie(nie,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Die(t.length,e)}}validate(e,t){const n=Rie(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Nie[r]:t>=1&&t<=Zie[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends eie{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return Mie(rie,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Die(t.length,e)}}validate(e,t){return Rie(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends eie{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=jie(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends eie{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return _ie(Die(t.length,e),o);case"eo":return _ie(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=jie(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends eie{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return _ie(Die(t.length,e),o);case"co":return _ie(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=jie(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends eie{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return Die(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return _ie(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return _ie(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return _ie(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return _ie(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=zie(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends eie{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Oie(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends eie{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Oie(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends eie{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(Oie(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends eie{priority=70;parse(e,t,n){switch(t){case"h":return Mie(lie,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Die(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends eie{priority=70;parse(e,t,n){switch(t){case"H":return Mie(iie,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Die(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends eie{priority=70;parse(e,t,n){switch(t){case"K":return Mie(sie,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Die(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends eie{priority=70;parse(e,t,n){switch(t){case"k":return Mie(aie,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Die(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends eie{priority=60;parse(e,t,n){switch(t){case"m":return Mie(uie,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Die(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends eie{priority=50;parse(e,t,n){switch(t){case"s":return Mie(cie,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Die(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends eie{priority=30;parse(e,t){return _ie(Die(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends eie{priority=10;parse(e,t){switch(t){case"X":return Tie(xie,e);case"XX":return Tie(wie,e);case"XXXX":return Tie(Sie,e);case"XXXXX":return Tie(Cie,e);default:return Tie(kie,e)}}set(e,t,n){return t.timestampIsSet?e:(0,Sr.L)(e,e.getTime()-(0,Bie.D)(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends eie{priority=10;parse(e,t){switch(t){case"x":return Tie(xie,e);case"xx":return Tie(wie,e);case"xxxx":return Tie(Sie,e);case"xxxxx":return Tie(Cie,e);default:return Tie(kie,e)}}set(e,t,n){return t.timestampIsSet?e:(0,Sr.L)(e,e.getTime()-(0,Bie.D)(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends eie{priority=40;parse(e){return Pie(e)}set(e,t,n){return[(0,Sr.L)(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends eie{priority=20;parse(e){return Pie(e)}set(e,t,n){return[(0,Sr.L)(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},$ie=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Wie=/^'([^]*?)'?$/,Uie=/''/g,qie=/\S/,Gie=/[a-zA-Z]/;function Kie(e,t,n,r){const o=()=>(0,Sr.L)(r?.in||n,NaN),i=io(),a=r?.locale??i.locale??In,s=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():(0,gr.Q)(n,r?.in);const u={firstWeekContainsDate:s,weekStartsOn:l,locale:a},c=[new Joe(r?.in,n)],d=t.match(Hie).map((e=>{const t=e[0];if(t in $r){return(0,$r[t])(e,a.formatLong)}return e})).join("").match($ie),h=[];for(let n of d){!r?.useAdditionalWeekYearTokens&&Gr(n)&&Kr(n,t,e),!r?.useAdditionalDayOfYearTokens&&qr(n)&&Kr(n,t,e);const i=n[0],s=Vie[i];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=h.find((e=>t.includes(e.token)||e.token===i));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${n}\` at the same time`)}else if("*"===s.incompatibleTokens&&h.length>0)throw new RangeError(`The format string mustn't contain \`${n}\` and any other token at the same time`);h.push({token:i,fullToken:n});const r=s.run(e,n,a.match,u);if(!r)return o();c.push(r.setter),e=r.rest}else{if(i.match(Gie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===n?n="'":"'"===i&&(n=n.match(Wie)[1].replace(Uie,"'")),0!==e.indexOf(n))return o();e=e.slice(n.length)}}if(e.length>0&&qie.test(e))return o();const p=c.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>c.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let f=(0,gr.Q)(n,r?.in);if(isNaN(+f))return o();const m={};for(const e of p){if(!e.validate(f,u))return o();const t=e.set(f,m,u);Array.isArray(t)?(f=t[0],Object.assign(m,t[1])):f=t}return f}function Yie(e,t,n){const r=(0,gr.Q)(e,n?.in);return r.setDate(t),r}function Xie(e,t,n){const r=(0,gr.Q)(e,n?.in);return r.setHours(t),r}function Qie(e,t,n){const r=(0,gr.Q)(e,n?.in);return r.setMinutes(t),r}function Jie(e,t,n){const r=(0,gr.Q)(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=(0,Sr.L)(n?.in||e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Roe(a);return r.setMonth(t,Math.min(i,s)),r}function eae(e,t,n){const r=(0,gr.Q)(e,n?.in);return r.setSeconds(t),r}function tae(e,t,n){const r=(0,gr.Q)(e,n?.in);return r.setMilliseconds(t),r}function nae(e,t,n){const r=(0,gr.Q)(e,n?.in);return isNaN(+r)?(0,Sr.L)(n?.in||e,NaN):(r.setFullYear(t),r)}function rae(e,t){const n=(0,gr.Q)(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function oae(e,t){const n=(0,gr.Q)(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function iae(e,t,n){const r=+(0,gr.Q)(e,n?.in),[o,i]=[+(0,gr.Q)(t.start,n?.in),+(0,gr.Q)(t.end,n?.in)].sort(((e,t)=>e-t));return r>=o&&r<=i}const aae={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"},sae={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 lae{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=aae,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=>{const t=e[0];if("p"===t||"P"===t){return(0,this.longFormatters[t])(e,this.locale.formatLong)}return e})).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;const{locale:t,formats:n,longFormatters:r,lib:o}=e;this.locale=t,this.formats=(0,jW.Z)({},sae,n),this.longFormatters=r,this.lib=o||"date-fns"}}class uae extends lae{constructor({locale:e,formats:t}={}){super({locale:e??In,formats:t,longFormatters:$r}),this.parse=(e,t)=>""===e?null:Kie(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&Xr(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>ro(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&Voe(e,t),this.isSameYear=(e,t)=>Uoe(e,t),this.isSameMonth=(e,t)=>qoe(e,t),this.isSameDay=(e,t)=>Woe(e,t),this.isSameHour=(e,t)=>Koe(e,t),this.isAfter=(e,t)=>zoe(e,t),this.isAfterYear=(e,t)=>zoe(e,Ooe(t)),this.isAfterDay=(e,t)=>zoe(e,Doe(t)),this.isBefore=(e,t)=>Boe(e,t),this.isBeforeYear=(e,t)=>Boe(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>Boe(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>iae(e,{start:t,end:n}),this.startOfYear=e=>vr(e),this.startOfMonth=e=>rae(e),this.startOfWeek=e=>(0,xr.z)(e,{locale:this.locale}),this.startOfDay=e=>(0,Hoe.b)(e),this.endOfYear=e=>Ooe(e),this.endOfMonth=e=>oae(e),this.endOfWeek=e=>Aoe(e,{locale:this.locale}),this.endOfDay=e=>Doe(e),this.addYears=(e,t)=>Poe(e,t),this.addMonths=(e,t)=>(0,Toe.z)(e,t),this.addWeeks=(e,t)=>Moe(e,t),this.addDays=(e,t)=>(0,woe.E)(e,t),this.addHours=(e,t)=>_oe(e,t),this.addMinutes=(e,t)=>Coe(e,t),this.addSeconds=(e,t)=>koe(e,t),this.getYear=e=>Foe(e),this.getMonth=e=>Zoe(e),this.getDate=e=>Ioe(e),this.getHours=e=>Eoe(e),this.getMinutes=e=>Loe(e),this.getSeconds=e=>Noe(e),this.getMilliseconds=e=>joe(e),this.setYear=(e,t)=>nae(e,t),this.setMonth=(e,t)=>Jie(e,t),this.setDate=(e,t)=>Yie(e,t),this.setHours=(e,t)=>Xie(e,t),this.setMinutes=(e,t)=>Qie(e,t),this.setSeconds=(e,t)=>eae(e,t),this.setMilliseconds=(e,t)=>tae(e,t),this.getDaysInMonth=e=>Roe(e),this.getWeekArray=e=>{const t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e));let r=0,o=t;const i=[];for(;this.isBefore(o,n);){const e=Math.floor(r/7);i[e]=i[e]||[],i[e].push(o),o=this.addDays(o,1),r+=1}return i},this.getWeekNumber=e=>Pr(e,{locale:this.locale}),this.getYearRange=([e,t])=>{const n=this.startOfYear(e),r=this.endOfYear(t),o=[];let i=n;for(;this.isBefore(i,r);)o.push(i),i=this.addYears(i,1);return o}}}const cae="yyyy-MM-dd HH:mm:ss";function dae(e,t){return e?(0,Cn.s3)(e)?e.pastDuration:function(e,t,n){return`${Vo(e.start,t,n)} - ${Vo(e.end,t,n)}`}(e,cae,t):"Custom Time Range"}const hae=({initialTimeRange:e,onChange:t,onCancel:n,timeZone:r})=>{const[a,s]=(0,i.useState)(e),l=(0,i.useMemo)((()=>({start:Vo(a.start,cae,r),end:Vo(a.end,cae,r)})),[a.start,a.end,r]),[u,c]=(0,i.useState)(!0),d=(e,t)=>{s((n=>({...n,[t]:e})))},h=e=>{d(e,"start")},p=e=>{d(e,"end")},f=()=>{const e={start:a.start,end:a.end};var t,n;if(n=e.end,Xr(t=e.start)&&Xr(n)?!!Boe(t,n)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return e};return(0,o.jsx)(y7,{dateAdapter:uae,children:(0,o.jsxs)(_.Z,{spacing:2,sx:e=>({padding:e.spacing(1,0,2)}),children:[u&&(0,o.jsxs)(ii.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,o.jsx)(Mc.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,o.jsx)(ere,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:a.start,onChange:e=>{null!==e&&h(e)},onAccept:()=>{c(!1)}})]}),!u&&(0,o.jsxs)(ii.Z,{sx:e=>({".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}),children:[(0,o.jsx)(Mc.Z,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,o.jsx)(ere,{displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:a.end,minDateTime:a.start,onChange:e=>{null!==e&&p(e)},onAccept:e=>{null!==e&&(c(!0),p(e))}})]}),(0,o.jsxs)(_.Z,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[(0,o.jsx)(RW.ErrorBoundary,{FallbackComponent:IW,children:(0,o.jsx)(xoe,{label:"Start Time",value:new Date(l.start),onChange:e=>{e&&h(e)},onBlur:()=>f(),format:cae})}),(0,o.jsx)(RW.ErrorBoundary,{FallbackComponent:IW,children:(0,o.jsx)(xoe,{label:"End Time",value:new Date(l.end),onChange:e=>{e&&p(e)},onBlur:()=>f(),format:cae})})]}),(0,o.jsxs)(_.Z,{direction:"row",sx:{padding:e=>e.spacing(0,1)},gap:1,children:[(0,o.jsx)(k.Z,{variant:"contained",onClick:()=>(()=>{const e=f();e&&t(e)})(),fullWidth:!0,children:"Apply"}),(0,o.jsx)(k.Z,{variant:"outlined",onClick:()=>n(),fullWidth:!0,children:"Cancel"})]})]})})};function pae({value:e,timeOptions:t,onChange:n,height:r,showCustomTimeRange:a=!0,timeZone:s,timeZoneOptions:l,onTimeZoneChange:u}){const{timeZone:c}=ti(),d=s??c,h=(0,i.useRef)(),[p,f]=(0,i.useState)(!1),m=(0,i.useMemo)((()=>(0,Cn.s3)(e)?(0,Cn.sG)(e):e),[e]),g=(0,i.useMemo)((()=>function(e,t){return{value:e,display:dae(e,t)}}((0,Cn.s3)(e)?void 0:e,d)),[e,d]),[v,y]=(0,i.useState)(!1),b=l??Nn(),[x,w]=(0,i.useState)(null),S=Boolean(x),k=b.find((e=>e.value===d))?.display??d,C=b.map((e=>({id:e.value,label:e.display})));let _;{const e=b.find((e=>e.value===d));e&&(_={id:e.value,label:e.display})}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(de.ZP,{anchorEl:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:S,onClose:()=>w(null),sx:e=>({padding:e.spacing(1)}),children:(0,o.jsx)(ii.Z,{sx:{p:1,minWidth:260},onClick:e=>{e.stopPropagation()},children:(0,o.jsx)(Wd,{options:C,value:_,onChange:(e,t)=>{if(t){const e=b.find((e=>e.value===t.id));e&&u?.(e)}w(null)},disableClearable:!0,renderInput:e=>(0,o.jsx)(T.Z,{...e,placeholder:"Search timezones",size:"small"})})})}),(0,o.jsx)(de.ZP,{anchorEl:h.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},open:p,onClose:()=>f(!1),sx:e=>({padding:e.spacing(2)}),children:(0,o.jsx)(hae,{initialTimeRange:m,onChange:e=>{n(e),f(!1),y(!1)},onCancel:()=>f(!1),timeZone:d})}),(0,o.jsx)(ii.Z,{ref:h,children:(0,o.jsxs)(h7.Z,{open:v,value:dae(e,d),onClick:()=>y(!v),IconComponent:p7.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:[(0,o.jsx)(op.Z,{disableRipple:!0,onClick:e=>{e.preventDefault(),e.stopPropagation()},sx:{cursor:"default","&:hover":{backgroundColor:"transparent"},py:.5,px:1},children:(0,o.jsxs)(ii.Z,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[(0,o.jsxs)(ii.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start"},children:[(0,o.jsx)(ii.Z,{sx:{typography:"subtitle1"},children:"Time Range"}),(0,o.jsxs)(ii.Z,{sx:{color:"text.secondary",typography:"caption",mt:.25},children:["Timezone: ",k]})]}),(0,o.jsx)(ii.Z,{sx:{display:"flex",alignItems:"center",pr:1,ml:1.5},children:(0,o.jsx)(M.Z,{size:"small","aria-label":"Select timezone",onClick:e=>{e.preventDefault(),e.stopPropagation(),w(e.currentTarget)},children:(0,o.jsx)(f7.default,{fontSize:"small"})})})]})}),t.map(((e,t)=>(0,o.jsx)(op.Z,{value:dae(e.value,d),onClick:()=>{n(e.value)},children:e.display},t))),a&&(0,o.jsx)(op.Z,{value:dae(g.value,d),onClick:()=>f(!0),children:g.display})]})})]})}function fae({value:e,onChange:t,timeZoneOptions:n,variant:r="standard",heightPx:a,...s}){const l=(0,i.useMemo)((()=>n??Nn()),[n]),u=a?"number"==typeof a?`${a}px`:a:void 0,c=(0,i.useMemo)((()=>({minWidth:"compact"===r?"80px":"150px",...u&&{lineHeight:u,paddingY:0},...s.sx})),[r,u,s.sx]);return(0,o.jsx)(h7.Z,{...s,value:e,onChange:(e,n)=>{(e=>{const n=l.find((t=>t.value===e));n&&t&&t(n)})(e.target.value)},sx:c,size:"compact"===r?"small":"medium",children:l.map((e=>(0,o.jsx)(op.Z,{value:e.value,children:e.display},e.value)))})}function mae(e){const{markerColor:t,sx:n}=e;return(0,o.jsx)(ii.Z,{sx:Un({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},n),style:{backgroundColor:t}})}function gae(e){const{formattedY:t,markerColor:n,metricName:r,metricLabels:i}=e;return(0,o.jsxs)(_.Z,{spacing:.5,children:[(0,o.jsxs)(ii.Z,{sx:e=>({display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}),children:[(0,o.jsx)(mae,{markerColor:n,sx:{marginTop:.25}}),(0,o.jsxs)(ii.Z,{component:"span",children:[r,(0,o.jsx)(ii.Z,{component:"span",sx:e=>({color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}),children:t})]})]}),(0,o.jsx)(ZW.Z,{sx:e=>({borderColor:e.palette.grey[500]})}),(0,o.jsx)(ii.Z,{sx:e=>({color:e.palette.common.white}),children:i.map((e=>{if(e){const[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,o.jsxs)(ii.Z,{sx:{display:"flex",gap:"4px"},children:[(0,o.jsx)(Mc.Z,{sx:{fontSize:"11px"},children:r}),(0,o.jsx)(Mc.Z,{sx:e=>({color:e.palette.common.white,fontWeight:700,fontSize:"11px"}),children:i})]},e)}}))})]})}const vae=375,yae=650,bae=650,xae=yae-150,wae=.75,Sae=8,kae=750,Cae="nearby series showing in tooltip",_ae="emphasized series showing as bold in tooltip",Mae="#2E313E",Tae=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),Pae={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},Dae=[],Aae=()=>{const[e,t]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const 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},Oae={wrapLabels:!0,enablePinning:!0},Iae="Click chart to pin",Rae="Click chart to unpin";function Eae(e){const{seriesName:t,formattedY:n,markerColor:r,totalSeries:i,emphasizeText:a=!1,wrapLabels:s=!0}=e,l=t.split("{"),u=(l[1]??t).replace(/[{}]/g,"").split(",");if(1===i&&u.length>1){const e=l[0]?`${l[0]}:`:"value:";return(0,o.jsx)(gae,{formattedY:n,metricName:e,metricLabels:u,markerColor:r})}const c=t.replace(/[,]/g,", ");return(0,o.jsxs)(ii.Z,{sx:{display:"table-row",paddingTop:.5},children:[(0,o.jsxs)(ii.Z,{sx:{display:"table-cell",maxWidth:"520px"},children:[(0,o.jsx)(mae,{markerColor:r,sx:{marginTop:.5}}),(0,o.jsx)(ii.Z,{component:"span",sx:e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:xae,overflow:"hidden",color:e.palette.common.white,fontWeight:a?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:s?"normal":"nowrap"}),"aria-label":a?_ae:Cae,children:c})]}),(0,o.jsx)(ii.Z,{sx:e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:a?e.typography.fontWeightBold:e.typography.fontWeightRegular}),children:n})]})}var Lae=n(7444),Zae=n(75276);function Nae(e,t,n,r,o){if(null===e)return;if(null!==t&&(e=t),void 0===e.plotCanvas.x)return;let i=e.page.x+32,a=e.page.y+16;if(o){const e=o.getBoundingClientRect();i=i-e.left+o.scrollLeft,a=a-e.top+o.scrollTop;const t=e.top+o.scrollHeight;a+n>t&&(a=Math.max(t-n-16,Sae/2))}else a+n>window.innerHeight+window.scrollY&&(a=Math.max(window.innerHeight+window.scrollY-n-16,Sae/2));return i+r>window.innerWidth&&(i=e.page.x-r-32),i<32&&(i=32),a0?e[n]:null;if(!y)break;const w=y.values;if(void 0===w||!Array.isArray(w))break;const S=u,k=S.name?S.name.toString():"",C=S.id?S.id.toString():"",_=S.color??"#000",M=a?.get(C)??i;if(Array.isArray(e))for(let e=0;e=a-r}else t=c<=a+r&&c>=a-r;if(t){const t=g>Bae?2:5,r=Math.max(t,100/g);let u=!1;if(void 0!==s){const t=o.convertToPixel({seriesIndex:n},[e,a]);if(t&&void 0!==t[1]){const e=(x??50)*(r/100);u=Math.abs(s-t[1])<=Math.max(e,5)}else u=Wae({valueToCheck:c,baseValue:a,percentage:r})}else u=Wae({valueToCheck:c,baseValue:a,percentage:r});if(u){h.push(n);const t=v.get(a)??0;v.set(a,t+1),t>0&&m.push({seriesIndex:n,dataIndex:e,seriesName:k,yValue:a}),f.push({seriesIndex:n,dataIndex:e,seriesName:k,yValue:a})}else p.push(n),o.dispatchAction({type:"downplay",seriesIndex:n});const y=(0,mn.Bw)(a,M);l.push({seriesIdx:n,datumIdx:e,seriesName:k,date:b,x:i,y:a,formattedY:y,markerColor:_.toString(),isClosestToCursor:u}),d.push(n)}}}}return Vn(o,d,h,p,f,m),l}function $ae(e,t,n,r,o){const i=[],a=t[0]??null,s=t[1]??null;if(null===a||null===s)return i;const l=[],u=[],c=[],d=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t=wn)break;const p=h.name?h.name.toString():"",f=h.color??"#000";if(Array.isArray(h.data))for(let m=0;m=v-n){const e=d>Bae?2:5,n=Wae({valueToCheck:s,baseValue:v,percentage:Math.max(e,100/d)});n?u.push(t):(c.push(t),void 0!==r?.dispatchAction&&r.dispatchAction({type:"downplay",seriesIndex:t}));const a=g>99999999999?g:1e3*g,h=(0,mn.Bw)(v,o);i.push({seriesIdx:t,datumIdx:m,seriesName:p,date:a,x:g,y:v,formattedY:h,markerColor:f.toString(),isClosestToCursor:n}),l.push(t)}}}return void 0!==r?.dispatchAction&&(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})),i}function Hae({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:o,format:i,seriesFormatMap:a,showAllSeries:s=!1}){if(void 0===o||null===e)return Dae;let l=!1;if(null!==e.target){const t=e.target.parentElement;if(null!==t){const e=t.parentElement;if(null!==e){o.getDom()===e&&(l=!0)}}}if(null!==t&&(e=t,l=!0),!1===l||null===n||void 0===o._model)return Dae;if(void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return Dae;const u=e.plotCanvas.y,c=Bn(e.plotCanvas.x,u,o);if(null!==c){const e=o._model.getComponent("yAxis").axis.scale,t="log"===e.type;let l=e._interval;if(t&&e.base){const t=e.base,n=e._extent,r=t**n[0];l=(t**n[1]-r)/100}const d=Uae({yInterval:l,totalSeries:n.length,showAllSeries:s}),h=r.some((e=>void 0!==e.yAxisIndex&&e.yAxisIndex>0));return Vae(n,r,c,d,o,i,a,h?u:void 0)}return Dae}function Wae({valueToCheck:e,baseValue:t,percentage:n}){const r=n/100*t;return e>=t-r&&e<=t+r}function Uae({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;const r=.3*e;if(t>Bae){const n=e*zae/t;return Math.max(r,n)}return Math.max(r,e*Fae)}var qae=n(87895),Gae=n(1889),Kae=n(75186);const Yae=(0,i.memo)((function({nearbySeries:e,totalSeries:t,isTooltipPinned:n,showAllSeries:r,enablePinning:i=!0,onShowAllClick:a,onUnpinClick:s}){const{formatWithUserTimeZone:l}=ti(),u=e[0]?.date??null;if(null===u)return null;const c=i&&t>5,d=n?Rae:Iae;return(0,o.jsxs)(ii.Z,{sx:e=>({width:"100%",maxWidth:yae,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??Mae,position:"sticky",top:0,left:0}),children:[(0,o.jsxs)(ii.Z,{sx:{width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},children:[(e=>{const t=new Date(e),n=l(t,"MMM dd, yyyy - "),r=l(t,"HH:mm:ss");return(0,o.jsxs)(ii.Z,{children:[(0,o.jsx)(Mc.Z,{variant:"caption",sx:e=>({color:e.palette.common.white}),children:n}),(0,o.jsx)(Mc.Z,{variant:"caption",children:(0,o.jsx)("strong",{children:r})})]})})(u),(0,o.jsxs)(_.Z,{direction:"row",gap:1,sx:{marginLeft:"auto"},children:[c&&(0,o.jsxs)(_.Z,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,o.jsx)(Mc.Z,{sx:{fontSize:11},children:"Show All"}),(0,o.jsx)(qae.Z,{checked:r,size:"small",onChange:(e,t)=>{if(void 0!==a)return a(t)},sx:e=>({"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}})})]}),i&&(0,o.jsxs)(_.Z,{direction:"row",alignItems:"center",children:[(0,o.jsx)(Mc.Z,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:d}),n?(0,o.jsx)(Gae.default,{onClick:()=>{void 0!==s&&s()},sx:{fontSize:16,cursor:"pointer"}}):(0,o.jsx)(Kae.default,{sx:{fontSize:16}})]})]})]}),(0,o.jsx)(ZW.Z,{sx:e=>({width:"100%",borderColor:e.palette.grey[500]})})]})}));function Xae(e){const{series:t,wrapLabels:n}=e,r=(0,i.useMemo)((()=>null===t?null:t.sort(((e,t)=>e.y>t.y?-1:1))),[t]);return null===t||null===r?null:(0,o.jsx)(ii.Z,{sx:e=>({display:"table",padding:e.spacing(.5,2)}),children:r.map((({datumIdx:e,seriesIdx:t,seriesName:i,y:a,formattedY:s,markerColor:l,isClosestToCursor:u})=>{if(null===e||null===t)return null;const c=t.toString()+e.toString();return(0,o.jsx)(Eae,{seriesName:i,y:a,formattedY:s,markerColor:l,totalSeries:r.length,wrapLabels:n,emphasizeText:u},c)}))})}const Qae=(0,i.memo)((function({containerId:e,chartRef:t,data:n,seriesMapping:r,enablePinning:a=!0,wrapLabels:s,format:l,seriesFormatMap:u,onUnpinClick:c,pinnedPos:d}){const[h,p]=(0,i.useState)(!1),f=(0,i.useRef)(),m=Aae(),{height:g,width:v,ref:y}=(0,Zae.default)(),b=null!==d&&a;if(null===m||null===m.target||null===n)return null;if(null===d&&"CANVAS"!==m.target.tagName)return null;const x=t.current,w=e?document.querySelector(e):void 0,S=w?w.getBoundingClientRect().height:void 0;f.current=Nae(m,d,g??0,v??0,w);const k=Hae({mousePos:m,data:n,seriesMapping:r,pinnedPos:d,chart:x,format:l,seriesFormatMap:u,showAllSeries:h});if(0===k.length)return null;const C=n.length;return(0,o.jsx)(Lae.Z,{container:w,children:(0,o.jsx)(ii.Z,{ref:y,sx:e=>jae(e,d,S),style:{transform:f.current},children:(0,o.jsxs)(_.Z,{spacing:.5,children:[(0,o.jsx)(Yae,{nearbySeries:k,totalSeries:C,enablePinning:a,isTooltipPinned:b,showAllSeries:h,onShowAllClick:e=>p(e),onUnpinClick:c}),(0,o.jsx)(Xae,{series:k,wrapLabels:s})]})})})}));function Jae(e,t){return(0,o.jsx)(ese,{ref:t,variant:"outlined",color:"secondary",...e})}const ese=(0,d.ZP)(k.Z)((({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"}))),tse=(0,i.forwardRef)(Jae);var nse=n(70609);const rse=Object.entries(mn.Bl).map((([e,t])=>({...t,id:e,group:t.group||"Decimal"}))).filter((e=>!e.disableSelectorOption));function ose({value:e,onChange:t,disabled:n=!1,...r}){const i=mn.Bl[e?.unit||"decimal"];return(0,o.jsx)(Wd,{value:e?{id:e.unit||"decimal",...i}:null,options:rse,groupBy:e=>e.group??"Decimal",onChange:(e,n)=>{t(null===n?void 0:{unit:n.id})},disabled:n,...r})}const ise=[{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 ase({value:e,onChange:t,disabled:n=!1}){const r=(0,mn.__)(e),i=(0,mn.Fp)(e),a=({decimalPlaces:n})=>{r&&t({...e,decimalPlaces:n})};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(zd,{label:"Short values",control:(0,o.jsx)(qae.Z,{checked:!!i&&(0,nse.lk)(e.shortValues),onChange:(n,r)=>{i&&t({...e,shortValues:r})},disabled:!i})}),(0,o.jsx)(zd,{label:"Unit",control:(0,o.jsx)(ose,{value:e,onChange:e=>{t(e||{unit:"decimal"})},disabled:n})}),(0,o.jsx)(zd,{label:"Decimals",control:(0,o.jsx)(Wd,{value:(s=e.decimalPlaces,ise.find((e=>e.decimalPlaces===s))),options:ise,getOptionLabel:e=>e.label,onChange:(e,t)=>a(t),disabled:!r,disableClearable:!0})})]});var s}function sse({name:e,height:t}){return(0,o.jsx)(ii.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,o.jsx)(Mc.Z,{variant:"body1","aria-label":"y axis label",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})})}var lse=n(45178);const use=Qo((0,lse.Z)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),cse={chartsTheme:use,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null};var dse=n(79602),hse=n(757);const pse={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,[`&\t.${dse.Z.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`&\t.${dse.Z.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,[`&\t.${dse.Z.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`&\t.${dse.Z.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,[`&\t.${dse.Z.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`&\t.${dse.Z.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,[`&\t.${dse.Z.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`&\t.${dse.Z.icon}`]:{color:e.palette.warning.main}},root:{["& ."+hse.Z.root]:{textDecoration:"underline"}}}},fse={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"},mse={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"},gse="#FFFFFF",vse="#000000",yse=e=>{const t=fse[800],n=fse[300];return"light"===e?{navigation:t,accent:n,primary:fse[800],secondary:fse[700],disabled:fse[300],link:mse[500],linkHover:mse[600]}:{navigation:t,accent:n,primary:gse,secondary:fse[50],disabled:fse[600],link:mse[400],linkHover:mse[500]}},bse=e=>{const t=mse[150],n="rgba(21, 23, 33, 0.75)";return"light"===e?{navigation:t,overlay:n,default:gse,paper:fse[50],code:fse[50],tooltip:fse[100],lighter:fse[50],border:fse[100]}:{navigation:t,overlay:n,default:fse[900],paper:fse[850],code:fse[800],tooltip:fse[600],lighter:fse[700],border:fse[600]}},xse=e=>"light"===e?{50:fse[50],100:fse[100],200:fse[200],300:fse[300],400:fse[400],500:fse[500],600:fse[600],700:fse[700],800:fse[800],900:fse[900],950:fse[950]}:{50:fse[950],100:fse[900],200:fse[800],300:fse[700],400:fse[600],500:fse[500],600:fse[400],700:fse[300],800:fse[200],900:fse[100],950:fse[50]},wse=e=>"light"===e?{main:mse[500],dark:mse[600],light:mse[50]}:{main:mse[400],dark:mse[800],light:mse[200]},Sse=e=>"light"===e?{main:fse[600],dark:fse[900],light:fse[100]}:{main:gse,dark:gse,light:gse},kse={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"},Cse={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"},_se={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"},Mse={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"},Tse=e=>"light"===e?{main:Mse[500],dark:Mse[600],light:Mse[50]}:{main:Mse[400],dark:Mse[800],light:Mse[300]},Pse=e=>"light"===e?{main:kse[500],dark:kse[700],light:kse[50]}:{main:kse[400],dark:kse[800],light:kse[300]},Dse=e=>"light"===e?{main:Cse[500],dark:Cse[700],light:Cse[50]}:{main:Cse[400],dark:Cse[800],light:Cse[300]};function Ase(e){return{mode:e,primary:wse(e),secondary:Sse(e),grey:xse(e),background:bse(e),text:yse(e),error:Tse(e),warning:Dse(e),info:wse(e),success:Pse(e),common:{white:gse,black:vse},designSystem:{blue:mse,green:kse,grey:fse,orange:Cse,purple:_se,red:Mse}}}n(21998),n(82216),n(90143),n(73057);const Ose=400,Ise=700,Rse={fontFamily:'"Lato", sans-serif',fontWeightLight:300,fontWeightRegular:Ose,fontWeightMedium:Ise,fontWeightBold:900,h1:{fontSize:"1.5rem",fontWeight:Ise,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:Ise,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:Ise,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:Ise,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:Ose,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:Ose,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:Ose,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:Ise,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:Ise,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:Ose,lineHeight:"16px"}},Ese=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function Lse(e,t={}){return(0,lse.Z)({palette:Ase(e),typography:Rse,mixins:{},components:Zse,...t})}const Zse={MuiAlert:pse,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:{styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:Ese}},MuiDialog:{styleOverrides:{paper:Ese}},MuiPopover:{styleOverrides:{paper:Ese}}};var Nse=n(84974),jse=n(12449),Fse=n(28418),zse=n(57689),Bse=n(64248);function Vse({value:e,onChange:t}){return(0,o.jsxs)(_.Z,{direction:"row",children:[(0,o.jsx)($d.Z,{freeSolo:!0,multiple:!0,id:"join-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,o.jsx)(T.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,o.jsx)(W8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(qae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function $se({value:e,onChange:t}){return(0,o.jsxs)(_.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,o.jsx)($d.Z,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:{width:"100%"},options:[],value:e.spec.columns??[],renderInput:e=>(0,o.jsx)(T.Z,{...e,variant:"outlined",label:"Columns",required:!0}),onChange:(n,r)=>{t({...e,spec:{...e.spec,columns:r}})}}),(0,o.jsx)(xd,{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,o.jsx)(W8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(qae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function Hse({value:e,onChange:t}){return(0,o.jsxs)(_.Z,{direction:"row",children:[(0,o.jsx)(xd,{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,o.jsx)(W8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(qae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})]})}function Wse({value:e,onChange:t}){return(0,o.jsx)(_.Z,{direction:"row",children:(0,o.jsx)(W8.Z,{label:"Enabled",labelPlacement:"start",control:(0,o.jsx)(qae.Z,{value:!e.spec.disabled,checked:!e.spec.disabled,onChange:n=>t({...e,spec:{...e.spec,disabled:!n.target.checked}})})})})}function Use({value:e,onChange:t,...n}){return(0,o.jsxs)(_.Z,{gap:2,sx:{width:"100%"},mt:1,...n,children:[(0,o.jsxs)(xd,{select:!0,label:"Kind",value:e.kind,onChange:n=>t({...e,kind:n}),children:[(0,o.jsx)(op.Z,{value:"JoinByColumnValue",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Join by column value"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),(0,o.jsx)(op.Z,{value:"MergeColumns",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Merge columns"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),(0,o.jsx)(op.Z,{value:"MergeIndexedColumns",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Merge indexed columns"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),(0,o.jsx)(op.Z,{value:"MergeSeries",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Merge series"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Series will be merged by their labels"})]})})]}),"JoinByColumnValue"===e.kind&&(0,o.jsx)(Vse,{value:e,onChange:t}),"MergeColumns"===e.kind&&(0,o.jsx)($se,{value:e,onChange:t}),"MergeIndexedColumns"===e.kind&&(0,o.jsx)(Hse,{value:e,onChange:t}),"MergeSeries"===e.kind&&(0,o.jsx)(Wse,{value:e,onChange:t})]})}function qse({index:e,value:t,isCollapsed:n,onChange:r,onCollapse:i,onDelete:a,...s}){return(0,o.jsxs)(_.Z,{...s,children:[(0,o.jsxs)(_.Z,{direction:"row",alignItems:"center",borderBottom:1,borderColor:e=>e.palette.divider,justifyContent:"space-between",gap:4,children:[(0,o.jsxs)(_.Z,{direction:"row",gap:1,children:[(0,o.jsx)(M.Z,{"data-testid":`transform-toggle#${e}`,size:"small",onClick:()=>i(!n),children:n?(0,o.jsx)(Nse.default,{}):(0,o.jsx)(jse.default,{})}),(0,o.jsx)(Mc.Z,{variant:"overline",component:"h4",sx:{textTransform:"none"},children:t.kind?(0,o.jsx)("span",{children:(0,o.jsx)("strong",{children:Bse.R[t.kind]})}):(0,o.jsx)("strong",{children:"Select a transformation kind"})})]}),(0,o.jsxs)(_.Z,{direction:"row",gap:1,children:[n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ld.Z,{title:t.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,o.jsx)(M.Z,{size:"small",sx:{marginLeft:"auto"},onClick:function(){r({...t,spec:{...t.spec,disabled:!t.spec?.disabled}})},children:t.spec?.disabled?(0,o.jsx)(Fse.default,{}):(0,o.jsx)(zse.default,{})})}),(0,o.jsx)(ZW.Z,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),(0,o.jsx)(Ld.Z,{title:"Remove transformation",placement:"top",children:(0,o.jsx)(M.Z,{size:"small",sx:{marginLeft:"auto"},onClick:a,children:(0,o.jsx)(s7.default,{})})})]})]}),!n&&(0,o.jsx)(Use,{value:t,onChange:r})]})}function Gse({value:e,onChange:t,...n}){const[r,a]=(0,i.useState)(e.map((()=>!0)));return(0,o.jsxs)(_.Z,{gap:1,...n,children:[e.map(((n,i)=>(0,o.jsx)(qse,{index:i,value:n,isCollapsed:r[i]??!0,onChange:n=>function(n,r){const o=[...e];o[n]=r,t(o)}(i,n),onDelete:()=>function(n){const r=[...e];r.splice(n,1),t(r),a((e=>(e.splice(n,1),[...e])))}(i),onCollapse:e=>function(e,t){a((n=>(n[e]=t,[...n])))}(i,e)},i))),(0,o.jsx)(k.Z,{variant:"contained",startIcon:(0,o.jsx)($8.default,{}),sx:{marginTop:1},onClick:function(){const n=[...e];n.push({kind:"",spec:{}}),t(n),a((e=>(e.push(!1),[...e])))},children:"Add Transformation"})]})}function Kse(e){const{value:t,onChange:n,timeOptions:r,height:a}=e,s=(0,i.useMemo)((()=>{if(t&&!r.some((e=>e.value.pastDuration===t)))return(0,o.jsx)(op.Z,{value:t,children:t})}),[r,t]);return(0,o.jsx)(Id.Z,{children:(0,o.jsx)(ii.Z,{children:(0,o.jsxs)(h7.Z,{id:"refreshInterval",value:t,onChange:e=>{const t=e.target.value;n(t)},inputProps:{"aria-label":`Select refresh interval. Currently set to ${t}`},sx:{".MuiSelect-select":a?{lineHeight:a,paddingY:0}:{}},children:[r.map(((e,t)=>(0,o.jsx)(op.Z,{value:e.value.pastDuration,children:e.display},t))),s]})})})}var Yse=n(41305);const Xse=({mapping:e,onChange:t,...n})=>{switch(e.kind){case"Value":return(0,o.jsx)(_.Z,{gap:1,direction:"row",...n,children:(0,o.jsx)(T.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,o.jsxs)(_.Z,{gap:1,direction:"row",...n,children:[(0,o.jsx)(T.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,o.jsx)(T.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,o.jsx)(_.Z,{gap:1,direction:"row",...n,children:(0,o.jsx)(T.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,o.jsx)(_.Z,{gap:1,direction:"row",...n,children:(0,o.jsxs)(T.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,o.jsx)(op.Z,{value:"empty",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Empty"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches empty string"})]})}),(0,o.jsx)(op.Z,{value:"null",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Null"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches null or undefined"})]})}),(0,o.jsx)(op.Z,{value:"NaN",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"NaN"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches Not a Number value"})]})}),(0,o.jsx)(op.Z,{value:"true",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"True"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches true boolean"})]})}),(0,o.jsx)(op.Z,{value:"false",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"False"}),(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches false boolean"})]})})]})});default:return null}},Qse=({mapping:e,onChange:t,onDelete:n,...r})=>{const i=n=>{t({...e,spec:{...e.spec,result:{...e.spec.result,color:n}}})};return(0,o.jsxs)(Yse.Z,{container:!0,spacing:2,...r,children:[(0,o.jsx)(Yse.Z,{size:{xs:5},children:(0,o.jsxs)(_.Z,{direction:"row",gap:1,width:"100%",children:[(0,o.jsxs)(T.Z,{select:!0,label:"Type",value:e.kind,onChange:n=>t({...e,kind:n.target.value}),required:!0,sx:{width:"120px"},children:[(0,o.jsx)(op.Z,{value:"Value",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Value"}),"Value"!==e.kind&&(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches an exact text value"})]})}),(0,o.jsx)(op.Z,{value:"Range",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Range"}),"Range"!==e.kind&&(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches against a numerical range"})]})}),(0,o.jsx)(op.Z,{value:"Regex",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Regex"}),"Regex"!==e.kind&&(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches against a regular expression"})]})}),(0,o.jsx)(op.Z,{value:"Misc",children:(0,o.jsxs)(_.Z,{children:[(0,o.jsx)(Mc.Z,{children:"Misc"}),"Misc"!==e.kind&&(0,o.jsx)(Mc.Z,{variant:"caption",children:"Matches against empty, null and NaN values"})]})})]}),(0,o.jsx)(Xse,{width:"100%",mapping:e,onChange:n=>t({...e,...n})})]})}),(0,o.jsx)(Yse.Z,{size:{xs:4},children:(0,o.jsx)(T.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,o.jsx)(Yse.Z,{size:{xs:1},children:(0,o.jsx)(_.Z,{direction:"row",justifyContent:"center",gap:1,children:e.spec?.result?.color?(0,o.jsx)(ni,{label:"Color",color:e.spec.result.color??"#000",onColorChange:i,onClear:()=>i(void 0)}):(0,o.jsx)(M.Z,{onClick:()=>i("#000"),children:(0,o.jsx)($8.default,{})})})}),(0,o.jsx)(Yse.Z,{size:{xs:1},textAlign:"end",children:(0,o.jsx)(Ld.Z,{title:"Remove mapping settings",placement:"top",children:(0,o.jsx)(M.Z,{size:"small",sx:{marginLeft:"auto"},onClick:n,children:(0,o.jsx)(s7.default,{})})})})]})},Jse=({mappings:e,onChange:t})=>{const[n,r]=(0,i.useState)(e);return(0,o.jsxs)(_.Z,{spacing:1,children:[(0,o.jsxs)(Yse.Z,{container:!0,spacing:2,children:[(0,o.jsx)(Yse.Z,{size:{xs:5},children:(0,o.jsx)(Mc.Z,{variant:"subtitle1",children:"Condition"})}),(0,o.jsx)(Yse.Z,{size:{xs:4},children:(0,o.jsx)(Mc.Z,{variant:"subtitle1",children:"Display Text"})}),(0,o.jsx)(Yse.Z,{size:{xs:1},textAlign:"center",children:(0,o.jsx)(Mc.Z,{variant:"subtitle1",children:"Color"})}),(0,o.jsx)(Yse.Z,{size:{xs:1}})]}),(0,o.jsx)(_.Z,{gap:1.5,divider:(0,o.jsx)(ZW.Z,{flexItem:!0,orientation:"horizontal"}),children:n.map(((e,i)=>(0,o.jsx)(Qse,{mapping:e,onChange:e=>function(e,o){const i=[...n];i[e]=o,r(i),t(i)}(i,e),onDelete:()=>function(e){const o=[...n];o.splice(e,1),r(o),t(o)}(i)},i)))}),(0,o.jsx)(k.Z,{variant:"contained",startIcon:(0,o.jsx)($8.default,{}),sx:{marginTop:1},onClick:function(){const e=[...n];e.push({kind:"Value",spec:{result:{value:""}}}),r(e),t(e)},children:"Add value mappings"})]})}},26913:function(e,t,n){"use strict";n.d(t,{_q:()=>s,pG:()=>u,ub:()=>c,vR:()=>l});var r=n(24246),o=n(27378),i=n(14935),a=n(65783);const s=(0,o.createContext)(void 0);function l(){const e=(0,o.useContext)(s);return void 0===e?(console.warn("No RouterContext found. Did you forget a ?"),{}):e}function u(e){const{RouterComponent:t,navigate:n,children:i}=e,a=(0,o.useMemo)((()=>({RouterComponent:t,navigate:n})),[t,n]);return(0,r.jsx)(s.Provider,{value:a,children:i})}function c(e){const{children:t}=e,n=(0,i.s0)();return(0,r.jsx)(u,{RouterComponent:a.Link,navigate:n,children:t})}},40211:function(e,t,n){"use strict";n.d(t,{E9:()=>u,J0:()=>s,Xe:()=>h,h$:()=>p,m0:()=>d,pk:()=>c,y1:()=>l});var r=n(24246),o=n(27378),i=n(89461);const a={showCustom:!0,showZoomButtons:!0,options:["5m","15m","30m","1h","6h","12h","24h","7d","14d"].map((e=>(0,i.buildRelativeTimeOption)(e)))},s=(0,o.createContext)(a);function l(){const e=(0,o.useContext)(s);if(void 0===e)throw new Error("No TimeRangeContext found. Did you forget a Provider?");return e}function u(){return l()}function c(e){const t=u().showCustom;return void 0!==e?e:t}function d(e){const t=u().showZoomButtons;return void 0!==e?e:t}function h(e){const t=u().options;return void 0!==e?e:t}function p(e){const t=(0,o.useMemo)((()=>({showCustom:void 0===e.showCustom?a.showCustom:e.showCustom,showZoomButtons:void 0===e.showZoomButtons?a.showZoomButtons:e.showZoomButtons,options:void 0===e.options?a.options:e.options})),[e.showCustom,e.showZoomButtons,e.options]);return(0,r.jsx)(s.Provider,{value:t,children:e.children})}},46403:function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tK,Cd:()=>L,Ep:()=>p,Gn:()=>R,J0:()=>u,LX:()=>E,OF:()=>re,PP:()=>a,PQ:()=>J,RQ:()=>W,WK:()=>oe,WS:()=>w,X3:()=>Y,Zn:()=>Z,aU:()=>o,cP:()=>f,cm:()=>$,fZ:()=>te,fp:()=>b,gx:()=>ne,i3:()=>F,lX:()=>s,ov:()=>he,p7:()=>ve,pC:()=>H,q_:()=>l,qp:()=>pe,uX:()=>ee}),function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));const i="popstate";function a(e){void 0===e&&(e={});let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:i=!1}=e;t=n.map(((e,t)=>m(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let a=u(null==r?t.length-1:r),s=o.Pop,l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[a]}function m(e,n,r){void 0===n&&(n=null);let o=h(t?d().pathname:"/",e,n,r);return c("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}function g(e){return"string"==typeof e?e:p(e)}return{get index(){return a},get action(){return s},get location(){return d()},createHref:g,createURL:e=>new URL(g(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?f(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){s=o.Push;let r=m(e,n);a+=1,t.splice(a,t.length,r),i&&l&&l({action:s,location:r,delta:1})},replace(e,n){s=o.Replace;let r=m(e,n);t[a]=r,i&&l&&l({action:s,location:r,delta:0})},go(e){s=o.Pop;let n=u(a+e),r=t[n];a=n,l&&l({action:s,location:r,delta:e})},listen:e=>(l=e,()=>{l=null})}}function s(e){return void 0===e&&(e={}),m((function(e,t){let{pathname:n,search:r,hash:o}=e.location;return h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:p(t)}),null,e)}function l(e){return void 0===e&&(e={}),m((function(e,t){let{pathname:n="/",search:r="",hash:o=""}=f(e.location.hash.substr(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),h("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:p(t))}),(function(e,t){c("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function u(e,t){if(!1===e||null==e)throw new Error(t)}function c(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function d(e,t){return{usr:e.state,key:e.key,idx:t}}function h(e,t,n,o){return void 0===n&&(n=null),r({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?f(t):t,{state:n,key:t&&t.key||o||Math.random().toString(36).substr(2,8)})}function p(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function f(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function m(e,t,n,a){void 0===a&&(a={});let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,f=o.Pop,m=null,g=v();function v(){return(c.state||{idx:null}).idx}function y(){f=o.Pop;let e=v(),t=null==e?null:e-g;g=e,m&&m({action:f,location:x.location,delta:t})}function b(e){let t="null"!==s.location.origin?s.location.origin:s.location.href,n="string"==typeof e?e:p(e);return n=n.replace(/ $/,"%20"),u(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==g&&(g=0,c.replaceState(r({},c.state,{idx:g}),""));let x={get action(){return f},get location(){return e(s,c)},listen(e){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(i,y),m=e,()=>{s.removeEventListener(i,y),m=null}},createHref:e=>t(s,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){f=o.Push;let r=h(x.location,e,t);n&&n(r,e),g=v()+1;let i=d(r,g),a=x.createHref(r);try{c.pushState(i,"",a)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;s.location.assign(a)}l&&m&&m({action:f,location:x.location,delta:1})},replace:function(e,t){f=o.Replace;let r=h(x.location,e,t);n&&n(r,e),g=v();let i=d(r,g),a=x.createHref(r);c.replaceState(i,"",a),l&&m&&m({action:f,location:x.location,delta:0})},go:e=>c.go(e)};return x}var g;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));const v=new Set(["lazy","caseSensitive","path","id","index","children"]);function y(e,t,n,o){return void 0===n&&(n=[]),void 0===o&&(o={}),e.map(((e,i)=>{let a=[...n,String(i)],s="string"==typeof e.id?e.id:a.join("-");if(u(!0!==e.index||!e.children,"Cannot specify children on an index route"),u(!o[s],'Found a route id collision on id "'+s+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let n=r({},e,t(e),{id:s});return o[s]=n,n}{let n=r({},e,t(e),{id:s,children:void 0});return o[s]=n,e.children&&(n.children=y(e.children,t,a,o)),n}}))}function b(e,t,n){return void 0===n&&(n="/"),x(e,t,n,!1)}function x(e,t,n,r){let o=Z(("string"==typeof t?f(t):t).pathname||"/",n);if(null==o)return null;let i=S(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every(((e,n)=>e===t[n]));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(i);let a=null;for(let e=0;null==a&&e{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(u(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(r.length));let s=W([r,a.relativePath]),l=n.concat(a);e.children&&e.children.length>0&&(u(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),S(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:O(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of k(e.path))o(e,t,n);else o(e,t)})),t}function k(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return o?[i,""]:[i];let a=k(r.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}const C=/^:[\w-]+$/,_=3,M=2,T=1,P=10,D=-2,A=e=>"*"===e;function O(e,t){let n=e.split("/"),r=n.length;return n.some(A)&&(r+=D),t&&(r+=M),n.filter((e=>!A(e))).reduce(((e,t)=>e+(C.test(t)?_:""===t?T:P)),r)}function I(e,t,n){void 0===n&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let e=0;enull==e?"":"string"==typeof e?e:String(e);return r+n.split(/\/+/).map(((e,n,r)=>{if(n===r.length-1&&"*"===e){return o(t["*"])}const i=e.match(/^:([\w-]+)(\??)$/);if(i){const[,e,n]=i;let r=t[e];return u("?"===n||null!=r,'Missing ":'+e+'" param'),o(r)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);c("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let i=new RegExp(o,t?void 0:"i");return[i,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce(((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{}),pathname:i,pathnameBase:a,pattern:e}}function L(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return c(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}const N=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,j=e=>N.test(e);function F(e,t){void 0===t&&(t="/");let n,{pathname:r,search:o="",hash:i=""}="string"==typeof e?f(e):e;if(r)if(j(r))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),c(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?z(r.substring(1),"/"):z(r,t)}else n=t;return{pathname:n,search:q(o),hash:G(i)}}function z(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function B(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function V(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function $(e,t){let n=V(e);return t?n.map(((e,t)=>t===n.length-1?e.pathname:e.pathnameBase)):n.map((e=>e.pathnameBase))}function H(e,t,n,o){let i;void 0===o&&(o=!1),"string"==typeof e?i=f(e):(i=r({},e),u(!i.pathname||!i.pathname.includes("?"),B("?","pathname","search",i)),u(!i.pathname||!i.pathname.includes("#"),B("#","pathname","hash",i)),u(!i.search||!i.search.includes("#"),B("#","search","hash",i)));let a,s=""===e||""===i.pathname,l=s?"/":i.pathname;if(null==l)a=n;else{let e=t.length-1;if(!o&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}a=e>=0?t[e]:"/"}let c=F(i,a),d=l&&"/"!==l&&l.endsWith("/"),h=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!d&&!h||(c.pathname+="/"),c}const W=e=>e.join("/").replace(/\/\/+/g,"/"),U=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),q=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",G=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",K=function(e,t){void 0===t&&(t={});let n="number"==typeof t?{status:t}:t,o=new Headers(n.headers);return o.has("Content-Type")||o.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),r({},n,{headers:o}))};class Y extends Error{}class X{constructor(e,t){let n;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],u(e&&"object"==typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>n=t)),this.controller=new AbortController;let r=()=>n(new Y("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",r),this.controller.signal.addEventListener("abort",r),this.data=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(n,e,void 0,t)),(t=>this.onSettle(n,e,t)));return n.catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof Y)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===n&&void 0===r){let n=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)}return void 0===r?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach((n=>n(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n),t=await new Promise((t=>{this.subscribe((r=>{e.removeEventListener("abort",n),(r||this.done)&&t(r)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return u(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:Q(r)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Q(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const J=function(e,t){return void 0===t&&(t={}),new X(e,"number"==typeof t?{status:t}:t)},ee=function(e,t){void 0===t&&(t=302);let n=t;"number"==typeof n?n={status:n}:void 0===n.status&&(n.status=302);let o=new Headers(n.headers);return o.set("Location",e),new Response(null,r({},n,{headers:o}))},te=(e,t)=>{let n=ee(e,t);return n.headers.set("X-Remix-Reload-Document","true"),n},ne=(e,t)=>{let n=ee(e,t);return n.headers.set("X-Remix-Replace","true"),n};class re{constructor(e,t,n,r){void 0===r&&(r=!1),this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function oe(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const ie=["post","put","patch","delete"],ae=new Set(ie),se=["get",...ie],le=new Set(se),ue=new Set([301,302,303,307,308]),ce=new Set([307,308]),de={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},he={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},pe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,me=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ge="remix-router-transitions";function ve(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,n=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,i=!n;let a;if(u(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;a=e=>({hasErrorBoundary:t(e)})}else a=me;let s,l,d,p={},f=y(e.routes,a,void 0,p),m=e.basename||"/",v=e.dataStrategy||Te,S=e.patchRoutesOnNavigation,k=r({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),C=null,_=new Set,M=null,T=null,P=null,D=null!=e.hydrationData,A=b(f,e.history.location,m),O=!1,I=null;if(null==A&&!S){let t=Be(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=ze(f);A=n,I={[r.id]:t}}if(A&&!e.hydrationData){ct(A,f,e.history.location.pathname).active&&(A=null)}if(A)if(A.some((e=>e.route.lazy)))l=!1;else if(A.some((e=>e.route.loader)))if(k.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=A.findIndex((e=>void 0!==n[e.route.id]));l=A.slice(0,e+1).every((e=>!Se(e.route,t,n)))}else l=A.every((e=>!Se(e.route,t,n)))}else l=null!=e.hydrationData;else l=!0;else if(l=!1,A=[],k.v7_partialHydration){let t=ct(null,f,e.history.location.pathname);t.active&&t.matches&&(O=!0,A=t.matches)}let R,E,L={historyAction:e.history.action,location:e.history.location,matches:A,initialized:l,navigation:de,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||I,fetchers:new Map,blockers:new Map},N=o.Pop,j=!1,F=!1,z=new Map,B=null,V=!1,$=!1,H=[],W=new Set,U=new Map,q=0,G=-1,K=new Map,Y=new Set,X=new Map,Q=new Map,J=new Set,ee=new Map,te=new Map;function ne(e,t){void 0===t&&(t={}),L=r({},L,e);let n=[],o=[];k.v7_fetcherPersist&&L.fetchers.forEach(((e,t)=>{"idle"===e.state&&(J.has(t)?o.push(t):n.push(t))})),J.forEach((e=>{L.fetchers.has(e)||U.has(e)||o.push(e)})),[..._].forEach((e=>e(L,{deletedFetchers:o,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync}))),k.v7_fetcherPersist?(n.forEach((e=>L.fetchers.delete(e))),o.forEach((e=>Me(e)))):o.forEach((e=>J.delete(e)))}function re(t,n,i){var a,l;let u,{flushSync:c}=void 0===i?{}:i,d=null!=L.actionData&&null!=L.navigation.formMethod&&Xe(L.navigation.formMethod)&&"loading"===L.navigation.state&&!0!==(null==(a=t.state)?void 0:a._isRedirect);u=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:d?L.actionData:null;let h=n.loaderData?Ne(L.loaderData,n.loaderData,n.matches||[],n.errors):L.loaderData,p=L.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,pe))));let m,g=!0===j||null!=L.navigation.formMethod&&Xe(L.navigation.formMethod)&&!0!==(null==(l=t.state)?void 0:l._isRedirect);if(s&&(f=s,s=void 0),V||N===o.Pop||(N===o.Push?e.history.push(t,t.state):N===o.Replace&&e.history.replace(t,t.state)),N===o.Pop){let e=z.get(L.location.pathname);e&&e.has(t.pathname)?m={currentLocation:L.location,nextLocation:t}:z.has(t.pathname)&&(m={currentLocation:t,nextLocation:L.location})}else if(F){let e=z.get(L.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(L.location.pathname,e)),m={currentLocation:L.location,nextLocation:t}}ne(r({},n,{actionData:u,loaderData:h,historyAction:N,location:t,initialized:!0,navigation:de,revalidation:"idle",restoreScrollPosition:ut(t,n.matches||L.matches),preventScrollReset:g,blockers:p}),{viewTransitionOpts:m,flushSync:!0===c}),N=o.Pop,j=!1,F=!1,V=!1,$=!1,H=[]}async function ie(t,n,i){R&&R.abort(),R=null,N=t,V=!0===(i&&i.startUninterruptedRevalidation),function(e,t){if(M&&P){let n=lt(e,t);M[n]=P()}}(L.location,L.matches),j=!0===(i&&i.preventScrollReset),F=!0===(i&&i.enableViewTransition);let a=s||f,l=i&&i.overrideNavigation,u=null!=i&&i.initialHydration&&L.matches&&L.matches.length>0&&!O?L.matches:b(a,n,m),c=!0===(i&&i.flushSync);if(u&&L.initialized&&!$&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(L.location,n)&&!(i&&i.submission&&Xe(i.submission.formMethod)))return void re(n,{matches:u},{flushSync:c});let d=ct(u,a,n.pathname);if(d.active&&d.matches&&(u=d.matches),!u){let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);return void re(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:c})}R=new AbortController;let h,p=Ie(e.history,n,R.signal,i&&i.submission);if(i&&i.pendingError)h=[Fe(u).route.id,{type:g.error,error:i.pendingError}];else if(i&&i.submission&&Xe(i.submission.formMethod)){let t=await async function(t,n,r,i,a,s){void 0===s&&(s={});ve();let l,u=function(e,t){let n={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return n}(n,r);if(ne({navigation:u},{flushSync:!0===s.flushSync}),a){let e=await dt(i,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Fe(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:g.error,error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:r}=tt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:g.error,error:t}]}}i=e.matches}let c=nt(i,n);if(c.route.action||c.route.lazy){if(l=(await le("action",L,t,[c],i,null))[c.route.id],t.signal.aborted)return{shortCircuited:!0}}else l={type:g.error,error:Be(405,{method:t.method,pathname:n.pathname,routeId:c.route.id})};if(qe(l)){let n;if(s&&null!=s.replace)n=s.replace;else{n=Oe(l.response.headers.get("Location"),new URL(t.url),m,e.history)===L.location.pathname+L.location.search}return await se(t,l,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(We(l))throw Be(400,{type:"defer-action"});if(Ue(l)){let e=Fe(i,c.route.id);return!0!==(s&&s.replace)&&(N=o.Push),{matches:i,pendingActionResult:[e.route.id,l]}}return{matches:i,pendingActionResult:[c.route.id,l]}}(p,n,i.submission,u,d.active,{replace:i.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Ue(r)&&oe(r.error)&&404===r.error.status)return R=null,void re(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}})}u=t.matches||u,h=t.pendingActionResult,l=ot(n,i.submission),c=!1,d.active=!1,p=Ie(e.history,p.url,p.signal)}let{shortCircuited:v,matches:y,loaderData:x,errors:w}=await async function(t,n,o,i,a,l,u,c,d,h,p){let g=a||ot(n,l),v=l||u||rt(g),y=!(V||k.v7_partialHydration&&d);if(i){if(y){let e=ae(p);ne(r({navigation:g},void 0!==e?{actionData:e}:{}),{flushSync:h})}let e=await dt(o,n.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=Fe(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:r}=tt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}o=e.matches}let b=s||f,[x,w]=we(e.history,L,o,v,n,k.v7_partialHydration&&!0===d,k.v7_skipActionErrorRevalidation,$,H,W,J,X,Y,b,m,p);if(st((e=>!(o&&o.some((t=>t.route.id===e)))||x&&x.some((t=>t.route.id===e)))),G=++q,0===x.length&&0===w.length){let e=Le();return re(n,r({matches:o,loaderData:{},errors:p&&Ue(p[1])?{[p[0]]:p[1].error}:null},je(p),e?{fetchers:new Map(L.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(y){let e={};if(!i){e.navigation=g;let t=ae(p);void 0!==t&&(e.actionData=t)}w.length>0&&(e.fetchers=function(e){return e.forEach((e=>{let t=L.fetchers.get(e.key),n=it(void 0,t?t.data:void 0);L.fetchers.set(e.key,n)})),new Map(L.fetchers)}(w)),ne(e,{flushSync:h})}w.forEach((e=>{Re(e.key),e.controller&&U.set(e.key,e.controller)}));let S=()=>w.forEach((e=>Re(e.key)));R&&R.signal.addEventListener("abort",S);let{loaderResults:C,fetcherResults:_}=await ue(L,o,x,w,t);if(t.signal.aborted)return{shortCircuited:!0};R&&R.signal.removeEventListener("abort",S);w.forEach((e=>U.delete(e.key)));let M=Ve(C);if(M)return await se(t,M.result,!0,{replace:c}),{shortCircuited:!0};if(M=Ve(_),M)return Y.add(M.key),await se(t,M.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:T,errors:P}=Ze(L,o,C,p,w,_,ee);ee.forEach(((e,t)=>{e.subscribe((n=>{(n||e.done)&&ee.delete(t)}))})),k.v7_partialHydration&&d&&L.errors&&(P=r({},L.errors,P));let D=Le(),A=$e(G),O=D||A||w.length>0;return r({matches:o,loaderData:T,errors:P},O?{fetchers:new Map(L.fetchers)}:{})}(p,n,u,d.active,l,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&!0===i.initialHydration,c,h);v||(R=null,re(n,r({matches:y||u},je(h),{loaderData:x,errors:w})))}function ae(e){return e&&!Ue(e[1])?{[e[0]]:e[1].data}:L.actionData?0===Object.keys(L.actionData).length?null:L.actionData:void 0}async function se(i,a,s,l){let{submission:c,fetcherSubmission:d,preventScrollReset:p,replace:f}=void 0===l?{}:l;a.response.headers.has("X-Remix-Revalidate")&&($=!0);let g=a.response.headers.get("Location");u(g,"Expected a Location header on the redirect Response"),g=Oe(g,new URL(i.url),m,e.history);let v=h(L.location,g,{_isRedirect:!0});if(n){let n=!1;if(a.response.headers.has("X-Remix-Reload-Document"))n=!0;else if(fe.test(g)){const r=e.history.createURL(g);n=r.origin!==t.location.origin||null==Z(r.pathname,m)}if(n)return void(f?t.location.replace(g):t.location.assign(g))}R=null;let y=!0===f||a.response.headers.has("X-Remix-Replace")?o.Replace:o.Push,{formMethod:b,formAction:x,formEncType:w}=L.navigation;!c&&!d&&b&&x&&w&&(c=rt(L.navigation));let S=c||d;if(ce.has(a.response.status)&&S&&Xe(S.formMethod))await ie(y,v,{submission:r({},S,{formAction:g}),preventScrollReset:p||j,enableViewTransition:s?F:void 0});else{let e=ot(v,c);await ie(y,v,{overrideNavigation:e,fetcherSubmission:d,preventScrollReset:p||j,enableViewTransition:s?F:void 0})}}async function le(e,t,n,r,o,i){let s,l={};try{s=await Pe(v,e,t,n,r,o,i,p,a)}catch(e){return r.forEach((t=>{l[t.route.id]={type:g.error,error:e}})),l}for(let[e,t]of Object.entries(s))if(He(t)){let r=t.result;l[e]={type:g.redirect,response:Ae(r,n,e,o,m,k.v7_relativeSplatPath)}}else l[e]=await De(t);return l}async function ue(t,n,r,o,i){let a=t.matches,s=le("loader",t,i,r,n,null),l=Promise.all(o.map((async n=>{if(n.matches&&n.match&&n.controller){let r=(await le("loader",t,Ie(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}return Promise.resolve({[n.key]:{type:g.error,error:Be(404,{pathname:n.path})}})}))),u=await s,c=(await l).reduce(((e,t)=>Object.assign(e,t)),{});return await Promise.all([Qe(n,u,i.signal,a,t.loaderData),Je(n,c,o)]),{loaderResults:u,fetcherResults:c}}function ve(){$=!0,H.push(...st()),X.forEach(((e,t)=>{U.has(t)&&W.add(t),Re(t)}))}function xe(e,t,n){void 0===n&&(n={}),L.fetchers.set(e,t),ne({fetchers:new Map(L.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ke(e,t,n,r){void 0===r&&(r={});let o=Fe(L.matches,t);Me(e),ne({errors:{[o.route.id]:n},fetchers:new Map(L.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Ce(e){return Q.set(e,(Q.get(e)||0)+1),J.has(e)&&J.delete(e),L.fetchers.get(e)||he}function Me(e){let t=L.fetchers.get(e);!U.has(e)||t&&"loading"===t.state&&K.has(e)||Re(e),X.delete(e),K.delete(e),Y.delete(e),k.v7_fetcherPersist&&J.delete(e),W.delete(e),L.fetchers.delete(e)}function Re(e){let t=U.get(e);t&&(t.abort(),U.delete(e))}function Ee(e){for(let t of e){let e=at(Ce(t).data);L.fetchers.set(t,e)}}function Le(){let e=[],t=!1;for(let n of Y){let r=L.fetchers.get(n);u(r,"Expected fetcher: "+n),"loading"===r.state&&(Y.delete(n),e.push(n),t=!0)}return Ee(e),t}function $e(e){let t=[];for(let[n,r]of K)if(r0}function Ge(e){L.blockers.delete(e),te.delete(e)}function Ke(e,t){let n=L.blockers.get(e)||pe;u("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state);let r=new Map(L.blockers);r.set(e,t),ne({blockers:r})}function Ye(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(0===te.size)return;te.size>1&&c(!1,"A router only supports one blocker at a time");let o=Array.from(te.entries()),[i,a]=o[o.length-1],s=L.blockers.get(i);return s&&"proceeding"===s.state?void 0:a({currentLocation:t,nextLocation:n,historyAction:r})?i:void 0}function tt(e){let t=Be(404,{pathname:e}),n=s||f,{matches:r,route:o}=ze(n);return st(),{notFoundMatches:r,route:o,error:t}}function st(e){let t=[];return ee.forEach(((n,r)=>{e&&!e(r)||(n.cancel(),t.push(r),ee.delete(r))})),t}function lt(e,t){if(T){return T(e,t.map((e=>w(e,L.loaderData))))||e.key}return e.key}function ut(e,t){if(M){let n=lt(e,t),r=M[n];if("number"==typeof r)return r}return null}function ct(e,t,n){if(S){if(!e){return{active:!0,matches:x(t,n,m,!0)||[]}}if(Object.keys(e[0].params).length>0){return{active:!0,matches:x(t,n,m,!0)}}}return{active:!1,matches:null}}async function dt(e,t,n,r){if(!S)return{type:"success",matches:e};let o=e;for(;;){let e=null==s,i=s||f,l=p;try{await S({signal:n,path:t,matches:o,fetcherKey:r,patch:(e,t)=>{n.aborted||_e(e,t,i,l,a)}})}catch(e){return{type:"error",error:e,partialMatches:o}}finally{e&&!n.aborted&&(f=[...f])}if(n.aborted)return{type:"aborted"};let u=b(i,t,m);if(u)return{type:"success",matches:u};let c=x(i,t,m,!0);if(!c||o.length===c.length&&o.every(((e,t)=>e.route.id===c[t].route.id)))return{type:"success",matches:null};o=c}}return d={get basename(){return m},get future(){return k},get state(){return L},get routes(){return f},get window(){return t},initialize:function(){if(C=e.history.listen((t=>{let{action:n,location:r,delta:o}=t;if(E)return E(),void(E=void 0);c(0===te.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Ye({currentLocation:L.location,nextLocation:r,historyAction:n});if(i&&null!=o){let t=new Promise((e=>{E=e}));return e.history.go(-1*o),void Ke(i,{state:"blocked",location:r,proceed(){Ke(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then((()=>e.history.go(o)))},reset(){let e=new Map(L.blockers);e.set(i,pe),ne({blockers:e})}})}return ie(n,r)})),n){!function(e,t){try{let n=e.sessionStorage.getItem(ge);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch(e){}}(t,z);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ge,JSON.stringify(n))}catch(e){c(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(t,z);t.addEventListener("pagehide",e),B=()=>t.removeEventListener("pagehide",e)}return L.initialized||ie(o.Pop,L.location,{initialHydration:!0}),d},subscribe:function(e){return _.add(e),()=>_.delete(e)},enableScrollRestoration:function(e,t,n){if(M=e,P=t,T=n||null,!D&&L.navigation===de){D=!0;let e=ut(L.location,L.matches);null!=e&&ne({restoreScrollPosition:e})}return()=>{M=null,P=null,T=null}},navigate:async function t(n,i){if("number"==typeof n)return void e.history.go(n);let a=ye(L.location,L.matches,m,k.v7_prependBasename,n,k.v7_relativeSplatPath,null==i?void 0:i.fromRouteId,null==i?void 0:i.relative),{path:s,submission:l,error:u}=be(k.v7_normalizeFormMethod,!1,a,i),c=L.location,d=h(L.location,s,i&&i.state);d=r({},d,e.history.encodeLocation(d));let p=i&&null!=i.replace?i.replace:void 0,f=o.Push;!0===p?f=o.Replace:!1===p||null!=l&&Xe(l.formMethod)&&l.formAction===L.location.pathname+L.location.search&&(f=o.Replace);let g=i&&"preventScrollReset"in i?!0===i.preventScrollReset:void 0,v=!0===(i&&i.flushSync),y=Ye({currentLocation:c,nextLocation:d,historyAction:f});if(!y)return await ie(f,d,{submission:l,pendingError:u,preventScrollReset:g,replace:i&&i.replace,enableViewTransition:i&&i.viewTransition,flushSync:v});Ke(y,{state:"blocked",location:d,proceed(){Ke(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(n,i)},reset(){let e=new Map(L.blockers);e.set(y,pe),ne({blockers:e})}})},fetch:function(t,n,r,o){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Re(t);let a=!0===(o&&o.flushSync),l=s||f,c=ye(L.location,L.matches,m,k.v7_prependBasename,r,k.v7_relativeSplatPath,n,null==o?void 0:o.relative),d=b(l,c,m),h=ct(d,l,c);if(h.active&&h.matches&&(d=h.matches),!d)return void ke(t,n,Be(404,{pathname:c}),{flushSync:a});let{path:p,submission:g,error:v}=be(k.v7_normalizeFormMethod,!0,c,o);if(v)return void ke(t,n,v,{flushSync:a});let y=nt(d,p),x=!0===(o&&o.preventScrollReset);g&&Xe(g.formMethod)?async function(t,n,r,o,i,a,l,c,d){function h(e){if(!e.route.action&&!e.route.lazy){let e=Be(405,{method:d.formMethod,pathname:r,routeId:n});return ke(t,n,e,{flushSync:l}),!0}return!1}if(ve(),X.delete(t),!a&&h(o))return;let p=L.fetchers.get(t);xe(t,function(e,t){let n={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return n}(d,p),{flushSync:l});let g=new AbortController,v=Ie(e.history,r,g.signal,d);if(a){let e=await dt(i,new URL(v.url).pathname,v.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ke(t,n,e.error,{flushSync:l});if(!e.matches)return void ke(t,n,Be(404,{pathname:r}),{flushSync:l});if(h(o=nt(i=e.matches,r)))return}U.set(t,g);let y=q,x=await le("action",L,v,[o],i,t),w=x[o.route.id];if(v.signal.aborted)return void(U.get(t)===g&&U.delete(t));if(k.v7_fetcherPersist&&J.has(t)){if(qe(w)||Ue(w))return void xe(t,at(void 0))}else{if(qe(w))return U.delete(t),G>y?void xe(t,at(void 0)):(Y.add(t),xe(t,it(d)),se(v,w,!1,{fetcherSubmission:d,preventScrollReset:c}));if(Ue(w))return void ke(t,n,w.error)}if(We(w))throw Be(400,{type:"defer-action"});let S=L.navigation.location||L.location,C=Ie(e.history,S,g.signal),_=s||f,M="idle"!==L.navigation.state?b(_,L.navigation.location,m):L.matches;u(M,"Didn't find any matches after fetcher action");let T=++q;K.set(t,T);let P=it(d,w.data);L.fetchers.set(t,P);let[D,A]=we(e.history,L,M,d,S,!1,k.v7_skipActionErrorRevalidation,$,H,W,J,X,Y,_,m,[o.route.id,w]);A.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,n=L.fetchers.get(t),r=it(void 0,n?n.data:void 0);L.fetchers.set(t,r),Re(t),e.controller&&U.set(t,e.controller)})),ne({fetchers:new Map(L.fetchers)});let O=()=>A.forEach((e=>Re(e.key)));g.signal.addEventListener("abort",O);let{loaderResults:I,fetcherResults:E}=await ue(L,M,D,A,C);if(g.signal.aborted)return;g.signal.removeEventListener("abort",O),K.delete(t),U.delete(t),A.forEach((e=>U.delete(e.key)));let Z=Ve(I);if(Z)return se(C,Z.result,!1,{preventScrollReset:c});if(Z=Ve(E),Z)return Y.add(Z.key),se(C,Z.result,!1,{preventScrollReset:c});let{loaderData:j,errors:F}=Ze(L,M,I,void 0,A,E,ee);if(L.fetchers.has(t)){let e=at(w.data);L.fetchers.set(t,e)}$e(T),"loading"===L.navigation.state&&T>G?(u(N,"Expected pending action"),R&&R.abort(),re(L.navigation.location,{matches:M,loaderData:j,errors:F,fetchers:new Map(L.fetchers)})):(ne({errors:F,loaderData:Ne(L.loaderData,j,M,F),fetchers:new Map(L.fetchers)}),$=!1)}(t,n,p,y,d,h.active,a,x,g):(X.set(t,{routeId:n,path:p}),async function(t,n,r,o,i,a,s,l,c){let d=L.fetchers.get(t);xe(t,it(c,d?d.data:void 0),{flushSync:s});let h=new AbortController,p=Ie(e.history,r,h.signal);if(a){let e=await dt(i,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ke(t,n,e.error,{flushSync:s});if(!e.matches)return void ke(t,n,Be(404,{pathname:r}),{flushSync:s});o=nt(i=e.matches,r)}U.set(t,h);let f=q,m=await le("loader",L,p,[o],i,t),g=m[o.route.id];We(g)&&(g=await et(g,p.signal,!0)||g);U.get(t)===h&&U.delete(t);if(p.signal.aborted)return;if(J.has(t))return void xe(t,at(void 0));if(qe(g))return G>f?void xe(t,at(void 0)):(Y.add(t),void await se(p,g,!1,{preventScrollReset:l}));if(Ue(g))return void ke(t,n,g.error);u(!We(g),"Unhandled fetcher deferred data"),xe(t,at(g.data))}(t,n,p,y,d,h.active,a,x,g))},revalidate:function(){ve(),ne({revalidation:"loading"}),"submitting"!==L.navigation.state&&("idle"!==L.navigation.state?ie(N||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:!0===F}):ie(L.historyAction,L.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ce,deleteFetcher:function(e){let t=(Q.get(e)||0)-1;t<=0?(Q.delete(e),J.add(e),k.v7_fetcherPersist||Me(e)):Q.set(e,t),ne({fetchers:new Map(L.fetchers)})},dispose:function(){C&&C(),B&&B(),_.clear(),R&&R.abort(),L.fetchers.forEach(((e,t)=>Me(t))),L.blockers.forEach(((e,t)=>Ge(t)))},getBlocker:function(e,t){let n=L.blockers.get(e)||pe;return te.get(e)!==t&&te.set(e,t),n},deleteBlocker:Ge,patchRoutes:function(e,t){let n=null==s;_e(e,t,s||f,p,a),n&&(f=[...f],ne({}))},_internalFetchControllers:U,_internalActiveDeferreds:ee,_internalSetRoutes:function(e){p={},s=y(e,a,void 0,p)}},d}Symbol("deferred");function ye(e,t,n,r,o,i,a,s){let l,u;if(a){l=[];for(let e of t)if(l.push(e),e.route.id===a){u=e;break}}else l=t,u=t[t.length-1];let c=H(o||".",$(l,i),Z(e.pathname,n)||e.pathname,"path"===s);if(null==o&&(c.search=e.search,c.hash=e.hash),(null==o||""===o||"."===o)&&u){let e=tt(c.search);if(u.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll("index");e.delete("index"),t.filter((e=>e)).forEach((t=>e.append("index",t)));let n=e.toString();c.search=n?"?"+n:""}}return r&&"/"!==n&&(c.pathname="/"===c.pathname?n:W([n,c.pathname])),p(c)}function be(e,t,n,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:n};if(r.formMethod&&!Ye(r.formMethod))return{path:n,error:Be(405,{method:r.formMethod})};let o,i,a=()=>({path:n,error:Be(400,{type:"invalid-body"})}),s=r.formMethod||"get",l=e?s.toUpperCase():s.toLowerCase(),c=$e(n);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Xe(l))return a();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce(((e,t)=>{let[n,r]=t;return""+e+n+"="+r+"\n"}),""):String(r.body);return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Xe(l))return a();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return a()}}}if(u("function"==typeof FormData,"FormData is not available in this environment"),r.formData)o=Re(r.formData),i=r.formData;else if(r.body instanceof FormData)o=Re(r.body),i=r.body;else if(r.body instanceof URLSearchParams)o=r.body,i=Ee(o);else if(null==r.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(r.body),i=Ee(o)}catch(e){return a()}let d={formMethod:l,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(Xe(d.formMethod))return{path:n,submission:d};let h=f(n);return t&&h.search&&tt(h.search)&&o.append("index",""),h.search="?"+o,{path:p(h),submission:d}}function xe(e,t,n){void 0===n&&(n=!1);let r=e.findIndex((e=>e.route.id===t));return r>=0?e.slice(0,n?r+1:r):e}function we(e,t,n,o,i,a,s,l,u,c,d,h,p,f,m,g){let v=g?Ue(g[1])?g[1].error:g[1].data:void 0,y=e.createURL(t.location),x=e.createURL(i),w=n;a&&t.errors?w=xe(n,Object.keys(t.errors)[0],!0):g&&Ue(g[1])&&(w=xe(n,g[0]));let S=g?g[1].statusCode:void 0,k=s&&S&&S>=400,C=w.filter(((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(null==i.loader)return!1;if(a)return Se(i,t.loaderData,t.errors);if(function(e,t,n){let r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||u.some((t=>t===e.route.id)))return!0;let s=t.matches[n],c=e;return Ce(e,r({currentUrl:y,currentParams:s.params,nextUrl:x,nextParams:c.params},o,{actionResult:v,actionStatus:S,defaultShouldRevalidate:!k&&(l||y.pathname+y.search===x.pathname+x.search||y.search!==x.search||ke(s,c))}))})),_=[];return h.forEach(((e,i)=>{if(a||!n.some((t=>t.route.id===e.routeId))||d.has(i))return;let s=b(f,e.path,m);if(!s)return void _.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(i),h=nt(s,e.path),g=!1;p.has(i)?g=!1:c.has(i)?(c.delete(i),g=!0):g=u&&"idle"!==u.state&&void 0===u.data?l:Ce(h,r({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},o,{actionResult:v,actionStatus:S,defaultShouldRevalidate:!k&&l})),g&&_.push({key:i,routeId:e.routeId,path:e.path,matches:s,match:h,controller:new AbortController})})),[C,_]}function Se(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=null!=t&&void 0!==t[e.id],o=null!=n&&void 0!==n[e.id];return!(!r&&o)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!r&&!o)}function ke(e,t){let n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ce(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if("boolean"==typeof n)return n}return t.defaultShouldRevalidate}function _e(e,t,n,r,o){var i;let a;if(e){let t=r[e];u(t,"No route found to patch children into: routeId = "+e),t.children||(t.children=[]),a=t.children}else a=n;let s=y(t.filter((e=>!a.some((t=>Me(e,t))))),o,[e||"_","patch",String((null==(i=a)?void 0:i.length)||"0")],r);a.push(...s)}function Me(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(((e,n)=>{var r;return null==(r=t.children)?void 0:r.some((t=>Me(e,t)))})))}async function Te(e){let{matches:t}=e,n=t.filter((e=>e.shouldLoad));return(await Promise.all(n.map((e=>e.resolve())))).reduce(((e,t,r)=>Object.assign(e,{[n[r].route.id]:t})),{})}async function Pe(e,t,n,o,i,a,s,l,d,h){let p=a.map((e=>e.route.lazy?async function(e,t,n){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let i=n[e.id];u(i,"No route found in manifest");let a={};for(let e in o){let t=void 0!==i[e]&&"hasErrorBoundary"!==e;c(!t,'Route "'+i.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||v.has(e)||(a[e]=o[e])}Object.assign(i,a),Object.assign(i,r({},t(i),{lazy:void 0}))}(e.route,d,l):void 0)),f=a.map(((e,n)=>{let a=p[n],s=i.some((t=>t.route.id===e.route.id));return r({},e,{shouldLoad:s,resolve:async n=>(n&&"GET"===o.method&&(e.route.lazy||e.route.loader)&&(s=!0),s?async function(e,t,n,r,o,i){let a,s,l=r=>{let a,l=new Promise(((e,t)=>a=t));s=()=>a(),t.signal.addEventListener("abort",s);let u=o=>"function"!=typeof r?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+n.route.id+"]")):r({request:t,params:n.params,context:i},...void 0!==o?[o]:[]),c=(async()=>{try{return{type:"data",result:await(o?o((e=>u(e))):u())}}catch(e){return{type:"error",result:e}}})();return Promise.race([c,l])};try{let o=n.route[e];if(r)if(o){let e,[t]=await Promise.all([l(o).catch((t=>{e=t})),r]);if(void 0!==e)throw e;a=t}else{if(await r,o=n.route[e],!o){if("action"===e){let e=new URL(t.url),r=e.pathname+e.search;throw Be(405,{method:t.method,pathname:r,routeId:n.route.id})}return{type:g.data,result:void 0}}a=await l(o)}else{if(!o){let e=new URL(t.url);throw Be(404,{pathname:e.pathname+e.search})}a=await l(o)}u(void 0!==a.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+n.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){return{type:g.error,result:e}}finally{s&&t.signal.removeEventListener("abort",s)}return a}(t,o,e,a,n,h):Promise.resolve({type:g.data,result:void 0}))})})),m=await e({matches:f,request:o,params:a[0].params,fetcherKey:s,context:h});try{await Promise.all(p)}catch(e){}return m}async function De(e){let{result:t,type:n}=e;if(Ke(t)){let e;try{let n=t.headers.get("Content-Type");e=n&&/\bapplication\/json\b/.test(n)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:g.error,error:e}}return n===g.error?{type:g.error,error:new re(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:g.data,data:e,statusCode:t.status,headers:t.headers}}var r,o,i,a,s,l,u,c;return n===g.error?Ge(t)?t.data instanceof Error?{type:g.error,error:t.data,statusCode:null==(i=t.init)?void 0:i.status,headers:null!=(a=t.init)&&a.headers?new Headers(t.init.headers):void 0}:{type:g.error,error:new re((null==(r=t.init)?void 0:r.status)||500,void 0,t.data),statusCode:oe(t)?t.status:void 0,headers:null!=(o=t.init)&&o.headers?new Headers(t.init.headers):void 0}:{type:g.error,error:t,statusCode:oe(t)?t.status:void 0}:function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(t)?{type:g.deferred,deferredData:t,statusCode:null==(s=t.init)?void 0:s.status,headers:(null==(l=t.init)?void 0:l.headers)&&new Headers(t.init.headers)}:Ge(t)?{type:g.data,data:t.data,statusCode:null==(u=t.init)?void 0:u.status,headers:null!=(c=t.init)&&c.headers?new Headers(t.init.headers):void 0}:{type:g.data,data:t}}function Ae(e,t,n,r,o,i){let a=e.headers.get("Location");if(u(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!fe.test(a)){let s=r.slice(0,r.findIndex((e=>e.route.id===n))+1);a=ye(new URL(t.url),s,o,!0,a,i),e.headers.set("Location",a)}return e}function Oe(e,t,n,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(fe.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r);if(o.includes(i.protocol))throw new Error("Invalid redirect location");let a=null!=Z(i.pathname,n);if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}try{let t=r.createURL(e);if(o.includes(t.protocol))throw new Error("Invalid redirect location")}catch(e){}return e}function Ie(e,t,n,r){let o=e.createURL($e(t)).toString(),i={signal:n};if(r&&Xe(r.formMethod)){let{formMethod:e,formEncType:t}=r;i.method=e.toUpperCase(),"application/json"===t?(i.headers=new Headers({"Content-Type":t}),i.body=JSON.stringify(r.json)):"text/plain"===t?i.body=r.text:"application/x-www-form-urlencoded"===t&&r.formData?i.body=Re(r.formData):i.body=r.formData}return new Request(o,i)}function Re(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,"string"==typeof r?r:r.name);return t}function Ee(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Le(e,t,n,r,o){let i,a={},s=null,l=!1,c={},d=n&&Ue(n[1])?n[1].error:void 0;return e.forEach((n=>{if(!(n.route.id in t))return;let h=n.route.id,p=t[h];if(u(!qe(p),"Cannot handle redirect results in processLoaderData"),Ue(p)){let t=p.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},o)s[h]=t;else{let n=Fe(e,h);null==s[n.route.id]&&(s[n.route.id]=t)}a[h]=void 0,l||(l=!0,i=oe(p.error)?p.error.status:500),p.headers&&(c[h]=p.headers)}else We(p)?(r.set(h,p.deferredData),a[h]=p.deferredData.data,null==p.statusCode||200===p.statusCode||l||(i=p.statusCode),p.headers&&(c[h]=p.headers)):(a[h]=p.data,p.statusCode&&200!==p.statusCode&&!l&&(i=p.statusCode),p.headers&&(c[h]=p.headers))})),void 0!==d&&n&&(s={[n[0]]:d},a[n[0]]=void 0),{loaderData:a,errors:s,statusCode:i||200,loaderHeaders:c}}function Ze(e,t,n,o,i,a,s){let{loaderData:l,errors:c}=Le(t,n,o,s,!1);return i.forEach((t=>{let{key:n,match:o,controller:i}=t,s=a[n];if(u(s,"Did not find corresponding fetcher result"),!i||!i.signal.aborted)if(Ue(s)){let t=Fe(e.matches,null==o?void 0:o.route.id);c&&c[t.route.id]||(c=r({},c,{[t.route.id]:s.error})),e.fetchers.delete(n)}else if(qe(s))u(!1,"Unhandled fetcher revalidation redirect");else if(We(s))u(!1,"Unhandled fetcher deferred data");else{let t=at(s.data);e.fetchers.set(n,t)}})),{loaderData:l,errors:c}}function Ne(e,t,n,o){let i=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)?void 0!==t[n]&&(i[n]=t[n]):void 0!==e[n]&&r.route.loader&&(i[n]=e[n]),o&&o.hasOwnProperty(n))break}return i}function je(e){return e?Ue(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fe(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function ze(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Be(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=void 0===t?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(s="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+r+'", so there is no way to handle the request.':"defer-action"===i?l="defer() is not supported in actions":"invalid-body"===i&&(l="Unable to encode submission body")):403===e?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):404===e?(s="Not Found",l='No route matches URL "'+n+'"'):405===e&&(s="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+r+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new re(e||500,s,new Error(l),!0)}function Ve(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(qe(r))return{key:n,result:r}}}function $e(e){return p(r({},"string"==typeof e?f(e):e,{hash:""}))}function He(e){return Ke(e.result)&&ue.has(e.result.status)}function We(e){return e.type===g.deferred}function Ue(e){return e.type===g.error}function qe(e){return(e&&e.type)===g.redirect}function Ge(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Ke(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Ye(e){return le.has(e.toLowerCase())}function Xe(e){return ae.has(e.toLowerCase())}async function Qe(e,t,n,r,o){let i=Object.entries(t);for(let a=0;a(null==e?void 0:e.route.id)===s));if(!u)continue;let c=r.find((e=>e.route.id===u.route.id)),d=null!=c&&!ke(c,u)&&void 0!==(o&&o[u.route.id]);We(l)&&d&&await et(l,n,!1).then((e=>{e&&(t[s]=e)}))}}async function Je(e,t,n){for(let r=0;r(null==e?void 0:e.route.id)===i))&&(We(s)&&(u(a,"Expected an AbortController for revalidating fetcher deferred result"),await et(s,a.signal,!0).then((e=>{e&&(t[o]=e)}))))}}async function et(e,t,n){if(void 0===n&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:g.data,data:e.deferredData.unwrappedData}}catch(e){return{type:g.error,error:e}}return{type:g.data,data:e.deferredData.data}}}function tt(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function nt(e,t){let n="string"==typeof t?f(t).search:t.search;if(e[e.length-1].route.index&&tt(n||""))return e[e.length-1];let r=V(e);return r[r.length-1]}function rt(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(t&&n&&r)return null!=o?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o}:null!=i?{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0}:void 0!==a?{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}:void 0}function ot(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function it(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function at(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}},49966: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;n1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++rc))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f-1&&e%1==0&&e-1}},52556:function(e,t,n){var r=n(93382);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},39448:function(e,t,n){var r=n(96586),o=n(36301),i=n(44538);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},7738:function(e,t,n){var r=n(95899);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},66575:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).get(e)}},7238:function(e,t,n){var r=n(95899);e.exports=function(e){return r(this,e).has(e)}},38738:function(e,t,n){var r=n(95899);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},19383:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},35718:function(e,t,n){var r=n(81822)(Object,"create");e.exports=r},50962:function(e,t,n){var r=n(58023)(Object.keys,Object);e.exports=r},21586:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},18125:function(e,t,n){e=n.nmd(e);var r=n(39120),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},21258:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},58023:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},11871:function(e,t,n){var r=n(79349),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7354:function(e,t,n){var r=n(36301);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}},12367:function(e){e.exports=function(e){return this.__data__.get(e)}},90748:function(e){e.exports=function(e){return this.__data__.has(e)}},97569:function(e,t,n){var r=n(36301),o=n(44538),i=n(74554);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},76532: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""}},56127: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}}},66726:function(e,t,n){var r=n(11611),o=n(82846),i=n(91936),a=Math.max,s=Math.min;e.exports=function(e,t,n){var l,u,c,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=c}function x(){var e=o();if(b(e))return w(e);h=setTimeout(x,function(e){var n=t-(e-p);return g?s(n,c-(e-f)):n}(e))}function w(e){return h=void 0,v&&l?y(e):(l=u=void 0,d)}function S(){var e=o(),n=b(e);if(l=arguments,u=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(x,t),m?y(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(x,t),y(p)}return void 0===h&&(h=setTimeout(x,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,c=(g="maxWait"in n)?a(i(n.maxWait)||0,t):c,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},S.flush=function(){return void 0===h?d:w(o())},S}},85638:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},31137:function(e){e.exports=function(e){return e}},2900:function(e,t,n){var r=n(55829),o=n(92360),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},19785:function(e){var t=Array.isArray;e.exports=t},80068:function(e,t,n){var r=n(28338),o=n(84194);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},36468:function(e,t,n){var r=n(80068),o=n(92360);e.exports=function(e){return o(e)&&r(e)}},43854:function(e,t,n){e=n.nmd(e);var r=n(77400),o=n(57714),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},56141:function(e,t,n){var r=n(32866);e.exports=function(e,t){return r(e,t)}},28338:function(e,t,n){var r=n(99736),o=n(11611);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},84194:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},11611:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},92360:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},40861:function(e,t,n){var r=n(99736),o=n(2173),i=n(92360),a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},55193:function(e,t,n){var r=n(99736),o=n(92360);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},48519:function(e,t,n){var r=n(26972),o=n(39334),i=n(18125),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},50098:function(e,t,n){var r=n(98213),o=n(20186),i=n(80068);e.exports=function(e){return i(e)?r(e):o(e)}},53893:function(e,t,n){var r=n(98213),o=n(59464),i=n(80068);e.exports=function(e){return i(e)?r(e,!0):o(e)}},98784:function(e,t,n){e=n.nmd(e),function(){var r,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",s=16,l=32,u=64,c=128,d=256,h=1/0,p=9007199254740991,f=NaN,m=4294967295,g=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",u],["rearg",d]],v="[object Arguments]",y="[object Array]",b="[object Boolean]",x="[object Date]",w="[object Error]",S="[object Function]",k="[object GeneratorFunction]",C="[object Map]",_="[object Number]",M="[object Object]",T="[object Promise]",P="[object RegExp]",D="[object Set]",A="[object String]",O="[object Symbol]",I="[object WeakMap]",R="[object ArrayBuffer]",E="[object DataView]",L="[object Float32Array]",Z="[object Float64Array]",N="[object Int8Array]",j="[object Int16Array]",F="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",V="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,U=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,K=RegExp(q.source),Y=RegExp(G.source),X=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(re.source),ie=/^\s+/,ae=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,xe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,ke="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_e="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\ufe0e\\ufe0f",De="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ae="['’]",Oe="["+ke+"]",Ie="["+De+"]",Re="["+Ce+"]",Ee="\\d+",Le="["+_e+"]",Ze="["+Me+"]",Ne="[^"+ke+De+Ee+_e+Me+Te+"]",je="\\ud83c[\\udffb-\\udfff]",Fe="[^"+ke+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Ve="["+Te+"]",$e="\\u200d",He="(?:"+Ze+"|"+Ne+")",We="(?:"+Ve+"|"+Ne+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",qe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ge="(?:"+Re+"|"+je+")"+"?",Ke="["+Pe+"]?",Ye=Ke+Ge+("(?:"+$e+"(?:"+[Fe,ze,Be].join("|")+")"+Ke+Ge+")*"),Xe="(?:"+[Le,ze,Be].join("|")+")"+Ye,Qe="(?:"+[Fe+Re+"?",Re,ze,Be,Oe].join("|")+")",Je=RegExp(Ae,"g"),et=RegExp(Re,"g"),tt=RegExp(je+"(?="+je+")|"+Qe+Ye,"g"),nt=RegExp([Ve+"?"+Ze+"+"+Ue+"(?="+[Ie,Ve,"$"].join("|")+")",We+"+"+qe+"(?="+[Ie,Ve+He,"$"].join("|")+")",Ve+"?"+He+"+"+Ue,Ve+"+"+qe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ee,Xe].join("|"),"g"),rt=RegExp("["+$e+ke+Ce+Pe+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,st={};st[L]=st[Z]=st[N]=st[j]=st[F]=st[z]=st[B]=st[V]=st[$]=!0,st[v]=st[y]=st[R]=st[b]=st[E]=st[x]=st[w]=st[S]=st[C]=st[_]=st[M]=st[P]=st[D]=st[A]=st[I]=!1;var lt={};lt[v]=lt[y]=lt[R]=lt[E]=lt[b]=lt[x]=lt[L]=lt[Z]=lt[N]=lt[j]=lt[F]=lt[C]=lt[_]=lt[M]=lt[P]=lt[D]=lt[A]=lt[O]=lt[z]=lt[B]=lt[V]=lt[$]=!0,lt[w]=lt[S]=lt[I]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,dt=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ft=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,vt=gt&>.exports===mt,yt=vt&&ht.process,bt=function(){try{var e=gt&>.require&>.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),xt=bt&&bt.isArrayBuffer,wt=bt&&bt.isDate,St=bt&&bt.isMap,kt=bt&&bt.isRegExp,Ct=bt&&bt.isSet,_t=bt&&bt.isTypedArray;function Mt(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)}function Tt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function Rt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function nn(e,t){for(var n=e.length;n--&&Vt(t,e[n],0)>-1;);return n}var rn=qt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),on=qt({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(e){return"\\"+ut[e]}function sn(e){return rt.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function un(e,t){return function(n){return e(t(n))}}function cn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n",""":'"',"'":"'"});var vn=function e(t){var n,ae=(t=null==t?ft:vn.defaults(ft.Object(),t,vn.pick(ft,it))).Array,ke=t.Date,Ce=t.Error,_e=t.Function,Me=t.Math,Te=t.Object,Pe=t.RegExp,De=t.String,Ae=t.TypeError,Oe=ae.prototype,Ie=_e.prototype,Re=Te.prototype,Ee=t["__core-js_shared__"],Le=Ie.toString,Ze=Re.hasOwnProperty,Ne=0,je=(n=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Fe=Re.toString,ze=Le.call(Te),Be=ft._,Ve=Pe("^"+Le.call(Ze).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=vt?t.Buffer:r,He=t.Symbol,We=t.Uint8Array,Ue=$e?$e.allocUnsafe:r,qe=un(Te.getPrototypeOf,Te),Ge=Te.create,Ke=Re.propertyIsEnumerable,Ye=Oe.splice,Xe=He?He.isConcatSpreadable:r,Qe=He?He.iterator:r,tt=He?He.toStringTag:r,rt=function(){try{var e=pi(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),ut=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ht=ke&&ke.now!==ft.Date.now&&ke.now,pt=t.setTimeout!==ft.setTimeout&&t.setTimeout,mt=Me.ceil,gt=Me.floor,yt=Te.getOwnPropertySymbols,bt=$e?$e.isBuffer:r,Ft=t.isFinite,qt=Oe.join,yn=un(Te.keys,Te),bn=Me.max,xn=Me.min,wn=ke.now,Sn=t.parseInt,kn=Me.random,Cn=Oe.reverse,_n=pi(t,"DataView"),Mn=pi(t,"Map"),Tn=pi(t,"Promise"),Pn=pi(t,"Set"),Dn=pi(t,"WeakMap"),An=pi(Te,"create"),On=Dn&&new Dn,In={},Rn=Fi(_n),En=Fi(Mn),Ln=Fi(Tn),Zn=Fi(Pn),Nn=Fi(Dn),jn=He?He.prototype:r,Fn=jn?jn.valueOf:r,zn=jn?jn.toString:r;function Bn(e){if(ns(e)&&!Wa(e)&&!(e instanceof Wn)){if(e instanceof Hn)return e;if(Ze.call(e,"__wrapped__"))return zi(e)}return new Hn(e)}var Vn=function(){function e(){}return function(t){if(!ts(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function $n(){}function Hn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Wn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ur(e,t,n,o,i,a){var s,l=1&t,u=2&t,c=4&t;if(n&&(s=i?n(e,o,i,a):n(e)),s!==r)return s;if(!ts(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ze.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return Oo(e,s)}else{var h=gi(e),p=h==S||h==k;if(Ka(e))return _o(e,l);if(h==M||h==v||p&&!i){if(s=u||p?{}:yi(e),!l)return u?function(e,t){return Io(e,mi(e),t)}(e,function(e,t){return e&&Io(t,Rs(t),e)}(s,e)):function(e,t){return Io(e,fi(e),t)}(e,ir(s,e))}else{if(!lt[h])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case R:return Mo(e);case b:case x:return new r(+e);case E:return function(e,t){var n=t?Mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case L:case Z:case N:case j:case F:case z:case B:case V:case $:return To(e,n);case C:return new r;case _:case A:return new r(e);case P:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case D:return new r;case O:return o=e,Fn?Te(Fn.call(o)):{}}var o}(e,h,l)}}a||(a=new Yn);var f=a.get(e);if(f)return f;a.set(e,s),ss(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):rs(e)&&e.forEach((function(r,o){s.set(o,ur(r,t,n,o,e,a))}));var m=d?r:(c?u?ai:ii:u?Rs:Is)(e);return Pt(m||e,(function(r,o){m&&(r=e[o=r]),nr(s,o,ur(r,t,n,o,e,a))})),s}function cr(e,t,n){var o=n.length;if(null==e)return!o;for(e=Te(e);o--;){var i=n[o],a=t[i],s=e[i];if(s===r&&!(i in e)||!a(s))return!1}return!0}function dr(e,t,n){if("function"!=typeof e)throw new Ae(o);return Ii((function(){e.apply(r,n)}),t)}function hr(e,t,n,r){var o=-1,i=It,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=Et(t,Qt(n))),r?(i=Rt,a=!1):t.length>=200&&(i=en,a=!1,t=new Kn(t));e:for(;++o-1},qn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(Mn||qn),string:new Un}},Gn.prototype.delete=function(e){var t=di(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return di(this,e).get(e)},Gn.prototype.has=function(e){return di(this,e).has(e)},Gn.prototype.set=function(e,t){var n=di(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,i),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new qn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Mn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var pr=Lo(wr),fr=Lo(Sr,!0);function mr(e,t){var n=!0;return pr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function gr(e,t,n){for(var o=-1,i=e.length;++o0&&n(s)?t>1?yr(s,t-1,n,r,o):Lt(o,s):r||(o[o.length]=s)}return o}var br=Zo(),xr=Zo(!0);function wr(e,t){return e&&br(e,t,Is)}function Sr(e,t){return e&&xr(e,t,Is)}function kr(e,t){return Ot(t,(function(t){return Qa(e[t])}))}function Cr(e,t){for(var n=0,o=(t=wo(t,e)).length;null!=e&&nt}function Pr(e,t){return null!=e&&Ze.call(e,t)}function Dr(e,t){return null!=e&&t in Te(e)}function Ar(e,t,n){for(var o=n?Rt:It,i=e[0].length,a=e.length,s=a,l=ae(a),u=1/0,c=[];s--;){var d=e[s];s&&t&&(d=Et(d,Qt(t))),u=xn(d.length,u),l[s]=!n&&(t||i>=120&&d.length>=120)?new Kn(s&&d):r}d=e[0];var h=-1,p=l[0];e:for(;++h=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Ur(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)s!==e&&Ye.call(s,l,1),Ye.call(e,l,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;xi(o)?Ye.call(e,o,1):po(e,o)}}return e}function Kr(e,t){return e+gt(kn()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Xr(e,t){return Ri(Pi(e,t,ol),e+"")}function Qr(e){return Qn(Bs(e))}function Jr(e,t){var n=Bs(e);return Zi(n,lr(t,0,n.length))}function eo(e,t,n,o){if(!ts(e))return e;for(var i=-1,a=(t=wo(t,e)).length,s=a-1,l=e;null!=l&&++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ae(o);++r>>1,a=e[i];null!==a&&!us(a)&&(n?a<=t:a=200){var u=t?null:Xo(e);if(u)return dn(u);a=!1,o=en,l=new Kn}else l=t?[]:s;e:for(;++r=o?e:oo(e,t,n)}var Co=ut||function(e){return ft.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=Ue?Ue(n):new e.constructor(n);return e.copy(r),r}function Mo(e){var t=new e.constructor(e.byteLength);return new We(t).set(new We(e)),t}function To(e,t){var n=t?Mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Po(e,t){if(e!==t){var n=e!==r,o=null===e,i=e==e,a=us(e),s=t!==r,l=null===t,u=t==t,c=us(t);if(!l&&!c&&!a&&e>t||a&&s&&u&&!l&&!c||o&&s&&u||!n&&u||!i)return 1;if(!o&&!a&&!c&&e1?n[i-1]:r,s=i>2?n[2]:r;for(a=e.length>3&&"function"==typeof a?(i--,a):r,s&&wi(n[0],n[1],s)&&(a=i<3?r:a,i=1),t=Te(t);++o-1?i[a?t[s]:s]:r}}function Bo(e){return oi((function(t){var n=t.length,i=n,a=Hn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Ae(o);if(a&&!l&&"wrapper"==li(s))var l=new Hn([],!0)}for(i=l?i:n;++i1&&b.reverse(),h&&ul))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var h=-1,p=!0,f=2&n?new Kn:r;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Pt(g,(function(n){var r="_."+n[0];t&n[1]&&!It(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Li(e){var t=0,n=0;return function(){var o=wn(),i=16-(o-n);if(n=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Zi(e,t){var n=-1,o=e.length,i=o-1;for(t=t===r?o:t;++n1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,aa(e,n)}));function pa(e){var t=Bn(e);return t.__chain__=!0,t}function fa(e,t){return t(e)}var ma=oi((function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Wn&&xi(n)?((o=o.slice(n,+n+(t?1:0))).__actions__.push({func:fa,args:[i],thisArg:r}),new Hn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(i)}));var ga=Ro((function(e,t,n){Ze.call(e,n)?++e[n]:ar(e,n,1)}));var va=zo(Hi),ya=zo(Wi);function ba(e,t){return(Wa(e)?Pt:pr)(e,ci(t,3))}function xa(e,t){return(Wa(e)?Dt:fr)(e,ci(t,3))}var wa=Ro((function(e,t,n){Ze.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Sa=Xr((function(e,t,n){var r=-1,o="function"==typeof t,i=qa(e)?ae(e.length):[];return pr(e,(function(e){i[++r]=o?Mt(t,e,n):Or(e,t,n)})),i})),ka=Ro((function(e,t,n){ar(e,n,t)}));function Ca(e,t){return(Wa(e)?Et:zr)(e,ci(t,3))}var _a=Ro((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ma=Xr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wi(e,t[0],t[1])?t=[]:n>2&&wi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,yr(t,1),[])})),Ta=ht||function(){return ft.Date.now()};function Pa(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Jo(e,c,r,r,r,r,t)}function Da(e,t){var n;if("function"!=typeof t)throw new Ae(o);return e=ms(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Aa=Xr((function(e,t,n){var r=1;if(n.length){var o=cn(n,ui(Aa));r|=l}return Jo(e,r,t,n,o)})),Oa=Xr((function(e,t,n){var r=3;if(n.length){var o=cn(n,ui(Oa));r|=l}return Jo(t,r,e,n,o)}));function Ia(e,t,n){var i,a,s,l,u,c,d=0,h=!1,p=!1,f=!0;if("function"!=typeof e)throw new Ae(o);function m(t){var n=i,o=a;return i=a=r,d=t,l=e.apply(o,n)}function g(e){var n=e-c;return c===r||n>=t||n<0||p&&e-d>=s}function v(){var e=Ta();if(g(e))return y(e);u=Ii(v,function(e){var n=t-(e-c);return p?xn(n,s-(e-d)):n}(e))}function y(e){return u=r,f&&i?m(e):(i=a=r,l)}function b(){var e=Ta(),n=g(e);if(i=arguments,a=this,c=e,n){if(u===r)return function(e){return d=e,u=Ii(v,t),h?m(e):l}(c);if(p)return Co(u),u=Ii(v,t),m(c)}return u===r&&(u=Ii(v,t)),l}return t=vs(t)||0,ts(n)&&(h=!!n.leading,s=(p="maxWait"in n)?bn(vs(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),b.cancel=function(){u!==r&&Co(u),d=0,i=c=a=u=r},b.flush=function(){return u===r?l:y(Ta())},b}var Ra=Xr((function(e,t){return dr(e,1,t)})),Ea=Xr((function(e,t,n){return dr(e,vs(t)||0,n)}));function La(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(La.Cache||Gn),n}function Za(e){if("function"!=typeof e)throw new Ae(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}La.Cache=Gn;var Na=So((function(e,t){var n=(t=1==t.length&&Wa(t[0])?Et(t[0],Qt(ci())):Et(yr(t,1),Qt(ci()))).length;return Xr((function(r){for(var o=-1,i=xn(r.length,n);++o=t})),Ha=Ir(function(){return arguments}())?Ir:function(e){return ns(e)&&Ze.call(e,"callee")&&!Ke.call(e,"callee")},Wa=ae.isArray,Ua=xt?Qt(xt):function(e){return ns(e)&&Mr(e)==R};function qa(e){return null!=e&&es(e.length)&&!Qa(e)}function Ga(e){return ns(e)&&qa(e)}var Ka=bt||vl,Ya=wt?Qt(wt):function(e){return ns(e)&&Mr(e)==x};function Xa(e){if(!ns(e))return!1;var t=Mr(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Qa(e){if(!ts(e))return!1;var t=Mr(e);return t==S||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ms(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ns(e){return null!=e&&"object"==typeof e}var rs=St?Qt(St):function(e){return ns(e)&&gi(e)==C};function os(e){return"number"==typeof e||ns(e)&&Mr(e)==_}function is(e){if(!ns(e)||Mr(e)!=M)return!1;var t=qe(e);if(null===t)return!0;var n=Ze.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Le.call(n)==ze}var as=kt?Qt(kt):function(e){return ns(e)&&Mr(e)==P};var ss=Ct?Qt(Ct):function(e){return ns(e)&&gi(e)==D};function ls(e){return"string"==typeof e||!Wa(e)&&ns(e)&&Mr(e)==A}function us(e){return"symbol"==typeof e||ns(e)&&Mr(e)==O}var cs=_t?Qt(_t):function(e){return ns(e)&&es(e.length)&&!!st[Mr(e)]};var ds=Go(Fr),hs=Go((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(qa(e))return ls(e)?fn(e):Oo(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=gi(e);return(t==C?ln:t==D?dn:Bs)(e)}function fs(e){return e?(e=vs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ms(e){var t=fs(e),n=t%1;return t==t?n?t-n:t:0}function gs(e){return e?lr(ms(e),0,m):0}function vs(e){if("number"==typeof e)return e;if(us(e))return f;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=ge.test(e);return n||ye.test(e)?dt(e.slice(2),n?2:8):me.test(e)?f:+e}function ys(e){return Io(e,Rs(e))}function bs(e){return null==e?"":co(e)}var xs=Eo((function(e,t){if(_i(t)||qa(t))Io(t,Is(t),e);else for(var n in t)Ze.call(t,n)&&nr(e,n,t[n])})),ws=Eo((function(e,t){Io(t,Rs(t),e)})),Ss=Eo((function(e,t,n,r){Io(t,Rs(t),e,r)})),ks=Eo((function(e,t,n,r){Io(t,Is(t),e,r)})),Cs=oi(sr);var _s=Xr((function(e,t){e=Te(e);var n=-1,o=t.length,i=o>2?t[2]:r;for(i&&wi(t[0],t[1],i)&&(o=1);++n1),t})),Io(e,ai(e),n),r&&(n=ur(n,7,ni));for(var o=t.length;o--;)po(n,t[o]);return n}));var Ns=oi((function(e,t){return null==e?{}:function(e,t){return Ur(e,t,(function(t,n){return Ps(e,n)}))}(e,t)}));function js(e,t){if(null==e)return{};var n=Et(ai(e),(function(e){return[e]}));return t=ci(t),Ur(e,n,(function(e,n){return t(e,n[0])}))}var Fs=Qo(Is),zs=Qo(Rs);function Bs(e){return null==e?[]:Jt(e,Is(e))}var Vs=jo((function(e,t,n){return t=t.toLowerCase(),e+(n?$s(t):t)}));function $s(e){return Xs(bs(e).toLowerCase())}function Hs(e){return(e=bs(e))&&e.replace(xe,rn).replace(et,"")}var Ws=jo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Us=jo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=No("toLowerCase");var Gs=jo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ks=jo((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Ys=jo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=No("toUpperCase");function Qs(e,t,n){return e=bs(e),(t=n?r:t)===r?function(e){return ot.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Js=Xr((function(e,t){try{return Mt(e,r,t)}catch(e){return Xa(e)?e:new Ce(e)}})),el=oi((function(e,t){return Pt(t,(function(t){t=ji(t),ar(e,t,Aa(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Bo(),rl=Bo(!0);function ol(e){return e}function il(e){return Zr("function"==typeof e?e:ur(e,1))}var al=Xr((function(e,t){return function(n){return Or(n,e,t)}})),sl=Xr((function(e,t){return function(n){return Or(e,n,t)}}));function ll(e,t,n){var r=Is(t),o=kr(t,r);null!=n||ts(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=kr(t,Is(t)));var i=!(ts(n)&&"chain"in n&&!n.chain),a=Qa(e);return Pt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Oo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Lt([this.value()],arguments))})})),e}function ul(){}var cl=Wo(Et),dl=Wo(At),hl=Wo(jt);function pl(e){return Si(e)?Ut(ji(e)):function(e){return function(t){return Cr(t,e)}}(e)}var fl=qo(),ml=qo(!0);function gl(){return[]}function vl(){return!1}var yl=Ho((function(e,t){return e+t}),0),bl=Yo("ceil"),xl=Ho((function(e,t){return e/t}),1),wl=Yo("floor");var Sl,kl=Ho((function(e,t){return e*t}),1),Cl=Yo("round"),_l=Ho((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ae(o);return e=ms(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Pa,Bn.assign=xs,Bn.assignIn=ws,Bn.assignInWith=Ss,Bn.assignWith=ks,Bn.at=Cs,Bn.before=Da,Bn.bind=Aa,Bn.bindAll=el,Bn.bindKey=Oa,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Bn.chain=pa,Bn.chunk=function(e,t,n){t=(n?wi(e,t,n):t===r)?1:bn(ms(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=ae(mt(o/t));ii?0:i+n),(o=o===r||o>i?i:ms(o))<0&&(o+=i),o=n>o?0:gs(o);n>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=co(t))&&sn(e)?ko(fn(e),0,n):e.split(t,n):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ae(o);return t=null==t?0:bn(ms(t),0),Xr((function(n){var r=n[t],o=ko(n,0,t);return r&&Lt(o,r),Mt(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Bn.take=function(e,t,n){return e&&e.length?oo(e,0,(t=n||t===r?1:ms(t))<0?0:t):[]},Bn.takeRight=function(e,t,n){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=n||t===r?1:ms(t)))<0?0:t,o):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?mo(e,ci(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ae(o);return ts(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ia(e,t,{leading:r,maxWait:t,trailing:i})},Bn.thru=fa,Bn.toArray=ps,Bn.toPairs=Fs,Bn.toPairsIn=zs,Bn.toPath=function(e){return Wa(e)?Et(e,ji):us(e)?[e]:Oo(Ni(bs(e)))},Bn.toPlainObject=ys,Bn.transform=function(e,t,n){var r=Wa(e),o=r||Ka(e)||cs(e);if(t=ci(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:ts(e)&&Qa(i)?Vn(qe(e)):{}}return(o?Pt:wr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Pa(e,1)},Bn.union=na,Bn.unionBy=ra,Bn.unionWith=oa,Bn.uniq=function(e){return e&&e.length?ho(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?ho(e,ci(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ho(e,r,t):[]},Bn.unset=function(e,t){return null==e||po(e,t)},Bn.unzip=ia,Bn.unzipWith=aa,Bn.update=function(e,t,n){return null==e?e:fo(e,t,xo(n))},Bn.updateWith=function(e,t,n,o){return o="function"==typeof o?o:r,null==e?e:fo(e,t,xo(n),o)},Bn.values=Bs,Bn.valuesIn=function(e){return null==e?[]:Jt(e,Rs(e))},Bn.without=sa,Bn.words=Qs,Bn.wrap=function(e,t){return ja(xo(t),e)},Bn.xor=la,Bn.xorBy=ua,Bn.xorWith=ca,Bn.zip=da,Bn.zipObject=function(e,t){return yo(e||[],t||[],nr)},Bn.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Bn.zipWith=ha,Bn.entries=Fs,Bn.entriesIn=zs,Bn.extend=ws,Bn.extendWith=Ss,ll(Bn,Bn),Bn.add=yl,Bn.attempt=Js,Bn.camelCase=Vs,Bn.capitalize=$s,Bn.ceil=bl,Bn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=vs(n))==n?n:0),t!==r&&(t=(t=vs(t))==t?t:0),lr(vs(e),t,n)},Bn.clone=function(e){return ur(e,4)},Bn.cloneDeep=function(e){return ur(e,5)},Bn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:r)},Bn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:r)},Bn.conformsTo=function(e,t){return null==t||cr(e,t,Is(t))},Bn.deburr=Hs,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=xl,Bn.endsWith=function(e,t,n){e=bs(e),t=co(t);var o=e.length,i=n=n===r?o:lr(ms(n),0,o);return(n-=t.length)>=0&&e.slice(n,i)==t},Bn.eq=Ba,Bn.escape=function(e){return(e=bs(e))&&Y.test(e)?e.replace(G,on):e},Bn.escapeRegExp=function(e){return(e=bs(e))&&oe.test(e)?e.replace(re,"\\$&"):e},Bn.every=function(e,t,n){var o=Wa(e)?At:mr;return n&&wi(e,t,n)&&(t=r),o(e,ci(t,3))},Bn.find=va,Bn.findIndex=Hi,Bn.findKey=function(e,t){return zt(e,ci(t,3),wr)},Bn.findLast=ya,Bn.findLastIndex=Wi,Bn.findLastKey=function(e,t){return zt(e,ci(t,3),Sr)},Bn.floor=wl,Bn.forEach=ba,Bn.forEachRight=xa,Bn.forIn=function(e,t){return null==e?e:br(e,ci(t,3),Rs)},Bn.forInRight=function(e,t){return null==e?e:xr(e,ci(t,3),Rs)},Bn.forOwn=function(e,t){return e&&wr(e,ci(t,3))},Bn.forOwnRight=function(e,t){return e&&Sr(e,ci(t,3))},Bn.get=Ts,Bn.gt=Va,Bn.gte=$a,Bn.has=function(e,t){return null!=e&&vi(e,t,Pr)},Bn.hasIn=Ps,Bn.head=qi,Bn.identity=ol,Bn.includes=function(e,t,n,r){e=qa(e)?e:Bs(e),n=n&&!r?ms(n):0;var o=e.length;return n<0&&(n=bn(o+n,0)),ls(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Vt(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ms(n);return o<0&&(o=bn(r+o,0)),Vt(e,t,o)},Bn.inRange=function(e,t,n){return t=fs(t),n===r?(n=t,t=0):n=fs(n),function(e,t,n){return e>=xn(t,n)&&e=-9007199254740991&&e<=p},Bn.isSet=ss,Bn.isString=ls,Bn.isSymbol=us,Bn.isTypedArray=cs,Bn.isUndefined=function(e){return e===r},Bn.isWeakMap=function(e){return ns(e)&&gi(e)==I},Bn.isWeakSet=function(e){return ns(e)&&"[object WeakSet]"==Mr(e)},Bn.join=function(e,t){return null==e?"":qt.call(e,t)},Bn.kebabCase=Ws,Bn.last=Xi,Bn.lastIndexOf=function(e,t,n){var o=null==e?0:e.length;if(!o)return-1;var i=o;return n!==r&&(i=(i=ms(n))<0?bn(o+i,0):xn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,Ht,i,!0)},Bn.lowerCase=Us,Bn.lowerFirst=qs,Bn.lt=ds,Bn.lte=hs,Bn.max=function(e){return e&&e.length?gr(e,ol,Tr):r},Bn.maxBy=function(e,t){return e&&e.length?gr(e,ci(t,2),Tr):r},Bn.mean=function(e){return Wt(e,ol)},Bn.meanBy=function(e,t){return Wt(e,ci(t,2))},Bn.min=function(e){return e&&e.length?gr(e,ol,Fr):r},Bn.minBy=function(e,t){return e&&e.length?gr(e,ci(t,2),Fr):r},Bn.stubArray=gl,Bn.stubFalse=vl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=kl,Bn.nth=function(e,t){return e&&e.length?Hr(e,ms(t)):r},Bn.noConflict=function(){return ft._===this&&(ft._=Be),this},Bn.noop=ul,Bn.now=Ta,Bn.pad=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Uo(gt(o),n)+e+Uo(mt(o),n)},Bn.padEnd=function(e,t,n){e=bs(e);var r=(t=ms(t))?pn(e):0;return t&&rt){var o=e;e=t,t=o}if(n||e%1||t%1){var i=kn();return xn(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return Kr(e,t)},Bn.reduce=function(e,t,n){var r=Wa(e)?Zt:Gt,o=arguments.length<3;return r(e,ci(t,4),n,o,pr)},Bn.reduceRight=function(e,t,n){var r=Wa(e)?Nt:Gt,o=arguments.length<3;return r(e,ci(t,4),n,o,fr)},Bn.repeat=function(e,t,n){return t=(n?wi(e,t,n):t===r)?1:ms(t),Yr(bs(e),t)},Bn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,n){var o=-1,i=(t=wo(t,e)).length;for(i||(i=1,e=r);++op)return[];var n=m,r=xn(e,m);t=ci(t),e-=m;for(var o=Yt(r,t);++n=a)return e;var l=n-pn(o);if(l<1)return o;var u=s?ko(s,0,l).join(""):e.slice(0,l);if(i===r)return u+o;if(s&&(l+=u.length-l),as(i)){if(e.slice(l).search(i)){var c,d=u;for(i.global||(i=Pe(i.source,bs(fe.exec(i))+"g")),i.lastIndex=0;c=i.exec(d);)var h=c.index;u=u.slice(0,h===r?l:h)}}else if(e.indexOf(co(i),l)!=l){var p=u.lastIndexOf(i);p>-1&&(u=u.slice(0,p))}return u+o},Bn.unescape=function(e){return(e=bs(e))&&K.test(e)?e.replace(q,gn):e},Bn.uniqueId=function(e){var t=++Ne;return bs(e)+t},Bn.upperCase=Ys,Bn.upperFirst=Xs,Bn.each=ba,Bn.eachRight=xa,Bn.first=qi,ll(Bn,(Sl={},wr(Bn,(function(e,t){Ze.call(Bn.prototype,t)||(Sl[t]=e)})),Sl),{chain:!1}),Bn.VERSION="4.17.23",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),Pt(["drop","take"],(function(e,t){Wn.prototype[e]=function(n){n=n===r?1:bn(ms(n),0);var o=this.__filtered__&&!t?new Wn(this):this.clone();return o.__filtered__?o.__takeCount__=xn(n,o.__takeCount__):o.__views__.push({size:xn(n,m),type:e+(o.__dir__<0?"Right":"")}),o},Wn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Wn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Pt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Wn.prototype[e]=function(){return this[n](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Wn.prototype[e]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(ol)},Wn.prototype.find=function(e){return this.filter(e).head()},Wn.prototype.findLast=function(e){return this.reverse().find(e)},Wn.prototype.invokeMap=Xr((function(e,t){return"function"==typeof e?new Wn(this):this.map((function(n){return Or(n,e,t)}))})),Wn.prototype.reject=function(e){return this.filter(Za(ci(e)))},Wn.prototype.slice=function(e,t){e=ms(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Wn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=ms(t))<0?n.dropRight(-t):n.take(t-e)),n)},Wn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Wn.prototype.toArray=function(){return this.take(m)},wr(Wn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Bn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof Wn,u=s[0],c=l||Wa(t),d=function(e){var t=i.apply(Bn,Lt([e],s));return o&&h?t[0]:t};c&&n&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,p=!!this.__actions__.length,f=a&&!h,m=l&&!p;if(!a&&c){t=m?t:new Wn(this);var g=e.apply(t,s);return g.__actions__.push({func:fa,args:[d],thisArg:r}),new Hn(g,h)}return f&&m?e.apply(this,s):(g=this.thru(d),f?o?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wa(o)?o:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),wr(Wn.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ze.call(In,r)||(In[r]=[]),In[r].push({name:t,func:n})}})),In[Vo(r,2).name]=[{name:"wrapper",func:r}],Wn.prototype.clone=function(){var e=new Wn(this.__wrapped__);return e.__actions__=Oo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oo(this.__views__),e},Wn.prototype.reverse=function(){if(this.__filtered__){var e=new Wn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Wn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var o=zi(n);o.__index__=0,o.__values__=r,t?i.__wrapped__=o:t=o;var i=o;n=n.__wrapped__}return i.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Wn){var t=e;return this.__actions__.length&&(t=new Wn(this)),(t=t.reverse()).__actions__.push({func:fa,args:[ta],thisArg:r}),new Hn(t,this.__chain__)}return this.thru(ta)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Qe&&(Bn.prototype[Qe]=function(){return this}),Bn}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ft._=vn,define((function(){return vn}))):gt?((gt.exports=vn)._=vn,mt._=vn):ft._=vn}.call(this)},15409:function(e,t,n){var r=n(40015),o=n(7270)((function(e,t,n){r(e,t,n)}));e.exports=o},82846:function(e,t,n){var r=n(77400);e.exports=function(){return r.Date.now()}},15937:function(e){e.exports=function(){return[]}},57714:function(e){e.exports=function(){return!1}},91936:function(e,t,n){var r=n(74833),o=n(11611),i=n(55193),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},89328:function(e,t,n){var r=n(35159),o=n(53893);e.exports=function(e){return r(e,o(e))}},79356:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M6,17C6,15 10,13.9 12,13.9C14,13.9 18,15 18,17V18H6M15,9A3,3 0 0,1 12,12A3,3 0 0,1 9,9A3,3 0 0,1 12,6A3,3 0 0,1 15,9M3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3H5C3.89,3 3,3.9 3,5Z","AccountBox")},68477:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z","AccountCircle")},53312:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M3,3H21V7H3V3M4,8H20V21H4V8M9.5,11A0.5,0.5 0 0,0 9,11.5V13H15V11.5A0.5,0.5 0 0,0 14.5,11H9.5Z","Archive")},67835:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M2.65 3C2.3 3 2 3.3 2 3.65C2 3.69 2 3.73 2 3.77L4.73 20.27C4.8 20.69 5.16 21 5.58 21H18.63C18.94 21 19.22 20.78 19.27 20.46L22 3.77C22.05 3.42 21.81 3.09 21.46 3.04C21.43 3.03 21.39 3.03 21.35 3.03L2.65 3M14.1 14.95H9.94L8.81 9.07H15.11L14.1 14.95Z","Bitbucket")},22118:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,18C11.11,18 10.26,17.8 9.5,17.45C11.56,16.5 13,14.42 13,12C13,9.58 11.56,7.5 9.5,6.55C10.26,6.2 11.11,6 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31L23.31,12L20,8.69Z","Brightness4")},55182:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6A6,6 0 0,1 18,12A6,6 0 0,1 12,18M20,15.31L23.31,12L20,8.69V4H15.31L12,0.69L8.69,4H4V8.69L0.69,12L4,15.31V20H8.69L12,23.31L15.31,20H20V15.31Z","Brightness5")},59986:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},12449:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},84974:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},20791:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},10763:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},77463:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z","Cog")},50737:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M14.19,14.19L6,18L9.81,9.81L18,6M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,10.9A1.1,1.1 0 0,0 10.9,12A1.1,1.1 0 0,0 12,13.1A1.1,1.1 0 0,0 13.1,12A1.1,1.1 0 0,0 12,10.9Z","Compass")},45276:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M4,9V12C4,14.21 7.58,16 12,16C16.42,16 20,14.21 20,12V9C20,11.21 16.42,13 12,13C7.58,13 4,11.21 4,9M4,14V17C4,19.21 7.58,21 12,21C16.42,21 20,19.21 20,17V14C20,16.21 16.42,18 12,18C7.58,18 4,16.21 4,14Z","Database")},80354:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},22446:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},11682:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},60917:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,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","Earth")},40141:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12M22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2A10,10 0 0,1 22,12M15.5,8C16.3,8 17,8.7 17,9.5C17,10.3 16.3,11 15.5,11C14.7,11 14,10.3 14,9.5C14,8.7 14.7,8 15.5,8M10,9.5C10,10.3 9.3,11 8.5,11C7.7,11 7,10.3 7,9.5C7,8.7 7.7,8 8.5,8C9.3,8 10,8.7 10,9.5M12,14C13.75,14 15.29,14.72 16.19,15.81L14.77,17.23C14.32,16.5 13.25,16 12,16C10.75,16 9.68,16.5 9.23,17.23L7.81,15.81C8.71,14.72 10.25,14 12,14Z","EmoticonSadOutline")},28418:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},57689:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},95898:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z","Github")},6504:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M21.94 13.11L20.89 9.89C20.89 9.86 20.88 9.83 20.87 9.8L18.76 3.32C18.65 3 18.33 2.75 17.96 2.75C17.6 2.75 17.28 3 17.17 3.33L15.17 9.5H8.84L6.83 3.33C6.72 3 6.4 2.75 6.04 2.75H6.04C5.67 2.75 5.35 3 5.24 3.33L3.13 9.82C3.13 9.82 3.13 9.83 3.13 9.83L2.06 13.11C1.9 13.61 2.07 14.15 2.5 14.45L11.72 21.16C11.89 21.28 12.11 21.28 12.28 21.15L21.5 14.45C21.93 14.15 22.1 13.61 21.94 13.11M8.15 10.45L10.72 18.36L4.55 10.45M13.28 18.37L15.75 10.78L15.85 10.45H19.46L13.87 17.61M17.97 3.94L19.78 9.5H16.16M14.86 10.45L13.07 15.96L12 19.24L9.14 10.45M6.03 3.94L7.84 9.5H4.23M3.05 13.69C2.96 13.62 2.92 13.5 2.96 13.4L3.75 10.97L9.57 18.42M20.95 13.69L14.44 18.42L14.46 18.39L20.25 10.97L21.04 13.4C21.08 13.5 21.04 13.62 20.95 13.69","Gitlab")},391:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3","History")},39398:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.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")},60550:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z","Logout")},66268:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},93051:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z","Menu")},86396:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,13H5V11H19V13Z","Minus")},1889:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},75186:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},33755:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},98628:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12 1L3 5V11C3 16.55 6.84 21.74 12 23C17.16 21.74 21 16.55 21 11V5L12 1M15.08 16L12 14.15L8.93 16L9.74 12.5L7.03 10.16L10.61 9.85L12 6.55L13.39 9.84L16.97 10.15L14.26 12.5L15.08 16Z","ShieldStar")},40830:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M12,6.7L13.45,10.55L17.3,12L13.45,13.45L12,17.3L10.55,13.45L6.7,12L10.55,10.55L12,6.7M12,1L9,9L1,12L9,15L12,23L15,15L23,12L15,9L12,1Z","StarFourPointsOutline")},74793:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z","Upload")},41973:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z","ViewDashboard")},7250:function(e,t,n){"use strict";t.default=void 0;var r,o=(r=n(30265))&&r.__esModule?r:{default:r};t.default=(0,o.default)("M19,5V7H15V5H19M9,5V11H5V5H9M19,13V19H15V13H19M9,17V19H5V17H9M21,3H13V9H21V3M11,3H3V13H11V3M21,11H13V21H21V11M11,15H3V21H11V15Z","ViewDashboardOutline")},30265:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(87554),o=n(24246);t.default=function(e,t){return(0,r.createSvgIcon)((0,o.jsx)("path",{d:e}),t)}},58772:function(e,t,n){"use strict";var r=n(90331);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},23615:function(e,t,n){e.exports=n(58772)()},90331:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},43577:function(e,t,n){"use strict";var r=n(27378),o=n(91102);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n