const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Dashboard.Custom.4DCm98Q1.js","./entry_page.js","./Dashboard.EnterpriseViewOnlyPreset.hOZR46Qg.js","./Search.BNBTqs0I.js","./ErrorBoundary.xJor3Ppq.js","./assets/EnterpriseViewOnlyPreset-KjsMN7g0.css","./Dashboard.DataIngestion.zTYz9PSE.js","./Search.CUubiSTp.js","./Dashboard.utils.0p-tEVNs.js","./ArrowBroadUnderbarDown.wq6id2ca.js","./Menu.BxkNNSpG.js","./Dashboard.consts.BpCQqH5Z.js","./Dashboard.Overview.Cw6waP2U.js","./Dashboard.Error.W5Ap4UPE.js","./Dashboard.Resource.bqf5JefA.js"])))=>i.map(i=>d[i]);
import{r as De,b as Ee,a3 as Ae,a4 as Re,d as Ce,f as ke,g as qe,v as y,a5 as Le,o as $e,h as _,i as Me,k as i,R as P,W as k,N as Ne,q as Ve,_ as j}from"./entry_page.js";import{a as We,d as Ue,p as le,E as Be}from"./ErrorBoundary.xJor3Ppq.js";var H={exports:{}},ie;function He(){return ie||(ie=1,(()=>{var o={};o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},o.d=(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),o.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};o.r(p),o.d(p,{Panel:()=>X,default:()=>xe});const l=De();var s=o.n(l);const I=Ee();var n=o.n(I);const T=We();var O=o.n(T);const v=Ue();var q=o.n(v);const g=Ae(),L=Re();var S=o.n(L);const $=Ce;var G=o.n($);const M=ke();var F=G().div.withConfig({displayName:"TabLayoutStyles__StyledPanel",componentId:"lf0quy-0"})([""," ",""],M.mixins.reset("block"),(function(e){var a=e.$inset;return a&&(0,$.css)(["padding:",";"],M.variables.spacingLarge)})),de=G().div.withConfig({displayName:"TabLayoutStyles__Styled",componentId:"lf0quy-1"})(["text-align:center;margin-top:",";",""],M.variables.spacingLarge,(function(e){var a=e.$layout;return a==="vertical"&&(0,$.css)(["display:flex;& > [role='tablist']{flex:0 0 auto;}& > ","{width:100%;}"],F)}));function N(){return N=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},N.apply(null,arguments)}function ue(e,a){if(e==null)return{};var t,r,d=ce(e,a);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)t=u[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(d[t]=e[t])}return d}function ce(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}var _e={children:n().node,count:n().number,disabled:n().bool,elementRef:n().oneOfType([n().func,n().object]),icon:n().node,inset:n().bool,label:n().oneOfType([n().string,n().element]),panelId:n().string.isRequired,tooltip:n().node};function J(e){var a=e.children;e.disabled;var t=e.elementRef,r=e.inset,d=r===void 0?!0:r,u=e.panelId,m=ue(e,["children","disabled","elementRef","inset","panelId"]);return s().createElement(F,N({$inset:d,"data-test-panel-id":u,"data-test":"panel",ref:t,role:"tabpanel"},S()(m,["icon","label","tooltip"])),a)}J.propTypes=_e;const X=J;function D(){return D=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},D.apply(null,arguments)}function V(e,a){return be(e)||me(e,a)||ge(e,a)||pe()}function pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ge(e,a){if(e){if(typeof e=="string")return K(e,a);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?K(e,a):void 0}}function K(e,a){(a==null||a>e.length)&&(a=e.length);for(var t=0,r=Array(a);t<a;t++)r[t]=e[t];return r}function me(e,a){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r,d,u,m,h=[],b=!0,E=!1;try{if(u=(t=t.call(e)).next,a===0){if(Object(t)!==t)return;b=!1}else for(;!(b=(r=u.call(t)).done)&&(h.push(r.value),h.length!==a);b=!0);}catch(x){E=!0,d=x}finally{try{if(!b&&t.return!=null&&(m=t.return(),Object(m)!==m))return}finally{if(E)throw d}}return h}}function be(e){if(Array.isArray(e))return e}function fe(e,a){if(e==null)return{};var t,r,d=ve(e,a);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);for(r=0;r<u.length;r++)t=u[r],a.indexOf(t)===-1&&{}.propertyIsEnumerable.call(e,t)&&(d[t]=e[t])}return d}function ve(e,a){if(e==null)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(a.indexOf(r)!==-1)continue;t[r]=e[r]}return t}var he={autoActivate:n().bool,activePanelId:n().string,children:n().node,defaultActivePanelId:n().string,elementRef:n().oneOfType([n().func,n().object]),iconPosition:n().oneOf(["above","left"]),layout:n().oneOf(["horizontal","vertical"]),maxTabWidth:n().number,onChange:n().func};function W(e){var a=e.autoActivate,t=e.activePanelId,r=e.children,d=e.defaultActivePanelId,u=e.elementRef,m=e.iconPosition,h=e.layout,b=h===void 0?"horizontal":h,E=e.maxTabWidth,x=e.onChange,ye=fe(e,["autoActivate","activePanelId","children","defaultActivePanelId","elementRef","iconPosition","layout","maxTabWidth","onChange"]),w=q()({componentName:"TabLayout",componentProps:arguments[0],defaultValuePropName:"defaultActivePanelId",valuePropName:"activePanelId"}),we=(0,l.useState)(),Q=V(we,2),Y=Q[0],ze=Q[1],Pe=(0,l.useState)(w?void 0:d),Z=V(Pe,2),ee=Z[0],je=Z[1],A=(0,l.useMemo)((function(){return w?t:ee}),[w,t,ee]),Ie=(0,l.useState)((0,g.createGUID)()),Te=V(Ie,1),U=Te[0],Oe=(0,l.useCallback)((function(R,B){var z=B.selectedTabId;w||je(z),x?.(R,{activePanelId:z})}),[w,x]),Se=(0,l.useMemo)((function(){var R=null,B=l.Children.toArray(r).filter(l.isValidElement).map((function(z){var c=z.props,te="".concat(U,"-").concat(c.panelId),ae="".concat(U,"-").concat(c.panelId,"-tab");c.panelId===A&&(R=(0,l.cloneElement)(z,{"aria-labelledby":ae,id:te}));var re={},ne=c["data-title"];return ne!=null&&(re["data-title"]=ne),s().createElement(O().Tab,D({count:c.count,icon:c.icon,key:c.panelId,label:c.label,tabId:c.panelId,id:ae,ariaControls:te,tooltip:c.tooltip,disabled:c.disabled},re))}));return ze(R),B}),[A,r,U]);return(0,l.useEffect)((function(){}),[Y]),s().createElement(de,D({"data-test-active-panel-id":A,"data-test":"tab-layout",ref:u,$layout:b},ye),s().createElement(O(),{autoActivate:a,activeTabId:A,iconPosition:m,layout:b,maxTabWidth:E,onChange:Oe},Se),Y)}W.Panel=X,W.propTypes=he;const xe=W;H.exports=p})()),H.exports}var Ge=He();const se=qe(Ge),Fe=Le`
    body {
        background-color: ${le({enterprise:{light:y.gray96,dark:y.gray20},prisma:y.backgroundColorSection})};
    }

    #dashboardTable [data-test='tab-bar'] {
        margin-bottom: 15px;

        button {
            min-width: 115px;
        }
    }

    [data-input-id='overview_input'] {
        grid-column: 5 / 5;
        grid-row: 3;
    }

    #overview_main_label_viz {
        grid-column: 1 / span 4;
        grid-row: 3;
        height: fit-content;
    }

    #main_page_description_viz {
        margin-top: 40px;
    }

    #overview_timerange_label_start_viz {
        grid-row: 3;
        margin-top: 28px;
    }

    #overview_timerange_label_end_viz {
        grid-row: 3;
        margin-left: 145px;
        margin-top: 28px;
        display: flex;
    }

    /* data ingestion */

    [data-input-id='data_ingestion_input'] {
        grid-column: 8 / 9;
        grid-row: 2;
    }

    #data_ingestion_description_viz {
        margin-top: 32px;
        width: 600px;
    }

    #data_ingestion_timerange_label_start_viz {
        grid-row: 2;
        margin-top: 12px;
    }

    #data_ingestion_timerange_label_end_viz {
        grid-row: 2;
        margin-left: 145px;
        display: flex;
        margin-top: 12px;
    }

    #data_ingestion_table_viz {
        grid-column: 1 / 9;
        height: 100%;
        max-height: 500px;
        grid-row: 6;
        margin-top: 100px;

        [data-test='viz-waiting-for-input'] {
            min-height: 100px;
        }
    }

    #data_ingestion_data_volume_viz {
        grid-row: 3 / 6;
        margin-top: 20px;
        grid-column: 1 / 5;
    }

    #data_ingestion_events_count_viz {
        grid-row: 3 / 6;
        margin-top: 20px;
        grid-column: 5 / 9;
    }

    #data_ingestion_search {
        grid-row: 6;
        width: 150px;
        grid-column: 1;
        margin-top: 16px;
    }

    #data_ingestion_search_label {
        margin-bottom: 4px;
    }

    [data-input-id='data_ingestion_table_input'] {
        width: 200px;
        margin-left: 150px;
        grid-row: 6;
        grid-column: 1;
        margin-top: 21px;
        [data-test='input-title'] {
            font-size: 14px;
        }
    }

    #switch_hide_no_traffic_wrapper {
        grid-column: 1;
        grid-row: 6;
        width: 200px;
        margin: 32px 350px;
    }

    /* error tab */

    [data-input-id='errors_tab_input'] {
        grid-column: 2;
        grid-row: 1;
    }

    #errors_tab_description_viz {
        grid-column: 1 / 3;
        grid-row: 1;
        height: 20px;
        margin-top: 32px;
        width: 600px;
    }

    #errors_tab_timerange_label_start_viz {
        grid-column: 1;
        grid-row: 1;
        margin-top: 37px;
    }

    #errors_tab_timerange_label_end_viz {
        grid-column: 1;
        grid-row: 1;
        margin-left: 145px;
        display: flex;
        margin-top: 37px;
    }

    [data-test='status-icon-container'] {
        z-index: 1;
    }

    .invisible_before_moving {
        display: none;
    }

    #errors_tab_errors_list_viz {
        margin-top: 8px;
        height: fit-content;
        grid-row: 5;
        grid-column: 1 / 3;
    }

    #errors_tab_errors_count_viz {
        grid-row: 2;
        height: 400px;
        grid-column: 1 / 3;
        margin-top: 16px;
    }

    [data-input-id='errors_type_input'] {
        grid-column: 1;
        grid-row: 4;
    }

    #errors_tab_errors_list_viz div {
        height: fit-content;
    }

    [data-test-panel-id='errorsTabPanel'] [data-test='grid-layout-canvas'] {
        grid-template-columns: 94.5% 5%;
        grid-template-rows: auto auto auto auto auto;
        height: fit-content;
        overflow-x: hidden;
    }

    #errors_tab_label_viz {
        grid-column: 1;
        grid-row: 1;
    }

    /* resource tab */

    #resource_tab_label_viz {
        min-width: 450px;
    }

    [data-input-id='resource_tab_input'] {
        grid-column: 6;
        grid-row: 1;
        margin-top: 32px;
    }

    #resource_tab_description_viz {
        margin-top: 32px;
        width: 600px;
    }

    #resource_tab_timerange_label_start_viz {
        grid-row: 1;
        margin-top: 35px;
    }

    #resource_tab_timerange_label_end_viz {
        grid-row: 1;
        margin-left: 145px;
        display: flex;
        margin-top: 35px;
    }

    #resource_tab_cpu_consumption_viz,
    #resource_tab_memory_consumption_viz {
        grid-row: 2 / 6;
        margin-top: 20px;
        height: 300px;
    }

    /* data ingestion table modal */

    #data_ingestion_modal_dropdown {
        grid-row: 1;
        grid-column: 1;
        align-content: center;
        margin-left: ${y.spacingXSmall};
        width: 160px;
    }

    [data-input-id='data_ingestion_modal_time_window'] {
        grid-row: 1;
        grid-column: 1;
        margin-left: 170px;
    }

    #data_ingestion_dropdown_label {
        margin: 0;
        margin-bottom: 5px;
    }

    #data_ingestion_modal_timerange_label_end_viz {
        margin-left: 145px;
        display: flex;
    }

    /* shared styles for time labels */
    #overview_timerange_label_start_viz,
    #overview_timerange_label_end_viz,
    #data_ingestion_timerange_label_start_viz,
    #data_ingestion_timerange_label_end_viz,
    #errors_tab_timerange_label_start_viz,
    #errors_tab_timerange_label_end_viz,
    #resource_tab_timerange_label_start_viz,
    #resource_tab_timerange_label_end_viz,
    #data_ingestion_modal_timerange_label_start_viz,
    #data_ingestion_modal_timerange_label_end_viz {
        inline-size: fit-content;
        grid-column: 1;
        width: 145px;

        [data-test='majorValue'] {
            font-size: 14px;
            line-height: 14px;
            font-family: 'Splunk Platform Sans', 'Splunk Platform Sans', 'Proxima Nova', Roboto, Droid,
            'Helvetica Neue', Helvetica, Arial, sans-serif;
            font-weight: 400;
            color: var(--muted-text-color);
        }
        [data-test='action-menu-wrapper'] {
            display: none;
        }
    }

    /* shared styles page grid titles */
    #main_page_label_viz,
    #main_page_description_viz,
    #data_ingestion_description_viz,
    #data_ingestion_label_viz,
    #errors_tab_description_viz,
    #resource_tab_description_viz {
        grid-column: 1 / span 4;
        grid-row: 1;
        height: fit-content;
    }

    /* data input shared styles  */
    [data-input-id='overview_input'],
    [data-input-id='data_ingestion_input'],
    [data-input-id='errors_tab_input'],
    [data-input-id='resource_tab_input'] {
        align-content: flex-end;
        place-self: end;

        [data-test='input-container'] {
            display: inline-flex;
            padding: 0;
        }
        /* Time selector */
        [data-test='input-title'] {
            margin: 0px 5px;
            font-size: 14px;
        }
    }

    /* mark between dates  */

    #overview_timerange_label_end_viz::before,
    #data_ingestion_timerange_label_end_viz::before,
    #errors_tab_timerange_label_end_viz::before,
    #resource_tab_timerange_label_end_viz::before,
    #data_ingestion_modal_timerange_label_end_viz::before {
        content: '- ';
        margin: auto;
        color: var(--muted-text-color);
    }

    #errors_tab_errors_list_viz svg[data-test='placeholder-icon'] {
        max-height: 100px;
    }

    [data-test-panel-id='dataIngestionTabPanel'] [data-test='grid-layout-canvas'] {
        grid-template-columns: repeat(8, 12%);
        overflow-x: hidden;
    }

    [data-test-panel-id='dataIngestionModalDefTabPanel'] [data-test='input-layout-container'],
    [data-test-panel-id='dataIngestionModalDefTabPanel'] [data-test='grid-layout-canvas'] {
        background-color: var(--muted-text-color);
        padding: 0px;
        display: grid;
    }

    /* muted color */
    #main_page_description_viz p,
    #data_ingestion_description_viz p,
    #errors_tab_description_viz p {
        color: var(--muted-text-color);
    }

    #data_ingestion_table_viz [data-test='table-container'] > div {
        height: fit-content;
        
        [data-test="scroll-container"] {
            overflow-y: hidden;
        }
    }

    #data_ingestion_table_viz [data-test='table-container'] td:first-child {
        cursor: pointer;
        color: #006eaa !important;
    }

    #data_ingestion_table_viz [data-test='table-container'] td:first-child:hover {
        text-decoration: underline;
    }

    .dropdown_menu_item {
        padding: 6px 16px;
        min-width: 200px;
    }

`,oe=P.lazy(()=>j(()=>import("./Dashboard.Custom.4DCm98Q1.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),Je=P.lazy(()=>j(()=>import("./Dashboard.DataIngestion.zTYz9PSE.js"),__vite__mapDeps([6,1,2,3,4,5,7,8,9,10,11]),import.meta.url)),Xe=P.lazy(()=>j(()=>import("./Dashboard.Overview.Cw6waP2U.js"),__vite__mapDeps([12,1,2,3,4,5,8,9,11]),import.meta.url)),Ke=P.lazy(()=>j(()=>import("./Dashboard.Error.W5Ap4UPE.js"),__vite__mapDeps([13,1,2,3,4,5,8,9,11]),import.meta.url)),Qe=P.lazy(()=>j(()=>import("./Dashboard.Resource.bqf5JefA.js"),__vite__mapDeps([14,1,2,3,4,5,8,9]),import.meta.url));function f(o,p,l){fetch(`${$e()}/custom/${o}`).then(s=>s.json()).then(s=>{p&&l(s)}).catch(s=>{console.error("Loading file failed: ",s)})}const Ye=Ve.div`
    --muted-text-color: ${le({enterprise:{light:y.gray45,dark:y.gray80}})};
`,C=({label:o,panelId:p,children:l})=>i.jsx(se.Panel,{label:o,panelId:p,children:i.jsx(_.Suspense,{fallback:i.jsx(k,{size:"medium"}),children:l})});function Ze(){const[o,p]=_.useState(null),[l,s]=_.useState(null),[I,n]=_.useState(null),[T,O]=_.useState(null),[v,q]=_.useState(null),g=_.useRef(!0);_.useEffect(()=>(f("panels_to_display.json",g.current,S=>{S?.default&&(f("overview_definition.json",g.current,p),f("data_ingestion_tab_definition.json",g.current,s),f("errors_tab_definition.json",g.current,n),f("resources_tab_definition.json",g.current,O)),S?.custom&&f("custom.json",g.current,q)}),()=>{g.current=!1}),[]);const L=Me();return i.jsxs(Be,{children:[i.jsx(Fe,{}),i.jsxs(Ye,{children:[i.jsx(_.Suspense,{fallback:i.jsx(k,{size:"medium"}),children:i.jsx(Xe,{dashboardDefinition:o})}),o?i.jsxs(se,{autoActivate:!0,defaultActivePanelId:"dataIngestionTabPanel",id:"dashboardTable","data-test":"dashboardTable",style:{minHeight:"98vh"},children:[l&&i.jsx(C,{label:"Data ingestion",panelId:"dataIngestionTabPanel",children:i.jsx(Je,{dashboardDefinition:l})}),I&&i.jsx(C,{label:"Errors",panelId:"errorsTabPanel",children:i.jsx(_.Suspense,{fallback:i.jsx(k,{size:"medium"}),children:i.jsx(Ke,{dashboardDefinition:I})})}),T&&i.jsx(C,{label:"Resource consumption",panelId:"resourceTabPanel",children:i.jsx(Qe,{dashboardDefinition:T})}),v&&i.jsx(C,{label:L.pages.dashboard?.settings?.custom_tab_name||"Custom",panelId:"customTabPanel",children:i.jsx(oe,{dashboardDefinition:v})})]}):i.jsx(_.Suspense,{fallback:i.jsx(k,{size:"medium"}),children:i.jsx(oe,{dashboardDefinition:v})}),!o&&!v?i.jsx(Ne,{size:"medium","data-testid":"wait-spinner"}):null]})]})}const at=Object.freeze(Object.defineProperty({__proto__:null,default:Ze,loadJson:f},Symbol.toStringTag,{value:"Module"}));export{at as D,se as T};
