diff --git a/assets/AddOutlined-8af8d4fb.js b/assets/AddOutlined-3054a82a.js similarity index 70% rename from assets/AddOutlined-8af8d4fb.js rename to assets/AddOutlined-3054a82a.js index 058b19de..2caa0586 100644 --- a/assets/AddOutlined-8af8d4fb.js +++ b/assets/AddOutlined-3054a82a.js @@ -1 +1 @@ -import{i as t,d as i,j as g,D as u}from"./index-d327daed.js";import{B as f}from"./DeleteOutlineOutlined-a3ecc7e6.js";import{r as m,i as h}from"./createSvgIcon-e48ef86e.js";import{j as b}from"./reactDnd-f9e32f58.js";const R=t("div",{target:"e1m1j6jk11"})("overflow-x:hidden;border-radius:3px;background:",({theme:e})=>e.background,";color:",({theme:e})=>e.contrast,";width:100%;height:100%;overflow-y:auto;display:flex;flex:1;flex-direction:column;height:100%;align-items:center;.cont{max-width:1440px;padding:10px;margin:10px;width:100%;background:",({theme:e})=>e.shadow,";display:flex;flex-direction:column;flex:1;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;display:flex;margin:10px;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;color:",({theme:e})=>e.contrast,";}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;color:",({theme:e})=>e.contrast,";.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:e})=>e.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:e})=>e.background,";}}.plugins-cont{display:flex;flex:1;margin:0px 10px;flex-direction:column;padding:10px 20px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;height:fit-content;.title{font-size:14px;padding:10px 0px;}}"),y=t("div",{target:"e1m1j6jk10"})("color:",({theme:e})=>e.contrast,";display:flex;align-items:center;font-size:12px;padding:0px 10px;white-space:nowrap;",e=>e.width!==null?`width:${e.width}px;`:""," border-radius:3px 0px 0px 3px;display:flex;align-items:center;height:28px;"),j=t("input",{target:"e1m1j6jk9"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",e=>e.error?"#b62c14":e.theme.accentNeutral,";border-radius:3px;justify-self:flex-end;height:26px;padding-left:8px;"),T=t("textarea",{target:"e1m1j6jk8"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;justify-self:flex-end;padding-left:8px;"),w=t("div",{target:"e1m1j6jk7"})("display:flex;flex-direction:row;margin-top:5px;align-items:center;",e=>e!=null&&e.width&&(e==null?void 0:e.width)==="normal"?"":"flex:1;","select{background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;font-size:12px;height:30px;display:flex;align-items:center;padding:1px 2px 1px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;option{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"),E=t("div",{target:"e1m1j6jk6"})({name:"1uek1ww",styles:"display:flex;margin:15px 0px;margin-left:14px;flex-wrap:wrap;align-items:center;flex:1;&.internal{max-width:400px;}"}),L=t("div",{target:"e1m1j6jk4"})({name:"e23o9g",styles:"padding:10px"}),P=t("div",{target:"e1m1j6jk3"})("margin:10px 0px;padding-bottom:10px;border-bottom:1px solid ",({theme:e})=>e.background,";"),q=t("div",{target:"e1m1j6jk2"})("padding:10px;border-bottom:1px solid ",({theme:e})=>e.shadow,";border-radius:3px;display:flex;flex:1;align-items:center;justify-content:space-between;.edit-buttons{display:flex;align-items:center;&:disabled{display:none;}}"),B=t("div",{target:"e1m1j6jk1"})("background:",({theme:e})=>e.deep,";padding:10px;border-radius:0px 0px 3px 3px;border-top:1px solid ",({theme:e})=>e.accentNeutral,";"),F=t(f,{target:"e1m1j6jk0"})("background:",e=>e.primary?e.theme.primary:e.theme.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";color:",e=>e.primary?e.theme.maxContrast:e.theme.contrast,";margin-left:5px;transition:0.25s all;justify-content:center;padding:3px 12px;height:28px;display:flex;&:hover{background:",({theme:e})=>e.primaryLight,";color:",e=>e.primary?e.theme.contrast:e.theme.maxContrast,";}&:disabled{background:",({theme:e})=>e.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";cursor:not-allowed;color:",({theme:e})=>e.contrast,";}@media screen and (max-width: 1070px){display:flex;margin:0;}"),v="/assets/metrics_icon-9cba0731.png",n="/assets/logs_icon-972f9506.png",k="/assets/traces_icon-a9ed0318.png",_={metrics_icon:v,logs_icon:n,traces_icon:k},M=({icon:e,style:a})=>i("img",{height:"40px",className:"logo",style:a,src:_[e]||n,alt:e}),G=e=>{const{value:a,label:d,onChange:o,locked:l,type:s,placeholder:p,error:x,labelWidth:c}=e;return g(w,{children:[i(y,{width:c||null,children:d}),i(j,{className:"ds-input",disabled:l,error:x||!1,onChange:o,type:s,value:u.sanitize(a),placeholder:p})]})},H=e=>a=>{a({type:"SET_DATA_SOURCES",dataSources:e})};var r={},S=h;Object.defineProperty(r,"__esModule",{value:!0});var N=r.default=void 0,C=S(m()),D=b;N=r.default=(0,C.default)((0,D.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined");export{F as D,G as F,w as I,y as L,R as P,q as S,T,E as a,P as b,L as c,N as d,M as e,B as f,H as s}; +import{i as t,d as r,j as g,D as u}from"./index-a5171272.js";import{B as m}from"./DeleteOutlineOutlined-7018ca68.js";import{r as f,i as h}from"./createSvgIcon-7f30e35c.js";import{j as b}from"./reactDnd-8591509b.js";const O=t("div",{target:"e1m1j6jk11"})("overflow-x:hidden;border-radius:3px;background:",({theme:e})=>e.background,";color:",({theme:e})=>e.contrast,";width:100%;height:100%;overflow-y:auto;display:flex;flex:1;flex-direction:column;height:100%;align-items:center;.cont{max-width:1440px;padding:10px;margin:10px;width:100%;background:",({theme:e})=>e.shadow,";display:flex;flex-direction:column;flex:1;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;display:flex;margin:10px;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;color:",({theme:e})=>e.contrast,";}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;color:",({theme:e})=>e.contrast,";.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:e})=>e.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:e})=>e.background,";}}.plugins-cont{display:flex;flex:1;margin:0px 10px;flex-direction:column;padding:10px 20px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;height:fit-content;.title{font-size:14px;padding:10px 0px;}}"),y=t("div",{target:"e1m1j6jk10"})("color:",({theme:e})=>e.contrast,";display:flex;align-items:center;font-size:12px;padding:0px 10px;white-space:nowrap;",e=>e.width!==null?`width:${e.width}px;`:""," border-radius:3px 0px 0px 3px;display:flex;align-items:center;height:28px;"),w=t("input",{target:"e1m1j6jk9"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",e=>e.error?"#b62c14":e.theme.accentNeutral,";border-radius:3px;justify-self:flex-end;height:26px;padding-left:8px;"),T=t("textarea",{target:"e1m1j6jk8"})("display:flex;flex:1;background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;justify-self:flex-end;padding-left:8px;"),j=t("div",{target:"e1m1j6jk7"})("display:flex;flex-direction:row;margin-top:5px;align-items:center;",e=>e!=null&&e.width&&(e==null?void 0:e.width)==="normal"?"":"flex:1;","select{background:",({theme:e})=>e.deep,";color:",({theme:e})=>e.contrast,";border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;font-size:12px;height:30px;display:flex;align-items:center;padding:1px 2px 1px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;option{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"),E=t("div",{target:"e1m1j6jk6"})({name:"1uek1ww",styles:"display:flex;margin:15px 0px;margin-left:14px;flex-wrap:wrap;align-items:center;flex:1;&.internal{max-width:400px;}"}),P=t("div",{target:"e1m1j6jk4"})({name:"e23o9g",styles:"padding:10px"}),U=t("div",{target:"e1m1j6jk3"})("margin:10px 0px;padding-bottom:10px;border-bottom:1px solid ",({theme:e})=>e.background,";"),q=t("div",{target:"e1m1j6jk2"})("padding:10px;border-bottom:1px solid ",({theme:e})=>e.shadow,";border-radius:3px;display:flex;flex:1;align-items:center;justify-content:space-between;.edit-buttons{display:flex;align-items:center;&:disabled{display:none;}}"),B=t("div",{target:"e1m1j6jk1"})("background:",({theme:e})=>e.deep,";padding:10px;border-radius:0px 0px 3px 3px;border-top:1px solid ",({theme:e})=>e.accentNeutral,";"),F=t(m,{target:"e1m1j6jk0"})("background:",e=>e.primary?e.theme.primary:e.theme.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";color:",e=>e.primary?e.theme.maxContrast:e.theme.contrast,";margin-left:5px;transition:0.25s all;justify-content:center;padding:3px 12px;height:28px;display:flex;&:hover{background:",({theme:e})=>e.primaryLight,";color:",e=>e.primary?e.theme.contrast:e.theme.maxContrast,";}&:disabled{background:",({theme:e})=>e.neutral,";border:1px solid ",({theme:e})=>e.accentNeutral,";cursor:not-allowed;color:",({theme:e})=>e.contrast,";}@media screen and (max-width: 1070px){display:flex;margin:0;}"),v=""+new URL("metrics_icon-9cba0731.png",import.meta.url).href,n=""+new URL("logs_icon-972f9506.png",import.meta.url).href,k=""+new URL("traces_icon-a9ed0318.png",import.meta.url).href,_={metrics_icon:v,logs_icon:n,traces_icon:k},M=({icon:e,style:a})=>r("img",{height:"40px",className:"logo",style:a,src:_[e]||n,alt:e}),G=e=>{const{value:a,label:o,onChange:d,locked:l,type:s,placeholder:p,error:x,labelWidth:c}=e;return g(j,{children:[r(y,{width:c||null,children:o}),r(w,{className:"ds-input",disabled:l,error:x||!1,onChange:d,type:s,value:u.sanitize(a),placeholder:p})]})},H=e=>a=>{a({type:"SET_DATA_SOURCES",dataSources:e})};var i={},S=h;Object.defineProperty(i,"__esModule",{value:!0});var N=i.default=void 0,C=S(f()),D=b,I=(0,C.default)((0,D.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined");N=i.default=I;export{F as D,G as F,j as I,y as L,O as P,q as S,T,E as a,U as b,P as c,N as d,M as e,B as f,H as s}; diff --git a/assets/App-dabd8c76.js b/assets/App-dabd8c76.js new file mode 100644 index 00000000..bb8a6644 --- /dev/null +++ b/assets/App-dabd8c76.js @@ -0,0 +1 @@ +import{s as P,a as Q,u as Y,c as J,b as X,l as Z,j as p,d as a,e as L,f as C,F as O,g as T,h as E,N as ee}from"./index-a5171272.js";import{g as te,d as re,M as m,s as ae,a as A,n as I,T as ie,B as oe,b as ne,F as se,c as le,e as ce,P as de,S as pe}from"./consts-ac722d48.js";import{r as x,R as ue}from"./react-432945ee.js";import{r as b,i as $}from"./createSvgIcon-7f30e35c.js";import{j as f}from"./reactDnd-8591509b.js";import{a as h,d as he,m as V,q as R,u as y,L as _,O as fe}from"./vendor-7c97820b.js";import"./reactSelect-eafcd993.js";import"./memoize-acaceb73.js";import"./PluginManagerFactory-e77efc4b.js";import"./DeleteOutlineOutlined-7018ca68.js";const ve=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],ge=e=>{const{absolute:t,children:r,classes:o,flexItem:l,light:s,orientation:d,textAlign:c,variant:i}=e;return X({root:["root",t&&"absolute",i,s&&"light",d==="vertical"&&"vertical",l&&"flexItem",r&&"withChildren",r&&d==="vertical"&&"withChildrenVertical",c==="right"&&d!=="vertical"&&"textAlignRight",c==="left"&&d!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",d==="vertical"&&"wrapperVertical"]},te,o)},me=P("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>h({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Q(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>h({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>h({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>h({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>h({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),xe=P("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>h({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),B=x.forwardRef(function(t,r){const o=Y({props:t,name:"MuiDivider"}),{absolute:l=!1,children:s,className:d,component:c=s?"div":"hr",flexItem:i=!1,light:v=!1,orientation:g="horizontal",role:u=c!=="hr"?"separator":void 0,textAlign:S="center",variant:n="fullWidth"}=o,K=he(o,ve),w=h({},o,{absolute:l,component:c,flexItem:i,light:v,orientation:g,role:u,textAlign:S,variant:n}),j=ge(w);return f.jsx(me,h({as:c,className:J(j.root,d),role:u,ref:r,ownerState:w},K,{children:s?f.jsx(xe,{className:j.wrapper,ownerState:w,children:s}):null}))});B.muiSkipListHighlight=!0;const H=B;var N={},be=$;Object.defineProperty(N,"__esModule",{value:!0});var U=N.default=void 0,$e=be(b()),_e=f,Se=(0,$e.default)((0,_e.jsx)("path",{d:"M19.3 16.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2 1.4-1.4-3.2-3.2zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07c-.64-2.46-2.4-4.47-4.73-5.41V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8z"}),"TravelExplore");U=N.default=Se;var M={},we=$;Object.defineProperty(M,"__esModule",{value:!0});var q=M.default=void 0,ye=we(b()),Ce=f,Re=(0,ye.default)((0,Ce.jsx)("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"}),"Extension");q=M.default=Re;var z={},Ne=$;Object.defineProperty(z,"__esModule",{value:!0});var W=z.default=void 0,Me=Ne(b()),ze=f,De=(0,Me.default)((0,ze.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineOutlined");W=z.default=De;var D={},ke=$;Object.defineProperty(D,"__esModule",{value:!0});var F=D.default=void 0,je=ke(b()),Le=f,Ae=(0,je.default)((0,Le.jsx)("path",{d:"M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"}),"Storage");F=D.default=Ae;function Ie(e){const{c:t}=e,r=V(),o=Z(),{hash:l}=R(),s="Link Copied To Clipboard";function d(){r(ae(!0)),setTimeout(()=>{var c;if(navigator!=null&&navigator.clipboard&&window.isSecureContext)(c=navigator==null?void 0:navigator.clipboard)==null||c.writeText(window.location.href).then(function(){const i=o.add(l,{data:{href:window.location.href},description:"From Shared URL"},10);r(A(i)),r(L({type:I.success,message:s}))},function(i){console.log("error on copy",i)});else{let i=document.createElement("textarea");return i.value=window.location.href,i.style.position="fixed",i.style.left="-999999px",i.style.top="-999999px",document.body.appendChild(i),i.focus(),i.select(),new Promise((v,g)=>{const u=o.add(l,{data:window.location.href,description:"From Shared URL"},10);r(A(u)),document.execCommand("copy")?v():g(),i.remove(),r(L({type:I.success,message:s}))})}},200)}return p(m,{onClick:d,disabled:!1,style:{fontSize:"12px"},children:[" ",a(re,{fontSize:"small",className:t}),a("span",{children:"Copy Link"})]})}var k={},He=$;Object.defineProperty(k,"__esModule",{value:!0});var G=k.default=void 0,Pe=He(b()),Oe=f,Te=(0,Pe.default)((0,Oe.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");G=k.default=Te;const Ee=e=>({color:`${e.contrast}`,overflow:"visible",fontSize:"12px",background:`${e.shadow}`,border:`1px solid ${e.accentNeutral}`,mt:1.5,"& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,borderLeft:`1px solid ${e.accentNeutral}`,borderTop:`1px solid ${e.accentNeutral}`,bgcolor:`${e.shadow}`,transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .icon":{fontSize:"16px",marginRight:"4px",color:`${e.contrast}`},"& .item":{fontSize:"12px",color:`${e.contrast}`}}),Ve=e=>({display:"flex",justifyContent:"center",alignItems:"center",marginLeft:2,paddingLeft:0,cursor:"pointer",paddingRight:0,width:"30px",height:"30px",background:"none",borderRadius:"3px",color:`${e.accentNeutral}`,border:`1px solid ${e.accentNeutral}`});function Be(){const{key:e}=R(),t=y(n=>n.showDataSourceSetting),r=y(n=>n.currentUser.role),o=V(),l=C(),[s,d]=ue.useState(null),c=x.useMemo(()=>!!s,[s]),[i,v]=x.useState(r||"superAdmin");x.useEffect(()=>{v(r)},[r]),x.useEffect(()=>{u()},[e]);const g=n=>{n.stopPropagation(),n.preventDefault(),d(()=>n.currentTarget)},u=n=>{n==null||n.stopPropagation(),n==null||n.preventDefault(),d(()=>{})},S=()=>{u(),o(ce(!0))};return p(O,{children:[a(oe,{sx:{display:"flex",alignItems:"center",textAlign:"center"},children:a(ie,{title:"Settings",children:a("button",{onClick:g,style:Ve(l),"aria-controls":c?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":c?"true":void 0,children:a(G,{style:{width:"14px",height:"14px"}})})})}),p(ne,{id:"account-menu",anchorEl:s,open:c,onClose:u,onClick:g,PaperProps:{elevation:0,sx:Ee(l)},TransitionComponent:se,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[a(Ie,{c:"icon"}),a(H,{}),p(m,{onClick:S,className:"item",children:[a(le,{className:"icon"})," General Settings"]}),a(H,{}),a(_,{to:"",children:p(m,{className:"item",children:[a(U,{className:"icon"}),"Search"]})}),a(_,{to:"/plugins",children:p(m,{className:"item",children:[a(q,{className:"icon"}),"Plugins"]})}),a(_,{to:"/users",children:p(m,{className:"item",children:[a(W,{className:"icon"}),"Users"]})}),t&&(i==="admin"||i==="superAdmin")&&a(_,{to:"datasources",children:p(m,{className:"item",children:[a(F,{className:"icon"}),"Datasources"]})})]})]})}const Ue=""+new URL("qryn-logo-cd0b42d9.png",import.meta.url).href,qe=()=>{const r=R().pathname.split("/").map((o,l)=>o===""&&l===0?{name:"home",link:""}:{name:`/${o}`,link:o});return a(O,{children:r.map(({name:o,link:l},s)=>a("a",{href:l,className:"bread-link",children:o},s))})},We=e=>E("background:",e.shadow,";height:30px;padding:4px;display:flex;align-items:center;border-bottom:1px solid ",e.accentNeutral,";.logo-section{margin:0;.version{color:",e.contrast,";font-size:10px;margin-left:5px;}.path{color:",e.contrast,";margin-left:20px;flex:1;font-weight:bold;text-transform:uppercase;font-size:11px;letter-spacing:1px;.bread-link{cursor:pointer;&:hover{color:",e.primary,";}}}}",""),Fe=()=>{const e=C();return p("div",{className:T(We(e)),children:[p("div",{className:"logo-section",children:[a("img",{src:Ue,alt:"Qryn View",height:"24px",className:"logo"}),a("p",{className:"version",children:"0.28.8"}),a("p",{className:"path",children:a(qe,{})})]}),a(de,{section:"Status Bar",localProps:e}),a(Be,{})]})},Ge=e=>E("background:",e.background,";display:flex;flex-direction:column;height:100vh;flex:1;","");function it(){const e=C(),t=y(r=>r.settingsDialogOpen);return p("div",{className:T(Ge(e)),children:[a(Fe,{}),a(fe,{}),a(ee,{}),a(pe,{open:t})]})}export{Ge as MainAppStyles,it as default}; diff --git a/assets/App-e128c5b2.js b/assets/App-e128c5b2.js deleted file mode 100644 index e2a0e9b3..00000000 --- a/assets/App-e128c5b2.js +++ /dev/null @@ -1 +0,0 @@ -import{s as O,a as Q,u as Y,c as J,b as X,l as Z,j as p,d as i,e as z,f as C,F as T,g as H,h as E,N as ee}from"./index-d327daed.js";import{g as te,d as re,M as m,s as ie,a as A,n as I,T as ae,B as oe,b as ne,F as se,c as le,e as ce,P as de,S as pe}from"./consts-2711a1cd.js";import{r as x,R as ue}from"./react-432945ee.js";import{r as b,i as S}from"./createSvgIcon-e48ef86e.js";import{j as f}from"./reactDnd-f9e32f58.js";import{a as h,d as he,m as V,q as N,u as y,L as $,O as fe}from"./vendor-ebc92242.js";import"./reactSelect-cb3a1fff.js";import"./memoize-acaceb73.js";import"./PluginManagerFactory-cfe56166.js";import"./DeleteOutlineOutlined-a3ecc7e6.js";const ge=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],ve=e=>{const{absolute:t,children:r,classes:o,flexItem:l,light:s,orientation:d,textAlign:c,variant:a}=e;return X({root:["root",t&&"absolute",a,s&&"light",d==="vertical"&&"vertical",l&&"flexItem",r&&"withChildren",r&&d==="vertical"&&"withChildrenVertical",c==="right"&&d!=="vertical"&&"textAlignRight",c==="left"&&d!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",d==="vertical"&&"wrapperVertical"]},te,o)},me=O("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>h({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Q(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>h({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>h({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>h({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>h({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),xe=O("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>h({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),B=x.forwardRef(function(t,r){const o=Y({props:t,name:"MuiDivider"}),{absolute:l=!1,children:s,className:d,component:c=s?"div":"hr",flexItem:a=!1,light:g=!1,orientation:v="horizontal",role:u=c!=="hr"?"separator":void 0,textAlign:_="center",variant:n="fullWidth"}=o,K=he(o,ge),w=h({},o,{absolute:l,component:c,flexItem:a,light:g,orientation:v,role:u,textAlign:_,variant:n}),L=ve(w);return f.jsx(me,h({as:c,className:J(L.root,d),role:u,ref:r,ownerState:w},K,{children:s?f.jsx(xe,{className:L.wrapper,ownerState:w,children:s}):null}))});B.muiSkipListHighlight=!0;const P=B;var R={},be=S;Object.defineProperty(R,"__esModule",{value:!0});var U=R.default=void 0,Se=be(b()),$e=f;U=R.default=(0,Se.default)((0,$e.jsx)("path",{d:"M19.3 16.9c.4-.7.7-1.5.7-2.4 0-2.5-2-4.5-4.5-4.5S11 12 11 14.5s2 4.5 4.5 4.5c.9 0 1.7-.3 2.4-.7l3.2 3.2 1.4-1.4zm-3.8.1c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5M12 20v2C6.48 22 2 17.52 2 12S6.48 2 12 2c4.84 0 8.87 3.44 9.8 8h-2.07c-.64-2.46-2.4-4.47-4.73-5.41V5c0 1.1-.9 2-2 2h-2v2c0 .55-.45 1-1 1H8v2h2v3H9l-4.79-4.79C4.08 10.79 4 11.38 4 12c0 4.41 3.59 8 8 8"}),"TravelExplore");var M={},_e=S;Object.defineProperty(M,"__esModule",{value:!0});var q=M.default=void 0,we=_e(b()),ye=f;q=M.default=(0,we.default)((0,ye.jsx)("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11"}),"Extension");var D={},Ce=S;Object.defineProperty(D,"__esModule",{value:!0});var W=D.default=void 0,Ne=Ce(b()),Re=f;W=D.default=(0,Ne.default)((0,Re.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutlineOutlined");var k={},Me=S;Object.defineProperty(k,"__esModule",{value:!0});var F=k.default=void 0,De=Me(b()),ke=f;F=k.default=(0,De.default)((0,ke.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage");function je(e){const{c:t}=e,r=V(),o=Z(),{hash:l}=N(),s="Link Copied To Clipboard";function d(){r(ie(!0)),setTimeout(()=>{var c;if(navigator!=null&&navigator.clipboard&&window.isSecureContext)(c=navigator==null?void 0:navigator.clipboard)==null||c.writeText(window.location.href).then(function(){const a=o.add(l,{data:{href:window.location.href},description:"From Shared URL"},10);r(A(a)),r(z({type:I.success,message:s}))},function(a){console.log("error on copy",a)});else{let a=document.createElement("textarea");return a.value=window.location.href,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",document.body.appendChild(a),a.focus(),a.select(),new Promise((g,v)=>{const u=o.add(l,{data:window.location.href,description:"From Shared URL"},10);r(A(u)),document.execCommand("copy")?g():v(),a.remove(),r(z({type:I.success,message:s}))})}},200)}return p(m,{onClick:d,disabled:!1,style:{fontSize:"12px"},children:[" ",i(re,{fontSize:"small",className:t}),i("span",{children:"Copy Link"})]})}var j={},Le=S;Object.defineProperty(j,"__esModule",{value:!0});var G=j.default=void 0,ze=Le(b()),Ae=f;G=j.default=(0,ze.default)((0,Ae.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu");const Ie=e=>({color:`${e.contrast}`,overflow:"visible",fontSize:"12px",background:`${e.shadow}`,border:`1px solid ${e.accentNeutral}`,mt:1.5,"& .MuiAvatar-root":{width:32,height:32,ml:-.5,mr:1},"&:before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,borderLeft:`1px solid ${e.accentNeutral}`,borderTop:`1px solid ${e.accentNeutral}`,bgcolor:`${e.shadow}`,transform:"translateY(-50%) rotate(45deg)",zIndex:0},"& .icon":{fontSize:"16px",marginRight:"4px",color:`${e.contrast}`},"& .item":{fontSize:"12px",color:`${e.contrast}`}}),Pe=e=>({display:"flex",justifyContent:"center",alignItems:"center",marginLeft:2,paddingLeft:0,cursor:"pointer",paddingRight:0,width:"30px",height:"30px",background:"none",borderRadius:"3px",color:`${e.accentNeutral}`,border:`1px solid ${e.accentNeutral}`});function Oe(){const{key:e}=N(),t=y(n=>n.showDataSourceSetting),r=y(n=>n.currentUser.role),o=V(),l=C(),[s,d]=ue.useState(null),c=x.useMemo(()=>!!s,[s]),[a,g]=x.useState(r||"superAdmin");x.useEffect(()=>{g(r)},[r]),x.useEffect(()=>{u()},[e]);const v=n=>{n.stopPropagation(),n.preventDefault(),d(()=>n.currentTarget)},u=n=>{n==null||n.stopPropagation(),n==null||n.preventDefault(),d(()=>{})},_=()=>{u(),o(ce(!0))};return p(T,{children:[i(oe,{sx:{display:"flex",alignItems:"center",textAlign:"center"},children:i(ae,{title:"Settings",children:i("button",{onClick:v,style:Pe(l),"aria-controls":c?"account-menu":void 0,"aria-haspopup":"true","aria-expanded":c?"true":void 0,children:i(G,{style:{width:"14px",height:"14px"}})})})}),p(ne,{id:"account-menu",anchorEl:s,open:c,onClose:u,onClick:v,PaperProps:{elevation:0,sx:Ie(l)},TransitionComponent:se,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},children:[i(je,{c:"icon"}),i(P,{}),p(m,{onClick:_,className:"item",children:[i(le,{className:"icon"})," General Settings"]}),i(P,{}),i($,{to:"/",children:p(m,{className:"item",children:[i(U,{className:"icon"}),"Search"]})}),i($,{to:"/plugins",children:p(m,{className:"item",children:[i(q,{className:"icon"}),"Plugins"]})}),i($,{to:"/users",children:p(m,{className:"item",children:[i(W,{className:"icon"}),"Users"]})}),t&&(a==="admin"||a==="superAdmin")&&i($,{to:"datasources",children:p(m,{className:"item",children:[i(F,{className:"icon"}),"Datasources"]})})]})]})}const Te="/assets/qryn-logo-cd0b42d9.png",He=()=>{const r=N().pathname.split("/").map((o,l)=>o===""&&l===0?{name:"home",link:"/"}:{name:`/${o}`,link:o});return i(T,{children:r.map(({name:o,link:l},s)=>i("a",{href:l,className:"bread-link",children:o},s))})},Ee=e=>E("background:",e.shadow,";height:30px;padding:4px;display:flex;align-items:center;border-bottom:1px solid ",e.accentNeutral,";.logo-section{margin:0;.version{color:",e.contrast,";font-size:10px;margin-left:5px;}.path{color:",e.contrast,";margin-left:20px;flex:1;font-weight:bold;text-transform:uppercase;font-size:11px;letter-spacing:1px;.bread-link{cursor:pointer;&:hover{color:",e.primary,";}}}}",""),Ve=()=>{const e=C();return p("div",{className:H(Ee(e)),children:[p("div",{className:"logo-section",children:[i("img",{src:Te,alt:"Qryn View",height:"24px",className:"logo"}),i("p",{className:"version",children:"0.28.2"}),i("p",{className:"path",children:i(He,{})})]}),i(de,{section:"Status Bar",localProps:e}),i(Oe,{})]})},Be=e=>E("background:",e.background,";display:flex;flex-direction:column;height:100vh;flex:1;","");function Ze(){const e=C(),t=y(r=>r.settingsDialogOpen);return p("div",{className:H(Be(e)),children:[i(Ve,{}),i(fe,{}),i(ee,{}),i(pe,{open:t})]})}export{Be as MainAppStyles,Ze as default}; diff --git a/assets/DataSources-146f4c09.js b/assets/DataSources-146f4c09.js new file mode 100644 index 00000000..cd20f54f --- /dev/null +++ b/assets/DataSources-146f4c09.js @@ -0,0 +1 @@ +var de=Object.defineProperty;var ue=(t,a,s)=>a in t?de(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;var I=(t,a,s)=>(ue(t,typeof a!="symbol"?a+"":a,s),s);import{d as e,j as h,g as J,D as w,h as T,F as P,f as $,Q as he,i as pe,e as fe}from"./index-a5171272.js";import{r as O}from"./react-432945ee.js";import{m as _,u as A,n as Z,r as ge,L as me,s as Se,v as ve,w as ye,p as xe,R as Ce}from"./vendor-7c97820b.js";import{D as ke,L as U,I as H,d as we,S as Ne,a as E,F,s as z,b as be,c as V,T as Oe,e as ee,f as De,P as Le}from"./AddOutlined-3054a82a.js";import{d as te,s as ze}from"./DeleteOutlineOutlined-7018ca68.js";import{S as M,r as B,i as Q}from"./createSvgIcon-7f30e35c.js";import{j as G}from"./reactDnd-8591509b.js";import{b as ae}from"./reactSelect-eafcd993.js";import"./memoize-acaceb73.js";const j=t=>{const{value:a,onClick:s,primary:c,title:l}=t;return e(ke,{title:l,onClick:s,primary:c,children:a})},Ae=t=>T("display:flex;flex:",t?1:0,";",""),ne=({value:t,locked:a,onChange:s,opts:c,label:l,labelWidth:f,name:S,fullWidth:C,width:v})=>{const[y,x]=O.useState(""),N=O.useRef(null),k=O.useMemo(()=>typeof c[0]=="string"?c.map(u=>({value:u,name:u})):c,[c]);return O.useEffect(()=>{var m,n;const u=(m=k==null?void 0:k.find(r=>r.name===t))==null?void 0:m.value;u&&((n=N==null?void 0:N.current)==null?void 0:n.value)!==u&&(x(u),N.current.value=u)},[t]),h(H,{width:v,children:[(l==null?void 0:l.length)>0&&e(U,{width:f||null,children:l}),e("select",{ref:N,className:J(Ae(C)),disabled:a,defaultValue:w.sanitize(y),onChange:u=>s(u,S),children:k==null?void 0:k.map((u,m)=>e("option",{value:w.sanitize(u.value),children:u.name},m))})]})},se=t=>{const{value:a,onChange:s,locked:c,label:l}=t;return h(H,{children:[e(U,{children:l}),e(M,{disabled:c,size:"small",checked:a,onChange:s})]})};var W={},Ie=Q;Object.defineProperty(W,"__esModule",{value:!0});var ie=W.default=void 0,Je=Ie(B()),Fe=G,Te=(0,Je.default)((0,Fe.jsx)("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"}),"CachedOutlined");ie=W.default=Te;var K={},_e=Q;Object.defineProperty(K,"__esModule",{value:!0});var re=K.default=void 0,Ee=_e(B()),Re=G,je=(0,Ee.default)((0,Re.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");re=K.default=je;const le=t=>a=>{a({type:"SET_IS_DATASOURCE_SAVED",isDsSaved:t})};var X={},Pe=Q;Object.defineProperty(X,"__esModule",{value:!0});var oe=X.default=void 0,$e=Pe(B()),Me=G,Ue=(0,$e.default)((0,Me.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");oe=X.default=Ue;const ce=T({name:"vtwnvy",styles:"height:12px!important;width:12px!important;color:white;margin:0px 4px"}),He=t=>T("display:flex;align-items:center;background:",t.primary,";color:white;font-size:11px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}",""),qe=T({name:"1t9g6tg",styles:"display:flex;align-items:center;background:#b62c14;color:white;font-size:12px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}"}),Ve=T({name:"9hkg7e",styles:"display:flex;align-items:center;font-size:12px;&.loading-icon{height:14px;width:14px;}"}),Be=({setIsSaved:t})=>{const a=$();return h("div",{className:J(He(a)),onClick:s=>t(!1),children:[e(re,{className:J(ce)})," ",e("span",{children:"Saved"})]})},Y=({errorText:t})=>h("div",{className:J(qe),children:[e(oe,{className:J(ce)})," ",e("span",{children:t})]});function q(t){const{onClickAdd:a,isAdd:s,title:c,isEditing:l,fieldErrors:f}=t,S=_(),[C,v]=O.useState(!1);return O.useEffect(()=>(l&&(setTimeout(()=>{v(!0),S(le(!0))},800),v(!1)),v(!1),()=>{v(!1)}),[l]),h(Ne,{children:[c,h("div",{className:"edit-buttons",children:[l&&h("div",{className:Ve,children:[e(ie,{style:{height:"13px",width:"13px"}})," ","Saving ..."]}),(f==null?void 0:f.protocol)&&e(Y,{errorText:"Insecure Mixed Content. Mixing HTTP and HTTPS is insecure and is not supported."}),(f==null?void 0:f.url)&&e(Y,{errorText:"Please complete API URL"}),C&&e(Be,{setIsSaved:v}),s&&e(P,{children:e(we,{fontSize:"small",style:{cursor:"pointer",display:"flex"},onClick:a})})]})]})}const Qe=t=>{const a=_(),s=A(u=>u.dataSources),[c,l]=O.useState(!1),{headers:f,id:S}=t,[C,v]=O.useState((t==null?void 0:t.cors)||!1),y=u=>{const m=u.target.checked,n=s.map(r=>(r.id===S&&(r.cors=m),r));v(()=>m),localStorage.setItem("dataSources",JSON.stringify(n)),a(z(n))},x=(u,m,n)=>{l(()=>!0);const r=u.target.value,g=(s.find(p=>p.id===S).headers||[]).map(p=>(p.id===m&&(p[n]=r),p)),o=s.map(p=>(p.id===S&&(p.headers=[...g]),p));localStorage.setItem("dataSources",JSON.stringify(o)),a(z(o)),setTimeout(()=>{l(()=>!1)},800)},N=u=>{u.preventDefault();const m=s==null?void 0:s.find(i=>i.id===S),n=m.headers,r=JSON.parse(JSON.stringify([...s]));if(f.length>0){const i={...n[n.length-1],id:Z()},d={...m,headers:[...m.headers,i]},g=r==null?void 0:r.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),a(z(g))}},k=(u,m)=>{const n=s==null?void 0:s.find(o=>o.id===S),i=[...f].filter(o=>o.id!==m),d={...n,headers:[...i]},g=s==null?void 0:s.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),a(z(g))};return e("div",{className:"",children:f&&h(P,{children:[e(q,{title:"Custom HTTP Headers",isEdit:!1,isAdd:!0,isEditing:c,onClickAdd:N}),h(E,{children:[e(U,{children:"Use CORS"})," ",e(M,{size:"small",checked:C,onChange:y})]}),f==null?void 0:f.map((u,m)=>e(E,{children:h(H,{children:[e(F,{label:"header",value:w.sanitize(u.header),onChange:n=>x(n,u.id,"header")}),e(F,{label:"value",value:w.sanitize(u.value),onChange:n=>x(n,u.id,"value")}),e(te,{onClick:n=>k(n,u.id),style:{cursor:"pointer",marginLeft:"10px"},fontSize:"small"})]})},m))]})})};function Ge(t){const a=ge(),s=$(),c=A(y=>y.urlLocation),l=_(),{title:f}=t,S=A(y=>y.isDsSaved),C=O.useMemo(()=>S?"Save":"Back",[S]),v=()=>{let y=(c==null?void 0:c.length)>0;l(le(!1)),a((y||C==="Back")&&f!=="DataSources"?-1:"")};return h("div",{className:"ds-header",children:[e("div",{style:{display:"flex",alignItems:"center"},children:h("div",{style:{display:"flex",flexDirection:"column"},children:[h("div",{style:{display:"flex"},children:[e(he,{}),e("h1",{children:f})]}),h("p",{style:{color:s.contrast,fontSize:"10px",marginTop:"5px",marginLeft:"10px",opacity:".5"},children:["v","0.28.8"]})]})}),e(j,{value:w.sanitize(C),onClick:v,editing:!0,primary:S})]})}const We=t=>{const{id:a,name:s,regex:c,urlLabel:l,internalLink:f,linkType:S,locked:C,dataSourceId:v,fieldEditing:y}=t,x=_(),N=A(i=>i.dataSources),k=O.useMemo(()=>N.map(i=>({name:i.name,value:i.id})),[N]),u=(i,d)=>{y();const g=JSON.parse(JSON.stringify(N)),L=g.find(b=>b.id===v).linkedFields.map(b=>b.id===a?{...b,[i]:d}:b);return g.map(b=>b.id===v?{...b,linkedFields:L}:b)},m=i=>{y();const d=JSON.parse(JSON.stringify(N)),p=d.find(b=>b.id===v).linkedFields.filter(b=>b.id!==a),L=d.map(b=>b.id===v?{...b,linkedFields:[...p]}:b);localStorage.setItem("dataSources",JSON.stringify(L)),x(z(L))},n=(i,d)=>{y();const g=i.target.value,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))},r=(i,d)=>{y();const g=!!i.target.checked,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))};return h(be,{children:[h(E,{children:[e(F,{value:w.sanitize(s),label:"Name",onChange:i=>n(i,"name")}),e(F,{value:w.sanitize(c),label:"Regex",onChange:i=>n(i,"regex")}),e(F,{value:w.sanitize(l),label:"URL Label",onChange:i=>n(i,"urlLabel")}),e(te,{onClick:m,fontSize:"small",style:{marginLeft:"10px",cursor:"pointer",display:C?"none":"inline-block"}})]}),h(E,{className:"internal",children:[e(se,{value:f,label:"Internal Link",onChange:i=>r(i,"internalLink")}),e(ne,{label:"",value:w.sanitize(S),opts:k,selectType:"linkedField",onChange:i=>n(i,"linkID")})]})]})};class Ke{constructor(){I(this,"id");I(this,"dataSource");I(this,"ds_id");I(this,"name");I(this,"regex");I(this,"query");I(this,"urlLabel");I(this,"url");I(this,"internalLink");I(this,"linkType");this.id=Z(),this.dataSource="Logs",this.ds_id="logs",this.name="traceID",this.regex='^.*?"traceID" ="(w+)".*$/',this.query="${__value.raw}",this.urlLabel="",this.url="",this.internalLink=!0,this.linkType="Traces"}create(){const{id:a,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}=this;return{id:a,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}}}const Xe=t=>{const{linkedFields:a,name:s,id:c}=t,l=A(x=>x.dataSources),f=_(),[S,C]=O.useState(!1),v=()=>{const x=new Ke;x.dataSource=s,x.create();const k=[...JSON.parse(JSON.stringify(a)),{...x}],u=JSON.parse(JSON.stringify(l)),m=u==null?void 0:u.map(n=>n.id===c?{...n,linkedFields:k}:n);localStorage.setItem("dataSources",JSON.stringify(m)),f(z(m))},y=()=>{C(()=>!0),setTimeout(()=>{C(()=>!1)},800)};return(a==null?void 0:a.length)>0?h(P,{children:[e(q,{title:"Linked Fields",isEdit:!0,isAdd:!0,onClickAdd:v,isEditing:S}),e(V,{children:a==null?void 0:a.map((x,N)=>e(We,{...x,dataSourceId:c,locked:!1,fieldEditing:y},N))})]}):null};function Ye(t){const{value:a,label:s,onChange:c,placeholder:l}=t;return h(H,{children:[e(U,{children:s}),e(Oe,{className:"ds-input",onChange:c,placeholder:l,value:w.sanitize(a)})]})}function Ze(t){const{auth:a,id:s}=t,c=_(),l=A(n=>n.dataSources),[f,S]=O.useState([]),[C,v]=O.useState(!1),y=O.useMemo(()=>{var n;return(n=Object.entries(a))==null?void 0:n.map(([r,i])=>({name:r,...i})).filter(r=>r.name!=="fields")},[a]),x=O.useMemo(()=>{var n;return(n=Object.entries(a))==null?void 0:n.map(([r,i])=>({name:r,...i})).find(r=>r.name==="fields")},[a]),N=(n,r)=>{const i=JSON.parse(JSON.stringify(a));i[r].value=n;const g=JSON.parse(JSON.stringify(l)).map(o=>o.id===s?{...o,auth:{...i}}:o);return localStorage.setItem("dataSources",JSON.stringify(g)),c(z(g)),g};O.useEffect(()=>{var r,i;const n=(i=(r=y.filter(d=>d.form_type==="switch"&&!!(d!=null&&d.value)))==null?void 0:r.filter(d=>!!d.withFields))==null?void 0:i.map(d=>d.name);S(n)},[y,S]);const k=(n,r)=>{v(()=>!0);const i=n.target.value;N(i,r),setTimeout(()=>{v(()=>!1)},800)},u=(n,r)=>{v(()=>!0);const i=n.target.checked;N(i,r),setTimeout(()=>{v(()=>!1)},800)},m=(n,r,i)=>{var b;v(()=>!0);const d=n.target.value,g=JSON.parse(JSON.stringify(a)),o={...g,fields:{...g.fields,[i]:(b=g==null?void 0:g.fields[i])==null?void 0:b.map(D=>D.name===r?(D.value=d,{...D}):D)}},p=JSON.parse(JSON.stringify([...l])),L=p==null?void 0:p.map(D=>(D.id===s&&(D.auth=o),D));localStorage.setItem("dataSources",JSON.stringify(L)),c(z(L)),setTimeout(()=>{v(()=>!1)},600)};return h(P,{children:[e(q,{title:"HTTP Auth Fields",isEditing:C,isEdit:!1,isAdd:!1}),h(V,{children:[y&&y.map((n,r)=>n.form_type==="select"?e(ne,{value:w.sanitize(n.value),name:w.sanitize(n.name),onChange:i=>k(i,n.name),locked:!1,opts:n.options,label:n.label},r):n.form_type==="switch"?e(se,{label:n.label,value:n.value,onChange:i=>u(i,n.name)},r):null),e(E,{children:f&&f.map((n,r)=>{var i;return e(E,{children:x[n]&&((i=x[n])==null?void 0:i.map((d,g)=>d.form_type==="input"||d.form_type==="password"?e(F,{onChange:o=>m(o,d.name,n),type:d.form_type,value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):d.form_type==="textarea"?e(Ye,{onChange:o=>m(o,d.name,n),value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):null))},r)})})]})]})}const et=pe("div",{target:"emiacor0"})("position:absolute;left:0;top:0;background:",({theme:t})=>t.background,";display:flex;flex-direction:culumn;justify-content:center;color:",({theme:t})=>t.contrast,";flex:1;height:100%;width:100%;.body-cont{max-width:1440px;padding:10px;margin:10px;border-radius:3px;flex:1;background:",({theme:t})=>t.shadow,";overflow-y:auto;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;flex:1;display:flex;width:100%;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:t})=>t.accentNeutral,";border-radius:3px;overflow-y:auto;}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:t})=>t.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:t})=>t.background,";}}");function tt(){const t=A(({dataSources:a})=>a);return(t==null?void 0:t.length)>0?e("div",{style:{margin:"10px"},children:t.map((a,s)=>{const{icon:c,id:l,name:f,type:S,url:C}=a;return e("div",{className:"ds-cont",children:e(me,{to:l,children:h("div",{className:"ds-item",children:[e(ee,{icon:c}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:f}),h("span",{children:[h("small",{children:[S," | "," "]}),e("small",{style:{userSelect:"all"},children:C})]})]})]})})},s)})}):e("div",{children:e("h1",{children:"No Data Sources Found."})})}const at=t=>{const{headers:a,id:s,linkedFields:c,name:l,url:f,cors:S}=t,C=_(),v=A(({dataSources:r})=>r),[y,x]=O.useState({url:!1,protocol:!1}),N=(r,i)=>{let d=i;r==="url"&&(d=i.replace(/\/$/,""));const g=JSON.parse(JSON.stringify(v));return g.forEach(o=>{o.id===s&&(o[r]=d)}),g},[k,u]=O.useState(!1),m=r=>{try{const i=window.location.protocol,d=new URL(r).protocol;return{value:i===d,error:""}}catch{return{value:!1,error:"url"}}},n=(r,i)=>{u(()=>!0);const d=r.target.value;if(i==="url"){const o=m(d);if((o==null?void 0:o.error)==="url"&&x(p=>({...p,url:!0})),!(o!=null&&o.value)&&(o==null?void 0:o.error)===""&&x(p=>({...p,protocol:!0})),(o==null?void 0:o.error)===""&&(o!=null&&o.value)){x(L=>({...L,protocol:!1,url:!1}));const p=N(i,d);localStorage.setItem("dataSources",JSON.stringify(p)),C(z(p)),setTimeout(()=>{u(()=>!1)},800)}}const g=N(i,d);localStorage.setItem("dataSources",JSON.stringify(g)),C(z(g)),setTimeout(()=>{u(()=>!1)},800)};return h(De,{children:[e(q,{isEditing:k,isEdit:!0,isAdd:!1,title:"DataSource Settings",fieldErrors:y}),e(V,{children:h(E,{children:[e(F,{value:w.sanitize(l),label:"Name",onChange:r=>n(r,"name")}),e(F,{value:w.sanitize(f),label:"URL",error:y.url||y.protocol,onChange:r=>n(r,"url")})]})}),e(Ze,{...t}),e(Qe,{cors:S,headers:a,id:s}),e(Xe,{...t,linkedFields:c})]})},nt=T({name:"9rq8lq",styles:"display:flex;align-items:center;justify-content:space-between;margin-right:20px"});function st(t,a,s){let c={},l=s&&s!==""&&a&&a!=="",f=l?`${btoa(a)}:${btoa(s)}`:"",S=JSON.parse(JSON.stringify(t));return l&&f&&(c.auth=f),c.url=S,JSON.stringify(c)}function it(t){const{url:a,auth:{basicAuth:s,fields:{basicAuth:[c,l]}}}=t,[f,S]=ve(["qryn-dev-cookie","qryn-settings"]),C=_(),v=A(k=>k.dataSources),y=()=>{const k=[...v],u=JSON.parse(JSON.stringify(k)),m=u==null?void 0:u.map(n=>({...n,url:w.sanitize(a),auth:{...n.auth,basicAuth:{...n.auth.basicAuth,value:s.value},fields:{...n.auth.fields,basicAuth:[...n.auth.fields.basicAuth].map(r=>r.name==="user"?{...r,value:w.sanitize(c.value)}:r.name==="password"?{...r,value:w.sanitize(l.value)}:r)}}}));localStorage.setItem("dataSources",JSON.stringify(m)),C(z(m)),C(fe({type:"success",message:"Set same URL and Basic Auth for All Data Sources"}))};function x(){const k=new Date;new Date().setDate(k.getDate()+1);try{S("qryn-settings",st(a,c.value,l.value),{path:""})}catch(m){console.log(m)}}function N(){const{headers:k,id:u,name:m,linkedFields:n}=t,r=k==null?void 0:k.map(({header:o,value:p})=>({[o]:p})),d=`data:text/json;chatset=utf-8,${encodeURIComponent(JSON.stringify({id:u,name:m,headers:r,linkedFields:n}))}`,g=document.createElement("a");g.href=d,g.download=`${m}_${u}.json`,g.click()}return h("div",{className:"ds-cont",children:[h("div",{className:J(nt),children:[e(rt,{...t}),h("div",{style:{display:"flex",alignItems:"center"},children:[e(j,{title:"Download Datasource settings as JSON",value:w.sanitize("Download JSON"),onClick:N,primary:!0}),e(j,{title:"Set Cookie with name: qryn-settings",value:w.sanitize("Save Cookie"),onClick:x,primary:!0}),e(j,{title:"Use same URL and Basic Auth for all Data Sources",value:w.sanitize("Use For All"),onClick:y,primary:!0})]})]}),e("div",{className:"ds-settings",children:e(at,{...t})})]})}const rt=t=>{const{icon:a,name:s,type:c,url:l}=t;return h("div",{className:"ds-item",children:[e(ee,{icon:a}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:s}),h("small",{children:[w.sanitize(c)," | ",w.sanitize(l)]})]})]})};function lt(){let{id:t}=Se();const a=$(),s=A(l=>l.dataSources),c=O.useMemo(()=>!s||s.length===0?{}:s.find(l=>l.id===t)||{},[t,s]);return e(ae,{theme:a,children:e(et,{children:h("div",{className:"body-cont",children:[e(Ge,{title:"DataSource Settings",datasource:c}),e("div",{className:"datasource-body",children:e(it,{...c})})]})})})}const ot=t=>T("display:flex;flex-direction:column;flex:1;flex-wrap:wrap;width:400px;border:1px solid ",t.accentNeutral,";padding:5px;border-radius:3px;margin-left:10px;",""),ct=T({name:"1reekiy",styles:"display:flex;padding:4px 12px;font-size:14px;border-radius:4px;white-space:nowrap;align-items:center;justify-content:space-between"}),dt=T({name:"t10jb8",styles:"margin:5px"}),ut=T({name:"1wnuhlc",styles:"margin-left:20px;display:flex;align-items:center;span{font-size:12px;}"}),ht=T({name:"17moij0",styles:"align-items:center;width:100%;display:flex;margin-top:10px;justify-content:space-between;flex:1"}),pt=t=>{const[a,s]=O.useState(""),[c,l]=O.useState(""),[f,S]=O.useState(""),[C,v]=O.useState(!1),[y,x]=O.useState(!1),N=A(p=>p.dataSources),k=_(),u="Save",m=$(),n=p=>{var D;const b=(((D=p==null?void 0:p.target)==null?void 0:D.value)||"").replace(/\/$/,"");s(()=>b)},r=p=>{l(()=>p.target.value)},i=p=>{S(()=>p.target.value)},d=p=>{v(()=>p.target.checked)},g=p=>{x(()=>p.target.checked)},o=p=>{const L=JSON.parse(JSON.stringify(N)),b=L==null?void 0:L.map(D=>({...D,url:a,auth:{...D.auth,basicAuth:{...D.auth.basicAuth,value:y},fields:{...D.auth.fields,basicAuth:[...D.auth.fields.basicAuth].map(R=>R.name==="user"?{...R,value:c}:R.name==="password"?{...R,value:f}:R)}}}));localStorage.setItem("dataSources",JSON.stringify(b)),k(z(b))};return h("div",{className:J(ot(m)),children:[h("div",{className:J(ct),children:["Use one setting for all Data Sources",e(M,{checked:C,size:"small",onChange:d})]}),C&&h("div",{className:J(dt),children:[e(F,{value:w.sanitize(a),label:"url",onChange:n,placeholder:"http://qryn.dev"}),y&&h(P,{children:[e(F,{value:w.sanitize(c),label:"user",onChange:r,placeholder:"default"}),e(F,{value:w.sanitize(f),label:"password",onChange:i,type:"password",placeholder:""})]}),h("div",{className:J(ht),children:[h("div",{className:J(ut),children:[e("span",{children:"Use Basic Auth"})," ",e(M,{checked:y,size:"small",onChange:g})," "]}),e(j,{value:w.sanitize(u),onClick:o,editing:!1,primary:!0})]})]})]})};function Nt(t){const a=t.replace(/#/,""),s=decodeURIComponent(a),c=new URLSearchParams(s);for(let[l,f]of c)(l==="left"||l==="right")&&JSON.parse(f)}function bt(){const t=ye.useMediaQuery({query:"(prefers-color-scheme: dark)"}),a=_(),s=$(),c=A(l=>l.autoTheme);return O.useEffect(()=>{if(c){const l=t?"dark":"light";a(ze(l)),localStorage.setItem("theme",JSON.stringify({theme:l,auto:c}))}},[t,c,a]),h(ae,{theme:s,children:[e(Le,{children:h("div",{className:"cont",children:[e(tt,{}),e("div",{style:{display:"flex",flex:1},children:e("div",{style:{height:"40px"},children:e(pt,{})})})]})}),e(Ce,{children:e(xe,{path:":id",element:e(lt,{})})})]})}export{bt as default,Nt as getURlParams}; diff --git a/assets/DataSources-1fc98c42.js b/assets/DataSources-1fc98c42.js deleted file mode 100644 index fc1414dc..00000000 --- a/assets/DataSources-1fc98c42.js +++ /dev/null @@ -1 +0,0 @@ -var de=Object.defineProperty;var ue=(t,n,s)=>n in t?de(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var I=(t,n,s)=>(ue(t,typeof n!="symbol"?n+"":n,s),s);import{d as e,j as h,g as J,D as w,h as T,F as P,f as M,Q as he,i as pe,e as fe}from"./index-d327daed.js";import{r as O}from"./react-432945ee.js";import{m as E,u as A,n as Z,r as ge,L as me,s as Se,v as ve,w as ye,p as xe,R as Ce}from"./vendor-ebc92242.js";import{D as ke,L as $,I as H,d as we,S as Ne,a as R,F,s as z,b as be,c as V,T as Oe,e as ee,f as De,P as Le}from"./AddOutlined-8af8d4fb.js";import{d as te,s as ze}from"./DeleteOutlineOutlined-a3ecc7e6.js";import{S as U,r as B,i as Q}from"./createSvgIcon-e48ef86e.js";import{j as G}from"./reactDnd-f9e32f58.js";import{b as ne}from"./reactSelect-cb3a1fff.js";import"./memoize-acaceb73.js";const j=t=>{const{value:n,onClick:s,primary:c,title:l}=t;return e(ke,{title:l,onClick:s,primary:c,children:n})},Ae=t=>T("display:flex;flex:",t?1:0,";",""),ae=({value:t,locked:n,onChange:s,opts:c,label:l,labelWidth:f,name:S,fullWidth:C,width:v})=>{const[y,x]=O.useState(""),N=O.useRef(null),k=O.useMemo(()=>typeof c[0]=="string"?c.map(u=>({value:u,name:u})):c,[c]);return O.useEffect(()=>{var m,a;const u=(m=k==null?void 0:k.find(r=>r.name===t))==null?void 0:m.value;u&&((a=N==null?void 0:N.current)==null?void 0:a.value)!==u&&(x(u),N.current.value=u)},[t]),h(H,{width:v,children:[(l==null?void 0:l.length)>0&&e($,{width:f||null,children:l}),e("select",{ref:N,className:J(Ae(C)),disabled:n,defaultValue:w.sanitize(y),onChange:u=>s(u,S),children:k==null?void 0:k.map((u,m)=>e("option",{value:w.sanitize(u.value),children:u.name},m))})]})},se=t=>{const{value:n,onChange:s,locked:c,label:l}=t;return h(H,{children:[e($,{children:l}),e(U,{disabled:c,size:"small",checked:n,onChange:s})]})};var W={},Ie=Q;Object.defineProperty(W,"__esModule",{value:!0});var ie=W.default=void 0,Je=Ie(B()),Fe=G;ie=W.default=(0,Je.default)((0,Fe.jsx)("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"CachedOutlined");var K={},Te=Q;Object.defineProperty(K,"__esModule",{value:!0});var re=K.default=void 0,Ee=Te(B()),Re=G;re=K.default=(0,Ee.default)((0,Re.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");const le=t=>n=>{n({type:"SET_IS_DATASOURCE_SAVED",isDsSaved:t})};var X={},_e=Q;Object.defineProperty(X,"__esModule",{value:!0});var oe=X.default=void 0,je=_e(B()),Pe=G;oe=X.default=(0,je.default)((0,Pe.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");const ce=T({name:"vtwnvy",styles:"height:12px!important;width:12px!important;color:white;margin:0px 4px"}),Me=t=>T("display:flex;align-items:center;background:",t.primary,";color:white;font-size:11px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}",""),Ue=T({name:"1t9g6tg",styles:"display:flex;align-items:center;background:#b62c14;color:white;font-size:12px;padding:4px;border-radius:3px;margin-right:10px;cursor:pointer;span{margin-right:4px;font-weight:bold;}"}),$e=T({name:"9hkg7e",styles:"display:flex;align-items:center;font-size:12px;&.loading-icon{height:14px;width:14px;}"}),He=({setIsSaved:t})=>{const n=M();return h("div",{className:J(Me(n)),onClick:s=>t(!1),children:[e(re,{className:J(ce)})," ",e("span",{children:"Saved"})]})},Y=({errorText:t})=>h("div",{className:J(Ue),children:[e(oe,{className:J(ce)})," ",e("span",{children:t})]});function q(t){const{onClickAdd:n,isAdd:s,title:c,isEditing:l,fieldErrors:f}=t,S=E(),[C,v]=O.useState(!1);return O.useEffect(()=>(l&&(setTimeout(()=>{v(!0),S(le(!0))},800),v(!1)),v(!1),()=>{v(!1)}),[l]),h(Ne,{children:[c,h("div",{className:"edit-buttons",children:[l&&h("div",{className:$e,children:[e(ie,{style:{height:"13px",width:"13px"}})," ","Saving ..."]}),(f==null?void 0:f.protocol)&&e(Y,{errorText:"Insecure Mixed Content. Mixing HTTP and HTTPS is insecure and is not supported."}),(f==null?void 0:f.url)&&e(Y,{errorText:"Please complete API URL"}),C&&e(He,{setIsSaved:v}),s&&e(P,{children:e(we,{fontSize:"small",style:{cursor:"pointer",display:"flex"},onClick:n})})]})]})}const qe=t=>{const n=E(),s=A(u=>u.dataSources),[c,l]=O.useState(!1),{headers:f,id:S}=t,[C,v]=O.useState((t==null?void 0:t.cors)||!1),y=u=>{const m=u.target.checked,a=s.map(r=>(r.id===S&&(r.cors=m),r));v(()=>m),localStorage.setItem("dataSources",JSON.stringify(a)),n(z(a))},x=(u,m,a)=>{l(()=>!0);const r=u.target.value,g=(s.find(p=>p.id===S).headers||[]).map(p=>(p.id===m&&(p[a]=r),p)),o=s.map(p=>(p.id===S&&(p.headers=[...g]),p));localStorage.setItem("dataSources",JSON.stringify(o)),n(z(o)),setTimeout(()=>{l(()=>!1)},800)},N=u=>{u.preventDefault();const m=s==null?void 0:s.find(i=>i.id===S),a=m.headers,r=JSON.parse(JSON.stringify([...s]));if(f.length>0){const i={...a[a.length-1],id:Z()},d={...m,headers:[...m.headers,i]},g=r==null?void 0:r.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),n(z(g))}},k=(u,m)=>{const a=s==null?void 0:s.find(o=>o.id===S),i=[...f].filter(o=>o.id!==m),d={...a,headers:[...i]},g=s==null?void 0:s.map(o=>o.id===S?{...d}:o);localStorage.setItem("dataSources",JSON.stringify(g)),n(z(g))};return e("div",{className:"",children:f&&h(P,{children:[e(q,{title:"Custom HTTP Headers",isEdit:!1,isAdd:!0,isEditing:c,onClickAdd:N}),h(R,{children:[e($,{children:"Use CORS"})," ",e(U,{size:"small",checked:C,onChange:y})]}),f==null?void 0:f.map((u,m)=>e(R,{children:h(H,{children:[e(F,{label:"header",value:w.sanitize(u.header),onChange:a=>x(a,u.id,"header")}),e(F,{label:"value",value:w.sanitize(u.value),onChange:a=>x(a,u.id,"value")}),e(te,{onClick:a=>k(a,u.id),style:{cursor:"pointer",marginLeft:"10px"},fontSize:"small"})]})},m))]})})};function Ve(t){console.log(t);const n=ge(),s=M(),c=A(y=>y.urlLocation),l=E(),{title:f}=t,S=A(y=>y.isDsSaved),C=O.useMemo(()=>S?"Save":"Back",[S]),v=()=>{let y=(c==null?void 0:c.length)>0;l(le(!1)),n((y||C==="Back")&&f!=="DataSources"?-1:"/")};return h("div",{className:"ds-header",children:[e("div",{style:{display:"flex",alignItems:"center"},children:h("div",{style:{display:"flex",flexDirection:"column"},children:[h("div",{style:{display:"flex"},children:[e(he,{}),e("h1",{children:f})]}),h("p",{style:{color:s.contrast,fontSize:"10px",marginTop:"5px",marginLeft:"10px",opacity:".5"},children:["v","0.28.2"]})]})}),e(j,{value:w.sanitize(C),onClick:v,editing:!0,primary:S})]})}const Be=t=>{const{id:n,name:s,regex:c,urlLabel:l,internalLink:f,linkType:S,locked:C,dataSourceId:v,fieldEditing:y}=t,x=E(),N=A(i=>i.dataSources),k=O.useMemo(()=>N.map(i=>({name:i.name,value:i.id})),[N]),u=(i,d)=>{y();const g=JSON.parse(JSON.stringify(N)),L=g.find(b=>b.id===v).linkedFields.map(b=>b.id===n?{...b,[i]:d}:b);return g.map(b=>b.id===v?{...b,linkedFields:L}:b)},m=i=>{y();const d=JSON.parse(JSON.stringify(N)),p=d.find(b=>b.id===v).linkedFields.filter(b=>b.id!==n),L=d.map(b=>b.id===v?{...b,linkedFields:[...p]}:b);localStorage.setItem("dataSources",JSON.stringify(L)),x(z(L))},a=(i,d)=>{y();const g=i.target.value,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))},r=(i,d)=>{y();const g=!!i.target.checked,o=u(d,g);localStorage.setItem("dataSources",JSON.stringify(o)),x(z(o))};return h(be,{children:[h(R,{children:[e(F,{value:w.sanitize(s),label:"Name",onChange:i=>a(i,"name")}),e(F,{value:w.sanitize(c),label:"Regex",onChange:i=>a(i,"regex")}),e(F,{value:w.sanitize(l),label:"URL Label",onChange:i=>a(i,"urlLabel")}),e(te,{onClick:m,fontSize:"small",style:{marginLeft:"10px",cursor:"pointer",display:C?"none":"inline-block"}})]}),h(R,{className:"internal",children:[e(se,{value:f,label:"Internal Link",onChange:i=>r(i,"internalLink")}),e(ae,{label:"",value:w.sanitize(S),opts:k,selectType:"linkedField",onChange:i=>a(i,"linkID")})]})]})};class Qe{constructor(){I(this,"id");I(this,"dataSource");I(this,"ds_id");I(this,"name");I(this,"regex");I(this,"query");I(this,"urlLabel");I(this,"url");I(this,"internalLink");I(this,"linkType");this.id=Z(),this.dataSource="Logs",this.ds_id="logs",this.name="traceID",this.regex='^.*?"traceID" ="(w+)".*$/',this.query="${__value.raw}",this.urlLabel="",this.url="",this.internalLink=!0,this.linkType="Traces"}create(){const{id:n,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}=this;return{id:n,dataSource:s,ds_id:c,name:l,regex:f,query:S,urlLabel:C,url:v,internalLink:y,linkType:x}}}const Ge=t=>{const{linkedFields:n,name:s,id:c}=t,l=A(x=>x.dataSources),f=E(),[S,C]=O.useState(!1),v=()=>{const x=new Qe;x.dataSource=s,x.create();const k=[...JSON.parse(JSON.stringify(n)),{...x}],u=JSON.parse(JSON.stringify(l)),m=u==null?void 0:u.map(a=>a.id===c?{...a,linkedFields:k}:a);localStorage.setItem("dataSources",JSON.stringify(m)),f(z(m))},y=()=>{C(()=>!0),setTimeout(()=>{C(()=>!1)},800)};return(n==null?void 0:n.length)>0?h(P,{children:[e(q,{title:"Linked Fields",isEdit:!0,isAdd:!0,onClickAdd:v,isEditing:S}),e(V,{children:n==null?void 0:n.map((x,N)=>e(Be,{...x,dataSourceId:c,locked:!1,fieldEditing:y},N))})]}):null};function We(t){const{value:n,label:s,onChange:c,placeholder:l}=t;return h(H,{children:[e($,{children:s}),e(Oe,{className:"ds-input",onChange:c,placeholder:l,value:w.sanitize(n)})]})}function Ke(t){const{auth:n,id:s}=t,c=E(),l=A(a=>a.dataSources),[f,S]=O.useState([]),[C,v]=O.useState(!1),y=O.useMemo(()=>{var a;return(a=Object.entries(n))==null?void 0:a.map(([r,i])=>({name:r,...i})).filter(r=>r.name!=="fields")},[n]),x=O.useMemo(()=>{var a;return(a=Object.entries(n))==null?void 0:a.map(([r,i])=>({name:r,...i})).find(r=>r.name==="fields")},[n]),N=(a,r)=>{const i=JSON.parse(JSON.stringify(n));i[r].value=a;const g=JSON.parse(JSON.stringify(l)).map(o=>o.id===s?{...o,auth:{...i}}:o);return localStorage.setItem("dataSources",JSON.stringify(g)),c(z(g)),g};O.useEffect(()=>{var r,i;const a=(i=(r=y.filter(d=>d.form_type==="switch"&&!!(d!=null&&d.value)))==null?void 0:r.filter(d=>!!d.withFields))==null?void 0:i.map(d=>d.name);S(a)},[y,S]);const k=(a,r)=>{v(()=>!0);const i=a.target.value;N(i,r),setTimeout(()=>{v(()=>!1)},800)},u=(a,r)=>{v(()=>!0);const i=a.target.checked;N(i,r),setTimeout(()=>{v(()=>!1)},800)},m=(a,r,i)=>{var b;v(()=>!0);const d=a.target.value,g=JSON.parse(JSON.stringify(n)),o={...g,fields:{...g.fields,[i]:(b=g==null?void 0:g.fields[i])==null?void 0:b.map(D=>D.name===r?(D.value=d,{...D}):D)}},p=JSON.parse(JSON.stringify([...l])),L=p==null?void 0:p.map(D=>(D.id===s&&(D.auth=o),D));localStorage.setItem("dataSources",JSON.stringify(L)),c(z(L)),setTimeout(()=>{v(()=>!1)},600)};return h(P,{children:[e(q,{title:"HTTP Auth Fields",isEditing:C,isEdit:!1,isAdd:!1}),h(V,{children:[y&&y.map((a,r)=>a.form_type==="select"?e(ae,{value:w.sanitize(a.value),name:w.sanitize(a.name),onChange:i=>k(i,a.name),locked:!1,opts:a.options,label:a.label},r):a.form_type==="switch"?e(se,{label:a.label,value:a.value,onChange:i=>u(i,a.name)},r):null),e(R,{children:f&&f.map((a,r)=>{var i;return e(R,{children:x[a]&&((i=x[a])==null?void 0:i.map((d,g)=>d.form_type==="input"||d.form_type==="password"?e(F,{onChange:o=>m(o,d.name,a),type:d.form_type,value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):d.form_type==="textarea"?e(We,{onChange:o=>m(o,d.name,a),value:w.sanitize(d.value),label:d.label,placeholder:d.placeholder},g):null))},r)})})]})]})}const Xe=pe("div",{target:"emiacor0"})("position:absolute;left:0;top:0;background:",({theme:t})=>t.background,";display:flex;flex-direction:culumn;justify-content:center;color:",({theme:t})=>t.contrast,";flex:1;height:100%;width:100%;.body-cont{max-width:1440px;padding:10px;margin:10px;border-radius:3px;flex:1;background:",({theme:t})=>t.shadow,";overflow-y:auto;overflow-x:hidden;}.ds-header{padding:10px;padding-bottom:20px;font-size:24px;flex:1;display:flex;width:100%;justify-content:space-between;align-items:center;padding-left:0px;.logo{margin-right:10px;}}.ds-cont{margin-bottom:10px;border:1px solid ",({theme:t})=>t.accentNeutral,";border-radius:3px;overflow-y:auto;}.ds-item{padding:10px;border-radius:3px 3px 0px 0px;padding-bottom:14px;display:flex;.logo{padding:10px;padding-right:20px;padding-left:0px;}.ds-text{display:flex;flex-direction:column;flex:1;}.ds-type{font-size:18px;padding:10px;padding-left:0px;color:",({theme:t})=>t.contrast,";}small{font-size:12px;}.setting-icon{justify-self:flex-end;cursor:pointer;}.ds-settings{background:",({theme:t})=>t.background,";}}");function Ye(){const t=A(({dataSources:n})=>n);return(t==null?void 0:t.length)>0?e("div",{style:{margin:"10px"},children:t.map((n,s)=>{const{icon:c,id:l,name:f,type:S,url:C}=n;return e("div",{className:"ds-cont",children:e(me,{to:l,children:h("div",{className:"ds-item",children:[e(ee,{icon:c}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:f}),h("span",{children:[h("small",{children:[S," | "," "]}),e("small",{style:{userSelect:"all"},children:C})]})]})]})})},s)})}):e("div",{children:e("h1",{children:"No Data Sources Found."})})}const Ze=t=>{const{headers:n,id:s,linkedFields:c,name:l,url:f,cors:S}=t,C=E(),v=A(({dataSources:r})=>r),[y,x]=O.useState({url:!1,protocol:!1}),N=(r,i)=>{let d=i;r==="url"&&(d=i.replace(/\/$/,""));const g=JSON.parse(JSON.stringify(v));return g.forEach(o=>{o.id===s&&(o[r]=d)}),g},[k,u]=O.useState(!1),m=r=>{try{const i=window.location.protocol,d=new URL(r).protocol;return{value:i===d,error:""}}catch{return{value:!1,error:"url"}}},a=(r,i)=>{u(()=>!0);const d=r.target.value;if(i==="url"){const o=m(d);if((o==null?void 0:o.error)==="url"&&x(p=>({...p,url:!0})),!(o!=null&&o.value)&&(o==null?void 0:o.error)===""&&x(p=>({...p,protocol:!0})),(o==null?void 0:o.error)===""&&(o!=null&&o.value)){x(L=>({...L,protocol:!1,url:!1}));const p=N(i,d);localStorage.setItem("dataSources",JSON.stringify(p)),C(z(p)),setTimeout(()=>{u(()=>!1)},800)}}const g=N(i,d);localStorage.setItem("dataSources",JSON.stringify(g)),C(z(g)),setTimeout(()=>{u(()=>!1)},800)};return h(De,{children:[e(q,{isEditing:k,isEdit:!0,isAdd:!1,title:"DataSource Settings",fieldErrors:y}),e(V,{children:h(R,{children:[e(F,{value:w.sanitize(l),label:"Name",onChange:r=>a(r,"name")}),e(F,{value:w.sanitize(f),label:"URL",error:y.url||y.protocol,onChange:r=>a(r,"url")})]})}),e(Ke,{...t}),e(qe,{cors:S,headers:n,id:s}),e(Ge,{...t,linkedFields:c})]})},et=T({name:"9rq8lq",styles:"display:flex;align-items:center;justify-content:space-between;margin-right:20px"});function tt(t,n,s){let c={},l=s&&s!==""&&n&&n!=="",f=l?`${btoa(n)}:${btoa(s)}`:"",S=JSON.parse(JSON.stringify(t));return l&&f&&(c.auth=f),c.url=S,JSON.stringify(c)}function nt(t){const{url:n,auth:{basicAuth:s,fields:{basicAuth:[c,l]}}}=t,[f,S]=ve(["qryn-dev-cookie","qryn-settings"]),C=E(),v=A(k=>k.dataSources),y=()=>{const k=[...v],u=JSON.parse(JSON.stringify(k)),m=u==null?void 0:u.map(a=>({...a,url:w.sanitize(n),auth:{...a.auth,basicAuth:{...a.auth.basicAuth,value:s.value},fields:{...a.auth.fields,basicAuth:[...a.auth.fields.basicAuth].map(r=>r.name==="user"?{...r,value:w.sanitize(c.value)}:r.name==="password"?{...r,value:w.sanitize(l.value)}:r)}}}));localStorage.setItem("dataSources",JSON.stringify(m)),C(z(m)),C(fe({type:"success",message:"Set same URL and Basic Auth for All Data Sources"}))};function x(){const k=new Date;new Date().setDate(k.getDate()+1);try{S("qryn-settings",tt(n,c.value,l.value),{path:"/"})}catch(m){console.log(m)}}function N(){const{headers:k,id:u,name:m,linkedFields:a}=t,r=k==null?void 0:k.map(({header:o,value:p})=>({[o]:p})),d=`data:text/json;chatset=utf-8,${encodeURIComponent(JSON.stringify({id:u,name:m,headers:r,linkedFields:a}))}`,g=document.createElement("a");g.href=d,g.download=`${m}_${u}.json`,g.click()}return h("div",{className:"ds-cont",children:[h("div",{className:J(et),children:[e(at,{...t}),h("div",{style:{display:"flex",alignItems:"center"},children:[e(j,{title:"Download Datasource settings as JSON",value:w.sanitize("Download JSON"),onClick:N,primary:!0}),e(j,{title:"Set Cookie with name: qryn-settings",value:w.sanitize("Save Cookie"),onClick:x,primary:!0}),e(j,{title:"Use same URL and Basic Auth for all Data Sources",value:w.sanitize("Use For All"),onClick:y,primary:!0})]})]}),e("div",{className:"ds-settings",children:e(Ze,{...t})})]})}const at=t=>{const{icon:n,name:s,type:c,url:l}=t;return h("div",{className:"ds-item",children:[e(ee,{icon:n}),h("div",{className:"ds-text",children:[e("div",{className:"ds-type",children:s}),h("small",{children:[w.sanitize(c)," | ",w.sanitize(l)]})]})]})};function st(){let{id:t}=Se();const n=M(),s=A(l=>l.dataSources),c=O.useMemo(()=>!s||s.length===0?{}:s.find(l=>l.id===t)||{},[t,s]);return e(ne,{theme:n,children:e(Xe,{children:h("div",{className:"body-cont",children:[e(Ve,{title:"DataSource Settings",datasource:c}),e("div",{className:"datasource-body",children:e(nt,{...c})})]})})})}const it=t=>T("display:flex;flex-direction:column;flex:1;flex-wrap:wrap;width:400px;border:1px solid ",t.accentNeutral,";padding:5px;border-radius:3px;margin-left:10px;",""),rt=T({name:"1reekiy",styles:"display:flex;padding:4px 12px;font-size:14px;border-radius:4px;white-space:nowrap;align-items:center;justify-content:space-between"}),lt=T({name:"t10jb8",styles:"margin:5px"}),ot=T({name:"1wnuhlc",styles:"margin-left:20px;display:flex;align-items:center;span{font-size:12px;}"}),ct=T({name:"17moij0",styles:"align-items:center;width:100%;display:flex;margin-top:10px;justify-content:space-between;flex:1"}),dt=t=>{const[n,s]=O.useState(""),[c,l]=O.useState(""),[f,S]=O.useState(""),[C,v]=O.useState(!1),[y,x]=O.useState(!1),N=A(p=>p.dataSources),k=E(),u="Save",m=M(),a=p=>{var D;const b=(((D=p==null?void 0:p.target)==null?void 0:D.value)||"").replace(/\/$/,"");s(()=>b)},r=p=>{l(()=>p.target.value)},i=p=>{S(()=>p.target.value)},d=p=>{v(()=>p.target.checked)},g=p=>{x(()=>p.target.checked)},o=p=>{const L=JSON.parse(JSON.stringify(N)),b=L==null?void 0:L.map(D=>({...D,url:n,auth:{...D.auth,basicAuth:{...D.auth.basicAuth,value:y},fields:{...D.auth.fields,basicAuth:[...D.auth.fields.basicAuth].map(_=>_.name==="user"?{..._,value:c}:_.name==="password"?{..._,value:f}:_)}}}));localStorage.setItem("dataSources",JSON.stringify(b)),k(z(b))};return h("div",{className:J(it(m)),children:[h("div",{className:J(rt),children:["Use one setting for all Data Sources",e(U,{checked:C,size:"small",onChange:d})]}),C&&h("div",{className:J(lt),children:[e(F,{value:w.sanitize(n),label:"url",onChange:a,placeholder:"http://qryn.dev"}),y&&h(P,{children:[e(F,{value:w.sanitize(c),label:"user",onChange:r,placeholder:"default"}),e(F,{value:w.sanitize(f),label:"password",onChange:i,type:"password",placeholder:""})]}),h("div",{className:J(ct),children:[h("div",{className:J(ot),children:[e("span",{children:"Use Basic Auth"})," ",e(U,{checked:y,size:"small",onChange:g})," "]}),e(j,{value:w.sanitize(u),onClick:o,editing:!1,primary:!0})]})]})]})};function Ct(t){const n=t.replace(/#/,""),s=decodeURIComponent(n),c=new URLSearchParams(s);for(let[l,f]of c)(l==="left"||l==="right")&&JSON.parse(f)}function kt(){const t=ye.useMediaQuery({query:"(prefers-color-scheme: dark)"}),n=E(),s=M(),c=A(l=>l.autoTheme);return O.useEffect(()=>{if(c){const l=t?"dark":"light";n(ze(l)),localStorage.setItem("theme",JSON.stringify({theme:l,auto:c}))}},[t,c,n]),h(ne,{theme:s,children:[e(Le,{children:h("div",{className:"cont",children:[e(Ye,{}),e("div",{style:{display:"flex",flex:1},children:e("div",{style:{height:"40px"},children:e(dt,{})})})]})}),e(Ce,{children:e(xe,{path:":id",element:e(st,{})})})]})}export{kt as default,Ct as getURlParams}; diff --git a/assets/DeleteOutlineOutlined-7018ca68.js b/assets/DeleteOutlineOutlined-7018ca68.js new file mode 100644 index 00000000..f0f68df4 --- /dev/null +++ b/assets/DeleteOutlineOutlined-7018ca68.js @@ -0,0 +1 @@ +import{i as a}from"./index-a5171272.js";import{r as i,i as n}from"./createSvgIcon-7f30e35c.js";import{j as o}from"./reactDnd-8591509b.js";const v=t=>r=>{r({type:"SET_THEME",theme:t})},x=a("button",{target:"e18y13m91"})({name:"1cyd9nz",styles:"padding:3px 12px;font-size:12px;line-height:20px;cursor:pointer;user-select:none;border:none;border-radius:3px;font-weight:500;white-space:nowrap;display:flex;align-items:center"});var e={},s=n;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,u=s(i()),p=o,d=(0,u.default)((0,p.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined");l=e.default=d;export{x as B,l as d,v as s}; diff --git a/assets/DeleteOutlineOutlined-a3ecc7e6.js b/assets/DeleteOutlineOutlined-a3ecc7e6.js deleted file mode 100644 index 8d162796..00000000 --- a/assets/DeleteOutlineOutlined-a3ecc7e6.js +++ /dev/null @@ -1 +0,0 @@ -import{i as a}from"./index-d327daed.js";import{r as i,i as n}from"./createSvgIcon-e48ef86e.js";import{j as o}from"./reactDnd-f9e32f58.js";const f=t=>r=>{r({type:"SET_THEME",theme:t})},x=a("button",{target:"e18y13m91"})({name:"1cyd9nz",styles:"padding:3px 12px;font-size:12px;line-height:20px;cursor:pointer;user-select:none;border:none;border-radius:3px;font-weight:500;white-space:nowrap;display:flex;align-items:center"});var e={},s=n;Object.defineProperty(e,"__esModule",{value:!0});var l=e.default=void 0,u=s(i()),p=o;l=e.default=(0,u.default)((0,p.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutlineOutlined");export{x as B,l as d,f as s}; diff --git a/assets/Main-e16349e3.js b/assets/Main-35d151ac.js similarity index 54% rename from assets/Main-e16349e3.js rename to assets/Main-35d151ac.js index dbf8b59a..bc47977d 100644 --- a/assets/Main-e16349e3.js +++ b/assets/Main-35d151ac.js @@ -1,4 +1,4 @@ -import{k as Jb,m as Yb,s as ue,B as Ei,r as ki,n as i2,a as Ct,o as _i,u as Zb,c as Zt,b as eo,p as sM,q as to,D as Z1,t as t2,v as y1,d as a,g as H0,w as rc,x as Oc,h as i0,f as G0,j as P,i as g0,y as Ii,I as vb,P as ic,F as q1,z as ac,l as sc,e as I2,A as Di,C as Mo,E as Pi,G as Hi}from"./index-d327daed.js";import{a as I1,d as bo,m as k1,u as X0,q as $e,x as QM,y as bt,z as Zp,A as ez,B as Bb,D as yb,E as Tb,F as JM,G as ji,I as Fi,J as Se,K as Ie,M as oo,Q as Vi,S as q2,T as $i,U as Ac,V as lc,W as po,X as Ot,Y as tz,Z as dc,$ as P2,n as V2,o as W2,a0 as Ui,a1 as Gi,a2 as Ki,a3 as Qi,a4 as Ji,a5 as Yi,j as w2,a6 as Zi,w as h2,a7 as Et,a8 as Mz,a9 as bz,aa as ea,ab as ta,ac as Ma,ad as zo,ae as ba,af as oz,v as pz,r as oa}from"./vendor-ebc92242.js";import{r as q,c as no,g as Ue,R as z2,e as pa,b as At}from"./react-432945ee.js";import{u as co,f as za,s as na,h as ca,T as x1,C as ra,D as ro,i as Oo,j as Oa,k as ia,l as aa,m as sa,o as Aa,p as la,q as da,E as ua,r as io,t as qa,v as uc,w as qc,x as p1,b as fa,y as ot,M as Sb,z as Wa,A as fc,G as xe,H as ha,I as ga,J as Ra,K as ma,L as Xe,N as La,R as Wc,O as re,d as Na,Q as hc,U as gc,V as Rc,W as ao,X as ht,Y as va,Z as Ba,_ as mc,$ as zz,n as Y2,a as $t,a0 as Lc,a1 as ya,a2 as Ta,a3 as Sa,a4 as xa,a5 as Xa,a6 as wa,a7 as Nc,a8 as vc,a9 as Bc,aa as xb,ab as yc,P as gt,ac as Ca,ad as Ea,ae as nz,S as ka,af as _a,ag as cz}from"./consts-2711a1cd.js";import{s as Tc,B as so}from"./DeleteOutlineOutlined-a3ecc7e6.js";import{l as D1}from"./lodash-fd695a79.js";import{r as m1,i as L1,S as f2}from"./createSvgIcon-e48ef86e.js";import{j as t1,u as Ia,b as Da,H as Pa,D as Ha}from"./reactDnd-f9e32f58.js";import{k as Sc,d as xc,s as ja,i as Fa,g as Va,_ as $a,b as f1,S as Ao,e as Xc,j as Rt,f as wc}from"./reactSelect-cb3a1fff.js";import{r as Ua,f as rz,u as Ga,g as Ka,a as Qa,b as Ja,c as Ya,d as Za,e as e3,h as t3,i as M3}from"./reactTable-b77913f9.js";import{m as Ge,d as b3,a as o3,u as Oz}from"./memoize-acaceb73.js";import{w as p3,a as z3,T as n3,S as c3,E as r3,c as O3}from"./slate-25e47886.js";import{F as kt,d as mt,s as eM,e as lo}from"./AddOutlined-8af8d4fb.js";import{P as i3,u as a3,L as YM}from"./PluginManagerFactory-cfe56166.js";import{s as s3}from"./actions-2742fbfc.js";const uo=e=>t=>{t({type:"SET_START_TIME",start:e})},qo=e=>t=>{t({type:"SET_STOP_TIME",stop:e})},A3=e=>t=>{t({type:"SET_QUERY_STEP",step:e})},iz=e=>t=>{t({type:"SET_RANGE_OPEN",rangeOpen:e})},fo=e=>t=>{t({type:"SET_TIME_RANGE_LABEL",label:e})},Cc=e=>t=>{t({type:"SET_QUERY_TIME",time:e})},Ut=e=>t=>{t({type:"SET_QUERY_HISTORY",queryHistory:e})},Ec=e=>t=>{t({type:"SET_HISTORY_OPEN",historyOpen:e})};function l3(e){return function(t){t({type:"SET_FROM_TIME",toTime:e})}}function d3(e){return function(t){t({type:"SET_TO_TIME"})}}const ae=e=>t=>{t({type:"SET_IS_EMPTY_VIEW",isEmptyView:e})};function u3(e){return function(t){t({type:"SET_RESPONSE_TYPE",responseType:e})}}const Q1=e=>t=>{t({type:"SET_RIGHT_PANEL",right:e})},n2=e=>t=>{t({type:"SET_LEFT_PANEL",left:e})},qe=e=>t=>{t({type:"SET_RIGHT_DATAVIEW",rightDataView:e})},fe=e=>t=>{t({type:"SET_LEFT_DATAVIEW",leftDataView:e})},q3=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})};function f3(e){return Yb("MuiButton",e)}const W3=Jb("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),_t=W3,h3=q.createContext({}),g3=h3,R3=q.createContext(void 0),m3=R3,L3=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],N3=e=>{const{color:t,disableElevation:M,fullWidth:b,size:o,variant:p,classes:n}=e,c={root:["root",p,`${p}${i2(t)}`,`size${i2(o)}`,`${p}Size${i2(o)}`,t==="inherit"&&"colorInherit",M&&"disableElevation",b&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${i2(o)}`],endIcon:["endIcon",`iconSize${i2(o)}`]},r=eo(c,f3,n);return I1({},n,r)},kc=e=>I1({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),v3=ue(Ei,{shouldForwardProp:e=>ki(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.root,t[M.variant],t[`${M.variant}${i2(M.color)}`],t[`size${i2(M.size)}`],t[`${M.variant}Size${i2(M.size)}`],M.color==="inherit"&&t.colorInherit,M.disableElevation&&t.disableElevation,M.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var M,b;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],p=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return I1({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":I1({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:p,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":I1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${_t.focusVisible}`]:I1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${_t.disabled}`]:I1({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ct(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(M=(b=e.palette).getContrastText)==null?void 0:M.call(b,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_t.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_t.disabled}`]:{boxShadow:"none"}}),B3=ue("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.startIcon,t[`iconSize${i2(M.size)}`]]}})(({ownerState:e})=>I1({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},kc(e))),y3=ue("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.endIcon,t[`iconSize${i2(M.size)}`]]}})(({ownerState:e})=>I1({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},kc(e))),T3=q.forwardRef(function(t,M){const b=q.useContext(g3),o=q.useContext(m3),p=_i(b,t),n=Zb({props:p,name:"MuiButton"}),{children:c,color:r="primary",component:s="button",className:O,disabled:l=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:d,focusVisibleClassName:m,fullWidth:L=!1,size:R="medium",startIcon:W,type:S,variant:N="text"}=n,x=bo(n,L3),k=I1({},n,{color:r,component:s,disabled:l,disableElevation:h,disableFocusRipple:g,fullWidth:L,size:R,type:S,variant:N}),A=N3(k),y=W&&t1.jsx(B3,{className:A.startIcon,ownerState:k,children:W}),v=d&&t1.jsx(y3,{className:A.endIcon,ownerState:k,children:d}),C=o||"";return t1.jsxs(v3,I1({ownerState:k,className:Zt(b.className,A.root,O,C),component:s,disabled:l,focusRipple:!g,focusVisibleClassName:Zt(A.focusVisible,m),ref:M,type:S},x,{classes:A,children:[y,c,v]}))}),_c=T3;function S3(e){return Yb("MuiCircularProgress",e)}Jb("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const x3=["className","color","disableShrink","size","style","thickness","value","variant"];let AM=e=>e,az,sz,Az,lz;const Q2=44,X3=Sc(az||(az=AM` +import{k as Jb,m as Yb,s as ue,B as EO,r as kO,n as O2,a as Ct,o as _O,u as Zb,c as Zt,b as eo,p as sM,q as to,D as Z1,t as t2,v as y1,d as a,g as P0,w as rc,x as ic,h as O0,f as Q0,j as P,i as h0,y as IO,I as vb,P as Oc,F as q1,z as ac,l as sc,e as I2,A as DO,C as Mo,E as PO,G as HO}from"./index-a5171272.js";import{a as I1,d as bo,m as k1,u as w0,q as $e,x as QM,y as bt,z as Zp,A as ez,B as Bb,D as yb,E as Tb,F as JM,G as jO,I as VO,J as Se,K as Ie,M as oo,Q as FO,S as q2,T as $O,U as Ac,V as lc,W as po,X as it,Y as tz,Z as dc,$ as P2,n as F2,o as W2,a0 as UO,a1 as GO,a2 as KO,a3 as QO,a4 as JO,a5 as YO,j as w2,a6 as ZO,w as h2,a7 as Et,a8 as Mz,a9 as bz,aa as ea,ab as ta,ac as Ma,ad as zo,ae as ba,af as oz,v as pz,r as oa}from"./vendor-7c97820b.js";import{r as q,c as no,g as Ue,R as z2,e as pa,b as At}from"./react-432945ee.js";import{u as co,f as za,s as na,h as ca,T as x1,C as ra,D as ro,i as io,j as ia,k as Oa,l as aa,m as sa,o as Aa,p as la,q as da,E as ua,r as Oo,t as qa,v as uc,w as qc,x as o1,b as fa,y as ot,M as Sb,z as Wa,A as fc,G as xe,H as ha,I as ga,J as Ra,K as ma,L as Xe,N as La,R as Wc,O as re,d as Na,Q as hc,U as gc,V as Rc,W as ao,X as ht,Y as va,Z as Ba,_ as mc,$ as zz,n as Y2,a as $t,a0 as Lc,a1 as ya,a2 as Ta,a3 as Sa,a4 as xa,a5 as Xa,a6 as wa,a7 as Nc,a8 as vc,a9 as Bc,aa as xb,ab as yc,P as gt,ac as Ca,ad as Ea,ae as nz,S as ka,af as _a,ag as cz}from"./consts-ac722d48.js";import{s as Tc,B as so}from"./DeleteOutlineOutlined-7018ca68.js";import{l as D1}from"./lodash-fd695a79.js";import{r as m1,i as L1,S as f2}from"./createSvgIcon-7f30e35c.js";import{j as t1,u as Ia,b as Da,H as Pa,D as Ha}from"./reactDnd-8591509b.js";import{k as Sc,d as xc,s as ja,i as Va,g as Fa,_ as $a,b as f1,S as Ao,e as Xc,j as Rt,f as wc}from"./reactSelect-eafcd993.js";import{r as Ua,f as rz,u as Ga,g as Ka,a as Qa,b as Ja,c as Ya,d as Za,e as e3,h as t3,i as M3}from"./reactTable-9f941ddf.js";import{m as Ge,d as b3,a as o3,u as iz}from"./memoize-acaceb73.js";import{w as p3,a as z3,T as n3,S as c3,E as r3,c as i3}from"./slate-25e47886.js";import{F as kt,d as mt,s as eM,e as lo}from"./AddOutlined-3054a82a.js";import{P as O3,u as a3,L as YM}from"./PluginManagerFactory-e77efc4b.js";import{s as s3}from"./actions-2742fbfc.js";const uo=e=>t=>{t({type:"SET_START_TIME",start:e})},qo=e=>t=>{t({type:"SET_STOP_TIME",stop:e})},A3=e=>t=>{t({type:"SET_QUERY_STEP",step:e})},Oz=e=>t=>{t({type:"SET_RANGE_OPEN",rangeOpen:e})},fo=e=>t=>{t({type:"SET_TIME_RANGE_LABEL",label:e})},Cc=e=>t=>{t({type:"SET_QUERY_TIME",time:e})},Ut=e=>t=>{t({type:"SET_QUERY_HISTORY",queryHistory:e})},Ec=e=>t=>{t({type:"SET_HISTORY_OPEN",historyOpen:e})};function l3(e){return function(t){t({type:"SET_FROM_TIME",toTime:e})}}function d3(e){return function(t){t({type:"SET_TO_TIME"})}}const ae=e=>t=>{t({type:"SET_IS_EMPTY_VIEW",isEmptyView:e})};function u3(e){return function(t){t({type:"SET_RESPONSE_TYPE",responseType:e})}}const Q1=e=>t=>{t({type:"SET_RIGHT_PANEL",right:e})},n2=e=>t=>{t({type:"SET_LEFT_PANEL",left:e})},qe=e=>t=>{t({type:"SET_RIGHT_DATAVIEW",rightDataView:e})},fe=e=>t=>{t({type:"SET_LEFT_DATAVIEW",leftDataView:e})},q3=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})};function f3(e){return Yb("MuiButton",e)}const W3=Jb("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),_t=W3,h3=q.createContext({}),g3=h3,R3=q.createContext(void 0),m3=R3,L3=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],N3=e=>{const{color:t,disableElevation:M,fullWidth:b,size:o,variant:p,classes:n}=e,c={root:["root",p,`${p}${O2(t)}`,`size${O2(o)}`,`${p}Size${O2(o)}`,t==="inherit"&&"colorInherit",M&&"disableElevation",b&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${O2(o)}`],endIcon:["endIcon",`iconSize${O2(o)}`]},r=eo(c,f3,n);return I1({},n,r)},kc=e=>I1({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),v3=ue(EO,{shouldForwardProp:e=>kO(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.root,t[M.variant],t[`${M.variant}${O2(M.color)}`],t[`size${O2(M.size)}`],t[`${M.variant}Size${O2(M.size)}`],M.color==="inherit"&&t.colorInherit,M.disableElevation&&t.disableElevation,M.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var M,b;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],p=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return I1({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":I1({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ct(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:p,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":I1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${_t.focusVisible}`]:I1({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${_t.disabled}`]:I1({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Ct(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(M=(b=e.palette).getContrastText)==null?void 0:M.call(b,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_t.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_t.disabled}`]:{boxShadow:"none"}}),B3=ue("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.startIcon,t[`iconSize${O2(M.size)}`]]}})(({ownerState:e})=>I1({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},kc(e))),y3=ue("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.endIcon,t[`iconSize${O2(M.size)}`]]}})(({ownerState:e})=>I1({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},kc(e))),T3=q.forwardRef(function(t,M){const b=q.useContext(g3),o=q.useContext(m3),p=_O(b,t),n=Zb({props:p,name:"MuiButton"}),{children:c,color:r="primary",component:s="button",className:i,disabled:l=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:d,focusVisibleClassName:m,fullWidth:N=!1,size:R="medium",startIcon:W,type:S,variant:L="text"}=n,x=bo(n,L3),k=I1({},n,{color:r,component:s,disabled:l,disableElevation:h,disableFocusRipple:g,fullWidth:N,size:R,type:S,variant:L}),A=N3(k),y=W&&t1.jsx(B3,{className:A.startIcon,ownerState:k,children:W}),v=d&&t1.jsx(y3,{className:A.endIcon,ownerState:k,children:d}),C=o||"";return t1.jsxs(v3,I1({ownerState:k,className:Zt(b.className,A.root,i,C),component:s,disabled:l,focusRipple:!g,focusVisibleClassName:Zt(A.focusVisible,m),ref:M,type:S},x,{classes:A,children:[y,c,v]}))}),_c=T3;function S3(e){return Yb("MuiCircularProgress",e)}Jb("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const x3=["className","color","disableShrink","size","style","thickness","value","variant"];let AM=e=>e,az,sz,Az,lz;const Q2=44,X3=Sc(az||(az=AM` 0% { transform: rotate(0deg); } @@ -21,27 +21,27 @@ import{k as Jb,m as Yb,s as ue,B as Ei,r as ki,n as i2,a as Ct,o as _i,u as Zb,c stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`)),C3=e=>{const{classes:t,variant:M,color:b,disableShrink:o}=e,p={root:["root",M,`color${i2(b)}`],svg:["svg"],circle:["circle",`circle${i2(M)}`,o&&"circleDisableShrink"]};return eo(p,S3,t)},E3=ue("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.root,t[M.variant],t[`color${i2(M.color)}`]]}})(({ownerState:e,theme:t})=>I1({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&xc(Az||(Az=AM` +`)),C3=e=>{const{classes:t,variant:M,color:b,disableShrink:o}=e,p={root:["root",M,`color${O2(b)}`],svg:["svg"],circle:["circle",`circle${O2(M)}`,o&&"circleDisableShrink"]};return eo(p,S3,t)},E3=ue("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.root,t[M.variant],t[`color${O2(M.color)}`]]}})(({ownerState:e,theme:t})=>I1({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&xc(Az||(Az=AM` animation: ${0} 1.4s linear infinite; - `),X3)),k3=ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),_3=ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.circle,t[`circle${i2(M.variant)}`],M.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>I1({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&xc(lz||(lz=AM` + `),X3)),k3=ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),_3=ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:M}=e;return[t.circle,t[`circle${O2(M.variant)}`],M.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>I1({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&xc(lz||(lz=AM` animation: ${0} 1.4s ease-in-out infinite; - `),w3)),I3=q.forwardRef(function(t,M){const b=Zb({props:t,name:"MuiCircularProgress"}),{className:o,color:p="primary",disableShrink:n=!1,size:c=40,style:r,thickness:s=3.6,value:O=0,variant:l="indeterminate"}=b,h=bo(b,x3),g=I1({},b,{color:p,disableShrink:n,size:c,thickness:s,value:O,variant:l}),d=C3(g),m={},L={},R={};if(l==="determinate"){const W=2*Math.PI*((Q2-s)/2);m.strokeDasharray=W.toFixed(3),R["aria-valuenow"]=Math.round(O),m.strokeDashoffset=`${((100-O)/100*W).toFixed(3)}px`,L.transform="rotate(-90deg)"}return t1.jsx(E3,I1({className:Zt(d.root,o),style:I1({width:c,height:c},L,r),ownerState:g,ref:M,role:"progressbar"},R,h,{children:t1.jsx(k3,{className:d.svg,ownerState:g,viewBox:`${Q2/2} ${Q2/2} ${Q2} ${Q2}`,children:t1.jsx(_3,{className:d.circle,style:m,ownerState:g,cx:Q2,cy:Q2,r:(Q2-s)/2,fill:"none",strokeWidth:s})})}))}),D3=I3,P3=q.createContext(),dz=P3;function H3(e){return Yb("MuiGrid",e)}const j3=[0,1,2,3,4,5,6,7,8,9,10],F3=["column-reverse","column","row-reverse","row"],V3=["nowrap","wrap-reverse","wrap"],pt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],lt=Jb("MuiGrid",["root","container","item","zeroMinWidth",...j3.map(e=>`spacing-xs-${e}`),...F3.map(e=>`direction-xs-${e}`),...V3.map(e=>`wrap-xs-${e}`),...pt.map(e=>`grid-xs-${e}`),...pt.map(e=>`grid-sm-${e}`),...pt.map(e=>`grid-md-${e}`),...pt.map(e=>`grid-lg-${e}`),...pt.map(e=>`grid-xl-${e}`)]),$3=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Ce(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function U3({theme:e,ownerState:t}){let M;return e.breakpoints.keys.reduce((b,o)=>{let p={};if(t[o]&&(M=t[o]),!M)return b;if(M===!0)p={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(M==="auto")p={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const n=sM({values:t.columns,breakpoints:e.breakpoints.values}),c=typeof n=="object"?n[o]:n;if(c==null)return b;const r=`${Math.round(M/c*1e8)/1e6}%`;let s={};if(t.container&&t.item&&t.columnSpacing!==0){const O=e.spacing(t.columnSpacing);if(O!=="0px"){const l=`calc(${r} + ${Ce(O)})`;s={flexBasis:l,maxWidth:l}}}p=I1({flexBasis:r,flexGrow:0,maxWidth:r},s)}return e.breakpoints.values[o]===0?Object.assign(b,p):b[e.breakpoints.up(o)]=p,b},{})}function G3({theme:e,ownerState:t}){const M=sM({values:t.direction,breakpoints:e.breakpoints.values});return to({theme:e},M,b=>{const o={flexDirection:b};return b.indexOf("column")===0&&(o[`& > .${lt.item}`]={maxWidth:"none"}),o})}function Ic({breakpoints:e,values:t}){let M="";Object.keys(t).forEach(o=>{M===""&&t[o]!==0&&(M=o)});const b=Object.keys(e).sort((o,p)=>e[o]-e[p]);return b.slice(0,b.indexOf(M))}function K3({theme:e,ownerState:t}){const{container:M,rowSpacing:b}=t;let o={};if(M&&b!==0){const p=sM({values:b,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Ic({breakpoints:e.breakpoints.values,values:p})),o=to({theme:e},p,(c,r)=>{var s;const O=e.spacing(c);return O!=="0px"?{marginTop:`-${Ce(O)}`,[`& > .${lt.item}`]:{paddingTop:Ce(O)}}:(s=n)!=null&&s.includes(r)?{}:{marginTop:0,[`& > .${lt.item}`]:{paddingTop:0}}})}return o}function Q3({theme:e,ownerState:t}){const{container:M,columnSpacing:b}=t;let o={};if(M&&b!==0){const p=sM({values:b,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Ic({breakpoints:e.breakpoints.values,values:p})),o=to({theme:e},p,(c,r)=>{var s;const O=e.spacing(c);return O!=="0px"?{width:`calc(100% + ${Ce(O)})`,marginLeft:`-${Ce(O)}`,[`& > .${lt.item}`]:{paddingLeft:Ce(O)}}:(s=n)!=null&&s.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${lt.item}`]:{paddingLeft:0}}})}return o}function J3(e,t,M={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[M[`spacing-xs-${String(e)}`]];const b=[];return t.forEach(o=>{const p=e[o];Number(p)>0&&b.push(M[`spacing-${o}-${String(p)}`])}),b}const Y3=ue("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e,{container:b,direction:o,item:p,spacing:n,wrap:c,zeroMinWidth:r,breakpoints:s}=M;let O=[];b&&(O=J3(n,s,t));const l=[];return s.forEach(h=>{const g=M[h];g&&l.push(t[`grid-${h}-${String(g)}`])}),[t.root,b&&t.container,p&&t.item,r&&t.zeroMinWidth,...O,o!=="row"&&t[`direction-xs-${String(o)}`],c!=="wrap"&&t[`wrap-xs-${String(c)}`],...l]}})(({ownerState:e})=>I1({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),G3,K3,Q3,U3);function Z3(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const M=[];return t.forEach(b=>{const o=e[b];if(Number(o)>0){const p=`spacing-${b}-${String(o)}`;M.push(p)}}),M}const es=e=>{const{classes:t,container:M,direction:b,item:o,spacing:p,wrap:n,zeroMinWidth:c,breakpoints:r}=e;let s=[];M&&(s=Z3(p,r));const O=[];r.forEach(h=>{const g=e[h];g&&O.push(`grid-${h}-${String(g)}`)});const l={root:["root",M&&"container",o&&"item",c&&"zeroMinWidth",...s,b!=="row"&&`direction-xs-${String(b)}`,n!=="wrap"&&`wrap-xs-${String(n)}`,...O]};return eo(l,H3,t)},ts=q.forwardRef(function(t,M){const b=Zb({props:t,name:"MuiGrid"}),{breakpoints:o}=co(),p=za(b),{className:n,columns:c,columnSpacing:r,component:s="div",container:O=!1,direction:l="row",item:h=!1,rowSpacing:g,spacing:d=0,wrap:m="wrap",zeroMinWidth:L=!1}=p,R=bo(p,$3),W=g||d,S=r||d,N=q.useContext(dz),x=O?c||12:N,k={},A=I1({},R);o.keys.forEach(C=>{R[C]!=null&&(k[C]=R[C],delete A[C])});const y=I1({},p,{columns:x,container:O,direction:l,item:h,rowSpacing:W,columnSpacing:S,wrap:m,zeroMinWidth:L,spacing:d},k,{breakpoints:o.keys}),v=es(y);return t1.jsx(dz.Provider,{value:x,children:t1.jsx(Y3,I1({ownerState:y,className:Zt(v.root,n),as:s,ref:M},A))})}),p2=ts;const Ms=e=>t=>{t({type:"SET_IS_EMBED",isEmbed:e})},bs=e=>t=>{t({type:"SET_URL_LOCATION",urlLocation:e})},os=e=>t=>{t({type:"SET_URL_QUERY_PARAMS",urlQueryParams:e})},De=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})},It=["step","theme","time"],ps=["label"],ZM=["left","right"],Dt=["start","stop"],Pt=["isSubmit","isSplit","autoTheme","isEmbed"];function zs(){const e=q.useMemo(()=>window.matchMedia("(prefers-color-scheme: light)").matches,[]),t=k1(),M=X0(({urlQueryParams:y})=>y),b=X0(({start:y})=>y),o=X0(({stop:y})=>y),p=X0(({label:y})=>y),n=X0(({from:y})=>y),c=X0(({to:y})=>y),r=X0(({step:y})=>y),s=X0(({isSubmit:y})=>y),O=X0(({isEmbed:y})=>y),l=X0(({time:y})=>y),h=X0(({left:y})=>y),g=X0(({right:y})=>y),d=X0(({theme:y})=>y),m=X0(({autoTheme:y})=>y),L=X0(({isSplit:y})=>y),[R,W]=q.useState(e?"light":d);q.useEffect(()=>{W(d)},[d]);const S={start:b,step:r,stop:o,label:p,from:n,to:c,time:l,isSubmit:s,isEmbed:O,theme:d,autoTheme:m,left:h,right:g,isSplit:L},N={start:uo,step:A3,stop:qo,label:fo,from:l3,to:d3,time:Cc,isSubmit:na,isEmbed:Ms,theme:Tc,left:n2,right:Q1,isSplit:De,autoTheme:ca},x=y=>(y==null?void 0:y.getTime())+"000000",k=(y,v)=>{try{let C=JSON.parse(y);return C&&C!==void 0?C:v}catch{return v}},{hash:A}=$e();q.useEffect(()=>{const y=new URLSearchParams(A.replace(/#/,""));if(A.length>0){const v=M;for(let[C,_]of y.entries())v[C]=_;Object.keys(v).length>0&&(t(os({...M,startParams:v})),t(bs(A)),Object.keys(v).forEach(C=>{if((It.includes(C)||ps.includes(C))&&v[C]!=="")t(N[C](Z1.sanitize(v[C])));else if(C==="theme")t(N[C](Z1.sanitize(R)));else if(Dt.includes(C)&&v[C]!==""){const _=v[C]/1e6,I=new Date(t2(_).format("YYYY-MM-DDTHH:mm:ss.SSSZ"));t(N[C](I))}else if(Pt.includes(C))try{const _=k(v[C],!1);t(N[C](_))}catch(_){console.log(_)}else if(ZM.includes(C))try{const _=k(decodeURIComponent(v[C]),[]);(_==null?void 0:_.length)>0&&t(N[C](_))}catch(_){console.log(_)}}))}else It.concat(Dt).concat(Pt).concat(ZM).forEach(C=>{var _,I;if(It.includes(C))y.set(C,Z1.sanitize((_=S[C])==null?void 0:_.toString()));else if(C==="theme")y.set(C,Z1.sanitize(R.toString()));else if(Dt.includes(C)){const D=((I=S[C])==null?void 0:I.getTime())*1e6;y.set(C,Z1.sanitize(D.toString()))}else if(Pt.includes(C))try{y.set(C,k(S[C],!1))}catch(D){console.log(D)}else if(ZM.includes(C))try{const D=JSON.stringify(S[C]);y.set(C,D)}catch(D){console.log(D)}}),window.location.hash=`/search/#${y}`},[]),q.useEffect(()=>{if(A.length>0){const y=new URLSearchParams(A.replace(/#/,""));let v={};for(let[C,_]of y.entries())v[C]=_;Object.keys(S).forEach(C=>{if(It.includes(C)&&v[C]!==S[C]){const _=Z1.sanitize(S[C].toString().trim());y.set(C,_)}else if(Dt.includes(C)&&v[C]!==x(S[C])){const _=x(S[C]);y.set(C,Z1.sanitize(_))}else if(Pt.includes(C)&&v[C]!==S[C])try{y.set(C,k(S[C],!1))}catch(_){console.error(_)}else if(C==="left"){const _=JSON.stringify(h);y.set("left",_)}else if(C==="right"){const _=JSON.stringify(g);y.set("right",_)}}),window.location.hash=`/search/#${y}`}},[S])}function ns(e,t,M){const{queryUrl:b,encodedQuery:o,limit:p,parsedTime:n,queryStep:c,direction:r,time:s}=t;return e==="metrics"||e==="logs"?M==="instant"?`${b}/query?query=${o}&limit=${p}&time=${s}&direction=${r}`:`${b}/query_range?query=${o}&limit=${p}${n}${c}&direction=${r}`:e==="flux"?`${b}`:e==="traces"?M==="trace-search"?`${b}${n}`:`${b}`:""}function cs(e,t,M){return ns(e,M,t)}function rs(e,t){var b;const M=((b=Object.keys(t))==null?void 0:b.length)>0?t:void 0;return e==="flux"?{method:"POST",headers:M||{Accept:"application/csv","Content-Type":"application/vnd.flux"}}:{method:"GET",headers:M||{"Content-Type":"application/json"}}}const Os=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(M,b)=>e.slice(b*t,b*t+t)),eb=(...e)=>e.filter(t=>t).join(" "),is=e=>{const t=yb(ji(e)),M=Tb(Fi(e)),b=[];for(let o=t;Se(o,M);)b.push(o),o=Bb(o,1);return b},as=({dateStart:e},t)=>e&&Ie(t,e),ss=({dateEnd:e},t)=>e&&Ie(t,e),As=({dateStart:e,dateEnd:t},M)=>e&&t&&(oo(M,{start:e,end:t})||Ie(M,e)||Ie(M,t)),ls=({dateStart:e,dateEnd:t})=>e&&t?Ie(e,t):!1,lM=e=>Wo(new Date).find(t=>t.label===e),uz=(e,t)=>{if(e instanceof Date){const M=Vi(e);if(q2(M))return M}if(e instanceof String){const M=$i(e.toString());if(q2(M))return M}else return t},ds=(e,t)=>{var b,o;const M=Math.floor(t/2);return(o=(b=Array(t))==null?void 0:b.fill(0))==null?void 0:o.map((p,n)=>(e==null?void 0:e.getFullYear())-M+n)},qz=(e,t)=>{const{dateStart:M,dateEnd:b,label:o}=e,{dateStart:p,dateEnd:n,label:c}=t;return o===c?!0:M&&p&&b&&n?tz(M,p)&&tz(b,n):!1},us=(e,t,M)=>{let{dateStart:b,dateEnd:o}=e;if(b&&o){const p=Ac([b,t]),n=lc([o,M]);return[p,po(p,n)?Ot(p,1):n]}else return[b,o]},Wo=e=>[{label:"Last 5 minutes",dateStart:QM(e,-5),dateEnd:e},{label:"Last 15 minutes",dateStart:QM(e,-15),dateEnd:e},{label:"Last 30 minutes",dateStart:QM(e,-30),dateEnd:e},{label:"Last 1 hour",dateStart:bt(e,-1),dateEnd:e},{label:"Last 3 hours",dateStart:bt(e,-3),dateEnd:e},{label:"Last 6 hours",dateStart:bt(e,-6),dateEnd:e},{label:"Last 12 hours",dateStart:bt(e,-12),dateEnd:e},{label:"Last 24 hours",dateStart:bt(e,-24),dateEnd:e},{label:"Today",dateStart:Zp(e),dateEnd:ez(e)},{label:"Yesterday",dateStart:Zp(Bb(e,-1)),dateEnd:ez(Bb(e,-1))},{label:"This Week",dateStart:yb(e),dateEnd:Tb(e)},{label:"Last Week",dateStart:yb(JM(e,-1)),dateEnd:Tb(JM(e,-1))},{label:"Last 7 Days",dateStart:JM(e,-1),dateEnd:e}];Wo(new Date);function qs(e){return e/1e6}function Z2(e){return new Date(e).getTime()+"000000"}function we(e){let t=new Date(e);return Math.round(t.getTime()/1e3)}const fs=e=>e||parseInt(new Date().getTime()+"000000"),Ws=(e,t)=>{let M=lM(e);const{dateStart:b,dateEnd:o}=M;let p,n;return t==="metrics"?(p=we(b),n=we(o)):(p=parseInt(Z2(b)),n=parseInt(Z2(o))),{pStart:p,pStop:n,dateStart:b,dateEnd:o}};function ho(e,t,M){const{time:b,from:o,to:p}=y1.getState(),n=y1.getState()[M],c=n==null?void 0:n.find(N=>N.id===t),r=c.start,s=c.stop,O=fs(b),l=c.label,h=r,g=s;let d=0,m=0;if(lM(l)){const{pStart:N,pStop:x}=Ws(l,e);e==="traces"?(d=Math.round(N/1e9),m=Math.round(x/1e9)):(d=N,m=x)}else e==="metrics"?(d=we(h),m=we(g)):e==="logs"?(d=parseInt(Z2(h)),m=parseInt(Z2(g))):e==="traces"?(d=we(h),m=we(g)):(d=parseInt(Z2(h)),m=parseInt(Z2(g)));const L="&start="+(o||d)+"&end="+(p||m),R=parseInt(o||d);return{tDiff:(parseInt(p||m)-R)/(e==="metrics"?1:1e6),time:O,parsedTime:L}}function hs(e,t,M,b,o,p="",n,c,r,s,O){const l=y1.getState(),{isSplit:h}=l,g=h?2:1,d=window.innerWidth,{parsedTime:m,time:L}=ho(e,s,O),R=p;let W=0;r>0?W=r:W=d/Math.round(d/b*10/g),W===0&&(W=1);const S=`&step=${W}`,N=`${encodeURIComponent(t)}`;let x="";switch(e){case"logs":x=`${R}/loki/api/v1`;break;case"metrics":x=`${R}/api/v1`;break;case"flux":x=`${R}/api/v2/query`;break;case"traces":x=n==="trace-search"?`${c}`:`${R}/api/traces/${t}/json`;break;default:x=`${R}/loki/api/v1`}return{queryUrl:x,encodedQuery:N,parsedTime:m,time:L,queryStep:S,limit:M,direction:o,queryType:n}}async function Xb(e){e(ae(!0))}function Dc(e){let t=[];try{for(let M of e){let b=Object.keys(M.metric);for(let o in b)t.includes(b[o])||t.push(b[o])}}catch(M){console.log(M)}return t}function wb(e){let t=[];try{for(let M of e){let b=Object.keys(M);for(let o of b)t.includes(o)||t.push(o)}}catch(M){console.log(M)}return t}function Gt(e,t="logs"){if(t==="flux"||t==="traces")try{return e}catch(M){console.log(M)}else{const M=Dc(e);try{let b=[];const o=e.length,p=M.length;for(let c=0;cc.time)}catch(b){console.log(b)}}}const gs={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}},Rs=()=>y1.getState().theme==="light"?rc:Oc,ms=e=>i0("border:none;background:none;color:",e.primaryLight,";cursor:pointer;&:hover{text-decoration:underline;}","");dc.addDefaultLocale(gs);function Ls(e){return t2(parseInt(e.getValue()+"000")).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ns(e){return e.getValue()+" ms"}function vs(e){return new dc("en-US").format(e.getValue()/1e6)}function Bs(e,t){const M=y1.dispatch,b=y1.getState()[e.panel],o=y1.getState().right,p=window.innerWidth<=1013,n=b.find(s=>s.id===e.id);e.panel==="left"&&!p&&M(De(!0));let c=JSON.parse(JSON.stringify(o));const r=JSON.parse(JSON.stringify(n));try{const s={...c[0],id:c[0].id,idRef:"Trace "+t,panel:"right",queryType:"range",dataSourceType:"traces",dataSourceId:e.dataSourceId,dataSourceURL:e.url,expr:t,limit:100,step:100,tableView:!1,chartView:!1,isShowTs:!1,isBuilder:!1,isLogsVolume:!1,browserOpen:!1,open:!0,labels:[],values:[],direction:"backwards"};M(Q1([s])),M(X2("traces",t,"range",r.limit||100,"right",s.id,"backwards",e.dataSourceId,e.url))}catch(s){console.log(s)}}function ys(e){return t2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ts(e,t="logs",M,b={}){var n,c;const o=(c=(n=y1.getState())==null?void 0:n[b.panel])==null?void 0:c.find(r=>r.id===b.id);o&&(b.dataSourceId=o.dataSourceId,b.url=o.dataSourceURL);const p=Rs();return e.length>0&&t==="traces"?e==null?void 0:e.map(r=>r.accessorKey==="durationMs"?{header:"Duration Ms",accessorKey:r.accessorKey,cell:s=>Ns(s)}:r.accessorKey==="startTimeUnixNano"?{header:"Start Time",accessorKey:r.accessorKey,cell:s=>vs(s)}:r.accessorKey==="traceID"||r.accessorKey==="traceId"?{header:"Trace Id",accessorKey:r.accessorKey,cell:s=>a("button",{onClick:O=>Bs(b,s.getValue()),className:H0(ms(p)),children:s.getValue()})}:r.accessorKey==="rootServiceName"?{header:"Service Name",accessorKey:r.accessorKey,cell:s=>s.getValue()}:r.accessorKey==="rootTraceName"?{header:"Trace Name",accessorKey:r.accessorKey,cell:s=>s.getValue()}:r):e.length>0&&t==="flux"?e==null?void 0:e.map(r=>r.accessorKey===M||r.accessorKey==="_time"?{header:"Time",accessorKey:r.accessorKey,cell:s=>ys(s)}:r):e.length>0?[{header:"Time",accessorKey:"time",cell:r=>Ls(r)},...e,{header:"Value",accessorKey:"value"}]:[]}function Kt(e,t="logs",M,b={}){const o=e==null?void 0:e.map(n=>({header:n,accessorKey:n,id:n,cell:c=>c.getValue()}));return Ts(o,t,M,b)}function tb(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function Pc(e){var O,l,h,g,d,m;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,type:n,dsType:c,raw:r}=e;let s={panel:o,id:p,type:n};if(n==="traces")try{const L=wb(t),R=W=>{const S=W[0],N=Object.entries(S);if(N){const x=N.find(([k,A])=>P2(A));return(x==null?void 0:x[0])||null}};if(L.length>0){const W=R(t),N=Kt(L,n,W,{panel:o,id:p,type:n}),x=Gt(t,n),k={columnsData:N,dataRows:x,panel:o,id:p};if((N==null?void 0:N.length)>0&&(x==null?void 0:x.length)>0){const A={id:p,type:"vector",raw:r,dsType:c,data:{tableData:k},tableData:k,total:((O=k==null?void 0:k.dataRows)==null?void 0:O.length)||0},y=tb(o),{action:v,state:C}=y,_=(l=y1.getState())==null?void 0:l[C];if(_.some(I=>I.id===A.id)){let I=[];b(v([])),I=[..._.filter(Q=>Q.id!==A.id),{...A}],b(v(I))}else{let I=[..._,A];b(v(I))}}}}catch(L){console.log(L)}else if(n==="flux")try{const L=wb(t),R=W=>{const S=W[0],N=Object.entries(S);if(N){const x=N.find(([k,A])=>P2(A));return(x==null?void 0:x[0])||null}};if(L.length>0){const W=R(t),S=Kt(L,n,W,s),N=Gt(t,n),x={columnsData:S,dataRows:N,panel:o,id:p};if((S==null?void 0:S.length)>0&&(N==null?void 0:N.length)>0){const k={id:p,type:"vector",data:{tableData:x},raw:r,dsType:c,tableData:x,total:((h=x==null?void 0:x.dataRows)==null?void 0:h.length)||0},A=tb(o),{action:y,state:v}=A,C=(g=y1.getState())==null?void 0:g[v];if(C.some(_=>_.id===k.id)){let _=[];b(y([])),_=[...C.filter(D=>D.id!==k.id),{...k}],b(y(_))}else{let _=[...C,k];b(y(_))}}}}catch(L){console.log(L)}else try{const L=Dc(t);if(L.length>0){const R=Kt(L,n,null,s),W=Gt(t),S={columnsData:R,dataRows:W,panel:o,id:p};if(R.length>0&&W.length>0){const N={id:p,type:"vector",data:{tableData:S},raw:r,dsType:c,tableData:S||{},total:((d=S==null?void 0:S.dataRows)==null?void 0:d.length)||0},x=tb(o),{action:k,state:A}=x,y=(m=y1.getState())==null?void 0:m[A];if(y.some(v=>v.id===N.id)){let v=[];b(k([])),v=[...y.filter(_=>_.id!==N.id),{...N}],b(k(v))}else{let v=[...y,N];b(k(v))}}}}catch(L){M&&console.log("🚧 getData / getting an error from rendering vector type streams"),console.log(L)}}function Hc(e){return(e==null?void 0:e.map(t=>({...t,id:V2()})))||[]}function Ss(e){return t2(e.getValue()*1e3).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function xs(e){return e.map(({metric:t,values:M})=>({metric:JSON.stringify(t),rows:M.map(([b,o])=>({time:b,metric:JSON.stringify(t),value:o})),get rowsLength(){var b;return(b=this.rows)==null?void 0:b.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function Xs(e){const t=[{header:"Time",accessorKey:"time",cell:p=>Ss(p)},{header:"Metric",accessorKey:"metric"},{header:"Value",accessorKey:"value"}],M=xs(e);let b=[];for(let p of M)b.push(p.rows);const o=D1.sortBy(b.flat(),p=>p.time);return{columnsData:t,dataRows:o,total:o.length}}function ws(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function fz(e){var l;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,raw:n,dsType:c,isLogsVolume:r}=e,s=Xs(t),O=ws(o);try{const h=Hc(t),g={id:p,type:"matrix",tableData:s,data:h,dsType:c,raw:n,total:(h==null?void 0:h.length)||0},{action:d,state:m}=O,L=(l=y1.getState())==null?void 0:l[m];if(L.some(R=>R.id===g.id)){let R=[];if(r){R=[...L];let W=R.map(S=>S.id===p?{...S,logsVolumeData:h,total:h.length}:S);b(d([])),b(d(W))}else b(d([])),R=[...L.filter(S=>S.id!==g.id),{...g}],b(d(R))}else{let R=[...L,g];b(d(R))}}catch(h){M&&console.log("🚧 getData / getting an error from rendering matrix type streams"),console.log(h)}}const Cs=e=>t=>{t({type:"SET_LOGS",logs:e})};function Es(e){return t2(parseInt(e.getValue())/1e6).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function ks(e){return e==null?void 0:e.map(({stream:t,values:M})=>({stream:`${JSON.stringify(t)}`,rows:M==null?void 0:M.map(([b,o])=>({time:b,stream:JSON.stringify(t),log:o})),get rowsLength(){var b;return((b=this==null?void 0:this.rows)==null?void 0:b.length)||0}}))}function Wz(e){return a("span",{title:e.getValue(),children:e.getValue()})}function _s(e){const t=[{id:"time",header:"Time",accessorKey:"time",cell:p=>Es(p)},{id:"stream",header:"Stream",accessorKey:"stream",cell:p=>Wz(p)},{id:"log",accessorKey:"log",header:"Log",cell:p=>Wz(p)}],M=ks(e),b=(M==null?void 0:M.length)||0;let o=[];if(b>0)for(let p of M)o.push(p.rows);return{columnsData:t,dataRows:D1.sortBy(o.flat(),p=>p.time),length:b}}function Is(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function hz(e){var W,S;const{result:t,raw:M,time:b,debugMode:o,queryType:p,panel:n,id:c,dispatch:r,dsType:s,direction:O,isLogsVolume:l}=e,h=Ys(t,O),g=Is(n),d=_s(t),m=jc(h,O);function L(N){return[].concat.apply([],N).filter(function(x,k,A){return A.indexOf(x)===k})}let R={id:c,type:"stream",tableData:{},data:[{}],raw:"[]",labels:[],total:0,isLogsVolume:l,dsType:s};if(m)try{Ks(r(Cs(m||[]))).then(()=>{m.length===0&&(o&&console.log("🚧 getData / getting no messages sorted"),r(ae(!0))),r(ae(!1))});const N=Array.from(new Set(m==null?void 0:m.map(v=>Object.keys(v.tags)))),x=L(N);R={id:c,type:"stream",dsType:s,tableData:d,data:m,isLogsVolume:l,raw:M,labels:[...x],total:(m==null?void 0:m.length)||0};const{action:k,state:A}=g,y=(W=y1.getState())==null?void 0:W[A];if(y.some(v=>v.id===R.id)){let v=[];if(l){v=[...y];let C=v.map(_=>{var I;if(_.id===c){let D=[];return _!=null&&_.logsVolumeData&&((I=_.logsVolumeData)==null?void 0:I.length)>0&&(D=[..._.logsVolumeData]),{...{...R},logsVolumeData:D}}else return _});r(k([])),r(k(C))}else{let C=[];r(k([])),C=[...y.filter(I=>I.id!==R.id),{...R}],r(k(C))}}else{let v=[...y,R];r(k(v))}p==="instant"&&r(Cc(b))}catch(N){console.log(N)}else{const{action:N,state:x}=g,k=(S=y1.getState())==null?void 0:S[x];if(k.some(A=>A.id===R.id)){let A=[];r(N([])),A=[...(k==null?void 0:k.filter(v=>v.id!==R.id))||[],{...R}],r(N(A))}else{let A=[...k,R];r(N(A))}}}function Ds(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}async function Ps(e){var O,l;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,type:n,dsType:c,queryType:r,raw:s}=e;if(r==="trace-search")await Pc(e);else try{const h={id:p,type:n,dsType:c,tableData:{},data:t,raw:s,labels:[],open:!0,total:(O=t==null?void 0:t.resourceSpans)==null?void 0:O.length},g=Ds(o),{action:d,state:m}=g,L=(l=y1.getState())==null?void 0:l[m];if(L.some(R=>R.id===h.id)){let R=[];b(d([])),R=[...L.filter(S=>S.id!==h.id),{...h}],b(d(R))}else{let R=[...L,h];b(d(R))}}catch(h){M&&console.log(" 🚧 getData / getting an error from rendering Traces type streams",h),console.log(h)}}function Hs(e){return t2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function js(e){return[{metric:{__name__:"Flux"},values:e.map(M=>Object.values(M).map((b,o)=>isNaN(+b)?null:(b instanceof Date?b.getTime()/1e3:b)+(o===0?0:"")).filter(b=>!!b))}]}function Fs(e){return e.map(({metric:t,values:M})=>({metric:JSON.stringify(t),rows:M.map(([b,o])=>({time:b,metric:JSON.stringify(t),value:o})),get rowsLength(){var b;return(b=this.rows)==null?void 0:b.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function gz(e){return a("span",{title:e.getValue(),children:e.getValue()})}function Vs(e){const t=[{accessorKey:"time",header:()=>a("span",{children:"Time"}),cell:p=>Hs(p)},{header:"Metric",cell:p=>gz(p),accessorKey:"metric"},{header:"Value",accessorKey:"value",cell:p=>gz(p)}],M=Fs(e);let b=[];for(let p of M)b.push(p.rows);const o=D1.sortBy(b.flat(),p=>p.time);return{columnsData:t,dataRows:o,total:o.length}}function $s(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function Us(e){const{result:t,panel:M,id:b,type:o}=e,p={panel:M,id:b,type:o},n=wb(e.result),r=(h=>{const g=h[0],d=Object.entries(g);if(d){const m=d.find(([L,R])=>P2(R));return(m==null?void 0:m[0])||null}})(t),s=Kt(n,o,r,p),O=Gt(t,o),l={columnsData:s,dataRows:O,panel:M,id:b};if((s==null?void 0:s.length)>0&&(O==null?void 0:O.length)>0)return l}function Gs(e){var O;let{result:t,debugMode:M,dispatch:b,panel:o,id:p,raw:n,dsType:c}=e;t=js(t);const r=Vs(t),s=$s(o);try{const l=Hc(t),h=Us(e),d={id:p,type:"vector",tableData:r,data:{chartData:l,tableData:h},dsType:c,raw:n,total:(l==null?void 0:l.length)||0},{action:m,state:L}=s,R=(O=y1.getState())==null?void 0:O[L];if(R.some(W=>W.id===d.id)){let W=[];b(m([])),W=[...R.filter(N=>N.id!==d.id),{...d}],b(m(W))}else{let W=[...R,d];b(m(W))}}catch(l){M&&console.log("🚧 getData / getting an error from rendering Flux type streams"),console.error(l)}}const{debugMode:go}=y1.getState();async function Ks(e){return await e}function jc(e,t){return t==="forward"?Qs(e):Js(e)}function Qs(e){const t=performance.now(),M=e==null?void 0:e.sort((o,p)=>o.timestamp-p.timestamp),b=performance.now()-t;return go&&console.log("🚧 getData / sorting logs took: ",b," ms"),M}function Js(e){const t=performance.now(),M=e==null?void 0:e.sort((o,p)=>p.timestamp-o.timestamp),b=performance.now()-t;return go&&console.log("🚧 getData / sorting logs took: ",b," ms"),M}function Ys(e,t="backwards"){const M=performance.now();let b=[];e==null||e.forEach(p=>{p.values.forEach(([n,c],r)=>{b.push({type:"stream",timestamp:qs(n),text:c,tags:p.stream||{},isShowTs:!0,isBuilder:!1,showLabels:!1,id:V2()})})});const o=performance.now()-M;return go&&console.log("🚧 getData / mapping logs took: ",o," ms"),jc(b,t)}async function Be(e){const{type:t}=e;switch(t){case"streams":await hz(e);break;case"vector":await Pc(e);break;case"matrix":await fz(e);break;case"scalar":await fz(e);break;case"flux":await Gs(e);break;case"traces":await Ps(e);break;default:await hz(e)}}var Fc={exports:{}};/* @license + `),w3)),I3=q.forwardRef(function(t,M){const b=Zb({props:t,name:"MuiCircularProgress"}),{className:o,color:p="primary",disableShrink:n=!1,size:c=40,style:r,thickness:s=3.6,value:i=0,variant:l="indeterminate"}=b,h=bo(b,x3),g=I1({},b,{color:p,disableShrink:n,size:c,thickness:s,value:i,variant:l}),d=C3(g),m={},N={},R={};if(l==="determinate"){const W=2*Math.PI*((Q2-s)/2);m.strokeDasharray=W.toFixed(3),R["aria-valuenow"]=Math.round(i),m.strokeDashoffset=`${((100-i)/100*W).toFixed(3)}px`,N.transform="rotate(-90deg)"}return t1.jsx(E3,I1({className:Zt(d.root,o),style:I1({width:c,height:c},N,r),ownerState:g,ref:M,role:"progressbar"},R,h,{children:t1.jsx(k3,{className:d.svg,ownerState:g,viewBox:`${Q2/2} ${Q2/2} ${Q2} ${Q2}`,children:t1.jsx(_3,{className:d.circle,style:m,ownerState:g,cx:Q2,cy:Q2,r:(Q2-s)/2,fill:"none",strokeWidth:s})})}))}),D3=I3,P3=q.createContext(),dz=P3;function H3(e){return Yb("MuiGrid",e)}const j3=[0,1,2,3,4,5,6,7,8,9,10],V3=["column-reverse","column","row-reverse","row"],F3=["nowrap","wrap-reverse","wrap"],pt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],lt=Jb("MuiGrid",["root","container","item","zeroMinWidth",...j3.map(e=>`spacing-xs-${e}`),...V3.map(e=>`direction-xs-${e}`),...F3.map(e=>`wrap-xs-${e}`),...pt.map(e=>`grid-xs-${e}`),...pt.map(e=>`grid-sm-${e}`),...pt.map(e=>`grid-md-${e}`),...pt.map(e=>`grid-lg-${e}`),...pt.map(e=>`grid-xl-${e}`)]),$3=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function Ce(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function U3({theme:e,ownerState:t}){let M;return e.breakpoints.keys.reduce((b,o)=>{let p={};if(t[o]&&(M=t[o]),!M)return b;if(M===!0)p={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(M==="auto")p={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const n=sM({values:t.columns,breakpoints:e.breakpoints.values}),c=typeof n=="object"?n[o]:n;if(c==null)return b;const r=`${Math.round(M/c*1e8)/1e6}%`;let s={};if(t.container&&t.item&&t.columnSpacing!==0){const i=e.spacing(t.columnSpacing);if(i!=="0px"){const l=`calc(${r} + ${Ce(i)})`;s={flexBasis:l,maxWidth:l}}}p=I1({flexBasis:r,flexGrow:0,maxWidth:r},s)}return e.breakpoints.values[o]===0?Object.assign(b,p):b[e.breakpoints.up(o)]=p,b},{})}function G3({theme:e,ownerState:t}){const M=sM({values:t.direction,breakpoints:e.breakpoints.values});return to({theme:e},M,b=>{const o={flexDirection:b};return b.indexOf("column")===0&&(o[`& > .${lt.item}`]={maxWidth:"none"}),o})}function Ic({breakpoints:e,values:t}){let M="";Object.keys(t).forEach(o=>{M===""&&t[o]!==0&&(M=o)});const b=Object.keys(e).sort((o,p)=>e[o]-e[p]);return b.slice(0,b.indexOf(M))}function K3({theme:e,ownerState:t}){const{container:M,rowSpacing:b}=t;let o={};if(M&&b!==0){const p=sM({values:b,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Ic({breakpoints:e.breakpoints.values,values:p})),o=to({theme:e},p,(c,r)=>{var s;const i=e.spacing(c);return i!=="0px"?{marginTop:`-${Ce(i)}`,[`& > .${lt.item}`]:{paddingTop:Ce(i)}}:(s=n)!=null&&s.includes(r)?{}:{marginTop:0,[`& > .${lt.item}`]:{paddingTop:0}}})}return o}function Q3({theme:e,ownerState:t}){const{container:M,columnSpacing:b}=t;let o={};if(M&&b!==0){const p=sM({values:b,breakpoints:e.breakpoints.values});let n;typeof p=="object"&&(n=Ic({breakpoints:e.breakpoints.values,values:p})),o=to({theme:e},p,(c,r)=>{var s;const i=e.spacing(c);return i!=="0px"?{width:`calc(100% + ${Ce(i)})`,marginLeft:`-${Ce(i)}`,[`& > .${lt.item}`]:{paddingLeft:Ce(i)}}:(s=n)!=null&&s.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${lt.item}`]:{paddingLeft:0}}})}return o}function J3(e,t,M={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[M[`spacing-xs-${String(e)}`]];const b=[];return t.forEach(o=>{const p=e[o];Number(p)>0&&b.push(M[`spacing-${o}-${String(p)}`])}),b}const Y3=ue("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:M}=e,{container:b,direction:o,item:p,spacing:n,wrap:c,zeroMinWidth:r,breakpoints:s}=M;let i=[];b&&(i=J3(n,s,t));const l=[];return s.forEach(h=>{const g=M[h];g&&l.push(t[`grid-${h}-${String(g)}`])}),[t.root,b&&t.container,p&&t.item,r&&t.zeroMinWidth,...i,o!=="row"&&t[`direction-xs-${String(o)}`],c!=="wrap"&&t[`wrap-xs-${String(c)}`],...l]}})(({ownerState:e})=>I1({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),G3,K3,Q3,U3);function Z3(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const M=[];return t.forEach(b=>{const o=e[b];if(Number(o)>0){const p=`spacing-${b}-${String(o)}`;M.push(p)}}),M}const es=e=>{const{classes:t,container:M,direction:b,item:o,spacing:p,wrap:n,zeroMinWidth:c,breakpoints:r}=e;let s=[];M&&(s=Z3(p,r));const i=[];r.forEach(h=>{const g=e[h];g&&i.push(`grid-${h}-${String(g)}`)});const l={root:["root",M&&"container",o&&"item",c&&"zeroMinWidth",...s,b!=="row"&&`direction-xs-${String(b)}`,n!=="wrap"&&`wrap-xs-${String(n)}`,...i]};return eo(l,H3,t)},ts=q.forwardRef(function(t,M){const b=Zb({props:t,name:"MuiGrid"}),{breakpoints:o}=co(),p=za(b),{className:n,columns:c,columnSpacing:r,component:s="div",container:i=!1,direction:l="row",item:h=!1,rowSpacing:g,spacing:d=0,wrap:m="wrap",zeroMinWidth:N=!1}=p,R=bo(p,$3),W=g||d,S=r||d,L=q.useContext(dz),x=i?c||12:L,k={},A=I1({},R);o.keys.forEach(C=>{R[C]!=null&&(k[C]=R[C],delete A[C])});const y=I1({},p,{columns:x,container:i,direction:l,item:h,rowSpacing:W,columnSpacing:S,wrap:m,zeroMinWidth:N,spacing:d},k,{breakpoints:o.keys}),v=es(y);return t1.jsx(dz.Provider,{value:x,children:t1.jsx(Y3,I1({ownerState:y,className:Zt(v.root,n),as:s,ref:M},A))})}),p2=ts;const Ms=e=>t=>{t({type:"SET_IS_EMBED",isEmbed:e})},bs=e=>t=>{t({type:"SET_URL_LOCATION",urlLocation:e})},os=e=>t=>{t({type:"SET_URL_QUERY_PARAMS",urlQueryParams:e})},De=e=>t=>{t({type:"SET_SPLIT_VIEW",isSplit:e})},It=["step","theme","time"],ps=["label"],ZM=["left","right"],Dt=["start","stop"],Pt=["isSubmit","isSplit","autoTheme","isEmbed"];function zs(){const e=q.useMemo(()=>window.matchMedia("(prefers-color-scheme: light)").matches,[]),t=k1(),M=w0(({urlQueryParams:y})=>y),b=w0(({start:y})=>y),o=w0(({stop:y})=>y),p=w0(({label:y})=>y),n=w0(({from:y})=>y),c=w0(({to:y})=>y),r=w0(({step:y})=>y),s=w0(({isSubmit:y})=>y),i=w0(({isEmbed:y})=>y),l=w0(({time:y})=>y),h=w0(({left:y})=>y),g=w0(({right:y})=>y),d=w0(({theme:y})=>y),m=w0(({autoTheme:y})=>y),N=w0(({isSplit:y})=>y),[R,W]=q.useState(e?"light":d);q.useEffect(()=>{W(d)},[d]);const S={start:b,step:r,stop:o,label:p,from:n,to:c,time:l,isSubmit:s,isEmbed:i,theme:d,autoTheme:m,left:h,right:g,isSplit:N},L={start:uo,step:A3,stop:qo,label:fo,from:l3,to:d3,time:Cc,isSubmit:na,isEmbed:Ms,theme:Tc,left:n2,right:Q1,isSplit:De,autoTheme:ca},x=y=>(y==null?void 0:y.getTime())+"000000",k=(y,v)=>{try{let C=JSON.parse(y);return C&&C!==void 0?C:v}catch{return v}},{hash:A}=$e();q.useEffect(()=>{const y=new URLSearchParams(A.replace(/#/,""));if(A.length>0){const v=M;for(let[C,_]of y.entries())v[C]=_;Object.keys(v).length>0&&(t(os({...M,startParams:v})),t(bs(A)),Object.keys(v).forEach(C=>{if((It.includes(C)||ps.includes(C))&&v[C]!=="")t(L[C](Z1.sanitize(v[C])));else if(C==="theme")t(L[C](Z1.sanitize(R)));else if(Dt.includes(C)&&v[C]!==""){const _=v[C]/1e6,I=new Date(t2(_).format("YYYY-MM-DDTHH:mm:ss.SSSZ"));t(L[C](I))}else if(Pt.includes(C))try{const _=k(v[C],!1);t(L[C](_))}catch(_){console.log(_)}else if(ZM.includes(C))try{const _=k(decodeURIComponent(v[C]),[]);(_==null?void 0:_.length)>0&&t(L[C](_))}catch(_){console.log(_)}}))}else It.concat(Dt).concat(Pt).concat(ZM).forEach(C=>{var _,I;if(It.includes(C))y.set(C,Z1.sanitize((_=S[C])==null?void 0:_.toString()));else if(C==="theme")y.set(C,Z1.sanitize(R.toString()));else if(Dt.includes(C)){const D=((I=S[C])==null?void 0:I.getTime())*1e6;y.set(C,Z1.sanitize(D.toString()))}else if(Pt.includes(C))try{y.set(C,k(S[C],!1))}catch(D){console.log(D)}else if(ZM.includes(C))try{const D=JSON.stringify(S[C]);y.set(C,D)}catch(D){console.log(D)}}),window.location.hash=`/search/#${y}`},[]),q.useEffect(()=>{if(A.length>0){const y=new URLSearchParams(A.replace(/#/,""));let v={};for(let[C,_]of y.entries())v[C]=_;Object.keys(S).forEach(C=>{if(It.includes(C)&&v[C]!==S[C]){const _=Z1.sanitize(S[C].toString().trim());y.set(C,_)}else if(Dt.includes(C)&&v[C]!==x(S[C])){const _=x(S[C]);y.set(C,Z1.sanitize(_))}else if(Pt.includes(C)&&v[C]!==S[C])try{y.set(C,k(S[C],!1))}catch(_){console.error(_)}else if(C==="left"){const _=JSON.stringify(h);y.set("left",_)}else if(C==="right"){const _=JSON.stringify(g);y.set("right",_)}}),window.location.hash=`/search/#${y}`}},[S])}function ns(e,t,M){const{queryUrl:b,encodedQuery:o,limit:p,parsedTime:n,queryStep:c,direction:r,time:s}=t;return e==="metrics"||e==="logs"?M==="instant"?`${b}/query?query=${o}&limit=${p}&time=${s}&direction=${r}`:`${b}/query_range?query=${o}&limit=${p}${n}${c}&direction=${r}`:e==="flux"?`${b}`:e==="traces"?M==="trace-search"?`${b}${n}`:`${b}`:""}function cs(e,t,M){return ns(e,M,t)}function rs(e,t){var b;const M=((b=Object.keys(t))==null?void 0:b.length)>0?t:void 0;return e==="flux"?{method:"POST",headers:M||{Accept:"application/csv","Content-Type":"application/vnd.flux"}}:{method:"GET",headers:M||{"Content-Type":"application/json"}}}const is=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(M,b)=>e.slice(b*t,b*t+t)),eb=(...e)=>e.filter(t=>t).join(" "),Os=e=>{const t=yb(jO(e)),M=Tb(VO(e)),b=[];for(let o=t;Se(o,M);)b.push(o),o=Bb(o,1);return b},as=({dateStart:e},t)=>e&&Ie(t,e),ss=({dateEnd:e},t)=>e&&Ie(t,e),As=({dateStart:e,dateEnd:t},M)=>e&&t&&(oo(M,{start:e,end:t})||Ie(M,e)||Ie(M,t)),ls=({dateStart:e,dateEnd:t})=>e&&t?Ie(e,t):!1,lM=e=>Wo(new Date).find(t=>t.label===e),uz=(e,t)=>{if(e instanceof Date){const M=FO(e);if(q2(M))return M}if(e instanceof String){const M=$O(e.toString());if(q2(M))return M}else return t},ds=(e,t)=>{var b,o;const M=Math.floor(t/2);return(o=(b=Array(t))==null?void 0:b.fill(0))==null?void 0:o.map((p,n)=>(e==null?void 0:e.getFullYear())-M+n)},qz=(e,t)=>{const{dateStart:M,dateEnd:b,label:o}=e,{dateStart:p,dateEnd:n,label:c}=t;return o===c?!0:M&&p&&b&&n?tz(M,p)&&tz(b,n):!1},us=(e,t,M)=>{let{dateStart:b,dateEnd:o}=e;if(b&&o){const p=Ac([b,t]),n=lc([o,M]);return[p,po(p,n)?it(p,1):n]}else return[b,o]},Wo=e=>[{label:"Last 5 minutes",dateStart:QM(e,-5),dateEnd:e},{label:"Last 15 minutes",dateStart:QM(e,-15),dateEnd:e},{label:"Last 30 minutes",dateStart:QM(e,-30),dateEnd:e},{label:"Last 1 hour",dateStart:bt(e,-1),dateEnd:e},{label:"Last 3 hours",dateStart:bt(e,-3),dateEnd:e},{label:"Last 6 hours",dateStart:bt(e,-6),dateEnd:e},{label:"Last 12 hours",dateStart:bt(e,-12),dateEnd:e},{label:"Last 24 hours",dateStart:bt(e,-24),dateEnd:e},{label:"Today",dateStart:Zp(e),dateEnd:ez(e)},{label:"Yesterday",dateStart:Zp(Bb(e,-1)),dateEnd:ez(Bb(e,-1))},{label:"This Week",dateStart:yb(e),dateEnd:Tb(e)},{label:"Last Week",dateStart:yb(JM(e,-1)),dateEnd:Tb(JM(e,-1))},{label:"Last 7 Days",dateStart:JM(e,-1),dateEnd:e}];Wo(new Date);function qs(e){return e/1e6}function Z2(e){return new Date(e).getTime()+"000000"}function we(e){let t=new Date(e);return Math.round(t.getTime()/1e3)}const fs=e=>e||parseInt(new Date().getTime()+"000000"),Ws=(e,t)=>{let M=lM(e);const{dateStart:b,dateEnd:o}=M;let p,n;return t==="metrics"?(p=we(b),n=we(o)):(p=parseInt(Z2(b)),n=parseInt(Z2(o))),{pStart:p,pStop:n,dateStart:b,dateEnd:o}};function ho(e,t,M){const{time:b,from:o,to:p}=y1.getState(),n=y1.getState()[M],c=n==null?void 0:n.find(L=>L.id===t),r=c.start,s=c.stop,i=fs(b),l=c.label,h=r,g=s;let d=0,m=0;if(lM(l)){const{pStart:L,pStop:x}=Ws(l,e);e==="traces"?(d=Math.round(L/1e9),m=Math.round(x/1e9)):(d=L,m=x)}else e==="metrics"?(d=we(h),m=we(g)):e==="logs"?(d=parseInt(Z2(h)),m=parseInt(Z2(g))):e==="traces"?(d=we(h),m=we(g)):(d=parseInt(Z2(h)),m=parseInt(Z2(g)));const N="&start="+(o||d)+"&end="+(p||m),R=parseInt(o||d);return{tDiff:(parseInt(p||m)-R)/(e==="metrics"?1:1e6),time:i,parsedTime:N}}function hs(e,t,M,b,o,p="",n,c,r,s,i){const l=y1.getState(),{isSplit:h}=l,g=h?2:1,d=window.innerWidth,{parsedTime:m,time:N}=ho(e,s,i),R=p;let W=0;r>0?W=r:W=d/Math.round(d/b*10/g),W===0&&(W=1);const S=`&step=${W}`,L=`${encodeURIComponent(t)}`;let x="";switch(e){case"logs":x=`${R}/loki/api/v1`;break;case"metrics":x=`${R}/api/v1`;break;case"flux":x=`${R}/api/v2/query`;break;case"traces":x=n==="trace-search"?`${c}`:`${R}/api/traces/${t}/json`;break;default:x=`${R}/loki/api/v1`}return{queryUrl:x,encodedQuery:L,parsedTime:m,time:N,queryStep:S,limit:M,direction:o,queryType:n}}async function Xb(e){e(ae(!0))}function Dc(e){let t=[];try{for(let M of e){let b=Object.keys(M.metric);for(let o in b)t.includes(b[o])||t.push(b[o])}}catch(M){console.log(M)}return t}function wb(e){let t=[];try{for(let M of e){let b=Object.keys(M);for(let o of b)t.includes(o)||t.push(o)}}catch(M){console.log(M)}return t}function Gt(e,t="logs"){if(t==="flux"||t==="traces")try{return e}catch(M){console.log(M)}else{const M=Dc(e);try{let b=[];const o=e.length,p=M.length;for(let c=0;cc.time)}catch(b){console.log(b)}}}const gs={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}},Rs=()=>y1.getState().theme==="light"?rc:ic,ms=e=>O0("border:none;background:none;color:",e.primaryLight,";cursor:pointer;&:hover{text-decoration:underline;}","");dc.addDefaultLocale(gs);function Ls(e){return t2(parseInt(e.getValue()+"000")).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ns(e){return e.getValue()+" ms"}function vs(e){return new dc("en-US").format(e.getValue()/1e6)}function Bs(e,t){const M=y1.dispatch,b=y1.getState()[e.panel],o=y1.getState().right,p=window.innerWidth<=1013,n=b.find(s=>s.id===e.id);e.panel==="left"&&!p&&M(De(!0));let c=JSON.parse(JSON.stringify(o));const r=JSON.parse(JSON.stringify(n));try{const s={...c[0],id:c[0].id,idRef:"Trace "+t,panel:"right",queryType:"range",dataSourceType:"traces",dataSourceId:e.dataSourceId,dataSourceURL:e.url,expr:t,limit:100,step:100,tableView:!1,chartView:!1,isShowTs:!1,isBuilder:!1,isLogsVolume:!1,browserOpen:!1,open:!0,labels:[],values:[],direction:"backwards"};M(Q1([s])),M(X2("traces",t,"range",r.limit||100,"right",s.id,"backwards",e.dataSourceId,e.url))}catch(s){console.log(s)}}function ys(e){return t2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function Ts(e,t="logs",M,b={}){var n,c;const o=(c=(n=y1.getState())==null?void 0:n[b.panel])==null?void 0:c.find(r=>r.id===b.id);o&&(b.dataSourceId=o.dataSourceId,b.url=o.dataSourceURL);const p=Rs();return e.length>0&&t==="traces"?e==null?void 0:e.map(r=>r.accessorKey==="durationMs"?{header:"Duration Ms",accessorKey:r.accessorKey,cell:s=>Ns(s)}:r.accessorKey==="startTimeUnixNano"?{header:"Start Time",accessorKey:r.accessorKey,cell:s=>vs(s)}:r.accessorKey==="traceID"||r.accessorKey==="traceId"?{header:"Trace Id",accessorKey:r.accessorKey,cell:s=>a("button",{onClick:i=>Bs(b,s.getValue()),className:P0(ms(p)),children:s.getValue()})}:r.accessorKey==="rootServiceName"?{header:"Service Name",accessorKey:r.accessorKey,cell:s=>s.getValue()}:r.accessorKey==="rootTraceName"?{header:"Trace Name",accessorKey:r.accessorKey,cell:s=>s.getValue()}:r):e.length>0&&t==="flux"?e==null?void 0:e.map(r=>r.accessorKey===M||r.accessorKey==="_time"?{header:"Time",accessorKey:r.accessorKey,cell:s=>ys(s)}:r):e.length>0?[{header:"Time",accessorKey:"time",cell:r=>Ls(r)},...e,{header:"Value",accessorKey:"value"}]:[]}function Kt(e,t="logs",M,b={}){const o=e==null?void 0:e.map(n=>({header:n,accessorKey:n,id:n,cell:c=>c.getValue()}));return Ts(o,t,M,b)}function tb(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function Pc(e){var i,l,h,g,d,m;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,type:n,dsType:c,raw:r}=e;let s={panel:o,id:p,type:n};if(n==="traces")try{const N=wb(t),R=W=>{const S=W[0],L=Object.entries(S);if(L){const x=L.find(([k,A])=>P2(A));return(x==null?void 0:x[0])||null}};if(N.length>0){const W=R(t),L=Kt(N,n,W,{panel:o,id:p,type:n}),x=Gt(t,n),k={columnsData:L,dataRows:x,panel:o,id:p};if((L==null?void 0:L.length)>0&&(x==null?void 0:x.length)>0){const A={id:p,type:"vector",raw:r,dsType:c,data:{tableData:k},tableData:k,total:((i=k==null?void 0:k.dataRows)==null?void 0:i.length)||0},y=tb(o),{action:v,state:C}=y,_=(l=y1.getState())==null?void 0:l[C];if(_.some(I=>I.id===A.id)){let I=[];b(v([])),I=[..._.filter(Q=>Q.id!==A.id),{...A}],b(v(I))}else{let I=[..._,A];b(v(I))}}}}catch(N){console.log(N)}else if(n==="flux")try{const N=wb(t),R=W=>{const S=W[0],L=Object.entries(S);if(L){const x=L.find(([k,A])=>P2(A));return(x==null?void 0:x[0])||null}};if(N.length>0){const W=R(t),S=Kt(N,n,W,s),L=Gt(t,n),x={columnsData:S,dataRows:L,panel:o,id:p};if((S==null?void 0:S.length)>0&&(L==null?void 0:L.length)>0){const k={id:p,type:"vector",data:{tableData:x},raw:r,dsType:c,tableData:x,total:((h=x==null?void 0:x.dataRows)==null?void 0:h.length)||0},A=tb(o),{action:y,state:v}=A,C=(g=y1.getState())==null?void 0:g[v];if(C.some(_=>_.id===k.id)){let _=[];b(y([])),_=[...C.filter(D=>D.id!==k.id),{...k}],b(y(_))}else{let _=[...C,k];b(y(_))}}}}catch(N){console.log(N)}else try{const N=Dc(t);if(N.length>0){const R=Kt(N,n,null,s),W=Gt(t),S={columnsData:R,dataRows:W,panel:o,id:p};if(R.length>0&&W.length>0){const L={id:p,type:"vector",data:{tableData:S},raw:r,dsType:c,tableData:S||{},total:((d=S==null?void 0:S.dataRows)==null?void 0:d.length)||0},x=tb(o),{action:k,state:A}=x,y=(m=y1.getState())==null?void 0:m[A];if(y.some(v=>v.id===L.id)){let v=[];b(k([])),v=[...y.filter(_=>_.id!==L.id),{...L}],b(k(v))}else{let v=[...y,L];b(k(v))}}}}catch(N){M&&console.log("🚧 getData / getting an error from rendering vector type streams"),console.log(N)}}function Hc(e){return(e==null?void 0:e.map(t=>({...t,id:F2()})))||[]}function Ss(e){return t2(e.getValue()*1e3).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function xs(e){return e.map(({metric:t,values:M})=>({metric:JSON.stringify(t),rows:M.map(([b,o])=>({time:b,metric:JSON.stringify(t),value:o})),get rowsLength(){var b;return(b=this.rows)==null?void 0:b.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function Xs(e){const t=[{header:"Time",accessorKey:"time",cell:p=>Ss(p)},{header:"Metric",accessorKey:"metric"},{header:"Value",accessorKey:"value"}],M=xs(e);let b=[];for(let p of M)b.push(p.rows);const o=D1.sortBy(b.flat(),p=>p.time);return{columnsData:t,dataRows:o,total:o.length}}function ws(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function fz(e){var l;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,raw:n,dsType:c,isLogsVolume:r}=e,s=Xs(t),i=ws(o);try{const h=Hc(t),g={id:p,type:"matrix",tableData:s,data:h,dsType:c,raw:n,total:(h==null?void 0:h.length)||0},{action:d,state:m}=i,N=(l=y1.getState())==null?void 0:l[m];if(N.some(R=>R.id===g.id)){let R=[];if(r){R=[...N];let W=R.map(S=>S.id===p?{...S,logsVolumeData:h,total:h.length}:S);b(d([])),b(d(W))}else b(d([])),R=[...N.filter(S=>S.id!==g.id),{...g}],b(d(R))}else{let R=[...N,g];b(d(R))}}catch(h){M&&console.log("🚧 getData / getting an error from rendering matrix type streams"),console.log(h)}}const Cs=e=>t=>{t({type:"SET_LOGS",logs:e})};function Es(e){return t2(parseInt(e.getValue())/1e6).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function ks(e){return e==null?void 0:e.map(({stream:t,values:M})=>({stream:`${JSON.stringify(t)}`,rows:M==null?void 0:M.map(([b,o])=>({time:b,stream:JSON.stringify(t),log:o})),get rowsLength(){var b;return((b=this==null?void 0:this.rows)==null?void 0:b.length)||0}}))}function Wz(e){return a("span",{title:e.getValue(),children:e.getValue()})}function _s(e){const t=[{id:"time",header:"Time",accessorKey:"time",cell:p=>Es(p)},{id:"stream",header:"Stream",accessorKey:"stream",cell:p=>Wz(p)},{id:"log",accessorKey:"log",header:"Log",cell:p=>Wz(p)}],M=ks(e),b=(M==null?void 0:M.length)||0;let o=[];if(b>0)for(let p of M)o.push(p.rows);return{columnsData:t,dataRows:D1.sortBy(o.flat(),p=>p.time),length:b}}function Is(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function hz(e){var W,S;const{result:t,raw:M,time:b,debugMode:o,queryType:p,panel:n,id:c,dispatch:r,dsType:s,direction:i,isLogsVolume:l}=e,h=Ys(t,i),g=Is(n),d=_s(t),m=jc(h,i);function N(L){return[].concat.apply([],L).filter(function(x,k,A){return A.indexOf(x)===k})}let R={id:c,type:"stream",tableData:{},data:[{}],raw:"[]",labels:[],total:0,isLogsVolume:l,dsType:s};if(m)try{Ks(r(Cs(m||[]))).then(()=>{m.length===0&&(o&&console.log("🚧 getData / getting no messages sorted"),r(ae(!0))),r(ae(!1))});const L=Array.from(new Set(m==null?void 0:m.map(v=>Object.keys(v.tags)))),x=N(L);R={id:c,type:"stream",dsType:s,tableData:d,data:m,isLogsVolume:l,raw:M,labels:[...x],total:(m==null?void 0:m.length)||0};const{action:k,state:A}=g,y=(W=y1.getState())==null?void 0:W[A];if(y.some(v=>v.id===R.id)){let v=[];if(l){v=[...y];let C=v.map(_=>{var I;if(_.id===c){let D=[];return _!=null&&_.logsVolumeData&&((I=_.logsVolumeData)==null?void 0:I.length)>0&&(D=[..._.logsVolumeData]),{...{...R},logsVolumeData:D}}else return _});r(k([])),r(k(C))}else{let C=[];r(k([])),C=[...y.filter(I=>I.id!==R.id),{...R}],r(k(C))}}else{let v=[...y,R];r(k(v))}p==="instant"&&r(Cc(b))}catch(L){console.log(L)}else{const{action:L,state:x}=g,k=(S=y1.getState())==null?void 0:S[x];if(k.some(A=>A.id===R.id)){let A=[];r(L([])),A=[...(k==null?void 0:k.filter(v=>v.id!==R.id))||[],{...R}],r(L(A))}else{let A=[...k,R];r(L(A))}}}function Ds(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}async function Ps(e){var i,l;const{result:t,debugMode:M,dispatch:b,panel:o,id:p,type:n,dsType:c,queryType:r,raw:s}=e;if(r==="trace-search")await Pc(e);else try{const h={id:p,type:n,dsType:c,tableData:{},data:t,raw:s,labels:[],open:!0,total:(i=t==null?void 0:t.resourceSpans)==null?void 0:i.length},g=Ds(o),{action:d,state:m}=g,N=(l=y1.getState())==null?void 0:l[m];if(N.some(R=>R.id===h.id)){let R=[];b(d([])),R=[...N.filter(S=>S.id!==h.id),{...h}],b(d(R))}else{let R=[...N,h];b(d(R))}}catch(h){M&&console.log(" 🚧 getData / getting an error from rendering Traces type streams",h),console.log(h)}}function Hs(e){return t2(e.getValue()).format("YYYY-MM-DDTHH:mm:ss.SSZ")}function js(e){return[{metric:{__name__:"Flux"},values:e.map(M=>Object.values(M).map((b,o)=>isNaN(+b)?null:(b instanceof Date?b.getTime()/1e3:b)+(o===0?0:"")).filter(b=>!!b))}]}function Vs(e){return e.map(({metric:t,values:M})=>({metric:JSON.stringify(t),rows:M.map(([b,o])=>({time:b,metric:JSON.stringify(t),value:o})),get rowsLength(){var b;return(b=this.rows)==null?void 0:b.length},get title(){return`'${this.metric}' (${this.rowsLength})`}}))}function gz(e){return a("span",{title:e.getValue(),children:e.getValue()})}function Fs(e){const t=[{accessorKey:"time",header:()=>a("span",{children:"Time"}),cell:p=>Hs(p)},{header:"Metric",cell:p=>gz(p),accessorKey:"metric"},{header:"Value",accessorKey:"value",cell:p=>gz(p)}],M=Vs(e);let b=[];for(let p of M)b.push(p.rows);const o=D1.sortBy(b.flat(),p=>p.time);return{columnsData:t,dataRows:o,total:o.length}}function $s(e){return e==="left"?{state:"leftDataView",action:fe}:{state:"rightDataView",action:qe}}function Us(e){const{result:t,panel:M,id:b,type:o}=e,p={panel:M,id:b,type:o},n=wb(e.result),r=(h=>{const g=h[0],d=Object.entries(g);if(d){const m=d.find(([N,R])=>P2(R));return(m==null?void 0:m[0])||null}})(t),s=Kt(n,o,r,p),i=Gt(t,o),l={columnsData:s,dataRows:i,panel:M,id:b};if((s==null?void 0:s.length)>0&&(i==null?void 0:i.length)>0)return l}function Gs(e){var i;let{result:t,debugMode:M,dispatch:b,panel:o,id:p,raw:n,dsType:c}=e;t=js(t);const r=Fs(t),s=$s(o);try{const l=Hc(t),h=Us(e),d={id:p,type:"vector",tableData:r,data:{chartData:l,tableData:h},dsType:c,raw:n,total:(l==null?void 0:l.length)||0},{action:m,state:N}=s,R=(i=y1.getState())==null?void 0:i[N];if(R.some(W=>W.id===d.id)){let W=[];b(m([])),W=[...R.filter(L=>L.id!==d.id),{...d}],b(m(W))}else{let W=[...R,d];b(m(W))}}catch(l){M&&console.log("🚧 getData / getting an error from rendering Flux type streams"),console.error(l)}}const{debugMode:go}=y1.getState();async function Ks(e){return await e}function jc(e,t){return t==="forward"?Qs(e):Js(e)}function Qs(e){const t=performance.now(),M=e==null?void 0:e.sort((o,p)=>o.timestamp-p.timestamp),b=performance.now()-t;return go&&console.log("🚧 getData / sorting logs took: ",b," ms"),M}function Js(e){const t=performance.now(),M=e==null?void 0:e.sort((o,p)=>p.timestamp-o.timestamp),b=performance.now()-t;return go&&console.log("🚧 getData / sorting logs took: ",b," ms"),M}function Ys(e,t="backwards"){const M=performance.now();let b=[];e==null||e.forEach(p=>{p.values.forEach(([n,c],r)=>{b.push({type:"stream",timestamp:qs(n),text:c,tags:p.stream||{},isShowTs:!0,isBuilder:!1,showLabels:!1,id:F2()})})});const o=performance.now()-M;return go&&console.log("🚧 getData / mapping logs took: ",o," ms"),jc(b,t)}async function Be(e){const{type:t}=e;switch(t){case"streams":await hz(e);break;case"vector":await Pc(e);break;case"matrix":await fz(e);break;case"scalar":await fz(e);break;case"flux":await Gs(e);break;case"traces":await Ps(e);break;default:await hz(e)}}var Vc={exports:{}};/* @license Papa Parse v5.4.1 https://github.com/mholt/PapaParse License: MIT -*/(function(e,t){(function(M,b){e.exports=b()})(no,function M(){var b=typeof self<"u"?self:typeof window<"u"?window:b!==void 0?b:{},o=!b.document&&!!b.postMessage,p=b.IS_PAPA_WORKER||!1,n={},c=0,r={parse:function(y,v){var C=(v=v||{}).dynamicTyping||!1;if(A(C)&&(v.dynamicTypingFunction=C,C={}),v.dynamicTyping=C,v.transform=!!A(v.transform)&&v.transform,v.worker&&r.WORKERS_SUPPORTED){var _=function(){if(!r.WORKERS_SUPPORTED)return!1;var D=(z0=b.URL||b.webkitURL||null,o0=M.toString(),r.BLOB_URL||(r.BLOB_URL=z0.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",o0,")();"],{type:"text/javascript"})))),Q=new b.Worker(D),z0,o0;return Q.onmessage=W,Q.id=c++,n[Q.id]=Q}();return _.userStep=v.step,_.userChunk=v.chunk,_.userComplete=v.complete,_.userError=v.error,v.step=A(v.step),v.chunk=A(v.chunk),v.complete=A(v.complete),v.error=A(v.error),delete v.worker,void _.postMessage({input:y,config:v,workerId:_.id})}var I=null;return r.NODE_STREAM_INPUT,typeof y=="string"?(y=function(D){return D.charCodeAt(0)===65279?D.slice(1):D}(y),I=v.download?new l(v):new g(v)):y.readable===!0&&A(y.read)&&A(y.on)?I=new d(v):(b.File&&y instanceof File||y instanceof Object)&&(I=new h(v)),I.stream(y)},unparse:function(y,v){var C=!1,_=!0,I=",",D=`\r -`,Q='"',z0=Q+Q,o0=!1,t0=null,N0=!1;(function(){if(typeof v=="object"){if(typeof v.delimiter!="string"||r.BAD_DELIMITERS.filter(function(f0){return v.delimiter.indexOf(f0)!==-1}).length||(I=v.delimiter),(typeof v.quotes=="boolean"||typeof v.quotes=="function"||Array.isArray(v.quotes))&&(C=v.quotes),typeof v.skipEmptyLines!="boolean"&&typeof v.skipEmptyLines!="string"||(o0=v.skipEmptyLines),typeof v.newline=="string"&&(D=v.newline),typeof v.quoteChar=="string"&&(Q=v.quoteChar),typeof v.header=="boolean"&&(_=v.header),Array.isArray(v.columns)){if(v.columns.length===0)throw new Error("Option columns is empty");t0=v.columns}v.escapeChar!==void 0&&(z0=v.escapeChar+Q),(typeof v.escapeFormulae=="boolean"||v.escapeFormulae instanceof RegExp)&&(N0=v.escapeFormulae instanceof RegExp?v.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var Y=new RegExp(L(Q),"g");if(typeof y=="string"&&(y=JSON.parse(y)),Array.isArray(y)){if(!y.length||Array.isArray(y[0]))return $0(null,y,o0);if(typeof y[0]=="object")return $0(t0||Object.keys(y[0]),y,o0)}else if(typeof y=="object")return typeof y.data=="string"&&(y.data=JSON.parse(y.data)),Array.isArray(y.data)&&(y.fields||(y.fields=y.meta&&y.meta.fields||t0),y.fields||(y.fields=Array.isArray(y.data[0])?y.fields:typeof y.data[0]=="object"?Object.keys(y.data[0]):[]),Array.isArray(y.data[0])||typeof y.data[0]=="object"||(y.data=[y.data])),$0(y.fields||[],y.data||[],o0);throw new Error("Unable to serialize unrecognized input");function $0(f0,S0,w0){var b0="";typeof f0=="string"&&(f0=JSON.parse(f0)),typeof S0=="string"&&(S0=JSON.parse(S0));var m0=Array.isArray(f0)&&0=this._config.preview;if(p)b.postMessage({results:D,workerId:r.WORKER_ID,finished:z0});else if(A(this._config.chunk)&&!C){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);D=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!z0||!A(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),z0||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(v){A(this._config.error)?this._config.error(v):p&&this._config.error&&b.postMessage({workerId:r.WORKER_ID,error:v,finished:!1})}}function l(y){var v;(y=y||{}).chunkSize||(y.chunkSize=r.RemoteChunkSize),O.call(this,y),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(C){this._input=C,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(v=new XMLHttpRequest,this._config.withCredentials&&(v.withCredentials=this._config.withCredentials),o||(v.onload=k(this._chunkLoaded,this),v.onerror=k(this._chunkError,this)),v.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var C=this._config.downloadRequestHeaders;for(var _ in C)v.setRequestHeader(_,C[_])}if(this._config.chunkSize){var I=this._start+this._config.chunkSize-1;v.setRequestHeader("Range","bytes="+this._start+"-"+I)}try{v.send(this._config.downloadRequestBody)}catch(D){this._chunkError(D.message)}o&&v.status===0&&this._chunkError()}},this._chunkLoaded=function(){v.readyState===4&&(v.status<200||400<=v.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:v.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(C){var _=C.getResponseHeader("Content-Range");return _===null?-1:parseInt(_.substring(_.lastIndexOf("/")+1))}(v),this.parseChunk(v.responseText)))},this._chunkError=function(C){var _=v.statusText||C;this._sendError(new Error(_))}}function h(y){var v,C;(y=y||{}).chunkSize||(y.chunkSize=r.LocalChunkSize),O.call(this,y);var _=typeof FileReader<"u";this.stream=function(I){this._input=I,C=I.slice||I.webkitSlice||I.mozSlice,_?((v=new FileReader).onload=k(this._chunkLoaded,this),v.onerror=k(this._chunkError,this)):v=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(I.target.result)},this._chunkError=function(){this._sendError(v.error)}}function g(y){var v;O.call(this,y=y||{}),this.stream=function(C){return v=C,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var C,_=this._config.chunkSize;return _?(C=v.substring(0,_),v=v.substring(_)):(C=v,v=""),this._finished=!v,this.parseChunk(C)}}}function d(y){O.call(this,y=y||{});var v=[],C=!0,_=!1;this.pause=function(){O.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){O.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(I){this._input=I,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){_&&v.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),v.length?this.parseChunk(v.shift()):C=!0},this._streamData=k(function(I){try{v.push(typeof I=="string"?I:I.toString(this._config.encoding)),C&&(C=!1,this._checkIsFinished(),this.parseChunk(v.shift()))}catch(D){this._streamError(D)}},this),this._streamError=k(function(I){this._streamCleanUp(),this._sendError(I)},this),this._streamEnd=k(function(){this._streamCleanUp(),_=!0,this._streamData("")},this),this._streamCleanUp=k(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(y){var v,C,_,I=Math.pow(2,53),D=-I,Q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,z0=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,o0=this,t0=0,N0=0,Y=!1,$0=!1,k0=[],f0={data:[],errors:[],meta:{}};if(A(y.step)){var S0=y.step;y.step=function(d0){if(f0=d0,m0())b0();else{if(b0(),f0.data.length===0)return;t0+=d0.data.length,y.preview&&t0>y.preview?C.abort():(f0.data=f0.data[0],S0(f0,o0))}}}function w0(d0){return y.skipEmptyLines==="greedy"?d0.join("").trim()==="":d0.length===1&&d0[0].length===0}function b0(){return f0&&_&&(q0("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+r.DefaultDelimiter+"'"),_=!1),y.skipEmptyLines&&(f0.data=f0.data.filter(function(d0){return!w0(d0)})),m0()&&function(){if(!f0)return;function d0(K0,Z0){A(y.transformHeader)&&(K0=y.transformHeader(K0,Z0)),k0.push(K0)}if(Array.isArray(f0.data[0])){for(var v0=0;m0()&&v0=k0.length?"__parsed_extra":k0[F]),y.transform&&(W0=y.transform(W0,p0)),W0=s0(p0,W0),p0==="__parsed_extra"?(n0[p0]=n0[p0]||[],n0[p0].push(W0)):n0[p0]=W0}return y.header&&(F>k0.length?q0("FieldMismatch","TooManyFields","Too many fields: expected "+k0.length+" fields but parsed "+F,N0+Z0):F=_0.length/2?`\r -`:"\r"}(d0,Z0)),_=!1,y.delimiter)A(y.delimiter)&&(y.delimiter=y.delimiter(d0),f0.meta.delimiter=y.delimiter);else{var F=function(p0,W0,E0,_0,n1){var b1,h0,j0,Y0;n1=n1||[","," ","|",";",r.RECORD_SEP,r.UNIT_SEP];for(var r1=0;r1=this._config.preview;if(p)b.postMessage({results:D,workerId:r.WORKER_ID,finished:o0});else if(A(this._config.chunk)&&!C){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);D=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!o0||!A(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o0||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(v){A(this._config.error)?this._config.error(v):p&&this._config.error&&b.postMessage({workerId:r.WORKER_ID,error:v,finished:!1})}}function l(y){var v;(y=y||{}).chunkSize||(y.chunkSize=r.RemoteChunkSize),i.call(this,y),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(C){this._input=C,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(v=new XMLHttpRequest,this._config.withCredentials&&(v.withCredentials=this._config.withCredentials),o||(v.onload=k(this._chunkLoaded,this),v.onerror=k(this._chunkError,this)),v.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var C=this._config.downloadRequestHeaders;for(var _ in C)v.setRequestHeader(_,C[_])}if(this._config.chunkSize){var I=this._start+this._config.chunkSize-1;v.setRequestHeader("Range","bytes="+this._start+"-"+I)}try{v.send(this._config.downloadRequestBody)}catch(D){this._chunkError(D.message)}o&&v.status===0&&this._chunkError()}},this._chunkLoaded=function(){v.readyState===4&&(v.status<200||400<=v.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:v.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(C){var _=C.getResponseHeader("Content-Range");return _===null?-1:parseInt(_.substring(_.lastIndexOf("/")+1))}(v),this.parseChunk(v.responseText)))},this._chunkError=function(C){var _=v.statusText||C;this._sendError(new Error(_))}}function h(y){var v,C;(y=y||{}).chunkSize||(y.chunkSize=r.LocalChunkSize),i.call(this,y);var _=typeof FileReader<"u";this.stream=function(I){this._input=I,C=I.slice||I.webkitSlice||I.mozSlice,_?((v=new FileReader).onload=k(this._chunkLoaded,this),v.onerror=k(this._chunkError,this)):v=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(I.target.result)},this._chunkError=function(){this._sendError(v.error)}}function g(y){var v;i.call(this,y=y||{}),this.stream=function(C){return v=C,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var C,_=this._config.chunkSize;return _?(C=v.substring(0,_),v=v.substring(_)):(C=v,v=""),this._finished=!v,this.parseChunk(C)}}}function d(y){i.call(this,y=y||{});var v=[],C=!0,_=!1;this.pause=function(){i.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){i.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(I){this._input=I,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){_&&v.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),v.length?this.parseChunk(v.shift()):C=!0},this._streamData=k(function(I){try{v.push(typeof I=="string"?I:I.toString(this._config.encoding)),C&&(C=!1,this._checkIsFinished(),this.parseChunk(v.shift()))}catch(D){this._streamError(D)}},this),this._streamError=k(function(I){this._streamCleanUp(),this._sendError(I)},this),this._streamEnd=k(function(){this._streamCleanUp(),_=!0,this._streamData("")},this),this._streamCleanUp=k(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(y){var v,C,_,I=Math.pow(2,53),D=-I,Q=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,o0=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,n0=this,t0=0,m0=0,Y=!1,$0=!1,k0=[],f0={data:[],errors:[],meta:{}};if(A(y.step)){var T0=y.step;y.step=function(d0){if(f0=d0,A0())p0();else{if(p0(),f0.data.length===0)return;t0+=d0.data.length,y.preview&&t0>y.preview?C.abort():(f0.data=f0.data[0],T0(f0,n0))}}}function C0(d0){return y.skipEmptyLines==="greedy"?d0.join("").trim()==="":d0.length===1&&d0[0].length===0}function p0(){return f0&&_&&(g0("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+r.DefaultDelimiter+"'"),_=!1),y.skipEmptyLines&&(f0.data=f0.data.filter(function(d0){return!C0(d0)})),A0()&&function(){if(!f0)return;function d0(G0,$){A(y.transformHeader)&&(G0=y.transformHeader(G0,$)),k0.push(G0)}if(Array.isArray(f0.data[0])){for(var B0=0;A0()&&B0=k0.length?"__parsed_extra":k0[M0]),y.transform&&(x0=y.transform(x0,q0)),x0=W0(q0,x0),q0==="__parsed_extra"?(c0[q0]=c0[q0]||[],c0[q0].push(x0)):c0[q0]=x0}return y.header&&(M0>k0.length?g0("FieldMismatch","TooManyFields","Too many fields: expected "+k0.length+" fields but parsed "+M0,m0+$):M0=U0.length/2?`\r +`:"\r"}(d0,$)),_=!1,y.delimiter)A(y.delimiter)&&(y.delimiter=y.delimiter(d0),f0.meta.delimiter=y.delimiter);else{var M0=function(q0,x0,V0,U0,a1){var c1,S0,H0,Z0;a1=a1||[","," ","|",";",r.RECORD_SEP,r.UNIT_SEP];for(var n1=0;n1=Q)return T1(!0)}else for(x0=t0,t0++;;){if((x0=Y.indexOf(v,x0+1))===-1)return k0||q0.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:s0.length,index:t0}),P1();if(x0===f0-1)return P1(Y.substring(t0,x0).replace(r1,v));if(v!==o0||Y[x0+1]!==o0){if(v===o0||x0===0||Y[x0-1]!==o0){j0!==-1&&j0=Q)return T1(!0);break}q0.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:s0.length,index:t0}),x0++}}else x0++}return P1();function $1(N1){s0.push(N1),v0=t0}function U1(N1){var F1=0;if(N1!==-1){var s2=Y.substring(x0+1,N1);s2&&s2.trim()===""&&(F1=s2.length)}return F1}function P1(N1){return k0||(N1===void 0&&(N1=Y.substring(t0)),d0.push(N1),t0=f0,$1(d0),m0&&w1()),T1()}function B1(N1){t0=N1,$1(d0),d0=[],Y0=Y.indexOf(_,t0)}function T1(N1){return{data:s0,errors:q0,meta:{delimiter:C,linebreak:_,aborted:N0,truncated:!!N1,cursor:v0+($0||0)}}}function w1(){D(T1()),s0=[],q0=[]}},this.abort=function(){N0=!0},this.getCharIndex=function(){return t0}}function W(y){var v=y.data,C=n[v.workerId],_=!1;if(v.error)C.userError(v.error,v.file);else if(v.results&&v.results.data){var I={abort:function(){_=!0,S(v.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:N,resume:N};if(A(C.userStep)){for(var D=0;D{const{time:n}=ho(e,b,M),{debugMode:c}=y1.getState(),r={result:{resourceSpans:[],result:[],length:0},raw:[],time:n,debugMode:c,dispatch:t,type:"traces",dsType:e,panel:M,id:b,ts:Date.now(),queryType:p,open:!0};Be(r)};async function mz(e,t,M,b,o,p,n,c){var O,l,h,g,d,m,L,R,W,S,N,x,k,A,y,v,C,_,I;const{time:r}=ho(e,o,b),{debugMode:s}=y1.getState();if(e==="traces"){if(n==="trace-search"&&((l=(O=t==null?void 0:t.data)==null?void 0:O.traces)==null?void 0:l.length)>0){const D={result:t.data.traces||[],raw:t.data,time:r,debugMode:s,dispatch:M,dsType:e,type:e,panel:b,open:!0,id:o,ts:Date.now(),queryType:n};Be(D)}if(((g=(h=t==null?void 0:t.data)==null?void 0:h.resourceSpans)==null?void 0:g.length)>0){const D={result:(t==null?void 0:t.data)||[],raw:t==null?void 0:t.data,time:r,debugMode:s,dispatch:M,type:e,dsType:e,panel:b,open:!0,id:o,ts:Date.now(),queryType:n};Be(D)}}if(e==="flux"&&await tA(t==null?void 0:t.data).then(D=>{var Q;if(((Q=D==null?void 0:D.data)==null?void 0:Q.length)>0){const z0={result:D.data||[],raw:D==null?void 0:D.data,time:r,debugMode:s,queryType:n,dispatch:M,dsType:e,type:e,panel:b,open:!0,id:o,ts:Date.now(),direction:p};Be(z0)}}),((m=(d=t==null?void 0:t.data)==null?void 0:d.streams)==null?void 0:m.length)===0){const D={result:[],raw:"[]",time:r,debugMode:s,queryType:n,dispatch:M,open:!0,type:"streams",dsType:e,panel:b,id:o,ts:Date.now(),direction:p,isLogsVolume:c};Be(D),M(ae(!0))}if((L=t==null?void 0:t.data)!=null&&L.data){const D=(W=(R=t==null?void 0:t.data)==null?void 0:R.data)==null?void 0:W.result,Q=(N=(S=t==null?void 0:t.data)==null?void 0:S.data)==null?void 0:N.resultType;let z0={hasStats:!1,statsData:{}};(k=(x=t==null?void 0:t.data)==null?void 0:x.data)!=null&&k.stats&&((v=Object.keys((y=(A=t==null?void 0:t.data)==null?void 0:A.data)==null?void 0:y.stats))==null?void 0:v.length)>0&&(z0={hasStats:!0,statsData:{...(_=(C=t==null?void 0:t.data)==null?void 0:C.data)==null?void 0:_.stats}});const o0=y1.getState()[b],t0=o0==null?void 0:o0.map(Y=>Y.id===o?{...Y,hasStats:(z0==null?void 0:z0.hasStats)||!1,statsData:(z0==null?void 0:z0.statsData)||{},open:!0}:Y);M(MA(b,t0)),M(u3(e));const N0={result:D,raw:(I=t==null?void 0:t.data)==null?void 0:I.data,time:r,debugMode:s,queryType:n,dispatch:M,type:Q,dsType:e,open:!0,panel:b,id:o,ts:Date.now(),direction:p,isLogsVolume:c};Be(N0)}else Xb(M)}function bA(e){var o,p,n;const t=e.match(/\[(.*?)\]/gm),M=(t==null?void 0:t[0].replace(/\[\]']+/g,"").trim())||"";let b=0;if(Array.isArray(t)){const c=M.match(/^(?[0-9.]+)(?ns|us|ms|s|m|h)?$/),r=typeof((o=c==null?void 0:c.groups)==null?void 0:o.tnum)=="string"?parseInt((p=c==null?void 0:c.groups)==null?void 0:p.tnum):1,s=((n=c==null?void 0:c.groups)==null?void 0:n.trange)||"m";b=r/oA(s)}return b}function oA(e){const t=/^(ns|us|ms|s|m|h)$/,M={ns:1e9,us:1e6,s:1,m:.016666666666666666,h:.0002777777777777778},b=new Map(Object.entries(M));return t.test(e)&&typeof e=="string"?b.get(e)||1/60:b.get("m")||1/60}function Lz(e,t){window.bosco.send(e,t)}function pA(e,t,M){if(e==="left")return t(n2(M));if(e==="right")return t(Q1(M))}function zA(e,t,M){return M(e==="left"?fe(t):qe(t))}function nA(e,t,M){return[...e].map(b=>b.id===t?{...b,loading:M||!1}:b)}function X2(e,t,M,b,o,p,n="backwards",c="",r="",s=0,O=!1){var x,k,A,y,v,C;let l={url:"",requestHeaders:{},method:{value:""},headers:[],auth:{method:{value:"GET"},basicAuth:{value:!0},fields:{basicAuth:[{name:"user",value:""},{name:"password",value:""}]}},hasSettings:!1},h="",g="";if(c!==""){const _=y1.getState().dataSources,I=_.find(D=>D.id===c);if(I&&((x=Object.keys(I))==null?void 0:x.length)>0){const D=_.find(z0=>z0.id===c),Q=l.url!==""?l.url:D.url;l={...D,url:Q,hasSettings:!0}}if(((k=l==null?void 0:l.headers)==null?void 0:k.length)>0){let D={};for(let Q of l.headers){const z0={[String(Q.header)]:Q.value};D={...D,...z0}}l.requestHeaders=D||{}}if((y=(A=l==null?void 0:l.auth)==null?void 0:A.basicAuth)!=null&&y.value){const D=(C=(v=l==null?void 0:l.auth)==null?void 0:v.fields)==null?void 0:C.basicAuth;for(let Q of D)(Q==null?void 0:Q.name)==="user"&&(Q.value,h=Q.value),(Q==null?void 0:Q.name)==="password"&&(Q.value,g=Q.value);l.requestHeaders={...l.requestHeaders}}}const d=(_,I)=>{const D=y1.getState()[o];pA(o,_,nA(D,p,I))},{debugMode:m}=y1.getState(),L=rs(e,l.requestHeaders),R=bA(t),W=hs(e,t,b,R,n,l.url||"",M,r,s,p,o),S=cs(e,M,W),N=(_,I)=>{var z0;const D=(z0=y1.getState())==null?void 0:z0[`${o}DataView`],Q=D==null?void 0:D.find(o0=>o0.id===p);Q&&(Q.loading=_),zA(o,D,I)};return async function(_){var D,Q,z0,o0;N(!0,_),d(_,!0);let I;if(r===""){M==="trace-search"&&Rz(e,_,o,p,n,M),d(_,!1);return}if(t===""&&M!=="trace-search"){e==="traces"&&Rz(e,_,o,p,n,M),d(_,!1);return}typeof I<"u"&&I.cancel("Cancelling the previous request"),I=W2.CancelToken.source(),L.cancelToken=I.token;try{(L==null?void 0:L.method)==="POST"?await((Q=(D=W2)==null?void 0:D.post(S,t,L))==null?void 0:Q.then(t0=>{mz(e,t0,_,o,p,n,M)}).catch(t0=>{Xb(_),_(ae(!0)),N(!1,_),m&&console.log("Error loading flux data",t0)}).finally(()=>{N(!1,_),d(_,!1)})):(L==null?void 0:L.method)==="GET"&&await((o0=(z0=W2)==null?void 0:z0.get(S,{auth:{username:h,password:g},...L}))==null?void 0:o0.then(t0=>{mz(e,t0||{data:{data:[]}},_,o,p,n,M,O),m&&Lz({level:"info",id:p,type:e,direction:n},p),d(_,!1)}).catch(t0=>{Xb(_),_(ae(!0)),N(!1,_),d(_,!1),m&&(Lz({level:"error",id:p,type:e,direction:n},p),console.log("getting an error from response: ",t0))}).finally(()=>{d(_,!1),N(!1,_)}))}catch(t0){d(_,!1),console.log(t0)}}}var Ro={},cA=L1;Object.defineProperty(Ro,"__esModule",{value:!0});var dM=Ro.default=void 0,rA=cA(m1()),OA=t1;dM=Ro.default=(0,rA.default)((0,OA.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");var mo={},iA=L1;Object.defineProperty(mo,"__esModule",{value:!0});var Lo=mo.default=void 0,aA=iA(m1()),sA=t1;Lo=mo.default=(0,aA.default)((0,sA.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");var No={},AA=L1;Object.defineProperty(No,"__esModule",{value:!0});var Vc=No.default=void 0,lA=AA(m1()),Nz=t1;Vc=No.default=(0,lA.default)([(0,Nz.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,Nz.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");var vo={},dA=L1;Object.defineProperty(vo,"__esModule",{value:!0});var $c=vo.default=void 0,uA=dA(m1()),qA=t1;$c=vo.default=(0,uA.default)((0,qA.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch");var Bo={},fA=L1;Object.defineProperty(Bo,"__esModule",{value:!0});var $2=Bo.default=void 0,WA=fA(m1()),hA=t1;$2=Bo.default=(0,WA.default)((0,hA.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"}),"KeyboardArrowRight");var yo={},gA=L1;Object.defineProperty(yo,"__esModule",{value:!0});var Uc=yo.default=void 0,RA=gA(m1()),mA=t1;Uc=yo.default=(0,RA.default)((0,mA.jsx)("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"}),"ZoomOutMap");var To={},LA=L1;Object.defineProperty(To,"__esModule",{value:!0});var Gc=To.default=void 0,NA=LA(m1()),vA=t1;Gc=To.default=(0,NA.default)((0,vA.jsx)("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2z"}),"ZoomInMap");var So={},BA=L1;Object.defineProperty(So,"__esModule",{value:!0});var Pe=So.default=void 0,yA=BA(m1()),TA=t1;Pe=So.default=(0,yA.default)((0,TA.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDownOutlined");const SA=g0("div",{target:"e13u74u10"})("background:",({theme:e})=>e.shadow,";#alert-dialog-title{color:",({theme:e})=>e.contrast,";}#alert-dialog-description{color:",({theme:e})=>e.lightContrast,";font-weight:normal;}");function vz({clearHistory:e,dialogType:t}){const[M,b]=q.useState(!1),o=G0(),p=()=>{b(!0)},n=()=>{b(!1)};function c(){e(),b(!1)}return a(da,{theme:o,children:P("div",{children:[a(x1,{title:"Clear Query History",children:a(ra,{onClick:p,children:"Clear History"})}),a(ro,{open:M,onClose:n,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",PaperProps:{classes:{root:Oo}},children:P(SA,{children:[P(Oa,{id:"alert-dialog-title",children:["Are you sure you want to clear the ",t," ","History?"]}),a(ia,{children:P(aa,{id:"alert-dialog-description",children:["Click ‘Clear History’ to delete your"," ",t," history permanently"]})}),P(sa,{children:[a(Aa,{onClick:n,children:"Cancel"}),a(la,{active:!0,onClick:c,autoFocus:!0,children:"Clear History"})]})]})})]})})}function Kc({message:e}){return a(ua,{children:e})}function xA({onClose:e}){return a(qa,{onClick:e,children:a(io,{style:{height:"16px",width:"16px"}})})}const Qc=Object.fromEntries?Object.fromEntries:e=>{if(!e||!e[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const t={};return Object.keys(e).forEach(M=>{const[b,o]=e[M];t[b]=o}),t};function He(e){return Object.keys(e)}function xo(e,t){if(!e)throw new Error(t)}function Xo(e,t){return t}const wo=e=>{const t=e.length;let M=0,b="";for(;Mb===t[o]).indexOf(!1)>=0)&&(M.current={v:e(),prevDeps:[...t]}),M.current.v}function wA(e){return e instanceof Object&&!("styles"in e)&&!("length"in e)&&!("__emotion_styles"in e)}const{createCssAndCx:CA}=(()=>{function e(M,b,o){const p=[],n=Va(M,p,o);return p.length<2?o:n+b(p)}function t(M){const{cache:b}=M,o=(...n)=>{const c=ja(n,b.registered);Fa(b,c,!1);const r=`${b.key}-${c.name}`;e:{const s=n[0];if(!wA(s))break e;Bz.saveClassNameCSSObjectMapping(b,r,s)}return r};return{css:o,cx:(...n)=>{const c=wo(n),r=Bz.fixClassName(b,c,o);return e(b.registered,o,r)}}}return{createCssAndCx:t}})();function Jc(e){const{useCache:t}=e;function M(){const b=t(),{css:o,cx:p}=XA(()=>CA({cache:b}),[b]);return{css:o,cx:p}}return{useCssAndCx:M}}const Bz=(()=>{const e=new WeakMap;return{saveClassNameCSSObjectMapping:(t,M,b)=>{let o=e.get(t);o===void 0&&(o=new Map,e.set(t,o)),o.set(M,b)},fixClassName:(()=>{function t(M){let b=!1;return M.map(([o,p])=>{if(p===void 0)return o;let n;if(b)n={"&&":p};else{n=o;for(const c in p)if(c.startsWith("@media")){b=!0;break}}return n})}return(M,b,o)=>{const p=e.get(M);return wo(t(b.split(" ").map(n=>[n,p==null?void 0:p.get(n)])).map(n=>typeof n=="string"?n:o(n)))}})()}})();function je(e){if(!(e instanceof Object)||typeof e=="function")return e;const t=[];for(const M in e){const b=e[M],o=typeof b;if(!(o==="string"||o==="number"&&!isNaN(b)||o==="boolean"||b===void 0||b===null))return e;t.push(`${M}:${o}_${b}`)}return"xSqLiJdLMd9s"+t.join("|")}function Co(e,t,M){if(!(t instanceof Object))return e;const b={};return He(e).forEach(o=>b[o]=M(e[o],t[o])),He(t).forEach(o=>{if(o in e)return;const p=t[o];typeof p=="string"&&(b[o]=p)}),b}const Yc=({classes:e,theme:t,muiStyleOverridesParams:M,css:b,cx:o,name:p})=>{var n,c;e:{if(p==="makeStyle no name"){p=void 0;break e}if(M!==void 0&&p===void 0)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}let r;try{r=p===void 0?void 0:((c=(n=t.components)===null||n===void 0?void 0:n[p])===null||c===void 0?void 0:c.styleOverrides)||void 0}catch{}const s=q.useMemo(()=>{if(r===void 0)return;const O={};for(const l in r){const h=r[l];h instanceof Object&&(O[l]=b(typeof h=="function"?h(Object.assign({theme:t,ownerState:M==null?void 0:M.ownerState},M==null?void 0:M.props)):h))}return O},[r,je(M==null?void 0:M.props),je(M==null?void 0:M.ownerState),b]);return e=q.useMemo(()=>Co(e,s,o),[e,s,o]),{classes:e}};let EA=0;function Zc(e){const{useTheme:t,cache:M}=e,{useCache:b}=er({cacheProvidedAtInception:M}),{useCssAndCx:o}=Jc({useCache:b});function p(c){const{name:r,uniqId:s=`${EA++}`}=c??{},O=typeof r!="object"?r:Object.keys(r)[0];return function(l){const h=typeof l=="function"?l:()=>l;return function(d,m){const L=t();let{css:R,cx:W}=o();const S=b();let N=q.useMemo(()=>{const x={},k=typeof Proxy<"u"&&new Proxy({},{get:(v,C)=>(typeof C=="symbol"&&xo(!1),x[C]=`${S.key}-${s}${O!==void 0?`-${O}`:""}-${C}-ref`)}),A=h(L,d,k||{}),y=Qc(He(A).map(v=>{const C=A[v];return C.label||(C.label=`${O!==void 0?`${O}-`:""}${v}`),[v,`${R(C)}${Xo(v,v in x)?` ${x[v]}`:""}`]}));return He(x).forEach(v=>{v in y||(y[v]=x[v])}),y},[S,R,W,L,je(d)]);{const x=m==null?void 0:m.props.classes;N=q.useMemo(()=>Co(N,x,W),[N,je(x),W])}{const x=Yc({classes:N,css:R,cx:W,name:O??"makeStyle no name",idOfUseStyles:s,muiStyleOverridesParams:m,theme:L});x.classes!==void 0&&(N=x.classes),x.css!==void 0&&(R=x.css),x.cx!==void 0&&(W=x.cx)}return{classes:N,theme:L,css:R,cx:W}}}}function n(){const c=t(),{css:r,cx:s}=o();return{theme:c,css:r,cx:s}}return{makeStyles:p,useStyles:n}}const kA=q.createContext(void 0),{createUseCache:er}=(()=>{function e(){return q.useContext(kA)}function t(M){const{cacheProvidedAtInception:b}=M;function o(){var p;const n=$a(),c=e(),r=(p=b??c)!==null&&p!==void 0?p:n;if(r===null)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join(` -`));return r}return{useCache:o}}return{createUseCache:t}})();function yz(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Tz=globalThis&&globalThis.__rest||function(e,t){var M={};for(var b in e)Object.prototype.hasOwnProperty.call(e,b)&&t.indexOf(b)<0&&(M[b]=e[b]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,b=Object.getOwnPropertySymbols(e);o{const g=p,d=function(m){var{children:L}=m,R=Tz(m,["children"]);return q.createElement(g,R,L)};return Object.defineProperty(d,"name",{value:yz(g)}),d})():p,s=(()=>{{const{name:g}=c??{};if(g!==void 0)return typeof g!="object"?g:Object.keys(g)[0]}{const g=r.displayName;if(typeof g=="string"&&g!=="")return g}{const{name:g}=r;if(g)return g.replace(/\$/g,"usd")}})(),O=b(Object.assign(Object.assign({},c),{name:s}))(typeof n=="function"?(g,d,m)=>xz(n(g,d,m)):xz(n));function l(g){for(const d in g)if(d!=="root")return!0;return!1}const h=q.forwardRef(function(g,d){const{className:m,classes:L}=g,R=Tz(g,["className","classes"]),{classes:W,cx:S}=O(g,{props:g}),N=S(W.root,m);return tr.set(W,Object.assign(Object.assign({},W),{root:N})),z2.createElement(r,Object.assign({ref:d,className:l(W)?m:N},typeof p=="string"?{}:{classes:W},R))});return s!==void 0&&(h.displayName=`${yz(s)}WithStyles`,Object.defineProperty(h,"name",{value:h.displayName})),h}return o.getClasses=IA,{withStyles:o}}const tr=new WeakMap,Sz="getClasses should only be used in conjunction with withStyles";function IA(e){const t=e.classes;if(t===void 0)throw new Error(Sz);const M=tr.get(t);if(M===void 0)throw new Error(Sz);return M}function xz(e){const t={},M={};return Object.keys(e).forEach(b=>(b.startsWith("@media")?M:t)[b]=e[b]),Object.keys(M).forEach(b=>{const o=M[b];Object.keys(o).forEach(p=>{var n;return t[p]=Object.assign(Object.assign({},(n=t[p])!==null&&n!==void 0?n:{}),{[b]:o[p]})})}),t}const DA=(()=>!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u"))();var PA=globalThis&&globalThis.__rest||function(e,t){var M={};for(var b in e)Object.prototype.hasOwnProperty.call(e,b)&&t.indexOf(b)<0&&(M[b]=e[b]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,b=Object.getOwnPropertySymbols(e);o({classes:r,cx:s,css:O})),name:void 0,doesUseNestedSelectors:!1})}}let HA=0;const Mb=[];function Qt(e){const{useContext:t,useCache:M,useCssAndCx:b,usePlugin:o,name:p,doesUseNestedSelectors:n}=e;return{withParams:()=>Qt(Object.assign({},e)),withName:c=>Qt(Object.assign(Object.assign({},e),{name:typeof c!="object"?c:Object.keys(c)[0]})),withNestedSelectors:()=>Qt(Object.assign(Object.assign({},e),{doesUseNestedSelectors:!0})),create:c=>{const r=`x${HA++}`,s=typeof c=="function"?c:()=>c;return function(l){var h,g,d;const m=l??{},{classesOverrides:L}=m,R=PA(m,["classesOverrides"]),W=t(),{css:S,cx:N}=b(),x=M();let k=q.useMemo(()=>{const y={},v=s(Object.assign(Object.assign(Object.assign({},l),W),n?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(_,I)=>{if(typeof I=="symbol"&&xo(!1),DA){{let D=Mb.find(Q=>Q.name===p&&Q.idOfUseStyles===r);D===void 0&&(D={name:p,idOfUseStyles:r,nestedSelectorRuleNames:new Set},Mb.push(D)),D.nestedSelectorRuleNames.add(I)}if(Mb.find(D=>D.name===p&&D.idOfUseStyles!==r&&D.nestedSelectorRuleNames.has(I))!==void 0)throw new Error([`tss-react: Duplicate nested selector "${I}" detected in ${p===void 0?`useStyles named "${p}"`:"anonymous useStyles function"}.`,"In SSR setups, this may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.",'Solution: Ensure each useStyles using nested selectors has a unique name. Use tss.withName("UniqueName").withNestedSelectors<...>()... to set a name.'].join(` -`))}return y[I]=`${x.key}-${r}${p!==void 0?`-${p}`:""}-${I}-ref`}})}:{})),C=Qc(He(v).map(_=>{const I=v[_];return I.label||(I.label=`${p!==void 0?`${p}-`:""}${_}`),[_,`${S(I)}${Xo(_,_ in y)?` ${y[_]}`:""}`]}));return He(y).forEach(_=>{_ in C||(C[_]=y[_])}),C},[x,S,N,je(l),...Object.values(W)]);k=q.useMemo(()=>Co(k,L,N),[k,je(L),N]);const A=o(Object.assign(Object.assign({classes:k,css:S,cx:N,idOfUseStyles:r,name:p},W),R));return Object.assign({classes:(h=A.classes)!==null&&h!==void 0?h:k,css:(g=A.css)!==null&&g!==void 0?g:S,cx:(d=A.cx)!==null&&d!==void 0?d:N},W)}}}}function jA(e){return Object.assign(Object.assign({},Zc(e)),_A(e))}const{tss:FA}=Mr({useContext:()=>({})});FA.create({});const{makeStyles:dN,withStyles:Eo}=jA({useTheme:co}),{tss:VA}=Mr({useContext:function(){return{theme:co()}},usePlugin:Yc});VA.create({});var ko={},$A=L1;Object.defineProperty(ko,"__esModule",{value:!0});var _o=ko.default=void 0,UA=$A(m1()),GA=t1;_o=ko.default=(0,UA.default)((0,GA.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Io={},KA=L1;Object.defineProperty(Io,"__esModule",{value:!0});var br=Io.default=void 0,QA=KA(m1()),JA=t1;br=Io.default=(0,QA.default)((0,JA.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const YA=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],ZA=["Su","Mo","Tu","We","Th","Fr","Sa"],ne={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Cb="dateTimeRange",el=y1.getState().theme,tl={light:rc,dark:Oc},ye=tl[el],Ml=()=>({iconContainer:{padding:5,color:ye.contrast},icon:{padding:10,color:ye.contrast,"&:hover":{color:ye.contrast,background:"none"}},selector:{color:ye.contrast,borderBottom:`1px solid ${ye.contrast}`}}),bl=()=>{const e=y1.getState().theme;return Ii({palette:{mode:e,primary:{main:ye.contrast}}})},Xz=g0("select",{target:"etc1wzw0"})("cursor:pointer;position:relative;font-size:14px;color:",e=>e.theme.contrast,";background:",e=>e.theme.deep,";border:none;border-radius:3px;padding:4px 8px;line-height:20px;flex:1;&::-webkit-scrollbar{width:5px;background:",e=>e.theme.deep,";}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",e=>e.theme.alphaPlusNeutral,";}"),ol=({date:e,classes:t,setDate:M,nextDisabled:b,prevDisabled:o,onClickNext:p,onClickPrevious:n})=>{const c=G0(),r=O=>{M(Ki(e,parseInt(O.target.value)))},s=O=>{M(Qi(e,parseInt(O.target.value)))};return a(uc,{theme:c,children:P(p2,{container:!0,justifyContent:"space-between",alignItems:"center",style:{marginTop:"20px"},children:[a(p2,{item:!0,className:t.iconContainer,children:a(vb,{disabled:o,onClick:n,children:a(_o,{style:{color:o?c.lightContrast:c.contrast}})})}),a(p2,{item:!0,children:a(Xz,{value:Ui(e),onChange:r,children:YA.map((O,l)=>a("option",{value:l,children:O},O))})}),a(p2,{item:!0,children:a(Xz,{value:Gi(e),onChange:s,children:ds(e,30).map(O=>a("option",{className:"custom-option",value:O,children:O},O))})}),a(p2,{item:!0,className:t.iconContainer,children:a(vb,{disabled:b,onClick:p,children:a(br,{style:{color:b?c.lightContrast:c.contrast}})})})]})})},pl=Eo(ol,Ml),zl=()=>({leftBorderRadius:{borderRadius:"50% 0 0 50%"},rightBorderRadius:{borderRadius:"0 50% 50% 0"},buttonContainer:{display:"flex"},button:{height:30,width:30,padding:0},inactive:{color:"gray"},outlined:{border:"1px solid #11abab"},maxContrast:{lineHeight:1.6,color:"primary"},filled:{"&:hover":{backgroundColor:"#11abab",color:"text.primary"},backgroundColor:"#11abab",color:"text.primary"},highlighted:{backgroundColor:"#14b8b852"},contrast:{color:"text.primary"}}),nl=e=>{const{classes:t}=e;return a(f1,{theme:bl,children:a("div",{className:eb(t.buttonContainer,e.startOfRange&&t.leftBorderRadius,e.endOfRange&&t.rightBorderRadius,!e.disabled&&e.highlighted&&t.highlighted,e.disabled&&t.disabled),children:a(vb,{className:eb(t.button,!e.disabled&&e.outlined&&t.outlined,!e.disabled&&e.filled&&t.filled),disabled:e.disabled,onClick:e.onClick,onMouseOver:e.onHover,children:a(qc,{color:e.disabled?"text.secondary":"text.primary",className:eb(t.maxContrast,!e.disabled&&e.filled&&t.contrast,e.disabled&&t.inactive),variant:"body2",children:e.value})})})})},cl=Eo(nl,zl),wz={Previous:-1,Next:1},rl=e=>({root:{width:260,background:e.background},weekDaysContainer:{marginTop:5,paddingLeft:30,paddingRight:30},daysContainer:{paddingLeft:15,paddingRight:15,marginTop:10,marginBottom:20}}),Ol=e=>{const t=G0(),[M,b]=q.useState(t),{classes:o,helpers:p,handlers:n,value:c,dateRange:r,marker:s,setValue:O,minDate:l,maxDate:h}=e,[g,d]=e.navState;return q.useEffect(()=>{b(t)},[t,b]),a(f1,{theme:t,children:a(ic,{square:!0,elevation:0,className:o.root,style:{background:t.background},children:P(p2,{container:!0,children:[a(pl,{date:c,setDate:O,nextDisabled:!d,prevDisabled:!g,onClickPrevious:()=>n.onMonthNavigate(s,wz.Previous),onClickNext:()=>n.onMonthNavigate(s,wz.Next)}),a(p2,{item:!0,container:!0,direction:"row",justifyContent:"space-between",className:o.weekDaysContainer,children:ZA.map(m=>a("div",{style:{color:t.contrast,fontSize:"10px"},children:m},m))}),a(p2,{item:!0,container:!0,direction:"column",justifyContent:"space-between",className:o.daysContainer,children:Os(is(c),7).map((m,L)=>a(p2,{container:!0,direction:"row",justifyContent:"center",children:m.map(R=>{const W=as(r,R),S=ss(r,R),N=ls(r),x=As(r,R)||p.inHoverRange(R);return a(cl,{themeSelected:M,filled:W||S,outlined:Ji(R),highlighted:x&&!N,disabled:!po(c,R)||!oo(R,{start:l,end:h}),startOfRange:W&&!N,endOfRange:S&&!N,onClick:()=>n.onDayClick(R),onHover:()=>n.onDayHover(R),value:Yi(R)},w2(R,"mm-dd-yyyy"))})},L))})]})})})},me=Eo(Ol,rl),il=g0("div",{target:"eb241j10"})("display:flex;flex-direction:column;padding:10px;max-height:250px;overflow-y:auto;flex:1;margin-top:10px;margin-bottom:10px;padding:5px;&::-webkit-scrollbar{width:5px;background:",e=>e.theme.lightNeutral,";}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",e=>e.theme.neutral,";}button{background:none;text-align:left;border:none;padding:10px;line-height:1.5;border-radius:3px;font-size:12px;cursor:pointer;&:hover{background:",e=>e.theme.lightNeutral,";}}"),Cz=e=>{const t=G0();return a(f1,{theme:t,children:a(il,{children:e.ranges.map((M,b)=>a("button",{onClick:()=>{e.setRange(M),e.onClose()},children:a("span",{style:{fontWeight:qz(M,e.selectedRange)?"bold":"normal",color:qz(M,e.selectedRange)?"orange":t.contrast,whiteSpace:"nowrap"},children:M.label})},b))})})};var Do={},al=L1;Object.defineProperty(Do,"__esModule",{value:!0});var uM=Do.default=void 0,sl=al(m1()),Al=t1;uM=Do.default=(0,sl.default)((0,Al.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");var Po={},ll=L1;Object.defineProperty(Po,"__esModule",{value:!0});var Eb=Po.default=void 0,dl=ll(m1()),ul=t1;Eb=Po.default=(0,dl.default)((0,ul.jsx)("path",{d:"M9 11H7v2h2zm4 0h-2v2h2zm4 0h-2v2h2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V9h14z"}),"DateRange");const ql=g0("div",{target:"ebkgyot2"})("display:",e=>e.isDisplay?"flex":"none",";flex-direction:column;margin:20px;margin-top:30px;.time-selectors{display:",e=>e.isDisplay?"flex":"none",";flex-direction:column;margin-bottom:15px;.label{font-size:0.85em;color:",e=>e.theme.alphaNeutral,";width:50px;margin-left:5px;margin-bottom:5px;white-space:nowrap;}.input-group{display:flex;margin-bottom:20px;input{background:",e=>e.theme.deep,";color:",e=>e.theme.contrast,";}.date-time-ranged{font-size:14px;width:170px;line-height:20px;border:1px solid ",e=>e.theme.lightNeutral,";color:",e=>e.theme.contrast,";margin:0;padding:0px 8px;margin-right:5px;&:focus{border:1px solid ",e=>e.theme.neutral,";}}}}"),fl=g0(so,{target:"ebkgyot1"})("color:",e=>e.theme.maxContrast,";background:",e=>e.theme.primary,";padding:6px;justify-content:center;margin-top:10px;margin-bottom:10px;cursor:pointer;&:hover{background:",e=>e.theme.primaryLight,";}"),Ez=g0(so,{target:"ebkgyot0"})("color:",e=>e.theme.contrast,";background:",e=>e.theme.neutral,";border:1px solid ",e=>e.theme.accentNeutral,";padding:8px;&:hover{background:",e=>e.theme.lightNeutral,";color:",e=>e.theme.contrast,";}");function kz({getEditedStartDate:e,getEditedEndDate:t,handleStart:M,handleStop:b,onTimeRangeSet:o,setCalendarOpen:p,isFullCalendar:n,setStopCalendar:c,setStartCalendar:r,startCalendarOpen:s,stopCalendarOpen:O,isHorizontal:l,styles:h,isMobile:g}){const d=G0();function m(){n?p(R=>!R):(p(R=>!(R&&s)),c(()=>!1),r(R=>!R))}function L(){n?p(R=>!R):(p(R=>!(R&&O)),r(()=>!1),c(R=>!R))}return a(f1,{theme:d,children:P(ql,{isDisplay:h,children:[P("div",{className:"time-selectors",children:[a("span",{className:"label",children:"From"}),P("div",{className:"input-group",children:[a("input",{className:"date-time-ranged",value:p1(e()),onChange:R=>M(R,!1),onBlur:R=>M(R,!0)}),a(Ez,{onClick:m,children:a(Eb,{style:{height:"16px",width:"16px"}})})]})]}),P("div",{className:"time-selectors",children:[a("span",{className:"label",children:"To"}),P("div",{className:"input-group",children:[a("input",{className:"date-time-ranged",value:p1(t()),onChange:R=>b(R,!1),onBlur:R=>b(R,!0)}),a(Ez,{onClick:L,children:a(Eb,{style:{height:"16px",width:"16px"}})})]})]}),a(fl,{isHorizontal:l,isMobile:g,onClick:R=>{o(R)},children:"Apply Time Range"})]})})}const Wl=g0("button",{target:"e1opaqag1"})("padding:10px;border-radius:3px;color:",({theme:e})=>e.accent,";font-size:1em;border:none;background:none;display:flex;cursor:pointer;align-items:center;justify-content:center;margin-bottom:10px;&:hover{background:#11111155;}span{margin-right:4px;font-size:12px;}"),hl=g0("div",{target:"e1opaqag0"})("position:absolute;.header{padding:10px;justify-content:space-between;}.headerItem{text-align:center;}.dateComplete{font-size:0.85em;}.divider{border-left:1px solid action;margin-bottom:20;}.container{position:relative;z-index:1000;right:75%;top:30px;display:flex;flex-direction:column;overflow-y:auto;background:",({theme:e})=>e.background,";}.applyButton{color:white;background:hsl(0, 0%, 31%);border:1px solid hsl(0, 0%, 31%);padding:6px 8px;border-radius:3px;margin-left:10px;cursor:pointer;}"),gl=e=>{const{ranges:t,dateRange:M,minDate:b,maxDate:o,firstMonth:p,setFirstMonth:n,secondMonth:c,setSecondMonth:r,setDateRange:s,helpers:O,handlers:l}=e,h=G0(),[g,d]=q.useState(!1),m={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},L=Zi(c,p)>=2,R={dateRange:M,minDate:b,maxDate:o,helpers:O,handlers:l},W=k1(),[S,N]=q.useState(M.dateStart),[x,k]=q.useState(M.dateEnd),[A,y]=q.useState(!0),[v]=q.useState(M.label)||m.label,C=h2.useMediaQuery({query:"(min-width: 1013px)"}),_=h2.useMediaQuery({query:"(max-width: 1013px)"}),I=h2.useMediaQuery({query:"(orientation: portrait)"}),D=X0(b0=>b0.isSplit),[Q,z0]=q.useState(!1),[o0,t0]=q.useState(!1);q.useEffect(()=>{if(v){const b0=lM(v);N(b0.dateStart),k(b0.dateEnd)}},[k,N,v]);const N0=(b0,m0)=>{b0.preventDefault();const s0=new Date(b0.target.value);m0&&q2(s0)?k(s0):k(b0.target.value)},Y=(b0,m0)=>{b0.preventDefault();const s0=new Date(b0.target.value);m0&&q2(s0)?N(s0):N(b0.target.value)},$0=b0=>{b0.preventDefault();const m0=new Date(S),s0=new Date(x);P2(m0)&&!Et(M.dateStart,m0)&&(W(uo(m0)),N(m0)),q2(s0)&&!Et(M.dateEnd,s0)&&(W(qo(s0)),k(s0));const q0=q2(s0)&&P2(m0),d0=Se(m0,s0),v0=!Et(M.dateStart,m0)||!Et(M.dateEnd,s0);q0&&d0&&v0?(W(fo("")),s({dateStart:m0,dateEnd:s0}),k0({dateStart:m0,dateEnd:s0}),e.onClose(b0)):d0||console.log("Invalid time range")},k0=b0=>{localStorage.setItem(Cb,JSON.stringify(b0))},f0=()=>q2(S)?w2(S,"yyy-MM-dd HH:mm:ss"):S,S0=()=>q2(x)?w2(x,"yyy-MM-dd HH:mm:ss"):typeof x<"u"?x:"",w0=()=>{y(b0=>!b0)};return a(f1,{theme:h,children:a(hl,{children:a(ic,{className:"container",elevation:5,children:P(p2,{display:"flex",style:{flex:"1"},children:[g&&C&&P(p2,{container:!0,direction:"row",wrap:"nowrap",children:[a(me,{...R,value:p,setValue:n,navState:[!0,L],marker:ne.FIRST_MONTH}),a("div",{className:"divider"}),a(me,{...R,value:c,setValue:r,navState:[L,!0],marker:ne.SECOND_MONTH})]}),g&&!C&&!I&&!A&&!D&&P(p2,{container:!0,direction:"row",wrap:"nowrap",children:[Q&&a(me,{...R,value:p,setValue:n,navState:[!0,L],marker:ne.FIRST_MONTH}),o0&&a(me,{...R,value:c,setValue:r,navState:[L,!0],marker:ne.SECOND_MONTH})]}),P(p2,{display:"flex",flex:1,children:[P("div",{style:{display:"flex",flexDirection:"column",flex:"1"},children:[_&&P(q1,{children:[a("div",{style:{maxHeight:I?"60vh":"50vh",overflowY:"auto",display:A?"flex":"none",flex:1,flexDirection:"column"},children:a(Cz,{selectedRange:M,isHorizontal:!I,ranges:t,setRange:s,onClose:e.onClose})}),a(kz,{styles:!A,getEditedStartDate:f0,isHorizontal:!I,isMobile:!0,isFullCalendar:!1,getEditedEndDate:S0,handleStart:Y,handleStop:N0,onTimeRangeSet:$0,calendarOpen:g,stopCalendarOpen:o0,startCalendarOpen:Q,setCalendarOpen:d,setStopCalendar:t0,setStartCalendar:z0}),_&&P(Wl,{onClick:w0,theme:h,children:[a("span",{children:A?"Set Absolute Time":"Set Relative Time"}),a(uM,{className:i0({name:"rnnx2x",styles:"font-size:12px"})})]})]}),!_&&a(kz,{styles:!0,isMobile:!1,isFullCalendar:!0,getEditedStartDate:f0,getEditedEndDate:S0,handleStart:Y,handleStop:N0,onTimeRangeSet:$0,calendarOpen:g,setCalendarOpen:d}),g&&_&&!A&&P(p2,{container:!0,direction:"row",wrap:"nowrap",children:[Q&&a(me,{...R,value:p,setValue:n,navState:[!0,L],marker:ne.FIRST_MONTH}),o0&&a(me,{...R,value:c,setValue:r,navState:[L,!0],marker:ne.SECOND_MONTH})]})]}),a("div",{className:"divider"}),C&&a(p2,{style:{display:"flex",flex:1},children:a(Cz,{selectedRange:M,ranges:t,setRange:s,onClose:e.onClose})})]})]})})})})};function Rl(){const e=k1(),t=q.useRef(null),M=o=>{o.key==="Escape"&&e(iz(!1))},b=o=>{t.current&&!t.current.contains(o.target)&&e(iz(!1))};return q.useEffect(()=>(document.addEventListener("keydown",M,!0),document.addEventListener("click",b,!0),()=>{document.removeEventListener("keydown",M,!0),document.removeEventListener("click",b,!0)})),{ref:t}}var Ho={},ml=L1;Object.defineProperty(Ho,"__esModule",{value:!0});var or=Ho.default=void 0,Ll=ml(m1()),Nl=t1;or=Ho.default=(0,Ll.default)((0,Nl.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined");var jo={},vl=L1;Object.defineProperty(jo,"__esModule",{value:!0});var pr=jo.default=void 0,Bl=vl(m1()),yl=t1;pr=jo.default=(0,Bl.default)((0,yl.jsx)("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"}),"KeyboardArrowLeft");const Tl=g0("div",{target:"e13b6hz0"})({name:"12m2hdf",styles:'display:flex;flex-direction:column;justify-content:"center";padding:"3px";.time-span{text-align:center;}'});function Sl({dateRange:e}){const t=G0();return a(f1,{theme:t,children:P(Tl,{children:[a("span",{className:"time-span",children:q2(e.dateStart)?w2(e.dateStart,"yyyy/MM/dd HH:mm:ss"):e.dateStart}),a("span",{className:"time-span",children:"to"}),a("span",{className:"time-span",children:q2(e.dateEnd)?w2(e.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof e.dateEnd<"u"?e.dateEnd:""})]})})}const zt=i0({name:"th2gus",styles:"svg{font-size:1.15em;margin:0px 2px;}.tooltip{background-color:red;display:flex;align-items:center;justify-items:center;}@media screen and (max-width: 1200px){font-size:1em;padding:8px;color:#ddd;line-height:1.5;svg{margin-right:0;}span{display:none;}}"}),xl=e=>{try{let t=localStorage.getItem(e);if(typeof t=="string"){let M=JSON.parse(t);if(M.dateStart&&M.dateEnd)return JSON.parse(t)}}catch(t){return console.log(t),{dateStart:"",dateEnd:""}}},kb=e=>a(fa,{id:e.id,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},PaperProps:{sx:{background:e.qryntheme.neutral,color:e.qryntheme.contrast}},transformOrigin:{vertical:"bottom",horizontal:"left"},...e}),_z=["1m","5m","10m","30m","1h","3h","6h","12h","24h"];function Xl(e){const t=Date.now(),{id:M,minDate:b,maxDate:o,startTs:p,stopTs:n,label:c,onLabelChange:r,onStartChange:s,onStopChange:O,pickerOpen:l,onPickerOpen:h}=e,g=h2.useMediaQuery({query:"(max-width: 1013px)"}),d=X0(h0=>h0.isSplit),m=G0(),L={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},R=()=>{try{const h0=xl(Cb);if(!h0)return L;if((h0==null?void 0:h0.label)!==""&&typeof h0.label<"u"){const j0=lM(h0==null?void 0:h0.label);h0.dateStart=j0.dateStart,h0.dateEnd=j0.dateEnd}else h0.dateStart=new Date(h0.dateStart),h0.dateEnd=new Date(h0.dateEnd);return h0}catch{if(P2(p)&&P2(n))return{dateStart:p,dateEnd:n}}},W=uz(b,Mz(t,-10)),S=uz(o,Mz(t,10)),[N,x]=us(R()||{},W,S),[k,A]=q.useState({...R()}),[y,v]=q.useState(),[C,_]=q.useState(N||t),[I,D]=q.useState(x||Ot(C,1)),Q=q.useMemo(()=>({dateStart:p,dateEnd:n,label:c}),[p,n,c]);q.useEffect(()=>{r(Q.label)},[Q.label]);const{dateStart:z0,dateEnd:o0}=k,{ref:t0}=Rl(),N0=h0=>{Se(h0,I)&&_(h0)},Y=h0=>{bz(h0,C)&&D(h0)},$0=h0=>{let{label:j0,dateStart:Y0,dateEnd:r1}=h0;Y0&&r1&&(h0.label=j0,h0.dateStart=Y0=Ac([Y0,W]),h0.dateEnd=r1=lc([r1,S]),A(h0),k0(h0),d0(h0),_(Y0),D(po(Y0,r1)?Ot(Y0,1):r1))},k0=h0=>{localStorage.setItem(Cb,JSON.stringify(h0))},f0=h0=>{if(z0&&!o0&&!Se(h0,z0)){const j0={dateStart:z0,dateEnd:h0};d0(j0),k0(j0),A(j0),r(""),b0()}else A({dateStart:h0,dateEnd:void 0});v(h0)},S0=(h0,j0)=>{if(h0===ne.FIRST_MONTH){const Y0=Ot(C,j0);Se(Y0,I)&&_(Y0)}else{const Y0=Ot(I,j0);Se(C,Y0)&&D(Y0)}},w0=h0=>{z0&&!o0&&(!y||!Ie(h0,y))&&v(h0)},b0=(h0=null)=>{h0==null||h0.preventDefault(),h(!1)},s0={inHoverRange:h0=>z0&&!o0&&y&&bz(y,z0)&&oo(h0,{start:z0,end:y})},q0={onDayClick:f0,onDayHover:w0,onMonthNavigate:S0};function d0(h0){const{dateStart:j0,dateEnd:Y0,label:r1}=h0,x0=P2(j0),a1=P2(Y0),X1=typeof r1<"u";x0&&s(j0),a1&&O(Y0),X1&&r(r1)}const v0=h0=>{h0.preventDefault(),l===!0?b0(h0):h(!0)},K0=(h0,j0="range")=>{const Y0=h0==="backward"?ta:Ma;let r1={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};j0==="range"?r1=ea({start:z0,end:o0}):j0.includes("d")?r1.days=parseInt(j0):j0.includes("h")?r1.hours=parseInt(j0):j0.includes("m")?r1.minutes=parseInt(j0):j0.includes("s")&&(r1.seconds=parseInt(j0));const x0=Y0(z0,r1),a1=Y0(o0,r1),X1={dateStart:x0,dateEnd:a1,label:""};A(X1),k0(X1),d0(X1)},[Z0,F]=q.useState(null),n0=!!Z0,[p0,W0]=q.useState(null),E0=!!p0,_0=h0=>{F(()=>h0.currentTarget)},n1=h0=>{W0(()=>h0.currentTarget)},b1=(h0,j0,Y0)=>{F(null),W0(null),j0&&Y0&&K0(j0,Y0)};return P("div",{style:{display:"flex"},children:[!g&&!d&&P(q1,{children:[a(ot,{onClick:()=>{K0("backward")},attachedside:"r",emptySide:"l",className:H0(zt),children:a(pr,{})}),a(ot,{onClick:_0,attachedside:"both",size:"small",className:H0(zt),"aria-controls":n0?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":n0?"true":void 0,children:a(Pe,{})}),a(kb,{id:"backward-menu",anchorEl:Z0,open:n0,onClose:b1,qryntheme:m,children:_z.map(h0=>a(Sb,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:j0=>b1(j0,"backward",h0),children:h0},`${h0} l`))})]}),a(x1,{title:c?a(Sl,{dateRange:k}):"",children:P(ot,{onClick:v0,className:H0(zt),attachedside:"both",children:[a(or,{}),a("span",{children:c||(q2(k.dateStart)?w2(k.dateStart,"yyyy/MM/dd HH:mm:ss"):k.dateStart)+"-"+(q2(k.dateEnd)?w2(k.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof k.dateEnd<"u"?k.dateEnd:"")})]})}),!g&&!d&&P(q1,{children:[a(ot,{onClick:n1,id:`forward-button-${M}`,size:"small",className:H0(zt),"aria-controls":E0?`forward-menu${M}`:void 0,"aria-haspopup":"true","aria-expanded":E0?"true":void 0,children:a(Pe,{})}),a(kb,{id:`forward-menu-${M}`,anchorEl:p0,open:E0,onClose:b1,qryntheme:m,children:_z.map(h0=>a(Sb,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:j0=>b1(j0,"forward",h0),children:h0},`${h0} r`))}),a(ot,{onClick:()=>{K0("forward")},attachedside:"l",className:H0(zt),children:a($2,{})})]}),l?a("div",{tabIndex:0,ref:t0,children:a(f1,{theme:m,children:a(gl,{dateRange:k,minDate:W,maxDate:S,ranges:Wo(new Date),firstMonth:C,secondMonth:I,setFirstMonth:N0,setSecondMonth:Y,setDateRange:$0,helpers:s0,handlers:q0,onClose:b0})})}):null]})}const wl=Xl;function Cl(e){const{historyTabHeader:t,historyTab:M,starredHistoryTab:b,closeButton:o,linksTabHeader:p,linksTab:n,settingTab:c,settingTabHeader:r}=e;return P(La,{defaultValue:0,children:[P(fc,{children:[P(xe,{children:[a(ha,{}),a("span",{children:"Queries"})]}),P(xe,{children:[a(ga,{}),a("span",{children:"Links"})]}),P(xe,{children:[a(Ra,{}),a("span",{children:"Starred"})]}),P(xe,{children:[a(ma,{}),a("span",{children:"Settings"})]}),o]}),P(Xe,{value:0,children:[t,M]}),P(Xe,{value:1,children:[p,n]}),a(Xe,{value:2,children:b}),P(Xe,{value:3,children:[r,c]})]})}function El({pos:e,item:t,copyLink:M,handleDelete:b,handleStarLinkItem:o,handleSubmit:p,label:n}){var L;const[c,r]=q.useState(!1),{fromDate:s,toDate:O,type:l,url:h,queryInput:g,limit:d}=t,m=()=>{r(R=>!R)};return P(Ta,{open:c,children:[a(kl,{pos:e,onOpen:c}),a("button",{className:"open-button",onClick:()=>{m()},children:c?a(Gc,{fontSize:"small"}):a(Uc,{fontSize:"small"})}),P("div",{className:"inline-params",children:[a(x1,{title:"API URL",children:P("span",{style:{display:"flex",alignItems:"center"},children:[a(Lc,{fontSize:"small",style:{marginRight:"3px"}})," ",h]})}),P("span",{style:{whiteSpace:"nowrap"},children:["limit: ",d]}),P("span",{style:{whiteSpace:"nowrap"},children:["step: ",(L=t==null?void 0:t.params)==null?void 0:L.step]}),P("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[" ",a(x1,{title:`${s} - ${O}`,children:a(Vc,{style:{marginRight:"3px",height:"14px",width:"14px"}})})," ",P(ya,{children:[s," - ",O]})]})]}),P("div",{className:"block-params",children:[P("p",{children:[a("span",{className:"key",children:" Query:"})," ",a("span",{className:"value",children:g})," "]}),P("p",{children:[a("span",{className:"key",children:" API URL:"})," ",a("span",{className:"value",children:h})," "]}),P("p",{children:[a("span",{className:"key",children:" Data Source Type:"})," ",a("span",{className:"value",children:l})," "]}),P("p",{children:[a("span",{className:"key",children:"From: "})," ",a("span",{className:"value",children:s})," "]}),P("p",{children:[a("span",{className:"key",children:" To: "})," ",P("span",{className:"value",children:[" ",O]})," "]}),P("p",{children:[a("span",{className:"key",children:"Limit: "})," ",a("span",{className:"value",children:d})," "]}),P("p",{children:[a("span",{className:"key",children:" Step:"})," ",a("span",{className:"value",children:t.params.step})," "]})]}),a(_l,{item:t,onOpen:c,copyLink:M,handleDelete:b,handleStarLinkItem:o,handleSubmit:p,label:n})]})}function kl({pos:e,onOpen:t}){return a("div",{style:{display:t?"none":"flex",width:"30vw"},children:P(Wc,{children:["Link ",e," "]})})}function _l(e){const{item:t,onOpen:M,copyLink:b,handleDelete:o,handleStarLinkItem:p,handleSubmit:n,label:c}=e,r=G0(),[s,O]=q.useState(null),l=!!s,[h,g]=q.useState(!1);return P("div",{style:{display:"flex",flexDirection:M?"column-reverse":"row",justifyContent:"space-between",alignItems:"center"},children:[a(q1,{children:a(x1,{title:"Copy Link to Clipboard",placement:"right-end",children:P("span",{style:{display:"flex"},children:[a(re,{onClick:()=>b(t==null?void 0:t.data,"link",h),isActive:!0,style:{flex:1},className:"URL-COPY",attachedside:"r",children:a(Lc,{style:{height:"14px",width:"14px"},fontSize:"small"})}),a(re,{attachedside:"l",onClick:R=>{O(()=>R.currentTarget),g(()=>h)},size:"small",className:"date-time-selector","aria-controls":l?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":l?"true":void 0,children:a(Pe,{fontSize:"small"})}),a(kb,{id:"backward-menu",anchorEl:s,open:l,onClose:()=>{O(null)},qryntheme:r,size:"small",children:a(Sb,{style:{padding:"0 14px"},children:a(Sa,{children:a(xa,{style:{padding:"0",marginRight:0,cursor:c?"default":"not-allowed"},checked:h,onChange:R=>{g(()=>!!R.target.checked)},control:a(Xa,{style:{paddingRight:"0px",marginRight:"3px"},sx:{"& .MuiSvgIcon-root":{fontSize:14}},disabled:!c}),label:a(qc,{style:{fontSize:"12px",color:r.contrast},children:"Relative time"})})})},"relativeTime")})]})})}),a(x1,{title:"Delete Query",children:a(re,{onClick:()=>o(t),children:a(dM,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Star / Unstar Link",children:a(re,{onClick:()=>p(t),children:t.starred?a(Lo,{style:{height:"14px",width:"14px"},fontSize:"small"}):a(hc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Search Logs from Query",children:P(gc,{onClick:()=>n(t==null?void 0:t.data),children:[a($c,{className:"open-icon",fontSize:"small"}),a("span",{className:"open-text",children:"Open In New Tab"})]})})]})}function _b({queryHistory:e,copyQuery:t,handleDelete:M,handleStarItem:b,handleSubmit:o,filtered:p,emptyMessage:n,isStarred:c}){const[r,s]=q.useState([]);q.useEffect(()=>{s(e)},[]),q.useEffect(()=>{p.length>0&&s(p)},[p]),q.useEffect(()=>{s(e)},[e]);function O(l){let h="";if(typeof l=="string")try{h=JSON.parse(l).queryInput}catch{h=l}return h}return a(ao,{className:c?"starredCont":"",children:r.length>0?r==null?void 0:r.map((l,h)=>P(Rc,{children:[a("span",{style:{color:"#666",paddingRight:"10px",width:"10px",display:"flex",alignItems:"center"},children:r.length-h}),a(x1,{title:l.data,children:P(Wc,{children:[O(l.data)," "]})}),a("span",{children:w2(l.timestamp,"yyyy/MM/dd HH:mm:ss")}),P("div",{style:{display:"flex",alignItems:"center"},children:[a(x1,{title:"Copy Query to Clipboard",children:a(re,{onClick:()=>t(l.data),children:a(Na,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Delete Query",children:a(re,{onClick:()=>M(l),children:a(dM,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Star / Unstar Query",children:a(re,{onClick:()=>b(l),children:l.starred?a(Lo,{style:{height:"14px",width:"14px"},fontSize:"small"}):a(hc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Search Logs from Query",children:P(gc,{onClick:()=>o(l),children:[a($2,{className:"open-icon"}),a("span",{className:"open-text",children:"Show Results"})]})})]})]},h)):a(Kc,{message:n})})}function zr({linksHistory:e,copyLink:t,handleDelete:M,handleStarLinkItem:b,handleSubmit:o,filtered:p,emptyMessage:n,isStarred:c,label:r}){const[s,O]=q.useState([]);return q.useEffect(()=>{O(e)},[]),q.useEffect(()=>{p.length>0&&O(p)},[p]),q.useEffect(()=>{O(e)},[e]),a(ao,{className:c?"starredCont":"",children:s.length>0?s==null?void 0:s.map((l,h)=>P(Rc,{children:[a("span",{style:{paddingRight:"10px",color:"#666",width:"10px",display:"flex",alignItems:"center"},children:(s==null?void 0:s.length)-h}),a(El,{pos:(s==null?void 0:s.length)-h,item:l,copyLink:t,handleDelete:M,handleStarLinkItem:b,handleSubmit:o,label:r})]},h)):a(Kc,{message:n})})}function Il({starredQueries:e,starredLinks:t,handleDeleteQuery:M,handleDeleteLink:b,handleStarItem:o,handleStarLinkItem:p,handleSubmitQuery:n,handleSubmitLink:c,filteredLinks:r,filteredQueries:s,setFilteredStarLink:O,setFilteredStarQuery:l,filterItems:h,emptyQueryMessage:g,emptyLinkMessage:d,copyQuery:m,label:L}){const[R,W]=q.useState([]),[S,N]=q.useState([]);return q.useEffect(()=>{W(e),N(t)},[]),q.useEffect(()=>{r.length>0&&N(r),s.length>0&&W(s)},[r,s]),q.useEffect(()=>{W(e),N(t)},[e,t]),P(ht,{defaultValue:0,children:[P(fc,{children:[a(xe,{children:"Queries"}),a(xe,{children:"Links"})]}),P(Xe,{value:0,children:[a(at,{searchQueriesText:"Queries",queryHistory:e,filterItems:h,setFilteredItems:l}),a(_b,{queryHistory:R,copyQuery:m,handleDelete:M,handleStarItem:o,handleSubmit:n,filtered:s,emptyMessage:g,isStarred:!0})]}),P(Xe,{value:1,children:[a(at,{searchQueriesText:"Links",queryHistory:t,filterItems:h,setFilteredItems:O}),a(zr,{linksHistory:S,copyQuery:m,handleDelete:b,handleStarLinkItem:p,handleSubmit:c,filtered:r,emptyMessage:d,isStarred:!0,label:L})]})]})}function at({queryHistory:e,filterItems:t,setFilteredItems:M,searchQueriesText:b}){const[o,p]=q.useState("");function n(c){let r=c.target.value;p(r);const s=t(e,r);s.length>0?M(s):M([])}return a(mc,{children:P("div",{style:{display:"flex",alignItems:"center"},children:[a(va,{}),a(Ba,{type:"text",value:p1(o),onChange:n,placeholder:`Search ${b}`})," ",P("span",{style:{margin:"0px 4px"},children:["Total: ",e.length]})]})})}function Dl({queryHistory:e,linksHistory:t}){return a(mc,{children:P("div",{style:{display:"flex",alignItems:"center"},children:[P("span",{style:{margin:"0px 4px"},children:["Query History Rows: ",e==null?void 0:e.length]})," | ",P("span",{style:{margin:"0px 4px"},children:["Links History Rows: ",t==null?void 0:t.length]})]})})}function Pl({clearHistory:e,clearLinksHistory:t}){return a(ao,{children:P("div",{style:{display:"flex"},children:[P(zz,{children:[a("div",{children:"Clear Query History"}),a("small",{children:"Delete all of your query history, permanently."}),a(vz,{dialogType:"Query",clearHistory:e})]}),P(zz,{children:[a("div",{children:"Clear Links History"}),a("small",{children:"Delete all of your links history, permanently."}),a(vz,{dialogType:"Links",clearHistory:t})]})]})})}const nr=()=>{const e="Link Copied To Clipboard",t=k1(),M=ac().historyStore(),b=sc(),o=X0(b0=>b0.queryHistory),p=X0(b0=>b0.linksHistory),n=X0(b0=>b0.historyOpen),c=G0(),[r,s]=q.useState([]),[O,l]=q.useState([]),[h,g]=q.useState([]),[d,m]=q.useState([]),[L,R]=q.useState([]),[W,S]=q.useState(!1),N=X0(b0=>b0.start),x=X0(b0=>b0.stop),k=X0(({label:b0})=>b0);function A(b0){const m0=M.remove(b0);t(Ut(m0)),t(I2({message:"Query deleted succesfully",type:Y2.info}))}function y(b0){const m0=b.remove(b0);t($t(m0))}function v(b0){const m0={id:"",limit:100,panel:"left",queryInput:"",queryType:"range",direction:"forward"};let s0={};try{s0=JSON.parse(b0.data)}catch{s0={...m0}}const{id:q0,limit:d0,panel:v0,queryInput:K0,queryType:Z0,type:F,dataSourceId:n0,url:p0,direction:W0}=s0;let E0="",_0=0;if(K0.includes("$__interval")){const b1=(x.getTime()-N.getTime())/1e3/30,h0=+1 .toFixed(1),j0=b1/h0,Y0=Math.round(j0*window.devicePixelRatio.toFixed(2));E0=K0.replace(/\[\$__interval\]/,`[${Y0}s]`),_0=Y0}else E0=K0;t(X2(F,E0,Z0,d0,v0,q0,W0||"forward",n0,p0,_0))}function C(b0){window.open(b0)}function _(b0,m0){return b0==null?void 0:b0.filter(s0=>s0.data.toLowerCase().includes(m0.toLowerCase()))}function I(b0){l(b0)}function D(b0){g(b0)}function Q(b0){R(b0)}function z0(b0){m(b0)}q.useEffect(()=>{const b0=(o==null?void 0:o.filter(s0=>s0.starred))||[],m0=(p==null?void 0:p.filter(s0=>s0.starred))||[];S(m0),s(b0)},[o,p]);function o0(b0){const m0={...b0,starred:!b0.starred},s0=M.update(m0);t(Ut(s0)),m0.starred?t(I2({message:"Query starred succesfully",type:Y2.success})):t(I2({message:"Query unstarred succesfully",type:Y2.success}))}function t0(b0){const m0={...b0,starred:!b0.starred},s0=b.update(m0);t($t(s0)),m0.starred?t(I2({message:"Link starred succesfully",type:Y2.success})):t(I2({message:"Link unstarred succesfully",type:Y2.success}))}function N0(){t(I2({type:"success",message:e}))}function Y(b0){navigator.clipboard.writeText(b0).then(function(){N0()},function(m0){console.log("error on copy",m0)})}function $0(b0){let m0=document.createElement("textarea");return m0.value=b0,m0.style={position:"fixed",left:"-999999px",top:"-999999px"},document.body.appendChild(m0),m0.focus(),m0.select(),new Promise((s0,q0)=>{N0(),document.execCommand("copy")?s0():q0(),m0.remove()})}function k0(b0,m0="query",s0=!1){const q0=new URL(b0),{hash:d0}=q0,v0=new URLSearchParams(d0.replace(/#/,"")),K0=new URL(window.location.href);K0.hash=`#${v0.toString()}`;const Z0=m0==="query"?JSON.parse(b0).queryInput:s0&&k?K0:b0;setTimeout(()=>{navigator!=null&&navigator.clipboard&&window.isSecureContext?Y(Z0):$0(Z0)},200)}function f0(){t(Ec(!1))}function S0(){const b0=M.clean();t(Ut(b0)),(b0==null?void 0:b0.length)<1&&t(I2({message:"Query History cleared succesfully",type:Y2.info}))}function w0(){const b0=b.clean();t($t(b0)),(b0==null?void 0:b0.length)<1&&t(I2({message:"Links History cleared succesfully",type:Y2.info}))}return a(uc,{theme:c,children:n&&a(Wa,{anchor:"bottom",style:{maxHeight:"250px"},open:n,variant:"persistent",theme:c,children:a(Cl,{historyTabHeader:a(at,{searchQueriesText:"Queries",queryHistory:o,clearHistory:S0,filterItems:_,setFilteredItems:I}),historyTab:a(_b,{queryHistory:o,copyQuery:k0,handleDelete:A,handleStarItem:o0,handleSubmit:v,filtered:O,emptyMessage:"There is no query history. Please execute some queries and you will see a history here."}),linksTabHeader:a(at,{searchQueriesText:"Links",queryHistory:p,filterItems:_,setFilteredItems:D}),linksTab:a(zr,{linksHistory:p,copyLink:k0,handleDelete:y,handleStarLinkItem:t0,handleSubmit:C,filtered:h,label:k,emptyMessage:"There is no links history. Please execute some queries and share links and you will see a history here."}),starredTabHeader:a(at,{searchQueriesText:"Queries",queryHistory:r,clearHistory:S0,filterItems:_,setFilteredItems:Q}),starredTab:a(_b,{queryHistory:r,copyQuery:k0,handleDelete:A,handleStarItem:o0,handleSubmit:v,filtered:L,emptyMessage:"Click the ‘Star’ icon to save queries and find them here to reuse again"}),starredHistoryTab:a(Il,{starredQueries:r,starredLinks:W,handleDeleteQuery:A,handleDeleteLink:y,handleStarItem:o0,handleStarLinkItem:t0,handleSubmitQuery:v,handleSubmitLink:C,filterItems:_,setFilteredStarLink:z0,setFilteredStarQuery:Q,filteredQueries:L,filteredLinks:d,emptyQueryMessage:"Click the 'Star' icon to save links and find them here to reuse again",emptyLinkMessage:"Click the 'Star' icon to save queries and find them here to reuse again",copyQuery:k0,label:k}),settingTabHeader:a(Dl,{queryHistory:o,linksHistory:p}),settingTab:a(Pl,{clearHistory:S0,clearLinksHistory:w0}),closeButton:a(xA,{onClose:f0})})})})},Hl=({type:e,actualQuery:t,total:M,dataView:b})=>q.useMemo(()=>{var l;const p=(e==="matrix"||e==="flux")&&(t==null?void 0:t.tableView),n=e==="stream"&&(t==null?void 0:t.tableView);let c="",r="",s="",O="";if(p){const h=((l=b==null?void 0:b.tableData)==null?void 0:l.total)*25,g=h<330?h:330;c=`${g+25}px`,s=`${g}px`,r="fit-content",O="fit-content"}if(e==="vector"||n){const h=M*25,g=h<330?h:330;c=`${g+25}px`,s=`${g}px`,r="fit-content",O="fit-content"}if(e==="stream"&&!(t!=null&&t.tableView)){const g=M*25<350?"fit-content":"inherit";c=g,s=g,r="fit-content",O="fit-content"}return(e==="matrix"||e==="flux")&&!(t!=null&&t.tableView)&&(c="fit-content",s="400px",r="fit-content",O="fit-content"),{regularCont:c,regularView:s,maxCont:r,maxView:O}},[M,e,t==null?void 0:t.tableView]),jl=({total:e,panelSize:t,dataView:M})=>{var p;let b=0;return M.type==="matrix"?b=(p=M==null?void 0:M.tableData)==null?void 0:p.total:b=e,q.useMemo(()=>{const n=b*25;return t==="max"?n:t==="min"?0:n<310?n:310},[t])},Fl=({panel:e,dataView:t})=>q.useMemo(()=>{let b={};return e&&t&&(b=e==null?void 0:e.find(o=>o.id===t.id)),b},[e,t]);function Iz(e){const{name:t}=e;return a(q1,{children:t})}const Vl=g0("div",{target:"emosc6a8"})("display:flex;align-items:center;justify-content:center;flex:1;height:100%;font-size:0.75em;letter-spacing:1px;padding:30px;color:",({theme:e})=>e.lightContrast,";background:",({theme:e})=>e.background,";text-align:center;"),$l=g0("div",{target:"emosc6a4"})({name:"c6g1h8",styles:"overflow-y:auto;margin:2px;display:flex;flex-direction:column;flex:1;max-height:100vh;&::-webkit-scrollbar{background:transparent;}::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{background:transparent;}"}),Ul=g0("div",{target:"emosc6a3"})("display:flex;align-items:center;color:",({theme:e})=>e.contrast,";font-size:12px;.header-actions{justify-self:flex-end;.header-icon{padding:1px 2px;margin:0px 2px;border-radius:3px;cursor:pointer;color:",({theme:e})=>e.contrast,";&:hover{background:",({theme:e})=>e.neutral,";}}}.view-header-info{display:flex;flex:1;align-items:center;span{margin:0px 3px;.exp{font-family:monospace;}}}"),Dz=g0("div",{target:"emosc6a2"})("margin:0px 2px;padding:2px;font-size:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;"),Gl=g0("div",{target:"emosc6a1"})("display:flex;align-items:center;margin:0px 12px;flex:1;max-width:450px;overflow-x:auto;&::-webkit-scrollbar{width:5px;height:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}"),Kl=g0("div",{target:"emosc6a0"})("background:",({theme:e})=>e.shadow,";color:",({theme:e})=>e.contrast,";display:flex;flex-direction:column;padding:20px;div{width:100%;overflow-wrap:break-word;font-family:monospace;}p{padding:10px;font-size:12px;display:flex;flex:1;align-items:center;flex-wrap:wrap;span.label{background:",({theme:e})=>e.accentNeutral,";color:",({theme:e})=>e.shadow,";margin:2px;padding:2px;border-radius:2px;}}h4{margin-bottom:20px;padding-bottom:4px;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";}pre{font-family:monospace;}small{font-size:10px;}");var Fo={},Ql=L1;Object.defineProperty(Fo,"__esModule",{value:!0});var C2=Fo.default=void 0,Jl=Ql(m1()),Yl=t1;C2=Fo.default=(0,Jl.default)((0,Yl.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");const Zl=({labels:e})=>(e==null?void 0:e.length)>0?P("p",{children:["Labels:",e.map((t,M)=>a("span",{className:"label",children:t},M))]}):null,ed=({idRef:e,expr:t,queryType:M})=>P(q1,{children:[a("h4",{children:e}),a("div",{children:a("p",{children:t})}),P("p",{children:["Query Type: ",M]})]}),td=({expr:e,idRef:t,labels:M,limit:b,queryType:o,total:p})=>{const n={idRef:t,expr:e,queryType:o},c={labels:M};return P(Kl,{children:[a(ed,{...n}),a(Zl,{...c}),P("p",{children:["Limit: ",b]}),P("p",{children:["Total: ",p]})]})};function Md({expr:e,idRef:t,labels:M,queryType:b,limit:o,total:p,onClose:n,open:c}){const r=G0();return a(f1,{theme:r,children:a(ro,{open:c,onClose:n,PaperProps:{classes:{root:Oo}},children:a(td,{expr:e,idRef:t,labels:M,queryType:b,limit:o,total:p})})})}function Lt(e){var S;const{fixedSize:t}=e||{fixedSize:!1},M=h2.useMediaQuery({query:"(max-width: 1013px)"}),[b,o]=q.useState(!1),[p,n]=q.useState(!0),c=G0(),{actualQuery:r,dataView:s,type:O,total:l,setMinimize:h,setMaxHeight:g}=e,d=q.useMemo(()=>{const N=O==="matrix"&&(r==null?void 0:r.tableView),x=O==="stream"&&(r==null?void 0:r.tableView);if((O==="matrix"||O==="flux")&&!(r!=null&&r.tableView))return"Chart";if(O==="stream"&&!(r!=null&&r.tableView))return"Logs";if(O==="vector"||N||x)return"Table";if(O==="empty")return"No Results"},[O,r==null?void 0:r.tableView]),m=q.useCallback(()=>{p?(h(),n(!1)):(g(),n(!0))},[p,h,g]),L=q.useCallback(()=>{o(!0)},[]),R=q.useMemo(()=>{var N;return((N=s==null?void 0:s.labels)==null?void 0:N.join(" | "))||""},[s.labels]),W=q.useMemo(()=>{var N;if((N=s==null?void 0:s.labels)!=null&&N.length)if((s==null?void 0:s.labels.length)>4){const x=[...s.labels].slice(0,4);return P(q1,{children:[x.map((k,A)=>a(Dz,{children:a(Iz,{name:k,...e.theme})},A))," ","..."]})}else return a(q1,{children:s.labels.map((x,k)=>a(Dz,{children:a(Iz,{name:x,...e.theme})},k))})},[s.labels,e.theme]);if(r){const{idRef:N,expr:x,limit:k,queryType:A}=r;return a(f1,{theme:c,children:P(Ul,{children:[P("div",{className:"view-header-info",children:[a("span",{children:a("span",{className:"exp",children:d})}),a(x1,{title:(r==null?void 0:r.expr)||"",children:P("span",{children:[" ",a("span",{className:"exp",children:r==null?void 0:r.idRef})]})}),!M&&P(q1,{children:[P("span",{children:["limit:"," ",a("span",{className:"exp",children:r==null?void 0:r.limit})]}),P("span",{children:["count: ",a("span",{className:"exp",children:l})]})]}),((S=s==null?void 0:s.labels)==null?void 0:S.length)>0&&!M&&a("span",{children:P(Gl,{title:R,children:["labels:",W]})})]}),a("div",{className:"header-actions",children:!t&&P(q1,{children:[a(wa,{className:"header-icon",style:{fontSize:"12px"},onClick:L}),a(bd,{isOpen:p,onClick:m})]})}),b&&a(Md,{labels:s.labels||[],limit:k,expr:x,queryType:A,idRef:N,open:b,total:l,onClose:y=>o(!1)})]})})}return null}const bd=e=>{const{isOpen:t,onClick:M}=e;return t?a(C2,{className:"header-icon",onClick:M,style:{fontSize:"14px"}}):a(_o,{className:"header-icon",onClick:M,style:{fontSize:"14px"}})};function od(e){const t=G0(),{loading:M}=e;return M?null:a(f1,{theme:t,children:a(Vl,{children:"Please adjust search parameters and click on ‘Show Results’ button"})})}const qM=g0("div",{target:"e5pse6w4"})("margin:4px;padding:5px;margin-top:0px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;display:flex;flex-direction:column;flex:",({size:e})=>e==="min"?0:1,";height:",e=>e.size==="regular"?e.vheight.regularCont:e.size==="max"?e.vheight.maxCont:"20px",";.view-content{height:",e=>e.size==="regular"?e.vheight.regularView:e.size==="max"?e.vheight.maxView:"0px",";display:",e=>e.size==="min"?"none":(e.size==="regular","flex"),";flex-direction:",e=>(e.size==="regular","column"),";flex:1;}"),H2=g0(xb,{target:"e5pse6w3"})("width:100%;background:",({theme:e})=>e.shadow,";height:inherit;flex:1;"),Vo=g0(yc,{target:"e5pse6w1"})("min-width:320px;background:",({theme:e})=>e.shadow,";border-bottom:4px solid ",({theme:e})=>e.bgNeutral,";display:",({panelsize:e})=>e==="min"?"none":"flex",";align-items:center;align-content:space-between;"),j2=g0(Bc,{target:"e5pse6w0"})("color:",({theme:e})=>e.contrast,";background:",({theme:e})=>e.neutral,";border:1px solid ",e=>e.theme.accentNeutral,";cursor:pointer;font-size:13px;background-color:transparent;padding:6px 10px;border:none;border-radius:3px 3px 0px 0px;display:flex;justify-content:center;align-items:center;border-bottom:1px solid transparent;transition:0.2s all;&:hover{background-color:",({theme:e})=>e.lightNeutral,";}&:focus{color:",({theme:e})=>e.contrast,";background:",({theme:e})=>e.neutral,";border-radius:3px 3px 0px 0px;outline-offset:2px;}&.",Nc.selected,"{border-bottom:1px solid ",({theme:e})=>e.primary,";}&.",vc.disabled,"{opacity:0.5;cursor:not-allowed;}@media screen and (max-width: 360px){span{display:none;}padding:5px 20px;}");function pd(e){const{viewRef:t,panelSize:M,setStreamClose:b,setMinimize:o,setMaxHeight:p,actualQuery:n,total:c,loading:r}=e;return P(qM,{ref:t,size:M,vheight:"regular",children:[a(Lt,{onClose:b,setMinimize:o,setMaxHeight:p,actualQuery:n,total:c,type:"empty",fixedSize:!0,...e}),a(od,{loading:r})]})}const zd=(e,t,M,b)=>{const o=Ua(e.getValue(t),M);return b(o),o.passed},nd={cell:e=>e.getValue()},cd=(e,t)=>({updateData:(M,b,o)=>{t(),e(p=>p.map((n,c)=>c!==M?n:{...p[M],[b]:o}))}}),rd=e=>i0("color:",e.contrast,";background:",e.deep,";border:1px solid ",e.accentNeutral,";border-radius:3px;padding:3px 8px;font-size:12px;",""),tM=({value:e,onChange:t,debounce:M=500,theme:b,...o})=>{const[p,n]=q.useState(e),c=r=>n(r.target.value);return q.useEffect(()=>{n(e)},[e]),q.useEffect(()=>{const r=setTimeout(()=>{t(p)},M);return()=>clearTimeout(r)},[p]),a("input",{...o,className:H0(rd(b)),value:p1(String(p)),onChange:c})};var $o={},Od=L1;Object.defineProperty($o,"__esModule",{value:!0});var cr=$o.default=void 0,id=Od(m1()),ad=t1;cr=$o.default=(0,id.default)((0,ad.jsx)("path",{d:"M15 9.86 18.03 12 15 14.14zm-9 0L9.03 12 6 14.14zM13 6v12l8.5-6zM4 6v12l8.5-6z"}),"FastForwardOutlined");var Uo={},sd=L1;Object.defineProperty(Uo,"__esModule",{value:!0});var rr=Uo.default=void 0,Ad=sd(m1()),ld=t1;rr=Uo.default=(0,Ad.default)((0,ld.jsx)("path",{d:"M18 9.86v4.28L14.97 12zm-9 0v4.28L5.97 12zM20 6l-8.5 6 8.5 6zm-9 0-8.5 6 8.5 6z"}),"FastRewindOutlined");var Go={},dd=L1;Object.defineProperty(Go,"__esModule",{value:!0});var Or=Go.default=void 0,ud=dd(m1()),qd=t1;Or=Go.default=(0,ud.default)((0,qd.jsx)("path",{d:"m6 18 8.5-6L6 6zm2-8.14L11.03 12 8 14.14zM16 6h2v12h-2z"}),"SkipNextOutlined");var Ko={},fd=L1;Object.defineProperty(Ko,"__esModule",{value:!0});var ir=Ko.default=void 0,Wd=fd(m1()),hd=t1;ir=Ko.default=(0,Wd.default)((0,hd.jsx)("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6zm6.5 2.14L12.97 12 16 9.86z"}),"SkipPreviousOutlined");const Pz=i0({name:"rza2c4",styles:"display:flex;align-items:center;gap:1px"}),Hz=i0({name:"rnnx2x",styles:"font-size:12px"}),gd=e=>i0("border-radius:3px;outline:none;border:1px solid ",e.accentNeutral,";background:",e.deep,";color:",e.contrast,";padding:3px 8px;margin:2px;width:70px;",""),Rd=e=>i0("color:",e.contrast,";border:1px solid ",e.accentNeutral,";background:",e.deep,";padding:3px 8px 2px 8px;border-radius:3px;cursor:pointer;font-size:12px;",""),Ht=e=>i0("display:flex;align-items:center;border:1px solid ",e.accentNeutral,";color:",e.contrast,";background:",e.neutral,";cursor:pointer;","");function md({hasNextPage:e,hasPreviousPage:t,nextPage:M,pageCount:b,pageIndex:o,pageSize:p,previousPage:n,setPageIndex:c,setPageSize:r,totalRows:s}){const O=G0();return P(q1,{children:[P("div",{style:{display:"flex",gap:"4px",alignItems:"center",flex:1,width:"100%",color:O.contrast,margin:"5px"},children:[a("button",{className:H0(Ht(O)),onClick:()=>c(0),disabled:!t,children:a(rr,{style:{height:"12px",width:"12px"}})}),a("button",{className:H0(Ht(O)),onClick:()=>n(),disabled:!t,children:a(ir,{style:{height:"12px",width:"12px"}})}),a("button",{className:H0(Ht(O)),onClick:()=>M(),disabled:!e,children:a(Or,{style:{height:"12px",width:"12px"}})}),a("button",{className:H0(Ht(O)),onClick:()=>c(b-1),disabled:!e,children:a(cr,{style:{height:"12px",width:"12px"}})}),a("span",{className:H0(Pz,Hz),children:P("div",{children:["Page"," ",P("strong",{children:[o+1," of ",b]})]})}),P("span",{className:H0(Pz,Hz),children:["- Go to page:",a("input",{type:"number",defaultValue:o+1,onChange:l=>{const h=l.target.value?Number(l.target.value)-1:0;c(h)},className:H0(gd(O))})]}),a("select",{className:H0(Rd(O)),value:p1(String(p)),onChange:l=>{r(Number(l.target.value))},children:[10,20,30,40,50].map(l=>P("option",{value:p1(String(l)),children:["Show ",l," Rows"]},l))}),P("div",{style:{fontSize:"12px",marginLeft:"6px"},children:[" ","Total: ",s," Rows"]})]}),a("div",{className:"flex items-center gap-2"})]})}const Ld=({columnFilterValue:e,getFacetedMinMaxValues:t,setFilterValue:M})=>{var r,s;const b=G0(),o=(r=t())==null?void 0:r[0],p=Number(o??""),n=(s=t())==null?void 0:s[1],c=Number(n);return P("div",{children:[P("div",{style:{display:"flex",gap:"4px",alignItems:"center",justifyContent:"center"},children:[a(tM,{theme:b,type:"number",min:p,max:c,value:(e==null?void 0:e[0])??"",onChange:O=>M(l=>[O,l==null?void 0:l[1]]),placeholder:`Min ${o?`(${p})`:""}`,className:"w-24 border shadow rounded"}),a(tM,{theme:b,type:"number",min:p,max:c,value:(e==null?void 0:e[1])??"",onChange:O=>M(l=>[l==null?void 0:l[0],O]),placeholder:`Max ${n?`(${c})`:""}`,className:"w-24 border shadow rounded"})]}),a("div",{className:"h-1"})]})},Nd=({columnId:e,columnFilterValue:t,columnSize:M,setFilterValue:b,sortedUniqueValues:o})=>{const p=e+"list",n=G0();return P(q.Fragment,{children:[a("datalist",{id:p,children:o.slice(0,5e3).map(c=>a("option",{value:p1(c)},c))}),a(tM,{theme:n,type:"text",value:p1(t??""),onChange:c=>b(c),placeholder:`Search... (${M})`,className:"w-36 border shadow rounded",list:p}),a("div",{className:"h-1"})]})};function vd({column:e,table:t}){var n;const M=(n=t.getPreFilteredRowModel().flatRows[0])==null?void 0:n.getValue(e.id),b=e.getFilterValue(),o=e.getFacetedUniqueValues(),p=q.useMemo(()=>typeof M=="number"?[]:Array.from(o.keys()).sort(),[o]);return typeof M=="number"?a(Ld,{columnFilterValue:b,getFacetedMinMaxValues:e.getFacetedMinMaxValues,setFilterValue:e.setFilterValue}):a(Nd,{columnId:e.id,columnFilterValue:p1(b),columnSize:o.size,setFilterValue:e.setFilterValue,sortedUniqueValues:p})}var Qo={},Bd=L1;Object.defineProperty(Qo,"__esModule",{value:!0});var ar=Qo.default=void 0,yd=Bd(m1()),Td=t1;ar=Qo.default=(0,yd.default)((0,Td.jsx)("path",{d:"M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"}),"SortOutlined");var Jo={},Sd=L1;Object.defineProperty(Jo,"__esModule",{value:!0});var sr=Jo.default=void 0,xd=Sd(m1()),Xd=t1;sr=Jo.default=(0,xd.default)((0,Xd.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUpOutlined");const wd=i0({name:"1yit4u5",styles:"position:relative;&.resizer{position:absolute;left:0;top:0;height:100%;width:5px;cursor:col-resize;user-select:none;touch-action:none;&.isResizing{background:blue;opacity:1;}}"}),bb=(e,t)=>i0("height:14px!important;width:14px!important;color:",e,"!important;cursor:pointer;border:1px solid ",t,";border-radius:3px;padding:2px;","");function Cd(e,t){return t==="left"?[e.getLeftHeaderGroups(),e.getLeftFooterGroups()]:t==="right"?[e.getRightHeaderGroups(),e.getRightFooterGroups()]:t==="center"?[e.getCenterHeaderGroups(),e.getCenterFooterGroups()]:[e.getHeaderGroups(),e.getFooterGroups()]}function Ed(e,t){return t==="left"?e.getLeftVisibleCells():t==="right"?e.getRightVisibleCells():t==="center"?e.getCenterVisibleCells():e.getVisibleCells()}function kd({table:e,tableGroup:t,columnResizeMode:M}){const b=G0(),[o]=Cd(e,t);return a(f1,{theme:b,children:P("table",{style:{width:"100%"},children:[a("thead",{children:o.map(p=>a("tr",{children:p.headers.map(n=>P("th",{className:H0(wd),key:n.id,colSpan:n.colSpan,style:{width:n.getSize()},children:[" ",P("div",{style:{display:"flex",gap:"6px",alignItems:"center",fontSize:"13px"},children:[n.isPlaceholder?null:a(q1,{children:rz(n.column.columnDef.header,n.getContext())}),a("div",{onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:`resizer ${n.column.getIsResizing()?"isResizing":""}`}),P("div",{style:{fontSize:"12px",display:"flex",alignItems:"center",gap:"6px"},children:[n.column.getCanFilter()?a("div",{children:a(vd,{column:n.column,table:e})}):null,a("button",{onClick:n.column.getToggleSortingHandler(),style:{border:"none",background:"none",display:"flex",alignItems:"center"},title:"Sort",className:n.column.getCanSort()?"cursor-pointer select-none":"",children:{asc:a(sr,{className:H0(bb(b.contrast,b.accentNeutral))}),desc:a(Pe,{className:H0(bb(b.contrast,b.accentNeutral))})}[n.column.getIsSorted()]??a(ar,{className:H0(bb(b.contrast,b.accentNeutral))})})]})]})]}))},p.id))}),a("tbody",{children:e.getRowModel().rows.map(p=>a("tr",{children:Ed(p,t).map(n=>a("td",{style:{width:n.column.getSize(),fontSize:"12px"},children:a(q1,{children:rz(n.column.columnDef.cell,n.getContext())})},n.id))},p.id))})]})})}function _d(){const e=q.useRef(!0),t=e.current,M=q.useCallback(()=>{e.current=!1},[]);return q.useEffect(()=>{e.current=!0}),q.useMemo(()=>[!!t,M],[t,M])}const Id=g0("div",{target:"eptftt0"})("padding:5px;table{border-spacing:0;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:4px;border-bottom:none;border-top:none;color:",({theme:e})=>e.contrast,";tr{:last-child{td{border-bottom:none;}}}th,td{margin:0;padding:0.45rem;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";border-right:1px solid ",({theme:e})=>e.accentNeutral,";:last-child{border-right:0;}}td{input{font-size:12px;padding:0;margin:0;border:0;}}}.pagination{padding:0.5rem;}");function Dd(e){var k;const t=q.useReducer(()=>({}),{})[1],{columns:M,data:b}=e,o=G0(),[p,n]=q.useState(b),c=()=>n(b),[r,s]=q.useState({}),[O,l]=q.useState([]),[h,g]=q.useState({}),[d,m]=q.useState([]),[L,R]=q.useState(""),[W,S]=_d(),[N]=q.useState("onChange"),x=Ga({data:p,columns:M,defaultColumn:nd,getCoreRowModel:Ka(),getFilteredRowModel:Qa(),getPaginationRowModel:Ja(),getSortedRowModel:Ya(),getGroupedRowModel:Za(),getFacetedRowModel:e3(),getFacetedUniqueValues:t3(),getFacetedMinMaxValues:M3(),onColumnFiltersChange:m,onGlobalFilterChange:R,globalFilterFn:zd,autoResetPageIndex:W,enableColumnResizing:!0,columnResizeMode:N,onColumnVisibilityChange:s,onGroupingChange:l,onRowSelectionChange:g,meta:cd(n,S),state:{grouping:O,columnFilters:d,globalFilter:L,columnVisibility:r}});return q.useEffect(()=>{var A,y;((A=x.getState().columnFilters[0])==null?void 0:A.id)==="fullName"&&((y=x.getState().sorting[0])==null?void 0:y.id)!=="fullName"&&x.setSorting([{id:"fullName",desc:!1}])},[(k=x.getState().columnFilters[0])==null?void 0:k.id]),a(f1,{theme:o,children:P(Id,{theme:o,children:[P("div",{style:{display:"flex",justifyContent:"space-between",margin:"4px",marginLeft:0},children:[a("div",{style:{display:"flex",fontSize:"14px",gap:"6px",margin:"4px",marginLeft:0},children:x.getAllLeafColumns().map(A=>a("div",{children:P("label",{style:{display:"flex",alignItems:"center",color:o.contrast},children:[a("input",{type:"checkbox",checked:A.getIsVisible(),onChange:A.getToggleVisibilityHandler(),className:"mr-1"}),A.id]})},A.id))}),P("div",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"14px",margin:"4px",color:o.contrast},children:["Search:",a(tM,{theme:o,style:{fontSize:"12px",padding:"3px 8px"},value:p1(L??""),onChange:A=>R(String(A)),placeholder:"Search all columns..."})]})]}),a("div",{style:{display:"flex"},children:a(kd,{columnResizeMode:N,table:x,tableGroup:"center"})}),a("div",{style:{display:"flex"},children:a(md,{getSelectedRowModel:x.getSelectedRowModel,hasNextPage:x.getCanNextPage(),hasPreviousPage:x.getCanPreviousPage(),nextPage:x.nextPage,pageCount:x.getPageCount(),pageIndex:x.getState().pagination.pageIndex,pageSize:x.getState().pagination.pageSize,previousPage:x.previousPage,refreshData:c,rerender:t,rowSelection:h,setPageIndex:x.setPageIndex,setPageSize:x.setPageSize,totalRows:x.getPrePaginationRowModel().rows.length})})]})})}const Pd=g0("div",{target:"e19v7mv10"})("display:block;overflow:auto;&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}.table{border-spacing:0;border-radius:4px;font-size:12px;color:",({theme:e})=>e.contrast,";&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}.tr{display:block;:last-child{.td{border-bottom:0;}}}.th{background:",({theme:e})=>e.lightNeutral,";border-bottom:none;padding:3px;:last-child{box-sizing:unset!important;}}.th,.td{display:block;flex:1;margin:0;justify-content:space-between;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";border-right:1px solid ",({theme:e})=>e.accentNeutral,";padding:3px;position:relative;white-space:nowrap;overflow:hidden;.show-add-labels{display:none;}&:hover{.show-add-labels{display:flex;align-items:center;}}:last-child{border-right:0;padding-right:0px;}.resizer{display:inline-block;background:",({theme:e})=>e.accentNeutral,";width:5px;height:100%;position:absolute;right:0;top:0;transform:translateX(50%);z-index:1;&.isResizing{background:red;}}}}.pagination{}"),Yo=e=>{const{data:{columnsData:t,dataRows:M},actualQuery:b,height:o,size:p,width:n}=e,[c,r]=q.useState(t),[s,O]=q.useState(M);return q.useEffect(()=>{r(t)},[t]),q.useEffect(()=>{O(M)},[M]),a(Pd,{children:t&&M&&a(Dd,{actQuery:b,columns:c,width:n,data:s,height:o,size:p})})};function F2({id:e}){try{return JSON.parse(localStorage.getItem("tabsState")||`{[${e}]:0}`)}catch{return{[e]:0}}}var Ar={exports:{}};/*! +`);var t0=0,m0=!1;this.parse=function(Y,$0,k0){if(typeof Y!="string")throw new Error("Input must be a string");var f0=Y.length,T0=C.length,C0=_.length,p0=I.length,A0=A(D),W0=[],g0=[],d0=[],B0=t0=0;if(!Y)return T1();if(y.header&&!$0){var G0=Y.split(_)[0].split(C),$=[],M0={},c0=!1;for(var q0 in G0){var x0=G0[q0];A(y.transformHeader)&&(x0=y.transformHeader(x0,q0));var V0=x0,U0=M0[x0]||0;for(0=Q)return T1(!0)}else for(X0=t0,t0++;;){if((X0=Y.indexOf(v,X0+1))===-1)return k0||g0.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:W0.length,index:t0}),P1();if(X0===f0-1)return P1(Y.substring(t0,X0).replace(n1,v));if(v!==n0||Y[X0+1]!==n0){if(v===n0||X0===0||Y[X0-1]!==n0){H0!==-1&&H0=Q)return T1(!0);break}g0.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:W0.length,index:t0}),X0++}}else X0++}return P1();function $1(N1){W0.push(N1),B0=t0}function U1(N1){var V1=0;if(N1!==-1){var s2=Y.substring(X0+1,N1);s2&&s2.trim()===""&&(V1=s2.length)}return V1}function P1(N1){return k0||(N1===void 0&&(N1=Y.substring(t0)),d0.push(N1),t0=f0,$1(d0),A0&&w1()),T1()}function B1(N1){t0=N1,$1(d0),d0=[],Z0=Y.indexOf(_,t0)}function T1(N1){return{data:W0,errors:g0,meta:{delimiter:C,linebreak:_,aborted:m0,truncated:!!N1,cursor:B0+($0||0)}}}function w1(){D(T1()),W0=[],g0=[]}},this.abort=function(){m0=!0},this.getCharIndex=function(){return t0}}function W(y){var v=y.data,C=n[v.workerId],_=!1;if(v.error)C.userError(v.error,v.file);else if(v.results&&v.results.data){var I={abort:function(){_=!0,S(v.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:L,resume:L};if(A(C.userStep)){for(var D=0;D{const{time:n}=ho(e,b,M),{debugMode:c}=y1.getState(),r={result:{resourceSpans:[],result:[],length:0},raw:[],time:n,debugMode:c,dispatch:t,type:"traces",dsType:e,panel:M,id:b,ts:Date.now(),queryType:p,open:!0};Be(r)};async function mz(e,t,M,b,o,p,n,c){var i,l,h,g,d,m,N,R,W,S,L,x,k,A,y,v,C,_,I;const{time:r}=ho(e,o,b),{debugMode:s}=y1.getState();if(e==="traces"){if(n==="trace-search"&&((l=(i=t==null?void 0:t.data)==null?void 0:i.traces)==null?void 0:l.length)>0){const D={result:t.data.traces||[],raw:t.data,time:r,debugMode:s,dispatch:M,dsType:e,type:e,panel:b,open:!0,id:o,ts:Date.now(),queryType:n};Be(D)}if(((g=(h=t==null?void 0:t.data)==null?void 0:h.resourceSpans)==null?void 0:g.length)>0){const D={result:(t==null?void 0:t.data)||[],raw:t==null?void 0:t.data,time:r,debugMode:s,dispatch:M,type:e,dsType:e,panel:b,open:!0,id:o,ts:Date.now(),queryType:n};Be(D)}}if(e==="flux"&&await tA(t==null?void 0:t.data).then(D=>{var Q;if(((Q=D==null?void 0:D.data)==null?void 0:Q.length)>0){const o0={result:D.data||[],raw:D==null?void 0:D.data,time:r,debugMode:s,queryType:n,dispatch:M,dsType:e,type:e,panel:b,open:!0,id:o,ts:Date.now(),direction:p};Be(o0)}}),((m=(d=t==null?void 0:t.data)==null?void 0:d.streams)==null?void 0:m.length)===0){const D={result:[],raw:"[]",time:r,debugMode:s,queryType:n,dispatch:M,open:!0,type:"streams",dsType:e,panel:b,id:o,ts:Date.now(),direction:p,isLogsVolume:c};Be(D),M(ae(!0))}if((N=t==null?void 0:t.data)!=null&&N.data){const D=(W=(R=t==null?void 0:t.data)==null?void 0:R.data)==null?void 0:W.result,Q=(L=(S=t==null?void 0:t.data)==null?void 0:S.data)==null?void 0:L.resultType;let o0={hasStats:!1,statsData:{}};(k=(x=t==null?void 0:t.data)==null?void 0:x.data)!=null&&k.stats&&((v=Object.keys((y=(A=t==null?void 0:t.data)==null?void 0:A.data)==null?void 0:y.stats))==null?void 0:v.length)>0&&(o0={hasStats:!0,statsData:{...(_=(C=t==null?void 0:t.data)==null?void 0:C.data)==null?void 0:_.stats}});const n0=y1.getState()[b],t0=n0==null?void 0:n0.map(Y=>Y.id===o?{...Y,hasStats:(o0==null?void 0:o0.hasStats)||!1,statsData:(o0==null?void 0:o0.statsData)||{},open:!0}:Y);M(MA(b,t0)),M(u3(e));const m0={result:D,raw:(I=t==null?void 0:t.data)==null?void 0:I.data,time:r,debugMode:s,queryType:n,dispatch:M,type:Q,dsType:e,open:!0,panel:b,id:o,ts:Date.now(),direction:p,isLogsVolume:c};Be(m0)}else Xb(M)}function bA(e){var o,p,n;const t=e.match(/\[(.*?)\]/gm),M=(t==null?void 0:t[0].replace(/\[\]']+/g,"").trim())||"";let b=0;if(Array.isArray(t)){const c=M.match(/^(?[0-9.]+)(?ns|us|ms|s|m|h)?$/),r=typeof((o=c==null?void 0:c.groups)==null?void 0:o.tnum)=="string"?parseInt((p=c==null?void 0:c.groups)==null?void 0:p.tnum):1,s=((n=c==null?void 0:c.groups)==null?void 0:n.trange)||"m";b=r/oA(s)}return b}function oA(e){const t=/^(ns|us|ms|s|m|h)$/,M={ns:1e9,us:1e6,s:1,m:.016666666666666666,h:.0002777777777777778},b=new Map(Object.entries(M));return t.test(e)&&typeof e=="string"?b.get(e)||1/60:b.get("m")||1/60}function Lz(e,t){window.bosco.send(e,t)}function pA(e,t,M){if(e==="left")return t(n2(M));if(e==="right")return t(Q1(M))}function zA(e,t,M){return M(e==="left"?fe(t):qe(t))}function nA(e,t,M){return[...e].map(b=>b.id===t?{...b,loading:M||!1}:b)}function X2(e,t,M,b,o,p,n="backwards",c="",r="",s=0,i=!1){var x,k,A,y,v,C;let l={url:"",requestHeaders:{},method:{value:""},headers:[],auth:{method:{value:"GET"},basicAuth:{value:!0},fields:{basicAuth:[{name:"user",value:""},{name:"password",value:""}]}},hasSettings:!1},h="",g="";if(c!==""){const _=y1.getState().dataSources,I=_.find(D=>D.id===c);if(I&&((x=Object.keys(I))==null?void 0:x.length)>0){const D=_.find(o0=>o0.id===c),Q=l.url!==""?l.url:D.url;l={...D,url:Q,hasSettings:!0}}if(((k=l==null?void 0:l.headers)==null?void 0:k.length)>0){let D={};for(let Q of l.headers){const o0={[String(Q.header)]:Q.value};D={...D,...o0}}l.requestHeaders=D||{}}if((y=(A=l==null?void 0:l.auth)==null?void 0:A.basicAuth)!=null&&y.value){const D=(C=(v=l==null?void 0:l.auth)==null?void 0:v.fields)==null?void 0:C.basicAuth;for(let Q of D)(Q==null?void 0:Q.name)==="user"&&(Q.value,h=Q.value),(Q==null?void 0:Q.name)==="password"&&(Q.value,g=Q.value);l.requestHeaders={...l.requestHeaders}}}const d=(_,I)=>{const D=y1.getState()[o];pA(o,_,nA(D,p,I))},{debugMode:m}=y1.getState(),N=rs(e,l.requestHeaders),R=bA(t),W=hs(e,t,b,R,n,l.url||"",M,r,s,p,o),S=cs(e,M,W),L=(_,I)=>{var o0;const D=(o0=y1.getState())==null?void 0:o0[`${o}DataView`],Q=D==null?void 0:D.find(n0=>n0.id===p);Q&&(Q.loading=_),zA(o,D,I)};return async function(_){var D,Q,o0,n0;L(!0,_),d(_,!0);let I;if(r===""){M==="trace-search"&&Rz(e,_,o,p,n,M),d(_,!1);return}if(t===""&&M!=="trace-search"){e==="traces"&&Rz(e,_,o,p,n,M),d(_,!1);return}typeof I<"u"&&I.cancel("Cancelling the previous request"),I=W2.CancelToken.source(),N.cancelToken=I.token;try{(N==null?void 0:N.method)==="POST"?await((Q=(D=W2)==null?void 0:D.post(S,t,N))==null?void 0:Q.then(t0=>{mz(e,t0,_,o,p,n,M)}).catch(t0=>{Xb(_),_(ae(!0)),L(!1,_),m&&console.log("Error loading flux data",t0)}).finally(()=>{L(!1,_),d(_,!1)})):(N==null?void 0:N.method)==="GET"&&await((n0=(o0=W2)==null?void 0:o0.get(S,{auth:{username:h,password:g},...N}))==null?void 0:n0.then(t0=>{mz(e,t0||{data:{data:[]}},_,o,p,n,M,i),m&&Lz({level:"info",id:p,type:e,direction:n},p),d(_,!1)}).catch(t0=>{Xb(_),_(ae(!0)),L(!1,_),d(_,!1),m&&(Lz({level:"error",id:p,type:e,direction:n},p),console.log("getting an error from response: ",t0))}).finally(()=>{d(_,!1),L(!1,_)}))}catch(t0){d(_,!1),console.log(t0)}}}var Ro={},cA=L1;Object.defineProperty(Ro,"__esModule",{value:!0});var dM=Ro.default=void 0,rA=cA(m1()),iA=t1,OA=(0,rA.default)((0,iA.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline");dM=Ro.default=OA;var mo={},aA=L1;Object.defineProperty(mo,"__esModule",{value:!0});var Lo=mo.default=void 0,sA=aA(m1()),AA=t1,lA=(0,sA.default)((0,AA.jsx)("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star");Lo=mo.default=lA;var No={},dA=L1;Object.defineProperty(No,"__esModule",{value:!0});var Fc=No.default=void 0,uA=dA(m1()),Nz=t1,qA=(0,uA.default)([(0,Nz.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},"0"),(0,Nz.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");Fc=No.default=qA;var vo={},fA=L1;Object.defineProperty(vo,"__esModule",{value:!0});var $c=vo.default=void 0,WA=fA(m1()),hA=t1,gA=(0,WA.default)((0,hA.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"Launch");$c=vo.default=gA;var Bo={},RA=L1;Object.defineProperty(Bo,"__esModule",{value:!0});var $2=Bo.default=void 0,mA=RA(m1()),LA=t1,NA=(0,mA.default)((0,LA.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");$2=Bo.default=NA;var yo={},vA=L1;Object.defineProperty(yo,"__esModule",{value:!0});var Uc=yo.default=void 0,BA=vA(m1()),yA=t1,TA=(0,BA.default)((0,yA.jsx)("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"}),"ZoomOutMap");Uc=yo.default=TA;var To={},SA=L1;Object.defineProperty(To,"__esModule",{value:!0});var Gc=To.default=void 0,xA=SA(m1()),XA=t1,wA=(0,xA.default)((0,XA.jsx)("path",{d:"M9 9V3H7v2.59L3.91 2.5 2.5 3.91 5.59 7H3v2h6zm12 0V7h-2.59l3.09-3.09-1.41-1.41L17 5.59V3h-2v6h6zM3 15v2h2.59L2.5 20.09l1.41 1.41L7 18.41V21h2v-6H3zm12 0v6h2v-2.59l3.09 3.09 1.41-1.41L18.41 17H21v-2h-6z"}),"ZoomInMap");Gc=To.default=wA;var So={},CA=L1;Object.defineProperty(So,"__esModule",{value:!0});var Pe=So.default=void 0,EA=CA(m1()),kA=t1,_A=(0,EA.default)((0,kA.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined");Pe=So.default=_A;const IA=h0("div",{target:"e13u74u10"})("background:",({theme:e})=>e.shadow,";#alert-dialog-title{color:",({theme:e})=>e.contrast,";}#alert-dialog-description{color:",({theme:e})=>e.lightContrast,";font-weight:normal;}");function vz({clearHistory:e,dialogType:t}){const[M,b]=q.useState(!1),o=Q0(),p=()=>{b(!0)},n=()=>{b(!1)};function c(){e(),b(!1)}return a(da,{theme:o,children:P("div",{children:[a(x1,{title:"Clear Query History",children:a(ra,{onClick:p,children:"Clear History"})}),a(ro,{open:M,onClose:n,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",PaperProps:{classes:{root:io}},children:P(IA,{children:[P(ia,{id:"alert-dialog-title",children:["Are you sure you want to clear the ",t," ","History?"]}),a(Oa,{children:P(aa,{id:"alert-dialog-description",children:["Click ‘Clear History’ to delete your"," ",t," history permanently"]})}),P(sa,{children:[a(Aa,{onClick:n,children:"Cancel"}),a(la,{active:!0,onClick:c,autoFocus:!0,children:"Clear History"})]})]})})]})})}function Kc({message:e}){return a(ua,{children:e})}function DA({onClose:e}){return a(qa,{onClick:e,children:a(Oo,{style:{height:"16px",width:"16px"}})})}const Qc=Object.fromEntries?Object.fromEntries:e=>{if(!e||!e[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const t={};return Object.keys(e).forEach(M=>{const[b,o]=e[M];t[b]=o}),t};function He(e){return Object.keys(e)}function xo(e,t){if(!e)throw new Error(t)}function Xo(e,t){return t}const wo=e=>{const t=e.length;let M=0,b="";for(;Mb===t[o]).indexOf(!1)>=0)&&(M.current={v:e(),prevDeps:[...t]}),M.current.v}function HA(e){return e instanceof Object&&!("styles"in e)&&!("length"in e)&&!("__emotion_styles"in e)}const{createCssAndCx:jA}=(()=>{function e(M,b,o){const p=[],n=Fa(M,p,o);return p.length<2?o:n+b(p)}function t(M){const{cache:b}=M,o=(...n)=>{const c=ja(n,b.registered);Va(b,c,!1);const r=`${b.key}-${c.name}`;e:{const s=n[0];if(!HA(s))break e;Bz.saveClassNameCSSObjectMapping(b,r,s)}return r};return{css:o,cx:(...n)=>{const c=wo(n),r=Bz.fixClassName(b,c,o);return e(b.registered,o,r)}}}return{createCssAndCx:t}})();function Jc(e){const{useCache:t}=e;function M(){const b=t(),{css:o,cx:p}=PA(()=>jA({cache:b}),[b]);return{css:o,cx:p}}return{useCssAndCx:M}}const Bz=(()=>{const e=new WeakMap;return{saveClassNameCSSObjectMapping:(t,M,b)=>{let o=e.get(t);o===void 0&&(o=new Map,e.set(t,o)),o.set(M,b)},fixClassName:(()=>{function t(M){let b=!1;return M.map(([o,p])=>{if(p===void 0)return o;let n;if(b)n={"&&":p};else{n=o;for(const c in p)if(c.startsWith("@media")){b=!0;break}}return n})}return(M,b,o)=>{const p=e.get(M);return wo(t(b.split(" ").map(n=>[n,p==null?void 0:p.get(n)])).map(n=>typeof n=="string"?n:o(n)))}})()}})();function je(e){if(!(e instanceof Object)||typeof e=="function")return e;const t=[];for(const M in e){const b=e[M],o=typeof b;if(!(o==="string"||o==="number"&&!isNaN(b)||o==="boolean"||b===void 0||b===null))return e;t.push(`${M}:${o}_${b}`)}return"xSqLiJdLMd9s"+t.join("|")}function Co(e,t,M){if(!(t instanceof Object))return e;const b={};return He(e).forEach(o=>b[o]=M(e[o],t[o])),He(t).forEach(o=>{if(o in e)return;const p=t[o];typeof p=="string"&&(b[o]=p)}),b}const Yc=({classes:e,theme:t,muiStyleOverridesParams:M,css:b,cx:o,name:p})=>{var n,c;e:{if(p==="makeStyle no name"){p=void 0;break e}if(M!==void 0&&p===void 0)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}let r;try{r=p===void 0?void 0:((c=(n=t.components)===null||n===void 0?void 0:n[p])===null||c===void 0?void 0:c.styleOverrides)||void 0}catch{}const s=q.useMemo(()=>{if(r===void 0)return;const i={};for(const l in r){const h=r[l];h instanceof Object&&(i[l]=b(typeof h=="function"?h(Object.assign({theme:t,ownerState:M==null?void 0:M.ownerState},M==null?void 0:M.props)):h))}return i},[r,je(M==null?void 0:M.props),je(M==null?void 0:M.ownerState),b]);return e=q.useMemo(()=>Co(e,s,o),[e,s,o]),{classes:e}};let VA=0;function Zc(e){const{useTheme:t,cache:M}=e,{useCache:b}=er({cacheProvidedAtInception:M}),{useCssAndCx:o}=Jc({useCache:b});function p(c){const{name:r,uniqId:s=`${VA++}`}=c??{},i=typeof r!="object"?r:Object.keys(r)[0];return function(l){const h=typeof l=="function"?l:()=>l;return function(d,m){const N=t();let{css:R,cx:W}=o();const S=b();let L=q.useMemo(()=>{const x={},k=typeof Proxy<"u"&&new Proxy({},{get:(v,C)=>(typeof C=="symbol"&&xo(!1),x[C]=`${S.key}-${s}${i!==void 0?`-${i}`:""}-${C}-ref`)}),A=h(N,d,k||{}),y=Qc(He(A).map(v=>{const C=A[v];return C.label||(C.label=`${i!==void 0?`${i}-`:""}${v}`),[v,`${R(C)}${Xo(v,v in x)?` ${x[v]}`:""}`]}));return He(x).forEach(v=>{v in y||(y[v]=x[v])}),y},[S,R,W,N,je(d)]);{const x=m==null?void 0:m.props.classes;L=q.useMemo(()=>Co(L,x,W),[L,je(x),W])}{const x=Yc({classes:L,css:R,cx:W,name:i??"makeStyle no name",idOfUseStyles:s,muiStyleOverridesParams:m,theme:N});x.classes!==void 0&&(L=x.classes),x.css!==void 0&&(R=x.css),x.cx!==void 0&&(W=x.cx)}return{classes:L,theme:N,css:R,cx:W}}}}function n(){const c=t(),{css:r,cx:s}=o();return{theme:c,css:r,cx:s}}return{makeStyles:p,useStyles:n}}const FA=q.createContext(void 0),{createUseCache:er}=(()=>{function e(){return q.useContext(FA)}function t(M){const{cacheProvidedAtInception:b}=M;function o(){var p;const n=$a(),c=e(),r=(p=b??c)!==null&&p!==void 0?p:n;if(r===null)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join(` +`));return r}return{useCache:o}}return{createUseCache:t}})();function yz(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Tz=globalThis&&globalThis.__rest||function(e,t){var M={};for(var b in e)Object.prototype.hasOwnProperty.call(e,b)&&t.indexOf(b)<0&&(M[b]=e[b]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,b=Object.getOwnPropertySymbols(e);o{const g=p,d=function(m){var{children:N}=m,R=Tz(m,["children"]);return q.createElement(g,R,N)};return Object.defineProperty(d,"name",{value:yz(g)}),d})():p,s=(()=>{{const{name:g}=c??{};if(g!==void 0)return typeof g!="object"?g:Object.keys(g)[0]}{const g=r.displayName;if(typeof g=="string"&&g!=="")return g}{const{name:g}=r;if(g)return g.replace(/\$/g,"usd")}})(),i=b(Object.assign(Object.assign({},c),{name:s}))(typeof n=="function"?(g,d,m)=>xz(n(g,d,m)):xz(n));function l(g){for(const d in g)if(d!=="root")return!0;return!1}const h=q.forwardRef(function(g,d){const{className:m,classes:N}=g,R=Tz(g,["className","classes"]),{classes:W,cx:S}=i(g,{props:g}),L=S(W.root,m);return tr.set(W,Object.assign(Object.assign({},W),{root:L})),z2.createElement(r,Object.assign({ref:d,className:l(W)?m:L},typeof p=="string"?{}:{classes:W},R))});return s!==void 0&&(h.displayName=`${yz(s)}WithStyles`,Object.defineProperty(h,"name",{value:h.displayName})),h}return o.getClasses=UA,{withStyles:o}}const tr=new WeakMap,Sz="getClasses should only be used in conjunction with withStyles";function UA(e){const t=e.classes;if(t===void 0)throw new Error(Sz);const M=tr.get(t);if(M===void 0)throw new Error(Sz);return M}function xz(e){const t={},M={};return Object.keys(e).forEach(b=>(b.startsWith("@media")?M:t)[b]=e[b]),Object.keys(M).forEach(b=>{const o=M[b];Object.keys(o).forEach(p=>{var n;return t[p]=Object.assign(Object.assign({},(n=t[p])!==null&&n!==void 0?n:{}),{[b]:o[p]})})}),t}const GA=(()=>!(typeof document=="object"&&typeof(document==null?void 0:document.getElementById)=="function")&&!(typeof jest<"u")&&!(typeof mocha<"u")&&!(typeof __vitest_worker__<"u"))();var KA=globalThis&&globalThis.__rest||function(e,t){var M={};for(var b in e)Object.prototype.hasOwnProperty.call(e,b)&&t.indexOf(b)<0&&(M[b]=e[b]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,b=Object.getOwnPropertySymbols(e);o({classes:r,cx:s,css:i})),name:void 0,doesUseNestedSelectors:!1})}}let QA=0;const Mb=[];function Qt(e){const{useContext:t,useCache:M,useCssAndCx:b,usePlugin:o,name:p,doesUseNestedSelectors:n}=e;return{withParams:()=>Qt(Object.assign({},e)),withName:c=>Qt(Object.assign(Object.assign({},e),{name:typeof c!="object"?c:Object.keys(c)[0]})),withNestedSelectors:()=>Qt(Object.assign(Object.assign({},e),{doesUseNestedSelectors:!0})),create:c=>{const r=`x${QA++}`,s=typeof c=="function"?c:()=>c;return function(l){var h,g,d;const m=l??{},{classesOverrides:N}=m,R=KA(m,["classesOverrides"]),W=t(),{css:S,cx:L}=b(),x=M();let k=q.useMemo(()=>{const y={},v=s(Object.assign(Object.assign(Object.assign({},l),W),n?{classes:typeof Proxy>"u"?{}:new Proxy({},{get:(_,I)=>{if(typeof I=="symbol"&&xo(!1),GA){{let D=Mb.find(Q=>Q.name===p&&Q.idOfUseStyles===r);D===void 0&&(D={name:p,idOfUseStyles:r,nestedSelectorRuleNames:new Set},Mb.push(D)),D.nestedSelectorRuleNames.add(I)}if(Mb.find(D=>D.name===p&&D.idOfUseStyles!==r&&D.nestedSelectorRuleNames.has(I))!==void 0)throw new Error([`tss-react: Duplicate nested selector "${I}" detected in ${p===void 0?`useStyles named "${p}"`:"anonymous useStyles function"}.`,"In SSR setups, this may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.",'Solution: Ensure each useStyles using nested selectors has a unique name. Use tss.withName("UniqueName").withNestedSelectors<...>()... to set a name.'].join(` +`))}return y[I]=`${x.key}-${r}${p!==void 0?`-${p}`:""}-${I}-ref`}})}:{})),C=Qc(He(v).map(_=>{const I=v[_];return I.label||(I.label=`${p!==void 0?`${p}-`:""}${_}`),[_,`${S(I)}${Xo(_,_ in y)?` ${y[_]}`:""}`]}));return He(y).forEach(_=>{_ in C||(C[_]=y[_])}),C},[x,S,L,je(l),...Object.values(W)]);k=q.useMemo(()=>Co(k,N,L),[k,je(N),L]);const A=o(Object.assign(Object.assign({classes:k,css:S,cx:L,idOfUseStyles:r,name:p},W),R));return Object.assign({classes:(h=A.classes)!==null&&h!==void 0?h:k,css:(g=A.css)!==null&&g!==void 0?g:S,cx:(d=A.cx)!==null&&d!==void 0?d:L},W)}}}}function JA(e){return Object.assign(Object.assign({},Zc(e)),$A(e))}const{tss:YA}=Mr({useContext:()=>({})});YA.create({});const{makeStyles:GN,withStyles:Eo}=JA({useTheme:co}),{tss:ZA}=Mr({useContext:function(){return{theme:co()}},usePlugin:Yc});ZA.create({});var ko={},el=L1;Object.defineProperty(ko,"__esModule",{value:!0});var _o=ko.default=void 0,tl=el(m1()),Ml=t1,bl=(0,tl.default)((0,Ml.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");_o=ko.default=bl;var Io={},ol=L1;Object.defineProperty(Io,"__esModule",{value:!0});var br=Io.default=void 0,pl=ol(m1()),zl=t1,nl=(0,pl.default)((0,zl.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");br=Io.default=nl;const cl=["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],rl=["Su","Mo","Tu","We","Th","Fr","Sa"],ne={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Cb="dateTimeRange",il=y1.getState().theme,Ol={light:rc,dark:ic},ye=Ol[il],al=()=>({iconContainer:{padding:5,color:ye.contrast},icon:{padding:10,color:ye.contrast,"&:hover":{color:ye.contrast,background:"none"}},selector:{color:ye.contrast,borderBottom:`1px solid ${ye.contrast}`}}),sl=()=>{const e=y1.getState().theme;return IO({palette:{mode:e,primary:{main:ye.contrast}}})},Xz=h0("select",{target:"etc1wzw0"})("cursor:pointer;position:relative;font-size:14px;color:",e=>e.theme.contrast,";background:",e=>e.theme.deep,";border:none;border-radius:3px;padding:4px 8px;line-height:20px;flex:1;&::-webkit-scrollbar{width:5px;background:",e=>e.theme.deep,";}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",e=>e.theme.alphaPlusNeutral,";}"),Al=({date:e,classes:t,setDate:M,nextDisabled:b,prevDisabled:o,onClickNext:p,onClickPrevious:n})=>{const c=Q0(),r=i=>{M(KO(e,parseInt(i.target.value)))},s=i=>{M(QO(e,parseInt(i.target.value)))};return a(uc,{theme:c,children:P(p2,{container:!0,justifyContent:"space-between",alignItems:"center",style:{marginTop:"20px"},children:[a(p2,{item:!0,className:t.iconContainer,children:a(vb,{disabled:o,onClick:n,children:a(_o,{style:{color:o?c.lightContrast:c.contrast}})})}),a(p2,{item:!0,children:a(Xz,{value:UO(e),onChange:r,children:cl.map((i,l)=>a("option",{value:l,children:i},i))})}),a(p2,{item:!0,children:a(Xz,{value:GO(e),onChange:s,children:ds(e,30).map(i=>a("option",{className:"custom-option",value:i,children:i},i))})}),a(p2,{item:!0,className:t.iconContainer,children:a(vb,{disabled:b,onClick:p,children:a(br,{style:{color:b?c.lightContrast:c.contrast}})})})]})})},ll=Eo(Al,al),dl=()=>({leftBorderRadius:{borderRadius:"50% 0 0 50%"},rightBorderRadius:{borderRadius:"0 50% 50% 0"},buttonContainer:{display:"flex"},button:{height:30,width:30,padding:0},inactive:{color:"gray"},outlined:{border:"1px solid #11abab"},maxContrast:{lineHeight:1.6,color:"primary"},filled:{"&:hover":{backgroundColor:"#11abab",color:"text.primary"},backgroundColor:"#11abab",color:"text.primary"},highlighted:{backgroundColor:"#14b8b852"},contrast:{color:"text.primary"}}),ul=e=>{const{classes:t}=e;return a(f1,{theme:sl,children:a("div",{className:eb(t.buttonContainer,e.startOfRange&&t.leftBorderRadius,e.endOfRange&&t.rightBorderRadius,!e.disabled&&e.highlighted&&t.highlighted,e.disabled&&t.disabled),children:a(vb,{className:eb(t.button,!e.disabled&&e.outlined&&t.outlined,!e.disabled&&e.filled&&t.filled),disabled:e.disabled,onClick:e.onClick,onMouseOver:e.onHover,children:a(qc,{color:e.disabled?"text.secondary":"text.primary",className:eb(t.maxContrast,!e.disabled&&e.filled&&t.contrast,e.disabled&&t.inactive),variant:"body2",children:e.value})})})})},ql=Eo(ul,dl),wz={Previous:-1,Next:1},fl=e=>({root:{width:260,background:e.background},weekDaysContainer:{marginTop:5,paddingLeft:30,paddingRight:30},daysContainer:{paddingLeft:15,paddingRight:15,marginTop:10,marginBottom:20}}),Wl=e=>{const t=Q0(),[M,b]=q.useState(t),{classes:o,helpers:p,handlers:n,value:c,dateRange:r,marker:s,setValue:i,minDate:l,maxDate:h}=e,[g,d]=e.navState;return q.useEffect(()=>{b(t)},[t,b]),a(f1,{theme:t,children:a(Oc,{square:!0,elevation:0,className:o.root,style:{background:t.background},children:P(p2,{container:!0,children:[a(ll,{date:c,setDate:i,nextDisabled:!d,prevDisabled:!g,onClickPrevious:()=>n.onMonthNavigate(s,wz.Previous),onClickNext:()=>n.onMonthNavigate(s,wz.Next)}),a(p2,{item:!0,container:!0,direction:"row",justifyContent:"space-between",className:o.weekDaysContainer,children:rl.map(m=>a("div",{style:{color:t.contrast,fontSize:"10px"},children:m},m))}),a(p2,{item:!0,container:!0,direction:"column",justifyContent:"space-between",className:o.daysContainer,children:is(Os(c),7).map((m,N)=>a(p2,{container:!0,direction:"row",justifyContent:"center",children:m.map(R=>{const W=as(r,R),S=ss(r,R),L=ls(r),x=As(r,R)||p.inHoverRange(R);return a(ql,{themeSelected:M,filled:W||S,outlined:JO(R),highlighted:x&&!L,disabled:!po(c,R)||!oo(R,{start:l,end:h}),startOfRange:W&&!L,endOfRange:S&&!L,onClick:()=>n.onDayClick(R),onHover:()=>n.onDayHover(R),value:YO(R)},w2(R,"mm-dd-yyyy"))})},N))})]})})})},me=Eo(Wl,fl),hl=h0("div",{target:"eb241j10"})("display:flex;flex-direction:column;padding:10px;max-height:250px;overflow-y:auto;flex:1;margin-top:10px;margin-bottom:10px;padding:5px;&::-webkit-scrollbar{width:5px;background:",e=>e.theme.lightNeutral,";}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",e=>e.theme.neutral,";}button{background:none;text-align:left;border:none;padding:10px;line-height:1.5;border-radius:3px;font-size:12px;cursor:pointer;&:hover{background:",e=>e.theme.lightNeutral,";}}"),Cz=e=>{const t=Q0();return a(f1,{theme:t,children:a(hl,{children:e.ranges.map((M,b)=>a("button",{onClick:()=>{e.setRange(M),e.onClose()},children:a("span",{style:{fontWeight:qz(M,e.selectedRange)?"bold":"normal",color:qz(M,e.selectedRange)?"orange":t.contrast,whiteSpace:"nowrap"},children:M.label})},b))})})};var Do={},gl=L1;Object.defineProperty(Do,"__esModule",{value:!0});var uM=Do.default=void 0,Rl=gl(m1()),ml=t1,Ll=(0,Rl.default)((0,ml.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos");uM=Do.default=Ll;var Po={},Nl=L1;Object.defineProperty(Po,"__esModule",{value:!0});var Eb=Po.default=void 0,vl=Nl(m1()),Bl=t1,yl=(0,vl.default)((0,Bl.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");Eb=Po.default=yl;const Tl=h0("div",{target:"ebkgyot2"})("display:",e=>e.isDisplay?"flex":"none",";flex-direction:column;margin:20px;margin-top:30px;.time-selectors{display:",e=>e.isDisplay?"flex":"none",";flex-direction:column;margin-bottom:15px;.label{font-size:0.85em;color:",e=>e.theme.alphaNeutral,";width:50px;margin-left:5px;margin-bottom:5px;white-space:nowrap;}.input-group{display:flex;margin-bottom:20px;input{background:",e=>e.theme.deep,";color:",e=>e.theme.contrast,";}.date-time-ranged{font-size:14px;width:170px;line-height:20px;border:1px solid ",e=>e.theme.lightNeutral,";color:",e=>e.theme.contrast,";margin:0;padding:0px 8px;margin-right:5px;&:focus{border:1px solid ",e=>e.theme.neutral,";}}}}"),Sl=h0(so,{target:"ebkgyot1"})("color:",e=>e.theme.maxContrast,";background:",e=>e.theme.primary,";padding:6px;justify-content:center;margin-top:10px;margin-bottom:10px;cursor:pointer;&:hover{background:",e=>e.theme.primaryLight,";}"),Ez=h0(so,{target:"ebkgyot0"})("color:",e=>e.theme.contrast,";background:",e=>e.theme.neutral,";border:1px solid ",e=>e.theme.accentNeutral,";padding:8px;&:hover{background:",e=>e.theme.lightNeutral,";color:",e=>e.theme.contrast,";}");function kz({getEditedStartDate:e,getEditedEndDate:t,handleStart:M,handleStop:b,onTimeRangeSet:o,setCalendarOpen:p,isFullCalendar:n,setStopCalendar:c,setStartCalendar:r,startCalendarOpen:s,stopCalendarOpen:i,isHorizontal:l,styles:h,isMobile:g}){const d=Q0();function m(){n?p(R=>!R):(p(R=>!(R&&s)),c(()=>!1),r(R=>!R))}function N(){n?p(R=>!R):(p(R=>!(R&&i)),r(()=>!1),c(R=>!R))}return a(f1,{theme:d,children:P(Tl,{isDisplay:h,children:[P("div",{className:"time-selectors",children:[a("span",{className:"label",children:"From"}),P("div",{className:"input-group",children:[a("input",{className:"date-time-ranged",value:o1(e()),onChange:R=>M(R,!1),onBlur:R=>M(R,!0)}),a(Ez,{onClick:m,children:a(Eb,{style:{height:"16px",width:"16px"}})})]})]}),P("div",{className:"time-selectors",children:[a("span",{className:"label",children:"To"}),P("div",{className:"input-group",children:[a("input",{className:"date-time-ranged",value:o1(t()),onChange:R=>b(R,!1),onBlur:R=>b(R,!0)}),a(Ez,{onClick:N,children:a(Eb,{style:{height:"16px",width:"16px"}})})]})]}),a(Sl,{isHorizontal:l,isMobile:g,onClick:R=>{o(R)},children:"Apply Time Range"})]})})}const xl=h0("button",{target:"e1opaqag1"})("padding:10px;border-radius:3px;color:",({theme:e})=>e.accent,";font-size:1em;border:none;background:none;display:flex;cursor:pointer;align-items:center;justify-content:center;margin-bottom:10px;&:hover{background:#11111155;}span{margin-right:4px;font-size:12px;}"),Xl=h0("div",{target:"e1opaqag0"})("position:absolute;.header{padding:10px;justify-content:space-between;}.headerItem{text-align:center;}.dateComplete{font-size:0.85em;}.divider{border-left:1px solid action;margin-bottom:20;}.container{position:relative;z-index:1000;right:75%;top:30px;display:flex;flex-direction:column;overflow-y:auto;background:",({theme:e})=>e.background,";}.applyButton{color:white;background:hsl(0, 0%, 31%);border:1px solid hsl(0, 0%, 31%);padding:6px 8px;border-radius:3px;margin-left:10px;cursor:pointer;}"),wl=e=>{const{ranges:t,dateRange:M,minDate:b,maxDate:o,firstMonth:p,setFirstMonth:n,secondMonth:c,setSecondMonth:r,setDateRange:s,helpers:i,handlers:l}=e,h=Q0(),[g,d]=q.useState(!1),m={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},N=ZO(c,p)>=2,R={dateRange:M,minDate:b,maxDate:o,helpers:i,handlers:l},W=k1(),[S,L]=q.useState(M.dateStart),[x,k]=q.useState(M.dateEnd),[A,y]=q.useState(!0),[v]=q.useState(M.label)||m.label,C=h2.useMediaQuery({query:"(min-width: 1013px)"}),_=h2.useMediaQuery({query:"(max-width: 1013px)"}),I=h2.useMediaQuery({query:"(orientation: portrait)"}),D=w0(p0=>p0.isSplit),[Q,o0]=q.useState(!1),[n0,t0]=q.useState(!1);q.useEffect(()=>{if(v){const p0=lM(v);L(p0.dateStart),k(p0.dateEnd)}},[k,L,v]);const m0=(p0,A0)=>{p0.preventDefault();const W0=new Date(p0.target.value);A0&&q2(W0)?k(W0):k(p0.target.value)},Y=(p0,A0)=>{p0.preventDefault();const W0=new Date(p0.target.value);A0&&q2(W0)?L(W0):L(p0.target.value)},$0=p0=>{p0.preventDefault();const A0=new Date(S),W0=new Date(x);P2(A0)&&!Et(M.dateStart,A0)&&(W(uo(A0)),L(A0)),q2(W0)&&!Et(M.dateEnd,W0)&&(W(qo(W0)),k(W0));const g0=q2(W0)&&P2(A0),d0=Se(A0,W0),B0=!Et(M.dateStart,A0)||!Et(M.dateEnd,W0);g0&&d0&&B0?(W(fo("")),s({dateStart:A0,dateEnd:W0}),k0({dateStart:A0,dateEnd:W0}),e.onClose(p0)):d0||console.log("Invalid time range")},k0=p0=>{localStorage.setItem(Cb,JSON.stringify(p0))},f0=()=>q2(S)?w2(S,"yyy-MM-dd HH:mm:ss"):S,T0=()=>q2(x)?w2(x,"yyy-MM-dd HH:mm:ss"):typeof x<"u"?x:"",C0=()=>{y(p0=>!p0)};return a(f1,{theme:h,children:a(Xl,{children:a(Oc,{className:"container",elevation:5,children:P(p2,{display:"flex",style:{flex:"1"},children:[g&&C&&P(p2,{container:!0,direction:"row",wrap:"nowrap",children:[a(me,{...R,value:p,setValue:n,navState:[!0,N],marker:ne.FIRST_MONTH}),a("div",{className:"divider"}),a(me,{...R,value:c,setValue:r,navState:[N,!0],marker:ne.SECOND_MONTH})]}),g&&!C&&!I&&!A&&!D&&P(p2,{container:!0,direction:"row",wrap:"nowrap",children:[Q&&a(me,{...R,value:p,setValue:n,navState:[!0,N],marker:ne.FIRST_MONTH}),n0&&a(me,{...R,value:c,setValue:r,navState:[N,!0],marker:ne.SECOND_MONTH})]}),P(p2,{display:"flex",flex:1,children:[P("div",{style:{display:"flex",flexDirection:"column",flex:"1"},children:[_&&P(q1,{children:[a("div",{style:{maxHeight:I?"60vh":"50vh",overflowY:"auto",display:A?"flex":"none",flex:1,flexDirection:"column"},children:a(Cz,{selectedRange:M,isHorizontal:!I,ranges:t,setRange:s,onClose:e.onClose})}),a(kz,{styles:!A,getEditedStartDate:f0,isHorizontal:!I,isMobile:!0,isFullCalendar:!1,getEditedEndDate:T0,handleStart:Y,handleStop:m0,onTimeRangeSet:$0,calendarOpen:g,stopCalendarOpen:n0,startCalendarOpen:Q,setCalendarOpen:d,setStopCalendar:t0,setStartCalendar:o0}),_&&P(xl,{onClick:C0,theme:h,children:[a("span",{children:A?"Set Absolute Time":"Set Relative Time"}),a(uM,{className:O0({name:"rnnx2x",styles:"font-size:12px"})})]})]}),!_&&a(kz,{styles:!0,isMobile:!1,isFullCalendar:!0,getEditedStartDate:f0,getEditedEndDate:T0,handleStart:Y,handleStop:m0,onTimeRangeSet:$0,calendarOpen:g,setCalendarOpen:d}),g&&_&&!A&&P(p2,{container:!0,direction:"row",wrap:"nowrap",children:[Q&&a(me,{...R,value:p,setValue:n,navState:[!0,N],marker:ne.FIRST_MONTH}),n0&&a(me,{...R,value:c,setValue:r,navState:[N,!0],marker:ne.SECOND_MONTH})]})]}),a("div",{className:"divider"}),C&&a(p2,{style:{display:"flex",flex:1},children:a(Cz,{selectedRange:M,ranges:t,setRange:s,onClose:e.onClose})})]})]})})})})};function Cl(){const e=k1(),t=q.useRef(null),M=o=>{o.key==="Escape"&&e(Oz(!1))},b=o=>{t.current&&!t.current.contains(o.target)&&e(Oz(!1))};return q.useEffect(()=>(document.addEventListener("keydown",M,!0),document.addEventListener("click",b,!0),()=>{document.removeEventListener("keydown",M,!0),document.removeEventListener("click",b,!0)})),{ref:t}}var Ho={},El=L1;Object.defineProperty(Ho,"__esModule",{value:!0});var or=Ho.default=void 0,kl=El(m1()),_l=t1,Il=(0,kl.default)((0,_l.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"}),"AccessTimeOutlined");or=Ho.default=Il;var jo={},Dl=L1;Object.defineProperty(jo,"__esModule",{value:!0});var pr=jo.default=void 0,Pl=Dl(m1()),Hl=t1,jl=(0,Pl.default)((0,Hl.jsx)("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft");pr=jo.default=jl;const Vl=h0("div",{target:"e13b6hz0"})({name:"12m2hdf",styles:'display:flex;flex-direction:column;justify-content:"center";padding:"3px";.time-span{text-align:center;}'});function Fl({dateRange:e}){const t=Q0();return a(f1,{theme:t,children:P(Vl,{children:[a("span",{className:"time-span",children:q2(e.dateStart)?w2(e.dateStart,"yyyy/MM/dd HH:mm:ss"):e.dateStart}),a("span",{className:"time-span",children:"to"}),a("span",{className:"time-span",children:q2(e.dateEnd)?w2(e.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof e.dateEnd<"u"?e.dateEnd:""})]})})}const zt=O0({name:"th2gus",styles:"svg{font-size:1.15em;margin:0px 2px;}.tooltip{background-color:red;display:flex;align-items:center;justify-items:center;}@media screen and (max-width: 1200px){font-size:1em;padding:8px;color:#ddd;line-height:1.5;svg{margin-right:0;}span{display:none;}}"}),$l=e=>{try{let t=localStorage.getItem(e);if(typeof t=="string"){let M=JSON.parse(t);if(M.dateStart&&M.dateEnd)return JSON.parse(t)}}catch(t){return console.log(t),{dateStart:"",dateEnd:""}}},kb=e=>a(fa,{id:e.id,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},PaperProps:{sx:{background:e.qryntheme.neutral,color:e.qryntheme.contrast}},transformOrigin:{vertical:"bottom",horizontal:"left"},...e}),_z=["1m","5m","10m","30m","1h","3h","6h","12h","24h"];function Ul(e){const t=Date.now(),{id:M,minDate:b,maxDate:o,startTs:p,stopTs:n,label:c,onLabelChange:r,onStartChange:s,onStopChange:i,pickerOpen:l,onPickerOpen:h}=e,g=h2.useMediaQuery({query:"(max-width: 1013px)"}),d=w0(S0=>S0.isSplit),m=Q0(),N={label:"Last 5 minutes",dateStart:new Date(Date.now()-5*6e4),dateEnd:new Date(Date.now())},R=()=>{try{const S0=$l(Cb);if(!S0)return N;if((S0==null?void 0:S0.label)!==""&&typeof S0.label<"u"){const H0=lM(S0==null?void 0:S0.label);S0.dateStart=H0.dateStart,S0.dateEnd=H0.dateEnd}else S0.dateStart=new Date(S0.dateStart),S0.dateEnd=new Date(S0.dateEnd);return S0}catch{if(P2(p)&&P2(n))return{dateStart:p,dateEnd:n}}},W=uz(b,Mz(t,-10)),S=uz(o,Mz(t,10)),[L,x]=us(R()||{},W,S),[k,A]=q.useState({...R()}),[y,v]=q.useState(),[C,_]=q.useState(L||t),[I,D]=q.useState(x||it(C,1)),Q=q.useMemo(()=>({dateStart:p,dateEnd:n,label:c}),[p,n,c]);q.useEffect(()=>{r(Q.label)},[Q.label]);const{dateStart:o0,dateEnd:n0}=k,{ref:t0}=Cl(),m0=S0=>{Se(S0,I)&&_(S0)},Y=S0=>{bz(S0,C)&&D(S0)},$0=S0=>{let{label:H0,dateStart:Z0,dateEnd:n1}=S0;Z0&&n1&&(S0.label=H0,S0.dateStart=Z0=Ac([Z0,W]),S0.dateEnd=n1=lc([n1,S]),A(S0),k0(S0),d0(S0),_(Z0),D(po(Z0,n1)?it(Z0,1):n1))},k0=S0=>{localStorage.setItem(Cb,JSON.stringify(S0))},f0=S0=>{if(o0&&!n0&&!Se(S0,o0)){const H0={dateStart:o0,dateEnd:S0};d0(H0),k0(H0),A(H0),r(""),p0()}else A({dateStart:S0,dateEnd:void 0});v(S0)},T0=(S0,H0)=>{if(S0===ne.FIRST_MONTH){const Z0=it(C,H0);Se(Z0,I)&&_(Z0)}else{const Z0=it(I,H0);Se(C,Z0)&&D(Z0)}},C0=S0=>{o0&&!n0&&(!y||!Ie(S0,y))&&v(S0)},p0=(S0=null)=>{S0==null||S0.preventDefault(),h(!1)},W0={inHoverRange:S0=>o0&&!n0&&y&&bz(y,o0)&&oo(S0,{start:o0,end:y})},g0={onDayClick:f0,onDayHover:C0,onMonthNavigate:T0};function d0(S0){const{dateStart:H0,dateEnd:Z0,label:n1}=S0,X0=P2(H0),O1=P2(Z0),X1=typeof n1<"u";X0&&s(H0),O1&&i(Z0),X1&&r(n1)}const B0=S0=>{S0.preventDefault(),l===!0?p0(S0):h(!0)},G0=(S0,H0="range")=>{const Z0=S0==="backward"?ta:Ma;let n1={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};H0==="range"?n1=ea({start:o0,end:n0}):H0.includes("d")?n1.days=parseInt(H0):H0.includes("h")?n1.hours=parseInt(H0):H0.includes("m")?n1.minutes=parseInt(H0):H0.includes("s")&&(n1.seconds=parseInt(H0));const X0=Z0(o0,n1),O1=Z0(n0,n1),X1={dateStart:X0,dateEnd:O1,label:""};A(X1),k0(X1),d0(X1)},[$,M0]=q.useState(null),c0=!!$,[q0,x0]=q.useState(null),V0=!!q0,U0=S0=>{M0(()=>S0.currentTarget)},a1=S0=>{x0(()=>S0.currentTarget)},c1=(S0,H0,Z0)=>{M0(null),x0(null),H0&&Z0&&G0(H0,Z0)};return P("div",{style:{display:"flex"},children:[!g&&!d&&P(q1,{children:[a(ot,{onClick:()=>{G0("backward")},attachedside:"r",emptySide:"l",className:P0(zt),children:a(pr,{})}),a(ot,{onClick:U0,attachedside:"both",size:"small",className:P0(zt),"aria-controls":c0?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":c0?"true":void 0,children:a(Pe,{})}),a(kb,{id:"backward-menu",anchorEl:$,open:c0,onClose:c1,qryntheme:m,children:_z.map(S0=>a(Sb,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:H0=>c1(H0,"backward",S0),children:S0},`${S0} l`))})]}),a(x1,{title:c?a(Fl,{dateRange:k}):"",children:P(ot,{onClick:B0,className:P0(zt),attachedside:"both",children:[a(or,{}),a("span",{children:c||(q2(k.dateStart)?w2(k.dateStart,"yyyy/MM/dd HH:mm:ss"):k.dateStart)+"-"+(q2(k.dateEnd)?w2(k.dateEnd,"yyyy/MM/dd HH:mm:ss"):typeof k.dateEnd<"u"?k.dateEnd:"")})]})}),!g&&!d&&P(q1,{children:[a(ot,{onClick:a1,id:`forward-button-${M}`,size:"small",className:P0(zt),"aria-controls":V0?`forward-menu${M}`:void 0,"aria-haspopup":"true","aria-expanded":V0?"true":void 0,children:a(Pe,{})}),a(kb,{id:`forward-menu-${M}`,anchorEl:q0,open:V0,onClose:c1,qryntheme:m,children:_z.map(S0=>a(Sb,{sx:{"&.MuiMenuItem-root":{fontSize:12}},onClick:H0=>c1(H0,"forward",S0),children:S0},`${S0} r`))}),a(ot,{onClick:()=>{G0("forward")},attachedside:"l",className:P0(zt),children:a($2,{})})]}),l?a("div",{tabIndex:0,ref:t0,children:a(f1,{theme:m,children:a(wl,{dateRange:k,minDate:W,maxDate:S,ranges:Wo(new Date),firstMonth:C,secondMonth:I,setFirstMonth:m0,setSecondMonth:Y,setDateRange:$0,helpers:W0,handlers:g0,onClose:p0})})}):null]})}const Gl=Ul;function Kl(e){const{historyTabHeader:t,historyTab:M,starredHistoryTab:b,closeButton:o,linksTabHeader:p,linksTab:n,settingTab:c,settingTabHeader:r}=e;return P(La,{defaultValue:0,children:[P(fc,{children:[P(xe,{children:[a(ha,{}),a("span",{children:"Queries"})]}),P(xe,{children:[a(ga,{}),a("span",{children:"Links"})]}),P(xe,{children:[a(Ra,{}),a("span",{children:"Starred"})]}),P(xe,{children:[a(ma,{}),a("span",{children:"Settings"})]}),o]}),P(Xe,{value:0,children:[t,M]}),P(Xe,{value:1,children:[p,n]}),a(Xe,{value:2,children:b}),P(Xe,{value:3,children:[r,c]})]})}function Ql({pos:e,item:t,copyLink:M,handleDelete:b,handleStarLinkItem:o,handleSubmit:p,label:n}){var N;const[c,r]=q.useState(!1),{fromDate:s,toDate:i,type:l,url:h,queryInput:g,limit:d}=t,m=()=>{r(R=>!R)};return P(Ta,{open:c,children:[a(Jl,{pos:e,onOpen:c}),a("button",{className:"open-button",onClick:()=>{m()},children:c?a(Gc,{fontSize:"small"}):a(Uc,{fontSize:"small"})}),P("div",{className:"inline-params",children:[a(x1,{title:"API URL",children:P("span",{style:{display:"flex",alignItems:"center"},children:[a(Lc,{fontSize:"small",style:{marginRight:"3px"}})," ",h]})}),P("span",{style:{whiteSpace:"nowrap"},children:["limit: ",d]}),P("span",{style:{whiteSpace:"nowrap"},children:["step: ",(N=t==null?void 0:t.params)==null?void 0:N.step]}),P("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[" ",a(x1,{title:`${s} - ${i}`,children:a(Fc,{style:{marginRight:"3px",height:"14px",width:"14px"}})})," ",P(ya,{children:[s," - ",i]})]})]}),P("div",{className:"block-params",children:[P("p",{children:[a("span",{className:"key",children:" Query:"})," ",a("span",{className:"value",children:g})," "]}),P("p",{children:[a("span",{className:"key",children:" API URL:"})," ",a("span",{className:"value",children:h})," "]}),P("p",{children:[a("span",{className:"key",children:" Data Source Type:"})," ",a("span",{className:"value",children:l})," "]}),P("p",{children:[a("span",{className:"key",children:"From: "})," ",a("span",{className:"value",children:s})," "]}),P("p",{children:[a("span",{className:"key",children:" To: "})," ",P("span",{className:"value",children:[" ",i]})," "]}),P("p",{children:[a("span",{className:"key",children:"Limit: "})," ",a("span",{className:"value",children:d})," "]}),P("p",{children:[a("span",{className:"key",children:" Step:"})," ",a("span",{className:"value",children:t.params.step})," "]})]}),a(Yl,{item:t,onOpen:c,copyLink:M,handleDelete:b,handleStarLinkItem:o,handleSubmit:p,label:n})]})}function Jl({pos:e,onOpen:t}){return a("div",{style:{display:t?"none":"flex",width:"30vw"},children:P(Wc,{children:["Link ",e," "]})})}function Yl(e){const{item:t,onOpen:M,copyLink:b,handleDelete:o,handleStarLinkItem:p,handleSubmit:n,label:c}=e,r=Q0(),[s,i]=q.useState(null),l=!!s,[h,g]=q.useState(!1);return P("div",{style:{display:"flex",flexDirection:M?"column-reverse":"row",justifyContent:"space-between",alignItems:"center"},children:[a(q1,{children:a(x1,{title:"Copy Link to Clipboard",placement:"right-end",children:P("span",{style:{display:"flex"},children:[a(re,{onClick:()=>b(t==null?void 0:t.data,"link",h),isActive:!0,style:{flex:1},className:"URL-COPY",attachedside:"r",children:a(Lc,{style:{height:"14px",width:"14px"},fontSize:"small"})}),a(re,{attachedside:"l",onClick:R=>{i(()=>R.currentTarget),g(()=>h)},size:"small",className:"date-time-selector","aria-controls":l?"backward-menu":void 0,"aria-haspopup":"true","aria-expanded":l?"true":void 0,children:a(Pe,{fontSize:"small"})}),a(kb,{id:"backward-menu",anchorEl:s,open:l,onClose:()=>{i(null)},qryntheme:r,size:"small",children:a(Sb,{style:{padding:"0 14px"},children:a(Sa,{children:a(xa,{style:{padding:"0",marginRight:0,cursor:c?"default":"not-allowed"},checked:h,onChange:R=>{g(()=>!!R.target.checked)},control:a(Xa,{style:{paddingRight:"0px",marginRight:"3px"},sx:{"& .MuiSvgIcon-root":{fontSize:14}},disabled:!c}),label:a(qc,{style:{fontSize:"12px",color:r.contrast},children:"Relative time"})})})},"relativeTime")})]})})}),a(x1,{title:"Delete Query",children:a(re,{onClick:()=>o(t),children:a(dM,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Star / Unstar Link",children:a(re,{onClick:()=>p(t),children:t.starred?a(Lo,{style:{height:"14px",width:"14px"},fontSize:"small"}):a(hc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Search Logs from Query",children:P(gc,{onClick:()=>n(t==null?void 0:t.data),children:[a($c,{className:"open-icon",fontSize:"small"}),a("span",{className:"open-text",children:"Open In New Tab"})]})})]})}function _b({queryHistory:e,copyQuery:t,handleDelete:M,handleStarItem:b,handleSubmit:o,filtered:p,emptyMessage:n,isStarred:c}){const[r,s]=q.useState([]);q.useEffect(()=>{s(e)},[]),q.useEffect(()=>{p.length>0&&s(p)},[p]),q.useEffect(()=>{s(e)},[e]);function i(l){let h="";if(typeof l=="string")try{h=JSON.parse(l).queryInput}catch{h=l}return h}return a(ao,{className:c?"starredCont":"",children:r.length>0?r==null?void 0:r.map((l,h)=>P(Rc,{children:[a("span",{style:{color:"#666",paddingRight:"10px",width:"10px",display:"flex",alignItems:"center"},children:r.length-h}),a(x1,{title:l.data,children:P(Wc,{children:[i(l.data)," "]})}),a("span",{children:w2(l.timestamp,"yyyy/MM/dd HH:mm:ss")}),P("div",{style:{display:"flex",alignItems:"center"},children:[a(x1,{title:"Copy Query to Clipboard",children:a(re,{onClick:()=>t(l.data),children:a(Na,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Delete Query",children:a(re,{onClick:()=>M(l),children:a(dM,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Star / Unstar Query",children:a(re,{onClick:()=>b(l),children:l.starred?a(Lo,{style:{height:"14px",width:"14px"},fontSize:"small"}):a(hc,{style:{height:"14px",width:"14px"},fontSize:"small"})})}),a(x1,{title:"Search Logs from Query",children:P(gc,{onClick:()=>o(l),children:[a($2,{className:"open-icon"}),a("span",{className:"open-text",children:"Show Results"})]})})]})]},h)):a(Kc,{message:n})})}function zr({linksHistory:e,copyLink:t,handleDelete:M,handleStarLinkItem:b,handleSubmit:o,filtered:p,emptyMessage:n,isStarred:c,label:r}){const[s,i]=q.useState([]);return q.useEffect(()=>{i(e)},[]),q.useEffect(()=>{p.length>0&&i(p)},[p]),q.useEffect(()=>{i(e)},[e]),a(ao,{className:c?"starredCont":"",children:s.length>0?s==null?void 0:s.map((l,h)=>P(Rc,{children:[a("span",{style:{paddingRight:"10px",color:"#666",width:"10px",display:"flex",alignItems:"center"},children:(s==null?void 0:s.length)-h}),a(Ql,{pos:(s==null?void 0:s.length)-h,item:l,copyLink:t,handleDelete:M,handleStarLinkItem:b,handleSubmit:o,label:r})]},h)):a(Kc,{message:n})})}function Zl({starredQueries:e,starredLinks:t,handleDeleteQuery:M,handleDeleteLink:b,handleStarItem:o,handleStarLinkItem:p,handleSubmitQuery:n,handleSubmitLink:c,filteredLinks:r,filteredQueries:s,setFilteredStarLink:i,setFilteredStarQuery:l,filterItems:h,emptyQueryMessage:g,emptyLinkMessage:d,copyQuery:m,label:N}){const[R,W]=q.useState([]),[S,L]=q.useState([]);return q.useEffect(()=>{W(e),L(t)},[]),q.useEffect(()=>{r.length>0&&L(r),s.length>0&&W(s)},[r,s]),q.useEffect(()=>{W(e),L(t)},[e,t]),P(ht,{defaultValue:0,children:[P(fc,{children:[a(xe,{children:"Queries"}),a(xe,{children:"Links"})]}),P(Xe,{value:0,children:[a(at,{searchQueriesText:"Queries",queryHistory:e,filterItems:h,setFilteredItems:l}),a(_b,{queryHistory:R,copyQuery:m,handleDelete:M,handleStarItem:o,handleSubmit:n,filtered:s,emptyMessage:g,isStarred:!0})]}),P(Xe,{value:1,children:[a(at,{searchQueriesText:"Links",queryHistory:t,filterItems:h,setFilteredItems:i}),a(zr,{linksHistory:S,copyQuery:m,handleDelete:b,handleStarLinkItem:p,handleSubmit:c,filtered:r,emptyMessage:d,isStarred:!0,label:N})]})]})}function at({queryHistory:e,filterItems:t,setFilteredItems:M,searchQueriesText:b}){const[o,p]=q.useState("");function n(c){let r=c.target.value;p(r);const s=t(e,r);s.length>0?M(s):M([])}return a(mc,{children:P("div",{style:{display:"flex",alignItems:"center"},children:[a(va,{}),a(Ba,{type:"text",value:o1(o),onChange:n,placeholder:`Search ${b}`})," ",P("span",{style:{margin:"0px 4px"},children:["Total: ",e.length]})]})})}function ed({queryHistory:e,linksHistory:t}){return a(mc,{children:P("div",{style:{display:"flex",alignItems:"center"},children:[P("span",{style:{margin:"0px 4px"},children:["Query History Rows: ",e==null?void 0:e.length]})," | ",P("span",{style:{margin:"0px 4px"},children:["Links History Rows: ",t==null?void 0:t.length]})]})})}function td({clearHistory:e,clearLinksHistory:t}){return a(ao,{children:P("div",{style:{display:"flex"},children:[P(zz,{children:[a("div",{children:"Clear Query History"}),a("small",{children:"Delete all of your query history, permanently."}),a(vz,{dialogType:"Query",clearHistory:e})]}),P(zz,{children:[a("div",{children:"Clear Links History"}),a("small",{children:"Delete all of your links history, permanently."}),a(vz,{dialogType:"Links",clearHistory:t})]})]})})}const nr=()=>{const e="Link Copied To Clipboard",t=k1(),M=ac().historyStore(),b=sc(),o=w0(p0=>p0.queryHistory),p=w0(p0=>p0.linksHistory),n=w0(p0=>p0.historyOpen),c=Q0(),[r,s]=q.useState([]),[i,l]=q.useState([]),[h,g]=q.useState([]),[d,m]=q.useState([]),[N,R]=q.useState([]),[W,S]=q.useState(!1),L=w0(p0=>p0.start),x=w0(p0=>p0.stop),k=w0(({label:p0})=>p0);function A(p0){const A0=M.remove(p0);t(Ut(A0)),t(I2({message:"Query deleted succesfully",type:Y2.info}))}function y(p0){const A0=b.remove(p0);t($t(A0))}function v(p0){const A0={id:"",limit:100,panel:"left",queryInput:"",queryType:"range",direction:"forward"};let W0={};try{W0=JSON.parse(p0.data)}catch{W0={...A0}}const{id:g0,limit:d0,panel:B0,queryInput:G0,queryType:$,type:M0,dataSourceId:c0,url:q0,direction:x0}=W0;let V0="",U0=0;if(G0.includes("$__interval")){const c1=(x.getTime()-L.getTime())/1e3/30,S0=+1 .toFixed(1),H0=c1/S0,Z0=Math.round(H0*window.devicePixelRatio.toFixed(2));V0=G0.replace(/\[\$__interval\]/,`[${Z0}s]`),U0=Z0}else V0=G0;t(X2(M0,V0,$,d0,B0,g0,x0||"forward",c0,q0,U0))}function C(p0){window.open(p0)}function _(p0,A0){return p0==null?void 0:p0.filter(W0=>W0.data.toLowerCase().includes(A0.toLowerCase()))}function I(p0){l(p0)}function D(p0){g(p0)}function Q(p0){R(p0)}function o0(p0){m(p0)}q.useEffect(()=>{const p0=(o==null?void 0:o.filter(W0=>W0.starred))||[],A0=(p==null?void 0:p.filter(W0=>W0.starred))||[];S(A0),s(p0)},[o,p]);function n0(p0){const A0={...p0,starred:!p0.starred},W0=M.update(A0);t(Ut(W0)),A0.starred?t(I2({message:"Query starred succesfully",type:Y2.success})):t(I2({message:"Query unstarred succesfully",type:Y2.success}))}function t0(p0){const A0={...p0,starred:!p0.starred},W0=b.update(A0);t($t(W0)),A0.starred?t(I2({message:"Link starred succesfully",type:Y2.success})):t(I2({message:"Link unstarred succesfully",type:Y2.success}))}function m0(){t(I2({type:"success",message:e}))}function Y(p0){navigator.clipboard.writeText(p0).then(function(){m0()},function(A0){console.log("error on copy",A0)})}function $0(p0){let A0=document.createElement("textarea");return A0.value=p0,A0.style={position:"fixed",left:"-999999px",top:"-999999px"},document.body.appendChild(A0),A0.focus(),A0.select(),new Promise((W0,g0)=>{m0(),document.execCommand("copy")?W0():g0(),A0.remove()})}function k0(p0,A0="query",W0=!1){const g0=new URL(p0),{hash:d0}=g0,B0=new URLSearchParams(d0.replace(/#/,"")),G0=new URL(window.location.href);G0.hash=`#${B0.toString()}`;const $=A0==="query"?JSON.parse(p0).queryInput:W0&&k?G0:p0;setTimeout(()=>{navigator!=null&&navigator.clipboard&&window.isSecureContext?Y($):$0($)},200)}function f0(){t(Ec(!1))}function T0(){const p0=M.clean();t(Ut(p0)),(p0==null?void 0:p0.length)<1&&t(I2({message:"Query History cleared succesfully",type:Y2.info}))}function C0(){const p0=b.clean();t($t(p0)),(p0==null?void 0:p0.length)<1&&t(I2({message:"Links History cleared succesfully",type:Y2.info}))}return a(uc,{theme:c,children:n&&a(Wa,{anchor:"bottom",style:{maxHeight:"250px"},open:n,variant:"persistent",theme:c,children:a(Kl,{historyTabHeader:a(at,{searchQueriesText:"Queries",queryHistory:o,clearHistory:T0,filterItems:_,setFilteredItems:I}),historyTab:a(_b,{queryHistory:o,copyQuery:k0,handleDelete:A,handleStarItem:n0,handleSubmit:v,filtered:i,emptyMessage:"There is no query history. Please execute some queries and you will see a history here."}),linksTabHeader:a(at,{searchQueriesText:"Links",queryHistory:p,filterItems:_,setFilteredItems:D}),linksTab:a(zr,{linksHistory:p,copyLink:k0,handleDelete:y,handleStarLinkItem:t0,handleSubmit:C,filtered:h,label:k,emptyMessage:"There is no links history. Please execute some queries and share links and you will see a history here."}),starredTabHeader:a(at,{searchQueriesText:"Queries",queryHistory:r,clearHistory:T0,filterItems:_,setFilteredItems:Q}),starredTab:a(_b,{queryHistory:r,copyQuery:k0,handleDelete:A,handleStarItem:n0,handleSubmit:v,filtered:N,emptyMessage:"Click the ‘Star’ icon to save queries and find them here to reuse again"}),starredHistoryTab:a(Zl,{starredQueries:r,starredLinks:W,handleDeleteQuery:A,handleDeleteLink:y,handleStarItem:n0,handleStarLinkItem:t0,handleSubmitQuery:v,handleSubmitLink:C,filterItems:_,setFilteredStarLink:o0,setFilteredStarQuery:Q,filteredQueries:N,filteredLinks:d,emptyQueryMessage:"Click the 'Star' icon to save links and find them here to reuse again",emptyLinkMessage:"Click the 'Star' icon to save queries and find them here to reuse again",copyQuery:k0,label:k}),settingTabHeader:a(ed,{queryHistory:o,linksHistory:p}),settingTab:a(td,{clearHistory:T0,clearLinksHistory:C0}),closeButton:a(DA,{onClose:f0})})})})},Md=({type:e,actualQuery:t,total:M,dataView:b})=>q.useMemo(()=>{var l;const p=(e==="matrix"||e==="flux")&&(t==null?void 0:t.tableView),n=e==="stream"&&(t==null?void 0:t.tableView);let c="",r="",s="",i="";if(p){const h=((l=b==null?void 0:b.tableData)==null?void 0:l.total)*25,g=h<330?h:330;c=`${g+25}px`,s=`${g}px`,r="fit-content",i="fit-content"}if(e==="vector"||n){const h=M*25,g=h<330?h:330;c=`${g+25}px`,s=`${g}px`,r="fit-content",i="fit-content"}if(e==="stream"&&!(t!=null&&t.tableView)){const g=M*25<350?"fit-content":"inherit";c=g,s=g,r="fit-content",i="fit-content"}return(e==="matrix"||e==="flux")&&!(t!=null&&t.tableView)&&(c="fit-content",s="400px",r="fit-content",i="fit-content"),{regularCont:c,regularView:s,maxCont:r,maxView:i}},[M,e,t==null?void 0:t.tableView]),bd=({total:e,panelSize:t,dataView:M})=>{var p;let b=0;return M.type==="matrix"?b=(p=M==null?void 0:M.tableData)==null?void 0:p.total:b=e,q.useMemo(()=>{const n=b*25;return t==="max"?n:t==="min"?0:n<310?n:310},[t])},od=({panel:e,dataView:t})=>q.useMemo(()=>{let b={};return e&&t&&(b=e==null?void 0:e.find(o=>o.id===t.id)),b},[e,t]);function Iz(e){const{name:t}=e;return a(q1,{children:t})}const pd=h0("div",{target:"emosc6a8"})("display:flex;align-items:center;justify-content:center;flex:1;height:100%;font-size:0.75em;letter-spacing:1px;padding:30px;color:",({theme:e})=>e.lightContrast,";background:",({theme:e})=>e.background,";text-align:center;"),zd=h0("div",{target:"emosc6a4"})({name:"c6g1h8",styles:"overflow-y:auto;margin:2px;display:flex;flex-direction:column;flex:1;max-height:100vh;&::-webkit-scrollbar{background:transparent;}::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{background:transparent;}"}),nd=h0("div",{target:"emosc6a3"})("display:flex;align-items:center;color:",({theme:e})=>e.contrast,";font-size:12px;.header-actions{justify-self:flex-end;.header-icon{padding:1px 2px;margin:0px 2px;border-radius:3px;cursor:pointer;color:",({theme:e})=>e.contrast,";&:hover{background:",({theme:e})=>e.neutral,";}}}.view-header-info{display:flex;flex:1;align-items:center;span{margin:0px 3px;.exp{font-family:monospace;}}}"),Dz=h0("div",{target:"emosc6a2"})("margin:0px 2px;padding:2px;font-size:10px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;"),cd=h0("div",{target:"emosc6a1"})("display:flex;align-items:center;margin:0px 12px;flex:1;max-width:450px;overflow-x:auto;&::-webkit-scrollbar{width:5px;height:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}"),rd=h0("div",{target:"emosc6a0"})("background:",({theme:e})=>e.shadow,";color:",({theme:e})=>e.contrast,";display:flex;flex-direction:column;padding:20px;div{width:100%;overflow-wrap:break-word;font-family:monospace;}p{padding:10px;font-size:12px;display:flex;flex:1;align-items:center;flex-wrap:wrap;span.label{background:",({theme:e})=>e.accentNeutral,";color:",({theme:e})=>e.shadow,";margin:2px;padding:2px;border-radius:2px;}}h4{margin-bottom:20px;padding-bottom:4px;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";}pre{font-family:monospace;}small{font-size:10px;}");var Vo={},id=L1;Object.defineProperty(Vo,"__esModule",{value:!0});var C2=Vo.default=void 0,Od=id(m1()),ad=t1,sd=(0,Od.default)((0,ad.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");C2=Vo.default=sd;const Ad=({labels:e})=>(e==null?void 0:e.length)>0?P("p",{children:["Labels:",e.map((t,M)=>a("span",{className:"label",children:t},M))]}):null,ld=({idRef:e,expr:t,queryType:M})=>P(q1,{children:[a("h4",{children:e}),a("div",{children:a("p",{children:t})}),P("p",{children:["Query Type: ",M]})]}),dd=({expr:e,idRef:t,labels:M,limit:b,queryType:o,total:p})=>{const n={idRef:t,expr:e,queryType:o},c={labels:M};return P(rd,{children:[a(ld,{...n}),a(Ad,{...c}),P("p",{children:["Limit: ",b]}),P("p",{children:["Total: ",p]})]})};function ud({expr:e,idRef:t,labels:M,queryType:b,limit:o,total:p,onClose:n,open:c}){const r=Q0();return a(f1,{theme:r,children:a(ro,{open:c,onClose:n,PaperProps:{classes:{root:io}},children:a(dd,{expr:e,idRef:t,labels:M,queryType:b,limit:o,total:p})})})}function Lt(e){var S;const{fixedSize:t}=e||{fixedSize:!1},M=h2.useMediaQuery({query:"(max-width: 1013px)"}),[b,o]=q.useState(!1),[p,n]=q.useState(!0),c=Q0(),{actualQuery:r,dataView:s,type:i,total:l,setMinimize:h,setMaxHeight:g}=e,d=q.useMemo(()=>{const L=i==="matrix"&&(r==null?void 0:r.tableView),x=i==="stream"&&(r==null?void 0:r.tableView);if((i==="matrix"||i==="flux")&&!(r!=null&&r.tableView))return"Chart";if(i==="stream"&&!(r!=null&&r.tableView))return"Logs";if(i==="vector"||L||x)return"Table";if(i==="empty")return"No Results"},[i,r==null?void 0:r.tableView]),m=q.useCallback(()=>{p?(h(),n(!1)):(g(),n(!0))},[p,h,g]),N=q.useCallback(()=>{o(!0)},[]),R=q.useMemo(()=>{var L;return((L=s==null?void 0:s.labels)==null?void 0:L.join(" | "))||""},[s.labels]),W=q.useMemo(()=>{var L;if((L=s==null?void 0:s.labels)!=null&&L.length)if((s==null?void 0:s.labels.length)>4){const x=[...s.labels].slice(0,4);return P(q1,{children:[x.map((k,A)=>a(Dz,{children:a(Iz,{name:k,...e.theme})},A))," ","..."]})}else return a(q1,{children:s.labels.map((x,k)=>a(Dz,{children:a(Iz,{name:x,...e.theme})},k))})},[s.labels,e.theme]);if(r){const{idRef:L,expr:x,limit:k,queryType:A}=r;return a(f1,{theme:c,children:P(nd,{children:[P("div",{className:"view-header-info",children:[a("span",{children:a("span",{className:"exp",children:d})}),a(x1,{title:(r==null?void 0:r.expr)||"",children:P("span",{children:[" ",a("span",{className:"exp",children:r==null?void 0:r.idRef})]})}),!M&&P(q1,{children:[P("span",{children:["limit:"," ",a("span",{className:"exp",children:r==null?void 0:r.limit})]}),P("span",{children:["count: ",a("span",{className:"exp",children:l})]})]}),((S=s==null?void 0:s.labels)==null?void 0:S.length)>0&&!M&&a("span",{children:P(cd,{title:R,children:["labels:",W]})})]}),a("div",{className:"header-actions",children:!t&&P(q1,{children:[a(wa,{className:"header-icon",style:{fontSize:"12px"},onClick:N}),a(qd,{isOpen:p,onClick:m})]})}),b&&a(ud,{labels:s.labels||[],limit:k,expr:x,queryType:A,idRef:L,open:b,total:l,onClose:y=>o(!1)})]})})}return null}const qd=e=>{const{isOpen:t,onClick:M}=e;return t?a(C2,{className:"header-icon",onClick:M,style:{fontSize:"14px"}}):a(_o,{className:"header-icon",onClick:M,style:{fontSize:"14px"}})};function fd(e){const t=Q0(),{loading:M}=e;return M?null:a(f1,{theme:t,children:a(pd,{children:"Please adjust search parameters and click on ‘Show Results’ button"})})}const qM=h0("div",{target:"e5pse6w4"})("margin:4px;padding:5px;margin-top:0px;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:3px;display:flex;flex-direction:column;flex:",({size:e})=>e==="min"?0:1,";height:",e=>e.size==="regular"?e.vheight.regularCont:e.size==="max"?e.vheight.maxCont:"20px",";.view-content{height:",e=>e.size==="regular"?e.vheight.regularView:e.size==="max"?e.vheight.maxView:"0px",";display:",e=>e.size==="min"?"none":(e.size==="regular","flex"),";flex-direction:",e=>(e.size==="regular","column"),";flex:1;}"),H2=h0(xb,{target:"e5pse6w3"})("width:100%;background:",({theme:e})=>e.shadow,";height:inherit;flex:1;"),Fo=h0(yc,{target:"e5pse6w1"})("min-width:320px;background:",({theme:e})=>e.shadow,";border-bottom:4px solid ",({theme:e})=>e.bgNeutral,";display:",({panelsize:e})=>e==="min"?"none":"flex",";align-items:center;align-content:space-between;"),j2=h0(Bc,{target:"e5pse6w0"})("color:",({theme:e})=>e.contrast,";background:",({theme:e})=>e.neutral,";border:1px solid ",e=>e.theme.accentNeutral,";cursor:pointer;font-size:13px;background-color:transparent;padding:6px 10px;border:none;border-radius:3px 3px 0px 0px;display:flex;justify-content:center;align-items:center;border-bottom:1px solid transparent;transition:0.2s all;&:hover{background-color:",({theme:e})=>e.lightNeutral,";}&:focus{color:",({theme:e})=>e.contrast,";background:",({theme:e})=>e.neutral,";border-radius:3px 3px 0px 0px;outline-offset:2px;}&.",Nc.selected,"{border-bottom:1px solid ",({theme:e})=>e.primary,";}&.",vc.disabled,"{opacity:0.5;cursor:not-allowed;}@media screen and (max-width: 360px){span{display:none;}padding:5px 20px;}");function Wd(e){const{viewRef:t,panelSize:M,setStreamClose:b,setMinimize:o,setMaxHeight:p,actualQuery:n,total:c,loading:r}=e;return P(qM,{ref:t,size:M,vheight:"regular",children:[a(Lt,{onClose:b,setMinimize:o,setMaxHeight:p,actualQuery:n,total:c,type:"empty",fixedSize:!0,...e}),a(fd,{loading:r})]})}const hd=(e,t,M,b)=>{const o=Ua(e.getValue(t),M);return b(o),o.passed},gd={cell:e=>e.getValue()},Rd=(e,t)=>({updateData:(M,b,o)=>{t(),e(p=>p.map((n,c)=>c!==M?n:{...p[M],[b]:o}))}}),md=e=>O0("color:",e.contrast,";background:",e.deep,";border:1px solid ",e.accentNeutral,";border-radius:3px;padding:3px 8px;font-size:12px;",""),tM=({value:e,onChange:t,debounce:M=500,theme:b,...o})=>{const[p,n]=q.useState(e),c=r=>n(r.target.value);return q.useEffect(()=>{n(e)},[e]),q.useEffect(()=>{const r=setTimeout(()=>{t(p)},M);return()=>clearTimeout(r)},[p]),a("input",{...o,className:P0(md(b)),value:o1(String(p)),onChange:c})};var $o={},Ld=L1;Object.defineProperty($o,"__esModule",{value:!0});var cr=$o.default=void 0,Nd=Ld(m1()),vd=t1,Bd=(0,Nd.default)((0,vd.jsx)("path",{d:"M15 9.86 18.03 12 15 14.14V9.86m-9 0L9.03 12 6 14.14V9.86M13 6v12l8.5-6L13 6zM4 6v12l8.5-6L4 6z"}),"FastForwardOutlined");cr=$o.default=Bd;var Uo={},yd=L1;Object.defineProperty(Uo,"__esModule",{value:!0});var rr=Uo.default=void 0,Td=yd(m1()),Sd=t1,xd=(0,Td.default)((0,Sd.jsx)("path",{d:"M18 9.86v4.28L14.97 12 18 9.86m-9 0v4.28L5.97 12 9 9.86M20 6l-8.5 6 8.5 6V6zm-9 0-8.5 6 8.5 6V6z"}),"FastRewindOutlined");rr=Uo.default=xd;var Go={},Xd=L1;Object.defineProperty(Go,"__esModule",{value:!0});var ir=Go.default=void 0,wd=Xd(m1()),Cd=t1,Ed=(0,wd.default)((0,Cd.jsx)("path",{d:"m6 18 8.5-6L6 6v12zm2-8.14L11.03 12 8 14.14V9.86zM16 6h2v12h-2z"}),"SkipNextOutlined");ir=Go.default=Ed;var Ko={},kd=L1;Object.defineProperty(Ko,"__esModule",{value:!0});var Or=Ko.default=void 0,_d=kd(m1()),Id=t1,Dd=(0,_d.default)((0,Id.jsx)("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6l-8.5 6zm6.5 2.14L12.97 12 16 9.86v4.28z"}),"SkipPreviousOutlined");Or=Ko.default=Dd;const Pz=O0({name:"rza2c4",styles:"display:flex;align-items:center;gap:1px"}),Hz=O0({name:"rnnx2x",styles:"font-size:12px"}),Pd=e=>O0("border-radius:3px;outline:none;border:1px solid ",e.accentNeutral,";background:",e.deep,";color:",e.contrast,";padding:3px 8px;margin:2px;width:70px;",""),Hd=e=>O0("color:",e.contrast,";border:1px solid ",e.accentNeutral,";background:",e.deep,";padding:3px 8px 2px 8px;border-radius:3px;cursor:pointer;font-size:12px;",""),Ht=e=>O0("display:flex;align-items:center;border:1px solid ",e.accentNeutral,";color:",e.contrast,";background:",e.neutral,";cursor:pointer;","");function jd({hasNextPage:e,hasPreviousPage:t,nextPage:M,pageCount:b,pageIndex:o,pageSize:p,previousPage:n,setPageIndex:c,setPageSize:r,totalRows:s}){const i=Q0();return P(q1,{children:[P("div",{style:{display:"flex",gap:"4px",alignItems:"center",flex:1,width:"100%",color:i.contrast,margin:"5px"},children:[a("button",{className:P0(Ht(i)),onClick:()=>c(0),disabled:!t,children:a(rr,{style:{height:"12px",width:"12px"}})}),a("button",{className:P0(Ht(i)),onClick:()=>n(),disabled:!t,children:a(Or,{style:{height:"12px",width:"12px"}})}),a("button",{className:P0(Ht(i)),onClick:()=>M(),disabled:!e,children:a(ir,{style:{height:"12px",width:"12px"}})}),a("button",{className:P0(Ht(i)),onClick:()=>c(b-1),disabled:!e,children:a(cr,{style:{height:"12px",width:"12px"}})}),a("span",{className:P0(Pz,Hz),children:P("div",{children:["Page"," ",P("strong",{children:[o+1," of ",b]})]})}),P("span",{className:P0(Pz,Hz),children:["- Go to page:",a("input",{type:"number",defaultValue:o+1,onChange:l=>{const h=l.target.value?Number(l.target.value)-1:0;c(h)},className:P0(Pd(i))})]}),a("select",{className:P0(Hd(i)),value:o1(String(p)),onChange:l=>{r(Number(l.target.value))},children:[10,20,30,40,50].map(l=>P("option",{value:o1(String(l)),children:["Show ",l," Rows"]},l))}),P("div",{style:{fontSize:"12px",marginLeft:"6px"},children:[" ","Total: ",s," Rows"]})]}),a("div",{className:"flex items-center gap-2"})]})}const Vd=({columnFilterValue:e,getFacetedMinMaxValues:t,setFilterValue:M})=>{var r,s;const b=Q0(),o=(r=t())==null?void 0:r[0],p=Number(o??""),n=(s=t())==null?void 0:s[1],c=Number(n);return P("div",{children:[P("div",{style:{display:"flex",gap:"4px",alignItems:"center",justifyContent:"center"},children:[a(tM,{theme:b,type:"number",min:p,max:c,value:(e==null?void 0:e[0])??"",onChange:i=>M(l=>[i,l==null?void 0:l[1]]),placeholder:`Min ${o?`(${p})`:""}`,className:"w-24 border shadow rounded"}),a(tM,{theme:b,type:"number",min:p,max:c,value:(e==null?void 0:e[1])??"",onChange:i=>M(l=>[l==null?void 0:l[0],i]),placeholder:`Max ${n?`(${c})`:""}`,className:"w-24 border shadow rounded"})]}),a("div",{className:"h-1"})]})},Fd=({columnId:e,columnFilterValue:t,columnSize:M,setFilterValue:b,sortedUniqueValues:o})=>{const p=e+"list",n=Q0();return P(q.Fragment,{children:[a("datalist",{id:p,children:o.slice(0,5e3).map(c=>a("option",{value:o1(c)},c))}),a(tM,{theme:n,type:"text",value:o1(t??""),onChange:c=>b(c),placeholder:`Search... (${M})`,className:"w-36 border shadow rounded",list:p}),a("div",{className:"h-1"})]})};function $d({column:e,table:t}){var n;const M=(n=t.getPreFilteredRowModel().flatRows[0])==null?void 0:n.getValue(e.id),b=e.getFilterValue(),o=e.getFacetedUniqueValues(),p=q.useMemo(()=>typeof M=="number"?[]:Array.from(o.keys()).sort(),[o]);return typeof M=="number"?a(Vd,{columnFilterValue:b,getFacetedMinMaxValues:e.getFacetedMinMaxValues,setFilterValue:e.setFilterValue}):a(Fd,{columnId:e.id,columnFilterValue:o1(b),columnSize:o.size,setFilterValue:e.setFilterValue,sortedUniqueValues:p})}var Qo={},Ud=L1;Object.defineProperty(Qo,"__esModule",{value:!0});var ar=Qo.default=void 0,Gd=Ud(m1()),Kd=t1,Qd=(0,Gd.default)((0,Kd.jsx)("path",{d:"M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"}),"SortOutlined");ar=Qo.default=Qd;var Jo={},Jd=L1;Object.defineProperty(Jo,"__esModule",{value:!0});var sr=Jo.default=void 0,Yd=Jd(m1()),Zd=t1,eu=(0,Yd.default)((0,Zd.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z"}),"KeyboardArrowUpOutlined");sr=Jo.default=eu;const tu=O0({name:"1yit4u5",styles:"position:relative;&.resizer{position:absolute;left:0;top:0;height:100%;width:5px;cursor:col-resize;user-select:none;touch-action:none;&.isResizing{background:blue;opacity:1;}}"}),bb=(e,t)=>O0("height:14px!important;width:14px!important;color:",e,"!important;cursor:pointer;border:1px solid ",t,";border-radius:3px;padding:2px;","");function Mu(e,t){return t==="left"?[e.getLeftHeaderGroups(),e.getLeftFooterGroups()]:t==="right"?[e.getRightHeaderGroups(),e.getRightFooterGroups()]:t==="center"?[e.getCenterHeaderGroups(),e.getCenterFooterGroups()]:[e.getHeaderGroups(),e.getFooterGroups()]}function bu(e,t){return t==="left"?e.getLeftVisibleCells():t==="right"?e.getRightVisibleCells():t==="center"?e.getCenterVisibleCells():e.getVisibleCells()}function ou({table:e,tableGroup:t,columnResizeMode:M}){const b=Q0(),[o]=Mu(e,t);return a(f1,{theme:b,children:P("table",{style:{width:"100%"},children:[a("thead",{children:o.map(p=>a("tr",{children:p.headers.map(n=>P("th",{className:P0(tu),key:n.id,colSpan:n.colSpan,style:{width:n.getSize()},children:[" ",P("div",{style:{display:"flex",gap:"6px",alignItems:"center",fontSize:"13px"},children:[n.isPlaceholder?null:a(q1,{children:rz(n.column.columnDef.header,n.getContext())}),a("div",{onMouseDown:n.getResizeHandler(),onTouchStart:n.getResizeHandler(),className:`resizer ${n.column.getIsResizing()?"isResizing":""}`}),P("div",{style:{fontSize:"12px",display:"flex",alignItems:"center",gap:"6px"},children:[n.column.getCanFilter()?a("div",{children:a($d,{column:n.column,table:e})}):null,a("button",{onClick:n.column.getToggleSortingHandler(),style:{border:"none",background:"none",display:"flex",alignItems:"center"},title:"Sort",className:n.column.getCanSort()?"cursor-pointer select-none":"",children:{asc:a(sr,{className:P0(bb(b.contrast,b.accentNeutral))}),desc:a(Pe,{className:P0(bb(b.contrast,b.accentNeutral))})}[n.column.getIsSorted()]??a(ar,{className:P0(bb(b.contrast,b.accentNeutral))})})]})]})]}))},p.id))}),a("tbody",{children:e.getRowModel().rows.map(p=>a("tr",{children:bu(p,t).map(n=>a("td",{style:{width:n.column.getSize(),fontSize:"12px"},children:a(q1,{children:rz(n.column.columnDef.cell,n.getContext())})},n.id))},p.id))})]})})}function pu(){const e=q.useRef(!0),t=e.current,M=q.useCallback(()=>{e.current=!1},[]);return q.useEffect(()=>{e.current=!0}),q.useMemo(()=>[!!t,M],[t,M])}const zu=h0("div",{target:"eptftt0"})("padding:5px;table{border-spacing:0;border:1px solid ",({theme:e})=>e.accentNeutral,";border-radius:4px;border-bottom:none;border-top:none;color:",({theme:e})=>e.contrast,";tr{:last-child{td{border-bottom:none;}}}th,td{margin:0;padding:0.45rem;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";border-right:1px solid ",({theme:e})=>e.accentNeutral,";:last-child{border-right:0;}}td{input{font-size:12px;padding:0;margin:0;border:0;}}}.pagination{padding:0.5rem;}");function nu(e){var k;const t=q.useReducer(()=>({}),{})[1],{columns:M,data:b}=e,o=Q0(),[p,n]=q.useState(b),c=()=>n(b),[r,s]=q.useState({}),[i,l]=q.useState([]),[h,g]=q.useState({}),[d,m]=q.useState([]),[N,R]=q.useState(""),[W,S]=pu(),[L]=q.useState("onChange"),x=Ga({data:p,columns:M,defaultColumn:gd,getCoreRowModel:Ka(),getFilteredRowModel:Qa(),getPaginationRowModel:Ja(),getSortedRowModel:Ya(),getGroupedRowModel:Za(),getFacetedRowModel:e3(),getFacetedUniqueValues:t3(),getFacetedMinMaxValues:M3(),onColumnFiltersChange:m,onGlobalFilterChange:R,globalFilterFn:hd,autoResetPageIndex:W,enableColumnResizing:!0,columnResizeMode:L,onColumnVisibilityChange:s,onGroupingChange:l,onRowSelectionChange:g,meta:Rd(n,S),state:{grouping:i,columnFilters:d,globalFilter:N,columnVisibility:r}});return q.useEffect(()=>{var A,y;((A=x.getState().columnFilters[0])==null?void 0:A.id)==="fullName"&&((y=x.getState().sorting[0])==null?void 0:y.id)!=="fullName"&&x.setSorting([{id:"fullName",desc:!1}])},[(k=x.getState().columnFilters[0])==null?void 0:k.id]),a(f1,{theme:o,children:P(zu,{theme:o,children:[P("div",{style:{display:"flex",justifyContent:"space-between",margin:"4px",marginLeft:0},children:[a("div",{style:{display:"flex",fontSize:"14px",gap:"6px",margin:"4px",marginLeft:0},children:x.getAllLeafColumns().map(A=>a("div",{children:P("label",{style:{display:"flex",alignItems:"center",color:o.contrast},children:[a("input",{type:"checkbox",checked:A.getIsVisible(),onChange:A.getToggleVisibilityHandler(),className:"mr-1"}),A.id]})},A.id))}),P("div",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"14px",margin:"4px",color:o.contrast},children:["Search:",a(tM,{theme:o,style:{fontSize:"12px",padding:"3px 8px"},value:o1(N??""),onChange:A=>R(String(A)),placeholder:"Search all columns..."})]})]}),a("div",{style:{display:"flex"},children:a(ou,{columnResizeMode:L,table:x,tableGroup:"center"})}),a("div",{style:{display:"flex"},children:a(jd,{getSelectedRowModel:x.getSelectedRowModel,hasNextPage:x.getCanNextPage(),hasPreviousPage:x.getCanPreviousPage(),nextPage:x.nextPage,pageCount:x.getPageCount(),pageIndex:x.getState().pagination.pageIndex,pageSize:x.getState().pagination.pageSize,previousPage:x.previousPage,refreshData:c,rerender:t,rowSelection:h,setPageIndex:x.setPageIndex,setPageSize:x.setPageSize,totalRows:x.getPrePaginationRowModel().rows.length})})]})})}const cu=h0("div",{target:"e19v7mv10"})("display:block;overflow:auto;&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}.table{border-spacing:0;border-radius:4px;font-size:12px;color:",({theme:e})=>e.contrast,";&::-webkit-scrollbar{width:5px;}&::-webkit-scrollbar-corner{background:transparent;}&::-webkit-scrollbar-thumb{border-radius:5px;background:",({theme:e})=>e.alphaPlusNeutral,";}.tr{display:block;:last-child{.td{border-bottom:0;}}}.th{background:",({theme:e})=>e.lightNeutral,";border-bottom:none;padding:3px;:last-child{box-sizing:unset!important;}}.th,.td{display:block;flex:1;margin:0;justify-content:space-between;border-bottom:1px solid ",({theme:e})=>e.accentNeutral,";border-right:1px solid ",({theme:e})=>e.accentNeutral,";padding:3px;position:relative;white-space:nowrap;overflow:hidden;.show-add-labels{display:none;}&:hover{.show-add-labels{display:flex;align-items:center;}}:last-child{border-right:0;padding-right:0px;}.resizer{display:inline-block;background:",({theme:e})=>e.accentNeutral,";width:5px;height:100%;position:absolute;right:0;top:0;transform:translateX(50%);z-index:1;&.isResizing{background:red;}}}}.pagination{}"),Yo=e=>{const{data:{columnsData:t,dataRows:M},actualQuery:b,height:o,size:p,width:n}=e,[c,r]=q.useState(t),[s,i]=q.useState(M);return q.useEffect(()=>{r(t)},[t]),q.useEffect(()=>{i(M)},[M]),a(cu,{children:t&&M&&a(nu,{actQuery:b,columns:c,width:n,data:s,height:o,size:p})})};function V2({id:e}){try{return JSON.parse(localStorage.getItem("tabsState")||`{[${e}]:0}`)}catch{return{[e]:0}}}var Ar={exports:{}};/*! * jQuery JavaScript Library v3.7.1 * https://jquery.com/ * @@ -50,10 +50,10 @@ License: MIT * https://jquery.org/license * * Date: 2023-08-28T13:37Z - */(function(e){(function(t,M){e.exports=t.document?M(t,!0):function(b){if(!b.document)throw new Error("jQuery requires a window with a document");return M(b)}})(typeof window<"u"?window:no,function(t,M){var b=[],o=Object.getPrototypeOf,p=b.slice,n=b.flat?function(z){return b.flat.call(z)}:function(z){return b.concat.apply([],z)},c=b.push,r=b.indexOf,s={},O=s.toString,l=s.hasOwnProperty,h=l.toString,g=h.call(Object),d={},m=function(i){return typeof i=="function"&&typeof i.nodeType!="number"&&typeof i.item!="function"},L=function(i){return i!=null&&i===i.window},R=t.document,W={type:!0,src:!0,nonce:!0,noModule:!0};function S(z,i,u){u=u||R;var f,B,T=u.createElement("script");if(T.text=z,i)for(f in W)B=i[f]||i.getAttribute&&i.getAttribute(f),B&&T.setAttribute(f,B);u.head.appendChild(T).parentNode.removeChild(T)}function N(z){return z==null?z+"":typeof z=="object"||typeof z=="function"?s[O.call(z)]||"object":typeof z}var x="3.7.1",k=/HTML$/i,A=function(z,i){return new A.fn.init(z,i)};A.fn=A.prototype={jquery:x,constructor:A,length:0,toArray:function(){return p.call(this)},get:function(z){return z==null?p.call(this):z<0?this[z+this.length]:this[z]},pushStack:function(z){var i=A.merge(this.constructor(),z);return i.prevObject=this,i},each:function(z){return A.each(this,z)},map:function(z){return this.pushStack(A.map(this,function(i,u){return z.call(i,u,i)}))},slice:function(){return this.pushStack(p.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,function(z,i){return(i+1)%2}))},odd:function(){return this.pushStack(A.grep(this,function(z,i){return i%2}))},eq:function(z){var i=this.length,u=+z+(z<0?i:0);return this.pushStack(u>=0&&u0&&i-1 in z}function v(z,i){return z.nodeName&&z.nodeName.toLowerCase()===i.toLowerCase()}var C=b.pop,_=b.sort,I=b.splice,D="[\\x20\\t\\r\\n\\f]",Q=new RegExp("^"+D+"+|((?:^|[^\\\\])(?:\\\\.)*)"+D+"+$","g");A.contains=function(z,i){var u=i&&i.parentNode;return z===u||!!(u&&u.nodeType===1&&(z.contains?z.contains(u):z.compareDocumentPosition&&z.compareDocumentPosition(u)&16))};var z0=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function o0(z,i){return i?z==="\0"?"�":z.slice(0,-1)+"\\"+z.charCodeAt(z.length-1).toString(16)+" ":"\\"+z}A.escapeSelector=function(z){return(z+"").replace(z0,o0)};var t0=R,N0=c;(function(){var z,i,u,f,B,T=N0,w,K,$,e0,l0,L0=A.expando,O0=0,C0=0,O1=St(),h1=St(),A1=St(),K1=St(),j1=function(j,Z){return j===Z&&(B=!0),0},v2="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",B2="(?:\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",u1="\\["+D+"*("+B2+")(?:"+D+"*([*^$|!~]?=)"+D+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+B2+"))|)"+D+"*\\]",oe=":("+B2+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+u1+")*)|.*)\\)|)",g1=new RegExp(D+"+","g"),C1=new RegExp("^"+D+"*,"+D+"*"),et=new RegExp("^"+D+"*([>+~]|"+D+")"+D+"*"),jM=new RegExp(D+"|>"),y2=new RegExp(oe),tt=new RegExp("^"+B2+"$"),T2={ID:new RegExp("^#("+B2+")"),CLASS:new RegExp("^\\.("+B2+")"),TAG:new RegExp("^("+B2+"|[*])"),ATTR:new RegExp("^"+u1),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+v2+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},U2=/^(?:input|select|textarea|button)$/i,G2=/^h\d$/i,l2=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,FM=/[+~]/,E2=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),k2=function(j,Z){var r0="0x"+j.slice(1)-65536;return Z||(r0<0?String.fromCharCode(r0+65536):String.fromCharCode(r0>>10|55296,r0&1023|56320))},yi=function(){K2()},Ti=Xt(function(j){return j.disabled===!0&&v(j,"fieldset")},{dir:"parentNode",next:"legend"});function Si(){try{return w.activeElement}catch{}}try{T.apply(b=p.call(t0.childNodes),t0.childNodes),b[t0.childNodes.length].nodeType}catch{T={apply:function(Z,r0){N0.apply(Z,p.call(r0))},call:function(Z){N0.apply(Z,p.call(arguments,1))}}}function v1(j,Z,r0,a0){var R0,F0,Q0,M1,J0,l1,c1,i1=Z&&Z.ownerDocument,d1=Z?Z.nodeType:9;if(r0=r0||[],typeof j!="string"||!j||d1!==1&&d1!==9&&d1!==11)return r0;if(!a0&&(K2(Z),Z=Z||w,$)){if(d1!==11&&(J0=l2.exec(j)))if(R0=J0[1]){if(d1===9)if(Q0=Z.getElementById(R0)){if(Q0.id===R0)return T.call(r0,Q0),r0}else return r0;else if(i1&&(Q0=i1.getElementById(R0))&&v1.contains(Z,Q0)&&Q0.id===R0)return T.call(r0,Q0),r0}else{if(J0[2])return T.apply(r0,Z.getElementsByTagName(j)),r0;if((R0=J0[3])&&Z.getElementsByClassName)return T.apply(r0,Z.getElementsByClassName(R0)),r0}if(!K1[j+" "]&&(!e0||!e0.test(j))){if(c1=j,i1=Z,d1===1&&(jM.test(j)||et.test(j))){for(i1=FM.test(j)&&VM(Z.parentNode)||Z,(i1!=Z||!d.scope)&&((M1=Z.getAttribute("id"))?M1=A.escapeSelector(M1):Z.setAttribute("id",M1=L0)),l1=Mt(j),F0=l1.length;F0--;)l1[F0]=(M1?"#"+M1:":scope")+" "+xt(l1[F0]);c1=l1.join(",")}try{return T.apply(r0,i1.querySelectorAll(c1)),r0}catch{K1(j,!0)}finally{M1===L0&&Z.removeAttribute("id")}}}return Yp(j.replace(Q,"$1"),Z,r0,a0)}function St(){var j=[];function Z(r0,a0){return j.push(r0+" ")>i.cacheLength&&delete Z[j.shift()],Z[r0+" "]=a0}return Z}function R2(j){return j[L0]=!0,j}function ge(j){var Z=w.createElement("fieldset");try{return!!j(Z)}catch{return!1}finally{Z.parentNode&&Z.parentNode.removeChild(Z),Z=null}}function xi(j){return function(Z){return v(Z,"input")&&Z.type===j}}function Xi(j){return function(Z){return(v(Z,"input")||v(Z,"button"))&&Z.type===j}}function Qp(j){return function(Z){return"form"in Z?Z.parentNode&&Z.disabled===!1?"label"in Z?"label"in Z.parentNode?Z.parentNode.disabled===j:Z.disabled===j:Z.isDisabled===j||Z.isDisabled!==!j&&Ti(Z)===j:Z.disabled===j:"label"in Z?Z.disabled===j:!1}}function pe(j){return R2(function(Z){return Z=+Z,R2(function(r0,a0){for(var R0,F0=j([],r0.length,Z),Q0=F0.length;Q0--;)r0[R0=F0[Q0]]&&(r0[R0]=!(a0[R0]=r0[R0]))})})}function VM(j){return j&&typeof j.getElementsByTagName<"u"&&j}function K2(j){var Z,r0=j?j.ownerDocument||j:t0;return r0==w||r0.nodeType!==9||!r0.documentElement||(w=r0,K=w.documentElement,$=!A.isXMLDoc(w),l0=K.matches||K.webkitMatchesSelector||K.msMatchesSelector,K.msMatchesSelector&&t0!=w&&(Z=w.defaultView)&&Z.top!==Z&&Z.addEventListener("unload",yi),d.getById=ge(function(a0){return K.appendChild(a0).id=A.expando,!w.getElementsByName||!w.getElementsByName(A.expando).length}),d.disconnectedMatch=ge(function(a0){return l0.call(a0,"*")}),d.scope=ge(function(){return w.querySelectorAll(":scope")}),d.cssHas=ge(function(){try{return w.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),d.getById?(i.filter.ID=function(a0){var R0=a0.replace(E2,k2);return function(F0){return F0.getAttribute("id")===R0}},i.find.ID=function(a0,R0){if(typeof R0.getElementById<"u"&&$){var F0=R0.getElementById(a0);return F0?[F0]:[]}}):(i.filter.ID=function(a0){var R0=a0.replace(E2,k2);return function(F0){var Q0=typeof F0.getAttributeNode<"u"&&F0.getAttributeNode("id");return Q0&&Q0.value===R0}},i.find.ID=function(a0,R0){if(typeof R0.getElementById<"u"&&$){var F0,Q0,M1,J0=R0.getElementById(a0);if(J0){if(F0=J0.getAttributeNode("id"),F0&&F0.value===a0)return[J0];for(M1=R0.getElementsByName(a0),Q0=0;J0=M1[Q0++];)if(F0=J0.getAttributeNode("id"),F0&&F0.value===a0)return[J0]}return[]}}),i.find.TAG=function(a0,R0){return typeof R0.getElementsByTagName<"u"?R0.getElementsByTagName(a0):R0.querySelectorAll(a0)},i.find.CLASS=function(a0,R0){if(typeof R0.getElementsByClassName<"u"&&$)return R0.getElementsByClassName(a0)},e0=[],ge(function(a0){var R0;K.appendChild(a0).innerHTML="",a0.querySelectorAll("[selected]").length||e0.push("\\["+D+"*(?:value|"+v2+")"),a0.querySelectorAll("[id~="+L0+"-]").length||e0.push("~="),a0.querySelectorAll("a#"+L0+"+*").length||e0.push(".#.+[+~]"),a0.querySelectorAll(":checked").length||e0.push(":checked"),R0=w.createElement("input"),R0.setAttribute("type","hidden"),a0.appendChild(R0).setAttribute("name","D"),K.appendChild(a0).disabled=!0,a0.querySelectorAll(":disabled").length!==2&&e0.push(":enabled",":disabled"),R0=w.createElement("input"),R0.setAttribute("name",""),a0.appendChild(R0),a0.querySelectorAll("[name='']").length||e0.push("\\["+D+"*name"+D+"*="+D+`*(?:''|"")`)}),d.cssHas||e0.push(":has"),e0=e0.length&&new RegExp(e0.join("|")),j1=function(a0,R0){if(a0===R0)return B=!0,0;var F0=!a0.compareDocumentPosition-!R0.compareDocumentPosition;return F0||(F0=(a0.ownerDocument||a0)==(R0.ownerDocument||R0)?a0.compareDocumentPosition(R0):1,F0&1||!d.sortDetached&&R0.compareDocumentPosition(a0)===F0?a0===w||a0.ownerDocument==t0&&v1.contains(t0,a0)?-1:R0===w||R0.ownerDocument==t0&&v1.contains(t0,R0)?1:f?r.call(f,a0)-r.call(f,R0):0:F0&4?-1:1)}),w}v1.matches=function(j,Z){return v1(j,null,null,Z)},v1.matchesSelector=function(j,Z){if(K2(j),$&&!K1[Z+" "]&&(!e0||!e0.test(Z)))try{var r0=l0.call(j,Z);if(r0||d.disconnectedMatch||j.document&&j.document.nodeType!==11)return r0}catch{K1(Z,!0)}return v1(Z,w,null,[j]).length>0},v1.contains=function(j,Z){return(j.ownerDocument||j)!=w&&K2(j),A.contains(j,Z)},v1.attr=function(j,Z){(j.ownerDocument||j)!=w&&K2(j);var r0=i.attrHandle[Z.toLowerCase()],a0=r0&&l.call(i.attrHandle,Z.toLowerCase())?r0(j,Z,!$):void 0;return a0!==void 0?a0:j.getAttribute(Z)},v1.error=function(j){throw new Error("Syntax error, unrecognized expression: "+j)},A.uniqueSort=function(j){var Z,r0=[],a0=0,R0=0;if(B=!d.sortStable,f=!d.sortStable&&p.call(j,0),_.call(j,j1),B){for(;Z=j[R0++];)Z===j[R0]&&(a0=r0.push(R0));for(;a0--;)I.call(j,r0[a0],1)}return f=null,j},A.fn.uniqueSort=function(){return this.pushStack(A.uniqueSort(p.apply(this)))},i=A.expr={cacheLength:50,createPseudo:R2,match:T2,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(j){return j[1]=j[1].replace(E2,k2),j[3]=(j[3]||j[4]||j[5]||"").replace(E2,k2),j[2]==="~="&&(j[3]=" "+j[3]+" "),j.slice(0,4)},CHILD:function(j){return j[1]=j[1].toLowerCase(),j[1].slice(0,3)==="nth"?(j[3]||v1.error(j[0]),j[4]=+(j[4]?j[5]+(j[6]||1):2*(j[3]==="even"||j[3]==="odd")),j[5]=+(j[7]+j[8]||j[3]==="odd")):j[3]&&v1.error(j[0]),j},PSEUDO:function(j){var Z,r0=!j[6]&&j[2];return T2.CHILD.test(j[0])?null:(j[3]?j[2]=j[4]||j[5]||"":r0&&y2.test(r0)&&(Z=Mt(r0,!0))&&(Z=r0.indexOf(")",r0.length-Z)-r0.length)&&(j[0]=j[0].slice(0,Z),j[2]=r0.slice(0,Z)),j.slice(0,3))}},filter:{TAG:function(j){var Z=j.replace(E2,k2).toLowerCase();return j==="*"?function(){return!0}:function(r0){return v(r0,Z)}},CLASS:function(j){var Z=O1[j+" "];return Z||(Z=new RegExp("(^|"+D+")"+j+"("+D+"|$)"))&&O1(j,function(r0){return Z.test(typeof r0.className=="string"&&r0.className||typeof r0.getAttribute<"u"&&r0.getAttribute("class")||"")})},ATTR:function(j,Z,r0){return function(a0){var R0=v1.attr(a0,j);return R0==null?Z==="!=":Z?(R0+="",Z==="="?R0===r0:Z==="!="?R0!==r0:Z==="^="?r0&&R0.indexOf(r0)===0:Z==="*="?r0&&R0.indexOf(r0)>-1:Z==="$="?r0&&R0.slice(-r0.length)===r0:Z==="~="?(" "+R0.replace(g1," ")+" ").indexOf(r0)>-1:Z==="|="?R0===r0||R0.slice(0,r0.length+1)===r0+"-":!1):!0}},CHILD:function(j,Z,r0,a0,R0){var F0=j.slice(0,3)!=="nth",Q0=j.slice(-4)!=="last",M1=Z==="of-type";return a0===1&&R0===0?function(J0){return!!J0.parentNode}:function(J0,l1,c1){var i1,d1,z1,S1,r2,Y1=F0!==Q0?"nextSibling":"previousSibling",d2=J0.parentNode,S2=M1&&J0.nodeName.toLowerCase(),Re=!c1&&!M1,b2=!1;if(d2){if(F0){for(;Y1;){for(z1=J0;z1=z1[Y1];)if(M1?v(z1,S2):z1.nodeType===1)return!1;r2=Y1=j==="only"&&!r2&&"nextSibling"}return!0}if(r2=[Q0?d2.firstChild:d2.lastChild],Q0&&Re){for(d1=d2[L0]||(d2[L0]={}),i1=d1[j]||[],S1=i1[0]===O0&&i1[1],b2=S1&&i1[2],z1=S1&&d2.childNodes[S1];z1=++S1&&z1&&z1[Y1]||(b2=S1=0)||r2.pop();)if(z1.nodeType===1&&++b2&&z1===J0){d1[j]=[O0,S1,b2];break}}else if(Re&&(d1=J0[L0]||(J0[L0]={}),i1=d1[j]||[],S1=i1[0]===O0&&i1[1],b2=S1),b2===!1)for(;(z1=++S1&&z1&&z1[Y1]||(b2=S1=0)||r2.pop())&&!((M1?v(z1,S2):z1.nodeType===1)&&++b2&&(Re&&(d1=z1[L0]||(z1[L0]={}),d1[j]=[O0,b2]),z1===J0)););return b2-=R0,b2===a0||b2%a0===0&&b2/a0>=0}}},PSEUDO:function(j,Z){var r0,a0=i.pseudos[j]||i.setFilters[j.toLowerCase()]||v1.error("unsupported pseudo: "+j);return a0[L0]?a0(Z):a0.length>1?(r0=[j,j,"",Z],i.setFilters.hasOwnProperty(j.toLowerCase())?R2(function(R0,F0){for(var Q0,M1=a0(R0,Z),J0=M1.length;J0--;)Q0=r.call(R0,M1[J0]),R0[Q0]=!(F0[Q0]=M1[J0])}):function(R0){return a0(R0,0,r0)}):a0}},pseudos:{not:R2(function(j){var Z=[],r0=[],a0=KM(j.replace(Q,"$1"));return a0[L0]?R2(function(R0,F0,Q0,M1){for(var J0,l1=a0(R0,null,M1,[]),c1=R0.length;c1--;)(J0=l1[c1])&&(R0[c1]=!(F0[c1]=J0))}):function(R0,F0,Q0){return Z[0]=R0,a0(Z,null,Q0,r0),Z[0]=null,!r0.pop()}}),has:R2(function(j){return function(Z){return v1(j,Z).length>0}}),contains:R2(function(j){return j=j.replace(E2,k2),function(Z){return(Z.textContent||A.text(Z)).indexOf(j)>-1}}),lang:R2(function(j){return tt.test(j||"")||v1.error("unsupported lang: "+j),j=j.replace(E2,k2).toLowerCase(),function(Z){var r0;do if(r0=$?Z.lang:Z.getAttribute("xml:lang")||Z.getAttribute("lang"))return r0=r0.toLowerCase(),r0===j||r0.indexOf(j+"-")===0;while((Z=Z.parentNode)&&Z.nodeType===1);return!1}}),target:function(j){var Z=t.location&&t.location.hash;return Z&&Z.slice(1)===j.id},root:function(j){return j===K},focus:function(j){return j===Si()&&w.hasFocus()&&!!(j.type||j.href||~j.tabIndex)},enabled:Qp(!1),disabled:Qp(!0),checked:function(j){return v(j,"input")&&!!j.checked||v(j,"option")&&!!j.selected},selected:function(j){return j.parentNode&&j.parentNode.selectedIndex,j.selected===!0},empty:function(j){for(j=j.firstChild;j;j=j.nextSibling)if(j.nodeType<6)return!1;return!0},parent:function(j){return!i.pseudos.empty(j)},header:function(j){return G2.test(j.nodeName)},input:function(j){return U2.test(j.nodeName)},button:function(j){return v(j,"input")&&j.type==="button"||v(j,"button")},text:function(j){var Z;return v(j,"input")&&j.type==="text"&&((Z=j.getAttribute("type"))==null||Z.toLowerCase()==="text")},first:pe(function(){return[0]}),last:pe(function(j,Z){return[Z-1]}),eq:pe(function(j,Z,r0){return[r0<0?r0+Z:r0]}),even:pe(function(j,Z){for(var r0=0;r0Z?a0=Z:a0=r0;--a0>=0;)j.push(a0);return j}),gt:pe(function(j,Z,r0){for(var a0=r0<0?r0+Z:r0;++a01?function(Z,r0,a0){for(var R0=j.length;R0--;)if(!j[R0](Z,r0,a0))return!1;return!0}:j[0]}function wi(j,Z,r0){for(var a0=0,R0=Z.length;a0-1&&(Q0[c1]=!(M1[c1]=d1))}}else z1=wt(z1===M1?z1.splice(Y1,z1.length):z1),R0?R0(null,M1,z1,l1):T.apply(M1,z1)})}function GM(j){for(var Z,r0,a0,R0=j.length,F0=i.relative[j[0].type],Q0=F0||i.relative[" "],M1=F0?1:0,J0=Xt(function(i1){return i1===Z},Q0,!0),l1=Xt(function(i1){return r.call(Z,i1)>-1},Q0,!0),c1=[function(i1,d1,z1){var S1=!F0&&(z1||d1!=u)||((Z=d1).nodeType?J0(i1,d1,z1):l1(i1,d1,z1));return Z=null,S1}];M11&&$M(c1),M1>1&&xt(j.slice(0,M1-1).concat({value:j[M1-2].type===" "?"*":""})).replace(Q,"$1"),r0,M10,a0=j.length>0,R0=function(F0,Q0,M1,J0,l1){var c1,i1,d1,z1=0,S1="0",r2=F0&&[],Y1=[],d2=u,S2=F0||a0&&i.find.TAG("*",l1),Re=O0+=d2==null?1:Math.random()||.1,b2=S2.length;for(l1&&(u=Q0==w||Q0||l1);S1!==b2&&(c1=S2[S1])!=null;S1++){if(a0&&c1){for(i1=0,!Q0&&c1.ownerDocument!=w&&(K2(c1),M1=!$);d1=j[i1++];)if(d1(c1,Q0||w,M1)){T.call(J0,c1);break}l1&&(O0=Re)}r0&&((c1=!d1&&c1)&&z1--,F0&&r2.push(c1))}if(z1+=S1,r0&&S1!==z1){for(i1=0;d1=Z[i1++];)d1(r2,Y1,Q0,M1);if(F0){if(z1>0)for(;S1--;)r2[S1]||Y1[S1]||(Y1[S1]=C.call(J0));Y1=wt(Y1)}T.apply(J0,Y1),l1&&!F0&&Y1.length>0&&z1+Z.length>1&&A.uniqueSort(J0)}return l1&&(O0=Re,u=d2),r2};return r0?R2(R0):R0}function KM(j,Z){var r0,a0=[],R0=[],F0=A1[j+" "];if(!F0){for(Z||(Z=Mt(j)),r0=Z.length;r0--;)F0=GM(Z[r0]),F0[L0]?a0.push(F0):R0.push(F0);F0=A1(j,Ci(R0,a0)),F0.selector=j}return F0}function Yp(j,Z,r0,a0){var R0,F0,Q0,M1,J0,l1=typeof j=="function"&&j,c1=!a0&&Mt(j=l1.selector||j);if(r0=r0||[],c1.length===1){if(F0=c1[0]=c1[0].slice(0),F0.length>2&&(Q0=F0[0]).type==="ID"&&Z.nodeType===9&&$&&i.relative[F0[1].type]){if(Z=(i.find.ID(Q0.matches[0].replace(E2,k2),Z)||[])[0],Z)l1&&(Z=Z.parentNode);else return r0;j=j.slice(F0.shift().value.length)}for(R0=T2.needsContext.test(j)?0:F0.length;R0--&&(Q0=F0[R0],!i.relative[M1=Q0.type]);)if((J0=i.find[M1])&&(a0=J0(Q0.matches[0].replace(E2,k2),FM.test(F0[0].type)&&VM(Z.parentNode)||Z))){if(F0.splice(R0,1),j=a0.length&&xt(F0),!j)return T.apply(r0,a0),r0;break}}return(l1||KM(j,c1))(a0,Z,!$,r0,!Z||FM.test(j)&&VM(Z.parentNode)||Z),r0}d.sortStable=L0.split("").sort(j1).join("")===L0,K2(),d.sortDetached=ge(function(j){return j.compareDocumentPosition(w.createElement("fieldset"))&1}),A.find=v1,A.expr[":"]=A.expr.pseudos,A.unique=A.uniqueSort,v1.compile=KM,v1.select=Yp,v1.setDocument=K2,v1.tokenize=Mt,v1.escape=A.escapeSelector,v1.getText=A.text,v1.isXML=A.isXMLDoc,v1.selectors=A.expr,v1.support=A.support,v1.uniqueSort=A.uniqueSort})();var Y=function(z,i,u){for(var f=[],B=u!==void 0;(z=z[i])&&z.nodeType!==9;)if(z.nodeType===1){if(B&&A(z).is(u))break;f.push(z)}return f},$0=function(z,i){for(var u=[];z;z=z.nextSibling)z.nodeType===1&&z!==i&&u.push(z);return u},k0=A.expr.match.needsContext,f0=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function S0(z,i,u){return m(i)?A.grep(z,function(f,B){return!!i.call(f,B,f)!==u}):i.nodeType?A.grep(z,function(f){return f===i!==u}):typeof i!="string"?A.grep(z,function(f){return r.call(i,f)>-1!==u}):A.filter(i,z,u)}A.filter=function(z,i,u){var f=i[0];return u&&(z=":not("+z+")"),i.length===1&&f.nodeType===1?A.find.matchesSelector(f,z)?[f]:[]:A.find.matches(z,A.grep(i,function(B){return B.nodeType===1}))},A.fn.extend({find:function(z){var i,u,f=this.length,B=this;if(typeof z!="string")return this.pushStack(A(z).filter(function(){for(i=0;i1?A.uniqueSort(u):u},filter:function(z){return this.pushStack(S0(this,z||[],!1))},not:function(z){return this.pushStack(S0(this,z||[],!0))},is:function(z){return!!S0(this,typeof z=="string"&&k0.test(z)?A(z):z||[],!1).length}});var w0,b0=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,m0=A.fn.init=function(z,i,u){var f,B;if(!z)return this;if(u=u||w0,typeof z=="string")if(z[0]==="<"&&z[z.length-1]===">"&&z.length>=3?f=[null,z,null]:f=b0.exec(z),f&&(f[1]||!i))if(f[1]){if(i=i instanceof A?i[0]:i,A.merge(this,A.parseHTML(f[1],i&&i.nodeType?i.ownerDocument||i:R,!0)),f0.test(f[1])&&A.isPlainObject(i))for(f in i)m(this[f])?this[f](i[f]):this.attr(f,i[f]);return this}else return B=R.getElementById(f[2]),B&&(this[0]=B,this.length=1),this;else return!i||i.jquery?(i||u).find(z):this.constructor(i).find(z);else{if(z.nodeType)return this[0]=z,this.length=1,this;if(m(z))return u.ready!==void 0?u.ready(z):z(A)}return A.makeArray(z,this)};m0.prototype=A.fn,w0=A(R);var s0=/^(?:parents|prev(?:Until|All))/,q0={children:!0,contents:!0,next:!0,prev:!0};A.fn.extend({has:function(z){var i=A(z,this),u=i.length;return this.filter(function(){for(var f=0;f-1:u.nodeType===1&&A.find.matchesSelector(u,z))){T.push(u);break}}return this.pushStack(T.length>1?A.uniqueSort(T):T)},index:function(z){return z?typeof z=="string"?r.call(A(z),this[0]):r.call(this,z.jquery?z[0]:z):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(z,i){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(z,i))))},addBack:function(z){return this.add(z==null?this.prevObject:this.prevObject.filter(z))}});function d0(z,i){for(;(z=z[i])&&z.nodeType!==1;);return z}A.each({parent:function(z){var i=z.parentNode;return i&&i.nodeType!==11?i:null},parents:function(z){return Y(z,"parentNode")},parentsUntil:function(z,i,u){return Y(z,"parentNode",u)},next:function(z){return d0(z,"nextSibling")},prev:function(z){return d0(z,"previousSibling")},nextAll:function(z){return Y(z,"nextSibling")},prevAll:function(z){return Y(z,"previousSibling")},nextUntil:function(z,i,u){return Y(z,"nextSibling",u)},prevUntil:function(z,i,u){return Y(z,"previousSibling",u)},siblings:function(z){return $0((z.parentNode||{}).firstChild,z)},children:function(z){return $0(z.firstChild)},contents:function(z){return z.contentDocument!=null&&o(z.contentDocument)?z.contentDocument:(v(z,"template")&&(z=z.content||z),A.merge([],z.childNodes))}},function(z,i){A.fn[z]=function(u,f){var B=A.map(this,i,u);return z.slice(-5)!=="Until"&&(f=u),f&&typeof f=="string"&&(B=A.filter(f,B)),this.length>1&&(q0[z]||A.uniqueSort(B),s0.test(z)&&B.reverse()),this.pushStack(B)}});var v0=/[^\x20\t\r\n\f]+/g;function K0(z){var i={};return A.each(z.match(v0)||[],function(u,f){i[f]=!0}),i}A.Callbacks=function(z){z=typeof z=="string"?K0(z):A.extend({},z);var i,u,f,B,T=[],w=[],K=-1,$=function(){for(B=B||z.once,f=i=!0;w.length;K=-1)for(u=w.shift();++K-1;)T.splice(O0,1),O0<=K&&K--}),this},has:function(l0){return l0?A.inArray(l0,T)>-1:T.length>0},empty:function(){return T&&(T=[]),this},disable:function(){return B=w=[],T=u="",this},disabled:function(){return!T},lock:function(){return B=w=[],!u&&!i&&(T=u=""),this},locked:function(){return!!B},fireWith:function(l0,L0){return B||(L0=L0||[],L0=[l0,L0.slice?L0.slice():L0],w.push(L0),i||$()),this},fire:function(){return e0.fireWith(this,arguments),this},fired:function(){return!!f}};return e0};function Z0(z){return z}function F(z){throw z}function n0(z,i,u,f){var B;try{z&&m(B=z.promise)?B.call(z).done(i).fail(u):z&&m(B=z.then)?B.call(z,i,u):i.apply(void 0,[z].slice(f))}catch(T){u.apply(void 0,[T])}}A.extend({Deferred:function(z){var i=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],u="pending",f={state:function(){return u},always:function(){return B.done(arguments).fail(arguments),this},catch:function(T){return f.then(null,T)},pipe:function(){var T=arguments;return A.Deferred(function(w){A.each(i,function(K,$){var e0=m(T[$[4]])&&T[$[4]];B[$[1]](function(){var l0=e0&&e0.apply(this,arguments);l0&&m(l0.promise)?l0.promise().progress(w.notify).done(w.resolve).fail(w.reject):w[$[0]+"With"](this,e0?[l0]:arguments)})}),T=null}).promise()},then:function(T,w,K){var $=0;function e0(l0,L0,O0,C0){return function(){var O1=this,h1=arguments,A1=function(){var j1,v2;if(!(l0<$)){if(j1=O0.apply(O1,h1),j1===L0.promise())throw new TypeError("Thenable self-resolution");v2=j1&&(typeof j1=="object"||typeof j1=="function")&&j1.then,m(v2)?C0?v2.call(j1,e0($,L0,Z0,C0),e0($,L0,F,C0)):($++,v2.call(j1,e0($,L0,Z0,C0),e0($,L0,F,C0),e0($,L0,Z0,L0.notifyWith))):(O0!==Z0&&(O1=void 0,h1=[j1]),(C0||L0.resolveWith)(O1,h1))}},K1=C0?A1:function(){try{A1()}catch(j1){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(j1,K1.error),l0+1>=$&&(O0!==F&&(O1=void 0,h1=[j1]),L0.rejectWith(O1,h1))}};l0?K1():(A.Deferred.getErrorHook?K1.error=A.Deferred.getErrorHook():A.Deferred.getStackHook&&(K1.error=A.Deferred.getStackHook()),t.setTimeout(K1))}}return A.Deferred(function(l0){i[0][3].add(e0(0,l0,m(K)?K:Z0,l0.notifyWith)),i[1][3].add(e0(0,l0,m(T)?T:Z0)),i[2][3].add(e0(0,l0,m(w)?w:F))}).promise()},promise:function(T){return T!=null?A.extend(T,f):f}},B={};return A.each(i,function(T,w){var K=w[2],$=w[5];f[w[1]]=K.add,$&&K.add(function(){u=$},i[3-T][2].disable,i[3-T][3].disable,i[0][2].lock,i[0][3].lock),K.add(w[3].fire),B[w[0]]=function(){return B[w[0]+"With"](this===B?void 0:this,arguments),this},B[w[0]+"With"]=K.fireWith}),f.promise(B),z&&z.call(B,B),B},when:function(z){var i=arguments.length,u=i,f=Array(u),B=p.call(arguments),T=A.Deferred(),w=function(K){return function($){f[K]=this,B[K]=arguments.length>1?p.call(arguments):$,--i||T.resolveWith(f,B)}};if(i<=1&&(n0(z,T.done(w(u)).resolve,T.reject,!i),T.state()==="pending"||m(B[u]&&B[u].then)))return T.then();for(;u--;)n0(B[u],w(u),T.reject);return T.promise()}});var p0=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(z,i){t.console&&t.console.warn&&z&&p0.test(z.name)&&t.console.warn("jQuery.Deferred exception: "+z.message,z.stack,i)},A.readyException=function(z){t.setTimeout(function(){throw z})};var W0=A.Deferred();A.fn.ready=function(z){return W0.then(z).catch(function(i){A.readyException(i)}),this},A.extend({isReady:!1,readyWait:1,ready:function(z){(z===!0?--A.readyWait:A.isReady)||(A.isReady=!0,!(z!==!0&&--A.readyWait>0)&&W0.resolveWith(R,[A]))}}),A.ready.then=W0.then;function E0(){R.removeEventListener("DOMContentLoaded",E0),t.removeEventListener("load",E0),A.ready()}R.readyState==="complete"||R.readyState!=="loading"&&!R.documentElement.doScroll?t.setTimeout(A.ready):(R.addEventListener("DOMContentLoaded",E0),t.addEventListener("load",E0));var _0=function(z,i,u,f,B,T,w){var K=0,$=z.length,e0=u==null;if(N(u)==="object"){B=!0;for(K in u)_0(z,i,K,u[K],!0,T,w)}else if(f!==void 0&&(B=!0,m(f)||(w=!0),e0&&(w?(i.call(z,f),i=null):(e0=i,i=function(l0,L0,O0){return e0.call(A(l0),O0)})),i))for(;K<$;K++)i(z[K],u,w?f:f.call(z[K],K,i(z[K],u)));return B?z:e0?i.call(z):$?i(z[0],u):T},n1=/^-ms-/,b1=/-([a-z])/g;function h0(z,i){return i.toUpperCase()}function j0(z){return z.replace(n1,"ms-").replace(b1,h0)}var Y0=function(z){return z.nodeType===1||z.nodeType===9||!+z.nodeType};function r1(){this.expando=A.expando+r1.uid++}r1.uid=1,r1.prototype={cache:function(z){var i=z[this.expando];return i||(i={},Y0(z)&&(z.nodeType?z[this.expando]=i:Object.defineProperty(z,this.expando,{value:i,configurable:!0}))),i},set:function(z,i,u){var f,B=this.cache(z);if(typeof i=="string")B[j0(i)]=u;else for(f in i)B[j0(f)]=i[f];return B},get:function(z,i){return i===void 0?this.cache(z):z[this.expando]&&z[this.expando][j0(i)]},access:function(z,i,u){return i===void 0||i&&typeof i=="string"&&u===void 0?this.get(z,i):(this.set(z,i,u),u!==void 0?u:i)},remove:function(z,i){var u,f=z[this.expando];if(f!==void 0){if(i!==void 0)for(Array.isArray(i)?i=i.map(j0):(i=j0(i),i=i in f?[i]:i.match(v0)||[]),u=i.length;u--;)delete f[i[u]];(i===void 0||A.isEmptyObject(f))&&(z.nodeType?z[this.expando]=void 0:delete z[this.expando])}},hasData:function(z){var i=z[this.expando];return i!==void 0&&!A.isEmptyObject(i)}};var x0=new r1,a1=new r1,X1=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,$1=/[A-Z]/g;function U1(z){return z==="true"?!0:z==="false"?!1:z==="null"?null:z===+z+""?+z:X1.test(z)?JSON.parse(z):z}function P1(z,i,u){var f;if(u===void 0&&z.nodeType===1)if(f="data-"+i.replace($1,"-$&").toLowerCase(),u=z.getAttribute(f),typeof u=="string"){try{u=U1(u)}catch{}a1.set(z,i,u)}else u=void 0;return u}A.extend({hasData:function(z){return a1.hasData(z)||x0.hasData(z)},data:function(z,i,u){return a1.access(z,i,u)},removeData:function(z,i){a1.remove(z,i)},_data:function(z,i,u){return x0.access(z,i,u)},_removeData:function(z,i){x0.remove(z,i)}}),A.fn.extend({data:function(z,i){var u,f,B,T=this[0],w=T&&T.attributes;if(z===void 0){if(this.length&&(B=a1.get(T),T.nodeType===1&&!x0.get(T,"hasDataAttrs"))){for(u=w.length;u--;)w[u]&&(f=w[u].name,f.indexOf("data-")===0&&(f=j0(f.slice(5)),P1(T,f,B[f])));x0.set(T,"hasDataAttrs",!0)}return B}return typeof z=="object"?this.each(function(){a1.set(this,z)}):_0(this,function(K){var $;if(T&&K===void 0)return $=a1.get(T,z),$!==void 0||($=P1(T,z),$!==void 0)?$:void 0;this.each(function(){a1.set(this,z,K)})},null,i,arguments.length>1,null,!0)},removeData:function(z){return this.each(function(){a1.remove(this,z)})}}),A.extend({queue:function(z,i,u){var f;if(z)return i=(i||"fx")+"queue",f=x0.get(z,i),u&&(!f||Array.isArray(u)?f=x0.access(z,i,A.makeArray(u)):f.push(u)),f||[]},dequeue:function(z,i){i=i||"fx";var u=A.queue(z,i),f=u.length,B=u.shift(),T=A._queueHooks(z,i),w=function(){A.dequeue(z,i)};B==="inprogress"&&(B=u.shift(),f--),B&&(i==="fx"&&u.unshift("inprogress"),delete T.stop,B.call(z,w,T)),!f&&T&&T.empty.fire()},_queueHooks:function(z,i){var u=i+"queueHooks";return x0.get(z,u)||x0.access(z,u,{empty:A.Callbacks("once memory").add(function(){x0.remove(z,[i+"queue",u])})})}}),A.fn.extend({queue:function(z,i){var u=2;return typeof z!="string"&&(i=z,z="fx",u--),arguments.length\x20\t\r\n\f]*)/i,M0=/^$|^module$|\/(?:java|ecma)script/i;(function(){var z=R.createDocumentFragment(),i=z.appendChild(R.createElement("div")),u=R.createElement("input");u.setAttribute("type","radio"),u.setAttribute("checked","checked"),u.setAttribute("name","t"),i.appendChild(u),d.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,i.innerHTML="",d.noCloneChecked=!!i.cloneNode(!0).lastChild.defaultValue,i.innerHTML="",d.option=!!i.lastChild})();var J={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};J.tbody=J.tfoot=J.colgroup=J.caption=J.thead,J.th=J.td,d.option||(J.optgroup=J.option=[1,""]);function U(z,i){var u;return typeof z.getElementsByTagName<"u"?u=z.getElementsByTagName(i||"*"):typeof z.querySelectorAll<"u"?u=z.querySelectorAll(i||"*"):u=[],i===void 0||i&&v(z,i)?A.merge([z],u):u}function c0(z,i){for(var u=0,f=z.length;u-1){B&&B.push(T);continue}if(e0=F1(T),w=U(L0.appendChild(T),"script"),e0&&c0(w),u)for(l0=0;T=w[l0++];)M0.test(T.type||"")&&u.push(T)}return L0}var B0=/^([^.]*)(?:\.(.+)|)/;function V0(){return!0}function T0(){return!1}function P0(z,i,u,f,B,T){var w,K;if(typeof i=="object"){typeof u!="string"&&(f=f||u,u=void 0);for(K in i)P0(z,K,u,f,i[K],T);return z}if(f==null&&B==null?(B=u,f=u=void 0):B==null&&(typeof u=="string"?(B=f,f=void 0):(B=f,f=u,u=void 0)),B===!1)B=T0;else if(!B)return z;return T===1&&(w=B,B=function($){return A().off($),w.apply(this,arguments)},B.guid=w.guid||(w.guid=A.guid++)),z.each(function(){A.event.add(this,i,B,f,u)})}A.event={global:{},add:function(z,i,u,f,B){var T,w,K,$,e0,l0,L0,O0,C0,O1,h1,A1=x0.get(z);if(Y0(z))for(u.handler&&(T=u,u=T.handler,B=T.selector),B&&A.find.matchesSelector(N1,B),u.guid||(u.guid=A.guid++),($=A1.events)||($=A1.events=Object.create(null)),(w=A1.handle)||(w=A1.handle=function(K1){return typeof A<"u"&&A.event.triggered!==K1.type?A.event.dispatch.apply(z,arguments):void 0}),i=(i||"").match(v0)||[""],e0=i.length;e0--;)K=B0.exec(i[e0])||[],C0=h1=K[1],O1=(K[2]||"").split(".").sort(),C0&&(L0=A.event.special[C0]||{},C0=(B?L0.delegateType:L0.bindType)||C0,L0=A.event.special[C0]||{},l0=A.extend({type:C0,origType:h1,data:f,handler:u,guid:u.guid,selector:B,needsContext:B&&A.expr.match.needsContext.test(B),namespace:O1.join(".")},T),(O0=$[C0])||(O0=$[C0]=[],O0.delegateCount=0,(!L0.setup||L0.setup.call(z,f,O1,w)===!1)&&z.addEventListener&&z.addEventListener(C0,w)),L0.add&&(L0.add.call(z,l0),l0.handler.guid||(l0.handler.guid=u.guid)),B?O0.splice(O0.delegateCount++,0,l0):O0.push(l0),A.event.global[C0]=!0)},remove:function(z,i,u,f,B){var T,w,K,$,e0,l0,L0,O0,C0,O1,h1,A1=x0.hasData(z)&&x0.get(z);if(!(!A1||!($=A1.events))){for(i=(i||"").match(v0)||[""],e0=i.length;e0--;){if(K=B0.exec(i[e0])||[],C0=h1=K[1],O1=(K[2]||"").split(".").sort(),!C0){for(C0 in $)A.event.remove(z,C0+i[e0],u,f,!0);continue}for(L0=A.event.special[C0]||{},C0=(f?L0.delegateType:L0.bindType)||C0,O0=$[C0]||[],K=K[2]&&new RegExp("(^|\\.)"+O1.join("\\.(?:.*\\.|)")+"(\\.|$)"),w=T=O0.length;T--;)l0=O0[T],(B||h1===l0.origType)&&(!u||u.guid===l0.guid)&&(!K||K.test(l0.namespace))&&(!f||f===l0.selector||f==="**"&&l0.selector)&&(O0.splice(T,1),l0.selector&&O0.delegateCount--,L0.remove&&L0.remove.call(z,l0));w&&!O0.length&&((!L0.teardown||L0.teardown.call(z,O1,A1.handle)===!1)&&A.removeEvent(z,C0,A1.handle),delete $[C0])}A.isEmptyObject($)&&x0.remove(z,"handle events")}},dispatch:function(z){var i,u,f,B,T,w,K=new Array(arguments.length),$=A.event.fix(z),e0=(x0.get(this,"events")||Object.create(null))[$.type]||[],l0=A.event.special[$.type]||{};for(K[0]=$,i=1;i=1)){for(;e0!==this;e0=e0.parentNode||this)if(e0.nodeType===1&&!(z.type==="click"&&e0.disabled===!0)){for(T=[],w={},u=0;u<$;u++)f=i[u],B=f.selector+" ",w[B]===void 0&&(w[B]=f.needsContext?A(B,this).index(e0)>-1:A.find(B,this,null,[e0]).length),w[B]&&T.push(f);T.length&&K.push({elem:e0,handlers:T})}}return e0=this,$\s*$/g;function I0(z,i){return v(z,"table")&&v(i.nodeType!==11?i:i.firstChild,"tr")&&A(z).children("tbody")[0]||z}function U0(z){return z.type=(z.getAttribute("type")!==null)+"/"+z.type,z}function W1(z){return(z.type||"").slice(0,5)==="true/"?z.type=z.type.slice(5):z.removeAttribute("type"),z}function G1(z,i){var u,f,B,T,w,K,$;if(i.nodeType===1){if(x0.hasData(z)&&(T=x0.get(z),$=T.events,$)){x0.remove(i,"handle events");for(B in $)for(u=0,f=$[B].length;u1&&typeof C0=="string"&&!d.checkClone&&D0.test(C0))return z.each(function(h1){var A1=z.eq(h1);O1&&(i[0]=C0.call(this,h1,A1.html())),V1(A1,i,u,f)});if(L0&&(B=u0(i,z[0].ownerDocument,!1,z,f),T=B.firstChild,B.childNodes.length===1&&(B=T),T||f)){for(w=A.map(U(B,"script"),U0),K=w.length;l00&&c0(w,!$&&U(z,"script")),K},cleanData:function(z){for(var i,u,f,B=A.event.special,T=0;(u=z[T])!==void 0;T++)if(Y0(u)){if(i=u[x0.expando]){if(i.events)for(f in i.events)B[f]?A.event.remove(u,f):A.removeEvent(u,f,i.handle);u[x0.expando]=void 0}u[a1.expando]&&(u[a1.expando]=void 0)}}}),A.fn.extend({detach:function(z){return M2(this,z,!0)},remove:function(z){return M2(this,z)},text:function(z){return _0(this,function(i){return i===void 0?A.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=i)})},null,z,arguments.length)},append:function(){return V1(this,arguments,function(z){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var i=I0(this,z);i.appendChild(z)}})},prepend:function(){return V1(this,arguments,function(z){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var i=I0(this,z);i.insertBefore(z,i.firstChild)}})},before:function(){return V1(this,arguments,function(z){this.parentNode&&this.parentNode.insertBefore(z,this)})},after:function(){return V1(this,arguments,function(z){this.parentNode&&this.parentNode.insertBefore(z,this.nextSibling)})},empty:function(){for(var z,i=0;(z=this[i])!=null;i++)z.nodeType===1&&(A.cleanData(U(z,!1)),z.textContent="");return this},clone:function(z,i){return z=z??!1,i=i??z,this.map(function(){return A.clone(this,z,i)})},html:function(z){return _0(this,function(i){var u=this[0]||{},f=0,B=this.length;if(i===void 0&&u.nodeType===1)return u.innerHTML;if(typeof i=="string"&&!e1.test(i)&&!J[(G.exec(i)||["",""])[1].toLowerCase()]){i=A.htmlPrefilter(i);try{for(;f=0&&($+=Math.max(0,Math.ceil(z["offset"+i[0].toUpperCase()+i.slice(1)]-T-$-K-.5))||0),$+e0}function kp(z,i,u){var f=Bt(z),B=!d.boxSizingReliable()||u,T=B&&A.css(z,"boxSizing",!1,f)==="border-box",w=T,K=Qe(z,i,f),$="offset"+i[0].toUpperCase()+i.slice(1);if(te.test(K)){if(!u)return K;K="auto"}return(!d.boxSizingReliable()&&T||!d.reliableTrDimensions()&&v(z,"tr")||K==="auto"||!parseFloat(K)&&A.css(z,"display",!1,f)==="inline")&&z.getClientRects().length&&(T=A.css(z,"boxSizing",!1,f)==="border-box",w=$ in z,w&&(K=z[$])),K=parseFloat(K)||0,K+wM(z,i,u||(T?"border":"content"),w,f,K)+"px"}A.extend({cssHooks:{opacity:{get:function(z,i){if(i){var u=Qe(z,"opacity");return u===""?"1":u}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(z,i,u,f){if(!(!z||z.nodeType===3||z.nodeType===8||!z.style)){var B,T,w,K=j0(i),$=xM.test(i),e0=z.style;if($||(i=XM(K)),w=A.cssHooks[i]||A.cssHooks[K],u!==void 0){if(T=typeof u,T==="string"&&(B=T1.exec(u))&&B[1]&&(u=N2(z,i,B),T="number"),u==null||u!==u)return;T==="number"&&!$&&(u+=B&&B[3]||(A.cssNumber[K]?"":"px")),!d.clearCloneStyle&&u===""&&i.indexOf("background")===0&&(e0[i]="inherit"),(!w||!("set"in w)||(u=w.set(z,u,f))!==void 0)&&($?e0.setProperty(i,u):e0[i]=u)}else return w&&"get"in w&&(B=w.get(z,!1,f))!==void 0?B:e0[i]}},css:function(z,i,u,f){var B,T,w,K=j0(i),$=xM.test(i);return $||(i=XM(K)),w=A.cssHooks[i]||A.cssHooks[K],w&&"get"in w&&(B=w.get(z,!0,u)),B===void 0&&(B=Qe(z,i,f)),B==="normal"&&i in Cp&&(B=Cp[i]),u===""||u?(T=parseFloat(B),u===!0||isFinite(T)?T||0:B):B}}),A.each(["height","width"],function(z,i){A.cssHooks[i]={get:function(u,f,B){if(f)return oi.test(A.css(u,"display"))&&(!u.getClientRects().length||!u.getBoundingClientRect().width)?Tp(u,pi,function(){return kp(u,i,B)}):kp(u,i,B)},set:function(u,f,B){var T,w=Bt(u),K=!d.scrollboxSize()&&w.position==="absolute",$=K||B,e0=$&&A.css(u,"boxSizing",!1,w)==="border-box",l0=B?wM(u,i,B,e0,w):0;return e0&&K&&(l0-=Math.ceil(u["offset"+i[0].toUpperCase()+i.slice(1)]-parseFloat(w[i])-wM(u,i,"border",!1,w)-.5)),l0&&(T=T1.exec(f))&&(T[3]||"px")!=="px"&&(u.style[i]=f,f=A.css(u,i)),Ep(u,f,l0)}}}),A.cssHooks.marginLeft=Sp(d.reliableMarginLeft,function(z,i){if(i)return(parseFloat(Qe(z,"marginLeft"))||z.getBoundingClientRect().left-Tp(z,{marginLeft:0},function(){return z.getBoundingClientRect().left}))+"px"}),A.each({margin:"",padding:"",border:"Width"},function(z,i){A.cssHooks[z+i]={expand:function(u){for(var f=0,B={},T=typeof u=="string"?u.split(" "):[u];f<4;f++)B[z+w1[f]+i]=T[f]||T[f-2]||T[0];return B}},z!=="margin"&&(A.cssHooks[z+i].set=Ep)}),A.fn.extend({css:function(z,i){return _0(this,function(u,f,B){var T,w,K={},$=0;if(Array.isArray(f)){for(T=Bt(u),w=f.length;$1)}});function c2(z,i,u,f,B){return new c2.prototype.init(z,i,u,f,B)}A.Tween=c2,c2.prototype={constructor:c2,init:function(z,i,u,f,B,T){this.elem=z,this.prop=u,this.easing=B||A.easing._default,this.options=i,this.start=this.now=this.cur(),this.end=f,this.unit=T||(A.cssNumber[u]?"":"px")},cur:function(){var z=c2.propHooks[this.prop];return z&&z.get?z.get(this):c2.propHooks._default.get(this)},run:function(z){var i,u=c2.propHooks[this.prop];return this.options.duration?this.pos=i=A.easing[this.easing](z,this.options.duration*z,0,1,this.options.duration):this.pos=i=z,this.now=(this.end-this.start)*i+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),u&&u.set?u.set(this):c2.propHooks._default.set(this),this}},c2.prototype.init.prototype=c2.prototype,c2.propHooks={_default:{get:function(z){var i;return z.elem.nodeType!==1||z.elem[z.prop]!=null&&z.elem.style[z.prop]==null?z.elem[z.prop]:(i=A.css(z.elem,z.prop,""),!i||i==="auto"?0:i)},set:function(z){A.fx.step[z.prop]?A.fx.step[z.prop](z):z.elem.nodeType===1&&(A.cssHooks[z.prop]||z.elem.style[XM(z.prop)]!=null)?A.style(z.elem,z.prop,z.now+z.unit):z.elem[z.prop]=z.now}}},c2.propHooks.scrollTop=c2.propHooks.scrollLeft={set:function(z){z.elem.nodeType&&z.elem.parentNode&&(z.elem[z.prop]=z.now)}},A.easing={linear:function(z){return z},swing:function(z){return .5-Math.cos(z*Math.PI)/2},_default:"swing"},A.fx=c2.prototype.init,A.fx.step={};var he,yt,zi=/^(?:toggle|show|hide)$/,ni=/queueHooks$/;function CM(){yt&&(R.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(CM):t.setTimeout(CM,A.fx.interval),A.fx.tick())}function _p(){return t.setTimeout(function(){he=void 0}),he=Date.now()}function Tt(z,i){var u,f=0,B={height:z};for(i=i?1:0;f<4;f+=2-i)u=w1[f],B["margin"+u]=B["padding"+u]=z;return i&&(B.opacity=B.width=z),B}function Ip(z,i,u){for(var f,B=(g2.tweeners[i]||[]).concat(g2.tweeners["*"]),T=0,w=B.length;T1)},removeAttr:function(z){return this.each(function(){A.removeAttr(this,z)})}}),A.extend({attr:function(z,i,u){var f,B,T=z.nodeType;if(!(T===3||T===8||T===2)){if(typeof z.getAttribute>"u")return A.prop(z,i,u);if((T!==1||!A.isXMLDoc(z))&&(B=A.attrHooks[i.toLowerCase()]||(A.expr.match.bool.test(i)?Dp:void 0)),u!==void 0){if(u===null){A.removeAttr(z,i);return}return B&&"set"in B&&(f=B.set(z,u,i))!==void 0?f:(z.setAttribute(i,u+""),u)}return B&&"get"in B&&(f=B.get(z,i))!==null?f:(f=A.find.attr(z,i),f??void 0)}},attrHooks:{type:{set:function(z,i){if(!d.radioValue&&i==="radio"&&v(z,"input")){var u=z.value;return z.setAttribute("type",i),u&&(z.value=u),i}}}},removeAttr:function(z,i){var u,f=0,B=i&&i.match(v0);if(B&&z.nodeType===1)for(;u=B[f++];)z.removeAttribute(u)}}),Dp={set:function(z,i,u){return i===!1?A.removeAttr(z,u):z.setAttribute(u,u),u}},A.each(A.expr.match.bool.source.match(/\w+/g),function(z,i){var u=Je[i]||A.find.attr;Je[i]=function(f,B,T){var w,K,$=B.toLowerCase();return T||(K=Je[$],Je[$]=w,w=u(f,B,T)!=null?$:null,Je[$]=K),w}});var Oi=/^(?:input|select|textarea|button)$/i,ii=/^(?:a|area)$/i;A.fn.extend({prop:function(z,i){return _0(this,A.prop,z,i,arguments.length>1)},removeProp:function(z){return this.each(function(){delete this[A.propFix[z]||z]})}}),A.extend({prop:function(z,i,u){var f,B,T=z.nodeType;if(!(T===3||T===8||T===2))return(T!==1||!A.isXMLDoc(z))&&(i=A.propFix[i]||i,B=A.propHooks[i]),u!==void 0?B&&"set"in B&&(f=B.set(z,u,i))!==void 0?f:z[i]=u:B&&"get"in B&&(f=B.get(z,i))!==null?f:z[i]},propHooks:{tabIndex:{get:function(z){var i=A.find.attr(z,"tabindex");return i?parseInt(i,10):Oi.test(z.nodeName)||ii.test(z.nodeName)&&z.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),d.optSelected||(A.propHooks.selected={get:function(z){var i=z.parentNode;return i&&i.parentNode&&i.parentNode.selectedIndex,null},set:function(z){var i=z.parentNode;i&&(i.selectedIndex,i.parentNode&&i.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){A.propFix[this.toLowerCase()]=this});function Me(z){var i=z.match(v0)||[];return i.join(" ")}function be(z){return z.getAttribute&&z.getAttribute("class")||""}function EM(z){return Array.isArray(z)?z:typeof z=="string"?z.match(v0)||[]:[]}A.fn.extend({addClass:function(z){var i,u,f,B,T,w;return m(z)?this.each(function(K){A(this).addClass(z.call(this,K,be(this)))}):(i=EM(z),i.length?this.each(function(){if(f=be(this),u=this.nodeType===1&&" "+Me(f)+" ",u){for(T=0;T-1;)u=u.replace(" "+B+" "," ");w=Me(u),f!==w&&this.setAttribute("class",w)}}):this):this.attr("class","")},toggleClass:function(z,i){var u,f,B,T,w=typeof z,K=w==="string"||Array.isArray(z);return m(z)?this.each(function($){A(this).toggleClass(z.call(this,$,be(this),i),i)}):typeof i=="boolean"&&K?i?this.addClass(z):this.removeClass(z):(u=EM(z),this.each(function(){if(K)for(T=A(this),B=0;B-1)return!0;return!1}});var ai=/\r/g;A.fn.extend({val:function(z){var i,u,f,B=this[0];return arguments.length?(f=m(z),this.each(function(T){var w;this.nodeType===1&&(f?w=z.call(this,T,A(this).val()):w=z,w==null?w="":typeof w=="number"?w+="":Array.isArray(w)&&(w=A.map(w,function(K){return K==null?"":K+""})),i=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()],(!i||!("set"in i)||i.set(this,w,"value")===void 0)&&(this.value=w))})):B?(i=A.valHooks[B.type]||A.valHooks[B.nodeName.toLowerCase()],i&&"get"in i&&(u=i.get(B,"value"))!==void 0?u:(u=B.value,typeof u=="string"?u.replace(ai,""):u??"")):void 0}}),A.extend({valHooks:{option:{get:function(z){var i=A.find.attr(z,"value");return i??Me(A.text(z))}},select:{get:function(z){var i,u,f,B=z.options,T=z.selectedIndex,w=z.type==="select-one",K=w?null:[],$=w?T+1:B.length;for(T<0?f=$:f=w?T:0;f<$;f++)if(u=B[f],(u.selected||f===T)&&!u.disabled&&(!u.parentNode.disabled||!v(u.parentNode,"optgroup"))){if(i=A(u).val(),w)return i;K.push(i)}return K},set:function(z,i){for(var u,f,B=z.options,T=A.makeArray(i),w=B.length;w--;)f=B[w],(f.selected=A.inArray(A.valHooks.option.get(f),T)>-1)&&(u=!0);return u||(z.selectedIndex=-1),T}}}}),A.each(["radio","checkbox"],function(){A.valHooks[this]={set:function(z,i){if(Array.isArray(i))return z.checked=A.inArray(A(z).val(),i)>-1}},d.checkOn||(A.valHooks[this].get=function(z){return z.getAttribute("value")===null?"on":z.value})});var Ye=t.location,Pp={guid:Date.now()},kM=/\?/;A.parseXML=function(z){var i,u;if(!z||typeof z!="string")return null;try{i=new t.DOMParser().parseFromString(z,"text/xml")}catch{}return u=i&&i.getElementsByTagName("parsererror")[0],(!i||u)&&A.error("Invalid XML: "+(u?A.map(u.childNodes,function(f){return f.textContent}).join(` -`):z)),i};var Hp=/^(?:focusinfocus|focusoutblur)$/,jp=function(z){z.stopPropagation()};A.extend(A.event,{trigger:function(z,i,u,f){var B,T,w,K,$,e0,l0,L0,O0=[u||R],C0=l.call(z,"type")?z.type:z,O1=l.call(z,"namespace")?z.namespace.split("."):[];if(T=L0=w=u=u||R,!(u.nodeType===3||u.nodeType===8)&&!Hp.test(C0+A.event.triggered)&&(C0.indexOf(".")>-1&&(O1=C0.split("."),C0=O1.shift(),O1.sort()),$=C0.indexOf(":")<0&&"on"+C0,z=z[A.expando]?z:new A.Event(C0,typeof z=="object"&&z),z.isTrigger=f?2:3,z.namespace=O1.join("."),z.rnamespace=z.namespace?new RegExp("(^|\\.)"+O1.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,z.result=void 0,z.target||(z.target=u),i=i==null?[z]:A.makeArray(i,[z]),l0=A.event.special[C0]||{},!(!f&&l0.trigger&&l0.trigger.apply(u,i)===!1))){if(!f&&!l0.noBubble&&!L(u)){for(K=l0.delegateType||C0,Hp.test(K+C0)||(T=T.parentNode);T;T=T.parentNode)O0.push(T),w=T;w===(u.ownerDocument||R)&&O0.push(w.defaultView||w.parentWindow||t)}for(B=0;(T=O0[B++])&&!z.isPropagationStopped();)L0=T,z.type=B>1?K:l0.bindType||C0,e0=(x0.get(T,"events")||Object.create(null))[z.type]&&x0.get(T,"handle"),e0&&e0.apply(T,i),e0=$&&T[$],e0&&e0.apply&&Y0(T)&&(z.result=e0.apply(T,i),z.result===!1&&z.preventDefault());return z.type=C0,!f&&!z.isDefaultPrevented()&&(!l0._default||l0._default.apply(O0.pop(),i)===!1)&&Y0(u)&&$&&m(u[C0])&&!L(u)&&(w=u[$],w&&(u[$]=null),A.event.triggered=C0,z.isPropagationStopped()&&L0.addEventListener(C0,jp),u[C0](),z.isPropagationStopped()&&L0.removeEventListener(C0,jp),A.event.triggered=void 0,w&&(u[$]=w)),z.result}},simulate:function(z,i,u){var f=A.extend(new A.Event,u,{type:z,isSimulated:!0});A.event.trigger(f,null,i)}}),A.fn.extend({trigger:function(z,i){return this.each(function(){A.event.trigger(z,i,this)})},triggerHandler:function(z,i){var u=this[0];if(u)return A.event.trigger(z,i,u,!0)}});var si=/\[\]$/,Fp=/\r?\n/g,Ai=/^(?:submit|button|image|reset|file)$/i,li=/^(?:input|select|textarea|keygen)/i;function _M(z,i,u,f){var B;if(Array.isArray(i))A.each(i,function(T,w){u||si.test(z)?f(z,w):_M(z+"["+(typeof w=="object"&&w!=null?T:"")+"]",w,u,f)});else if(!u&&N(i)==="object")for(B in i)_M(z+"["+B+"]",i[B],u,f);else f(z,i)}A.param=function(z,i){var u,f=[],B=function(T,w){var K=m(w)?w():w;f[f.length]=encodeURIComponent(T)+"="+encodeURIComponent(K??"")};if(z==null)return"";if(Array.isArray(z)||z.jquery&&!A.isPlainObject(z))A.each(z,function(){B(this.name,this.value)});else for(u in z)_M(u,z[u],i,B);return f.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var z=A.prop(this,"elements");return z?A.makeArray(z):this}).filter(function(){var z=this.type;return this.name&&!A(this).is(":disabled")&&li.test(this.nodeName)&&!Ai.test(z)&&(this.checked||!H.test(z))}).map(function(z,i){var u=A(this).val();return u==null?null:Array.isArray(u)?A.map(u,function(f){return{name:i.name,value:f.replace(Fp,`\r -`)}}):{name:i.name,value:u.replace(Fp,`\r -`)}}).get()}});var di=/%20/g,ui=/#.*$/,qi=/([?&])_=[^&]*/,fi=/^(.*?):[ \t]*([^\r\n]*)$/mg,Wi=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,hi=/^(?:GET|HEAD)$/,gi=/^\/\//,Vp={},IM={},$p="*/".concat("*"),DM=R.createElement("a");DM.href=Ye.href;function Up(z){return function(i,u){typeof i!="string"&&(u=i,i="*");var f,B=0,T=i.toLowerCase().match(v0)||[];if(m(u))for(;f=T[B++];)f[0]==="+"?(f=f.slice(1)||"*",(z[f]=z[f]||[]).unshift(u)):(z[f]=z[f]||[]).push(u)}}function Gp(z,i,u,f){var B={},T=z===IM;function w(K){var $;return B[K]=!0,A.each(z[K]||[],function(e0,l0){var L0=l0(i,u,f);if(typeof L0=="string"&&!T&&!B[L0])return i.dataTypes.unshift(L0),w(L0),!1;if(T)return!($=L0)}),$}return w(i.dataTypes[0])||!B["*"]&&w("*")}function PM(z,i){var u,f,B=A.ajaxSettings.flatOptions||{};for(u in i)i[u]!==void 0&&((B[u]?z:f||(f={}))[u]=i[u]);return f&&A.extend(!0,z,f),z}function Ri(z,i,u){for(var f,B,T,w,K=z.contents,$=z.dataTypes;$[0]==="*";)$.shift(),f===void 0&&(f=z.mimeType||i.getResponseHeader("Content-Type"));if(f){for(B in K)if(K[B]&&K[B].test(f)){$.unshift(B);break}}if($[0]in u)T=$[0];else{for(B in u){if(!$[0]||z.converters[B+" "+$[0]]){T=B;break}w||(w=B)}T=T||w}if(T)return T!==$[0]&&$.unshift(T),u[T]}function mi(z,i,u,f){var B,T,w,K,$,e0={},l0=z.dataTypes.slice();if(l0[1])for(w in z.converters)e0[w.toLowerCase()]=z.converters[w];for(T=l0.shift();T;)if(z.responseFields[T]&&(u[z.responseFields[T]]=i),!$&&f&&z.dataFilter&&(i=z.dataFilter(i,z.dataType)),$=T,T=l0.shift(),T){if(T==="*")T=$;else if($!=="*"&&$!==T){if(w=e0[$+" "+T]||e0["* "+T],!w){for(B in e0)if(K=B.split(" "),K[1]===T&&(w=e0[$+" "+K[0]]||e0["* "+K[0]],w)){w===!0?w=e0[B]:e0[B]!==!0&&(T=K[0],l0.unshift(K[1]));break}}if(w!==!0)if(w&&z.throws)i=w(i);else try{i=w(i)}catch(L0){return{state:"parsererror",error:w?L0:"No conversion from "+$+" to "+T}}}}return{state:"success",data:i}}A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ye.href,type:"GET",isLocal:Wi.test(Ye.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$p,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(z,i){return i?PM(PM(z,A.ajaxSettings),i):PM(A.ajaxSettings,z)},ajaxPrefilter:Up(Vp),ajaxTransport:Up(IM),ajax:function(z,i){typeof z=="object"&&(i=z,z=void 0),i=i||{};var u,f,B,T,w,K,$,e0,l0,L0,O0=A.ajaxSetup({},i),C0=O0.context||O0,O1=O0.context&&(C0.nodeType||C0.jquery)?A(C0):A.event,h1=A.Deferred(),A1=A.Callbacks("once memory"),K1=O0.statusCode||{},j1={},v2={},B2="canceled",u1={readyState:0,getResponseHeader:function(g1){var C1;if($){if(!T)for(T={};C1=fi.exec(B);)T[C1[1].toLowerCase()+" "]=(T[C1[1].toLowerCase()+" "]||[]).concat(C1[2]);C1=T[g1.toLowerCase()+" "]}return C1==null?null:C1.join(", ")},getAllResponseHeaders:function(){return $?B:null},setRequestHeader:function(g1,C1){return $==null&&(g1=v2[g1.toLowerCase()]=v2[g1.toLowerCase()]||g1,j1[g1]=C1),this},overrideMimeType:function(g1){return $==null&&(O0.mimeType=g1),this},statusCode:function(g1){var C1;if(g1)if($)u1.always(g1[u1.status]);else for(C1 in g1)K1[C1]=[K1[C1],g1[C1]];return this},abort:function(g1){var C1=g1||B2;return u&&u.abort(C1),oe(0,C1),this}};if(h1.promise(u1),O0.url=((z||O0.url||Ye.href)+"").replace(gi,Ye.protocol+"//"),O0.type=i.method||i.type||O0.method||O0.type,O0.dataTypes=(O0.dataType||"*").toLowerCase().match(v0)||[""],O0.crossDomain==null){K=R.createElement("a");try{K.href=O0.url,K.href=K.href,O0.crossDomain=DM.protocol+"//"+DM.host!=K.protocol+"//"+K.host}catch{O0.crossDomain=!0}}if(O0.data&&O0.processData&&typeof O0.data!="string"&&(O0.data=A.param(O0.data,O0.traditional)),Gp(Vp,O0,i,u1),$)return u1;e0=A.event&&O0.global,e0&&A.active++===0&&A.event.trigger("ajaxStart"),O0.type=O0.type.toUpperCase(),O0.hasContent=!hi.test(O0.type),f=O0.url.replace(ui,""),O0.hasContent?O0.data&&O0.processData&&(O0.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(O0.data=O0.data.replace(di,"+")):(L0=O0.url.slice(f.length),O0.data&&(O0.processData||typeof O0.data=="string")&&(f+=(kM.test(f)?"&":"?")+O0.data,delete O0.data),O0.cache===!1&&(f=f.replace(qi,"$1"),L0=(kM.test(f)?"&":"?")+"_="+Pp.guid+++L0),O0.url=f+L0),O0.ifModified&&(A.lastModified[f]&&u1.setRequestHeader("If-Modified-Since",A.lastModified[f]),A.etag[f]&&u1.setRequestHeader("If-None-Match",A.etag[f])),(O0.data&&O0.hasContent&&O0.contentType!==!1||i.contentType)&&u1.setRequestHeader("Content-Type",O0.contentType),u1.setRequestHeader("Accept",O0.dataTypes[0]&&O0.accepts[O0.dataTypes[0]]?O0.accepts[O0.dataTypes[0]]+(O0.dataTypes[0]!=="*"?", "+$p+"; q=0.01":""):O0.accepts["*"]);for(l0 in O0.headers)u1.setRequestHeader(l0,O0.headers[l0]);if(O0.beforeSend&&(O0.beforeSend.call(C0,u1,O0)===!1||$))return u1.abort();if(B2="abort",A1.add(O0.complete),u1.done(O0.success),u1.fail(O0.error),u=Gp(IM,O0,i,u1),!u)oe(-1,"No Transport");else{if(u1.readyState=1,e0&&O1.trigger("ajaxSend",[u1,O0]),$)return u1;O0.async&&O0.timeout>0&&(w=t.setTimeout(function(){u1.abort("timeout")},O0.timeout));try{$=!1,u.send(j1,oe)}catch(g1){if($)throw g1;oe(-1,g1)}}function oe(g1,C1,et,jM){var y2,tt,T2,U2,G2,l2=C1;$||($=!0,w&&t.clearTimeout(w),u=void 0,B=jM||"",u1.readyState=g1>0?4:0,y2=g1>=200&&g1<300||g1===304,et&&(U2=Ri(O0,u1,et)),!y2&&A.inArray("script",O0.dataTypes)>-1&&A.inArray("json",O0.dataTypes)<0&&(O0.converters["text script"]=function(){}),U2=mi(O0,U2,u1,y2),y2?(O0.ifModified&&(G2=u1.getResponseHeader("Last-Modified"),G2&&(A.lastModified[f]=G2),G2=u1.getResponseHeader("etag"),G2&&(A.etag[f]=G2)),g1===204||O0.type==="HEAD"?l2="nocontent":g1===304?l2="notmodified":(l2=U2.state,tt=U2.data,T2=U2.error,y2=!T2)):(T2=l2,(g1||!l2)&&(l2="error",g1<0&&(g1=0))),u1.status=g1,u1.statusText=(C1||l2)+"",y2?h1.resolveWith(C0,[tt,l2,u1]):h1.rejectWith(C0,[u1,l2,T2]),u1.statusCode(K1),K1=void 0,e0&&O1.trigger(y2?"ajaxSuccess":"ajaxError",[u1,O0,y2?tt:T2]),A1.fireWith(C0,[u1,l2]),e0&&(O1.trigger("ajaxComplete",[u1,O0]),--A.active||A.event.trigger("ajaxStop")))}return u1},getJSON:function(z,i,u){return A.get(z,i,u,"json")},getScript:function(z,i){return A.get(z,void 0,i,"script")}}),A.each(["get","post"],function(z,i){A[i]=function(u,f,B,T){return m(f)&&(T=T||B,B=f,f=void 0),A.ajax(A.extend({url:u,type:i,dataType:T,data:f,success:B},A.isPlainObject(u)&&u))}}),A.ajaxPrefilter(function(z){var i;for(i in z.headers)i.toLowerCase()==="content-type"&&(z.contentType=z.headers[i]||"")}),A._evalUrl=function(z,i,u){return A.ajax({url:z,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(f){A.globalEval(f,i,u)}})},A.fn.extend({wrapAll:function(z){var i;return this[0]&&(m(z)&&(z=z.call(this[0])),i=A(z,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&i.insertBefore(this[0]),i.map(function(){for(var u=this;u.firstElementChild;)u=u.firstElementChild;return u}).append(this)),this},wrapInner:function(z){return m(z)?this.each(function(i){A(this).wrapInner(z.call(this,i))}):this.each(function(){var i=A(this),u=i.contents();u.length?u.wrapAll(z):i.append(z)})},wrap:function(z){var i=m(z);return this.each(function(u){A(this).wrapAll(i?z.call(this,u):z)})},unwrap:function(z){return this.parent(z).not("body").each(function(){A(this).replaceWith(this.childNodes)}),this}}),A.expr.pseudos.hidden=function(z){return!A.expr.pseudos.visible(z)},A.expr.pseudos.visible=function(z){return!!(z.offsetWidth||z.offsetHeight||z.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Li={0:200,1223:204},Ze=A.ajaxSettings.xhr();d.cors=!!Ze&&"withCredentials"in Ze,d.ajax=Ze=!!Ze,A.ajaxTransport(function(z){var i,u;if(d.cors||Ze&&!z.crossDomain)return{send:function(f,B){var T,w=z.xhr();if(w.open(z.type,z.url,z.async,z.username,z.password),z.xhrFields)for(T in z.xhrFields)w[T]=z.xhrFields[T];z.mimeType&&w.overrideMimeType&&w.overrideMimeType(z.mimeType),!z.crossDomain&&!f["X-Requested-With"]&&(f["X-Requested-With"]="XMLHttpRequest");for(T in f)w.setRequestHeader(T,f[T]);i=function(K){return function(){i&&(i=u=w.onload=w.onerror=w.onabort=w.ontimeout=w.onreadystatechange=null,K==="abort"?w.abort():K==="error"?typeof w.status!="number"?B(0,"error"):B(w.status,w.statusText):B(Li[w.status]||w.status,w.statusText,(w.responseType||"text")!=="text"||typeof w.responseText!="string"?{binary:w.response}:{text:w.responseText},w.getAllResponseHeaders()))}},w.onload=i(),u=w.onerror=w.ontimeout=i("error"),w.onabort!==void 0?w.onabort=u:w.onreadystatechange=function(){w.readyState===4&&t.setTimeout(function(){i&&u()})},i=i("abort");try{w.send(z.hasContent&&z.data||null)}catch(K){if(i)throw K}},abort:function(){i&&i()}}}),A.ajaxPrefilter(function(z){z.crossDomain&&(z.contents.script=!1)}),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(z){return A.globalEval(z),z}}}),A.ajaxPrefilter("script",function(z){z.cache===void 0&&(z.cache=!1),z.crossDomain&&(z.type="GET")}),A.ajaxTransport("script",function(z){if(z.crossDomain||z.scriptAttrs){var i,u;return{send:function(f,B){i=A(" - - - - - - + + + + + + +