@yugabytedb/perf-advisor-ui 1.0.108 → 1.0.110
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.css +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.js +64295 -62805
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-query"),r=require("@material-ui/core"),o=require("@yugabyte-ui-library/core"),i=require("@material-ui/core/styles"),a=require("http"),s=require("https"),l=require("url"),u=require("stream"),c=require("assert"),d=require("tty"),p=require("util"),h=require("os"),f=require("zlib"),m=require("@material-ui/icons"),g=require("vis-timeline/standalone");require("vis-timeline/styles/vis-timeline-graph2d.css?inline");var v=require("@material-ui/lab"),y=require("react-dom");function x(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 _=x(t);function b(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=b(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function T(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=b(e))&&(r&&(r+=" "),r+=t);return r}var S=i.makeStyles((function(e){var t;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),queryPreBlockYBM:{display:"block",width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word",backgroundColor:"#F8FBFC !important",cursor:"pointer"},queryPreBlockWeb:{display:"block",width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word",backgroundColor:"#F8FBFC !important",cursor:"pointer"},queryPreBlockFull:{cursor:"pointer",maxWidth:"-webkit-fill-available",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")},queryCodeElementWeb:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block"},queryContainerCodeInTable:{width:"100%",display:"flex",flexDirection:"column",margin:"0 !important",marginBottom:"0 !important",borderRadius:e.shape.borderRadius,padding:"0px !important","& pre":{padding:"0 24px 0 6px !important",margin:"0 !important",border:"0px !important",overflow:"hidden !important",backgroundColor:"".concat(e.palette.grey[50]," !important"),"& code":{padding:"0 !important",fontSize:"11.5px !important",lineHeight:"28px !important",margin:"0 16px 0 0 !important"},"& button":{top:"-2px !important"}}},queryContainerCodeInBreadcrumbs:{width:"100%",display:"flex",flexDirection:"column",margin:"0 !important",marginBottom:"0 !important",borderRadius:e.shape.borderRadius,padding:"0px !important","& pre":{margin:"0 !important",border:"0px !important",padding:"6px 24px 6px 16px !important",backgroundColor:"".concat(e.palette.grey[50]," !important"),"& code":{padding:"0 !important",margin:"0 16px 0 0 !important"},"& button":{top:"4px !important"}}},codeClassNameInTable:{fontSize:"11.5px !important"},preClassNameInTable:{fontSize:"11.5px !important"},defaultActions:{textAlign:"right"},overrideExpandBtn:{padding:e.spacing(0,2)},preQueryBlock:{backgroundColor:"#F7FAFC !important"},queryCellBox:{display:"flex",width:"100%",paddingRight:e.spacing(2)}}})),w=r.makeStyles({errorContainer:{textAlign:"center",fontSize:"16px",lineHeight:"2em"},sadFace:{width:"40px"},errorText:{fontSize:"13px",fontFamily:"Inter",fontWeight:400}}),C=function(t){var n=t.type,o=t.uuid,i=t.customErrorMessage,a=w(),s=e.jsx("span",{}),l=e.jsx("span",{});return"universe"===n&&(s=e.jsx(r.Box,{children:"Seems like universe with UUID ".concat(o," has issues or does not exist.")})),e.jsxs(r.Box,{className:a.errorContainer,children:[e.jsx(r.Box,{children:e.jsx("span",{children:"Aww Snap."})}),e.jsx(r.Box,{children:s}),i&&e.jsx(r.Box,{children:e.jsx("span",{className:a.errorText,children:i})}),e.jsx(r.Box,{children:l})]})},E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function M(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}E(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)};function A(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function D(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(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 N(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[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]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function O(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var B=e=>"checkbox"===e.type,L=e=>e instanceof Date,R=e=>null==e;const k=e=>"object"==typeof e;var P=e=>!R(e)&&!Array.isArray(e)&&k(e)&&!L(e),j=e=>P(e)&&e.target?B(e.target)?e.target.checked:e.target.value:e,F=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),U=e=>Array.isArray(e)?e.filter(Boolean):[],H=e=>void 0===e,z=(e,t,n)=>{if(!t||!P(e))return n;const r=U(t.split(/[,[\].]+?/)).reduce(((e,t)=>R(e)?e:e[t]),e);return H(r)||r===e?H(e[t])?n:e[t]:r};const W="blur",V="focusout",Y="change",G="onBlur",q="onChange",Q="onSubmit",Z="onTouched",X="all",K="max",$="min",J="maxLength",ee="minLength",te="pattern",ne="required",re="validate",oe=t.createContext(null),ie=()=>t.useContext(oe),ae=e=>{const{children:n,...r}=e;return t.createElement(oe.Provider,{value:r},n)};var se=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==X&&(t._proxyFormState[o]=!r||X),n&&(n[o]=!0),e[o]}});return o},le=e=>P(e)&&!Object.keys(e).length,ue=(e,t,n)=>{const{name:r,...o}=e;return le(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!n||X)))},ce=e=>Array.isArray(e)?e:[e],de=(e,t,n)=>n&&t?e===t:!e||!t||e===t||ce(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function pe(e){const n=t.useRef(e);n.current=e,t.useEffect((()=>{const t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>{t&&t.unsubscribe()}}),[e.disabled])}var he=e=>"string"==typeof e,fe=(e,t,n,r)=>he(e)?(r&&t.watch.add(e),z(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),z(n,e)))):(r&&(t.watchAll=!0),n),me="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function ge(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(me&&(e instanceof Blob||e instanceof FileList)||!n&&!P(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return P(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=ge(e[n]);else t=e}return t}function ve(e){const n=ie(),{name:r,control:o=n.control,shouldUnregister:i}=e,a=F(o._names.array,r),s=function(e){const n=ie(),{control:r=n.control,name:o,defaultValue:i,disabled:a,exact:s}=e||{},l=t.useRef(o);l.current=o,pe({disabled:a,subject:r._subjects.watch,callback:e=>{if(de(l.current,e.name,s)){const t=fe(l.current,r._names,e.values||r._formValues);c(H(t)?i:ge(t))}}});const[u,c]=t.useState(H(i)?r._getWatch(o):i);return t.useEffect((()=>r._removeUnmounted())),u}({control:o,name:r,defaultValue:z(o._formValues,r,z(o._defaultValues,r,e.defaultValue)),exact:!0}),l=function(e){const n=ie(),{control:r=n.control,disabled:o,name:i,exact:a}=e||{},[s,l]=t.useState(r._formState),u=t.useRef(!0),c=t.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=t.useRef(i);return d.current=i,pe({disabled:o,callback:t.useCallback((e=>u.current&&de(d.current,e.name,a)&&ue(e,c.current)&&l({...r._formState,...e})),[r,a]),subject:r._subjects.state}),t.useEffect((()=>{u.current=!0;const e=r._proxyFormState.isDirty&&r._getDirty();return e!==r._formState.isDirty&&r._subjects.state.next({isDirty:e}),r._updateValid(),()=>{u.current=!1}}),[r]),se(s,r,c.current,!1)}({control:o,name:r}),u=t.useRef(o.register(r,{...e.rules,value:s}));return t.useEffect((()=>{const e=(e,t)=>{const n=z(o._fields,e);n&&(n._f.mount=t)};return e(r,!0),()=>{const t=o._options.shouldUnregister||i;(a?t&&!o._stateFlags.action:t)?o.unregister(r):e(r,!1)}}),[r,o,a,i]),{field:{name:r,value:s,onChange:t.useCallback((e=>u.current.onChange({target:{value:j(e),name:r},type:Y})),[r]),onBlur:t.useCallback((()=>u.current.onBlur({target:{value:z(o._formValues,r),name:r},type:W})),[r,o]),ref:e=>{const t=z(o._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!z(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!z(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!z(l.touchedFields,r)},error:{enumerable:!0,get:()=>z(l.errors,r)}})}}var ye=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},xe=e=>/^\w*$/.test(e),_e=e=>U(e.replace(/["|']|\]/g,"").split(/\.|\[/));function be(e,t,n){let r=-1;const o=xe(t)?[t]:_e(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=P(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=i,e=e[t]}return e}const Te=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=z(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 P(r)&&Te(r,t)}}};var Se=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),we=(e,t,n)=>{const r=U(z(e,n));return be(r,"root",t[n]),be(e,n,r),e},Ce=e=>"boolean"==typeof e,Ee=e=>"file"===e.type,Me=e=>"function"==typeof e,Ie=e=>he(e)||t.isValidElement(e),Ae=e=>"radio"===e.type,De=e=>e instanceof RegExp;const Ne={value:!1,isValid:!1},Oe={value:!0,isValid:!0};var Be=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&&!H(e[0].attributes.value)?H(e[0].value)||""===e[0].value?Oe:{value:e[0].value,isValid:!0}:Oe:Ne}return Ne};const Le={isValid:!1,value:null};var Re=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Le):Le;function ke(e,t,n="validate"){if(Ie(e)||Array.isArray(e)&&e.every(Ie)||Ce(e)&&!e)return{type:n,message:Ie(e)?e:"",ref:t}}var Pe=e=>P(e)&&!De(e)?e:{value:e,message:""},je=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:c,max:d,pattern:p,validate:h,name:f,valueAsNumber:m,mount:g,disabled:v}=e._f;if(!g||v)return{};const y=a?a[0]:i,x=e=>{r&&y.reportValidity&&(y.setCustomValidity(Ce(e)?"":e||""),y.reportValidity())},_={},b=Ae(i),T=B(i),S=b||T,w=(m||Ee(i))&&!i.value||""===t||Array.isArray(t)&&!t.length,C=ye.bind(null,f,n,_),E=(e,t,n,r=J,o=ee)=>{const a=e?t:n;_[f]={type:e?r:o,message:a,ref:i,...C(e?r:o,a)}};if(o?!Array.isArray(t)||!t.length:s&&(!S&&(w||R(t))||Ce(t)&&!t||T&&!Be(a).isValid||b&&!Re(a).isValid)){const{value:e,message:t}=Ie(s)?{value:!!s,message:s}:Pe(s);if(e&&(_[f]={type:ne,message:t,ref:y,...C(ne,t)},!n))return x(t),_}if(!(w||R(c)&&R(d))){let e,r;const o=Pe(d),a=Pe(c);if(R(t)||isNaN(t)){const n=i.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,u="week"==i.type;he(o.value)&&t&&(e=l?s(t)>s(o.value):u?t>o.value:n>new Date(o.value)),he(a.value)&&t&&(r=l?s(t)<s(a.value):u?t<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(t?+t:t);R(o.value)||(e=n>o.value),R(a.value)||(r=n<a.value)}if((e||r)&&(E(!!e,o.message,a.message,K,$),!n))return x(_[f].message),_}if((l||u)&&!w&&(he(t)||o&&Array.isArray(t))){const e=Pe(l),r=Pe(u),o=!R(e.value)&&t.length>e.value,i=!R(r.value)&&t.length<r.value;if((o||i)&&(E(o,e.message,r.message),!n))return x(_[f].message),_}if(p&&!w&&he(t)){const{value:e,message:r}=Pe(p);if(De(e)&&!t.match(e)&&(_[f]={type:te,message:r,ref:i,...C(te,r)},!n))return x(r),_}if(h)if(Me(h)){const e=ke(await h(t),y);if(e&&(_[f]={...e,...C(re,e.message)},!n))return x(e.message),_}else if(P(h)){let e={};for(const r in h){if(!le(e)&&!n)break;const o=ke(await h[r](t),y,r);o&&(e={...o,...C(r,o.message)},x(o.message),n&&(_[f]=e))}if(!le(e)&&(_[f]={ref:y,...e},!n))return _}return x(!0),_},Fe=e=>({isOnSubmit:!e||e===Q,isOnBlur:e===G,isOnChange:e===q,isOnAll:e===X,isOnTouch:e===Z});function Ue(e){for(const t in e)if(!H(e[t]))return!1;return!0}function He(e,t){const n=xe(t)?[t]:_e(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=H(e)?r++:e[t[r++]];return e}(e,n),o=n[n.length-1];let i;r&&delete r[o];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(i=e);++o<a.length;){const t=a[o];r=r?r[t]:e[t],s===o&&(P(r)&&le(r)||Array.isArray(r)&&Ue(r))&&(i?delete i[t]:delete e[t]),i=r}}return e}function ze(){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 We=e=>R(e)||!k(e);function Ve(e,t){if(We(e)||We(t))return e===t;if(L(e)&&L(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(L(n)&&L(e)||P(n)&&P(e)||Array.isArray(n)&&Array.isArray(e)?!Ve(n,e):n!==e)return!1}}return!0}var Ye=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ge=e=>"select-multiple"===e.type,qe=e=>Ye(e)&&e.isConnected,Qe=e=>{for(const t in e)if(Me(e[t]))return!0;return!1};function Ze(e,t={}){const n=Array.isArray(e);if(P(e)||n)for(const n in e)Array.isArray(e[n])||P(e[n])&&!Qe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Ze(e[n],t[n])):R(e[n])||(t[n]=!0);return t}function Xe(e,t,n){const r=Array.isArray(e);if(P(e)||r)for(const r in e)Array.isArray(e[r])||P(e[r])&&!Qe(e[r])?H(t)||We(n[r])?n[r]=Array.isArray(e[r])?Ze(e[r],[]):{...Ze(e[r])}:Xe(e[r],R(t)?{}:t[r],n[r]):Ve(e[r],t[r])?delete n[r]:n[r]=!0;return n}var Ke=(e,t)=>Xe(e,t,Ze(t)),$e=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>H(e)?e:t?""===e?NaN:e?+e:e:n&&he(e)?new Date(e):r?r(e):e;function Je(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Ee(t)?t.files:Ae(t)?Re(e.refs).value:Ge(t)?[...t.selectedOptions].map((({value:e})=>e)):B(t)?Be(e.refs).value:$e(H(t.value)?e.ref.value:t.value,e)}var et=e=>H(e)?e:De(e)?e.source:P(e)?De(e.value)?e.value.source:e.value:e;function tt(e,t,n){const r=z(e,n);if(r||xe(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=z(t,r),a=z(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};o.pop()}return{name:n}}const nt={mode:Q,reValidateMode:q,shouldFocusError:!0};function rt(e={}){let t,n={...nt,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},i=ge(n.defaultValues)||{},a=n.shouldUnregister?{}:ge(i),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:ze(),array:ze(),state:ze()},p=Fe(n.mode),h=Fe(n.reValidateMode),f=n.criteriaMode===X,m=async()=>{if(c.isValid){const e=n.resolver?le((await _()).errors):await b(o,!0);e!==r.isValid&&(r.isValid=e,d.state.next({isValid:e}))}},g=e=>c.isValidating&&e!==r.isValidating&&d.state.next({isValidating:e}),v=(e,t,n,r)=>{const l=z(o,e);if(l){const o=z(a,e,H(n)?z(i,e):n);H(o)||r&&r.defaultChecked||t?be(a,e,t?o:Je(l._f)):w(e,o),s.mount&&m()}},y=(e,t,n,o,a)=>{let s=!1,l=!1;const u={name:e};if((!n||o)&&(c.isDirty&&(l=r.isDirty,r.isDirty=u.isDirty=T(),s=l!==u.isDirty),c.dirtyFields)){l=z(r.dirtyFields,e);const n=Ve(z(i,e),t);n?He(r.dirtyFields,e):be(r.dirtyFields,e,!0),u.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=z(r.touchedFields,e);t||(be(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,o,i,a)=>{const s=z(r.errors,n),l=c.isValid&&Ce(o)&&r.isValid!==o;var p;if(e.delayError&&i?(p=()=>((e,t)=>{be(r.errors,e,t),d.state.next({errors:r.errors})})(n,i),t=e=>{clearTimeout(u),u=window.setTimeout(p,e)},t(e.delayError)):(clearTimeout(u),t=null,i?be(r.errors,n,i):He(r.errors,n)),(i?!Ve(s,i):s)||!le(a)||l){const e={...a,...l&&Ce(o)?{isValid:o}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}g(!1)},_=async e=>await n.resolver(a,n.context,((e,t,n,r)=>{const o={};for(const n of e){const e=z(t,n);e&&be(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}})(e||l.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),b=async(e,t,o={valid:!0})=>{for(const i in e){const s=e[i];if(s){const{_f:e,...i}=s;if(e){const i=l.array.has(e.name),u=await je(s,z(a,e.name),f,n.shouldUseNativeValidation,i);if(u[e.name]&&(o.valid=!1,t))break;!t&&(z(u,e.name)?i?we(r.errors,u,e.name):be(r.errors,e.name,u[e.name]):He(r.errors,e.name))}i&&await b(i,t,o)}}return o.valid},T=(e,t)=>(e&&t&&be(a,e,t),!Ve(A(),i)),S=(e,t,n)=>fe(e,l,{...s.mount?a:H(t)?i:he(e)?{[e]:t}:t},n),w=(e,t,n={})=>{const r=z(o,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&be(a,e,$e(t,n)),i=me&&Ye(n.ref)&&R(t)?"":t,Ge(n.ref)?[...n.ref.options].forEach((e=>e.selected=i.includes(e.value))):n.refs?B(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):n.refs[0]&&(n.refs[0].checked=!!i):n.refs.forEach((e=>e.checked=e.value===i)):Ee(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||d.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&I(e)},C=(e,t,n)=>{for(const r in t){const i=t[r],a=`${e}.${r}`,s=z(o,a);!l.array.has(e)&&We(i)&&(!s||s._f)||L(i)?w(a,i,n):C(a,i,n)}},E=(e,t,n={})=>{const s=z(o,e),u=l.array.has(e),p=ge(t);be(a,e,p),u?(d.array.next({name:e,values:a}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=Ke(i,a),d.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:T(e,p)}))):!s||s._f||R(p)?w(e,p,n):C(e,p,n),Se(e,l)&&d.state.next({}),d.watch.next({name:e})},M=async e=>{const i=e.target;let s=i.name;const u=z(o,s),v=()=>i.type?Je(u._f):j(e);if(u){let i,S;const w=v(),C=e.type===W||e.type===V,E=!((T=u._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||z(r.errors,s)||u._f.deps)||((e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e))(C,z(r.touchedFields,s),r.isSubmitted,h,p),M=Se(s,l,C);be(a,s,w),C?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const A=y(s,w,C,!1),D=!le(A)||M;if(!C&&d.watch.next({name:s,type:e.type}),E)return c.isValid&&m(),D&&d.state.next({name:s,...M?{}:A});if(!C&&M&&d.state.next({}),g(!0),n.resolver){const{errors:e}=await _([s]),t=tt(r.errors,o,s),n=tt(e,o,t.name||s);i=n.error,s=n.name,S=le(e)}else i=(await je(u,z(a,s),f,n.shouldUseNativeValidation))[s],i?S=!1:c.isValid&&(S=await b(o,!0));We(w)&&v()!==w?g(!1):(u._f.deps&&I(u._f.deps),x(s,S,i,A))}var T},I=async(e,t={})=>{let i,a;const s=ce(e);if(g(!0),n.resolver){const t=await(async e=>{const{errors:t}=await _();if(e)for(const n of e){const e=z(t,n);e?be(r.errors,n,e):He(r.errors,n)}else r.errors=t;return t})(H(e)?e:s);i=le(t),a=e?!s.some((e=>z(t,e))):i}else e?(a=(await Promise.all(s.map((async e=>{const t=z(o,e);return await b(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&m()):a=i=await b(o);return d.state.next({...!he(e)||c.isValid&&i!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:i}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&Te(o,(e=>e&&z(r.errors,e)),e?s:l.mount),a},A=e=>{const t={...i,...s.mount?a:{}};return H(e)?t:he(e)?z(t,e):e.map((e=>z(t,e)))},D=(e,t)=>({invalid:!!z((t||r).errors,e),isDirty:!!z((t||r).dirtyFields,e),isTouched:!!z((t||r).touchedFields,e),error:z((t||r).errors,e)}),N=(e,t={})=>{for(const s of e?ce(e):l.mount)l.mount.delete(s),l.array.delete(s),z(o,s)&&(t.keepValue||(He(o,s),He(a,s)),!t.keepError&&He(r.errors,s),!t.keepDirty&&He(r.dirtyFields,s),!t.keepTouched&&He(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&He(i,s));d.watch.next({}),d.state.next({...r,...t.keepDirty?{isDirty:T()}:{}}),!t.keepIsValid&&m()},O=(e,t={})=>{let r=z(o,e);const u=Ce(t.disabled);return be(o,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?u&&be(a,e,t.disabled?void 0:z(a,e,Je(r._f))):v(e,!0,t.value),{...u?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:et(t.min),max:et(t.max),minLength:et(t.minLength),maxLength:et(t.maxLength),pattern:et(t.pattern)}:{},name:e,onChange:M,onBlur:M,ref:a=>{if(a){O(e,t),r=z(o,e);const n=H(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>Ae(e)||B(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;be(o,e,{_f:{...r._f,...s?{refs:[...l.filter(qe),n,...Array.isArray(z(i,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=z(o,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!F(l.array,e)||!s.action)&&l.unMount.add(e)}}},k=()=>n.shouldFocusError&&Te(o,(e=>e&&z(r.errors,e)),l.mount);return{control:{register:O,unregister:N,getFieldState:D,_executeSchema:_,_focusError:k,_getWatch:S,_getDirty:T,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=z(o,e);t&&(t._f.refs?t._f.refs.every((e=>!qe(e))):!qe(t._f.ref))&&N(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,p=!0)=>{if(l&&n){if(s.action=!0,p&&Array.isArray(z(o,e))){const t=n(z(o,e),l.argA,l.argB);u&&be(o,e,t)}if(p&&Array.isArray(z(r.errors,e))){const t=n(z(r.errors,e),l.argA,l.argB);u&&be(r.errors,e,t),((e,t)=>{!U(z(e,t)).length&&He(e,t)})(r.errors,e)}if(c.touchedFields&&p&&Array.isArray(z(r.touchedFields,e))){const t=n(z(r.touchedFields,e),l.argA,l.argB);u&&be(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=Ke(i,a)),d.state.next({name:e,isDirty:T(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else be(a,e,t)},_getFieldArray:t=>U(z(s.mount?a:i,t,e.shouldUnregister?z(i,t,[]):[])),_subjects:d,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return i},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 i=>{i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let s=!0,l=ge(a);d.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await _();r.errors=e,l=t}else await b(o);le(r.errors)?(d.state.next({errors:{},isSubmitting:!0}),await e(l,i)):(t&&await t({...r.errors},i),k())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:le(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>Me(e)?d.watch.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:E,getValues:A,reset:(t,n)=>((t,n={})=>{const u=t||i,p=ge(u),h=t&&!le(t)?p:i;if(n.keepDefaultValues||(i=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)z(r.dirtyFields,e)?be(h,e,z(a,e)):E(e,z(h,e));else{if(me&&H(t))for(const e of l.mount){const t=z(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Ye(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}a=e.shouldUnregister?n.keepDefaultValues?ge(i):{}: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||Ve(t,i)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?Ke(i,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(Me(t)?t(a):t,n),resetField:(e,t={})=>{z(o,e)&&(H(t.defaultValue)?E(e,z(i,e)):(E(e,t.defaultValue),be(i,e,t.defaultValue)),t.keepTouched||He(r.touchedFields,e),t.keepDirty||(He(r.dirtyFields,e),r.isDirty=t.defaultValue?T(e,z(i,e)):T()),t.keepError||(He(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e?ce(e).forEach((e=>He(r.errors,e))):r.errors={},d.state.next({errors:r.errors})},unregister:N,setError:(e,t,n)=>{const i=(z(o,e,{_f:{}})._f||{}).ref;be(r.errors,e,{...t,ref:i}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},setFocus:(e,t={})=>{const n=z(o,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 ot(e={}){const n=t.useRef(),[r,o]=t.useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});n.current||(n.current={...rt(e),formState:r});const i=n.current.control;return i._options=e,pe({subject:i._subjects.state,callback:t.useCallback((e=>{ue(e,i._proxyFormState,!0)&&(i._formState={...i._formState,...e},o({...i._formState}))}),[i])}),t.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()})),t.useEffect((()=>{r.submitCount&&i._focusError()}),[i,r.submitCount]),n.current.formState=se(r,i),n.current}var it,at,st,lt=function(t){var n,r,i=t.name,a=t.rules,s=t.defaultValue,l=t.control,u=t.shouldUnregister,c=A(t,["name","rules","defaultValue","control","shouldUnregister"]),d=ve({name:i,rules:a,defaultValue:s,control:l,shouldUnregister:u}),p=d.field,h=p.ref,f=A(p,["ref"]),m=d.fieldState;return e.jsx(o.YBInput,I({},f,c,{inputRef:h,error:!!m.error,helperText:null!==(r=null===(n=m.error)||void 0===n?void 0:n.message)&&void 0!==r?r:c.helperText}))},ut=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:{width:"60px",height:"32px","& .yb-MuiInputBase-formControl":{border:"0px none"}},dropdownMenu:{"& .MuiMenu-list":{display:"flex",flexDirection:"column"}}}})),ct=function(n){var i=n.dataPrefetchFn,a=n.page,s=n.onPageChange,l=n.onPageSizeChange,u=n.hasMoreData,c=n.total,d=n.rowsPerPageOptions,p=void 0===d?[10,20,50]:d,h=n.rowsPerPage,f=n.showRecordsPerPage,m=n.recordsPerPageCaption,g=void 0===m?"":m,v=ut(),y=Math.ceil(c/(null!=h?h:p[0])),x=t.useCallback((function(e){e===y&&u&&i(),s(e-1)}),[i,s,u,y]);return t.useEffect((function(){0===a&&h===c&&u&&i()}),[]),e.jsxs(r.Box,{className:v.root,children:[f&&e.jsxs(r.Grid,{item:!0,xs:12,lg:4,className:v.dropdownContainer,children:[g&&e.jsx(r.Box,{mr:1,minWidth:"100px",children:g}),e.jsx(o.YBSelect,{value:h,onChange:function(e){l(e.target.value)},className:v.dropdown,dataTestId:"RowsPerPageSelect",menuProps:{className:v.dropdownMenu,anchorOrigin:{vertical:"top",horizontal:"left"}},children:p.map((function(t){return e.jsx(r.MenuItem,{value:t,"data-testid":"RowsPerPageSelectMenuItem-".concat(t),children:t},t)}))})]}),e.jsx(r.Box,{ml:4,children:e.jsx(o.YBPagination,{currentPage:a+1,pageSize:y,onPageSelect:x,hasMore:u,dataTestId:"TablePagination"})})]})},dt=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"}}})),pt=function(t){var n=t.noBackground,o=t.className,i=t.bodyClassName,a=t.children,s=t.body,l=t.header,u=t.title,c=dt(),d=T(c.body,n&&c.transparentBody,i);return e.jsxs(r.Box,{className:o?c.contentPanel+o:"classes.contentPanel",children:[(l||u)&&e.jsxs(r.Box,{className:c.header,children:[l," ",u]}),e.jsx(r.Box,{className:"container",children:s&&e.jsxs(r.Box,{className:d,children:[s,a]})})]})};exports.NodeState=void 0,(at=exports.NodeState||(exports.NodeState={})).ToBeAdded="ToBeAdded",at.Provisioned="Provisioned",at.SoftwareInstalled="SoftwareInstalled",at.UpgradeSoftware="UpgradeSoftware",at.UpdateGFlags="UpdateGFlags",at.Live="Live",at.Stopping="Stopping",at.Starting="Starting",at.Stopped="Stopped",at.Unreachable="Unreachable",at.ToBeRemoved="ToBeRemoved",at.Removing="Removing",at.Removed="Removed",at.Adding="Adding",at.BeingDecommissioned="BeingDecommissioned",at.Decommissioned="Decommissioned",exports.MetricMeasure=void 0,(st=exports.MetricMeasure||(exports.MetricMeasure={})).OVERALL="Overall",st.OUTLIER="Outlier",st.OUTLIER_TABLES="Outlier_Tables",st.OUTLIER_DB="Outlier_Databases";var ht,ft,mt,gt=((it={})[exports.MetricMeasure.OVERALL]="Overall",it[exports.MetricMeasure.OUTLIER]="nodes",it[exports.MetricMeasure.OUTLIER_TABLES]="tables",it[exports.MetricMeasure.OUTLIER_DB]="databases",it);exports.AnomalyCategory=void 0,(ht=exports.AnomalyCategory||(exports.AnomalyCategory={})).SQL="SQL",ht.APP="APP",ht.NODE="NODE",ht.INFRA="INFRA",ht.DB="DB",exports.BackgroundJobCategory=void 0,(exports.BackgroundJobCategory||(exports.BackgroundJobCategory={})).BACKGROUND_JOBS="BACKGROUND_JOBS",exports.AnomalyType=void 0,(ft=exports.AnomalyType||(exports.AnomalyType={})).SQL_QUERY_LATENCY_INCREASE="SQL_QUERY_LATENCY_INCREASE",ft.HOT_NODE_CPU="HOT_NODE_CPU",ft.HOT_NODE_YSQL_QUERIES="HOT_NODE_YSQL_QUERIES",ft.SLOW_DISKS="SLOW_DISKS",ft.HOT_TABLET="HOT_TABLET",ft.LARGE_TABLET="LARGE_TABLET",ft.UNUSED_INDEX="UNUSED_INDEX",ft.REDUNDANT_INDEX="REDUNDANT_INDEX",ft.RANGE_SHARDING="RANGE_SHARDING",exports.WaitEventClassification=void 0,(mt=exports.WaitEventClassification||(exports.WaitEventClassification={})).WAIT_EVENT_COMPONENT="waitEventComponent",mt.WAIT_EVENT_CLASS="waitEventClass",mt.WAIT_EVENT_TYPE="waitEventType",mt.WAIT_EVENT="waitEvent",mt.CLIENT_NODE_IP="clientNodeIp",mt.QUERY_ID="queryId",mt.TABLET_ID="tabletId",mt.DB_ID="dbId";var vt,yt,xt,_t={waitEventType:"TYPE",waitEvent:"EVENT"},bt={NONE:"NONE",TOP:"TOP",BOTTOM:"BOTTOM"},Tt={NONE:"NONE",NODE:"NODE",TABLE:"TABLE",NAMESPACE:"NAMESPACE"},St={ALL:"All",SQL:"SQL",CQL:"CQL",BACKGROUND:"Background"},wt={AVERAGE:"AVG",MAX:"MAX",MIN:"MIN",SUM:"SUM"};exports.AppName=void 0,(vt=exports.AppName||(exports.AppName={})).YBA="YBA",vt.YBM="YBM",vt.YBD="YBD",vt.WEB="WEB",exports.QueryType=void 0,(yt=exports.QueryType||(exports.QueryType={})).SQL="SQL",yt.CQL="CQL",yt.BACKGROUND="BACKGROUND",exports.GraphType=void 0,(xt=exports.GraphType||(exports.GraphType={})).SINGLE_SUPPORTING="SINGLE_SUPPORTING",xt.MULTI_SUPPORTING="MULTI_SUPPORTING",xt.MAIN_RCA="MAIN_RCA";var Ct,Et,Mt,It,At,Dt,Nt,Ot,Bt,Lt={Type:"Wait Event Type",Class:"Wait Event Class",Event:"Wait Event",Query:"Query",waitEventType:"Wait Event Type",waitEvent:"Wait Event","Client IP":"Client IP"},Rt=[exports.WaitEventClassification.WAIT_EVENT_TYPE,exports.WaitEventClassification.WAIT_EVENT];exports.SortDirection=void 0,(Ct=exports.SortDirection||(exports.SortDirection={})).ASC="ASC",Ct.DESC="DESC",exports.PrimaryDashboardViewTabs=void 0,(Et=exports.PrimaryDashboardViewTabs||(exports.PrimaryDashboardViewTabs={})).ANOMALY="Anomaly",Et.QUERY="Query",function(e){e.SQL="SQL",e.CQL="CQL",e.SYSTEM="SYSTEM"}(Mt||(Mt={})),exports.TPFeatureFlags=void 0,(It=exports.TPFeatureFlags||(exports.TPFeatureFlags={})).SHOW_QUERY_STATS_TIMESTAMP="showStatsTimestamp",It.SHOW_CLEANUP_HISTORICAL_DATA="showCleanupHistoricalData",exports.AnomalyDetectionStatusText=void 0,(At=exports.AnomalyDetectionStatusText||(exports.AnomalyDetectionStatusText={})).EMPTY="EMPTY",At.SCHEDULED="SCHEDULED",At.IN_PROGRESS="IN_PROGRESS",At.SUCCESS="SUCCESS",At.FAILURE="FAILURE",exports.RuntimeConfigType=void 0,(Dt=exports.RuntimeConfigType||(exports.RuntimeConfigType={})).TEXT="TEXT",Dt.INT="INT",Dt.FLOAT="FLOAT",Dt.BOOL="BOOL",Dt.DURATION="DURATION",exports.TransformedBackgroundTasksCategory=void 0,(exports.TransformedBackgroundTasksCategory||(exports.TransformedBackgroundTasksCategory={})).ALL_BACKGROUND_JOBS="All Background Jobs",exports.InsightsTabs=void 0,(Nt=exports.InsightsTabs||(exports.InsightsTabs={})).CLUSTER_LOAD="Cluster Load",Nt.INSIGHTS="Insights",Nt.METRICS="Metrics",exports.ClusterLoadOverallTabs=void 0,(Ot=exports.ClusterLoadOverallTabs||(exports.ClusterLoadOverallTabs={})).ANOMALIES="Anomalies",Ot.QUERIES="Queries",exports.TabletTabs=void 0,(exports.TabletTabs||(exports.TabletTabs={})).TABLET_OVERVIEW="Tablet Overview",exports.SqlTabs=void 0,(exports.SqlTabs||(exports.SqlTabs={})).QUERY_OVERVIEW="Query Overview",exports.SqlDrilldownTabs=void 0,(exports.SqlDrilldownTabs||(exports.SqlDrilldownTabs={})).PERFORMANCE_METRICS="Performance Metrics",exports.ClusterLoadSubTabs=void 0,(Bt=exports.ClusterLoadSubTabs||(exports.ClusterLoadSubTabs={})).OVERALL_LOAD="Overall Load",Bt.LOAD_BY_DATABASE="Load by Database";var kt,Pt,jt={ANOMALIES:"anomalies",QUERIES:"queries",METRICS:"metricsNew",INSIGHTS:"insights",CLUSTER_LOAD:"clusterLoad",CLUSTER_LOAD_DB:"dbLoad",OVERALL_LOAD:"overallLoad"};exports.AnomalyTypeFilter=void 0,(kt=exports.AnomalyTypeFilter||(exports.AnomalyTypeFilter={})).PERF_ANOMALY="PERF_ANOMALY",kt.INSIGHT="INSIGHT",exports.ChartType=void 0,(Pt=exports.ChartType||(exports.ChartType={})).LINE="line",Pt.BAR="bar";var Ft={DB_ID:"databaseId",EPS:"eps",EVENTS:"events",FIRST_ACTIVE:"firstActive",LAST_ACTIVE:"lastActive",AVG_LATENCY:"latencyAvg",LATENCY_P90:"latencyP90",LATENCY_P99:"latencyP99",NAMESPACE_NAME:"namespaceName",QUERY:"query",QUERY_ID:"queryid",QUERY_TYPE:"queryType",ROWS_AVG:"rowsAvg",RPS:"rps",TOTAL_TIME:"totalTime",UNIVERSE_ID:"universeId",TOTAL_EPS_RATIO:"totalEpsRatio"},Ut={CPU:"Cpu",IO:"IO",DISK_IO:"DiskIO"},Ht="All Regions and Clusters",zt="All",Wt="All Zones and Nodes",Vt="ASH",Yt="Cores",Gt="Queries",qt="Inter",Qt="# vCPU",Zt={NODE_AVERAGE:"Selected Nodes Average",ALL:"all",ALL_DATABASES:"All Databases",TOP:"top",PRIMARY:"PRIMARY"},Xt="active_session_history_eps_global",Kt="active_session_history_query_events",$t="cpu_count",Jt=[{value:exports.MetricMeasure.OVERALL,label:"Overall",text:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods",text:"nodes"},{value:exports.MetricMeasure.OUTLIER_TABLES,label:"Outlier Tables",text:"tables"},{value:exports.MetricMeasure.OUTLIER_DB,label:"Outlier Databases",text:"databases"}],en=[{value:exports.MetricMeasure.OVERALL,label:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods",text:"nodes"}],tn=[{value:bt.TOP,label:"Top"},{value:bt.BOTTOM,label:"Bottom"}],nn=[{value:St.ALL,label:"All Queries"},{value:St.SQL,label:"SQL"},{value:St.CQL,label:"CQL"},{value:St.BACKGROUND,label:"Background"}],rn=["active_session_history_eps_client_node","query_latency","query_rps","query_rows_avg"],on=["active_session_history_eps_global","cql_query_latency_avg","cql_query_rps"],an=["active_session_history_eps_client_node"],sn="ysql_connections_per_sec",ln=[10,20,30,40,50],un=[exports.AnomalyCategory.SQL,exports.AnomalyCategory.NODE,exports.AnomalyCategory.DB,exports.AnomalyCategory.APP,exports.AnomalyCategory.INFRA],cn="00000000-0000-0000-0000-000000000000",dn={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",SHOW_DB_CLUSTER_LOAD_VIEW:"pa.ui.show_db_cluster_load_view"},pn={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"},hn="MORE",fn="View More",mn={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"},gn={ONE_HOUR:"1h",SIX_HOURS:"6h",ONE_DAY:"1d",TWO_DAYS:"2d",SEVEN_DAYS:"7d",CUSTOM:"Custom"},vn=[{label:mn.ONE_HOUR,value:gn.ONE_HOUR},{label:mn.SIX_HOURS,value:gn.SIX_HOURS},{label:mn.ONE_DAY,value:gn.ONE_DAY},{label:mn.TWO_DAYS,value:gn.TWO_DAYS},{label:mn.SEVEN_DAYS,value:gn.SEVEN_DAYS},{label:mn.CUSTOM,value:gn.CUSTOM}],yn=[{label:mn.CUSTOM,value:"Custom"}],xn={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_YSQL_QUERIES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_CONNECTIONS:{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"}}},_n="DATABASE",bn="QUERY TYPE",Tn="Database",Sn="TABLE",wn="TABLET ID",Cn="ANOMALY",En="REGION/ZONE",Mn=["ysql_ops","ycql_ops","server","per_process","disk_io","tserver","master","master_advanced","lsmdb"],In=["outlier_tables"],An=["outlier_databases"],Dn=[{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"]}],Nn=[{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"]}],On=[{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_tablet_split_candidates","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"]}],Bn="gant-chart-anomalies",Ln={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"},Rn="METRICS_NAMES",kn="METRICS_OUTLIER_TABLES_NAMES",Pn="METRICS_OUTLIER_DATABASES_NAMES",jn=["#8c564b","#4754DB","#2FB3FF","#BB42BC","#20A7C9","#e377c2","#7f7f7f","#bcbd22","#17becf"],Fn={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",BACKGROUND_JOBS:"#97A5B0",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",ProcArray:"#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",EMPTY_EVENT:"#F0F4F7"},Un={WAIT_EVENT_TYPE_CHART_TOOLTIP:"The tablet wait event types in a horizontal bar chart",ACTIVE_SESSIONS_PER_SECOND_TOOLTIP:"The number of active sessions per second for the tablet",SST_SIZE_TOOLTIP:"The size of the SST files for the tablet",WAL_SIZE_TOOLTIP:"The size of the write ahead log for the tablet",PARTITION_TOOLTIP:"The partition range in which the tablet is located",SIZE_TOOLTIP:"Total size of the tablet which includes SST and WAL",TABLET_ID_TOOLTIP:"The ID of the tablet",DATABASE_TYPE_TOOLTIP:"The type of the database",LEADER_NODE_TOOLTIP:"Leader node of the tablet",FOLLOWER_NODES_TOOLTIP:"Follower nodes of the tablet",EPS_TOOLTIP:"Active sessions per second",TOTAL_EPS_RATIO_TABLET_TOOLTIP:"Percentage of the system load that the tablet contributes to",TOTAL_EPS_RATIO_QUERY_LEVEL_TABLET_TOOLTIP:"Percentage of the system load that the tablet contributes to the query",DATABASE_NAME_TOOLTIP:"The name of the database",SCHEMA_NAME_TOOLTIP:"The name of the schema",TABLE_NAME_TOOLTIP:"The name of the table",UNIVERSE_ID_TOOLTIP:"The ID of the universe",NODE_NAME_TOOLTIP:"The name of the node",NODE_REGION_ZONE_TOOLTIP:"The provider and Availability Zone to which the node belongs",CONNECTIONS_TOOLTIP:"The number of connections to the node",TOTAL_EPS_RATIO_NODE_TOOLTIP:"Percentage of the system load that the node contributes to",EPS_NODE_TOOLTIP:"Active sessions per second",EVENTS_NODE_TOOLTIP:"The node wait event types in a horizontal bar chart",RPS_NODE_TOOLTIP:"The number of RPCs per second to the node",TOTAL_EPS_RATIO_QUERY_TOOLTIP:"Percentage of the system load that the query contributes to",FIRST_ACTIVE_TIME_TOOLTIP:"The first active time that the query was executed",LAST_ACTIVE_TIME_TOOLTIP:"The last active time that the query was executed",AVG_LATENCY_TOOLTIP:"The average latency of the query in milliseconds",LATENCY_P90_TOOLTIP:"The 90th percentile latency of the query in milliseconds",LATENCY_P99_TOOLTIP:"The 99th percentile latency of the query in milliseconds",QUERY_TYPE_TOOLTIP:"The type of the query which can be SQL, CQL, or BACKGROUND",TOTAL_TIME_TOOLTIP:"The execution time of the query in milliseconds",ROWS_AVG_TOOLTIP:"The average number of rows returned per call of the query",RPS_TOOLTIP:"The number of calls per second to the query",ACTIVE_SESSIONS_PER_SECOND_QUERY_TOOLTIP:"The number of active sessions per second for the query",EVENTS_QUERY_TOOLTIP:"The wait event types for the query in a horizontal bar chart",QUERY_TEXT_TOOLTIP:"The text of the query"},Hn={DB_ID:"",TOTAL_EPS_RATIO:"Total Load",EPS:"Avg Active Context",EVENTS:"Wait Event Types",FIRST_ACTIVE_TIME:"First Active Time",LAST_ACTIVE_TIME:"Last Active Time",AVG_LATENCY:"Avg Latency (ms)",LATENCY_P90:"P90 Latency (ms)",LATENCY_P99:"P99 Latency (ms)",NAMESPACE_NAME:"Database",QUERY:"Query",QUERY_ID:"Query ID",QUERY_TYPE:"Query Type",ROWS_AVG:"Avg Rows/Call",RPS:"Calls/Sec",TOTAL_TIME:"Total Time (ms)",UNIVERSE_ID:"Universe ID"},zn="Add Columns",Wn={UNIVERSE_PA_STATUS_ERROR:"Universe is not registered to TP, please register to view data",UNIVERSE_DETAILS_ERROR:"Failed to fetch universe details, please try again.",NODE_REGION_ZONE_DETAILS_ERROR:"Failed to fetch node region and zone details, 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.",TABLETS_DATA_FETCH_ERROR:"Failed to fetch tablets data, please try again.",NODE_LOAD_DATA_FETCH_ERROR:"Failed to fetch node load 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.",DB_STATS_FETCH_ERROR:"Failed to fetch DB metadata, please try again."},Vn="visibleQueryMetadataColumns",Yn="visibleDbLoadMetadataColumns",Gn="visibleTabletsMetadataColumns",qn="visibleTabletDrilldownMetadataColumns",Qn="visibleNodeLoadMetadataColumns",Zn="CPU",Xn="IO",Kn=function(t,n,r,o){if(0!==r){return function(r,i,a,s,l){return e.jsx(ct,{total:r,page:i,rowsPerPage:a,onPageSizeChange:s,dataPrefetchFn:t,rowsPerPageOptions:ln,showRecordsPerPage:!0,recordsPerPageCaption:e.jsx("span",{children:n}),onPageChange:l,hasMoreData:o})}}},$n=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"},metricsLoadingBox:{display:"flex",minHeight:"500px",alignItems:"center",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),paddingTop:0,display:"flex",margin:0,flexDirection:"column",backgroundColor:"#FFFFFF"},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"},metaDataMarginBottom:{marginBottom:e.spacing(.5)},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:"8px 16px 16px 16px",margin:"16px 0px 8px 0px"},causeTabButton:{minWidth:"fit-content",marginRight:"8px !important",paddingLeft:"16px !important",paddingRight:"16px !important","& .yb-MuiTab-root":{maxWidth:"264px"}},causeTabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},causeText:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#000000"},descriptionText:{fontFamily:"Inter",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:{position:"relative","& .MuiSvgIcon-root":{fontSize:e.spacing(4)}},breadCrumbText:{fontWeight:600,fontStyle:"semibold",fontSize:"15px"},ybBreadcrumbWrapper:{"& .yb-MuiBreadcrumbs-li button, & .yb-MuiBreadcrumbs-li p, & .yb-MuiBreadcrumbs-li .yb-MuiTypography-root, & .yb-MuiBreadcrumbs-li .yb-MuiLink-root":{fontSize:"15px !important",fontWeight:"600 !important",lineHeight:"20px !important"},"& .yb-MuiBreadcrumbs-separator":{fontSize:"13px",fontWeight:"400",lineHeight:"16px"}},breadcrumbColor:{color:"#2B59C3"},breadcrumbDefaultColor:{color:"#0B1117"},anomalyCategoryText:{color:"#0B1117",fontWeight:600},dateTimePicker:{"& .MuiFormControl-root":{height:"32px !important"},height:"32px !important"},panelItemBody:{padding:0,backgroundColor:"transparent"},rcaGantChartBox:{width:"100%",padding:"16px 48px 16px 40px",marginLeft:"0px",borderRadius:"8px",border:"1px solid #D7DEE4"},tabPanelPrimary:{padding:"0px !important"},overrideMuiTableContainer:{marginTop:e.spacing(3),"& .yb-MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTableContainerWeb:{marginTop:e.spacing(3),"& .yb-MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},queryMetadataTable:{marginTop:0},overrideMuiTable:{marginTop:e.spacing(2),textAlign:"center","& .yb-MuiTableCell-sizeSmall":{textAlign:"center"},"& .yb-MuiSelect-select":{fontSize:"13px"}},tableBorder:{borderRight:"1px solid #ccc"},tableHeaderCell:{position:"relative","&:first-of-type":{"&: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"},queryMetadataBox:{padding:"16px 16px 0 0"},headerContainerYBM:{paddingLeft:e.spacing(2)},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:{backgroundColor:"transparent",paddingBottom:e.spacing(2)},infoIcon:{color:"#97A5B0",marginBottom:"2px",marginLeft:e.spacing(.5)},filterContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},filterLeftContainer:{gap:e.spacing(1),display:"flex",flexDirection:"row",alignItems:"center"},ybOverrideMuiInput:{"& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiMenu-list":{maxHeight:"400px"}},ybOverrideMuiSelect:{width:"210px",height:"32px","& .yb-MuiFormControl-root":{height:"32px !important"}},ybSearchInput:{width:"338px",marginRight:"auto",height:"32px"},ybSelectBox:{width:"180px",height:"32px"},headerBox:{display:"flex",flexDirection:"row",alignItems:"center"},headerText:{fontWeight:600,fontSize:"11.5px"},noteTextContainer:{marginTop:e.spacing(1)},noteText:{display:"flex",flexDirection:"row",alignItems:"center",gap:e.spacing(.5),fontWeight:400,fontSize:"11.5px",color:"#4E5F6D"},noteTextBold:{fontWeight:600},ghantChartContainer:{backgroundColor:"#FFFFFF"},secondRow:{display:"flex",flexDirection:"row",gap:e.spacing(1),margin:e.spacing(2,0),justifyContent:"flex-end"},ybTabs:{flex:1,flexGrow:1,"& .yb-MuiTabs-scroller":{boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[200]," !important")}},mainContainerBorder:{borderWidth:"1px 1px 0px 1px"},mainContainer:{backgroundColor:"#FFFFFF",border:"1px solid #E9EEF2",borderRadius:"8px",display:"flex",flexDirection:"column"},headerContainer:{padding:e.spacing(2),height:"64px",alignContent:"center"},loadFilterContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},metadataContainer:{padding:"0px 16px 16px 16px",display:"flex",flexDirection:"column"},tabletNodeLoadMetadataTableCell:{padding:"4px 10px"},ellipsisText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"},queryLoadMetadataTableCell:{padding:"12px 10px"},dividerStyle:{marginRight:e.spacing(2)},metricSplitSelectorBox:{gap:e.spacing(2),marginTop:e.spacing(2)},tabsContainer:{marginBottom:e.spacing(3)},metricSplitSelectorContainer:{display:"flex",flexDirection:"row",alignItems:"center",gap:e.spacing(1)}}})),Jn=function(t){var n=t.rowData,r=t.appName,o=t.onSelectedQuery,i=t.onClose;$n();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||r===exports.AppName.YBA)&&function(){i();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==o||o(s.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"/").concat(s,"?").concat(t.toString()))}(),r===exports.AppName.WEB&&function(e,t,n){i();var o=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(o,"/").concat(e).concat(l?"?".concat(l):"");window.open(d,"_blank")}(s,null==a?void 0:a.toString(),l)]})},er=t.memo((function(n){var o=n.appName;n.currentTablePage;var i=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,m=l.filter((function(e){return!u.includes(e.name)})).length>0;return e.jsxs(t.Fragment,{children:[e.jsx(r.TableRow,{className:a.tableRow,onClick:function(e){p(d!==h?h:null)},children:m&&f.map((function(t,n){return void 0!==t?e.jsx(r.TableCell,{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(Jn,{appName:o,rowData:i[h],onSelectedQuery:c,onClose:function(){return p(null)}})]})})),tr=function(e){var t=e.rowData;e.rowMeta;var n=e.appName,r=e.onClose,o=e.onSelectedQuery,i=e.isDbQueryLoadMetadata,a=void 0!==i&&i,s=e.onNavigateToUrl,l=t[0],u=t[10],c=t[16],d=t[11],p=d===exports.QueryType.SQL||d===exports.QueryType.BACKGROUND;n===exports.AppName.YBM||n===exports.AppName.YBA?function(){r();var e=null,t=new URLSearchParams(window.location.search);t.set("type",d),t.set("queryId",u),t.set("universeId",c),p?(e={queryId:u,dbId:null==l?void 0:l.toString(),universeId:c,type:d},t.set("dbId",e.dbId)):e={queryId:u,universeId:c,type:d};var n="".concat(window.location.pathname,"/").concat(u,"?").concat(t.toString());a&&(n="".concat(window.location.pathname,"/queries/").concat(u,"?").concat(t.toString())),null==o||o(u.toString(),e),null==s||s(n)}():n===exports.AppName.WEB&&function(e,t,o){r();var i=window.location.pathname,s=new URLSearchParams(window.location.search);s.set("universeId",o),s.set("type",d),p&&s.set("dbId",t),n===exports.AppName.YBA&&s.set("queryId",u);var l=s.toString(),c="".concat(i,"/").concat(e).concat(l?"?".concat(l):"");a&&(c="".concat(i,"/queries/").concat(e).concat(l?"?".concat(l):"")),window.open(c,"_blank")}(u,null==l?void 0:l.toString(),c)},nr=function(t){var n=t.name,r=t.rules,i=t.defaultValue,a=t.control,s=t.shouldUnregister,l=A(t,["name","rules","defaultValue","control","shouldUnregister"]),u=ve({name:n,rules:r,defaultValue:i,control:a,shouldUnregister:s}).field;u.ref;var c=u.value,d=A(u,["ref","value"]);return e.jsx(o.YBToggle,I({},d,{inputProps:{"data-testid":"YBToggleField-".concat(n)}},l,{checked:!!c}))},rr=function(n){var i,a,s,l,u,c,d,p,h,f,m,g=n.metricSplitSelectors,v=n.onSplitTypeSelected,y=n.anomalyData,x=0;(null===(a=null===(i=null==y?void 0:y.lastInstance)||void 0===i?void 0:i.defaultSettings)||void 0===a?void 0:a.splitMode)===bt.NONE&&(null===(l=null===(s=null==y?void 0:y.lastInstance)||void 0===s?void 0:s.defaultSettings)||void 0===l?void 0:l.splitType)===Tt.NONE&&(x=0),(null===(c=null===(u=null==y?void 0:y.lastInstance)||void 0===u?void 0:u.defaultSettings)||void 0===c?void 0:c.splitMode)!==bt.TOP&&(null===(p=null===(d=null==y?void 0:y.lastInstance)||void 0===d?void 0:d.defaultSettings)||void 0===p?void 0:p.splitMode)!==bt.BOTTOM||(x=(null===(f=null===(h=null==y?void 0:y.lastInstance)||void 0===h?void 0:h.defaultSettings)||void 0===f?void 0:f.splitType)===Tt.NODE?1:2);var _=t.useState(x),b=_[0],T=_[1],S=g.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){v(e.value),T(t)},buttonProps:{dataTestId:"MetricSplitSelector-MetricSplitButton-".concat(e.value)}}}));return e.jsx(r.Box,{display:"flex",flexDirection:"row",children:e.jsx(o.YBButtonGroup,{divider:!0,buttons:S,value:null===(m=g[b])||void 0===m?void 0:m.value,dataTestId:"MetricTypeSelector-MetricMeasureButton"})})},or=[{value:3,label:"3"},{value:5,label:"5"},{value:10,label:"10"}],ir=i.makeStyles((function(e){return{icon:{marginRight:e.spacing(1)},input:{width:"60px",height:"32px"},overrideMuiInput:{height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"}}}})),ar=function(n){var i,a=n.metricOutlierSelectors,s=n.selectedNumNodes,l=n.outlierType,u=n.onOutlierTypeSelected,c=n.onNumNodesChanged,d=n.metricMeasure,p=n.showNumNodesInput,h=void 0===p||p,f=n.showNumNodesSelector,m=void 0!==f&&f,g=ir(),v=l===bt.TOP?0:1,y=t.useState(v),x=y[0],_=y[1],b=a.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){u(e.value),_(t)},buttonProps:{dataTestId:"OutlierSelector-OutlierButton-".concat(e.value)}}}));return e.jsxs(r.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[e.jsx(r.Box,{children:e.jsx(o.YBButtonGroup,{divider:!0,buttons:b,dataTestId:"OutlierSelector-OutlierButton",value:null===(i=a[x])||void 0===i?void 0:i.value})}),h&&e.jsx(r.Box,{ml:2,children:e.jsx(o.YBInput,{type:"number",className:g.input,inputProps:{min:1},dataTestId:"OutlierSelector-NumNodesInput",value:s,onChange:function(e){return c(e.target.value)},inputMode:"numeric"})}),m&&e.jsx(r.Box,{ml:1,mr:1,children:e.jsx(o.YBSelect,{style:{width:"80px"},className:g.overrideMuiInput,dataTestId:"OutlierSelector-NumNodesSelector",value:s,onChange:function(e){return c(e.target.value)},children:or.map((function(t){return e.jsx(r.MenuItem,{value:t.value,children:t.label},t.value)}))})}),e.jsx(r.Typography,{variant:"body2",style:{marginRight:"8px"},children:gt[d]})]})};function sr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var lr=Array.isArray,ur="object"==typeof global&&global&&global.Object===Object&&global,cr="object"==typeof self&&self&&self.Object===Object&&self,dr=ur||cr||Function("return this")(),pr=dr.Symbol,hr=Object.prototype,fr=hr.hasOwnProperty,mr=hr.toString,gr=pr?pr.toStringTag:void 0;var vr=Object.prototype.toString;var yr=pr?pr.toStringTag:void 0;function xr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":yr&&yr in Object(e)?function(e){var t=fr.call(e,gr),n=e[gr];try{e[gr]=void 0;var r=!0}catch(e){}var o=mr.call(e);return r&&(t?e[gr]=n:delete e[gr]),o}(e):function(e){return vr.call(e)}(e)}function _r(e){return null!=e&&"object"==typeof e}function br(e){return"string"==typeof e||!lr(e)&&_r(e)&&"[object String]"==xr(e)}function Tr(e){return null!=e}function Sr(e){return lr(e)&&0===e.length}function wr(e){return lr(e)&&e.length>0}function Cr(e){return sr(e)&&Object.keys(e).length>0}function Er(e){return br(e)&&e.trim().length>0}function Mr(e){return br(e)&&0===e.trim().length}var Ir=Tr;function Ar(e){for(var t=0;t<e.length;t++)if(wr(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 Dr="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",Nr=i.makeStyles((function(e){return{selectBox:{minWidth:"300px"},menuItem:{marginTop:e.spacing(.5)},regularText:{color:e.palette.grey[600],marginTop:e.spacing(.5),marginBottom:e.spacing(.5)},overrideMuiInput:{height:"32px","& .MuiMenu-list":{maxHeight:"400px"},"& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiInputBase-root":{width:"300px",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px"}},icon:{marginRight:e.spacing(1)}}})),Or="All Zones and Nodes",Br=function(t){var n=t.selectedItem,i=t.primaryZoneToNodesMap,a=t.asyncZoneToNodesMap,s=t.onZoneNodeSelected,l=Nr();return e.jsx(o.YBSelect,{className:T(l.selectBox,l.overrideMuiInput),dataTestId:"YBZoneNodeSelector-Zone",value:n,children:function(t,n){var o=[];o.push(e.jsx(r.MenuItem,{value:Or,onClick:function(e){s(!1,!1,Or)},children:Or},Or)),o.push(e.jsx(r.Divider,{},"divider-all-zones"));for(var i=t.values(),a=i.next(),u=function(){var t=a.value,n=t.zoneName,u=t.nodeNames;n&&o.push(e.jsx(r.MenuItem,{value:n,onClick:function(e){s(!0,!1,n)},className:l.menuItem,children:n},n)),wr(u)&&u.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"primary-".concat(n,"-").concat(t)))})),a=i.next()};Cr(a.value);)u();if((null==n?void 0:n.size)>0){o.push(e.jsx(r.Divider,{},"divider-async-zones"));for(var c=n.values(),d=c.next(),p=function(){var t=d.value,n=t.zoneName,i=t.nodeNames;n&&o.push(e.jsx(r.MenuItem,{value:n,onClick:function(e){s(!0,!1,n)},children:n},n)),wr(i)&&i.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"async-".concat(n,"-").concat(t)))})),d=c.next()};Cr(d.value);)p()}return o}(i,a)})},Lr=i.makeStyles((function(e){return{selectBox:{minWidth:"300px"},menuItem:{marginTop:e.spacing(.5)},regularText:{color:e.palette.grey[600],marginTop:e.spacing(.5),marginBottom:e.spacing(.5)},overrideMuiInput:{height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiInputBase-root":{minWidth:"300px",borderTopRightRadius:"0px",borderBottomRightRadius:"0px"}},icon:{marginRight:e.spacing(1)}}})),Rr=function(t){var n=t.selectedItem,i=t.primaryClusterToRegionMap,a=t.asyncClusterToRegionMap,s=t.onClusterRegionSelected,l=Lr();return e.jsx(o.YBSelect,{className:T(l.selectBox,l.overrideMuiInput),dataTestId:"cluster-region-select",value:n,children:i.size>0&&function(t,n){var o=[];o.push(e.jsx(r.MenuItem,{value:Ht,onClick:function(e){s(!1,!1,Ht,!1)},children:Ht},Ht)),o.push(e.jsx(r.Divider,{},"divider-all-regions"));var i=t.values().next().value,a=i.cluster,u=i.regions,c=i.uuid;if(Er(a)&&o.push(e.jsx(r.MenuItem,{value:c,onClick:function(e){s(!0,!1,c,!0)},className:l.menuItem,children:a},c)),wr(u)&&u.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t,!0)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"primary-".concat(c,"-").concat(t)))})),(null==n?void 0:n.size)>0){o.push(e.jsx(r.Divider,{},"divider-async-regions"));var d=n.values().next().value,p=d.cluster,h=d.regions,f=d.uuid;Er(p)&&o.push(e.jsx(r.MenuItem,{value:f,onClick:function(e){s(!0,!1,f,!0)},children:p},f)),wr(h)&&h.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t,!0)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"async-".concat(f,"-").concat(t)))}))}return o}(i,a)})},kr=function(t){var n=t.name,r=t.rules,i=t.defaultValue,a=t.control,s=t.shouldUnregister,l=A(t,["name","rules","defaultValue","control","shouldUnregister"]),u=ve({name:n,rules:r,defaultValue:i,control:a,shouldUnregister:s}).field;return e.jsx(o.YBCheckbox,I({name:u.name,inputRef:u.ref,checked:!!u.value,onBlur:u.onBlur,onChange:u.onChange},l))},Pr=o.yba.ybaTheme,jr=function(t){var n=t.children,r=t.appName;return e.jsx(o.YBThemeProvider,{theme:r===exports.AppName.YBM?o.coreTheme:Pr,children:n})};function Fr(e){return Fr="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},Fr(e)}function Ur(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 Hr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function zr(e){Hr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Fr(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 Wr={};function Vr(){return Wr}function Yr(e){if(Hr(1,arguments),!function(e){return Hr(1,arguments),e instanceof Date||"object"===Fr(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=zr(e);return!isNaN(Number(t))}var Gr={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function qr(e,t,n){Hr(2,arguments);var r,o=function(e,t){return Hr(2,arguments),zr(e).getTime()-zr(t).getTime()}(e,t)/36e5;return((r=null==n?void 0:n.roundingMethod)?Gr[r]:Gr.trunc)(o)}function Qr(e,t){return Hr(2,arguments),function(e,t){Hr(2,arguments);var n=zr(e).getTime(),r=Ur(t);return new Date(n+r)}(e,-Ur(t))}function Zr(e){Hr(1,arguments);var t=zr(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 Xr(e){Hr(1,arguments);var t=zr(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Zr(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=Zr(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Kr(e){Hr(1,arguments);var t=zr(e),n=Zr(t).getTime()-function(e){Hr(1,arguments);var t=Xr(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Zr(n)}(t).getTime();return Math.round(n/6048e5)+1}function $r(e,t){var n,r,o,i,a,s,l,u;Hr(1,arguments);var c=Vr(),d=Ur(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o: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=zr(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 Jr(e,t){var n,r,o,i,a,s,l,u;Hr(1,arguments);var c=zr(e),d=c.getUTCFullYear(),p=Vr(),h=Ur(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o: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 m=$r(f,t),g=new Date(0);g.setUTCFullYear(d,0,h),g.setUTCHours(0,0,0,0);var v=$r(g,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=v.getTime()?d:d-1}function eo(e,t){Hr(1,arguments);var n=zr(e),r=$r(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,u;Hr(1,arguments);var c=Vr(),d=Ur(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o: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=Jr(e,t),h=new Date(0);return h.setUTCFullYear(p,0,d),h.setUTCHours(0,0,0,0),$r(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function to(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var no={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return to("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):to(n+1,2)},d:function(e,t){return to(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 to(e.getUTCHours()%12||12,t.length)},H:function(e,t){return to(e.getUTCHours(),t.length)},m:function(e,t){return to(e.getUTCMinutes(),t.length)},s:function(e,t){return to(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return to(Math.floor(r*Math.pow(10,n-3)),t.length)}},ro="midnight",oo="noon",io="morning",ao="afternoon",so="evening",lo="night",uo={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(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return no.y(e,t)},Y:function(e,t,n,r){var o=Jr(e,r),i=o>0?o:1-o;return"YY"===t?to(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):to(i,t.length)},R:function(e,t){return to(Xr(e),t.length)},u:function(e,t){return to(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 to(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 to(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 no.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 to(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 o=eo(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):to(o,t.length)},I:function(e,t,n){var r=Kr(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):to(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):no.d(e,t)},D:function(e,t,n){var r=function(e){Hr(1,arguments);var t=zr(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"}):to(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 o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return to(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return to(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return to(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){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,o=e.getUTCHours();switch(r=12===o?oo:0===o?ro:o/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,o=e.getUTCHours();switch(r=o>=17?so:o>=12?ao:o>=4?io:lo,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 no.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):no.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):to(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):to(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):no.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):no.s(e,t)},S:function(e,t){return no.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return po(o);case"XXXX":case"XX":return ho(o);default:return ho(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return po(o);case"xxxx":case"xx":return ho(o);default:return ho(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+co(o,":");default:return"GMT"+ho(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+co(o,":");default:return"GMT"+ho(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return to(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return to((r._originalDate||e).getTime(),t.length)}};function co(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+to(i,2)}function po(e,t){return e%60==0?(e>0?"-":"+")+to(Math.abs(e)/60,2):ho(e,t)}function ho(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+to(Math.floor(o/60),2)+n+to(o%60,2)}var fo=uo,mo=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"})}},go=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"})}},vo={p:go,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return mo(e,t);switch(o){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}}",mo(o,t)).replace("{{time}}",go(i,t))}},yo=vo,xo=["D","DD"],_o=["YY","YYYY"];function bo(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 To={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"}},So=function(e,t,n){var r,o=To[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wo(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 Co={date:wo({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:wo({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:wo({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Eo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Mo(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}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]}}function Io(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[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 Ao,Do={code:"en-US",formatDistance:So,formatLong:Co,formatRelative:function(e,t,n,r){return Eo[e]},localize:{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:Mo({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Mo({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:Mo({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:Mo({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:Mo({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Ao={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(Ao.matchPattern);if(!n)return null;var r=n[0],o=e.match(Ao.parsePattern);if(!o)return null;var i=Ao.valueCallback?Ao.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:Io({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:Io({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:Io({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:Io({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:Io({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},No=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Oo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bo=/^'([^]*?)'?$/,Lo=/''/g,Ro=/[a-zA-Z]/;function ko(e,t,n){var r,o,i,a,s,l,u,c,d,p,h,f,m,g,v,y,x,_;Hr(2,arguments);var b=String(t),T=Vr(),S=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:T.locale)&&void 0!==r?r:Do,w=Ur(null!==(i=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:T.firstWeekContainsDate)&&void 0!==a?a:null===(d=T.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ur(null!==(h=null!==(f=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:T.weekStartsOn)&&void 0!==f?f:null===(x=T.locale)||void 0===x||null===(_=x.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==h?h:0);if(!(C>=0&&C<=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 E=zr(e);if(!Yr(E))throw new RangeError("Invalid time value");var M=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),I=Qr(E,M),A={firstWeekContainsDate:w,weekStartsOn:C,locale:S,_originalDate:E};return b.match(Oo).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,yo[t])(e,S.formatLong):e})).join("").match(No).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(Bo);if(!t)return e;return t[1].replace(Lo,"'")}(r);var i,a=fo[o];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(i=r,-1===_o.indexOf(i))||bo(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==xo.indexOf(e)}(r)||bo(r,t,String(e)),a(I,r,S.localize,A);if(o.match(Ro))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}var Po=function(e){var t,n,r=new Map,o=new Map,i=new Map,a=new Map,s=new Map,l=null==e?void 0:e.nodeDetails;if(l){var u=null===(t=l.find((function(e){return"PRIMARY"===e.clusterType})))||void 0===t?void 0:t.clusterId,c=null===(n=l.find((function(e){return"ASYNC"===e.clusterType})))||void 0===n?void 0:n.clusterId,d=l.filter((function(e){return"PRIMARY"===e.clusterType})),p=new Set(d.map((function(e){return e.region}))),h=l.filter((function(e){return"ASYNC"===e.clusterType})),f=new Set(h.map((function(e){return e.region})));r.set("Primary",{cluster:"Primary",regions:Array.from(p),uuid:u}),c&&o.set("Async",{cluster:"Read Replica",regions:Array.from(f),uuid:c});for(var m=function(e){s.set(e.id.name,{nodeName:e.id.name,ip:e.privateIp}),e.clusterId===u?i.set(e.az,{zoneName:e.az,nodeNames:d.filter((function(t){return t.az===e.az})).map((function(e){return e.id.name})),isReadReplica:!1,regionName:e.region}):e.clusterId===c&&a.set(e.az,{zoneName:e.az,nodeNames:h.filter((function(t){return t.az===e.az})).map((function(e){return e.id.name})),isReadReplica:!0,regionName:e.region})},g=0,v=l;g<v.length;g++){m(v[g])}}return{primaryZoneMapping:i,asyncZoneMapping:a,primaryClusterMapping:r,asyncClusterMapping:o,nodeIPMapping:s}},jo=function(e){var t,n,r,o,i,a,s,l,u,c,d,p,h,f,m;return{dbId:null===(r=null===(n=null===(t=null==e?void 0:e.mainGraphs[0])||void 0===t?void 0:t.filters)||void 0===n?void 0:n.dbId)||void 0===r?void 0:r[0],queryId:null===(a=null===(i=null===(o=null==e?void 0:e.mainGraphs[0])||void 0===o?void 0:o.filters)||void 0===i?void 0:i.queryId)||void 0===a?void 0:a[0],tabletId:null===(u=null===(l=null===(s=null==e?void 0:e.mainGraphs[0])||void 0===s?void 0:s.filters)||void 0===l?void 0:l.tabletId)||void 0===u?void 0:u[0],tableName:null===(p=null===(d=null===(c=null==e?void 0:e.mainGraphs[0])||void 0===c?void 0:c.filters)||void 0===d?void 0:d.tableName)||void 0===p?void 0:p[0],dbName:null===(m=null===(f=null===(h=null==e?void 0:e.mainGraphs[0])||void 0===h?void 0:h.filters)||void 0===f?void 0:f.dbName)||void 0===m?void 0:m[0]}},Fo=function(e){var t,n,r,o,i,a,s,l,u,c,d,p,h,f,m,g,v,y,x,_,b,T,S,w,C,E,M;return{dbId:null===(o=null===(r=null===(n=null===(t=null==e?void 0:e.lastInstance)||void 0===t?void 0:t.mainGraphs[0])||void 0===n?void 0:n.filters)||void 0===r?void 0:r.dbId)||void 0===o?void 0:o[0],queryId:null===(l=null===(s=null===(a=null===(i=null==e?void 0:e.lastInstance)||void 0===i?void 0:i.mainGraphs[0])||void 0===a?void 0:a.filters)||void 0===s?void 0:s.queryId)||void 0===l?void 0:l[0],tabletId:null===(p=null===(d=null===(c=null===(u=null==e?void 0:e.lastInstance)||void 0===u?void 0:u.mainGraphs[0])||void 0===c?void 0:c.filters)||void 0===d?void 0:d.tabletId)||void 0===p?void 0:p[0],tableName:null===(g=null===(m=null===(f=null===(h=null==e?void 0:e.lastInstance)||void 0===h?void 0:h.mainGraphs[0])||void 0===f?void 0:f.filters)||void 0===m?void 0:m.tableName)||void 0===g?void 0:g[0],dbName:null===(_=null===(x=null===(y=null===(v=null==e?void 0:e.lastInstance)||void 0===v?void 0:v.mainGraphs[0])||void 0===y?void 0:y.filters)||void 0===x?void 0:x.dbName)||void 0===_?void 0:_[0],schemaName:null!==(S=null===(T=null===(b=null==e?void 0:e.lastInstance)||void 0===b?void 0:b.entityLabels)||void 0===T?void 0:T.schemaName)&&void 0!==S?S:null===(M=null===(E=null===(C=null===(w=null==e?void 0:e.lastInstance)||void 0===w?void 0:w.mainGraphs[0])||void 0===C?void 0:C.filters)||void 0===E?void 0:E.schemaName)||void 0===M?void 0:M[0]}},Uo=function(e,t,n){var r,o,i,a,s,l,u=new Set,c={},d=null===(i=null===(o=null===(r=e.layout)||void 0===r?void 0:r.metadata)||void 0===o?void 0:o.currentGroupBy)||void 0===i?void 0:i[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,o;return t.name===e.name&&(null===(o=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===o?void 0:o[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),Sr(null==p?void 0:p.groupBy)&&u.sort((function(e,t){return e===c.name?-1:t===c.name?1:0})),u},Ho=function(e,t,n,r,o,i){var a,s;void 0===i&&(i=!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)===Vt&&Cr(t)&&c&&n===exports.GraphType.MULTI_SUPPORTING?r?Uo(t,o,i):Array.from(u):i?Uo(t,o,i):Array.from(u),c&&Cr(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)===Vt&&Cr(t)&&(l=r?Uo(t,o,i):Array.from(new Set)),{uniqueOperations:l,groupByOperations:u}},zo=function(e,t){Er(null==t?void 0:t.cluster)&&(null==t?void 0:t.cluster)!==zt?e.clusterUuid=[null==t?void 0:t.cluster]:delete e.clusterUuid,Er(null==t?void 0:t.region)&&(null==t?void 0:t.region)!==zt?e.regionCode=[null==t?void 0:t.region]:delete e.regionCode,Er(null==t?void 0:t.zone)&&(null==t?void 0:t.zone)!==zt?e.azCode=[null==t?void 0:t.zone]:delete e.azCode,Er(null==t?void 0:t.node)&&(null==t?void 0:t.node)!==zt?e.instanceName=[null==t?void 0:t.node]:delete e.instanceName},Wo=function(e,t,n,r,o,i,a){var s,l,u,c,d=[];if(t){var p=r.metricMeasure===exports.MetricMeasure.OUTLIER_TABLES,h=r.metricMeasure===exports.MetricMeasure.OUTLIER_DB,f=p||h?p?In[n]:An[n]:Mn[n],m=sessionStorage.getItem(p||h?p?kn:Pn:Rn),g=m?JSON.parse(m):{},v=p||h?p?null===(s=Dn.find((function(e){return e.name===f})))||void 0===s?void 0:s.metrics:null===(l=Nn.find((function(e){return e.name===f})))||void 0===l?void 0:l.metrics:null===(u=On.find((function(e){return e.name===f})))||void 0===u?void 0:u.metrics,y=null!==(c=null==v?void 0:v.filter((function(e){return g[e]})))&&void 0!==c?c:[];return null==y?void 0:y.map((function(e){var t={universeUuid:[null==r?void 0:r.universeUuid]};zo(t,r);var n=Tt.NONE;return(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?n=Tt.NODE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_TABLES?n=Tt.TABLE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_DB&&(n=Tt.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?bt.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:wt.AVERAGE}}}))}if(!e)return null==o||o.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,zo(n,r),t.returnAggregatedValue=(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,t.splitType=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Tt.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Tt.NODE:Tt.TABLE,t.splitMode=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?bt.NONE:null==r?void 0:r.outlierType,t.splitCount=null==r?void 0:r.numNodes,t})),o;if(e){var x=(null==i?void 0:i.type)===exports.QueryType.SQL||(null==i?void 0:i.type)===exports.QueryType.BACKGROUND,_=rn;(null==i?void 0:i.type)===exports.QueryType.CQL?_=on:(null==i?void 0:i.type)===exports.QueryType.BACKGROUND&&(_=O([],an,!0),"5"!==i.queryId||_.includes(sn)||_.push(sn)),_.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==i?void 0:i.universeId)&&void 0!==t?t:""]},settings:{splitMode:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?bt.NONE:null==r?void 0:r.outlierType,splitType:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Tt.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Tt.NODE:Tt.TABLE,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,aggregatedValueFunction:wt.AVERAGE}};zo(n.filters,r),a?(Fo(a).dbId&&(n.filters.dbId=[Fo(a).dbId]),Fo(a).queryId&&(n.filters.queryId=[Fo(a).queryId])):((null==i?void 0:i.type)===exports.QueryType.SQL&&(null==i?void 0:i.userId)&&(n.filters.userId=[i.userId]),(null==i?void 0:i.queryId)&&(n.filters.queryId=[i.queryId]),x&&(null==i?void 0:i.dbId)&&(n.filters.dbId=[i.dbId])),e.startsWith("active_session_history")&&(n.groupBy=[exports.WaitEventClassification.WAIT_EVENT_TYPE]),d.push(n)}))}return d},Vo=function(e,t){var n=120;if(Er(e)||Er(t)){var r=new Date(e),o=qr(new Date(t),r);5===o?n=180:o>5&&o<=23?n=600:o>23&&o<=47?n=1e3:o>47&&o<=167?n=2200:o>=167&&(n=4200)}return n},Yo=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],o=e[n];new Date(r.endTime)>=new Date(o.startTime)?r.endTime=new Date(Math.max(new Date(r.endTime).getTime(),new Date(o.endTime).getTime())).toISOString():t.push(o)}return t},Go=function(e){return e.length>35?"...".concat(e.substring(20,e.length)):e},qo=function(e,t){var n=Go(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:10px;\n height:10px;\n background-color:'.concat(e,';\n "></span><span style="color:#4E5F6D;">').concat(n,"</span></span>")},Qo=function(e){return'<span style="\n text-align:right;\n font-variant-numeric: tabular-nums; /* nicer alignment */\n white-space:nowrap;\n color:#4E5F6D;\n ">'.concat(e,"</span>")},Zo=function(e,t){var n=t,r=new Date;return e===gn.SEVEN_DAYS?r.setDate(r.getDate()-7):e===gn.TWO_DAYS?r.setDate(r.getDate()-2):e===gn.ONE_DAY?r.setDate(r.getDate()-1):e===gn.SIX_HOURS?r.setHours(r.getHours()-6):e===gn.ONE_HOUR&&r.setHours(r.getHours()-1),{formattedStartDate:r,formattedEndDate:n}},Xo=function(e,t,n){if(e&&e!==gn.CUSTOM){var r=Zo(e,t);return{startDateTime:r.formattedStartDate,endDateTime:r.formattedEndDate}}return{startDateTime:n,endDateTime:t}},Ko=function(e){return null==e?void 0:e.map((function(e){var t,n,r,o,i,a;return{databaseId:null!==(t=e.databaseId)&&void 0!==t?t:"",eps:e.eps,events:e.events,firstActive:null!==(n=e.firstActive)&&void 0!==n?n:"",lastActive:null!==(r=e.lastActive)&&void 0!==r?r:"",latencyAvg:e.latencyAvg,latencyP90:e.latencyP90,latencyP99:e.latencyP99,namespaceName:e.namespaceName,query:e.query,queryId:null!==(o=e.queryId)&&void 0!==o?o:"",queryType:null!==(i=e.queryType)&&void 0!==i?i:"",rowsAvg:e.rowsAvg,rps:e.rps,totalEpsRatio:e.totalEpsRatio,totalTime:e.totalTime,universeId:null!==(a=e.universeId)&&void 0!==a?a:""}}))},$o=function(e,t){return void 0===t&&(t=!1),null==e?void 0:e.map((function(e){var n,r,o,i,a,s,l,u,c,d,p,h,f,m,g,v,y,x,_,b,T;return t?{tabletId:null!==(n=e.tabletId)&&void 0!==n?n:"",sstSize:null!==(r=e.sstSize)&&void 0!==r?r:"",size:null!==(o=e.size)&&void 0!==o?o:"",walSize:null!==(i=e.walSize)&&void 0!==i?i:"",leaderNode:null!==(a=e.leaderNode)&&void 0!==a?a:"",followerNodes:null!==(s=e.followerNodes)&&void 0!==s?s:[],partition:null!==(l=e.partition)&&void 0!==l?l:"",eps:null!==(u=e.eps)&&void 0!==u?u:0,totalEpsRatio:null!==(c=e.totalEpsRatio)&&void 0!==c?c:0,databaseType:null!==(d=e.databaseType)&&void 0!==d?d:"",events:null!==(p=e.events)&&void 0!==p?p:[]}:{databaseName:null!==(h=e.databaseName)&&void 0!==h?h:"",databaseType:null!==(f=e.databaseType)&&void 0!==f?f:"",eps:null!==(m=e.eps)&&void 0!==m?m:0,events:null!==(g=e.events)&&void 0!==g?g:[],partition:null!==(v=e.partition)&&void 0!==v?v:"",schemaName:null!==(y=e.schemaName)&&void 0!==y?y:"",tableName:null!==(x=e.tableName)&&void 0!==x?x:"",tabletId:null!==(_=e.tabletId)&&void 0!==_?_:"",universeId:null!==(b=e.universeId)&&void 0!==b?b:"",totalEpsRatio:null!==(T=e.totalEpsRatio)&&void 0!==T?T:0}}))},Jo=function(e){if(Number.isInteger(e)){var t=e,n=["B","KB","MB","GB","TB","PB","EB"];if(t<=0)return t+" "+n[0];var r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(2))+" "+n[r]}return"-"},ei=function(e,t){var n=null!=e?e:"";return n.length>t?"".concat(n.substring(0,t),"..."):n},ti=function(e,t,n){return e?e.length<=n?e:t===exports.AnomalyCategory.APP||t===exports.AnomalyCategory.NODE?"...".concat(e.slice(-n)):"".concat(e.substring(0,n),"..."):"-"},ni=function(e,t,n,r){var o;if(o=r.currentTab===exports.InsightsTabs.INSIGHTS?exports.InsightsTabs.INSIGHTS:r.currentTab===exports.InsightsTabs.CLUSTER_LOAD?n?r.clusterLoadOverallSubTab===exports.ClusterLoadOverallTabs.QUERIES?exports.ClusterLoadOverallTabs.QUERIES:exports.ClusterLoadOverallTabs.ANOMALIES:"Anomaly":exports.ClusterLoadOverallTabs.ANOMALIES,e&&r.currentTab!==exports.InsightsTabs.INSIGHTS){if(t){var i=String(t),a=i.charAt(0).toUpperCase()+i.slice(1).toLowerCase();return t===exports.AnomalyCategory.DB?"Tablet ".concat(o):"".concat(a," ").concat(o)}return"Unknown ".concat(o)}return o},ri=function(e){var t,n,r=e.anomalyData,o=e.entityDisplayName,i=e.queryText,a=e.maxLength,s=void 0===a?30:a;return(null===(t=null==r?void 0:r.lastInstance)||void 0===t?void 0:t.category)===exports.AnomalyCategory.APP||(null===(n=null==r?void 0:r.lastInstance)||void 0===n?void 0:n.category)===exports.AnomalyCategory.NODE?function(e,t){var n=null!=e?e:"";return n.length>t?"...".concat(n.substring(n.length-t+3)):n}(o,s):ei(r?o:i,s)},oi=function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search).get("tab"),r=exports.InsightsTabs.CLUSTER_LOAD,o=exports.ClusterLoadSubTabs.OVERALL_LOAD,i=exports.ClusterLoadOverallTabs.QUERIES;if(t.includes("/".concat(jt.METRICS))||n===jt.METRICS)r=exports.InsightsTabs.METRICS;else if(t.includes("/".concat(jt.INSIGHTS))||n===jt.INSIGHTS)r=exports.InsightsTabs.INSIGHTS;else if(t.includes("/".concat(jt.CLUSTER_LOAD))||n===jt.CLUSTER_LOAD){if(r=exports.InsightsTabs.CLUSTER_LOAD,t.includes("/".concat(jt.CLUSTER_LOAD_DB)))o=exports.ClusterLoadSubTabs.LOAD_BY_DATABASE;else o=exports.ClusterLoadSubTabs.OVERALL_LOAD,i=t.includes("/".concat(jt.CLUSTER_LOAD,"/").concat(jt.OVERALL_LOAD,"/").concat(jt.ANOMALIES))?exports.ClusterLoadOverallTabs.ANOMALIES:exports.ClusterLoadOverallTabs.QUERIES}return{currentTab:r,clusterLoadSubTab:o,clusterLoadOverallSubTab:i}},ii=function(e,t,n,r,o){void 0===o&&(o=!1);var i=function(e,t,n){var r=window.location.pathname,o=new URLSearchParams(window.location.search).toString();if(r=r.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),e===exports.InsightsTabs.METRICS)r="".concat(r,"/").concat(jt.METRICS);else if(e===exports.InsightsTabs.INSIGHTS)r="".concat(r,"/").concat(jt.INSIGHTS);else if(e===exports.InsightsTabs.CLUSTER_LOAD)if(t===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE)r="".concat(r,"/").concat(jt.CLUSTER_LOAD,"/").concat(jt.CLUSTER_LOAD_DB);else{var i=n===exports.ClusterLoadOverallTabs.QUERIES?jt.QUERIES:jt.ANOMALIES;r="".concat(r,"/").concat(jt.CLUSTER_LOAD,"/").concat(jt.OVERALL_LOAD,"/").concat(i)}return"".concat(r).concat(o?"?".concat(o):"")}(t,n,r),a=new URLSearchParams(window.location.search).toString();i!==window.location.pathname+(a?"?".concat(a):"")&&(o?window.history.pushState(null,"",i):window.history.replaceState(null,"",i))},ai=function(e,t){void 0===t&&(t=!1);var n=window.location.href,r=n.substring(0,n.lastIndexOf("/")),o=new URLSearchParams(window.location.search),i=o.get("duration"),a=o.get("startTime"),s=o.get("endTime"),l=o.get("dbId"),u=o.get("userId"),c=o.get("universeId"),d=o.get("type"),p=o.get("tab");o.get("queryId");var h=new URLSearchParams;Er(i)&&h.append("duration",i),Er(a)&&h.append("startTime",a),Er(s)&&h.append("endTime",s),Er(l)&&h.delete("dbId",l),Er(u)&&h.delete("userId",u),Er(c)&&h.delete("universeId",c),Er(d)&&h.delete("type",d),e===exports.AppName.YBA&&Er(p)&&h.append("tab",p);var f=r;if(t&&(f=f.replace("/queries","")),f.includes("dbLoad/")){var m=f.lastIndexOf("/");if(-1!==m){var g=f.substring(0,m);g.endsWith("dbLoad")&&(f=g)}}return"".concat(f).concat(h.toString()?"?".concat(h.toString()):"")},si=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=new URL(window.location.href);if(e){["universeId","queryId","dbId","userId","type"].forEach((function(e){return r.searchParams.delete(e)}))}if(!t){var o=r.pathname;if(n){var i=o.indexOf("/".concat(jt.ANOMALIES,"/"));-1!==i&&(r.pathname=o.substring(0,i+"/".concat(jt.ANOMALIES).length))}else{var a=o.lastIndexOf("/");a>0&&(r.pathname=o.substring(0,a))}}return r},li=function(e,t,n,r){var o,i;if(e===exports.AppName.YBM||e===exports.AppName.YBA){null==n||n(null!==(i=null===(o=null==t?void 0:t.lastInstance)||void 0===o?void 0:o.uuid)&&void 0!==i?i:null);var a=function(){var e=new URL(window.location.href);["universeId","queryId","dbId","userId","type"].forEach((function(t){return e.searchParams.delete(t)}));var t=e.pathname;if(t.includes("/queries/")){var n=t.indexOf("/queries/");e.pathname=t.substring(0,n)}return e}();r?r(a.pathname+a.search):window.history.pushState({},"",a.toString())}else{var s=ai(e,!0);window.location.href=s}},ui=function(e,t,n,r,o,i){return void 0===i&&(i="query_drilldown_click"),[{timestamp:(new Date).valueOf(),category:"UI",type:"click",payload:{appName:e,cluster_id:o,key:t,source:i,start_time:n,end_time:r}}]},ci="data:image/svg+xml,%3csvg width='13' height='14' viewBox='0 0 13 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.11094 3.11172V3.88945H1.94434C1.30004 3.88945 0.777735 4.41176 0.777735 5.05605V12.0557C0.777735 12.7 1.30004 13.2223 1.94434 13.2223H7.38848C8.03278 13.2223 8.55508 12.7 8.55508 12.0557V10.8891H9.33282V12.0557C9.33282 13.1295 8.46231 14 7.38848 14H1.94434C0.870509 14 0 13.1295 0 12.0557V5.05605C0 3.98223 0.870509 3.11172 1.94434 3.11172H3.11094ZM9.33333 0.778528H5.05579C4.4115 0.778528 3.88919 1.30083 3.88919 1.94513V8.94474C3.88919 9.58904 4.4115 10.1113 5.05579 10.1113H10.4999C11.1442 10.1113 11.6665 9.58904 11.6665 8.94474V3.11173H9.7222C9.50744 3.11173 9.33333 2.93763 9.33333 2.72286V0.778528ZM12.4436 2.74461V8.94473C12.4436 10.0186 11.5731 10.8891 10.4993 10.8891H5.05514C3.98132 10.8891 3.11081 10.0186 3.11081 8.94473V1.94512C3.11081 0.871289 3.98132 0.000779584 5.05514 0.000779584H9.69979C9.80303 -0.00576853 9.9105 0.0286532 9.99652 0.114676L12.3297 2.44788C12.4157 2.5339 12.4502 2.64137 12.4436 2.74461ZM10.1108 2.33401H11.1163L10.1108 1.32848V2.33401ZM5.83301 7.77813C5.61824 7.77813 5.44414 7.60403 5.44414 7.38926C5.44414 7.1745 5.61824 7.0004 5.83301 7.0004H7.38848C7.60324 7.0004 7.77734 7.1745 7.77734 7.38926C7.77734 7.60403 7.60324 7.77813 7.38848 7.77813H5.83301ZM5.83301 6.22267C5.61824 6.22267 5.44414 6.04857 5.44414 5.8338C5.44414 5.61904 5.61824 5.44494 5.83301 5.44494H9.72168C9.93645 5.44494 10.1105 5.61904 10.1105 5.8338C10.1105 6.04857 9.93645 6.22267 9.72168 6.22267H5.83301ZM5.83301 4.66718C5.61824 4.66718 5.44414 4.49308 5.44414 4.27832C5.44414 4.06355 5.61824 3.88945 5.83301 3.88945H9.72168C9.93645 3.88945 10.1105 4.06355 10.1105 4.27832C10.1105 4.49308 9.93645 4.66718 9.72168 4.66718H5.83301Z' fill='%232B59C3'/%3e%3c/svg%3e";function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pi={exports:{}},hi=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},fi=hi,mi=Object.prototype.toString;function gi(e){return"[object Array]"===mi.call(e)}function vi(e){return void 0===e}function yi(e){return null!==e&&"object"==typeof e}function xi(e){if("[object Object]"!==mi.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function _i(e){return"[object Function]"===mi.call(e)}function bi(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),gi(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var Ti={isArray:gi,isArrayBuffer:function(e){return"[object ArrayBuffer]"===mi.call(e)},isBuffer:function(e){return null!==e&&!vi(e)&&null!==e.constructor&&!vi(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:yi,isPlainObject:xi,isUndefined:vi,isDate:function(e){return"[object Date]"===mi.call(e)},isFile:function(e){return"[object File]"===mi.call(e)},isBlob:function(e){return"[object Blob]"===mi.call(e)},isFunction:_i,isStream:function(e){return yi(e)&&_i(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:bi,merge:function e(){var t={};function n(n,r){xi(t[r])&&xi(n)?t[r]=e(t[r],n):xi(n)?t[r]=e({},n):gi(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)bi(arguments[r],n);return t},extend:function(e,t,n){return bi(t,(function(t,r){e[r]=n&&"function"==typeof t?fi(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},Si=Ti;function wi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ci=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(Si.isURLSearchParams(t))r=t.toString();else{var o=[];Si.forEach(t,(function(e,t){null!=e&&(Si.isArray(e)?t+="[]":e=[e],Si.forEach(e,(function(e){Si.isDate(e)?e=e.toISOString():Si.isObject(e)&&(e=JSON.stringify(e)),o.push(wi(t)+"="+wi(e))})))})),r=o.join("&")}if(r){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},Ei=Ti;function Mi(){this.handlers=[]}Mi.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},Mi.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Mi.prototype.forEach=function(e){Ei.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var Ii,Ai,Di,Ni,Oi,Bi,Li,Ri,ki,Pi,ji,Fi,Ui,Hi,zi,Wi,Vi,Yi,Gi=Mi,qi=Ti,Qi=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function Zi(){if(Ai)return Ii;Ai=1;var e=Qi;return Ii=function(t,n,r,o,i){var a=new Error(t);return e(a,n,r,o,i)}}function Xi(){if(Ni)return Di;Ni=1;var e=Zi();return Di=function(t,n,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function Ki(){if(Bi)return Oi;Bi=1;var e=Ti;return Oi=e.isStandardBrowserEnv()?{write:function(t,n,r,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(o)&&s.push("path="+o),e.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Oi}function $i(){return Ri?Li:(Ri=1,Li=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function Ji(){return Pi?ki:(Pi=1,ki=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function ea(){if(Fi)return ji;Fi=1;var e=$i(),t=Ji();return ji=function(n,r){return n&&!e(r)?t(n,r):r}}function ta(){if(Hi)return Ui;Hi=1;var e=Ti,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Ui=function(n){var r,o,i,a={};return n?(e.forEach(n.split("\n"),(function(n){if(i=n.indexOf(":"),r=e.trim(n.substr(0,i)).toLowerCase(),o=e.trim(n.substr(i+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([o]):a[r]?a[r]+", "+o:o}})),a):a}}function na(){if(Wi)return zi;Wi=1;var e=Ti;return zi=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(n){var r=e.isString(n)?o(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var ra,oa,ia,aa,sa,la={exports:{}},ua={exports:{}},ca={exports:{}};function da(){if(oa)return ra;oa=1;var e=1e3,t=60*e,n=60*t,r=24*n,o=7*r,i=365.25*r;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}return ra=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(o){var i=Math.abs(o);if(i>=r)return a(o,i,r,"day");if(i>=n)return a(o,i,n,"hour");if(i>=t)return a(o,i,t,"minute");if(i>=e)return a(o,i,e,"second");return o+" ms"}(s):function(o){var i=Math.abs(o);if(i>=r)return Math.round(o/r)+"d";if(i>=n)return Math.round(o/n)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},ra}function pa(){if(aa)return ia;return aa=1,ia=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=da(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},ia}var ha,fa,ma,ga,va,ya,xa,_a,ba,Ta={exports:{}};function Sa(){return fa?ha:(fa=1,ha=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)})}function wa(){return va||(va=1,function(e,t){const n=d,r=p;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${r} [0m`;n[0]=i+n[0].split("\n").join("\n"+i),n.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(ga)return ma;ga=1;const e=h,t=d,n=Sa(),{env:r}=process;let o;function i(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,i){if(0===o)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!i&&void 0===o)return 0;const a=o||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?o=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(o=1),"FORCE_COLOR"in r&&(o="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),ma={supportsColor:function(e){return i(a(e,e&&e.isTTY))},stdout:i(a(!0,t.isatty(1))),stderr:i(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=pa()(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Ta,Ta.exports)),Ta.exports}function Ca(){return ya||(ya=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?ua.exports=(sa||(sa=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=pa()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ca,ca.exports)),ca.exports):ua.exports=wa()),ua.exports}function Ea(){if(ba)return la.exports;ba=1;var e,t,n,r=l,o=r.URL,i=a,d=s,p=u.Writable,h=c,f=function(){return _a||(_a=1,xa=function(){if(!e){try{e=Ca()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),xa;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=R(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var m=!1;try{h(new o(""))}catch(e){m="ERR_INVALID_URL"===e.code}var g=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],v=["abort","aborted","connect","error","socket","timeout"],y=Object.create(null);v.forEach((function(e){y[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var x=O("ERR_INVALID_URL","Invalid URL",TypeError),_=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),b=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_),T=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),S=O("ERR_STREAM_WRITE_AFTER_END","write after end"),w=p.prototype.destroy||M;function C(e,t){p.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof _?e:new _({cause:e}))}},this._performRequest()}function E(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",a=n[i]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,o&&s instanceof o?e=D(e):L(e)?e=D(I(e)):(a=r,r=A(e),e={protocol:i}),R(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,L(r.host)||L(r.hostname)||(r.hostname="::1"),h.equal(r.protocol,i,"protocol mismatch"),f("options",r),new C(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function M(){}function I(e){var t;if(m)t=new o(e);else if(!L((t=A(r.parse(e))).protocol))throw new x({input:e});return t}function A(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new x({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new x({input:e.href||e});return e}function D(e,t){var n=t||{};for(var r of g)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function N(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){R(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function B(e,t){for(var n of v)e.removeListener(n,y[n]);e.on("error",M),e.destroy(t)}function L(e){return"string"==typeof e||e instanceof String}function R(e){return"function"==typeof e}return C.prototype=Object.create(p.prototype),C.prototype.abort=function(){B(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},C.prototype.destroy=function(e){return B(this._currentRequest,e),w.call(this,e),this},C.prototype.write=function(e,t,n){if(this._ending)throw new S;if(!L(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;R(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new T),this.abort()):n&&n()},C.prototype.end=function(e,t,n){if(R(e)?(n=e,e=t=null):R(t)&&(n=t,t=null),e){var r=this,o=this._currentRequest;this.write(e,t,(function(){r._ended=!0,o.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},C.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},C.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},C.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),i()}),e),r(t)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){C.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(C.prototype,e,{get:function(){return this._currentRequest[e]}})})),C.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},C.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,v))o.on(i,y[i]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];o.finished||o.write(n.data,n.encoding,e)}else s._ended&&o.end()}()}},C.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(B(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new b;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],N(/^content-/i,this._options.headers));var l=N(/^host$/i,this._options.headers),u=I(this._currentUrl),c=l||u.host,d=/^\w+:/.test(i)?this._currentUrl:r.format(Object.assign(u,{host:c})),p=function(e,t){return m?new o(e,t):I(r.resolve(t,e))}(i,d);if(f("redirecting to",p.href),this._isRedirect=!0,D(p,this._options),(p.protocol!==u.protocol&&"https:"!==p.protocol||p.host!==c&&!function(e,t){h(L(e)&&L(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(p.host,c))&&N(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),R(a)){var g={headers:e.headers,statusCode:t},v={url:d,method:s,headers:n};a(this._options,g,v),this._sanitizeOptions(this._options)}this._performRequest()},la.exports=E({http:i,https:d}),la.exports.wrap=E,la.exports}var Ma,Ia,Aa={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function Da(){if(Ia)return Ma;Ia=1;var e=Ti,t=Xi(),n=ea(),r=Ci,o=a,i=s,u=Ea().http,c=Ea().https,d=l,p=f,h=Aa,m=Zi(),g=Qi,v=/https:?/;function y(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,y(e,t,e.href)}}return Ma=function(a){return new Promise((function(s,l){var f=function(e){s(e)},x=function(e){l(e)},_=a.data,b=a.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+h.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(m("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",a));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var T=void 0;a.auth&&(T=(a.auth.username||"")+":"+(a.auth.password||""));var S=n(a.baseURL,a.url),w=d.parse(S),C=w.protocol||"http:";if(!T&&w.auth){var E=w.auth.split(":");T=(E[0]||"")+":"+(E[1]||"")}T&&delete b.Authorization;var M=v.test(C),I=M?a.httpsAgent:a.httpAgent,A={path:r(w.path,a.params,a.paramsSerializer).replace(/^\?/,""),method:a.method.toUpperCase(),headers:b,agent:I,agents:{http:a.httpAgent,https:a.httpsAgent},auth:T};a.socketPath?A.socketPath=a.socketPath:(A.hostname=w.hostname,A.port=w.port);var D,N=a.proxy;if(!N&&!1!==N){var O=C.slice(0,-1)+"_proxy",B=process.env[O]||process.env[O.toUpperCase()];if(B){var L=d.parse(B),R=process.env.no_proxy||process.env.NO_PROXY,k=!0;if(R)k=!R.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&w.hostname.substr(w.hostname.length-e.length)===e||w.hostname===e))}));if(k&&(N={host:L.hostname,port:L.port,protocol:L.protocol},L.auth)){var P=L.auth.split(":");N.auth={username:P[0],password:P[1]}}}}N&&(A.headers.host=w.hostname+(w.port?":"+w.port:""),y(A,N,C+"//"+w.hostname+(w.port?":"+w.port:"")+A.path));var j=M&&(!N||v.test(N.protocol));a.transport?D=a.transport:0===a.maxRedirects?D=j?i:o:(a.maxRedirects&&(A.maxRedirects=a.maxRedirects),D=j?c:u),a.maxBodyLength>-1&&(A.maxBodyLength=a.maxBodyLength);var F=D.request(A,(function(n){if(!F.aborted){var r=n,o=n.req||F;if(204!==n.statusCode&&"HEAD"!==o.method&&!1!==a.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(p.createUnzip()),delete n.headers["content-encoding"]}var i={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:a,request:o};if("stream"===a.responseType)i.data=r,t(f,x,i);else{var s=[],l=0;r.on("data",(function(e){s.push(e),l+=e.length,a.maxContentLength>-1&&l>a.maxContentLength&&(r.destroy(),x(m("maxContentLength size of "+a.maxContentLength+" exceeded",a,null,o)))})),r.on("error",(function(e){F.aborted||x(g(e,a,null,o))})),r.on("end",(function(){var n=Buffer.concat(s);"arraybuffer"!==a.responseType&&(n=n.toString(a.responseEncoding),a.responseEncoding&&"utf8"!==a.responseEncoding||(n=e.stripBOM(n))),i.data=n,t(f,x,i)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(g(e,a,null,F))})),a.timeout){var U=parseInt(a.timeout,10);if(isNaN(U))return void x(m("error trying to parse `config.timeout` to int",a,"ERR_PARSE_TIMEOUT",F));F.setTimeout(U,(function(){F.abort(),x(m("timeout of "+U+"ms exceeded",a,a.transitional&&a.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}a.cancelToken&&a.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(g(e,a,null,F))})).pipe(F):F.end(_)}))}}var Na=Ti,Oa=function(e,t){qi.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Ba=Qi,La={"Content-Type":"application/x-www-form-urlencoded"};function Ra(e,t){!Na.isUndefined(e)&&Na.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var ka,Pa={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?ka=function(){if(Yi)return Vi;Yi=1;var e=Ti,t=Xi(),n=Ki(),r=Ci,o=ea(),i=ta(),a=na(),s=Zi();return Vi=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var m=l.auth.username||"",g=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+g)}var v=o(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?i(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(ka=Da()),ka),transformRequest:[function(e,t){return Oa(t,"Accept"),Oa(t,"Content-Type"),Na.isFormData(e)||Na.isArrayBuffer(e)||Na.isBuffer(e)||Na.isStream(e)||Na.isFile(e)||Na.isBlob(e)?e:Na.isArrayBufferView(e)?e.buffer:Na.isURLSearchParams(e)?(Ra(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Na.isObject(e)||t&&"application/json"===t["Content-Type"]?(Ra(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&Na.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Ba(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Pa.headers={common:{Accept:"application/json, text/plain, */*"}},Na.forEach(["delete","get","head"],(function(e){Pa.headers[e]={}})),Na.forEach(["post","put","patch"],(function(e){Pa.headers[e]=Na.merge(La)}));var ja,Fa,Ua=Pa,Ha=Ti,za=Ua;function Wa(){return Fa?ja:(Fa=1,ja=function(e){return!(!e||!e.__CANCEL__)})}var Va=Ti,Ya=function(e,t,n){var r=this||za;return Ha.forEach(n,(function(n){e=n.call(r,e,t)})),e},Ga=Wa(),qa=Ua;function Qa(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Za=Ti,Xa=function(e,t){t=t||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return Za.isPlainObject(e)&&Za.isPlainObject(t)?Za.merge(e,t):Za.isPlainObject(t)?Za.merge({},t):Za.isArray(t)?t.slice():t}function l(r){Za.isUndefined(t[r])?Za.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}Za.forEach(r,(function(e){Za.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),Za.forEach(o,l),Za.forEach(i,(function(r){Za.isUndefined(t[r])?Za.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),Za.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(o).concat(i).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return Za.forEach(c,l),n},Ka=Aa,$a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){$a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Ja={},es=Ka.version.split(".");function ts(e,t){for(var n=t?t.split("."):es,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}$a.transitional=function(e,t,n){var r=t&&ts(t);function o(e,t){return"[Axios v"+Ka.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new Error(o(i," has been removed in "+t));return r&&!Ja[i]&&(Ja[i]=!0,console.warn(o(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}};var ns,rs,os,is,as,ss,ls,us,cs={isOlderVersion:ts,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],l=void 0===s||a(s,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:$a},ds=Ti,ps=Ci,hs=Gi,fs=function(e){return Qa(e),e.headers=e.headers||{},e.data=Ya.call(e,e.data,e.headers,e.transformRequest),e.headers=Va.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Va.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||qa.adapter)(e).then((function(t){return Qa(e),t.data=Ya.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Ga(t)||(Qa(e),t&&t.response&&(t.response.data=Ya.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ms=Xa,gs=cs,vs=gs.validators;function ys(e){this.defaults=e,this.interceptors={request:new hs,response:new hs}}function xs(){if(rs)return ns;function e(e){this.message=e}return rs=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,ns=e}ys.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=ms(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&gs.assertOptions(t,{silentJSONParsing:vs.transitional(vs.boolean,"1.0.0"),forcedJSONParsing:vs.transitional(vs.boolean,"1.0.0"),clarifyTimeoutError:vs.transitional(vs.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var a=[fs,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(i),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{o=fs(s)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},ys.prototype.getUri=function(e){return e=ms(this.defaults,e),ps(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ds.forEach(["delete","get","head","options"],(function(e){ys.prototype[e]=function(t,n){return this.request(ms(n||{},{method:e,url:t,data:(n||{}).data}))}})),ds.forEach(["post","put","patch"],(function(e){ys.prototype[e]=function(t,n,r){return this.request(ms(r||{},{method:e,url:t,data:n}))}}));var _s=Ti,bs=hi,Ts=ys,Ss=Xa;function ws(e){var t=new Ts(e),n=bs(Ts.prototype.request,t);return _s.extend(n,Ts.prototype,t),_s.extend(n,t),n}var Cs=ws(Ua);Cs.Axios=Ts,Cs.create=function(e){return ws(Ss(Cs.defaults,e))},Cs.Cancel=xs(),Cs.CancelToken=function(){if(is)return os;is=1;var e=xs();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},os=t}(),Cs.isCancel=Wa(),Cs.all=function(e){return Promise.all(e)},Cs.spread=ss?as:(ss=1,as=function(e){return function(t){return e.apply(null,t)}}),Cs.isAxiosError=us?ls:(us=1,ls=function(e){return"object"==typeof e&&!0===e.isAxiosError}),pi.exports=Cs,pi.exports.default=Cs;var Es,Ms,Is=di(pi.exports),As="undefined"!=typeof process&&process.env?process.env:{},Ds="development"===As.NODE_ENV,Ns=null!==(Es=As.REACT_APP_API_URL)&&void 0!==Es?Es:Ds?"http://localhost:8080/api":"/api",Os=new Map;exports.QUERY_KEY=void 0,(Ms=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",Ms.fetchGraphs="fetchGraphs",Ms.fetchUniverseMetadataList="fetchUniverseMetadataList",Ms.deleteUniverseMetadata="deleteUniverseMetadata",Ms.updateUniverseMetadata="updateUniverseMetadata",Ms.fetchUniverseListDetails="fetchUniverseListDetails",Ms.fetchUniverseById="fetchUniverseById",Ms.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",Ms.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",Ms.fetchAnomaliesPage="fetchAnomaliesPage",Ms.fetchQueriesPage="fetchQueriesPage",Ms.fetchQueriesStatsPage="fetchQueriesStatsPage",Ms.fetchQueriesDatabases="fetchQueriesDatabases",Ms.fetchCustomerMetadataList="fetchCustomerMetadataList",Ms.fetchQueryStats="fetchQueryStats",Ms.fetchTablesPage="fetchTablesPage",Ms.fetchNamespaces="fetchNamespaces",Ms.deleteRuntimeConfig="deleteRuntimeConfig",Ms.fetchRuntimeConfigs="fetchRuntimeConfigs",Ms.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",Ms.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",Ms.updateRuntimeConfig="updateRuntimeConfig",Ms.fetchAnomalyGroups="fetchAnomalyGroups",Ms.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",Ms.fetchAnomalyGroupsById="fetchAnomalyGroupsById",Ms.getUniverseMetadata="getUniverseMetadata",Ms.fetchMetricsGraphs="fetchMetricsGraphs",Ms.fetchLoadDbStatsPage="fetchLoadDbStatsPage",Ms.fetchTabletsStatsPage="fetchTabletsStatsPage",Ms.fetchNodeLoadStatsPage="fetchNodeLoadStatsPage",Ms.sendTelemetryEvent="sendTelemetryEvent",Ms.fetchBackgroundTasks="fetchBackgroundTasks",Ms.fetchClusterDetails="fetchClusterDetails";var Bs=Is.create({baseURL:Ns});Bs.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var o=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=o}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var Ls=function(){this.fetchAnomalies=function(e,t,n,r){var o=Er(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",i={};return t&&(i.startTime=t),n&&(i.endTime=n),Bs.get(o,{params:i}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,o,i,a,s){void 0===r&&(r=10);var l=Er(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return o&&(u.startTime=o),i&&(u.endTime=i),a&&a!==zt&&(u.category=a),Er(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,Bs.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=Er(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return i&&(p.startTime=i),a&&(p.endTime=a),Er(s)&&(p.query=s),l&&l!==zt&&(p.dbName=l),p.sortBy=Mr(u)?"dbName":u,p.direction=Mr(c)?"DESC":c,p.offset=n*o,p.needTotalCount=!0,p.limit=o,Bs.get(d,{params:p})},this.fetchLoadDbStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=t.dbWaitEventType,p={};wr(d)&&d.forEach((function(e){return p.eventTypes=e}));var h=Er(r)?"".concat(r,"/universe/").concat(e,"/databases/stats/page"):"/universe/".concat(e,"/databases/stats/page");return i&&(p.startTime=i),a&&(p.endTime=a),(Er(s)||l&&l!==zt)&&(p.namespaceName=Mr(s)?l:s),p.sortBy=Mr(u)?"eps":u,p.direction=Mr(c)?"DESC":c,p.offset=n*o,p.needTotalCount=!0,p.limit=o,p.excludeSystemDBs=!1,p.groupEventsBy="TYPE",Bs.get(h,{params:p})},this.fetchTabletStatsPage=function(e,t,n){var r=t.queryId,o=t.dbId,i=t.tableName,a=t.dbName,s=t.schemaName,l=t.currentTablePage,u=t.apiUrl,c=t.pageSize,d=t.startTime,p=t.endTime,h=t.searchInput,f=t.sortBy,m=t.sortDirection,g={},v=n(),y=v.cluster,x=v.region,_=v.zone,b=v.node,T=new URLSearchParams;Er(y)&&y!==zt&&T.append("clusterUuids",y),Er(x)&&x!==zt&&T.append("regionCodes",x),Er(_)&&_!==zt&&T.append("azCodes",_),Er(b)&&b!==zt&&T.append("instanceNames",b);var S=Er(u)?"".concat(u,"/universe/").concat(e,"/tablets/stats/page?").concat(T.toString()):"/universe/".concat(e,"/tablets/stats/page?").concat(T.toString());return d&&(g.startTime=d),p&&(g.endTime=p),(Er(h)||h&&h!==zt)&&(g.tableName=h),r&&Er(r)&&(g.queryId=r),o&&Er(o)&&(g.dbId=o),i&&Er(i)&&(g.tableName=i),a&&Er(a)&&(g.namespaceName=a),s&&Er(s)&&(g.schemaName=s),g.sortBy=Mr(f)?"eps":f,g.direction=Mr(m)?"DESC":m,g.offset=l*c,g.needTotalCount=!0,g.limit=c,g.groupEventsBy="TYPE",Bs.get(S,{params:g})},this.fetchNodeLoadStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startTime,a=t.endTime,s=t.searchInput,l=t.sortBy,u=t.sortDirection,c=t.dbWaitEventType,d={},p=Er(r)?"".concat(r,"/universe/").concat(e,"/nodes/stats/page"):"/universe/".concat(e,"/nodes/stats/page");return i&&(d.startTime=i),a&&(d.endTime=a),wr(c)&&c.forEach((function(e){return d.eventTypes=e})),Er(s)&&(d.name=s),d.sortBy=Mr(l)?"eps":l,d.direction=Mr(u)?"DESC":u,d.offset=n*o,d.needTotalCount=!0,d.limit=o,d.groupEventsBy="TYPE",Bs.get(p,{params:d})},this.fetchQueriesStatsPage=function(e,t,n,r,o){void 0===o&&(o=!1);var i=t.currentTablePage,a=t.apiUrl,s=t.pageSize,l=t.startTime,u=t.endTime,c=t.searchInput,d=t.database,p=t.tabletId,h=t.instancesName,f=t.sortBy,m=t.sortDirection,g=t.queryType,v=t.groupByOperation,y=n(),x=y.cluster,_=y.region,b=y.zone,T=y.node,S=new URLSearchParams;if(Er(x)&&x!==zt&&S.append("clusterUuids",x),Er(_)&&_!==zt&&S.append("regionCodes",_),Er(b)&&b!==zt&&S.append("azCodes",b),Er(T)&&T!==zt?S.append("instanceNames",T):h&&Er(h)&&S.append("instanceNames",h),wr(r)){var w=v===exports.WaitEventClassification.WAIT_EVENT_TYPE?"eventTypes":"events";r.forEach((function(e){return S.append(w,e)}))}var C=Er(a)?"".concat(a,"/universe/").concat(e,"/queries/stats/page?").concat(S.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(S.toString()),E={};return g&&(E.queryType=g.toUpperCase()),l&&(E.startTime=l),u&&(E.endTime=u),Er(c)&&(E.query=c),d&&d!==zt&&(E.namespaceName=d),p&&Er(p)&&(E.tabletId=p),v&&v===exports.WaitEventClassification.WAIT_EVENT&&(E.groupEventsBy=_t.waitEvent),E.sortBy=Mr(f)?"eps":f,E.direction=Mr(m)?"DESC":m,E.offset=i*s,E.needTotalCount=!0,E.limit=s,E.excludeTpUser=!o,E.excludeSystemDBs=!o,Bs.get(C,{params:E})},this.fetchNamespaceSchemas=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return Bs.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},o=t.startTime,i=t.endTime,a=t.queryId,s=t.dbId;o&&(r.startTime=o),i&&(r.endTime=i),a&&(r.queryId=a),s&&(r.dbId=s);var l=Er(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return Bs.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=Er(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return i&&(h.startTime=i),a&&(h.endTime=a),Er(s)&&(h.tableName=s),l&&l!==zt&&(h.namespaceName=l),u&&u!==zt&&(h.schemaName=u),h.sortBy=Mr(c)?"namespaceName":c,h.direction=Mr(d)?"DESC":d,h.offset=n*o,h.needTotalCount=!0,h.limit=o,Bs.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return Bs.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return Bs.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return Bs.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n,r){var o=null!=r?r:"fetchGraphs-".concat(e),i=Os.get(o);i&&i.abort();var a=new AbortController;Os.set(o,a);var s=Er(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),l=Is.CancelToken.source();return a.signal.addEventListener("abort",(function(){l.cancel("Request aborted"),Os.delete(o)})),Bs.post(s,t,{cancelToken:l.token}).then((function(e){return Os.delete(o),e.data})).catch((function(e){throw Os.delete(o),e}))},this.fetchCustomerMetadataList=function(e){var t=Er(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return Bs.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Er(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Bs.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Er(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Bs.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Er(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Bs.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Er(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",o={customer_uuid:t,universe_uuid:n};return Bs.get(r,{params:o}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Bs.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Bs.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Bs.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},o=Er(e)?"".concat(e,"/universe/details"):"/universe/details";return Bs.get(o,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return Bs.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return Bs.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return Bs.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=Er(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Bs.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Er(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Bs.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var o=Er(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Bs.put(o,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Er(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Bs.delete(r).then((function(e){return e.data}))},this.fetchBackgroundTasks=function(e,t,n,r,o){var i=Er(o)?"".concat(o,"/universe/").concat(e,"/background_tasks"):"/universe/".concat(e,"/background_tasks"),a={};return t&&(a.startTime=t),n&&(a.endTime=n),null!==r&&(a.limit=r),Bs.get(i,{params:a}).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,o,i){void 0===r&&(r="");var a=o(),s=a.cluster,l=a.region,u=a.zone,c=a.node,d=new URLSearchParams;if(t&&d.append("startTime",t),n&&d.append("endTime",n),null===t&&null===n)return{};Er(r)&&d.append("anomalyType",r),Er(s)&&s!==zt&&d.append("clusterUuids",s),Er(l)&&l!==zt&&d.append("regionCodes",l),Er(u)&&u!==zt&&d.append("azCodes",u),Er(c)&&c!==zt&&d.append("instanceNames",c);var p=Er(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return Bs.get(p).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,o){var i=Er(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return Bs.get(i).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,o){if(null===n&&null===r)return{};var i=Er(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return Bs.get(i).then((function(e){return e.data}))},this.sendTelemetryEvent=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/ui_events"):"/universe/".concat(e,"/ui_events");return Bs.post(r,t).then((function(e){return e.data}))},this.fetchClusterDetails=function(e,t,n,r){var o=new URLSearchParams;t&&o.append("startTime",t),n&&o.append("endTime",n);var i=Er(r)?"".concat(r,"/universe/").concat(e,"/cluster_details?").concat(o.toString()):"/universe/".concat(e,"/cluster_details?").concat(o.toString());return Bs.get(i).then((function(e){return e.data}))}},Rs=new Ls,ks=function(i){var a,s,l,u,c,d,p,h,f,m,g,v,y,x,_,b,w,C,E,M=i.anomalyData,I=i.isHistoricalQueryView,A=i.isDrilldownView,D=void 0===A||A,N=i.queryObject,O=i.showDetails,B=i.startDateTime,L=i.endDateTime,R=i.apiUrl,k=i.universeUuid,P=i.universeQueryStatsData,j=i.onShowDetails,F=$n(),U=S(),H=t.useState(!1),z=H[0],W=H[1],V=t.useState(""),Y=V[0],G=V[1],q=t.useState(""),Q=q[0],Z=q[1],X="HOT_TABLET"===(null===(a=null==M?void 0:M.lastInstance)||void 0===a?void 0:a.type)||"LARGE_TABLET"===(null===(s=null==M?void 0:M.lastInstance)||void 0===s?void 0:s.type),K=null===(l=null==M?void 0:M.lastInstance)||void 0===l?void 0:l.entityDisplayName,$=null===(u=null==M?void 0:M.lastInstance)||void 0===u?void 0:u.category;n.useQuery([exports.QUERY_KEY.fetchClusterDetails,null==B?void 0:B.toISOString(),null==L?void 0:L.toISOString()],(function(){var e,t;return Rs.fetchClusterDetails(k,null!==(e=null==B?void 0:B.toISOString())&&void 0!==e?e:null,null!==(t=null==L?void 0:L.toISOString())&&void 0!==t?t:null,R)}),{onSuccess:function(e){var t,n,r,o,i=($===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP)&&(null===(n=null===(t=null==e?void 0:e.nodeDetails)||void 0===t?void 0:t.find((function(e){return e.id.name===K})))||void 0===n?void 0:n.region);G(i||"");var a=($===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP)&&(null===(o=null===(r=null==e?void 0:e.nodeDetails)||void 0===r?void 0:r.find((function(e){return e.id.name===K})))||void 0===o?void 0:o.az);Z(a||"")}});var J=function(e){null!==e.target.closest("button")&&e.stopPropagation()};return e.jsx(r.Box,{children:D&&O&&e.jsx(r.Box,{className:T(F.headerMetadataBox,F.boxContainer,F.flexColumn),children:I?e.jsxs(r.Box,{children:[e.jsxs(r.Box,{className:F.flexRow,width:"100%",children:[e.jsxs(r.Box,{className:F.flexColumn,alignItems:"flex-start",flex:1,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:_n}),e.jsx(r.Box,{children:null==N?void 0:N.namespaceName})]}),e.jsxs(r.Box,{className:F.flexColumn,alignItems:"flex-start",flex:1,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:bn}),e.jsx(r.Box,{children:null==N?void 0:N.queryType})]}),e.jsx(r.Box,{className:F.flexColumn,alignItems:"flex-start",ml:"auto",children:e.jsx(o.YBButton,{size:"small",variant:"ghost",onClick:function(){return j(!1)},dataTestId:"MetadataHeader-HideDetailsButton",children:e.jsx("span",{style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"},children:"Hide Details"})})})]}),e.jsx(r.Box,{className:F.flexColumn,mt:2,children:e.jsx(r.Box,{onClick:J,width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"},children:e.jsx(o.YBCodeBlock,{lang:"sql",showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!0,text:null!==(E=null==N?void 0:N.query)&&void 0!==E?E:"",containerClassName:U.queryContainerCodeInBreadcrumbs},"TableHelperQueries-query")})})]}):e.jsx(e.Fragment,{children:M&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsxs(r.Box,{className:F.flexRow,width:"100%",justifyContent:"space-between",children:[e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:Cn}),e.jsx(r.Box,{className:F.anomalyTypeTag,children:e.jsx("span",{className:F.anomalyTypeText,children:pn[null===(c=null==M?void 0:M.lastInstance)||void 0===c?void 0:c.type]})})]}),$!==exports.AnomalyCategory.SQL&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:null===(p=xn[null===(d=null==M?void 0:M.lastInstance)||void 0===d?void 0:d.type])||void 0===p?void 0:p.title}),e.jsxs(r.Box,{children:[e.jsx(o.YBTooltip,{title:K||"",placement:"top",arrow:!0,children:e.jsx("span",{className:F.regularMetadata,children:ti(K,$,$===exports.AnomalyCategory.SQL?40:30)})}),($===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP)&&e.jsx(o.YBTooltip,{title:z?"Copied":"Copy",open:!!z||void 0,children:e.jsx("img",{src:ci,alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(K),W(!0),setTimeout((function(){return W(!1)}),2e3)}})})]})]}),$===exports.AnomalyCategory.SQL&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:_n}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:null===(h=null==P?void 0:P[0])||void 0===h?void 0:h.namespaceName})})]}),$===exports.AnomalyCategory.SQL&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:bn}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:null===(f=null==P?void 0:P[0])||void 0===f?void 0:f.queryType})})]}),$===exports.AnomalyCategory.DB&&X&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:_n}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:Fo(M).dbName})})]}),e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:$===exports.AnomalyCategory.DB?void 0!==X?X?wn:Sn:Tn:$===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP?En:null}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:$===exports.AnomalyCategory.DB?X?null===(y=null===(v=null===(g=null===(m=null==M?void 0:M.lastInstance)||void 0===m?void 0:m.mainGraphs)||void 0===g?void 0:g[0].filters)||void 0===v?void 0:v.tabletId)||void 0===y?void 0:y[0]:null===(w=null===(b=null===(_=null===(x=null==M?void 0:M.lastInstance)||void 0===x?void 0:x.mainGraphs)||void 0===_?void 0:_[0].filters)||void 0===b?void 0:b.tableName)||void 0===w?void 0:w[0]:$===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP?e.jsx(e.Fragment,{children:"".concat(Y?Y.toUpperCase():""," (").concat(Q||"",")")}):null})})]}),e.jsx(r.Box,{children:e.jsx(o.YBButton,{size:"small",variant:"ghost",onClick:function(){return j(!1)},dataTestId:"MetadataHeader-HideDetailsButton",children:e.jsx("span",{style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"},children:"Hide Details"})})})]}),$===exports.AnomalyCategory.SQL&&e.jsx(r.Box,{mt:2,children:e.jsx(r.Box,{onClick:J,width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"},children:e.jsx(o.YBCodeBlock,{lang:"sql",showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!0,text:null===(C=null==M?void 0:M.lastInstance)||void 0===C?void 0:C.entityDisplayName,containerClassName:U.queryContainerCodeInBreadcrumbs},"TableHelperQueries-query")})})]})})})})},Ps=function(t){var n,i,a=t.appName,s=t.anomalyData,l=t.showDetails,u=t.isDrilldownView,c=void 0===u||u,d=t.isHistoricalQueryView,p=t.showStandaloneAnomalies,h=t.queryObject,f=t.onSelectedQuery,m=t.onSelectedIssue,g=t.onShowDetails,v=t.onNavigateToUrl,y=$n(),x=oi(),_=null===(n=null==s?void 0:s.lastInstance)||void 0===n?void 0:n.entityDisplayName,b=null===(i=null==s?void 0:s.lastInstance)||void 0===i?void 0:i.category,T=function(){!function(e,t,n,r,o,i){if(e===exports.AppName.YBM||e===exports.AppName.YBA)if(t){null==o||o(null);var a=si(!0,!1,n);i?i(a.pathname+a.search):window.history.pushState({},"",a.toString())}else null==r||r(null),a=si(!1),i?i(a.pathname+a.search):window.history.pushState({},"",a.toString());else{var s=ai(e);window.location.href=s}}(a,d,p,m,f,v)};return e.jsx(r.Box,{children:e.jsxs(r.Box,{display:"flex",mb:3,mt:1,children:[e.jsx(r.Box,{className:y.ybBreadcrumbWrapper,children:c&&e.jsx(o.YBBreadcrumb,{size:"small",separator:"/",maxLabelWidth:600,items:function(){var e=function(){if(x.currentTab===exports.InsightsTabs.CLUSTER_LOAD){var e=x.clusterLoadSubTab;if(a!==exports.AppName.YBM&&a!==exports.AppName.YBA||!Cr(s)||(e=exports.ClusterLoadOverallTabs.ANOMALIES),x.clusterLoadSubTab===exports.ClusterLoadSubTabs.OVERALL_LOAD){var t=ni(s,b,d,x);return"".concat(e," - ").concat(t)}return e}return x.currentTab}(),t=[{label:e,onClick:T}];if(x.currentTab===exports.InsightsTabs.CLUSTER_LOAD)(s||h)&&((r=ri({anomalyData:s,entityDisplayName:_,queryText:null==h?void 0:h.query}))&&t.push({label:r,onClick:function(){return s&&Er(null==h?void 0:h.query)?void li(a,s,m,v):void 0}}),s&&Er(null==h?void 0:h.query)&&t.push({label:ei(null==h?void 0:h.query,30)}));else if(s||h){var n=ni(s,b,d,x),r=ri({anomalyData:s,entityDisplayName:_,queryText:null==h?void 0:h.query});x.currentTab!==exports.InsightsTabs.INSIGHTS&&t.push({label:n,onClick:T}),r&&t.push({label:r})}return t}(),dataTestId:"BreadCrumbsAndMetadataHeader-Breadcrumb"})}),e.jsx(r.Box,{ml:2,style:{marginTop:"-2px"},children:!l&&e.jsx(o.YBButton,{size:"small",variant:"secondary",onClick:function(){return g(!0)},dataTestId:"BreadCrumbsAndMetadataHeader-ShowDetails",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Maximize Icon"}),children:"Show Details"})})]})})},js="data:image/svg+xml,%3csvg width='1' height='16' viewBox='0 0 1 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='0.5' y1='2.18557e-08' x2='0.499999' y2='16' stroke='%23B7C3CB'/%3e%3c/svg%3e",Fs=r.makeStyles((function(){return{groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .yb-MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .yb-MuiInput-root":{width:"150px",height:"32px"}},clusterRegionSelectorBox:{"& .yb-MuiInputBase-root":{borderRightWidth:"0px"}}}})),Us=function(i){var a=i.appName,s=i.startDateTime,l=i.endDateTime,u=i.apiUrl,c=i.universeUuid,d=i.anomalyData,p=i.clusterRegionItem,h=i.zoneNodeItem,f=i.isPrimaryCluster,m=i.cluster,g=i.region,v=i.metricMeasure,y=i.outlierType,x=i.numNodes,_=i.isDrilldownView,b=void 0===_||_,S=i.onZoneNodeSelected,w=i.onClusterRegionSelected,E=i.onOutlierTypeSelected,M=i.onSplitTypeSelected;i.onQueryTypeSelected;var I=i.onNumNodesChanged,A=i.showMetricAggregator,D=void 0===A||A,N=i.showSplitSelector,O=void 0===N||N,B=$n(),L=Fs(),R=t.useState(new Map),k=R[0],P=R[1],j=t.useState(new Map),F=j[0],U=j[1],H=t.useState(new Map),z=H[0],W=H[1],V=t.useState(new Map),Y=V[0],G=V[1],q=t.useState(null),Q=q[0],Z=q[1],X=n.useQuery([exports.QUERY_KEY.fetchClusterDetails,null==s?void 0:s.toISOString(),null==l?void 0:l.toISOString()],(function(){var e,t;return Rs.fetchClusterDetails(c,null!==(e=null==s?void 0:s.toISOString())&&void 0!==e?e:null,null!==(t=null==l?void 0:l.toISOString())&&void 0!==t?t:null,u)}),{onSuccess:function(e){Z(e);var t=function(e){return(null==e?void 0:e.nodeDetails)&&Po(e)}(e),n=t.primaryZoneMapping,r=t.asyncZoneMapping,o=t.primaryClusterMapping,i=t.asyncClusterMapping;P(n),U(r),W(o),G(i)}});return(null==X?void 0:X.isError)?e.jsxs(r.Box,{mt:3,children:[(a===exports.AppName.YBA||a===exports.AppName.WEB)&&e.jsx(C,{customErrorMessage:Wn.NODE_REGION_ZONE_DETAILS_ERROR}),a===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Wn.QUERY_STATS_FETCH_ERROR})]}):(t.useEffect((function(){var e=new Map;if(g!==zt||m!==zt){var t=function(e,t,n,r){var o=Array.from(e).filter((function(e){return t?e[1].regionName===r:n?!e[1].isReadReplica:e[1].isReadReplica}));return o?new Map(o.map((function(e){return[null==e?void 0:e[0],e[1]]}))):new Map}(f?k:F,g!==zt,f,g!==zt?g:m);null!==g&&f?(P(t),U(e)):null===g||f?null!==m&&f?(P(t),U(e)):null===m||f||(P(e),U(t)):(P(e),U(t))}else P(k),U(F)}),[g,m,Q,f]),e.jsxs(r.Box,{className:T(B.flexColumn),children:[e.jsx(r.Box,{children:e.jsxs(r.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[D&&e.jsx(r.Box,{className:L.clusterRegionSelectorBox,children:e.jsx(Rr,{selectedItem:p,onClusterRegionSelected:w,primaryClusterToRegionMap:z,asyncClusterToRegionMap:Y})}),D&&e.jsx(r.Box,{children:e.jsx(Br,{selectedItem:h,onZoneNodeSelected:S,primaryZoneToNodesMap:k,asyncZoneToNodesMap:F})})]})}),O&&e.jsxs(r.Box,{display:"flex",flexDirection:"row",className:B.metricSplitSelectorBox,children:[e.jsxs(r.Box,{className:B.metricSplitSelectorContainer,children:[e.jsx("img",{src:Dr,alt:"Tree Icon"}),e.jsx(r.Box,{display:"flex",flexDirection:"row",children:e.jsx(rr,{onSplitTypeSelected:M,metricSplitSelectors:b?en:Jt,anomalyData:d})})]}),v!==exports.MetricMeasure.OVERALL&&e.jsxs(r.Box,{display:"flex",flexDirection:"row",children:[e.jsx("img",{alt:"Divider",src:js,className:B.dividerStyle}),e.jsx(ar,{outlierType:y,metricOutlierSelectors:tn,onOutlierTypeSelected:E,onNumNodesChanged:I,selectedNumNodes:x,showNumNodesInput:!1,showNumNodesSelector:!0,metricMeasure:v})]})]})]}))},Hs={exports:{}},zs={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(zs);var Ws=zs.exports,Vs={exports:{}},Ys={exports:{}},Gs={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}(Gs);var qs=Gs.exports,Qs={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}(Qs,Qs.exports);var Zs=Qs.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(1,arguments),e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===Object.prototype.toString.call(e)};var r=n(qs),o=n(Zs);e.exports=t.default}(Ys,Ys.exports);var Xs=Ys.exports,Ks={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.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(qs),o=n(Zs);e.exports=t.default}(Ks,Ks.exports);var $s=Ks.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,i.default)(1,arguments),!(0,r.default)(e)&&"number"!=typeof e)return!1;var t=(0,o.default)(e);return!isNaN(Number(t))};var r=n(Xs),o=n($s),i=n(Zs);e.exports=t.default}(Vs,Vs.exports);var Js=Vs.exports,el={exports:{}},tl={exports:{}},nl={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}(nl,nl.exports);var rl=nl.exports,ol=di(rl);!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(2,arguments);var n=(0,o.default)(e).getTime(),a=(0,r.default)(t);return new Date(n+a)};var r=n(rl),o=n($s),i=n(Zs);e.exports=t.default}(tl,tl.exports);var il=tl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(t);return(0,r.default)(e,-n)};var r=n(il),o=n(Zs),i=n(rl);e.exports=t.default}(el,el.exports);var al=el.exports,sl={exports:{}},ll={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.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/i)+1};var r=n($s),o=n(Zs),i=864e5;e.exports=t.default}(ll,ll.exports);var ul=ll.exports,cl={exports:{}},dl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),i=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-i),t.setUTCHours(0,0,0,0),t};var r=n($s),o=n(Zs);e.exports=t.default}(dl,dl.exports);var pl=dl.exports,hl={exports:{}},fl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.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,i.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,i.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var r=n($s),o=n(Zs),i=n(pl);e.exports=t.default}(fl,fl.exports);var ml=fl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.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,o.default)(n)};var r=n(ml),o=n(pl),i=n(Zs);e.exports=t.default}(hl,hl.exports);var gl=hl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,r.default)(e),n=(0,o.default)(t).getTime()-(0,i.default)(t).getTime();return Math.round(n/s)+1};var r=n($s),o=n(pl),i=n(gl),a=n(Zs),s=6048e5;e.exports=t.default}(cl,cl.exports);var vl=cl.exports,yl={exports:{}},xl={exports:{}},_l={};Object.defineProperty(_l,"__esModule",{value:!0}),_l.getDefaultOptions=function(){return bl},_l.setDefaultOptions=function(e){bl=e};var bl={};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,s,l,u,c,d,p,h;(0,o.default)(1,arguments);var f=(0,a.getDefaultOptions)(),m=(0,i.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(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,r.default)(e),v=g.getUTCDay(),y=(v<m?7:0)+v-m;return g.setUTCDate(g.getUTCDate()-y),g.setUTCHours(0,0,0,0),g};var r=n($s),o=n(Zs),i=n(rl),a=_l;e.exports=t.default}(xl,xl.exports);var Tl=xl.exports,Sl={exports:{}},wl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,o.default)(1,arguments);var m=(0,r.default)(e),g=m.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(g+1,0,y),x.setUTCHours(0,0,0,0);var _=(0,i.default)(x,t),b=new Date(0);b.setUTCFullYear(g,0,y),b.setUTCHours(0,0,0,0);var T=(0,i.default)(b,t);return m.getTime()>=_.getTime()?g+1:m.getTime()>=T.getTime()?g:g-1};var r=n($s),o=n(Zs),i=n(Tl),a=n(rl),s=_l;e.exports=t.default}(wl,wl.exports);var Cl=wl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,o.default)(1,arguments);var m=(0,s.getDefaultOptions)(),g=(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:m.firstWeekContainsDate)&&void 0!==l?l:null===(h=m.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,g),y.setUTCHours(0,0,0,0),(0,i.default)(y,t)};var r=n(Cl),o=n(Zs),i=n(Tl),a=n(rl),s=_l;e.exports=t.default}(Sl,Sl.exports);var El=Sl.exports;!function(e,t){var n=Ws.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,o.default)(n,t).getTime()-(0,i.default)(n,t).getTime();return Math.round(l/s)+1};var r=n($s),o=n(Tl),i=n(El),a=n(Zs),s=6048e5;e.exports=t.default}(yl,yl.exports);var Ml=yl.exports,Il={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}(Il,Il.exports);var Al=Il.exports,Dl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Al),o={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return(0,r.default)("yy"===t?o%100:o,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,o=e.getUTCMilliseconds(),i=Math.floor(o*Math.pow(10,n-3));return(0,r.default)(i,t.length)}};t.default=o,e.exports=t.default}(Dl,Dl.exports);var Nl=Dl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ul),o=n(vl),i=n(ml),a=n(Ml),s=n(Cl),l=n(Al),u=n(Nl),c="midnight",d="noon",p="morning",h="afternoon",f="evening",m="night",g={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(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,r){var o=(0,s.default)(e,r),i=o>0?o:1-o;if("YY"===t){var a=i%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):(0,l.default)(i,t.length)},R:function(e,t){var n=(0,i.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 o=(0,a.default)(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):(0,l.default)(o,t.length)},I:function(e,t,n){var r=(0,o.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 o=(0,r.default)(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):(0,l.default)(o,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 o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return(0,l.default)(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return(0,l.default)(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return(0,l.default)(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){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,o=e.getUTCHours();switch(r=12===o?d:0===o?c:o/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,o=e.getUTCHours();switch(r=o>=17?f:o>=12?h:o>=4?p:m,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 o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return y(o);case"XXXX":case"XX":return x(o);default:return x(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return y(o);case"xxxx":case"xx":return x(o);default:return x(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+v(o,":");default:return"GMT"+x(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+v(o,":");default:return"GMT"+x(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e,i=Math.floor(o.getTime()/1e3);return(0,l.default)(i,t.length)},T:function(e,t,n,r){var o=(r._originalDate||e).getTime();return(0,l.default)(o,t.length)}};function v(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+(0,l.default)(i,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?"-":"+",o=Math.abs(e);return r+(0,l.default)(Math.floor(o/60),2)+n+(0,l.default)(o%60,2)}var _=g;t.default=_,e.exports=t.default}(sl,sl.exports);var Ol=sl.exports,Bl={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"})}},o={p:r,P:function(e,t){var o,i=e.match(/(P+)(p+)?/)||[],a=i[1],s=i[2];if(!s)return n(e,t);switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",n(a,t)).replace("{{time}}",r(s,t))}},i=o;t.default=i,e.exports=t.default}(Bl,Bl.exports);var Ll=Bl.exports,Rl={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}(Rl,Rl.exports);var kl=Rl.exports,Pl=di(kl),jl={};Object.defineProperty(jl,"__esModule",{value:!0}),jl.isProtectedDayOfYearToken=function(e){return-1!==Fl.indexOf(e)},jl.isProtectedWeekYearToken=function(e){return-1!==Ul.indexOf(e)},jl.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 Fl=["D","DD"],Ul=["YY","YYYY"];var Hl={exports:{}},zl={exports:{}},Wl={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 o,i=n[e];return o="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};t.default=r,e.exports=t.default}(Wl,Wl.exports);var Vl=Wl.exports,Yl={exports:{}},Gl={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}(Gl,Gl.exports);var ql=Gl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ql),o={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=o,e.exports=t.default}(Yl,Yl.exports);var Ql=Yl.exports,Zl={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,o){return n[e]};t.default=r,e.exports=t.default}(Zl,Zl.exports);var Xl=Zl.exports,Kl={exports:{}},$l={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 o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}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}($l,$l.exports);var Jl=$l.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Jl),o={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=o,e.exports=t.default}(Kl,Kl.exports);var eu=Kl.exports,tu={exports:{}},nu={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,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[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}(nu,nu.exports);var ru=nu.exports,ou={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 o=r[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(o.length)}}},e.exports=t.default}(ou,ou.exports);var iu=ou.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ru),o={ordinalNumber:(0,n(iu).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"})};t.default=o,e.exports=t.default}(tu,tu.exports);var au=tu.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Vl),o=n(Ql),i=n(Xl),a=n(eu),s=n(au),l={code:"en-US",formatDistance:r.default,formatLong:o.default,formatRelative:i.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=l,e.exports=t.default}(zl,zl.exports);var su=zl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(su).default;t.default=r,e.exports=t.default}(Hl,Hl.exports);var lu=Hl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var x,_,b,T,S,w,C,E,M,I,A,D,N,O,B,L,R,k;(0,d.default)(2,arguments);var P=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!==(T=null!==(S=null!==(w=null==n?void 0:n.firstWeekContainsDate)&&void 0!==w?w:null==n||null===(C=n.locale)||void 0===C||null===(E=C.options)||void 0===E?void 0:E.firstWeekContainsDate)&&void 0!==S?S:j.firstWeekContainsDate)&&void 0!==T?T:null===(M=j.locale)||void 0===M||null===(I=M.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 H=(0,c.default)(null!==(A=null!==(D=null!==(N=null!==(O=null==n?void 0:n.weekStartsOn)&&void 0!==O?O:null==n||null===(B=n.locale)||void 0===B||null===(L=B.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==N?N:j.weekStartsOn)&&void 0!==D?D:null===(R=j.locale)||void 0===R||null===(k=R.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==A?A:0);if(!(H>=0&&H<=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 z=(0,i.default)(e);if(!(0,r.default)(z))throw new RangeError("Invalid time value");var W=(0,l.default)(z),V=(0,o.default)(z,W),Y={firstWeekContainsDate:U,weekStartsOn:H,locale:F,_originalDate:z},G=P.match(m).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 o=r[0];if("'"===o)return function(e){var t=e.match(g);if(!t)return e;return t[1].replace(v,"'")}(r);var i=a.default[o];if(i)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)),i(V,r,F.localize,Y);if(o.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return G};var r=n(Js),o=n(al),i=n($s),a=n(Ol),s=n(Ll),l=n(kl),u=jl,c=n(rl),d=n(Zs),p=_l,h=n(lu),f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,m=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,v=/''/g,y=/[a-zA-Z]/;e.exports=t.default}(Hs,Hs.exports);var uu=di(Hs.exports);function cu(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 du(e,t){var n=function(e){if(!hu[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;hu[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 hu[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),r=[],o=0;o<n.length;o++){var i=pu[n[o].type];i>=0&&(r[i]=parseInt(n[o].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 pu={year:0,month:1,day:2,hour:3,minute:4,second:5};var hu={};function fu(e,t,n,r,o,i,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,o,i,a),s}var mu=36e5,gu={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function vu(e,t,n){var r,o,i;if(!e)return 0;if(r=gu.timezoneZ.exec(e))return 0;if(r=gu.timezoneHH.exec(e))return xu(i=parseInt(r[1],10))?-i*mu:NaN;if(r=gu.timezoneHHMM.exec(e)){i=parseInt(r[2],10);var a=parseInt(r[3],10);return xu(i,a)?(o=Math.abs(i)*mu+6e4*a,"+"===r[1]?-o:o):NaN}if(function(e){if(_u[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),_u[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return fu(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=yu(s,e),u=n?l:function(e,t,n){var r=e.getTime(),o=r-t,i=yu(new Date(o),n);if(t===i)return t;o-=i-t;var a=yu(new Date(o),n);if(i===a)return i;return Math.max(i,a)}(t,l,e);return-u}return NaN}function yu(e,t){var n=du(e,t),r=fu(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),o=e.getTime(),i=o%1e3;return r-(o-=i>=0?i:1e3+i)}function xu(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var _u={};function bu(e,t){var n=e?vu(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Tu(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function Su(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Tu(Math.floor(o/60),2)+n+Tu(Math.floor(o%60),2)}function wu(e,t){return e%60==0?(e>0?"-":"+")+Tu(Math.abs(e)/60,2):Su(e,t)}var Cu={X:function(e,t,n,r){var o=bu(r.timeZone,e);if(0===o)return"Z";switch(t){case"X":return wu(o);case"XXXX":case"XX":return Su(o);default:return Su(o,":")}},x:function(e,t,n,r){var o=bu(r.timeZone,e);switch(t){case"x":return wu(o);case"xxxx":case"xx":return Su(o);default:return Su(o,":")}},O:function(e,t,n,r){var o=bu(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+Tu(i,2)}(o,":");default:return"GMT"+Su(o,":")}},z:function(e,t,n,r){switch(t){case"z":case"zz":case"zzz":return cu("short",e,r);default:return cu("long",e,r)}}},Eu=36e5,Mu=6e4,Iu={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 Au(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:ol(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 o=function(e){var t,n={},r=Iu.dateTimePattern.exec(e);r?(n.date=r[1],t=r[3]):(r=Iu.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e);if(t){var o=Iu.timeZone.exec(t);o?(n.time=t.replace(o[1],""),n.timeZone=o[1].trim()):n.time=t}return n}(e),i=function(e,t){var n,r=Iu.YYY[t],o=Iu.YYYYY[t];if(n=Iu.YYYY.exec(e)||o.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=Iu.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(o.date,r),a=i.year,s=function(e,t){if(null===t)return null;var n,r,o,i;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=Iu.MM.exec(e))return r=new Date(0),Lu(t,o=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,o),r):new Date(NaN);if(n=Iu.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Bu(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=Iu.MMDD.exec(e)){r=new Date(0),o=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Lu(t,o,s)?(r.setUTCFullYear(t,o,s),r):new Date(NaN)}if(n=Iu.Www.exec(e))return Ru(t,i=parseInt(n[1],10)-1)?Du(t,i):new Date(NaN);if(n=Iu.WwwD.exec(e)){i=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Ru(t,i,l)?Du(t,i,l):new Date(NaN)}return null}(i.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),c=0;if(o.time&&(c=function(e){var t,n,r;if(t=Iu.HH.exec(e))return ku(n=parseFloat(t[1].replace(",",".")))?n%24*Eu:NaN;if(t=Iu.HHMM.exec(e))return ku(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*Eu+r*Mu:NaN;if(t=Iu.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return ku(n,r,o)?n%24*Eu+r*Mu+1e3*o:NaN}return null}(o.time),isNaN(c)))return new Date(NaN);if(o.timeZone||n.timeZone){if(l=vu(o.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=Pl(new Date(u+c)),l=Pl(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function Du(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}var Nu=[31,28,31,30,31,30,31,31,30,31,30,31],Ou=[31,29,31,30,31,30,31,31,30,31,30,31];function Bu(e){return e%400==0||e%4==0&&e%100!=0}function Lu(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=Bu(e);if(r&&n>Ou[t])return!1;if(!r&&n>Nu[t])return!1}return!0}function Ru(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function ku(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var Pu=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ju(e,t,n){var r=String(t),o=n||{},i=r.match(Pu);if(i){var a=Au(o.originalDate||e,o);r=i.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],i=e.replace(t,"'"+Cu[t[0]](a,t,null,o)+"'");return r?i.substring(0,n-1)+i.substring(n+1):i}),r)}return uu(e,r,o)}function Fu(e,t,n){var r=Au(e,n),o=vu(t,r,!0),i=new Date(r.getTime()-o),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}var Uu,Hu="MMM-DD-yyyy HH:mm:ss [UTC]XXX",zu="yyyy-MM-dd'T'HH:mm",Wu=function(e,t,n){return void 0===t&&(t=Hu),ko(n?Fu(new Date(e),n):new Date(e),t)};function Vu(){return Vu=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},Vu.apply(null,arguments)}const Yu=e=>_.createElement("svg",Vu({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Uu||(Uu=_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.52 19.51a.6.6 0 0 1-.6.6H10a4.64 4.64 0 0 1-4.64-4.64V5.94L3.42 7.85A.6.6 0 0 1 2.58 7l2.94-2.93a.6.6 0 0 1 .85 0L9.3 7a.601.601 0 0 1-.85.85L6.54 5.94v9.54A3.44 3.44 0 0 0 10 18.91h3.95a.6.6 0 0 1 .57.6Zm6.475-3.537a.6.6 0 0 0-.425.177l-1.92 1.92V8.53A4.64 4.64 0 0 0 14 3.89h-3.92a.6.6 0 0 0 0 1.2H14c1.9 0 3.44 1.54 3.44 3.44v9.54l-1.92-1.92a.6.6 0 1 0-.85.85l2.94 2.94a.6.6 0 0 0 .85 0L21.42 17a.6.6 0 0 0-.425-1.027Z",fill:"#2B59C3"})));var Gu=o.mui.Box,qu=o.mui.MenuItem,Qu=o.mui.Typography,Zu=function(n){var r=n.appName,i=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;n.isClusterLoadView;var h=n.showStandaloneAnomalies,f=n.onSelectedFilterDuration,m=n.metricMeasure,g=n.currentTab,v=n.clusterLoadSubTab,y=n.onStartDateChange,x=n.onEndDateChange,_=n.onRefresh,b=$n(),S=t.useState(""),w=S[0],C=S[1],E=t.useState(Wu(s,zu,l)),M=E[0],I=E[1],A=t.useState(Wu(a,zu,l)),D=A[0],N=A[1];t.useEffect((function(){new Date(a)<new Date(s)?(C(""),I(Wu(s,zu,l)),N(Wu(a,zu,l))):C("Start Date is greater than end date")}),[a,s]),t.useEffect((function(){r===exports.AppName.YBM&&p&&i!==gn.ONE_HOUR&&i!==gn.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES&&f(gn.ONE_HOUR)}),[m]);return e.jsx(Gu,{children:e.jsxs(Gu,{display:"flex",flexDirection:"row",alignItems:"center",mt:c?2:0,children:[r===exports.AppName.YBM&&g&&(g===exports.InsightsTabs.CLUSTER_LOAD||g===exports.InsightsTabs.METRICS||g===exports.InsightsTabs.INSIGHTS)&&e.jsx(Qu,{variant:"h5",children:e.jsx("span",{className:T(b.breadCrumbText),children:function(e){if(r===exports.AppName.YBM||r===exports.AppName.YBA){if(e===exports.InsightsTabs.METRICS)return"Advanced Metrics";if(e===exports.InsightsTabs.CLUSTER_LOAD&&h)return exports.ClusterLoadOverallTabs.ANOMALIES}return e===exports.InsightsTabs.CLUSTER_LOAD&&v?v:e}(g)})}),e.jsxs(Gu,{display:"flex",ml:"auto",alignItems:"flex-end",children:[i===gn.CUSTOM&&e.jsxs(e.Fragment,{children:[e.jsx(Gu,{mt:.5,mr:1,children:e.jsx(o.YBDatePicker,{className:b.dateTimePicker,value:D,onChange:y,calendar:{showTimeSelector:!0},validation:{maxDate:M}})}),e.jsx(Gu,{mt:.5,mr:1,children:e.jsx(o.YBDatePicker,{className:b.dateTimePicker,value:M,defaultDateTimeValue:M,onChange:x,errorMsg:w,calendar:{showTimeSelector:!0},validation:{minDate:D}})})]}),e.jsx(o.YBSelect,{className:T(b.ybSelectBox,b.ybOverrideMuiInput),dataTestId:"DateSelectorHeader-TimeFilterSelect",value:i,children:vn.map((function(t){return e.jsx(qu,{value:t.value,onClick:function(){f(t.value)},className:T(b.regularText),disabled:r===exports.AppName.YBM&&p&&t.value!==gn.ONE_HOUR&&t.value!==gn.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES,children:t.label},"duration-".concat(t.label))}))}),g!==exports.InsightsTabs.METRICS&&e.jsx(o.YBButton,{style:{marginLeft:"8px"},variant:"secondary",dataTestId:"DateSelectorHeader-RefreshButton",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.5199 19.5097C14.5199 19.841 14.2513 20.1097 13.9199 20.1097H9.99993C7.43733 20.1097 5.35993 18.0323 5.35993 15.4697V5.93966L3.41993 7.84966C3.18035 8.04677 2.83002 8.02873 2.61196 7.80807C2.39389 7.5874 2.38 7.23688 2.57993 6.99966L5.51993 4.06966C5.63251 3.95669 5.78544 3.89319 5.94493 3.89319C6.10442 3.89319 6.25735 3.95669 6.36993 4.06966L9.29993 6.99966C9.53465 7.23438 9.53465 7.61494 9.29993 7.84966C9.06521 8.08438 8.68465 8.08438 8.44993 7.84966L6.53993 5.93966V15.4797C6.54257 16.3937 6.90891 17.2692 7.55808 17.9127C8.20725 18.5563 9.08585 18.915 9.99993 18.9097H13.9499C14.2695 18.9257 14.5203 19.1897 14.5199 19.5097ZM20.9949 15.9732C20.8354 15.9732 20.6825 16.0367 20.5699 16.1497L18.6499 18.0697V8.52966C18.6499 7.29732 18.1597 6.1156 17.2874 5.24514C16.415 4.37469 15.2323 3.887 13.9999 3.88966H10.0799C9.74856 3.88966 9.47993 4.15829 9.47993 4.48966C9.47993 4.82103 9.74856 5.08966 10.0799 5.08966H13.9999C15.8998 5.08966 17.4399 6.6298 17.4399 8.52966V18.0697L15.5199 16.1497C15.3681 15.9978 15.1468 15.9385 14.9394 15.9941C14.732 16.0497 14.5699 16.2117 14.5144 16.4191C14.4588 16.6265 14.5181 16.8478 14.6699 16.9997L17.6099 19.9397C17.7225 20.0526 17.8754 20.1161 18.0349 20.1161C18.1944 20.1161 18.3473 20.0526 18.4599 19.9397L21.4199 16.9997C21.5329 16.8871 21.5964 16.7341 21.5964 16.5747C21.5964 16.4152 21.5329 16.2622 21.4199 16.1497C21.3073 16.0367 21.1544 15.9732 20.9949 15.9732Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Refresh Icon"}),size:"medium",onClick:function(){return _()},children:"Refresh"})]})]})})},Xu=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Ku=new function(){this.browser=new Xu,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?(Ku.wxa=!0,Ku.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Ku.worker=!0:"undefined"==typeof navigator?(Ku.node=!0,Ku.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);o&&(n.ie=!0,n.version=o[1]);i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Ku);var $u=Ku,Ju="sans-serif",ec="12px "+Ju;var tc,nc,rc=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),o=(e.charCodeAt(n)-20)/100;t[r]=o}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),oc={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!tc){var n=oc.createCanvas();tc=n&&n.getContext("2d")}if(tc)return nc!==t&&(nc=tc.font=t||ec),tc.measureText(e);e=e||"";var r=/(\d+)px/.exec(t=t||ec),o=r&&+r[1]||12,i=0;if(t.indexOf("mono")>=0)i=o*e.length;else for(var a=0;a<e.length;a++){var s=rc[e[a]];i+=null==s?o:s*o}return{width:i}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},ic=Ic(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),ac=Ic(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),sc=Object.prototype.toString,lc=Array.prototype,uc=lc.forEach,cc=lc.filter,dc=lc.slice,pc=lc.map,hc=function(){}.constructor,fc=hc?hc.prototype:null,mc="__proto__",gc=2311;function vc(){return gc++}function yc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function xc(e){if(null==e||"object"!=typeof e)return e;var t=e,n=sc.call(e);if("[object Array]"===n){if(!Jc(e)){t=[];for(var r=0,o=e.length;r<o;r++)t[r]=xc(e[r])}}else if(ac[n]){if(!Jc(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(r=0,o=e.length;r<o;r++)t[r]=e[r]}}}else if(!ic[n]&&!Jc(e)&&!Hc(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==mc&&(t[a]=xc(e[a]));return t}function _c(e,t,n){if(!jc(t)||!jc(e))return n?xc(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==mc){var o=e[r],i=t[r];!jc(i)||!jc(o)||Bc(i)||Bc(o)||Hc(i)||Hc(o)||Fc(i)||Fc(o)||Jc(i)||Jc(o)?!n&&r in e||(e[r]=xc(t[r])):_c(o,i,n)}return e}function bc(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==mc&&(e[n]=t[n]);return e}function Tc(e,t,n){for(var r=Dc(t),o=0;o<r.length;o++){var i=r[o];(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}return e}function Sc(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 wc(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),o=0;o<r.length;o++){var i=r[o];"constructor"!==i&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}else Tc(e,t,n)}function Cc(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function Ec(e,t,n){if(e&&t)if(e.forEach&&e.forEach===uc)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function Mc(e,t,n){if(!e)return[];if(!t)return qc(e);if(e.map&&e.map===pc)return e.map(t,n);for(var r=[],o=0,i=e.length;o<i;o++)r.push(t.call(n,e[o],o,e));return r}function Ic(e,t,n,r){if(e&&t){for(var o=0,i=e.length;o<i;o++)n=t.call(r,n,e[o],o,e);return n}}function Ac(e,t,n){if(!e)return[];if(!t)return qc(e);if(e.filter&&e.filter===cc)return e.filter(t,n);for(var r=[],o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)&&r.push(e[o]);return r}function Dc(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 Nc=fc&&Lc(fc.bind)?fc.call.bind(fc.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(dc.call(arguments)))}};function Oc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(dc.call(arguments)))}}function Bc(e){return Array.isArray?Array.isArray(e):"[object Array]"===sc.call(e)}function Lc(e){return"function"==typeof e}function Rc(e){return"string"==typeof e}function kc(e){return"[object String]"===sc.call(e)}function Pc(e){return"number"==typeof e}function jc(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Fc(e){return!!ic[sc.call(e)]}function Uc(e){return!!ac[sc.call(e)]}function Hc(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function zc(e){return null!=e.colorStops}function Wc(e){return e!=e}function Vc(){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 Yc(e,t){return null!=e?e:t}function Gc(e,t,n){return null!=e?e:null!=t?t:n}function qc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return dc.apply(e,t)}function Qc(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 Zc(e,t){if(!e)throw new Error(t)}function Xc(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Kc="__ec_primitive__";function $c(e){e[Kc]=!0}function Jc(e){return e[Kc]}var ed=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 Dc(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),td="function"==typeof Map;var nd=function(){function e(t){var n=Bc(t);this.data=td?new Map:new ed;var r=this;function o(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(o):t&&Ec(t,o)}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 td?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function rd(e){return new nd(e)}function od(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&bc(n,t),n}function id(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function ad(e,t){return e.hasOwnProperty(t)}function sd(){}var ld=180/Math.PI;function ud(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function cd(e){return[e[0],e[1]]}function dd(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function pd(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function hd(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function fd(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 md(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var gd=md;var vd=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function yd(e,t,n){var r=t[0],o=t[1];return e[0]=n[0]*r+n[2]*o+n[4],e[1]=n[1]*r+n[3]*o+n[5],e}function xd(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function _d(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var bd=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},Td=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 bd(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,o=n-this._x,i=r-this._y;this._x=n,this._y=r,t.drift(o,i,e),this.handler.dispatchToElement(new bd(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 bd(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new bd(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new bd(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new bd(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Sd=Td,wd=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var i=this._$eventProcessor;null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=o[e].length-1,u=o[e][l];return u&&u.callAtLast?o[e].splice(l,0,s):o[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=[],o=0,i=n[e].length;o<i;o++)n[e][o].h!==t&&r.push(n[e][o]);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],o=this._$eventProcessor;if(r)for(var i=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!o||!o.filter||null==l.query||o.filter(e,l.query))switch(i){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 o&&o.afterTrigger&&o.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],o=this._$eventProcessor;if(r)for(var i=t.length,a=t[i-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!o||!o.filter||null==u.query||o.filter(e,u.query))switch(i){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,i-1))}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e}(),Cd=wd,Ed=Math.log(2);function Md(e,t,n,r,o,i){var a=r+"-"+o,s=e.length;if(i.hasOwnProperty(a))return i[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~o)/Ed);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&o||(d+=(h%2?-1:1)*e[n][p]*Md(e,t-1,c,u,o|f,i),h++)}return i[a]=d,d}function Id(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={},o=Md(n,8,0,0,0,r);if(0!==o){for(var i=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==i[s]&&(i[s]=0),i[s]+=((a+s)%2?-1:1)*Md(n,7,0===a?1:0,1<<a,1<<s,r)/o*t[a];return function(e,t,n){var r=t*i[6]+n*i[7]+1;e[0]=(t*i[0]+n*i[1]+i[2])/r,e[1]=(t*i[3]+n*i[4]+i[5])/r}}}var Ad="___zrEVENTSAVED",Dd=[];function Nd(e,t,n,r,o){if(t.getBoundingClientRect&&$u.domSupported&&!Od(t)){var i=t[Ad]||(t[Ad]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],o=["top","bottom"],i=0;i<4;i++){var a=document.createElement("div"),s=i%2,l=(i>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,i),s=function(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,p=c.left,h=c.top;a.push(p,h),l=l&&i&&p===i[d]&&h===i[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?Id(s,a):Id(a,s))}(a,i,o);if(s)return s(e,n,r),!0}return!1}function Od(e){return"CANVAS"===e.nodeName.toUpperCase()}var Bd=/([&<>"'])/g,Ld={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rd(e){return null==e?"":(e+"").replace(Bd,(function(e,t){return Ld[t]}))}var kd=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pd=[],jd=$u.browser.firefox&&+$u.browser.version.split(".")[0]<39;function Fd(e,t,n,r){return n=n||{},r?Ud(e,t,n):jd&&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):Ud(e,t,n),n}function Ud(e,t,n){if($u.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(Od(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(Nd(Pd,e,r,o))return n.zrX=Pd[0],void(n.zrY=Pd[1])}n.zrX=n.zrY=0}function Hd(e){return e||window.event}function zd(e,t,n){if(null!=(t=Hd(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&Fd(e,o,t,n)}else{Fd(e,t,t,n);var i=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&kd.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Wd(e,t,n,r){e.addEventListener(t,n,r)}function Vd(e,t,n,r){e.removeEventListener(t,n,r)}var Yd=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Gd(e){return 2===e.which||3===e.which}var qd=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i<a;i++){var s=r[i],l=Fd(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},e.prototype._recognize=function(e){for(var t in Zd)if(Zd.hasOwnProperty(t)){var n=Zd[t](this._track,e);if(n)return n}},e}();function Qd(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Zd={pinch:function(e,t){var n=e.length;if(n){var r,o=(e[n-1]||{}).points,i=(e[n-2]||{}).points||o;if(i&&i.length>1&&o&&o.length>1){var a=Qd(o)/Qd(i);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function Xd(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Kd(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function $d(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 Jd(e,t,n){var r=t[0],o=t[2],i=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]=o*c+s*u,e[3]=-o*u+c*s,e[4]=c*i+u*l,e[5]=c*l-u*i,e}function ep(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}var tp=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}(),np=tp,rp=Math.min,op=Math.max,ip=new np,ap=new np,sp=new np,lp=new np,up=new np,cp=new np,dp=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=rp(e.x,this.x),n=rp(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=op(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=op(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=[1,0,0,1,0,0];return $d(o,o,[-t.x,-t.y]),function(e,t,n){var r=n[0],o=n[1];e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o}(o,o,[n,r]),$d(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,p=!(i<l||u<o||s<c||d<a);if(n){var h=1/0,f=0,m=Math.abs(i-l),g=Math.abs(u-o),v=Math.abs(s-c),y=Math.abs(d-a),x=Math.min(m,g),_=Math.min(v,y);i<l||u<o?x>f&&(f=x,m<g?np.set(cp,-m,0):np.set(cp,g,0)):x<h&&(h=x,m<g?np.set(up,m,0):np.set(up,-g,0)),s<c||d<a?_>f&&(f=_,v<y?np.set(cp,0,-v):np.set(cp,0,y)):x<h&&(h=x,v<y?np.set(up,0,v):np.set(up,0,-y))}return n&&np.copy(n,p?up:cp),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 o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}ip.x=sp.x=n.x,ip.y=lp.y=n.y,ap.x=lp.x=n.x+n.width,ap.y=sp.y=n.y+n.height,ip.transform(r),lp.transform(r),ap.transform(r),sp.transform(r),t.x=rp(ip.x,ap.x,sp.x,lp.x),t.y=rp(ip.y,ap.y,sp.y,lp.y);var l=op(ip.x,ap.x,sp.x,lp.x),u=op(ip.y,ap.y,sp.y,lp.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),pp=dp,hp="silent";function fp(){Yd(this.event)}var mp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return M(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Cd),gp=function(e,t){this.x=e,this.y=t},vp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],yp=new pp(0,0,0,0),xp=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new gp(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new mp,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Sd(a),a}return M(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Ec(vp,(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=Tp(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new gp(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new gp(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:fp}}(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new gp(e,t);if(bp(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new pp(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||(yp.copy(c.getBoundingRect()),c.transform&&yp.applyTransform(c.transform),yp.intersect(l)&&i.push(c))}if(i.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(bp(i,o,e+h*Math.cos(f),t+h*Math.sin(f),n),o.target)return o}}return o},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new qd);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 o=r.type;e.gestureEvent=o;var i=new gp;i.target=r.target,this.dispatchToElement(i,o,r.event)}},t}(Cd);function _p(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,o=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(o=!0)}var s=r.__hostTarget;r=s||r.parent}return!o||hp}return!1}function bp(e,t,n,r,o){for(var i=e.length-1;i>=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=_p(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==hp)){t.target=a;break}}}function Tp(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}Ec(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){xp.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=Tp(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||gd(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var Sp=xp;function wp(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o<n&&r(e[o],e[o-1])<0;)o++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,o)}else for(;o<n&&r(e[o],e[o-1])>=0;)o++;return o-t}function Cp(e,t,n,r,o){for(r===t&&r++;r<n;r++){for(var i,a=e[r],s=t,l=r;s<l;)o(a,e[i=s+l>>>1])<0?l=i:s=i+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function Ep(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l<s&&i(e,t[n+o+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&i(e,t[n+o-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=o-l,l=o-u}for(a++;a<l;){var c=a+(l-a>>>1);i(e,t[n+c])>0?a=c+1:l=c}return l}function Mp(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;l<s&&i(e,t[n+o-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=o-l,l=o-u}else{for(s=r-o;l<s&&i(e,t[n+o+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var c=a+(l-a>>>1);i(e,t[n+c])<0?l=c:a=c+1}return l}function Ip(e,t){var n,r,o=7,i=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===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var p=Mp(e[c],e,l,u,0,t);l+=p,0!==(u-=p)&&0!==(d=Ep(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,i,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=i,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,m=o;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)<m);if(f)break;do{if(0!==(p=Mp(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=Ep(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}m--}while(p>=7||h>=7);if(f)break;m<0&&(m=0),m+=2}if((o=m)<1&&(o=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,i,s){var l=0;for(l=0;l<s;l++)a[l]=e[i+l];var u=n+r-1,c=s-1,d=i+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=o;for(;;){var m=0,g=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],m++,g=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],g++,m=0,1==--s){v=!0;break}}while((m|g)<f);if(v)break;do{if(0!==(m=r-Mp(a[c],e,n,r,r-1,t))){for(r-=m,h=(d-=m)+1,p=(u-=m)+1,l=m-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!==(g=s-Ep(e[u],a,0,s,s-1,t))){for(s-=g,h=(d-=g)+1,p=(c-=g)+1,l=0;l<g;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(m>=7||g>=7);if(v)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=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(;i>1;){var e=i-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[i]=e,r[i]=t,i+=1}}}function Ap(e,t,n,r){n||(n=0),r||(r=e.length);var o=r-n;if(!(o<2)){var i=0;if(o<32)Cp(e,n,r,n+(i=wp(e,n,r,t)),t);else{var a=Ip(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(o);do{if((i=wp(e,n,r,t))<s){var l=o;l>s&&(l=s),Cp(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var Dp=!1;function Np(){Dp||(Dp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Op(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Bp=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Op}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,o=t.length;r<o;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Ap(n,Op)},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 o=r,i=e;o;)o.parent=i,o.updateTransform(),t.push(o),i=o,o=o.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)&&(Np(),u.z=0),isNaN(u.z2)&&(Np(),u.z2=0),isNaN(u.zlevel)&&(Np(),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=Sc(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}(),Lp=Bp,Rp=$u.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},kp={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-kp.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*kp.bounceIn(2*e):.5*kp.bounceOut(2*e-1)+.5}},Pp=kp,jp=Math.pow,Fp=Math.sqrt,Up=1e-8,Hp=1e-4,zp=Fp(3),Wp=1/3,Vp=ud(),Yp=ud(),Gp=ud();function qp(e){return e>-1e-8&&e<Up}function Qp(e){return e>Up||e<-1e-8}function Zp(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function Xp(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function Kp(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,d=s*l-9*a*u,p=l*l-3*s*u,h=0;if(qp(c)&&qp(d)){if(qp(s))i[0]=0;else(w=-l/s)>=0&&w<=1&&(i[h++]=w)}else{var f=d*d-4*c*p;if(qp(f)){var m=d/c,g=-m/2;(w=-s/a+m)>=0&&w<=1&&(i[h++]=w),g>=0&&g<=1&&(i[h++]=g)}else if(f>0){var v=Fp(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(w=(-s-((y=y<0?-jp(-y,Wp):jp(y,Wp))+(x=x<0?-jp(-x,Wp):jp(x,Wp))))/(3*a))>=0&&w<=1&&(i[h++]=w)}else{var _=(2*c*s-3*a*d)/(2*Fp(c*c*c)),b=Math.acos(_)/3,T=Fp(c),S=Math.cos(b),w=(-s-2*T*S)/(3*a),C=(g=(-s+T*(S+zp*Math.sin(b)))/(3*a),(-s+T*(S-zp*Math.sin(b)))/(3*a));w>=0&&w<=1&&(i[h++]=w),g>=0&&g<=1&&(i[h++]=g),C>=0&&C<=1&&(i[h++]=C)}}return h}function $p(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(qp(a)){if(Qp(i))(c=-s/i)>=0&&c<=1&&(o[l++]=c)}else{var u=i*i-4*a*s;if(qp(u))o[0]=-i/(2*a);else if(u>0){var c,d=Fp(u),p=(-i-d)/(2*a);(c=(-i+d)/(2*a))>=0&&c<=1&&(o[l++]=c),p>=0&&p<=1&&(o[l++]=p)}}return l}function Jp(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,u=(s-a)*o+a,c=(l-s)*o+s,d=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=r}function eh(e,t,n,r,o,i,a,s,l){for(var u=e,c=t,d=0,p=1/l,h=1;h<=l;h++){var f=h*p,m=Zp(e,n,o,a,f),g=Zp(t,r,i,s,f),v=m-u,y=g-c;d+=Math.sqrt(v*v+y*y),u=m,c=g}return d}function th(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function nh(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function rh(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function oh(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function ih(e,t,n,r,o,i,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var p=d*c,h=th(e,n,o,p),f=th(t,r,i,p),m=h-s,g=f-l;u+=Math.sqrt(m*m+g*g),s=h,l=f}return u}var ah=/cubic-bezier\(([0-9,\.e ]+)\)/;function sh(e){var t=e&&ah.exec(e);if(t){var n=t[1].split(","),r=+Xc(n[0]),o=+Xc(n[1]),i=+Xc(n[2]),a=+Xc(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Kp(0,r,i,1,e,s)&&Zp(0,o,a,1,s[0])}}}var lh=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||sd,this.ondestroy=e.ondestroy||sd,this.onrestart=e.onrestart||sd,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Lc(e)?e:Pp[e]||sh(e)},e}(),uh=function(e){this.value=e},ch=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new uh(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}(),dh=function(){function e(e){this._list=new ch,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new uh(t),a.key=e,n.insertEntry(a),r[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ph=dh,hh={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 fh(e){return(e=Math.round(e))<0?0:e>255?255:e}function mh(e){return e<0?0:e>1?1:e}function gh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?fh(parseFloat(t)/100*255):fh(parseInt(t,10))}function vh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?mh(parseFloat(t)/100):mh(parseFloat(t))}function yh(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 xh(e,t,n){return e+(t-e)*n}function _h(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function bh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Th=new ph(20),Sh=null;function wh(e,t){Sh&&bh(Sh,t),Sh=Th.put(e,Sh||t.slice())}function Ch(e,t){if(e){t=t||[];var n=Th.get(e);if(n)return bh(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in hh)return bh(t,hh[r]),wh(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(_h(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),wh(e,t),t):void _h(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(_h(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),wh(e,t),t):void _h(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?_h(t,+u[0],+u[1],+u[2],1):_h(t,0,0,0,1);c=vh(u.pop());case"rgb":return u.length>=3?(_h(t,gh(u[0]),gh(u[1]),gh(u[2]),3===u.length?c:vh(u[3])),wh(e,t),t):void _h(t,0,0,0,1);case"hsla":return 4!==u.length?void _h(t,0,0,0,1):(u[3]=vh(u[3]),Eh(u,t),wh(e,t),t);case"hsl":return 3!==u.length?void _h(t,0,0,0,1):(Eh(u,t),wh(e,t),t);default:return}}_h(t,0,0,0,1)}}function Eh(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=vh(e[1]),o=vh(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return _h(t=t||[],fh(255*yh(a,i,n+1/3)),fh(255*yh(a,i,n)),fh(255*yh(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Mh(e,t){var n=Ch(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 Dh(n,4===n.length?"rgba":"rgb")}}function Ih(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=fh(xh(a[0],s[0],l)),n[1]=fh(xh(a[1],s[1],l)),n[2]=fh(xh(a[2],s[2],l)),n[3]=mh(xh(a[3],s[3],l)),n}}function Ah(e,t,n,r){var o,i=Ch(e);if(e)return i=function(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l,p=((s-i)/6+l/2)/l;r===s?t=p-d:o===s?t=1/3+c-p:i===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}}(i),null!=t&&(i[0]=(o=t,(o=Math.round(o))<0?0:o>360?360:o)),null!=n&&(i[1]=vh(n)),null!=r&&(i[2]=vh(r)),Dh(Eh(i),"rgba")}function Dh(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 Nh(e,t){var n=Ch(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Oh=Math.round;function Bh(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=Ch(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 Lh=1e-4;function Rh(e){return e<Lh&&e>-1e-4}function kh(e){return Oh(1e3*e)/1e3}function Ph(e){return Oh(1e4*e)/1e4}var jh={left:"start",right:"end",center:"middle",middle:"middle"};function Fh(e){return e&&!!e.image}function Uh(e){return Fh(e)||function(e){return e&&!!e.svgElement}(e)}function Hh(e){return"linear"===e.type}function zh(e){return"radial"===e.type}function Wh(e){return e&&("linear"===e.type||"radial"===e.type)}function Vh(e){return"url(#"+e+")"}function Yh(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 Gh(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*ld,o=Yc(e.scaleX,1),i=Yc(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===o&&1===i||l.push("scale("+o+","+i+")"),(a||s)&&l.push("skew("+Oh(a*ld)+"deg, "+Oh(s*ld)+"deg)"),l.join(" ")}var qh=$u.hasGlobalWindow&&Lc(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},Qh=Array.prototype.slice;function Zh(e,t,n){return(t-e)*n+e}function Xh(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=Zh(t[i],n[i],r);return e}function Kh(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=t[i]+n[i]*r;return e}function $h(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function Jh(e,t){for(var n=e.length,r=t.length,o=n>r?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(n,r);s++)o.push({offset:a.offset,color:a.color.slice()})}function ef(e,t,n){var r=e,o=t;if(r.push&&o.push){var i=r.length,a=o.length;if(i!==a)if(i>a)r.length=a;else for(var s=i;s<a;s++)r.push(1===n?o[s]:Qh.call(o[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=o[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=o[s][u])}}function tf(e){if(Cc(e)){var t=e.length;if(Cc(e[0])){for(var n=[],r=0;r<t;r++)n.push(Qh.call(e[r]));return n}return Qh.call(e)}return e}function nf(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 rf(e){return 4===e||5===e}function of(e){return 1===e||2===e}var af=[0,0,0,0],sf=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,o=r.length,i=!1,a=6,s=t;if(Cc(t)){var l=function(e){return Cc(e&&e[0])?2:1}(t);a=l,(1===l&&!Pc(t[0])||2===l&&!Pc(t[0][0]))&&(i=!0)}else if(Pc(t)&&!Wc(t))a=0;else if(Rc(t))if(isNaN(+t)){var u=Ch(t);u&&(s=u,a=3)}else a=0;else if(zc(t)){var c=bc({},s);c.colorStops=Mc(t.colorStops,(function(e){return{offset:e.offset,color:Ch(e.color)}})),Hh(t)?a=4:zh(t)&&(a=5),s=c}0===o?this.valType=a:a===this.valType&&6!==a||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Lc(n)?n:Pp[n]||sh(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=of(r),l=rf(r),u=0;u<o;u++){var c=n[u],d=c.value,p=i.value;c.percent=c.time/e,a||(s&&u!==o-1?ef(d,p,r):l&&Jh(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<o;u++)0===r?n[u].additiveValue=n[u].value-h:3===r?n[u].additiveValue=Kh([],n[u].value,h,-1):of(r)&&(n[u].additiveValue=1===r?Kh([],n[u].value,h,-1):$h([],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,o,i=null!=this._additiveTrack,a=i?"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=o=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)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,m=0===f?1:h((t-r.percent)/f,1);o.easingFunc&&(m=o.easingFunc(m));var g=i?this._additiveValue:d?af:e[c];if(!of(s)&&!d||g||(g=this._additiveValue=[]),this.discrete)e[c]=m<1?r.rawValue:o.rawValue;else if(of(s))1===s?Xh(g,r[a],o[a],m):function(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=Zh(t[a][s],n[a][s],r)}}(g,r[a],o[a],m);else if(rf(s)){var v=r[a],y=o[a],x=4===s;e[c]={type:x?"linear":"radial",x:Zh(v.x,y.x,m),y:Zh(v.y,y.y,m),colorStops:Mc(v.colorStops,(function(e,t){var n=y.colorStops[t];return{offset:Zh(e.offset,n.offset,m),color:nf(Xh([],e.color,n.color,m))}})),global:y.global},x?(e[c].x2=Zh(v.x2,y.x2,m),e[c].y2=Zh(v.y2,y.y2,m)):e[c].r=Zh(v.r,y.r,m)}else if(d)Xh(g,r[a],o[a],m),i||(e[c]=nf(g));else{var _=Zh(r[a],o[a],m);i?this._additiveValue=_:e[c]=_}i&&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?(Ch(e[n],af),Kh(af,af,r,1),e[n]=nf(af)):1===t?Kh(e[n],e[n],r,1):2===t&&$h(e[n],e[n],r,1)},e}(),lf=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?yc("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,Dc(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var o=this._tracks,i=0;i<n.length;i++){var a=n[i],s=o[a];if(!s){s=o[a]=new sf(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=nf(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,tf(l),r),this._trackKeys.push(a)}s.addKeyframe(e,tf(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 o=n[r].getTrack(e);o&&(t=o)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var i=this._trackKeys[o],a=this._tracks[i],s=this._getAdditiveTrack(i),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 lh({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var o=!1,i=0;i<r.length;i++)if(r[i]._clip){o=!0;break}o||(t._additiveAnimators=null)}for(i=0;i<n.length;i++)n[i].step(t._target,e);var a=t._onframeCbs;if(a)for(i=0;i<a.length;i++)a[i](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 Mc(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,o=0;o<e.length;o++){var i=n[e[o]];i&&!i.isFinished()&&(t?i.step(this._target,1):1===this._started&&i.step(this._target,0),i.setFinished())}var a=!0;for(o=0;o<r.length;o++)if(!n[r[o]].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 o=t[r],i=this._tracks[o];if(i&&!i.isFinished()){var a=i.keyframes,s=a[n?0:a.length-1];s&&(e[o]=tf(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||Dc(e);for(var n=0;n<t.length;n++){var r=t[n],o=this._tracks[r];if(o){var i=o.keyframes;if(i.length>1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}(),uf=lf;function cf(){return(new Date).getTime()}var df,pf,hf,ff=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 M(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=cf()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,Rp((function t(){e._running&&(Rp(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=cf(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=cf(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=cf()-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 uf(e,t.loop);return this.addAnimator(n),n},t}(Cd),mf=ff,gf=$u.domSupported,vf=(pf={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},hf=Mc(df=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],(function(e){var t=e.replace("mouse","pointer");return pf.hasOwnProperty(t)?t:e})),{mouse:df,touch:["touchstart","touchend","touchmove"],pointer:hf}),yf=["mousemove","mouseup"],xf=["pointermove","pointerup"],_f=!1;function bf(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Tf(e){e&&(e.zrByTouch=!0)}function Sf(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 wf=function(e,t){this.stopPropagation=sd,this.stopImmediatePropagation=sd,this.preventDefault=sd,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},Cf={mousedown:function(e){e=zd(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=zd(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=zd(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Sf(this,(e=zd(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){_f=!0,e=zd(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){_f||(e=zd(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Tf(e=zd(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Cf.mousemove.call(this,e),Cf.mousedown.call(this,e)},touchmove:function(e){Tf(e=zd(this.dom,e)),this.handler.processGesture(e,"change"),Cf.mousemove.call(this,e)},touchend:function(e){Tf(e=zd(this.dom,e)),this.handler.processGesture(e,"end"),Cf.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Cf.click.call(this,e)},pointerdown:function(e){Cf.mousedown.call(this,e)},pointermove:function(e){bf(e)||Cf.mousemove.call(this,e)},pointerup:function(e){Cf.mouseup.call(this,e)},pointerout:function(e){bf(e)||Cf.mouseout.call(this,e)}};Ec(["click","dblclick","contextmenu"],(function(e){Cf[e]=function(t){t=zd(this.dom,t),this.trigger(e,t)}}));var Ef={pointermove:function(e){bf(e)||Ef.mousemove.call(this,e)},pointerup:function(e){Ef.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 Mf(e,t){var n=t.domHandlers;$u.pointerEventsSupported?Ec(vf.pointer,(function(r){Af(t,r,(function(t){n[r].call(e,t)}))})):($u.touchEventsSupported&&Ec(vf.touch,(function(r){Af(t,r,(function(o){n[r].call(e,o),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),Ec(vf.mouse,(function(r){Af(t,r,(function(o){o=Hd(o),t.touching||n[r].call(e,o)}))})))}function If(e,t){function n(n){Af(t,n,(function(r){r=Hd(r),Sf(e,r.target)||(r=function(e,t){return zd(e.dom,new wf(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}$u.pointerEventsSupported?Ec(xf,n):$u.touchEventsSupported||Ec(yf,n)}function Af(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Wd(e.domTarget,t,n,r)}function Df(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Vd(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Nf=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},Of=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 Nf(t,Cf),gf&&(r._globalHandlerScope=new Nf(document,Ef)),Mf(r,r._localHandlerScope),r}return M(t,e),t.prototype.dispose=function(){Df(this._localHandlerScope),gf&&Df(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,gf&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?If(this,t):Df(t)}},t}(Cd),Bf=1;$u.hasGlobalWindow&&(Bf=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Lf=Bf,Rf="#333",kf="#ccc",Pf=Xd,jf=5e-5;function Ff(e){return e>jf||e<-5e-5}var Uf=[],Hf=[],zf=[1,0,0,1,0,0],Wf=Math.abs,Vf=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 Ff(this.rotation)||Ff(this.x)||Ff(this.y)||Ff(this.scaleX-1)||Ff(this.scaleY-1)||Ff(this.skewX)||Ff(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):Pf(n),e&&(t?Kd(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&&(Pf(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Uf);var n=Uf[0]<0?-1:1,r=Uf[1]<0?-1:1,o=((Uf[0]-n)*t+n)/Uf[0]||0,i=((Uf[1]-r)*t+r)/Uf[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||[1,0,0,1,0,0],ep(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(Kd(Hf,e.invTransform,t),t=Hf);var n=this.originX,r=this.originY;(n||r)&&(zf[4]=n,zf[5]=r,Kd(Hf,t,zf),Hf[4]-=n,Hf[5]-=r,t=Hf),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&&yd(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&yd(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Wf(e[0]-1)>1e-10&&Wf(e[3]-1)>1e-10?Math.sqrt(Wf(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Gf(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,o=e.scaleX,i=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*o-d*f*i,t[5]=-f*i-p*h*o}else t[4]=t[5]=0;return t[0]=o,t[3]=i,t[1]=p*o,t[2]=d*i,l&&Jd(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}(),Yf=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Gf(e,t){for(var n=0;n<Yf.length;n++){var r=Yf[n];e[r]=t[r]}}var qf={};function Qf(e,t){var n=qf[t=t||ec];n||(n=qf[t]=new ph(500));var r=n.get(e);return null==r&&(r=oc.measureText(e,t).width,n.put(e,r)),r}function Zf(e,t,n,r){var o=Qf(e,t),i=Jf(t),a=Kf(0,o,n),s=$f(0,i,r);return new pp(a,s,o,i)}function Xf(e,t,n,r){var o=((e||"")+"").split("\n");if(1===o.length)return Zf(o[0],t,n,r);for(var i=new pp(0,0,0,0),a=0;a<o.length;a++){var s=Zf(o[a],t,n,r);0===a?i.copy(s):i.union(s)}return i}function Kf(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function $f(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Jf(e){return Qf("国",e)}function em(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function tm(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=em(r[0],n.width),u+=em(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=o,u+=s,c="right",d="middle";break;case"right":l+=o+a,u+=s,d="middle";break;case"top":l+=a/2,u-=o,c="center",d="bottom";break;case"bottom":l+=a/2,u+=i+o,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=o,u+=s,d="middle";break;case"insideRight":l+=a-o,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=o,c="center";break;case"insideBottom":l+=a/2,u+=i-o,c="center",d="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,c="right";break;case"insideBottomLeft":l+=o,u+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,u+=i-o,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var nm="__zr_normal__",rm=Yf.concat(["ignore"]),om=Ic(Yf,(function(e,t){return e[t]=!0,e}),{ignore:!1}),im={},am=new pp(0,0,0,0),sm=function(){function e(e){this.id=vc(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var u=am;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(im,n,u):tm(im,n,u),o.x=im.x,o.y=im.y,i=im.align,a=im.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=em(c[0],u.width),p=em(c[1],u.height)),l=!0,o.originX=-o.x+d+(r?0:u.x),o.originY=-o.y+p+(r?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var h=n.offset;h&&(o.x+=h[0],o.y+=h[1],l||(o.originX=-h[0],o.originY=-h[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(g=n.insideFill,v=n.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(g),y=!0)):(g=n.outsideFill,v=n.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(g),y=!0)),(g=g||"#000")===m.fill&&v===m.stroke&&y===m.autoStroke&&i===m.align&&a===m.verticalAlign||(s=!0,m.fill=g,m.stroke=v,m.autoStroke=y,m.align=i,m.verticalAlign=a,t.setDefaultTextStyle(m)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?kf:Rf},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Ch(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,Dh(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||{},bc(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(jc(e))for(var n=Dc(e),r=0;r<n.length;r++){var o=n[r];this.attrKV(o,e[o])}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],o=r.__fromStateTransition;if(!(r.getLoop()||o&&o!==nm)){var i=r.targetName,a=i?t[i]: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,rm)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];null==e[o]||o in t||(t[o]=this[o])}},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(nm,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===nm;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(Sc(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}yc("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s<i;s++)if(e[s]!==o[s]){a=!1;break}if(a)return;for(s=0;s<i;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[i-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,m=this._textGuide;f&&f.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype._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=Sc(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(),o=Sc(r,e),i=Sc(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r];bc(n,o),o.textConfig&&bc(t=t||{},o.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,o,i){var a=!(t&&r);t&&t.textConfig?(this.textConfig=bc({},r?this.textConfig:n.textConfig),bc(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<rm.length;u++){var c=rm[u],d=o&&om[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(!o)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,i)},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 Vf,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),bc(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,o=new uf(r,t,n);return e&&(o.targetName=e),this.addAnimator(o,e),o},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=Sc(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,o=[],i=0;i<r;i++){var a=n[i];e&&e!==a.scope?o.push(a):a.stop(t)}return this.animators=o,this},e.prototype.animateTo=function(e,t,n){lm(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){lm(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var o=lm(this,t,n,r),i=0;i<o.length;i++)o[i].__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,o){function i(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||i(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[o]=e[1],this[n]=e,i(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 lm(e,t,n,r,o){var i=[];dm(e,"",e,t,n=n||{},r,i,o);var a=i.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(),i.length>0&&n.during&&i[0].during((function(e,t){n.during(t)}));for(var p=0;p<i.length;p++){var h=i[p];c&&h.done(c),d&&h.aborted(d),n.force&&h.duration(n.duration),h.start(n.easing)}return i}function um(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function cm(e,t,n){if(Cc(t[n]))if(Cc(e[n])||(e[n]=[]),Uc(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),um(e[n],t[n],r))}else{var o=t[n],i=e[n],a=o.length;if(Cc(o[0]))for(var s=o[0].length,l=0;l<a;l++)i[l]?um(i[l],o[l],s):i[l]=Array.prototype.slice.call(o[l]);else um(i,o,a);i.length=o.length}else e[n]=t[n]}function dm(e,t,n,r,o,i,a,s){for(var l=Dc(r),u=o.duration,c=o.delay,d=o.additive,p=o.setToFinal,h=!jc(i),f=e.animators,m=[],g=0;g<l.length;g++){var v=l[g],y=r[v];if(null!=y&&null!=n[v]&&(h||i[v]))if(!jc(y)||Cc(y)||zc(y))m.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}dm(e,v,n[v],y,o,i&&i[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),m.push(v))}var x=m.length;if(!d&&x)for(var _=0;_<f.length;_++){if((T=f[_]).targetName===t)if(T.stopTracks(m)){var b=Sc(f,T);f.splice(b,1)}}if(o.force||(m=Ac(m,(function(e){return t=r[e],o=n[e],!(t===o||Cc(t)&&Cc(o)&&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,o));var t,o})),x=m.length),x>0||o.force&&!a.length){var T,S=void 0,w=void 0,C=void 0;if(s){w={},p&&(S={});for(_=0;_<x;_++){w[v=m[_]]=n[v],p?S[v]=r[v]:n[v]=r[v]}}else if(p){C={};for(_=0;_<x;_++){C[v=m[_]]=tf(n[v]),cm(n,r,v)}}(T=new uf(n,!1,!1,d?Ac(f,(function(e){return e.targetName===t})):null)).targetName=t,o.scope&&(T.scope=o.scope),p&&S&&T.whenWithKeys(0,S,m),C&&T.whenWithKeys(0,C,m),T.whenWithKeys(null==u?500:u,s?w:r,m).delay(c||0),e.addAnimator(T,t),a.push(T)}}wc(sm,Cd),wc(sm,Vf);var pm=sm,hm=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return M(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=Sc(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Sc(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 o=n[r];e.call(t,o,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],o=e.call(t,r);r.isGroup&&!o&&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 pp(0,0,0,0),n=e||this._children,r=[],o=null,i=0;i<n.length;i++){var a=n[i];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(pp.applyTransform(t,s,l),(o=o||t.clone()).union(t)):(o=o||s.clone()).union(s)}}return o||t},t}(pm);hm.prototype.type="group";var fm=hm,mm={},gm={};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-query"),r=require("@material-ui/core"),o=require("@yugabyte-ui-library/core"),i=require("@material-ui/core/styles"),a=require("http"),s=require("https"),l=require("url"),u=require("stream"),c=require("assert"),d=require("tty"),p=require("util"),h=require("os"),f=require("zlib"),m=require("@material-ui/icons"),g=require("vis-timeline/standalone");require("vis-timeline/styles/vis-timeline-graph2d.css?inline");var v=require("@material-ui/lab"),y=require("react-dom");function x(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 _=x(t);function b(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=b(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function T(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=b(e))&&(r&&(r+=" "),r+=t);return r}var S=i.makeStyles((function(e){var t;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),queryPreBlockYBM:{display:"block",width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word",backgroundColor:"#F8FBFC !important",cursor:"pointer"},queryPreBlockWeb:{display:"block",width:"100%",whiteSpace:"pre-wrap",wordBreak:"break-word",backgroundColor:"#F8FBFC !important",cursor:"pointer"},queryPreBlockFull:{cursor:"pointer",maxWidth:"-webkit-fill-available",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")},queryCodeElementWeb:{lineHeight:1.5,whiteSpace:"nowrap",overflow:"hidden !important",textOverflow:"ellipsis",padding:"".concat(e.spacing(1.25,0,1,2)," !important"),display:"block"},queryContainerCodeInTable:{width:"100%",display:"flex",flexDirection:"column",margin:"0 !important",marginBottom:"0 !important",borderRadius:e.shape.borderRadius,padding:"0px !important","& pre":{padding:"0 24px 0 6px !important",margin:"0 !important",border:"0px !important",overflow:"hidden !important",backgroundColor:"".concat(e.palette.grey[50]," !important"),"& code":{padding:"0 !important",fontSize:"11.5px !important",lineHeight:"28px !important",margin:"0 16px 0 0 !important"},"& button":{top:"-2px !important"}}},queryContainerCodeInBreadcrumbs:{width:"100%",display:"flex",flexDirection:"column",margin:"0 !important",marginBottom:"0 !important",borderRadius:e.shape.borderRadius,padding:"0px !important","& pre":{margin:"0 !important",border:"0px !important",padding:"6px 24px 6px 16px !important",backgroundColor:"".concat(e.palette.grey[50]," !important"),"& code":{padding:"0 !important",margin:"0 16px 0 0 !important"},"& button":{top:"4px !important"}}},codeClassNameInTable:{fontSize:"11.5px !important"},preClassNameInTable:{fontSize:"11.5px !important"},defaultActions:{textAlign:"right"},overrideExpandBtn:{padding:e.spacing(0,2)},preQueryBlock:{backgroundColor:"#F7FAFC !important"},queryCellBox:{display:"flex",width:"100%",paddingRight:e.spacing(2)}}})),w=r.makeStyles({errorContainer:{textAlign:"center",fontSize:"16px",lineHeight:"2em"},sadFace:{width:"40px"},errorText:{fontSize:"13px",fontFamily:"Inter",fontWeight:400}}),C=function(t){var n=t.type,o=t.uuid,i=t.customErrorMessage,a=w(),s=e.jsx("span",{}),l=e.jsx("span",{});return"universe"===n&&(s=e.jsx(r.Box,{children:"Seems like universe with UUID ".concat(o," has issues or does not exist.")})),e.jsxs(r.Box,{className:a.errorContainer,children:[e.jsx(r.Box,{children:e.jsx("span",{children:"Aww Snap."})}),e.jsx(r.Box,{children:s}),i&&e.jsx(r.Box,{children:e.jsx("span",{className:a.errorText,children:i})}),e.jsx(r.Box,{children:l})]})},E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function M(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}E(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var I=function(){return I=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},I.apply(this,arguments)};function A(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function D(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(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 N(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[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]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function O(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var B=e=>"checkbox"===e.type,L=e=>e instanceof Date,R=e=>null==e;const k=e=>"object"==typeof e;var P=e=>!R(e)&&!Array.isArray(e)&&k(e)&&!L(e),j=e=>P(e)&&e.target?B(e.target)?e.target.checked:e.target.value:e,F=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),U=e=>Array.isArray(e)?e.filter(Boolean):[],H=e=>void 0===e,z=(e,t,n)=>{if(!t||!P(e))return n;const r=U(t.split(/[,[\].]+?/)).reduce(((e,t)=>R(e)?e:e[t]),e);return H(r)||r===e?H(e[t])?n:e[t]:r};const W="blur",V="focusout",Y="change",G="onBlur",q="onChange",Q="onSubmit",Z="onTouched",X="all",K="max",$="min",J="maxLength",ee="minLength",te="pattern",ne="required",re="validate",oe=t.createContext(null),ie=()=>t.useContext(oe),ae=e=>{const{children:n,...r}=e;return t.createElement(oe.Provider,{value:r},n)};var se=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==X&&(t._proxyFormState[o]=!r||X),n&&(n[o]=!0),e[o]}});return o},le=e=>P(e)&&!Object.keys(e).length,ue=(e,t,n)=>{const{name:r,...o}=e;return le(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!n||X)))},ce=e=>Array.isArray(e)?e:[e],de=(e,t,n)=>n&&t?e===t:!e||!t||e===t||ce(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function pe(e){const n=t.useRef(e);n.current=e,t.useEffect((()=>{const t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>{t&&t.unsubscribe()}}),[e.disabled])}var he=e=>"string"==typeof e,fe=(e,t,n,r)=>he(e)?(r&&t.watch.add(e),z(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),z(n,e)))):(r&&(t.watchAll=!0),n),me="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function ge(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(me&&(e instanceof Blob||e instanceof FileList)||!n&&!P(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return P(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=ge(e[n]);else t=e}return t}function ve(e){const n=ie(),{name:r,control:o=n.control,shouldUnregister:i}=e,a=F(o._names.array,r),s=function(e){const n=ie(),{control:r=n.control,name:o,defaultValue:i,disabled:a,exact:s}=e||{},l=t.useRef(o);l.current=o,pe({disabled:a,subject:r._subjects.watch,callback:e=>{if(de(l.current,e.name,s)){const t=fe(l.current,r._names,e.values||r._formValues);c(H(t)?i:ge(t))}}});const[u,c]=t.useState(H(i)?r._getWatch(o):i);return t.useEffect((()=>r._removeUnmounted())),u}({control:o,name:r,defaultValue:z(o._formValues,r,z(o._defaultValues,r,e.defaultValue)),exact:!0}),l=function(e){const n=ie(),{control:r=n.control,disabled:o,name:i,exact:a}=e||{},[s,l]=t.useState(r._formState),u=t.useRef(!0),c=t.useRef({isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=t.useRef(i);return d.current=i,pe({disabled:o,callback:t.useCallback((e=>u.current&&de(d.current,e.name,a)&&ue(e,c.current)&&l({...r._formState,...e})),[r,a]),subject:r._subjects.state}),t.useEffect((()=>{u.current=!0;const e=r._proxyFormState.isDirty&&r._getDirty();return e!==r._formState.isDirty&&r._subjects.state.next({isDirty:e}),r._updateValid(),()=>{u.current=!1}}),[r]),se(s,r,c.current,!1)}({control:o,name:r}),u=t.useRef(o.register(r,{...e.rules,value:s}));return t.useEffect((()=>{const e=(e,t)=>{const n=z(o._fields,e);n&&(n._f.mount=t)};return e(r,!0),()=>{const t=o._options.shouldUnregister||i;(a?t&&!o._stateFlags.action:t)?o.unregister(r):e(r,!1)}}),[r,o,a,i]),{field:{name:r,value:s,onChange:t.useCallback((e=>u.current.onChange({target:{value:j(e),name:r},type:Y})),[r]),onBlur:t.useCallback((()=>u.current.onBlur({target:{value:z(o._formValues,r),name:r},type:W})),[r,o]),ref:e=>{const t=z(o._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!z(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!z(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!z(l.touchedFields,r)},error:{enumerable:!0,get:()=>z(l.errors,r)}})}}var ye=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},xe=e=>/^\w*$/.test(e),_e=e=>U(e.replace(/["|']|\]/g,"").split(/\.|\[/));function be(e,t,n){let r=-1;const o=xe(t)?[t]:_e(t),i=o.length,a=i-1;for(;++r<i;){const t=o[r];let i=n;if(r!==a){const n=e[t];i=P(n)||Array.isArray(n)?n:isNaN(+o[r+1])?{}:[]}e[t]=i,e=e[t]}return e}const Te=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=z(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 P(r)&&Te(r,t)}}};var Se=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),we=(e,t,n)=>{const r=U(z(e,n));return be(r,"root",t[n]),be(e,n,r),e},Ce=e=>"boolean"==typeof e,Ee=e=>"file"===e.type,Me=e=>"function"==typeof e,Ie=e=>he(e)||t.isValidElement(e),Ae=e=>"radio"===e.type,De=e=>e instanceof RegExp;const Ne={value:!1,isValid:!1},Oe={value:!0,isValid:!0};var Be=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&&!H(e[0].attributes.value)?H(e[0].value)||""===e[0].value?Oe:{value:e[0].value,isValid:!0}:Oe:Ne}return Ne};const Le={isValid:!1,value:null};var Re=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Le):Le;function ke(e,t,n="validate"){if(Ie(e)||Array.isArray(e)&&e.every(Ie)||Ce(e)&&!e)return{type:n,message:Ie(e)?e:"",ref:t}}var Pe=e=>P(e)&&!De(e)?e:{value:e,message:""},je=async(e,t,n,r,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:c,max:d,pattern:p,validate:h,name:f,valueAsNumber:m,mount:g,disabled:v}=e._f;if(!g||v)return{};const y=a?a[0]:i,x=e=>{r&&y.reportValidity&&(y.setCustomValidity(Ce(e)?"":e||""),y.reportValidity())},_={},b=Ae(i),T=B(i),S=b||T,w=(m||Ee(i))&&!i.value||""===t||Array.isArray(t)&&!t.length,C=ye.bind(null,f,n,_),E=(e,t,n,r=J,o=ee)=>{const a=e?t:n;_[f]={type:e?r:o,message:a,ref:i,...C(e?r:o,a)}};if(o?!Array.isArray(t)||!t.length:s&&(!S&&(w||R(t))||Ce(t)&&!t||T&&!Be(a).isValid||b&&!Re(a).isValid)){const{value:e,message:t}=Ie(s)?{value:!!s,message:s}:Pe(s);if(e&&(_[f]={type:ne,message:t,ref:y,...C(ne,t)},!n))return x(t),_}if(!(w||R(c)&&R(d))){let e,r;const o=Pe(d),a=Pe(c);if(R(t)||isNaN(t)){const n=i.valueAsDate||new Date(t),s=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,u="week"==i.type;he(o.value)&&t&&(e=l?s(t)>s(o.value):u?t>o.value:n>new Date(o.value)),he(a.value)&&t&&(r=l?s(t)<s(a.value):u?t<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(t?+t:t);R(o.value)||(e=n>o.value),R(a.value)||(r=n<a.value)}if((e||r)&&(E(!!e,o.message,a.message,K,$),!n))return x(_[f].message),_}if((l||u)&&!w&&(he(t)||o&&Array.isArray(t))){const e=Pe(l),r=Pe(u),o=!R(e.value)&&t.length>e.value,i=!R(r.value)&&t.length<r.value;if((o||i)&&(E(o,e.message,r.message),!n))return x(_[f].message),_}if(p&&!w&&he(t)){const{value:e,message:r}=Pe(p);if(De(e)&&!t.match(e)&&(_[f]={type:te,message:r,ref:i,...C(te,r)},!n))return x(r),_}if(h)if(Me(h)){const e=ke(await h(t),y);if(e&&(_[f]={...e,...C(re,e.message)},!n))return x(e.message),_}else if(P(h)){let e={};for(const r in h){if(!le(e)&&!n)break;const o=ke(await h[r](t),y,r);o&&(e={...o,...C(r,o.message)},x(o.message),n&&(_[f]=e))}if(!le(e)&&(_[f]={ref:y,...e},!n))return _}return x(!0),_},Fe=e=>({isOnSubmit:!e||e===Q,isOnBlur:e===G,isOnChange:e===q,isOnAll:e===X,isOnTouch:e===Z});function Ue(e){for(const t in e)if(!H(e[t]))return!1;return!0}function He(e,t){const n=xe(t)?[t]:_e(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=H(e)?r++:e[t[r++]];return e}(e,n),o=n[n.length-1];let i;r&&delete r[o];for(let t=0;t<n.slice(0,-1).length;t++){let r,o=-1;const a=n.slice(0,-(t+1)),s=a.length-1;for(t>0&&(i=e);++o<a.length;){const t=a[o];r=r?r[t]:e[t],s===o&&(P(r)&&le(r)||Array.isArray(r)&&Ue(r))&&(i?delete i[t]:delete e[t]),i=r}}return e}function ze(){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 We=e=>R(e)||!k(e);function Ve(e,t){if(We(e)||We(t))return e===t;if(L(e)&&L(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const n=e[o];if(!r.includes(o))return!1;if("ref"!==o){const e=t[o];if(L(n)&&L(e)||P(n)&&P(e)||Array.isArray(n)&&Array.isArray(e)?!Ve(n,e):n!==e)return!1}}return!0}var Ye=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ge=e=>"select-multiple"===e.type,qe=e=>Ye(e)&&e.isConnected,Qe=e=>{for(const t in e)if(Me(e[t]))return!0;return!1};function Ze(e,t={}){const n=Array.isArray(e);if(P(e)||n)for(const n in e)Array.isArray(e[n])||P(e[n])&&!Qe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Ze(e[n],t[n])):R(e[n])||(t[n]=!0);return t}function Xe(e,t,n){const r=Array.isArray(e);if(P(e)||r)for(const r in e)Array.isArray(e[r])||P(e[r])&&!Qe(e[r])?H(t)||We(n[r])?n[r]=Array.isArray(e[r])?Ze(e[r],[]):{...Ze(e[r])}:Xe(e[r],R(t)?{}:t[r],n[r]):Ve(e[r],t[r])?delete n[r]:n[r]=!0;return n}var Ke=(e,t)=>Xe(e,t,Ze(t)),$e=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>H(e)?e:t?""===e?NaN:e?+e:e:n&&he(e)?new Date(e):r?r(e):e;function Je(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Ee(t)?t.files:Ae(t)?Re(e.refs).value:Ge(t)?[...t.selectedOptions].map((({value:e})=>e)):B(t)?Be(e.refs).value:$e(H(t.value)?e.ref.value:t.value,e)}var et=e=>H(e)?e:De(e)?e.source:P(e)?De(e.value)?e.value.source:e.value:e;function tt(e,t,n){const r=z(e,n);if(r||xe(n))return{error:r,name:n};const o=n.split(".");for(;o.length;){const r=o.join("."),i=z(t,r),a=z(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(a&&a.type)return{name:r,error:a};o.pop()}return{name:n}}const nt={mode:Q,reValidateMode:q,shouldFocusError:!0};function rt(e={}){let t,n={...nt,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},i=ge(n.defaultValues)||{},a=n.shouldUnregister?{}:ge(i),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:ze(),array:ze(),state:ze()},p=Fe(n.mode),h=Fe(n.reValidateMode),f=n.criteriaMode===X,m=async()=>{if(c.isValid){const e=n.resolver?le((await _()).errors):await b(o,!0);e!==r.isValid&&(r.isValid=e,d.state.next({isValid:e}))}},g=e=>c.isValidating&&e!==r.isValidating&&d.state.next({isValidating:e}),v=(e,t,n,r)=>{const l=z(o,e);if(l){const o=z(a,e,H(n)?z(i,e):n);H(o)||r&&r.defaultChecked||t?be(a,e,t?o:Je(l._f)):w(e,o),s.mount&&m()}},y=(e,t,n,o,a)=>{let s=!1,l=!1;const u={name:e};if((!n||o)&&(c.isDirty&&(l=r.isDirty,r.isDirty=u.isDirty=T(),s=l!==u.isDirty),c.dirtyFields)){l=z(r.dirtyFields,e);const n=Ve(z(i,e),t);n?He(r.dirtyFields,e):be(r.dirtyFields,e,!0),u.dirtyFields=r.dirtyFields,s=s||l!==!n}if(n){const t=z(r.touchedFields,e);t||(be(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,o,i,a)=>{const s=z(r.errors,n),l=c.isValid&&Ce(o)&&r.isValid!==o;var p;if(e.delayError&&i?(p=()=>((e,t)=>{be(r.errors,e,t),d.state.next({errors:r.errors})})(n,i),t=e=>{clearTimeout(u),u=window.setTimeout(p,e)},t(e.delayError)):(clearTimeout(u),t=null,i?be(r.errors,n,i):He(r.errors,n)),(i?!Ve(s,i):s)||!le(a)||l){const e={...a,...l&&Ce(o)?{isValid:o}:{},errors:r.errors,name:n};r={...r,...e},d.state.next(e)}g(!1)},_=async e=>await n.resolver(a,n.context,((e,t,n,r)=>{const o={};for(const n of e){const e=z(t,n);e&&be(o,n,e._f)}return{criteriaMode:n,names:[...e],fields:o,shouldUseNativeValidation:r}})(e||l.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),b=async(e,t,o={valid:!0})=>{for(const i in e){const s=e[i];if(s){const{_f:e,...i}=s;if(e){const i=l.array.has(e.name),u=await je(s,z(a,e.name),f,n.shouldUseNativeValidation,i);if(u[e.name]&&(o.valid=!1,t))break;!t&&(z(u,e.name)?i?we(r.errors,u,e.name):be(r.errors,e.name,u[e.name]):He(r.errors,e.name))}i&&await b(i,t,o)}}return o.valid},T=(e,t)=>(e&&t&&be(a,e,t),!Ve(A(),i)),S=(e,t,n)=>fe(e,l,{...s.mount?a:H(t)?i:he(e)?{[e]:t}:t},n),w=(e,t,n={})=>{const r=z(o,e);let i=t;if(r){const n=r._f;n&&(!n.disabled&&be(a,e,$e(t,n)),i=me&&Ye(n.ref)&&R(t)?"":t,Ge(n.ref)?[...n.ref.options].forEach((e=>e.selected=i.includes(e.value))):n.refs?B(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):n.refs[0]&&(n.refs[0].checked=!!i):n.refs.forEach((e=>e.checked=e.value===i)):Ee(n.ref)?n.ref.value="":(n.ref.value=i,n.ref.type||d.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,i,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&I(e)},C=(e,t,n)=>{for(const r in t){const i=t[r],a=`${e}.${r}`,s=z(o,a);!l.array.has(e)&&We(i)&&(!s||s._f)||L(i)?w(a,i,n):C(a,i,n)}},E=(e,t,n={})=>{const s=z(o,e),u=l.array.has(e),p=ge(t);be(a,e,p),u?(d.array.next({name:e,values:a}),(c.isDirty||c.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=Ke(i,a),d.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:T(e,p)}))):!s||s._f||R(p)?w(e,p,n):C(e,p,n),Se(e,l)&&d.state.next({}),d.watch.next({name:e})},M=async e=>{const i=e.target;let s=i.name;const u=z(o,s),v=()=>i.type?Je(u._f):j(e);if(u){let i,S;const w=v(),C=e.type===W||e.type===V,E=!((T=u._f).mount&&(T.required||T.min||T.max||T.maxLength||T.minLength||T.pattern||T.validate)||n.resolver||z(r.errors,s)||u._f.deps)||((e,t,n,r,o)=>!o.isOnAll&&(!n&&o.isOnTouch?!(t||e):(n?r.isOnBlur:o.isOnBlur)?!e:!(n?r.isOnChange:o.isOnChange)||e))(C,z(r.touchedFields,s),r.isSubmitted,h,p),M=Se(s,l,C);be(a,s,w),C?(u._f.onBlur&&u._f.onBlur(e),t&&t(0)):u._f.onChange&&u._f.onChange(e);const A=y(s,w,C,!1),D=!le(A)||M;if(!C&&d.watch.next({name:s,type:e.type}),E)return c.isValid&&m(),D&&d.state.next({name:s,...M?{}:A});if(!C&&M&&d.state.next({}),g(!0),n.resolver){const{errors:e}=await _([s]),t=tt(r.errors,o,s),n=tt(e,o,t.name||s);i=n.error,s=n.name,S=le(e)}else i=(await je(u,z(a,s),f,n.shouldUseNativeValidation))[s],i?S=!1:c.isValid&&(S=await b(o,!0));We(w)&&v()!==w?g(!1):(u._f.deps&&I(u._f.deps),x(s,S,i,A))}var T},I=async(e,t={})=>{let i,a;const s=ce(e);if(g(!0),n.resolver){const t=await(async e=>{const{errors:t}=await _();if(e)for(const n of e){const e=z(t,n);e?be(r.errors,n,e):He(r.errors,n)}else r.errors=t;return t})(H(e)?e:s);i=le(t),a=e?!s.some((e=>z(t,e))):i}else e?(a=(await Promise.all(s.map((async e=>{const t=z(o,e);return await b(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&m()):a=i=await b(o);return d.state.next({...!he(e)||c.isValid&&i!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:i}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!a&&Te(o,(e=>e&&z(r.errors,e)),e?s:l.mount),a},A=e=>{const t={...i,...s.mount?a:{}};return H(e)?t:he(e)?z(t,e):e.map((e=>z(t,e)))},D=(e,t)=>({invalid:!!z((t||r).errors,e),isDirty:!!z((t||r).dirtyFields,e),isTouched:!!z((t||r).touchedFields,e),error:z((t||r).errors,e)}),N=(e,t={})=>{for(const s of e?ce(e):l.mount)l.mount.delete(s),l.array.delete(s),z(o,s)&&(t.keepValue||(He(o,s),He(a,s)),!t.keepError&&He(r.errors,s),!t.keepDirty&&He(r.dirtyFields,s),!t.keepTouched&&He(r.touchedFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&He(i,s));d.watch.next({}),d.state.next({...r,...t.keepDirty?{isDirty:T()}:{}}),!t.keepIsValid&&m()},O=(e,t={})=>{let r=z(o,e);const u=Ce(t.disabled);return be(o,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?u&&be(a,e,t.disabled?void 0:z(a,e,Je(r._f))):v(e,!0,t.value),{...u?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:et(t.min),max:et(t.max),minLength:et(t.minLength),maxLength:et(t.maxLength),pattern:et(t.pattern)}:{},name:e,onChange:M,onBlur:M,ref:a=>{if(a){O(e,t),r=z(o,e);const n=H(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>Ae(e)||B(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;be(o,e,{_f:{...r._f,...s?{refs:[...l.filter(qe),n,...Array.isArray(z(i,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=z(o,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!F(l.array,e)||!s.action)&&l.unMount.add(e)}}},k=()=>n.shouldFocusError&&Te(o,(e=>e&&z(r.errors,e)),l.mount);return{control:{register:O,unregister:N,getFieldState:D,_executeSchema:_,_focusError:k,_getWatch:S,_getDirty:T,_updateValid:m,_removeUnmounted:()=>{for(const e of l.unMount){const t=z(o,e);t&&(t._f.refs?t._f.refs.every((e=>!qe(e))):!qe(t._f.ref))&&N(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,u=!0,p=!0)=>{if(l&&n){if(s.action=!0,p&&Array.isArray(z(o,e))){const t=n(z(o,e),l.argA,l.argB);u&&be(o,e,t)}if(p&&Array.isArray(z(r.errors,e))){const t=n(z(r.errors,e),l.argA,l.argB);u&&be(r.errors,e,t),((e,t)=>{!U(z(e,t)).length&&He(e,t)})(r.errors,e)}if(c.touchedFields&&p&&Array.isArray(z(r.touchedFields,e))){const t=n(z(r.touchedFields,e),l.argA,l.argB);u&&be(r.touchedFields,e,t)}c.dirtyFields&&(r.dirtyFields=Ke(i,a)),d.state.next({name:e,isDirty:T(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else be(a,e,t)},_getFieldArray:t=>U(z(s.mount?a:i,t,e.shouldUnregister?z(i,t,[]):[])),_subjects:d,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _stateFlags(){return s},set _stateFlags(e){s=e},get _defaultValues(){return i},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 i=>{i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let s=!0,l=ge(a);d.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await _();r.errors=e,l=t}else await b(o);le(r.errors)?(d.state.next({errors:{},isSubmitting:!0}),await e(l,i)):(t&&await t({...r.errors},i),k())}catch(e){throw s=!1,e}finally{r.isSubmitted=!0,d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:le(r.errors)&&s,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>Me(e)?d.watch.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:E,getValues:A,reset:(t,n)=>((t,n={})=>{const u=t||i,p=ge(u),h=t&&!le(t)?p:i;if(n.keepDefaultValues||(i=u),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)z(r.dirtyFields,e)?be(h,e,z(a,e)):E(e,z(h,e));else{if(me&&H(t))for(const e of l.mount){const t=z(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Ye(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}a=e.shouldUnregister?n.keepDefaultValues?ge(i):{}: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||Ve(t,i)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?Ke(i,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(Me(t)?t(a):t,n),resetField:(e,t={})=>{z(o,e)&&(H(t.defaultValue)?E(e,z(i,e)):(E(e,t.defaultValue),be(i,e,t.defaultValue)),t.keepTouched||He(r.touchedFields,e),t.keepDirty||(He(r.dirtyFields,e),r.isDirty=t.defaultValue?T(e,z(i,e)):T()),t.keepError||(He(r.errors,e),c.isValid&&m()),d.state.next({...r}))},clearErrors:e=>{e?ce(e).forEach((e=>He(r.errors,e))):r.errors={},d.state.next({errors:r.errors})},unregister:N,setError:(e,t,n)=>{const i=(z(o,e,{_f:{}})._f||{}).ref;be(r.errors,e,{...t,ref:i}),d.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},setFocus:(e,t={})=>{const n=z(o,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 ot(e={}){const n=t.useRef(),[r,o]=t.useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});n.current||(n.current={...rt(e),formState:r});const i=n.current.control;return i._options=e,pe({subject:i._subjects.state,callback:t.useCallback((e=>{ue(e,i._proxyFormState,!0)&&(i._formState={...i._formState,...e},o({...i._formState}))}),[i])}),t.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()})),t.useEffect((()=>{r.submitCount&&i._focusError()}),[i,r.submitCount]),n.current.formState=se(r,i),n.current}var it,at,st,lt=function(t){var n,r,i=t.name,a=t.rules,s=t.defaultValue,l=t.control,u=t.shouldUnregister,c=A(t,["name","rules","defaultValue","control","shouldUnregister"]),d=ve({name:i,rules:a,defaultValue:s,control:l,shouldUnregister:u}),p=d.field,h=p.ref,f=A(p,["ref"]),m=d.fieldState;return e.jsx(o.YBInput,I({},f,c,{inputRef:h,error:!!m.error,helperText:null!==(r=null===(n=m.error)||void 0===n?void 0:n.message)&&void 0!==r?r:c.helperText}))},ut=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:{width:"60px",height:"32px","& .yb-MuiInputBase-formControl":{border:"0px none"}},dropdownMenu:{"& .MuiMenu-list":{display:"flex",flexDirection:"column"}}}})),ct=function(n){var i=n.dataPrefetchFn,a=n.page,s=n.onPageChange,l=n.onPageSizeChange,u=n.hasMoreData,c=n.total,d=n.rowsPerPageOptions,p=void 0===d?[10,20,50]:d,h=n.rowsPerPage,f=n.showRecordsPerPage,m=n.recordsPerPageCaption,g=void 0===m?"":m,v=ut(),y=Math.ceil(c/(null!=h?h:p[0])),x=t.useCallback((function(e){e===y&&u&&i(),s(e-1)}),[i,s,u,y]);return t.useEffect((function(){0===a&&h===c&&u&&i()}),[]),e.jsxs(r.Box,{className:v.root,children:[f&&e.jsxs(r.Grid,{item:!0,xs:12,lg:4,className:v.dropdownContainer,children:[g&&e.jsx(r.Box,{mr:1,minWidth:"100px",children:g}),e.jsx(o.YBSelect,{value:h,onChange:function(e){l(e.target.value)},className:v.dropdown,dataTestId:"RowsPerPageSelect",menuProps:{className:v.dropdownMenu,anchorOrigin:{vertical:"top",horizontal:"left"}},children:p.map((function(t){return e.jsx(r.MenuItem,{value:t,"data-testid":"RowsPerPageSelectMenuItem-".concat(t),children:t},t)}))})]}),e.jsx(r.Box,{ml:4,children:e.jsx(o.YBPagination,{currentPage:a+1,pageSize:y,onPageSelect:x,hasMore:u,dataTestId:"TablePagination"})})]})},dt=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"}}})),pt=function(t){var n=t.noBackground,o=t.className,i=t.bodyClassName,a=t.children,s=t.body,l=t.header,u=t.title,c=dt(),d=T(c.body,n&&c.transparentBody,i);return e.jsxs(r.Box,{className:o?c.contentPanel+o:"classes.contentPanel",children:[(l||u)&&e.jsxs(r.Box,{className:c.header,children:[l," ",u]}),e.jsx(r.Box,{className:"container",children:s&&e.jsxs(r.Box,{className:d,children:[s,a]})})]})};exports.NodeState=void 0,(at=exports.NodeState||(exports.NodeState={})).ToBeAdded="ToBeAdded",at.Provisioned="Provisioned",at.SoftwareInstalled="SoftwareInstalled",at.UpgradeSoftware="UpgradeSoftware",at.UpdateGFlags="UpdateGFlags",at.Live="Live",at.Stopping="Stopping",at.Starting="Starting",at.Stopped="Stopped",at.Unreachable="Unreachable",at.ToBeRemoved="ToBeRemoved",at.Removing="Removing",at.Removed="Removed",at.Adding="Adding",at.BeingDecommissioned="BeingDecommissioned",at.Decommissioned="Decommissioned",exports.MetricMeasure=void 0,(st=exports.MetricMeasure||(exports.MetricMeasure={})).OVERALL="Overall",st.OUTLIER="Outlier",st.OUTLIER_TABLES="Outlier_Tables",st.OUTLIER_DB="Outlier_Databases";var ht,ft,mt,gt=((it={})[exports.MetricMeasure.OVERALL]="Overall",it[exports.MetricMeasure.OUTLIER]="nodes",it[exports.MetricMeasure.OUTLIER_TABLES]="tables",it[exports.MetricMeasure.OUTLIER_DB]="databases",it);exports.AnomalyCategory=void 0,(ht=exports.AnomalyCategory||(exports.AnomalyCategory={})).SQL="SQL",ht.APP="APP",ht.NODE="NODE",ht.INFRA="INFRA",ht.DB="DB",exports.BackgroundJobCategory=void 0,(exports.BackgroundJobCategory||(exports.BackgroundJobCategory={})).BACKGROUND_JOBS="BACKGROUND_JOBS",exports.AnomalyType=void 0,(ft=exports.AnomalyType||(exports.AnomalyType={})).SQL_QUERY_LATENCY_INCREASE="SQL_QUERY_LATENCY_INCREASE",ft.HOT_NODE_CPU="HOT_NODE_CPU",ft.HOT_NODE_YSQL_QUERIES="HOT_NODE_YSQL_QUERIES",ft.SLOW_DISKS="SLOW_DISKS",ft.HOT_TABLET="HOT_TABLET",ft.LARGE_TABLET="LARGE_TABLET",ft.UNUSED_INDEX="UNUSED_INDEX",ft.REDUNDANT_INDEX="REDUNDANT_INDEX",ft.RANGE_SHARDING="RANGE_SHARDING",exports.WaitEventClassification=void 0,(mt=exports.WaitEventClassification||(exports.WaitEventClassification={})).WAIT_EVENT_COMPONENT="waitEventComponent",mt.WAIT_EVENT_CLASS="waitEventClass",mt.WAIT_EVENT_TYPE="waitEventType",mt.WAIT_EVENT="waitEvent",mt.CLIENT_NODE_IP="clientNodeIp",mt.QUERY_ID="queryId",mt.TABLET_ID="tabletId",mt.DB_ID="dbId";var vt,yt,xt,_t={waitEventType:"TYPE",waitEvent:"EVENT"},bt={NONE:"NONE",TOP:"TOP",BOTTOM:"BOTTOM"},Tt={NONE:"NONE",NODE:"NODE",TABLE:"TABLE",NAMESPACE:"NAMESPACE"},St={ALL:"All",SQL:"SQL",CQL:"CQL",BACKGROUND:"Background"},wt={AVERAGE:"AVG",MAX:"MAX",MIN:"MIN",SUM:"SUM"};exports.AppName=void 0,(vt=exports.AppName||(exports.AppName={})).YBA="YBA",vt.YBM="YBM",vt.YBD="YBD",vt.WEB="WEB",exports.QueryType=void 0,(yt=exports.QueryType||(exports.QueryType={})).SQL="SQL",yt.CQL="CQL",yt.BACKGROUND="BACKGROUND",exports.GraphType=void 0,(xt=exports.GraphType||(exports.GraphType={})).SINGLE_SUPPORTING="SINGLE_SUPPORTING",xt.MULTI_SUPPORTING="MULTI_SUPPORTING",xt.MAIN_RCA="MAIN_RCA";var Ct,Et,Mt,It,At,Dt,Nt,Ot,Bt,Lt={Type:"Wait Event Type",Class:"Wait Event Class",Event:"Wait Event",Query:"Query",waitEventType:"Wait Event Type",waitEvent:"Wait Event","Client IP":"Client IP"},Rt=[exports.WaitEventClassification.WAIT_EVENT_TYPE,exports.WaitEventClassification.WAIT_EVENT];exports.SortDirection=void 0,(Ct=exports.SortDirection||(exports.SortDirection={})).ASC="ASC",Ct.DESC="DESC",exports.PrimaryDashboardViewTabs=void 0,(Et=exports.PrimaryDashboardViewTabs||(exports.PrimaryDashboardViewTabs={})).ANOMALY="Anomaly",Et.QUERY="Query",function(e){e.SQL="SQL",e.CQL="CQL",e.SYSTEM="SYSTEM"}(Mt||(Mt={})),exports.TPFeatureFlags=void 0,(It=exports.TPFeatureFlags||(exports.TPFeatureFlags={})).SHOW_QUERY_STATS_TIMESTAMP="showStatsTimestamp",It.SHOW_CLEANUP_HISTORICAL_DATA="showCleanupHistoricalData",exports.AnomalyDetectionStatusText=void 0,(At=exports.AnomalyDetectionStatusText||(exports.AnomalyDetectionStatusText={})).EMPTY="EMPTY",At.SCHEDULED="SCHEDULED",At.IN_PROGRESS="IN_PROGRESS",At.SUCCESS="SUCCESS",At.FAILURE="FAILURE",exports.RuntimeConfigType=void 0,(Dt=exports.RuntimeConfigType||(exports.RuntimeConfigType={})).TEXT="TEXT",Dt.INT="INT",Dt.FLOAT="FLOAT",Dt.BOOL="BOOL",Dt.DURATION="DURATION",exports.TransformedBackgroundTasksCategory=void 0,(exports.TransformedBackgroundTasksCategory||(exports.TransformedBackgroundTasksCategory={})).ALL_BACKGROUND_JOBS="All Background Jobs",exports.InsightsTabs=void 0,(Nt=exports.InsightsTabs||(exports.InsightsTabs={})).CLUSTER_LOAD="Cluster Load",Nt.INSIGHTS="Insights",Nt.METRICS="Metrics",exports.ClusterLoadOverallTabs=void 0,(Ot=exports.ClusterLoadOverallTabs||(exports.ClusterLoadOverallTabs={})).ANOMALIES="Anomalies",Ot.QUERIES="Queries",exports.TabletTabs=void 0,(exports.TabletTabs||(exports.TabletTabs={})).TABLET_OVERVIEW="Tablet Overview",exports.SqlTabs=void 0,(exports.SqlTabs||(exports.SqlTabs={})).QUERY_OVERVIEW="Query Overview",exports.SqlDrilldownTabs=void 0,(exports.SqlDrilldownTabs||(exports.SqlDrilldownTabs={})).PERFORMANCE_METRICS="Performance Metrics",exports.ClusterLoadSubTabs=void 0,(Bt=exports.ClusterLoadSubTabs||(exports.ClusterLoadSubTabs={})).OVERALL_LOAD="Overall Load",Bt.LOAD_BY_DATABASE="Load by Database";var kt,Pt,jt={ANOMALIES:"anomalies",QUERIES:"queries",METRICS:"metricsNew",INSIGHTS:"insights",CLUSTER_LOAD:"clusterLoad",CLUSTER_LOAD_DB:"dbLoad",OVERALL_LOAD:"overallLoad"};exports.AnomalyTypeFilter=void 0,(kt=exports.AnomalyTypeFilter||(exports.AnomalyTypeFilter={})).PERF_ANOMALY="PERF_ANOMALY",kt.INSIGHT="INSIGHT",exports.ChartType=void 0,(Pt=exports.ChartType||(exports.ChartType={})).LINE="line",Pt.BAR="bar";var Ft={DB_ID:"databaseId",EPS:"eps",EVENTS:"events",FIRST_ACTIVE:"firstActive",LAST_ACTIVE:"lastActive",AVG_LATENCY:"latencyAvg",LATENCY_P90:"latencyP90",LATENCY_P99:"latencyP99",NAMESPACE_NAME:"namespaceName",QUERY:"query",QUERY_ID:"queryid",QUERY_TYPE:"queryType",ROWS_AVG:"rowsAvg",RPS:"rps",TOTAL_TIME:"totalTime",UNIVERSE_ID:"universeId",TOTAL_EPS_RATIO:"totalEpsRatio"},Ut={CPU:"Cpu",IO:"IO",DISK_IO:"DiskIO"},Ht="All Regions and Clusters",zt="All",Wt="All Zones and Nodes",Vt="ASH",Yt="Cores",Gt="Queries",qt="Inter",Qt="# vCPU",Zt={NODE_AVERAGE:"Selected Nodes Average",ALL:"all",ALL_DATABASES:"All Databases",TOP:"top",PRIMARY:"PRIMARY"},Xt="active_session_history_eps_global",Kt="active_session_history_query_events",$t="cpu_count",Jt=[{value:exports.MetricMeasure.OVERALL,label:"Overall",text:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods",text:"nodes"},{value:exports.MetricMeasure.OUTLIER_TABLES,label:"Outlier Tables",text:"tables"},{value:exports.MetricMeasure.OUTLIER_DB,label:"Outlier Databases",text:"databases"}],en=[{value:exports.MetricMeasure.OVERALL,label:"Overall"},{value:exports.MetricMeasure.OUTLIER,label:"Outlier Nodes",k8label:"Outlier Pods",text:"nodes"}],tn=[{value:bt.TOP,label:"Top"},{value:bt.BOTTOM,label:"Bottom"}],nn=[{value:St.ALL,label:"All Queries"},{value:St.SQL,label:"SQL"},{value:St.CQL,label:"CQL"},{value:St.BACKGROUND,label:"Background"}],rn=["active_session_history_eps_client_node","query_latency","query_rps","query_rows_avg"],on=["active_session_history_eps_global","cql_query_latency_avg","cql_query_rps"],an=["active_session_history_eps_client_node"],sn="ysql_connections_per_sec",ln=[10,20,30,40,50],un=[exports.AnomalyCategory.SQL,exports.AnomalyCategory.NODE,exports.AnomalyCategory.DB,exports.AnomalyCategory.APP,exports.AnomalyCategory.INFRA],cn="00000000-0000-0000-0000-000000000000",dn={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",SHOW_DB_CLUSTER_LOAD_VIEW:"pa.ui.show_db_cluster_load_view"},pn={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"},hn="MORE",fn="View More",mn={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"},gn={ONE_HOUR:"1h",SIX_HOURS:"6h",ONE_DAY:"1d",TWO_DAYS:"2d",SEVEN_DAYS:"7d",CUSTOM:"Custom"},vn=[{label:mn.ONE_HOUR,value:gn.ONE_HOUR},{label:mn.SIX_HOURS,value:gn.SIX_HOURS},{label:mn.ONE_DAY,value:gn.ONE_DAY},{label:mn.TWO_DAYS,value:gn.TWO_DAYS},{label:mn.SEVEN_DAYS,value:gn.SEVEN_DAYS},{label:mn.CUSTOM,value:gn.CUSTOM}],yn=[{label:mn.CUSTOM,value:"Custom"}],xn={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_YSQL_QUERIES:{title:"NODE",data:{REGION_NAME:"regionName",ZONE_NAME:"zoneName"}},HOT_NODE_CONNECTIONS:{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"}}},_n="DATABASE",bn="QUERY TYPE",Tn="Database",Sn="TABLE",wn="TABLET ID",Cn="ANOMALY",En="REGION/ZONE",Mn=["ysql_ops","ycql_ops","server","per_process","disk_io","tserver","master","master_advanced","lsmdb"],In=["outlier_tables"],An=["outlier_databases"],Dn=[{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"]}],Nn=[{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"]}],On=[{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_tablet_split_candidates","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"]}],Bn="gant-chart-anomalies",Ln={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"},Rn="METRICS_NAMES",kn="METRICS_OUTLIER_TABLES_NAMES",Pn="METRICS_OUTLIER_DATABASES_NAMES",jn=["#8c564b","#4754DB","#2FB3FF","#BB42BC","#20A7C9","#e377c2","#7f7f7f","#bcbd22","#17becf"],Fn={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",BACKGROUND_JOBS:"#97A5B0",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",ProcArray:"#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",EMPTY_EVENT:"#F0F4F7"},Un={WAIT_EVENT_TYPE_CHART_TOOLTIP:"The tablet wait event types in a horizontal bar chart",ACTIVE_SESSIONS_PER_SECOND_TOOLTIP:"The number of active sessions per second for the tablet",SST_SIZE_TOOLTIP:"The size of the SST files for the tablet",WAL_SIZE_TOOLTIP:"The size of the write ahead log for the tablet",PARTITION_TOOLTIP:"The partition range in which the tablet is located",SIZE_TOOLTIP:"Total size of the tablet which includes SST and WAL",TABLET_ID_TOOLTIP:"The ID of the tablet",DATABASE_TYPE_TOOLTIP:"The type of the database",LEADER_NODE_TOOLTIP:"Leader node of the tablet",FOLLOWER_NODES_TOOLTIP:"Follower nodes of the tablet",EPS_TOOLTIP:"Active sessions per second",TOTAL_EPS_RATIO_TABLET_TOOLTIP:"Percentage of the system load that the tablet contributes to",TOTAL_EPS_RATIO_QUERY_LEVEL_TABLET_TOOLTIP:"Percentage of the system load that the tablet contributes to the query",DATABASE_NAME_TOOLTIP:"The name of the database",SCHEMA_NAME_TOOLTIP:"The name of the schema",TABLE_NAME_TOOLTIP:"The name of the table",UNIVERSE_ID_TOOLTIP:"The ID of the universe",NODE_NAME_TOOLTIP:"The name of the node",NODE_REGION_ZONE_TOOLTIP:"The provider and Availability Zone to which the node belongs",CONNECTIONS_TOOLTIP:"The number of connections to the node",TOTAL_EPS_RATIO_NODE_TOOLTIP:"Percentage of the system load that the node contributes to",EPS_NODE_TOOLTIP:"Active sessions per second",EVENTS_NODE_TOOLTIP:"The node wait event types in a horizontal bar chart",RPS_NODE_TOOLTIP:"The number of RPCs per second to the node",TOTAL_EPS_RATIO_QUERY_TOOLTIP:"Percentage of the system load that the query contributes to",FIRST_ACTIVE_TIME_TOOLTIP:"The first active time that the query was executed",LAST_ACTIVE_TIME_TOOLTIP:"The last active time that the query was executed",AVG_LATENCY_TOOLTIP:"The average latency of the query in milliseconds",LATENCY_P90_TOOLTIP:"The 90th percentile latency of the query in milliseconds",LATENCY_P99_TOOLTIP:"The 99th percentile latency of the query in milliseconds",QUERY_TYPE_TOOLTIP:"The type of the query which can be SQL, CQL, or BACKGROUND",TOTAL_TIME_TOOLTIP:"The execution time of the query in milliseconds",ROWS_AVG_TOOLTIP:"The average number of rows returned per call of the query",RPS_TOOLTIP:"The number of calls per second to the query",ACTIVE_SESSIONS_PER_SECOND_QUERY_TOOLTIP:"The number of active sessions per second for the query",EVENTS_QUERY_TOOLTIP:"The wait event types for the query in a horizontal bar chart",QUERY_TEXT_TOOLTIP:"The text of the query"},Hn={DB_ID:"",TOTAL_EPS_RATIO:"Total Load",EPS:"Avg Active Context",EVENTS:"Wait Event Types",FIRST_ACTIVE_TIME:"First Active Time",LAST_ACTIVE_TIME:"Last Active Time",AVG_LATENCY:"Avg Latency (ms)",LATENCY_P90:"P90 Latency (ms)",LATENCY_P99:"P99 Latency (ms)",NAMESPACE_NAME:"Database",QUERY:"Query",QUERY_ID:"Query ID",QUERY_TYPE:"Query Type",ROWS_AVG:"Avg Rows/Call",RPS:"Calls/Sec",TOTAL_TIME:"Total Time (ms)",UNIVERSE_ID:"Universe ID"},zn="Add Columns",Wn={UNIVERSE_PA_STATUS_ERROR:"Universe is not registered to TP, please register to view data",UNIVERSE_DETAILS_ERROR:"Failed to fetch universe details, please try again.",NODE_REGION_ZONE_DETAILS_ERROR:"Failed to fetch node region and zone details, 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.",TABLETS_DATA_FETCH_ERROR:"Failed to fetch tablets data, please try again.",NODE_LOAD_DATA_FETCH_ERROR:"Failed to fetch node load 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.",DB_STATS_FETCH_ERROR:"Failed to fetch DB metadata, please try again."},Vn="visibleQueryMetadataColumns",Yn="visibleDbLoadMetadataColumns",Gn="visibleTabletsMetadataColumns",qn="visibleTabletDrilldownMetadataColumns",Qn="visibleNodeLoadMetadataColumns",Zn="CPU",Xn="IO",Kn=function(t,n,r,o){if(0!==r){return function(r,i,a,s,l){return e.jsx(ct,{total:r,page:i,rowsPerPage:a,onPageSizeChange:s,dataPrefetchFn:t,rowsPerPageOptions:ln,showRecordsPerPage:!0,recordsPerPageCaption:e.jsx("span",{children:n}),onPageChange:l,hasMoreData:o})}}},$n=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"},metricsLoadingBox:{display:"flex",minHeight:"500px",alignItems:"center",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),paddingTop:0,display:"flex",margin:0,flexDirection:"column",backgroundColor:"#FFFFFF"},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"},metaDataMarginBottom:{marginBottom:e.spacing(.5)},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:"8px 16px 16px 16px",margin:"16px 0px 8px 0px"},causeTabButton:{minWidth:"fit-content",marginRight:"8px !important",paddingLeft:"16px !important",paddingRight:"16px !important","& .yb-MuiTab-root":{maxWidth:"264px"}},causeTabLabelWrapper:{padding:"12px 16px",fontSize:"13px",fontWeight:400,textTransform:"none",color:"#0B1117"},causeText:{fontWeight:600,fontSize:"13px",fontFamily:"Inter",color:"#000000"},descriptionText:{fontFamily:"Inter",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:{position:"relative","& .MuiSvgIcon-root":{fontSize:e.spacing(4)}},breadCrumbText:{fontWeight:600,fontStyle:"semibold",fontSize:"15px"},ybBreadcrumbWrapper:{"& .yb-MuiBreadcrumbs-li button, & .yb-MuiBreadcrumbs-li p, & .yb-MuiBreadcrumbs-li .yb-MuiTypography-root, & .yb-MuiBreadcrumbs-li .yb-MuiLink-root":{fontSize:"15px !important",fontWeight:"600 !important",lineHeight:"20px !important"},"& .yb-MuiBreadcrumbs-separator":{fontSize:"13px",fontWeight:"400",lineHeight:"16px"}},breadcrumbColor:{color:"#2B59C3"},breadcrumbDefaultColor:{color:"#0B1117"},anomalyCategoryText:{color:"#0B1117",fontWeight:600},dateTimePicker:{"& .MuiFormControl-root":{height:"32px !important"},height:"32px !important"},panelItemBody:{padding:0,backgroundColor:"transparent"},rcaGantChartBox:{width:"100%",padding:"16px 48px 16px 40px",marginLeft:"0px",borderRadius:"8px",border:"1px solid #D7DEE4"},tabPanelPrimary:{padding:"0px !important"},overrideMuiTableContainer:{marginTop:e.spacing(3),"& .yb-MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},overrideMuiTableContainerWeb:{marginTop:e.spacing(3),"& .yb-MuiTableContainer-root":{width:"100% !important",marginTop:"3px"}},queryMetadataTable:{marginTop:0},overrideMuiTable:{marginTop:e.spacing(2),textAlign:"center","& .yb-MuiTableCell-sizeSmall":{textAlign:"center"},"& .yb-MuiSelect-select":{fontSize:"13px"}},tableBorder:{borderRight:"1px solid #ccc"},tableHeaderCell:{position:"relative","&:first-of-type":{"&: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"},queryMetadataBox:{padding:"16px 16px 0 0"},headerContainerYBM:{paddingLeft:e.spacing(2)},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:{backgroundColor:"transparent",paddingBottom:e.spacing(2)},infoIcon:{color:"#97A5B0",marginBottom:"2px",marginLeft:e.spacing(.5)},filterContainer:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},filterLeftContainer:{gap:e.spacing(1),display:"flex",flexDirection:"row",alignItems:"center"},ybOverrideMuiInput:{"& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiMenu-list":{maxHeight:"400px"}},ybOverrideMuiSelect:{width:"210px",height:"32px","& .yb-MuiFormControl-root":{height:"32px !important"}},ybSearchInput:{width:"338px",marginRight:"auto",height:"32px"},ybSelectBox:{width:"180px",height:"32px"},headerBox:{display:"flex",flexDirection:"row",alignItems:"center"},headerText:{fontWeight:600,fontSize:"11.5px"},noteTextContainer:{marginTop:e.spacing(1)},noteText:{display:"flex",flexDirection:"row",alignItems:"center",gap:e.spacing(.5),fontWeight:400,fontSize:"11.5px",color:"#4E5F6D"},noteTextBold:{fontWeight:600},ghantChartContainer:{backgroundColor:"#FFFFFF"},secondRow:{display:"flex",flexDirection:"row",gap:e.spacing(1),margin:e.spacing(2,0),justifyContent:"flex-end"},ybTabs:{flex:1,flexGrow:1,"& .yb-MuiTabs-scroller":{boxShadow:"inset 0px -1px 0px 0px ".concat(e.palette.grey[200]," !important")}},mainContainerBorder:{borderWidth:"1px 1px 0px 1px"},mainContainer:{backgroundColor:"#FFFFFF",border:"1px solid #E9EEF2",borderRadius:"8px",display:"flex",flexDirection:"column"},headerContainer:{padding:e.spacing(2),height:"64px",alignContent:"center"},loadFilterContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between"},metadataContainer:{padding:"0px 16px 16px 16px",display:"flex",flexDirection:"column"},tabletNodeLoadMetadataTableCell:{padding:"4px 10px"},ellipsisText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"100%"},queryLoadMetadataTableCell:{padding:"12px 10px"},dividerStyle:{marginRight:e.spacing(2)},metricSplitSelectorBox:{gap:e.spacing(2),marginTop:e.spacing(2)},tabsContainer:{marginBottom:e.spacing(3)},metricSplitSelectorContainer:{display:"flex",flexDirection:"row",alignItems:"center",gap:e.spacing(1)}}})),Jn=function(t){var n=t.rowData,r=t.appName,o=t.onSelectedQuery,i=t.onClose;$n();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||r===exports.AppName.YBA)&&function(){i();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==o||o(s.toString(),e),window.history.pushState({},"","".concat(window.location.pathname,"/").concat(s,"?").concat(t.toString()))}(),r===exports.AppName.WEB&&function(e,t,n){i();var o=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(o,"/").concat(e).concat(l?"?".concat(l):"");window.open(d,"_blank")}(s,null==a?void 0:a.toString(),l)]})},er=t.memo((function(n){var o=n.appName;n.currentTablePage;var i=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,m=l.filter((function(e){return!u.includes(e.name)})).length>0;return e.jsxs(t.Fragment,{children:[e.jsx(r.TableRow,{className:a.tableRow,onClick:function(e){p(d!==h?h:null)},children:m&&f.map((function(t,n){return void 0!==t?e.jsx(r.TableCell,{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(Jn,{appName:o,rowData:i[h],onSelectedQuery:c,onClose:function(){return p(null)}})]})})),tr=function(e){var t=e.rowData;e.rowMeta;var n=e.appName,r=e.onClose,o=e.onSelectedQuery,i=e.isDbQueryLoadMetadata,a=void 0!==i&&i,s=e.onNavigateToUrl,l=t[0],u=t[10],c=t[16],d=t[11],p=d===exports.QueryType.SQL||d===exports.QueryType.BACKGROUND;n===exports.AppName.YBM||n===exports.AppName.YBA?function(){r();var e=null,t=new URLSearchParams(window.location.search);t.set("type",d),t.set("queryId",u),t.set("universeId",c),p?(e={queryId:u,dbId:null==l?void 0:l.toString(),universeId:c,type:d},t.set("dbId",e.dbId)):e={queryId:u,universeId:c,type:d};var n="".concat(window.location.pathname,"/").concat(u,"?").concat(t.toString());a&&(n="".concat(window.location.pathname,"/queries/").concat(u,"?").concat(t.toString())),null==o||o(u.toString(),e),null==s||s(n)}():n===exports.AppName.WEB&&function(e,t,o){r();var i=window.location.pathname,s=new URLSearchParams(window.location.search);s.set("universeId",o),s.set("type",d),p&&s.set("dbId",t),n===exports.AppName.YBA&&s.set("queryId",u);var l=s.toString(),c="".concat(i,"/").concat(e).concat(l?"?".concat(l):"");a&&(c="".concat(i,"/queries/").concat(e).concat(l?"?".concat(l):"")),window.open(c,"_blank")}(u,null==l?void 0:l.toString(),c)},nr=function(t){var n=t.name,r=t.rules,i=t.defaultValue,a=t.control,s=t.shouldUnregister,l=A(t,["name","rules","defaultValue","control","shouldUnregister"]),u=ve({name:n,rules:r,defaultValue:i,control:a,shouldUnregister:s}).field;u.ref;var c=u.value,d=A(u,["ref","value"]);return e.jsx(o.YBToggle,I({},d,{inputProps:{"data-testid":"YBToggleField-".concat(n)}},l,{checked:!!c}))},rr=function(n){var i,a,s,l,u,c,d,p,h,f,m,g=n.metricSplitSelectors,v=n.onSplitTypeSelected,y=n.anomalyData,x=0;(null===(a=null===(i=null==y?void 0:y.lastInstance)||void 0===i?void 0:i.defaultSettings)||void 0===a?void 0:a.splitMode)===bt.NONE&&(null===(l=null===(s=null==y?void 0:y.lastInstance)||void 0===s?void 0:s.defaultSettings)||void 0===l?void 0:l.splitType)===Tt.NONE&&(x=0),(null===(c=null===(u=null==y?void 0:y.lastInstance)||void 0===u?void 0:u.defaultSettings)||void 0===c?void 0:c.splitMode)!==bt.TOP&&(null===(p=null===(d=null==y?void 0:y.lastInstance)||void 0===d?void 0:d.defaultSettings)||void 0===p?void 0:p.splitMode)!==bt.BOTTOM||(x=(null===(f=null===(h=null==y?void 0:y.lastInstance)||void 0===h?void 0:h.defaultSettings)||void 0===f?void 0:f.splitType)===Tt.NODE?1:2);var _=t.useState(x),b=_[0],T=_[1],S=g.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){v(e.value),T(t)},buttonProps:{dataTestId:"MetricSplitSelector-MetricSplitButton-".concat(e.value)}}}));return e.jsx(r.Box,{display:"flex",flexDirection:"row",children:e.jsx(o.YBButtonGroup,{divider:!0,buttons:S,value:null===(m=g[b])||void 0===m?void 0:m.value,dataTestId:"MetricTypeSelector-MetricMeasureButton"})})},or=[{value:3,label:"3"},{value:5,label:"5"},{value:10,label:"10"}],ir=i.makeStyles((function(e){return{icon:{marginRight:e.spacing(1)},input:{width:"60px",height:"32px"},overrideMuiInput:{height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"}}}})),ar=function(n){var i,a=n.metricOutlierSelectors,s=n.selectedNumNodes,l=n.outlierType,u=n.onOutlierTypeSelected,c=n.onNumNodesChanged,d=n.metricMeasure,p=n.showNumNodesInput,h=void 0===p||p,f=n.showNumNodesSelector,m=void 0!==f&&f,g=ir(),v=l===bt.TOP?0:1,y=t.useState(v),x=y[0],_=y[1],b=a.map((function(e,t){return{value:e.value,label:e.label,onClick:function(){u(e.value),_(t)},buttonProps:{dataTestId:"OutlierSelector-OutlierButton-".concat(e.value)}}}));return e.jsxs(r.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[e.jsx(r.Box,{children:e.jsx(o.YBButtonGroup,{divider:!0,buttons:b,dataTestId:"OutlierSelector-OutlierButton",value:null===(i=a[x])||void 0===i?void 0:i.value})}),h&&e.jsx(r.Box,{ml:2,children:e.jsx(o.YBInput,{type:"number",className:g.input,inputProps:{min:1},dataTestId:"OutlierSelector-NumNodesInput",value:s,onChange:function(e){return c(e.target.value)},inputMode:"numeric"})}),m&&e.jsx(r.Box,{ml:1,mr:1,children:e.jsx(o.YBSelect,{style:{width:"80px"},className:g.overrideMuiInput,dataTestId:"OutlierSelector-NumNodesSelector",value:s,onChange:function(e){return c(e.target.value)},children:or.map((function(t){return e.jsx(r.MenuItem,{value:t.value,children:t.label},t.value)}))})}),e.jsx(r.Typography,{variant:"body2",style:{marginRight:"8px"},children:gt[d]})]})};function sr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var lr=Array.isArray,ur="object"==typeof global&&global&&global.Object===Object&&global,cr="object"==typeof self&&self&&self.Object===Object&&self,dr=ur||cr||Function("return this")(),pr=dr.Symbol,hr=Object.prototype,fr=hr.hasOwnProperty,mr=hr.toString,gr=pr?pr.toStringTag:void 0;var vr=Object.prototype.toString;var yr=pr?pr.toStringTag:void 0;function xr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":yr&&yr in Object(e)?function(e){var t=fr.call(e,gr),n=e[gr];try{e[gr]=void 0;var r=!0}catch(e){}var o=mr.call(e);return r&&(t?e[gr]=n:delete e[gr]),o}(e):function(e){return vr.call(e)}(e)}function _r(e){return null!=e&&"object"==typeof e}function br(e){return"string"==typeof e||!lr(e)&&_r(e)&&"[object String]"==xr(e)}function Tr(e){return null!=e}function Sr(e){return lr(e)&&0===e.length}function wr(e){return lr(e)&&e.length>0}function Cr(e){return sr(e)&&Object.keys(e).length>0}function Er(e){return br(e)&&e.trim().length>0}function Mr(e){return br(e)&&0===e.trim().length}var Ir=Tr;function Ar(e){for(var t=0;t<e.length;t++)if(wr(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 Dr="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",Nr=i.makeStyles((function(e){return{selectBox:{minWidth:"300px"},menuItem:{marginTop:e.spacing(.5)},regularText:{color:e.palette.grey[600],marginTop:e.spacing(.5),marginBottom:e.spacing(.5)},overrideMuiInput:{height:"32px","& .MuiMenu-list":{maxHeight:"400px"},"& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiInputBase-root":{width:"300px",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px"}},icon:{marginRight:e.spacing(1)}}})),Or="All Zones and Nodes",Br=function(t){var n=t.selectedItem,i=t.primaryZoneToNodesMap,a=t.asyncZoneToNodesMap,s=t.onZoneNodeSelected,l=Nr();return e.jsx(o.YBSelect,{className:T(l.selectBox,l.overrideMuiInput),dataTestId:"YBZoneNodeSelector-Zone",value:n,children:function(t,n){var o=[];o.push(e.jsx(r.MenuItem,{value:Or,onClick:function(e){s(!1,!1,Or)},children:Or},Or)),o.push(e.jsx(r.Divider,{},"divider-all-zones"));for(var i=t.values(),a=i.next(),u=function(){var t=a.value,n=t.zoneName,u=t.nodeNames;n&&o.push(e.jsx(r.MenuItem,{value:n,onClick:function(e){s(!0,!1,n)},className:l.menuItem,children:n},n)),wr(u)&&u.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"primary-".concat(n,"-").concat(t)))})),a=i.next()};Cr(a.value);)u();if((null==n?void 0:n.size)>0){o.push(e.jsx(r.Divider,{},"divider-async-zones"));for(var c=n.values(),d=c.next(),p=function(){var t=d.value,n=t.zoneName,i=t.nodeNames;n&&o.push(e.jsx(r.MenuItem,{value:n,onClick:function(e){s(!0,!1,n)},children:n},n)),wr(i)&&i.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"async-".concat(n,"-").concat(t)))})),d=c.next()};Cr(d.value);)p()}return o}(i,a)})},Lr=i.makeStyles((function(e){return{selectBox:{minWidth:"300px"},menuItem:{marginTop:e.spacing(.5)},regularText:{color:e.palette.grey[600],marginTop:e.spacing(.5),marginBottom:e.spacing(.5)},overrideMuiInput:{height:"32px","& .yb-MuiInput-input":{fontWeight:400,fontSize:"13px"},"& .yb-MuiInputBase-root":{minWidth:"300px",borderTopRightRadius:"0px",borderBottomRightRadius:"0px"}},icon:{marginRight:e.spacing(1)}}})),Rr=function(t){var n=t.selectedItem,i=t.primaryClusterToRegionMap,a=t.asyncClusterToRegionMap,s=t.onClusterRegionSelected,l=Lr();return e.jsx(o.YBSelect,{className:T(l.selectBox,l.overrideMuiInput),dataTestId:"cluster-region-select",value:n,children:i.size>0&&function(t,n){var o=[];o.push(e.jsx(r.MenuItem,{value:Ht,onClick:function(e){s(!1,!1,Ht,!1)},children:Ht},Ht)),o.push(e.jsx(r.Divider,{},"divider-all-regions"));var i=t.values().next().value,a=i.cluster,u=i.regions,c=i.uuid;if(Er(a)&&o.push(e.jsx(r.MenuItem,{value:c,onClick:function(e){s(!0,!1,c,!0)},className:l.menuItem,children:a},c)),wr(u)&&u.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t,!0)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"primary-".concat(c,"-").concat(t)))})),(null==n?void 0:n.size)>0){o.push(e.jsx(r.Divider,{},"divider-async-regions"));var d=n.values().next().value,p=d.cluster,h=d.regions,f=d.uuid;Er(p)&&o.push(e.jsx(r.MenuItem,{value:f,onClick:function(e){s(!0,!1,f,!0)},children:p},f)),wr(h)&&h.forEach((function(t){o.push(e.jsxs(r.MenuItem,{value:t,onClick:function(e){s(!1,!0,t,!0)},className:l.regularText,children:[e.jsx("img",{className:l.icon,src:Dr,alt:"Indicator towards metric measure to use"}),t]},"async-".concat(f,"-").concat(t)))}))}return o}(i,a)})},kr=function(t){var n=t.name,r=t.rules,i=t.defaultValue,a=t.control,s=t.shouldUnregister,l=A(t,["name","rules","defaultValue","control","shouldUnregister"]),u=ve({name:n,rules:r,defaultValue:i,control:a,shouldUnregister:s}).field;return e.jsx(o.YBCheckbox,I({name:u.name,inputRef:u.ref,checked:!!u.value,onBlur:u.onBlur,onChange:u.onChange},l))},Pr=o.yba.ybaTheme,jr=function(t){var n=t.children,r=t.appName;return e.jsx(o.YBThemeProvider,{theme:r===exports.AppName.YBM?o.coreTheme:Pr,children:n})};function Fr(e){return Fr="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},Fr(e)}function Ur(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 Hr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function zr(e){Hr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Fr(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 Wr={};function Vr(){return Wr}function Yr(e){if(Hr(1,arguments),!function(e){return Hr(1,arguments),e instanceof Date||"object"===Fr(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=zr(e);return!isNaN(Number(t))}var Gr={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function qr(e,t,n){Hr(2,arguments);var r,o=function(e,t){return Hr(2,arguments),zr(e).getTime()-zr(t).getTime()}(e,t)/36e5;return((r=null==n?void 0:n.roundingMethod)?Gr[r]:Gr.trunc)(o)}function Qr(e,t){return Hr(2,arguments),function(e,t){Hr(2,arguments);var n=zr(e).getTime(),r=Ur(t);return new Date(n+r)}(e,-Ur(t))}function Zr(e){Hr(1,arguments);var t=zr(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 Xr(e){Hr(1,arguments);var t=zr(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=Zr(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var a=Zr(i);return t.getTime()>=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Kr(e){Hr(1,arguments);var t=zr(e),n=Zr(t).getTime()-function(e){Hr(1,arguments);var t=Xr(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),Zr(n)}(t).getTime();return Math.round(n/6048e5)+1}function $r(e,t){var n,r,o,i,a,s,l,u;Hr(1,arguments);var c=Vr(),d=Ur(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.weekStartsOn)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==o?o: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=zr(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 Jr(e,t){var n,r,o,i,a,s,l,u;Hr(1,arguments);var c=zr(e),d=c.getUTCFullYear(),p=Vr(),h=Ur(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o: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 m=$r(f,t),g=new Date(0);g.setUTCFullYear(d,0,h),g.setUTCHours(0,0,0,0);var v=$r(g,t);return c.getTime()>=m.getTime()?d+1:c.getTime()>=v.getTime()?d:d-1}function eo(e,t){Hr(1,arguments);var n=zr(e),r=$r(n,t).getTime()-function(e,t){var n,r,o,i,a,s,l,u;Hr(1,arguments);var c=Vr(),d=Ur(null!==(n=null!==(r=null!==(o=null!==(i=null==t?void 0:t.firstWeekContainsDate)&&void 0!==i?i:null==t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==o?o: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=Jr(e,t),h=new Date(0);return h.setUTCFullYear(p,0,d),h.setUTCHours(0,0,0,0),$r(h,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function to(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}var no={y:function(e,t){var n=e.getUTCFullYear(),r=n>0?n:1-n;return to("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):to(n+1,2)},d:function(e,t){return to(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 to(e.getUTCHours()%12||12,t.length)},H:function(e,t){return to(e.getUTCHours(),t.length)},m:function(e,t){return to(e.getUTCMinutes(),t.length)},s:function(e,t){return to(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return to(Math.floor(r*Math.pow(10,n-3)),t.length)}},ro="midnight",oo="noon",io="morning",ao="afternoon",so="evening",lo="night",uo={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(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return no.y(e,t)},Y:function(e,t,n,r){var o=Jr(e,r),i=o>0?o:1-o;return"YY"===t?to(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):to(i,t.length)},R:function(e,t){return to(Xr(e),t.length)},u:function(e,t){return to(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 to(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 to(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 no.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 to(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 o=eo(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):to(o,t.length)},I:function(e,t,n){var r=Kr(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):to(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):no.d(e,t)},D:function(e,t,n){var r=function(e){Hr(1,arguments);var t=zr(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"}):to(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 o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return to(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return to(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return to(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){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,o=e.getUTCHours();switch(r=12===o?oo:0===o?ro:o/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,o=e.getUTCHours();switch(r=o>=17?so:o>=12?ao:o>=4?io:lo,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 no.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):no.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):to(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):to(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):no.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):no.s(e,t)},S:function(e,t){return no.S(e,t)},X:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return po(o);case"XXXX":case"XX":return ho(o);default:return ho(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return po(o);case"xxxx":case"xx":return ho(o);default:return ho(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+co(o,":");default:return"GMT"+ho(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+co(o,":");default:return"GMT"+ho(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e;return to(Math.floor(o.getTime()/1e3),t.length)},T:function(e,t,n,r){return to((r._originalDate||e).getTime(),t.length)}};function co(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+to(i,2)}function po(e,t){return e%60==0?(e>0?"-":"+")+to(Math.abs(e)/60,2):ho(e,t)}function ho(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+to(Math.floor(o/60),2)+n+to(o%60,2)}var fo=uo,mo=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"})}},go=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"})}},vo={p:go,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],o=r[1],i=r[2];if(!i)return mo(e,t);switch(o){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}}",mo(o,t)).replace("{{time}}",go(i,t))}},yo=vo,xo=["D","DD"],_o=["YY","YYYY"];function bo(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 To={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"}},So=function(e,t,n){var r,o=To[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function wo(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 Co={date:wo({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:wo({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:wo({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Eo={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Mo(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}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]}}function Io(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[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 Ao,Do={code:"en-US",formatDistance:So,formatLong:Co,formatRelative:function(e,t,n,r){return Eo[e]},localize:{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:Mo({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Mo({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:Mo({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:Mo({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:Mo({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(Ao={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(Ao.matchPattern);if(!n)return null;var r=n[0],o=e.match(Ao.parsePattern);if(!o)return null;var i=Ao.valueCallback?Ao.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:Io({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:Io({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:Io({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:Io({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:Io({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},No=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Oo=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bo=/^'([^]*?)'?$/,Lo=/''/g,Ro=/[a-zA-Z]/;function ko(e,t,n){var r,o,i,a,s,l,u,c,d,p,h,f,m,g,v,y,x,_;Hr(2,arguments);var b=String(t),T=Vr(),S=null!==(r=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:T.locale)&&void 0!==r?r:Do,w=Ur(null!==(i=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:T.firstWeekContainsDate)&&void 0!==a?a:null===(d=T.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(w>=1&&w<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ur(null!==(h=null!==(f=null!==(m=null!==(g=null==n?void 0:n.weekStartsOn)&&void 0!==g?g:null==n||null===(v=n.locale)||void 0===v||null===(y=v.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:T.weekStartsOn)&&void 0!==f?f:null===(x=T.locale)||void 0===x||null===(_=x.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==h?h:0);if(!(C>=0&&C<=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 E=zr(e);if(!Yr(E))throw new RangeError("Invalid time value");var M=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),I=Qr(E,M),A={firstWeekContainsDate:w,weekStartsOn:C,locale:S,_originalDate:E};return b.match(Oo).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,yo[t])(e,S.formatLong):e})).join("").match(No).map((function(r){if("''"===r)return"'";var o=r[0];if("'"===o)return function(e){var t=e.match(Bo);if(!t)return e;return t[1].replace(Lo,"'")}(r);var i,a=fo[o];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(i=r,-1===_o.indexOf(i))||bo(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==xo.indexOf(e)}(r)||bo(r,t,String(e)),a(I,r,S.localize,A);if(o.match(Ro))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}var Po=function(e){var t,n,r=new Map,o=new Map,i=new Map,a=new Map,s=new Map,l=null==e?void 0:e.nodeDetails;if(l){var u=null===(t=l.find((function(e){return"PRIMARY"===e.clusterType})))||void 0===t?void 0:t.clusterId,c=null===(n=l.find((function(e){return"ASYNC"===e.clusterType})))||void 0===n?void 0:n.clusterId,d=l.filter((function(e){return"PRIMARY"===e.clusterType})),p=new Set(d.map((function(e){return e.region}))),h=l.filter((function(e){return"ASYNC"===e.clusterType})),f=new Set(h.map((function(e){return e.region})));r.set("Primary",{cluster:"Primary",regions:Array.from(p),uuid:u}),c&&o.set("Async",{cluster:"Read Replica",regions:Array.from(f),uuid:c});for(var m=function(e){s.set(e.id.name,{nodeName:e.id.name,ip:e.privateIp}),e.clusterId===u?i.set(e.az,{zoneName:e.az,nodeNames:d.filter((function(t){return t.az===e.az})).map((function(e){return e.id.name})),isReadReplica:!1,regionName:e.region}):e.clusterId===c&&a.set(e.az,{zoneName:e.az,nodeNames:h.filter((function(t){return t.az===e.az})).map((function(e){return e.id.name})),isReadReplica:!0,regionName:e.region})},g=0,v=l;g<v.length;g++){m(v[g])}}return{primaryZoneMapping:i,asyncZoneMapping:a,primaryClusterMapping:r,asyncClusterMapping:o,nodeIPMapping:s}},jo=function(e){var t,n,r,o,i,a,s,l,u,c,d,p,h,f,m;return{dbId:null===(r=null===(n=null===(t=null==e?void 0:e.mainGraphs[0])||void 0===t?void 0:t.filters)||void 0===n?void 0:n.dbId)||void 0===r?void 0:r[0],queryId:null===(a=null===(i=null===(o=null==e?void 0:e.mainGraphs[0])||void 0===o?void 0:o.filters)||void 0===i?void 0:i.queryId)||void 0===a?void 0:a[0],tabletId:null===(u=null===(l=null===(s=null==e?void 0:e.mainGraphs[0])||void 0===s?void 0:s.filters)||void 0===l?void 0:l.tabletId)||void 0===u?void 0:u[0],tableName:null===(p=null===(d=null===(c=null==e?void 0:e.mainGraphs[0])||void 0===c?void 0:c.filters)||void 0===d?void 0:d.tableName)||void 0===p?void 0:p[0],dbName:null===(m=null===(f=null===(h=null==e?void 0:e.mainGraphs[0])||void 0===h?void 0:h.filters)||void 0===f?void 0:f.dbName)||void 0===m?void 0:m[0]}},Fo=function(e){var t,n,r,o,i,a,s,l,u,c,d,p,h,f,m,g,v,y,x,_,b,T,S,w,C,E,M;return{dbId:null===(o=null===(r=null===(n=null===(t=null==e?void 0:e.lastInstance)||void 0===t?void 0:t.mainGraphs[0])||void 0===n?void 0:n.filters)||void 0===r?void 0:r.dbId)||void 0===o?void 0:o[0],queryId:null===(l=null===(s=null===(a=null===(i=null==e?void 0:e.lastInstance)||void 0===i?void 0:i.mainGraphs[0])||void 0===a?void 0:a.filters)||void 0===s?void 0:s.queryId)||void 0===l?void 0:l[0],tabletId:null===(p=null===(d=null===(c=null===(u=null==e?void 0:e.lastInstance)||void 0===u?void 0:u.mainGraphs[0])||void 0===c?void 0:c.filters)||void 0===d?void 0:d.tabletId)||void 0===p?void 0:p[0],tableName:null===(g=null===(m=null===(f=null===(h=null==e?void 0:e.lastInstance)||void 0===h?void 0:h.mainGraphs[0])||void 0===f?void 0:f.filters)||void 0===m?void 0:m.tableName)||void 0===g?void 0:g[0],dbName:null===(_=null===(x=null===(y=null===(v=null==e?void 0:e.lastInstance)||void 0===v?void 0:v.mainGraphs[0])||void 0===y?void 0:y.filters)||void 0===x?void 0:x.dbName)||void 0===_?void 0:_[0],schemaName:null!==(S=null===(T=null===(b=null==e?void 0:e.lastInstance)||void 0===b?void 0:b.entityLabels)||void 0===T?void 0:T.schemaName)&&void 0!==S?S:null===(M=null===(E=null===(C=null===(w=null==e?void 0:e.lastInstance)||void 0===w?void 0:w.mainGraphs[0])||void 0===C?void 0:C.filters)||void 0===E?void 0:E.schemaName)||void 0===M?void 0:M[0]}},Uo=function(e,t,n){var r,o,i,a,s,l,u=new Set,c={},d=null===(i=null===(o=null===(r=e.layout)||void 0===r?void 0:r.metadata)||void 0===o?void 0:o.currentGroupBy)||void 0===i?void 0:i[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,o;return t.name===e.name&&(null===(o=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===o?void 0:o[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),Sr(null==p?void 0:p.groupBy)&&u.sort((function(e,t){return e===c.name?-1:t===c.name?1:0})),u},Ho=function(e,t,n,r,o,i){var a,s;void 0===i&&(i=!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)===Vt&&Cr(t)&&c&&n===exports.GraphType.MULTI_SUPPORTING?r?Uo(t,o,i):Array.from(u):i?Uo(t,o,i):Array.from(u),c&&Cr(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)===Vt&&Cr(t)&&(l=r?Uo(t,o,i):Array.from(new Set)),{uniqueOperations:l,groupByOperations:u}},zo=function(e,t){Er(null==t?void 0:t.cluster)&&(null==t?void 0:t.cluster)!==zt?e.clusterUuid=[null==t?void 0:t.cluster]:delete e.clusterUuid,Er(null==t?void 0:t.region)&&(null==t?void 0:t.region)!==zt?e.regionCode=[null==t?void 0:t.region]:delete e.regionCode,Er(null==t?void 0:t.zone)&&(null==t?void 0:t.zone)!==zt?e.azCode=[null==t?void 0:t.zone]:delete e.azCode,Er(null==t?void 0:t.node)&&(null==t?void 0:t.node)!==zt?e.instanceName=[null==t?void 0:t.node]:delete e.instanceName},Wo=function(e,t,n,r,o,i,a){var s,l,u,c,d=[];if(t){var p=r.metricMeasure===exports.MetricMeasure.OUTLIER_TABLES,h=r.metricMeasure===exports.MetricMeasure.OUTLIER_DB,f=p||h?p?In[n]:An[n]:Mn[n],m=sessionStorage.getItem(p||h?p?kn:Pn:Rn),g=m?JSON.parse(m):{},v=p||h?p?null===(s=Dn.find((function(e){return e.name===f})))||void 0===s?void 0:s.metrics:null===(l=Nn.find((function(e){return e.name===f})))||void 0===l?void 0:l.metrics:null===(u=On.find((function(e){return e.name===f})))||void 0===u?void 0:u.metrics,y=null!==(c=null==v?void 0:v.filter((function(e){return g[e]})))&&void 0!==c?c:[];return null==y?void 0:y.map((function(e){var t={universeUuid:[null==r?void 0:r.universeUuid]};zo(t,r);var n=Tt.NONE;return(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?n=Tt.NODE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_TABLES?n=Tt.TABLE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER_DB&&(n=Tt.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?bt.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:wt.AVERAGE}}}))}if(!e)return null==o||o.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,zo(n,r),t.returnAggregatedValue=(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,t.splitType=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Tt.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Tt.NODE:Tt.TABLE,t.splitMode=(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?bt.NONE:null==r?void 0:r.outlierType,t.splitCount=null==r?void 0:r.numNodes,t})),o;if(e){var x=(null==i?void 0:i.type)===exports.QueryType.SQL||(null==i?void 0:i.type)===exports.QueryType.BACKGROUND,_=rn;(null==i?void 0:i.type)===exports.QueryType.CQL?_=on:(null==i?void 0:i.type)===exports.QueryType.BACKGROUND&&(_=O([],an,!0),"5"!==i.queryId||_.includes(sn)||_.push(sn)),_.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==i?void 0:i.universeId)&&void 0!==t?t:""]},settings:{splitMode:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?bt.NONE:null==r?void 0:r.outlierType,splitType:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OVERALL?Tt.NONE:(null==r?void 0:r.metricMeasure)===exports.MetricMeasure.OUTLIER?Tt.NODE:Tt.TABLE,splitCount:null==r?void 0:r.numNodes,returnAggregatedValue:(null==r?void 0:r.metricMeasure)!==exports.MetricMeasure.OVERALL,aggregatedValueFunction:wt.AVERAGE}};zo(n.filters,r),a?(Fo(a).dbId&&(n.filters.dbId=[Fo(a).dbId]),Fo(a).queryId&&(n.filters.queryId=[Fo(a).queryId])):((null==i?void 0:i.type)===exports.QueryType.SQL&&(null==i?void 0:i.userId)&&(n.filters.userId=[i.userId]),(null==i?void 0:i.queryId)&&(n.filters.queryId=[i.queryId]),x&&(null==i?void 0:i.dbId)&&(n.filters.dbId=[i.dbId])),e.startsWith("active_session_history")&&(n.groupBy=[exports.WaitEventClassification.WAIT_EVENT_TYPE]),d.push(n)}))}return d},Vo=function(e,t){var n=120;if(Er(e)||Er(t)){var r=new Date(e),o=qr(new Date(t),r);5===o?n=180:o>5&&o<=23?n=600:o>23&&o<=47?n=1e3:o>47&&o<=167?n=2200:o>=167&&(n=4200)}return n},Yo=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],o=e[n];new Date(r.endTime)>=new Date(o.startTime)?r.endTime=new Date(Math.max(new Date(r.endTime).getTime(),new Date(o.endTime).getTime())).toISOString():t.push(o)}return t},Go=function(e){return e.length>35?"...".concat(e.substring(20,e.length)):e},qo=function(e,t){var n=Go(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:10px;\n height:10px;\n background-color:'.concat(e,';\n "></span><span style="color:#4E5F6D;">').concat(n,"</span></span>")},Qo=function(e){return'<span style="\n text-align:right;\n font-variant-numeric: tabular-nums; /* nicer alignment */\n white-space:nowrap;\n color:#4E5F6D;\n ">'.concat(e,"</span>")},Zo=function(e,t){var n=t,r=new Date;return e===gn.SEVEN_DAYS?r.setDate(r.getDate()-7):e===gn.TWO_DAYS?r.setDate(r.getDate()-2):e===gn.ONE_DAY?r.setDate(r.getDate()-1):e===gn.SIX_HOURS?r.setHours(r.getHours()-6):e===gn.ONE_HOUR&&r.setHours(r.getHours()-1),{formattedStartDate:r,formattedEndDate:n}},Xo=function(e,t,n){if(e&&e!==gn.CUSTOM){var r=Zo(e,t);return{startDateTime:r.formattedStartDate,endDateTime:r.formattedEndDate}}return{startDateTime:n,endDateTime:t}},Ko=function(e){return null==e?void 0:e.map((function(e){var t,n,r,o,i,a;return{databaseId:null!==(t=e.databaseId)&&void 0!==t?t:"",eps:e.eps,events:e.events,firstActive:null!==(n=e.firstActive)&&void 0!==n?n:"",lastActive:null!==(r=e.lastActive)&&void 0!==r?r:"",latencyAvg:e.latencyAvg,latencyP90:e.latencyP90,latencyP99:e.latencyP99,namespaceName:e.namespaceName,query:e.query,queryId:null!==(o=e.queryId)&&void 0!==o?o:"",queryType:null!==(i=e.queryType)&&void 0!==i?i:"",rowsAvg:e.rowsAvg,rps:e.rps,totalEpsRatio:e.totalEpsRatio,totalTime:e.totalTime,universeId:null!==(a=e.universeId)&&void 0!==a?a:""}}))},$o=function(e,t){return void 0===t&&(t=!1),null==e?void 0:e.map((function(e){var n,r,o,i,a,s,l,u,c,d,p,h,f,m,g,v,y,x,_,b,T;return t?{tabletId:null!==(n=e.tabletId)&&void 0!==n?n:"",sstSize:null!==(r=e.sstSize)&&void 0!==r?r:"",size:null!==(o=e.size)&&void 0!==o?o:"",walSize:null!==(i=e.walSize)&&void 0!==i?i:"",leaderNode:null!==(a=e.leaderNode)&&void 0!==a?a:"",followerNodes:null!==(s=e.followerNodes)&&void 0!==s?s:[],partition:null!==(l=e.partition)&&void 0!==l?l:"",eps:null!==(u=e.eps)&&void 0!==u?u:0,totalEpsRatio:null!==(c=e.totalEpsRatio)&&void 0!==c?c:0,databaseType:null!==(d=e.databaseType)&&void 0!==d?d:"",events:null!==(p=e.events)&&void 0!==p?p:[]}:{databaseName:null!==(h=e.databaseName)&&void 0!==h?h:"",databaseType:null!==(f=e.databaseType)&&void 0!==f?f:"",eps:null!==(m=e.eps)&&void 0!==m?m:0,events:null!==(g=e.events)&&void 0!==g?g:[],partition:null!==(v=e.partition)&&void 0!==v?v:"",schemaName:null!==(y=e.schemaName)&&void 0!==y?y:"",tableName:null!==(x=e.tableName)&&void 0!==x?x:"",tabletId:null!==(_=e.tabletId)&&void 0!==_?_:"",universeId:null!==(b=e.universeId)&&void 0!==b?b:"",totalEpsRatio:null!==(T=e.totalEpsRatio)&&void 0!==T?T:0}}))},Jo=function(e){if(Number.isInteger(e)){var t=e,n=["B","KB","MB","GB","TB","PB","EB"];if(t<=0)return t+" "+n[0];var r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(2))+" "+n[r]}return"-"},ei=function(e,t){var n=null!=e?e:"";return n.length>t?"".concat(n.substring(0,t),"..."):n},ti=function(e,t,n){return e?e.length<=n?e:t===exports.AnomalyCategory.APP||t===exports.AnomalyCategory.NODE?"...".concat(e.slice(-n)):"".concat(e.substring(0,n),"..."):"-"},ni=function(e,t,n,r){var o;if(o=r.currentTab===exports.InsightsTabs.INSIGHTS?exports.InsightsTabs.INSIGHTS:r.currentTab===exports.InsightsTabs.CLUSTER_LOAD?n?r.clusterLoadOverallSubTab===exports.ClusterLoadOverallTabs.QUERIES?exports.ClusterLoadOverallTabs.QUERIES:exports.ClusterLoadOverallTabs.ANOMALIES:"Anomaly":exports.ClusterLoadOverallTabs.ANOMALIES,e&&r.currentTab!==exports.InsightsTabs.INSIGHTS){if(t){var i=String(t),a=i.charAt(0).toUpperCase()+i.slice(1).toLowerCase();return t===exports.AnomalyCategory.DB?"Tablet ".concat(o):"".concat(a," ").concat(o)}return"Unknown ".concat(o)}return o},ri=function(e){var t,n,r=e.anomalyData,o=e.entityDisplayName,i=e.queryText,a=e.maxLength,s=void 0===a?30:a;return(null===(t=null==r?void 0:r.lastInstance)||void 0===t?void 0:t.category)===exports.AnomalyCategory.APP||(null===(n=null==r?void 0:r.lastInstance)||void 0===n?void 0:n.category)===exports.AnomalyCategory.NODE?function(e,t){var n=null!=e?e:"";return n.length>t?"...".concat(n.substring(n.length-t+3)):n}(o,s):ei(r?o:i,s)},oi=function(e){var t=window.location.pathname,n=new URLSearchParams(window.location.search).get("tab"),r=exports.InsightsTabs.CLUSTER_LOAD,o=exports.ClusterLoadSubTabs.OVERALL_LOAD,i=exports.ClusterLoadOverallTabs.QUERIES;if(t.includes("/".concat(jt.METRICS))||n===jt.METRICS)r=exports.InsightsTabs.METRICS;else if(t.includes("/".concat(jt.INSIGHTS))||n===jt.INSIGHTS)r=exports.InsightsTabs.INSIGHTS;else if(t.includes("/".concat(jt.CLUSTER_LOAD))||n===jt.CLUSTER_LOAD){if(r=exports.InsightsTabs.CLUSTER_LOAD,t.includes("/".concat(jt.CLUSTER_LOAD_DB)))o=exports.ClusterLoadSubTabs.LOAD_BY_DATABASE;else o=exports.ClusterLoadSubTabs.OVERALL_LOAD,i=t.includes("/".concat(jt.CLUSTER_LOAD,"/").concat(jt.OVERALL_LOAD,"/").concat(jt.ANOMALIES))?exports.ClusterLoadOverallTabs.ANOMALIES:exports.ClusterLoadOverallTabs.QUERIES}return{currentTab:r,clusterLoadSubTab:o,clusterLoadOverallSubTab:i}},ii=function(e,t,n,r,o){void 0===o&&(o=!1);var i=function(e,t,n){var r=window.location.pathname,o=new URLSearchParams(window.location.search).toString();if(r=r.replace(/\/anomalies|\/dbLoad\/?|\/insights|\/metricsNew(\/[^/]+)?|\/clusterLoad(\/[^/]+)?|\/queries/g,""),e===exports.InsightsTabs.METRICS)r="".concat(r,"/").concat(jt.METRICS);else if(e===exports.InsightsTabs.INSIGHTS)r="".concat(r,"/").concat(jt.INSIGHTS);else if(e===exports.InsightsTabs.CLUSTER_LOAD)if(t===exports.ClusterLoadSubTabs.LOAD_BY_DATABASE)r="".concat(r,"/").concat(jt.CLUSTER_LOAD,"/").concat(jt.CLUSTER_LOAD_DB);else{var i=n===exports.ClusterLoadOverallTabs.QUERIES?jt.QUERIES:jt.ANOMALIES;r="".concat(r,"/").concat(jt.CLUSTER_LOAD,"/").concat(jt.OVERALL_LOAD,"/").concat(i)}return"".concat(r).concat(o?"?".concat(o):"")}(t,n,r),a=new URLSearchParams(window.location.search).toString();i!==window.location.pathname+(a?"?".concat(a):"")&&(o?window.history.pushState(null,"",i):window.history.replaceState(null,"",i))},ai=function(e,t){void 0===t&&(t=!1);var n=window.location.href,r=n.substring(0,n.lastIndexOf("/")),o=new URLSearchParams(window.location.search),i=o.get("duration"),a=o.get("startTime"),s=o.get("endTime"),l=o.get("dbId"),u=o.get("userId"),c=o.get("universeId"),d=o.get("type"),p=o.get("tab");o.get("queryId");var h=new URLSearchParams;Er(i)&&h.append("duration",i),Er(a)&&h.append("startTime",a),Er(s)&&h.append("endTime",s),Er(l)&&h.delete("dbId",l),Er(u)&&h.delete("userId",u),Er(c)&&h.delete("universeId",c),Er(d)&&h.delete("type",d),e===exports.AppName.YBA&&Er(p)&&h.append("tab",p);var f=r;if(t&&(f=f.replace("/queries","")),f.includes("dbLoad/")){var m=f.lastIndexOf("/");if(-1!==m){var g=f.substring(0,m);g.endsWith("dbLoad")&&(f=g)}}return"".concat(f).concat(h.toString()?"?".concat(h.toString()):"")},si=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=new URL(window.location.href);if(e){["universeId","queryId","dbId","userId","type"].forEach((function(e){return r.searchParams.delete(e)}))}if(!t){var o=r.pathname;if(n){var i=o.indexOf("/".concat(jt.ANOMALIES,"/"));-1!==i&&(r.pathname=o.substring(0,i+"/".concat(jt.ANOMALIES).length))}else{var a=o.lastIndexOf("/");a>0&&(r.pathname=o.substring(0,a))}}return r},li=function(e,t,n,r){var o,i;if(e===exports.AppName.YBM||e===exports.AppName.YBA){null==n||n(null!==(i=null===(o=null==t?void 0:t.lastInstance)||void 0===o?void 0:o.uuid)&&void 0!==i?i:null);var a=function(){var e=new URL(window.location.href);["universeId","queryId","dbId","userId","type"].forEach((function(t){return e.searchParams.delete(t)}));var t=e.pathname;if(t.includes("/queries/")){var n=t.indexOf("/queries/");e.pathname=t.substring(0,n)}return e}();r?r(a.pathname+a.search):window.history.pushState({},"",a.toString())}else{var s=ai(e,!0);window.location.href=s}},ui=function(e,t,n,r,o,i){return void 0===i&&(i="query_drilldown_click"),[{timestamp:(new Date).valueOf(),category:"UI",type:"click",payload:{appName:e,cluster_id:o,key:t,source:i,start_time:n,end_time:r}}]},ci="data:image/svg+xml,%3csvg width='13' height='14' viewBox='0 0 13 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.11094 3.11172V3.88945H1.94434C1.30004 3.88945 0.777735 4.41176 0.777735 5.05605V12.0557C0.777735 12.7 1.30004 13.2223 1.94434 13.2223H7.38848C8.03278 13.2223 8.55508 12.7 8.55508 12.0557V10.8891H9.33282V12.0557C9.33282 13.1295 8.46231 14 7.38848 14H1.94434C0.870509 14 0 13.1295 0 12.0557V5.05605C0 3.98223 0.870509 3.11172 1.94434 3.11172H3.11094ZM9.33333 0.778528H5.05579C4.4115 0.778528 3.88919 1.30083 3.88919 1.94513V8.94474C3.88919 9.58904 4.4115 10.1113 5.05579 10.1113H10.4999C11.1442 10.1113 11.6665 9.58904 11.6665 8.94474V3.11173H9.7222C9.50744 3.11173 9.33333 2.93763 9.33333 2.72286V0.778528ZM12.4436 2.74461V8.94473C12.4436 10.0186 11.5731 10.8891 10.4993 10.8891H5.05514C3.98132 10.8891 3.11081 10.0186 3.11081 8.94473V1.94512C3.11081 0.871289 3.98132 0.000779584 5.05514 0.000779584H9.69979C9.80303 -0.00576853 9.9105 0.0286532 9.99652 0.114676L12.3297 2.44788C12.4157 2.5339 12.4502 2.64137 12.4436 2.74461ZM10.1108 2.33401H11.1163L10.1108 1.32848V2.33401ZM5.83301 7.77813C5.61824 7.77813 5.44414 7.60403 5.44414 7.38926C5.44414 7.1745 5.61824 7.0004 5.83301 7.0004H7.38848C7.60324 7.0004 7.77734 7.1745 7.77734 7.38926C7.77734 7.60403 7.60324 7.77813 7.38848 7.77813H5.83301ZM5.83301 6.22267C5.61824 6.22267 5.44414 6.04857 5.44414 5.8338C5.44414 5.61904 5.61824 5.44494 5.83301 5.44494H9.72168C9.93645 5.44494 10.1105 5.61904 10.1105 5.8338C10.1105 6.04857 9.93645 6.22267 9.72168 6.22267H5.83301ZM5.83301 4.66718C5.61824 4.66718 5.44414 4.49308 5.44414 4.27832C5.44414 4.06355 5.61824 3.88945 5.83301 3.88945H9.72168C9.93645 3.88945 10.1105 4.06355 10.1105 4.27832C10.1105 4.49308 9.93645 4.66718 9.72168 4.66718H5.83301Z' fill='%232B59C3'/%3e%3c/svg%3e";function di(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pi={exports:{}},hi=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}},fi=hi,mi=Object.prototype.toString;function gi(e){return"[object Array]"===mi.call(e)}function vi(e){return void 0===e}function yi(e){return null!==e&&"object"==typeof e}function xi(e){if("[object Object]"!==mi.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function _i(e){return"[object Function]"===mi.call(e)}function bi(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),gi(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var Ti={isArray:gi,isArrayBuffer:function(e){return"[object ArrayBuffer]"===mi.call(e)},isBuffer:function(e){return null!==e&&!vi(e)&&null!==e.constructor&&!vi(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:yi,isPlainObject:xi,isUndefined:vi,isDate:function(e){return"[object Date]"===mi.call(e)},isFile:function(e){return"[object File]"===mi.call(e)},isBlob:function(e){return"[object Blob]"===mi.call(e)},isFunction:_i,isStream:function(e){return yi(e)&&_i(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:bi,merge:function e(){var t={};function n(n,r){xi(t[r])&&xi(n)?t[r]=e(t[r],n):xi(n)?t[r]=e({},n):gi(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)bi(arguments[r],n);return t},extend:function(e,t,n){return bi(t,(function(t,r){e[r]=n&&"function"==typeof t?fi(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},Si=Ti;function wi(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ci=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(Si.isURLSearchParams(t))r=t.toString();else{var o=[];Si.forEach(t,(function(e,t){null!=e&&(Si.isArray(e)?t+="[]":e=[e],Si.forEach(e,(function(e){Si.isDate(e)?e=e.toISOString():Si.isObject(e)&&(e=JSON.stringify(e)),o.push(wi(t)+"="+wi(e))})))})),r=o.join("&")}if(r){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e},Ei=Ti;function Mi(){this.handlers=[]}Mi.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},Mi.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Mi.prototype.forEach=function(e){Ei.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var Ii,Ai,Di,Ni,Oi,Bi,Li,Ri,ki,Pi,ji,Fi,Ui,Hi,zi,Wi,Vi,Yi,Gi=Mi,qi=Ti,Qi=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e};function Zi(){if(Ai)return Ii;Ai=1;var e=Qi;return Ii=function(t,n,r,o,i){var a=new Error(t);return e(a,n,r,o,i)}}function Xi(){if(Ni)return Di;Ni=1;var e=Zi();return Di=function(t,n,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?n(e("Request failed with status code "+r.status,r.config,null,r.request,r)):t(r)}}function Ki(){if(Bi)return Oi;Bi=1;var e=Ti;return Oi=e.isStandardBrowserEnv()?{write:function(t,n,r,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(n)),e.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),e.isString(o)&&s.push("path="+o),e.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Oi}function $i(){return Ri?Li:(Ri=1,Li=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)})}function Ji(){return Pi?ki:(Pi=1,ki=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e})}function ea(){if(Fi)return ji;Fi=1;var e=$i(),t=Ji();return ji=function(n,r){return n&&!e(r)?t(n,r):r}}function ta(){if(Hi)return Ui;Hi=1;var e=Ti,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Ui=function(n){var r,o,i,a={};return n?(e.forEach(n.split("\n"),(function(n){if(i=n.indexOf(":"),r=e.trim(n.substr(0,i)).toLowerCase(),o=e.trim(n.substr(i+1)),r){if(a[r]&&t.indexOf(r)>=0)return;a[r]="set-cookie"===r?(a[r]?a[r]:[]).concat([o]):a[r]?a[r]+", "+o:o}})),a):a}}function na(){if(Wi)return zi;Wi=1;var e=Ti;return zi=e.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var t=e;return n&&(r.setAttribute("href",t),t=r.href),r.setAttribute("href",t),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(n){var r=e.isString(n)?o(n):n;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}}var ra,oa,ia,aa,sa,la={exports:{}},ua={exports:{}},ca={exports:{}};function da(){if(oa)return ra;oa=1;var e=1e3,t=60*e,n=60*t,r=24*n,o=7*r,i=365.25*r;function a(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}return ra=function(s,l){l=l||{};var u=typeof s;if("string"===u&&s.length>0)return function(a){if((a=String(a)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*o;case"days":case"day":case"d":return l*r;case"hours":case"hour":case"hrs":case"hr":case"h":return l*n;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(s);if("number"===u&&isFinite(s))return l.long?function(o){var i=Math.abs(o);if(i>=r)return a(o,i,r,"day");if(i>=n)return a(o,i,n,"hour");if(i>=t)return a(o,i,t,"minute");if(i>=e)return a(o,i,e,"second");return o+" ms"}(s):function(o){var i=Math.abs(o);if(i>=r)return Math.round(o/r)+"d";if(i>=n)return Math.round(o/n)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},ra}function pa(){if(aa)return ia;return aa=1,ia=function(e){function t(e){let r,o,i,a=null;function s(...e){if(!s.enabled)return;const n=s,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";a++;const i=t.formatters[o];if("function"==typeof i){const t=e[a];r=i.call(n,t),e.splice(a,1),a--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{a=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=da(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t},ia}var ha,fa,ma,ga,va,ya,xa,_a,ba,Ta={exports:{}};function Sa(){return fa?ha:(fa=1,ha=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return-1!==r&&(-1===o||r<o)})}function wa(){return va||(va=1,function(e,t){const n=d,r=p;t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(r.formatWithOptions(t.inspectOpts,...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),i=` ${o};1m${r} [0m`;n[0]=i+n[0].split("\n").join("\n"+i),n.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else n[0]=function(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.destroy=r.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if(ga)return ma;ga=1;const e=h,t=d,n=Sa(),{env:r}=process;let o;function i(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function a(t,i){if(0===o)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!i&&void 0===o)return 0;const a=o||0;if("dumb"===r.TERM)return a;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:a;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:a}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?o=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(o=1),"FORCE_COLOR"in r&&(o="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),ma={supportsColor:function(e){return i(a(e,e&&e.isTTY))},stdout:i(a(!0,t.isatty(1))),stderr:i(a(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=pa()(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Ta,Ta.exports)),Ta.exports}function Ca(){return ya||(ya=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?ua.exports=(sa||(sa=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=pa()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ca,ca.exports)),ca.exports):ua.exports=wa()),ua.exports}function Ea(){if(ba)return la.exports;ba=1;var e,t,n,r=l,o=r.URL,i=a,d=s,p=u.Writable,h=c,f=function(){return _a||(_a=1,xa=function(){if(!e){try{e=Ca()("follow-redirects")}catch(e){}"function"!=typeof e&&(e=function(){})}e.apply(null,arguments)}),xa;var e}();e="undefined"!=typeof process,t="undefined"!=typeof window&&"undefined"!=typeof document,n=R(Error.captureStackTrace),e||!t&&n||console.warn("The follow-redirects package should be excluded from browser builds.");var m=!1;try{h(new o(""))}catch(e){m="ERR_INVALID_URL"===e.code}var g=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],v=["abort","aborted","connect","error","socket","timeout"],y=Object.create(null);v.forEach((function(e){y[e]=function(t,n,r){this._redirectable.emit(e,t,n,r)}}));var x=O("ERR_INVALID_URL","Invalid URL",TypeError),_=O("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),b=O("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",_),T=O("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),S=O("ERR_STREAM_WRITE_AFTER_END","write after end"),w=p.prototype.destroy||M;function C(e,t){p.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var n=this;this._onNativeResponse=function(e){try{n._processResponse(e)}catch(e){n.emit("error",e instanceof _?e:new _({cause:e}))}},this._performRequest()}function E(e){var t={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(e).forEach((function(r){var i=r+":",a=n[i]=e[r],s=t[r]=Object.create(a);Object.defineProperties(s,{request:{value:function(e,r,a){var s;return s=e,o&&s instanceof o?e=D(e):L(e)?e=D(I(e)):(a=r,r=A(e),e={protocol:i}),R(r)&&(a=r,r=null),(r=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,r)).nativeProtocols=n,L(r.host)||L(r.hostname)||(r.hostname="::1"),h.equal(r.protocol,i,"protocol mismatch"),f("options",r),new C(r,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,n){var r=s.request(e,t,n);return r.end(),r},configurable:!0,enumerable:!0,writable:!0}})})),t}function M(){}function I(e){var t;if(m)t=new o(e);else if(!L((t=A(r.parse(e))).protocol))throw new x({input:e});return t}function A(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new x({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new x({input:e.href||e});return e}function D(e,t){var n=t||{};for(var r of g)n[r]=e[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),""!==n.port&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function N(e,t){var n;for(var r in t)e.test(r)&&(n=t[r],delete t[r]);return null==n?void 0:String(n).trim()}function O(e,t,n){function r(n){R(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),r}function B(e,t){for(var n of v)e.removeListener(n,y[n]);e.on("error",M),e.destroy(t)}function L(e){return"string"==typeof e||e instanceof String}function R(e){return"function"==typeof e}return C.prototype=Object.create(p.prototype),C.prototype.abort=function(){B(this._currentRequest),this._currentRequest.abort(),this.emit("abort")},C.prototype.destroy=function(e){return B(this._currentRequest,e),w.call(this,e),this},C.prototype.write=function(e,t,n){if(this._ending)throw new S;if(!L(e)&&("object"!=typeof(r=e)||!("length"in r)))throw new TypeError("data should be a string, Buffer or Uint8Array");var r;R(t)&&(n=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,n)):(this.emit("error",new T),this.abort()):n&&n()},C.prototype.end=function(e,t,n){if(R(e)?(n=e,e=t=null):R(t)&&(n=t,t=null),e){var r=this,o=this._currentRequest;this.write(e,t,(function(){r._ended=!0,o.end(null,null,n)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,n)},C.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},C.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},C.prototype.setTimeout=function(e,t){var n=this;function r(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout((function(){n.emit("timeout"),i()}),e),r(t)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),t&&n.removeListener("timeout",t),n.socket||n._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){C.prototype[e]=function(t,n){return this._currentRequest[e](t,n)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(C.prototype,e,{get:function(){return this._currentRequest[e]}})})),C.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},C.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var n=e.slice(0,-1);this._options.agent=this._options.agents[n]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var i of(o._redirectable=this,v))o.on(i,y[i]);if(this._currentUrl=/^\//.test(this._options.path)?r.format(this._options):this._options.path,this._isRedirect){var a=0,s=this,l=this._requestBodyBuffers;!function e(t){if(o===s._currentRequest)if(t)s.emit("error",t);else if(a<l.length){var n=l[a++];o.finished||o.write(n.data,n.encoding,e)}else s._ended&&o.end()}()}},C.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var n,i=e.headers.location;if(!i||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(B(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new b;var a=this._options.beforeRedirect;a&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],N(/^content-/i,this._options.headers));var l=N(/^host$/i,this._options.headers),u=I(this._currentUrl),c=l||u.host,d=/^\w+:/.test(i)?this._currentUrl:r.format(Object.assign(u,{host:c})),p=function(e,t){return m?new o(e,t):I(r.resolve(t,e))}(i,d);if(f("redirecting to",p.href),this._isRedirect=!0,D(p,this._options),(p.protocol!==u.protocol&&"https:"!==p.protocol||p.host!==c&&!function(e,t){h(L(e)&&L(t));var n=e.length-t.length-1;return n>0&&"."===e[n]&&e.endsWith(t)}(p.host,c))&&N(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),R(a)){var g={headers:e.headers,statusCode:t},v={url:d,method:s,headers:n};a(this._options,g,v),this._sanitizeOptions(this._options)}this._performRequest()},la.exports=E({http:i,https:d}),la.exports.wrap=E,la.exports}var Ma,Ia,Aa={name:"axios",version:"0.21.3",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};function Da(){if(Ia)return Ma;Ia=1;var e=Ti,t=Xi(),n=ea(),r=Ci,o=a,i=s,u=Ea().http,c=Ea().https,d=l,p=f,h=Aa,m=Zi(),g=Qi,v=/https:?/;function y(e,t,n){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=n,t.auth){var r=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+r}e.beforeRedirect=function(e){e.headers.host=e.host,y(e,t,e.href)}}return Ma=function(a){return new Promise((function(s,l){var f=function(e){s(e)},x=function(e){l(e)},_=a.data,b=a.headers;if("User-Agent"in b||"user-agent"in b?b["User-Agent"]||b["user-agent"]||(delete b["User-Agent"],delete b["user-agent"]):b["User-Agent"]="axios/"+h.version,_&&!e.isStream(_)){if(Buffer.isBuffer(_));else if(e.isArrayBuffer(_))_=Buffer.from(new Uint8Array(_));else{if(!e.isString(_))return x(m("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",a));_=Buffer.from(_,"utf-8")}b["Content-Length"]=_.length}var T=void 0;a.auth&&(T=(a.auth.username||"")+":"+(a.auth.password||""));var S=n(a.baseURL,a.url),w=d.parse(S),C=w.protocol||"http:";if(!T&&w.auth){var E=w.auth.split(":");T=(E[0]||"")+":"+(E[1]||"")}T&&delete b.Authorization;var M=v.test(C),I=M?a.httpsAgent:a.httpAgent,A={path:r(w.path,a.params,a.paramsSerializer).replace(/^\?/,""),method:a.method.toUpperCase(),headers:b,agent:I,agents:{http:a.httpAgent,https:a.httpsAgent},auth:T};a.socketPath?A.socketPath=a.socketPath:(A.hostname=w.hostname,A.port=w.port);var D,N=a.proxy;if(!N&&!1!==N){var O=C.slice(0,-1)+"_proxy",B=process.env[O]||process.env[O.toUpperCase()];if(B){var L=d.parse(B),R=process.env.no_proxy||process.env.NO_PROXY,k=!0;if(R)k=!R.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&w.hostname.substr(w.hostname.length-e.length)===e||w.hostname===e))}));if(k&&(N={host:L.hostname,port:L.port,protocol:L.protocol},L.auth)){var P=L.auth.split(":");N.auth={username:P[0],password:P[1]}}}}N&&(A.headers.host=w.hostname+(w.port?":"+w.port:""),y(A,N,C+"//"+w.hostname+(w.port?":"+w.port:"")+A.path));var j=M&&(!N||v.test(N.protocol));a.transport?D=a.transport:0===a.maxRedirects?D=j?i:o:(a.maxRedirects&&(A.maxRedirects=a.maxRedirects),D=j?c:u),a.maxBodyLength>-1&&(A.maxBodyLength=a.maxBodyLength);var F=D.request(A,(function(n){if(!F.aborted){var r=n,o=n.req||F;if(204!==n.statusCode&&"HEAD"!==o.method&&!1!==a.decompress)switch(n.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(p.createUnzip()),delete n.headers["content-encoding"]}var i={status:n.statusCode,statusText:n.statusMessage,headers:n.headers,config:a,request:o};if("stream"===a.responseType)i.data=r,t(f,x,i);else{var s=[],l=0;r.on("data",(function(e){s.push(e),l+=e.length,a.maxContentLength>-1&&l>a.maxContentLength&&(r.destroy(),x(m("maxContentLength size of "+a.maxContentLength+" exceeded",a,null,o)))})),r.on("error",(function(e){F.aborted||x(g(e,a,null,o))})),r.on("end",(function(){var n=Buffer.concat(s);"arraybuffer"!==a.responseType&&(n=n.toString(a.responseEncoding),a.responseEncoding&&"utf8"!==a.responseEncoding||(n=e.stripBOM(n))),i.data=n,t(f,x,i)}))}}}));if(F.on("error",(function(e){F.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==e.code||x(g(e,a,null,F))})),a.timeout){var U=parseInt(a.timeout,10);if(isNaN(U))return void x(m("error trying to parse `config.timeout` to int",a,"ERR_PARSE_TIMEOUT",F));F.setTimeout(U,(function(){F.abort(),x(m("timeout of "+U+"ms exceeded",a,a.transitional&&a.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",F))}))}a.cancelToken&&a.cancelToken.promise.then((function(e){F.aborted||(F.abort(),x(e))})),e.isStream(_)?_.on("error",(function(e){x(g(e,a,null,F))})).pipe(F):F.end(_)}))}}var Na=Ti,Oa=function(e,t){qi.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))},Ba=Qi,La={"Content-Type":"application/x-www-form-urlencoded"};function Ra(e,t){!Na.isUndefined(e)&&Na.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var ka,Pa={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:("undefined"!=typeof XMLHttpRequest?ka=function(){if(Yi)return Vi;Yi=1;var e=Ti,t=Xi(),n=Ki(),r=Ci,o=ea(),i=ta(),a=na(),s=Zi();return Vi=function(l){return new Promise((function(u,c){var d=l.data,p=l.headers,h=l.responseType;e.isFormData(d)&&delete p["Content-Type"];var f=new XMLHttpRequest;if(l.auth){var m=l.auth.username||"",g=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+g)}var v=o(l.baseURL,l.url);function y(){if(f){var e="getAllResponseHeaders"in f?i(f.getAllResponseHeaders()):null,n={data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:e,config:l,request:f};t(u,c,n),f=null}}if(f.open(l.method.toUpperCase(),r(v,l.params,l.paramsSerializer),!0),f.timeout=l.timeout,"onloadend"in f?f.onloadend=y:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(y)},f.onabort=function(){f&&(c(s("Request aborted",l,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(s("Network Error",l,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+l.timeout+"ms exceeded";l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),c(s(e,l,l.transitional&&l.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",f)),f=null},e.isStandardBrowserEnv()){var x=(l.withCredentials||a(v))&&l.xsrfCookieName?n.read(l.xsrfCookieName):void 0;x&&(p[l.xsrfHeaderName]=x)}"setRequestHeader"in f&&e.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:f.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(f.withCredentials=!!l.withCredentials),h&&"json"!==h&&(f.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&f.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",l.onUploadProgress),l.cancelToken&&l.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),d||(d=null),f.send(d)}))}}():"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(ka=Da()),ka),transformRequest:[function(e,t){return Oa(t,"Accept"),Oa(t,"Content-Type"),Na.isFormData(e)||Na.isArrayBuffer(e)||Na.isBuffer(e)||Na.isStream(e)||Na.isFile(e)||Na.isBlob(e)?e:Na.isArrayBufferView(e)?e.buffer:Na.isURLSearchParams(e)?(Ra(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Na.isObject(e)||t&&"application/json"===t["Content-Type"]?(Ra(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||r&&Na.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Ba(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};Pa.headers={common:{Accept:"application/json, text/plain, */*"}},Na.forEach(["delete","get","head"],(function(e){Pa.headers[e]={}})),Na.forEach(["post","put","patch"],(function(e){Pa.headers[e]=Na.merge(La)}));var ja,Fa,Ua=Pa,Ha=Ti,za=Ua;function Wa(){return Fa?ja:(Fa=1,ja=function(e){return!(!e||!e.__CANCEL__)})}var Va=Ti,Ya=function(e,t,n){var r=this||za;return Ha.forEach(n,(function(n){e=n.call(r,e,t)})),e},Ga=Wa(),qa=Ua;function Qa(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Za=Ti,Xa=function(e,t){t=t||{};var n={},r=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return Za.isPlainObject(e)&&Za.isPlainObject(t)?Za.merge(e,t):Za.isPlainObject(t)?Za.merge({},t):Za.isArray(t)?t.slice():t}function l(r){Za.isUndefined(t[r])?Za.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(e[r],t[r])}Za.forEach(r,(function(e){Za.isUndefined(t[e])||(n[e]=s(void 0,t[e]))})),Za.forEach(o,l),Za.forEach(i,(function(r){Za.isUndefined(t[r])?Za.isUndefined(e[r])||(n[r]=s(void 0,e[r])):n[r]=s(void 0,t[r])})),Za.forEach(a,(function(r){r in t?n[r]=s(e[r],t[r]):r in e&&(n[r]=s(void 0,e[r]))}));var u=r.concat(o).concat(i).concat(a),c=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return Za.forEach(c,l),n},Ka=Aa,$a={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){$a[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var Ja={},es=Ka.version.split(".");function ts(e,t){for(var n=t?t.split("."):es,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}$a.transitional=function(e,t,n){var r=t&&ts(t);function o(e,t){return"[Axios v"+Ka.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new Error(o(i," has been removed in "+t));return r&&!Ja[i]&&(Ja[i]=!0,console.warn(o(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}};var ns,rs,os,is,as,ss,ls,us,cs={isOlderVersion:ts,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],l=void 0===s||a(s,i,e);if(!0!==l)throw new TypeError("option "+i+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:$a},ds=Ti,ps=Ci,hs=Gi,fs=function(e){return Qa(e),e.headers=e.headers||{},e.data=Ya.call(e,e.data,e.headers,e.transformRequest),e.headers=Va.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Va.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||qa.adapter)(e).then((function(t){return Qa(e),t.data=Ya.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Ga(t)||(Qa(e),t&&t.response&&(t.response.data=Ya.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},ms=Xa,gs=cs,vs=gs.validators;function ys(e){this.defaults=e,this.interceptors={request:new hs,response:new hs}}function xs(){if(rs)return ns;function e(e){this.message=e}return rs=1,e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,ns=e}ys.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=ms(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&gs.assertOptions(t,{silentJSONParsing:vs.transitional(vs.boolean,"1.0.0"),forcedJSONParsing:vs.transitional(vs.boolean,"1.0.0"),clarifyTimeoutError:vs.transitional(vs.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var a=[fs,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(i),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var s=e;n.length;){var l=n.shift(),u=n.shift();try{s=l(s)}catch(e){u(e);break}}try{o=fs(s)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},ys.prototype.getUri=function(e){return e=ms(this.defaults,e),ps(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ds.forEach(["delete","get","head","options"],(function(e){ys.prototype[e]=function(t,n){return this.request(ms(n||{},{method:e,url:t,data:(n||{}).data}))}})),ds.forEach(["post","put","patch"],(function(e){ys.prototype[e]=function(t,n,r){return this.request(ms(r||{},{method:e,url:t,data:n}))}}));var _s=Ti,bs=hi,Ts=ys,Ss=Xa;function ws(e){var t=new Ts(e),n=bs(Ts.prototype.request,t);return _s.extend(n,Ts.prototype,t),_s.extend(n,t),n}var Cs=ws(Ua);Cs.Axios=Ts,Cs.create=function(e){return ws(Ss(Cs.defaults,e))},Cs.Cancel=xs(),Cs.CancelToken=function(){if(is)return os;is=1;var e=xs();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(e){n=e}));var r=this;t((function(t){r.reason||(r.reason=new e(t),n(r.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},os=t}(),Cs.isCancel=Wa(),Cs.all=function(e){return Promise.all(e)},Cs.spread=ss?as:(ss=1,as=function(e){return function(t){return e.apply(null,t)}}),Cs.isAxiosError=us?ls:(us=1,ls=function(e){return"object"==typeof e&&!0===e.isAxiosError}),pi.exports=Cs,pi.exports.default=Cs;var Es,Ms,Is=di(pi.exports),As="undefined"!=typeof process&&process.env?process.env:{},Ds="development"===As.NODE_ENV,Ns=null!==(Es=As.REACT_APP_API_URL)&&void 0!==Es?Es:Ds?"http://localhost:8080/api":"/api",Os=new Map;exports.QUERY_KEY=void 0,(Ms=exports.QUERY_KEY||(exports.QUERY_KEY={})).fetchAnomalies="fetchAnomalies",Ms.fetchGraphs="fetchGraphs",Ms.fetchUniverseMetadataList="fetchUniverseMetadataList",Ms.deleteUniverseMetadata="deleteUniverseMetadata",Ms.updateUniverseMetadata="updateUniverseMetadata",Ms.fetchUniverseListDetails="fetchUniverseListDetails",Ms.fetchUniverseById="fetchUniverseById",Ms.fetchAnomalyDetectionStatus="fetchAnomalyDetectionStatus",Ms.scheduleAnomalyDetectionStatus="scheduleAnomalyDetectionStatus",Ms.fetchAnomaliesPage="fetchAnomaliesPage",Ms.fetchQueriesPage="fetchQueriesPage",Ms.fetchQueriesStatsPage="fetchQueriesStatsPage",Ms.fetchQueriesDatabases="fetchQueriesDatabases",Ms.fetchCustomerMetadataList="fetchCustomerMetadataList",Ms.fetchQueryStats="fetchQueryStats",Ms.fetchTablesPage="fetchTablesPage",Ms.fetchNamespaces="fetchNamespaces",Ms.deleteRuntimeConfig="deleteRuntimeConfig",Ms.fetchRuntimeConfigs="fetchRuntimeConfigs",Ms.fetchSpecificRuntimeConfigs="fetchSpecificRuntimeConfigs",Ms.fetchSpecificRuntimeConfigsKey="fetchSpecificRuntimeConfigsKey",Ms.updateRuntimeConfig="updateRuntimeConfig",Ms.fetchAnomalyGroups="fetchAnomalyGroups",Ms.fetchAnomalyGroupsByType="fetchAnomalyGroupsByType",Ms.fetchAnomalyGroupsById="fetchAnomalyGroupsById",Ms.getUniverseMetadata="getUniverseMetadata",Ms.fetchMetricsGraphs="fetchMetricsGraphs",Ms.fetchLoadDbStatsPage="fetchLoadDbStatsPage",Ms.fetchTabletsStatsPage="fetchTabletsStatsPage",Ms.fetchNodeLoadStatsPage="fetchNodeLoadStatsPage",Ms.sendTelemetryEvent="sendTelemetryEvent",Ms.fetchBackgroundTasks="fetchBackgroundTasks",Ms.fetchClusterDetails="fetchClusterDetails";var Bs=Is.create({baseURL:Ns});Bs.interceptors.request.use((function(e){var t=localStorage.getItem("appName"),n=localStorage.getItem("authToken"),r=localStorage.getItem("tpAuthToken");if(r&&""!==r&&t===exports.AppName.WEB&&(e.headers.common["X-AUTH-TP-TOKEN"]=r),t===exports.AppName.YBA&&n&&""!==n){var o=localStorage.getItem("authToken");e.headers.common["X-AUTH-TOKEN"]=o}else t===exports.AppName.YBM&&n&&""!==n&&(e.headers.common.Authorization="Bearer ".concat(n));return e}),(function(e){return Promise.reject(e)}));var Ls=function(){this.fetchAnomalies=function(e,t,n,r){var o=Er(r)?"".concat(r,"/universe/").concat(e,"/anomalies"):"/universe/${universeUuid}/anomalies",i={};return t&&(i.startTime=t),n&&(i.endTime=n),Bs.get(o,{params:i}).then((function(e){return e.data}))},this.fetchAnomaliesPage=function(e,t,n,r,o,i,a,s){void 0===r&&(r=10);var l=Er(n)?"".concat(n,"/universe/").concat(e,"/anomalies/page"):"/universe/".concat(e,"/anomalies/page"),u={};return o&&(u.startTime=o),i&&(u.endTime=i),a&&a!==zt&&(u.category=a),Er(s)&&(u.summary=s),u.sortBy="startTime",u.direction="DESC",u.offset=t*r,u.needTotalCount=!0,u.limit=r,Bs.get(l,{params:u})},this.fetchQueriesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=Er(r)?"".concat(r,"/universe/").concat(e,"/queries/page"):"/universe/".concat(e,"/queries/page"),p={};return i&&(p.startTime=i),a&&(p.endTime=a),Er(s)&&(p.query=s),l&&l!==zt&&(p.dbName=l),p.sortBy=Mr(u)?"dbName":u,p.direction=Mr(c)?"DESC":c,p.offset=n*o,p.needTotalCount=!0,p.limit=o,Bs.get(d,{params:p})},this.fetchLoadDbStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startTime,a=t.endTime,s=t.searchInput,l=t.database,u=t.sortBy,c=t.sortDirection,d=t.dbWaitEventType,p={};wr(d)&&d.forEach((function(e){return p.eventTypes=e}));var h=Er(r)?"".concat(r,"/universe/").concat(e,"/databases/stats/page"):"/universe/".concat(e,"/databases/stats/page");return i&&(p.startTime=i),a&&(p.endTime=a),(Er(s)||l&&l!==zt)&&(p.namespaceName=Mr(s)?l:s),p.sortBy=Mr(u)?"eps":u,p.direction=Mr(c)?"DESC":c,p.offset=n*o,p.needTotalCount=!0,p.limit=o,p.excludeSystemDBs=!1,p.groupEventsBy="TYPE",Bs.get(h,{params:p})},this.fetchTabletStatsPage=function(e,t,n){var r=t.queryId,o=t.dbId,i=t.tableName,a=t.dbName,s=t.schemaName,l=t.currentTablePage,u=t.apiUrl,c=t.pageSize,d=t.startTime,p=t.endTime,h=t.searchInput,f=t.sortBy,m=t.sortDirection,g={},v=n(),y=v.cluster,x=v.region,_=v.zone,b=v.node,T=new URLSearchParams;Er(y)&&y!==zt&&T.append("clusterUuids",y),Er(x)&&x!==zt&&T.append("regionCodes",x),Er(_)&&_!==zt&&T.append("azCodes",_),Er(b)&&b!==zt&&T.append("instanceNames",b);var S=Er(u)?"".concat(u,"/universe/").concat(e,"/tablets/stats/page?").concat(T.toString()):"/universe/".concat(e,"/tablets/stats/page?").concat(T.toString());return d&&(g.startTime=d),p&&(g.endTime=p),(Er(h)||h&&h!==zt)&&(g.tableName=h),r&&Er(r)&&(g.queryId=r),o&&Er(o)&&(g.dbId=o),i&&Er(i)&&(g.tableName=i),a&&Er(a)&&(g.namespaceName=a),s&&Er(s)&&(g.schemaName=s),g.sortBy=Mr(f)?"eps":f,g.direction=Mr(m)?"DESC":m,g.offset=l*c,g.needTotalCount=!0,g.limit=c,g.groupEventsBy="TYPE",Bs.get(S,{params:g})},this.fetchNodeLoadStatsPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startTime,a=t.endTime,s=t.searchInput,l=t.sortBy,u=t.sortDirection,c=t.dbWaitEventType,d={},p=Er(r)?"".concat(r,"/universe/").concat(e,"/nodes/stats/page"):"/universe/".concat(e,"/nodes/stats/page");return i&&(d.startTime=i),a&&(d.endTime=a),wr(c)&&c.forEach((function(e){return d.eventTypes=e})),Er(s)&&(d.name=s),d.sortBy=Mr(l)?"eps":l,d.direction=Mr(u)?"DESC":u,d.offset=n*o,d.needTotalCount=!0,d.limit=o,d.groupEventsBy="TYPE",Bs.get(p,{params:d})},this.fetchQueriesStatsPage=function(e,t,n,r,o){void 0===o&&(o=!1);var i=t.currentTablePage,a=t.apiUrl,s=t.pageSize,l=t.startTime,u=t.endTime,c=t.searchInput,d=t.database,p=t.tabletId,h=t.instancesName,f=t.sortBy,m=t.sortDirection,g=t.queryType,v=t.groupByOperation,y=n(),x=y.cluster,_=y.region,b=y.zone,T=y.node,S=new URLSearchParams;if(Er(x)&&x!==zt&&S.append("clusterUuids",x),Er(_)&&_!==zt&&S.append("regionCodes",_),Er(b)&&b!==zt&&S.append("azCodes",b),Er(T)&&T!==zt?S.append("instanceNames",T):h&&Er(h)&&S.append("instanceNames",h),wr(r)){var w=v===exports.WaitEventClassification.WAIT_EVENT_TYPE?"eventTypes":"events";r.forEach((function(e){return S.append(w,e)}))}var C=Er(a)?"".concat(a,"/universe/").concat(e,"/queries/stats/page?").concat(S.toString()):"/universe/".concat(e,"/queries/stats/page?").concat(S.toString()),E={};return g&&(E.queryType=g.toUpperCase()),l&&(E.startTime=l),u&&(E.endTime=u),Er(c)&&(E.query=c),d&&d!==zt&&(E.namespaceName=d),p&&Er(p)&&(E.tabletId=p),v&&v===exports.WaitEventClassification.WAIT_EVENT&&(E.groupEventsBy=_t.waitEvent),E.sortBy=Mr(f)?"eps":f,E.direction=Mr(m)?"DESC":m,E.offset=i*s,E.needTotalCount=!0,E.limit=s,E.excludeTpUser=!o,E.excludeSystemDBs=!o,Bs.get(C,{params:E})},this.fetchNamespaceSchemas=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/namespaces/").concat(t,"/schemas"):"/universe/".concat(e,"/namespaces/").concat(t,"/schemas");return Bs.get(r).then((function(e){return e.data}))},this.fetchQueryStats=function(e,t,n){var r={},o=t.startTime,i=t.endTime,a=t.queryId,s=t.dbId;o&&(r.startTime=o),i&&(r.endTime=i),a&&(r.queryId=a),s&&(r.dbId=s);var l=Er(n)?"".concat(n,"/universe/").concat(e,"/queries/stats"):"/universe/".concat(e,"/queries/stats");return Bs.get(l,{params:r}).then((function(e){return e.data}))},this.fetchTablesPage=function(e,t){var n=t.currentTablePage,r=t.apiUrl,o=t.pageSize,i=t.startDateTime,a=t.endDateTime,s=t.searchInput,l=t.database,u=t.schema,c=t.sortBy,d=t.sortDirection,p=Er(r)?"".concat(r,"/universe/").concat(e,"/tables/page"):"/universe/".concat(e,"/tables/page"),h={};return i&&(h.startTime=i),a&&(h.endTime=a),Er(s)&&(h.tableName=s),l&&l!==zt&&(h.namespaceName=l),u&&u!==zt&&(h.schemaName=u),h.sortBy=Mr(c)?"namespaceName":c,h.direction=Mr(d)?"DESC":d,h.offset=n*o,h.needTotalCount=!0,h.limit=o,Bs.get(p,{params:h})},this.fetchNamespaces=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/namespaces"):"/universe/".concat(e,"/namespaces");return Bs.get(n).then((function(e){return e.data}))},this.fetchQueriesDatabases=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/databases"):"/universe/".concat(e,"/databases");return Bs.get(n).then((function(e){return e.data}))},this.fetchAnomaliesById=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/anomalies/").concat(t):"/universe/".concat(e,"/anomalies/").concat(t);return Bs.get(r).then((function(e){return e.data}))},this.fetchGraphs=function(e,t,n,r){var o=null!=r?r:"fetchGraphs-".concat(e),i=Os.get(o);i&&i.abort();var a=new AbortController;Os.set(o,a);var s=Er(n)?"".concat(n,"/universe/").concat(e,"/graphs"):"/universe/".concat(e,"/graphs"),l=Is.CancelToken.source();return a.signal.addEventListener("abort",(function(){l.cancel("Request aborted"),Os.delete(o)})),Bs.post(s,t,{cancelToken:l.token}).then((function(e){return Os.delete(o),e.data})).catch((function(e){throw Os.delete(o),e}))},this.fetchCustomerMetadataList=function(e){var t=Er(e)?"".concat(e,"/customer/metadata"):"/customer/metadata";return Bs.get(t).then((function(e){return e.data}))},this.fetchCustomerMetadataById=function(e,t){var n=Er(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Bs.get(n).then((function(e){return e.data}))},this.updateCustomerMetadata=function(e,t,n){var r=Er(n)?"".concat(n,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Bs.put(r,t).then((function(e){return e.data}))},this.deleteCustomerMetadataById=function(e,t){var n=Er(t)?"".concat(t,"/customer/").concat(e,"/metadata"):"/customer/".concat(e,"/metadata");return Bs.delete(n).then((function(e){return e.data}))},this.fetchUniverseMetadataList=function(e,t,n){var r=Er(e)?"".concat(e,"/universe/metadata"):"/universe/metadata",o={customer_uuid:t,universe_uuid:n};return Bs.get(r,{params:o}).then((function(e){return e.data}))},this.getUniverseMetadata=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Bs.get(n).then((function(e){return e.data}))},this.updateUniverseMetadata=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Bs.put(r,t).then((function(e){return e.data}))},this.deleteUniverseMetadata=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/metadata"):"/universe/".concat(e,"/metadata");return Bs.delete(n).then((function(e){return e.data}))},this.fetchUniverseListDetails=function(e,t,n){var r={customer_uuid:t,universe_uuid:n},o=Er(e)?"".concat(e,"/universe/details"):"/universe/details";return Bs.get(o,{params:r}).then((function(e){return e.data}))},this.fetchUniverseById=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/details"):"/universe/".concat(e,"/details");return Bs.get(n).then((function(e){return e.data}))},this.fetchAnomalyDetectionStatus=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/anomaly_detection_status"):"/universe/".concat(e,"/anomaly_detection_status");return Bs.get(n).then((function(e){return e.data}))},this.scheduleAnomalyDetectionStatus=function(e,t){var n=Er(t)?"".concat(t,"/universe/").concat(e,"/schedule_anomaly_detection"):"/universe/".concat(e,"/schedule_anomaly_detection");return Bs.post(n,null).then((function(e){return e.data}))},this.fetchRuntimeConfigs=function(e,t){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var n=Er(t)?"".concat(t,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Bs.get(n).then((function(e){return e.data}))},this.fetchSpecificRuntimeConfigs=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Er(n)?"".concat(n,"/runtime_config_entry/").concat(e):"/runtime_config_entry/".concat(e);return Bs.get(r,{params:t.reduce((function(e,t){return e.append("path",t),e}),new URLSearchParams)}).then((function(e){return e.data}))},this.updateRuntimeConfig=function(e,t,n,r){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var o=Er(r)?"".concat(r,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Bs.put(o,{value:n}).then((function(e){return e.data}))},this.deleteRuntimeConfig=function(e,t,n){void 0===e&&(e="00000000-0000-0000-0000-000000000000");var r=Er(n)?"".concat(n,"/runtime_config_entry/").concat(e,"/").concat(t):"/runtime_config_entry/".concat(e,"/").concat(t);return Bs.delete(r).then((function(e){return e.data}))},this.fetchBackgroundTasks=function(e,t,n,r,o){var i=Er(o)?"".concat(o,"/universe/").concat(e,"/background_tasks"):"/universe/".concat(e,"/background_tasks"),a={};return t&&(a.startTime=t),n&&(a.endTime=n),null!==r&&(a.limit=r),Bs.get(i,{params:a}).then((function(e){return e.data}))},this.fetchAnomalyGroups=function(e,t,n,r,o,i){void 0===r&&(r="");var a=o(),s=a.cluster,l=a.region,u=a.zone,c=a.node,d=new URLSearchParams;if(t&&d.append("startTime",t),n&&d.append("endTime",n),null===t&&null===n)return{};Er(r)&&d.append("anomalyType",r),Er(s)&&s!==zt&&d.append("clusterUuids",s),Er(l)&&l!==zt&&d.append("regionCodes",l),Er(u)&&u!==zt&&d.append("azCodes",u),Er(c)&&c!==zt&&d.append("instanceNames",c);var p=Er(i)?"".concat(i,"/universe/").concat(e,"/anomaly_groups/by_type?").concat(d.toString()):"/universe/".concat(e,"/anomaly_groups/by_type?").concat(d.toString());return Bs.get(p).then((function(e){return e.data}))},this.fetchAnomalyGroupsByType=function(e,t,n,r,o){var i=Er(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r):"/universe/".concat(e,"/anomaly_groups?startTime=").concat(t,"&endTime=").concat(n,"&type=").concat(r);return Bs.get(i).then((function(e){return e.data}))},this.fetchAnomalyGroupById=function(e,t,n,r,o){if(null===n&&null===r)return{};var i=Er(o)?"".concat(o,"/universe/").concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r):"/universe/".concat(e,"/anomaly_groups/").concat(t,"?startTime=").concat(n,"&endTime=").concat(r);return Bs.get(i).then((function(e){return e.data}))},this.sendTelemetryEvent=function(e,t,n){var r=Er(n)?"".concat(n,"/universe/").concat(e,"/ui_events"):"/universe/".concat(e,"/ui_events");return Bs.post(r,t).then((function(e){return e.data}))},this.fetchClusterDetails=function(e,t,n,r){var o=new URLSearchParams;t&&o.append("startTime",t),n&&o.append("endTime",n);var i=Er(r)?"".concat(r,"/universe/").concat(e,"/cluster_details?").concat(o.toString()):"/universe/".concat(e,"/cluster_details?").concat(o.toString());return Bs.get(i).then((function(e){return e.data}))}},Rs=new Ls,ks=function(i){var a,s,l,u,c,d,p,h,f,m,g,v,y,x,_,b,w,C,E,M=i.anomalyData,I=i.isHistoricalQueryView,A=i.isDrilldownView,D=void 0===A||A,N=i.queryObject,O=i.showDetails,B=i.startDateTime,L=i.endDateTime,R=i.apiUrl,k=i.universeUuid,P=i.universeQueryStatsData,j=i.onShowDetails,F=$n(),U=S(),H=t.useState(!1),z=H[0],W=H[1],V=t.useState(""),Y=V[0],G=V[1],q=t.useState(""),Q=q[0],Z=q[1],X="HOT_TABLET"===(null===(a=null==M?void 0:M.lastInstance)||void 0===a?void 0:a.type)||"LARGE_TABLET"===(null===(s=null==M?void 0:M.lastInstance)||void 0===s?void 0:s.type),K=null===(l=null==M?void 0:M.lastInstance)||void 0===l?void 0:l.entityDisplayName,$=null===(u=null==M?void 0:M.lastInstance)||void 0===u?void 0:u.category;n.useQuery([exports.QUERY_KEY.fetchClusterDetails,null==B?void 0:B.toISOString(),null==L?void 0:L.toISOString()],(function(){var e,t;return Rs.fetchClusterDetails(k,null!==(e=null==B?void 0:B.toISOString())&&void 0!==e?e:null,null!==(t=null==L?void 0:L.toISOString())&&void 0!==t?t:null,R)}),{onSuccess:function(e){var t,n,r,o,i=($===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP)&&(null===(n=null===(t=null==e?void 0:e.nodeDetails)||void 0===t?void 0:t.find((function(e){return e.id.name===K})))||void 0===n?void 0:n.region);G(i||"");var a=($===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP)&&(null===(o=null===(r=null==e?void 0:e.nodeDetails)||void 0===r?void 0:r.find((function(e){return e.id.name===K})))||void 0===o?void 0:o.az);Z(a||"")}});var J=function(e){null!==e.target.closest("button")&&e.stopPropagation()};return e.jsx(r.Box,{children:D&&O&&e.jsx(r.Box,{className:T(F.headerMetadataBox,F.boxContainer,F.flexColumn),children:I?e.jsxs(r.Box,{children:[e.jsxs(r.Box,{className:F.flexRow,width:"100%",children:[e.jsxs(r.Box,{className:F.flexColumn,alignItems:"flex-start",flex:1,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:_n}),e.jsx(r.Box,{children:null==N?void 0:N.namespaceName})]}),e.jsxs(r.Box,{className:F.flexColumn,alignItems:"flex-start",flex:1,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:bn}),e.jsx(r.Box,{children:null==N?void 0:N.queryType})]}),e.jsx(r.Box,{className:F.flexColumn,alignItems:"flex-start",ml:"auto",children:e.jsx(o.YBButton,{size:"small",variant:"ghost",onClick:function(){return j(!1)},dataTestId:"MetadataHeader-HideDetailsButton",children:e.jsx("span",{style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"},children:"Hide Details"})})})]}),e.jsx(r.Box,{className:F.flexColumn,mt:2,children:e.jsx(r.Box,{onClick:J,width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"},children:e.jsx(o.YBCodeBlock,{lang:"sql",showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!0,text:null!==(E=null==N?void 0:N.query)&&void 0!==E?E:"",containerClassName:U.queryContainerCodeInBreadcrumbs},"TableHelperQueries-query")})})]}):e.jsx(e.Fragment,{children:M&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsxs(r.Box,{className:F.flexRow,width:"100%",justifyContent:"space-between",children:[e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:Cn}),e.jsx(r.Box,{className:F.anomalyTypeTag,children:e.jsx("span",{className:F.anomalyTypeText,children:pn[null===(c=null==M?void 0:M.lastInstance)||void 0===c?void 0:c.type]})})]}),$!==exports.AnomalyCategory.SQL&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:null===(p=xn[null===(d=null==M?void 0:M.lastInstance)||void 0===d?void 0:d.type])||void 0===p?void 0:p.title}),e.jsxs(r.Box,{children:[e.jsx(o.YBTooltip,{title:K||"",placement:"top",arrow:!0,children:e.jsx("span",{className:F.regularMetadata,children:ti(K,$,$===exports.AnomalyCategory.SQL?40:30)})}),($===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP)&&e.jsx(o.YBTooltip,{title:z?"Copied":"Copy",open:!!z||void 0,children:e.jsx("img",{src:ci,alt:"Copy Icon",style:{marginLeft:"4px",cursor:"pointer"},onClick:function(){navigator.clipboard.writeText(K),W(!0),setTimeout((function(){return W(!1)}),2e3)}})})]})]}),$===exports.AnomalyCategory.SQL&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:_n}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:null===(h=null==P?void 0:P[0])||void 0===h?void 0:h.namespaceName})})]}),$===exports.AnomalyCategory.SQL&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:bn}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:null===(f=null==P?void 0:P[0])||void 0===f?void 0:f.queryType})})]}),$===exports.AnomalyCategory.DB&&X&&e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:_n}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:Fo(M).dbName})})]}),e.jsxs(r.Box,{className:F.flexColumn,children:[e.jsx(r.Box,{className:T(F.headerTitle,F.metaDataMarginBottom),children:$===exports.AnomalyCategory.DB?void 0!==X?X?wn:Sn:Tn:$===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP?En:null}),e.jsx(r.Box,{children:e.jsx("span",{className:F.regularMetadata,children:$===exports.AnomalyCategory.DB?X?null===(y=null===(v=null===(g=null===(m=null==M?void 0:M.lastInstance)||void 0===m?void 0:m.mainGraphs)||void 0===g?void 0:g[0].filters)||void 0===v?void 0:v.tabletId)||void 0===y?void 0:y[0]:null===(w=null===(b=null===(_=null===(x=null==M?void 0:M.lastInstance)||void 0===x?void 0:x.mainGraphs)||void 0===_?void 0:_[0].filters)||void 0===b?void 0:b.tableName)||void 0===w?void 0:w[0]:$===exports.AnomalyCategory.NODE||$===exports.AnomalyCategory.APP?e.jsx(e.Fragment,{children:"".concat(Y?Y.toUpperCase():""," (").concat(Q||"",")")}):null})})]}),e.jsx(r.Box,{children:e.jsx(o.YBButton,{size:"small",variant:"ghost",onClick:function(){return j(!1)},dataTestId:"MetadataHeader-HideDetailsButton",children:e.jsx("span",{style:{color:"#2B59C3",fontSize:"11.5px",fontStyle:"semibold"},children:"Hide Details"})})})]}),$===exports.AnomalyCategory.SQL&&e.jsx(r.Box,{mt:2,children:e.jsx(r.Box,{onClick:J,width:"100%",style:{minWidth:0,overflow:"hidden",display:"grid"},children:e.jsx(o.YBCodeBlock,{lang:"sql",showCopyButton:!0,singleLineEllipsis:!0,enabledExpandCollapse:!0,text:null===(C=null==M?void 0:M.lastInstance)||void 0===C?void 0:C.entityDisplayName,containerClassName:U.queryContainerCodeInBreadcrumbs},"TableHelperQueries-query")})})]})})})})},Ps=function(t){var n,i,a=t.appName,s=t.anomalyData,l=t.showDetails,u=t.isDrilldownView,c=void 0===u||u,d=t.isHistoricalQueryView,p=t.showStandaloneAnomalies,h=t.queryObject,f=t.onSelectedQuery,m=t.onSelectedIssue,g=t.onShowDetails,v=t.onNavigateToUrl,y=$n(),x=oi(),_=null===(n=null==s?void 0:s.lastInstance)||void 0===n?void 0:n.entityDisplayName,b=null===(i=null==s?void 0:s.lastInstance)||void 0===i?void 0:i.category,T=function(){!function(e,t,n,r,o,i){if(e===exports.AppName.YBM||e===exports.AppName.YBA)if(t){null==o||o(null);var a=si(!0,!1,n);i?i(a.pathname+a.search):window.history.pushState({},"",a.toString())}else null==r||r(null),a=si(!1),i?i(a.pathname+a.search):window.history.pushState({},"",a.toString());else{var s=ai(e);window.location.href=s}}(a,d,p,m,f,v)};return e.jsx(r.Box,{children:e.jsxs(r.Box,{display:"flex",mb:3,mt:1,children:[e.jsx(r.Box,{className:y.ybBreadcrumbWrapper,children:c&&e.jsx(o.YBBreadcrumb,{size:"small",separator:"/",maxLabelWidth:600,items:function(){var e=function(){if(x.currentTab===exports.InsightsTabs.CLUSTER_LOAD){var e=x.clusterLoadSubTab;if(a!==exports.AppName.YBM&&a!==exports.AppName.YBA||!Cr(s)||(e=exports.ClusterLoadOverallTabs.ANOMALIES),x.clusterLoadSubTab===exports.ClusterLoadSubTabs.OVERALL_LOAD){var t=ni(s,b,d,x);return"".concat(e," - ").concat(t)}return e}return x.currentTab}(),t=[{label:e,onClick:T}];if(x.currentTab===exports.InsightsTabs.CLUSTER_LOAD)(s||h)&&((r=ri({anomalyData:s,entityDisplayName:_,queryText:null==h?void 0:h.query}))&&t.push({label:r,onClick:function(){return s&&Er(null==h?void 0:h.query)?void li(a,s,m,v):void 0}}),s&&Er(null==h?void 0:h.query)&&t.push({label:ei(null==h?void 0:h.query,30)}));else if(s||h){var n=ni(s,b,d,x),r=ri({anomalyData:s,entityDisplayName:_,queryText:null==h?void 0:h.query});x.currentTab!==exports.InsightsTabs.INSIGHTS&&t.push({label:n,onClick:T}),r&&t.push({label:r})}return t}(),dataTestId:"BreadCrumbsAndMetadataHeader-Breadcrumb"})}),e.jsx(r.Box,{ml:2,style:{marginTop:"-2px"},children:!l&&e.jsx(o.YBButton,{size:"small",variant:"secondary",onClick:function(){return g(!0)},dataTestId:"BreadCrumbsAndMetadataHeader-ShowDetails",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='13' height='10' viewBox='0 0 13 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.66667 3.66667H1M4.33333 1H1M12.3333 6.33333H1M9.66667 9H1' stroke='%232B59C3' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e",alt:"Maximize Icon"}),children:"Show Details"})})]})})},js="data:image/svg+xml,%3csvg width='1' height='16' viewBox='0 0 1 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cline x1='0.5' y1='2.18557e-08' x2='0.499999' y2='16' stroke='%23B7C3CB'/%3e%3c/svg%3e",Fs=r.makeStyles((function(){return{groupByOperationDropdown:{borderRadius:"8px"},overrideDefaultMuiFormControl:{flexDirection:"row","& .yb-MuiFormControl-root":{flexDirection:"row"}},overrideDefaultMuiSelect:{maxHeight:"200px","& .yb-MuiInput-root":{width:"150px",height:"32px"}},clusterRegionSelectorBox:{"& .yb-MuiInputBase-root":{borderRightWidth:"0px"}}}})),Us=function(i){var a=i.appName,s=i.startDateTime,l=i.endDateTime,u=i.apiUrl,c=i.universeUuid,d=i.anomalyData,p=i.clusterRegionItem,h=i.zoneNodeItem,f=i.isPrimaryCluster,m=i.cluster,g=i.region,v=i.metricMeasure,y=i.outlierType,x=i.numNodes,_=i.isDrilldownView,b=void 0===_||_,S=i.onZoneNodeSelected,w=i.onClusterRegionSelected,E=i.onOutlierTypeSelected,M=i.onSplitTypeSelected;i.onQueryTypeSelected;var I=i.onNumNodesChanged,A=i.showMetricAggregator,D=void 0===A||A,N=i.showSplitSelector,O=void 0===N||N,B=$n(),L=Fs(),R=t.useState(new Map),k=R[0],P=R[1],j=t.useState(new Map),F=j[0],U=j[1],H=t.useState(new Map),z=H[0],W=H[1],V=t.useState(new Map),Y=V[0],G=V[1],q=t.useState(null),Q=q[0],Z=q[1],X=n.useQuery([exports.QUERY_KEY.fetchClusterDetails,null==s?void 0:s.toISOString(),null==l?void 0:l.toISOString()],(function(){var e,t;return Rs.fetchClusterDetails(c,null!==(e=null==s?void 0:s.toISOString())&&void 0!==e?e:null,null!==(t=null==l?void 0:l.toISOString())&&void 0!==t?t:null,u)}),{onSuccess:function(e){Z(e);var t=function(e){return(null==e?void 0:e.nodeDetails)&&Po(e)}(e);if(t){var n=t.primaryZoneMapping,r=t.asyncZoneMapping,o=t.primaryClusterMapping,i=t.asyncClusterMapping;P(n),U(r),W(o),G(i)}}});return(null==X?void 0:X.isError)?e.jsxs(r.Box,{mt:3,children:[(a===exports.AppName.YBA||a===exports.AppName.WEB)&&e.jsx(C,{customErrorMessage:Wn.NODE_REGION_ZONE_DETAILS_ERROR}),a===exports.AppName.YBM&&e.jsx(o.GenericFailure,{text:Wn.QUERY_STATS_FETCH_ERROR})]}):(t.useEffect((function(){var e=new Map;if(g!==zt||m!==zt){var t=function(e,t,n,r){var o=Array.from(e).filter((function(e){return t?e[1].regionName===r:n?!e[1].isReadReplica:e[1].isReadReplica}));return o?new Map(o.map((function(e){return[null==e?void 0:e[0],e[1]]}))):new Map}(f?k:F,g!==zt,f,g!==zt?g:m);null!==g&&f?(P(t),U(e)):null===g||f?null!==m&&f?(P(t),U(e)):null===m||f||(P(e),U(t)):(P(e),U(t))}else P(k),U(F)}),[g,m,Q,f]),e.jsxs(r.Box,{className:T(B.flexColumn),children:[e.jsx(r.Box,{children:e.jsxs(r.Box,{display:"flex",flexDirection:"row",alignItems:"center",children:[D&&e.jsx(r.Box,{className:L.clusterRegionSelectorBox,children:e.jsx(Rr,{selectedItem:p,onClusterRegionSelected:w,primaryClusterToRegionMap:z,asyncClusterToRegionMap:Y})}),D&&e.jsx(r.Box,{children:e.jsx(Br,{selectedItem:h,onZoneNodeSelected:S,primaryZoneToNodesMap:k,asyncZoneToNodesMap:F})})]})}),O&&e.jsxs(r.Box,{display:"flex",flexDirection:"row",className:B.metricSplitSelectorBox,children:[e.jsxs(r.Box,{className:B.metricSplitSelectorContainer,children:[e.jsx("img",{src:Dr,alt:"Tree Icon"}),e.jsx(r.Box,{display:"flex",flexDirection:"row",children:e.jsx(rr,{onSplitTypeSelected:M,metricSplitSelectors:b?en:Jt,anomalyData:d})})]}),v!==exports.MetricMeasure.OVERALL&&e.jsxs(r.Box,{display:"flex",flexDirection:"row",children:[e.jsx("img",{alt:"Divider",src:js,className:B.dividerStyle}),e.jsx(ar,{outlierType:y,metricOutlierSelectors:tn,onOutlierTypeSelected:E,onNumNodesChanged:I,selectedNumNodes:x,showNumNodesInput:!1,showNumNodesSelector:!0,metricMeasure:v})]})]})]}))},Hs={exports:{}},zs={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(zs);var Ws=zs.exports,Vs={exports:{}},Ys={exports:{}},Gs={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}(Gs);var qs=Gs.exports,Qs={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}(Qs,Qs.exports);var Zs=Qs.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(1,arguments),e instanceof Date||"object"===(0,r.default)(e)&&"[object Date]"===Object.prototype.toString.call(e)};var r=n(qs),o=n(Zs);e.exports=t.default}(Ys,Ys.exports);var Xs=Ys.exports,Ks={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.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(qs),o=n(Zs);e.exports=t.default}(Ks,Ks.exports);var $s=Ks.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,i.default)(1,arguments),!(0,r.default)(e)&&"number"!=typeof e)return!1;var t=(0,o.default)(e);return!isNaN(Number(t))};var r=n(Xs),o=n($s),i=n(Zs);e.exports=t.default}(Vs,Vs.exports);var Js=Vs.exports,el={exports:{}},tl={exports:{}},nl={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}(nl,nl.exports);var rl=nl.exports,ol=di(rl);!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,i.default)(2,arguments);var n=(0,o.default)(e).getTime(),a=(0,r.default)(t);return new Date(n+a)};var r=n(rl),o=n($s),i=n(Zs);e.exports=t.default}(tl,tl.exports);var il=tl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(2,arguments);var n=(0,i.default)(t);return(0,r.default)(e,-n)};var r=n(il),o=n(Zs),i=n(rl);e.exports=t.default}(el,el.exports);var al=el.exports,sl={exports:{}},ll={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.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/i)+1};var r=n($s),o=n(Zs),i=864e5;e.exports=t.default}(ll,ll.exports);var ul=ll.exports,cl={exports:{}},dl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(1,arguments);var t=(0,r.default)(e),n=t.getUTCDay(),i=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-i),t.setUTCHours(0,0,0,0),t};var r=n($s),o=n(Zs);e.exports=t.default}(dl,dl.exports);var pl=dl.exports,hl={exports:{}},fl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.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,i.default)(a),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var u=(0,i.default)(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var r=n($s),o=n(Zs),i=n(pl);e.exports=t.default}(fl,fl.exports);var ml=fl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,i.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,o.default)(n)};var r=n(ml),o=n(pl),i=n(Zs);e.exports=t.default}(hl,hl.exports);var gl=hl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,a.default)(1,arguments);var t=(0,r.default)(e),n=(0,o.default)(t).getTime()-(0,i.default)(t).getTime();return Math.round(n/s)+1};var r=n($s),o=n(pl),i=n(gl),a=n(Zs),s=6048e5;e.exports=t.default}(cl,cl.exports);var vl=cl.exports,yl={exports:{}},xl={exports:{}},_l={};Object.defineProperty(_l,"__esModule",{value:!0}),_l.getDefaultOptions=function(){return bl},_l.setDefaultOptions=function(e){bl=e};var bl={};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,s,l,u,c,d,p,h;(0,o.default)(1,arguments);var f=(0,a.getDefaultOptions)(),m=(0,i.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(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,r.default)(e),v=g.getUTCDay(),y=(v<m?7:0)+v-m;return g.setUTCDate(g.getUTCDate()-y),g.setUTCHours(0,0,0,0),g};var r=n($s),o=n(Zs),i=n(rl),a=_l;e.exports=t.default}(xl,xl.exports);var Tl=xl.exports,Sl={exports:{}},wl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,o.default)(1,arguments);var m=(0,r.default)(e),g=m.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(g+1,0,y),x.setUTCHours(0,0,0,0);var _=(0,i.default)(x,t),b=new Date(0);b.setUTCFullYear(g,0,y),b.setUTCHours(0,0,0,0);var T=(0,i.default)(b,t);return m.getTime()>=_.getTime()?g+1:m.getTime()>=T.getTime()?g:g-1};var r=n($s),o=n(Zs),i=n(Tl),a=n(rl),s=_l;e.exports=t.default}(wl,wl.exports);var Cl=wl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,l,u,c,d,p,h,f;(0,o.default)(1,arguments);var m=(0,s.getDefaultOptions)(),g=(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:m.firstWeekContainsDate)&&void 0!==l?l:null===(h=m.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,g),y.setUTCHours(0,0,0,0),(0,i.default)(y,t)};var r=n(Cl),o=n(Zs),i=n(Tl),a=n(rl),s=_l;e.exports=t.default}(Sl,Sl.exports);var El=Sl.exports;!function(e,t){var n=Ws.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,o.default)(n,t).getTime()-(0,i.default)(n,t).getTime();return Math.round(l/s)+1};var r=n($s),o=n(Tl),i=n(El),a=n(Zs),s=6048e5;e.exports=t.default}(yl,yl.exports);var Ml=yl.exports,Il={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}(Il,Il.exports);var Al=Il.exports,Dl={exports:{}};!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Al),o={y:function(e,t){var n=e.getUTCFullYear(),o=n>0?n:1-n;return(0,r.default)("yy"===t?o%100:o,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,o=e.getUTCMilliseconds(),i=Math.floor(o*Math.pow(10,n-3));return(0,r.default)(i,t.length)}};t.default=o,e.exports=t.default}(Dl,Dl.exports);var Nl=Dl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ul),o=n(vl),i=n(ml),a=n(Ml),s=n(Cl),l=n(Al),u=n(Nl),c="midnight",d="noon",p="morning",h="afternoon",f="evening",m="night",g={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(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return u.default.y(e,t)},Y:function(e,t,n,r){var o=(0,s.default)(e,r),i=o>0?o:1-o;if("YY"===t){var a=i%100;return(0,l.default)(a,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):(0,l.default)(i,t.length)},R:function(e,t){var n=(0,i.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 o=(0,a.default)(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):(0,l.default)(o,t.length)},I:function(e,t,n){var r=(0,o.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 o=(0,r.default)(e);return"Do"===t?n.ordinalNumber(o,{unit:"dayOfYear"}):(0,l.default)(o,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 o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return(0,l.default)(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var o=e.getUTCDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return(0,l.default)(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return(0,l.default)(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){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,o=e.getUTCHours();switch(r=12===o?d:0===o?c:o/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,o=e.getUTCHours();switch(r=o>=17?f:o>=12?h:o>=4?p:m,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 o=(r._originalDate||e).getTimezoneOffset();if(0===o)return"Z";switch(t){case"X":return y(o);case"XXXX":case"XX":return x(o);default:return x(o,":")}},x:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return y(o);case"xxxx":case"xx":return x(o);default:return x(o,":")}},O:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+v(o,":");default:return"GMT"+x(o,":")}},z:function(e,t,n,r){var o=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+v(o,":");default:return"GMT"+x(o,":")}},t:function(e,t,n,r){var o=r._originalDate||e,i=Math.floor(o.getTime()/1e3);return(0,l.default)(i,t.length)},T:function(e,t,n,r){var o=(r._originalDate||e).getTime();return(0,l.default)(o,t.length)}};function v(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+(0,l.default)(i,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?"-":"+",o=Math.abs(e);return r+(0,l.default)(Math.floor(o/60),2)+n+(0,l.default)(o%60,2)}var _=g;t.default=_,e.exports=t.default}(sl,sl.exports);var Ol=sl.exports,Bl={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"})}},o={p:r,P:function(e,t){var o,i=e.match(/(P+)(p+)?/)||[],a=i[1],s=i[2];if(!s)return n(e,t);switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",n(a,t)).replace("{{time}}",r(s,t))}},i=o;t.default=i,e.exports=t.default}(Bl,Bl.exports);var Ll=Bl.exports,Rl={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}(Rl,Rl.exports);var kl=Rl.exports,Pl=di(kl),jl={};Object.defineProperty(jl,"__esModule",{value:!0}),jl.isProtectedDayOfYearToken=function(e){return-1!==Fl.indexOf(e)},jl.isProtectedWeekYearToken=function(e){return-1!==Ul.indexOf(e)},jl.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 Fl=["D","DD"],Ul=["YY","YYYY"];var Hl={exports:{}},zl={exports:{}},Wl={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 o,i=n[e];return o="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};t.default=r,e.exports=t.default}(Wl,Wl.exports);var Vl=Wl.exports,Yl={exports:{}},Gl={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}(Gl,Gl.exports);var ql=Gl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ql),o={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=o,e.exports=t.default}(Yl,Yl.exports);var Ql=Yl.exports,Zl={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,o){return n[e]};t.default=r,e.exports=t.default}(Zl,Zl.exports);var Xl=Zl.exports,Kl={exports:{}},$l={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 o=e.defaultFormattingWidth||e.defaultWidth,i=null!=n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}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}($l,$l.exports);var Jl=$l.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Jl),o={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=o,e.exports=t.default}(Kl,Kl.exports);var eu=Kl.exports,tu={exports:{}},nu={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,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,s=i[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}(nu,nu.exports);var ru=nu.exports,ou={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 o=r[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];return{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(o.length)}}},e.exports=t.default}(ou,ou.exports);var iu=ou.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(ru),o={ordinalNumber:(0,n(iu).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"})};t.default=o,e.exports=t.default}(tu,tu.exports);var au=tu.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(Vl),o=n(Ql),i=n(Xl),a=n(eu),s=n(au),l={code:"en-US",formatDistance:r.default,formatLong:o.default,formatRelative:i.default,localize:a.default,match:s.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};t.default=l,e.exports=t.default}(zl,zl.exports);var su=zl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(su).default;t.default=r,e.exports=t.default}(Hl,Hl.exports);var lu=Hl.exports;!function(e,t){var n=Ws.default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var x,_,b,T,S,w,C,E,M,I,A,D,N,O,B,L,R,k;(0,d.default)(2,arguments);var P=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!==(T=null!==(S=null!==(w=null==n?void 0:n.firstWeekContainsDate)&&void 0!==w?w:null==n||null===(C=n.locale)||void 0===C||null===(E=C.options)||void 0===E?void 0:E.firstWeekContainsDate)&&void 0!==S?S:j.firstWeekContainsDate)&&void 0!==T?T:null===(M=j.locale)||void 0===M||null===(I=M.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 H=(0,c.default)(null!==(A=null!==(D=null!==(N=null!==(O=null==n?void 0:n.weekStartsOn)&&void 0!==O?O:null==n||null===(B=n.locale)||void 0===B||null===(L=B.options)||void 0===L?void 0:L.weekStartsOn)&&void 0!==N?N:j.weekStartsOn)&&void 0!==D?D:null===(R=j.locale)||void 0===R||null===(k=R.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==A?A:0);if(!(H>=0&&H<=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 z=(0,i.default)(e);if(!(0,r.default)(z))throw new RangeError("Invalid time value");var W=(0,l.default)(z),V=(0,o.default)(z,W),Y={firstWeekContainsDate:U,weekStartsOn:H,locale:F,_originalDate:z},G=P.match(m).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 o=r[0];if("'"===o)return function(e){var t=e.match(g);if(!t)return e;return t[1].replace(v,"'")}(r);var i=a.default[o];if(i)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)),i(V,r,F.localize,Y);if(o.match(y))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("");return G};var r=n(Js),o=n(al),i=n($s),a=n(Ol),s=n(Ll),l=n(kl),u=jl,c=n(rl),d=n(Zs),p=_l,h=n(lu),f=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,m=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,g=/^'([^]*?)'?$/,v=/''/g,y=/[a-zA-Z]/;e.exports=t.default}(Hs,Hs.exports);var uu=di(Hs.exports);function cu(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 du(e,t){var n=function(e){if(!hu[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;hu[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 hu[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),r=[],o=0;o<n.length;o++){var i=pu[n[o].type];i>=0&&(r[i]=parseInt(n[o].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 pu={year:0,month:1,day:2,hour:3,minute:4,second:5};var hu={};function fu(e,t,n,r,o,i,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(r,o,i,a),s}var mu=36e5,gu={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function vu(e,t,n){var r,o,i;if(!e)return 0;if(r=gu.timezoneZ.exec(e))return 0;if(r=gu.timezoneHH.exec(e))return xu(i=parseInt(r[1],10))?-i*mu:NaN;if(r=gu.timezoneHHMM.exec(e)){i=parseInt(r[2],10);var a=parseInt(r[3],10);return xu(i,a)?(o=Math.abs(i)*mu+6e4*a,"+"===r[1]?-o:o):NaN}if(function(e){if(_u[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),_u[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return fu(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=yu(s,e),u=n?l:function(e,t,n){var r=e.getTime(),o=r-t,i=yu(new Date(o),n);if(t===i)return t;o-=i-t;var a=yu(new Date(o),n);if(i===a)return i;return Math.max(i,a)}(t,l,e);return-u}return NaN}function yu(e,t){var n=du(e,t),r=fu(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),o=e.getTime(),i=o%1e3;return r-(o-=i>=0?i:1e3+i)}function xu(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var _u={};function bu(e,t){var n=e?vu(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Tu(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length<t;)r="0"+r;return n+r}function Su(e,t){var n=t||"",r=e>0?"-":"+",o=Math.abs(e);return r+Tu(Math.floor(o/60),2)+n+Tu(Math.floor(o%60),2)}function wu(e,t){return e%60==0?(e>0?"-":"+")+Tu(Math.abs(e)/60,2):Su(e,t)}var Cu={X:function(e,t,n,r){var o=bu(r.timeZone,e);if(0===o)return"Z";switch(t){case"X":return wu(o);case"XXXX":case"XX":return Su(o);default:return Su(o,":")}},x:function(e,t,n,r){var o=bu(r.timeZone,e);switch(t){case"x":return wu(o);case"xxxx":case"xx":return Su(o);default:return Su(o,":")}},O:function(e,t,n,r){var o=bu(r.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=r%60;if(0===i)return n+String(o);var a=t||"";return n+String(o)+a+Tu(i,2)}(o,":");default:return"GMT"+Su(o,":")}},z:function(e,t,n,r){switch(t){case"z":case"zz":case"zzz":return cu("short",e,r);default:return cu("long",e,r)}}},Eu=36e5,Mu=6e4,Iu={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 Au(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:ol(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 o=function(e){var t,n={},r=Iu.dateTimePattern.exec(e);r?(n.date=r[1],t=r[3]):(r=Iu.datePattern.exec(e))?(n.date=r[1],t=r[2]):(n.date=null,t=e);if(t){var o=Iu.timeZone.exec(t);o?(n.time=t.replace(o[1],""),n.timeZone=o[1].trim()):n.time=t}return n}(e),i=function(e,t){var n,r=Iu.YYY[t],o=Iu.YYYYY[t];if(n=Iu.YYYY.exec(e)||o.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=Iu.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(o.date,r),a=i.year,s=function(e,t){if(null===t)return null;var n,r,o,i;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=Iu.MM.exec(e))return r=new Date(0),Lu(t,o=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,o),r):new Date(NaN);if(n=Iu.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Bu(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=Iu.MMDD.exec(e)){r=new Date(0),o=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Lu(t,o,s)?(r.setUTCFullYear(t,o,s),r):new Date(NaN)}if(n=Iu.Www.exec(e))return Ru(t,i=parseInt(n[1],10)-1)?Du(t,i):new Date(NaN);if(n=Iu.WwwD.exec(e)){i=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Ru(t,i,l)?Du(t,i,l):new Date(NaN)}return null}(i.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),c=0;if(o.time&&(c=function(e){var t,n,r;if(t=Iu.HH.exec(e))return ku(n=parseFloat(t[1].replace(",",".")))?n%24*Eu:NaN;if(t=Iu.HHMM.exec(e))return ku(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*Eu+r*Mu:NaN;if(t=Iu.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var o=parseFloat(t[3].replace(",","."));return ku(n,r,o)?n%24*Eu+r*Mu+1e3*o:NaN}return null}(o.time),isNaN(c)))return new Date(NaN);if(o.timeZone||n.timeZone){if(l=vu(o.timeZone||n.timeZone,new Date(u+c)),isNaN(l))return new Date(NaN)}else l=Pl(new Date(u+c)),l=Pl(new Date(u+c+l));return new Date(u+c+l)}return new Date(NaN)}function Du(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var o=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+o),r}var Nu=[31,28,31,30,31,30,31,31,30,31,30,31],Ou=[31,29,31,30,31,30,31,31,30,31,30,31];function Bu(e){return e%400==0||e%4==0&&e%100!=0}function Lu(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=Bu(e);if(r&&n>Ou[t])return!1;if(!r&&n>Nu[t])return!1}return!0}function Ru(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function ku(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var Pu=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ju(e,t,n){var r=String(t),o=n||{},i=r.match(Pu);if(i){var a=Au(o.originalDate||e,o);r=i.reduce((function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),r="'"===e[n-1],i=e.replace(t,"'"+Cu[t[0]](a,t,null,o)+"'");return r?i.substring(0,n-1)+i.substring(n+1):i}),r)}return uu(e,r,o)}function Fu(e,t,n){var r=Au(e,n),o=vu(t,r,!0),i=new Date(r.getTime()-o),a=new Date(0);return a.setFullYear(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()),a.setHours(i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),i.getUTCMilliseconds()),a}var Uu,Hu="MMM-DD-yyyy HH:mm:ss [UTC]XXX",zu="yyyy-MM-dd'T'HH:mm",Wu=function(e,t,n){return void 0===t&&(t=Hu),ko(n?Fu(new Date(e),n):new Date(e),t)};function Vu(){return Vu=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},Vu.apply(null,arguments)}const Yu=e=>_.createElement("svg",Vu({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Uu||(Uu=_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.52 19.51a.6.6 0 0 1-.6.6H10a4.64 4.64 0 0 1-4.64-4.64V5.94L3.42 7.85A.6.6 0 0 1 2.58 7l2.94-2.93a.6.6 0 0 1 .85 0L9.3 7a.601.601 0 0 1-.85.85L6.54 5.94v9.54A3.44 3.44 0 0 0 10 18.91h3.95a.6.6 0 0 1 .57.6Zm6.475-3.537a.6.6 0 0 0-.425.177l-1.92 1.92V8.53A4.64 4.64 0 0 0 14 3.89h-3.92a.6.6 0 0 0 0 1.2H14c1.9 0 3.44 1.54 3.44 3.44v9.54l-1.92-1.92a.6.6 0 1 0-.85.85l2.94 2.94a.6.6 0 0 0 .85 0L21.42 17a.6.6 0 0 0-.425-1.027Z",fill:"#2B59C3"})));var Gu=o.mui.Box,qu=o.mui.MenuItem,Qu=o.mui.Typography,Zu=function(n){var r=n.appName,i=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;n.isClusterLoadView;var h=n.showStandaloneAnomalies,f=n.onSelectedFilterDuration,m=n.metricMeasure,g=n.currentTab,v=n.clusterLoadSubTab,y=n.onStartDateChange,x=n.onEndDateChange,_=n.onRefresh,b=$n(),S=t.useState(""),w=S[0],C=S[1],E=t.useState(Wu(s,zu,l)),M=E[0],I=E[1],A=t.useState(Wu(a,zu,l)),D=A[0],N=A[1];t.useEffect((function(){new Date(a)<new Date(s)?(C(""),I(Wu(s,zu,l)),N(Wu(a,zu,l))):C("Start Date is greater than end date")}),[a,s]),t.useEffect((function(){r===exports.AppName.YBM&&p&&i!==gn.ONE_HOUR&&i!==gn.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES&&f(gn.ONE_HOUR)}),[m]);return e.jsx(Gu,{children:e.jsxs(Gu,{display:"flex",flexDirection:"row",alignItems:"center",mt:c?2:0,children:[r===exports.AppName.YBM&&g&&(g===exports.InsightsTabs.CLUSTER_LOAD||g===exports.InsightsTabs.METRICS||g===exports.InsightsTabs.INSIGHTS)&&e.jsx(Qu,{variant:"h5",children:e.jsx("span",{className:T(b.breadCrumbText),children:function(e){if(r===exports.AppName.YBM||r===exports.AppName.YBA){if(e===exports.InsightsTabs.METRICS)return"Advanced Metrics";if(e===exports.InsightsTabs.CLUSTER_LOAD&&h)return exports.ClusterLoadOverallTabs.ANOMALIES}return e===exports.InsightsTabs.CLUSTER_LOAD&&v?v:e}(g)})}),e.jsxs(Gu,{display:"flex",ml:"auto",alignItems:"flex-end",children:[i===gn.CUSTOM&&e.jsxs(e.Fragment,{children:[e.jsx(Gu,{mt:.5,mr:1,children:e.jsx(o.YBDatePicker,{className:b.dateTimePicker,value:D,onChange:y,calendar:{showTimeSelector:!0},validation:{maxDate:M}})}),e.jsx(Gu,{mt:.5,mr:1,children:e.jsx(o.YBDatePicker,{className:b.dateTimePicker,value:M,defaultDateTimeValue:M,onChange:x,errorMsg:w,calendar:{showTimeSelector:!0},validation:{minDate:D}})})]}),e.jsx(o.YBSelect,{className:T(b.ybSelectBox,b.ybOverrideMuiInput),dataTestId:"DateSelectorHeader-TimeFilterSelect",value:i,children:vn.map((function(t){return e.jsx(qu,{value:t.value,onClick:function(){f(t.value)},className:T(b.regularText),disabled:r===exports.AppName.YBM&&p&&t.value!==gn.ONE_HOUR&&t.value!==gn.SIX_HOURS&&m===exports.MetricMeasure.OUTLIER_TABLES,children:t.label},"duration-".concat(t.label))}))}),g!==exports.InsightsTabs.METRICS&&e.jsx(o.YBButton,{style:{marginLeft:"8px"},variant:"secondary",dataTestId:"DateSelectorHeader-RefreshButton",startIcon:e.jsx("img",{src:"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.5199 19.5097C14.5199 19.841 14.2513 20.1097 13.9199 20.1097H9.99993C7.43733 20.1097 5.35993 18.0323 5.35993 15.4697V5.93966L3.41993 7.84966C3.18035 8.04677 2.83002 8.02873 2.61196 7.80807C2.39389 7.5874 2.38 7.23688 2.57993 6.99966L5.51993 4.06966C5.63251 3.95669 5.78544 3.89319 5.94493 3.89319C6.10442 3.89319 6.25735 3.95669 6.36993 4.06966L9.29993 6.99966C9.53465 7.23438 9.53465 7.61494 9.29993 7.84966C9.06521 8.08438 8.68465 8.08438 8.44993 7.84966L6.53993 5.93966V15.4797C6.54257 16.3937 6.90891 17.2692 7.55808 17.9127C8.20725 18.5563 9.08585 18.915 9.99993 18.9097H13.9499C14.2695 18.9257 14.5203 19.1897 14.5199 19.5097ZM20.9949 15.9732C20.8354 15.9732 20.6825 16.0367 20.5699 16.1497L18.6499 18.0697V8.52966C18.6499 7.29732 18.1597 6.1156 17.2874 5.24514C16.415 4.37469 15.2323 3.887 13.9999 3.88966H10.0799C9.74856 3.88966 9.47993 4.15829 9.47993 4.48966C9.47993 4.82103 9.74856 5.08966 10.0799 5.08966H13.9999C15.8998 5.08966 17.4399 6.6298 17.4399 8.52966V18.0697L15.5199 16.1497C15.3681 15.9978 15.1468 15.9385 14.9394 15.9941C14.732 16.0497 14.5699 16.2117 14.5144 16.4191C14.4588 16.6265 14.5181 16.8478 14.6699 16.9997L17.6099 19.9397C17.7225 20.0526 17.8754 20.1161 18.0349 20.1161C18.1944 20.1161 18.3473 20.0526 18.4599 19.9397L21.4199 16.9997C21.5329 16.8871 21.5964 16.7341 21.5964 16.5747C21.5964 16.4152 21.5329 16.2622 21.4199 16.1497C21.3073 16.0367 21.1544 15.9732 20.9949 15.9732Z' fill='%232B59C3'/%3e%3c/svg%3e",alt:"Refresh Icon"}),size:"medium",onClick:function(){return _()},children:"Refresh"})]})]})})},Xu=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},Ku=new function(){this.browser=new Xu,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?(Ku.wxa=!0,Ku.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?Ku.worker=!0:"undefined"==typeof navigator?(Ku.node=!0,Ku.svgSupported=!0):function(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),o=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]);o&&(n.ie=!0,n.version=o[1]);i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18);a&&(n.weChat=!0);t.svgSupported="undefined"!=typeof SVGRect,t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported="undefined"!=typeof document;var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,Ku);var $u=Ku,Ju="sans-serif",ec="12px "+Ju;var tc,nc,rc=function(e){var t={};if("undefined"==typeof JSON)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),o=(e.charCodeAt(n)-20)/100;t[r]=o}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),oc={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(!tc){var n=oc.createCanvas();tc=n&&n.getContext("2d")}if(tc)return nc!==t&&(nc=tc.font=t||ec),tc.measureText(e);e=e||"";var r=/(\d+)px/.exec(t=t||ec),o=r&&+r[1]||12,i=0;if(t.indexOf("mono")>=0)i=o*e.length;else for(var a=0;a<e.length;a++){var s=rc[e[a]];i+=null==s?o:s*o}return{width:i}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}},ic=Ic(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),ac=Ic(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),sc=Object.prototype.toString,lc=Array.prototype,uc=lc.forEach,cc=lc.filter,dc=lc.slice,pc=lc.map,hc=function(){}.constructor,fc=hc?hc.prototype:null,mc="__proto__",gc=2311;function vc(){return gc++}function yc(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];"undefined"!=typeof console&&console.error.apply(console,e)}function xc(e){if(null==e||"object"!=typeof e)return e;var t=e,n=sc.call(e);if("[object Array]"===n){if(!Jc(e)){t=[];for(var r=0,o=e.length;r<o;r++)t[r]=xc(e[r])}}else if(ac[n]){if(!Jc(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(r=0,o=e.length;r<o;r++)t[r]=e[r]}}}else if(!ic[n]&&!Jc(e)&&!Hc(e))for(var a in t={},e)e.hasOwnProperty(a)&&a!==mc&&(t[a]=xc(e[a]));return t}function _c(e,t,n){if(!jc(t)||!jc(e))return n?xc(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==mc){var o=e[r],i=t[r];!jc(i)||!jc(o)||Bc(i)||Bc(o)||Hc(i)||Hc(o)||Fc(i)||Fc(o)||Jc(i)||Jc(o)?!n&&r in e||(e[r]=xc(t[r])):_c(o,i,n)}return e}function bc(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==mc&&(e[n]=t[n]);return e}function Tc(e,t,n){for(var r=Dc(t),o=0;o<r.length;o++){var i=r[o];(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}return e}function Sc(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 wc(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),o=0;o<r.length;o++){var i=r[o];"constructor"!==i&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i])}else Tc(e,t,n)}function Cc(e){return!!e&&("string"!=typeof e&&"number"==typeof e.length)}function Ec(e,t,n){if(e&&t)if(e.forEach&&e.forEach===uc)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e);else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function Mc(e,t,n){if(!e)return[];if(!t)return qc(e);if(e.map&&e.map===pc)return e.map(t,n);for(var r=[],o=0,i=e.length;o<i;o++)r.push(t.call(n,e[o],o,e));return r}function Ic(e,t,n,r){if(e&&t){for(var o=0,i=e.length;o<i;o++)n=t.call(r,n,e[o],o,e);return n}}function Ac(e,t,n){if(!e)return[];if(!t)return qc(e);if(e.filter&&e.filter===cc)return e.filter(t,n);for(var r=[],o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)&&r.push(e[o]);return r}function Dc(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 Nc=fc&&Lc(fc.bind)?fc.call.bind(fc.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(dc.call(arguments)))}};function Oc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(dc.call(arguments)))}}function Bc(e){return Array.isArray?Array.isArray(e):"[object Array]"===sc.call(e)}function Lc(e){return"function"==typeof e}function Rc(e){return"string"==typeof e}function kc(e){return"[object String]"===sc.call(e)}function Pc(e){return"number"==typeof e}function jc(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Fc(e){return!!ic[sc.call(e)]}function Uc(e){return!!ac[sc.call(e)]}function Hc(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function zc(e){return null!=e.colorStops}function Wc(e){return e!=e}function Vc(){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 Yc(e,t){return null!=e?e:t}function Gc(e,t,n){return null!=e?e:null!=t?t:n}function qc(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return dc.apply(e,t)}function Qc(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 Zc(e,t){if(!e)throw new Error(t)}function Xc(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Kc="__ec_primitive__";function $c(e){e[Kc]=!0}function Jc(e){return e[Kc]}var ed=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 Dc(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),td="function"==typeof Map;var nd=function(){function e(t){var n=Bc(t);this.data=td?new Map:new ed;var r=this;function o(e,t){n?r.set(e,t):r.set(t,e)}t instanceof e?t.each(o):t&&Ec(t,o)}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 td?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function rd(e){return new nd(e)}function od(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&bc(n,t),n}function id(e){var t=e.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function ad(e,t){return e.hasOwnProperty(t)}function sd(){}var ld=180/Math.PI;function ud(e,t){return null==e&&(e=0),null==t&&(t=0),[e,t]}function cd(e){return[e[0],e[1]]}function dd(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function pd(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function hd(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function fd(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 md(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var gd=md;var vd=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function yd(e,t,n){var r=t[0],o=t[1];return e[0]=n[0]*r+n[2]*o+n[4],e[1]=n[1]*r+n[3]*o+n[5],e}function xd(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function _d(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var bd=function(e,t){this.target=e,this.topTarget=t&&t.topTarget},Td=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 bd(t,e),"dragstart",e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,o=n-this._x,i=r-this._y;this._x=n,this._y=r,t.drift(o,i,e),this.handler.dispatchToElement(new bd(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 bd(s,e),"dragleave",e.event),a&&a!==s&&this.handler.dispatchToElement(new bd(a,e),"dragenter",e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new bd(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new bd(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Sd=Td,wd=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),!n||!e)return this;var i=this._$eventProcessor;null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},l=o[e].length-1,u=o[e][l];return u&&u.callAtLast?o[e].splice(l,0,s):o[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=[],o=0,i=n[e].length;o<i;o++)n[e][o].h!==t&&r.push(n[e][o]);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],o=this._$eventProcessor;if(r)for(var i=t.length,a=r.length,s=0;s<a;s++){var l=r[s];if(!o||!o.filter||null==l.query||o.filter(e,l.query))switch(i){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 o&&o.afterTrigger&&o.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],o=this._$eventProcessor;if(r)for(var i=t.length,a=t[i-1],s=r.length,l=0;l<s;l++){var u=r[l];if(!o||!o.filter||null==u.query||o.filter(e,u.query))switch(i){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,i-1))}}return o&&o.afterTrigger&&o.afterTrigger(e),this},e}(),Cd=wd,Ed=Math.log(2);function Md(e,t,n,r,o,i){var a=r+"-"+o,s=e.length;if(i.hasOwnProperty(a))return i[a];if(1===t){var l=Math.round(Math.log((1<<s)-1&~o)/Ed);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&o||(d+=(h%2?-1:1)*e[n][p]*Md(e,t-1,c,u,o|f,i),h++)}return i[a]=d,d}function Id(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={},o=Md(n,8,0,0,0,r);if(0!==o){for(var i=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==i[s]&&(i[s]=0),i[s]+=((a+s)%2?-1:1)*Md(n,7,0===a?1:0,1<<a,1<<s,r)/o*t[a];return function(e,t,n){var r=t*i[6]+n*i[7]+1;e[0]=(t*i[0]+n*i[1]+i[2])/r,e[1]=(t*i[3]+n*i[4]+i[5])/r}}}var Ad="___zrEVENTSAVED",Dd=[];function Nd(e,t,n,r,o){if(t.getBoundingClientRect&&$u.domSupported&&!Od(t)){var i=t[Ad]||(t[Ad]={}),a=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=["left","right"],o=["top","bottom"],i=0;i<4;i++){var a=document.createElement("div"),s=i%2,l=(i>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",o[l]+":0",r[1-s]+":auto",o[1-l]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}return n}(t,i),s=function(e,t,n){for(var r=n?"invTrans":"trans",o=t[r],i=t.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),d=2*u,p=c.left,h=c.top;a.push(p,h),l=l&&i&&p===i[d]&&h===i[d+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&o?o:(t.srcCoords=a,t[r]=n?Id(s,a):Id(a,s))}(a,i,o);if(s)return s(e,n,r),!0}return!1}function Od(e){return"CANVAS"===e.nodeName.toUpperCase()}var Bd=/([&<>"'])/g,Ld={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rd(e){return null==e?"":(e+"").replace(Bd,(function(e,t){return Ld[t]}))}var kd=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Pd=[],jd=$u.browser.firefox&&+$u.browser.version.split(".")[0]<39;function Fd(e,t,n,r){return n=n||{},r?Ud(e,t,n):jd&&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):Ud(e,t,n),n}function Ud(e,t,n){if($u.domSupported&&e.getBoundingClientRect){var r=t.clientX,o=t.clientY;if(Od(e)){var i=e.getBoundingClientRect();return n.zrX=r-i.left,void(n.zrY=o-i.top)}if(Nd(Pd,e,r,o))return n.zrX=Pd[0],void(n.zrY=Pd[1])}n.zrX=n.zrY=0}function Hd(e){return e||window.event}function zd(e,t,n){if(null!=(t=Hd(t)).zrX)return t;var r=t.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?t.targetTouches[0]:t.changedTouches[0];o&&Fd(e,o,t,n)}else{Fd(e,t,t,n);var i=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(null==n||null==r)return t;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var a=t.button;return null==t.which&&void 0!==a&&kd.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Wd(e,t,n,r){e.addEventListener(t,n,r)}function Vd(e,t,n,r){e.removeEventListener(t,n,r)}var Yd=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Gd(e){return 2===e.which||3===e.which}var qd=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var o={points:[],touches:[],target:t,event:e},i=0,a=r.length;i<a;i++){var s=r[i],l=Fd(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},e.prototype._recognize=function(e){for(var t in Zd)if(Zd.hasOwnProperty(t)){var n=Zd[t](this._track,e);if(n)return n}},e}();function Qd(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}var Zd={pinch:function(e,t){var n=e.length;if(n){var r,o=(e[n-1]||{}).points,i=(e[n-2]||{}).points||o;if(i&&i.length>1&&o&&o.length>1){var a=Qd(o)/Qd(i);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}};function Xd(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Kd(e,t,n){var r=t[0]*n[0]+t[2]*n[1],o=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=o,e[2]=i,e[3]=a,e[4]=s,e[5]=l,e}function $d(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 Jd(e,t,n){var r=t[0],o=t[2],i=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]=o*c+s*u,e[3]=-o*u+c*s,e[4]=c*i+u*l,e[5]=c*l-u*i,e}function ep(e,t){var n=t[0],r=t[2],o=t[4],i=t[1],a=t[3],s=t[5],l=n*a-i*r;return l?(l=1/l,e[0]=a*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-a*o)*l,e[5]=(i*o-n*s)*l,e):null}var tp=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var o=1-r;e.x=o*t.x+r*n.x,e.y=o*t.y+r*n.y},e}(),np=tp,rp=Math.min,op=Math.max,ip=new np,ap=new np,sp=new np,lp=new np,up=new np,cp=new np,dp=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=rp(e.x,this.x),n=rp(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=op(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=op(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,o=[1,0,0,1,0,0];return $d(o,o,[-t.x,-t.y]),function(e,t,n){var r=n[0],o=n[1];e[0]=t[0]*r,e[1]=t[1]*o,e[2]=t[2]*r,e[3]=t[3]*o,e[4]=t[4]*r,e[5]=t[5]*o}(o,o,[n,r]),$d(o,o,[e.x,e.y]),o},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,o=r.x,i=r.x+r.width,a=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,d=t.y+t.height,p=!(i<l||u<o||s<c||d<a);if(n){var h=1/0,f=0,m=Math.abs(i-l),g=Math.abs(u-o),v=Math.abs(s-c),y=Math.abs(d-a),x=Math.min(m,g),_=Math.min(v,y);i<l||u<o?x>f&&(f=x,m<g?np.set(cp,-m,0):np.set(cp,g,0)):x<h&&(h=x,m<g?np.set(up,m,0):np.set(up,-g,0)),s<c||d<a?_>f&&(f=_,v<y?np.set(cp,0,-v):np.set(cp,0,y)):x<h&&(h=x,v<y?np.set(up,0,v):np.set(up,0,-y))}return n&&np.copy(n,p?up:cp),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 o=r[0],i=r[3],a=r[4],s=r[5];return t.x=n.x*o+a,t.y=n.y*i+s,t.width=n.width*o,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}ip.x=sp.x=n.x,ip.y=lp.y=n.y,ap.x=lp.x=n.x+n.width,ap.y=sp.y=n.y+n.height,ip.transform(r),lp.transform(r),ap.transform(r),sp.transform(r),t.x=rp(ip.x,ap.x,sp.x,lp.x),t.y=rp(ip.y,ap.y,sp.y,lp.y);var l=op(ip.x,ap.x,sp.x,lp.x),u=op(ip.y,ap.y,sp.y,lp.y);t.width=l-t.x,t.height=u-t.y}else t!==n&&e.copy(t,n)},e}(),pp=dp,hp="silent";function fp(){Yd(this.event)}var mp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handler=null,t}return M(t,e),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Cd),gp=function(e,t){this.x=e,this.y=t},vp=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],yp=new pp(0,0,0,0),xp=function(e){function t(t,n,r,o,i){var a=e.call(this)||this;return a._hovered=new gp(0,0),a.storage=t,a.painter=n,a.painterRoot=o,a._pointerSize=i,r=r||new mp,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Sd(a),a}return M(t,e),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Ec(vp,(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=Tp(this,t,n),o=this._hovered,i=o.target;i&&!i.__zr&&(i=(o=this.findHover(o.x,o.y)).target);var a=this._hovered=r?new gp(t,n):this.findHover(t,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),i&&s!==i&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(a,"mousemove",e),s&&s!==i&&this.dispatchToElement(a,"mouseover",e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new gp(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var o="on"+t,i=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:fp}}(t,e,n);r&&(r[o]&&(i.cancelBubble=!!r[o].call(r,i)),r.trigger(t,i),r=r.__hostTarget?r.__hostTarget:r.parent,!i.cancelBubble););i.cancelBubble||(this.trigger(t,i),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[o]&&e[o].call(e,i),e.trigger&&e.trigger(t,i)})))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),o=new gp(e,t);if(bp(r,o,e,t,n),this._pointerSize&&!o.target){for(var i=[],a=this._pointerSize,s=a/2,l=new pp(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||(yp.copy(c.getBoundingRect()),c.transform&&yp.applyTransform(c.transform),yp.intersect(l)&&i.push(c))}if(i.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(bp(i,o,e+h*Math.cos(f),t+h*Math.sin(f),n),o.target)return o}}return o},t.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new qd);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 o=r.type;e.gestureEvent=o;var i=new gp;i.target=r.target,this.dispatchToElement(i,o,r.event)}},t}(Cd);function _p(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,o=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(o=!0)}var s=r.__hostTarget;r=s||r.parent}return!o||hp}return!1}function bp(e,t,n,r,o){for(var i=e.length-1;i>=0;i--){var a=e[i],s=void 0;if(a!==o&&!a.ignore&&(s=_p(a,n,r))&&(!t.topTarget&&(t.topTarget=a),s!==hp)){t.target=a;break}}}function Tp(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}Ec(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){xp.prototype[e]=function(t){var n,r,o=t.zrX,i=t.zrY,a=Tp(this,o,i);if("mouseup"===e&&a||(r=(n=this.findHover(o,i)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||gd(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var Sp=xp;function wp(e,t,n,r){var o=t+1;if(o===n)return 1;if(r(e[o++],e[t])<0){for(;o<n&&r(e[o],e[o-1])<0;)o++;!function(e,t,n){n--;for(;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}(e,t,o)}else for(;o<n&&r(e[o],e[o-1])>=0;)o++;return o-t}function Cp(e,t,n,r,o){for(r===t&&r++;r<n;r++){for(var i,a=e[r],s=t,l=r;s<l;)o(a,e[i=s+l>>>1])<0?l=i:s=i+1;var u=r-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=a}}function Ep(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])>0){for(s=r-o;l<s&&i(e,t[n+o+l])>0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&i(e,t[n+o-l])<=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=o-l,l=o-u}for(a++;a<l;){var c=a+(l-a>>>1);i(e,t[n+c])>0?a=c+1:l=c}return l}function Mp(e,t,n,r,o,i){var a=0,s=0,l=1;if(i(e,t[n+o])<0){for(s=o+1;l<s&&i(e,t[n+o-l])<0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=a;a=o-l,l=o-u}else{for(s=r-o;l<s&&i(e,t[n+o+l])>=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=o,l+=o}for(a++;a<l;){var c=a+(l-a>>>1);i(e,t[n+c])<0?l=c:a=c+1}return l}function Ip(e,t){var n,r,o=7,i=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===i-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),i--;var p=Mp(e[c],e,l,u,0,t);l+=p,0!==(u-=p)&&0!==(d=Ep(e[l+u-1],e,c,d,d-1,t))&&(u<=d?function(n,r,i,s){var l=0;for(l=0;l<r;l++)a[l]=e[n+l];var u=0,c=i,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,m=o;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)<m);if(f)break;do{if(0!==(p=Mp(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=Ep(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}m--}while(p>=7||h>=7);if(f)break;m<0&&(m=0),m+=2}if((o=m)<1&&(o=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,i,s){var l=0;for(l=0;l<s;l++)a[l]=e[i+l];var u=n+r-1,c=s-1,d=i+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=o;for(;;){var m=0,g=0,v=!1;do{if(t(a[c],e[u])<0){if(e[d--]=e[u--],m++,g=0,0==--r){v=!0;break}}else if(e[d--]=a[c--],g++,m=0,1==--s){v=!0;break}}while((m|g)<f);if(v)break;do{if(0!==(m=r-Mp(a[c],e,n,r,r-1,t))){for(r-=m,h=(d-=m)+1,p=(u-=m)+1,l=m-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!==(g=s-Ep(e[u],a,0,s,s-1,t))){for(s-=g,h=(d-=g)+1,p=(c-=g)+1,l=0;l<g;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(m>=7||g>=7);if(v)break;f<0&&(f=0),f+=2}(o=f)<1&&(o=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(;i>1;){var e=i-2;if(e>=1&&r[e-1]<=r[e]+r[e+1]||e>=2&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;i>1;){var e=i-2;e>0&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[i]=e,r[i]=t,i+=1}}}function Ap(e,t,n,r){n||(n=0),r||(r=e.length);var o=r-n;if(!(o<2)){var i=0;if(o<32)Cp(e,n,r,n+(i=wp(e,n,r,t)),t);else{var a=Ip(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(o);do{if((i=wp(e,n,r,t))<s){var l=o;l>s&&(l=s),Cp(e,n,n+l,n+i,t),i=l}a.pushRun(n,i),a.mergeRuns(),o-=i,n+=i}while(0!==o);a.forceMergeRuns()}}}var Dp=!1;function Np(){Dp||(Dp=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Op(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Bp=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Op}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,o=t.length;r<o;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,Ap(n,Op)},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 o=r,i=e;o;)o.parent=i,o.updateTransform(),t.push(o),i=o,o=o.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)&&(Np(),u.z=0),isNaN(u.z2)&&(Np(),u.z2=0),isNaN(u.zlevel)&&(Np(),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=Sc(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}(),Lp=Bp,Rp=$u.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},kp={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-kp.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*kp.bounceIn(2*e):.5*kp.bounceOut(2*e-1)+.5}},Pp=kp,jp=Math.pow,Fp=Math.sqrt,Up=1e-8,Hp=1e-4,zp=Fp(3),Wp=1/3,Vp=ud(),Yp=ud(),Gp=ud();function qp(e){return e>-1e-8&&e<Up}function Qp(e){return e>Up||e<-1e-8}function Zp(e,t,n,r,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*r+3*i*n)}function Xp(e,t,n,r,o){var i=1-o;return 3*(((t-e)*i+2*(n-t)*o)*i+(r-n)*o*o)}function Kp(e,t,n,r,o,i){var a=r+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,d=s*l-9*a*u,p=l*l-3*s*u,h=0;if(qp(c)&&qp(d)){if(qp(s))i[0]=0;else(w=-l/s)>=0&&w<=1&&(i[h++]=w)}else{var f=d*d-4*c*p;if(qp(f)){var m=d/c,g=-m/2;(w=-s/a+m)>=0&&w<=1&&(i[h++]=w),g>=0&&g<=1&&(i[h++]=g)}else if(f>0){var v=Fp(f),y=c*s+1.5*a*(-d+v),x=c*s+1.5*a*(-d-v);(w=(-s-((y=y<0?-jp(-y,Wp):jp(y,Wp))+(x=x<0?-jp(-x,Wp):jp(x,Wp))))/(3*a))>=0&&w<=1&&(i[h++]=w)}else{var _=(2*c*s-3*a*d)/(2*Fp(c*c*c)),b=Math.acos(_)/3,T=Fp(c),S=Math.cos(b),w=(-s-2*T*S)/(3*a),C=(g=(-s+T*(S+zp*Math.sin(b)))/(3*a),(-s+T*(S-zp*Math.sin(b)))/(3*a));w>=0&&w<=1&&(i[h++]=w),g>=0&&g<=1&&(i[h++]=g),C>=0&&C<=1&&(i[h++]=C)}}return h}function $p(e,t,n,r,o){var i=6*n-12*t+6*e,a=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(qp(a)){if(Qp(i))(c=-s/i)>=0&&c<=1&&(o[l++]=c)}else{var u=i*i-4*a*s;if(qp(u))o[0]=-i/(2*a);else if(u>0){var c,d=Fp(u),p=(-i-d)/(2*a);(c=(-i+d)/(2*a))>=0&&c<=1&&(o[l++]=c),p>=0&&p<=1&&(o[l++]=p)}}return l}function Jp(e,t,n,r,o,i){var a=(t-e)*o+e,s=(n-t)*o+t,l=(r-n)*o+n,u=(s-a)*o+a,c=(l-s)*o+s,d=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=d,i[4]=d,i[5]=c,i[6]=l,i[7]=r}function eh(e,t,n,r,o,i,a,s,l){for(var u=e,c=t,d=0,p=1/l,h=1;h<=l;h++){var f=h*p,m=Zp(e,n,o,a,f),g=Zp(t,r,i,s,f),v=m-u,y=g-c;d+=Math.sqrt(v*v+y*y),u=m,c=g}return d}function th(e,t,n,r){var o=1-r;return o*(o*e+2*r*t)+r*r*n}function nh(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function rh(e,t,n){var r=e+n-2*t;return 0===r?.5:(e-t)/r}function oh(e,t,n,r,o){var i=(t-e)*r+e,a=(n-t)*r+t,s=(a-i)*r+i;o[0]=e,o[1]=i,o[2]=s,o[3]=s,o[4]=a,o[5]=n}function ih(e,t,n,r,o,i,a){for(var s=e,l=t,u=0,c=1/a,d=1;d<=a;d++){var p=d*c,h=th(e,n,o,p),f=th(t,r,i,p),m=h-s,g=f-l;u+=Math.sqrt(m*m+g*g),s=h,l=f}return u}var ah=/cubic-bezier\(([0-9,\.e ]+)\)/;function sh(e){var t=e&&ah.exec(e);if(t){var n=t[1].split(","),r=+Xc(n[0]),o=+Xc(n[1]),i=+Xc(n[2]),a=+Xc(n[3]);if(isNaN(r+o+i+a))return;var s=[];return function(e){return e<=0?0:e>=1?1:Kp(0,r,i,1,e,s)&&Zp(0,o,a,1,s[0])}}}var lh=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||sd,this.ondestroy=e.ondestroy||sd,this.onrestart=e.onrestart||sd,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var i=this.easingFunc,a=i?i(o):o;if(this.onframe(a),1===o){if(!this.loop)return!0;var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Lc(e)?e:Pp[e]||sh(e)},e}(),uh=function(e){this.value=e},ch=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new uh(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}(),dh=function(){function e(e){this._list=new ch,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,o=null;if(null==r[e]){var i=n.len(),a=this._lastRemovedEntry;if(i>=this._maxSize&&i>0){var s=n.head;n.remove(s),delete r[s.key],o=s.value,this._lastRemovedEntry=s}a?a.value=t:a=new uh(t),a.key=e,n.insertEntry(a),r[e]=a}return o},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ph=dh,hh={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 fh(e){return(e=Math.round(e))<0?0:e>255?255:e}function mh(e){return e<0?0:e>1?1:e}function gh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?fh(parseFloat(t)/100*255):fh(parseInt(t,10))}function vh(e){var t=e;return t.length&&"%"===t.charAt(t.length-1)?mh(parseFloat(t)/100):mh(parseFloat(t))}function yh(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 xh(e,t,n){return e+(t-e)*n}function _h(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e}function bh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Th=new ph(20),Sh=null;function wh(e,t){Sh&&bh(Sh,t),Sh=Th.put(e,Sh||t.slice())}function Ch(e,t){if(e){t=t||[];var n=Th.get(e);if(n)return bh(t,n);var r=(e+="").replace(/ /g,"").toLowerCase();if(r in hh)return bh(t,hh[r]),wh(e,t),t;var o,i=r.length;if("#"===r.charAt(0))return 4===i||5===i?(o=parseInt(r.slice(1,4),16))>=0&&o<=4095?(_h(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(r.slice(4),16)/15:1),wh(e,t),t):void _h(t,0,0,0,1):7===i||9===i?(o=parseInt(r.slice(1,7),16))>=0&&o<=16777215?(_h(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(r.slice(7),16)/255:1),wh(e,t),t):void _h(t,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===i){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?_h(t,+u[0],+u[1],+u[2],1):_h(t,0,0,0,1);c=vh(u.pop());case"rgb":return u.length>=3?(_h(t,gh(u[0]),gh(u[1]),gh(u[2]),3===u.length?c:vh(u[3])),wh(e,t),t):void _h(t,0,0,0,1);case"hsla":return 4!==u.length?void _h(t,0,0,0,1):(u[3]=vh(u[3]),Eh(u,t),wh(e,t),t);case"hsl":return 3!==u.length?void _h(t,0,0,0,1):(Eh(u,t),wh(e,t),t);default:return}}_h(t,0,0,0,1)}}function Eh(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=vh(e[1]),o=vh(e[2]),i=o<=.5?o*(r+1):o+r-o*r,a=2*o-i;return _h(t=t||[],fh(255*yh(a,i,n+1/3)),fh(255*yh(a,i,n)),fh(255*yh(a,i,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Mh(e,t){var n=Ch(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 Dh(n,4===n.length?"rgba":"rgb")}}function Ih(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var r=e*(t.length-1),o=Math.floor(r),i=Math.ceil(r),a=t[o],s=t[i],l=r-o;return n[0]=fh(xh(a[0],s[0],l)),n[1]=fh(xh(a[1],s[1],l)),n[2]=fh(xh(a[2],s[2],l)),n[3]=mh(xh(a[3],s[3],l)),n}}function Ah(e,t,n,r){var o,i=Ch(e);if(e)return i=function(e){if(e){var t,n,r=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(r,o,i),s=Math.max(r,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,d=((s-o)/6+l/2)/l,p=((s-i)/6+l/2)/l;r===s?t=p-d:o===s?t=1/3+c-p:i===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}}(i),null!=t&&(i[0]=(o=t,(o=Math.round(o))<0?0:o>360?360:o)),null!=n&&(i[1]=vh(n)),null!=r&&(i[2]=vh(r)),Dh(Eh(i),"rgba")}function Dh(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 Nh(e,t){var n=Ch(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Oh=Math.round;function Bh(e){var t;if(e&&"transparent"!==e){if("string"==typeof e&&e.indexOf("rgba")>-1){var n=Ch(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 Lh=1e-4;function Rh(e){return e<Lh&&e>-1e-4}function kh(e){return Oh(1e3*e)/1e3}function Ph(e){return Oh(1e4*e)/1e4}var jh={left:"start",right:"end",center:"middle",middle:"middle"};function Fh(e){return e&&!!e.image}function Uh(e){return Fh(e)||function(e){return e&&!!e.svgElement}(e)}function Hh(e){return"linear"===e.type}function zh(e){return"radial"===e.type}function Wh(e){return e&&("linear"===e.type||"radial"===e.type)}function Vh(e){return"url(#"+e+")"}function Yh(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 Gh(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*ld,o=Yc(e.scaleX,1),i=Yc(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===o&&1===i||l.push("scale("+o+","+i+")"),(a||s)&&l.push("skew("+Oh(a*ld)+"deg, "+Oh(s*ld)+"deg)"),l.join(" ")}var qh=$u.hasGlobalWindow&&Lc(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},Qh=Array.prototype.slice;function Zh(e,t,n){return(t-e)*n+e}function Xh(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=Zh(t[i],n[i],r);return e}function Kh(e,t,n,r){for(var o=t.length,i=0;i<o;i++)e[i]=t[i]+n[i]*r;return e}function $h(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function Jh(e,t){for(var n=e.length,r=t.length,o=n>r?t:e,i=Math.min(n,r),a=o[i-1]||{color:[0,0,0,0],offset:0},s=i;s<Math.max(n,r);s++)o.push({offset:a.offset,color:a.color.slice()})}function ef(e,t,n){var r=e,o=t;if(r.push&&o.push){var i=r.length,a=o.length;if(i!==a)if(i>a)r.length=a;else for(var s=i;s<a;s++)r.push(1===n?o[s]:Qh.call(o[s]));var l=r[0]&&r[0].length;for(s=0;s<r.length;s++)if(1===n)isNaN(r[s])&&(r[s]=o[s]);else for(var u=0;u<l;u++)isNaN(r[s][u])&&(r[s][u]=o[s][u])}}function tf(e){if(Cc(e)){var t=e.length;if(Cc(e[0])){for(var n=[],r=0;r<t;r++)n.push(Qh.call(e[r]));return n}return Qh.call(e)}return e}function nf(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 rf(e){return 4===e||5===e}function of(e){return 1===e||2===e}var af=[0,0,0,0],sf=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,o=r.length,i=!1,a=6,s=t;if(Cc(t)){var l=function(e){return Cc(e&&e[0])?2:1}(t);a=l,(1===l&&!Pc(t[0])||2===l&&!Pc(t[0][0]))&&(i=!0)}else if(Pc(t)&&!Wc(t))a=0;else if(Rc(t))if(isNaN(+t)){var u=Ch(t);u&&(s=u,a=3)}else a=0;else if(zc(t)){var c=bc({},s);c.colorStops=Mc(t.colorStops,(function(e){return{offset:e.offset,color:Ch(e.color)}})),Hh(t)?a=4:zh(t)&&(a=5),s=c}0===o?this.valType=a:a===this.valType&&6!==a||(i=!0),this.discrete=this.discrete||i;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=Lc(n)?n:Pp[n]||sh(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort((function(e,t){return e.time-t.time}));for(var r=this.valType,o=n.length,i=n[o-1],a=this.discrete,s=of(r),l=rf(r),u=0;u<o;u++){var c=n[u],d=c.value,p=i.value;c.percent=c.time/e,a||(s&&u!==o-1?ef(d,p,r):l&&Jh(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<o;u++)0===r?n[u].additiveValue=n[u].value-h:3===r?n[u].additiveValue=Kh([],n[u].value,h,-1):of(r)&&(n[u].additiveValue=1===r?Kh([],n[u].value,h,-1):$h([],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,o,i=null!=this._additiveTrack,a=i?"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=o=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)}o=l[n+1],r=l[n]}if(r&&o){this._lastFr=n,this._lastFrP=t;var f=o.percent-r.percent,m=0===f?1:h((t-r.percent)/f,1);o.easingFunc&&(m=o.easingFunc(m));var g=i?this._additiveValue:d?af:e[c];if(!of(s)&&!d||g||(g=this._additiveValue=[]),this.discrete)e[c]=m<1?r.rawValue:o.rawValue;else if(of(s))1===s?Xh(g,r[a],o[a],m):function(e,t,n,r){for(var o=t.length,i=o&&t[0].length,a=0;a<o;a++){e[a]||(e[a]=[]);for(var s=0;s<i;s++)e[a][s]=Zh(t[a][s],n[a][s],r)}}(g,r[a],o[a],m);else if(rf(s)){var v=r[a],y=o[a],x=4===s;e[c]={type:x?"linear":"radial",x:Zh(v.x,y.x,m),y:Zh(v.y,y.y,m),colorStops:Mc(v.colorStops,(function(e,t){var n=y.colorStops[t];return{offset:Zh(e.offset,n.offset,m),color:nf(Xh([],e.color,n.color,m))}})),global:y.global},x?(e[c].x2=Zh(v.x2,y.x2,m),e[c].y2=Zh(v.y2,y.y2,m)):e[c].r=Zh(v.r,y.r,m)}else if(d)Xh(g,r[a],o[a],m),i||(e[c]=nf(g));else{var _=Zh(r[a],o[a],m);i?this._additiveValue=_:e[c]=_}i&&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?(Ch(e[n],af),Kh(af,af,r,1),e[n]=nf(af)):1===t?Kh(e[n],e[n],r,1):2===t&&$h(e[n],e[n],r,1)},e}(),lf=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?yc("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,Dc(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var o=this._tracks,i=0;i<n.length;i++){var a=n[i],s=o[a];if(!s){s=o[a]=new sf(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=nf(l))}else l=this._target[a];if(null==l)continue;e>0&&s.addKeyframe(0,tf(l),r),this._trackKeys.push(a)}s.addKeyframe(e,tf(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 o=n[r].getTrack(e);o&&(t=o)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var i=this._trackKeys[o],a=this._tracks[i],s=this._getAdditiveTrack(i),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 lh({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var o=!1,i=0;i<r.length;i++)if(r[i]._clip){o=!0;break}o||(t._additiveAnimators=null)}for(i=0;i<n.length;i++)n[i].step(t._target,e);var a=t._onframeCbs;if(a)for(i=0;i<a.length;i++)a[i](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 Mc(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,o=0;o<e.length;o++){var i=n[e[o]];i&&!i.isFinished()&&(t?i.step(this._target,1):1===this._started&&i.step(this._target,0),i.setFinished())}var a=!0;for(o=0;o<r.length;o++)if(!n[r[o]].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 o=t[r],i=this._tracks[o];if(i&&!i.isFinished()){var a=i.keyframes,s=a[n?0:a.length-1];s&&(e[o]=tf(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||Dc(e);for(var n=0;n<t.length;n++){var r=t[n],o=this._tracks[r];if(o){var i=o.keyframes;if(i.length>1){var a=i.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},e}(),uf=lf;function cf(){return(new Date).getTime()}var df,pf,hf,ff=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 M(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=cf()-this._pausedTime,n=t-this._time,r=this._head;r;){var o=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=o):r=o}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,Rp((function t(){e._running&&(Rp(t),!e._paused&&e.update())}))},t.prototype.start=function(){this._running||(this._time=cf(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=cf(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=cf()-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 uf(e,t.loop);return this.addAnimator(n),n},t}(Cd),mf=ff,gf=$u.domSupported,vf=(pf={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},hf=Mc(df=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],(function(e){var t=e.replace("mouse","pointer");return pf.hasOwnProperty(t)?t:e})),{mouse:df,touch:["touchstart","touchend","touchmove"],pointer:hf}),yf=["mousemove","mouseup"],xf=["pointermove","pointerup"],_f=!1;function bf(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Tf(e){e&&(e.zrByTouch=!0)}function Sf(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 wf=function(e,t){this.stopPropagation=sd,this.stopImmediatePropagation=sd,this.preventDefault=sd,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},Cf={mousedown:function(e){e=zd(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=zd(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=zd(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){Sf(this,(e=zd(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){_f=!0,e=zd(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){_f||(e=zd(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){Tf(e=zd(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Cf.mousemove.call(this,e),Cf.mousedown.call(this,e)},touchmove:function(e){Tf(e=zd(this.dom,e)),this.handler.processGesture(e,"change"),Cf.mousemove.call(this,e)},touchend:function(e){Tf(e=zd(this.dom,e)),this.handler.processGesture(e,"end"),Cf.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Cf.click.call(this,e)},pointerdown:function(e){Cf.mousedown.call(this,e)},pointermove:function(e){bf(e)||Cf.mousemove.call(this,e)},pointerup:function(e){Cf.mouseup.call(this,e)},pointerout:function(e){bf(e)||Cf.mouseout.call(this,e)}};Ec(["click","dblclick","contextmenu"],(function(e){Cf[e]=function(t){t=zd(this.dom,t),this.trigger(e,t)}}));var Ef={pointermove:function(e){bf(e)||Ef.mousemove.call(this,e)},pointerup:function(e){Ef.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 Mf(e,t){var n=t.domHandlers;$u.pointerEventsSupported?Ec(vf.pointer,(function(r){Af(t,r,(function(t){n[r].call(e,t)}))})):($u.touchEventsSupported&&Ec(vf.touch,(function(r){Af(t,r,(function(o){n[r].call(e,o),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),Ec(vf.mouse,(function(r){Af(t,r,(function(o){o=Hd(o),t.touching||n[r].call(e,o)}))})))}function If(e,t){function n(n){Af(t,n,(function(r){r=Hd(r),Sf(e,r.target)||(r=function(e,t){return zd(e.dom,new wf(e,t),!0)}(e,r),t.domHandlers[n].call(e,r))}),{capture:!0})}$u.pointerEventsSupported?Ec(xf,n):$u.touchEventsSupported||Ec(yf,n)}function Af(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Wd(e.domTarget,t,n,r)}function Df(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Vd(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var Nf=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t},Of=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 Nf(t,Cf),gf&&(r._globalHandlerScope=new Nf(document,Ef)),Mf(r,r._localHandlerScope),r}return M(t,e),t.prototype.dispose=function(){Df(this._localHandlerScope),gf&&Df(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,gf&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?If(this,t):Df(t)}},t}(Cd),Bf=1;$u.hasGlobalWindow&&(Bf=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Lf=Bf,Rf="#333",kf="#ccc",Pf=Xd,jf=5e-5;function Ff(e){return e>jf||e<-5e-5}var Uf=[],Hf=[],zf=[1,0,0,1,0,0],Wf=Math.abs,Vf=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 Ff(this.rotation)||Ff(this.x)||Ff(this.y)||Ff(this.scaleX-1)||Ff(this.scaleY-1)||Ff(this.skewX)||Ff(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):Pf(n),e&&(t?Kd(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&&(Pf(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(null!=t&&1!==t){this.getGlobalScale(Uf);var n=Uf[0]<0?-1:1,r=Uf[1]<0?-1:1,o=((Uf[0]-n)*t+n)/Uf[0]||0,i=((Uf[1]-r)*t+r)/Uf[1]||0;e[0]*=o,e[1]*=o,e[2]*=i,e[3]*=i}this.invTransform=this.invTransform||[1,0,0,1,0,0],ep(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(o),t=Math.sqrt(t),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(Kd(Hf,e.invTransform,t),t=Hf);var n=this.originX,r=this.originY;(n||r)&&(zf[4]=n,zf[5]=r,Kd(Hf,t,zf),Hf[4]-=n,Hf[5]-=r,t=Hf),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&&yd(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&yd(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Wf(e[0]-1)>1e-10&&Wf(e[3]-1)>1e-10?Math.sqrt(Wf(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Gf(this,e)},e.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,o=e.scaleX,i=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*o-d*f*i,t[5]=-f*i-p*h*o}else t[4]=t[5]=0;return t[0]=o,t[3]=i,t[1]=p*o,t[2]=d*i,l&&Jd(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}(),Yf=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Gf(e,t){for(var n=0;n<Yf.length;n++){var r=Yf[n];e[r]=t[r]}}var qf={};function Qf(e,t){var n=qf[t=t||ec];n||(n=qf[t]=new ph(500));var r=n.get(e);return null==r&&(r=oc.measureText(e,t).width,n.put(e,r)),r}function Zf(e,t,n,r){var o=Qf(e,t),i=Jf(t),a=Kf(0,o,n),s=$f(0,i,r);return new pp(a,s,o,i)}function Xf(e,t,n,r){var o=((e||"")+"").split("\n");if(1===o.length)return Zf(o[0],t,n,r);for(var i=new pp(0,0,0,0),a=0;a<o.length;a++){var s=Zf(o[a],t,n,r);0===a?i.copy(s):i.union(s)}return i}function Kf(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function $f(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Jf(e){return Qf("国",e)}function em(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function tm(e,t,n){var r=t.position||"inside",o=null!=t.distance?t.distance:5,i=n.height,a=n.width,s=i/2,l=n.x,u=n.y,c="left",d="top";if(r instanceof Array)l+=em(r[0],n.width),u+=em(r[1],n.height),c=null,d=null;else switch(r){case"left":l-=o,u+=s,c="right",d="middle";break;case"right":l+=o+a,u+=s,d="middle";break;case"top":l+=a/2,u-=o,c="center",d="bottom";break;case"bottom":l+=a/2,u+=i+o,c="center";break;case"inside":l+=a/2,u+=s,c="center",d="middle";break;case"insideLeft":l+=o,u+=s,d="middle";break;case"insideRight":l+=a-o,u+=s,c="right",d="middle";break;case"insideTop":l+=a/2,u+=o,c="center";break;case"insideBottom":l+=a/2,u+=i-o,c="center",d="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,c="right";break;case"insideBottomLeft":l+=o,u+=i-o,d="bottom";break;case"insideBottomRight":l+=a-o,u+=i-o,c="right",d="bottom"}return(e=e||{}).x=l,e.y=u,e.align=c,e.verticalAlign=d,e}var nm="__zr_normal__",rm=Yf.concat(["ignore"]),om=Ic(Yf,(function(e,t){return e[t]=!0,e}),{ignore:!1}),im={},am=new pp(0,0,0,0),sm=function(){function e(e){this.id=vc(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=t.innerTransformable,i=void 0,a=void 0,s=!1;o.parent=r?this:null;var l=!1;if(o.copyTransform(t),null!=n.position){var u=am;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),r||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(im,n,u):tm(im,n,u),o.x=im.x,o.y=im.y,i=im.align,a=im.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=em(c[0],u.width),p=em(c[1],u.height)),l=!0,o.originX=-o.x+d+(r?0:u.x),o.originY=-o.y+p+(r?0:u.y)}}null!=n.rotation&&(o.rotation=n.rotation);var h=n.offset;h&&(o.x+=h[0],o.y+=h[1],l||(o.originX=-h[0],o.originY=-h[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,m=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,v=void 0,y=void 0;f&&this.canBeInsideText()?(g=n.insideFill,v=n.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(g),y=!0)):(g=n.outsideFill,v=n.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(g),y=!0)),(g=g||"#000")===m.fill&&v===m.stroke&&y===m.autoStroke&&i===m.align&&a===m.verticalAlign||(s=!0,m.fill=g,m.stroke=v,m.autoStroke=y,m.align=i,m.verticalAlign=a,t.setDefaultTextStyle(m)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(e){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?kf:Rf},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Ch(t);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,Dh(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||{},bc(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(jc(e))for(var n=Dc(e),r=0;r<n.length;r++){var o=n[r];this.attrKV(o,e[o])}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],o=r.__fromStateTransition;if(!(r.getLoop()||o&&o!==nm)){var i=r.targetName,a=i?t[i]: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,rm)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var o=n[r];null==e[o]||o in t||(t[o]=this[o])}},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(nm,!1,e)},e.prototype.useState=function(e,t,n,r){var o=e===nm;if(this.hasState()||!o){var i=this.currentStates,a=this.stateTransition;if(!(Sc(i,e)>=0)||!t&&1!==i.length){var s;if(this.stateProxy&&!o&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||o){o||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||r);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,c=this._textGuide;return u&&u.useState(e,t,n,l),c&&c.useState(e,t,n,l),o?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}yc("State "+e+" not exists.")}}},e.prototype.useStates=function(e,t,n){if(e.length){var r=[],o=this.currentStates,i=e.length,a=i===o.length;if(a)for(var s=0;s<i;s++)if(e[s]!==o[s]){a=!1;break}if(a)return;for(s=0;s<i;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[i-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,m=this._textGuide;f&&f.useStates(e,t,d),m&&m.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},e.prototype._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=Sc(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(),o=Sc(r,e),i=Sc(r,t)>=0;o>=0?i?r.splice(o,1):r[o]=t:n&&!i&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r];bc(n,o),o.textConfig&&bc(t=t||{},o.textConfig)}return t&&(n.textConfig=t),n},e.prototype._applyStateObj=function(e,t,n,r,o,i){var a=!(t&&r);t&&t.textConfig?(this.textConfig=bc({},r?this.textConfig:n.textConfig),bc(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<rm.length;u++){var c=rm[u],d=o&&om[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(!o)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,i)},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 Vf,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),bc(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,o=new uf(r,t,n);return e&&(o.targetName=e),this.addAnimator(o,e),o},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=Sc(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,o=[],i=0;i<r;i++){var a=n[i];e&&e!==a.scope?o.push(a):a.stop(t)}return this.animators=o,this},e.prototype.animateTo=function(e,t,n){lm(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){lm(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var o=lm(this,t,n,r),i=0;i<o.length;i++)o[i].__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,o){function i(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){this[n]||i(this,this[n]=[]);return this[n]},set:function(e){this[r]=e[0],this[o]=e[1],this[n]=e,i(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 lm(e,t,n,r,o){var i=[];dm(e,"",e,t,n=n||{},r,i,o);var a=i.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(),i.length>0&&n.during&&i[0].during((function(e,t){n.during(t)}));for(var p=0;p<i.length;p++){var h=i[p];c&&h.done(c),d&&h.aborted(d),n.force&&h.duration(n.duration),h.start(n.easing)}return i}function um(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function cm(e,t,n){if(Cc(t[n]))if(Cc(e[n])||(e[n]=[]),Uc(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),um(e[n],t[n],r))}else{var o=t[n],i=e[n],a=o.length;if(Cc(o[0]))for(var s=o[0].length,l=0;l<a;l++)i[l]?um(i[l],o[l],s):i[l]=Array.prototype.slice.call(o[l]);else um(i,o,a);i.length=o.length}else e[n]=t[n]}function dm(e,t,n,r,o,i,a,s){for(var l=Dc(r),u=o.duration,c=o.delay,d=o.additive,p=o.setToFinal,h=!jc(i),f=e.animators,m=[],g=0;g<l.length;g++){var v=l[g],y=r[v];if(null!=y&&null!=n[v]&&(h||i[v]))if(!jc(y)||Cc(y)||zc(y))m.push(v);else{if(t){s||(n[v]=y,e.updateDuringAnimation(t));continue}dm(e,v,n[v],y,o,i&&i[v],a,s)}else s||(n[v]=y,e.updateDuringAnimation(t),m.push(v))}var x=m.length;if(!d&&x)for(var _=0;_<f.length;_++){if((T=f[_]).targetName===t)if(T.stopTracks(m)){var b=Sc(f,T);f.splice(b,1)}}if(o.force||(m=Ac(m,(function(e){return t=r[e],o=n[e],!(t===o||Cc(t)&&Cc(o)&&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,o));var t,o})),x=m.length),x>0||o.force&&!a.length){var T,S=void 0,w=void 0,C=void 0;if(s){w={},p&&(S={});for(_=0;_<x;_++){w[v=m[_]]=n[v],p?S[v]=r[v]:n[v]=r[v]}}else if(p){C={};for(_=0;_<x;_++){C[v=m[_]]=tf(n[v]),cm(n,r,v)}}(T=new uf(n,!1,!1,d?Ac(f,(function(e){return e.targetName===t})):null)).targetName=t,o.scope&&(T.scope=o.scope),p&&S&&T.whenWithKeys(0,S,m),C&&T.whenWithKeys(0,C,m),T.whenWithKeys(null==u?500:u,s?w:r,m).delay(c||0),e.addAnimator(T,t),a.push(T)}}wc(sm,Cd),wc(sm,Vf);var pm=sm,hm=function(e){function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return M(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=Sc(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Sc(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 o=n[r];e.call(t,o,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],o=e.call(t,r);r.isGroup&&!o&&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 pp(0,0,0,0),n=e||this._children,r=[],o=null,i=0;i<n.length;i++){var a=n[i];if(!a.ignore&&!a.invisible){var s=a.getBoundingRect(),l=a.getLocalTransform(r);l?(pp.applyTransform(t,s,l),(o=o||t.clone()).union(t)):(o=o||s.clone()).union(s)}}return o||t},t}(pm);hm.prototype.type="group";var fm=hm,mm={},gm={};
|
|
2
2
|
/*!
|
|
3
3
|
* ZRender, a high performance 2d drawing library.
|
|
4
4
|
*
|