@yugabytedb/perf-advisor-ui 1.0.61-alpha.3 → 1.0.61-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("react-query"),r=require("@material-ui/core"),i=require("@material-ui/core/styles"),o=require("@material-ui/icons"),a=require("@material-ui/core/TextField"),s=require("@material-ui/lab"),l=require("mui-datatables"),u=require("http"),c=require("https"),d=require("url"),p=require("stream"),h=require("assert"),f=require("tty"),g=require("util"),m=require("os"),v=require("zlib"),y=require("react-dom"),x=require("vis-timeline/standalone");require("vis-timeline/styles/vis-timeline-graph2d.css?inline");var _=require("@material-ui/icons/ExpandMore");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function w(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var S=w(t),C=b(t),T=b(a),M=b(l),E=b(u),I=b(c),A=b(d),D=b(p),k=b(h),O=b(f),R=b(g),N=b(m),L=b(v),P=b(_),B=function(e,t){return B=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])},B(e,t)};function j(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}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var F=function(){return F=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},F.apply(this,arguments)};function U(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function z(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function H(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function V(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function W(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<e.length;t++)e[t]&&(n=W(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Y(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=W(e))&&(r&&(r+=" "),r+=t);return r}"function"==typeof SuppressedError&&SuppressedError;var G=r.makeStyles((function(e){return{root:{padding:function(t){var n=t.size,r=t.startIcon,i=t.endIcon;if(r||i)return"large"===n?e.spacing(0,2):e.spacing(0,1.4);switch(n){case"small":return e.spacing(0,1.4);case"large":return e.spacing(0,3.5);default:return e.spacing(0,2)}},background:function(e){var t=e.variant,n=e.disabled;return"gradient"!==t||n?"":"linear-gradient(272.58deg, #7879F1 1.06%, #7879F1 33.24%, #5D5FEF 56.4%)"}}}})),q=r.makeStyles((function(e){return{label:{fontWeight:400,color:e.palette.grey[900]},text:{"& + &":{marginLeft:e.spacing(1)},backgroundColor:function(t){return t.selected?e.palette.grey[300]:"transparent"},"&:hover":{borderColor:e.palette.grey[300],backgroundColor:function(t){return t.selected?e.palette.grey[300]:"transparent"}}}}})),Q=function(t){var n=t.variant,i=t.showSpinner,o=U(t,["variant","showSpinner"]);o.classes=G(t);var a=q(t);switch(n){case"primary":case"gradient":o.variant="contained";break;case"secondary":o.variant="outlined";break;case"ghost":o.variant="text";break;case"pill":o.variant="text",o.classes=F(F({},o.classes),a)}return i&&(o.startIcon=e.jsx(r.Box,F({color:t.disabled&&"grey.500"},{children:e.jsx(r.CircularProgress,{size:16,color:t.disabled?"inherit":"primary",thickness:5})}))),e.jsx(r.Button,F({},o))};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={exports:{}};function $(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||$(n)})),e}X.exports=$,X.exports.default=$;class K{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function J(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ee(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const te=e=>!!e.scope||e.sublanguage&&e.language;class ne{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=J(e)}openNode(e){if(!te(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){te(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const re=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class ie{constructor(){this.rootNode=re(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=re({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ie._collapse(e)})))}}class oe extends ie{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new ne(this,this.options).value()}finalize(){return!0}}function ae(e){return e?"string"==typeof e?e:e.source:null}function se(e){return ce("(?=",e,")")}function le(e){return ce("(?:",e,")*")}function ue(e){return ce("(?:",e,")?")}function ce(...e){return e.map((e=>ae(e))).join("")}function de(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>ae(e))).join("|")+")"}function pe(e){return new RegExp(e.toString()+"|").exec("").length-1}const he=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function fe(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=ae(e),i="";for(;r.length>0;){const e=he.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const ge="[a-zA-Z]\\w*",me="[a-zA-Z_]\\w*",ve="\\b\\d+(\\.\\d+)?",ye="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",xe="\\b(0b[01]+)",_e={begin:"\\\\[\\s\\S]",relevance:0},be={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[_e]},we={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[_e]},Se=function(e,t,n={}){const r=ee({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=de("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ce(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ce=Se("//","$"),Te=Se("/\\*","\\*/"),Me=Se("#","$"),Ee={scope:"number",begin:ve,relevance:0},Ie={scope:"number",begin:ye,relevance:0},Ae={scope:"number",begin:xe,relevance:0},De={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[_e,{begin:/\[/,end:/\]/,relevance:0,contains:[_e]}]}]},ke={scope:"title",begin:ge,relevance:0},Oe={scope:"title",begin:me,relevance:0},Re={begin:"\\.\\s*"+me,relevance:0};var Ne=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:ge,UNDERSCORE_IDENT_RE:me,NUMBER_RE:ve,C_NUMBER_RE:ye,BINARY_NUMBER_RE:xe,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ce(t,/.*\b/,e.binary,/\b.*/)),ee({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:_e,APOS_STRING_MODE:be,QUOTE_STRING_MODE:we,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:Se,C_LINE_COMMENT_MODE:Ce,C_BLOCK_COMMENT_MODE:Te,HASH_COMMENT_MODE:Me,NUMBER_MODE:Ee,C_NUMBER_MODE:Ie,BINARY_NUMBER_MODE:Ae,REGEXP_MODE:De,TITLE_MODE:ke,UNDERSCORE_TITLE_MODE:Oe,METHOD_GUARD:Re,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function Le(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Pe(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Be(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Le,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function je(e,t){Array.isArray(e.illegal)&&(e.illegal=de(...e.illegal))}function Fe(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Ue(e,t){void 0===e.relevance&&(e.relevance=1)}const ze=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=ce(n.beforeMatch,se(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},He=["of","and","for","in","not","or","if","then","parent","list","value"];function Ve(e,t,n="keyword"){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Ve(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,We(n[0],n[1])]}))}}function We(e,t){return t?Number(t):function(e){return He.includes(e.toLowerCase())}(e)?0:1}const Ye={},Ge=e=>{console.error(e)},qe=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Qe=(e,t)=>{Ye[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ye[`${e}/${t}`]=!0)},Ze=new Error;function Xe(e,t,{key:n}){let r=0;const i=e[n],o={},a={};for(let e=1;e<=t.length;e++)a[e+r]=i[e],o[e+r]=!0,r+=pe(t[e-1]);e[n]=a,e[n]._emit=o,e[n]._multi=!0}function $e(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ge("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ze;if("object"!=typeof e.beginScope||null===e.beginScope)throw Ge("beginScope must be object"),Ze;Xe(e,e.begin,{key:"beginScope"}),e.begin=fe(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ge("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ze;if("object"!=typeof e.endScope||null===e.endScope)throw Ge("endScope must be object"),Ze;Xe(e,e.end,{key:"endScope"}),e.end=fe(e.end,{joinWith:""})}}(e)}function Ke(e){function t(t,n){return new RegExp(ae(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=pe(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(fe(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ee(e.classNameAliases||{}),function n(i,o){const a=i;if(i.isCompiled)return a;[Pe,Fe,$e,ze].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[Be,je,Ue].forEach((e=>e(i,o))),i.isCompiled=!0;let s=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),s=i.keywords.$pattern,delete i.keywords.$pattern),s=s||/\w+/,i.keywords&&(i.keywords=Ve(i.keywords,e.case_insensitive)),a.keywordPatternRe=t(s,!0),o&&(i.begin||(i.begin=/\B|\b/),a.beginRe=t(a.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(a.endRe=t(a.end)),a.terminatorEnd=ae(a.end)||"",i.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(a.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return ee(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Je(e))return ee(e,{starts:e.starts?ee(e.starts):null});if(Object.isFrozen(e))return ee(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,a)})),i.starts&&n(i.starts,o),a.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function Je(e){return!!e&&(e.endsWithParent||Je(e.starts))}class et extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const tt=J,nt=ee,rt=Symbol("nomatch");var it=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:oe};function l(e){return s.noHighlightRe.test(e)}function u(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(Qe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qe("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const a=o.result?o.result:c(o.language,o.code,n);return a.code=o.code,y("after:highlight",a),a}function c(e,n,r,a){const l=Object.create(null);function u(){if(!C.keywords)return void M.addText(E);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(E),n="";for(;t;){n+=E.substring(e,t.index);const i=b.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,C.keywords[r]);if(o){const[e,r]=o;if(M.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=7&&(I+=r),e.startsWith("_"))n+=t[0];else{const n=b.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(E)}var r;n+=E.substring(e),M.addText(n)}function p(){null!=C.subLanguage?function(){if(""===E)return;let e=null;if("string"==typeof C.subLanguage){if(!t[C.subLanguage])return void M.addText(E);e=c(C.subLanguage,E,!0,T[C.subLanguage]),T[C.subLanguage]=e._top}else e=d(E,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(I+=e.relevance),M.addSublanguage(e._emitter,e.language)}():u(),E=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=b.classNameAliases[e[n]]||e[n],i=t[n];r?M.addKeyword(i,r):(E=i,u(),E=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&M.openNode(b.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(M.addKeyword(E,b.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),E=""):e.beginScope._multi&&(h(e.beginScope,t),E="")),C=Object.create(e,{parent:{value:C}}),C}function m(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new K(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,n)}function v(e){return 0===C.matcher.regexIndex?(E+=e[0],1):(k=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),i=m(C,e,r);if(!i)return rt;const o=C;C.endScope&&C.endScope._wrap?(p(),M.addKeyword(t,C.endScope._wrap)):C.endScope&&C.endScope._multi?(p(),h(C.endScope,e)):o.skip?E+=t:(o.returnEnd||o.excludeEnd||(E+=t),p(),o.excludeEnd&&(E=t));do{C.scope&&M.closeNode(),C.skip||C.subLanguage||(I+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&f(i.starts,e),o.returnEnd?0:t.length}let x={};function _(t,o){const a=o&&o[0];if(E+=t,null==a)return p(),0;if("begin"===x.type&&"end"===o.type&&x.index===o.index&&""===a){if(E+=n.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=x.rule,t}return 1}if(x=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new K(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return v(t);return n.skip?E+=t:(n.excludeBegin&&(E+=t),p(),n.returnBegin||n.excludeBegin||(E=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=y(o);if(e!==rt)return e}if("illegal"===o.type&&""===a)return 1;if(D>1e5&&D>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return E+=a,a.length}const b=g(e);if(!b)throw Ge(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const w=Ke(b);let S="",C=a||w;const T={},M=new s.__emitter(s);!function(){const e=[];for(let t=C;t!==b;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>M.openNode(e)))}();let E="",I=0,A=0,D=0,k=!1;try{for(C.matcher.considerAll();;){D++,k?k=!1:C.matcher.considerAll(),C.matcher.lastIndex=A;const e=C.matcher.exec(n);if(!e)break;const t=_(n.substring(A,e.index),e);A=e.index+t}return _(n.substring(A)),M.closeAllNodes(),M.finalize(),S=M.toHTML(),{language:e,value:S,relevance:I,illegal:!1,_emitter:M,_top:C}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:tt(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:A,context:n.slice(A-100,A+100),mode:t.mode,resultSoFar:S},_emitter:M};if(i)return{language:e,value:tt(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:C};throw t}}function d(e,n){n=n||s.languages||Object.keys(t);const r=function(e){const t={value:tt(e),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return t._emitter.addText(e),t}(e),i=n.filter(g).filter(v).map((t=>c(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(g(e.language).supersetOf===t.language)return 1;if(g(t.language).supersetOf===e.language)return-1}return 0})),[l,u]=o,d=l;return d.secondBest=u,d}function p(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=s.languageDetectRe.exec(t);if(n){const t=g(n[1]);return t||(qe(o.replace("{}",n[1])),qe("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||g(e)))}(e);if(l(r))return;if(y("before:highlightElement",{el:e,language:r}),e.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),s.throwUnescapedHTML)){throw new et("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,a=r?u(i,{language:r,ignoreIllegals:!0}):d(i);e.innerHTML=a.value,function(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,r,a.language),e.result={language:a.language,re:a.relevance,relevance:a.relevance},a.secondBest&&(e.secondBest={language:a.secondBest.language,relevance:a.secondBest.relevance}),y("after:highlightElement",{el:e,result:a,text:i})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(s.cssSelector).forEach(p)}function g(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function m(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function v(e){const t=g(e);return t&&!t.disableAutodetect}function y(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&f()}),!1),Object.assign(e,{highlight:u,highlightAuto:d,highlightAll:f,highlightElement:p,highlightBlock:function(e){return Qe("10.7.0","highlightBlock will be removed entirely in v12.0"),Qe("10.7.0","Please use highlightElement now."),p(e)},configure:function(e){s=nt(s,e)},initHighlighting:()=>{f(),Qe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),Qe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(Ge("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;Ge(e),o=a}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&m(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:g,registerAliases:m,autoDetection:v,inherit:nt,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)}}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString="11.7.0",e.regex={concat:ce,lookahead:se,either:de,optional:ue,anyNumberOfTimes:le};for(const e in Ne)"object"==typeof Ne[e]&&X.exports(Ne[e]);return Object.assign(e,Ne),e}({}),ot=it;it.HighlightJS=it,it.default=it;var at,st=Z(ot);function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(null,arguments)}const ut=e=>S.createElement("svg",lt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),at||(at=S.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 7.001v1H6.5a1.5 1.5 0 0 0-1.5 1.5v9a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-1.5h1v1.5a2.5 2.5 0 0 1-2.5 2.5h-7a2.5 2.5 0 0 1-2.5-2.5v-9a2.5 2.5 0 0 1 2.5-2.5H8Zm8-3h-5.5a1.5 1.5 0 0 0-1.5 1.5v9a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-7.5h-2.5a.5.5 0 0 1-.5-.5v-2.5Zm4 2.528v7.972a2.5 2.5 0 0 1-2.5 2.5h-7a2.5 2.5 0 0 1-2.5-2.5v-9a2.5 2.5 0 0 1 2.5-2.5h5.972a.49.49 0 0 1 .382.146l3 3A.49.49 0 0 1 20 6.53Zm-3-.528h1.293L17 4.708v1.293Zm-5.5 7a.5.5 0 1 1 0-1h2a.5.5 0 1 1 0 1h-2Zm0-2a.5.5 0 1 1 0-1h5a.5.5 0 1 1 0 1h-5Zm0-2a.5.5 0 1 1 0-1h5a.5.5 0 1 1 0 1h-5Z"})));var ct;function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(null,arguments)}const pt=e=>S.createElement("svg",dt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),ct||(ct=S.createElement("path",{fill:"currentColor",d:"M7.146 10.146a.5.5 0 0 1 .638-.057l.07.057 3.792 3.793a.5.5 0 0 0 .638.058l.07-.058 3.792-3.793a.5.5 0 0 1 .765.638l-.057.07-3.793 3.793a1.5 1.5 0 0 1-2.008.102l-.114-.102-3.793-3.793a.5.5 0 0 1 0-.708Z"})));st.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],a=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],s=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),u={begin:t.concat(/\b/,t.either(...s),/\s*\(/),relevance:0,keywords:{built_in:s}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:i,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...a),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(a),literal:r,type:i}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),st.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}));var ht=r.styled(r.Box)((function(e){var t=e.theme;return{background:t.palette.info[400],borderRadius:t.shape.borderRadius,color:t.palette.grey[800],border:"1px solid ".concat(t.palette.grey[300]),overflowX:"hidden",position:"relative",marginBottom:t.spacing(1)}})),ft=r.styled("pre")((function(e){var t=e.theme;return{display:"block",position:"relative",fontFamily:"Menlo-Regular, Courier, monospace",fontSize:13,lineHeight:"17px",borderRadius:t.spacing(.5),margin:0,paddingRight:t.spacing(8)}})),gt=r.styled("code")((function(e){return e.theme,{fontFamily:"Menlo, Courier, monospace",whiteSpace:"pre-wrap",lineHeight:2.7,backgroundColor:"unset",margin:0}})),mt=r.styled(r.Button)((function(e){var t=e.theme;return{position:"absolute",right:t.spacing(.75),top:t.spacing(.5),fontSize:11.5,textTransform:"uppercase",display:"none",backgroundColor:t.palette.info[200]}})),vt=r.styled(r.IconButton)((function(e){var t=e.theme;return{position:"absolute",right:0,top:0,color:t.palette.primary[600],padding:t.spacing(1),alignSelf:"anchor-center"}})),yt=r.styled("pre")((function(e){var t=e.theme;return{padding:t.spacing(.5,.75),"&:hover":{backgroundColor:t.palette.primary[200]},"&:hover .yb-copy-btn":{display:"block"}}})),xt=function(n){var i=n.showCopyButton,o=n.multiBlock,a=n.text,s=n.codeClassName,l=n.preClassName,u=n.lang,c=n.containerClassName,d=n.dataTestId,p=n.enabledExpandCollapse,h=void 0!==p&&p,f=n.collapseHeight,g=void 0===f?120:f,m=n.copyLabel,v=void 0===m?"Copy":m,y=n.showAllLabel,x=void 0===y?"Show All":y,_=n.collapseLabel,b=void 0===_?"Collapse":_,w=n.onCopySuccess,S=r.useTheme(),C=t.useRef(null),T=t.useRef(null),M=t.useState(!h),E=M[0],I=M[1],A=t.useState(!1),D=A[0],k=A[1],O=null!=u?u:"language-plaintext";t.useEffect((function(){st.highlightAll()}),[a]);var R=t.useRef(!1);t.useEffect((function(){var e;R.current?E&&(null==T?void 0:T.current)&&(null===(e=null==T?void 0:T.current)||void 0===e||e.scrollTo({top:0})):R.current=!0}),[E]),t.useLayoutEffect((function(){var e,t;(null==T?void 0:T.current)&&k(h&&Math.round(null!==(t=null===(e=null==T?void 0:T.current)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0)>g)}),[g,h]);var N=function(e){return z(void 0,void 0,void 0,(function(){var t;return H(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(e)];case 1:return n.sent(),null==w||w(),[3,3];case 2:return t=n.sent(),console.error("Failed to copy:",t),[3,3];case 3:return[2]}}))}))};return e.jsxs(ht,F({className:Y(c),"data-testid":d},{children:[e.jsx(r.Collapse,F({in:E,collapsedSize:D?g:void 0},{children:e.jsx("div",F({ref:T},{children:o&&Array.isArray(a)?a.map((function(t,n){return e.jsxs(yt,F({className:l},{children:[e.jsx(gt,F({className:Y(s,O)},{children:t})),i&&e.jsx(mt,F({size:"small",className:"yb-copy-btn",onClick:function(e){var t;t=e,z(void 0,void 0,void 0,(function(){var e,n,r;return H(this,(function(i){switch(i.label){case 0:return(e=null===(r=null===(n=t.currentTarget.previousSibling)||void 0===n?void 0:n.innerText)||void 0===r?void 0:r.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'"))?[4,N(e)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))})),e.stopPropagation()}},{children:v}))]}),"code-line-".concat(n))})):e.jsxs(ft,F({className:l},{children:[e.jsx(gt,F({className:Y(s,O),ref:C},{children:a})),i&&e.jsx(vt,F({onClick:function(e){!function(){var e,t,n=null===(t=null===(e=C.current)||void 0===e?void 0:e.innerText)||void 0===t?void 0:t.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'");n&&N(n)}(),e.stopPropagation()}},{children:e.jsx(ut,{fontSize:"small"})}))]}))}))})),D&&e.jsx(r.Box,F({mt:1,display:"flex",justifyContent:"flex-end"},{children:e.jsxs(r.Box,F({component:"a",style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation(),I(!E)}},{children:[e.jsx(r.Typography,F({variant:"body2",color:"primary"},{children:e.jsx("strong",{children:E?b:x})})),e.jsx(pt,{style:{marginLeft:S.spacing(.5),transition:"transform 0.3s",transform:E?"rotate(180deg)":"rotate(0deg)"}})]}))}))]}))},_t=i.makeStyles((function(e){var t,n;return{searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"},containerClassName:{width:"100%",maxWidth:"100%"},preClassName:{width:"100%",overflowX:"hidden"},codeClassName:{maxWidth:"100%",wordBreak:"break-word",overflowWrap:"anywhere"},refreshBtn:{marginRight:e.spacing(1)},codeBlock:{maxHeight:"85px",overflowY:"auto"},codeBlockSqlView:{maxHeight:"140px",overflowY:"auto"},tableHeaderCell:{position:"relative",borderBottom:"1px solid ".concat(e.palette.grey[300]),"&:first-of-type":{padding:e.spacing(.25,0,1,3),"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)")}},"&:last-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)"),right:e.spacing(2)}},"&:before":{content:'""',position:"absolute",right:0,bottom:0,height:"1px",width:"100%"}},rowTableCell:{},tableContainer:{padding:e.spacing(1,0)},tableRow:{cursor:"pointer","&:hover":{backgroundColor:"#F2F6FF"},'&:hover + tr[data-row-type="query-statement"]':{backgroundColor:"#F2F6FF"},'&:has(+ tr[data-row-type="query-statement"]:hover)':{backgroundColor:"#F2F6FF"}},queryTableRow:{cursor:"pointer","&:hover":{backgroundColor:"#F2F6FF"}},queryTableCell:{padding:e.spacing(1,1),borderBottom:"0px"},queryPreBlock:(t={cursor:"pointer",width:"340px",maxWidth:"340px",backgroundColor:"#F8FBFC !important",textAlign:"left"},t[e.breakpoints.up("lg")]={width:"440px",maxWidth:"440px"},t[e.breakpoints.up("xl")]={width:"540px",maxWidth:"540px"},t),queryPreBlockWeb:(n={cursor:"pointer",width:"620px",maxWidth:"620px",backgroundColor:"#F8FBFC !important",textAlign:"left"},n[e.breakpoints.up("lg")]={width:"840px",maxWidth:"840px"},n[e.breakpoints.up("xl")]={width:"940px",maxWidth:"940px"},n),queryPreBlockFull:{cursor:"pointer",width:"100%",maxWidth:"100%",backgroundColor:"#F8FBFC !important",textAlign:"left"},queryCodeElement:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block"},queryCodeElementWeb:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block"},queryContainerCode:{margin:e.spacing(1,0),width:"100%",maxWidth:"100%"},defaultActions:{textAlign:"right"},overrideExpandBtn:{padding:e.spacing(0,2)},preQueryBlock:{backgroundColor:"#F7FAFC !important"}}})),bt=r.makeStyles({errorContainer:{textAlign:"center",fontSize:"16px",lineHeight:"2em"},sadFace:{width:"40px"},errorText:{fontSize:"13px",fontFamily:"Inter",fontWeight:400}}),wt=function(t){var n=t.type,i=t.uuid,o=t.customErrorMessage,a=bt(),s=e.jsx("span",{}),l=e.jsx("span",{});return"universe"===n&&(s=e.jsx(r.Box,{children:"Seems like universe with UUID ".concat(i," has issues or does not exist.")})),e.jsxs(r.Box,F({className:a.errorContainer},{children:[e.jsx(r.Box,{children:e.jsx("span",{children:"Aww Snap."})}),e.jsx(r.Box,{children:s}),o&&e.jsx(r.Box,{children:e.jsx("span",F({className:a.errorText},{children:o}))}),e.jsx(r.Box,{children:l})]}))},St=r.makeStyles((function(e){return{container:function(t){var n=t.width;return{width:null!=n?n:"170px",alignItems:"center",display:"flex",fontSize:"13px",fontWeight:400,fontFamily:"Inter",color:e.palette.common.lightBlue,fontStyle:"normal"}}}})),Ct=function(t){var n=t.className,i=t.children,o=t.dataTestId,a=St(t);return e.jsx(r.Box,F({className:Y(a.container,n),"data-testid":o},{children:i}))},Tt=function(t){var n=t.label;t.tooltip;var i=U(t,["label","tooltip"]);return e.jsx(r.TextField,F({},i,{label:e.jsx(e.Fragment,{children:n}),variant:"standard"}))},Mt=e=>"checkbox"===e.type,Et=e=>e instanceof Date,It=e=>null==e;const At=e=>"object"==typeof e;var Dt=e=>!It(e)&&!Array.isArray(e)&&At(e)&&!Et(e),kt=e=>Dt(e)&&e.target?Mt(e.target)?e.target.checked:e.target.value:e,Ot=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Rt=e=>Array.isArray(e)?e.filter(Boolean):[],Nt=e=>void 0===e,Lt=(e,t,n)=>{if(!t||!Dt(e))return n;const r=Rt(t.split(/[,[\].]+?/)).reduce(((e,t)=>It(e)?e:e[t]),e);return Nt(r)||r===e?Nt(e[t])?n:e[t]:r};const Pt="blur",Bt="focusout",jt="change",Ft="onBlur",Ut="onChange",zt="onSubmit",Ht="onTouched",Vt="all",Wt="max",Yt="min",Gt="maxLength",qt="minLength",Qt="pattern",Zt="required",Xt="validate",$t=C.default.createContext(null),Kt=()=>C.default.useContext($t),Jt=e=>{const{children:t,...n}=e;return C.default.createElement($t.Provider,{value:n},t)};var en=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Vt&&(t._proxyFormState[i]=!r||Vt),n&&(n[i]=!0),e[i]}});return i},tn=e=>Dt(e)&&!Object.keys(e).length,nn=(e,t,n)=>{const{name:r,...i}=e;return tn(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||Vt)))},rn=e=>Array.isArray(e)?e:[e],on=(e,t,n)=>n&&t?e===t:!e||!t||e===t||rn(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function an(e){const t=C.default.useRef(e);t.current=e,C.default.useEffect((()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var sn=e=>"string"==typeof e,ln=(e,t,n,r)=>sn(e)?(r&&t.watch.add(e),Lt(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Lt(n,e)))):(r&&(t.watchAll=!0),n),un="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function cn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(un&&(e instanceof Blob||e instanceof FileList)||!n&&!Dt(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return Dt(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=cn(e[n]);else t=e}return t}function dn(e){const t=Kt(),{name:n,control:r=t.control,shouldUnregister:i}=e,o=Ot(r._names.array,n),a=function(e){const t=Kt(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e||{},s=C.default.useRef(r);s.current=r,an({disabled:o,subject:n._subjects.watch,callback:e=>{if(on(s.current,e.name,a)){const t=ln(s.current,n._names,e.values||n._formValues);u(Nt(t)?i:cn(t))}}});const[l,u]=C.default.useState(Nt(i)?n._getWatch(r):i);return C.default.useEffect((()=>n._removeUnmounted())),l}({control:r,name:n,defaultValue:Lt(r._formValues,n,Lt(r._defaultValues,n,e.defaultValue)),exact:!0}),s=function(e){const t=Kt(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[a,s]=C.default.useState(n._formState),l=C.default.useRef(!0),u=C.default.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=C.default.useRef(i);return c.current=i,an({disabled:r,callback:C.default.useCallback((e=>l.current&&on(c.current,e.name,o)&&nn(e,u.current)&&s({...n._formState,...e})),[n,o]),subject:n._subjects.state}),C.default.useEffect((()=>{l.current=!0;const e=n._proxyFormState.isDirty&&n._getDirty();return e!==n._formState.isDirty&&n._subjects.state.next({isDirty:e}),n._updateValid(),()=>{l.current=!1}}),[n]),en(a,n,u.current,!1)}({control:r,name:n}),l=C.default.useRef(r.register(n,{...e.rules,value:a}));return C.default.useEffect((()=>{const e=(e,t)=>{const n=Lt(r._fields,e);n&&(n._f.mount=t)};return e(n,!0),()=>{const t=r._options.shouldUnregister||i;(o?t&&!r._stateFlags.action:t)?r.unregister(n):e(n,!1)}}),[n,r,o,i]),{field:{name:n,value:a,onChange:C.default.useCallback((e=>l.current.onChange({target:{value:kt(e),name:n},type:jt})),[n]),onBlur:C.default.useCallback((()=>l.current.onBlur({target:{value:Lt(r._formValues,n),name:n},type:Pt})),[n,r]),ref:e=>{const t=Lt(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Lt(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Lt(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Lt(s.touchedFields,n)},error:{enumerable:!0,get:()=>Lt(s.errors,n)}})}}var pn=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},hn=e=>/^\w*$/.test(e),fn=e=>Rt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function gn(e,t,n){let r=-1;const i=hn(t)?[t]:fn(t),o=i.length,a=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==a){const n=e[t];o=Dt(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const mn=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=Lt(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else Dt(r)&&mn(r,t)}}};var vn=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),yn=(e,t,n)=>{const r=Rt(Lt(e,n));return gn(r,"root",t[n]),gn(e,n,r),e},xn=e=>"boolean"==typeof e,_n=e=>"file"===e.type,bn=e=>"function"==typeof e,wn=e=>sn(e)||C.default.isValidElement(e),Sn=e=>"radio"===e.type,Cn=e=>e instanceof RegExp;const Tn={value:!1,isValid:!1},Mn={value:!0,isValid:!0};var En=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Nt(e[0].attributes.value)?Nt(e[0].value)||""===e[0].value?Mn:{value:e[0].value,isValid:!0}:Mn:Tn}return Tn};const In={isValid:!1,value:null};var An=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),In):In;function Dn(e,t,n="validate"){if(wn(e)||Array.isArray(e)&&e.every(wn)||xn(e)&&!e)return{type:n,message:wn(e)?e:"",ref:t}}var kn=e=>Dt(e)&&!Cn(e)?e:{value:e,message:""},On=async(e,t,n,r,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:u,min:c,max:d,pattern:p,validate:h,name:f,valueAsNumber:g,mount:m,disabled:v}=e._f;if(!m||v)return{};const y=a?a[0]:o,x=e=>{r&&y.reportValidity&&(y.setCustomValidity(xn(e)?"":e||""),y.reportValidity())},_={},b=Sn(o),w=Mt(o),S=b||w,C=(g||_n(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,T=pn.bind(null,f,n,_),M=(e,t,n,r=Gt,i=qt)=>{const a=e?t:n;_[f]={type:e?r:i,message:a,ref:o,...T(e?r:i,a)}};if(i?!Array.isArray(t)||!t.length:s&&(!S&&(C||It(t))||xn(t)&&!t||w&&!En(a).isValid||b&&!An(a).isValid)){const{value:e,message:t}=wn(s)?{value:!!s,message:s}:kn(s);if(e&&(_[f]={type:Zt,message:t,ref:y,...T(Zt,t)},!n))return x(t),_}if(!(C||It(c)&&It(d))){let e,r;const i=kn(d),a=kn(c);if(It(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,u="week"==o.type;sn(i.value)&&t&&(e=l?s(t)>s(i.value):u?t>i.value:n>new Date(i.value)),sn(a.value)&&t&&(r=l?s(t)<s(a.value):u?t<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||(t?+t:t);It(i.value)||(e=n>i.value),It(a.value)||(r=n<a.value)}if((e||r)&&(M(!!e,i.message,a.message,Wt,Yt),!n))return x(_[f].message),_}if((l||u)&&!C&&(sn(t)||i&&Array.isArray(t))){const e=kn(l),r=kn(u),i=!It(e.value)&&t.length>e.value,o=!It(r.value)&&t.length<r.value;if((i||o)&&(M(i,e.message,r.message),!n))return x(_[f].message),_}if(p&&!C&&sn(t)){const{value:e,message:r}=kn(p);if(Cn(e)&&!t.match(e)&&(_[f]={type:Qt,message:r,ref:o,...T(Qt,r)},!n))return x(r),_}if(h)if(bn(h)){const e=Dn(await h(t),y);if(e&&(_[f]={...e,...T(Xt,e.message)},!n))return x(e.message),_}else if(Dt(h)){let e={};for(const r in h){if(!tn(e)&&!n)break;const i=Dn(await h[r](t),y,r);i&&(e={...i,...T(r,i.message)},x(i.message),n&&(_[f]=e))}if(!tn(e)&&(_[f]={ref:y,...e},!n))return _}return x(!0),_},Rn=e=>({isOnSubmit:!e||e===zt,isOnBlur:e===Ft,isOnChange:e===Ut,isOnAll:e===Vt,isOnTouch:e===Ht});function Nn(e){for(const t in e)if(!Nt(e[t]))return!1;return!0}function Ln(e,t){const n=hn(t)?[t]:fn(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Nt(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(o=e);++i<a.length;){const t=a[i];r=r?r[t]:e[t],s===i&&(Dt(r)&&tn(r)||Array.isArray(r)&&Nn(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function Pn(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var Bn=e=>It(e)||!At(e);function jn(e,t){if(Bn(e)||Bn(t))return e===t;if(Et(e)&&Et(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Et(n)&&Et(e)||Dt(n)&&Dt(e)||Array.isArray(n)&&Array.isArray(e)?!jn(n,e):n!==e)return!1}}return!0}var Fn=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Un=e=>"select-multiple"===e.type,zn=e=>Fn(e)&&e.isConnected,Hn=e=>{for(const t in e)if(bn(e[t]))return!0;return!1};function Vn(e,t={}){const n=Array.isArray(e);if(Dt(e)||n)for(const n in e)Array.isArray(e[n])||Dt(e[n])&&!Hn(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Vn(e[n],t[n])):It(e[n])||(t[n]=!0);return t}function Wn(e,t,n){const r=Array.isArray(e);if(Dt(e)||r)for(const r in e)Array.isArray(e[r])||Dt(e[r])&&!Hn(e[r])?Nt(t)||Bn(n[r])?n[r]=Array.isArray(e[r])?Vn(e[r],[]):{...Vn(e[r])}:Wn(e[r],It(t)?{}:t[r],n[r]):jn(e[r],t[r])?delete n[r]:n[r]=!0;return n}var Yn=(e,t)=>Wn(e,t,Vn(t)),Gn=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Nt(e)?e:t?""===e?NaN:e?+e:e:n&&sn(e)?new Date(e):r?r(e):e;function qn(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return _n(t)?t.files:Sn(t)?An(e.refs).value:Un(t)?[...t.selectedOptions].map((({value:e})=>e)):Mt(t)?En(e.refs).value:Gn(Nt(t.value)?e.ref.value:t.value,e)}var Qn=e=>Nt(e)?e:Cn(e)?e.source:Dt(e)?Cn(e.value)?e.value.source:e.value:e;function Zn(e,t,n){const r=Lt(e,n);if(r||hn(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=Lt(t,r),a=Lt(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};i.pop()}return{name:n}}const Xn={mode:zt,reValidateMode:Ut,shouldFocusError:!0};function $n(e={}){let t,n={...Xn,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=cn(n.defaultValues)||{},a=n.shouldUnregister?{}:cn(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={watch:Pn(),array:Pn(),state:Pn()},p=Rn(n.mode),h=Rn(n.reValidateMode),f=n.criteriaMode===Vt,g=async()=>{if(c.isValid){const e=n.resolver?tn((await _()).errors):await b(i,!0);e!==r.isValid&&(r.isValid=e,d.state.next({isValid:e}))}},m=e=>c.isValidating&&e!==r.isValidating&&d.state.next({isValidating:e}),v=(e,t,n,r)=>{const l=Lt(i,e);if(l){const i=Lt(a,e,Nt(n)?Lt(o,e):n);Nt(i)||r&&r.defaultChecked||t?gn(a,e,t?i:qn(l._f)):C(e,i),s.mount&&g()}},y=(e,t,n,i,a)=>{let s=!1,l=!1;const u={name:e};if((!n||i)&&(c.isDirty&&(l=r.isDirty,r.isDirty=u.isDirty=w(),s=l!==u.isDirty),c.dirtyFields)){l=Lt(r.dirtyFields,e);const n=jn(Lt(o,e),t);n?Ln(r.dirtyFields,e):gn(r.dirtyFields,e,!0),u.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=Lt(r.touchedFields,e);t||(gn(r.touchedFields,e,n),u.touchedFields=r.touchedFields,s=s||c.touchedFields&&t!==n)}return s&&a&&d.state.next(u),s?u:{}},x=(n,i,o,a)=>{const s=Lt(r.errors,n),l=c.isValid&&xn(i)&&r.isValid!==i;var p;if(e.delayError&&o?(p=()=>((e,t)=>{gn(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=window.setTimeout(p,e)},t(e.delayError)):(clearTimeout(u),t=null,o?gn(r.errors,n,o):Ln(r.errors,n)),(o?!jn(s,o):s)||!tn(a)||l){const e={...a,...l&&xn(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}m(!1)},_=async e=>await n.resolver(a,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Lt(t,n);e&&gn(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),b=async(e,t,i={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=l.array.has(e.name),u=await On(s,Lt(a,e.name),f,n.shouldUseNativeValidation,o);if(u[e.name]&&(i.valid=!1,t))break;!t&&(Lt(u,e.name)?o?yn(r.errors,u,e.name):gn(r.errors,e.name,u[e.name]):Ln(r.errors,e.name))}o&&await b(o,t,i)}}return i.valid},w=(e,t)=>(e&&t&&gn(a,e,t),!jn(A(),o)),S=(e,t,n)=>ln(e,l,{...s.mount?a:Nt(t)?o:sn(e)?{[e]:t}:t},n),C=(e,t,n={})=>{const r=Lt(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&gn(a,e,Gn(t,n)),o=un&&Fn(n.ref)&&It(t)?"":t,Un(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?Mt(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):_n(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&I(e)},T=(e,t,n)=>{for(const r in t){const o=t[r],a=`${e}.${r}`,s=Lt(i,a);!l.array.has(e)&&Bn(o)&&(!s||s._f)||Et(o)?C(a,o,n):T(a,o,n)}},M=(e,t,n={})=>{const s=Lt(i,e),u=l.array.has(e),p=cn(t);gn(a,e,p),u?(d.array.next({name:e,values:a}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=Yn(o,a),d.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:w(e,p)}))):!s||s._f||It(p)?C(e,p,n):T(e,p,n),vn(e,l)&&d.state.next({}),d.watch.next({name:e})},E=async e=>{const o=e.target;let s=o.name;const u=Lt(i,s),v=()=>o.type?qn(u._f):kt(e);if(u){let o,S;const C=v(),T=e.type===Pt||e.type===Bt,M=!((w=u._f).mount&&(w.required||w.min||w.max||w.maxLength||w.minLength||w.pattern||w.validate)||n.resolver||Lt(r.errors,s)||u._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(T,Lt(r.touchedFields,s),r.isSubmitted,h,p),E=vn(s,l,T);gn(a,s,C),T?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const A=y(s,C,T,!1),D=!tn(A)||E;if(!T&&d.watch.next({name:s,type:e.type}),M)return c.isValid&&g(),D&&d.state.next({name:s,...E?{}:A});if(!T&&E&&d.state.next({}),m(!0),n.resolver){const{errors:e}=await _([s]),t=Zn(r.errors,i,s),n=Zn(e,i,t.name||s);o=n.error,s=n.name,S=tn(e)}else o=(await On(u,Lt(a,s),f,n.shouldUseNativeValidation))[s],o?S=!1:c.isValid&&(S=await b(i,!0));Bn(C)&&v()!==C?m(!1):(u._f.deps&&I(u._f.deps),x(s,S,o,A))}var w},I=async(e,t={})=>{let o,a;const s=rn(e);if(m(!0),n.resolver){const t=await(async e=>{const{errors:t}=await _();if(e)for(const n of e){const e=Lt(t,n);e?gn(r.errors,n,e):Ln(r.errors,n)}else r.errors=t;return t})(Nt(e)?e:s);o=tn(t),a=e?!s.some((e=>Lt(t,e))):o}else e?(a=(await Promise.all(s.map((async e=>{const t=Lt(i,e);return await b(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&g()):a=o=await b(i);return d.state.next({...!sn(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&mn(i,(e=>e&&Lt(r.errors,e)),e?s:l.mount),a},A=e=>{const t={...o,...s.mount?a:{}};return Nt(e)?t:sn(e)?Lt(t,e):e.map((e=>Lt(t,e)))},D=(e,t)=>({invalid:!!Lt((t||r).errors,e),isDirty:!!Lt((t||r).dirtyFields,e),isTouched:!!Lt((t||r).touchedFields,e),error:Lt((t||r).errors,e)}),k=(e,t={})=>{for(const s of e?rn(e):l.mount)l.mount.delete(s),l.array.delete(s),Lt(i,s)&&(t.keepValue||(Ln(i,s),Ln(a,s)),!t.keepError&&Ln(r.errors,s),!t.keepDirty&&Ln(r.dirtyFields,s),!t.keepTouched&&Ln(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&Ln(o,s));d.watch.next({}),d.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},O=(e,t={})=>{let r=Lt(i,e);const u=xn(t.disabled);return gn(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?u&&gn(a,e,t.disabled?void 0:Lt(a,e,qn(r._f))):v(e,!0,t.value),{...u?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:Qn(t.min),max:Qn(t.max),minLength:Qn(t.minLength),maxLength:Qn(t.maxLength),pattern:Qn(t.pattern)}:{},name:e,onChange:E,onBlur:E,ref:a=>{if(a){O(e,t),r=Lt(i,e);const n=Nt(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>Sn(e)||Mt(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;gn(i,e,{_f:{...r._f,...s?{refs:[...l.filter(zn),n,...Array.isArray(Lt(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=Lt(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Ot(l.array,e)||!s.action)&&l.unMount.add(e)}}},R=()=>n.shouldFocusError&&mn(i,(e=>e&&Lt(r.errors,e)),l.mount);return{control:{register:O,unregister:k,getFieldState:D,_executeSchema:_,_focusError:R,_getWatch:S,_getDirty:w,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=Lt(i,e);t&&(t._f.refs?t._f.refs.every((e=>!zn(e))):!zn(t._f.ref))&&k(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,p=!0)=>{if(l&&n){if(s.action=!0,p&&Array.isArray(Lt(i,e))){const t=n(Lt(i,e),l.argA,l.argB);u&&gn(i,e,t)}if(p&&Array.isArray(Lt(r.errors,e))){const t=n(Lt(r.errors,e),l.argA,l.argB);u&&gn(r.errors,e,t),((e,t)=>{!Rt(Lt(e,t)).length&&Ln(e,t)})(r.errors,e)}if(c.touchedFields&&p&&Array.isArray(Lt(r.touchedFields,e))){const t=n(Lt(r.touchedFields,e),l.argA,l.argB);u&&gn(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=Yn(o,a)),d.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else gn(a,e,t)},_getFieldArray:t=>Rt(Lt(s.mount?a:o,t,e.shouldUnregister?Lt(o,t,[]):[])),_subjects:d,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:I,register:O,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let s=!0,l=cn(a);d.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await _();r.errors=e,l=t}else await b(i);tn(r.errors)?(d.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),R())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tn(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>bn(e)?d.watch.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:M,getValues:A,reset:(t,n)=>((t,n={})=>{const u=t||o,p=cn(u),h=t&&!tn(t)?p:o;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)Lt(r.dirtyFields,e)?gn(h,e,Lt(a,e)):M(e,Lt(h,e));else{if(un&&Nt(t))for(const e of l.mount){const t=Lt(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Fn(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?n.keepDefaultValues?cn(o):{}:p,d.array.next({values:h}),d.watch.next({values:h})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!n.keepIsValid,s.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||jn(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?Yn(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(bn(t)?t(a):t,n),resetField:(e,t={})=>{Lt(i,e)&&(Nt(t.defaultValue)?M(e,Lt(o,e)):(M(e,t.defaultValue),gn(o,e,t.defaultValue)),t.keepTouched||Ln(r.touchedFields,e),t.keepDirty||(Ln(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Lt(o,e)):w()),t.keepError||(Ln(r.errors,e),c.isValid&&g()),d.state.next({...r}))},clearErrors:e=>{e?rn(e).forEach((e=>Ln(r.errors,e))):r.errors={},d.state.next({errors:r.errors})},unregister:k,setError:(e,t,n)=>{const o=(Lt(i,e,{_f:{}})._f||{}).ref;gn(r.errors,e,{...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=Lt(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}function Kn(e={}){const t=C.default.useRef(),[n,r]=C.default.useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});t.current||(t.current={...$n(e),formState:n});const i=t.current.control;return i._options=e,an({subject:i._subjects.state,callback:C.default.useCallback((e=>{nn(e,i._proxyFormState,!0)&&(i._formState={...i._formState,...e},r({...i._formState}))}),[i])}),C.default.useEffect((()=>{i._stateFlags.mount||(i._proxyFormState.isValid&&i._updateValid(),i._stateFlags.mount=!0),i._stateFlags.watch&&(i._stateFlags.watch=!1,i._subjects.state.next({})),i._removeUnmounted()})),C.default.useEffect((()=>{n.submitCount&&i._focusError()}),[i,n.submitCount]),t.current.formState=en(n,i),t.current}var Jn,er=function(t){var n,r,i=t.name,o=t.rules,a=t.defaultValue,s=t.control,l=t.shouldUnregister,u=U(t,["name","rules","defaultValue","control","shouldUnregister"]),c=dn({name:i,rules:o,defaultValue:a,control:s,shouldUnregister:l}),d=c.field,p=d.ref,h=U(d,["ref"]),f=c.fieldState;return e.jsx(Tt,F({},h,u,{inputRef:p,error:!!f.error,helperText:null!==(r=null===(n=f.error)||void 0===n?void 0:n.message)&&void 0!==r?r:u.helperText}))};function tr(){return tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tr.apply(null,arguments)}const nr=e=>S.createElement("svg",tr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Jn||(Jn=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 8a1 1 0 0 0-1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0-1-1Zm0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"}))));var rr,ir=r.makeStyles((function(e){return{icon:{width:14,height:14,cursor:"pointer",color:e.palette.grey[500]}}})),or=r.makeStyles((function(e){return{arrow:{"&:before":{backgroundColor:e.palette.grey[900],border:"1px solid ".concat(e.palette.grey[900])}},tooltip:{backgroundColor:e.palette.grey[900],border:"1px solid ".concat(e.palette.grey[900]),color:e.palette.common.white}}})),ar=function(t){var n=t.children,i=t.dark,o=U(t,["children","dark"]),a=ir(),s=or();return e.jsx(r.Tooltip,F({arrow:!0,classes:i?s:void 0,placement:"top-start"},o,{children:null!=n?n:e.jsx(r.Box,F({lineHeight:0,ml:.5},{children:e.jsx(nr,{className:a.icon})}))}))},sr=r.makeStyles((function(e){return{menuPaper:{maxHeight:400,marginTop:"6px"}}})),lr=function(t){var n=t.label,i=t.tooltip,o=t.renderValue,a=t.menuProps,s=t.selectProps,l=void 0===s?{}:s,u=U(t,["label","tooltip","renderValue","menuProps","selectProps"]),c=sr();return e.jsx(r.TextField,F({},u,{label:e.jsxs(e.Fragment,{children:[n," ",i&&e.jsx(ar,{title:i,interactive:!0})]}),select:!0,SelectProps:F({autoWidth:!1,IconComponent:pt,displayEmpty:!0,renderValue:o,MenuProps:F({classes:{paper:c.menuPaper},getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}},a)},l),variant:"standard"}))};function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ur.apply(null,arguments)}const cr=e=>S.createElement("svg",ur({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),rr||(rr=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 12a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 0 1-2 0V8a1 1 0 0 1 1-1Z"}))));var dr;function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pr.apply(null,arguments)}const hr=e=>S.createElement("svg",pr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),dr||(dr=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10S2 17.514 2 12 6.486 2 12 2Zm0 1c-4.963 0-9 4.037-9 9s4.037 9 9 9 9-4.037 9-9-4.037-9-9-9Zm2.713 6.309a.715.715 0 0 1 .979-.193c.325.212.413.642.167.995l-4.68 4.58a.718.718 0 0 1-.527.307L10.59 15a.717.717 0 0 1-.5-.202L8.207 12.95a.683.683 0 0 1 0-.979.717.717 0 0 1 .999 0l1.313 1.287Z"}))));var fr;function gr(){return gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gr.apply(null,arguments)}const mr=e=>S.createElement("svg",gr({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),fr||(fr=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 7a1 1 0 0 1 1 1v5a1 1 0 0 1-2 0v-5a1 1 0 0 1 1-1Zm0-3a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"}))));var vr,yr,xr,_r,br,wr,Sr,Cr,Tr;function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mr.apply(null,arguments)}const Er=e=>S.createElement("svg",Mr({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),vr||(vr=S.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),yr||(yr=S.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),xr||(xr=S.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),_r||(_r=S.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),br||(br=S.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),wr||(wr=S.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),Sr||(Sr=S.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),Cr||(Cr=S.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),Tr||(Tr=S.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var Ir;exports.AlertVariant=void 0,(Ir=exports.AlertVariant||(exports.AlertVariant={})).Info="info",Ir.Warning="warning",Ir.Error="error",Ir.Success="success",Ir.InProgress="inProgress";var Ar=r.makeStyles((function(e){return{root:function(t){var n=t.position;return{padding:e.spacing(1),borderRadius:e.shape.borderRadius,display:"flex",alignItems:"center",marginTop:58*(null!=n?n:0)}},icon:{width:e.spacing(3),height:e.spacing(3),minWidth:e.spacing(3),minHeight:e.spacing(3)},warning:{background:e.palette.info[200]},info:{background:e.palette.info[100]},success:{background:e.palette.success[100]},error:{background:e.palette.error[100]},toastWarning:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.warning[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},toastInfo:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.info[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},toastSuccess:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.success[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},toastError:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.error[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},text:{marginLeft:e.spacing(1),marginRight:"auto"},close:{height:e.spacing(1.5),width:e.spacing(1.5),fill:e.palette.text.primary,marginRight:e.spacing(.5),marginLeft:e.spacing(1.5),cursor:"pointer"},warningIcon:{color:e.palette.warning[700]},infoIcon:{color:e.palette.info[700]},successIcon:{color:e.palette.success[700]},errorIcon:{color:e.palette.error[700]},inProgressIcon:{color:e.palette.success[700]}}})),Dr=function(t){var n=t.open,i=t.text,a=t.autoDismiss,s=t.dataTestId,l=t.onClose,u=t.variant,c=void 0===u?exports.AlertVariant.Info:u,d=t.isToast,p=void 0!==d&&d,h=t.width,f=t.icon,g=t.className,m=t.transitionTimeout,v=U(t,["open","text","autoDismiss","dataTestId","onClose","variant","isToast","width","icon","className","transitionTimeout"]),y=Ar(t),x=void 0===h?"auto":"".concat(h,"px"),_=y.root,b=e.jsx("span",{});switch(c){case exports.AlertVariant.Warning:_=Y(_,y.warning,p&&y.toastWarning),b=e.jsx(cr,{className:Y(y.icon,y.warningIcon)});break;case exports.AlertVariant.Success:_=Y(_,y.success,p&&y.toastSuccess),b=e.jsx(hr,{className:Y(y.icon,y.successIcon)});break;case exports.AlertVariant.Error:_=Y(_,y.error,p&&y.toastError),b=e.jsx(cr,{className:Y(y.icon,y.errorIcon)});break;case exports.AlertVariant.InProgress:_=Y(_,y.info,p&&y.toastInfo),b=e.jsx(Er,{className:Y(y.icon,y.inProgressIcon)});break;case exports.AlertVariant.Info:default:_=Y(_,y.info,p&&y.toastInfo),b=e.jsx(mr,{className:Y(y.icon,y.infoIcon)})}return p?e.jsx(r.Snackbar,F({open:n,autoHideDuration:null!=a?a:6e3,TransitionComponent:r.Fade,anchorOrigin:{vertical:"top",horizontal:"center"},onClose:function(e,t){"clickaway"!==t&&l&&l()}},v,{children:e.jsxs("div",F({"data-test-id":s,className:_,role:"alert","aria-label":"alert ".concat(c),style:{width:x}},{children:[null!=f?f:b,e.jsx("span",F({className:y.text},{children:i})),l&&e.jsx(o.Close,{onClick:l,className:y.close})]}))})):e.jsx(r.Fade,F({in:n,timeout:m},{children:e.jsxs("div",F({className:Y(_,null!=g?g:""),role:"alert","data-testid":s,"aria-label":"alert ".concat(c),style:{width:x}},{children:[null!=f?f:b,e.jsx("span",F({className:y.text},{children:i})),l&&e.jsx(o.Close,{onClick:l,className:y.close})]}))}))},kr=function(t){var n=t.text,i=U(t,["text"]);return e.jsx(r.Box,F({maxWidth:1024,marginRight:"auto"},i,{children:e.jsx(Dr,{open:!0,text:null!=n?n:"Something went wrong. Please try again.",variant:exports.AlertVariant.Error})}))},Or=r.makeStyles((function(e){return{checkboxIcon:{width:16,height:16,margin:"3.14px",boxShadow:"inset 0 0 0 2px ".concat(e.palette.grey[400],", inset 0 -1px 0 ").concat(e.palette.grey[400]),backgroundColor:e.palette.grey[100],"input:hover ~ &":{backgroundColor:e.palette.grey[100]},"input:disabled ~ &":{boxShadow:"inset 0 0 0 2px ".concat(e.palette.grey[200],", inset 0 -1px 0 ").concat(e.palette.grey[200])}},checkboxCheckedIcon:{width:16,height:16,margin:"3.14px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.palette.primary.main,boxShadow:"inset 0 0 0 2px ".concat(e.palette.primary.dark,", inset 0 -1px 0 ").concat(e.palette.primary.dark),color:"#fff",fontSize:"12px",fontWeight:"bold","&::after":{content:'"✓"',fontSize:"12px",fontWeight:"bold"}}}})),Rr=function(t){var n=t.label,i=t.labelClassName,o=t.showCheckedIcon,a=void 0!==o&&o,s=U(t,["label","labelClassName","showCheckedIcon"]),l=Or();return e.jsx(r.FormControlLabel,{control:e.jsx(r.Checkbox,F({color:"primary"},s,{icon:e.jsx("span",{className:l.checkboxIcon}),checkedIcon:a?e.jsx("span",{className:l.checkboxCheckedIcon}):void 0})),label:e.jsx(r.Typography,F({component:"span",variant:"body2"},{children:n})),className:i})};function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Lr(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Pr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Br(e){Pr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Nr(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var jr={};function Fr(){return jr}function Ur(e){if(Pr(1,arguments),!function(e){return Pr(1,arguments),e instanceof Date||"object"===Nr(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=Br(e);return!isNaN(Number(t))}var zr={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function Hr(e,t,n){Pr(2,arguments);var r,i=function(e,t){return Pr(2,arguments),Br(e).getTime()-Br(t).getTime()}(e,t)/36e5;return((r=null==n?void 0:n.roundingMethod)?zr[r]:zr.trunc)(i)}function Vr(e,t){return Pr(2,arguments),function(e,t){Pr(2,arguments);var n=Br(e).getTime(),r=Lr(t);return new Date(n+r)}(e,-Lr(t))}function Wr(e){Pr(1,arguments);var t=Br(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function Yr(e){Pr(1,arguments);var t=Br(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Wr(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Wr(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Gr(e){Pr(1,arguments);var t=Br(e),n=Wr(t).getTime()-function(e){Pr(1,arguments);var t=Yr(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Wr(n)}(t).getTime();return Math.round(n/6048e5)+1}function qr(e,t){var n,r,i,o,a,s,l,u;Pr(1,arguments);var c=Fr(),d=Lr(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Br(e),h=p.getUTCDay(),f=(h<d?7:0)+h-d;return p.setUTCDate(p.getUTCDate()-f),p.setUTCHours(0,0,0,0),p}function Qr(e,t){var n,r,i,o,a,s,l,u;Pr(1,arguments);var c=Br(e),d=c.getUTCFullYear(),p=Fr(),h=Lr(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(d+1,0,h),f.setUTCHours(0,0,0,0);var g=qr(f,t),m=new Date(0);m.setUTCFullYear(d,0,h),m.setUTCHours(0,0,0,0);var v=qr(m,t);return c.getTime()>=g.getTime()?d+1:c.getTime()>=v.getTime()?d:d-1}function Zr(e,t){Pr(1,arguments);var n=Br(e),r=qr(n,t).getTime()-function(e,t){var n,r,i,o,a,s,l,u;Pr(1,arguments);var c=Fr(),d=Lr(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),p=Qr(e,t),h=new Date(0);return h.setUTCFullYear(p,0,d),h.setUTCHours(0,0,0,0),qr(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function Xr(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var $r={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Xr("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Xr(n+1,2)},d:function(e,t){return Xr(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return Xr(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Xr(e.getUTCHours(),t.length)},m:function(e,t){return Xr(e.getUTCMinutes(),t.length)},s:function(e,t){return Xr(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Xr(Math.floor(r*Math.pow(10,n-3)),t.length)}},Kr="midnight",Jr="noon",ei="morning",ti="afternoon",ni="evening",ri="night",ii={G:function(e,t,n){var r=e.getUTCFullYear()>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){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $r.y(e,t)},Y:function(e,t,n,r){var i=Qr(e,r),o=i>0?i:1-i;return"YY"===t?Xr(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Xr(o,t.length)},R:function(e,t){return Xr(Yr(e),t.length)},u:function(e,t){return Xr(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Xr(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){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Xr(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){var r=e.getUTCMonth();switch(t){case"M":case"MM":return $r.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){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Xr(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){var i=Zr(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Xr(i,t.length)},I:function(e,t,n){var r=Gr(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Xr(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){var r=function(e){Pr(1,arguments);var t=Br(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Xr(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();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){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Xr(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Xr(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Xr(i,t.length);case"io":return n.ordinalNumber(i,{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){var r=e.getUTCHours()/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){var r,i=e.getUTCHours();switch(r=12===i?Jr:0===i?Kr:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?ni:i>=12?ti:i>=4?ei:ri,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $r.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Xr(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Xr(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return ai(i);case"XXXX":case"XX":return si(i);default:return si(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return ai(i);case"xxxx":case"xx":return si(i);default:return si(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+oi(i,":");default:return"GMT"+si(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+oi(i,":");default:return"GMT"+si(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return Xr(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return Xr((r._originalDate||e).getTime(),t.length)}};function oi(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+Xr(o,2)}function ai(e,t){return e%60==0?(e>0?"-":"+")+Xr(Math.abs(e)/60,2):si(e,t)}function si(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+Xr(Math.floor(i/60),2)+n+Xr(i%60,2)}var li=ii,ui=function(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"})}},ci=function(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"})}},di={p:ci,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return ui(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",ui(i,t)).replace("{{time}}",ci(o,t))}},pi=di,hi=["D","DD"],fi=["YY","YYYY"];function gi(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var mi={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"}},vi=function(e,t,n){var r,i=mi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yi(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var xi={date:yi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yi({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:yi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bi=function(e,t,n,r){return _i[e]};function wi(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var Si={ordinalNumber:function(e,t){var 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:wi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:wi({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:wi({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:wi({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"})};function Ci(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var Ti,Mi={ordinalNumber:(Ti={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(Ti.matchPattern);if(!n)return null;var r=n[0],i=e.match(Ti.parsePattern);if(!i)return null;var o=Ti.valueCallback?Ti.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:Ci({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:Ci({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:function(e){return e+1}}),month:Ci({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:Ci({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:Ci({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"})},Ei={code:"en-US",formatDistance:vi,formatLong:xi,formatRelative:bi,localize:Si,match:Mi,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ii=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ai=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Di=/^'([^]*?)'?$/,ki=/''/g,Oi=/[a-zA-Z]/;function Ri(e,t,n){var r,i,o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_;Pr(2,arguments);var b=String(t),w=Fr(),S=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:w.locale)&&void 0!==r?r:Ei,C=Lr(null!==(o=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(u=n.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:w.firstWeekContainsDate)&&void 0!==a?a:null===(d=w.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Lr(null!==(h=null!==(f=null!==(g=null!==(m=null==n?void 0:n.weekStartsOn)&&void 0!==m?m:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==g?g:w.weekStartsOn)&&void 0!==f?f:null===(x=w.locale)||void 0===x||null===(_=x.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==h?h:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var M=Br(e);if(!Ur(M))throw new RangeError("Invalid time value");var E=function(e){var 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.getTime()-t.getTime()}(M),I=Vr(M,E),A={firstWeekContainsDate:C,weekStartsOn:T,locale:S,_originalDate:M};return b.match(Ai).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,pi[t])(e,S.formatLong):e})).join("").match(Ii).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(Di);if(!t)return e;return t[1].replace(ki,"'")}(r);var o,a=li[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(o=r,-1===fi.indexOf(o))||gi(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==hi.indexOf(e)}(r)||gi(r,t,String(e)),a(I,r,S.localize,A);if(i.match(Oi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}var Ni={exports:{}},Li={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Li);var Pi=Li.exports,Bi={exports:{}},ji={exports:{}},Fi={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Fi);var Ui=Fi.exports,zi={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default}(zi,zi.exports);var Hi=zi.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(1,arguments),e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===Object.prototype.toString.call(e)};var r=n(Ui),i=n(Hi);e.exports=t.default}(ji,ji.exports);var Vi=ji.exports,Wi={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))};var r=n(Ui),i=n(Hi);e.exports=t.default}(Wi,Wi.exports);var Yi=Wi.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(1,arguments),!(0,r.default)(e)&&"number"!=typeof e)return!1;var t=(0,i.default)(e);return!isNaN(Number(t))};var r=n(Vi),i=n(Yi),o=n(Hi);e.exports=t.default}(Bi,Bi.exports);var Gi=Bi.exports,qi={exports:{}},Qi={exports:{}},Zi={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);if(isNaN(t))return t;return t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default}(Zi,Zi.exports);var Xi=Zi.exports,$i=Z(Xi);!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(e).getTime(),a=(0,r.default)(t);return new Date(n+a)};var r=n(Xi),i=n(Yi),o=n(Hi);e.exports=t.default}(Qi,Qi.exports);var Ki=Qi.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(2,arguments);var n=(0,o.default)(t);return(0,r.default)(e,-n)};var r=n(Ki),i=n(Hi),o=n(Xi);e.exports=t.default}(qi,qi.exports);var Ji=qi.exports,eo={exports:{}},to={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),s=n-a;return Math.floor(s/o)+1};var r=n(Yi),i=n(Hi),o=864e5;e.exports=t.default}(to,to.exports);var no=to.exports,ro={exports:{}},io={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t};var r=n(Yi),i=n(Hi);e.exports=t.default}(io,io.exports);var oo=io.exports,ao={exports:{}},so={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,o.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,o.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var r=n(Yi),i=n(Hi),o=n(oo);e.exports=t.default}(so,so.exports);var lo=so.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,r.default)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,i.default)(n)};var r=n(lo),i=n(oo),o=n(Hi);e.exports=t.default}(ao,ao.exports);var uo=ao.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,r.default)(e),n=(0,i.default)(t).getTime()-(0,o.default)(t).getTime();return Math.round(n/s)+1};var r=n(Yi),i=n(oo),o=n(uo),a=n(Hi),s=6048e5;e.exports=t.default}(ro,ro.exports);var co=ro.exports,po={exports:{}},ho={exports:{}},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.getDefaultOptions=function(){return go},fo.setDefaultOptions=function(e){go=e};var go={};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,s,l,u,c,d,p,h;(0,i.default)(1,arguments);var f=(0,a.getDefaultOptions)(),g=(0,o.default)(null!==(n=null!==(s=null!==(l=null!==(u=null==t?void 0:t.weekStartsOn)&&void 0!==u?u:null==t||null===(c=t.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==l?l:f.weekStartsOn)&&void 0!==s?s:null===(p=f.locale)||void 0===p||null===(h=p.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.default)(e),v=m.getUTCDay(),y=(v<g?7:0)+v-g;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m};var r=n(Yi),i=n(Hi),o=n(Xi),a=fo;e.exports=t.default}(ho,ho.exports);var mo=ho.exports,vo={exports:{}},yo={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,i.default)(1,arguments);var g=(0,r.default)(e),m=g.getUTCFullYear(),v=(0,s.getDefaultOptions)(),y=(0,a.default)(null!==(n=null!==(l=null!==(u=null!==(c=null==t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null==t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==u?u:v.firstWeekContainsDate)&&void 0!==l?l:null===(h=v.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(m+1,0,y),x.setUTCHours(0,0,0,0);var _=(0,o.default)(x,t),b=new Date(0);b.setUTCFullYear(m,0,y),b.setUTCHours(0,0,0,0);var w=(0,o.default)(b,t);return g.getTime()>=_.getTime()?m+1:g.getTime()>=w.getTime()?m:m-1};var r=n(Yi),i=n(Hi),o=n(mo),a=n(Xi),s=fo;e.exports=t.default}(yo,yo.exports);var xo=yo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,i.default)(1,arguments);var g=(0,s.getDefaultOptions)(),m=(0,a.default)(null!==(n=null!==(l=null!==(u=null!==(c=null==t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null==t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==u?u:g.firstWeekContainsDate)&&void 0!==l?l:null===(h=g.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1),v=(0,r.default)(e,t),y=new Date(0);return y.setUTCFullYear(v,0,m),y.setUTCHours(0,0,0,0),(0,o.default)(y,t)};var r=n(xo),i=n(Hi),o=n(mo),a=n(Xi),s=fo;e.exports=t.default}(vo,vo.exports);var _o=vo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,r.default)(e),l=(0,i.default)(n,t).getTime()-(0,o.default)(n,t).getTime();return Math.round(l/s)+1};var r=n(Yi),i=n(mo),o=n(_o),a=n(Hi),s=6048e5;e.exports=t.default}(po,po.exports);var bo=po.exports,wo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e<0?"-":"",r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r},e.exports=t.default}(wo,wo.exports);var So=wo.exports,Co={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(So),i={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,r.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,r.default)(n+1,2)},d:function(e,t){return(0,r.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return(0,r.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,r.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,r.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,r.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return(0,r.default)(o,t.length)}};t.default=i,e.exports=t.default}(Co,Co.exports);var To=Co.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(no),i=n(co),o=n(lo),a=n(bo),s=n(xo),l=n(So),u=n(To),c="midnight",d="noon",p="morning",h="afternoon",f="evening",g="night",m={G:function(e,t,n){var r=e.getUTCFullYear()>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){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,r){var i=(0,s.default)(e,r),o=i>0?i:1-i;if("YY"===t){var a=o%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):(0,l.default)(o,t.length)},R:function(e,t){var n=(0,o.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return(0,l.default)(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){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return(0,l.default)(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){var r=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.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){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return(0,l.default)(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){var i=(0,a.default)(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},I:function(e,t,n){var r=(0,i.default)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):(0,l.default)(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var i=(0,r.default)(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):(0,l.default)(i,t.length)},E:function(e,t,n){var r=e.getUTCDay();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){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return(0,l.default)(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return(0,l.default)(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return(0,l.default)(i,t.length);case"io":return n.ordinalNumber(i,{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){var r=e.getUTCHours()/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){var r,i=e.getUTCHours();switch(r=12===i?d:0===i?c:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?f:i>=12?h:i>=4?p:g,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,l.default)(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,l.default)(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return y(i);case"XXXX":case"XX":return x(i);default:return x(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return y(i);case"xxxx":case"xx":return x(i);default:return x(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+v(i,":");default:return"GMT"+x(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+v(i,":");default:return"GMT"+x(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return(0,l.default)(o,t.length)},T:function(e,t,n,r){var i=(r._originalDate||e).getTime();return(0,l.default)(i,t.length)}};function v(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+(0,l.default)(o,2)}function y(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):x(e,t)}function x(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+(0,l.default)(Math.floor(i/60),2)+n+(0,l.default)(i%60,2)}var _=m;t.default=_,e.exports=t.default}(eo,eo.exports);var Mo=eo.exports,Eo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(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"})}},r=function(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"})}},i={p:r,P:function(e,t){var i,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){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}}",n(a,t)).replace("{{time}}",r(s,t))}},o=i;t.default=o,e.exports=t.default}(Eo,Eo.exports);var Io=Eo.exports,Ao={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var 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.getTime()-t.getTime()},e.exports=t.default}(Ao,Ao.exports);var Do=Ao.exports,ko=Z(Do),Oo={};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.isProtectedDayOfYearToken=function(e){return-1!==Ro.indexOf(e)},Oo.isProtectedWeekYearToken=function(e){return-1!==No.indexOf(e)},Oo.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))};var Ro=["D","DD"],No=["YY","YYYY"];var Lo={exports:{}},Po={exports:{}},Bo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var 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"}},r=function(e,t,r){var i,o=n[e];return i="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};t.default=r,e.exports=t.default}(Bo,Bo.exports);var jo=Bo.exports,Fo={exports:{}},Uo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}},e.exports=t.default}(Uo,Uo.exports);var zo=Uo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(zo),i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({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:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=i,e.exports=t.default}(Fo,Fo.exports);var Ho=Fo.exports,Vo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(e,t,r,i){return n[e]};t.default=r,e.exports=t.default}(Vo,Vo.exports);var Wo=Vo.exports,Yo={exports:{}},Go={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default}(Go,Go.exports);var qo=Go.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(qo),i={ordinalNumber:function(e,t){var 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:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,r.default)({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:(0,r.default)({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:(0,r.default)({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"})};t.default=i,e.exports=t.default}(Yo,Yo.exports);var Qo=Yo.exports,Zo={exports:{}},Xo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}},e.exports=t.default}(Xo,Xo.exports);var $o=Xo.exports,Ko={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(i.length)}}},e.exports=t.default}(Ko,Ko.exports);var Jo=Ko.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n($o),i={ordinalNumber:(0,n(Jo).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,r.default)({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:(0,r.default)({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:function(e){return e+1}}),month:(0,r.default)({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:(0,r.default)({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:(0,r.default)({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"})},o=i;t.default=o,e.exports=t.default}(Zo,Zo.exports);var ea=Zo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(jo),i=n(Ho),o=n(Wo),a=n(Qo),s=n(ea),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:o.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=l,e.exports=t.default}(Po,Po.exports);var ta=Po.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ta).default;t.default=r,e.exports=t.default}(Lo,Lo.exports);var na=Lo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var x,_,b,w,S,C,T,M,E,I,A,D,k,O,R,N,L,P;(0,d.default)(2,arguments);var B=String(t),j=(0,p.getDefaultOptions)(),F=null!==(x=null!==(_=null==n?void 0:n.locale)&&void 0!==_?_:j.locale)&&void 0!==x?x:h.default,U=(0,c.default)(null!==(b=null!==(w=null!==(S=null!==(C=null==n?void 0:n.firstWeekContainsDate)&&void 0!==C?C:null==n||null===(T=n.locale)||void 0===T||null===(M=T.options)||void 0===M?void 0:M.firstWeekContainsDate)&&void 0!==S?S:j.firstWeekContainsDate)&&void 0!==w?w:null===(E=j.locale)||void 0===E||null===(I=E.options)||void 0===I?void 0:I.firstWeekContainsDate)&&void 0!==b?b:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=(0,c.default)(null!==(A=null!==(D=null!==(k=null!==(O=null==n?void 0:n.weekStartsOn)&&void 0!==O?O:null==n||null===(R=n.locale)||void 0===R||null===(N=R.options)||void 0===N?void 0:N.weekStartsOn)&&void 0!==k?k:j.weekStartsOn)&&void 0!==D?D:null===(L=j.locale)||void 0===L||null===(P=L.options)||void 0===P?void 0:P.weekStartsOn)&&void 0!==A?A:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var H=(0,o.default)(e);if(!(0,r.default)(H))throw new RangeError("Invalid time value");var V=(0,l.default)(H),W=(0,i.default)(H,V),Y={firstWeekContainsDate:U,weekStartsOn:z,locale:F,_originalDate:H},G=B.match(g).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,s.default[t])(e,F.formatLong):e})).join("").match(f).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(m);if(!t)return e;return t[1].replace(v,"'")}(r);var o=a.default[i];if(o)return null!=n&&n.useAdditionalWeekYearTokens||!(0,u.isProtectedWeekYearToken)(r)||(0,u.throwProtectedError)(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!(0,u.isProtectedDayOfYearToken)(r)||(0,u.throwProtectedError)(r,t,String(e)),o(W,r,F.localize,Y);if(i.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("");return G};var r=n(Gi),i=n(Ji),o=n(Yi),a=n(Mo),s=n(Io),l=n(Do),u=Oo,c=n(Xi),d=n(Hi),p=fo,h=n(na),f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,v=/''/g,y=/[a-zA-Z]/;e.exports=t.default}(Ni,Ni.exports);var ra=Z(Ni.exports);function ia(e,t,n){var r=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=n.length-1;r>=0;--r)if("timeZoneName"===n[r].type)return n[r].value}(r,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(r,t)}function oa(e,t){var n=function(e){if(!sa[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===t;sa[e]=n?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 sa[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=aa[n[i].type];o>=0&&(r[o]=parseInt(n[i].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(n,e)}var aa={year:0,month:1,day:2,hour:3,minute:4,second:5};var sa={};function la(e,t,n,r,i,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,o,a),s}var ua=36e5,ca={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function da(e,t,n){var r,i,o;if(!e)return 0;if(r=ca.timezoneZ.exec(e))return 0;if(r=ca.timezoneHH.exec(e))return ha(o=parseInt(r[1],10))?-o*ua:NaN;if(r=ca.timezoneHHMM.exec(e)){o=parseInt(r[2],10);var a=parseInt(r[3],10);return ha(o,a)?(i=Math.abs(o)*ua+6e4*a,"+"===r[1]?-i:i):NaN}if(function(e){if(fa[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),fa[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return la(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=pa(s,e),u=n?l:function(e,t,n){var r=e.getTime(),i=r-t,o=pa(new Date(i),n);if(t===o)return t;i-=o-t;var a=pa(new Date(i),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function pa(e,t){var n=oa(e,t),r=la(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),i=e.getTime(),o=i%1e3;return r-(i-=o>=0?o:1e3+o)}function ha(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var fa={};function ga(e,t){var n=e?da(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ma(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function va(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+ma(Math.floor(i/60),2)+n+ma(Math.floor(i%60),2)}function ya(e,t){return e%60==0?(e>0?"-":"+")+ma(Math.abs(e)/60,2):va(e,t)}var xa={X:function(e,t,n,r){var i=ga(r.timeZone,e);if(0===i)return"Z";switch(t){case"X":return ya(i);case"XXXX":case"XX":return va(i);default:return va(i,":")}},x:function(e,t,n,r){var i=ga(r.timeZone,e);switch(t){case"x":return ya(i);case"xxxx":case"xx":return va(i);default:return va(i,":")}},O:function(e,t,n,r){var i=ga(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+ma(o,2)}(i,":");default:return"GMT"+va(i,":")}},z:function(e,t,n,r){switch(t){case"z":case"zz":case"zzz":return ia("short",e,r);default:return ia("long",e,r)}}},_a=36e5,ba=6e4,wa={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 Sa(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},r=null==n.additionalDigits?2:$i(n.additionalDigits);if(2!==r&&1!==r&&0!==r)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("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i=function(e){var t,n={},r=wa.dateTimePattern.exec(e);r?(n.date=r[1],t=r[3]):(r=wa.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e);if(t){var i=wa.timeZone.exec(t);i?(n.time=t.replace(i[1],""),n.timeZone=i[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,r=wa.YYY[t],i=wa.YYYYY[t];if(n=wa.YYYY.exec(e)||i.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=wa.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(i.date,r),a=o.year,s=function(e,t){if(null===t)return null;var n,r,i,o;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=wa.MM.exec(e))return r=new Date(0),Ia(t,i=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(n=wa.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Ea(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(r.setUTCFullYear(t,0,a),r):new Date(NaN)}if(n=wa.MMDD.exec(e)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Ia(t,i,s)?(r.setUTCFullYear(t,i,s),r):new Date(NaN)}if(n=wa.Www.exec(e))return Aa(t,o=parseInt(n[1],10)-1)?Ca(t,o):new Date(NaN);if(n=wa.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Aa(t,o,l)?Ca(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),c=0;if(i.time&&(c=function(e){var t,n,r;if(t=wa.HH.exec(e))return Da(n=parseFloat(t[1].replace(",",".")))?n%24*_a:NaN;if(t=wa.HHMM.exec(e))return Da(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*_a+r*ba:NaN;if(t=wa.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Da(n,r,i)?n%24*_a+r*ba+1e3*i:NaN}return null}(i.time),isNaN(c)))return new Date(NaN);if(i.timeZone||n.timeZone){if(l=da(i.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=ko(new Date(u+c)),l=ko(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function Ca(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Ta=[31,28,31,30,31,30,31,31,30,31,30,31],Ma=[31,29,31,30,31,30,31,31,30,31,30,31];function Ea(e){return e%400==0||e%4==0&&e%100!=0}function Ia(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=Ea(e);if(r&&n>Ma[t])return!1;if(!r&&n>Ta[t])return!1}return!0}function Aa(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function Da(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var ka=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Oa(e,t,n){var r=String(t),i=n||{},o=r.match(ka);if(o){var a=Sa(i.originalDate||e,i);r=o.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],o=e.replace(t,"'"+xa[t[0]](a,t,null,i)+"'");return r?o.substring(0,n-1)+o.substring(n+1):o}),r)}return ra(e,r,i)}function Ra(e,t,n){var r=Sa(e,n),i=da(t,r,!0),o=new Date(r.getTime()-i),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}function Na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var La=Array.isArray,Pa="object"==typeof global&&global&&global.Object===Object&&global,Ba="object"==typeof self&&self&&self.Object===Object&&self,ja=Pa||Ba||Function("return this")(),Fa=ja.Symbol,Ua=Object.prototype,za=Ua.hasOwnProperty,Ha=Ua.toString,Va=Fa?Fa.toStringTag:void 0;var Wa=Object.prototype.toString;var Ya=Fa?Fa.toStringTag:void 0;function Ga(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ya&&Ya in Object(e)?function(e){var t=za.call(e,Va),n=e[Va];try{e[Va]=void 0;var r=!0}catch(e){}var i=Ha.call(e);return r&&(t?e[Va]=n:delete e[Va]),i}(e):function(e){return Wa.call(e)}(e)}function qa(e){return null!=e&&"object"==typeof e}function Qa(e){return"string"==typeof e||!La(e)&&qa(e)&&"[object String]"==Ga(e)}function Za(e){return null!=e}function Xa(e){return La(e)&&0===e.length}function $a(e){return La(e)&&e.length>0}function Ka(e){return Na(e)&&Object.keys(e).length>0}function Ja(e){return Qa(e)&&e.trim().length>0}function es(e){return Qa(e)&&0===e.trim().length}var ts=Za;function ns(e){for(var t=0;t<e.length;t++)if($a(e[t].y))for(var n=0;n<e[t].y.length;n++)if(Number(e[t].y[n])>1e3)return!0;return!1}var rs,is,os="MMM-DD-yyyy HH:mm:ss [UTC]XXX",as="yyyy-MM-dd'T'HH:mm",ss=function(e,t,n){return void 0===t&&(t=os),Ri(n?Ra(new Date(e),n):new Date(e),t)},ls=r.makeStyles((function(e){return{container:{display:"flex",flexWrap:"wrap"},textField:{marginLeft:e.spacing(1),marginRight:e.spacing(1),width:200}}})),us=function(t){var n=t.defaultDateTimeValue,r=t.dateTimeLabel,i=t.value,o=t.errorMsg,a=t.onChange,s=t.className,l=t.disabled,u=void 0!==l&&l,c=t.isReadOnly,d=void 0!==c&&c,p=ls(),h=new Date,f=ss(h,as),g=new Date(h);g.setDate(g.getDate()-30);var m=ss(g,as);return e.jsx("form",F({className:p.container,noValidate:!0},{children:e.jsx(T.default,{id:"datetime-local",label:r,type:"datetime-local",defaultValue:n,value:i,onChange:a,className:Y(p.textField,s),InputLabelProps:{shrink:!0},disabled:u,inputProps:{min:m,max:f},onKeyDown:function(e){d&&e.preventDefault()},error:Ja(o),helperText:o})}))};function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cs.apply(null,arguments)}const ds=e=>S.createElement("svg",cs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),rs||(rs=S.createElement("defs",null,S.createElement("filter",{x:"-1.9%",y:"-2.5%",width:"103.8%",height:"105%",filterUnits:"objectBoundingBox",id:"times_svg__b"},S.createElement("feOffset",{in:"SourceAlpha",result:"shadowOffsetOuter1"}),S.createElement("feGaussianBlur",{stdDeviation:5,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),S.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0",in:"shadowBlurOuter1"})),S.createElement("rect",{id:"times_svg__a",x:0,y:0,width:800,height:600,rx:8}))),is||(is=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M-1088-84H368V940h-1456z",fill:"#0B1117",opacity:.75}),S.createElement("g",{transform:"translate(-760 -20)"},S.createElement("mask",{id:"times_svg__c",fill:"#fff"},S.createElement("use",{xlinkHref:"#times_svg__a"})),S.createElement("use",{fill:"#000",filter:"url(#times_svg__b)",xlinkHref:"#times_svg__a"}),S.createElement("use",{fill:"#FFF",xlinkHref:"#times_svg__a"}),S.createElement("g",{mask:"url(#times_svg__c)"},S.createElement("path",{fill:"#FFF",d:"M0 0h800v64H0z"}),S.createElement("circle",{fill:"#F0F4F7",cx:772,cy:32,r:16}),S.createElement("path",{d:"M760 20h24v24h-24z"}),S.createElement("path",{d:"M777.657 26.343a.5.5 0 0 1 .058.638l-.058.07-4.95 4.949 4.95 4.95a.5.5 0 0 1-.638.765l-.07-.058-4.949-4.95-4.95 4.95a.5.5 0 0 1-.765-.638l.058-.07 4.95-4.949-4.95-4.95a.5.5 0 0 1 .638-.765l.07.058 4.949 4.95 4.95-4.95a.5.5 0 0 1 .707 0Z",fill:"#25323D"}))))));var ps=C.default.forwardRef((function(t,n){return e.jsx(r.Slide,F({direction:"left",ref:n},t))}));ps.displayName="SlideTransition";var hs,fs,gs,ms,vs,ys=r.makeStyles((function(e){return{dialogSm:{width:function(e){var t=e.overrideWidth;return null!=t?t:608},height:function(e){var t=e.overrideHeight;return null!=t?t:400},overflow:"hidden"},dialogMd:{width:function(e){var t=e.overrideWidth;return null!=t?t:800},height:function(e){var t=e.overrideHeight;return null!=t?t:600},overflow:"hidden"},dialogXs:{width:function(e){var t=e.overrideWidth;return null!=t?t:480},height:function(e){var t=e.overrideHeight;return null!=t?t:272},overflow:"hidden"},dialogXl:{width:function(e){var t=e.overrideWidth;return null!=t?t:800},height:function(e){var t=e.overrideHeight;return null!=t?t:800},overflow:"hidden"},form:{display:"flex",flexDirection:"column",margin:0,minHeight:"100%"},sidePanel:{width:736,height:"100%",maxHeight:"100%",margin:"0 0 0 auto",borderRadius:"0 !important",overflowY:"unset"},dialogTitle:{padding:e.spacing(2,1.5,2,2)},dialogTitleXs:{padding:e.spacing(1.5,1.5,1.5,2)},closeBtn:{background:e.palette.grey[100],padding:e.spacing(.5),height:e.spacing(4),borderRadius:"50%",float:"right",margin:"auto 0 auto auto",cursor:"pointer"},actionsInfo:{marginRight:"auto"},title:{display:"flex",alignItems:"center"},dialogTitleSeparator:{borderBottom:"1px solid ".concat(e.palette.grey[200])},modalTitle:{display:"flex",alignItems:"center"},text:{marginLeft:e.spacing(1),whiteSpace:"nowrap"}}})),xs=function(t){var n,i,o=t.title,a=t.titleSeparator,s=t.titleIcon,l=t.actionsInfo,u=t.onClose,c=t.onSubmit,d=t.children,p=t.cancelLabel,h=t.cancelTestId,f=t.submitLabel,g=t.submitTestId,m=t.enableBackdropDismiss,v=t.size,y=t.isSidePanel,x=t.buttonProps,_=t.customTitle,b=t.hideCloseBtn,w=t.customSubmitButton,S=t.submitButtonTooltip,C=t.cancelButtonTooltip,T=t.dialogContentProps,M=void 0===T?{}:T,E=t.formProps;t.gradientTag;var I=U(t,["title","titleSeparator","titleIcon","actionsInfo","onClose","onSubmit","children","cancelLabel","cancelTestId","submitLabel","submitTestId","enableBackdropDismiss","size","isSidePanel","buttonProps","customTitle","hideCloseBtn","customSubmitButton","submitButtonTooltip","cancelButtonTooltip","dialogContentProps","formProps","gradientTag"]),A=ys(t),D=function(){u&&u()},k=function(e){c&&(c(),e.preventDefault())};delete I.overrideHeight,delete I.overrideWidth;var O=A.dialogMd,R=A.dialogTitle,N=!!p||!!f||!!w;switch(v){case"sm":O=A.dialogSm;break;case"xs":O=A.dialogXs,R=A.dialogTitleXs;break;case"xl":O=A.dialogXl;break;default:O=A.dialogMd}R=Y(R,a&&A.dialogTitleSeparator),y&&(O=A.sidePanel,I.TransitionComponent=ps);var L=null!==(n=null==x?void 0:x.primary)&&void 0!==n?n:{},P=null!==(i=null==x?void 0:x.secondary)&&void 0!==i?i:{};I.fullScreen||(I.classes={paper:O},I.fullWidth=!0,I.maxWidth=v);var B;return e.jsx(r.Dialog,F({"aria-labelledby":"form-dialog-title"},I,{onClose:m?D:void 0,disableEnforceFocus:!0},{children:e.jsxs("form",F({className:A.form},E,{children:[_?e.jsx("div",F({className:A.modalTitle},{children:_})):o&&e.jsx(r.DialogTitle,F({id:"form-dialog-title",disableTypography:!0,className:R},{children:e.jsxs(r.Typography,F({className:A.title,variant:"h4"},{children:[s?e.jsxs("div",F({className:A.modalTitle},{children:[s,e.jsx("span",F({className:A.text},{children:o}))]})):e.jsx("div",F({className:A.modalTitle},{children:o})),!b&&e.jsx("span",F({className:A.closeBtn,"data-testid":h?"".concat(h,"Header"):""},{children:e.jsx(ds,{onClick:D})}))]}))})),e.jsx(r.DialogContent,F({},M,{children:d})),N&&e.jsxs(r.DialogActions,{children:[l&&e.jsx("div",F({className:A.actionsInfo},{children:l})),(B=p?e.jsx(Q,F({variant:"secondary",onClick:D},P,{"data-testid":h},{children:p})):void 0,C?e.jsx(ar,F({title:C},{children:e.jsx("span",{children:B})})):B),function(){if(w)return w;var t=f?e.jsx(Q,F({variant:"primary",onClick:k},L,{type:"submit",autoFocus:!0,"data-testid":g},{children:f})):void 0;return S?e.jsx(ar,F({title:S},{children:e.jsx("span",{children:t})})):t}()]})]}))}))},_s=r.makeStyles((function(e){return{ellipsis:{display:"inline-flex",minWidth:e.spacing(2)}}})),bs=function(n){var r=n.pageSize,i=void 0===r?4:r,o=n.onPageSelect,a=n.currentPage,l=n.hasMore,u=t.useState(1),c=u[0],d=u[1],p=_s();return t.useEffect((function(){a&&d(a)}),[a]),e.jsx(s.Pagination,{siblingCount:1,page:c,boundaryCount:1,shape:"rounded",count:i,onChange:function(e,t){d(t),o(t)},"data-testid":"TablePagination",renderItem:function(t){return"next"===t.type&&l?e.jsxs(e.Fragment,{children:[e.jsx(s.PaginationItem,{"aria-label":"Go to end-ellipsis page",color:"standard",shape:"rounded",size:"medium",type:"end-ellipsis",variant:"text",classes:{ellipsis:p.ellipsis}}),e.jsx(s.PaginationItem,F({},t))]}):e.jsx(s.PaginationItem,F({},t))}})},ws=r.makeStyles((function(e){return{root:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:e.spacing(1,3)},dropdownContainer:{display:"flex",alignItems:"center",maxWidth:160},dropdown:{"& .MuiInput-formControl":{border:"0px none"}},dropdownMenu:{"& .MuiMenu-list":{display:"flex",flexDirection:"column"}}}})),Ss=function(n){var i=n.dataPrefetchFn,o=n.page,a=n.onPageChange,s=n.onPageSizeChange,l=n.hasMoreData,u=n.total,c=n.rowsPerPageOptions,d=void 0===c?[10,20,50]:c,p=n.rowsPerPage,h=n.showRecordsPerPage,f=n.recordsPerPageCaption,g=void 0===f?"":f,m=ws(),v=Math.ceil(u/(null!=p?p:d[0])),y=t.useCallback((function(e){e===v&&l&&i(),a(e-1)}),[i,a,l,v]);return t.useEffect((function(){0===o&&p===u&&l&&i()}),[]),e.jsxs(r.Box,F({className:m.root},{children:[h&&e.jsxs(r.Grid,F({item:!0,xs:12,lg:4,className:m.dropdownContainer},{children:[g&&e.jsx(r.Box,F({mr:1,minWidth:"100px"},{children:g})),e.jsx(lr,F({value:p,onChange:function(e){s(e.target.value)},className:m.dropdown,"data-testid":"RowsPerPageSelect",menuProps:{className:m.dropdownMenu,anchorOrigin:{vertical:"top",horizontal:"left"}}},{children:d.map((function(t){return e.jsx(r.MenuItem,F({value:t,"data-testid":"RowsPerPageSelectMenuItem-".concat(t)},{children:t}),t)}))}))]})),e.jsx(r.Box,F({ml:4},{children:e.jsx(bs,{currentPage:o+1,pageSize:v,onPageSelect:y,hasMore:l})}))]}))},Cs=r.makeStyles((function(e){return{header:{minHeight:"42px",marginBottom:"25px"},contentPanel:{margin:0},transparentBody:{padding:0,backgroundColor:"transparent",boxShadow:"none"},body:{position:"relative",boxShadow:"0 0.12em 2px rgba(colors.$YB_DARK_GRAY_2, 0.05), 0 0.5em 10px rgba(colors.$YB_DARK_GRAY_2, 0.07)",border:"none",backgroundColor:"#fff",padding:"20px 25px 25px 25px",borderRadius:"7px",margin:"20px 0 0 auto"}}})),Ts=function(t){var n=t.noBackground,i=t.className,o=t.bodyClassName,a=t.children,s=t.body,l=t.header,u=t.title,c=Cs(),d=Y(c.body,n&&c.transparentBody,o);return e.jsxs(r.Box,F({className:i?c.contentPanel+i:"classes.contentPanel"},{children:[(l||u)&&e.jsxs(r.Box,F({className:c.header},{children:[l," ",u]})),e.jsx(r.Box,F({className:"container"},{children:s&&e.jsxs(r.Box,F({className:d},{children:[s,a]}))}))]}))},Ms=r.makeStyles((function(e){return r.createStyles({root:{"& caption":{padding:0,color:"unset",left:"unset",position:"static",captionSide:"top"},"& .MuiTableSortLabel-root":{maxHeight:e.spacing(3)},"& .expandRow":{"& .MuiTableCell-root":{borderBottom:0},"&:hover":{backgroundColor:e.palette.common.white},"+ tr":{"&:hover":{backgroundColor:e.palette.common.white}}}},noBorderContainer:{"& .MuiPaper-root":{border:0},"& .MuiTableContainer-root":{padding:0,margin:0}},tableContainer:{padding:e.spacing(1,2)},dropdown:{display:"inline-grid"},expandClass:{width:e.spacing(3)},checkboxLabel:{marginRight:0}})})),Es=function(t){var n=Ms();return e.jsxs("div",F({className:n.dropdown},{children:[e.jsx(o.ArrowDropUp,{viewBox:"1 -9 24 24",color:t.active&&"asc"===t.direction?"primary":"disabled"}),e.jsx(o.ArrowDropDown,{viewBox:"1 9 24 24",color:t.active&&"desc"===t.direction?"primary":"disabled"})]}))},Is=function(t){var n=Ms(),r=F({},t);return r.color="primary",e.jsx(Rr,F({label:""},r,{labelClassName:n.checkboxLabel}))},As=function(){var t=Ms();return e.jsx("div",{className:t.expandClass})},Ds=function(t){var n=t.tableTitle,i=t.selectableRows,o=void 0===i?"none":i,a=t.withBorder,s=void 0===a||a,u=t.data,c=t.columns,d=t.options,p=t.className,h=t.dataTestId,f=Ms(),g=null!=d?d:{},m=g.customHeader,v=U(g,["customHeader"]),y=F({selectableRows:o,elevation:0,rowHover:!1,filter:!1,search:!1,download:!1,print:!1,viewColumns:!1,responsive:"standard",setTableProps:function(){return{size:"small"}}},v),x=c.map((function(t){return(null==t?void 0:t.options)&&!t.options.customHeadRender&&(t.options.customHeadRender=function(n,i,o){return function(t,n,i,o){var a=(null==o?void 0:o.setCellHeaderProps)?null==o?void 0:o.setCellHeaderProps(t):{},s=(null==o?void 0:o.customHeadLabelRender)?null==o?void 0:o.customHeadLabelRender(F(F({},t),{colPos:t.index})):t.label;return e.jsxs(r.TableCell,F({onClick:function(){return n(t.index)}},a,{"data-testid":t.name},{children:[!(null==t?void 0:t.hideHeader)&&s,!(null==t?void 0:t.hideHeader)&&!!(null==o?void 0:o.sort)&&e.jsx(r.TableSortLabel,{active:t.name===i.name,IconComponent:function(){return e.jsx(Es,{active:t.name===i.name,direction:i.direction})},direction:t.name===i.name?i.direction:"asc"})]}),t.name)}(n,i,o,t.options)}),t})),_=s?f.root:Y(f.root,f.noBorderContainer);return e.jsx("div",F({className:_,"data-testid":h},{children:e.jsx(r.TableContainer,F({component:r.Paper,className:Y(f.tableContainer,p)},{children:e.jsx(M.default,{title:n,data:u,columns:x,options:y,components:{Checkbox:Is,ExpandButton:As,TableHead:null!=m?m:l.TableHead}})}))}))};exports.NodeState=void 0,(hs=exports.NodeState||(exports.NodeState={})).ToBeAdded="ToBeAdded",hs.Provisioned="Provisioned",hs.SoftwareInstalled="SoftwareInstalled",hs.UpgradeSoftware="UpgradeSoftware",hs.UpdateGFlags="UpdateGFlags",hs.Live="Live",hs.Stopping="Stopping",hs.Starting="Starting",hs.Stopped="Stopped",hs.Unreachable="Unreachable",hs.ToBeRemoved="ToBeRemoved",hs.Removing="Removing",hs.Removed="Removed",hs.Adding="Adding",hs.BeingDecommissioned="BeingDecommissioned",hs.Decommissioned="Decommissioned",exports.MetricMeasure=void 0,(fs=exports.MetricMeasure||(exports.MetricMeasure={})).OVERALL="Overall",fs.OUTLIER="Outlier",fs.OUTLIER_TABLES="Outlier_Tables",fs.OUTLIER_DB="Outlier_Databases",exports.AnomalyCategory=void 0,(gs=exports.AnomalyCategory||(exports.AnomalyCategory={})).SQL="SQL",gs.APP="APP",gs.NODE="NODE",gs.INFRA="INFRA",gs.DB="DB",exports.AnomalyType=void 0,(ms=exports.AnomalyType||(exports.AnomalyType={})).SQL_QUERY_LATENCY_INCREASE="SQL_QUERY_LATENCY_INCREASE",ms.HOT_NODE_READS_WRITES="HOT_NODE_READS_WRITES",ms.HOT_NODE_CPU="HOT_NODE_CPU",ms.HOT_NODE_QUERIES="HOT_NODE_QUERIES",ms.HOT_NODE_DATA="HOT_NODE_DATA",ms.SLOW_DISKS="SLOW_DISKS",exports.WaitEventClassification=void 0,(vs=exports.WaitEventClassification||(exports.WaitEventClassification={})).WAIT_EVENT_COMPONENT="waitEventComponent",vs.WAIT_EVENT_CLASS="waitEventClass",vs.WAIT_EVENT_TYPE="waitEventType",vs.WAIT_EVENT="waitEvent",vs.CLIENT_NODE_IP="clientNodeIp",vs.QUERY_ID="queryId",vs.TABLET_ID="tabletId",vs.DB_ID="dbId";var ks,Os,Rs,Ns={waitEventType:"TYPE",waitEvent:"EVENT"},Ls={NONE:"NONE",TOP:"TOP",BOTTOM:"BOTTOM"},Ps={NONE:"NONE",NODE:"NODE",TABLE:"TABLE",NAMESPACE:"NAMESPACE"},Bs={ALL:"All",SQL:"SQL",CQL:"CQL",BACKGROUND:"Background"},js={AVERAGE:"AVG",MAX:"MAX",MIN:"MIN",SUM:"SUM"};exports.AppName=void 0,(ks=exports.AppName||(exports.AppName={})).YBA="YBA",ks.YBM="YBM",ks.YBD="YBD",ks.WEB="WEB",exports.QueryType=void 0,(Os=exports.QueryType||(exports.QueryType={})).SQL="SQL",Os.CQL="CQL",Os.BACKGROUND="BACKGROUND",exports.GraphType=void 0,(Rs=exports.GraphType||(exports.GraphType={})).SINGLE_SUPPORTING="SINGLE_SUPPORTING",Rs.MULTI_SUPPORTING="MULTI_SUPPORTING",Rs.MAIN_RCA="MAIN_RCA";var Fs,Us,zs,Hs,Vs,Ws,Ys,Gs={waitEventType:"Wait Event Type",waitEvent:"Wait Event"},qs=[exports.WaitEventClassification.WAIT_EVENT_TYPE,exports.WaitEventClassification.WAIT_EVENT];exports.SortDirection=void 0,(Fs=exports.SortDirection||(exports.SortDirection={})).ASC="ASC",Fs.DESC="DESC",exports.PrimaryDashboardViewTabs=void 0,(Us=exports.PrimaryDashboardViewTabs||(exports.PrimaryDashboardViewTabs={})).ANOMALY="Anomaly",Us.QUERY="Query",exports.TPFeatureFlags=void 0,(zs=exports.TPFeatureFlags||(exports.TPFeatureFlags={})).SHOW_QUERY_STATS_TIMESTAMP="showStatsTimestamp",zs.SHOW_CLEANUP_HISTORICAL_DATA="showCleanupHistoricalData",exports.AnomalyDetectionStatusText=void 0,(Hs=exports.AnomalyDetectionStatusText||(exports.AnomalyDetectionStatusText={})).EMPTY="EMPTY",Hs.SCHEDULED="SCHEDULED",Hs.IN_PROGRESS="IN_PROGRESS",Hs.SUCCESS="SUCCESS",Hs.FAILURE="FAILURE",exports.RuntimeConfigType=void 0,(Vs=exports.RuntimeConfigType||(exports.RuntimeConfigType={})).TEXT="TEXT",Vs.INT="INT",Vs.FLOAT="FLOAT",Vs.BOOL="BOOL",Vs.DURATION="DURATION",exports.InsightsTabs=void 0,(Ws=exports.InsightsTabs||(exports.InsightsTabs={})).CLUSTER_LOAD="Cluster Load",Ws.INSIGHTS="Insights",Ws.METRICS="Metrics",exports.ClusterLoadTabs=void 0,(Ys=exports.ClusterLoadTabs||(exports.ClusterLoadTabs={})).ANOMALIES="Anomalies",Ys.QUERIES="Queries";var Qs,Zs={ANOMALIES:"anomalies",QUERIES:"queries",METRICS:"metricsNew",INSIGHTS:"insights",CLUSTER_LOAD:"clusterLoad"};exports.AnomalyTypeFilter=void 0,(Qs=exports.AnomalyTypeFilter||(exports.AnomalyTypeFilter={})).PERF_ANOMALY="PERF_ANOMALY",Qs.INSIGHT="INSIGHT";var Xs="All Regions and Clusters",$s="All",Ks="All Zones and Nodes",Js="ASH",el="Cores",tl="Queries",nl="Inter",rl="# vCPU",il={NODE_AVERAGE:"Selected Nodes Average",ALL:"all",ALL_DATABASES:"All Databases",TOP:"top",PRIMARY:"PRIMARY"},ol="active_session_history_eps_global",al="active_session_history_query_events",sl="active_session_history_eps_client_node",ll="cpu_count",ul=[{value:exports.MetricMeasure.OVERALL,label:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods"},{value:exports.MetricMeasure.OUTLIER_TABLES,label:"Outlier Tables"},{value:exports.MetricMeasure.OUTLIER_DB,label:"Outlier Databases"}],cl=[{value:exports.MetricMeasure.OVERALL,label:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods"}],dl=[{value:Ls.TOP,label:"Top"},{value:Ls.BOTTOM,label:"Bottom"}],pl=[{value:Bs.ALL,label:"All Queries"},{value:Bs.SQL,label:"SQL"},{value:Bs.CQL,label:"CQL"},{value:Bs.BACKGROUND,label:"Background"}],hl=["active_session_history_ysql_client_node","active_session_history_tserver_client_node","query_latency","query_rps","query_rows_avg"],fl=["active_session_history_ycql_client_node","active_session_history_tserver_client_node","cql_query_latency_avg","cql_query_rps"],gl=["active_session_history_eps_client_node"],ml="ysql_connections_per_sec",vl={WAIT_EVENT_COMPONENT:"waitEventComponent",WAIT_EVENT_CLASS:"waitEventClass",WAIT_EVENT_TYPE:"waitEventType",WAIT_EVENT:"waitEvent",CLIENT_NODE_IP:"clientNodeIp",QUERY:"queryId"},yl=[10,20,30,40,50],xl=[exports.AnomalyCategory.SQL,exports.AnomalyCategory.NODE,exports.AnomalyCategory.DB,exports.AnomalyCategory.APP,exports.AnomalyCategory.INFRA],_l="00000000-0000-0000-0000-000000000000",bl={SHOW_CLEANUP_HISTORICAL_DATA:"pa.ui.show_cleanup_historical_data",SHOW_QUERIES_VIEW:"pa.ui.show_queries_view",SHOW_TOPK_METRICS_VIEW:"pa.ui.show_topk_metrics_view"},wl={SQL_QUERY_LATENCY:"Query Latency Increase",SQL_QUERY_LOCK_CONTENTION:"Query Lock Contention",HOT_NODE_CPU:"High CPU Usage",HOT_NODE_DATA:"High data Usage",HOT_NODE_READS_WRITES:"Hot Node read/writes",HOT_NODE_YSQL_QUERIES:"High SQL count",HOT_NODE_CONNECTIONS:"High Node Connections",SQL_QUERY_EXCESSIVE_CATALOG_READS:"Excessive Catalog Reads",HOT_TABLET:"Hot Tablet",LARGE_TABLET:"Large Tablet",SLOW_DISKS:"Slow Disks",UNUSED_INDEX:"Unused Index",RANGE_SHARDING:"Range Sharding",SQL_QUERY_LATENCY_INCREASE:"Query Latency Increase",REDUNDANT_INDEX:"Redundant Index"},Sl="MORE",Cl="View More",Tl={ONE_HOUR:"Last 1 hour",SIX_HOURS:"Last 6 hours",ONE_DAY:"Last 1 day",TWO_DAYS:"Last 2 days",SEVEN_DAYS:"Last 7 days",CUSTOM:"Custom"},Ml={ONE_HOUR:"1h",SIX_HOURS:"6h",ONE_DAY:"1d",TWO_DAYS:"2d",SEVEN_DAYS:"7d",CUSTOM:"Custom"},El=[{label:Tl.ONE_HOUR,value:Ml.ONE_HOUR},{label:Tl.SIX_HOURS,value:Ml.SIX_HOURS},{label:Tl.ONE_DAY,value:Ml.ONE_DAY},{label:Tl.TWO_DAYS,value:Ml.TWO_DAYS},{label:Tl.SEVEN_DAYS,value:Ml.SEVEN_DAYS},{label:Tl.CUSTOM,value:Ml.CUSTOM}],Il=[{label:Tl.CUSTOM,value:"Custom"}],Al={SQL_QUERY_LATENCY_INCREASE:{title:"QUERY",data:{}},SQL_QUERY_LOCK_CONTENTION:{title:"QUERY",data:{}},SQL_QUERY_EXCESSIVE_CATALOG_READS:{title:"QUERY",data:{}},HOT_NODE_CPU:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_READS_WRITES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_YSQL_QUERIES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_CONNECTIONS:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_DATA:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_TABLET:{title:"TABLE",data:{DB_NAME:"dbName",TABLET_ID:"tabletId"}},LARGE_TABLET:{title:"TABLE",data:{DB_NAME:"dbName",TABLET_ID:"tabletId"}},SLOW_DISKS:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},UNUSED_INDEX:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}},RANGE_SHARDING:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}},REDUNDANT_INDEX:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}}},Dl="DATABASE",kl="QUERY TYPE",Ol="Database",Rl="Table",Nl="TABLET ID",Ll="ANOMALY",Pl="REGION/ZONE",Bl=["ysql_ops","ycql_ops","server","per_process","disk_io","tserver","master","master_advanced","lsmdb"],jl=["outlier_tables"],Fl=["outlier_databases"],Ul=[{title:"Outlier Tables",name:"outlier_tables",metrics:["table_read_latency","table_read_rps","table_write_latency","table_write_rps","table_log_latency","table_log_ops_second","table_log_bytes_written","table_write_lock_latency","table_seek_next_prev","table_ops_in_flight","table_write_rejections","table_memory_rejections","table_compaction","table_block_cache_hit_miss","table_rocksdb_blooms_checked_and_useful","table_mem_tracker_db_memtable","ysql_catalog_cache_misses"]}],zl=[{title:"Outlier Databases",name:"outlier_databases",metrics:["table_read_latency","table_read_rps","table_write_latency","table_write_rps","table_log_latency","table_log_ops_second","table_log_bytes_written","table_write_lock_latency","table_seek_next_prev","table_ops_in_flight","table_write_rejections","table_memory_rejections","table_compaction","table_block_cache_hit_miss","table_rocksdb_blooms_checked_and_useful","table_mem_tracker_db_memtable"]}],Hl=[{title:"YSQL",name:"ysql_ops",metrics:["ysql_server_rpc_per_second","ysql_sql_latency","ysql_connections","ysql_connections_per_sec","ysql_server_advanced_rpc_per_second","ysql_sql_advanced_latency","ysql_catalog_cache_misses","ysql_conn_mgr_active_connections"]},{title:"YCQL",name:"ycql_ops",metrics:["cql_server_rpc_per_second","cql_sql_latency","cql_server_rpc_p99","cql_sql_latency_breakdown","cql_yb_local_vs_remote","cql_yb_latency","cql_reactor_latency","tserver_rpc_queue_size_cql","cql_response_sizes","cql_yb_transaction","cql_yb_rpc_connections"]},{title:"Resource",name:"server",metrics:["cpu_usage","memory_usage","disk_iops","disk_usage_percent","disk_used_size_total","disk_volume_usage_percent","disk_volume_used","disk_bytes_per_second_per_node","disk_io_time","disk_io_queue_depth","disk_io_read_latency","disk_io_write_latency","network_packets","network_bytes","network_errors","system_load_over_time","node_clock_skew"]},{title:"Per Process",name:"per_process",metrics:["process_user_cpu_seconds","process_system_cpu_seconds","process_virtual_memory","process_resident_memory","process_proportional_memory","process_io_read","process_io_write","process_open_files"]},{title:"Disk I/O",name:"disk_io",metrics:["disk_iops","disk_usage_percent","disk_used_size_total","disk_volume_usage_percent","disk_volume_used","disk_bytes_per_second_per_node","lsm_rocksdb_flush_size","lsm_rocksdb_compaction","lsm_rocksdb_compaction_time","tserver_log_bytes_read","tserver_log_bytes_written"]},{title:"Tablet Server",name:"tserver",metrics:["tserver_rpcs_per_sec_per_node","tserver_ops_latency","tserver_handler_latency","tserver_threads_running","tserver_threads_started","tserver_uptime_min","tserver_consensus_rpcs_per_sec","tserver_change_config","tserver_remote_bootstraps","tserver_consensus_rpcs_latency","tserver_change_config_latency","tserver_context_switches","tserver_spinlock_server","tserver_log_latency","tserver_log_bytes_written","tserver_log_bytes_read","tserver_log_ops_second","tserver_write_lock_latency","tserver_tc_malloc_stats","tserver_log_stats","tserver_cache_reader_num_ops","tserver_glog_info_messages","tserver_rpc_queue_size_tserver","tserver_cpu_util_secs","tserver_yb_rpc_connections","tserver_live_tablet_peers","raft_leader","tserver_max_follower_lag"]},{title:"Master Server",name:"master",metrics:["master_overall_rpc_rate","master_latency","master_uptime_min","master_get_tablet_location","master_tsservice_reads","master_tsservice_reads_latency","master_tsservice_writes","master_tsservice_writes_latency","master_ts_heartbeats","tserver_rpc_queue_size_master","master_consensus_update","master_consensus_update_latency","master_multiraft_consensus_update","master_multiraft_consensus_update_latency","master_table_ops","master_cpu_util_secs","master_yb_rpc_connections","master_leaderless_and_underreplicated_tablets","master_max_follower_lag","master_load_balancer_stats"]},{title:"Master Server Advanced",name:"master_advanced",metrics:["master_threads_running","master_log_latency","master_log_bytes_written","master_log_bytes_read","master_tc_malloc_stats","master_glog_info_messages","master_lsm_rocksdb_seek_next_prev","master_lsm_rocksdb_num_seeks_per_node","master_lsm_rocksdb_total_sst_per_node","master_lsm_rocksdb_avg_num_sst_per_node","master_lsm_rocksdb_block_cache_hit_miss","master_lsm_rocksdb_block_cache_usage","master_lsm_rocksdb_blooms_checked_and_useful","master_lsm_rocksdb_flush_size","master_lsm_rocksdb_compaction","master_lsm_rocksdb_compaction_numfiles","master_lsm_rocksdb_compaction_time"]},{title:"DocDB",name:"lsmdb",metrics:["lsm_rocksdb_seek_next_prev","lsm_rocksdb_total_sst_per_node","lsm_rocksdb_avg_num_sst_per_node","lsm_rocksdb_latencies_get","lsm_rocksdb_latencies_write","lsm_rocksdb_latencies_seek","lsm_rocksdb_latencies_mutex","lsm_rocksdb_block_cache_hit_miss","lsm_rocksdb_block_cache_usage","lsm_rocksdb_blooms_checked_and_useful","lsm_rocksdb_stalls","lsm_rocksdb_write_rejections","lsm_rocksdb_memory_rejections","lsm_rocksdb_flush_size","lsm_rocksdb_compaction","lsm_rocksdb_compaction_tasks","lsm_rocksdb_compaction_time","lsm_rocksdb_compaction_numfiles","lsm_rocksdb_mem_tracker_db_memtable","docdb_transaction","docdb_transaction_pool_cache","tablet_splitting_stats","automatic_split_manager_time"]}],Vl="gant-chart-anomalies",Wl={ysql_server_rpc_per_second:"Total SQL Ops / Sec",ysql_sql_latency:"SQL Ops & Latency",ysql_connections:"Total SQL Connections",ysql_connections_per_sec:"Total SQL Connections / Sec",ysql_server_advanced_rpc_per_second:"Total YSQL Advanced Ops / Sec",ysql_sql_advanced_latency:"YSQL Advanced Op Latency (Avg)",ysql_catalog_cache_misses:"Catalog Cache Miss Count",ysql_conn_mgr_active_connections:"Connection Pooling - Client Connections",cql_server_rpc_per_second:"Total YCQL Ops / Sec",cql_sql_latency:"YCQL Op Latency (Avg)",cql_server_rpc_p99:"YCQL Op Latency (P99)",cql_sql_latency_breakdown:'YCQL Latency Breakdown"',cql_yb_local_vs_remote:"YBClient Ops Local vs Remote",cql_yb_latency:"YBClient Latency",cql_reactor_latency:"Reactor Delays",tserver_rpc_queue_size_cql:"RPC Queue Size",response_sizes:"Response Size",cql_yb_transaction:"Transaction",cql_yb_rpc_connections:"Inbound RPC Connections Alive",cpu_usage:"CPU Usage",memory_usage:"Memory Usage",disk_iops:"Disk IOPS / Node",disk_usage_percent:"Data Disks Usage Percent",disk_used_size_total:"Data Disks Usage",disk_volume_usage_percent:"Disk Volume Usage Percent",disk_volume_used:"Disk Volume Usage",disk_bytes_per_second_per_node:"Disk Bytes / Node",disk_io_time:"Disk active IO time",disk_io_queue_depth:"Average I/O Queue Depth",disk_io_read_latency:"Disk Read Latency",disk_io_write_latency:"Disk Write Latency",network_packets:"Network Packets / Sec / Node",network_bytes:"Network Bytes / Sec / Node",network_errors:"Network Errors / Sec / Node",system_load_over_time:"System Load Over Time",node_clock_skew:"Clock Skew",process_user_cpu_seconds:"User CPU Seconds",process_system_cpu_seconds:"System CPU Seconds",process_virtual_memory:"Virtual Memory",process_resident_memory:"RSS Memory",process_proportional_memory:"PSS Memory",process_io_read:"IO Read",process_io_write:"IO Write",process_open_files:"Open Files",tserver_rpcs_per_sec_per_node:"Ops / Sec / Node",tserver_ops_latency:"Average Latency",tserver_handler_latency:"Reactor Delays",tserver_threads_running:"Threads Running",tserver_threads_started:'Threads Started"',tserver_uptime_min:"Uptime",tserver_consensus_rpcs_per_sec:"Consensus Ops / Sec",tserver_change_config:"Total Consensus Change Config",tserver_remote_bootstraps:'"Remote Bootstraps',tserver_consensus_rpcs_latency:"Consensus Rpc Latencies",tserver_change_config_latency:"Change Config Latency",tserver_context_switches:"Context Switches",tserver_spinlock_server:"SpinLock Time/Server",tserver_log_latency:"WAL Latency",tserver_log_bytes_written:"WAL Bytes Written / Sec / Node",tserver_log_bytes_read:"WAL Bytes Read / Sec / Node",tserver_log_ops_second:"WAL Ops / Sec / Node",tserver_write_lock_latency:"Write Lock Latency",tserver_tc_malloc_stats:"TCMalloc Stats",tserver_log_stats:"WAL Stats / Node",tserver_cache_reader_num_ops:'WAL Cache Num Ops / Node"',tserver_glog_info_messages:'Glog messages"',tserver_rpc_queue_size_tserver:"RPC Queue Size",tserver_cpu_util_secs:"CPU Util Secs / Sec",tserver_yb_rpc_connections:'Inbound RPC Connections Alive"',tserver_live_tablet_peers:"Live Tablet Peers",raft_leader:"Raft Leader",tserver_max_follower_lag:"Max Follower Lag (ms)",master_overall_rpc_rate:"Overall RPCs / sec",master_latency:"Average Latency",master_uptime_min:"Uptime",master_get_tablet_location:"GetTabletLocations / sec",master_tsservice_reads:"Master TSService Reads / sec",master_tsservice_reads_latency:"Master TS Read Latency",master_tsservice_writes:"Master TSService Writes / sec",master_tsservice_writes_latency:"Master TS Write Latency",master_ts_heartbeats:"TS Heartbeats / sec",tserver_rpc_queue_size_master:"RPC Queue Size",master_consensus_update:"UpdateConsensus / sec",master_consensus_update_latency:"UpdateConsensus Latency",master_multiraft_consensus_update:"MultiRaftUpdateConsensus / sec",master_multiraft_consensus_update_latency:"MultiRaftUpdateConsensus Latency",master_table_ops:"Create/Delete Table RPCs",master_cpu_util_secs:"CPU Util Secs / Sec",master_yb_rpc_connections:"Inbound RPC Connections Alive",master_leaderless_and_underreplicated_tablets:"Leaderless/Underreplicated Tablets",master_max_follower_lag:"Max Follower Lag (ms)",master_load_balancer_stats:"Master load balancer statistics",master_threads_running:"Threads Running",master_log_latency:"WAL Latency",master_log_bytes_written:"WAL Bytes Written / Sec / Node",master_log_bytes_read:"WAL Bytes Read / Sec / Node",master_tc_malloc_stats:"TCMalloc Stats",master_glog_info_messages:"Glog Messages",master_lsm_rocksdb_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec",master_lsm_rocksdb_num_seeks_per_node:"LSM-DB Seeks / Sec / Node",master_lsm_rocksdb_total_sst_per_node:"SSTable size",master_lsm_rocksdb_avg_num_sst_per_node:"Average SSTables",master_lsm_rocksdb_block_cache_hit_miss:"Cache Hit & Miss",master_lsm_rocksdb_block_cache_usage:"Block cache usage",master_lsm_rocksdb_blooms_checked_and_useful:'"LSM-DB Blooms usefulness',master_lsm_rocksdb_flush_size:"Flush write",master_lsm_rocksdb_compaction:"Compaction",master_lsm_rocksdb_compaction_numfiles:"Compaction num files",master_lsm_rocksdb_compaction_time:"Compaction time",lsm_rocksdb_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec / Node",lsm_rocksdb_total_sst_per_node:"SSTable size / Node",lsm_rocksdb_avg_num_sst_per_node:"Average SSTables / Node",lsm_rocksdb_latencies_get:"LSM-DB Get Latencies",lsm_rocksdb_latencies_write:"LSM-DB Write Latencies",lsm_rocksdb_latencies_seek:"LSM-DB Seek Latencies",lsm_rocksdb_latencies_mutex:"LSM-DB Mutex Wait / Sec / Node",lsm_rocksdb_block_cache_hit_miss:"Cache Hit & Miss",lsm_rocksdb_block_cache_usage:"Block cache usage",lsm_rocksdb_blooms_checked_and_useful:"LSM-DB Blooms usefulness",lsm_rocksdb_stalls:"Stalls",lsm_rocksdb_write_rejections:"Write Rejections",lsm_rocksdb_memory_rejections:"Memory Rejections",lsm_rocksdb_flush_size:"Flush write",lsm_rocksdb_compaction:"Compaction",lsm_rocksdb_compaction_tasks:"Compaction tasks",lsm_rocksdb_compaction_time:"Compaction time",lsm_rocksdb_compaction_numfiles:"Compaction num files",lsm_rocksdb_mem_tracker_db_memtable:"Memtable Size",docdb_transaction:"Transaction",docdb_transaction_pool_cache:"Transaction pool cache hits",tablet_splitting_stats:"Tablet Splitting Operations",automatic_split_manager_time:"Tablet Split Manager",table_read_latency:"Read Op Latency (Avg)",table_read_rps:"Read Ops / Sec",table_write_latency:"Write Op Latency (Avg)",table_write_rps:"Write Ops / Sec",table_log_latency:"WAL Latency",table_log_ops_second:"WAL Ops / Sec",table_log_bytes_written:"WAL Bytes Written / Sec",table_write_lock_latency:"Write Lock Latency",table_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec",table_ops_in_flight:"Operations Inflight",table_write_rejections:"Write Rejections",table_memory_rejections:"Memory Pressure Rejections",table_compaction:"Compaction",table_block_cache_hit_miss:"Cache Hit & Miss",table_rocksdb_blooms_checked_and_useful:"LSM-DB Blooms usefulness",table_mem_tracker_db_memtable:"Memtable Size"},Yl="METRICS_NAMES",Gl="METRICS_OUTLIER_TABLES_NAMES",ql="METRICS_OUTLIER_DATABASES_NAMES",Ql=["#8c564b","#4754DB","#2FB3FF","#BB42BC","#20A7C9","#e377c2","#7f7f7f","#bcbd22","#17becf"],Zl={Queries:"#0B1117",Cpu:"#56C188",DiskIO:"#E48B2C",WaitOnCondition:"#B7C3CB",RPCWait:"#966919",Network:"#966919",Client:"#8046EB",IO:"#3884FB",LWLock:"#DA1515",Lock:"#E34F6E",TServerWait:"#e377c2","# vCPU":"#888888",DB:"#7879F1",NODE:"#FFD383",SQL:"#BB42BC",APP:"#2FB3FF",INFRA:"#507CE1",TableRead:"#966919",CatalogRead:"#966919",IndexRead:"#966919",StorageFlush:"#966919",TableWrite:"#966919",CatalogWrite:"#966919",IndexWrite:"#966919",WaitingOnTServer:"#966919",QueryProcessing:"#56C188",yb_ash_metadata:"#DA1515",YBParallelScanEmpty:"#3884FB",CopyCommandStreamRead:"#3884FB",CopyCommandStreamWrite:"#3884FB",YbAshMain:"#0B1117",YbAshCircularBuffer:"#DA1515",QueryDiagnosticsMain:"#0B1117",YbQueryDiagnostics:"#DA1515",YbQueryDiagnosticsCircularBuffer:"#DA1515",YBTxnConflictBackoff:"#B7C3CB",OnCpu_Passive:"#56C188",OnCpu_Active:"#56C188",Idle:"#B7C3CB",Rpc_Done:"#B7C3CB",RetryableRequests_SaveToDisk:"#E48B2C",MVCC_WaitForSafeTime:"#B7C3CB",LockedBatchEntry_Lock:"#E34F6E",BackfillIndex_WaitForAFreeSlot:"#B7C3CB",CreatingNewTablet:"#E48B2C",SaveRaftGroupMetadataToDisk:"#E48B2C",TransactionStatusCache_DoGetCommitData:"#966919",WaitForYSQLBackendsCatalogVersion:"#B7C3CB",WriteSysCatalogSnapshotToDisk:"#E48B2C",DumpRunningRpc_WaitOnReactor:"#B7C3CB",ConflictResolution_ResolveConficts:"#966919",ConflictResolution_WaitOnConflictingTxns:"#B7C3CB",WAL_Append:"#E48B2C",WAL_Sync:"#E48B2C",Raft_WaitingForReplication:"#966919",Raft_ApplyingEdits:"#56C188",ConsensusMeta_Flush:"#E48B2C",ReplicaState_TakeUpdateLock:"#B7C3CB",RocksDB_ReadBlockFromFile:"#E48B2C",RocksDB_OpenFile:"#E48B2C",RocksDB_WriteToFile:"#E48B2C",RocksDB_Flush:"#56C188",RocksDB_Compaction:"#56C188",RocksDB_PriorityThreadPoolTaskPaused:"#B7C3CB",RocksDB_CloseFile:"#E48B2C",RocksDB_RateLimiter:"#B7C3CB",RocksDB_WaitForSubcompaction:"#B7C3CB",RocksDB_NewIterator:"#E48B2C",YCQL_Parse:"#56C188",YCQL_Read:"#56C188",YCQL_Write:"#56C188",YCQL_Analyze:"#56C188",YCQL_Execute:"#56C188",YBClient_WaitingOnDocDB:"#966919",YBClient_LookingUpTablet:"#966919"},Xl={UNIVERSE_PA_STATUS_ERROR:"Universe is not registered to TP, please register to view data",UNIVERSE_DETAILS_ERROR:"Failed to fetch anomalies list, please try again.",ANOMALIES_FETCH_ERROR:"Failed to retrieve anomalies, please try again.",SHOW_MORE_ANOMALIES_FETCH_ERROR:"Failed to retrieve additional anomalies, please try again.",ANOMALY_SCHEDULE_ERROR:"Failed to schedule anomaly detection, please try again.",RUNTIME_CONFIGS_ERROR:"Failed to fetch runtime configs, please try again.",RCA_GRAPHS_FETCH_ERROR:"Failed to fetch anomaly RCA graphs, please try again.",GANTCHART_FETCH_ERROR:"Failed to fetch anomaly Gantt chart, please try again.",QUERIES_GRAPHS_FETCH_ERROR:"Failed to fetch query supporting graphs, please try again.",METRICS_GRAPHS_FETCH_ERROR:"Failed to fetch metrics graphs, please try again.",HISTORICAL_QUERY_DATA_FETCH_ERROR:"Failed to fetch historical query data, please try again.",CLUSTER_LOAD_FETCH_ERROR:"Failed to fetch cluster load data, please try again.",QUERY_STATS_FETCH_ERROR:"Failed to fetch query stats, please try again."},$l=function(t,n,r,i){if(0!==r){return function(r,o,a,s,l){return e.jsx(Ss,{total:r,page:o,rowsPerPage:a,onPageSizeChange:s,dataPrefetchFn:t,rowsPerPageOptions:yl,showRecordsPerPage:!0,recordsPerPageCaption:e.jsx("span",{children:n}),onPageChange:l,hasMoreData:i})}}},Kl=i.makeStyles((function(e){return{recommendation:{background:e.palette.common.white,border:"1px solid ".concat(e.palette.grey[300]),borderRadius:e.shape.borderRadius,padding:e.spacing(2,2.5),position:"relative",marginBottom:e.spacing(3)},disabled:{cursor:"not-allowed",color:"#999999"},tagGreen:{color:"#206263"},flexRow:{display:"flex",flexDirection:"row"},flexColumn:{display:"flex",flexDirection:"column"},inProgressIcon:{color:"#1A44A5"},icon:{height:"40px",width:"40px"},loadingBox:{display:"flex",justifyContent:"center"},tabGroup:{display:"flex",flexDirection:"column",gap:"16px",paddingLeft:"1px"},tabButton:{padding:"12px 16px",minWidth:"130px",height:"40px",boxSizing:"border-box",borderRadius:"8px"},selectedTab:{margin:"0 -1px",backgroundColor:"#F7F7F7",border:"1px solid #C8C8C8"},tabPanel:{padding:"32px"},noTabBorder:{borderBottom:"unset"},tabBox:{marginTop:e.spacing(3),border:"1px solid ".concat(e.palette.grey[300]),borderRadius:"8px"},metricsBox:{backgroundColor:"#FFFFFF",border:"1px solid ".concat(e.palette.grey[300]),borderRadius:"8px",padding:"0px 16px 16px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiMenu-list":{maxHeight:"400px"}},regularText:{fontWeight:400,fontSize:"13px"},detectionButton:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},floatRight:{float:"right"},restrictLines:{display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,maxHeight:"4.5em",lineHeight:"1.5em"},searchInput:{minWidth:"220px",maxWidth:"350px",marginLeft:e.spacing(2),flexGrow:1,marginRight:"auto",height:"36px"},selectBox:{width:"180px",height:"36px"},mainGraphBox:{border:"1px solid #D7DEE4",borderRadius:"8px",padding:e.spacing(2),display:"flex",flexDirection:"column"},mainGraphMetadataBox:{display:"flex",width:"100%",justifyContent:"flex-start"},anomalyMetadataOneBox:{flexBasis:"70%",textAlign:"left",padding:"16px 16px 16px 0",display:"flex",flexDirection:"column"},anomalyMetadataTwoBox:{flexBasis:"40%",padding:e.spacing(2),textAlign:"left",display:"flex",flexDirection:"column"},headerTitle:{fontWeight:500,fontSize:"11.5px",fontFamily:"Inter",color:"#6D7C88"},metadataDetails:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#4E5F6D",marginTop:e.spacing(1),marginBottom:e.spacing(1)},regularMetadata:{fontWeight:400,fontSize:"13px",color:"#0B1117"},boxContainer:{border:"1px solid #E9EEF2",borderRadius:"8px"},headerMetadataBox:{padding:e.spacing(2),backgroundColor:"#F0F4F7",gap:"16px"},causesBox:{border:"1px solid #E9EEF2",backgroundColor:"#FFFFFF",borderRadius:"8px",padding:"16px 16px 16px 16px",margin:"16px 8px 8px 8px"},causeTabButton:{minWidth:"fit-content",marginRight:e.spacing(1),"&:hover":{boxShadow:"none",borderRadius:e.shape.borderRadius},"& .MuiTab-root":{padding:"6px 0px !important",maxWidth:"264px"},"& .Mui-selected":{background:e.palette.grey[300],borderRadius:e.spacing(1)},"& .MuiTab-wrapper":{alignItems:"center"},"& .MuiTabs-indicator":{}},causeTabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},causeText:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#000000"},descriptionText:{fontFamily:"Inter",color:"#000000",fontSize:"13px",fontWeight:400,marginTop:e.spacing(1),marginBottom:e.spacing(1),marginLeft:e.spacing(1)},tag:{borderRadius:"4px",backgroundColor:"#E9EEF2",padding:"2px 6px 4px 6px",width:"fit-content"},tagName:{fontFamily:"Inter",fontSize:"11.5px",fontWeight:400,color:"#4E5F6D",borderRadius:"8px"},metadataName:{fontFamily:"Inter",fontSize:"13px",fontWeight:400},breadCrumb:{marginLeft:e.spacing(2),position:"relative","& .MuiSvgIcon-root":{fontSize:e.spacing(4)}},breadCrumbText:{fontWeight:600,fontStyle:"semibold",fontSize:"15px"},breadcrumbColor:{color:"#2B59C3"},breadcrumbDefaultColor:{color:"#0B1117"},anomalyCategoryText:{color:"#0B1117",fontWeight:600},dateTimePicker:{"& .MuiFormControl-root":{height:"32px !important"},height:"32px !important"},panelItemBody:{padding:"16px 16px 16px 0"},rcaGantChartBox:{width:"95%",padding:"16px 48px 16px 40px",marginLeft:"16px",borderRadius:"8px",border:"1px solid #D7DEE4"},tabPanelPrimary:{padding:"0px !important"},overrideMuiTableContainer:{marginTop:e.spacing(3),"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTableContainerWeb:{marginTop:e.spacing(3),"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTable:{marginTop:e.spacing(2),textAlign:"center","& .MuiTableCell-sizeSmall":{textAlign:"center"},"& .MuiSelect-select":{fontSize:"13px"}},tableBorder:{borderRight:"1px solid #ccc"},tableHeaderCell:{position:"relative",borderBottom:"1px solid ".concat(e.palette.grey[300]),"&:first-of-type":{padding:e.spacing(.25,0,1,3),"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)")}},"&:last-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)"),right:e.spacing(2)}},"&:before":{content:'""',position:"absolute",right:0,bottom:0,height:"1px",width:"100%"}},overrideMuiSelect:{width:"210px",height:"36px"},label:{fontFamily:"Inter, sans-serif",fontStyle:"normal",fontSize:"13px"},tooltip:{maxWidth:"400px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden",whiteSpace:"normal",padding:e.spacing(1)},gridBox:{display:"grid",gap:"16px",width:"100%",gridAutoFlow:"row"},gridBoxDouble:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},gridBoxSingle:{gridTemplateColumns:"repeat(1, minmax(0, 1fr))"},gridBoxThree:{gridTemplateColumns:"repeat(3, minmax(0, 1fr))"},dataBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF"},headerContainer:{border:"1px solid #E9EEF2",backgroundColor:"#FFFFFF",borderRadius:"8px",padding:"24px 16px 16px 16px"},anomalyTypeTag:{height:"24px",backgroundColor:"#E8E9FE",borderRadius:"6px",padding:"4px 6px 4px 6px"},anomalyTypeText:{color:"#30307F",fontFamily:"Inter",fontSize:"11.5px",fontWeight:400,verticalAlign:"super"},stickyHeader:{position:"sticky",top:0,zIndex:1100,backgroundColor:"#fff"},infoIcon:{marginLeft:e.spacing(.5)}}})),Jl=function(t){var n=t.rowData,r=t.appName,i=t.onSelectedQuery,o=t.onClose;Kl();var a=n.databaseId,s=n.queryId,l=n.universeId,u=n.queryType,c=u===exports.QueryType.SQL||u===exports.QueryType.BACKGROUND;return e.jsxs(e.Fragment,{children:[r===exports.AppName.YBM&&function(){o();var e=null,t=new URLSearchParams(window.location.search);t.set("type",u),t.set("queryId",s),t.set("universeId",l),c?(e={queryId:s,dbId:null==a?void 0:a.toString(),universeId:l,type:u},t.set("dbId",e.dbId)):e={queryId:s,universeId:l,type:u},null==i||i(s.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(t.toString()))}(),(r===exports.AppName.WEB||r===exports.AppName.YBA)&&function(e,t,n){o();var i=window.location.pathname,a=new URLSearchParams(window.location.search);a.set("universeId",n),a.set("type",u),c&&a.set("dbId",t),r===exports.AppName.YBA&&a.set("queryId",s);var l=a.toString(),d="".concat(i,"/").concat(e).concat(l?"?".concat(l):"");window.open(d,"_blank")}(s,null==a?void 0:a.toString(),l)]})},eu=C.default.memo((function(n){var i=n.appName;n.currentTablePage;var o=n.displayedRows,a=n.classes,s=n.showQuery,l=n.tableColumns,u=n.ignoredColumns;n.startTime,n.endTime;var c=n.onSelectedQuery,d=n.expandedRowIndex,p=n.handleExpandedRowIndex,h=n.dataIndex,f=n.data,g=l.filter((function(e){return!u.includes(e.name)})).length>0;return e.jsxs(t.Fragment,{children:[e.jsx(r.TableRow,F({className:a.tableRow,onClick:function(e){p(d!==h?h:null)}},{children:g&&f.map((function(t,n){return void 0!==t?e.jsx(r.TableCell,F({className:s?a.rowTableCell:"",style:{overflow:"visible",position:"relative",paddingTop:8,paddingBottom:8}},{children:t}),"TableHelper-row-".concat(h,"-body-cell-").concat(n)):null}))}),"TableHelper-queries-row-".concat(String(f[0]))),d===h&&e.jsx(Jl,{appName:i,rowData:o[h],onSelectedQuery:c,onClose:function(){return p(null)}})]})})),tu=function(t,n,r,i,o,a,s,l,u,c,d,p){return function(h,f){return e.jsx(eu,{appName:t,currentTablePage:n,displayedRows:r,classes:i,showQuery:o,tableColumns:a,ignoredColumns:s,startTime:l,endTime:u,onSelectedQuery:p,expandedRowIndex:c,handleExpandedRowIndex:d,dataIndex:f,data:h})}},nu=r.makeStyles((function(e){return{root:{width:38,height:20,padding:0,display:"flex"},switchBase:{padding:e.spacing(.5),color:e.palette.common.white,"&$checked":{transform:"translateX(17px)",color:e.palette.common.white,"& + $track":{opacity:1,backgroundColor:e.palette.primary.main,borderColor:e.palette.primary.main}}},thumb:{width:12,height:12,boxShadow:"none",color:e.palette.common.white},track:{border:"1px solid ".concat(e.palette.grey[400]),borderRadius:11,opacity:1,backgroundColor:e.palette.grey[400],"&$disabled":{backgroundColor:e.palette.common.white}},checked:{}}})),ru=r.makeStyles((function(e){return{root:{marginLeft:0,marginRight:0,"&.Mui-disabled":{"& .MuiSwitch-track":{backgroundColor:"".concat(e.palette.grey[300]," !important"),borderColor:"".concat(e.palette.grey[200]," !important"),opacity:1}}},label:F(F({},e.typography.body2),{marginLeft:e.spacing(1)}),labelPlacementStart:{"& .MuiFormControlLabel-label":{marginLeft:0,marginRight:e.spacing(1)}}}})),iu=function(t){var n=t.label,i=t.formControlLabelProps,o=U(t,["label","formControlLabelProps"]),a=nu(),s=ru();return e.jsx(r.FormControlLabel,F({control:e.jsx(r.Switch,F({color:o.disabled?"default":"primary",classes:a},o)),labelPlacement:"end",label:n,classes:s},i))},ou=function(t){var n=t.name,r=t.rules,i=t.defaultValue,o=t.control,a=t.shouldUnregister,s=U(t,["name","rules","defaultValue","control","shouldUnregister"]),l=dn({name:n,rules:r,defaultValue:i,control:o,shouldUnregister:a}).field;l.ref;var u=l.value,c=U(l,["ref","value"]);return e.jsx(iu,F({},c,{inputProps:{"data-testid":"YBToggleField-".concat(n)}},s,{checked:!!u}))},au=i.makeStyles((function(e){return{icon:{marginRight:e.spacing(1),width:"13px"},metricMeasureButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF",fontSize:"13px !important"},borderOverallButton:{borderRadius:"8px 0px 0px 8px"},borderOutlierButton:{borderRadius:"0px 8px 8px 0px"}}})),su=function(n){var i,o,a,s,l,u,c,d,p,h,f=n.metricSplitSelectors,g=n.onSplitTypeSelected,m=n.anomalyData,v=au(),y=0;(null===(o=null===(i=null==m?void 0:m.lastInstance)||void 0===i?void 0:i.defaultSettings)||void 0===o?void 0:o.splitMode)===Ls.NONE&&(null===(s=null===(a=null==m?void 0:m.lastInstance)||void 0===a?void 0:a.defaultSettings)||void 0===s?void 0:s.splitType)===Ps.NONE&&(y=0),(null===(u=null===(l=null==m?void 0:m.lastInstance)||void 0===l?void 0:l.defaultSettings)||void 0===u?void 0:u.splitMode)!==Ls.TOP&&(null===(d=null===(c=null==m?void 0:m.lastInstance)||void 0===c?void 0:c.defaultSettings)||void 0===d?void 0:d.splitMode)!==Ls.BOTTOM||(y=(null===(h=null===(p=null==m?void 0:m.lastInstance)||void 0===p?void 0:p.defaultSettings)||void 0===h?void 0:h.splitType)===Ps.NODE?1:2);var x=t.useState(y),_=x[0],b=x[1];return e.jsx(r.Box,F({display:"flex",flexDirection:"row"},{children:e.jsx(r.Box,{children:f.map((function(t,n){var r,i=_===n;return e.jsx(Q,F({className:Y(v.metricMeasureButton,i&&v.overrideMuiButton,(r={},r[v.borderOverallButton]=0===n,r[v.borderOutlierButton]=n===f.length-1,r)),"data-testid":"MetricTypeSelector-MetricMeasureButton-".concat(n),onClick:function(){g(t.value),b(n)},size:"medium",variant:"secondary"},{children:t.label}))}))})}))},lu=i.makeStyles((function(e){return{icon:{marginRight:e.spacing(1)},outlierSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderOverallButton:{borderRadius:"8px 0px 0px 8px"},borderOutlierButton:{borderRadius:"0px 8px 8px 0px"},input:{width:"60px",height:"32px"}}})),uu=function(n){var i=n.metricOutlierSelectors,o=n.selectedNumNodes,a=n.outlierType,s=n.onOutlierTypeSelected,l=n.onNumNodesChanged,u=lu(),c=a===Ls.TOP?0:1,d=t.useState(c),p=d[0],h=d[1];return e.jsxs(r.Box,F({ml:2,display:"flex",flexDirection:"row"},{children:[e.jsx(r.Box,{children:e.jsx("img",{className:u.icon,src:"data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",alt:"Indicator towards metric measure to use"})}),e.jsx(r.Box,{children:i.map((function(t,n){var r,i=p===n;return e.jsx(e.Fragment,{children:e.jsx(Q,F({className:Y(u.outlierSelectorButton,i&&u.overrideMuiButton,(r={},r[u.borderOverallButton]=0===n,r[u.borderOutlierButton]=1===n,r)),"data-testid":"OutlierSelector-OutlierButton-".concat(n),onClick:function(){s(t.value),h(n)},size:"medium",variant:"secondary"},{children:t.label}))})}))}),e.jsx(r.Box,F({ml:2},{children:e.jsx(Tt,{type:"number",className:u.input,inputProps:{min:1,"data-testid":"OutlierSelector-NodesInput"},value:o,onChange:function(e){return l(e.target.value)},inputMode:"numeric"})}))]}))},cu="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.0911 7.70567H3V4.60325C3 4.31623 2.82388 4 2.37381 4C1.92374 4 1.74762 4.31623 1.74762 4.60325V8.78291H13.0911L10.8545 11.0805C10.6362 11.2909 10.6362 11.6319 10.8545 11.8422C11.0729 12.0526 11.4269 12.0526 11.6452 11.8422L14.8362 8.62515C15.0546 8.41481 15.0546 8.07377 14.8362 7.86343L11.6452 4.60325C11.4269 4.39291 11.0729 4.39291 10.8545 4.60325C10.6362 4.81359 10.6362 5.15463 10.8545 5.36497L13.0911 7.70567Z' fill='%23232329' fill-opacity='0.4'/%3e%3c/svg%3e",du=i.makeStyles((function(e){return{selectBox:{minWidth:"250px"},boldText:{fontWeight:500},regularText:{fontWeight:300},menuItem:{display:"block",padding:"15px 20px",height:"52px",whiteSpace:"nowrap",fontSize:"13px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiInput-root":{borderRadius:"0px 8px 8px 0px",height:"32px !important"},"& .MuiMenu-list":{maxHeight:"400px"}},icon:{marginRight:e.spacing(1)}}})),pu="All Zones and Nodes",hu=function(t){var n=t.selectedItem,i=t.primaryZoneToNodesMap,o=t.asyncZoneToNodesMap,a=t.onZoneNodeSelected,s=du();return e.jsx(lr,F({className:Y(s.selectBox,s.overrideMuiInput),"data-testid":"zone-node-select",value:n},{children:function(t,n){var i=[];i.push(e.jsx(r.MenuItem,F({value:pu,onClick:function(e){a(!1,!1,pu)},className:Y(s.menuItem,s.regularText)},{children:pu}),pu)),i.push(e.jsx(r.Divider,{}));for(var o=t.values(),l=o.next(),u=function(){var t=l.value,n=t.zoneName,u=t.nodeNames;n&&i.push(e.jsx(r.MenuItem,F({value:n,onClick:function(e){a(!0,!1,n)},className:Y(s.menuItem,s.boldText)},{children:n}),n)),$a(u)&&u.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))})),l=o.next()};Ka(l.value);)u();if((null==n?void 0:n.size)>0){i.push(e.jsx(r.Divider,{}));for(var c=n.values(),d=c.next(),p=function(){var t=d.value,n=t.zoneName,o=t.nodeNames;n&&i.push(e.jsx(r.MenuItem,F({value:n,onClick:function(e){a(!0,!1,n)},className:Y(s.menuItem,s.boldText)},{children:n}),n)),$a(o)&&o.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))})),d=c.next()};Ka(d.value);)p()}return i}(i,o)}))},fu=i.makeStyles((function(e){return{selectBox:{minWidth:"250px"},boldText:{fontWeight:500},regularText:{fontWeight:300},menuItem:{display:"block",padding:"15px 20px",height:"52px",whiteSpace:"nowrap",fontSize:"13px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiInput-root":{borderRadius:"8px 0px 0px 8px",height:"32px !important"}},icon:{marginRight:e.spacing(1)}}})),gu=function(t){var n=t.selectedItem,i=t.primaryClusterToRegionMap,o=t.asyncClusterToRegionMap,a=t.onClusterRegionSelected,s=fu();return e.jsx(lr,F({className:Y(s.selectBox,s.overrideMuiInput),"data-testid":"cluster-region-select",value:n},{children:i.size>0&&function(t,n){var i=[];i.push(e.jsx(r.MenuItem,F({value:Xs,onClick:function(e){a(!1,!1,Xs,!1)},className:Y(s.menuItem,s.regularText)},{children:Xs}),Xs)),i.push(e.jsx(r.Divider,{}));var o=t.values().next().value,l=o.cluster,u=o.regions,c=o.uuid;if(Ja(l)&&i.push(e.jsx(r.MenuItem,F({value:c,onClick:function(e){a(!0,!1,c,!0)},className:Y(s.menuItem,s.boldText)},{children:l}),c)),$a(u)&&u.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t,!0)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))})),(null==n?void 0:n.size)>0){i.push(e.jsx(r.Divider,{}));var d=n.values().next().value,p=d.cluster,h=d.regions,f=d.uuid;Ja(p)&&i.push(e.jsx(r.MenuItem,F({value:f,onClick:function(e){a(!0,!1,f,!0)},className:Y(s.menuItem,s.boldText)},{children:p}),f)),$a(h)&&h.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t,!0)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))}))}return i}(i,o)}))},mu=function(t){var n=t.name,r=t.rules,i=t.defaultValue,o=t.control,a=t.shouldUnregister,s=U(t,["name","rules","defaultValue","control","shouldUnregister"]),l=dn({name:n,rules:r,defaultValue:i,control:o,shouldUnregister:a}).field;return e.jsx(Rr,F({name:l.name,inputRef:l.ref,checked:!!l.value,onBlur:l.onBlur,onChange:l.onChange},s))},vu=0,yu=function(e){var t,n,r,i,o=new Map,a=new Map,s=new Map,l=new Map,u=new Map,c=null==e?void 0:e.universeDetails;if(c){var d=c.nodeDetailsSet,p=c.clusters,h=Su(p),f=function(e){if($a(e)){var t=e.filter((function(e){return"ASYNC"===e.clusterType}));if(1===t.length)return t[0]}return null}(p),g=null===(t=h.placementInfo.cloudList)||void 0===t?void 0:t[0].regionList,m=null===(i=null===(r=null===(n=null==f?void 0:f.placementInfo)||void 0===n?void 0:n.cloudList)||void 0===r?void 0:r[0])||void 0===i?void 0:i.regionList,v=h.uuid,y=null==f?void 0:f.uuid,x=g.map((function(e){return e.code})),_=null==m?void 0:m.map((function(e){return e.code}));o.set("Primary",{cluster:"Primary",regions:x,uuid:v}),f&&a.set("Async",{cluster:"Read Replica",regions:_,uuid:y});for(var b=0,w=d;b<w.length;b++){var S=w[b],C=S.cloudInfo,T=S.placementUuid,M=S.nodeName;u.set(M,{nodeName:M,ip:C.private_ip}),T===v?s.set(C.az,{zoneName:C.az,nodeNames:bu(d,C.az,v),isReadReplica:!1,regionName:C.region}):l.set(C.az,{zoneName:C.az,nodeNames:bu(d,C.az,y),isReadReplica:!0,regionName:C.region})}}return{primaryZoneMapping:s,asyncZoneMapping:l,primaryClusterMapping:o,asyncClusterMapping:a,nodeIPMapping:u}},xu=function(e){var t=new Map,n=new Map,r=new Map,i=new Map,o=null==e?void 0:e.data;if(o)for(var a=0,s=o;a<s.length;a++){var l=s[a],u=l.cloud_info,c=l.is_read_replica;c?n.set("Async",{cluster:"Read Replica",regions:wu(o,!0)}):t.set("Primary",{cluster:"Primary",regions:wu(o,!1)}),c?i.set(u.zone,{zoneName:u.zone,nodeNames:_u(o,u.zone,!0),isReadReplica:c,regionName:u.region}):r.set(u.zone,{zoneName:u.zone,nodeNames:_u(o,u.zone,!1),isReadReplica:c,regionName:u.region})}return{primaryZoneMapping:r,asyncZoneMapping:i,primaryClusterMapping:t,asyncClusterMapping:n}},_u=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i],s=a.name,l=a.cloud_info,u=a.is_read_replica;t===l.zone&&u===n&&r.push(s)}return r},bu=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i],s=a.nodeName,l=a.cloudInfo,u=a.placementUuid;t===l.az&&u===n&&r.push(s)}return r},wu=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r],a=o.cloud_info;o.is_read_replica!==t||n.includes(a.region)||n.push(a.region)}return n},Su=function(e){if($a(e)){var t=e.filter((function(e){return"PRIMARY"===e.clusterType}));if(1===t.length)return t[0]}return null};var Cu=function(){return vu+=1},Tu=function(e,t,n){var r,i,o,a,s,l,u=new Set,c={},d=null===(o=null===(i=null===(r=e.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0],p=null;if(n){var h=t.filter((function(t,n){return n>0&&t.name===e.name}));if(h.length>=2){var f=h.find((function(t){var n,r,i;return t.name===e.name&&(null===(i=null===(r=null===(n=null==e?void 0:e.layout)||void 0===n?void 0:n.metadata)||void 0===r?void 0:r.currentGroupBy)||void 0===i?void 0:i[0])===exports.WaitEventClassification.TABLET_ID}));if(f)return Array.from(u)}else p=t.find((function(t,n){return n>0&&t.name===e.name}))}else p=t.find((function(t,n){return n>0&&t.name===e.name}));return null===(l=null===(s=null===(a=e.layout)||void 0===a?void 0:a.metadata)||void 0===s?void 0:s.supportedGroupBy)||void 0===l||l.map((function(e){e.label===d&&(c=e),e.label!==exports.WaitEventClassification.QUERY_ID&&u.add(e.name)})),u=Array.from(u),Xa(null==p?void 0:p.groupBy)&&u.sort((function(e,t){return e===c.name?-1:t===c.name?1:0})),u},Mu=function(e,t,n,r,i,o){var a,s;void 0===o&&(o=!1);var l=new Set,u=new Set,c=e===exports.MetricMeasure.OUTLIER||e===exports.MetricMeasure.OUTLIER_TABLES||e===exports.MetricMeasure.OUTLIER_DB;return u=(null===(a=null==t?void 0:t.layout)||void 0===a?void 0:a.type)===Js&&Ka(t)&&c&&n===exports.GraphType.MULTI_SUPPORTING?r?Tu(t,i,o):Array.from(u):o?Tu(t,i,o):Array.from(u),c&&Ka(t)?(t.data.forEach((function(e){l.add(e.name)})),l=Array.from(l)):(null===(s=null==t?void 0:t.layout)||void 0===s?void 0:s.type)===Js&&Ka(t)&&(l=r?Tu(t,i,o):Array.from(new Set)),{uniqueOperations:l,groupByOperations:u}},Eu=function(e,t){Ja(null==t?void 0:t.cluster)&&(null==t?void 0:t.cluster)!==$s?e.clusterUuid=[null==t?void 0:t.cluster]:delete e.clusterUuid,Ja(null==t?void 0:t.region)&&(null==t?void 0:t.region)!==$s?e.regionCode=[null==t?void 0:t.region]:delete e.regionCode,Ja(null==t?void 0:t.zone)&&(null==t?void 0:t.zone)!==$s?e.azCode=[null==t?void 0:t.zone]:delete e.azCode,Ja(null==t?void 0:t.node)&&(null==t?void 0:t.node)!==$s?e.instanceName=[null==t?void 0:t.node]:delete e.instanceName},Iu=function(e,t,n,r,i,o){var a,s,l,u,c=[];if(t){var d=r.metricMeasure===exports.MetricMeasure.OUTLIER_TABLES,p=r.metricMeasure===exports.MetricMeasure.OUTLIER_DB,h=d||p?d?jl[n]:Fl[n]:Bl[n],f=sessionStorage.getItem(d||p?d?Gl:ql:Yl),g=f?JSON.parse(f):{},m=d||p?d?null===(a=Ul.find((function(e){return e.name===h})))||void 0===a?void 0:a.metrics:null===(s=zl.find((function(e){return e.name===h})))||void 0===s?void 0:s.metrics:null===(l=Hl.find((function(e){return e.name===h})))||void 0===l?void 0:l.metrics,v=null!==(u=null==m?void 0:m.filter((function(e){return g[e]})))&&void 0!==u?u:[];return null==v?void 0:v.map((function(e){var t={universeUuid:[null==r?void 0:r.universeUuid]};Eu(t,r);var n=Ps.NONE;return(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?n=Ps.NODE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_TABLES?n=Ps.TABLE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_DB&&(n=Ps.NAMESPACE),{start:null==r?void 0:r.formattedStartDate,end:null==r?void 0:r.formattedEndDate,name:e,filters:t,settings:{splitMode:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ls.NONE:null==r?void 0:r.outlierType,splitType:n,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER,aggregatedValueFunction:js.AVERAGE}}}))}if(!e)return null==i||i.map((function(e){var t=e.settings,n=e.filters;return e.start=null==r?void 0:r.formattedStartDate,e.end=null==r?void 0:r.formattedEndDate,Eu(n,r),t.returnAggregatedValue=(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,t.splitType=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ps.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Ps.NODE:Ps.TABLE,t.splitMode=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ls.NONE:null==r?void 0:r.outlierType,t.splitCount=null==r?void 0:r.numNodes,t})),i;if(e){var y=(null==o?void 0:o.type)===exports.QueryType.SQL||(null==o?void 0:o.type)===exports.QueryType.BACKGROUND,x=hl;(null==o?void 0:o.type)===exports.QueryType.CQL?x=fl:(null==o?void 0:o.type)===exports.QueryType.BACKGROUND&&(x=V([],gl,!0),"5"!==o.queryId||x.includes(ml)||x.push(ml)),x.map((function(e){var t,n={start:null==r?void 0:r.formattedStartDate,end:null==r?void 0:r.formattedEndDate,name:e,filters:{universeUuid:[null!==(t=null==o?void 0:o.universeId)&&void 0!==t?t:""]},settings:{splitMode:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ls.NONE:null==r?void 0:r.outlierType,splitType:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ps.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Ps.NODE:Ps.TABLE,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,aggregatedValueFunction:js.AVERAGE}};Eu(n.filters,r),y&&(null==o?void 0:o.dbId)&&(n.filters.dbId=[o.dbId]),(null==o?void 0:o.type)===exports.QueryType.SQL&&(null==o?void 0:o.userId)&&(n.filters.userId=[o.userId]),(null==o?void 0:o.queryId)&&(n.filters.queryId=[o.queryId]),e.startsWith("active_session_history")&&(n.groupBy=[exports.WaitEventClassification.WAIT_EVENT_TYPE]),c.push(n)}))}return c},Au=function(e,t){var n=120;if(Ja(e)||Ja(t)){var r=new Date(e),i=Hr(new Date(t),r);5===i?n=180:i>5&&i<=23?n=600:i>23&&i<=47?n=1e3:i>47&&i<=167?n=2200:i>=167&&(n=4200)}return n},Du=function(e){if(!e.length)return[];e.sort((function(e,t){return new Date(e.startTime).getTime()-new Date(t.startTime).getTime()}));for(var t=[e[0]],n=1;n<e.length;n++){var r=t[t.length-1],i=e[n];new Date(r.endTime)>=new Date(i.startTime)?r.endTime=new Date(Math.max(new Date(r.endTime).getTime(),new Date(i.endTime).getTime())).toISOString():t.push(i)}return t},ku=function(e,t){return'<span style="display:inline-flex; align-items:center;"><span style="\n display:inline-block;\n margin-right:9px; /* increased from 5px → +4px more space */\n border-radius:50%;\n width:7px; /* reduced circle size */\n height:7px;\n background-color:'.concat(e,';\n "></span><span>').concat(t,"</span></span>")},Ou=function(e){return'<span style="\n text-align:right;\n font-variant-numeric: tabular-nums; /* nicer alignment */\n white-space:nowrap;\n ">'.concat(e,"</span>")},Ru=function(e,t){var n=t,r=new Date;return e===Ml.SEVEN_DAYS?r.setDate(r.getDate()-7):e===Ml.TWO_DAYS?r.setDate(r.getDate()-2):e===Ml.ONE_DAY?r.setDate(r.getDate()-1):e===Ml.SIX_HOURS?r.setHours(r.getHours()-6):e===Ml.ONE_HOUR&&r.setHours(r.getHours()-1),{formattedStartDate:r,formattedEndDate:n}},Nu=function(e,t,n){if(e&&e!==Ml.CUSTOM){var r=Ru(e,t);return{startDateTime:r.formattedStartDate,endDateTime:r.formattedEndDate}}return{startDateTime:n,endDateTime:t}},Lu=function(n){n.appName;var i=n.universeData,o=n.anomalyData,a=n.clusterRegionItem,s=n.zoneNodeItem,l=n.isPrimaryCluster,u=n.cluster,c=n.region,d=n.metricMeasure,p=n.outlierType,h=n.numNodes,f=n.isDrilldownView,g=void 0===f||f,m=n.onZoneNodeSelected,v=n.onClusterRegionSelected,y=n.onOutlierTypeSelected,x=n.onSplitTypeSelected;n.onQueryTypeSelected;var _=n.onNumNodesChanged,b=n.showMetricAggregator,w=void 0===b||b;n.showQueryTypeSelector;var S,C=n.showSplitSelector,T=void 0===C||C,M=(null==(S=i)?void 0:S.universeDetails)?yu(S):xu(S),E=M.primaryZoneMapping,I=M.asyncZoneMapping,A=M.primaryClusterMapping,D=M.asyncClusterMapping,k=Kl(),O=t.useState(E),R=O[0],N=O[1],L=t.useState(I),P=L[0],B=L[1];return t.useEffect((function(){N(E)}),[]),t.useEffect((function(){var e=new Map;if(c!==$s||u!==$s){var t=function(e,t,n,r){var i=Array.from(e).filter((function(e){return t?e[1].regionName===r:n?!e[1].isReadReplica:e[1].isReadReplica}));return i?new Map(i.map((function(e){return[null==e?void 0:e[0],e[1]]}))):new Map}(l?E:I,c!==$s,l,c!==$s?c:u);null!==c&&l?(N(t),B(e)):null===c||l?null!==u&&l?(N(t),B(e)):null===u||l||(N(e),B(t)):(N(e),B(t))}else N(E),B(I)}),[c,u]),e.jsxs(r.Box,F({className:Y(k.flexColumn)},{children:[e.jsx(r.Box,{children:e.jsxs(r.Box,F({display:"flex",flexDirection:"row"},{children:[w&&e.jsx(r.Box,{children:e.jsx(gu,{selectedItem:a,onClusterRegionSelected:v,primaryClusterToRegionMap:A,asyncClusterToRegionMap:D})}),w&&e.jsx(r.Box,{children:e.jsx(hu,{selectedItem:s,onZoneNodeSelected:m,primaryZoneToNodesMap:R,asyncZoneToNodesMap:P})}),T&&e.jsx(r.Box,F({display:"flex",flexDirection:"row",alignItems:"flex-end",ml:2},{children:e.jsx(su,{onSplitTypeSelected:x,metricSplitSelectors:g?cl:ul,anomalyData:o})}))]}))}),e.jsx(r.Box,F({display:"flex",flexDirection:"row"},{children:T&&d!==exports.MetricMeasure.OVERALL&&e.jsx(r.Box,F({mt:2},{children:e.jsx(uu,{outlierType:p,metricOutlierSelectors:dl,onOutlierTypeSelected:y,onNumNodesChanged:_,selectedNumNodes:h})}))}))]}))},Pu=function(n){var i=n.appName,o=n.filterDuration,a=n.startDateTime,s=n.endDateTime,l=n.timezone,u=n.isDrilldownView,c=void 0===u||u,d=n.isTopKMetricsView,p=void 0!==d&&d,h=n.isClusterLoadView,f=void 0!==h&&h,g=n.onSelectedFilterDuration,m=n.metricMeasure,v=n.onStartDateChange,y=n.onEndDateChange,x=n.onRefresh,_=Kl(),b=t.useState(""),w=b[0],S=b[1],C=t.useState(ss(s,as,l)),T=C[0],M=C[1],E=t.useState(ss(a,as,l)),I=E[0],A=E[1];return t.useEffect((function(){new Date(a)<new Date(s)?(S(""),M(ss(s,as,l)),A(ss(a,as,l))):S("Start Date is greater than end date")}),[a,s]),t.useEffect((function(){i===exports.AppName.YBM&&p&&o!==Ml.ONE_HOUR&&o!==Ml.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES&&g(Ml.ONE_HOUR)}),[m]),e.jsx(r.Box,{children:e.jsxs(r.Box,F({display:"flex",flexDirection:"row",alignItems:"center",mt:c?2:0,mb:c?2:0},{children:[i===exports.AppName.YBM&&f&&e.jsx(r.Typography,F({variant:"h5"},{children:e.jsx("span",F({className:Y(_.breadCrumbText)},{children:"Cluster Load"}))})),e.jsxs(r.Box,F({display:"flex",ml:"auto",alignItems:"flex-end"},{children:[o===Ml.CUSTOM&&e.jsxs(e.Fragment,{children:[e.jsx(r.Box,F({mt:.5},{children:e.jsx(us,{className:_.dateTimePicker,value:I,dateTimeLabel:"",defaultDateTimeValue:I,onChange:v,isReadOnly:!0})})),e.jsx(r.Box,F({mt:.5},{children:e.jsx(us,{className:_.dateTimePicker,dateTimeLabel:"",value:T,defaultDateTimeValue:T,onChange:y,errorMsg:w,isReadOnly:!0})}))]}),e.jsx(lr,F({className:Y(_.selectBox,_.overrideMuiInput),"data-testid":"GenericHeaderTimeFilterSelect",value:o},{children:El.map((function(t){return e.jsx(r.MenuItem,F({value:t.value,onClick:function(){g(t.value)},className:Y(_.regularText),disabled:i===exports.AppName.YBM&&p&&t.value!==Ml.ONE_HOUR&&t.value!==Ml.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES},{children:t.label}),"duration-".concat(t.label))}))})),e.jsx(Q,F({style:{marginLeft:"16px"},variant:i===exports.AppName.YBM?"ghost":"secondary","data-testid":"GenericHeader-RefreshButton",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M16 3.34222V0.5C16 0.223858 16.2239 0 16.5 0C16.7761 0 17 0.223858 17 0.5V4.5C17 4.77614 16.7761 5 16.5 5H12.5C12.2239 5 12 4.77614 12 4.5C12 4.22386 12.2239 4 12.5 4H15.2457C13.746 2.12713 11.4694 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17C13.235 17 16.7299 13.6991 16.9851 9.49248C17.0018 9.21685 17.2388 9.00696 17.5145 9.02368C17.7901 9.0404 18 9.27741 17.9833 9.55304C17.6961 14.2867 13.7645 18 9 18C4.02944 18 0 13.9706 0 9C0 4.02944 4.02944 0 9 0C11.7633 0 14.313 1.25541 16 3.34222Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Refresh Icon"}),size:"medium",onClick:function(){return x()}},{children:""}))]}))]}))})},Bu=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},ju=new function(){this.browser=new Bu,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?(ju.wxa=!0,ju.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?ju.worker=!0:"undefined"==typeof navigator?(ju.node=!0,ju.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),o=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,ju);var Fu=ju,Uu="sans-serif",zu="12px "+Uu;var Hu,Vu,Wu=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),Yu={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!Hu){var n=Yu.createCanvas();Hu=n&&n.getContext("2d")}if(Hu)return Vu!==t&&(Vu=Hu.font=t||zu),Hu.measureText(e);e=e||"";var r=/(\d+)px/.exec(t=t||zu),i=r&&+r[1]||12,o=0;if(t.indexOf("mono")>=0)o=i*e.length;else for(var a=0;a<e.length;a++){var s=Wu[e[a]];o+=null==s?i:s*i}return{width:o}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},Gu=gc(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),qu=gc(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),Qu=Object.prototype.toString,Zu=Array.prototype,Xu=Zu.forEach,$u=Zu.filter,Ku=Zu.slice,Ju=Zu.map,ec=function(){}.constructor,tc=ec?ec.prototype:null,nc="__proto__",rc=2311;function ic(){return rc++}function oc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function ac(e){if(null==e||"object"!=typeof e)return e;var t=e,n=Qu.call(e);if("[object Array]"===n){if(!Uc(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=ac(e[r])}}else if(qu[n]){if(!Uc(e)){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Gu[n]&&!Uc(e)&&!Ic(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==nc&&(t[a]=ac(e[a]));return t}function sc(e,t,n){if(!Tc(t)||!Tc(e))return n?ac(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==nc){var i=e[r],o=t[r];!Tc(o)||!Tc(i)||_c(o)||_c(i)||Ic(o)||Ic(i)||Mc(o)||Mc(i)||Uc(o)||Uc(i)?!n&&r in e||(e[r]=ac(t[r])):sc(i,o,n)}return e}function lc(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==nc&&(e[n]=t[n]);return e}function uc(e,t,n){for(var r=vc(t),i=0;i<r.length;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function cc(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function dc(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else uc(e,t,n)}function pc(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function hc(e,t,n){if(e&&t)if(e.forEach&&e.forEach===Xu)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function fc(e,t,n){if(!e)return[];if(!t)return Nc(e);if(e.map&&e.map===Ju)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function gc(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function mc(e,t,n){if(!e)return[];if(!t)return Nc(e);if(e.filter&&e.filter===$u)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function vc(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var yc=tc&&bc(tc.bind)?tc.call.bind(tc.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Ku.call(arguments)))}};function xc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Ku.call(arguments)))}}function _c(e){return Array.isArray?Array.isArray(e):"[object Array]"===Qu.call(e)}function bc(e){return"function"==typeof e}function wc(e){return"string"==typeof e}function Sc(e){return"[object String]"===Qu.call(e)}function Cc(e){return"number"==typeof e}function Tc(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Mc(e){return!!Gu[Qu.call(e)]}function Ec(e){return!!qu[Qu.call(e)]}function Ic(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function Ac(e){return null!=e.colorStops}function Dc(e){return e!=e}function kc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function Oc(e,t){return null!=e?e:t}function Rc(e,t,n){return null!=e?e:null!=t?t:n}function Nc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Ku.apply(e,t)}function Lc(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function Pc(e,t){if(!e)throw new Error(t)}function Bc(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var jc="__ec_primitive__";function Fc(e){e[jc]=!0}function Uc(e){return e[jc]}var zc=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return vc(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Hc="function"==typeof Map;var Vc=function(){function e(t){var n=_c(t);this.data=Hc?new Map:new zc;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&hc(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach((function(n,r){e.call(t,n,r)}))},e.prototype.keys=function(){var e=this.data.keys();return Hc?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Wc(e){return new Vc(e)}function Yc(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&lc(n,t),n}function Gc(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function qc(e,t){return e.hasOwnProperty(t)}function Qc(){}var Zc=180/Math.PI;function Xc(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function $c(e){return[e[0],e[1]]}function Kc(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Jc(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function ed(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function td(e,t){var n=function(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function nd(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var rd=nd;var id=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function od(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function ad(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function sd(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var ld=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},ud=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new ld(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,t.drift(i,o,e),this.handler.dispatchToElement(new ld(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new ld(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new ld(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new ld(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new ld(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),cd=ud,dd=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(e,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),pd=dd,hd=Math.log(2);function fd(e,t,n,r,i,o){var a=r+"-"+i,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/hd);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,p=0,h=0;p<s;p++){var f=1<<p;f&i||(d+=(h%2?-1:1)*e[n][p]*fd(e,t-1,c,u,i|f,o),h++)}return o[a]=d,d}function gd(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=fd(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*fd(n,7,0===a?1:0,1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var md="___zrEVENTSAVED",vd=[];function yd(e,t,n,r,i){if(t.getBoundingClientRect&&Fu.domSupported&&!xd(t)){var o=t[md]||(t[md]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),s=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,p=c.left,h=c.top;a.push(p,h),l=l&&o&&p===o[d]&&h===o[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=a,t[r]=n?gd(s,a):gd(a,s))}(a,o,i);if(s)return s(e,n,r),!0}return!1}function xd(e){return"CANVAS"===e.nodeName.toUpperCase()}var _d=/([&<>"'])/g,bd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wd(e){return null==e?"":(e+"").replace(_d,(function(e,t){return bd[t]}))}var Sd=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Cd=[],Td=Fu.browser.firefox&&+Fu.browser.version.split(".")[0]<39;function Md(e,t,n,r){return n=n||{},r?Ed(e,t,n):Td&&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):Ed(e,t,n),n}function Ed(e,t,n){if(Fu.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(xd(e)){var o=e.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(yd(Cd,e,r,i))return n.zrX=Cd[0],void(n.zrY=Cd[1])}n.zrX=n.zrY=0}function Id(e){return e||window.event}function Ad(e,t,n){if(null!=(t=Id(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&Md(e,i,t,n)}else{Md(e,t,t,n);var o=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=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Sd.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Dd(e,t,n,r){e.removeEventListener(t,n,r)}var kd=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Od(e){return 2===e.which||3===e.which}var Rd=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],l=Md(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in Ld)if(Ld.hasOwnProperty(t)){var n=Ld[t](this._track,e);if(n)return n}},e}();function Nd(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Ld={pinch:function(e,t){var n=e.length;if(n){var r,i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var a=Nd(i)/Nd(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=i)[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 Pd(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Bd(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function jd(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 Fd(e,t,n){var r=t[0],i=t[2],o=t[4],a=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=r*c+a*u,e[1]=-r*u+a*c,e[2]=i*c+s*u,e[3]=-i*u+c*s,e[4]=c*o+u*l,e[5]=c*l-u*o,e}function Ud(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*r;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*i)*l,e[5]=(o*i-n*s)*l,e):null}var zd=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Hd=zd,Vd=Math.min,Wd=Math.max,Yd=new Hd,Gd=new Hd,qd=new Hd,Qd=new Hd,Zd=new Hd,Xd=new Hd,$d=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=Vd(e.x,this.x),n=Vd(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Wd(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Wd(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,i=[1,0,0,1,0,0];return jd(i,i,[-t.x,-t.y]),function(e,t,n){var r=n[0],i=n[1];e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i}(i,i,[n,r]),jd(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,o=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,p=!(o<l||u<i||s<c||d<a);if(n){var h=1/0,f=0,g=Math.abs(o-l),m=Math.abs(u-i),v=Math.abs(s-c),y=Math.abs(d-a),x=Math.min(g,m),_=Math.min(v,y);o<l||u<i?x>f&&(f=x,g<m?Hd.set(Xd,-g,0):Hd.set(Xd,m,0)):x<h&&(h=x,g<m?Hd.set(Zd,g,0):Hd.set(Zd,-m,0)),s<c||d<a?_>f&&(f=_,v<y?Hd.set(Xd,0,-v):Hd.set(Xd,0,y)):x<h&&(h=x,v<y?Hd.set(Zd,0,v):Hd.set(Zd,0,-y))}return n&&Hd.copy(n,p?Zd:Xd),p},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Yd.x=qd.x=n.x,Yd.y=Qd.y=n.y,Gd.x=Qd.x=n.x+n.width,Gd.y=qd.y=n.y+n.height,Yd.transform(r),Qd.transform(r),Gd.transform(r),qd.transform(r),t.x=Vd(Yd.x,Gd.x,qd.x,Qd.x),t.y=Vd(Yd.y,Gd.y,qd.y,Qd.y);var l=Wd(Yd.x,Gd.x,qd.x,Qd.x),u=Wd(Yd.y,Gd.y,qd.y,Qd.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),Kd=$d,Jd="silent";function ep(){kd(this.event)}var tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return j(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(pd),np=function(e,t){this.x=e,this.y=t},rp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ip=new Kd(0,0,0,0),op=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a._hovered=new np(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new tp,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new cd(a),a}return j(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(hc(rp,(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=lp(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new np(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new np(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 i="on"+t,o=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ep}}(t,e,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(t,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,o),e.trigger&&e.trigger(t,o)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new np(e,t);if(sp(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Kd(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||(ip.copy(c.getBoundingRect()),c.transform&&ip.applyTransform(c.transform),ip.intersect(l)&&o.push(c))}if(o.length)for(var d=Math.PI/12,p=2*Math.PI,h=0;h<s;h+=4)for(var f=0;f<p;f+=d){if(sp(o,i,e+h*Math.cos(f),t+h*Math.sin(f),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new Rd);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new np;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(pd);function ap(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(i=!0)}var s=r.__hostTarget;r=s||r.parent}return!i||Jd}return!1}function sp(e,t,n,r,i){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=ap(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==Jd)){t.target=a;break}}}function lp(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}hc(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){op.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=lp(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||rd(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var up=op;function cp(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function dp(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,l=r;s<l;)i(a,e[o=s+l>>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function pp(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){for(s=r-i;l<s&&o(e,t[n+i+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&o(e,t[n+i-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function hp(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])<0){for(s=i+1;l<s&&o(e,t[n+i-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(e,t[n+i+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])<0?l=c:a=c+1}return l}function fp(e,t){var n,r,i=7,o=0;e.length;var a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var p=hp(e[c],e,l,u,0,t);l+=p,0!==(u-=p)&&0!==(d=pp(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,o,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=o,d=n;if(e[d++]=e[c++],0==--s){for(l=0;l<r;l++)e[d+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=a[u])}var p,h,f,g=i;for(;;){p=0,h=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],h++,p=0,0==--s){f=!0;break}}else if(e[d++]=a[u++],p++,h=0,1==--r){f=!0;break}}while((p|h)<g);if(f)break;do{if(0!==(p=hp(e[c],a,u,r,0,t))){for(l=0;l<p;l++)e[d+l]=a[u+l];if(d+=p,u+=p,(r-=p)<=1){f=!0;break}}if(e[d++]=e[c++],0==--s){f=!0;break}if(0!==(h=pp(a[u],e,c,s,0,t))){for(l=0;l<h;l++)e[d+l]=e[c+l];if(d+=h,c+=h,0===(s-=h)){f=!0;break}}if(e[d++]=a[u++],1==--r){f=!0;break}g--}while(p>=7||h>=7);if(f)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=a[u+l]}}(l,u,c,d):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+r-1,c=s-1,d=o+s-1,p=0,h=0;if(e[d--]=e[u--],0==--r){for(p=d-(s-1),l=0;l<s;l++)e[p+l]=a[l];return}if(1===s){for(h=(d-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)e[h+l]=e[p+l];return void(e[d]=a[c])}var f=i;for(;;){var g=0,m=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],g++,m=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=r-hp(a[c],e,n,r,r-1,t))){for(r-=g,h=(d-=g)+1,p=(u-=g)+1,l=g-1;l>=0;l--)e[h+l]=e[p+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1==--s){v=!0;break}if(0!==(m=s-pp(e[u],a,0,s,s-1,t))){for(s-=m,h=(d-=m)+1,p=(c-=m)+1,l=0;l<m;l++)e[h+l]=a[p+l];if(s<=1){v=!0;break}}if(e[d--]=e[u--],0==--r){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(h=(d-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)e[h+l]=e[p+l];e[d]=a[c]}else{if(0===s)throw new Error;for(p=d-(s-1),l=0;l<s;l++)e[p+l]=a[l]}}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}function gp(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var o=0;if(i<32)dp(e,n,r,n+(o=cp(e,n,r,t)),t);else{var a=fp(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=cp(e,n,r,t))<s){var l=i;l>s&&(l=s),dp(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var mp=!1;function vp(){mp||(mp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function yp(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var xp=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=yp}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,gp(n,yp)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=1),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(vp(),u.z=0),isNaN(u.z2)&&(vp(),u.z2=0),isNaN(u.zlevel)&&(vp(),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 p=e.getTextContent();p&&this._updateAndAddDisplayable(p,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=cc(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),_p=xp,bp=Fu.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},wp={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-wp.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*wp.bounceIn(2*e):.5*wp.bounceOut(2*e-1)+.5}},Sp=wp,Cp=Math.pow,Tp=Math.sqrt,Mp=1e-8,Ep=1e-4,Ip=Tp(3),Ap=1/3,Dp=Xc(),kp=Xc(),Op=Xc();function Rp(e){return e>-1e-8&&e<Mp}function Np(e){return e>Mp||e<-1e-8}function Lp(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function Pp(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function Bp(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*a*l,d=s*l-9*a*u,p=l*l-3*s*u,h=0;if(Rp(c)&&Rp(d)){if(Rp(s))o[0]=0;else(C=-l/s)>=0&&C<=1&&(o[h++]=C)}else{var f=d*d-4*c*p;if(Rp(f)){var g=d/c,m=-g/2;(C=-s/a+g)>=0&&C<=1&&(o[h++]=C),m>=0&&m<=1&&(o[h++]=m)}else if(f>0){var v=Tp(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(C=(-s-((y=y<0?-Cp(-y,Ap):Cp(y,Ap))+(x=x<0?-Cp(-x,Ap):Cp(x,Ap))))/(3*a))>=0&&C<=1&&(o[h++]=C)}else{var _=(2*c*s-3*a*d)/(2*Tp(c*c*c)),b=Math.acos(_)/3,w=Tp(c),S=Math.cos(b),C=(-s-2*w*S)/(3*a),T=(m=(-s+w*(S+Ip*Math.sin(b)))/(3*a),(-s+w*(S-Ip*Math.sin(b)))/(3*a));C>=0&&C<=1&&(o[h++]=C),m>=0&&m<=1&&(o[h++]=m),T>=0&&T<=1&&(o[h++]=T)}}return h}function jp(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Rp(a)){if(Np(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(Rp(u))i[0]=-o/(2*a);else if(u>0){var c,d=Tp(u),p=(-o-d)/(2*a);(c=(-o+d)/(2*a))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}function Fp(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,d=(c-u)*i+u;o[0]=e,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=r}function Up(e,t,n,r,i,o,a,s,l){for(var u=e,c=t,d=0,p=1/l,h=1;h<=l;h++){var f=h*p,g=Lp(e,n,i,a,f),m=Lp(t,r,o,s,f),v=g-u,y=m-c;d+=Math.sqrt(v*v+y*y),u=g,c=m}return d}function zp(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Hp(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Vp(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function Wp(e,t,n,r,i){var o=(t-e)*r+e,a=(n-t)*r+t,s=(a-o)*r+o;i[0]=e,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function Yp(e,t,n,r,i,o,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var p=d*c,h=zp(e,n,i,p),f=zp(t,r,o,p),g=h-s,m=f-l;u+=Math.sqrt(g*g+m*m),s=h,l=f}return u}var Gp=/cubic-bezier\(([0-9,\.e ]+)\)/;function qp(e){var t=e&&Gp.exec(e);if(t){var n=t[1].split(","),r=+Bc(n[0]),i=+Bc(n[1]),o=+Bc(n[2]),a=+Bc(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Bp(0,r,o,1,e,s)&&Lp(0,i,a,1,s[0])}}}var Qp=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||Qc,this.ondestroy=e.ondestroy||Qc,this.onrestart=e.onrestart||Qc,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,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;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=bc(e)?e:Sp[e]||qp(e)},e}(),Zp=function(e){this.value=e},Xp=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Zp(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}(),$p=function(){function e(e){this._list=new Xp,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Zp(t),a.key=e,n.insertEntry(a),r[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Kp=$p,Jp={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 eh(e){return(e=Math.round(e))<0?0:e>255?255:e}function th(e){return e<0?0:e>1?1:e}function nh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?eh(parseFloat(t)/100*255):eh(parseInt(t,10))}function rh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?th(parseFloat(t)/100):th(parseFloat(t))}function ih(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 oh(e,t,n){return e+(t-e)*n}function ah(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function sh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var lh=new Kp(20),uh=null;function ch(e,t){uh&&sh(uh,t),uh=lh.put(e,uh||t.slice())}function dh(e,t){if(e){t=t||[];var n=lh.get(e);if(n)return sh(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Jp)return sh(t,Jp[r]),ch(e,t),t;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(ah(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),ch(e,t),t):void ah(t,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(ah(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),ch(e,t),t):void ah(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){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?ah(t,+u[0],+u[1],+u[2],1):ah(t,0,0,0,1);c=rh(u.pop());case"rgb":return u.length>=3?(ah(t,nh(u[0]),nh(u[1]),nh(u[2]),3===u.length?c:rh(u[3])),ch(e,t),t):void ah(t,0,0,0,1);case"hsla":return 4!==u.length?void ah(t,0,0,0,1):(u[3]=rh(u[3]),ph(u,t),ch(e,t),t);case"hsl":return 3!==u.length?void ah(t,0,0,0,1):(ph(u,t),ch(e,t),t);default:return}}ah(t,0,0,0,1)}}function ph(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=rh(e[1]),i=rh(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return ah(t=t||[],eh(255*ih(a,o,n+1/3)),eh(255*ih(a,o,n)),eh(255*ih(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function hh(e,t){var n=dh(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 mh(n,4===n.length?"rgba":"rgb")}}function fh(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=t[i],s=t[o],l=r-i;return n[0]=eh(oh(a[0],s[0],l)),n[1]=eh(oh(a[1],s[1],l)),n[2]=eh(oh(a[2],s[2],l)),n[3]=th(oh(a[3],s[3],l)),n}}function gh(e,t,n,r){var i,o=dh(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,p=((s-o)/6+l/2)/l;r===s?t=p-d:i===s?t=1/3+c-p:o===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var h=[360*t,n,u];return null!=e[3]&&h.push(e[3]),h}}(o),null!=t&&(o[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=rh(n)),null!=r&&(o[2]=rh(r)),mh(ph(o),"rgba")}function mh(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 vh(e,t){var n=dh(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var yh=Math.round;function xh(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=dh(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var _h=1e-4;function bh(e){return e<_h&&e>-1e-4}function wh(e){return yh(1e3*e)/1e3}function Sh(e){return yh(1e4*e)/1e4}var Ch={left:"start",right:"end",center:"middle",middle:"middle"};function Th(e){return e&&!!e.image}function Mh(e){return Th(e)||function(e){return e&&!!e.svgElement}(e)}function Eh(e){return"linear"===e.type}function Ih(e){return"radial"===e.type}function Ah(e){return e&&("linear"===e.type||"radial"===e.type)}function Dh(e){return"url(#"+e+")"}function kh(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Oh(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Zc,i=Oc(e.scaleX,1),o=Oc(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===i&&1===o||l.push("scale("+i+","+o+")"),(a||s)&&l.push("skew("+yh(a*Zc)+"deg, "+yh(s*Zc)+"deg)"),l.join(" ")}var Rh=Fu.hasGlobalWindow&&bc(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!=typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return null},Nh=Array.prototype.slice;function Lh(e,t,n){return(t-e)*n+e}function Ph(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=Lh(t[o],n[o],r);return e}function Bh(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function jh(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function Fh(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}function Uh(e,t,n){var r=e,i=t;if(r.push&&i.push){var o=r.length,a=i.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===n?i[s]:Nh.call(i[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=i[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=i[s][u])}}function zh(e){if(pc(e)){var t=e.length;if(pc(e[0])){for(var n=[],r=0;r<t;r++)n.push(Nh.call(e[r]));return n}return Nh.call(e)}return e}function Hh(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function Vh(e){return 4===e||5===e}function Wh(e){return 1===e||2===e}var Yh=[0,0,0,0],Gh=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=t;if(pc(t)){var l=function(e){return pc(e&&e[0])?2:1}(t);a=l,(1===l&&!Cc(t[0])||2===l&&!Cc(t[0][0]))&&(o=!0)}else if(Cc(t)&&!Dc(t))a=0;else if(wc(t))if(isNaN(+t)){var u=dh(t);u&&(s=u,a=3)}else a=0;else if(Ac(t)){var c=lc({},s);c.colorStops=fc(t.colorStops,(function(e){return{offset:e.offset,color:dh(e.color)}})),Eh(t)?a=4:Ih(t)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=bc(n)?n:Sp[n]||qp(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,i=n.length,o=n[i-1],a=this.discrete,s=Wh(r),l=Vh(r),u=0;u<i;u++){var c=n[u],d=c.value,p=o.value;c.percent=c.time/e,a||(s&&u!==i-1?Uh(d,p,r):l&&Fh(d.colorStops,p.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var h=n[0].value;for(u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-h:3===r?n[u].additiveValue=Bh([],n[u].value,h,-1):Wh(r)&&(n[u].additiveValue=1===r?Bh([],n[u].value,h,-1):jh([],n[u].value,h,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,p=this._lastFr,h=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=h(p+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=h(n,u-2)}else{for(n=p;n<u&&!(l[n].percent>t);n++);n=h(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-r.percent,g=0===f?1:h((t-r.percent)/f,1);i.easingFunc&&(g=i.easingFunc(g));var m=o?this._additiveValue:d?Yh:e[c];if(!Wh(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[c]=g<1?r.rawValue:i.rawValue;else if(Wh(s))1===s?Ph(m,r[a],i[a],g):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=Lh(t[a][s],n[a][s],r)}}(m,r[a],i[a],g);else if(Vh(s)){var v=r[a],y=i[a],x=4===s;e[c]={type:x?"linear":"radial",x:Lh(v.x,y.x,g),y:Lh(v.y,y.y,g),colorStops:fc(v.colorStops,(function(e,t){var n=y.colorStops[t];return{offset:Lh(e.offset,n.offset,g),color:Hh(Ph([],e.color,n.color,g))}})),global:y.global},x?(e[c].x2=Lh(v.x2,y.x2,g),e[c].y2=Lh(v.y2,y.y2,g)):e[c].r=Lh(v.r,y.r,g)}else if(d)Ph(m,r[a],i[a],g),o||(e[c]=Hh(m));else{var _=Lh(r[a],i[a],g);o?this._additiveValue=_:e[c]=_}o&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(dh(e[n],Yh),Bh(Yh,Yh,r,1),e[n]=Hh(Yh)):1===t?Bh(e[n],e[n],r,1):2===t&&jh(e[n],e[n],r,1)},e}(),qh=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?oc("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,vc(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new Gh(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=Hh(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,zh(l),r),this._trackKeys.push(a)}s.addKeyframe(e,zh(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new Qp({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return fc(this._trackKeys,(function(t){return e._tracks[t]}))},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];if(o&&!o.isFinished()){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[i]=zh(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||vc(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Qh=qh;function Zh(){return(new Date).getTime()}var Xh,$h,Kh,Jh=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 j(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=Zh()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,bp((function t(){e._running&&(bp(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=Zh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Zh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Zh()-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 Qh(e,t.loop);return this.addAnimator(n),n},t}(pd),ef=Jh,tf=Fu.domSupported,nf=($h={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Kh=fc(Xh=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],(function(e){var t=e.replace("mouse","pointer");return $h.hasOwnProperty(t)?t:e})),{mouse:Xh,touch:["touchstart","touchend","touchmove"],pointer:Kh}),rf=["mousemove","mouseup"],of=["pointermove","pointerup"],af=!1;function sf(e){var t=e.pointerType;return"pen"===t||"touch"===t}function lf(e){e&&(e.zrByTouch=!0)}function uf(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 cf=function(e,t){this.stopPropagation=Qc,this.stopImmediatePropagation=Qc,this.preventDefault=Qc,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},df={mousedown:function(e){e=Ad(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Ad(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=Ad(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){uf(this,(e=Ad(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){af=!0,e=Ad(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){af||(e=Ad(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){lf(e=Ad(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),df.mousemove.call(this,e),df.mousedown.call(this,e)},touchmove:function(e){lf(e=Ad(this.dom,e)),this.handler.processGesture(e,"change"),df.mousemove.call(this,e)},touchend:function(e){lf(e=Ad(this.dom,e)),this.handler.processGesture(e,"end"),df.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&df.click.call(this,e)},pointerdown:function(e){df.mousedown.call(this,e)},pointermove:function(e){sf(e)||df.mousemove.call(this,e)},pointerup:function(e){df.mouseup.call(this,e)},pointerout:function(e){sf(e)||df.mouseout.call(this,e)}};hc(["click","dblclick","contextmenu"],(function(e){df[e]=function(t){t=Ad(this.dom,t),this.trigger(e,t)}}));var pf={pointermove:function(e){sf(e)||pf.mousemove.call(this,e)},pointerup:function(e){pf.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 hf(e,t){var n=t.domHandlers;Fu.pointerEventsSupported?hc(nf.pointer,(function(r){gf(t,r,(function(t){n[r].call(e,t)}))})):(Fu.touchEventsSupported&&hc(nf.touch,(function(r){gf(t,r,(function(i){n[r].call(e,i),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)}))})),hc(nf.mouse,(function(r){gf(t,r,(function(i){i=Id(i),t.touching||n[r].call(e,i)}))})))}function ff(e,t){function n(n){gf(t,n,(function(r){r=Id(r),uf(e,r.target)||(r=function(e,t){return Ad(e.dom,new cf(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}Fu.pointerEventsSupported?hc(of,n):Fu.touchEventsSupported||hc(rf,n)}function gf(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,function(e,t,n,r){e.addEventListener(t,n,r)}(e.domTarget,t,n,r)}function mf(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Dd(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var vf=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},yf=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 vf(t,df),tf&&(r._globalHandlerScope=new vf(document,pf)),hf(r,r._localHandlerScope),r}return j(t,e),t.prototype.dispose=function(){mf(this._localHandlerScope),tf&&mf(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,tf&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ff(this,t):mf(t)}},t}(pd),xf=1;Fu.hasGlobalWindow&&(xf=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var _f=xf,bf="#333",wf="#ccc",Sf=Pd,Cf=5e-5;function Tf(e){return e>Cf||e<-5e-5}var Mf=[],Ef=[],If=[1,0,0,1,0,0],Af=Math.abs,Df=function(){function e(){}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 Tf(this.rotation)||Tf(this.x)||Tf(this.y)||Tf(this.scaleX-1)||Tf(this.scaleY-1)||Tf(this.skewX)||Tf(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):Sf(n),e&&(t?Bd(n,e,n):function(e,t){e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5]}(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Sf(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Mf);var n=Mf[0]<0?-1:1,r=Mf[1]<0?-1:1,i=((Mf[0]-n)*t+n)/Mf[0]||0,o=((Mf[1]-r)*t+r)/Mf[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ud(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]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(Bd(Ef,e.invTransform,t),t=Ef);var n=this.originX,r=this.originY;(n||r)&&(If[4]=n,If[5]=r,Bd(Ef,t,If),Ef[4]-=n,Ef[5]-=r,t=Ef),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&&od(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&od(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Af(e[0]-1)>1e-10&&Af(e[3]-1)>1e-10?Math.sqrt(Af(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Of(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,p=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var h=n+a,f=r+s;t[4]=-h*i-d*f*o,t[5]=-f*o-p*h*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=p*i,t[2]=d*o,l&&Fd(t,t,l),t[4]+=n+u,t[5]+=r+c,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),kf=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Of(e,t){for(var n=0;n<kf.length;n++){var r=kf[n];e[r]=t[r]}}var Rf={};function Nf(e,t){var n=Rf[t=t||zu];n||(n=Rf[t]=new Kp(500));var r=n.get(e);return null==r&&(r=Yu.measureText(e,t).width,n.put(e,r)),r}function Lf(e,t,n,r){var i=Nf(e,t),o=Ff(t),a=Bf(0,i,n),s=jf(0,o,r);return new Kd(a,s,i,o)}function Pf(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return Lf(i[0],t,n,r);for(var o=new Kd(0,0,0,0),a=0;a<i.length;a++){var s=Lf(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function Bf(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function jf(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Ff(e){return Nf("国",e)}function Uf(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function zf(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=Uf(r[0],n.width),u+=Uf(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=i,u+=s,c="right",d="middle";break;case"right":l+=i+a,u+=s,d="middle";break;case"top":l+=a/2,u-=i,c="center",d="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=a-i,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,d="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var Hf="__zr_normal__",Vf=kf.concat(["ignore"]),Wf=gc(kf,(function(e,t){return e[t]=!0,e}),{ignore:!1}),Yf={},Gf=new Kd(0,0,0,0),qf=function(){function e(e){this.id=ic(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(t),null!=n.position){var u=Gf;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Yf,n,u):zf(Yf,n,u),i.x=Yf.x,i.y=Yf.y,o=Yf.align,a=Yf.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,p=void 0;"center"===c?(d=.5*u.width,p=.5*u.height):(d=Uf(c[0],u.width),p=Uf(c[1],u.height)),l=!0,i.originX=-i.x+d+(r?0:u.x),i.originY=-i.y+p+(r?0:u.y)}}null!=n.rotation&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],l||(i.originX=-h[0],i.originY=-h[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=n.insideFill,v=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=n.outsideFill,v=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?wf:bf},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&dh(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,mh(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||{},lc(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(Tc(e))for(var n=vc(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==Hf)){var o=r.targetName,a=o?t[o]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Vf)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Hf,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Hf;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(cc(o,e)>=0)||!t&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||i){i||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),i?(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}oc("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a)for(var s=0;s<o;s++)if(e[s]!==i[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[o-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(r),h=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(","),p,this._normalState,!1,!t&&!this.__inHover&&h&&h.duration>0,h);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=cc(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=cc(r,e),o=cc(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];lc(n,i),i.textConfig&&lc(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,o){var a=!(t&&r);t&&t.textConfig?(this.textConfig=lc({},r?this.textConfig:n.textConfig),lc(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Vf.length;u++){var c=Vf[u],d=i&&Wf[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var p=this.animators[u],h=p.targetName;p.getLoop()||p.__changeFinalValue(h?(t||n)[h]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Df,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),lc(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this,i=new Qh(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during((function(){r.updateDuringAnimation(t)})).done((function(){var t=r.animators,n=cc(t,e);n>=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Qf(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Qf(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Qf(this,t,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,r,i){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||o(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}})}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function Qf(e,t,n,r,i){var o=[];$f(e,"",e,t,n=n||{},r,o,i);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(e,t){n.during(t)}));for(var p=0;p<o.length;p++){var h=o[p];c&&h.done(c),d&&h.aborted(d),n.force&&h.duration(n.duration),h.start(n.easing)}return o}function Zf(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Xf(e,t,n){if(pc(t[n]))if(pc(e[n])||(e[n]=[]),Ec(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Zf(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(pc(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?Zf(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else Zf(o,i,a);o.length=i.length}else e[n]=t[n]}function $f(e,t,n,r,i,o,a,s){for(var l=vc(r),u=i.duration,c=i.delay,d=i.additive,p=i.setToFinal,h=!Tc(o),f=e.animators,g=[],m=0;m<l.length;m++){var v=l[m],y=r[v];if(null!=y&&null!=n[v]&&(h||o[v]))if(!Tc(y)||pc(y)||Ac(y))g.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}$f(e,v,n[v],y,i,o&&o[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),g.push(v))}var x=g.length;if(!d&&x)for(var _=0;_<f.length;_++){if((w=f[_]).targetName===t)if(w.stopTracks(g)){var b=cc(f,w);f.splice(b,1)}}if(i.force||(g=mc(g,(function(e){return t=r[e],i=n[e],!(t===i||pc(t)&&pc(i)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,i));var t,i})),x=g.length),x>0||i.force&&!a.length){var w,S=void 0,C=void 0,T=void 0;if(s){C={},p&&(S={});for(_=0;_<x;_++){C[v=g[_]]=n[v],p?S[v]=r[v]:n[v]=r[v]}}else if(p){T={};for(_=0;_<x;_++){T[v=g[_]]=zh(n[v]),Xf(n,r,v)}}(w=new Qh(n,!1,!1,d?mc(f,(function(e){return e.targetName===t})):null)).targetName=t,i.scope&&(w.scope=i.scope),p&&S&&w.whenWithKeys(0,S,g),T&&w.whenWithKeys(0,T,g),w.whenWithKeys(null==u?500:u,s?C:r,g).delay(c||0),e.addAnimator(w,t),a.push(w)}}dc(qf,pd),dc(qf,Df);var Kf=qf,Jf=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return j(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=cc(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=cc(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new Kd(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(Kd.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(Kf);Jf.prototype.type="group";var eg=Jf,tg={},ng={};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("react-query"),r=require("@material-ui/core"),i=require("@material-ui/core/styles"),o=require("@material-ui/icons"),a=require("@material-ui/core/TextField"),s=require("@material-ui/lab"),l=require("mui-datatables"),u=require("http"),c=require("https"),d=require("url"),p=require("stream"),h=require("assert"),f=require("tty"),g=require("util"),m=require("os"),v=require("zlib"),y=require("react-dom"),x=require("vis-timeline/standalone");require("vis-timeline/styles/vis-timeline-graph2d.css?inline");var _=require("@material-ui/icons/ExpandMore");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function w(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var S=w(t),C=b(t),T=b(a),M=b(l),E=b(u),I=b(c),A=b(d),D=b(p),k=b(h),O=b(f),R=b(g),N=b(m),L=b(v),P=b(_),B=function(e,t){return B=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])},B(e,t)};function j(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}B(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var F=function(){return F=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},F.apply(this,arguments)};function U(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function z(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function H(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function V(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function W(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<e.length;t++)e[t]&&(n=W(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Y(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=W(e))&&(r&&(r+=" "),r+=t);return r}"function"==typeof SuppressedError&&SuppressedError;var G=r.makeStyles((function(e){return{root:{padding:function(t){var n=t.size,r=t.startIcon,i=t.endIcon;if(r||i)return"large"===n?e.spacing(0,2):e.spacing(0,1.4);switch(n){case"small":return e.spacing(0,1.4);case"large":return e.spacing(0,3.5);default:return e.spacing(0,2)}},background:function(e){var t=e.variant,n=e.disabled;return"gradient"!==t||n?"":"linear-gradient(272.58deg, #7879F1 1.06%, #7879F1 33.24%, #5D5FEF 56.4%)"}}}})),q=r.makeStyles((function(e){return{label:{fontWeight:400,color:e.palette.grey[900]},text:{"& + &":{marginLeft:e.spacing(1)},backgroundColor:function(t){return t.selected?e.palette.grey[300]:"transparent"},"&:hover":{borderColor:e.palette.grey[300],backgroundColor:function(t){return t.selected?e.palette.grey[300]:"transparent"}}}}})),Q=function(t){var n=t.variant,i=t.showSpinner,o=U(t,["variant","showSpinner"]);o.classes=G(t);var a=q(t);switch(n){case"primary":case"gradient":o.variant="contained";break;case"secondary":o.variant="outlined";break;case"ghost":o.variant="text";break;case"pill":o.variant="text",o.classes=F(F({},o.classes),a)}return i&&(o.startIcon=e.jsx(r.Box,F({color:t.disabled&&"grey.500"},{children:e.jsx(r.CircularProgress,{size:16,color:t.disabled?"inherit":"primary",thickness:5})}))),e.jsx(r.Button,F({},o))};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var X={exports:{}};function $(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];"object"!=typeof n||Object.isFrozen(n)||$(n)})),e}X.exports=$,X.exports.default=$;class K{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function J(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function ee(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const te=e=>!!e.scope||e.sublanguage&&e.language;class ne{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=J(e)}openNode(e){if(!te(e))return;let t="";t=e.sublanguage?`language-${e.language}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}closeNode(e){te(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const re=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class ie{constructor(){this.rootNode=re(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=re({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ie._collapse(e)})))}}class oe extends ie{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){return new ne(this,this.options).value()}finalize(){return!0}}function ae(e){return e?"string"==typeof e?e:e.source:null}function se(e){return ce("(?=",e,")")}function le(e){return ce("(?:",e,")*")}function ue(e){return ce("(?:",e,")?")}function ce(...e){return e.map((e=>ae(e))).join("")}function de(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>ae(e))).join("|")+")"}function pe(e){return new RegExp(e.toString()+"|").exec("").length-1}const he=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function fe(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=ae(e),i="";for(;r.length>0;){const e=he.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+String(Number(e[1])+t):(i+=e[0],"("===e[0]&&n++)}return i})).map((e=>`(${e})`)).join(t)}const ge="[a-zA-Z]\\w*",me="[a-zA-Z_]\\w*",ve="\\b\\d+(\\.\\d+)?",ye="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",xe="\\b(0b[01]+)",_e={begin:"\\\\[\\s\\S]",relevance:0},be={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[_e]},we={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[_e]},Se=function(e,t,n={}){const r=ee({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=de("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ce(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ce=Se("//","$"),Te=Se("/\\*","\\*/"),Me=Se("#","$"),Ee={scope:"number",begin:ve,relevance:0},Ie={scope:"number",begin:ye,relevance:0},Ae={scope:"number",begin:xe,relevance:0},De={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[_e,{begin:/\[/,end:/\]/,relevance:0,contains:[_e]}]}]},ke={scope:"title",begin:ge,relevance:0},Oe={scope:"title",begin:me,relevance:0},Re={begin:"\\.\\s*"+me,relevance:0};var Ne=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:ge,UNDERSCORE_IDENT_RE:me,NUMBER_RE:ve,C_NUMBER_RE:ye,BINARY_NUMBER_RE:xe,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ce(t,/.*\b/,e.binary,/\b.*/)),ee({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:_e,APOS_STRING_MODE:be,QUOTE_STRING_MODE:we,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},COMMENT:Se,C_LINE_COMMENT_MODE:Ce,C_BLOCK_COMMENT_MODE:Te,HASH_COMMENT_MODE:Me,NUMBER_MODE:Ee,C_NUMBER_MODE:Ie,BINARY_NUMBER_MODE:Ae,REGEXP_MODE:De,TITLE_MODE:ke,UNDERSCORE_TITLE_MODE:Oe,METHOD_GUARD:Re,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function Le(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Pe(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Be(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Le,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function je(e,t){Array.isArray(e.illegal)&&(e.illegal=de(...e.illegal))}function Fe(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Ue(e,t){void 0===e.relevance&&(e.relevance=1)}const ze=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=ce(n.beforeMatch,se(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},He=["of","and","for","in","not","or","if","then","parent","list","value"];function Ve(e,t,n="keyword"){const r=Object.create(null);return"string"==typeof e?i(n,e.split(" ")):Array.isArray(e)?i(n,e):Object.keys(e).forEach((function(n){Object.assign(r,Ve(e[n],t,n))})),r;function i(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,We(n[0],n[1])]}))}}function We(e,t){return t?Number(t):function(e){return He.includes(e.toLowerCase())}(e)?0:1}const Ye={},Ge=e=>{console.error(e)},qe=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Qe=(e,t)=>{Ye[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),Ye[`${e}/${t}`]=!0)},Ze=new Error;function Xe(e,t,{key:n}){let r=0;const i=e[n],o={},a={};for(let e=1;e<=t.length;e++)a[e+r]=i[e],o[e+r]=!0,r+=pe(t[e-1]);e[n]=a,e[n]._emit=o,e[n]._multi=!0}function $e(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Ge("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ze;if("object"!=typeof e.beginScope||null===e.beginScope)throw Ge("beginScope must be object"),Ze;Xe(e,e.begin,{key:"beginScope"}),e.begin=fe(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Ge("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ze;if("object"!=typeof e.endScope||null===e.endScope)throw Ge("endScope must be object"),Ze;Xe(e,e.end,{key:"endScope"}),e.end=fe(e.end,{joinWith:""})}}(e)}function Ke(e){function t(t,n){return new RegExp(ae(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=pe(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(fe(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=ee(e.classNameAliases||{}),function n(i,o){const a=i;if(i.isCompiled)return a;[Pe,Fe,$e,ze].forEach((e=>e(i,o))),e.compilerExtensions.forEach((e=>e(i,o))),i.__beforeBegin=null,[Be,je,Ue].forEach((e=>e(i,o))),i.isCompiled=!0;let s=null;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),s=i.keywords.$pattern,delete i.keywords.$pattern),s=s||/\w+/,i.keywords&&(i.keywords=Ve(i.keywords,e.case_insensitive)),a.keywordPatternRe=t(s,!0),o&&(i.begin||(i.begin=/\B|\b/),a.beginRe=t(a.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),i.end&&(a.endRe=t(a.end)),a.terminatorEnd=ae(a.end)||"",i.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(a.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return ee(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(Je(e))return ee(e,{starts:e.starts?ee(e.starts):null});if(Object.isFrozen(e))return ee(e);return e}("self"===e?i:e)}))),i.contains.forEach((function(e){n(e,a)})),i.starts&&n(i.starts,o),a.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(a),a}(e)}function Je(e){return!!e&&(e.endsWithParent||Je(e.starts))}class et extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const tt=J,nt=ee,rt=Symbol("nomatch");var it=function(e){const t=Object.create(null),n=Object.create(null),r=[];let i=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]};let s={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:oe};function l(e){return s.noHighlightRe.test(e)}function u(e,t,n){let r="",i="";"object"==typeof t?(r=e,n=t.ignoreIllegals,i=t.language):(Qe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qe("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),i=e,r=t),void 0===n&&(n=!0);const o={code:r,language:i};y("before:highlight",o);const a=o.result?o.result:c(o.language,o.code,n);return a.code=o.code,y("after:highlight",a),a}function c(e,n,r,a){const l=Object.create(null);function u(){if(!C.keywords)return void M.addText(E);let e=0;C.keywordPatternRe.lastIndex=0;let t=C.keywordPatternRe.exec(E),n="";for(;t;){n+=E.substring(e,t.index);const i=b.case_insensitive?t[0].toLowerCase():t[0],o=(r=i,C.keywords[r]);if(o){const[e,r]=o;if(M.addText(n),n="",l[i]=(l[i]||0)+1,l[i]<=7&&(I+=r),e.startsWith("_"))n+=t[0];else{const n=b.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0];e=C.keywordPatternRe.lastIndex,t=C.keywordPatternRe.exec(E)}var r;n+=E.substring(e),M.addText(n)}function p(){null!=C.subLanguage?function(){if(""===E)return;let e=null;if("string"==typeof C.subLanguage){if(!t[C.subLanguage])return void M.addText(E);e=c(C.subLanguage,E,!0,T[C.subLanguage]),T[C.subLanguage]=e._top}else e=d(E,C.subLanguage.length?C.subLanguage:null);C.relevance>0&&(I+=e.relevance),M.addSublanguage(e._emitter,e.language)}():u(),E=""}function h(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=b.classNameAliases[e[n]]||e[n],i=t[n];r?M.addKeyword(i,r):(E=i,u(),E=""),n++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&M.openNode(b.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(M.addKeyword(E,b.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),E=""):e.beginScope._multi&&(h(e.beginScope,t),E="")),C=Object.create(e,{parent:{value:C}}),C}function m(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new K(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return m(e.parent,t,n)}function v(e){return 0===C.matcher.regexIndex?(E+=e[0],1):(k=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),i=m(C,e,r);if(!i)return rt;const o=C;C.endScope&&C.endScope._wrap?(p(),M.addKeyword(t,C.endScope._wrap)):C.endScope&&C.endScope._multi?(p(),h(C.endScope,e)):o.skip?E+=t:(o.returnEnd||o.excludeEnd||(E+=t),p(),o.excludeEnd&&(E=t));do{C.scope&&M.closeNode(),C.skip||C.subLanguage||(I+=C.relevance),C=C.parent}while(C!==i.parent);return i.starts&&f(i.starts,e),o.returnEnd?0:t.length}let x={};function _(t,o){const a=o&&o[0];if(E+=t,null==a)return p(),0;if("begin"===x.type&&"end"===o.type&&x.index===o.index&&""===a){if(E+=n.slice(o.index,o.index+1),!i){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=x.rule,t}return 1}if(x=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new K(n),i=[n.__beforeBegin,n["on:begin"]];for(const n of i)if(n&&(n(e,r),r.isMatchIgnored))return v(t);return n.skip?E+=t:(n.excludeBegin&&(E+=t),p(),n.returnBegin||n.excludeBegin||(E=t)),f(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+a+'" for mode "'+(C.scope||"<unnamed>")+'"');throw e.mode=C,e}if("end"===o.type){const e=y(o);if(e!==rt)return e}if("illegal"===o.type&&""===a)return 1;if(D>1e5&&D>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return E+=a,a.length}const b=g(e);if(!b)throw Ge(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const w=Ke(b);let S="",C=a||w;const T={},M=new s.__emitter(s);!function(){const e=[];for(let t=C;t!==b;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>M.openNode(e)))}();let E="",I=0,A=0,D=0,k=!1;try{for(C.matcher.considerAll();;){D++,k?k=!1:C.matcher.considerAll(),C.matcher.lastIndex=A;const e=C.matcher.exec(n);if(!e)break;const t=_(n.substring(A,e.index),e);A=e.index+t}return _(n.substring(A)),M.closeAllNodes(),M.finalize(),S=M.toHTML(),{language:e,value:S,relevance:I,illegal:!1,_emitter:M,_top:C}}catch(t){if(t.message&&t.message.includes("Illegal"))return{language:e,value:tt(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:A,context:n.slice(A-100,A+100),mode:t.mode,resultSoFar:S},_emitter:M};if(i)return{language:e,value:tt(n),illegal:!1,relevance:0,errorRaised:t,_emitter:M,_top:C};throw t}}function d(e,n){n=n||s.languages||Object.keys(t);const r=function(e){const t={value:tt(e),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return t._emitter.addText(e),t}(e),i=n.filter(g).filter(v).map((t=>c(t,e,!1)));i.unshift(r);const o=i.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(g(e.language).supersetOf===t.language)return 1;if(g(t.language).supersetOf===e.language)return-1}return 0})),[l,u]=o,d=l;return d.secondBest=u,d}function p(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=s.languageDetectRe.exec(t);if(n){const t=g(n[1]);return t||(qe(o.replace("{}",n[1])),qe("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>l(e)||g(e)))}(e);if(l(r))return;if(y("before:highlightElement",{el:e,language:r}),e.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),s.throwUnescapedHTML)){throw new et("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const i=t.textContent,a=r?u(i,{language:r,ignoreIllegals:!0}):d(i);e.innerHTML=a.value,function(e,t,r){const i=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${i}`)}(e,r,a.language),e.result={language:a.language,re:a.relevance,relevance:a.relevance},a.secondBest&&(e.secondBest={language:a.secondBest.language,relevance:a.secondBest.relevance}),y("after:highlightElement",{el:e,result:a,text:i})}let h=!1;function f(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(s.cssSelector).forEach(p)}function g(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function m(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function v(e){const t=g(e);return t&&!t.disableAutodetect}function y(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&f()}),!1),Object.assign(e,{highlight:u,highlightAuto:d,highlightAll:f,highlightElement:p,highlightBlock:function(e){return Qe("10.7.0","highlightBlock will be removed entirely in v12.0"),Qe("10.7.0","Please use highlightElement now."),p(e)},configure:function(e){s=nt(s,e)},initHighlighting:()=>{f(),Qe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){f(),Qe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(e){if(Ge("Language definition for '{}' could not be registered.".replace("{}",n)),!i)throw e;Ge(e),o=a}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&m(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:g,registerAliases:m,autoDetection:v,inherit:nt,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)}}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString="11.7.0",e.regex={concat:ce,lookahead:se,either:de,optional:ue,anyNumberOfTimes:le};for(const e in Ne)"object"==typeof Ne[e]&&X.exports(Ne[e]);return Object.assign(e,Ne),e}({}),ot=it;it.HighlightJS=it,it.default=it;var at,st=Z(ot);function lt(){return lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lt.apply(null,arguments)}const ut=e=>S.createElement("svg",lt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),at||(at=S.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 7.001v1H6.5a1.5 1.5 0 0 0-1.5 1.5v9a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-1.5h1v1.5a2.5 2.5 0 0 1-2.5 2.5h-7a2.5 2.5 0 0 1-2.5-2.5v-9a2.5 2.5 0 0 1 2.5-2.5H8Zm8-3h-5.5a1.5 1.5 0 0 0-1.5 1.5v9a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5v-7.5h-2.5a.5.5 0 0 1-.5-.5v-2.5Zm4 2.528v7.972a2.5 2.5 0 0 1-2.5 2.5h-7a2.5 2.5 0 0 1-2.5-2.5v-9a2.5 2.5 0 0 1 2.5-2.5h5.972a.49.49 0 0 1 .382.146l3 3A.49.49 0 0 1 20 6.53Zm-3-.528h1.293L17 4.708v1.293Zm-5.5 7a.5.5 0 1 1 0-1h2a.5.5 0 1 1 0 1h-2Zm0-2a.5.5 0 1 1 0-1h5a.5.5 0 1 1 0 1h-5Zm0-2a.5.5 0 1 1 0-1h5a.5.5 0 1 1 0 1h-5Z"})));var ct;function dt(){return dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt.apply(null,arguments)}const pt=e=>S.createElement("svg",dt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),ct||(ct=S.createElement("path",{fill:"currentColor",d:"M7.146 10.146a.5.5 0 0 1 .638-.057l.07.057 3.792 3.793a.5.5 0 0 0 .638.058l.07-.058 3.792-3.793a.5.5 0 0 1 .765.638l-.057.07-3.793 3.793a1.5 1.5 0 0 1-2.008.102l-.114-.102-3.793-3.793a.5.5 0 0 1 0-.708Z"})));st.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],a=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],s=o,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),u={begin:t.concat(/\b/,t.either(...s),/\s*\(/),relevance:0,keywords:{built_in:s}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(l,{when:e=>e.length<3}),literal:r,type:i,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...a),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:l.concat(a),literal:r,type:i}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},u,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),st.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}));var ht=r.styled(r.Box)((function(e){var t=e.theme;return{background:t.palette.info[400],borderRadius:t.shape.borderRadius,color:t.palette.grey[800],border:"1px solid ".concat(t.palette.grey[300]),overflowX:"hidden",position:"relative",marginBottom:t.spacing(1)}})),ft=r.styled("pre")((function(e){var t=e.theme;return{display:"block",position:"relative",fontFamily:"Menlo-Regular, Courier, monospace",fontSize:13,lineHeight:"17px",borderRadius:t.spacing(.5),margin:0,paddingRight:t.spacing(8)}})),gt=r.styled("code")((function(e){return e.theme,{fontFamily:"Menlo, Courier, monospace",whiteSpace:"pre-wrap",lineHeight:2.7,backgroundColor:"unset",margin:0}})),mt=r.styled(r.Button)((function(e){var t=e.theme;return{position:"absolute",right:t.spacing(.75),top:t.spacing(.5),fontSize:11.5,textTransform:"uppercase",display:"none",backgroundColor:t.palette.info[200]}})),vt=r.styled(r.IconButton)((function(e){var t=e.theme;return{position:"absolute",right:0,top:0,color:t.palette.primary[600],padding:t.spacing(1),alignSelf:"anchor-center"}})),yt=r.styled("pre")((function(e){var t=e.theme;return{padding:t.spacing(.5,.75),"&:hover":{backgroundColor:t.palette.primary[200]},"&:hover .yb-copy-btn":{display:"block"}}})),xt=function(n){var i=n.showCopyButton,o=n.multiBlock,a=n.text,s=n.codeClassName,l=n.preClassName,u=n.lang,c=n.containerClassName,d=n.dataTestId,p=n.enabledExpandCollapse,h=void 0!==p&&p,f=n.collapseHeight,g=void 0===f?120:f,m=n.copyLabel,v=void 0===m?"Copy":m,y=n.showAllLabel,x=void 0===y?"Show All":y,_=n.collapseLabel,b=void 0===_?"Collapse":_,w=n.onCopySuccess,S=r.useTheme(),C=t.useRef(null),T=t.useRef(null),M=t.useState(!h),E=M[0],I=M[1],A=t.useState(!1),D=A[0],k=A[1],O=null!=u?u:"language-plaintext";t.useEffect((function(){st.highlightAll()}),[a]);var R=t.useRef(!1);t.useEffect((function(){var e;R.current?E&&(null==T?void 0:T.current)&&(null===(e=null==T?void 0:T.current)||void 0===e||e.scrollTo({top:0})):R.current=!0}),[E]),t.useLayoutEffect((function(){var e,t;(null==T?void 0:T.current)&&k(h&&Math.round(null!==(t=null===(e=null==T?void 0:T.current)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:0)>g)}),[g,h]);var N=function(e){return z(void 0,void 0,void 0,(function(){var t;return H(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(e)];case 1:return n.sent(),null==w||w(),[3,3];case 2:return t=n.sent(),console.error("Failed to copy:",t),[3,3];case 3:return[2]}}))}))};return e.jsxs(ht,F({className:Y(c),"data-testid":d},{children:[e.jsx(r.Collapse,F({in:E,collapsedSize:D?g:void 0},{children:e.jsx("div",F({ref:T},{children:o&&Array.isArray(a)?a.map((function(t,n){return e.jsxs(yt,F({className:l},{children:[e.jsx(gt,F({className:Y(s,O)},{children:t})),i&&e.jsx(mt,F({size:"small",className:"yb-copy-btn",onClick:function(e){var t;t=e,z(void 0,void 0,void 0,(function(){var e,n,r;return H(this,(function(i){switch(i.label){case 0:return(e=null===(r=null===(n=t.currentTarget.previousSibling)||void 0===n?void 0:n.innerText)||void 0===r?void 0:r.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'"))?[4,N(e)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))})),e.stopPropagation()}},{children:v}))]}),"code-line-".concat(n))})):e.jsxs(ft,F({className:l},{children:[e.jsx(gt,F({className:Y(s,O),ref:C},{children:a})),i&&e.jsx(vt,F({onClick:function(e){!function(){var e,t,n=null===(t=null===(e=C.current)||void 0===e?void 0:e.innerText)||void 0===t?void 0:t.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/g,"$'");n&&N(n)}(),e.stopPropagation()}},{children:e.jsx(ut,{fontSize:"small"})}))]}))}))})),D&&e.jsx(r.Box,F({mt:1,display:"flex",justifyContent:"flex-end"},{children:e.jsxs(r.Box,F({component:"a",style:{cursor:"pointer",display:"flex",alignItems:"center"},onClick:function(e){e.stopPropagation(),I(!E)}},{children:[e.jsx(r.Typography,F({variant:"body2",color:"primary"},{children:e.jsx("strong",{children:E?b:x})})),e.jsx(pt,{style:{marginLeft:S.spacing(.5),transition:"transform 0.3s",transform:E?"rotate(180deg)":"rotate(0deg)"}})]}))}))]}))},_t=i.makeStyles((function(e){var t,n;return{searchBox:{maxWidth:520,flexGrow:1,marginRight:"auto"},containerClassName:{width:"100%",maxWidth:"100%"},preClassName:{width:"100%",overflowX:"hidden"},codeClassName:{maxWidth:"100%",wordBreak:"break-word",overflowWrap:"anywhere"},refreshBtn:{marginRight:e.spacing(1)},codeBlock:{maxHeight:"85px",overflowY:"auto"},codeBlockSqlView:{maxHeight:"140px",overflowY:"auto"},tableHeaderCell:{position:"relative",borderBottom:"1px solid ".concat(e.palette.grey[300]),"&:first-of-type":{padding:e.spacing(.25,0,1,3),"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)")}},"&:last-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)"),right:e.spacing(2)}},"&:before":{content:'""',position:"absolute",right:0,bottom:0,height:"1px",width:"100%"}},rowTableCell:{},tableContainer:{padding:e.spacing(1,0)},tableRow:{cursor:"pointer","&:hover":{backgroundColor:"#F2F6FF"},'&:hover + tr[data-row-type="query-statement"]':{backgroundColor:"#F2F6FF"},'&:has(+ tr[data-row-type="query-statement"]:hover)':{backgroundColor:"#F2F6FF"}},queryTableRow:{cursor:"pointer","&:hover":{backgroundColor:"#F2F6FF"}},queryTableCell:{padding:e.spacing(1,1),borderBottom:"0px"},queryPreBlock:(t={cursor:"pointer",width:"340px",maxWidth:"340px",backgroundColor:"#F8FBFC !important",textAlign:"left"},t[e.breakpoints.up("lg")]={width:"440px",maxWidth:"440px"},t[e.breakpoints.up("xl")]={width:"540px",maxWidth:"540px"},t),queryPreBlockWeb:(n={cursor:"pointer",width:"620px",maxWidth:"620px",backgroundColor:"#F8FBFC !important",textAlign:"left"},n[e.breakpoints.up("lg")]={width:"840px",maxWidth:"840px"},n[e.breakpoints.up("xl")]={width:"940px",maxWidth:"940px"},n),queryPreBlockFull:{cursor:"pointer",width:"100%",maxWidth:"100%",overflow:"hidden",backgroundColor:"#F8FBFC !important",textAlign:"left"},queryCodeElement:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block",width:"100%",maxWidth:"100%",minWidth:0},queryCodeElementWeb:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block"},queryContainerCode:{margin:e.spacing(1,0),width:"100%",maxWidth:"100%",overflow:"hidden"},defaultActions:{textAlign:"right"},overrideExpandBtn:{padding:e.spacing(0,2)},preQueryBlock:{backgroundColor:"#F7FAFC !important"}}})),bt=r.makeStyles({errorContainer:{textAlign:"center",fontSize:"16px",lineHeight:"2em"},sadFace:{width:"40px"},errorText:{fontSize:"13px",fontFamily:"Inter",fontWeight:400}}),wt=function(t){var n=t.type,i=t.uuid,o=t.customErrorMessage,a=bt(),s=e.jsx("span",{}),l=e.jsx("span",{});return"universe"===n&&(s=e.jsx(r.Box,{children:"Seems like universe with UUID ".concat(i," has issues or does not exist.")})),e.jsxs(r.Box,F({className:a.errorContainer},{children:[e.jsx(r.Box,{children:e.jsx("span",{children:"Aww Snap."})}),e.jsx(r.Box,{children:s}),o&&e.jsx(r.Box,{children:e.jsx("span",F({className:a.errorText},{children:o}))}),e.jsx(r.Box,{children:l})]}))},St=r.makeStyles((function(e){return{container:function(t){var n=t.width;return{width:null!=n?n:"170px",alignItems:"center",display:"flex",fontSize:"13px",fontWeight:400,fontFamily:"Inter",color:e.palette.common.lightBlue,fontStyle:"normal"}}}})),Ct=function(t){var n=t.className,i=t.children,o=t.dataTestId,a=St(t);return e.jsx(r.Box,F({className:Y(a.container,n),"data-testid":o},{children:i}))},Tt=function(t){var n=t.label;t.tooltip;var i=U(t,["label","tooltip"]);return e.jsx(r.TextField,F({},i,{label:e.jsx(e.Fragment,{children:n}),variant:"standard"}))},Mt=e=>"checkbox"===e.type,Et=e=>e instanceof Date,It=e=>null==e;const At=e=>"object"==typeof e;var Dt=e=>!It(e)&&!Array.isArray(e)&&At(e)&&!Et(e),kt=e=>Dt(e)&&e.target?Mt(e.target)?e.target.checked:e.target.value:e,Ot=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),Rt=e=>Array.isArray(e)?e.filter(Boolean):[],Nt=e=>void 0===e,Lt=(e,t,n)=>{if(!t||!Dt(e))return n;const r=Rt(t.split(/[,[\].]+?/)).reduce(((e,t)=>It(e)?e:e[t]),e);return Nt(r)||r===e?Nt(e[t])?n:e[t]:r};const Pt="blur",Bt="focusout",jt="change",Ft="onBlur",Ut="onChange",zt="onSubmit",Ht="onTouched",Vt="all",Wt="max",Yt="min",Gt="maxLength",qt="minLength",Qt="pattern",Zt="required",Xt="validate",$t=C.default.createContext(null),Kt=()=>C.default.useContext($t),Jt=e=>{const{children:t,...n}=e;return C.default.createElement($t.Provider,{value:n},t)};var en=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==Vt&&(t._proxyFormState[i]=!r||Vt),n&&(n[i]=!0),e[i]}});return i},tn=e=>Dt(e)&&!Object.keys(e).length,nn=(e,t,n)=>{const{name:r,...i}=e;return tn(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||Vt)))},rn=e=>Array.isArray(e)?e:[e],on=(e,t,n)=>n&&t?e===t:!e||!t||e===t||rn(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function an(e){const t=C.default.useRef(e);t.current=e,C.default.useEffect((()=>{const n=!e.disabled&&t.current.subject.subscribe({next:t.current.callback});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var sn=e=>"string"==typeof e,ln=(e,t,n,r)=>sn(e)?(r&&t.watch.add(e),Lt(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),Lt(n,e)))):(r&&(t.watchAll=!0),n),un="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function cn(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(un&&(e instanceof Blob||e instanceof FileList)||!n&&!Dt(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return Dt(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=cn(e[n]);else t=e}return t}function dn(e){const t=Kt(),{name:n,control:r=t.control,shouldUnregister:i}=e,o=Ot(r._names.array,n),a=function(e){const t=Kt(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e||{},s=C.default.useRef(r);s.current=r,an({disabled:o,subject:n._subjects.watch,callback:e=>{if(on(s.current,e.name,a)){const t=ln(s.current,n._names,e.values||n._formValues);u(Nt(t)?i:cn(t))}}});const[l,u]=C.default.useState(Nt(i)?n._getWatch(r):i);return C.default.useEffect((()=>n._removeUnmounted())),l}({control:r,name:n,defaultValue:Lt(r._formValues,n,Lt(r._defaultValues,n,e.defaultValue)),exact:!0}),s=function(e){const t=Kt(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[a,s]=C.default.useState(n._formState),l=C.default.useRef(!0),u=C.default.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=C.default.useRef(i);return c.current=i,an({disabled:r,callback:C.default.useCallback((e=>l.current&&on(c.current,e.name,o)&&nn(e,u.current)&&s({...n._formState,...e})),[n,o]),subject:n._subjects.state}),C.default.useEffect((()=>{l.current=!0;const e=n._proxyFormState.isDirty&&n._getDirty();return e!==n._formState.isDirty&&n._subjects.state.next({isDirty:e}),n._updateValid(),()=>{l.current=!1}}),[n]),en(a,n,u.current,!1)}({control:r,name:n}),l=C.default.useRef(r.register(n,{...e.rules,value:a}));return C.default.useEffect((()=>{const e=(e,t)=>{const n=Lt(r._fields,e);n&&(n._f.mount=t)};return e(n,!0),()=>{const t=r._options.shouldUnregister||i;(o?t&&!r._stateFlags.action:t)?r.unregister(n):e(n,!1)}}),[n,r,o,i]),{field:{name:n,value:a,onChange:C.default.useCallback((e=>l.current.onChange({target:{value:kt(e),name:n},type:jt})),[n]),onBlur:C.default.useCallback((()=>l.current.onBlur({target:{value:Lt(r._formValues,n),name:n},type:Pt})),[n,r]),ref:e=>{const t=Lt(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Lt(s.errors,n)},isDirty:{enumerable:!0,get:()=>!!Lt(s.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Lt(s.touchedFields,n)},error:{enumerable:!0,get:()=>Lt(s.errors,n)}})}}var pn=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},hn=e=>/^\w*$/.test(e),fn=e=>Rt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function gn(e,t,n){let r=-1;const i=hn(t)?[t]:fn(t),o=i.length,a=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==a){const n=e[t];o=Dt(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const mn=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=Lt(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else Dt(r)&&mn(r,t)}}};var vn=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),yn=(e,t,n)=>{const r=Rt(Lt(e,n));return gn(r,"root",t[n]),gn(e,n,r),e},xn=e=>"boolean"==typeof e,_n=e=>"file"===e.type,bn=e=>"function"==typeof e,wn=e=>sn(e)||C.default.isValidElement(e),Sn=e=>"radio"===e.type,Cn=e=>e instanceof RegExp;const Tn={value:!1,isValid:!1},Mn={value:!0,isValid:!0};var En=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Nt(e[0].attributes.value)?Nt(e[0].value)||""===e[0].value?Mn:{value:e[0].value,isValid:!0}:Mn:Tn}return Tn};const In={isValid:!1,value:null};var An=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),In):In;function Dn(e,t,n="validate"){if(wn(e)||Array.isArray(e)&&e.every(wn)||xn(e)&&!e)return{type:n,message:wn(e)?e:"",ref:t}}var kn=e=>Dt(e)&&!Cn(e)?e:{value:e,message:""},On=async(e,t,n,r,i)=>{const{ref:o,refs:a,required:s,maxLength:l,minLength:u,min:c,max:d,pattern:p,validate:h,name:f,valueAsNumber:g,mount:m,disabled:v}=e._f;if(!m||v)return{};const y=a?a[0]:o,x=e=>{r&&y.reportValidity&&(y.setCustomValidity(xn(e)?"":e||""),y.reportValidity())},_={},b=Sn(o),w=Mt(o),S=b||w,C=(g||_n(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,T=pn.bind(null,f,n,_),M=(e,t,n,r=Gt,i=qt)=>{const a=e?t:n;_[f]={type:e?r:i,message:a,ref:o,...T(e?r:i,a)}};if(i?!Array.isArray(t)||!t.length:s&&(!S&&(C||It(t))||xn(t)&&!t||w&&!En(a).isValid||b&&!An(a).isValid)){const{value:e,message:t}=wn(s)?{value:!!s,message:s}:kn(s);if(e&&(_[f]={type:Zt,message:t,ref:y,...T(Zt,t)},!n))return x(t),_}if(!(C||It(c)&&It(d))){let e,r;const i=kn(d),a=kn(c);if(It(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,u="week"==o.type;sn(i.value)&&t&&(e=l?s(t)>s(i.value):u?t>i.value:n>new Date(i.value)),sn(a.value)&&t&&(r=l?s(t)<s(a.value):u?t<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||(t?+t:t);It(i.value)||(e=n>i.value),It(a.value)||(r=n<a.value)}if((e||r)&&(M(!!e,i.message,a.message,Wt,Yt),!n))return x(_[f].message),_}if((l||u)&&!C&&(sn(t)||i&&Array.isArray(t))){const e=kn(l),r=kn(u),i=!It(e.value)&&t.length>e.value,o=!It(r.value)&&t.length<r.value;if((i||o)&&(M(i,e.message,r.message),!n))return x(_[f].message),_}if(p&&!C&&sn(t)){const{value:e,message:r}=kn(p);if(Cn(e)&&!t.match(e)&&(_[f]={type:Qt,message:r,ref:o,...T(Qt,r)},!n))return x(r),_}if(h)if(bn(h)){const e=Dn(await h(t),y);if(e&&(_[f]={...e,...T(Xt,e.message)},!n))return x(e.message),_}else if(Dt(h)){let e={};for(const r in h){if(!tn(e)&&!n)break;const i=Dn(await h[r](t),y,r);i&&(e={...i,...T(r,i.message)},x(i.message),n&&(_[f]=e))}if(!tn(e)&&(_[f]={ref:y,...e},!n))return _}return x(!0),_},Rn=e=>({isOnSubmit:!e||e===zt,isOnBlur:e===Ft,isOnChange:e===Ut,isOnAll:e===Vt,isOnTouch:e===Ht});function Nn(e){for(const t in e)if(!Nt(e[t]))return!1;return!0}function Ln(e,t){const n=hn(t)?[t]:fn(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Nt(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(o=e);++i<a.length;){const t=a[i];r=r?r[t]:e[t],s===i&&(Dt(r)&&tn(r)||Array.isArray(r)&&Nn(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function Pn(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var Bn=e=>It(e)||!At(e);function jn(e,t){if(Bn(e)||Bn(t))return e===t;if(Et(e)&&Et(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Et(n)&&Et(e)||Dt(n)&&Dt(e)||Array.isArray(n)&&Array.isArray(e)?!jn(n,e):n!==e)return!1}}return!0}var Fn=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Un=e=>"select-multiple"===e.type,zn=e=>Fn(e)&&e.isConnected,Hn=e=>{for(const t in e)if(bn(e[t]))return!0;return!1};function Vn(e,t={}){const n=Array.isArray(e);if(Dt(e)||n)for(const n in e)Array.isArray(e[n])||Dt(e[n])&&!Hn(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Vn(e[n],t[n])):It(e[n])||(t[n]=!0);return t}function Wn(e,t,n){const r=Array.isArray(e);if(Dt(e)||r)for(const r in e)Array.isArray(e[r])||Dt(e[r])&&!Hn(e[r])?Nt(t)||Bn(n[r])?n[r]=Array.isArray(e[r])?Vn(e[r],[]):{...Vn(e[r])}:Wn(e[r],It(t)?{}:t[r],n[r]):jn(e[r],t[r])?delete n[r]:n[r]=!0;return n}var Yn=(e,t)=>Wn(e,t,Vn(t)),Gn=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Nt(e)?e:t?""===e?NaN:e?+e:e:n&&sn(e)?new Date(e):r?r(e):e;function qn(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return _n(t)?t.files:Sn(t)?An(e.refs).value:Un(t)?[...t.selectedOptions].map((({value:e})=>e)):Mt(t)?En(e.refs).value:Gn(Nt(t.value)?e.ref.value:t.value,e)}var Qn=e=>Nt(e)?e:Cn(e)?e.source:Dt(e)?Cn(e.value)?e.value.source:e.value:e;function Zn(e,t,n){const r=Lt(e,n);if(r||hn(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=Lt(t,r),a=Lt(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};i.pop()}return{name:n}}const Xn={mode:zt,reValidateMode:Ut,shouldFocusError:!0};function $n(e={}){let t,n={...Xn,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=cn(n.defaultValues)||{},a=n.shouldUnregister?{}:cn(o),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={watch:Pn(),array:Pn(),state:Pn()},p=Rn(n.mode),h=Rn(n.reValidateMode),f=n.criteriaMode===Vt,g=async()=>{if(c.isValid){const e=n.resolver?tn((await _()).errors):await b(i,!0);e!==r.isValid&&(r.isValid=e,d.state.next({isValid:e}))}},m=e=>c.isValidating&&e!==r.isValidating&&d.state.next({isValidating:e}),v=(e,t,n,r)=>{const l=Lt(i,e);if(l){const i=Lt(a,e,Nt(n)?Lt(o,e):n);Nt(i)||r&&r.defaultChecked||t?gn(a,e,t?i:qn(l._f)):C(e,i),s.mount&&g()}},y=(e,t,n,i,a)=>{let s=!1,l=!1;const u={name:e};if((!n||i)&&(c.isDirty&&(l=r.isDirty,r.isDirty=u.isDirty=w(),s=l!==u.isDirty),c.dirtyFields)){l=Lt(r.dirtyFields,e);const n=jn(Lt(o,e),t);n?Ln(r.dirtyFields,e):gn(r.dirtyFields,e,!0),u.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=Lt(r.touchedFields,e);t||(gn(r.touchedFields,e,n),u.touchedFields=r.touchedFields,s=s||c.touchedFields&&t!==n)}return s&&a&&d.state.next(u),s?u:{}},x=(n,i,o,a)=>{const s=Lt(r.errors,n),l=c.isValid&&xn(i)&&r.isValid!==i;var p;if(e.delayError&&o?(p=()=>((e,t)=>{gn(r.errors,e,t),d.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(u),u=window.setTimeout(p,e)},t(e.delayError)):(clearTimeout(u),t=null,o?gn(r.errors,n,o):Ln(r.errors,n)),(o?!jn(s,o):s)||!tn(a)||l){const e={...a,...l&&xn(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}m(!1)},_=async e=>await n.resolver(a,n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=Lt(t,n);e&&gn(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),b=async(e,t,i={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=l.array.has(e.name),u=await On(s,Lt(a,e.name),f,n.shouldUseNativeValidation,o);if(u[e.name]&&(i.valid=!1,t))break;!t&&(Lt(u,e.name)?o?yn(r.errors,u,e.name):gn(r.errors,e.name,u[e.name]):Ln(r.errors,e.name))}o&&await b(o,t,i)}}return i.valid},w=(e,t)=>(e&&t&&gn(a,e,t),!jn(A(),o)),S=(e,t,n)=>ln(e,l,{...s.mount?a:Nt(t)?o:sn(e)?{[e]:t}:t},n),C=(e,t,n={})=>{const r=Lt(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&gn(a,e,Gn(t,n)),o=un&&Fn(n.ref)&&It(t)?"":t,Un(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?Mt(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):_n(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||d.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&I(e)},T=(e,t,n)=>{for(const r in t){const o=t[r],a=`${e}.${r}`,s=Lt(i,a);!l.array.has(e)&&Bn(o)&&(!s||s._f)||Et(o)?C(a,o,n):T(a,o,n)}},M=(e,t,n={})=>{const s=Lt(i,e),u=l.array.has(e),p=cn(t);gn(a,e,p),u?(d.array.next({name:e,values:a}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=Yn(o,a),d.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:w(e,p)}))):!s||s._f||It(p)?C(e,p,n):T(e,p,n),vn(e,l)&&d.state.next({}),d.watch.next({name:e})},E=async e=>{const o=e.target;let s=o.name;const u=Lt(i,s),v=()=>o.type?qn(u._f):kt(e);if(u){let o,S;const C=v(),T=e.type===Pt||e.type===Bt,M=!((w=u._f).mount&&(w.required||w.min||w.max||w.maxLength||w.minLength||w.pattern||w.validate)||n.resolver||Lt(r.errors,s)||u._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(T,Lt(r.touchedFields,s),r.isSubmitted,h,p),E=vn(s,l,T);gn(a,s,C),T?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const A=y(s,C,T,!1),D=!tn(A)||E;if(!T&&d.watch.next({name:s,type:e.type}),M)return c.isValid&&g(),D&&d.state.next({name:s,...E?{}:A});if(!T&&E&&d.state.next({}),m(!0),n.resolver){const{errors:e}=await _([s]),t=Zn(r.errors,i,s),n=Zn(e,i,t.name||s);o=n.error,s=n.name,S=tn(e)}else o=(await On(u,Lt(a,s),f,n.shouldUseNativeValidation))[s],o?S=!1:c.isValid&&(S=await b(i,!0));Bn(C)&&v()!==C?m(!1):(u._f.deps&&I(u._f.deps),x(s,S,o,A))}var w},I=async(e,t={})=>{let o,a;const s=rn(e);if(m(!0),n.resolver){const t=await(async e=>{const{errors:t}=await _();if(e)for(const n of e){const e=Lt(t,n);e?gn(r.errors,n,e):Ln(r.errors,n)}else r.errors=t;return t})(Nt(e)?e:s);o=tn(t),a=e?!s.some((e=>Lt(t,e))):o}else e?(a=(await Promise.all(s.map((async e=>{const t=Lt(i,e);return await b(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&g()):a=o=await b(i);return d.state.next({...!sn(e)||c.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&mn(i,(e=>e&&Lt(r.errors,e)),e?s:l.mount),a},A=e=>{const t={...o,...s.mount?a:{}};return Nt(e)?t:sn(e)?Lt(t,e):e.map((e=>Lt(t,e)))},D=(e,t)=>({invalid:!!Lt((t||r).errors,e),isDirty:!!Lt((t||r).dirtyFields,e),isTouched:!!Lt((t||r).touchedFields,e),error:Lt((t||r).errors,e)}),k=(e,t={})=>{for(const s of e?rn(e):l.mount)l.mount.delete(s),l.array.delete(s),Lt(i,s)&&(t.keepValue||(Ln(i,s),Ln(a,s)),!t.keepError&&Ln(r.errors,s),!t.keepDirty&&Ln(r.dirtyFields,s),!t.keepTouched&&Ln(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&Ln(o,s));d.watch.next({}),d.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},O=(e,t={})=>{let r=Lt(i,e);const u=xn(t.disabled);return gn(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?u&&gn(a,e,t.disabled?void 0:Lt(a,e,qn(r._f))):v(e,!0,t.value),{...u?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:Qn(t.min),max:Qn(t.max),minLength:Qn(t.minLength),maxLength:Qn(t.maxLength),pattern:Qn(t.pattern)}:{},name:e,onChange:E,onBlur:E,ref:a=>{if(a){O(e,t),r=Lt(i,e);const n=Nt(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>Sn(e)||Mt(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;gn(i,e,{_f:{...r._f,...s?{refs:[...l.filter(zn),n,...Array.isArray(Lt(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=Lt(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Ot(l.array,e)||!s.action)&&l.unMount.add(e)}}},R=()=>n.shouldFocusError&&mn(i,(e=>e&&Lt(r.errors,e)),l.mount);return{control:{register:O,unregister:k,getFieldState:D,_executeSchema:_,_focusError:R,_getWatch:S,_getDirty:w,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=Lt(i,e);t&&(t._f.refs?t._f.refs.every((e=>!zn(e))):!zn(t._f.ref))&&k(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,p=!0)=>{if(l&&n){if(s.action=!0,p&&Array.isArray(Lt(i,e))){const t=n(Lt(i,e),l.argA,l.argB);u&&gn(i,e,t)}if(p&&Array.isArray(Lt(r.errors,e))){const t=n(Lt(r.errors,e),l.argA,l.argB);u&&gn(r.errors,e,t),((e,t)=>{!Rt(Lt(e,t)).length&&Ln(e,t)})(r.errors,e)}if(c.touchedFields&&p&&Array.isArray(Lt(r.touchedFields,e))){const t=n(Lt(r.touchedFields,e),l.argA,l.argB);u&&gn(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=Yn(o,a)),d.state.next({name:e,isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else gn(a,e,t)},_getFieldArray:t=>Rt(Lt(s.mount?a:o,t,e.shouldUnregister?Lt(o,t,[]):[])),_subjects:d,_proxyFormState:c,get _fields(){return i},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:I,register:O,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let s=!0,l=cn(a);d.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await _();r.errors=e,l=t}else await b(i);tn(r.errors)?(d.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),R())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:tn(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>bn(e)?d.watch.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:M,getValues:A,reset:(t,n)=>((t,n={})=>{const u=t||o,p=cn(u),h=t&&!tn(t)?p:o;if(n.keepDefaultValues||(o=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)Lt(r.dirtyFields,e)?gn(h,e,Lt(a,e)):M(e,Lt(h,e));else{if(un&&Nt(t))for(const e of l.mount){const t=Lt(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Fn(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}a=e.shouldUnregister?n.keepDefaultValues?cn(o):{}:p,d.array.next({values:h}),d.watch.next({values:h})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!c.isValid||!!n.keepIsValid,s.watch=!!e.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||jn(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?Yn(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(bn(t)?t(a):t,n),resetField:(e,t={})=>{Lt(i,e)&&(Nt(t.defaultValue)?M(e,Lt(o,e)):(M(e,t.defaultValue),gn(o,e,t.defaultValue)),t.keepTouched||Ln(r.touchedFields,e),t.keepDirty||(Ln(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,Lt(o,e)):w()),t.keepError||(Ln(r.errors,e),c.isValid&&g()),d.state.next({...r}))},clearErrors:e=>{e?rn(e).forEach((e=>Ln(r.errors,e))):r.errors={},d.state.next({errors:r.errors})},unregister:k,setError:(e,t,n)=>{const o=(Lt(i,e,{_f:{}})._f||{}).ref;gn(r.errors,e,{...t,ref:o}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=Lt(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}function Kn(e={}){const t=C.default.useRef(),[n,r]=C.default.useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});t.current||(t.current={...$n(e),formState:n});const i=t.current.control;return i._options=e,an({subject:i._subjects.state,callback:C.default.useCallback((e=>{nn(e,i._proxyFormState,!0)&&(i._formState={...i._formState,...e},r({...i._formState}))}),[i])}),C.default.useEffect((()=>{i._stateFlags.mount||(i._proxyFormState.isValid&&i._updateValid(),i._stateFlags.mount=!0),i._stateFlags.watch&&(i._stateFlags.watch=!1,i._subjects.state.next({})),i._removeUnmounted()})),C.default.useEffect((()=>{n.submitCount&&i._focusError()}),[i,n.submitCount]),t.current.formState=en(n,i),t.current}var Jn,er=function(t){var n,r,i=t.name,o=t.rules,a=t.defaultValue,s=t.control,l=t.shouldUnregister,u=U(t,["name","rules","defaultValue","control","shouldUnregister"]),c=dn({name:i,rules:o,defaultValue:a,control:s,shouldUnregister:l}),d=c.field,p=d.ref,h=U(d,["ref"]),f=c.fieldState;return e.jsx(Tt,F({},h,u,{inputRef:p,error:!!f.error,helperText:null!==(r=null===(n=f.error)||void 0===n?void 0:n.message)&&void 0!==r?r:u.helperText}))};function tr(){return tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tr.apply(null,arguments)}const nr=e=>S.createElement("svg",tr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),Jn||(Jn=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 8a1 1 0 0 0-1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0-1-1Zm0-3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"}))));var rr,ir=r.makeStyles((function(e){return{icon:{width:14,height:14,cursor:"pointer",color:e.palette.grey[500]}}})),or=r.makeStyles((function(e){return{arrow:{"&:before":{backgroundColor:e.palette.grey[900],border:"1px solid ".concat(e.palette.grey[900])}},tooltip:{backgroundColor:e.palette.grey[900],border:"1px solid ".concat(e.palette.grey[900]),color:e.palette.common.white}}})),ar=function(t){var n=t.children,i=t.dark,o=U(t,["children","dark"]),a=ir(),s=or();return e.jsx(r.Tooltip,F({arrow:!0,classes:i?s:void 0,placement:"top-start"},o,{children:null!=n?n:e.jsx(r.Box,F({lineHeight:0,ml:.5},{children:e.jsx(nr,{className:a.icon})}))}))},sr=r.makeStyles((function(e){return{menuPaper:{maxHeight:400,marginTop:"6px"}}})),lr=function(t){var n=t.label,i=t.tooltip,o=t.renderValue,a=t.menuProps,s=t.selectProps,l=void 0===s?{}:s,u=U(t,["label","tooltip","renderValue","menuProps","selectProps"]),c=sr();return e.jsx(r.TextField,F({},u,{label:e.jsxs(e.Fragment,{children:[n," ",i&&e.jsx(ar,{title:i,interactive:!0})]}),select:!0,SelectProps:F({autoWidth:!1,IconComponent:pt,displayEmpty:!0,renderValue:o,MenuProps:F({classes:{paper:c.menuPaper},getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"left"}},a)},l),variant:"standard"}))};function ur(){return ur=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ur.apply(null,arguments)}const cr=e=>S.createElement("svg",ur({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),rr||(rr=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 12a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 0 1-2 0V8a1 1 0 0 1 1-1Z"}))));var dr;function pr(){return pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pr.apply(null,arguments)}const hr=e=>S.createElement("svg",pr({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),dr||(dr=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10S2 17.514 2 12 6.486 2 12 2Zm0 1c-4.963 0-9 4.037-9 9s4.037 9 9 9 9-4.037 9-9-4.037-9-9-9Zm2.713 6.309a.715.715 0 0 1 .979-.193c.325.212.413.642.167.995l-4.68 4.58a.718.718 0 0 1-.527.307L10.59 15a.717.717 0 0 1-.5-.202L8.207 12.95a.683.683 0 0 1 0-.979.717.717 0 0 1 .999 0l1.313 1.287Z"}))));var fr;function gr(){return gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gr.apply(null,arguments)}const mr=e=>S.createElement("svg",gr({xmlns:"http://www.w3.org/2000/svg",width:24,height:24},e),fr||(fr=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M0 0h24v24H0z"}),S.createElement("path",{fill:"currentColor",d:"M12 2a10 10 0 0 1 10 10c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2Zm0 1a9 9 0 1 0 0 18 9 9 0 0 0 0-18Zm0 7a1 1 0 0 1 1 1v5a1 1 0 0 1-2 0v-5a1 1 0 0 1 1-1Zm0-3a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z"}))));var vr,yr,xr,_r,br,wr,Sr,Cr,Tr;function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mr.apply(null,arguments)}const Er=e=>S.createElement("svg",Mr({xmlns:"http://www.w3.org/2000/svg",style:{display:"block",shapeRendering:"auto",backgroundPosition:"initial initial",backgroundRepeat:"initial initial"},width:24,height:24,viewBox:"30 30 40 40",preserveAspectRatio:"xMidYMid"},e),vr||(vr=S.createElement("circle",{cx:65,cy:50,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.8140589569160996s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.8140589569160996s"}))),yr||(yr=S.createElement("circle",{cx:61.491,cy:59.642,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.5873015873015872s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.5873015873015872s"}))),xr||(xr=S.createElement("circle",{cx:52.605,cy:64.772,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.3605442176870748s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.3605442176870748s"}))),_r||(_r=S.createElement("circle",{cx:42.5,cy:62.99,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-1.1337868480725624s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-1.1337868480725624s"}))),br||(br=S.createElement("circle",{cx:35.905,cy:55.13,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.9070294784580498s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.9070294784580498s"}))),wr||(wr=S.createElement("circle",{cx:35.905,cy:44.87,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.6802721088435374s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.6802721088435374s"}))),Sr||(Sr=S.createElement("circle",{cx:42.5,cy:37.01,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.4535147392290249s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.4535147392290249s"}))),Cr||(Cr=S.createElement("circle",{cx:52.605,cy:35.228,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"-0.22675736961451246s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"-0.22675736961451246s"}))),Tr||(Tr=S.createElement("circle",{cx:61.491,cy:40.358,fill:"#bfcded",r:3},S.createElement("animate",{attributeName:"r",values:"1.7999999999999998;1.7999999999999998;3;1.7999999999999998;1.7999999999999998",dur:"2.0408163265306123s",repeatCount:"indefinite",begin:"0s"}),S.createElement("animate",{attributeName:"fill",values:"#bfcded;#bfcded;#2b59c3;#bfcded;#bfcded",repeatCount:"indefinite",dur:"2.0408163265306123s",begin:"0s"}))));var Ir;exports.AlertVariant=void 0,(Ir=exports.AlertVariant||(exports.AlertVariant={})).Info="info",Ir.Warning="warning",Ir.Error="error",Ir.Success="success",Ir.InProgress="inProgress";var Ar=r.makeStyles((function(e){return{root:function(t){var n=t.position;return{padding:e.spacing(1),borderRadius:e.shape.borderRadius,display:"flex",alignItems:"center",marginTop:58*(null!=n?n:0)}},icon:{width:e.spacing(3),height:e.spacing(3),minWidth:e.spacing(3),minHeight:e.spacing(3)},warning:{background:e.palette.info[200]},info:{background:e.palette.info[100]},success:{background:e.palette.success[100]},error:{background:e.palette.error[100]},toastWarning:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.warning[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},toastInfo:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.info[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},toastSuccess:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.success[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},toastError:{padding:e.spacing(1.5,1),borderWidth:"1px",borderStyle:"solid",borderColor:e.palette.error[300],boxShadow:e.shape.shadowLight,minWidth:"200px"},text:{marginLeft:e.spacing(1),marginRight:"auto"},close:{height:e.spacing(1.5),width:e.spacing(1.5),fill:e.palette.text.primary,marginRight:e.spacing(.5),marginLeft:e.spacing(1.5),cursor:"pointer"},warningIcon:{color:e.palette.warning[700]},infoIcon:{color:e.palette.info[700]},successIcon:{color:e.palette.success[700]},errorIcon:{color:e.palette.error[700]},inProgressIcon:{color:e.palette.success[700]}}})),Dr=function(t){var n=t.open,i=t.text,a=t.autoDismiss,s=t.dataTestId,l=t.onClose,u=t.variant,c=void 0===u?exports.AlertVariant.Info:u,d=t.isToast,p=void 0!==d&&d,h=t.width,f=t.icon,g=t.className,m=t.transitionTimeout,v=U(t,["open","text","autoDismiss","dataTestId","onClose","variant","isToast","width","icon","className","transitionTimeout"]),y=Ar(t),x=void 0===h?"auto":"".concat(h,"px"),_=y.root,b=e.jsx("span",{});switch(c){case exports.AlertVariant.Warning:_=Y(_,y.warning,p&&y.toastWarning),b=e.jsx(cr,{className:Y(y.icon,y.warningIcon)});break;case exports.AlertVariant.Success:_=Y(_,y.success,p&&y.toastSuccess),b=e.jsx(hr,{className:Y(y.icon,y.successIcon)});break;case exports.AlertVariant.Error:_=Y(_,y.error,p&&y.toastError),b=e.jsx(cr,{className:Y(y.icon,y.errorIcon)});break;case exports.AlertVariant.InProgress:_=Y(_,y.info,p&&y.toastInfo),b=e.jsx(Er,{className:Y(y.icon,y.inProgressIcon)});break;case exports.AlertVariant.Info:default:_=Y(_,y.info,p&&y.toastInfo),b=e.jsx(mr,{className:Y(y.icon,y.infoIcon)})}return p?e.jsx(r.Snackbar,F({open:n,autoHideDuration:null!=a?a:6e3,TransitionComponent:r.Fade,anchorOrigin:{vertical:"top",horizontal:"center"},onClose:function(e,t){"clickaway"!==t&&l&&l()}},v,{children:e.jsxs("div",F({"data-test-id":s,className:_,role:"alert","aria-label":"alert ".concat(c),style:{width:x}},{children:[null!=f?f:b,e.jsx("span",F({className:y.text},{children:i})),l&&e.jsx(o.Close,{onClick:l,className:y.close})]}))})):e.jsx(r.Fade,F({in:n,timeout:m},{children:e.jsxs("div",F({className:Y(_,null!=g?g:""),role:"alert","data-testid":s,"aria-label":"alert ".concat(c),style:{width:x}},{children:[null!=f?f:b,e.jsx("span",F({className:y.text},{children:i})),l&&e.jsx(o.Close,{onClick:l,className:y.close})]}))}))},kr=function(t){var n=t.text,i=U(t,["text"]);return e.jsx(r.Box,F({maxWidth:1024,marginRight:"auto"},i,{children:e.jsx(Dr,{open:!0,text:null!=n?n:"Something went wrong. Please try again.",variant:exports.AlertVariant.Error})}))},Or=r.makeStyles((function(e){return{checkboxIcon:{width:16,height:16,margin:"3.14px",boxShadow:"inset 0 0 0 2px ".concat(e.palette.grey[400],", inset 0 -1px 0 ").concat(e.palette.grey[400]),backgroundColor:e.palette.grey[100],"input:hover ~ &":{backgroundColor:e.palette.grey[100]},"input:disabled ~ &":{boxShadow:"inset 0 0 0 2px ".concat(e.palette.grey[200],", inset 0 -1px 0 ").concat(e.palette.grey[200])}},checkboxCheckedIcon:{width:16,height:16,margin:"3.14px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.palette.primary.main,boxShadow:"inset 0 0 0 2px ".concat(e.palette.primary.dark,", inset 0 -1px 0 ").concat(e.palette.primary.dark),color:"#fff",fontSize:"12px",fontWeight:"bold","&::after":{content:'"✓"',fontSize:"12px",fontWeight:"bold"}}}})),Rr=function(t){var n=t.label,i=t.labelClassName,o=t.showCheckedIcon,a=void 0!==o&&o,s=U(t,["label","labelClassName","showCheckedIcon"]),l=Or();return e.jsx(r.FormControlLabel,{control:e.jsx(r.Checkbox,F({color:"primary"},s,{icon:e.jsx("span",{className:l.checkboxIcon}),checkedIcon:a?e.jsx("span",{className:l.checkboxCheckedIcon}):void 0})),label:e.jsx(r.Typography,F({component:"span",variant:"body2"},{children:n})),className:i})};function Nr(e){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(e)}function Lr(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Pr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function Br(e){Pr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Nr(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}var jr={};function Fr(){return jr}function Ur(e){if(Pr(1,arguments),!function(e){return Pr(1,arguments),e instanceof Date||"object"===Nr(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=Br(e);return!isNaN(Number(t))}var zr={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function Hr(e,t,n){Pr(2,arguments);var r,i=function(e,t){return Pr(2,arguments),Br(e).getTime()-Br(t).getTime()}(e,t)/36e5;return((r=null==n?void 0:n.roundingMethod)?zr[r]:zr.trunc)(i)}function Vr(e,t){return Pr(2,arguments),function(e,t){Pr(2,arguments);var n=Br(e).getTime(),r=Lr(t);return new Date(n+r)}(e,-Lr(t))}function Wr(e){Pr(1,arguments);var t=Br(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function Yr(e){Pr(1,arguments);var t=Br(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Wr(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Wr(o);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Gr(e){Pr(1,arguments);var t=Br(e),n=Wr(t).getTime()-function(e){Pr(1,arguments);var t=Yr(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Wr(n)}(t).getTime();return Math.round(n/6048e5)+1}function qr(e,t){var n,r,i,o,a,s,l,u;Pr(1,arguments);var c=Fr(),d=Lr(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Br(e),h=p.getUTCDay(),f=(h<d?7:0)+h-d;return p.setUTCDate(p.getUTCDate()-f),p.setUTCHours(0,0,0,0),p}function Qr(e,t){var n,r,i,o,a,s,l,u;Pr(1,arguments);var c=Br(e),d=c.getUTCFullYear(),p=Fr(),h=Lr(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:p.firstWeekContainsDate)&&void 0!==r?r:null===(l=p.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(d+1,0,h),f.setUTCHours(0,0,0,0);var g=qr(f,t),m=new Date(0);m.setUTCFullYear(d,0,h),m.setUTCHours(0,0,0,0);var v=qr(m,t);return c.getTime()>=g.getTime()?d+1:c.getTime()>=v.getTime()?d:d-1}function Zr(e,t){Pr(1,arguments);var n=Br(e),r=qr(n,t).getTime()-function(e,t){var n,r,i,o,a,s,l,u;Pr(1,arguments);var c=Fr(),d=Lr(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),p=Qr(e,t),h=new Date(0);return h.setUTCFullYear(p,0,d),h.setUTCHours(0,0,0,0),qr(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function Xr(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var $r={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return Xr("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):Xr(n+1,2)},d:function(e,t){return Xr(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return Xr(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Xr(e.getUTCHours(),t.length)},m:function(e,t){return Xr(e.getUTCMinutes(),t.length)},s:function(e,t){return Xr(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return Xr(Math.floor(r*Math.pow(10,n-3)),t.length)}},Kr="midnight",Jr="noon",ei="morning",ti="afternoon",ni="evening",ri="night",ii={G:function(e,t,n){var r=e.getUTCFullYear()>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){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $r.y(e,t)},Y:function(e,t,n,r){var i=Qr(e,r),o=i>0?i:1-i;return"YY"===t?Xr(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):Xr(o,t.length)},R:function(e,t){return Xr(Yr(e),t.length)},u:function(e,t){return Xr(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Xr(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){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Xr(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){var r=e.getUTCMonth();switch(t){case"M":case"MM":return $r.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){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return Xr(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){var i=Zr(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):Xr(i,t.length)},I:function(e,t,n){var r=Gr(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Xr(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){var r=function(e){Pr(1,arguments);var t=Br(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Xr(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();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){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Xr(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Xr(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return Xr(i,t.length);case"io":return n.ordinalNumber(i,{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){var r=e.getUTCHours()/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){var r,i=e.getUTCHours();switch(r=12===i?Jr:0===i?Kr:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?ni:i>=12?ti:i>=4?ei:ri,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $r.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Xr(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Xr(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return ai(i);case"XXXX":case"XX":return si(i);default:return si(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return ai(i);case"xxxx":case"xx":return si(i);default:return si(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+oi(i,":");default:return"GMT"+si(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+oi(i,":");default:return"GMT"+si(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return Xr(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return Xr((r._originalDate||e).getTime(),t.length)}};function oi(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+Xr(o,2)}function ai(e,t){return e%60==0?(e>0?"-":"+")+Xr(Math.abs(e)/60,2):si(e,t)}function si(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+Xr(Math.floor(i/60),2)+n+Xr(i%60,2)}var li=ii,ui=function(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"})}},ci=function(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"})}},di={p:ci,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return ui(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",ui(i,t)).replace("{{time}}",ci(o,t))}},pi=di,hi=["D","DD"],fi=["YY","YYYY"];function gi(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var mi={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"}},vi=function(e,t,n){var r,i=mi[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yi(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var xi={date:yi({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:yi({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:yi({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},_i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bi=function(e,t,n,r){return _i[e]};function wi(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var Si={ordinalNumber:function(e,t){var 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:wi({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wi({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:wi({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:wi({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:wi({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"})};function Ci(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}}var Ti,Mi={ordinalNumber:(Ti={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(Ti.matchPattern);if(!n)return null;var r=n[0],i=e.match(Ti.parsePattern);if(!i)return null;var o=Ti.valueCallback?Ti.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(r.length)}}),era:Ci({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:Ci({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:function(e){return e+1}}),month:Ci({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:Ci({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:Ci({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"})},Ei={code:"en-US",formatDistance:vi,formatLong:xi,formatRelative:bi,localize:Si,match:Mi,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ii=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ai=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Di=/^'([^]*?)'?$/,ki=/''/g,Oi=/[a-zA-Z]/;function Ri(e,t,n){var r,i,o,a,s,l,u,c,d,p,h,f,g,m,v,y,x,_;Pr(2,arguments);var b=String(t),w=Fr(),S=null!==(r=null!==(i=null==n?void 0:n.locale)&&void 0!==i?i:w.locale)&&void 0!==r?r:Ei,C=Lr(null!==(o=null!==(a=null!==(s=null!==(l=null==n?void 0:n.firstWeekContainsDate)&&void 0!==l?l:null==n||null===(u=n.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:w.firstWeekContainsDate)&&void 0!==a?a:null===(d=w.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Lr(null!==(h=null!==(f=null!==(g=null!==(m=null==n?void 0:n.weekStartsOn)&&void 0!==m?m:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==g?g:w.weekStartsOn)&&void 0!==f?f:null===(x=w.locale)||void 0===x||null===(_=x.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==h?h:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var M=Br(e);if(!Ur(M))throw new RangeError("Invalid time value");var E=function(e){var 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.getTime()-t.getTime()}(M),I=Vr(M,E),A={firstWeekContainsDate:C,weekStartsOn:T,locale:S,_originalDate:M};return b.match(Ai).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,pi[t])(e,S.formatLong):e})).join("").match(Ii).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(Di);if(!t)return e;return t[1].replace(ki,"'")}(r);var o,a=li[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(o=r,-1===fi.indexOf(o))||gi(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==hi.indexOf(e)}(r)||gi(r,t,String(e)),a(I,r,S.localize,A);if(i.match(Oi))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}var Ni={exports:{}},Li={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(Li);var Pi=Li.exports,Bi={exports:{}},ji={exports:{}},Fi={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Fi);var Ui=Fi.exports,zi={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")},e.exports=t.default}(zi,zi.exports);var Hi=zi.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(1,arguments),e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===Object.prototype.toString.call(e)};var r=n(Ui),i=n(Hi);e.exports=t.default}(ji,ji.exports);var Vi=ji.exports,Wi={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))};var r=n(Ui),i=n(Hi);e.exports=t.default}(Wi,Wi.exports);var Yi=Wi.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(1,arguments),!(0,r.default)(e)&&"number"!=typeof e)return!1;var t=(0,i.default)(e);return!isNaN(Number(t))};var r=n(Vi),i=n(Yi),o=n(Hi);e.exports=t.default}(Bi,Bi.exports);var Gi=Bi.exports,qi={exports:{}},Qi={exports:{}},Zi={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);if(isNaN(t))return t;return t<0?Math.ceil(t):Math.floor(t)},e.exports=t.default}(Zi,Zi.exports);var Xi=Zi.exports,$i=Z(Xi);!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(e).getTime(),a=(0,r.default)(t);return new Date(n+a)};var r=n(Xi),i=n(Yi),o=n(Hi);e.exports=t.default}(Qi,Qi.exports);var Ki=Qi.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(2,arguments);var n=(0,o.default)(t);return(0,r.default)(e,-n)};var r=n(Ki),i=n(Hi),o=n(Xi);e.exports=t.default}(qi,qi.exports);var Ji=qi.exports,eo={exports:{}},to={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),s=n-a;return Math.floor(s/o)+1};var r=n(Yi),i=n(Hi),o=864e5;e.exports=t.default}(to,to.exports);var no=to.exports,ro={exports:{}},io={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),o=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-o),t.setUTCHours(0,0,0,0),t};var r=n(Yi),i=n(Hi);e.exports=t.default}(io,io.exports);var oo=io.exports,ao={exports:{}},so={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var s=(0,o.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,o.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var r=n(Yi),i=n(Hi),o=n(oo);e.exports=t.default}(so,so.exports);var lo=so.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,r.default)(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),(0,i.default)(n)};var r=n(lo),i=n(oo),o=n(Hi);e.exports=t.default}(ao,ao.exports);var uo=ao.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,r.default)(e),n=(0,i.default)(t).getTime()-(0,o.default)(t).getTime();return Math.round(n/s)+1};var r=n(Yi),i=n(oo),o=n(uo),a=n(Hi),s=6048e5;e.exports=t.default}(ro,ro.exports);var co=ro.exports,po={exports:{}},ho={exports:{}},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.getDefaultOptions=function(){return go},fo.setDefaultOptions=function(e){go=e};var go={};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,s,l,u,c,d,p,h;(0,i.default)(1,arguments);var f=(0,a.getDefaultOptions)(),g=(0,o.default)(null!==(n=null!==(s=null!==(l=null!==(u=null==t?void 0:t.weekStartsOn)&&void 0!==u?u:null==t||null===(c=t.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==l?l:f.weekStartsOn)&&void 0!==s?s:null===(p=f.locale)||void 0===p||null===(h=p.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(g>=0&&g<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=(0,r.default)(e),v=m.getUTCDay(),y=(v<g?7:0)+v-g;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m};var r=n(Yi),i=n(Hi),o=n(Xi),a=fo;e.exports=t.default}(ho,ho.exports);var mo=ho.exports,vo={exports:{}},yo={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,i.default)(1,arguments);var g=(0,r.default)(e),m=g.getUTCFullYear(),v=(0,s.getDefaultOptions)(),y=(0,a.default)(null!==(n=null!==(l=null!==(u=null!==(c=null==t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null==t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==u?u:v.firstWeekContainsDate)&&void 0!==l?l:null===(h=v.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=new Date(0);x.setUTCFullYear(m+1,0,y),x.setUTCHours(0,0,0,0);var _=(0,o.default)(x,t),b=new Date(0);b.setUTCFullYear(m,0,y),b.setUTCHours(0,0,0,0);var w=(0,o.default)(b,t);return g.getTime()>=_.getTime()?m+1:g.getTime()>=w.getTime()?m:m-1};var r=n(Yi),i=n(Hi),o=n(mo),a=n(Xi),s=fo;e.exports=t.default}(yo,yo.exports);var xo=yo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,i.default)(1,arguments);var g=(0,s.getDefaultOptions)(),m=(0,a.default)(null!==(n=null!==(l=null!==(u=null!==(c=null==t?void 0:t.firstWeekContainsDate)&&void 0!==c?c:null==t||null===(d=t.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==u?u:g.firstWeekContainsDate)&&void 0!==l?l:null===(h=g.locale)||void 0===h||null===(f=h.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==n?n:1),v=(0,r.default)(e,t),y=new Date(0);return y.setUTCFullYear(v,0,m),y.setUTCHours(0,0,0,0),(0,o.default)(y,t)};var r=n(xo),i=n(Hi),o=n(mo),a=n(Xi),s=fo;e.exports=t.default}(vo,vo.exports);var _o=vo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,a.default)(1,arguments);var n=(0,r.default)(e),l=(0,i.default)(n,t).getTime()-(0,o.default)(n,t).getTime();return Math.round(l/s)+1};var r=n(Yi),i=n(mo),o=n(_o),a=n(Hi),s=6048e5;e.exports=t.default}(po,po.exports);var bo=po.exports,wo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e<0?"-":"",r=Math.abs(e).toString();for(;r.length<t;)r="0"+r;return n+r},e.exports=t.default}(wo,wo.exports);var So=wo.exports,Co={exports:{}};!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(So),i={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return(0,r.default)("yy"===t?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):(0,r.default)(n+1,2)},d:function(e,t){return(0,r.default)(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return(0,r.default)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return(0,r.default)(e.getUTCHours(),t.length)},m:function(e,t){return(0,r.default)(e.getUTCMinutes(),t.length)},s:function(e,t){return(0,r.default)(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return(0,r.default)(o,t.length)}};t.default=i,e.exports=t.default}(Co,Co.exports);var To=Co.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(no),i=n(co),o=n(lo),a=n(bo),s=n(xo),l=n(So),u=n(To),c="midnight",d="noon",p="morning",h="afternoon",f="evening",g="night",m={G:function(e,t,n){var r=e.getUTCFullYear()>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){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,r){var i=(0,s.default)(e,r),o=i>0?i:1-i;if("YY"===t){var a=o%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(o,{unit:"year"}):(0,l.default)(o,t.length)},R:function(e,t){var n=(0,o.default)(e);return(0,l.default)(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return(0,l.default)(n,t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return(0,l.default)(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){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return(0,l.default)(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){var r=e.getUTCMonth();switch(t){case"M":case"MM":return u.default.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){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return(0,l.default)(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){var i=(0,a.default)(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):(0,l.default)(i,t.length)},I:function(e,t,n){var r=(0,i.default)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):(0,l.default)(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u.default.d(e,t)},D:function(e,t,n){var i=(0,r.default)(e);return"Do"===t?n.ordinalNumber(i,{unit:"dayOfYear"}):(0,l.default)(i,t.length)},E:function(e,t,n){var r=e.getUTCDay();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){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return(0,l.default)(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return(0,l.default)(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return(0,l.default)(i,t.length);case"io":return n.ordinalNumber(i,{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){var r=e.getUTCHours()/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){var r,i=e.getUTCHours();switch(r=12===i?d:0===i?c:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?f:i>=12?h:i>=4?p:g,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return u.default.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):u.default.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,l.default)(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):(0,l.default)(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):u.default.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):u.default.s(e,t)},S:function(e,t){return u.default.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return y(i);case"XXXX":case"XX":return x(i);default:return x(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return y(i);case"xxxx":case"xx":return x(i);default:return x(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+v(i,":");default:return"GMT"+x(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+v(i,":");default:return"GMT"+x(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e,o=Math.floor(i.getTime()/1e3);return(0,l.default)(o,t.length)},T:function(e,t,n,r){var i=(r._originalDate||e).getTime();return(0,l.default)(i,t.length)}};function v(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+(0,l.default)(o,2)}function y(e,t){return e%60==0?(e>0?"-":"+")+(0,l.default)(Math.abs(e)/60,2):x(e,t)}function x(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+(0,l.default)(Math.floor(i/60),2)+n+(0,l.default)(i%60,2)}var _=m;t.default=_,e.exports=t.default}(eo,eo.exports);var Mo=eo.exports,Eo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(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"})}},r=function(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"})}},i={p:r,P:function(e,t){var i,o=e.match(/(P+)(p+)?/)||[],a=o[1],s=o[2];if(!s)return n(e,t);switch(a){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}}",n(a,t)).replace("{{time}}",r(s,t))}},o=i;t.default=o,e.exports=t.default}(Eo,Eo.exports);var Io=Eo.exports,Ao={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var 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.getTime()-t.getTime()},e.exports=t.default}(Ao,Ao.exports);var Do=Ao.exports,ko=Z(Do),Oo={};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.isProtectedDayOfYearToken=function(e){return-1!==Ro.indexOf(e)},Oo.isProtectedWeekYearToken=function(e){return-1!==No.indexOf(e)},Oo.throwProtectedError=function(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))};var Ro=["D","DD"],No=["YY","YYYY"];var Lo={exports:{}},Po={exports:{}},Bo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var 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"}},r=function(e,t,r){var i,o=n[e];return i="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};t.default=r,e.exports=t.default}(Bo,Bo.exports);var jo=Bo.exports,Fo={exports:{}},Uo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}},e.exports=t.default}(Uo,Uo.exports);var zo=Uo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(zo),i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({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:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};t.default=i,e.exports=t.default}(Fo,Fo.exports);var Ho=Fo.exports,Vo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},r=function(e,t,r,i){return n[e]};t.default=r,e.exports=t.default}(Vo,Vo.exports);var Wo=Vo.exports,Yo={exports:{}},Go={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[s]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}},e.exports=t.default}(Go,Go.exports);var qo=Go.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(qo),i={ordinalNumber:function(e,t){var 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:(0,r.default)({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:(0,r.default)({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:(0,r.default)({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:(0,r.default)({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:(0,r.default)({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"})};t.default=i,e.exports=t.default}(Yo,Yo.exports);var Qo=Yo.exports,Zo={exports:{}},Xo={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return}(l,(function(e){return e.test(s)})):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n;return}(l,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(s.length)}}},e.exports=t.default}(Xo,Xo.exports);var $o=Xo.exports,Ko={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],o=t.match(e.parsePattern);if(!o)return null;var a=e.valueCallback?e.valueCallback(o[0]):o[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(i.length)}}},e.exports=t.default}(Ko,Ko.exports);var Jo=Ko.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n($o),i={ordinalNumber:(0,n(Jo).default)({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:(0,r.default)({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:(0,r.default)({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:function(e){return e+1}}),month:(0,r.default)({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:(0,r.default)({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:(0,r.default)({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"})},o=i;t.default=o,e.exports=t.default}(Zo,Zo.exports);var ea=Zo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(jo),i=n(Ho),o=n(Wo),a=n(Qo),s=n(ea),l={code:"en-US",formatDistance:r.default,formatLong:i.default,formatRelative:o.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=l,e.exports=t.default}(Po,Po.exports);var ta=Po.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ta).default;t.default=r,e.exports=t.default}(Lo,Lo.exports);var na=Lo.exports;!function(e,t){var n=Pi.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var x,_,b,w,S,C,T,M,E,I,A,D,k,O,R,N,L,P;(0,d.default)(2,arguments);var B=String(t),j=(0,p.getDefaultOptions)(),F=null!==(x=null!==(_=null==n?void 0:n.locale)&&void 0!==_?_:j.locale)&&void 0!==x?x:h.default,U=(0,c.default)(null!==(b=null!==(w=null!==(S=null!==(C=null==n?void 0:n.firstWeekContainsDate)&&void 0!==C?C:null==n||null===(T=n.locale)||void 0===T||null===(M=T.options)||void 0===M?void 0:M.firstWeekContainsDate)&&void 0!==S?S:j.firstWeekContainsDate)&&void 0!==w?w:null===(E=j.locale)||void 0===E||null===(I=E.options)||void 0===I?void 0:I.firstWeekContainsDate)&&void 0!==b?b:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=(0,c.default)(null!==(A=null!==(D=null!==(k=null!==(O=null==n?void 0:n.weekStartsOn)&&void 0!==O?O:null==n||null===(R=n.locale)||void 0===R||null===(N=R.options)||void 0===N?void 0:N.weekStartsOn)&&void 0!==k?k:j.weekStartsOn)&&void 0!==D?D:null===(L=j.locale)||void 0===L||null===(P=L.options)||void 0===P?void 0:P.weekStartsOn)&&void 0!==A?A:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!F.localize)throw new RangeError("locale must contain localize property");if(!F.formatLong)throw new RangeError("locale must contain formatLong property");var H=(0,o.default)(e);if(!(0,r.default)(H))throw new RangeError("Invalid time value");var V=(0,l.default)(H),W=(0,i.default)(H,V),Y={firstWeekContainsDate:U,weekStartsOn:z,locale:F,_originalDate:H},G=B.match(g).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,s.default[t])(e,F.formatLong):e})).join("").match(f).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(m);if(!t)return e;return t[1].replace(v,"'")}(r);var o=a.default[i];if(o)return null!=n&&n.useAdditionalWeekYearTokens||!(0,u.isProtectedWeekYearToken)(r)||(0,u.throwProtectedError)(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!(0,u.isProtectedDayOfYearToken)(r)||(0,u.throwProtectedError)(r,t,String(e)),o(W,r,F.localize,Y);if(i.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("");return G};var r=n(Gi),i=n(Ji),o=n(Yi),a=n(Mo),s=n(Io),l=n(Do),u=Oo,c=n(Xi),d=n(Hi),p=fo,h=n(na),f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,g=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,m=/^'([^]*?)'?$/,v=/''/g,y=/[a-zA-Z]/;e.exports=t.default}(Ni,Ni.exports);var ra=Z(Ni.exports);function ia(e,t,n){var r=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return r.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=n.length-1;r>=0;--r)if("timeZoneName"===n[r].type)return n[r].value}(r,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/ [\w-+ ]+$/.exec(n);return r?r[0].substr(1):""}(r,t)}function oa(e,t){var n=function(e){if(!sa[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00"===t;sa[e]=n?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 sa[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var o=aa[n[i].type];o>=0&&(r[o]=parseInt(n[i].value,10))}return r}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(n,e)}var aa={year:0,month:1,day:2,hour:3,minute:4,second:5};var sa={};function la(e,t,n,r,i,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,i,o,a),s}var ua=36e5,ca={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function da(e,t,n){var r,i,o;if(!e)return 0;if(r=ca.timezoneZ.exec(e))return 0;if(r=ca.timezoneHH.exec(e))return ha(o=parseInt(r[1],10))?-o*ua:NaN;if(r=ca.timezoneHHMM.exec(e)){o=parseInt(r[2],10);var a=parseInt(r[3],10);return ha(o,a)?(i=Math.abs(o)*ua+6e4*a,"+"===r[1]?-i:i):NaN}if(function(e){if(fa[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),fa[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return la(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=pa(s,e),u=n?l:function(e,t,n){var r=e.getTime(),i=r-t,o=pa(new Date(i),n);if(t===o)return t;i-=o-t;var a=pa(new Date(i),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function pa(e,t){var n=oa(e,t),r=la(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),i=e.getTime(),o=i%1e3;return r-(i-=o>=0?o:1e3+o)}function ha(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var fa={};function ga(e,t){var n=e?da(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function ma(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function va(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+ma(Math.floor(i/60),2)+n+ma(Math.floor(i%60),2)}function ya(e,t){return e%60==0?(e>0?"-":"+")+ma(Math.abs(e)/60,2):va(e,t)}var xa={X:function(e,t,n,r){var i=ga(r.timeZone,e);if(0===i)return"Z";switch(t){case"X":return ya(i);case"XXXX":case"XX":return va(i);default:return va(i,":")}},x:function(e,t,n,r){var i=ga(r.timeZone,e);switch(t){case"x":return ya(i);case"xxxx":case"xx":return va(i);default:return va(i,":")}},O:function(e,t,n,r){var i=ga(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+ma(o,2)}(i,":");default:return"GMT"+va(i,":")}},z:function(e,t,n,r){switch(t){case"z":case"zz":case"zzz":return ia("short",e,r);default:return ia("long",e,r)}}},_a=36e5,ba=6e4,wa={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 Sa(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},r=null==n.additionalDigits?2:$i(n.additionalDigits);if(2!==r&&1!==r&&0!==r)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("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var i=function(e){var t,n={},r=wa.dateTimePattern.exec(e);r?(n.date=r[1],t=r[3]):(r=wa.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e);if(t){var i=wa.timeZone.exec(t);i?(n.time=t.replace(i[1],""),n.timeZone=i[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,r=wa.YYY[t],i=wa.YYYYY[t];if(n=wa.YYYY.exec(e)||i.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=wa.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(i.date,r),a=o.year,s=function(e,t){if(null===t)return null;var n,r,i,o;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=wa.MM.exec(e))return r=new Date(0),Ia(t,i=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(n=wa.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Ea(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(r.setUTCFullYear(t,0,a),r):new Date(NaN)}if(n=wa.MMDD.exec(e)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Ia(t,i,s)?(r.setUTCFullYear(t,i,s),r):new Date(NaN)}if(n=wa.Www.exec(e))return Aa(t,o=parseInt(n[1],10)-1)?Ca(t,o):new Date(NaN);if(n=wa.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Aa(t,o,l)?Ca(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),c=0;if(i.time&&(c=function(e){var t,n,r;if(t=wa.HH.exec(e))return Da(n=parseFloat(t[1].replace(",",".")))?n%24*_a:NaN;if(t=wa.HHMM.exec(e))return Da(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*_a+r*ba:NaN;if(t=wa.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return Da(n,r,i)?n%24*_a+r*ba+1e3*i:NaN}return null}(i.time),isNaN(c)))return new Date(NaN);if(i.timeZone||n.timeZone){if(l=da(i.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=ko(new Date(u+c)),l=ko(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function Ca(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var Ta=[31,28,31,30,31,30,31,31,30,31,30,31],Ma=[31,29,31,30,31,30,31,31,30,31,30,31];function Ea(e){return e%400==0||e%4==0&&e%100!=0}function Ia(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=Ea(e);if(r&&n>Ma[t])return!1;if(!r&&n>Ta[t])return!1}return!0}function Aa(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function Da(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var ka=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function Oa(e,t,n){var r=String(t),i=n||{},o=r.match(ka);if(o){var a=Sa(i.originalDate||e,i);r=o.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],o=e.replace(t,"'"+xa[t[0]](a,t,null,i)+"'");return r?o.substring(0,n-1)+o.substring(n+1):o}),r)}return ra(e,r,i)}function Ra(e,t,n){var r=Sa(e,n),i=da(t,r,!0),o=new Date(r.getTime()-i),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}function Na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var La=Array.isArray,Pa="object"==typeof global&&global&&global.Object===Object&&global,Ba="object"==typeof self&&self&&self.Object===Object&&self,ja=Pa||Ba||Function("return this")(),Fa=ja.Symbol,Ua=Object.prototype,za=Ua.hasOwnProperty,Ha=Ua.toString,Va=Fa?Fa.toStringTag:void 0;var Wa=Object.prototype.toString;var Ya=Fa?Fa.toStringTag:void 0;function Ga(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ya&&Ya in Object(e)?function(e){var t=za.call(e,Va),n=e[Va];try{e[Va]=void 0;var r=!0}catch(e){}var i=Ha.call(e);return r&&(t?e[Va]=n:delete e[Va]),i}(e):function(e){return Wa.call(e)}(e)}function qa(e){return null!=e&&"object"==typeof e}function Qa(e){return"string"==typeof e||!La(e)&&qa(e)&&"[object String]"==Ga(e)}function Za(e){return null!=e}function Xa(e){return La(e)&&0===e.length}function $a(e){return La(e)&&e.length>0}function Ka(e){return Na(e)&&Object.keys(e).length>0}function Ja(e){return Qa(e)&&e.trim().length>0}function es(e){return Qa(e)&&0===e.trim().length}var ts=Za;function ns(e){for(var t=0;t<e.length;t++)if($a(e[t].y))for(var n=0;n<e[t].y.length;n++)if(Number(e[t].y[n])>1e3)return!0;return!1}var rs,is,os="MMM-DD-yyyy HH:mm:ss [UTC]XXX",as="yyyy-MM-dd'T'HH:mm",ss=function(e,t,n){return void 0===t&&(t=os),Ri(n?Ra(new Date(e),n):new Date(e),t)},ls=r.makeStyles((function(e){return{container:{display:"flex",flexWrap:"wrap"},textField:{marginLeft:e.spacing(1),marginRight:e.spacing(1),width:200}}})),us=function(t){var n=t.defaultDateTimeValue,r=t.dateTimeLabel,i=t.value,o=t.errorMsg,a=t.onChange,s=t.className,l=t.disabled,u=void 0!==l&&l,c=t.isReadOnly,d=void 0!==c&&c,p=ls(),h=new Date,f=ss(h,as),g=new Date(h);g.setDate(g.getDate()-30);var m=ss(g,as);return e.jsx("form",F({className:p.container,noValidate:!0},{children:e.jsx(T.default,{id:"datetime-local",label:r,type:"datetime-local",defaultValue:n,value:i,onChange:a,className:Y(p.textField,s),InputLabelProps:{shrink:!0},disabled:u,inputProps:{min:m,max:f},onKeyDown:function(e){d&&e.preventDefault()},error:Ja(o),helperText:o})}))};function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cs.apply(null,arguments)}const ds=e=>S.createElement("svg",cs({width:24,height:24,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),rs||(rs=S.createElement("defs",null,S.createElement("filter",{x:"-1.9%",y:"-2.5%",width:"103.8%",height:"105%",filterUnits:"objectBoundingBox",id:"times_svg__b"},S.createElement("feOffset",{in:"SourceAlpha",result:"shadowOffsetOuter1"}),S.createElement("feGaussianBlur",{stdDeviation:5,in:"shadowOffsetOuter1",result:"shadowBlurOuter1"}),S.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0",in:"shadowBlurOuter1"})),S.createElement("rect",{id:"times_svg__a",x:0,y:0,width:800,height:600,rx:8}))),is||(is=S.createElement("g",{fill:"none",fillRule:"evenodd"},S.createElement("path",{d:"M-1088-84H368V940h-1456z",fill:"#0B1117",opacity:.75}),S.createElement("g",{transform:"translate(-760 -20)"},S.createElement("mask",{id:"times_svg__c",fill:"#fff"},S.createElement("use",{xlinkHref:"#times_svg__a"})),S.createElement("use",{fill:"#000",filter:"url(#times_svg__b)",xlinkHref:"#times_svg__a"}),S.createElement("use",{fill:"#FFF",xlinkHref:"#times_svg__a"}),S.createElement("g",{mask:"url(#times_svg__c)"},S.createElement("path",{fill:"#FFF",d:"M0 0h800v64H0z"}),S.createElement("circle",{fill:"#F0F4F7",cx:772,cy:32,r:16}),S.createElement("path",{d:"M760 20h24v24h-24z"}),S.createElement("path",{d:"M777.657 26.343a.5.5 0 0 1 .058.638l-.058.07-4.95 4.949 4.95 4.95a.5.5 0 0 1-.638.765l-.07-.058-4.949-4.95-4.95 4.95a.5.5 0 0 1-.765-.638l.058-.07 4.95-4.949-4.95-4.95a.5.5 0 0 1 .638-.765l.07.058 4.949 4.95 4.95-4.95a.5.5 0 0 1 .707 0Z",fill:"#25323D"}))))));var ps=C.default.forwardRef((function(t,n){return e.jsx(r.Slide,F({direction:"left",ref:n},t))}));ps.displayName="SlideTransition";var hs,fs,gs,ms,vs,ys=r.makeStyles((function(e){return{dialogSm:{width:function(e){var t=e.overrideWidth;return null!=t?t:608},height:function(e){var t=e.overrideHeight;return null!=t?t:400},overflow:"hidden"},dialogMd:{width:function(e){var t=e.overrideWidth;return null!=t?t:800},height:function(e){var t=e.overrideHeight;return null!=t?t:600},overflow:"hidden"},dialogXs:{width:function(e){var t=e.overrideWidth;return null!=t?t:480},height:function(e){var t=e.overrideHeight;return null!=t?t:272},overflow:"hidden"},dialogXl:{width:function(e){var t=e.overrideWidth;return null!=t?t:800},height:function(e){var t=e.overrideHeight;return null!=t?t:800},overflow:"hidden"},form:{display:"flex",flexDirection:"column",margin:0,minHeight:"100%"},sidePanel:{width:736,height:"100%",maxHeight:"100%",margin:"0 0 0 auto",borderRadius:"0 !important",overflowY:"unset"},dialogTitle:{padding:e.spacing(2,1.5,2,2)},dialogTitleXs:{padding:e.spacing(1.5,1.5,1.5,2)},closeBtn:{background:e.palette.grey[100],padding:e.spacing(.5),height:e.spacing(4),borderRadius:"50%",float:"right",margin:"auto 0 auto auto",cursor:"pointer"},actionsInfo:{marginRight:"auto"},title:{display:"flex",alignItems:"center"},dialogTitleSeparator:{borderBottom:"1px solid ".concat(e.palette.grey[200])},modalTitle:{display:"flex",alignItems:"center"},text:{marginLeft:e.spacing(1),whiteSpace:"nowrap"}}})),xs=function(t){var n,i,o=t.title,a=t.titleSeparator,s=t.titleIcon,l=t.actionsInfo,u=t.onClose,c=t.onSubmit,d=t.children,p=t.cancelLabel,h=t.cancelTestId,f=t.submitLabel,g=t.submitTestId,m=t.enableBackdropDismiss,v=t.size,y=t.isSidePanel,x=t.buttonProps,_=t.customTitle,b=t.hideCloseBtn,w=t.customSubmitButton,S=t.submitButtonTooltip,C=t.cancelButtonTooltip,T=t.dialogContentProps,M=void 0===T?{}:T,E=t.formProps;t.gradientTag;var I=U(t,["title","titleSeparator","titleIcon","actionsInfo","onClose","onSubmit","children","cancelLabel","cancelTestId","submitLabel","submitTestId","enableBackdropDismiss","size","isSidePanel","buttonProps","customTitle","hideCloseBtn","customSubmitButton","submitButtonTooltip","cancelButtonTooltip","dialogContentProps","formProps","gradientTag"]),A=ys(t),D=function(){u&&u()},k=function(e){c&&(c(),e.preventDefault())};delete I.overrideHeight,delete I.overrideWidth;var O=A.dialogMd,R=A.dialogTitle,N=!!p||!!f||!!w;switch(v){case"sm":O=A.dialogSm;break;case"xs":O=A.dialogXs,R=A.dialogTitleXs;break;case"xl":O=A.dialogXl;break;default:O=A.dialogMd}R=Y(R,a&&A.dialogTitleSeparator),y&&(O=A.sidePanel,I.TransitionComponent=ps);var L=null!==(n=null==x?void 0:x.primary)&&void 0!==n?n:{},P=null!==(i=null==x?void 0:x.secondary)&&void 0!==i?i:{};I.fullScreen||(I.classes={paper:O},I.fullWidth=!0,I.maxWidth=v);var B;return e.jsx(r.Dialog,F({"aria-labelledby":"form-dialog-title"},I,{onClose:m?D:void 0,disableEnforceFocus:!0},{children:e.jsxs("form",F({className:A.form},E,{children:[_?e.jsx("div",F({className:A.modalTitle},{children:_})):o&&e.jsx(r.DialogTitle,F({id:"form-dialog-title",disableTypography:!0,className:R},{children:e.jsxs(r.Typography,F({className:A.title,variant:"h4"},{children:[s?e.jsxs("div",F({className:A.modalTitle},{children:[s,e.jsx("span",F({className:A.text},{children:o}))]})):e.jsx("div",F({className:A.modalTitle},{children:o})),!b&&e.jsx("span",F({className:A.closeBtn,"data-testid":h?"".concat(h,"Header"):""},{children:e.jsx(ds,{onClick:D})}))]}))})),e.jsx(r.DialogContent,F({},M,{children:d})),N&&e.jsxs(r.DialogActions,{children:[l&&e.jsx("div",F({className:A.actionsInfo},{children:l})),(B=p?e.jsx(Q,F({variant:"secondary",onClick:D},P,{"data-testid":h},{children:p})):void 0,C?e.jsx(ar,F({title:C},{children:e.jsx("span",{children:B})})):B),function(){if(w)return w;var t=f?e.jsx(Q,F({variant:"primary",onClick:k},L,{type:"submit",autoFocus:!0,"data-testid":g},{children:f})):void 0;return S?e.jsx(ar,F({title:S},{children:e.jsx("span",{children:t})})):t}()]})]}))}))},_s=r.makeStyles((function(e){return{ellipsis:{display:"inline-flex",minWidth:e.spacing(2)}}})),bs=function(n){var r=n.pageSize,i=void 0===r?4:r,o=n.onPageSelect,a=n.currentPage,l=n.hasMore,u=t.useState(1),c=u[0],d=u[1],p=_s();return t.useEffect((function(){a&&d(a)}),[a]),e.jsx(s.Pagination,{siblingCount:1,page:c,boundaryCount:1,shape:"rounded",count:i,onChange:function(e,t){d(t),o(t)},"data-testid":"TablePagination",renderItem:function(t){return"next"===t.type&&l?e.jsxs(e.Fragment,{children:[e.jsx(s.PaginationItem,{"aria-label":"Go to end-ellipsis page",color:"standard",shape:"rounded",size:"medium",type:"end-ellipsis",variant:"text",classes:{ellipsis:p.ellipsis}}),e.jsx(s.PaginationItem,F({},t))]}):e.jsx(s.PaginationItem,F({},t))}})},ws=r.makeStyles((function(e){return{root:{display:"flex",justifyContent:"flex-end",alignItems:"center",padding:e.spacing(1,3)},dropdownContainer:{display:"flex",alignItems:"center",maxWidth:160},dropdown:{"& .MuiInput-formControl":{border:"0px none"}},dropdownMenu:{"& .MuiMenu-list":{display:"flex",flexDirection:"column"}}}})),Ss=function(n){var i=n.dataPrefetchFn,o=n.page,a=n.onPageChange,s=n.onPageSizeChange,l=n.hasMoreData,u=n.total,c=n.rowsPerPageOptions,d=void 0===c?[10,20,50]:c,p=n.rowsPerPage,h=n.showRecordsPerPage,f=n.recordsPerPageCaption,g=void 0===f?"":f,m=ws(),v=Math.ceil(u/(null!=p?p:d[0])),y=t.useCallback((function(e){e===v&&l&&i(),a(e-1)}),[i,a,l,v]);return t.useEffect((function(){0===o&&p===u&&l&&i()}),[]),e.jsxs(r.Box,F({className:m.root},{children:[h&&e.jsxs(r.Grid,F({item:!0,xs:12,lg:4,className:m.dropdownContainer},{children:[g&&e.jsx(r.Box,F({mr:1,minWidth:"100px"},{children:g})),e.jsx(lr,F({value:p,onChange:function(e){s(e.target.value)},className:m.dropdown,"data-testid":"RowsPerPageSelect",menuProps:{className:m.dropdownMenu,anchorOrigin:{vertical:"top",horizontal:"left"}}},{children:d.map((function(t){return e.jsx(r.MenuItem,F({value:t,"data-testid":"RowsPerPageSelectMenuItem-".concat(t)},{children:t}),t)}))}))]})),e.jsx(r.Box,F({ml:4},{children:e.jsx(bs,{currentPage:o+1,pageSize:v,onPageSelect:y,hasMore:l})}))]}))},Cs=r.makeStyles((function(e){return{header:{minHeight:"42px",marginBottom:"25px"},contentPanel:{margin:0},transparentBody:{padding:0,backgroundColor:"transparent",boxShadow:"none"},body:{position:"relative",boxShadow:"0 0.12em 2px rgba(colors.$YB_DARK_GRAY_2, 0.05), 0 0.5em 10px rgba(colors.$YB_DARK_GRAY_2, 0.07)",border:"none",backgroundColor:"#fff",padding:"20px 25px 25px 25px",borderRadius:"7px",margin:"20px 0 0 auto"}}})),Ts=function(t){var n=t.noBackground,i=t.className,o=t.bodyClassName,a=t.children,s=t.body,l=t.header,u=t.title,c=Cs(),d=Y(c.body,n&&c.transparentBody,o);return e.jsxs(r.Box,F({className:i?c.contentPanel+i:"classes.contentPanel"},{children:[(l||u)&&e.jsxs(r.Box,F({className:c.header},{children:[l," ",u]})),e.jsx(r.Box,F({className:"container"},{children:s&&e.jsxs(r.Box,F({className:d},{children:[s,a]}))}))]}))},Ms=r.makeStyles((function(e){return r.createStyles({root:{"& caption":{padding:0,color:"unset",left:"unset",position:"static",captionSide:"top"},"& .MuiTableSortLabel-root":{maxHeight:e.spacing(3)},"& .expandRow":{"& .MuiTableCell-root":{borderBottom:0},"&:hover":{backgroundColor:e.palette.common.white},"+ tr":{"&:hover":{backgroundColor:e.palette.common.white}}}},noBorderContainer:{"& .MuiPaper-root":{border:0},"& .MuiTableContainer-root":{padding:0,margin:0}},tableContainer:{padding:e.spacing(1,2)},dropdown:{display:"inline-grid"},expandClass:{width:e.spacing(3)},checkboxLabel:{marginRight:0}})})),Es=function(t){var n=Ms();return e.jsxs("div",F({className:n.dropdown},{children:[e.jsx(o.ArrowDropUp,{viewBox:"1 -9 24 24",color:t.active&&"asc"===t.direction?"primary":"disabled"}),e.jsx(o.ArrowDropDown,{viewBox:"1 9 24 24",color:t.active&&"desc"===t.direction?"primary":"disabled"})]}))},Is=function(t){var n=Ms(),r=F({},t);return r.color="primary",e.jsx(Rr,F({label:""},r,{labelClassName:n.checkboxLabel}))},As=function(){var t=Ms();return e.jsx("div",{className:t.expandClass})},Ds=function(t){var n=t.tableTitle,i=t.selectableRows,o=void 0===i?"none":i,a=t.withBorder,s=void 0===a||a,u=t.data,c=t.columns,d=t.options,p=t.className,h=t.dataTestId,f=Ms(),g=null!=d?d:{},m=g.customHeader,v=U(g,["customHeader"]),y=F({selectableRows:o,elevation:0,rowHover:!1,filter:!1,search:!1,download:!1,print:!1,viewColumns:!1,responsive:"standard",setTableProps:function(){return{size:"small"}}},v),x=c.map((function(t){return(null==t?void 0:t.options)&&!t.options.customHeadRender&&(t.options.customHeadRender=function(n,i,o){return function(t,n,i,o){var a=(null==o?void 0:o.setCellHeaderProps)?null==o?void 0:o.setCellHeaderProps(t):{},s=(null==o?void 0:o.customHeadLabelRender)?null==o?void 0:o.customHeadLabelRender(F(F({},t),{colPos:t.index})):t.label;return e.jsxs(r.TableCell,F({onClick:function(){return n(t.index)}},a,{"data-testid":t.name},{children:[!(null==t?void 0:t.hideHeader)&&s,!(null==t?void 0:t.hideHeader)&&!!(null==o?void 0:o.sort)&&e.jsx(r.TableSortLabel,{active:t.name===i.name,IconComponent:function(){return e.jsx(Es,{active:t.name===i.name,direction:i.direction})},direction:t.name===i.name?i.direction:"asc"})]}),t.name)}(n,i,o,t.options)}),t})),_=s?f.root:Y(f.root,f.noBorderContainer);return e.jsx("div",F({className:_,"data-testid":h},{children:e.jsx(r.TableContainer,F({component:r.Paper,className:Y(f.tableContainer,p)},{children:e.jsx(M.default,{title:n,data:u,columns:x,options:y,components:{Checkbox:Is,ExpandButton:As,TableHead:null!=m?m:l.TableHead}})}))}))};exports.NodeState=void 0,(hs=exports.NodeState||(exports.NodeState={})).ToBeAdded="ToBeAdded",hs.Provisioned="Provisioned",hs.SoftwareInstalled="SoftwareInstalled",hs.UpgradeSoftware="UpgradeSoftware",hs.UpdateGFlags="UpdateGFlags",hs.Live="Live",hs.Stopping="Stopping",hs.Starting="Starting",hs.Stopped="Stopped",hs.Unreachable="Unreachable",hs.ToBeRemoved="ToBeRemoved",hs.Removing="Removing",hs.Removed="Removed",hs.Adding="Adding",hs.BeingDecommissioned="BeingDecommissioned",hs.Decommissioned="Decommissioned",exports.MetricMeasure=void 0,(fs=exports.MetricMeasure||(exports.MetricMeasure={})).OVERALL="Overall",fs.OUTLIER="Outlier",fs.OUTLIER_TABLES="Outlier_Tables",fs.OUTLIER_DB="Outlier_Databases",exports.AnomalyCategory=void 0,(gs=exports.AnomalyCategory||(exports.AnomalyCategory={})).SQL="SQL",gs.APP="APP",gs.NODE="NODE",gs.INFRA="INFRA",gs.DB="DB",exports.AnomalyType=void 0,(ms=exports.AnomalyType||(exports.AnomalyType={})).SQL_QUERY_LATENCY_INCREASE="SQL_QUERY_LATENCY_INCREASE",ms.HOT_NODE_READS_WRITES="HOT_NODE_READS_WRITES",ms.HOT_NODE_CPU="HOT_NODE_CPU",ms.HOT_NODE_QUERIES="HOT_NODE_QUERIES",ms.HOT_NODE_DATA="HOT_NODE_DATA",ms.SLOW_DISKS="SLOW_DISKS",exports.WaitEventClassification=void 0,(vs=exports.WaitEventClassification||(exports.WaitEventClassification={})).WAIT_EVENT_COMPONENT="waitEventComponent",vs.WAIT_EVENT_CLASS="waitEventClass",vs.WAIT_EVENT_TYPE="waitEventType",vs.WAIT_EVENT="waitEvent",vs.CLIENT_NODE_IP="clientNodeIp",vs.QUERY_ID="queryId",vs.TABLET_ID="tabletId",vs.DB_ID="dbId";var ks,Os,Rs,Ns={waitEventType:"TYPE",waitEvent:"EVENT"},Ls={NONE:"NONE",TOP:"TOP",BOTTOM:"BOTTOM"},Ps={NONE:"NONE",NODE:"NODE",TABLE:"TABLE",NAMESPACE:"NAMESPACE"},Bs={ALL:"All",SQL:"SQL",CQL:"CQL",BACKGROUND:"Background"},js={AVERAGE:"AVG",MAX:"MAX",MIN:"MIN",SUM:"SUM"};exports.AppName=void 0,(ks=exports.AppName||(exports.AppName={})).YBA="YBA",ks.YBM="YBM",ks.YBD="YBD",ks.WEB="WEB",exports.QueryType=void 0,(Os=exports.QueryType||(exports.QueryType={})).SQL="SQL",Os.CQL="CQL",Os.BACKGROUND="BACKGROUND",exports.GraphType=void 0,(Rs=exports.GraphType||(exports.GraphType={})).SINGLE_SUPPORTING="SINGLE_SUPPORTING",Rs.MULTI_SUPPORTING="MULTI_SUPPORTING",Rs.MAIN_RCA="MAIN_RCA";var Fs,Us,zs,Hs,Vs,Ws,Ys,Gs={waitEventType:"Wait Event Type",waitEvent:"Wait Event"},qs=[exports.WaitEventClassification.WAIT_EVENT_TYPE,exports.WaitEventClassification.WAIT_EVENT];exports.SortDirection=void 0,(Fs=exports.SortDirection||(exports.SortDirection={})).ASC="ASC",Fs.DESC="DESC",exports.PrimaryDashboardViewTabs=void 0,(Us=exports.PrimaryDashboardViewTabs||(exports.PrimaryDashboardViewTabs={})).ANOMALY="Anomaly",Us.QUERY="Query",exports.TPFeatureFlags=void 0,(zs=exports.TPFeatureFlags||(exports.TPFeatureFlags={})).SHOW_QUERY_STATS_TIMESTAMP="showStatsTimestamp",zs.SHOW_CLEANUP_HISTORICAL_DATA="showCleanupHistoricalData",exports.AnomalyDetectionStatusText=void 0,(Hs=exports.AnomalyDetectionStatusText||(exports.AnomalyDetectionStatusText={})).EMPTY="EMPTY",Hs.SCHEDULED="SCHEDULED",Hs.IN_PROGRESS="IN_PROGRESS",Hs.SUCCESS="SUCCESS",Hs.FAILURE="FAILURE",exports.RuntimeConfigType=void 0,(Vs=exports.RuntimeConfigType||(exports.RuntimeConfigType={})).TEXT="TEXT",Vs.INT="INT",Vs.FLOAT="FLOAT",Vs.BOOL="BOOL",Vs.DURATION="DURATION",exports.InsightsTabs=void 0,(Ws=exports.InsightsTabs||(exports.InsightsTabs={})).CLUSTER_LOAD="Cluster Load",Ws.INSIGHTS="Insights",Ws.METRICS="Metrics",exports.ClusterLoadTabs=void 0,(Ys=exports.ClusterLoadTabs||(exports.ClusterLoadTabs={})).ANOMALIES="Anomalies",Ys.QUERIES="Queries";var Qs,Zs={ANOMALIES:"anomalies",QUERIES:"queries",METRICS:"metricsNew",INSIGHTS:"insights",CLUSTER_LOAD:"clusterLoad"};exports.AnomalyTypeFilter=void 0,(Qs=exports.AnomalyTypeFilter||(exports.AnomalyTypeFilter={})).PERF_ANOMALY="PERF_ANOMALY",Qs.INSIGHT="INSIGHT";var Xs="All Regions and Clusters",$s="All",Ks="All Zones and Nodes",Js="ASH",el="Cores",tl="Queries",nl="Inter",rl="# vCPU",il={NODE_AVERAGE:"Selected Nodes Average",ALL:"all",ALL_DATABASES:"All Databases",TOP:"top",PRIMARY:"PRIMARY"},ol="active_session_history_eps_global",al="active_session_history_query_events",sl="active_session_history_eps_client_node",ll="cpu_count",ul=[{value:exports.MetricMeasure.OVERALL,label:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods"},{value:exports.MetricMeasure.OUTLIER_TABLES,label:"Outlier Tables"},{value:exports.MetricMeasure.OUTLIER_DB,label:"Outlier Databases"}],cl=[{value:exports.MetricMeasure.OVERALL,label:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods"}],dl=[{value:Ls.TOP,label:"Top"},{value:Ls.BOTTOM,label:"Bottom"}],pl=[{value:Bs.ALL,label:"All Queries"},{value:Bs.SQL,label:"SQL"},{value:Bs.CQL,label:"CQL"},{value:Bs.BACKGROUND,label:"Background"}],hl=["active_session_history_ysql_client_node","active_session_history_tserver_client_node","query_latency","query_rps","query_rows_avg"],fl=["active_session_history_ycql_client_node","active_session_history_tserver_client_node","cql_query_latency_avg","cql_query_rps"],gl=["active_session_history_eps_client_node"],ml="ysql_connections_per_sec",vl={WAIT_EVENT_COMPONENT:"waitEventComponent",WAIT_EVENT_CLASS:"waitEventClass",WAIT_EVENT_TYPE:"waitEventType",WAIT_EVENT:"waitEvent",CLIENT_NODE_IP:"clientNodeIp",QUERY:"queryId"},yl=[10,20,30,40,50],xl=[exports.AnomalyCategory.SQL,exports.AnomalyCategory.NODE,exports.AnomalyCategory.DB,exports.AnomalyCategory.APP,exports.AnomalyCategory.INFRA],_l="00000000-0000-0000-0000-000000000000",bl={SHOW_CLEANUP_HISTORICAL_DATA:"pa.ui.show_cleanup_historical_data",SHOW_QUERIES_VIEW:"pa.ui.show_queries_view",SHOW_TOPK_METRICS_VIEW:"pa.ui.show_topk_metrics_view"},wl={SQL_QUERY_LATENCY:"Query Latency Increase",SQL_QUERY_LOCK_CONTENTION:"Query Lock Contention",HOT_NODE_CPU:"High CPU Usage",HOT_NODE_DATA:"High data Usage",HOT_NODE_READS_WRITES:"Hot Node read/writes",HOT_NODE_YSQL_QUERIES:"High SQL count",HOT_NODE_CONNECTIONS:"High Node Connections",SQL_QUERY_EXCESSIVE_CATALOG_READS:"Excessive Catalog Reads",HOT_TABLET:"Hot Tablet",LARGE_TABLET:"Large Tablet",SLOW_DISKS:"Slow Disks",UNUSED_INDEX:"Unused Index",RANGE_SHARDING:"Range Sharding",SQL_QUERY_LATENCY_INCREASE:"Query Latency Increase",REDUNDANT_INDEX:"Redundant Index"},Sl="MORE",Cl="View More",Tl={ONE_HOUR:"Last 1 hour",SIX_HOURS:"Last 6 hours",ONE_DAY:"Last 1 day",TWO_DAYS:"Last 2 days",SEVEN_DAYS:"Last 7 days",CUSTOM:"Custom"},Ml={ONE_HOUR:"1h",SIX_HOURS:"6h",ONE_DAY:"1d",TWO_DAYS:"2d",SEVEN_DAYS:"7d",CUSTOM:"Custom"},El=[{label:Tl.ONE_HOUR,value:Ml.ONE_HOUR},{label:Tl.SIX_HOURS,value:Ml.SIX_HOURS},{label:Tl.ONE_DAY,value:Ml.ONE_DAY},{label:Tl.TWO_DAYS,value:Ml.TWO_DAYS},{label:Tl.SEVEN_DAYS,value:Ml.SEVEN_DAYS},{label:Tl.CUSTOM,value:Ml.CUSTOM}],Il=[{label:Tl.CUSTOM,value:"Custom"}],Al={SQL_QUERY_LATENCY_INCREASE:{title:"QUERY",data:{}},SQL_QUERY_LOCK_CONTENTION:{title:"QUERY",data:{}},SQL_QUERY_EXCESSIVE_CATALOG_READS:{title:"QUERY",data:{}},HOT_NODE_CPU:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_READS_WRITES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_YSQL_QUERIES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_CONNECTIONS:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_DATA:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_TABLET:{title:"TABLE",data:{DB_NAME:"dbName",TABLET_ID:"tabletId"}},LARGE_TABLET:{title:"TABLE",data:{DB_NAME:"dbName",TABLET_ID:"tabletId"}},SLOW_DISKS:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},UNUSED_INDEX:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}},RANGE_SHARDING:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}},REDUNDANT_INDEX:{title:"INDEX",data:{DB_NAME:"dbName",TABLE_NAME:"tableName"}}},Dl="DATABASE",kl="QUERY TYPE",Ol="Database",Rl="Table",Nl="TABLET ID",Ll="ANOMALY",Pl="REGION/ZONE",Bl=["ysql_ops","ycql_ops","server","per_process","disk_io","tserver","master","master_advanced","lsmdb"],jl=["outlier_tables"],Fl=["outlier_databases"],Ul=[{title:"Outlier Tables",name:"outlier_tables",metrics:["table_read_latency","table_read_rps","table_write_latency","table_write_rps","table_log_latency","table_log_ops_second","table_log_bytes_written","table_write_lock_latency","table_seek_next_prev","table_ops_in_flight","table_write_rejections","table_memory_rejections","table_compaction","table_block_cache_hit_miss","table_rocksdb_blooms_checked_and_useful","table_mem_tracker_db_memtable","ysql_catalog_cache_misses"]}],zl=[{title:"Outlier Databases",name:"outlier_databases",metrics:["table_read_latency","table_read_rps","table_write_latency","table_write_rps","table_log_latency","table_log_ops_second","table_log_bytes_written","table_write_lock_latency","table_seek_next_prev","table_ops_in_flight","table_write_rejections","table_memory_rejections","table_compaction","table_block_cache_hit_miss","table_rocksdb_blooms_checked_and_useful","table_mem_tracker_db_memtable"]}],Hl=[{title:"YSQL",name:"ysql_ops",metrics:["ysql_server_rpc_per_second","ysql_sql_latency","ysql_connections","ysql_connections_per_sec","ysql_server_advanced_rpc_per_second","ysql_sql_advanced_latency","ysql_catalog_cache_misses","ysql_conn_mgr_active_connections"]},{title:"YCQL",name:"ycql_ops",metrics:["cql_server_rpc_per_second","cql_sql_latency","cql_server_rpc_p99","cql_sql_latency_breakdown","cql_yb_local_vs_remote","cql_yb_latency","cql_reactor_latency","tserver_rpc_queue_size_cql","cql_response_sizes","cql_yb_transaction","cql_yb_rpc_connections"]},{title:"Resource",name:"server",metrics:["cpu_usage","memory_usage","disk_iops","disk_usage_percent","disk_used_size_total","disk_volume_usage_percent","disk_volume_used","disk_bytes_per_second_per_node","disk_io_time","disk_io_queue_depth","disk_io_read_latency","disk_io_write_latency","network_packets","network_bytes","network_errors","system_load_over_time","node_clock_skew"]},{title:"Per Process",name:"per_process",metrics:["process_user_cpu_seconds","process_system_cpu_seconds","process_virtual_memory","process_resident_memory","process_proportional_memory","process_io_read","process_io_write","process_open_files"]},{title:"Disk I/O",name:"disk_io",metrics:["disk_iops","disk_usage_percent","disk_used_size_total","disk_volume_usage_percent","disk_volume_used","disk_bytes_per_second_per_node","lsm_rocksdb_flush_size","lsm_rocksdb_compaction","lsm_rocksdb_compaction_time","tserver_log_bytes_read","tserver_log_bytes_written"]},{title:"Tablet Server",name:"tserver",metrics:["tserver_rpcs_per_sec_per_node","tserver_ops_latency","tserver_handler_latency","tserver_threads_running","tserver_threads_started","tserver_uptime_min","tserver_consensus_rpcs_per_sec","tserver_change_config","tserver_remote_bootstraps","tserver_consensus_rpcs_latency","tserver_change_config_latency","tserver_context_switches","tserver_spinlock_server","tserver_log_latency","tserver_log_bytes_written","tserver_log_bytes_read","tserver_log_ops_second","tserver_write_lock_latency","tserver_tc_malloc_stats","tserver_log_stats","tserver_cache_reader_num_ops","tserver_glog_info_messages","tserver_rpc_queue_size_tserver","tserver_cpu_util_secs","tserver_yb_rpc_connections","tserver_live_tablet_peers","raft_leader","tserver_max_follower_lag"]},{title:"Master Server",name:"master",metrics:["master_overall_rpc_rate","master_latency","master_uptime_min","master_get_tablet_location","master_tsservice_reads","master_tsservice_reads_latency","master_tsservice_writes","master_tsservice_writes_latency","master_ts_heartbeats","tserver_rpc_queue_size_master","master_consensus_update","master_consensus_update_latency","master_multiraft_consensus_update","master_multiraft_consensus_update_latency","master_table_ops","master_cpu_util_secs","master_yb_rpc_connections","master_leaderless_and_underreplicated_tablets","master_max_follower_lag","master_load_balancer_stats"]},{title:"Master Server Advanced",name:"master_advanced",metrics:["master_threads_running","master_log_latency","master_log_bytes_written","master_log_bytes_read","master_tc_malloc_stats","master_glog_info_messages","master_lsm_rocksdb_seek_next_prev","master_lsm_rocksdb_num_seeks_per_node","master_lsm_rocksdb_total_sst_per_node","master_lsm_rocksdb_avg_num_sst_per_node","master_lsm_rocksdb_block_cache_hit_miss","master_lsm_rocksdb_block_cache_usage","master_lsm_rocksdb_blooms_checked_and_useful","master_lsm_rocksdb_flush_size","master_lsm_rocksdb_compaction","master_lsm_rocksdb_compaction_numfiles","master_lsm_rocksdb_compaction_time"]},{title:"DocDB",name:"lsmdb",metrics:["lsm_rocksdb_seek_next_prev","lsm_rocksdb_total_sst_per_node","lsm_rocksdb_avg_num_sst_per_node","lsm_rocksdb_latencies_get","lsm_rocksdb_latencies_write","lsm_rocksdb_latencies_seek","lsm_rocksdb_latencies_mutex","lsm_rocksdb_block_cache_hit_miss","lsm_rocksdb_block_cache_usage","lsm_rocksdb_blooms_checked_and_useful","lsm_rocksdb_stalls","lsm_rocksdb_write_rejections","lsm_rocksdb_memory_rejections","lsm_rocksdb_flush_size","lsm_rocksdb_compaction","lsm_rocksdb_compaction_tasks","lsm_rocksdb_compaction_time","lsm_rocksdb_compaction_numfiles","lsm_rocksdb_mem_tracker_db_memtable","docdb_transaction","docdb_transaction_pool_cache","tablet_splitting_stats","automatic_split_manager_time"]}],Vl="gant-chart-anomalies",Wl={ysql_server_rpc_per_second:"Total SQL Ops / Sec",ysql_sql_latency:"SQL Ops & Latency",ysql_connections:"Total SQL Connections",ysql_connections_per_sec:"Total SQL Connections / Sec",ysql_server_advanced_rpc_per_second:"Total YSQL Advanced Ops / Sec",ysql_sql_advanced_latency:"YSQL Advanced Op Latency (Avg)",ysql_catalog_cache_misses:"Catalog Cache Miss Count",ysql_conn_mgr_active_connections:"Connection Pooling - Client Connections",cql_server_rpc_per_second:"Total YCQL Ops / Sec",cql_sql_latency:"YCQL Op Latency (Avg)",cql_server_rpc_p99:"YCQL Op Latency (P99)",cql_sql_latency_breakdown:'YCQL Latency Breakdown"',cql_yb_local_vs_remote:"YBClient Ops Local vs Remote",cql_yb_latency:"YBClient Latency",cql_reactor_latency:"Reactor Delays",tserver_rpc_queue_size_cql:"RPC Queue Size",response_sizes:"Response Size",cql_yb_transaction:"Transaction",cql_yb_rpc_connections:"Inbound RPC Connections Alive",cpu_usage:"CPU Usage",memory_usage:"Memory Usage",disk_iops:"Disk IOPS / Node",disk_usage_percent:"Data Disks Usage Percent",disk_used_size_total:"Data Disks Usage",disk_volume_usage_percent:"Disk Volume Usage Percent",disk_volume_used:"Disk Volume Usage",disk_bytes_per_second_per_node:"Disk Bytes / Node",disk_io_time:"Disk active IO time",disk_io_queue_depth:"Average I/O Queue Depth",disk_io_read_latency:"Disk Read Latency",disk_io_write_latency:"Disk Write Latency",network_packets:"Network Packets / Sec / Node",network_bytes:"Network Bytes / Sec / Node",network_errors:"Network Errors / Sec / Node",system_load_over_time:"System Load Over Time",node_clock_skew:"Clock Skew",process_user_cpu_seconds:"User CPU Seconds",process_system_cpu_seconds:"System CPU Seconds",process_virtual_memory:"Virtual Memory",process_resident_memory:"RSS Memory",process_proportional_memory:"PSS Memory",process_io_read:"IO Read",process_io_write:"IO Write",process_open_files:"Open Files",tserver_rpcs_per_sec_per_node:"Ops / Sec / Node",tserver_ops_latency:"Average Latency",tserver_handler_latency:"Reactor Delays",tserver_threads_running:"Threads Running",tserver_threads_started:'Threads Started"',tserver_uptime_min:"Uptime",tserver_consensus_rpcs_per_sec:"Consensus Ops / Sec",tserver_change_config:"Total Consensus Change Config",tserver_remote_bootstraps:'"Remote Bootstraps',tserver_consensus_rpcs_latency:"Consensus Rpc Latencies",tserver_change_config_latency:"Change Config Latency",tserver_context_switches:"Context Switches",tserver_spinlock_server:"SpinLock Time/Server",tserver_log_latency:"WAL Latency",tserver_log_bytes_written:"WAL Bytes Written / Sec / Node",tserver_log_bytes_read:"WAL Bytes Read / Sec / Node",tserver_log_ops_second:"WAL Ops / Sec / Node",tserver_write_lock_latency:"Write Lock Latency",tserver_tc_malloc_stats:"TCMalloc Stats",tserver_log_stats:"WAL Stats / Node",tserver_cache_reader_num_ops:'WAL Cache Num Ops / Node"',tserver_glog_info_messages:'Glog messages"',tserver_rpc_queue_size_tserver:"RPC Queue Size",tserver_cpu_util_secs:"CPU Util Secs / Sec",tserver_yb_rpc_connections:'Inbound RPC Connections Alive"',tserver_live_tablet_peers:"Live Tablet Peers",raft_leader:"Raft Leader",tserver_max_follower_lag:"Max Follower Lag (ms)",master_overall_rpc_rate:"Overall RPCs / sec",master_latency:"Average Latency",master_uptime_min:"Uptime",master_get_tablet_location:"GetTabletLocations / sec",master_tsservice_reads:"Master TSService Reads / sec",master_tsservice_reads_latency:"Master TS Read Latency",master_tsservice_writes:"Master TSService Writes / sec",master_tsservice_writes_latency:"Master TS Write Latency",master_ts_heartbeats:"TS Heartbeats / sec",tserver_rpc_queue_size_master:"RPC Queue Size",master_consensus_update:"UpdateConsensus / sec",master_consensus_update_latency:"UpdateConsensus Latency",master_multiraft_consensus_update:"MultiRaftUpdateConsensus / sec",master_multiraft_consensus_update_latency:"MultiRaftUpdateConsensus Latency",master_table_ops:"Create/Delete Table RPCs",master_cpu_util_secs:"CPU Util Secs / Sec",master_yb_rpc_connections:"Inbound RPC Connections Alive",master_leaderless_and_underreplicated_tablets:"Leaderless/Underreplicated Tablets",master_max_follower_lag:"Max Follower Lag (ms)",master_load_balancer_stats:"Master load balancer statistics",master_threads_running:"Threads Running",master_log_latency:"WAL Latency",master_log_bytes_written:"WAL Bytes Written / Sec / Node",master_log_bytes_read:"WAL Bytes Read / Sec / Node",master_tc_malloc_stats:"TCMalloc Stats",master_glog_info_messages:"Glog Messages",master_lsm_rocksdb_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec",master_lsm_rocksdb_num_seeks_per_node:"LSM-DB Seeks / Sec / Node",master_lsm_rocksdb_total_sst_per_node:"SSTable size",master_lsm_rocksdb_avg_num_sst_per_node:"Average SSTables",master_lsm_rocksdb_block_cache_hit_miss:"Cache Hit & Miss",master_lsm_rocksdb_block_cache_usage:"Block cache usage",master_lsm_rocksdb_blooms_checked_and_useful:'"LSM-DB Blooms usefulness',master_lsm_rocksdb_flush_size:"Flush write",master_lsm_rocksdb_compaction:"Compaction",master_lsm_rocksdb_compaction_numfiles:"Compaction num files",master_lsm_rocksdb_compaction_time:"Compaction time",lsm_rocksdb_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec / Node",lsm_rocksdb_total_sst_per_node:"SSTable size / Node",lsm_rocksdb_avg_num_sst_per_node:"Average SSTables / Node",lsm_rocksdb_latencies_get:"LSM-DB Get Latencies",lsm_rocksdb_latencies_write:"LSM-DB Write Latencies",lsm_rocksdb_latencies_seek:"LSM-DB Seek Latencies",lsm_rocksdb_latencies_mutex:"LSM-DB Mutex Wait / Sec / Node",lsm_rocksdb_block_cache_hit_miss:"Cache Hit & Miss",lsm_rocksdb_block_cache_usage:"Block cache usage",lsm_rocksdb_blooms_checked_and_useful:"LSM-DB Blooms usefulness",lsm_rocksdb_stalls:"Stalls",lsm_rocksdb_write_rejections:"Write Rejections",lsm_rocksdb_memory_rejections:"Memory Rejections",lsm_rocksdb_flush_size:"Flush write",lsm_rocksdb_compaction:"Compaction",lsm_rocksdb_compaction_tasks:"Compaction tasks",lsm_rocksdb_compaction_time:"Compaction time",lsm_rocksdb_compaction_numfiles:"Compaction num files",lsm_rocksdb_mem_tracker_db_memtable:"Memtable Size",docdb_transaction:"Transaction",docdb_transaction_pool_cache:"Transaction pool cache hits",tablet_splitting_stats:"Tablet Splitting Operations",automatic_split_manager_time:"Tablet Split Manager",table_read_latency:"Read Op Latency (Avg)",table_read_rps:"Read Ops / Sec",table_write_latency:"Write Op Latency (Avg)",table_write_rps:"Write Ops / Sec",table_log_latency:"WAL Latency",table_log_ops_second:"WAL Ops / Sec",table_log_bytes_written:"WAL Bytes Written / Sec",table_write_lock_latency:"Write Lock Latency",table_seek_next_prev:"LSM-DB Seek/Next/Prev Ops / Sec",table_ops_in_flight:"Operations Inflight",table_write_rejections:"Write Rejections",table_memory_rejections:"Memory Pressure Rejections",table_compaction:"Compaction",table_block_cache_hit_miss:"Cache Hit & Miss",table_rocksdb_blooms_checked_and_useful:"LSM-DB Blooms usefulness",table_mem_tracker_db_memtable:"Memtable Size"},Yl="METRICS_NAMES",Gl="METRICS_OUTLIER_TABLES_NAMES",ql="METRICS_OUTLIER_DATABASES_NAMES",Ql=["#8c564b","#4754DB","#2FB3FF","#BB42BC","#20A7C9","#e377c2","#7f7f7f","#bcbd22","#17becf"],Zl={Queries:"#0B1117",Cpu:"#56C188",DiskIO:"#E48B2C",WaitOnCondition:"#B7C3CB",RPCWait:"#966919",Network:"#966919",Client:"#8046EB",IO:"#3884FB",LWLock:"#DA1515",Lock:"#E34F6E",TServerWait:"#e377c2","# vCPU":"#888888",DB:"#7879F1",NODE:"#FFD383",SQL:"#BB42BC",APP:"#2FB3FF",INFRA:"#507CE1",TableRead:"#966919",CatalogRead:"#966919",IndexRead:"#966919",StorageFlush:"#966919",TableWrite:"#966919",CatalogWrite:"#966919",IndexWrite:"#966919",WaitingOnTServer:"#966919",QueryProcessing:"#56C188",yb_ash_metadata:"#DA1515",YBParallelScanEmpty:"#3884FB",CopyCommandStreamRead:"#3884FB",CopyCommandStreamWrite:"#3884FB",YbAshMain:"#0B1117",YbAshCircularBuffer:"#DA1515",QueryDiagnosticsMain:"#0B1117",YbQueryDiagnostics:"#DA1515",YbQueryDiagnosticsCircularBuffer:"#DA1515",YBTxnConflictBackoff:"#B7C3CB",OnCpu_Passive:"#56C188",OnCpu_Active:"#56C188",Idle:"#B7C3CB",Rpc_Done:"#B7C3CB",RetryableRequests_SaveToDisk:"#E48B2C",MVCC_WaitForSafeTime:"#B7C3CB",LockedBatchEntry_Lock:"#E34F6E",BackfillIndex_WaitForAFreeSlot:"#B7C3CB",CreatingNewTablet:"#E48B2C",SaveRaftGroupMetadataToDisk:"#E48B2C",TransactionStatusCache_DoGetCommitData:"#966919",WaitForYSQLBackendsCatalogVersion:"#B7C3CB",WriteSysCatalogSnapshotToDisk:"#E48B2C",DumpRunningRpc_WaitOnReactor:"#B7C3CB",ConflictResolution_ResolveConficts:"#966919",ConflictResolution_WaitOnConflictingTxns:"#B7C3CB",WAL_Append:"#E48B2C",WAL_Sync:"#E48B2C",Raft_WaitingForReplication:"#966919",Raft_ApplyingEdits:"#56C188",ConsensusMeta_Flush:"#E48B2C",ReplicaState_TakeUpdateLock:"#B7C3CB",RocksDB_ReadBlockFromFile:"#E48B2C",RocksDB_OpenFile:"#E48B2C",RocksDB_WriteToFile:"#E48B2C",RocksDB_Flush:"#56C188",RocksDB_Compaction:"#56C188",RocksDB_PriorityThreadPoolTaskPaused:"#B7C3CB",RocksDB_CloseFile:"#E48B2C",RocksDB_RateLimiter:"#B7C3CB",RocksDB_WaitForSubcompaction:"#B7C3CB",RocksDB_NewIterator:"#E48B2C",YCQL_Parse:"#56C188",YCQL_Read:"#56C188",YCQL_Write:"#56C188",YCQL_Analyze:"#56C188",YCQL_Execute:"#56C188",YBClient_WaitingOnDocDB:"#966919",YBClient_LookingUpTablet:"#966919"},Xl={UNIVERSE_PA_STATUS_ERROR:"Universe is not registered to TP, please register to view data",UNIVERSE_DETAILS_ERROR:"Failed to fetch anomalies list, please try again.",ANOMALIES_FETCH_ERROR:"Failed to retrieve anomalies, please try again.",SHOW_MORE_ANOMALIES_FETCH_ERROR:"Failed to retrieve additional anomalies, please try again.",ANOMALY_SCHEDULE_ERROR:"Failed to schedule anomaly detection, please try again.",RUNTIME_CONFIGS_ERROR:"Failed to fetch runtime configs, please try again.",RCA_GRAPHS_FETCH_ERROR:"Failed to fetch anomaly RCA graphs, please try again.",GANTCHART_FETCH_ERROR:"Failed to fetch anomaly Gantt chart, please try again.",QUERIES_GRAPHS_FETCH_ERROR:"Failed to fetch query supporting graphs, please try again.",METRICS_GRAPHS_FETCH_ERROR:"Failed to fetch metrics graphs, please try again.",HISTORICAL_QUERY_DATA_FETCH_ERROR:"Failed to fetch historical query data, please try again.",CLUSTER_LOAD_FETCH_ERROR:"Failed to fetch cluster load data, please try again.",QUERY_STATS_FETCH_ERROR:"Failed to fetch query stats, please try again."},$l=function(t,n,r,i){if(0!==r){return function(r,o,a,s,l){return e.jsx(Ss,{total:r,page:o,rowsPerPage:a,onPageSizeChange:s,dataPrefetchFn:t,rowsPerPageOptions:yl,showRecordsPerPage:!0,recordsPerPageCaption:e.jsx("span",{children:n}),onPageChange:l,hasMoreData:i})}}},Kl=i.makeStyles((function(e){return{recommendation:{background:e.palette.common.white,border:"1px solid ".concat(e.palette.grey[300]),borderRadius:e.shape.borderRadius,padding:e.spacing(2,2.5),position:"relative",marginBottom:e.spacing(3)},disabled:{cursor:"not-allowed",color:"#999999"},tagGreen:{color:"#206263"},flexRow:{display:"flex",flexDirection:"row"},flexColumn:{display:"flex",flexDirection:"column"},inProgressIcon:{color:"#1A44A5"},icon:{height:"40px",width:"40px"},loadingBox:{display:"flex",justifyContent:"center"},tabGroup:{display:"flex",flexDirection:"column",gap:"16px",paddingLeft:"1px"},tabButton:{padding:"12px 16px",minWidth:"130px",height:"40px",boxSizing:"border-box",borderRadius:"8px"},selectedTab:{margin:"0 -1px",backgroundColor:"#F7F7F7",border:"1px solid #C8C8C8"},tabPanel:{padding:"32px"},noTabBorder:{borderBottom:"unset"},tabBox:{marginTop:e.spacing(3),border:"1px solid ".concat(e.palette.grey[300]),borderRadius:"8px"},metricsBox:{backgroundColor:"#FFFFFF",border:"1px solid ".concat(e.palette.grey[300]),borderRadius:"8px",padding:"0px 16px 16px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiMenu-list":{maxHeight:"400px"}},regularText:{fontWeight:400,fontSize:"13px"},detectionButton:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},floatRight:{float:"right"},restrictLines:{display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,maxHeight:"4.5em",lineHeight:"1.5em"},searchInput:{minWidth:"220px",maxWidth:"350px",marginLeft:e.spacing(2),flexGrow:1,marginRight:"auto",height:"36px"},selectBox:{width:"180px",height:"36px"},mainGraphBox:{border:"1px solid #D7DEE4",borderRadius:"8px",padding:e.spacing(2),display:"flex",flexDirection:"column"},mainGraphMetadataBox:{display:"flex",width:"100%",justifyContent:"flex-start"},anomalyMetadataOneBox:{flexBasis:"70%",textAlign:"left",padding:"16px 16px 16px 0",display:"flex",flexDirection:"column"},anomalyMetadataTwoBox:{flexBasis:"40%",padding:e.spacing(2),textAlign:"left",display:"flex",flexDirection:"column"},headerTitle:{fontWeight:500,fontSize:"11.5px",fontFamily:"Inter",color:"#6D7C88"},metadataDetails:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#4E5F6D",marginTop:e.spacing(1),marginBottom:e.spacing(1)},regularMetadata:{fontWeight:400,fontSize:"13px",color:"#0B1117"},boxContainer:{border:"1px solid #E9EEF2",borderRadius:"8px"},headerMetadataBox:{padding:e.spacing(2),backgroundColor:"#F0F4F7",gap:"16px"},causesBox:{border:"1px solid #E9EEF2",backgroundColor:"#FFFFFF",borderRadius:"8px",padding:"16px 16px 16px 16px",margin:"16px 8px 8px 8px"},causeTabButton:{minWidth:"fit-content",marginRight:e.spacing(1),"&:hover":{boxShadow:"none",borderRadius:e.shape.borderRadius},"& .MuiTab-root":{padding:"6px 0px !important",maxWidth:"264px"},"& .Mui-selected":{background:e.palette.grey[300],borderRadius:e.spacing(1)},"& .MuiTab-wrapper":{alignItems:"center"},"& .MuiTabs-indicator":{}},causeTabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},causeText:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#000000"},descriptionText:{fontFamily:"Inter",color:"#000000",fontSize:"13px",fontWeight:400,marginTop:e.spacing(1),marginBottom:e.spacing(1),marginLeft:e.spacing(1)},tag:{borderRadius:"4px",backgroundColor:"#E9EEF2",padding:"2px 6px 4px 6px",width:"fit-content"},tagName:{fontFamily:"Inter",fontSize:"11.5px",fontWeight:400,color:"#4E5F6D",borderRadius:"8px"},metadataName:{fontFamily:"Inter",fontSize:"13px",fontWeight:400},breadCrumb:{marginLeft:e.spacing(2),position:"relative","& .MuiSvgIcon-root":{fontSize:e.spacing(4)}},breadCrumbText:{fontWeight:600,fontStyle:"semibold",fontSize:"15px"},breadcrumbColor:{color:"#2B59C3"},breadcrumbDefaultColor:{color:"#0B1117"},anomalyCategoryText:{color:"#0B1117",fontWeight:600},dateTimePicker:{"& .MuiFormControl-root":{height:"32px !important"},height:"32px !important"},panelItemBody:{padding:"16px 16px 16px 0"},rcaGantChartBox:{width:"95%",padding:"16px 48px 16px 40px",marginLeft:"16px",borderRadius:"8px",border:"1px solid #D7DEE4"},tabPanelPrimary:{padding:"0px !important"},overrideMuiTableContainer:{marginTop:e.spacing(3),"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTableContainerWeb:{marginTop:e.spacing(3),"& .MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTable:{marginTop:e.spacing(2),textAlign:"center","& .MuiTableCell-sizeSmall":{textAlign:"center"},"& .MuiSelect-select":{fontSize:"13px"}},tableBorder:{borderRight:"1px solid #ccc"},tableHeaderCell:{position:"relative",borderBottom:"1px solid ".concat(e.palette.grey[300]),"&:first-of-type":{padding:e.spacing(.25,0,1,3),"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)")}},"&:last-of-type":{"&:before":{width:"calc(100% - ".concat(e.spacing(2),"px)"),right:e.spacing(2)}},"&:before":{content:'""',position:"absolute",right:0,bottom:0,height:"1px",width:"100%"}},overrideMuiSelect:{width:"210px",height:"36px"},label:{fontFamily:"Inter, sans-serif",fontStyle:"normal",fontSize:"13px"},tooltip:{maxWidth:"400px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden",whiteSpace:"normal",padding:e.spacing(1)},gridBox:{display:"grid",gap:"16px",width:"100%",gridAutoFlow:"row"},gridBoxDouble:{gridTemplateColumns:"repeat(2, minmax(0, 1fr))"},gridBoxSingle:{gridTemplateColumns:"repeat(1, minmax(0, 1fr))"},gridBoxThree:{gridTemplateColumns:"repeat(3, minmax(0, 1fr))"},dataBox:{border:"1px solid #E9EEF2",borderRadius:"8px",padding:"16px",backgroundColor:"#FFFFFF"},headerContainer:{border:"1px solid #E9EEF2",backgroundColor:"#FFFFFF",borderRadius:"8px",padding:"24px 16px 16px 16px"},anomalyTypeTag:{height:"24px",backgroundColor:"#E8E9FE",borderRadius:"6px",padding:"4px 6px 4px 6px"},anomalyTypeText:{color:"#30307F",fontFamily:"Inter",fontSize:"11.5px",fontWeight:400,verticalAlign:"super"},stickyHeader:{position:"sticky",top:0,zIndex:1100,backgroundColor:"#fff"},infoIcon:{marginLeft:e.spacing(.5)}}})),Jl=function(t){var n=t.rowData,r=t.appName,i=t.onSelectedQuery,o=t.onClose;Kl();var a=n.databaseId,s=n.queryId,l=n.universeId,u=n.queryType,c=u===exports.QueryType.SQL||u===exports.QueryType.BACKGROUND;return e.jsxs(e.Fragment,{children:[r===exports.AppName.YBM&&function(){o();var e=null,t=new URLSearchParams(window.location.search);t.set("type",u),t.set("queryId",s),t.set("universeId",l),c?(e={queryId:s,dbId:null==a?void 0:a.toString(),universeId:l,type:u},t.set("dbId",e.dbId)):e={queryId:s,universeId:l,type:u},null==i||i(s.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"?").concat(t.toString()))}(),(r===exports.AppName.WEB||r===exports.AppName.YBA)&&function(e,t,n){o();var i=window.location.pathname,a=new URLSearchParams(window.location.search);a.set("universeId",n),a.set("type",u),c&&a.set("dbId",t),r===exports.AppName.YBA&&a.set("queryId",s);var l=a.toString(),d="".concat(i,"/").concat(e).concat(l?"?".concat(l):"");window.open(d,"_blank")}(s,null==a?void 0:a.toString(),l)]})},eu=C.default.memo((function(n){var i=n.appName;n.currentTablePage;var o=n.displayedRows,a=n.classes,s=n.showQuery,l=n.tableColumns,u=n.ignoredColumns;n.startTime,n.endTime;var c=n.onSelectedQuery,d=n.expandedRowIndex,p=n.handleExpandedRowIndex,h=n.dataIndex,f=n.data,g=l.filter((function(e){return!u.includes(e.name)})).length>0;return e.jsxs(t.Fragment,{children:[e.jsx(r.TableRow,F({className:a.tableRow,onClick:function(e){p(d!==h?h:null)}},{children:g&&f.map((function(t,n){return void 0!==t?e.jsx(r.TableCell,F({className:s?a.rowTableCell:"",style:{overflow:"visible",position:"relative",paddingTop:8,paddingBottom:8}},{children:t}),"TableHelper-row-".concat(h,"-body-cell-").concat(n)):null}))}),"TableHelper-queries-row-".concat(String(f[0]))),d===h&&e.jsx(Jl,{appName:i,rowData:o[h],onSelectedQuery:c,onClose:function(){return p(null)}})]})})),tu=function(t,n,r,i,o,a,s,l,u,c,d,p){return function(h,f){return e.jsx(eu,{appName:t,currentTablePage:n,displayedRows:r,classes:i,showQuery:o,tableColumns:a,ignoredColumns:s,startTime:l,endTime:u,onSelectedQuery:p,expandedRowIndex:c,handleExpandedRowIndex:d,dataIndex:f,data:h})}},nu=r.makeStyles((function(e){return{root:{width:38,height:20,padding:0,display:"flex"},switchBase:{padding:e.spacing(.5),color:e.palette.common.white,"&$checked":{transform:"translateX(17px)",color:e.palette.common.white,"& + $track":{opacity:1,backgroundColor:e.palette.primary.main,borderColor:e.palette.primary.main}}},thumb:{width:12,height:12,boxShadow:"none",color:e.palette.common.white},track:{border:"1px solid ".concat(e.palette.grey[400]),borderRadius:11,opacity:1,backgroundColor:e.palette.grey[400],"&$disabled":{backgroundColor:e.palette.common.white}},checked:{}}})),ru=r.makeStyles((function(e){return{root:{marginLeft:0,marginRight:0,"&.Mui-disabled":{"& .MuiSwitch-track":{backgroundColor:"".concat(e.palette.grey[300]," !important"),borderColor:"".concat(e.palette.grey[200]," !important"),opacity:1}}},label:F(F({},e.typography.body2),{marginLeft:e.spacing(1)}),labelPlacementStart:{"& .MuiFormControlLabel-label":{marginLeft:0,marginRight:e.spacing(1)}}}})),iu=function(t){var n=t.label,i=t.formControlLabelProps,o=U(t,["label","formControlLabelProps"]),a=nu(),s=ru();return e.jsx(r.FormControlLabel,F({control:e.jsx(r.Switch,F({color:o.disabled?"default":"primary",classes:a},o)),labelPlacement:"end",label:n,classes:s},i))},ou=function(t){var n=t.name,r=t.rules,i=t.defaultValue,o=t.control,a=t.shouldUnregister,s=U(t,["name","rules","defaultValue","control","shouldUnregister"]),l=dn({name:n,rules:r,defaultValue:i,control:o,shouldUnregister:a}).field;l.ref;var u=l.value,c=U(l,["ref","value"]);return e.jsx(iu,F({},c,{inputProps:{"data-testid":"YBToggleField-".concat(n)}},s,{checked:!!u}))},au=i.makeStyles((function(e){return{icon:{marginRight:e.spacing(1),width:"13px"},metricMeasureButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF",fontSize:"13px !important"},borderOverallButton:{borderRadius:"8px 0px 0px 8px"},borderOutlierButton:{borderRadius:"0px 8px 8px 0px"}}})),su=function(n){var i,o,a,s,l,u,c,d,p,h,f=n.metricSplitSelectors,g=n.onSplitTypeSelected,m=n.anomalyData,v=au(),y=0;(null===(o=null===(i=null==m?void 0:m.lastInstance)||void 0===i?void 0:i.defaultSettings)||void 0===o?void 0:o.splitMode)===Ls.NONE&&(null===(s=null===(a=null==m?void 0:m.lastInstance)||void 0===a?void 0:a.defaultSettings)||void 0===s?void 0:s.splitType)===Ps.NONE&&(y=0),(null===(u=null===(l=null==m?void 0:m.lastInstance)||void 0===l?void 0:l.defaultSettings)||void 0===u?void 0:u.splitMode)!==Ls.TOP&&(null===(d=null===(c=null==m?void 0:m.lastInstance)||void 0===c?void 0:c.defaultSettings)||void 0===d?void 0:d.splitMode)!==Ls.BOTTOM||(y=(null===(h=null===(p=null==m?void 0:m.lastInstance)||void 0===p?void 0:p.defaultSettings)||void 0===h?void 0:h.splitType)===Ps.NODE?1:2);var x=t.useState(y),_=x[0],b=x[1];return e.jsx(r.Box,F({display:"flex",flexDirection:"row"},{children:e.jsx(r.Box,{children:f.map((function(t,n){var r,i=_===n;return e.jsx(Q,F({className:Y(v.metricMeasureButton,i&&v.overrideMuiButton,(r={},r[v.borderOverallButton]=0===n,r[v.borderOutlierButton]=n===f.length-1,r)),"data-testid":"MetricTypeSelector-MetricMeasureButton-".concat(n),onClick:function(){g(t.value),b(n)},size:"medium",variant:"secondary"},{children:t.label}))}))})}))},lu=i.makeStyles((function(e){return{icon:{marginRight:e.spacing(1)},outlierSelectorButton:{border:"1px solid #E5E5E9",borderRadius:"0px",height:"32px"},overrideMuiButton:{color:"#2b59c3 !important",fontSize:"13px !important",background:"linear-gradient(0deg, rgba(43, 89, 195, 0.1), rgba(43, 89, 195, 0.1)), #FFFFFF"},borderOverallButton:{borderRadius:"8px 0px 0px 8px"},borderOutlierButton:{borderRadius:"0px 8px 8px 0px"},input:{width:"60px",height:"32px"}}})),uu=function(n){var i=n.metricOutlierSelectors,o=n.selectedNumNodes,a=n.outlierType,s=n.onOutlierTypeSelected,l=n.onNumNodesChanged,u=lu(),c=a===Ls.TOP?0:1,d=t.useState(c),p=d[0],h=d[1];return e.jsxs(r.Box,F({ml:2,display:"flex",flexDirection:"row"},{children:[e.jsx(r.Box,{children:e.jsx("img",{className:u.icon,src:"data:image/svg+xml,%3csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.0911 3.70567H2V0.60325C2 0.316226 1.82388 0 1.37381 0C0.923736 0 0.74762 0.316226 0.74762 0.60325V4.78291H12.0911L9.85455 7.08053C9.63621 7.29087 9.63621 7.6319 9.85455 7.84224C10.0729 8.05259 10.4269 8.05259 10.6452 7.84224L13.8362 4.62515C14.0546 4.41481 14.0546 4.07377 13.8362 3.86343L10.6452 0.603249C10.4269 0.392907 10.0729 0.392907 9.85455 0.603249C9.63621 0.813592 9.63621 1.15463 9.85455 1.36497L12.0911 3.70567Z' fill='%2397A5B0'/%3e%3c/svg%3e",alt:"Indicator towards metric measure to use"})}),e.jsx(r.Box,{children:i.map((function(t,n){var r,i=p===n;return e.jsx(e.Fragment,{children:e.jsx(Q,F({className:Y(u.outlierSelectorButton,i&&u.overrideMuiButton,(r={},r[u.borderOverallButton]=0===n,r[u.borderOutlierButton]=1===n,r)),"data-testid":"OutlierSelector-OutlierButton-".concat(n),onClick:function(){s(t.value),h(n)},size:"medium",variant:"secondary"},{children:t.label}))})}))}),e.jsx(r.Box,F({ml:2},{children:e.jsx(Tt,{type:"number",className:u.input,inputProps:{min:1,"data-testid":"OutlierSelector-NodesInput"},value:o,onChange:function(e){return l(e.target.value)},inputMode:"numeric"})}))]}))},cu="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.0911 7.70567H3V4.60325C3 4.31623 2.82388 4 2.37381 4C1.92374 4 1.74762 4.31623 1.74762 4.60325V8.78291H13.0911L10.8545 11.0805C10.6362 11.2909 10.6362 11.6319 10.8545 11.8422C11.0729 12.0526 11.4269 12.0526 11.6452 11.8422L14.8362 8.62515C15.0546 8.41481 15.0546 8.07377 14.8362 7.86343L11.6452 4.60325C11.4269 4.39291 11.0729 4.39291 10.8545 4.60325C10.6362 4.81359 10.6362 5.15463 10.8545 5.36497L13.0911 7.70567Z' fill='%23232329' fill-opacity='0.4'/%3e%3c/svg%3e",du=i.makeStyles((function(e){return{selectBox:{minWidth:"250px"},boldText:{fontWeight:500},regularText:{fontWeight:300},menuItem:{display:"block",padding:"15px 20px",height:"52px",whiteSpace:"nowrap",fontSize:"13px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiInput-root":{borderRadius:"0px 8px 8px 0px",height:"32px !important"},"& .MuiMenu-list":{maxHeight:"400px"}},icon:{marginRight:e.spacing(1)}}})),pu="All Zones and Nodes",hu=function(t){var n=t.selectedItem,i=t.primaryZoneToNodesMap,o=t.asyncZoneToNodesMap,a=t.onZoneNodeSelected,s=du();return e.jsx(lr,F({className:Y(s.selectBox,s.overrideMuiInput),"data-testid":"zone-node-select",value:n},{children:function(t,n){var i=[];i.push(e.jsx(r.MenuItem,F({value:pu,onClick:function(e){a(!1,!1,pu)},className:Y(s.menuItem,s.regularText)},{children:pu}),pu)),i.push(e.jsx(r.Divider,{}));for(var o=t.values(),l=o.next(),u=function(){var t=l.value,n=t.zoneName,u=t.nodeNames;n&&i.push(e.jsx(r.MenuItem,F({value:n,onClick:function(e){a(!0,!1,n)},className:Y(s.menuItem,s.boldText)},{children:n}),n)),$a(u)&&u.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))})),l=o.next()};Ka(l.value);)u();if((null==n?void 0:n.size)>0){i.push(e.jsx(r.Divider,{}));for(var c=n.values(),d=c.next(),p=function(){var t=d.value,n=t.zoneName,o=t.nodeNames;n&&i.push(e.jsx(r.MenuItem,F({value:n,onClick:function(e){a(!0,!1,n)},className:Y(s.menuItem,s.boldText)},{children:n}),n)),$a(o)&&o.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))})),d=c.next()};Ka(d.value);)p()}return i}(i,o)}))},fu=i.makeStyles((function(e){return{selectBox:{minWidth:"250px"},boldText:{fontWeight:500},regularText:{fontWeight:300},menuItem:{display:"block",padding:"15px 20px",height:"52px",whiteSpace:"nowrap",fontSize:"13px"},overrideMuiInput:{"& .MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .MuiInput-root":{borderRadius:"8px 0px 0px 8px",height:"32px !important"}},icon:{marginRight:e.spacing(1)}}})),gu=function(t){var n=t.selectedItem,i=t.primaryClusterToRegionMap,o=t.asyncClusterToRegionMap,a=t.onClusterRegionSelected,s=fu();return e.jsx(lr,F({className:Y(s.selectBox,s.overrideMuiInput),"data-testid":"cluster-region-select",value:n},{children:i.size>0&&function(t,n){var i=[];i.push(e.jsx(r.MenuItem,F({value:Xs,onClick:function(e){a(!1,!1,Xs,!1)},className:Y(s.menuItem,s.regularText)},{children:Xs}),Xs)),i.push(e.jsx(r.Divider,{}));var o=t.values().next().value,l=o.cluster,u=o.regions,c=o.uuid;if(Ja(l)&&i.push(e.jsx(r.MenuItem,F({value:c,onClick:function(e){a(!0,!1,c,!0)},className:Y(s.menuItem,s.boldText)},{children:l}),c)),$a(u)&&u.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t,!0)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))})),(null==n?void 0:n.size)>0){i.push(e.jsx(r.Divider,{}));var d=n.values().next().value,p=d.cluster,h=d.regions,f=d.uuid;Ja(p)&&i.push(e.jsx(r.MenuItem,F({value:f,onClick:function(e){a(!0,!1,f,!0)},className:Y(s.menuItem,s.boldText)},{children:p}),f)),$a(h)&&h.forEach((function(t){i.push(e.jsxs(r.MenuItem,F({value:t,onClick:function(e){a(!1,!0,t,!0)},className:Y(s.menuItem,s.regularText)},{children:[e.jsx("img",{className:s.icon,src:cu,alt:"Indicator towards metric measure to use"}),t]}),t))}))}return i}(i,o)}))},mu=function(t){var n=t.name,r=t.rules,i=t.defaultValue,o=t.control,a=t.shouldUnregister,s=U(t,["name","rules","defaultValue","control","shouldUnregister"]),l=dn({name:n,rules:r,defaultValue:i,control:o,shouldUnregister:a}).field;return e.jsx(Rr,F({name:l.name,inputRef:l.ref,checked:!!l.value,onBlur:l.onBlur,onChange:l.onChange},s))},vu=0,yu=function(e){var t,n,r,i,o=new Map,a=new Map,s=new Map,l=new Map,u=new Map,c=null==e?void 0:e.universeDetails;if(c){var d=c.nodeDetailsSet,p=c.clusters,h=Su(p),f=function(e){if($a(e)){var t=e.filter((function(e){return"ASYNC"===e.clusterType}));if(1===t.length)return t[0]}return null}(p),g=null===(t=h.placementInfo.cloudList)||void 0===t?void 0:t[0].regionList,m=null===(i=null===(r=null===(n=null==f?void 0:f.placementInfo)||void 0===n?void 0:n.cloudList)||void 0===r?void 0:r[0])||void 0===i?void 0:i.regionList,v=h.uuid,y=null==f?void 0:f.uuid,x=g.map((function(e){return e.code})),_=null==m?void 0:m.map((function(e){return e.code}));o.set("Primary",{cluster:"Primary",regions:x,uuid:v}),f&&a.set("Async",{cluster:"Read Replica",regions:_,uuid:y});for(var b=0,w=d;b<w.length;b++){var S=w[b],C=S.cloudInfo,T=S.placementUuid,M=S.nodeName;u.set(M,{nodeName:M,ip:C.private_ip}),T===v?s.set(C.az,{zoneName:C.az,nodeNames:bu(d,C.az,v),isReadReplica:!1,regionName:C.region}):l.set(C.az,{zoneName:C.az,nodeNames:bu(d,C.az,y),isReadReplica:!0,regionName:C.region})}}return{primaryZoneMapping:s,asyncZoneMapping:l,primaryClusterMapping:o,asyncClusterMapping:a,nodeIPMapping:u}},xu=function(e){var t=new Map,n=new Map,r=new Map,i=new Map,o=null==e?void 0:e.data;if(o)for(var a=0,s=o;a<s.length;a++){var l=s[a],u=l.cloud_info,c=l.is_read_replica;c?n.set("Async",{cluster:"Read Replica",regions:wu(o,!0)}):t.set("Primary",{cluster:"Primary",regions:wu(o,!1)}),c?i.set(u.zone,{zoneName:u.zone,nodeNames:_u(o,u.zone,!0),isReadReplica:c,regionName:u.region}):r.set(u.zone,{zoneName:u.zone,nodeNames:_u(o,u.zone,!1),isReadReplica:c,regionName:u.region})}return{primaryZoneMapping:r,asyncZoneMapping:i,primaryClusterMapping:t,asyncClusterMapping:n}},_u=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i],s=a.name,l=a.cloud_info,u=a.is_read_replica;t===l.zone&&u===n&&r.push(s)}return r},bu=function(e,t,n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i],s=a.nodeName,l=a.cloudInfo,u=a.placementUuid;t===l.az&&u===n&&r.push(s)}return r},wu=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r],a=o.cloud_info;o.is_read_replica!==t||n.includes(a.region)||n.push(a.region)}return n},Su=function(e){if($a(e)){var t=e.filter((function(e){return"PRIMARY"===e.clusterType}));if(1===t.length)return t[0]}return null};var Cu=function(){return vu+=1},Tu=function(e,t,n){var r,i,o,a,s,l,u=new Set,c={},d=null===(o=null===(i=null===(r=e.layout)||void 0===r?void 0:r.metadata)||void 0===i?void 0:i.currentGroupBy)||void 0===o?void 0:o[0],p=null;if(n){var h=t.filter((function(t,n){return n>0&&t.name===e.name}));if(h.length>=2){var f=h.find((function(t){var n,r,i;return t.name===e.name&&(null===(i=null===(r=null===(n=null==e?void 0:e.layout)||void 0===n?void 0:n.metadata)||void 0===r?void 0:r.currentGroupBy)||void 0===i?void 0:i[0])===exports.WaitEventClassification.TABLET_ID}));if(f)return Array.from(u)}else p=t.find((function(t,n){return n>0&&t.name===e.name}))}else p=t.find((function(t,n){return n>0&&t.name===e.name}));return null===(l=null===(s=null===(a=e.layout)||void 0===a?void 0:a.metadata)||void 0===s?void 0:s.supportedGroupBy)||void 0===l||l.map((function(e){e.label===d&&(c=e),e.label!==exports.WaitEventClassification.QUERY_ID&&u.add(e.name)})),u=Array.from(u),Xa(null==p?void 0:p.groupBy)&&u.sort((function(e,t){return e===c.name?-1:t===c.name?1:0})),u},Mu=function(e,t,n,r,i,o){var a,s;void 0===o&&(o=!1);var l=new Set,u=new Set,c=e===exports.MetricMeasure.OUTLIER||e===exports.MetricMeasure.OUTLIER_TABLES||e===exports.MetricMeasure.OUTLIER_DB;return u=(null===(a=null==t?void 0:t.layout)||void 0===a?void 0:a.type)===Js&&Ka(t)&&c&&n===exports.GraphType.MULTI_SUPPORTING?r?Tu(t,i,o):Array.from(u):o?Tu(t,i,o):Array.from(u),c&&Ka(t)?(t.data.forEach((function(e){l.add(e.name)})),l=Array.from(l)):(null===(s=null==t?void 0:t.layout)||void 0===s?void 0:s.type)===Js&&Ka(t)&&(l=r?Tu(t,i,o):Array.from(new Set)),{uniqueOperations:l,groupByOperations:u}},Eu=function(e,t){Ja(null==t?void 0:t.cluster)&&(null==t?void 0:t.cluster)!==$s?e.clusterUuid=[null==t?void 0:t.cluster]:delete e.clusterUuid,Ja(null==t?void 0:t.region)&&(null==t?void 0:t.region)!==$s?e.regionCode=[null==t?void 0:t.region]:delete e.regionCode,Ja(null==t?void 0:t.zone)&&(null==t?void 0:t.zone)!==$s?e.azCode=[null==t?void 0:t.zone]:delete e.azCode,Ja(null==t?void 0:t.node)&&(null==t?void 0:t.node)!==$s?e.instanceName=[null==t?void 0:t.node]:delete e.instanceName},Iu=function(e,t,n,r,i,o){var a,s,l,u,c=[];if(t){var d=r.metricMeasure===exports.MetricMeasure.OUTLIER_TABLES,p=r.metricMeasure===exports.MetricMeasure.OUTLIER_DB,h=d||p?d?jl[n]:Fl[n]:Bl[n],f=sessionStorage.getItem(d||p?d?Gl:ql:Yl),g=f?JSON.parse(f):{},m=d||p?d?null===(a=Ul.find((function(e){return e.name===h})))||void 0===a?void 0:a.metrics:null===(s=zl.find((function(e){return e.name===h})))||void 0===s?void 0:s.metrics:null===(l=Hl.find((function(e){return e.name===h})))||void 0===l?void 0:l.metrics,v=null!==(u=null==m?void 0:m.filter((function(e){return g[e]})))&&void 0!==u?u:[];return null==v?void 0:v.map((function(e){var t={universeUuid:[null==r?void 0:r.universeUuid]};Eu(t,r);var n=Ps.NONE;return(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?n=Ps.NODE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_TABLES?n=Ps.TABLE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_DB&&(n=Ps.NAMESPACE),{start:null==r?void 0:r.formattedStartDate,end:null==r?void 0:r.formattedEndDate,name:e,filters:t,settings:{splitMode:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ls.NONE:null==r?void 0:r.outlierType,splitType:n,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER,aggregatedValueFunction:js.AVERAGE}}}))}if(!e)return null==i||i.map((function(e){var t=e.settings,n=e.filters;return e.start=null==r?void 0:r.formattedStartDate,e.end=null==r?void 0:r.formattedEndDate,Eu(n,r),t.returnAggregatedValue=(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,t.splitType=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ps.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Ps.NODE:Ps.TABLE,t.splitMode=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ls.NONE:null==r?void 0:r.outlierType,t.splitCount=null==r?void 0:r.numNodes,t})),i;if(e){var y=(null==o?void 0:o.type)===exports.QueryType.SQL||(null==o?void 0:o.type)===exports.QueryType.BACKGROUND,x=hl;(null==o?void 0:o.type)===exports.QueryType.CQL?x=fl:(null==o?void 0:o.type)===exports.QueryType.BACKGROUND&&(x=V([],gl,!0),"5"!==o.queryId||x.includes(ml)||x.push(ml)),x.map((function(e){var t,n={start:null==r?void 0:r.formattedStartDate,end:null==r?void 0:r.formattedEndDate,name:e,filters:{universeUuid:[null!==(t=null==o?void 0:o.universeId)&&void 0!==t?t:""]},settings:{splitMode:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ls.NONE:null==r?void 0:r.outlierType,splitType:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Ps.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Ps.NODE:Ps.TABLE,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,aggregatedValueFunction:js.AVERAGE}};Eu(n.filters,r),y&&(null==o?void 0:o.dbId)&&(n.filters.dbId=[o.dbId]),(null==o?void 0:o.type)===exports.QueryType.SQL&&(null==o?void 0:o.userId)&&(n.filters.userId=[o.userId]),(null==o?void 0:o.queryId)&&(n.filters.queryId=[o.queryId]),e.startsWith("active_session_history")&&(n.groupBy=[exports.WaitEventClassification.WAIT_EVENT_TYPE]),c.push(n)}))}return c},Au=function(e,t){var n=120;if(Ja(e)||Ja(t)){var r=new Date(e),i=Hr(new Date(t),r);5===i?n=180:i>5&&i<=23?n=600:i>23&&i<=47?n=1e3:i>47&&i<=167?n=2200:i>=167&&(n=4200)}return n},Du=function(e){if(!e.length)return[];e.sort((function(e,t){return new Date(e.startTime).getTime()-new Date(t.startTime).getTime()}));for(var t=[e[0]],n=1;n<e.length;n++){var r=t[t.length-1],i=e[n];new Date(r.endTime)>=new Date(i.startTime)?r.endTime=new Date(Math.max(new Date(r.endTime).getTime(),new Date(i.endTime).getTime())).toISOString():t.push(i)}return t},ku=function(e,t){return'<span style="display:inline-flex; align-items:center;"><span style="\n display:inline-block;\n margin-right:9px; /* increased from 5px → +4px more space */\n border-radius:50%;\n width:7px; /* reduced circle size */\n height:7px;\n background-color:'.concat(e,';\n "></span><span>').concat(t,"</span></span>")},Ou=function(e){return'<span style="\n text-align:right;\n font-variant-numeric: tabular-nums; /* nicer alignment */\n white-space:nowrap;\n ">'.concat(e,"</span>")},Ru=function(e,t){var n=t,r=new Date;return e===Ml.SEVEN_DAYS?r.setDate(r.getDate()-7):e===Ml.TWO_DAYS?r.setDate(r.getDate()-2):e===Ml.ONE_DAY?r.setDate(r.getDate()-1):e===Ml.SIX_HOURS?r.setHours(r.getHours()-6):e===Ml.ONE_HOUR&&r.setHours(r.getHours()-1),{formattedStartDate:r,formattedEndDate:n}},Nu=function(e,t,n){if(e&&e!==Ml.CUSTOM){var r=Ru(e,t);return{startDateTime:r.formattedStartDate,endDateTime:r.formattedEndDate}}return{startDateTime:n,endDateTime:t}},Lu=function(n){n.appName;var i=n.universeData,o=n.anomalyData,a=n.clusterRegionItem,s=n.zoneNodeItem,l=n.isPrimaryCluster,u=n.cluster,c=n.region,d=n.metricMeasure,p=n.outlierType,h=n.numNodes,f=n.isDrilldownView,g=void 0===f||f,m=n.onZoneNodeSelected,v=n.onClusterRegionSelected,y=n.onOutlierTypeSelected,x=n.onSplitTypeSelected;n.onQueryTypeSelected;var _=n.onNumNodesChanged,b=n.showMetricAggregator,w=void 0===b||b;n.showQueryTypeSelector;var S,C=n.showSplitSelector,T=void 0===C||C,M=(null==(S=i)?void 0:S.universeDetails)?yu(S):xu(S),E=M.primaryZoneMapping,I=M.asyncZoneMapping,A=M.primaryClusterMapping,D=M.asyncClusterMapping,k=Kl(),O=t.useState(E),R=O[0],N=O[1],L=t.useState(I),P=L[0],B=L[1];return t.useEffect((function(){N(E)}),[]),t.useEffect((function(){var e=new Map;if(c!==$s||u!==$s){var t=function(e,t,n,r){var i=Array.from(e).filter((function(e){return t?e[1].regionName===r:n?!e[1].isReadReplica:e[1].isReadReplica}));return i?new Map(i.map((function(e){return[null==e?void 0:e[0],e[1]]}))):new Map}(l?E:I,c!==$s,l,c!==$s?c:u);null!==c&&l?(N(t),B(e)):null===c||l?null!==u&&l?(N(t),B(e)):null===u||l||(N(e),B(t)):(N(e),B(t))}else N(E),B(I)}),[c,u]),e.jsxs(r.Box,F({className:Y(k.flexColumn)},{children:[e.jsx(r.Box,{children:e.jsxs(r.Box,F({display:"flex",flexDirection:"row"},{children:[w&&e.jsx(r.Box,{children:e.jsx(gu,{selectedItem:a,onClusterRegionSelected:v,primaryClusterToRegionMap:A,asyncClusterToRegionMap:D})}),w&&e.jsx(r.Box,{children:e.jsx(hu,{selectedItem:s,onZoneNodeSelected:m,primaryZoneToNodesMap:R,asyncZoneToNodesMap:P})}),T&&e.jsx(r.Box,F({display:"flex",flexDirection:"row",alignItems:"flex-end",ml:2},{children:e.jsx(su,{onSplitTypeSelected:x,metricSplitSelectors:g?cl:ul,anomalyData:o})}))]}))}),e.jsx(r.Box,F({display:"flex",flexDirection:"row"},{children:T&&d!==exports.MetricMeasure.OVERALL&&e.jsx(r.Box,F({mt:2},{children:e.jsx(uu,{outlierType:p,metricOutlierSelectors:dl,onOutlierTypeSelected:y,onNumNodesChanged:_,selectedNumNodes:h})}))}))]}))},Pu=function(n){var i=n.appName,o=n.filterDuration,a=n.startDateTime,s=n.endDateTime,l=n.timezone,u=n.isDrilldownView,c=void 0===u||u,d=n.isTopKMetricsView,p=void 0!==d&&d,h=n.isClusterLoadView,f=void 0!==h&&h,g=n.onSelectedFilterDuration,m=n.metricMeasure,v=n.onStartDateChange,y=n.onEndDateChange,x=n.onRefresh,_=Kl(),b=t.useState(""),w=b[0],S=b[1],C=t.useState(ss(s,as,l)),T=C[0],M=C[1],E=t.useState(ss(a,as,l)),I=E[0],A=E[1];return t.useEffect((function(){new Date(a)<new Date(s)?(S(""),M(ss(s,as,l)),A(ss(a,as,l))):S("Start Date is greater than end date")}),[a,s]),t.useEffect((function(){i===exports.AppName.YBM&&p&&o!==Ml.ONE_HOUR&&o!==Ml.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES&&g(Ml.ONE_HOUR)}),[m]),e.jsx(r.Box,{children:e.jsxs(r.Box,F({display:"flex",flexDirection:"row",alignItems:"center",mt:c?2:0,mb:c?2:0},{children:[i===exports.AppName.YBM&&f&&e.jsx(r.Typography,F({variant:"h5"},{children:e.jsx("span",F({className:Y(_.breadCrumbText)},{children:"Cluster Load"}))})),e.jsxs(r.Box,F({display:"flex",ml:"auto",alignItems:"flex-end"},{children:[o===Ml.CUSTOM&&e.jsxs(e.Fragment,{children:[e.jsx(r.Box,F({mt:.5},{children:e.jsx(us,{className:_.dateTimePicker,value:I,dateTimeLabel:"",defaultDateTimeValue:I,onChange:v,isReadOnly:!0})})),e.jsx(r.Box,F({mt:.5},{children:e.jsx(us,{className:_.dateTimePicker,dateTimeLabel:"",value:T,defaultDateTimeValue:T,onChange:y,errorMsg:w,isReadOnly:!0})}))]}),e.jsx(lr,F({className:Y(_.selectBox,_.overrideMuiInput),"data-testid":"GenericHeaderTimeFilterSelect",value:o},{children:El.map((function(t){return e.jsx(r.MenuItem,F({value:t.value,onClick:function(){g(t.value)},className:Y(_.regularText),disabled:i===exports.AppName.YBM&&p&&t.value!==Ml.ONE_HOUR&&t.value!==Ml.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES},{children:t.label}),"duration-".concat(t.label))}))})),e.jsx(Q,F({style:{marginLeft:"16px"},variant:i===exports.AppName.YBM?"ghost":"secondary","data-testid":"GenericHeader-RefreshButton",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M16 3.34222V0.5C16 0.223858 16.2239 0 16.5 0C16.7761 0 17 0.223858 17 0.5V4.5C17 4.77614 16.7761 5 16.5 5H12.5C12.2239 5 12 4.77614 12 4.5C12 4.22386 12.2239 4 12.5 4H15.2457C13.746 2.12713 11.4694 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17C13.235 17 16.7299 13.6991 16.9851 9.49248C17.0018 9.21685 17.2388 9.00696 17.5145 9.02368C17.7901 9.0404 18 9.27741 17.9833 9.55304C17.6961 14.2867 13.7645 18 9 18C4.02944 18 0 13.9706 0 9C0 4.02944 4.02944 0 9 0C11.7633 0 14.313 1.25541 16 3.34222Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Refresh Icon"}),size:"medium",onClick:function(){return x()}},{children:""}))]}))]}))})},Bu=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},ju=new function(){this.browser=new Bu,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?(ju.wxa=!0,ju.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?ju.worker=!0:"undefined"==typeof navigator?(ju.node=!0,ju.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),o=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,ju);var Fu=ju,Uu="sans-serif",zu="12px "+Uu;var Hu,Vu,Wu=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),Yu={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!Hu){var n=Yu.createCanvas();Hu=n&&n.getContext("2d")}if(Hu)return Vu!==t&&(Vu=Hu.font=t||zu),Hu.measureText(e);e=e||"";var r=/(\d+)px/.exec(t=t||zu),i=r&&+r[1]||12,o=0;if(t.indexOf("mono")>=0)o=i*e.length;else for(var a=0;a<e.length;a++){var s=Wu[e[a]];o+=null==s?i:s*i}return{width:o}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},Gu=gc(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),qu=gc(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),Qu=Object.prototype.toString,Zu=Array.prototype,Xu=Zu.forEach,$u=Zu.filter,Ku=Zu.slice,Ju=Zu.map,ec=function(){}.constructor,tc=ec?ec.prototype:null,nc="__proto__",rc=2311;function ic(){return rc++}function oc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function ac(e){if(null==e||"object"!=typeof e)return e;var t=e,n=Qu.call(e);if("[object Array]"===n){if(!Uc(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=ac(e[r])}}else if(qu[n]){if(!Uc(e)){var o=e.constructor;if(o.from)t=o.from(e);else{t=new o(e.length);for(r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Gu[n]&&!Uc(e)&&!Ic(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==nc&&(t[a]=ac(e[a]));return t}function sc(e,t,n){if(!Tc(t)||!Tc(e))return n?ac(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==nc){var i=e[r],o=t[r];!Tc(o)||!Tc(i)||_c(o)||_c(i)||Ic(o)||Ic(i)||Mc(o)||Mc(i)||Uc(o)||Uc(i)?!n&&r in e||(e[r]=ac(t[r])):sc(i,o,n)}return e}function lc(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==nc&&(e[n]=t[n]);return e}function uc(e,t,n){for(var r=vc(t),i=0;i<r.length;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function cc(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function dc(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else uc(e,t,n)}function pc(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function hc(e,t,n){if(e&&t)if(e.forEach&&e.forEach===Xu)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function fc(e,t,n){if(!e)return[];if(!t)return Nc(e);if(e.map&&e.map===Ju)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function gc(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function mc(e,t,n){if(!e)return[];if(!t)return Nc(e);if(e.filter&&e.filter===$u)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function vc(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}var yc=tc&&bc(tc.bind)?tc.call.bind(tc.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(Ku.call(arguments)))}};function xc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(Ku.call(arguments)))}}function _c(e){return Array.isArray?Array.isArray(e):"[object Array]"===Qu.call(e)}function bc(e){return"function"==typeof e}function wc(e){return"string"==typeof e}function Sc(e){return"[object String]"===Qu.call(e)}function Cc(e){return"number"==typeof e}function Tc(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Mc(e){return!!Gu[Qu.call(e)]}function Ec(e){return!!qu[Qu.call(e)]}function Ic(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function Ac(e){return null!=e.colorStops}function Dc(e){return e!=e}function kc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function Oc(e,t){return null!=e?e:t}function Rc(e,t,n){return null!=e?e:null!=t?t:n}function Nc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Ku.apply(e,t)}function Lc(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function Pc(e,t){if(!e)throw new Error(t)}function Bc(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var jc="__ec_primitive__";function Fc(e){e[jc]=!0}function Uc(e){return e[jc]}var zc=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return vc(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Hc="function"==typeof Map;var Vc=function(){function e(t){var n=_c(t);this.data=Hc?new Map:new zc;var r=this;function i(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(i):t&&hc(t,i)}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach((function(n,r){e.call(t,n,r)}))},e.prototype.keys=function(){var e=this.data.keys();return Hc?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Wc(e){return new Vc(e)}function Yc(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&lc(n,t),n}function Gc(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function qc(e,t){return e.hasOwnProperty(t)}function Qc(){}var Zc=180/Math.PI;function Xc(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function $c(e){return[e[0],e[1]]}function Kc(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Jc(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function ed(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function td(e,t){var n=function(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function nd(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var rd=nd;var id=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function od(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function ad(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function sd(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var ld=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},ud=function(){function e(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new ld(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,o=r-this._y;this._x=n,this._y=r,t.drift(i,o,e),this.handler.dispatchToElement(new ld(t,e),"drag",e.event);var a=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=a,t!==a&&(s&&a!==s&&this.handler.dispatchToElement(new ld(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new ld(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new ld(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new ld(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),cd=ud,dd=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=i[e].length-1,u=i[e][l];return u&&u.callAtLast?i[e].splice(l,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!i||!i.filter||null==l.query||i.filter(e,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,t[0]);break;case 2:l.h.call(l.ctx,t[0],t[1]);break;default:l.h.apply(l.ctx,t)}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(o){case 0:u.h.call(a);break;case 1:u.h.call(a,t[0]);break;case 2:u.h.call(a,t[0],t[1]);break;default:u.h.apply(a,t.slice(1,o-1))}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),pd=dd,hd=Math.log(2);function fd(e,t,n,r,i,o){var a=r+"-"+i,s=e.length;if(o.hasOwnProperty(a))return o[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~i)/hd);return e[n][l]}for(var u=r|1<<n,c=n+1;r&1<<c;)c++;for(var d=0,p=0,h=0;p<s;p++){var f=1<<p;f&i||(d+=(h%2?-1:1)*e[n][p]*fd(e,t-1,c,u,i|f,o),h++)}return o[a]=d,d}function gd(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=fd(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*fd(n,7,0===a?1:0,1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var md="___zrEVENTSAVED",vd=[];function yd(e,t,n,r,i){if(t.getBoundingClientRect&&Fu.domSupported&&!xd(t)){var o=t[md]||(t[md]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,l=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,o),s=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,p=c.left,h=c.top;a.push(p,h),l=l&&o&&p===o[d]&&h===o[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&i?i:(t.srcCoords=a,t[r]=n?gd(s,a):gd(a,s))}(a,o,i);if(s)return s(e,n,r),!0}return!1}function xd(e){return"CANVAS"===e.nodeName.toUpperCase()}var _d=/([&<>"'])/g,bd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wd(e){return null==e?"":(e+"").replace(_d,(function(e,t){return bd[t]}))}var Sd=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Cd=[],Td=Fu.browser.firefox&&+Fu.browser.version.split(".")[0]<39;function Md(e,t,n,r){return n=n||{},r?Ed(e,t,n):Td&&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):Ed(e,t,n),n}function Ed(e,t,n){if(Fu.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(xd(e)){var o=e.getBoundingClientRect();return n.zrX=r-o.left,void(n.zrY=i-o.top)}if(yd(Cd,e,r,i))return n.zrX=Cd[0],void(n.zrY=Cd[1])}n.zrX=n.zrY=0}function Id(e){return e||window.event}function Ad(e,t,n){if(null!=(t=Id(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];i&&Md(e,i,t,n)}else{Md(e,t,t,n);var o=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=o?o/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&Sd.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Dd(e,t,n,r){e.removeEventListener(t,n,r)}var kd=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Od(e){return 2===e.which||3===e.which}var Rd=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],l=Md(n,s,{});i.points.push([l.zrX,l.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in Ld)if(Ld.hasOwnProperty(t)){var n=Ld[t](this._track,e);if(n)return n}},e}();function Nd(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Ld={pinch:function(e,t){var n=e.length;if(n){var r,i=(e[n-1]||{}).points,o=(e[n-2]||{}).points||i;if(o&&o.length>1&&i&&i.length>1){var a=Nd(i)/Nd(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=i)[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 Pd(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Bd(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e}function jd(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 Fd(e,t,n){var r=t[0],i=t[2],o=t[4],a=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=r*c+a*u,e[1]=-r*u+a*c,e[2]=i*c+s*u,e[3]=-i*u+c*s,e[4]=c*o+u*l,e[5]=c*l-u*o,e}function Ud(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=t[5],l=n*a-o*r;return l?(l=1/l,e[0]=a*l,e[1]=-o*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*i)*l,e[5]=(o*i-n*s)*l,e):null}var zd=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Hd=zd,Vd=Math.min,Wd=Math.max,Yd=new Hd,Gd=new Hd,qd=new Hd,Qd=new Hd,Zd=new Hd,Xd=new Hd,$d=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=Vd(e.x,this.x),n=Vd(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Wd(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Wd(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,i=[1,0,0,1,0,0];return jd(i,i,[-t.x,-t.y]),function(e,t,n){var r=n[0],i=n[1];e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i}(i,i,[n,r]),jd(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,o=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,p=!(o<l||u<i||s<c||d<a);if(n){var h=1/0,f=0,g=Math.abs(o-l),m=Math.abs(u-i),v=Math.abs(s-c),y=Math.abs(d-a),x=Math.min(g,m),_=Math.min(v,y);o<l||u<i?x>f&&(f=x,g<m?Hd.set(Xd,-g,0):Hd.set(Xd,m,0)):x<h&&(h=x,g<m?Hd.set(Zd,g,0):Hd.set(Zd,-m,0)),s<c||d<a?_>f&&(f=_,v<y?Hd.set(Xd,0,-v):Hd.set(Xd,0,y)):x<h&&(h=x,v<y?Hd.set(Zd,0,v):Hd.set(Zd,0,-y))}return n&&Hd.copy(n,p?Zd:Xd),p},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return 0===this.width||0===this.height},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(r){if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],o=r[3],a=r[4],s=r[5];return t.x=n.x*i+a,t.y=n.y*o+s,t.width=n.width*i,t.height=n.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Yd.x=qd.x=n.x,Yd.y=Qd.y=n.y,Gd.x=Qd.x=n.x+n.width,Gd.y=qd.y=n.y+n.height,Yd.transform(r),Qd.transform(r),Gd.transform(r),qd.transform(r),t.x=Vd(Yd.x,Gd.x,qd.x,Qd.x),t.y=Vd(Yd.y,Gd.y,qd.y,Qd.y);var l=Wd(Yd.x,Gd.x,qd.x,Qd.x),u=Wd(Yd.y,Gd.y,qd.y,Qd.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),Kd=$d,Jd="silent";function ep(){kd(this.event)}var tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return j(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(pd),np=function(e,t){this.x=e,this.y=t},rp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ip=new Kd(0,0,0,0),op=function(e){function t(t,n,r,i,o){var a=e.call(this)||this;return a._hovered=new np(0,0),a.storage=t,a.painter=n,a.painterRoot=i,a._pointerSize=o,r=r||new tp,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new cd(a),a}return j(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(hc(rp,(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=lp(this,t,n),i=this._hovered,o=i.target;o&&!o.__zr&&(o=(i=this.findHover(i.x,i.y)).target);var a=this._hovered=r?new np(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(i,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==o&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new np(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 i="on"+t,o=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ep}}(t,e,n);r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(t,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,o),e.trigger&&e.trigger(t,o)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new np(e,t);if(sp(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,l=new Kd(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||(ip.copy(c.getBoundingRect()),c.transform&&ip.applyTransform(c.transform),ip.intersect(l)&&o.push(c))}if(o.length)for(var d=Math.PI/12,p=2*Math.PI,h=0;h<s;h+=4)for(var f=0;f<p;f+=d){if(sp(o,i,e+h*Math.cos(f),t+h*Math.sin(f),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new Rd);var n=this._gestureMgr;"start"===t&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),r){var i=r.type;e.gestureEvent=i;var o=new np;o.target=r.target,this.dispatchToElement(o,i,r.event)}},t}(pd);function ap(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(i=!0)}var s=r.__hostTarget;r=s||r.parent}return!i||Jd}return!1}function sp(e,t,n,r,i){for(var o=e.length-1;o>=0;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=ap(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==Jd)){t.target=a;break}}}function lp(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}hc(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){op.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=lp(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||rd(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var up=op;function cp(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function dp(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,l=r;s<l;)i(a,e[o=s+l>>>1])<0?l=o:s=o+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function pp(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])>0){for(s=r-i;l<s&&o(e,t[n+i+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;l<s&&o(e,t[n+i-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])>0?a=c+1:l=c}return l}function hp(e,t,n,r,i,o){var a=0,s=0,l=1;if(o(e,t[n+i])<0){for(s=i+1;l<s&&o(e,t[n+i-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l<s&&o(e,t[n+i+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a<l;){var c=a+(l-a>>>1);o(e,t[n+c])<0?l=c:a=c+1}return l}function fp(e,t){var n,r,i=7,o=0;e.length;var a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],d=r[s+1];r[s]=u+d,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var p=hp(e[c],e,l,u,0,t);l+=p,0!==(u-=p)&&0!==(d=pp(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,o,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=o,d=n;if(e[d++]=e[c++],0==--s){for(l=0;l<r;l++)e[d+l]=a[u+l];return}if(1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];return void(e[d+s]=a[u])}var p,h,f,g=i;for(;;){p=0,h=0,f=!1;do{if(t(e[c],a[u])<0){if(e[d++]=e[c++],h++,p=0,0==--s){f=!0;break}}else if(e[d++]=a[u++],p++,h=0,1==--r){f=!0;break}}while((p|h)<g);if(f)break;do{if(0!==(p=hp(e[c],a,u,r,0,t))){for(l=0;l<p;l++)e[d+l]=a[u+l];if(d+=p,u+=p,(r-=p)<=1){f=!0;break}}if(e[d++]=e[c++],0==--s){f=!0;break}if(0!==(h=pp(a[u],e,c,s,0,t))){for(l=0;l<h;l++)e[d+l]=e[c+l];if(d+=h,c+=h,0===(s-=h)){f=!0;break}}if(e[d++]=a[u++],1==--r){f=!0;break}g--}while(p>=7||h>=7);if(f)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(l=0;l<s;l++)e[d+l]=e[c+l];e[d+s]=a[u]}else{if(0===r)throw new Error;for(l=0;l<r;l++)e[d+l]=a[u+l]}}(l,u,c,d):function(n,r,o,s){var l=0;for(l=0;l<s;l++)a[l]=e[o+l];var u=n+r-1,c=s-1,d=o+s-1,p=0,h=0;if(e[d--]=e[u--],0==--r){for(p=d-(s-1),l=0;l<s;l++)e[p+l]=a[l];return}if(1===s){for(h=(d-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)e[h+l]=e[p+l];return void(e[d]=a[c])}var f=i;for(;;){var g=0,m=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],g++,m=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=r-hp(a[c],e,n,r,r-1,t))){for(r-=g,h=(d-=g)+1,p=(u-=g)+1,l=g-1;l>=0;l--)e[h+l]=e[p+l];if(0===r){v=!0;break}}if(e[d--]=a[c--],1==--s){v=!0;break}if(0!==(m=s-pp(e[u],a,0,s,s-1,t))){for(s-=m,h=(d-=m)+1,p=(c-=m)+1,l=0;l<m;l++)e[h+l]=a[p+l];if(s<=1){v=!0;break}}if(e[d--]=e[u--],0==--r){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(i=f)<1&&(i=1);if(1===s){for(h=(d-=r)+1,p=(u-=r)+1,l=r-1;l>=0;l--)e[h+l]=e[p+l];e[d]=a[c]}else{if(0===s)throw new Error;for(p=d-(s-1),l=0;l<s;l++)e[p+l]=a[l]}}(l,u,c,d))}return n=[],r=[],{mergeRuns:function(){for(;o>1;){var e=o-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;o>1;){var e=o-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}function gp(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var o=0;if(i<32)dp(e,n,r,n+(o=cp(e,n,r,t)),t);else{var a=fp(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(i);do{if((o=cp(e,n,r,t))<s){var l=i;l>s&&(l=s),dp(e,n,n+l,n+o,t),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var mp=!1;function vp(){mp||(mp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function yp(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var xp=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=yp}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,gp(n,yp)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),o=i,i=i.getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var l=a[s];e.__dirty&&(l.__dirty|=1),this._updateAndAddDisplayable(l,t,n)}e.__dirty=0}else{var u=e;t&&t.length?u.__clipPaths=t:u.__clipPaths&&u.__clipPaths.length>0&&(u.__clipPaths=[]),isNaN(u.z)&&(vp(),u.z=0),isNaN(u.z2)&&(vp(),u.z2=0),isNaN(u.zlevel)&&(vp(),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 p=e.getTextContent();p&&this._updateAndAddDisplayable(p,t,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=cc(this._roots,e);r>=0&&this._roots.splice(r,1)}},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),_p=xp,bp=Fu.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},wp={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-wp.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*wp.bounceIn(2*e):.5*wp.bounceOut(2*e-1)+.5}},Sp=wp,Cp=Math.pow,Tp=Math.sqrt,Mp=1e-8,Ep=1e-4,Ip=Tp(3),Ap=1/3,Dp=Xc(),kp=Xc(),Op=Xc();function Rp(e){return e>-1e-8&&e<Mp}function Np(e){return e>Mp||e<-1e-8}function Lp(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function Pp(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function Bp(e,t,n,r,i,o){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-i,c=s*s-3*a*l,d=s*l-9*a*u,p=l*l-3*s*u,h=0;if(Rp(c)&&Rp(d)){if(Rp(s))o[0]=0;else(C=-l/s)>=0&&C<=1&&(o[h++]=C)}else{var f=d*d-4*c*p;if(Rp(f)){var g=d/c,m=-g/2;(C=-s/a+g)>=0&&C<=1&&(o[h++]=C),m>=0&&m<=1&&(o[h++]=m)}else if(f>0){var v=Tp(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(C=(-s-((y=y<0?-Cp(-y,Ap):Cp(y,Ap))+(x=x<0?-Cp(-x,Ap):Cp(x,Ap))))/(3*a))>=0&&C<=1&&(o[h++]=C)}else{var _=(2*c*s-3*a*d)/(2*Tp(c*c*c)),b=Math.acos(_)/3,w=Tp(c),S=Math.cos(b),C=(-s-2*w*S)/(3*a),T=(m=(-s+w*(S+Ip*Math.sin(b)))/(3*a),(-s+w*(S-Ip*Math.sin(b)))/(3*a));C>=0&&C<=1&&(o[h++]=C),m>=0&&m<=1&&(o[h++]=m),T>=0&&T<=1&&(o[h++]=T)}}return h}function jp(e,t,n,r,i){var o=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Rp(a)){if(Np(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(Rp(u))i[0]=-o/(2*a);else if(u>0){var c,d=Tp(u),p=(-o-d)/(2*a);(c=(-o+d)/(2*a))>=0&&c<=1&&(i[l++]=c),p>=0&&p<=1&&(i[l++]=p)}}return l}function Fp(e,t,n,r,i,o){var a=(t-e)*i+e,s=(n-t)*i+t,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,d=(c-u)*i+u;o[0]=e,o[1]=a,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=r}function Up(e,t,n,r,i,o,a,s,l){for(var u=e,c=t,d=0,p=1/l,h=1;h<=l;h++){var f=h*p,g=Lp(e,n,i,a,f),m=Lp(t,r,o,s,f),v=g-u,y=m-c;d+=Math.sqrt(v*v+y*y),u=g,c=m}return d}function zp(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Hp(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Vp(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function Wp(e,t,n,r,i){var o=(t-e)*r+e,a=(n-t)*r+t,s=(a-o)*r+o;i[0]=e,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function Yp(e,t,n,r,i,o,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var p=d*c,h=zp(e,n,i,p),f=zp(t,r,o,p),g=h-s,m=f-l;u+=Math.sqrt(g*g+m*m),s=h,l=f}return u}var Gp=/cubic-bezier\(([0-9,\.e ]+)\)/;function qp(e){var t=e&&Gp.exec(e);if(t){var n=t[1].split(","),r=+Bc(n[0]),i=+Bc(n[1]),o=+Bc(n[2]),a=+Bc(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Bp(0,r,o,1,e,s)&&Lp(0,i,a,1,s[0])}}}var Qp=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||Qc,this.ondestroy=e.ondestroy||Qc,this.onrestart=e.onrestart||Qc,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,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;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=bc(e)?e:Sp[e]||qp(e)},e}(),Zp=function(e){this.value=e},Xp=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Zp(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}(),$p=function(){function e(e){this._list=new Xp,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(null==r[e]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new Zp(t),a.key=e,n.insertEntry(a),r[e]=a}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Kp=$p,Jp={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 eh(e){return(e=Math.round(e))<0?0:e>255?255:e}function th(e){return e<0?0:e>1?1:e}function nh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?eh(parseFloat(t)/100*255):eh(parseInt(t,10))}function rh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?th(parseFloat(t)/100):th(parseFloat(t))}function ih(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 oh(e,t,n){return e+(t-e)*n}function ah(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function sh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var lh=new Kp(20),uh=null;function ch(e,t){uh&&sh(uh,t),uh=lh.put(e,uh||t.slice())}function dh(e,t){if(e){t=t||[];var n=lh.get(e);if(n)return sh(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in Jp)return sh(t,Jp[r]),ch(e,t),t;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(ah(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),ch(e,t),t):void ah(t,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(ah(t,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),ch(e,t),t):void ah(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){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?ah(t,+u[0],+u[1],+u[2],1):ah(t,0,0,0,1);c=rh(u.pop());case"rgb":return u.length>=3?(ah(t,nh(u[0]),nh(u[1]),nh(u[2]),3===u.length?c:rh(u[3])),ch(e,t),t):void ah(t,0,0,0,1);case"hsla":return 4!==u.length?void ah(t,0,0,0,1):(u[3]=rh(u[3]),ph(u,t),ch(e,t),t);case"hsl":return 3!==u.length?void ah(t,0,0,0,1):(ph(u,t),ch(e,t),t);default:return}}ah(t,0,0,0,1)}}function ph(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=rh(e[1]),i=rh(e[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return ah(t=t||[],eh(255*ih(a,o,n+1/3)),eh(255*ih(a,o,n)),eh(255*ih(a,o,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function hh(e,t){var n=dh(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 mh(n,4===n.length?"rgba":"rgb")}}function fh(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),i=Math.floor(r),o=Math.ceil(r),a=t[i],s=t[o],l=r-i;return n[0]=eh(oh(a[0],s[0],l)),n[1]=eh(oh(a[1],s[1],l)),n[2]=eh(oh(a[2],s[2],l)),n[3]=th(oh(a[3],s[3],l)),n}}function gh(e,t,n,r){var i,o=dh(e);if(e)return o=function(e){if(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-i)/6+l/2)/l,p=((s-o)/6+l/2)/l;r===s?t=p-d:i===s?t=1/3+c-p:o===s&&(t=2/3+d-c),t<0&&(t+=1),t>1&&(t-=1)}var h=[360*t,n,u];return null!=e[3]&&h.push(e[3]),h}}(o),null!=t&&(o[0]=(i=t,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=rh(n)),null!=r&&(o[2]=rh(r)),mh(ph(o),"rgba")}function mh(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 vh(e,t){var n=dh(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var yh=Math.round;function xh(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=dh(e);n&&(e="rgb("+n[0]+","+n[1]+","+n[2]+")",t=n[3])}}else e="none";return{color:e,opacity:null==t?1:t}}var _h=1e-4;function bh(e){return e<_h&&e>-1e-4}function wh(e){return yh(1e3*e)/1e3}function Sh(e){return yh(1e4*e)/1e4}var Ch={left:"start",right:"end",center:"middle",middle:"middle"};function Th(e){return e&&!!e.image}function Mh(e){return Th(e)||function(e){return e&&!!e.svgElement}(e)}function Eh(e){return"linear"===e.type}function Ih(e){return"radial"===e.type}function Ah(e){return e&&("linear"===e.type||"radial"===e.type)}function Dh(e){return"url(#"+e+")"}function kh(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Oh(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Zc,i=Oc(e.scaleX,1),o=Oc(e.scaleY,1),a=e.skewX||0,s=e.skewY||0,l=[];return(t||n)&&l.push("translate("+t+"px,"+n+"px)"),r&&l.push("rotate("+r+")"),1===i&&1===o||l.push("scale("+i+","+o+")"),(a||s)&&l.push("skew("+yh(a*Zc)+"deg, "+yh(s*Zc)+"deg)"),l.join(" ")}var Rh=Fu.hasGlobalWindow&&bc(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:"undefined"!=typeof Buffer?function(e){return Buffer.from(e).toString("base64")}:function(e){return null},Nh=Array.prototype.slice;function Lh(e,t,n){return(t-e)*n+e}function Ph(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=Lh(t[o],n[o],r);return e}function Bh(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function jh(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function Fh(e,t){for(var n=e.length,r=t.length,i=n>r?t:e,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(n,r);s++)i.push({offset:a.offset,color:a.color.slice()})}function Uh(e,t,n){var r=e,i=t;if(r.push&&i.push){var o=r.length,a=i.length;if(o!==a)if(o>a)r.length=a;else for(var s=o;s<a;s++)r.push(1===n?i[s]:Nh.call(i[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=i[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=i[s][u])}}function zh(e){if(pc(e)){var t=e.length;if(pc(e[0])){for(var n=[],r=0;r<t;r++)n.push(Nh.call(e[r]));return n}return Nh.call(e)}return e}function Hh(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function Vh(e){return 4===e||5===e}function Wh(e){return 1===e||2===e}var Yh=[0,0,0,0],Gh=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=t;if(pc(t)){var l=function(e){return pc(e&&e[0])?2:1}(t);a=l,(1===l&&!Cc(t[0])||2===l&&!Cc(t[0][0]))&&(o=!0)}else if(Cc(t)&&!Dc(t))a=0;else if(wc(t))if(isNaN(+t)){var u=dh(t);u&&(s=u,a=3)}else a=0;else if(Ac(t)){var c=lc({},s);c.colorStops=fc(t.colorStops,(function(e){return{offset:e.offset,color:dh(e.color)}})),Eh(t)?a=4:Ih(t)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=bc(n)?n:Sp[n]||qp(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,i=n.length,o=n[i-1],a=this.discrete,s=Wh(r),l=Vh(r),u=0;u<i;u++){var c=n[u],d=c.value,p=o.value;c.percent=c.time/e,a||(s&&u!==i-1?Uh(d,p,r):l&&Fh(d.colorStops,p.colorStops))}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var h=n[0].value;for(u=0;u<i;u++)0===r?n[u].additiveValue=n[u].value-h:3===r?n[u].additiveValue=Bh([],n[u].value,h,-1):Wh(r)&&(n[u].additiveValue=1===r?Bh([],n[u].value,h,-1):jh([],n[u].value,h,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o=null!=this._additiveTrack,a=o?"additiveValue":"value",s=this.valType,l=this.keyframes,u=l.length,c=this.propName,d=3===s,p=this._lastFr,h=Math.min;if(1===u)r=i=l[0];else{if(t<0)n=0;else if(t<this._lastFrP){for(n=h(p+1,u-1);n>=0&&!(l[n].percent<=t);n--);n=h(n,u-2)}else{for(n=p;n<u&&!(l[n].percent>t);n++);n=h(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=t;var f=i.percent-r.percent,g=0===f?1:h((t-r.percent)/f,1);i.easingFunc&&(g=i.easingFunc(g));var m=o?this._additiveValue:d?Yh:e[c];if(!Wh(s)&&!d||m||(m=this._additiveValue=[]),this.discrete)e[c]=g<1?r.rawValue:i.rawValue;else if(Wh(s))1===s?Ph(m,r[a],i[a],g):function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=Lh(t[a][s],n[a][s],r)}}(m,r[a],i[a],g);else if(Vh(s)){var v=r[a],y=i[a],x=4===s;e[c]={type:x?"linear":"radial",x:Lh(v.x,y.x,g),y:Lh(v.y,y.y,g),colorStops:fc(v.colorStops,(function(e,t){var n=y.colorStops[t];return{offset:Lh(e.offset,n.offset,g),color:Hh(Ph([],e.color,n.color,g))}})),global:y.global},x?(e[c].x2=Lh(v.x2,y.x2,g),e[c].y2=Lh(v.y2,y.y2,g)):e[c].r=Lh(v.r,y.r,g)}else if(d)Ph(m,r[a],i[a],g),o||(e[c]=Hh(m));else{var _=Lh(r[a],i[a],g);o?this._additiveValue=_:e[c]=_}o&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(dh(e[n],Yh),Bh(Yh,Yh,r,1),e[n]=Hh(Yh)):1===t?Bh(e[n],e[n],r,1):2===t&&jh(e[n],e[n],r,1)},e}(),qh=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?oc("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,vc(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o],s=i[a];if(!s){s=i[a]=new Gh(a);var l=void 0,u=this._getAdditiveTrack(a);if(u){var c=u.keyframes,d=c[c.length-1];l=d&&d.value,3===u.valType&&l&&(l=Hh(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,zh(l),r),this._trackKeys.push(a)}s.addKeyframe(e,zh(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var o=this._trackKeys[i],a=this._tracks[o],s=this._getAdditiveTrack(o),l=a.keyframes,u=l.length;if(a.prepare(r,s),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var c=l[u-1];c&&(t._target[a.propName]=c.rawValue),a.setFinished()}else n.push(a)}if(n.length||this._force){var d=new Qp({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,o=0;o<r.length;o++)if(r[o]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(o=0;o<n.length;o++)n[o].step(t._target,e);var a=t._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return fc(this._trackKeys,(function(t){return e._tracks[t]}))},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},e.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];if(o&&!o.isFinished()){var a=o.keyframes,s=a[n?0:a.length-1];s&&(e[i]=zh(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||vc(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var o=i.keyframes;if(o.length>1){var a=o.pop();i.addKeyframe(a.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Qh=qh;function Zh(){return(new Date).getTime()}var Xh,$h,Kh,Jh=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 j(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=Zh()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,bp((function t(){e._running&&(bp(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=Zh(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Zh(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Zh()-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 Qh(e,t.loop);return this.addAnimator(n),n},t}(pd),ef=Jh,tf=Fu.domSupported,nf=($h={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Kh=fc(Xh=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],(function(e){var t=e.replace("mouse","pointer");return $h.hasOwnProperty(t)?t:e})),{mouse:Xh,touch:["touchstart","touchend","touchmove"],pointer:Kh}),rf=["mousemove","mouseup"],of=["pointermove","pointerup"],af=!1;function sf(e){var t=e.pointerType;return"pen"===t||"touch"===t}function lf(e){e&&(e.zrByTouch=!0)}function uf(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 cf=function(e,t){this.stopPropagation=Qc,this.stopImmediatePropagation=Qc,this.preventDefault=Qc,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},df={mousedown:function(e){e=Ad(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Ad(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=Ad(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){uf(this,(e=Ad(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){af=!0,e=Ad(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){af||(e=Ad(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){lf(e=Ad(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),df.mousemove.call(this,e),df.mousedown.call(this,e)},touchmove:function(e){lf(e=Ad(this.dom,e)),this.handler.processGesture(e,"change"),df.mousemove.call(this,e)},touchend:function(e){lf(e=Ad(this.dom,e)),this.handler.processGesture(e,"end"),df.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&df.click.call(this,e)},pointerdown:function(e){df.mousedown.call(this,e)},pointermove:function(e){sf(e)||df.mousemove.call(this,e)},pointerup:function(e){df.mouseup.call(this,e)},pointerout:function(e){sf(e)||df.mouseout.call(this,e)}};hc(["click","dblclick","contextmenu"],(function(e){df[e]=function(t){t=Ad(this.dom,t),this.trigger(e,t)}}));var pf={pointermove:function(e){sf(e)||pf.mousemove.call(this,e)},pointerup:function(e){pf.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 hf(e,t){var n=t.domHandlers;Fu.pointerEventsSupported?hc(nf.pointer,(function(r){gf(t,r,(function(t){n[r].call(e,t)}))})):(Fu.touchEventsSupported&&hc(nf.touch,(function(r){gf(t,r,(function(i){n[r].call(e,i),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)}))})),hc(nf.mouse,(function(r){gf(t,r,(function(i){i=Id(i),t.touching||n[r].call(e,i)}))})))}function ff(e,t){function n(n){gf(t,n,(function(r){r=Id(r),uf(e,r.target)||(r=function(e,t){return Ad(e.dom,new cf(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}Fu.pointerEventsSupported?hc(of,n):Fu.touchEventsSupported||hc(rf,n)}function gf(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,function(e,t,n,r){e.addEventListener(t,n,r)}(e.domTarget,t,n,r)}function mf(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Dd(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var vf=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},yf=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 vf(t,df),tf&&(r._globalHandlerScope=new vf(document,pf)),hf(r,r._localHandlerScope),r}return j(t,e),t.prototype.dispose=function(){mf(this._localHandlerScope),tf&&mf(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,tf&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?ff(this,t):mf(t)}},t}(pd),xf=1;Fu.hasGlobalWindow&&(xf=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var _f=xf,bf="#333",wf="#ccc",Sf=Pd,Cf=5e-5;function Tf(e){return e>Cf||e<-5e-5}var Mf=[],Ef=[],If=[1,0,0,1,0,0],Af=Math.abs,Df=function(){function e(){}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 Tf(this.rotation)||Tf(this.x)||Tf(this.y)||Tf(this.scaleX-1)||Tf(this.scaleY-1)||Tf(this.skewX)||Tf(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):Sf(n),e&&(t?Bd(n,e,n):function(e,t){e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5]}(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Sf(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Mf);var n=Mf[0]<0?-1:1,r=Mf[1]<0?-1:1,i=((Mf[0]-n)*t+n)/Mf[0]||0,o=((Mf[1]-r)*t+r)/Mf[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ud(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]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(Bd(Ef,e.invTransform,t),t=Ef);var n=this.originX,r=this.originY;(n||r)&&(If[4]=n,If[5]=r,Bd(Ef,t,If),Ef[4]-=n,Ef[5]-=r,t=Ef),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&&od(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&od(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Af(e[0]-1)>1e-10&&Af(e[3]-1)>1e-10?Math.sqrt(Af(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Of(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,l=e.rotation||0,u=e.x,c=e.y,d=e.skewX?Math.tan(e.skewX):0,p=e.skewY?Math.tan(-e.skewY):0;if(n||r||a||s){var h=n+a,f=r+s;t[4]=-h*i-d*f*o,t[5]=-f*o-p*h*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=p*i,t[2]=d*o,l&&Fd(t,t,l),t[4]+=n+u,t[5]+=r+c,t},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),kf=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Of(e,t){for(var n=0;n<kf.length;n++){var r=kf[n];e[r]=t[r]}}var Rf={};function Nf(e,t){var n=Rf[t=t||zu];n||(n=Rf[t]=new Kp(500));var r=n.get(e);return null==r&&(r=Yu.measureText(e,t).width,n.put(e,r)),r}function Lf(e,t,n,r){var i=Nf(e,t),o=Ff(t),a=Bf(0,i,n),s=jf(0,o,r);return new Kd(a,s,i,o)}function Pf(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return Lf(i[0],t,n,r);for(var o=new Kd(0,0,0,0),a=0;a<i.length;a++){var s=Lf(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function Bf(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function jf(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Ff(e){return Nf("国",e)}function Uf(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function zf(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=Uf(r[0],n.width),u+=Uf(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=i,u+=s,c="right",d="middle";break;case"right":l+=i+a,u+=s,d="middle";break;case"top":l+=a/2,u-=i,c="center",d="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=i,u+=s,d="middle";break;case"insideRight":l+=a-i,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",d="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,d="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var Hf="__zr_normal__",Vf=kf.concat(["ignore"]),Wf=gc(kf,(function(e,t){return e[t]=!0,e}),{ignore:!1}),Yf={},Gf=new Kd(0,0,0,0),qf=function(){function e(e){this.id=ic(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=t.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;if(i.copyTransform(t),null!=n.position){var u=Gf;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Yf,n,u):zf(Yf,n,u),i.x=Yf.x,i.y=Yf.y,o=Yf.align,a=Yf.verticalAlign;var c=n.origin;if(c&&null!=n.rotation){var d=void 0,p=void 0;"center"===c?(d=.5*u.width,p=.5*u.height):(d=Uf(c[0],u.width),p=Uf(c[1],u.height)),l=!0,i.originX=-i.x+d+(r?0:u.x),i.originY=-i.y+p+(r?0:u.y)}}null!=n.rotation&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],l||(i.originX=-h[0],i.originY=-h[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(m=n.insideFill,v=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(m),y=!0)):(m=n.outsideFill,v=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(m),y=!0)),(m=m||"#000")===g.fill&&v===g.stroke&&y===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=m,g.stroke=v,g.autoStroke=y,g.align=o,g.verticalAlign=a,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?wf:bf},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&dh(t);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,mh(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||{},lc(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(Tc(e))for(var n=vc(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==Hf)){var o=r.targetName,a=o?t[o]:t;r.saveTo(a)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Vf)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Hf,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Hf;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(cc(o,e)>=0)||!t&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||i){i||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),i?(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}oc("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a)for(var s=0;s<o;s++)if(e[s]!==i[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var l=e[s],u=void 0;this.stateProxy&&(u=this.stateProxy(l,e)),u||(u=this.states[l]),u&&r.push(u)}var c=r[o-1],d=!!(c&&c.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var p=this._mergeStates(r),h=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(","),p,this._normalState,!1,!t&&!this.__inHover&&h&&h.duration>0,h);var f=this._textContent,g=this._textGuide;f&&f.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=cc(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=cc(r,e),o=cc(r,t)>=0;i>=0?o?r.splice(i,1):r[i]=t:n&&!o&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];lc(n,i),i.textConfig&&lc(t=t||{},i.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,i,o){var a=!(t&&r);t&&t.textConfig?(this.textConfig=lc({},r?this.textConfig:n.textConfig),lc(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Vf.length;u++){var c=Vf[u],d=i&&Wf[c];t&&null!=t[c]?d?(l=!0,s[c]=t[c]):this[c]=t[c]:a&&null!=n[c]&&(d?(l=!0,s[c]=n[c]):this[c]=n[c])}if(!i)for(u=0;u<this.animators.length;u++){var p=this.animators[u],h=p.targetName;p.getLoop()||p.__changeFinalValue(h?(t||n)[h]:t||n)}l&&this._transitionState(e,s,o)},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Df,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),lc(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=e?this[e]:this,i=new Qh(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during((function(){r.updateDuringAnimation(t)})).done((function(){var t=r.animators,n=cc(t,e);n>=0&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){Qf(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Qf(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Qf(this,t,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=function(){var t=e.prototype;function n(e,n,r,i){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||o(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}})}t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=1,Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))}(),e}();function Qf(e,t,n,r,i){var o=[];$f(e,"",e,t,n=n||{},r,o,i);var a=o.length,s=!1,l=n.done,u=n.aborted,c=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},d=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(e,t){n.during(t)}));for(var p=0;p<o.length;p++){var h=o[p];c&&h.done(c),d&&h.aborted(d),n.force&&h.duration(n.duration),h.start(n.easing)}return o}function Zf(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Xf(e,t,n){if(pc(t[n]))if(pc(e[n])||(e[n]=[]),Ec(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Zf(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(pc(i[0]))for(var s=i[0].length,l=0;l<a;l++)o[l]?Zf(o[l],i[l],s):o[l]=Array.prototype.slice.call(i[l]);else Zf(o,i,a);o.length=i.length}else e[n]=t[n]}function $f(e,t,n,r,i,o,a,s){for(var l=vc(r),u=i.duration,c=i.delay,d=i.additive,p=i.setToFinal,h=!Tc(o),f=e.animators,g=[],m=0;m<l.length;m++){var v=l[m],y=r[v];if(null!=y&&null!=n[v]&&(h||o[v]))if(!Tc(y)||pc(y)||Ac(y))g.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}$f(e,v,n[v],y,i,o&&o[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),g.push(v))}var x=g.length;if(!d&&x)for(var _=0;_<f.length;_++){if((w=f[_]).targetName===t)if(w.stopTracks(g)){var b=cc(f,w);f.splice(b,1)}}if(i.force||(g=mc(g,(function(e){return t=r[e],i=n[e],!(t===i||pc(t)&&pc(i)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(t,i));var t,i})),x=g.length),x>0||i.force&&!a.length){var w,S=void 0,C=void 0,T=void 0;if(s){C={},p&&(S={});for(_=0;_<x;_++){C[v=g[_]]=n[v],p?S[v]=r[v]:n[v]=r[v]}}else if(p){T={};for(_=0;_<x;_++){T[v=g[_]]=zh(n[v]),Xf(n,r,v)}}(w=new Qh(n,!1,!1,d?mc(f,(function(e){return e.targetName===t})):null)).targetName=t,i.scope&&(w.scope=i.scope),p&&S&&w.whenWithKeys(0,S,g),T&&w.whenWithKeys(0,T,g),w.whenWithKeys(null==u?500:u,s?C:r,g).delay(c||0),e.addAnimator(w,t),a.push(w)}}dc(qf,pd),dc(qf,Df);var Kf=qf,Jf=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return j(t,e),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=cc(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=cc(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){this._children[n].removeSelfFromZr(t)}},t.prototype.getBoundingRect=function(e){for(var t=new Kd(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a=n[o];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(Kd.applyTransform(t,s,l),(i=i||t.clone()).union(t)):(i=i||s.clone()).union(s)}}return i||t},t}(Kf);Jf.prototype.type="group";var eg=Jf,tg={},ng={};
2
2
  /*!
3
3
  * ZRender, a high performance 2d drawing library.
4
4
  *