(self.webpackChunkgrafana=self.webpackChunkgrafana||[]).push([[5296],{75693:(e,t,n)=>{"use strict";n.d(t,{E:()=>o,z:()=>r});const r=()=>({type:"query",query:{params:["A","5m","now"]},reducer:{type:"avg",params:[]},evaluator:{type:"gt",params:[null]},operator:{type:"and"}}),o=async(e,t,n,r)=>{if(0===t.length)return"Could not find any metric queries";if(e&&e.length)return"Transformations are not supported in alert queries";let o=0,i=0;for(const e of t){const t=e.datasource||r,a=await n.get(t);a.meta.alerting?a.targetContainsTemplate&&a.targetContainsTemplate(e)&&i++:o++}return o===t.length?"The datasource does not support alerting queries":i===t.length?"Template variables are not supported in alert queries":""}},29e3:(e,t,n)=>{"use strict";n.d(t,{F:()=>l});var r=n(36636),o=(n(68404),n(69783)),i=n(9019),a=n(45916);const s=["renderExpandedContent"];const l=e=>{let{renderExpandedContent:t}=e,n=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,s);const l=(0,o.useStyles2)(d);return(0,a.jsx)(i.t,Object.assign({renderExpandedContent:t?(e,n,o)=>(0,a.jsxs)(a.Fragment,{children:[!(n===o.length-1)&&(0,a.jsx)("div",{className:(0,r.cx)(l.contentGuideline,l.guideline)}),t(e,n,o)]}):void 0,renderPrefixHeader:()=>(0,a.jsx)("div",{className:l.relative,children:(0,a.jsx)("div",{className:(0,r.cx)(l.headerGuideline,l.guideline)})}),renderPrefixCell:(e,t,n)=>(0,a.jsxs)("div",{className:l.relative,children:[(0,a.jsx)("div",{className:(0,r.cx)(l.topGuideline,l.guideline)}),!(t===n.length-1)&&(0,a.jsx)("div",{className:(0,r.cx)(l.bottomGuideline,l.guideline)})]})},n))},d=e=>({relative:r.css`
    position: relative;
    height: 100%;
  `,guideline:r.css`
    left: -19px;
    border-left: 1px solid ${e.colors.border.medium};
    position: absolute;

    ${e.breakpoints.down("md")} {
      display: none;
    }
  `,topGuideline:r.css`
    width: 18px;
    border-bottom: 1px solid ${e.colors.border.medium};
    top: 0;
    bottom: 50%;
  `,bottomGuideline:r.css`
    top: 50%;
    bottom: 0;
  `,contentGuideline:r.css`
    top: 0;
    bottom: 0;
    left: -49px !important;
  `,headerGuideline:r.css`
    top: -25px;
    bottom: 0;
  `})},85598:(e,t,n)=>{"use strict";n.d(t,{V:()=>a});n(68404);var r,o=n(69783),i=n(45916);const a=e=>{let{namespace:t,group:n}=e;return n?(0,i.jsxs)(i.Fragment,{children:[t," ",r||(r=(0,i.jsx)(o.Icon,{name:"angle-right"}))," ",n]}):(0,i.jsx)(i.Fragment,{children:t})}},86692:(e,t,n)=>{"use strict";n.d(t,{i:()=>k});var r=n(36636),o=n(68404),i=n(69783),a=n(26980),s=n(85464),l=n(9019),d=n(29e3),c=n(85598),u=n(94322),p=n(52510),h=n(83039),g=n(97292),f=n(79842),m=n(85351),b=n(12135),y=n(45916);const v=e=>{let{rule:t}=e;const n=(0,i.useStyles2)(S),{promRule:r,namespace:{rulesSource:o}}=t,a=Object.entries(t.annotations).filter((e=>{let[t,n]=e;return!!n.trim()}));return(0,y.jsxs)("div",{children:[(0,y.jsx)(h.f,{rule:t,rulesSource:o}),(0,y.jsxs)("div",{className:n.wrapper,children:[(0,y.jsxs)("div",{className:n.leftSide,children:[!!t.labels&&!!Object.keys(t.labels).length&&(0,y.jsx)(p.C,{label:"Labels",horizontal:!0,children:(0,y.jsx)(u.s,{labels:t.labels})}),(0,y.jsx)(m.C,{rulesSource:o,rule:t,annotations:a}),(0,y.jsx)(g.J,{annotations:a})]}),(0,y.jsx)("div",{className:n.rightSide,children:(0,y.jsx)(f.C,{rulesSource:o,rule:t})})]}),(0,y.jsx)(b.M,{promRule:r})]})},S=e=>({wrapper:r.css`
    display: flex;
    flex-direction: row;
    ${e.breakpoints.down("md")} {
      flex-direction: column;
    }
  `,leftSide:r.css`
    flex: 1;
  `,rightSide:r.css`
    ${e.breakpoints.up("md")} {
      padding-left: 90px;
      width: 300px;
    }
  `});var x=n(82434),M=n(18181);const k=e=>{let{rules:t,className:n,showGuidelines:u=!1,emptyMessage:p="No rules found.",showGroupColumn:h=!1,showSummaryColumn:g=!1}=e;const f=(0,i.useStyles2)(w),m=(0,r.cx)(f.wrapper,n,{[f.wrapperMargin]:u}),b=(0,o.useMemo)((()=>{const e=[];return t.map(((t,n)=>{var r;let o=JSON.stringify([null===(r=t.promRule)||void 0===r?void 0:r.type,t.labels,t.query,t.name,t.annotations]);return e.includes(o)&&(o+=`-${n}`),e.push(o),{id:o,data:t}}))}),[t]),S=function(e,t){const n=(0,a.h)();return(0,o.useMemo)((()=>{const r=[{id:"state",label:"State",renderCell:e=>{let{data:t}=e;const{namespace:r}=t,{rulesSource:o}=r,{promRule:i,rulerRule:a}=t,s=!(!n(o)||!i||a),l=!(!n(o)||!a||i);return(0,y.jsx)(M.p,{rule:t,isDeleting:s,isCreating:l})},size:"165px"},{id:"name",label:"Name",renderCell:e=>{let{data:t}=e;return t.name},size:5},{id:"health",label:"Health",renderCell:e=>{let{data:{promRule:t}}=e;return t?(0,y.jsx)(x.V,{rule:t}):null},size:"75px"}];return e&&r.push({id:"summary",label:"Summary",renderCell:e=>{var t;let{data:n}=e;return null!==(t=n.annotations[s.q6.summary])&&void 0!==t?t:""},size:5}),t&&r.push({id:"group",label:"Group",renderCell:e=>{let{data:t}=e;const{namespace:n,group:r}=t;return"default"===r.name?(0,y.jsx)(c.V,{namespace:n.name}):(0,y.jsx)(c.V,{namespace:n.name,group:r.name})},size:5}),r}),[n,e,t])}(g,h);if(!t.length)return(0,y.jsx)("div",{className:(0,r.cx)(m,f.emptyMessage),children:p});const k=u?d.F:l.t;return(0,y.jsx)("div",{className:m,"data-testid":"rules-table",children:(0,y.jsx)(k,{cols:S,isExpandable:!0,items:b,renderExpandedContent:e=>{let{data:t}=e;return(0,y.jsx)(v,{rule:t})}})})},w=e=>({wrapperMargin:r.css`
    ${e.breakpoints.up("md")} {
      margin-left: 36px;
    }
  `,emptyMessage:r.css`
    padding: ${e.spacing(1)};
  `,wrapper:r.css`
    width: auto;
    background-color: ${e.colors.background.secondary};
    border-radius: ${e.shape.borderRadius()};
  `})},26980:(e,t,n)=>{"use strict";n.d(t,{h:()=>a});var r=n(68404),o=n(19462),i=n(33899);function a(){const e=(0,i._)((e=>e.rulerRules));return(0,r.useCallback)((t=>{var n;const r="string"==typeof t?t:t.name;return r===o.GC||!(null===(n=e[r])||void 0===n||!n.result)}),[e])}},16145:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DashboardPage:()=>ii,UnthemedDashboardPage:()=>ri,default:()=>ai,getStyles:()=>oi,mapStateToProps:()=>ei});var r=n(36636),o=n(23019),i=n.n(o),a=n(68404),s=n(18745),l=n(16695),d=n(90923),c=n(69783),u=n(36537),p=n(70064),h=n(58257),g=n(53144),f=n(67706),m=n(58170),b=n(21169),y=n(57358),v=n(5970),S=n(33689),x=n(64822),M=n(45916);const k=e=>{let{initError:t}=e;const n=(0,c.useStyles)(w);return t?(0,M.jsx)("div",{className:n.dashboardLoading,children:(0,M.jsx)(c.Alert,{severity:m.F1.Error,title:t.message,children:(0,x.i)(t.error)})}):null},w=e=>({dashboardLoading:r.css`
      height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
    `});var O;const C=e=>{let{initPhase:t}=e;const n=(0,c.useStyles)(j);return(0,M.jsx)("div",{className:n.dashboardLoading,children:(0,M.jsx)("div",{className:n.dashboardLoadingText,children:(0,M.jsxs)(c.VerticalGroup,{spacing:"md",children:[(0,M.jsxs)(c.HorizontalGroup,{align:"center",justify:"center",spacing:"xs",children:[O||(O=(0,M.jsx)(c.Spinner,{inline:!0}))," ",t]})," ",(0,M.jsx)(c.HorizontalGroup,{align:"center",justify:"center",children:(0,M.jsx)(c.Button,{variant:"secondary",size:"md",icon:"repeat",onClick:()=>{d.locationService.push("/")},children:"Cancel loading dashboard"})})]})})})},j=e=>{const t=r.keyframes`
    0% { opacity: 0%; }
    100% { opacity: 100%; }
  `;return{dashboardLoading:r.css`
      height: 60vh;
      display: flex;
      opacity: 0%;
      align-items: center;
      justify-content: center;
      animation: ${t} 0s step-end ${"0.5s"} 1 normal forwards;
    `,dashboardLoadingText:r.css`
      font-size: ${e.typography.size.lg};
    `}};var z,P,B,T=n(82897),W=n(42326),R=n(5831),D=n(61959),I=n(94087),E=n(17873),A=n(23078),F=n(34751),L=n(94878);const N=e=>{let{panel:t,folderId:n,isUnsavedPrompt:r,onDismiss:o,onConfirm:i,onDiscard:s}=e;const[l,d]=(0,a.useState)(""),u=(0,I.Z)((async()=>{const e=await(0,A.E8)(t.libraryPanel.uid);return e.length>0?e.map((e=>e.title)):[]}),[t.libraryPanel.uid]),[p,h]=(0,a.useState)([]);(0,E.Z)((()=>u.value?h(u.value.filter((e=>e.toLowerCase().includes(l.toLowerCase())))):h([])),300,[u.value,l]);const{saveLibraryPanel:g}=(0,L.E)(),f=(0,c.useStyles)(F.J),m=(0,a.useCallback)((()=>{s()}),[s]),b=r?"Unsaved library panel changes":"Save library panel";return(0,M.jsx)(c.Modal,{title:b,icon:"save",onDismiss:o,isOpen:!0,children:(0,M.jsxs)("div",{children:[(0,M.jsxs)("p",{className:f.textInfo,children:["This update will affect ",(0,M.jsxs)("strong",{children:[t.libraryPanel.meta.connectedDashboards," ",1===t.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards","."]}),"The following dashboards using the panel will be affected:"]}),(0,M.jsx)(c.Input,{className:f.dashboardSearch,prefix:z||(z=(0,M.jsx)(c.Icon,{name:"search"})),placeholder:"Search affected dashboards",value:l,onChange:e=>d(e.currentTarget.value)}),u.loading?P||(P=(0,M.jsx)("p",{children:"Loading connected dashboards..."})):(0,M.jsxs)("table",{className:f.myTable,children:[B||(B=(0,M.jsx)("thead",{children:(0,M.jsx)("tr",{children:(0,M.jsx)("th",{children:"Dashboard name"})})})),(0,M.jsx)("tbody",{children:p.map(((e,t)=>(0,M.jsx)("tr",{children:(0,M.jsx)("td",{children:e})},`dashrow-${t}`)))})]}),(0,M.jsxs)(c.Modal.ButtonRow,{children:[(0,M.jsx)(c.Button,{variant:"secondary",onClick:o,fill:"outline",children:"Cancel"}),r&&(0,M.jsx)(c.Button,{variant:"destructive",onClick:m,children:"Discard"}),(0,M.jsx)(c.Button,{onClick:()=>{g(t,n).then((()=>{i()}))},children:"Update all"})]})]})})};var _=n(41169),$=n(17421),H=n(68897),G=n(10269),V=n(81300);function U(){return async(e,t)=>{const{getPanel:n}=t().panelEditor;n().configRev=0,e((0,V.yi)(!0))}}function q(e,t){var n;return(null===(n=t.libraryPanel)||void 0===n?void 0:n.uid)!==e.libraryPanel.uid||(!(!t.id||t.id!==e.id)||!!t.repeatPanelId)}function Q(){return async(e,t)=>{const n=t().dashboard.getModel(),{getPanel:r,getSourcePanel:o,shouldDiscardChanges:i}=t().panelEditor,a=r();if(n&&n.exitPanelEditor(),!i){const t=a.getSaveModel(),r=o(),i=r.type!==a.type;if(e(function(e,t){return n=>{var r;if(void 0===(null===(r=e.libraryPanel)||void 0===r?void 0:r.uid)||!t)return;const o=e.getSaveModel();for(const r of t.panels){var i,a;if(q(e,r))continue;r.restoreModel(Object.assign({},o,(0,T.pick)(r,"gridPos","id")));const t=(null===(i=r.plugin)||void 0===i?void 0:i.meta.id)!==(null===(a=e.plugin)||void 0===a?void 0:a.meta.id);if(r.plugin=e.plugin,r.configRev++,t){const e=r.key;r.generateNewKey(),n((0,G.bc)({key:r.key,plugin:r.plugin,cleanUpKey:e}))}setTimeout((()=>{r.getQueryRunner().useLastResultFrom(e.getQueryRunner())}),20)}e.repeat&&setTimeout((()=>t.processRepeats()),20)}}(a,n)),r.restoreModel(t),r.configRev++,i){r.plugin=a.plugin;const t=r.key;r.generateNewKey(),await e((0,G.bc)({key:r.key,plugin:a.plugin,cleanUpKey:t}))}setTimeout((()=>{r.getQueryRunner().useLastResultFrom(a.getQueryRunner()),r.render()}),20)}e((0,H.qj)(a.key)),e((0,V.my)())}}var Z,K=n(12973);const Y=e=>{let{dashboard:t,onSaveSuccess:n,onDiscard:o,onDismiss:i}=e;return(0,M.jsxs)(c.Modal,{isOpen:!0,title:"Unsaved changes",onDismiss:i,icon:"exclamation-triangle",className:r.css`
        width: 500px;
      `,children:[Z||(Z=(0,M.jsx)("h5",{children:"Do you want to save your changes?"})),(0,M.jsxs)(c.Modal.ButtonRow,{children:[(0,M.jsx)(c.Button,{variant:"secondary",onClick:i,fill:"outline",children:"Cancel"}),(0,M.jsx)(c.Button,{variant:"destructive",onClick:o,children:"Discard"}),(0,M.jsx)(K.i,{dashboard:t,onSaveSuccess:n})]})]})},J=a.memo((e=>{let{dashboard:t}=e;const[n,r]=(0,a.useState)({original:null}),o=(0,s.useDispatch)(),{original:i,originalPath:l}=n,{showModal:u,hideModal:p}=(0,a.useContext)(c.ModalsContext);(0,a.useEffect)((()=>{const e=setTimeout((()=>{const e=d.locationService.getLocation().pathname,n=t.getSaveModelClone();r({originalPath:e,original:n})}),1e3),n=R.h.subscribe(b.Jd,(()=>{const e=t.getSaveModelClone();r({originalPath:l,original:e})}));return()=>{clearTimeout(e),n.unsubscribe()}}),[t,l]),(0,a.useEffect)((()=>{const e=e=>{ee(t,i)||ne(t,i)&&(e.preventDefault(),e.returnValue="")};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)}),[t,i]);return(0,M.jsx)(W.NL,{when:!0,message:e=>{const a=t.panelInEdit,s=new URLSearchParams(e.search);return a&&a.libraryPanel&&a.hasChanged&&!s.has("editPanel")?(u(N,{isUnsavedPrompt:!0,panel:t.panelInEdit,folderId:t.meta.folderId,onConfirm:()=>{p(),X(e)},onDiscard:()=>{o(U()),X(e),p()},onDismiss:p}),!1):l!==e.pathname&&i?!!ee(t,i)||(!ne(t,i)||(u(Y,{dashboard:t,onSaveSuccess:()=>{p(),X(e)},onDiscard:()=>{r(Object.assign({},n,{original:null})),p(),X(e)},onDismiss:p}),!1)):(a&&!s.has("editPanel")&&o(Q()),!0)}})}));function X(e){e&&setTimeout((()=>d.locationService.push(e)),10)}function ee(e,t){if(!t)return!0;if(!D.Vt.isSignedIn)return!0;if(!e||!e.meta)return!0;const{canSave:n,fromScript:r,fromFile:o}=e.meta;return!D.Vt.isEditor&&!n||(!n||r||o)}function te(e){const t=new _.f(e);t.expandRows();const n=t.getSaveModelClone();return n.time=0,n.refresh=0,n.schemaVersion=0,n.timezone=0,delete n.iteration,n.panels=(0,T.filter)(n.panels,(e=>!e.repeatPanelId&&(e.scopedVars=void 0,e.legend&&(delete e.legend.sort,delete e.legend.sortDesc),!0))),(0,T.each)(n.getVariables(),(e=>{e.current=null,e.options=null,e.filters=null})),n}function ne(e,t){const n=te(e.getSaveModelClone()),r=te(t),o=(0,T.find)(n.nav,{type:"timepicker"}),i=(0,T.find)(r.nav,{type:"timepicker"});o&&i&&(o.now=i.now);return JSON.stringify(n,null)!==JSON.stringify(r,null)}J.displayName="DashboardPrompt";var re=n(29483),oe=n(59241),ie=n(43215);const ae=(e,t,n)=>{const r=(0,a.useRef)(),[o,i]=(0,a.useState)();return(0,a.useEffect)((()=>{let o=-1,a=0;return r.current=e.getQueryRunner().getData(t).subscribe({next:e=>{if(n){var t;if(o===e.structureRev){const e=Date.now();if(e-a<1e4)return;a=e}o=null!==(t=e.structureRev)&&void 0!==t?t:-1}i(e)}}),()=>{r.current&&r.current.unsubscribe()}}),[e,t.withFieldConfig,t.withTransforms]),{data:o,error:o&&o.error,isLoading:!o||o.state===ie.LoadingState.Loading,hasSeries:!!o&&!!o.series}};var se,le=n(16618),de=n(77967),ce=n(81669);const ue=e=>{var t;let{data:n,metadataDatasource:r}=e;return r&&null!==(t=r.components)&&void 0!==t&&t.MetadataInspector?(0,M.jsx)(r.components.MetadataInspector,{datasource:r,data:n.series}):se||(se=(0,M.jsx)("div",{children:"No Metadata Inspector"}))};var pe=n(59970),he=n(73723),ge=n(39965);const fe=e=>{let{panel:t,plugin:n,dashboard:r,tabs:o,data:i,isDataLoading:s,dataOptions:l,metadataDatasource:u,defaultTab:p,onDataOptionsChange:h,onClose:g}=e;const[f,m]=(0,a.useState)(null!=p?p:ge.q.Data);if(!n)return null;const b=null==i?void 0:i.error;let y=f;o.find((e=>e.value===f))||(y=ge.q.JSON);const v=(0,d.getTemplateSrv)().replace(t.title,t.scopedVars,"text");return(0,M.jsxs)(c.Drawer,{title:`Inspect: ${v||"Panel"}`,subtitle:i&&me(i),width:"50%",onClose:g,expandable:!0,scrollableContent:!0,tabs:(0,M.jsx)(c.TabsBar,{children:o.map(((e,t)=>(0,M.jsx)(c.Tab,{label:e.label,active:e.value===y,onChangeTab:()=>m(e.value||ge.q.Data)},`${e.value}-${t}`)))}),children:[y===ge.q.Data&&(0,M.jsx)(le.E,{panel:t,data:i&&i.series,isLoading:s,options:l,onOptionsChange:h,timeZone:r.timezone}),i&&y===ge.q.Meta&&(0,M.jsx)(ue,{data:i,metadataDatasource:u}),y===ge.q.JSON&&(0,M.jsx)(ce.W,{panel:t,dashboard:r,data:i,onClose:g}),y===ge.q.Error&&(0,M.jsx)(de.l,{error:b}),i&&y===ge.q.Stats&&(0,M.jsx)(pe.f,{data:i,timeZone:r.getTimezone()}),i&&y===ge.q.Query&&(0,M.jsx)(he.D,{panel:t,data:i.series,onRefreshQuery:()=>t.refresh()})]})};function me(e){const{request:t}=e;if(!t)return"";const n=t.targets.length,r=t.endTime?t.endTime-t.startTime:0;return`${n} queries with total query time of ${(0,ie.formattedValueToString)((0,ie.getValueFormat)("ms")(r))}`}var be=n(90662),ye=n(64593);const ve=(0,s.connect)(((e,t)=>{const n=(0,oe.i)(e,t.panel);return n?{plugin:n.plugin}:{plugin:null}}))((e=>{let{panel:t,dashboard:n,plugin:r}=e;const[o,i]=(0,a.useState)({withTransforms:!1,withFieldConfig:!0}),s=(0,W.TH)(),{data:l,isLoading:c,error:u}=ae(t,o,!0),p=(e=>(0,be.Z)((async()=>{var t;const n=(null==e||null===(t=e.request)||void 0===t?void 0:t.targets)||[];if(e&&e.series&&n.length)for(const t of e.series)if(t.meta&&t.meta.custom){var r;const e=await(0,d.getDataSourceSrv)().get(n[0].datasource);if(e&&null!==(r=e.components)&&void 0!==r&&r.MetadataInspector)return e}}),[e]).value)(l),h=((e,t,n,r,o)=>(0,a.useMemo)((()=>{const i=[];(0,ye.sY)(n)&&(i.push({label:"Data",value:ge.q.Data}),i.push({label:"Stats",value:ge.q.Stats})),o&&i.push({label:"Meta Data",value:ge.q.Meta}),i.push({label:"JSON",value:ge.q.JSON}),r&&r.message&&i.push({label:"Error",value:ge.q.Error});const a=window.grafanaPanelInspectActionSupplier;return a&&a.getActions(e)&&i.push({label:"Actions",value:ge.q.Actions}),t.meta.canEdit&&(0,ye.sY)(n)&&i.push({label:"Query",value:ge.q.Query}),i}),[e,n,o,t,r]))(t,n,r,u,p),g=new URLSearchParams(s.search).get("inspectTab");return r?(0,M.jsx)(fe,{dashboard:n,panel:t,plugin:r,defaultTab:g,tabs:h,data:l,isDataLoading:c,dataOptions:o,onDataOptionsChange:i,metadataDatasource:p,onClose:()=>{d.locationService.partial({inspect:null,inspectTab:null})}}):null}));var Se=n(87723),xe=n(99918),Me=n(59160),ke=n.n(Me),we=n(6157),Oe=n.n(we),Ce=n(14375);function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pe(e,t,n){return t&&ze(e.prototype,t),n&&ze(e,n),e}function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Re(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ie(e,t)}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Ie(e,t){return Ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ie(e,t)}function Ee(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Ae(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fe(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?Ae(e):t}function Le(e){return function(){var t,n=De(e);if(Ee()){var r=De(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return Fe(this,t)}}var Ne=function(e){Re(n,e);var t=Le(n);function n(){return je(this,n),t.apply(this,arguments)}return Pe(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.split,o=e.style,i=e.size,s=e.eleRef,l=["Pane",r,n],d={flex:1,position:"relative",outline:"none"};return void 0!==i&&("vertical"===r?d.width=i:(d.height=i,d.display="flex"),d.flex="none"),d=Object.assign({},d,o||{}),a.createElement("div",{ref:s,className:l.join(" "),style:d},t)}}]),n}(a.PureComponent);Ne.propTypes={className:ke().string.isRequired,children:ke().node.isRequired,size:ke().oneOfType([ke().string,ke().number]),split:ke().oneOf(["vertical","horizontal"]),style:Oe(),eleRef:ke().func},Ne.defaultProps={};var _e="Resizer",$e=function(e){Re(n,e);var t=Le(n);function n(){return je(this,n),t.apply(this,arguments)}return Pe(n,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.onClick,r=e.onDoubleClick,o=e.onMouseDown,i=e.onTouchEnd,s=e.onTouchStart,l=e.resizerClassName,d=e.split,c=e.style,u=[l,d,t];return a.createElement("span",{role:"presentation",className:u.join(" "),style:c,onMouseDown:function(e){return o(e)},onTouchStart:function(e){e.preventDefault(),s(e)},onTouchEnd:function(e){e.preventDefault(),i(e)},onClick:function(e){n&&(e.preventDefault(),n(e))},onDoubleClick:function(e){r&&(e.preventDefault(),r(e))}})}}]),n}(a.Component);function He(e,t){if(e.selection)e.selection.empty();else try{t.getSelection().removeAllRanges()}catch(e){}}function Ge(e,t,n,r){if("number"==typeof r){var o="number"==typeof t?t:0,i="number"==typeof n&&n>=0?n:1/0;return Math.max(o,Math.min(i,r))}return void 0!==e?e:t}$e.propTypes={className:ke().string.isRequired,onClick:ke().func,onDoubleClick:ke().func,onMouseDown:ke().func.isRequired,onTouchStart:ke().func.isRequired,onTouchEnd:ke().func.isRequired,split:ke().oneOf(["vertical","horizontal"]),style:Oe(),resizerClassName:ke().string.isRequired},$e.defaultProps={resizerClassName:_e};var Ve=function(e){Re(n,e);var t=Le(n);function n(e){var r;je(this,n),(r=t.call(this,e)).onMouseDown=r.onMouseDown.bind(Ae(r)),r.onTouchStart=r.onTouchStart.bind(Ae(r)),r.onMouseMove=r.onMouseMove.bind(Ae(r)),r.onTouchMove=r.onTouchMove.bind(Ae(r)),r.onMouseUp=r.onMouseUp.bind(Ae(r));var o=e.size,i=e.defaultSize,a=e.minSize,s=e.maxSize,l=e.primary,d=void 0!==o?o:Ge(i,a,s,null);return r.state={active:!1,resized:!1,pane1Size:"first"===l?d:void 0,pane2Size:"second"===l?d:void 0,instanceProps:{size:o}},r}return Pe(n,[{key:"componentDidMount",value:function(){document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("touchmove",this.onTouchMove),this.setState(n.getSizeUpdate(this.props,this.state))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("touchmove",this.onTouchMove)}},{key:"onMouseDown",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchStart(t)}},{key:"onTouchStart",value:function(e){var t=this.props,n=t.allowResize,r=t.onDragStarted,o=t.split;if(n){He(document,window);var i="vertical"===o?e.touches[0].clientX:e.touches[0].clientY;"function"==typeof r&&r(),this.setState({active:!0,position:i})}}},{key:"onMouseMove",value:function(e){var t=Object.assign({},e,{touches:[{clientX:e.clientX,clientY:e.clientY}]});this.onTouchMove(t)}},{key:"onTouchMove",value:function(e){var t=this.props,n=t.allowResize,r=t.maxSize,o=t.minSize,i=t.onChange,a=t.split,s=t.step,l=this.state,d=l.active,c=l.position;if(n&&d){He(document,window);var u="first"===this.props.primary,p=u?this.pane1:this.pane2,h=u?this.pane2:this.pane1;if(p){var g=p,f=h;if(g.getBoundingClientRect){var m=g.getBoundingClientRect().width,b=g.getBoundingClientRect().height,y="vertical"===a?m:b,v=c-("vertical"===a?e.touches[0].clientX:e.touches[0].clientY);if(s){if(Math.abs(v)<s)return;v=~~(v/s)*s}var S=u?v:-v;parseInt(window.getComputedStyle(g).order)>parseInt(window.getComputedStyle(f).order)&&(S=-S);var x=r;if(void 0!==r&&r<=0){var M=this.splitPane;x="vertical"===a?M.getBoundingClientRect().width+r:M.getBoundingClientRect().height+r}var k=y-S,w=c-v;k<o?k=o:void 0!==r&&k>x?k=x:this.setState({position:w,resized:!0}),i&&i(k),this.setState(Be({draggedSize:k},u?"pane1Size":"pane2Size",k))}}}}},{key:"onMouseUp",value:function(){var e=this.props,t=e.allowResize,n=e.onDragFinished,r=this.state,o=r.active,i=r.draggedSize;t&&o&&("function"==typeof n&&n(i),this.setState({active:!1}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.allowResize,r=t.children,o=t.className,i=t.onResizerClick,s=t.onResizerDoubleClick,l=t.paneClassName,d=t.pane1ClassName,c=t.pane2ClassName,u=t.paneStyle,p=t.pane1Style,h=t.pane2Style,g=t.resizerClassName,f=t.resizerStyle,m=t.split,b=t.style,y=this.state,v=y.pane1Size,S=y.pane2Size,x=n?"":"disabled",M=g?"".concat(g," ").concat(_e):g,k=function(e){return a.Children.toArray(e).filter((function(e){return e}))}(r),w=We({display:"flex",flex:1,height:"100%",position:"absolute",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"},b);"vertical"===m?Object.assign(w,{flexDirection:"row",left:0,right:0}):Object.assign(w,{bottom:0,flexDirection:"column",minHeight:"100%",top:0,width:"100%"});var O=["SplitPane",o,m,x],C=We({},u,{},p),j=We({},u,{},h),z=["Pane1",l,d].join(" "),P=["Pane2",l,c].join(" ");return a.createElement("div",{className:O.join(" "),ref:function(t){e.splitPane=t},style:w},a.createElement(Ne,{className:z,key:"pane1",eleRef:function(t){e.pane1=t},size:v,split:m,style:C},k[0]),a.createElement($e,{className:x,onClick:i,onDoubleClick:s,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,key:"resizer",resizerClassName:M,split:m,style:f||{}}),a.createElement(Ne,{className:P,key:"pane2",eleRef:function(t){e.pane2=t},size:S,split:m,style:j},k[1]))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return n.getSizeUpdate(e,t)}},{key:"getSizeUpdate",value:function(e,t){var n={};if(t.instanceProps.size===e.size&&void 0!==e.size)return{};var r=void 0!==e.size?e.size:Ge(e.defaultSize,e.minSize,e.maxSize,t.draggedSize);void 0!==e.size&&(n.draggedSize=r);var o="first"===e.primary;return n[o?"pane1Size":"pane2Size"]=r,n[o?"pane2Size":"pane1Size"]=void 0,n.instanceProps={size:e.size},n}}]),n}(a.Component);Ve.propTypes={allowResize:ke().bool,children:ke().arrayOf(ke().node).isRequired,className:ke().string,primary:ke().oneOf(["first","second"]),minSize:ke().oneOfType([ke().string,ke().number]),maxSize:ke().oneOfType([ke().string,ke().number]),defaultSize:ke().oneOfType([ke().string,ke().number]),size:ke().oneOfType([ke().string,ke().number]),split:ke().oneOf(["vertical","horizontal"]),onDragStarted:ke().func,onDragFinished:ke().func,onChange:ke().func,onResizerClick:ke().func,onResizerDoubleClick:ke().func,style:Oe(),resizerStyle:Oe(),paneClassName:ke().string,pane1ClassName:ke().string,pane2ClassName:ke().string,paneStyle:Oe(),pane1Style:Oe(),pane2Style:Oe(),resizerClassName:ke().string,step:ke().number},Ve.defaultProps={allowResize:!0,minSize:50,primary:"first",split:"vertical",paneClassName:"",pane1ClassName:"",pane2ClassName:""},(0,Ce.O)(Ve);const Ue=Ve;var qe,Qe=n(78837);function Ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.Right=0]="Right",e[e.Top=1]="Top"}(qe||(qe={}));class Ke extends a.PureComponent{constructor(){super(...arguments),Ze(this,"rafToken",(0,a.createRef)()),Ze(this,"updateSplitPaneSize",(()=>{void 0!==this.rafToken.current&&window.cancelAnimationFrame(this.rafToken.current),this.rafToken.current=window.requestAnimationFrame((()=>{this.forceUpdate()}))})),Ze(this,"onDragFinished",((e,t)=>{if(document.body.style.cursor="auto",!t)return;const{updateUiState:n}=this.props;e===qe.Top?n({topPaneSize:t/window.innerHeight}):n({rightPaneSize:t/window.innerWidth})})),Ze(this,"onDragStarted",(()=>{document.body.style.cursor="row-resize"}))}componentDidMount(){window.addEventListener("resize",this.updateSplitPaneSize)}componentWillUnmount(){window.removeEventListener("resize",this.updateSplitPaneSize)}renderHorizontalSplit(){const{leftPaneComponents:e,uiState:t}=this.props,n=Ye(Qe.vc.theme),r=t.topPaneSize>=1?t.topPaneSize:t.topPaneSize*window.innerHeight;return Array.isArray(e)?(0,M.jsx)(Ue,{split:"horizontal",maxSize:-200,primary:"first",size:r,pane2Style:{minHeight:0},resizerClassName:n.resizerH,onDragStarted:this.onDragStarted,onDragFinished:e=>this.onDragFinished(qe.Top,e),children:e}):e}render(){const{rightPaneVisible:e,rightPaneComponents:t,uiState:n}=this.props,r=Ye(Qe.vc.theme),o=n.rightPaneSize<=1?n.rightPaneSize*window.innerWidth:n.rightPaneSize;return e?(0,M.jsxs)(Ue,{split:"vertical",maxSize:-300,size:o,primary:"second",resizerClassName:r.resizerV,onDragStarted:()=>document.body.style.cursor="col-resize",onDragFinished:e=>this.onDragFinished(qe.Right,e),children:[this.renderHorizontalSplit(),t]}):this.renderHorizontalSplit()}}Ze(Ke,"defaultProps",{rightPaneVisible:!0});const Ye=(0,c.stylesFactory)((e=>{const t=e.palette.blue95,n=e.spacing.md,o=r.css`
    position: relative;

    &::before {
      content: '';
      position: absolute;
      transition: 0.2s border-color ease-in-out;
    }

    &::after {
      background: ${e.colors.panelBorder};
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      transition: 0.2s background ease-in-out;
      transform: translate(-50%, -50%);
      border-radius: 4px;
    }

    &:hover {
      &::before {
        border-color: ${t};
      }

      &::after {
        background: ${t};
      }
    }
  `;return{resizerV:(0,r.cx)(o,r.css`
        cursor: col-resize;
        width: ${n};

        &::before {
          border-right: 1px solid transparent;
          height: 100%;
          left: 50%;
          transform: translateX(-50%);
        }

        &::after {
          height: 200px;
          width: 4px;
        }
      `),resizerH:(0,r.cx)(o,r.css`
        height: ${n};
        cursor: row-resize;
        margin-left: ${n};

        &::before {
          border-top: 1px solid transparent;
          top: 50%;
          transform: translateY(-50%);
          width: 100%;
        }

        &::after {
          height: 4px;
          width: 200px;
        }
      `)}}));var Je,Xe=n(98163),et=n(91219),tt=n(39665);const nt=e=>{const t=(0,a.useMemo)((()=>et.z.get(e.variable.type).picker),[e.variable]);return e.variable?(0,M.jsxs)("div",{className:"gf-form",children:[(0,M.jsx)(rt,{variable:e.variable}),e.variable.hide!==tt.bU.hideVariable&&t&&(0,M.jsx)(t,{variable:e.variable})]}):Je||(Je=(0,M.jsx)("div",{children:"Couldn't load variable"}))};function rt(e){let{variable:t}=e;const n=(0,a.useMemo)((()=>t.label||t.name),[t]);if(t.hide!==tt.bU.dontHide)return null;const r=`var-${t.id}`;return t.description?(0,M.jsx)(c.Tooltip,{content:t.description,placement:"bottom",children:(0,M.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":l.wl.pages.Dashboard.SubMenu.submenuItemLabels(n),htmlFor:r,children:n})}):(0,M.jsx)("label",{className:"gf-form-label gf-form-label--variable","data-testid":l.wl.pages.Dashboard.SubMenu.submenuItemLabels(n),htmlFor:r,children:n})}const ot=e=>{let{variables:t}=e;const[n,r]=(0,a.useState)([]);return(0,a.useEffect)((()=>{r(t.filter((e=>e.hide!==tt.bU.hideVariable)))}),[t]),0===n.length?null:(0,M.jsx)(M.Fragment,{children:n.map((e=>(0,M.jsx)("div",{className:"submenu-item gf-form-inline","data-testid":l.wl.pages.Dashboard.SubMenu.submenuItem,children:(0,M.jsx)(nt,{variable:e})},e.id)))})};var it=n(10603),at=n(36333),st=n(27777),lt=n(70793),dt=n(36586),ct=n(26346),ut=n(50645),pt=n(61488);function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const gt=(e,t)=>{var n;return{angularPanelComponent:null===(n=(0,oe.i)(e,t.panel))||void 0===n?void 0:n.angularComponent}},ft={changePanelPlugin:H.Kc};(0,s.connect)(gt,ft);class mt extends a.PureComponent{constructor(e){super(e),ht(this,"element",void 0),ht(this,"angularOptions",void 0)}componentDidMount(){this.loadAngularOptions()}componentDidUpdate(e){this.props.plugin===e.plugin&&this.props.angularPanelComponent===e.angularPanelComponent||this.cleanUpAngularOptions(),this.loadAngularOptions()}componentWillUnmount(){this.cleanUpAngularOptions()}cleanUpAngularOptions(){this.angularOptions&&(this.angularOptions.destroy(),this.angularOptions=null)}loadAngularOptions(){const{panel:e,angularPanelComponent:t,changePanelPlugin:n}=this.props;if(!this.element||!t||this.angularOptions)return;const r=t.getScope();if(!r.$$childHead)return void setTimeout((()=>{this.forceUpdate()}));const o=r.$$childHead.ctrl;o.initEditMode(),o.onPluginTypeChange=t=>{n({panel:e,pluginId:t.id})};let i="";for(let e=0;e<o.editorTabs.length;e++){const t=o.editorTabs[e];t.isOpen=(a=t.title,s=0===e,$.Z.getBool(`panel-edit-section-${a}`,s)),i+=`\n      <div class="panel-options-group" ng-cloak>\n        <div class="panel-options-group__header" ng-click="toggleOptionGroup(${e})" aria-label="${t.title} section">\n          <div class="panel-options-group__icon">\n            <icon name="ctrl.editorTabs[${e}].isOpen ? 'angle-down' : 'angle-right'"></icon>\n          </div>\n          <div class="panel-options-group__title">${t.title}</div>\n        </div>\n        <div class="panel-options-group__body" ng-if="ctrl.editorTabs[${e}].isOpen">\n          <panel-editor-tab editor-tab="ctrl.editorTabs[${e}]" ctrl="ctrl"></panel-editor-tab>\n        </div>\n      </div>\n      `}var a,s;const l=(0,d.getAngularLoader)(),c={ctrl:o,toggleOptionGroup:e=>{const t=o.editorTabs[e];t.isOpen=!t.isOpen,function(e,t){$.Z.set(`panel-edit-section-${e}`,t?"true":"false")}(t.title,t.isOpen)}};this.angularOptions=l.load(this.element,c,i),this.angularOptions.digest()}render(){return(0,M.jsx)("div",{ref:e=>this.element=e})}}const bt=(0,s.connect)(gt,ft)(mt);var yt=n(37812),vt=n(7929),St=n(9575),xt=n.n(St);const Mt=e=>{var t,n;let{property:o,context:i,registry:a,onChange:s,onRemove:l,isSystemOverride:d,searchQuery:u}=e;const p=(0,c.useTheme)(),h=kt(p),g=null==a?void 0:a.getIfExists(o.id);if(!g)return null;const f=Array.isArray(o.value)||o.id===ie.FieldConfigProperty.Thresholds||o.id===ie.FieldConfigProperty.Links||o.id===ie.FieldConfigProperty.Mappings,m=null===(t=g.category)||void 0===t?void 0:t.filter((e=>e!==g.name));let b;const y=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(){let r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,M.jsxs)(c.HorizontalGroup,{justify:"space-between",children:[(0,M.jsxs)(c.Label,{category:m,description:e?g.description:void 0,children:[(0,M.jsx)(xt(),{textToHighlight:g.name,searchWords:[u],highlightClassName:"search-fragment-highlight"}),!r&&t&&g.getItemsCount&&(0,M.jsx)(c.Counter,{value:g.getItemsCount(o.value)})]}),!d&&(n||(n=(0,M.jsx)("div",{children:(0,M.jsx)(c.IconButton,{name:"times",onClick:l})})))]})}};return b=f?(0,M.jsx)(yt.u,{id:g.name,renderTitle:y(!1,!0),className:r.css`
          padding-left: 0;
          padding-right: 0;
        `,isNested:!0,isOpenDefault:void 0!==o.value,children:(0,M.jsx)(g.override,{value:o.value,onChange:e=>{s(e)},item:g,context:i})}):(0,M.jsx)("div",{children:(0,M.jsx)(c.Field,{label:y()(),description:g.description,children:(0,M.jsx)(g.override,{value:o.value,onChange:e=>{s(e)},item:g,context:i})})}),(0,M.jsx)("div",{className:(0,r.cx)(f&&h.collapsibleOverrideEditor,!f&&"dynamicConfigValueEditor--nonCollapsible"),children:b})},kt=(0,c.stylesFactory)((e=>({collapsibleOverrideEditor:r.css`
      label: collapsibleOverrideEditor;
      & + .dynamicConfigValueEditor--nonCollapsible {
        margin-top: ${e.spacing.formSpacingBase}px;
      }
    `})));var wt,Ot=n(35327),Ct=n(90318);const jt=e=>{let{isExpanded:t,registry:n,matcherUi:r,overrideName:o,override:i,onOverrideRemove:a}=e;const s=(0,c.useStyles)(zt),l=i.properties.map((e=>n.getIfExists(e.id))).filter((e=>!!e)).map((e=>null==e?void 0:e.name)).join(", "),d=r.optionsToLabel(i.matcher.options);return(0,M.jsxs)("div",{children:[(0,M.jsxs)(c.HorizontalGroup,{justify:"space-between",children:[(0,M.jsx)("div",{children:o}),(0,M.jsx)(c.IconButton,{name:"trash-alt",onClick:a,title:"Remove override"})]}),!t&&(0,M.jsx)("div",{className:s.overrideDetails,children:(0,M.jsxs)("div",{className:s.options,title:d,children:[d," ",wt||(wt=(0,M.jsx)(c.Icon,{name:"angle-right"}))," ",l]})})]})};jt.displayName="OverrideTitle";const zt=e=>({matcherUi:r.css`
      padding: ${e.spacing.sm};
    `,propertyPickerWrapper:r.css`
      margin-top: ${2*e.spacing.formSpacingBase}px;
    `,overrideDetails:r.css`
      font-size: ${e.typography.size.sm};
      color: ${e.colors.textWeak};
      font-weight: ${e.typography.weight.regular};
    `,options:r.css`
      overflow: hidden;
      padding-right: ${e.spacing.xl};
    `,unknownLabel:r.css`
      margin-bottom: 0;
    `});function Pt(e,t){var n,r;const o=[],i=e.panel.fieldConfig,a=e.plugin.fieldConfigRegistry,s=null!==(n=null===(r=e.data)||void 0===r?void 0:r.series)&&void 0!==n?n:[];if(a.isEmpty())return[];const l=(t,n)=>{let r=(0,T.cloneDeep)(i.overrides);r[t]=n,e.onFieldConfigsChange(Object.assign({},i,{overrides:r}))},d=t=>{let n=(0,T.cloneDeep)(i.overrides);n.splice(t,1),e.onFieldConfigsChange(Object.assign({},i,{overrides:n}))},u={data:s,getSuggestions:e=>(0,vt.PW)(s,e),isOverride:!0};for(let n=0;n<i.overrides.length;n++){const r=i.overrides[n],s=`Override ${n+1}`,p=c.fieldMatchersUI.get(r.matcher.id),h=Bt(a),g=(0,ie.isSystemOverride)(r),f=0===r.properties.length?1:0,m=new Ot.j({title:s,id:s,forceOpen:f,renderTitle:function(e){return(0,M.jsx)(jt,{override:r,isExpanded:e,registry:a,overrideName:s,matcherUi:p,onOverrideRemove:()=>d(n)})}}),b=e=>{r.matcher.options=e,l(n,r)},y=(e,t)=>{const o=a.get(t.value),i={id:o.id,value:o.defaultValue};r.properties?e.properties.push(i):e.properties=[i],l(n,e)};m.addItem(new Ct.a({title:p.name,render:function(){var t,o;return(0,M.jsx)(p.component,{id:`${p.matcher.id}-${n}`,matcher:p.matcher,data:null!==(t=null===(o=e.data)||void 0===o?void 0:o.series)&&void 0!==t?t:[],options:r.matcher.options,onChange:b})}}));for(let e=0;e<r.properties.length;e++){const o=r.properties[e],i=a.getIfExists(o.id);if(!i)continue;const s=t=>{r.properties[e].value=t,l(n,r)},d=()=>{r.properties.splice(e,1),l(n,r)};m.addItem(new Ct.a({title:i.name,skipField:!0,render:function(){return(0,M.jsx)(Mt,{isSystemOverride:g,onChange:s,onRemove:d,property:o,registry:a,context:u,searchQuery:t},`${o.id}/${e}`)}}))}!g&&r.matcher.options&&m.addItem(new Ct.a({title:"----------",skipField:!0,render:function(){return(0,M.jsx)(c.ValuePicker,{label:"Add override property",variant:"secondary",isFullWidth:!0,icon:"plus",menuPlacement:"auto",options:h,onChange:e=>y(r,e)},"Add override property")}})),o.push(m)}return o.push(new Ot.j({title:"add button",id:"add button",customRender:function(){return(0,M.jsx)(Tt,{children:(0,M.jsx)(c.ValuePicker,{icon:"plus",label:"Add field override",variant:"secondary",menuPlacement:"auto",isFullWidth:!0,size:"md",options:c.fieldMatchersUI.list().filter((e=>!e.excludeFromPicker)).map((e=>({label:e.name,value:e.id,description:e.description}))),onChange:t=>(t=>{e.onFieldConfigsChange(Object.assign({},i,{overrides:[...i.overrides,{matcher:{id:t.value},properties:[]}]}))})(t)})},"Add override")}})),o}function Bt(e){return e.list().filter((e=>!e.hideFromOverrides)).map((e=>{let t=e.name;return e.category&&(t=[...e.category,e.name].join(" > ")),{label:t,value:e.id,description:e.description}}))}function Tt(e){let{children:t}=e;const n=(0,c.useStyles2)(Wt);return(0,M.jsx)("div",{className:n,children:t})}function Wt(e){return(0,r.css)({borderTop:`1px solid ${e.colors.border.weak}`,padding:`${e.spacing(2)}`,display:"flex"})}const Rt=e=>{var t;let{panel:n,formatDate:r}=e;const o=(0,c.useStyles)(Dt);return(0,st.V)(n)?(0,M.jsxs)("div",{className:o.info,children:[(0,M.jsxs)("div",{className:o.libraryPanelInfo,children:[`Used on ${n.libraryPanel.meta.connectedDashboards} `,1===n.libraryPanel.meta.connectedDashboards?"dashboard":"dashboards"]}),(0,M.jsxs)("div",{className:o.libraryPanelInfo,children:["Last edited on ",null!==(t=null==r?void 0:r(n.libraryPanel.meta.updated,"L"))&&void 0!==t?t:n.libraryPanel.meta.updated," by",n.libraryPanel.meta.updatedBy.avatarUrl&&(0,M.jsx)("img",{width:"22",height:"22",className:o.userAvatar,src:n.libraryPanel.meta.updatedBy.avatarUrl,alt:`Avatar for ${n.libraryPanel.meta.updatedBy.name}`}),n.libraryPanel.meta.updatedBy.name]})]}):null},Dt=e=>({info:r.css`
      line-height: 1;
    `,libraryPanelInfo:r.css`
      color: ${e.colors.textSemiWeak};
      font-size: ${e.typography.size.sm};
    `,userAvatar:r.css`
      border-radius: 50%;
      box-sizing: content-box;
      width: 22px;
      height: 22px;
      padding-left: ${e.spacing.sm};
      padding-right: ${e.spacing.sm};
    `});function It(e){const{panel:t,onPanelConfigChange:n,dashboard:r}=e,o=new Ot.j({title:"Library panel options",id:"Library panel options",isOpenDefault:!0});return(0,st.V)(t)&&o.addItem(new Ct.a({title:"Name",value:t.libraryPanel.name,popularRank:1,render:function(){return(0,M.jsx)(c.Input,{id:"LibraryPanelFrameName",defaultValue:t.libraryPanel.name,onBlur:e=>n("libraryPanel",Object.assign({},t.libraryPanel,{name:e.currentTarget.value}))})}})).addItem(new Ct.a({title:"Information",render:function(){return(0,M.jsx)(Rt,{panel:t,formatDate:r.formatDate})}})),o}const Et=e=>{let{repeat:t,onChange:n,id:r}=e;const o=(0,s.useSelector)((e=>(0,dt.gt)((0,dt.S_)(e),e))),i=(0,a.useMemo)((()=>{const e=o.map((e=>({label:e.name,value:e.name})));return 0===e.length&&e.unshift({label:"No template variables found",value:null}),e.unshift({label:"Disable repeating",value:null}),e}),[o]),l=(0,a.useCallback)((e=>n(e.value)),[n]);return(0,M.jsx)(c.Select,{inputId:r,value:t,onChange:l,options:i})};function At(e){var t;const{panel:n,onPanelConfigChange:r}=e;return new Ot.j({title:"Panel options",id:"Panel options",isOpenDefault:!0}).addItem(new Ct.a({title:"Title",value:n.title,popularRank:1,render:function(){return(0,M.jsx)(c.Input,{id:"PanelFrameTitle",defaultValue:n.title,onBlur:e=>r("title",e.currentTarget.value)})}})).addItem(new Ct.a({title:"Description",description:n.description,value:n.description,render:function(){return(0,M.jsx)(c.TextArea,{id:"description-text-area",defaultValue:n.description,onBlur:e=>r("description",e.currentTarget.value)})}})).addItem(new Ct.a({title:"Transparent background",render:function(){return(0,M.jsx)(c.Switch,{value:n.transparent,id:"transparent-background",onChange:e=>r("transparent",e.currentTarget.checked)})}})).addCategory(new Ot.j({title:"Panel links",id:"Panel links",isOpenDefault:!1,itemsCount:null===(t=n.links)||void 0===t?void 0:t.length}).addItem(new Ct.a({title:"Panel links",render:function(){return(0,M.jsx)(c.DataLinksInlineEditor,{links:n.links,onChange:e=>r("links",e),getSuggestions:vt.PR,data:[]})}}))).addCategory(new Ot.j({title:"Repeat options",id:"Repeat options",isOpenDefault:!1}).addItem(new Ct.a({title:"Repeat by variable",description:"Repeat this panel for each value in the selected variable. This is not visible while in edit mode. You need to go back to dashboard and then update the variable or reload the dashboard.",render:function(){return(0,M.jsx)(Et,{id:"repeat-by-variable-select",repeat:n.repeat,onChange:e=>{r("repeat",e)}})}})).addItem(new Ct.a({title:"Repeat direction",showIf:()=>!!n.repeat,render:function(){return(0,M.jsx)(c.RadioButtonGroup,{options:[{label:"Horizontal",value:"h"},{label:"Vertical",value:"v"}],value:n.repeatDirection||"h",onChange:e=>r("repeatDirection",e)})}})).addItem(new Ct.a({title:"Max per row",showIf:()=>Boolean(n.repeat&&"h"===n.repeatDirection),render:function(){const e=[2,3,4,6,8,12].map((e=>({label:e.toString(),value:e})));return(0,M.jsx)(c.Select,{options:e,value:n.maxPerRow,onChange:e=>r("maxPerRow",e.value)})}})))}var Ft=n(30090);class Lt{constructor(e,t){this.categories=e,this.overrides=t}search(e){const t=new RegExp(e,"i"),n=this.collectHits(this.categories,t,[]).sort(Nt).map((e=>e.item)),r=this.collectHits(this.overrides,t,[]).sort(Nt).map((e=>e.item));return{optionHits:n,overrideHits:this.buildOverrideHitCategories(r),totalCount:this.getAllOptionsCount(this.categories)}}collectHits(e,t,n){for(const r of e){const e=t.test(r.props.title);for(const o of r.items)t.test(o.props.title)?n.push({item:o,rank:1}):o.props.description&&t.test(o.props.description)?n.push({item:o,rank:2}):e&&n.push({item:o,rank:3});r.categories.length>0&&this.collectHits(r.categories,t,n)}return n}getAllOptionsCount(e){var t=0;for(const n of e)t+=n.items.length,n.categories.length>0&&(t+=this.getAllOptionsCount(n.categories));return t}buildOverrideHitCategories(e){const t={};for(const n of e){let e=t[n.parent.props.title];e||(e=t[n.parent.props.title]=new Ot.j(n.parent.props),e.addItem(n.parent.items[0])),e.items[0].props.title!==n.props.title&&e.addItem(n)}return Object.values(t)}}function Nt(e,t){return e.rank-t.rank}function _t(e){const t=[];for(const n of e)for(const e of n.items)"Unit"===e.props.title&&(e.props.popularRank=2),"Min"===e.props.title&&(e.props.popularRank=3),"Max"===e.props.title&&(e.props.popularRank=4),"Display name"===e.props.title&&(e.props.popularRank=5),e.props.popularRank&&t.push(e);return t.sort(((e,t)=>e.props.popularRank-t.props.popularRank))}const $t=e=>{const{plugin:t,dashboard:n,panel:r}=e,[o,i]=(0,a.useState)(""),[s,l]=(0,a.useState)(Gt.All),d=(0,c.useStyles2)(Vt),[u,p,h]=(0,a.useMemo)((()=>[At(e),(0,Ft.AL)(e),It(e)]),[r.configRev,e.data,e.instanceState,o]),g=(0,a.useMemo)((()=>Pt(e,o)),[r.configRev,e.data,e.instanceState,o]),f=[],m=o.length>0,b=(0,a.useMemo)(Ht,[]),y=(0,st.V)(r)?[h,u,...p]:[u,...p];if(m)f.push(function(e,t,n){const r=new Lt(e,t),{optionHits:o,totalCount:i,overrideHits:a}=r.search(n);return(0,M.jsxs)("div",{children:[(0,M.jsx)(yt.u,{id:"Found options",title:`Matched ${o.length}/${i} options`,forceOpen:1,children:o.map((e=>e.render(n)))},"Normal options"),a.map((e=>e.render(n)))]},"search results")}(y,g,o)),e.plugin.angularPanelCtrl&&f.push((0,M.jsx)("div",{className:d.searchNotice,children:"This is an old visualization type that does not support searching all options."},"Search notice"));else switch(s){case Gt.All:(0,st.V)(r)&&f.push(h.render()),f.push(u.render()),e.plugin.angularPanelCtrl&&f.push((0,M.jsx)(bt,{plugin:t,dashboard:n,panel:r},"AngularOptions"));for(const e of p)f.push(e.render());for(const e of g)f.push(e.render());break;case Gt.Overrides:for(const e of g)f.push(e.render());break;case Gt.Recent:f.push((0,M.jsx)(yt.u,{id:"Recent options",title:"Recent options",forceOpen:1,children:_t(y).map((e=>e.render()))},"Recent options"))}const v=!m&&!t.fieldConfigRegistry.isEmpty();return(0,M.jsxs)("div",{className:d.wrapper,children:[(0,M.jsxs)("div",{className:d.formBox,children:[(0,M.jsx)("div",{className:d.formRow,children:(0,M.jsx)(c.FilterInput,{width:0,value:o,onChange:i,placeholder:"Search options"})}),v&&(0,M.jsx)("div",{className:d.formRow,children:(0,M.jsx)(c.RadioButtonGroup,{options:b,value:s,fullWidth:!0,onChange:l})})]}),(0,M.jsx)("div",{className:d.scrollWrapper,children:(0,M.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,M.jsx)("div",{className:d.mainBox,children:f})})})]})};function Ht(){return[{label:Gt.All,value:Gt.All},{label:Gt.Overrides,value:Gt.Overrides}]}let Gt;!function(e){e.All="All",e.Overrides="Overrides",e.Recent="Recent"}(Gt||(Gt={}));const Vt=e=>({wrapper:r.css`
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;

    .search-fragment-highlight {
      color: ${e.colors.warning.text};
      background: transparent;
    }
  `,searchBox:r.css`
    display: flex;
    flex-direction: column;
    min-height: 0;
  `,formRow:r.css`
    margin-bottom: ${e.spacing(1)};
  `,formBox:r.css`
    padding: ${e.spacing(1)};
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top-left-radius: ${e.shape.borderRadius(1.5)};
    border-bottom: none;
  `,closeButton:r.css`
    margin-left: ${e.spacing(1)};
  `,searchHits:r.css`
    padding: ${e.spacing(1,1,0,1)};
  `,scrollWrapper:r.css`
    flex-grow: 1;
    min-height: 0;
  `,searchNotice:r.css`
    font-size: ${e.typography.size.sm};
    color: ${e.colors.text.secondary};
    padding: ${e.spacing(1)};
    text-align: center;
  `,mainBox:r.css`
    background: ${e.colors.background.primary};
    border: 1px solid ${e.components.panel.borderColor};
    border-top: none;
    flex-grow: 1;
  `});var Ut=n(80672);const qt=e=>t=>t.plugins.panels[e]||(0,Ut.X)(`Panel plugin not found (${e})`,!0),Qt=e=>{let{panel:t}=e;const n=(0,c.useStyles)(Zt),r=(0,s.useDispatch)(),o=(0,s.useSelector)(qt(t.type)),i=(0,s.useSelector)((e=>e.panelEditor.ui.isPanelOptionsVisible)),a=(0,s.useSelector)((e=>e.panelEditor.isVizPickerOpen));return o?(0,M.jsx)("div",{className:n.wrapper,children:(0,M.jsxs)(c.ButtonGroup,{children:[(0,M.jsx)(c.ToolbarButton,{className:n.vizButton,tooltip:"Click to change visualization",imgSrc:o.meta.info.logos.small,isOpen:a,onClick:()=>{r((0,V.g_)(!a))},"aria-label":l.wl.components.PanelEditor.toggleVizPicker,fullWidth:!0,children:o.meta.name}),(0,M.jsx)(c.ToolbarButton,{tooltip:i?"Close options pane":"Show options pane",icon:i?"angle-right":"angle-left",onClick:()=>{r((0,V.K9)({isPanelOptionsVisible:!i}))},"aria-label":l.wl.components.PanelEditor.toggleVizOptions})]})}):null};Qt.displayName="VisualizationTab";const Zt=e=>({wrapper:r.css`
      display: flex;
      flex-direction: column;
    `,vizButton:r.css`
      text-align: left;
    `});var Kt=n(40652),Yt=n(86900),Jt=n(65747),Xt=n(22305),en=n(62431),tn=n(52595);const nn=e=>{let{onConfirm:t,onDismiss:n,panel:r}=e;const o=(0,st.V)(r),i=(o?"Changing":"Replace with")+" library panel",a=(o?"Changing":"Replacing with a")+" library panel will remove any changes since last save.";return(0,M.jsx)(c.ConfirmModal,{onConfirm:t,onDismiss:n,confirmText:o?"Change":"Replace",title:i,body:a,dismissText:"Cancel",isOpen:!0})};var rn=n(23195);const on=e=>{var t;let{panel:n,searchQuery:r}=e;const o=(0,c.useStyles2)(an),[i,l]=(0,a.useState)(!1),[d,u]=(0,a.useState)(void 0),[p,h]=(0,a.useState)([]),g=(0,a.useCallback)((e=>{h(e.map((e=>e.id)))}),[h]),f=(0,Xt.h4)().getCurrent(),m=(0,s.useDispatch)();return(0,M.jsxs)(c.VerticalGroup,{spacing:"md",children:[!n.libraryPanel&&(0,M.jsx)(c.VerticalGroup,{align:"center",children:(0,M.jsx)(c.Button,{icon:"plus",onClick:()=>{l(!0)},variant:"secondary",fullWidth:!0,children:"Create new library panel"})}),(0,M.jsx)(en.j,{onChange:g}),(0,M.jsx)("div",{className:o.libraryPanelsView,children:(0,M.jsx)(rn.u,{currentPanelId:null===(t=n.libraryPanel)||void 0===t?void 0:t.uid,searchString:r,panelFilter:p,onClickCard:e=>{u(e)},showSecondaryActions:!0})}),i&&(0,M.jsx)(tn.c,{panel:n,onDismiss:()=>l(!1),initialFolderId:null==f?void 0:f.meta.folderId,isOpen:i}),d&&(0,M.jsx)(nn,{panel:n,onDismiss:()=>{u(void 0)},onConfirm:async()=>{d&&(u(void 0),m((0,H.ih)(n,d)))}})]})},an=e=>({libraryPanelsView:r.css`
      width: 100%;
    `});var sn=n(75064);const ln=["timeseries","barchart","gauge","stat","piechart","bargauge","table","state-timeline","status-history","logs","candlestick"];var dn=n(57866);function cn(e){var t,n;let{data:o,suggestion:i,onChange:a,width:s,showTitle:d}=e;const u=(0,c.useStyles2)(un),{innerStyles:p,outerStyles:h,renderWidth:g,renderHeight:f}=function(e){const t=1.6,n=e*(1/t),r=350,o=r*(1/t),i=6;return{renderHeight:o,renderWidth:r,outerStyles:{width:e,height:n},innerStyles:{width:r,height:o,transform:`scale(${(e-2*i)/r}, ${(n-2*i)/o})`}}}(s),m=null!==(t=i.cardOptions)&&void 0!==t?t:{},b={"aria-label":i.name,className:u.vizBox,"data-testid":l.wl.components.VisualizationPreview.card(i.name),style:h,onClick:()=>{a({pluginId:i.pluginId,options:i.options,fieldConfig:i.fieldConfig})}};var y;if(m.imgSrc)return(0,M.jsx)(c.Tooltip,{content:null!==(y=i.description)&&void 0!==y?y:i.name,children:(0,M.jsxs)("button",Object.assign({},b,{className:(0,r.cx)(u.vizBox,u.imgBox),children:[(0,M.jsx)("div",{className:u.name,children:i.name}),(0,M.jsx)("img",{className:u.img,src:m.imgSrc,alt:i.name})]}))});let v=i;return null!==(n=i.cardOptions)&&void 0!==n&&n.previewModifier&&(v=(0,T.cloneDeep)(i),i.cardOptions.previewModifier(v)),(0,M.jsx)("button",Object.assign({},b,{children:(0,M.jsx)(c.Tooltip,{content:i.name,children:(0,M.jsxs)("div",{style:p,className:u.renderContainer,children:[(0,M.jsx)(dn.$,{title:"",data:o,pluginId:i.pluginId,width:g,height:f,options:v.options,fieldConfig:v.fieldConfig}),(0,M.jsx)("div",{className:u.hoverPane})]})})}))}const un=e=>({hoverPane:(0,r.css)({position:"absolute",top:0,right:0,left:0,borderRadius:e.spacing(2),bottom:0}),vizBox:r.css`
      position: relative;
      background: none;
      border-radius: ${e.shape.borderRadius(1)};
      cursor: pointer;
      border: 1px solid ${e.colors.border.medium};

      transition: ${e.transitions.create(["background"],{duration:e.transitions.duration.short})};

      &:hover {
        background: ${e.colors.background.secondary};
      }
    `,imgBox:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;

      justify-self: center;
      color: ${e.colors.text.primary};
      width: 100%;
      display: flex;

      justify-content: center;
      align-items: center;
      text-align: center;
    `,name:r.css`
      padding-bottom: ${e.spacing(.5)};
      margin-top: ${e.spacing(-1)};
      font-size: ${e.typography.bodySmall.fontSize};
      white-space: nowrap;
      overflow: hidden;
      color: ${e.colors.text.secondary};
      font-weight: ${e.typography.fontWeightMedium};
      text-overflow: ellipsis;
    `,img:r.css`
      max-width: ${e.spacing(8)};
      max-height: ${e.spacing(8)};
    `,renderContainer:r.css`
      position: absolute;
      transform-origin: left top;
      top: 6px;
      left: 6px;
    `});function pn(e){let{onChange:t,data:n,panel:r,searchQuery:o}=e;const i=(0,c.useStyles2)(hn),{value:a}=(0,I.Z)((()=>async function(e,t){const n=new ie.VisualizationSuggestionsBuilder(e,t);for(const e of ln){const t=(await(0,sn.U)(e)).getSuggestionsSupplier();t&&t.getSuggestionsForData(n)}const r=n.getList();if(0===n.dataSummary.fieldCount)for(const e of Object.values(d.config.panels))e.skipDataQuery&&!e.hideFromList&&r.push({name:e.name,pluginId:e.id,description:e.info.description,cardOptions:{imgSrc:e.info.logos.small}});return r.sort(((e,t)=>{var n,r;return(null!==(n=t.score)&&void 0!==n?n:ie.VisualizationSuggestionScore.OK)-(null!==(r=e.score)&&void 0!==r?r:ie.VisualizationSuggestionScore.OK)}))}(n,r)),[n,r]),[s,l]=(0,Kt.Z)("VisualizationSuggestions.showTitle",!1),u=function(e,t){if(!e||!t)return t||[];const n=new RegExp(e,"i");return t.filter((e=>n.test(e.name)||n.test(e.pluginId)))}(o,a);return(0,M.jsx)(Se.Z,{disableHeight:!0,style:{width:"100%",height:"100%"},children:e=>{let{width:r}=e;if(!r)return null;const a=Math.floor(r/170),d=(r-8*(a-1))/a;return(0,M.jsxs)("div",{children:[(0,M.jsx)("div",{className:i.filterRow,children:(0,M.jsx)("div",{className:i.infoText,onClick:()=>l(!s),children:"Based on current data"})}),(0,M.jsxs)("div",{className:i.grid,style:{gridTemplateColumns:`repeat(auto-fill, ${d-1}px)`},children:[u.map(((e,r)=>(0,M.jsx)(cn,{data:n,suggestion:e,onChange:t,width:d,showTitle:s},r))),o&&0===u.length&&(0,M.jsx)("div",{className:i.infoText,children:"No results matched your query"})]})]})}})}const hn=e=>({heading:(0,r.css)(Object.assign({},e.typography.h5,{margin:e.spacing(0,.5,1)})),filterRow:(0,r.css)({display:"flex",flexDirection:"row",justifyContent:"space-around",alignItems:"center",paddingBottom:"8px"}),infoText:(0,r.css)({fontSize:e.typography.bodySmall.fontSize,color:e.colors.text.secondary,fontStyle:"italic"}),grid:(0,r.css)({display:"grid",gridGap:e.spacing(1),gridTemplateColumns:"repeat(auto-fill, 144px)",marginBottom:e.spacing(1),justifyContent:"space-evenly"})});var gn=n(7874),fn=n(87092);const mn=e=>{let{isCurrent:t,plugin:n,onClick:r,disabled:o}=e;return(0,M.jsx)(fn.X,{title:n.name,plugin:n,description:n.info.description,onClick:r,isCurrent:t,disabled:o,showBadge:!0})};var bn;function yn(e){let{searchQuery:t,onChange:n,current:r,data:o}=e;const i=(0,c.useStyles2)(vn),s=(0,a.useMemo)((()=>(0,gn.x)()),[]),l=(0,a.useMemo)((()=>(0,gn.r)(s,t,r)),[r,s,t]);return 0===l.length?bn||(bn=(0,M.jsx)(c.EmptySearchResult,{children:"Could not find anything matching your query"})):(0,M.jsx)("div",{className:i.grid,children:l.map(((e,t)=>(0,M.jsx)(mn,{disabled:!1,isCurrent:e.id===r.id,plugin:e,onClick:t=>n({pluginId:e.id,withModKey:Boolean(t.metaKey||t.ctrlKey||t.altKey)})},e.id)))})}mn.displayName="VizTypePickerPlugin";const vn=e=>({grid:r.css`
      max-width: 100%;
      display: grid;
      grid-gap: ${e.spacing(.5)};
    `,heading:(0,r.css)(Object.assign({},e.typography.h5,{margin:e.spacing(0,.5,1)}))});var Sn=n(35943);const xn=e=>{let{panel:t,data:n}=e;const r=(0,s.useSelector)(qt(t.type)),[o,i]=(0,a.useState)(""),[d,u]=(0,Kt.Z)(Jt.FL,Sn.Ok.Visualizations),p=(0,s.useDispatch)(),h=(0,c.useStyles)(Mn),g=(0,a.useRef)(null),f=(0,a.useCallback)((e=>{p((0,H.Kc)(Object.assign({panel:t},e))),e.withModKey||p((0,V.g_)(!1))}),[p,t]);(0,a.useEffect)((()=>{g.current&&g.current.focus()}),[d]);if(!r)return null;const m=[{label:"Visualizations",value:Sn.Ok.Visualizations},{label:"Suggestions",value:Sn.Ok.Suggestions},{label:"Library panels",value:Sn.Ok.LibraryPanels,description:"Reusable panels you can share between multiple dashboards."}];return(0,M.jsxs)("div",{className:h.openWrapper,children:[(0,M.jsxs)("div",{className:h.formBox,children:[(0,M.jsxs)("div",{className:h.searchRow,children:[(0,M.jsx)(c.FilterInput,{value:o,onChange:i,ref:g,autoFocus:!0,placeholder:"Search for..."}),(0,M.jsx)(c.Button,{title:"Close",variant:"secondary",icon:"angle-up",className:h.closeButton,"aria-label":l.wl.components.PanelEditor.toggleVizPicker,onClick:()=>{p((0,V.g_)(!1))}})]}),(0,M.jsx)(Yt.g,{className:h.customFieldMargin,children:(0,M.jsx)(c.RadioButtonGroup,{options:m,value:d,onChange:u,fullWidth:!0})})]}),(0,M.jsx)("div",{className:h.scrollWrapper,children:(0,M.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,M.jsxs)("div",{className:h.scrollContent,children:[d===Sn.Ok.Visualizations&&(0,M.jsx)(yn,{current:r.meta,onChange:f,searchQuery:o,data:n,onClose:()=>{}}),d===Sn.Ok.Suggestions&&(0,M.jsx)(pn,{current:r.meta,onChange:f,searchQuery:o,panel:t,data:n,onClose:()=>{}}),d===Sn.Ok.LibraryPanels&&(0,M.jsx)(on,{searchQuery:o,panel:t},"Panel Library")]})})})]})};xn.displayName="VisualizationSelectPane";const Mn=e=>({icon:r.css`
      color: ${e.palette.gray33};
    `,wrapper:r.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 0;
      height: 100%;
    `,vizButton:r.css`
      text-align: left;
    `,scrollWrapper:r.css`
      flex-grow: 1;
      min-height: 0;
    `,scrollContent:r.css`
      padding: ${e.spacing.sm};
    `,openWrapper:r.css`
      display: flex;
      flex-direction: column;
      flex: 1 1 100%;
      height: 100%;
      background: ${e.colors.bg1};
      border: 1px solid ${e.colors.border1};
    `,searchRow:r.css`
      display: flex;
      margin-bottom: ${e.spacing.sm};
    `,closeButton:r.css`
      margin-left: ${e.spacing.sm};
    `,customFieldMargin:r.css`
      margin-bottom: ${e.spacing.sm};
    `,formBox:r.css`
      padding: ${e.spacing.sm};
      padding-bottom: 0;
    `}),kn=e=>{let{plugin:t,panel:n,onFieldConfigsChange:r,onPanelOptionsChanged:o,onPanelConfigChange:i,dashboard:a,instanceState:d}=e;const u=(0,c.useStyles)(wn),p=(0,s.useSelector)((e=>e.panelEditor.isVizPickerOpen)),{data:h}=ae(n,{withTransforms:!0,withFieldConfig:!1},!0);return(0,M.jsxs)("div",{className:u.wrapper,"aria-label":l.wl.components.PanelEditor.OptionsPane.content,children:[!p&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{className:u.vizButtonWrapper,children:(0,M.jsx)(Qt,{panel:n})}),(0,M.jsx)("div",{className:u.optionsWrapper,children:(0,M.jsx)($t,{panel:n,dashboard:a,plugin:t,instanceState:d,data:h,onFieldConfigsChange:r,onPanelOptionsChanged:o,onPanelConfigChange:i})})]}),p&&(0,M.jsx)(xn,{panel:n,data:h})]})},wn=e=>({wrapper:r.css`
      height: 100%;
      width: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      padding: 0;
    `,optionsWrapper:r.css`
      flex-grow: 1;
      min-height: 0;
    `,vizButtonWrapper:r.css`
      padding: 0 ${e.spacing.md} ${e.spacing.md} 0;
    `,legacyOptions:r.css`
      label: legacy-options;
      .panel-options-grid {
        display: flex;
        flex-direction: column;
      }
      .panel-options-group {
        margin-bottom: 0;
      }
      .panel-options-group__body {
        padding: ${e.spacing.md} 0;
      }

      .section {
        display: block;
        margin: ${e.spacing.md} 0;

        &:first-child {
          margin-top: 0;
        }
      }
    `});var On=n(60301),Cn=n(35230),jn=n(75478);function zn(e){let{width:t,height:n,panel:r,dashboard:o}=e;const{data:i}=ae(r,{withTransforms:!0,withFieldConfig:!1},!1),[s,l]=(0,a.useState)({frameIndex:0,showHeader:!0,showTypeIcons:!0});return(0,a.useEffect)((()=>{const e=(0,jn.$t)(),n=(0,On.W1)(r,e.timeRange()),i=r.events.subscribe(d.RefreshEvent,(()=>{r.runAllPanelQueries(o.id,o.getTimezone(),n,t)}));return()=>{i.unsubscribe()}}),[r,o,t]),i?(0,M.jsx)(c.PanelChrome,{width:t,height:n,padding:"none",children:(e,t)=>{var n;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Cn.Z,{panel:r,error:null==i||null===(n=i.error)||void 0===n?void 0:n.message}),(0,M.jsx)(dn.$,{title:"Raw data",pluginId:"table",width:e,height:t,data:i,options:s,onOptionsChange:l})]})}}):null}var Pn=n(28436),Bn=n(92565);function Tn(e){let{message:t}=e;const n=(0,a.useCallback)((()=>{d.locationService.partial({tab:Sn.Ip.Query})}),[]);return(0,M.jsx)(Bn.Ar,{justify:"center",style:{marginTop:"100px"},children:(0,M.jsxs)(c.VerticalGroup,{spacing:"md",children:[(0,M.jsx)("h2",{children:t}),(0,M.jsx)("div",{children:(0,M.jsx)(c.Button,{size:"md",variant:"secondary",icon:"arrow-left",onClick:n,children:"Go back to Queries"})})]})})}var Wn,Rn,Dn=n(45243);function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class En extends a.PureComponent{constructor(){super(...arguments),In(this,"state",{stateHistoryItems:[]}),In(this,"clearHistory",(async()=>{const{dashboard:e,panelId:t,onRefresh:n}=this.props;await(0,d.getBackendSrv)().post("/api/annotations/mass-delete",{dashboardId:e.id,panelId:t}),this.setState({stateHistoryItems:[]}),n()}))}componentDidMount(){const{dashboard:e,panelId:t}=this.props;(0,d.getBackendSrv)().get(`/api/annotations?dashboardId=${e.id}&panelId=${t}&limit=50&type=alert`,{},`state-history-${e.id}-${t}`).then((t=>{const n=t.map((t=>({stateModel:Dn.Z.getStateDisplayModel(t.newState),time:e.formatDate(t.time,"MMM D, YYYY HH:mm:ss"),info:Dn.Z.getAlertAnnotationInfo(t)})));this.setState({stateHistoryItems:n})}))}render(){const{stateHistoryItems:e}=this.state;return(0,M.jsxs)("div",{children:[e.length>0&&(0,M.jsxs)("div",{className:"p-b-1",children:[Wn||(Wn=(0,M.jsx)("span",{className:"muted",children:"Last 50 state changes"})),(0,M.jsx)(c.ConfirmButton,{onConfirm:this.clearHistory,confirmVariant:"destructive",confirmText:"Clear",children:(0,M.jsx)(c.Button,{className:r.css`
                  direction: ltr;
                `,variant:"destructive",icon:"trash-alt",children:"Clear history"})})]}),(0,M.jsx)("ol",{className:"alert-rule-list",children:e.length>0?e.map(((e,t)=>(0,M.jsxs)("li",{className:"alert-rule-item",children:[(0,M.jsx)("div",{className:`alert-rule-item__icon ${e.stateModel.stateClass}`,children:(0,M.jsx)(c.Icon,{name:e.stateModel.iconClass,size:"xl"})}),(0,M.jsxs)("div",{className:"alert-rule-item__body",children:[(0,M.jsxs)("div",{className:"alert-rule-item__header",children:[(0,M.jsx)("p",{className:"alert-rule-item__name",children:e.alertName}),(0,M.jsx)("div",{className:"alert-rule-item__text",children:(0,M.jsx)("span",{className:`${e.stateModel.stateClass}`,children:e.stateModel.text})})]}),e.info]}),(0,M.jsx)("div",{className:"alert-rule-item__time",children:e.time})]},`${e.time}-${t}`))):Rn||(Rn=(0,M.jsx)("i",{children:"No state changes recorded"}))})]})}}const An=En;var Fn,Ln,Nn;function _n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class $n extends a.PureComponent{constructor(){super(...arguments),_n(this,"state",{isLoading:!1,allNodesExpanded:null,testRuleResponse:{}}),_n(this,"formattedJson",void 0),_n(this,"clipboard",void 0),_n(this,"setFormattedJson",(e=>{this.formattedJson=e})),_n(this,"getTextForClipboard",(()=>JSON.stringify(this.formattedJson,null,2))),_n(this,"onClipboardSuccess",(()=>{R.Z.emit(ie.AppEvents.alertSuccess,["Content copied to clipboard"])})),_n(this,"onToggleExpand",(()=>{this.setState((e=>Object.assign({},e,{allNodesExpanded:!this.state.allNodesExpanded})))})),_n(this,"getNrOfOpenNodes",(()=>null===this.state.allNodesExpanded?3:this.state.allNodesExpanded?20:1)),_n(this,"renderExpandCollapse",(()=>{const{allNodesExpanded:e}=this.state,t=(0,M.jsxs)(M.Fragment,{children:[Fn||(Fn=(0,M.jsx)(c.Icon,{name:"minus-circle"}))," Collapse All"]}),n=(0,M.jsxs)(M.Fragment,{children:[Ln||(Ln=(0,M.jsx)(c.Icon,{name:"plus-circle"}))," Expand All"]});return e?t:n}))}componentDidMount(){this.testRule()}async testRule(){const{dashboard:e,panel:t}=this.props,n=e.getSaveModelClone();n.panels=n.panels.map((e=>e.id===t.id?t.getSaveModel():e));const r={dashboard:n,panelId:t.id};this.setState({isLoading:!0});const o=await(0,d.getBackendSrv)().post("/api/alerts/test",r);this.setState({isLoading:!1,testRuleResponse:o})}render(){const{testRuleResponse:e,isLoading:t}=this.state;if(!0===t)return Nn||(Nn=(0,M.jsx)(c.LoadingPlaceholder,{text:"Evaluating rule"}));const n=this.getNrOfOpenNodes();return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{className:"pull-right",children:(0,M.jsxs)(c.HorizontalGroup,{spacing:"md",children:[(0,M.jsx)("div",{onClick:this.onToggleExpand,children:this.renderExpandCollapse()}),(0,M.jsx)(c.ClipboardButton,{getText:this.getTextForClipboard,onClipboardCopy:this.onClipboardSuccess,icon:"copy",children:"Copy to Clipboard"})]})}),(0,M.jsx)(c.JSONFormatter,{json:e,open:n,onDidRender:this.setFormattedJson})]})}}var Hn,Gn=n(75693);function Vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Un extends a.PureComponent{constructor(){super(...arguments),Vn(this,"element",void 0),Vn(this,"component",void 0),Vn(this,"panelCtrl",void 0),Vn(this,"state",{validationMessage:"",showStateHistory:!1,showDeleteConfirmation:!1,showTestRule:!1}),Vn(this,"onAngularPanelUpdated",(()=>{this.forceUpdate()})),Vn(this,"onAddAlert",(()=>{var e,t;null===(e=this.panelCtrl)||void 0===e||e._enableAlert(),null===(t=this.component)||void 0===t||t.digest(),this.forceUpdate()})),Vn(this,"onToggleModal",(e=>{const t=this.state[e];this.setState(Object.assign({},this.state,{[e]:!t}))})),Vn(this,"renderTestRule",(()=>{if(!this.state.showTestRule)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showTestRule");return(0,M.jsx)(c.Modal,{isOpen:!0,icon:"bug",title:"Testing rule",onDismiss:n,onClickBackdrop:n,children:(0,M.jsx)($n,{panel:e,dashboard:t})})})),Vn(this,"renderDeleteConfirmation",(()=>{if(!this.state.showDeleteConfirmation)return null;const{panel:e}=this.props,t=()=>this.onToggleModal("showDeleteConfirmation");return(0,M.jsx)(c.ConfirmModal,{isOpen:!0,icon:"trash-alt",title:"Delete",body:Hn||(Hn=(0,M.jsxs)("div",{children:["Are you sure you want to delete this alert rule?",(0,M.jsx)("br",{}),(0,M.jsx)("small",{children:"You need to save dashboard for the delete to take effect."})]})),confirmText:"Delete alert",onDismiss:t,onConfirm:()=>{var n;delete e.alert,e.thresholds=[],this.panelCtrl&&(this.panelCtrl.alertState=null,this.panelCtrl.render()),null===(n=this.component)||void 0===n||n.digest(),t()}})})),Vn(this,"renderStateHistory",(()=>{if(!this.state.showStateHistory)return null;const{panel:e,dashboard:t}=this.props,n=()=>this.onToggleModal("showStateHistory");return(0,M.jsx)(c.Modal,{isOpen:!0,icon:"history",title:"State history",onDismiss:n,onClickBackdrop:n,children:(0,M.jsx)(An,{dashboard:t,panelId:e.id,onRefresh:()=>{var e;return null===(e=this.panelCtrl)||void 0===e?void 0:e.refresh()}})})}))}async componentDidMount(){d.config.angularSupportEnabled?(await Promise.all([n.e(3964),n.e(5718)]).then(n.bind(n,61316)),this.loadAlertTab()):alert("Angular support disabled, legacy alerting cannot function without angular support")}componentDidUpdate(e){this.loadAlertTab()}componentWillUnmount(){this.component&&this.component.destroy()}async loadAlertTab(){const{panel:e,angularPanelComponent:t}=this.props;if(!this.element||this.component)return;if(t){const e=t.getScope();if(!e.$$childHead)return void setTimeout((()=>{this.forceUpdate()}));this.panelCtrl=e.$$childHead.ctrl}else this.panelCtrl=this.getReactAlertPanelCtrl();const n=(0,d.getAngularLoader)(),r={ctrl:this.panelCtrl};this.component=n.load(this.element,r,"<alert-tab />");const o=await(0,Gn.E)(e.transformations,e.targets,(0,d.getDataSourceSrv)(),e.datasource);o&&this.setState({validationMessage:o})}getReactAlertPanelCtrl(){return{panel:this.props.panel,events:new ie.EventBusSrv,render:()=>{this.props.panel.render()}}}render(){const{alert:e,transformations:t}=this.props.panel,{validationMessage:n}=this.state,r=t&&t.length>0;if(!e&&n)return(0,M.jsx)(Tn,{message:n});const o={title:"Panel has no alert rule defined",buttonIcon:"bell",onClick:this.onAddAlert,buttonTitle:"Create Alert"};return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,M.jsx)(c.Container,{padding:"md",children:(0,M.jsxs)("div",{"aria-label":l.wl.components.AlertTab.content,children:[e&&r&&(0,M.jsx)(c.Alert,{severity:m.F1.Error,title:"Transformations are not supported in alert queries"}),(0,M.jsx)("div",{ref:e=>this.element=e}),e&&(0,M.jsxs)(c.HorizontalGroup,{children:[(0,M.jsx)(c.Button,{onClick:()=>this.onToggleModal("showStateHistory"),variant:"secondary",children:"State history"}),(0,M.jsx)(c.Button,{onClick:()=>this.onToggleModal("showTestRule"),variant:"secondary",children:"Test rule"}),(0,M.jsx)(c.Button,{onClick:()=>this.onToggleModal("showDeleteConfirmation"),variant:"destructive",children:"Delete"})]}),!e&&!n&&(0,M.jsx)(Pn.Z,Object.assign({},o))]})})}),this.renderTestRule(),this.renderDeleteConfirmation(),this.renderStateHistory()]})}}const qn=(0,s.connect)(((e,t)=>{var n;return{angularPanelComponent:null===(n=(0,oe.i)(e,t.panel))||void 0===n?void 0:n.angularComponent}}),{})(Un);var Qn,Zn,Kn=n(50475);const Yn=e=>{let{dashboard:t,panel:n,className:r}=e;const o=(0,s.useSelector)((e=>e.templating)),i=(0,W.TH)(),{loading:a,value:l}=(0,I.Z)((()=>(0,Kn.aR)(n,t)),[n,t,o]);if(a)return Qn||(Qn=(0,M.jsx)(c.Button,{disabled:!0,children:"Create alert rule from this panel"}));if(!l)return Zn||(Zn=(0,M.jsx)(c.Alert,{severity:"info",title:"No alerting capable query found",children:"Cannot create alerts from this panel because no query to an alerting capable datasource is found."}));const d=ie.urlUtil.renderUrl("alerting/new",{defaults:JSON.stringify(l),returnTo:i.pathname+i.search});return(0,M.jsx)(c.LinkButton,{icon:"bell",href:d,className:r,"data-testid":"create-alert-rule-button",children:"Create alert rule from this panel"})};var Jn=n(86692),Xn=n(83809),er=n(85464),tr=n(19462),nr=n(8455),rr=n(75678),or=n(33899);function ir(e){var t,n;let{dashboard:r,panel:o,poll:i=!1}=e;const l=(0,s.useDispatch)(),d=null!==(t=(0,or._)((e=>e.promRules[tr.GC])))&&void 0!==t?t:nr.oq,c=null!==(n=(0,or._)((e=>e.rulerRules[tr.GC])))&&void 0!==n?n:nr.oq;(0,a.useEffect)((()=>{const e=()=>{l((0,Xn.y6)({rulesSourceName:tr.GC,filter:{dashboardUID:r.uid,panelId:o.id}})),l((0,Xn.UR)({rulesSourceName:tr.GC,filter:{dashboardUID:r.uid,panelId:o.id}}))};if(e(),i){const t=setInterval(e,er.p4);return()=>{clearInterval(t)}}return()=>{}}),[l,i,o.id,r.uid]);const u=d.loading||c.loading,p=[d.error,c.error].filter((e=>!!e)),h=(0,rr.Zo)(tr.GC);return{rules:(0,a.useMemo)((()=>h.flatMap((e=>e.groups)).flatMap((e=>e.rules)).filter((e=>e.annotations[er.q6.dashboardUID]===r.uid&&e.annotations[er.q6.panelID]===String(o.id)))),[h,r,o]),errors:p,loading:u}}var ar,sr,lr,dr=n(82969);const cr=e=>({newButton:r.css`
    margin-top: ${e.spacing(3)};
  `,innerWrapper:r.css`
    padding: ${e.spacing(2)};
  `,noRulesWrapper:r.css`
    margin: ${e.spacing(2)};
    background-color: ${e.colors.background.secondary};
    padding: ${e.spacing(3)};
  `}),ur=d.config.unifiedAlertingEnabled?e=>{let{dashboard:t,panel:n}=e;const r=(0,c.useStyles2)(cr),{errors:o,loading:i,rules:a}=ir({dashboard:t,panel:n,poll:!0}),s=(0,dr.Bz)("grafana"),d=D.Vt.hasPermission(s.create),u=o.length?(0,M.jsx)(c.Alert,{title:"Errors loading rules",severity:"error",children:o.map(((e,t)=>(0,M.jsxs)("div",{children:["Failed to load Grafana rules state: ",e.message||"Unknown error."]},t)))}):null;return i&&!a.length?(0,M.jsxs)("div",{className:r.innerWrapper,children:[u,ar||(ar=(0,M.jsx)(c.LoadingPlaceholder,{text:"Loading rules..."}))]}):a.length?(0,M.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,M.jsxs)("div",{className:r.innerWrapper,children:[u,(0,M.jsx)(Jn.i,{rules:a}),!!t.meta.canSave&&d&&(0,M.jsx)(Yn,{className:r.newButton,panel:n,dashboard:t})]})}):(0,M.jsxs)("div",{"aria-label":l.wl.components.PanelAlertTabContent.content,className:r.noRulesWrapper,children:[u,!!t.uid&&(0,M.jsxs)(M.Fragment,{children:[sr||(sr=(0,M.jsx)("p",{children:"There are no alert rules linked to this panel."})),!!t.meta.canSave&&d&&(0,M.jsx)(Yn,{panel:n,dashboard:t})]}),!t.uid&&!!t.meta.canSave&&(lr||(lr=(0,M.jsx)(c.Alert,{severity:"info",title:"Dashboard not saved",children:"Dashboard must be saved before alerts can be added."})))]})}:qn;var pr=n(60540);const hr=["panel","dashboard"];const gr=e=>{let{panel:t,dashboard:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,hr);const{rules:o,loading:i}=ir({panel:t,dashboard:n});return(0,M.jsx)(pr.O,Object.assign({},r,{counter:i?null:o.length}))};var fr=n(48435),mr=n(56082);const br={[ie.DocsId.Transformations]:"https://grafana.com/docs/grafana/latest/panels/transformations",[ie.DocsId.FieldConfig]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/",[ie.DocsId.FieldConfigOverrides]:"https://grafana.com/docs/grafana/latest/panels/field-configuration-options/#override-a-field"};var yr,vr=n(30978),Sr=n(17433),xr=n(7259),Mr=n(95448),kr=n(71623),wr=n(44998);const Or=e=>{let{debugMode:t,index:n,data:r,uiConfig:o,configs:i,onChange:s}=e;const d=(0,c.useStyles)(Cr),[u,p]=(0,a.useState)([]),[h,g]=(0,a.useState)([]),f=(0,a.useMemo)((()=>i[n]),[i,n]);(0,a.useEffect)((()=>{const e=i.slice(0,n).map((e=>e.transformation)),t=i.slice(n,n+1).map((e=>e.transformation)),o=(0,ie.transformDataFrame)(e,r).subscribe(p),a=(0,ie.transformDataFrame)(e,r).pipe((0,wr.z)((e=>(0,ie.transformDataFrame)(t,e)))).subscribe(g);return function(){o.unsubscribe(),a.unsubscribe()}}),[n,r,i]);const m=(0,a.useMemo)((()=>a.createElement(o.editor,{options:Object.assign({},o.transformation.defaultOptions,f.transformation.options),input:u,onChange:e=>{s(n,{id:f.transformation.id,options:e})}})),[o.editor,o.transformation.defaultOptions,f.transformation.options,f.transformation.id,u,s,n]);return(0,M.jsxs)("div",{className:d.editor,"aria-label":l.wl.components.TransformTab.transformationEditor(o.name),children:[m,t&&(0,M.jsxs)("div",{className:d.debugWrapper,"aria-label":l.wl.components.TransformTab.transformationEditorDebugger(o.name),children:[(0,M.jsxs)("div",{className:d.debug,children:[(0,M.jsx)("div",{className:d.debugTitle,children:"Transformation input data"}),(0,M.jsx)("div",{className:d.debugJson,children:(0,M.jsx)(c.JSONFormatter,{json:u})})]}),(0,M.jsx)("div",{className:d.debugSeparator,children:yr||(yr=(0,M.jsx)(c.Icon,{name:"arrow-right"}))}),(0,M.jsxs)("div",{className:d.debug,children:[(0,M.jsx)("div",{className:d.debugTitle,children:"Transformation output data"}),(0,M.jsx)("div",{className:d.debugJson,children:h&&(0,M.jsx)(c.JSONFormatter,{json:h})})]})]})]})},Cr=e=>{const t=e.isLight?e.palette.gray85:e.palette.gray15;return{title:r.css`
      display: flex;
      padding: 4px 8px 4px 8px;
      position: relative;
      height: 35px;
      border-radius: 4px 4px 0 0;
      flex-wrap: nowrap;
      justify-content: space-between;
      align-items: center;
    `,name:r.css`
      font-weight: ${e.typography.weight.semibold};
      color: ${e.colors.textBlue};
    `,iconRow:r.css`
      display: flex;
    `,icon:r.css`
      background: transparent;
      border: none;
      box-shadow: none;
      cursor: pointer;
      color: ${e.colors.textWeak};
      margin-left: ${e.spacing.sm};
      &:hover {
        color: ${e.colors.text};
      }
    `,editor:r.css``,debugWrapper:r.css`
      display: flex;
      flex-direction: row;
    `,debugSeparator:r.css`
      width: 48px;
      min-height: 300px;
      display: flex;
      align-items: center;
      align-self: stretch;
      justify-content: center;
      margin: 0 ${e.spacing.xs};
      color: ${e.colors.textBlue};
    `,debugTitle:r.css`
      padding: ${e.spacing.sm} ${e.spacing.xxs};
      font-family: ${e.typography.fontFamily.monospace};
      font-size: ${e.typography.size.sm};
      color: ${e.colors.text};
      border-bottom: 1px solid ${t};
      flex-grow: 0;
      flex-shrink: 1;
    `,debug:r.css`
      margin-top: ${e.spacing.sm};
      padding: 0 ${e.spacing.sm} ${e.spacing.sm} ${e.spacing.sm};
      border: 1px solid ${t};
      background: ${e.isLight?e.palette.white:e.palette.gray05};
      border-radius: ${e.border.radius.sm};
      width: 100%;
      min-height: 300px;
      display: flex;
      flex-direction: column;
      align-self: stretch;
    `,debugJson:r.css`
      flex-grow: 1;
      height: 100%;
      overflow: hidden;
      padding: ${e.spacing.xs};
    `}},jr=e=>{var t;let{onRemove:n,index:r,id:o,data:i,configs:s,uiConfig:l,onChange:d}=e;const[u,p]=(0,Sr.Z)(!1),[h,g]=(0,Sr.Z)(!1),f=s[r].transformation.disabled,m=(0,a.useCallback)((e=>{const t=s[e].transformation;d(e,Object.assign({},t,{disabled:!t.disabled||void 0}))}),[d,s]);return(0,M.jsxs)(kr.t,{id:o,index:r,title:l.name,draggable:!0,actions:e=>{let{isOpen:o}=e;return(0,M.jsxs)(c.HorizontalGroup,{align:"center",width:"auto",children:[l.state&&(0,M.jsx)(vr.u,{state:l.state}),t||(t=(0,M.jsx)(Mr.y,{title:"Show/hide transform help",icon:"info-circle",onClick:g,active:h})),(0,M.jsx)(Mr.y,{title:"Debug",disabled:!o,icon:"bug",onClick:p,active:u}),(0,M.jsx)(Mr.y,{title:"Disable/Enable transformation",icon:f?"eye-slash":"eye",onClick:()=>m(r),active:f}),(0,M.jsx)(Mr.y,{title:"Remove",icon:"trash-alt",onClick:()=>n(r)})]})},disabled:f,children:[h&&(0,M.jsx)(xr.h,{markdown:zr(l)}),(0,M.jsx)(Or,{debugMode:u,index:r,data:i,configs:s,uiConfig:l,onChange:d})]})};function zr(e){var t;return`\n${null!==(t=e.help)&&void 0!==t?t:e.description}\n\nGo the <a href="https://grafana.com/docs/grafana/latest/panels/transformations/?utm_source=grafana" target="_blank" rel="noreferrer">\ntransformation documentation\n</a> for more.\n`}const Pr=e=>{let{data:t,onChange:n,onRemove:r,configs:o}=e;return(0,M.jsx)(M.Fragment,{children:o.map(((e,i)=>{const a=ie.standardTransformersRegistry.getIfExists(e.transformation.id);return a?(0,M.jsx)(jr,{index:i,id:`${e.id}`,data:t,configs:o,uiConfig:a,onRemove:r,onChange:n},`${e.id}`):null}))})};var Br,Tr;function Wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Rr extends a.PureComponent{constructor(e){super(e),Wr(this,"subscription",void 0),Wr(this,"onSearchChange",(e=>{this.setState({search:e.target.value})})),Wr(this,"onSearchKeyDown",(e=>{if("Enter"===e.key){const{search:e}=this.state;if(e){const t=e.toLowerCase(),n=ie.standardTransformersRegistry.list().filter((e=>(e.name+e.description).toLowerCase().indexOf(t)>=0));n.length>0&&this.onTransformationAdd({value:n[0].id})}}else 27===e.keyCode&&(this.setState({search:"",showPicker:!1}),e.stopPropagation())})),Wr(this,"getTransformationNextId",(e=>{const{transformations:t}=this.state;let n=0;const r=t.filter((t=>t.id.startsWith(e))).map((e=>e.id));return 0!==r.length&&(n=Math.max(...r.map((e=>parseInt(e.match(/\d+/)[0],10))))+1),`${e}-${n}`})),Wr(this,"onTransformationAdd",(e=>{const{transformations:t}=this.state,n=this.getTransformationNextId(e.value);this.setState({search:"",showPicker:!1}),this.onChange([...t,{id:n,transformation:{id:e.value,options:{}}}])})),Wr(this,"onTransformationChange",((e,t)=>{const{transformations:n}=this.state,r=Array.from(n);r[e].transformation=t,this.onChange(r)})),Wr(this,"onTransformationRemove",(e=>{const{transformations:t}=this.state,n=Array.from(t);n.splice(e,1),this.onChange(n)})),Wr(this,"onDragEnd",(e=>{const{transformations:t}=this.state;if(!e||!e.destination)return;const n=e.source.index,r=e.destination.index;if(n===r)return;const o=Array.from(t),[i]=o.splice(n,1);o.splice(r,0,i),this.onChange(o)})),Wr(this,"renderTransformationEditors",(()=>{const{data:e,transformations:t}=this.state;return(0,M.jsx)(fr.Z5,{onDragEnd:this.onDragEnd,children:(0,M.jsx)(fr.bK,{droppableId:"transformations-list",direction:"vertical",children:n=>(0,M.jsxs)("div",Object.assign({ref:n.innerRef},n.droppableProps,{children:[(0,M.jsx)(Pr,{configs:t,data:e,onRemove:this.onTransformationRemove,onChange:this.onTransformationChange}),n.placeholder]}))})})}));const t=e.panel.transformations||[],n=this.buildTransformationIds(t);this.state={transformations:t.map(((e,t)=>({transformation:e,id:n[t]}))),data:[],search:""}}buildTransformationIds(e){const t={},n=[];for(let r=0;r<e.length;r++){const o=e[r];void 0===t[o.id]?t[o.id]=0:t[o.id]+=1,n.push(`${e[r].id}-${t[e[r].id]}`)}return n}componentDidMount(){this.subscription=this.props.panel.getQueryRunner().getData({withTransforms:!1,withFieldConfig:!1}).subscribe({next:e=>this.setState({data:e.series})})}componentWillUnmount(){this.subscription&&this.subscription.unsubscribe()}onChange(e){this.setState({transformations:e}),this.props.panel.setTransformations(e.map((e=>e.transformation)))}renderTransformsPicker(){const{transformations:e,search:t}=this.state;let n=null,r=ie.standardTransformersRegistry.list().sort(((e,t)=>e.name>t.name?1:t.name>e.name?-1:0));if(t){const e=t.toLowerCase(),o=r.filter((t=>(t.name+t.description).toLowerCase().indexOf(e)>=0));n=(0,M.jsxs)(M.Fragment,{children:[o.length," / ",r.length,"   ",(0,M.jsx)(c.IconButton,{name:"times",onClick:()=>{this.setState({search:""})}})]}),r=o}const o=!(null!=e&&e.length),i=o||this.state.showPicker;return n||!i||o||(n=(0,M.jsx)(c.IconButton,{name:"times",onClick:()=>{this.setState({showPicker:!1})}})),(0,M.jsxs)(M.Fragment,{children:[o&&(0,M.jsx)(c.Container,{grow:1,children:(0,M.jsx)(mr.G,{storageKey:"dashboard.components.TransformationEditor.featureInfoBox.isDismissed",defaultValue:!1,children:(e,t)=>{return e?null:(0,M.jsxs)(c.Alert,{title:"Transformations",severity:"info",onRemove:()=>{t(!0)},children:[Br||(Br=(0,M.jsxs)("p",{children:["Transformations allow you to join, calculate, re-order, hide, and rename your query results before they are visualized. ",(0,M.jsx)("br",{}),"Many transforms are not suitable if you're using the Graph visualization, as it currently only supports time series data. ",(0,M.jsx)("br",{}),"It can help to switch to the Table visualization to understand what a transformation is doing."," "]})),(0,M.jsx)("a",{href:(n=ie.DocsId.Transformations,br[n]),className:"external-link",target:"_blank",rel:"noreferrer",children:"Read more"})]});var n}})}),i?(0,M.jsxs)(c.VerticalGroup,{children:[(0,M.jsx)(c.Input,{"aria-label":l.wl.components.Transforms.searchInput,value:null!=t?t:"",autoFocus:!o,placeholder:"Add transformation",onChange:this.onSearchChange,onKeyDown:this.onSearchKeyDown,suffix:n}),r.map((e=>(0,M.jsx)(Dr,{transform:e,onClick:()=>{this.onTransformationAdd({value:e.id})}},e.name)))]}):(0,M.jsx)(c.Button,{icon:"plus",variant:"secondary",onClick:()=>{this.setState({showPicker:!0})},children:"Add transformation"})]})}render(){const{panel:{alert:e}}=this.props,{transformations:t}=this.state,n=t.length>0;return!n&&e?Tr||(Tr=(0,M.jsx)(Tn,{message:"Transformations can't be used on a panel with existing alerts"})):(0,M.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",children:(0,M.jsx)(c.Container,{padding:"md",children:(0,M.jsxs)("div",{"aria-label":l.wl.components.TransformTab.content,children:[n&&e?(0,M.jsx)(c.Alert,{severity:m.F1.Error,title:"Transformations can't be used on a panel with alerts"}):null,n&&this.renderTransformationEditors(),this.renderTransformsPicker()]})})})}}function Dr(e){let{transform:t,onClick:n}=e;const r=(0,c.useStyles2)(Ir);return(0,M.jsxs)(c.Card,{className:r.card,"aria-label":l.wl.components.TransformTab.newTransform(t.name),onClick:n,children:[(0,M.jsx)(c.Card.Heading,{children:t.name}),(0,M.jsx)(c.Card.Meta,{children:t.description}),t.state&&(0,M.jsx)(c.Card.Tags,{children:(0,M.jsx)(vr.u,{state:t.state})})]})}const Ir=e=>({card:r.css`
      margin: 0;
      padding: ${e.spacing(1)};
    `}),Er=(0,c.withTheme)(Rr);var Ar=n(67436),Fr=n(73833);function Lr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nr extends a.PureComponent{constructor(e){super(e),Lr(this,"onRunQueries",(()=>{this.props.panel.refresh()})),Lr(this,"onOpenQueryInspector",(()=>{d.locationService.partial({inspect:this.props.panel.id,inspectTab:"query"})})),Lr(this,"onOptionsChange",(e=>{var t;const{panel:n}=this.props;n.updateQueries(e),e.dataSource.uid!==(null===(t=n.datasource)||void 0===t?void 0:t.uid)&&setTimeout(this.onRunQueries,10),this.forceUpdate()}))}buildQueryOptions(e){var t,n;const r=null!==(t=e.datasource)&&void 0!==t?t:{default:!0},o=(0,Ar.ak)().getInstanceSettings(r);return{cacheTimeout:null!=o&&null!==(n=o.meta.queryOptions)&&void 0!==n&&n.cacheTimeout?e.cacheTimeout:void 0,dataSource:{default:null==o?void 0:o.isDefault,type:null==o?void 0:o.type,uid:null==o?void 0:o.uid},queries:e.targets,maxDataPoints:e.maxDataPoints,minInterval:e.interval,timeRange:{from:e.timeFrom,shift:e.timeShift,hide:e.hideTimeOverride}}}async componentDidMount(){const{panel:e}=this.props;if(!e.datasource){const t=(0,Ar.ak)().getInstanceSettings(null);e.datasource=(0,ie.getDataSourceRef)(t),this.forceUpdate()}}render(){const{panel:e}=this.props;if(!e.datasource)return null;const t=this.buildQueryOptions(e);return(0,M.jsx)(Fr.D,{options:t,queryRunner:e.getQueryRunner(),onRunQueries:this.onRunQueries,onOpenQueryInspector:this.onOpenQueryInspector,onOptionsChange:this.onOptionsChange})}}const _r=a.memo((e=>{let{panel:t,dashboard:n,tabs:r,onChangeTab:o}=e;const i=(0,c.useForceUpdate)(),s=(0,c.useStyles2)(Hr);(0,a.useEffect)((()=>{const e=new xe.w0;return e.add(t.events.subscribe(b.pO,i)),e.add(t.events.subscribe(b.Xw,i)),()=>e.unsubscribe()}),[t,n,i]);const l=r.find((e=>e.active));return 0===r.length?null:(0,M.jsxs)("div",{className:s.wrapper,children:[(0,M.jsx)(c.TabsBar,{className:s.tabBar,hideBorder:!0,children:r.map((e=>e.id===Sn.Ip.Alert?function(e,t,n,r){if(!d.config.alertingEnabled&&!d.config.unifiedAlertingEnabled)return null;if(d.config.unifiedAlertingEnabled)return(0,M.jsx)(gr,{label:e.text,active:e.active,onChangeTab:()=>r(e),icon:e.icon,panel:t,dashboard:n},e.id);if(d.config.alertingEnabled)return(0,M.jsx)(c.Tab,{label:e.text,active:e.active,onChangeTab:()=>r(e),icon:e.icon,counter:$r(t,e)},e.id);return null}(e,t,n,o):(0,M.jsx)(c.Tab,{label:e.text,active:e.active,onChangeTab:()=>o(e),icon:e.icon,counter:$r(t,e)},e.id)))}),(0,M.jsxs)(c.TabContent,{className:s.tabContent,children:[l.id===Sn.Ip.Query&&(0,M.jsx)(Nr,{panel:t,queries:t.targets}),l.id===Sn.Ip.Alert&&(0,M.jsx)(ur,{panel:t,dashboard:n}),l.id===Sn.Ip.Transform&&(0,M.jsx)(Er,{panel:t})]})]})}));function $r(e,t){var n;switch(t.id){case Sn.Ip.Query:return e.targets.length;case Sn.Ip.Alert:return e.alert?1:0;case Sn.Ip.Transform:return(null!==(n=e.getTransformations())&&void 0!==n?n:[]).length}return null}_r.displayName="PanelEditorTabs";const Hr=e=>({wrapper:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;
    `,tabBar:r.css`
      padding-left: ${e.spacing(2)};
    `,tabContent:r.css`
      padding: 0;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      min-height: 0;
      background: ${e.colors.background.primary};
      border: 1px solid ${e.components.panel.borderColor};
      border-left: none;
      border-bottom: none;
      border-top-right-radius: ${e.shape.borderRadius(1.5)};
    `});const Gr=(0,n(58635).Z)(((e,t)=>{var n;const r=[];if(!t)return r;let o=Sn.Ip.Visualize;if(t.meta.skipDataQuery)return[];t.meta.skipDataQuery||(o=Sn.Ip.Query,r.push({id:Sn.Ip.Query,text:"Query",icon:"database",active:!1}),r.push({id:Sn.Ip.Transform,text:"Transform",icon:"process",active:!1}));const{alertingEnabled:i,unifiedAlertingEnabled:a}=(0,Qe.iE)(),s=D.Vt.hasPermission((0,dr.Bz)(tr.GC).read),l=i||a&&s,d="graph"===t.meta.id,c="timeseries"===t.meta.id;(l&&d||c)&&r.push({id:Sn.Ip.Alert,text:"Alert",icon:"bell",active:!1});return(null!==(n=r.find((t=>t.id===(e||o))))&&void 0!==n?n:r[0]).active=!0,r}));var Vr;function Ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qr={initPanelEditor:function(e,t){return async n=>{const r=t.initEditPanel(e);await n((0,H.JI)(r)),n((0,V.Hl)({panel:r,sourcePanel:e}))}},discardPanelChanges:U,updatePanelEditorUIState:function(e){return(t,n)=>{const r=Object.assign({},n().panelEditor.ui,e);t((0,V.K9)(r));try{$.Z.setObject(V.jy,r)}catch(e){console.error(e)}}},updateTimeZoneForSession:it.YT,toggleTableView:V.OT,notifyApp:u.$l},Qr=(0,s.connect)(((e,t)=>{const n=e.panelEditor.getPanel(),r=(0,oe.i)(e,n);return{panel:n,plugin:null==r?void 0:r.plugin,instanceState:null==r?void 0:r.instanceState,initDone:e.panelEditor.initDone,uiState:e.panelEditor.ui,tableViewEnabled:e.panelEditor.tableViewEnabled,variables:(0,dt.gt)(t.dashboard.uid,e)}}),qr);class Zr extends a.PureComponent{constructor(){super(...arguments),Ur(this,"eventSubs",void 0),Ur(this,"state",{showSaveLibraryPanelModal:!1}),Ur(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),Ur(this,"onBack",(()=>{d.locationService.partial({editPanel:null,tab:null,showCategory:null})})),Ur(this,"onDiscard",(()=>{this.props.discardPanelChanges(),this.onBack()})),Ur(this,"onOpenDashboardSettings",(()=>{d.locationService.partial({editview:"settings"})})),Ur(this,"onSaveDashboard",(()=>{Xe.h$.publish(new b.Dn({component:pt.d,props:{dashboard:this.props.dashboard}}))})),Ur(this,"onSaveLibraryPanel",(async()=>{if(!(0,st.V)(this.props.panel))return;const e=await(0,A.Ef)(this.props.panel.libraryPanel.uid);if(0===e.length||1===e.length&&e.includes(this.props.dashboard.id))try{await(0,lt.i6)(this.props.panel,this.props.dashboard.meta.folderId),this.props.notifyApp((0,lt.bF)("Library panel saved"))}catch(e){this.props.notifyApp((0,lt.rm)(`Error saving library panel: "${e.statusText}"`))}else this.setState({showSaveLibraryPanelModal:!0})})),Ur(this,"onChangeTab",(e=>{d.locationService.partial({tab:e.id})})),Ur(this,"onFieldConfigChange",(e=>{this.props.panel.updateFieldConfig(Object.assign({},e))})),Ur(this,"onPanelOptionsChanged",(e=>{this.props.panel.updateOptions(e)})),Ur(this,"onPanelConfigChanged",((e,t)=>{this.props.panel.setProperty(e,t),this.props.panel.render(),this.forceUpdate()})),Ur(this,"onDisplayModeChange",(e=>{const{updatePanelEditorUIState:t}=this.props;this.props.tableViewEnabled&&this.props.toggleTableView(),t({mode:e})})),Ur(this,"onToggleTableView",(()=>{this.props.toggleTableView()})),Ur(this,"onTogglePanelOptions",(()=>{const{uiState:e,updatePanelEditorUIState:t}=this.props;t({isPanelOptionsVisible:!e.isPanelOptionsVisible})})),Ur(this,"onGoBackToDashboard",(()=>{d.locationService.partial({editPanel:null,tab:null,showCategory:null})})),Ur(this,"onConfirmAndDismissLibarayPanelModel",(()=>{this.setState({showSaveLibraryPanelModal:!1})}))}componentDidMount(){this.props.initPanelEditor(this.props.sourcePanel,this.props.dashboard)}componentDidUpdate(){const{panel:e,initDone:t}=this.props;t&&!this.eventSubs&&(this.eventSubs=new xe.w0,this.eventSubs.add(e.events.subscribe(b.Wj,this.triggerForceUpdate)))}componentWillUnmount(){var e;null===(e=this.eventSubs)||void 0===e||e.unsubscribe()}renderPanel(e,t){const{dashboard:n,panel:r,uiState:o,tableViewEnabled:i,theme:a}=this.props;return(0,M.jsxs)("div",{className:e.mainPaneWrapper,children:[this.renderPanelToolbar(e),(0,M.jsx)("div",{className:e.panelWrapper,children:(0,M.jsx)(Se.Z,{children:s=>{let{width:l,height:d}=s;if(l<3||d<3)return null;if(t&&(d-=2*a.spacing.gridSize),i)return(0,M.jsx)(zn,{width:l,height:d,panel:r,dashboard:n});const c=(0,ye.jF)(o.mode,l,d,r);return(0,M.jsx)("div",{className:e.centeringContainer,style:{width:l,height:d},children:(0,M.jsx)("div",{style:c,"data-panelid":r.id,children:(0,M.jsx)(ct.l,{stateKey:r.key,dashboard:n,panel:r,isEditing:!0,isViewing:!1,lazy:!1,width:c.width,height:c.height},r.key)})})}})})]},"panel")}renderPanelAndEditor(e){const{panel:t,dashboard:n,plugin:r,tab:o}=this.props,i=Gr(o,r),a=0===i.length,s=this.renderPanel(e,a);return 0===i.length?s:[s,(0,M.jsx)("div",{className:e.tabsWrapper,"aria-label":l.wl.components.PanelEditor.DataPane.content,children:(0,M.jsx)(_r,{panel:t,dashboard:n,tabs:i,onChangeTab:this.onChangeTab},t.key)},"panel-editor-tabs")]}renderTemplateVariables(e){const{variables:t}=this.props;return t.length?(0,M.jsx)("div",{className:e.variablesWrapper,children:(0,M.jsx)(ot,{variables:t})}):null}renderPanelToolbar(e){const{dashboard:t,uiState:n,variables:r,updateTimeZoneForSession:o,panel:i,tableViewEnabled:a}=this.props;return(0,M.jsx)("div",{className:e.panelToolbar,children:(0,M.jsxs)(c.HorizontalGroup,{justify:r.length>0?"space-between":"flex-end",align:"flex-start",children:[this.renderTemplateVariables(e),(0,M.jsxs)(c.HorizontalGroup,{children:[(0,M.jsx)(c.InlineSwitch,{label:"Table view",showLabel:!0,id:"table-view",value:a,onClick:this.onToggleTableView,"aria-label":l.wl.components.PanelEditor.toggleTableView}),(0,M.jsx)(c.RadioButtonGroup,{value:n.mode,options:Sn.d7,onChange:this.onDisplayModeChange}),(0,M.jsx)(ut.C,{dashboard:t,onChangeTimeZone:o}),!n.isPanelOptionsVisible&&(0,M.jsx)(Qt,{panel:i})]})]})})}renderEditorActions(){let e=[(0,M.jsx)(c.ToolbarButton,{icon:"cog",onClick:this.onOpenDashboardSettings,title:"Open dashboard settings"},"settings"),(0,M.jsx)(c.ToolbarButton,{onClick:this.onDiscard,title:"Undo all changes",children:"Discard"},"discard"),this.props.panel.libraryPanel?(0,M.jsx)(c.ToolbarButton,{onClick:this.onSaveLibraryPanel,variant:"primary",title:"Apply changes and save library panel",children:"Save library panel"},"save-panel"):(0,M.jsx)(c.ToolbarButton,{onClick:this.onSaveDashboard,title:"Apply changes and save dashboard",children:"Save"},"save"),(0,M.jsx)(c.ToolbarButton,{onClick:this.onBack,variant:"primary",title:"Apply changes and go back to dashboard","aria-label":l.wl.components.PanelEditor.applyButton,children:"Apply"},"apply")];return this.props.panel.libraryPanel&&(e.splice(1,0,(0,M.jsx)(c.ModalsController,{children:e=>{let{showModal:t,hideModal:n}=e;return(0,M.jsx)(c.ToolbarButton,{onClick:()=>{t(at.i,{onConfirm:()=>{delete this.props.panel.libraryPanel,this.props.panel.render(),this.forceUpdate()},onDismiss:n,isOpen:!0})},title:"Disconnects this panel from the library panel so that you can edit it regularly.",children:"Unlink"},"unlink")}},"unlink-controller")),e.pop()),e}renderOptionsPane(){const{plugin:e,dashboard:t,panel:n,instanceState:r}=this.props;return e?(0,M.jsx)(kn,{plugin:e,dashboard:t,panel:n,instanceState:r,onFieldConfigsChange:this.onFieldConfigChange,onPanelOptionsChanged:this.onPanelOptionsChanged,onPanelConfigChange:this.onPanelConfigChanged}):Vr||(Vr=(0,M.jsx)("div",{}))}render(){const{dashboard:e,initDone:t,updatePanelEditorUIState:n,uiState:r,theme:o}=this.props,i=Yr(o,this.props);return t?(0,M.jsxs)("div",{className:i.wrapper,"aria-label":l.wl.components.PanelEditor.General.content,children:[(0,M.jsx)(c.PageToolbar,{title:`${e.title} / Edit Panel`,onGoBack:this.onGoBackToDashboard,children:this.renderEditorActions()}),(0,M.jsx)("div",{className:i.verticalSplitPanesWrapper,children:(0,M.jsx)(Ke,{leftPaneComponents:this.renderPanelAndEditor(i),rightPaneComponents:this.renderOptionsPane(),uiState:r,updateUiState:n,rightPaneVisible:r.isPanelOptionsVisible})}),this.state.showSaveLibraryPanelModal&&(0,M.jsx)(N,{panel:this.props.panel,folderId:this.props.dashboard.meta.folderId,onConfirm:this.onConfirmAndDismissLibarayPanelModel,onDiscard:this.onDiscard,onDismiss:this.onConfirmAndDismissLibarayPanelModel})]}):null}}const Kr=(0,c.withTheme2)(Qr(Zr)),Yr=(0,c.stylesFactory)(((e,t)=>{const{uiState:n}=t,o=e.spacing(2);return{wrapper:r.css`
      width: 100%;
      height: 100%;
      position: fixed;
      z-index: ${e.zIndex.sidemenu};
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: ${e.colors.background.canvas};
      display: flex;
      flex-direction: column;
    `,verticalSplitPanesWrapper:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      position: relative;
    `,mainPaneWrapper:r.css`
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      padding-right: ${n.isPanelOptionsVisible?0:o};
    `,variablesWrapper:r.css`
      label: variablesWrapper;
      display: flex;
      flex-grow: 1;
      flex-wrap: wrap;
      gap: ${e.spacing(1,2)};
    `,panelWrapper:r.css`
      flex: 1 1 0;
      min-height: 0;
      width: 100%;
      padding-left: ${o};
    `,tabsWrapper:r.css`
      height: 100%;
      width: 100%;
    `,panelToolbar:r.css`
      display: flex;
      padding: 0 0 ${o} ${o};
      justify-content: space-between;
      flex-wrap: wrap;
    `,toolbarLeft:r.css`
      padding-left: ${e.spacing(1)};
    `,centeringContainer:r.css`
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      flex-direction: column;
    `}}));var Jr=n(84276),Xr=n(70930);const eo=e=>{let{annotation:t,events:n,onEnabledChanged:r}=e;const[o,i]=(0,a.useState)(!1),s=(0,c.useStyles2)(to);return(0,a.useEffect)((()=>{const e=n.getStream(b.z).subscribe({next:e=>{e.payload===t&&i(!0)}}),r=n.getStream(b.RB).subscribe({next:e=>{e.payload===t&&i(!1)}});return()=>{e.unsubscribe(),r.unsubscribe()}})),(0,M.jsx)("div",{className:s.annotation,children:(0,M.jsxs)(c.InlineFieldRow,{children:[(0,M.jsx)(c.InlineField,{label:t.name,disabled:o,children:(0,M.jsx)(c.InlineSwitch,{value:t.enable,onChange:()=>r(t),disabled:o})}),(0,M.jsx)("div",{className:s.indicator,children:(0,M.jsx)(Jr.T,{loading:o,onCancel:()=>(0,Xr.kt)().cancel(t)})})]})},t.name)};function to(e){return{annotation:r.css`
      display: inline-block;
      margin-right: ${e.spacing(1)};

      .fa-caret-down {
        font-size: 75%;
        padding-left: ${e.spacing(1)};
      }

      .gf-form-inline .gf-form {
        margin-bottom: 0;
      }
    `,indicator:r.css`
      align-self: center;
      padding: 0 ${e.spacing(.5)};
    `}}const no=e=>{let{annotations:t,onAnnotationChanged:n,events:r}=e;const[o,i]=(0,a.useState)([]);return(0,a.useEffect)((()=>{i(t.filter((e=>!0!==e.hide)))}),[t]),0===o.length?null:(0,M.jsx)(M.Fragment,{children:o.map((e=>(0,M.jsx)(eo,{events:r,annotation:e,onEnabledChanged:n},e.name)))})};var ro=n(37784),oo=n(95943),io=n(62564),ao=n(28659);const so=["link","children"];const lo=e=>{const{link:t,linkInfo:n}=e,o=(0,a.useRef)(null),[i,s]=(0,a.useState)("invisible"),[d,u]=(0,a.useState)(0),p=uo(e,d),h=(0,c.useStyles2)((e=>r.css`
        color: ${e.colors.text.primary};
      `));return(0,a.useLayoutEffect)((()=>{s(function(e){if(!e)return"invisible";const t=e.parentElement.getBoundingClientRect(),n=e.getBoundingClientRect();if(0===n.width)return"invisible";return t.left+n.width+10>window.innerWidth?"pull-left":"pull-right"}(o.current))}),[p]),t.asDropdown?(0,M.jsx)(co,{link:t,"data-testid":l.wl.components.DashboardLinks.dropDown,children:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(c.ToolbarButton,{onClick:()=>u(Date.now()),className:(0,r.cx)("gf-form-label gf-form-label--dashlink",h),"data-placement":"bottom","data-toggle":"dropdown","aria-expanded":!!d,"aria-controls":"dropdown-list","aria-haspopup":"menu",children:[(0,M.jsx)(c.Icon,{"aria-hidden":!0,name:"bars",style:{marginRight:"4px"}}),(0,M.jsx)("span",{children:n.title})]}),(0,M.jsx)("ul",{id:"dropdown-list",className:`dropdown-menu ${i}`,role:"menu",ref:o,children:p.length>0&&p.map(((e,n)=>(0,M.jsx)("li",{role:"none",children:(0,M.jsx)("a",{role:"menuitem",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":l.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:e.title})},`dashlinks-dropdown-item-${e.id}-${n}`)))})]})},"dashlinks-dropdown"):(0,M.jsx)(M.Fragment,{children:p.length>0&&p.map(((e,n)=>(0,M.jsx)(co,{link:t,"data-testid":l.wl.components.DashboardLinks.container,children:(0,M.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:e.url,target:t.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":l.wl.components.DashboardLinks.link,"aria-label":`${e.title} dashboard`,children:[(0,M.jsx)(c.Icon,{"aria-hidden":!0,name:"apps",style:{marginRight:"4px"}}),(0,M.jsx)("span",{children:e.title})]})},`dashlinks-list-item-${e.id}-${n}`)))})},co=e=>{const{link:t,children:n}=e,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,so);return(0,M.jsxs)("div",Object.assign({},r,{className:"gf-form",children:[t.tooltip&&(0,M.jsx)(c.Tooltip,{content:t.tooltip,children:n}),!t.tooltip&&(0,M.jsx)(M.Fragment,{children:n})]}))},uo=(e,t)=>{let{link:n,dashboardId:r}=e;const{tags:o}=n,i=(0,I.Z)((()=>async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{getBackendSrv:ao.i};const n=100;return await t.getBackendSrv().search({tag:e,limit:n})}(o)),[o,t]);return i.value?function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{getLinkSrv:vt.Bq,sanitize:oo.Nw,sanitizeUrl:oo.Nm};return n.filter((t=>t.id!==e)).map((e=>{const n=e.id,o=r.sanitize(e.title),i=r.getLinkSrv().getLinkUrl(Object.assign({},t,{url:e.url}));return{id:n,title:o,url:r.sanitizeUrl(i)}}))}(r,n,i.value):[]};const po=e=>{let{dashboard:t,links:n}=e;const r=(0,c.useForceUpdate)();return(0,ro.Z)((()=>{const e=t.events.subscribe(d.TimeRangeUpdatedEvent,r);return()=>e.unsubscribe()})),n.length?(0,M.jsx)(M.Fragment,{children:n.map(((e,n)=>{const r=(0,vt.Bq)().getAnchorInfo(e),o=`${e.title}-$${n}`;if("dashboards"===e.type)return(0,M.jsx)(lo,{link:e,linkInfo:r,dashboardId:t.id},o);const i=(0,M.jsxs)("a",{className:"gf-form-label gf-form-label--dashlink",href:(0,oo.Nm)(r.href),target:e.targetBlank?"_blank":void 0,rel:"noreferrer","data-testid":l.wl.components.DashboardLinks.link,children:[(0,M.jsx)(c.Icon,{"aria-hidden":!0,name:io.xy[e.icon],style:{marginRight:"4px"}}),(0,M.jsx)("span",{children:r.title})]});return(0,M.jsx)("div",{className:"gf-form","data-testid":l.wl.components.DashboardLinks.container,children:e.tooltip?(0,M.jsx)(c.Tooltip,{content:r.tooltip,children:i}):i},o)}))}):null};var ho,go;class fo extends a.PureComponent{constructor(){var e,t,n;super(...arguments),n=e=>{for(let t=0;t<this.props.dashboard.annotations.list.length;t++){const n=this.props.dashboard.annotations.list[t];if(n.name===e.name){n.enable=!n.enable;break}}this.props.dashboard.startRefresh(),this.forceUpdate()},(t="onAnnotationStateChanged")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}render(){const{dashboard:e,variables:t,links:n,annotations:r}=this.props;return e.isSubMenuVisible()?(0,M.jsxs)("div",{className:"submenu-controls",children:[(0,M.jsx)("form",{"aria-label":"Template variables",className:mo,children:(0,M.jsx)(ot,{variables:t})}),(0,M.jsx)(no,{annotations:r,onAnnotationChanged:this.onAnnotationStateChanged,events:e.events}),ho||(ho=(0,M.jsx)("div",{className:"gf-form gf-form--grow"})),e&&(0,M.jsx)(po,{dashboard:e,links:n}),go||(go=(0,M.jsx)("div",{className:"clearfix"}))]}):null}}const mo=r.css`
  display: flex;
  flex-wrap: wrap;
  display: contents;
`,bo=(0,s.connect)(((e,t)=>{const{uid:n}=t.dashboard,r=(0,dt.AE)(n,e);return{variables:(0,dt.IV)(n,r.variables)}}))(fo);bo.displayName="SubMenu";var yo,vo,So=n(97717),xo=n.n(So),Mo=n(35008),ko=n.n(Mo),wo=n(88959),Oo=n(86380),Co=n(19586);const jo={addPanel:Oo.tq},zo=(0,s.connect)(void 0,jo)((e=>{let{panel:t,dashboard:n}=e;const[o,i]=(0,a.useState)(!1),s=(0,c.useStyles2)(Bo),u=(0,a.useMemo)((()=>(()=>{const e=(0,T.chain)(Qe.ZP.panels).filter({hideFromList:!1}).map((e=>e)).value(),t=[],n=$.Z.get(Jt.zF);if(n){const r=JSON.parse(n),o=(0,T.find)(e,{id:r.type});if(o){const e=(0,T.cloneDeep)(o);e.name=r.title,e.sort=-1,e.defaults=r,t.push(e)}}return(0,T.sortBy)(t,"sort")})()),[]);return(0,M.jsx)("div",{className:s.wrapper,children:(0,M.jsxs)("div",{className:(0,r.cx)("panel-container",s.callToAction),children:[(0,M.jsx)(Po,{onCancel:e=>{e.preventDefault(),n.removePanel(t)},onBack:o?()=>{i(!1)}:void 0,styles:s,children:o?"Add panel from panel library":"Add panel"}),o?(0,M.jsx)(Co.N,{onClick:e=>{const{gridPos:r}=t,o=Object.assign({},e.model,{gridPos:r,libraryPanel:(0,lt.Pi)(e)});n.addPanel(o),n.removePanel(t)},variant:Co.e.Tight,showPanelFilter:!0}):(0,M.jsxs)("div",{className:s.actionsWrapper,children:[(0,M.jsx)(wo.x,{icon:"file-blank","aria-label":l.wl.pages.AddDashboard.addNewPanel,onClick:()=>{(0,d.reportInteraction)("Create new panel"),(()=>{const{gridPos:e}=t,r={type:"timeseries",title:"Panel Title",gridPos:{x:e.x,y:e.y,w:e.w,h:e.h}};n.addPanel(r),n.removePanel(t),d.locationService.partial({editPanel:r.id})})()},children:"Add a new panel"}),(0,M.jsx)(wo.x,{icon:"wrap-text","aria-label":l.wl.pages.AddDashboard.addNewRow,onClick:()=>{(0,d.reportInteraction)("Create new row"),n.addPanel({type:"row",title:"Row title",gridPos:{x:0,y:0}}),n.removePanel(t)},children:"Add a new row"}),(0,M.jsx)(wo.x,{icon:"book-open","aria-label":l.wl.pages.AddDashboard.addNewPanelLibrary,onClick:()=>{(0,d.reportInteraction)("Add a panel from the panel library"),i(!0)},children:"Add a panel from the panel library"}),1===u.length&&(0,M.jsx)(wo.x,{icon:"clipboard-alt","aria-label":l.wl.pages.AddDashboard.addNewPanelLibrary,onClick:()=>{(0,d.reportInteraction)("Paste panel from clipboard"),(e=>{const{gridPos:r}=t,o={type:e.id,title:"Panel Title",gridPos:{x:r.x,y:r.y,w:e.defaults.gridPos.w,h:e.defaults.gridPos.h}};e.defaults&&((0,T.defaults)(o,e.defaults),o.title=e.defaults.title,$.Z.delete(Jt.zF)),n.addPanel(o),n.removePanel(t)})(u[0])},children:"Paste panel from clipboard"})]})]})})})),Po=e=>{let{children:t,onBack:n,onCancel:o,styles:i}=e;return(0,M.jsxs)("div",{className:(0,r.cx)(i.headerRow,"grid-drag-handle"),children:[n&&(0,M.jsx)("div",{className:i.backButton,children:(0,M.jsx)(c.IconButton,{"aria-label":"Go back",name:"arrow-left",onClick:n,size:"xl"})}),!n&&(0,M.jsx)("div",{className:i.backButton,children:yo||(yo=(0,M.jsx)(c.Icon,{name:"panel-add",size:"md"}))}),t&&(0,M.jsx)("span",{children:t}),vo||(vo=(0,M.jsx)("div",{className:"flex-grow-1"})),(0,M.jsx)(c.IconButton,{"aria-label":"Close 'Add Panel' widget",name:"times",onClick:o})]})},Bo=e=>{const t=r.keyframes`
    0% {box-shadow: 0 0 0 2px ${e.colors.background.canvas}, 0 0 0px 4px ${e.colors.primary.main};}
    50% {box-shadow: 0 0 0 2px ${e.components.dashboard.background}, 0 0 0px 4px ${ko()(e.colors.primary.main).darken(20).toHexString()};}
    100% {box-shadow: 0 0 0 2px ${e.components.dashboard.background}, 0 0 0px 4px  ${e.colors.primary.main};}
  `;return{wrapper:r.css`
      height: 100%;
      padding-top: ${e.spacing(.5)};
    `,callToAction:r.css`
      overflow: hidden;
      outline: 2px dotted transparent;
      outline-offset: 2px;
      box-shadow: 0 0 0 2px black, 0 0 0px 4px #1f60c4;
      animation: ${t} 2s ease infinite;
    `,actionsWrapper:r.css`
      height: 100%;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      column-gap: ${e.spacing(1)};
      row-gap: ${e.spacing(1)};
      padding: ${e.spacing(0,1,1,1)};

      // This is to make the last action full width (if by itself)
      & > div:nth-child(2n-1):nth-last-of-type(1) {
        grid-column: span 2;
      }
    `,headerRow:r.css`
      display: flex;
      align-items: center;
      height: 38px;
      flex-shrink: 0;
      width: 100%;
      font-size: ${e.typography.fontSize};
      font-weight: ${e.typography.fontWeightMedium};
      padding-left: ${e.spacing(1)};
      transition: background-color 0.1s ease-in-out;
      cursor: move;

      &:hover {
        background: ${e.colors.background.secondary};
      }
    `,backButton:r.css`
      display: flex;
      align-items: center;
      cursor: pointer;
      padding-left: ${e.spacing(.5)};
      width: ${e.spacing(4)};
    `,noMargin:r.css`
      margin: 0;
    `}};var To;const Wo=e=>{var t,n;let{repeat:r,title:o,onUpdate:i,onCancel:s}=e;const[l,d]=(0,a.useState)(r),u=(0,a.useCallback)((e=>d(e)),[d]);return(0,M.jsx)(c.Form,{defaultValues:{title:o},onSubmit:e=>{i(e.title,l)},children:e=>{let{register:r}=e;return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(c.Field,{label:"Title",children:(0,M.jsx)(c.Input,Object.assign({},r("title"),{type:"text"}))}),t||(t=(0,M.jsx)(c.Field,{label:"Repeat for",children:(0,M.jsx)(Et,{repeat:l,onChange:u})})),n||(n=(0,M.jsxs)(c.Modal.ButtonRow,{children:[(0,M.jsx)(c.Button,{type:"button",variant:"secondary",onClick:s,fill:"outline",children:"Cancel"}),To||(To=(0,M.jsx)(c.Button,{type:"submit",children:"Update"}))]}))]})}})},Ro=e=>{let{repeat:t,title:n,onDismiss:r,onUpdate:o}=e;const i=Do();return(0,M.jsx)(c.Modal,{isOpen:!0,title:"Row options",icon:"copy",onDismiss:r,className:i.modal,children:(0,M.jsx)(Wo,{repeat:t,title:n,onCancel:r,onUpdate:o})})},Do=(0,c.stylesFactory)((()=>({modal:r.css`
      label: RowOptionsModal;
      width: 500px;
    `})));var Io;const Eo=e=>{let{repeat:t,title:n,onUpdate:r}=e;const o=e=>(t,n)=>{r(t,n),e()};return(0,M.jsx)(c.ModalsController,{children:e=>{let{showModal:r,hideModal:i}=e;return(0,M.jsx)("a",{className:"pointer",onClick:()=>{r(Ro,{title:n,repeat:t,onDismiss:i,onUpdate:o(i)})},children:Io||(Io=(0,M.jsx)(c.Icon,{name:"cog"}))})}})};var Ao,Fo;function Lo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Eo.displayName="RowOptionsButton";class No extends a.Component{constructor(e){super(e),Lo(this,"sub",void 0),Lo(this,"onVariableUpdated",(()=>{this.forceUpdate()})),Lo(this,"onToggle",(()=>{this.props.dashboard.toggleRow(this.props.panel),this.setState((e=>({collapsed:!e.collapsed})))})),Lo(this,"onUpdate",((e,t)=>{this.props.panel.title=e,this.props.panel.repeat=null!=t?t:void 0,this.props.panel.render(),this.props.dashboard.processRepeats(),this.forceUpdate()})),Lo(this,"onDelete",(()=>{R.Z.publish(new b.VJ({title:"Delete row",text:"Are you sure you want to remove this row and all its panels?",altActionText:"Delete row only",icon:"trash-alt",onConfirm:()=>{this.props.dashboard.removeRow(this.props.panel,!0)},onAltAction:()=>{this.props.dashboard.removeRow(this.props.panel,!1)}}))})),this.state={collapsed:this.props.panel.collapsed}}componentDidMount(){this.sub=this.props.dashboard.events.subscribe(d.RefreshEvent,this.onVariableUpdated)}componentWillUnmount(){this.sub&&this.sub.unsubscribe()}render(){const e=i()({"dashboard-row":!0,"dashboard-row--collapsed":this.state.collapsed}),t=(0,d.getTemplateSrv)().replace(this.props.panel.title,this.props.panel.scopedVars,"text"),n=this.props.panel.panels?this.props.panel.panels.length:0,r=1===n?"panel":"panels",o=!0===this.props.dashboard.meta.canEdit;return(0,M.jsxs)("div",{className:e,children:[(0,M.jsxs)("a",{className:"dashboard-row__title pointer","data-testid":l.wl.components.DashboardRow.title(t),onClick:this.onToggle,children:[(0,M.jsx)(c.Icon,{name:this.state.collapsed?"angle-right":"angle-down"}),t,(0,M.jsxs)("span",{className:"dashboard-row__panel_count",children:["(",n," ",r,")"]})]}),o&&(0,M.jsxs)("div",{className:"dashboard-row__actions",children:[(0,M.jsx)(Eo,{title:this.props.panel.title,repeat:this.props.panel.repeat,onUpdate:this.onUpdate}),(0,M.jsx)("a",{className:"pointer",onClick:this.onDelete,children:Ao||(Ao=(0,M.jsx)(c.Icon,{name:"trash-alt"}))})]}),!0===this.state.collapsed&&(0,M.jsx)("div",{className:"dashboard-row__toggle-target",onClick:this.onToggle,children:" "}),o&&(Fo||(Fo=(0,M.jsx)("div",{className:"dashboard-row__drag grid-drag-handle"})))]})}}const _o=["gridWidth","gridPos","isViewing","windowHeight","windowWidth"];function $o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Ho={cleanAndRemoveMany:H.x},Go=(0,s.connect)(null,Ho);class Vo extends a.PureComponent{constructor(e){super(e),$o(this,"panelMap",{}),$o(this,"eventSubs",new xe.w0),$o(this,"windowHeight",1200),$o(this,"windowWidth",1920),$o(this,"gridWidth",0),$o(this,"lastPanelBottom",0),$o(this,"onLayoutChange",(e=>{for(const t of e)this.panelMap[t.i].updateGridPos(t);this.props.dashboard.sortPanelsByGridPos(),this.state.isLayoutInitialized||this.setState({isLayoutInitialized:!0})})),$o(this,"triggerForceUpdate",(()=>{this.forceUpdate()})),$o(this,"updateGridPos",((e,t)=>{this.panelMap[e.i].updateGridPos(e)})),$o(this,"onResize",((e,t,n)=>{const r=this.panelMap[n.i];r.updateGridPos(n),r.configRev++})),$o(this,"onResizeStop",((e,t,n)=>{this.updateGridPos(n,e)})),$o(this,"onDragStop",((e,t,n)=>{this.updateGridPos(n,e)})),this.state={isLayoutInitialized:!1}}componentDidMount(){const{dashboard:e}=this.props;this.eventSubs.add(e.events.subscribe(b._B,this.triggerForceUpdate))}componentWillUnmount(){this.eventSubs.unsubscribe(),this.props.cleanAndRemoveMany(Object.keys(this.panelMap))}buildLayout(){const e=[];this.panelMap={};for(const t of this.props.dashboard.panels){if(t.key||(t.key=`panel-${t.id}-${Date.now()}`),this.panelMap[t.key]=t,!t.gridPos){console.log("panel without gridpos");continue}const n={i:t.key,x:t.gridPos.x,y:t.gridPos.y,w:t.gridPos.w,h:t.gridPos.h};"row"===t.type&&(n.w=Jt.cz,n.h=1,n.isResizable=!1,n.isDraggable=t.collapsed),e.push(n)}return e}getPanelScreenPos(e,t){let n=0;return n=t<d.config.theme2.breakpoints.values.md?this.lastPanelBottom+Jt.hD:qo(e.gridPos.y)+Jt.hD,this.lastPanelBottom=n+qo(e.gridPos.h),{top:n,bottom:this.lastPanelBottom}}renderPanels(e){const t=[];var n;(this.lastPanelBottom=0,this.gridWidth!==e)&&(this.windowHeight=null!==(n=window.innerHeight)&&void 0!==n?n:1e3,this.windowWidth=window.innerWidth,this.gridWidth=e);for(const n of this.props.dashboard.panels){const r=i()({"react-grid-item--fullscreen":n.isViewing});t.push((0,M.jsx)(Uo,{className:r,"data-panelid":n.id,gridPos:n.gridPos,gridWidth:e,windowHeight:this.windowHeight,windowWidth:this.windowWidth,isViewing:n.isViewing,children:(e,t)=>this.renderPanel(n,e,t)},n.key))}return t}renderPanel(e,t,n){return"row"===e.type?(0,M.jsx)(No,{panel:e,dashboard:this.props.dashboard},e.key):"add-panel"===e.type?(0,M.jsx)(zo,{panel:e,dashboard:this.props.dashboard},e.key):(0,M.jsx)(ct.l,{stateKey:e.key,panel:e,dashboard:this.props.dashboard,isEditing:e.isEditing,isViewing:e.isViewing,width:t,height:n},e.key)}render(){const{dashboard:e}=this.props;return(0,M.jsx)("div",{style:{flex:"1 1 auto",display:this.props.editPanel?"none":void 0},children:(0,M.jsx)(Se.Z,{disableHeight:!0,children:t=>{let{width:n}=t;if(0===n)return null;const r=!(n<=769)&&e.meta.canEdit;return(0,M.jsx)("div",{style:{width:`${n}px`,height:"100%"},children:(0,M.jsx)(xo(),{width:n,isDraggable:r,isResizable:e.meta.canEdit,containerPadding:[0,0],useCSSTransforms:!1,margin:[Jt.hD,Jt.hD],cols:Jt.cz,rowHeight:Jt.K3,draggableHandle:".grid-drag-handle",layout:this.buildLayout(),onDragStop:this.onDragStop,onResize:this.onResize,onResizeStop:this.onResizeStop,onLayoutChange:this.onLayoutChange,children:this.renderPanels(n)})})}})})}}const Uo=a.forwardRef(((e,t)=>{var n;const r=d.config.theme2;let o=100,i=100;const{gridWidth:a,gridPos:s,isViewing:l,windowHeight:c,windowWidth:u}=e,p=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,_o),h=null!==(n=e.style)&&void 0!==n?n:{};return l?(o=a,i=.85*c,h.height=i,h.width="100%"):u<r.breakpoints.values.md?(o=e.gridWidth,i=qo(s.h),h.height=i,h.width="100%"):(o=parseFloat(e.style.width),i=parseFloat(e.style.height)),(0,M.jsx)("div",Object.assign({},p,{ref:t,children:[e.children[0](o,i),e.children.slice(1)]}))}));function qo(e){return e*(Jt.K3+Jt.hD)-Jt.hD}Uo.displayName="GridItemWithDimensions";const Qo=Go(Vo);var Zo,Ko=n(80965),Yo=n(62736),Jo=n(47074);function Xo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ei=e=>({initPhase:e.dashboard.initPhase,initError:e.dashboard.initError,dashboard:e.dashboard.getModel()}),ti={initDashboard:Jo.mV,cleanUpDashboardAndVariables:Yo.lw,notifyApp:u.$l,cancelVariables:y.wX,templateVarsChangedInUrl:y.xs},ni=(0,s.connect)(ei,ti);class ri extends a.PureComponent{constructor(){super(...arguments),Xo(this,"forceRouteReloadCounter",0),Xo(this,"state",this.getCleanState()),Xo(this,"updateLiveTimer",(()=>{var e;let t;null!==(e=this.props.dashboard)&&void 0!==e&&e.liveNow&&(t=(0,jn.$t)().timeRange()),Ko.A.setLiveTimeRange(t)})),Xo(this,"onAddPanel",(()=>{const{dashboard:e}=this.props;e&&(e.panels.length>0&&"add-panel"===e.panels[0].type||(e.addPanel({type:"add-panel",gridPos:{x:0,y:0,w:12,h:8},title:"Panel Title"}),this.setState({updateScrollTop:0})))})),Xo(this,"setScrollRef",(e=>{this.setState({scrollElement:e})}))}getCleanState(){return{editPanel:null,viewPanel:null,showLoadingState:!1,rememberScrollTop:0,panelNotFound:!1,editPanelAccessDenied:!1}}componentDidMount(){var e;this.initDashboard(),this.forceRouteReloadCounter=(null===(e=this.props.history.location.state)||void 0===e?void 0:e.routeReloadCounter)||0}componentWillUnmount(){this.closeDashboard()}closeDashboard(){this.props.cleanUpDashboardAndVariables(),this.setState(this.getCleanState())}initDashboard(){const{dashboard:e,match:t,queryParams:n}=this.props;e&&this.closeDashboard(),this.props.initDashboard({urlSlug:t.params.slug,urlUid:t.params.uid,urlType:t.params.type,urlFolderId:n.folderId,routeName:this.props.route.routeName,fixUrl:!0}),setTimeout(this.updateLiveTimer,250)}componentDidUpdate(e,t){var n;const{dashboard:r,match:o,templateVarsChangedInUrl:i}=this.props,a=null===(n=this.props.history.location.state)||void 0===n?void 0:n.routeReloadCounter;if(r){if(e.dashboard!==r&&(document.title=r.title+" - "+p.c.AppTitle),e.match.params.uid!==o.params.uid||void 0!==a&&this.forceRouteReloadCounter!==a)return this.initDashboard(),void(this.forceRouteReloadCounter=a);if(e.location.search!==this.props.location.search){const t=e.queryParams,n=this.props.queryParams;(null==n?void 0:n.from)===(null==t?void 0:t.from)&&(null==n?void 0:n.to)===(null==t?void 0:t.to)||((0,jn.$t)().updateTimeRangeFromUrl(),this.updateLiveTimer()),null!=t&&t.refresh||null==n||!n.refresh||(0,jn.$t)().setAutoRefresh(n.refresh);const o=(0,v.xT)(this.props.queryParams,e.queryParams);o&&i(r.uid,o)}var s,l;if(this.state.editPanel&&!t.editPanel)f.H.setEditingState(!0),null===(s=this.props.dashboard)||void 0===s||s.events.publish(new b.xF(this.state.editPanel.id));if(!this.state.editPanel&&t.editPanel)f.H.setEditingState(!1),null===(l=this.props.dashboard)||void 0===l||l.events.publish(new b.Yr(t.editPanel.id));this.state.editPanelAccessDenied&&(this.props.notifyApp((0,h.t_)("Permission to edit panel denied")),d.locationService.partial({editPanel:null})),this.state.panelNotFound&&(this.props.notifyApp((0,h.t_)("Panel not found")),d.locationService.partial({editPanel:null,viewPanel:null}))}}static getDerivedStateFromProps(e,t){const{dashboard:n,queryParams:r}=e,o=r.editPanel,i=r.viewPanel;if(!n)return t;if(!t.editPanel&&o){const e=n.getPanelByUrlId(o);return e?n.canEditPanel(e)?Object.assign({},t,{editPanel:e,rememberScrollTop:null===(a=t.scrollElement)||void 0===a?void 0:a.scrollTop}):Object.assign({},t,{editPanelAccessDenied:!0}):Object.assign({},t,{panelNotFound:!0});var a}if(t.editPanel&&!o)return Object.assign({},t,{editPanel:null,updateScrollTop:t.rememberScrollTop});if(!t.viewPanel&&i){var s;const e=n.getPanelByUrlId(i);return e?(n.initViewPanel(e),Object.assign({},t,{viewPanel:e,rememberScrollTop:null===(s=t.scrollElement)||void 0===s?void 0:s.scrollTop,updateScrollTop:0})):Object.assign({},t,{panelNotFound:o})}return t.viewPanel&&!i?(n.exitViewPanel(t.viewPanel),Object.assign({},t,{viewPanel:null,updateScrollTop:t.rememberScrollTop})):t.panelNotFound||t.editPanelAccessDenied&&!o?Object.assign({},t,{panelNotFound:!1,editPanelAccessDenied:!1}):t}getInspectPanel(){const{dashboard:e,queryParams:t}=this.props,n=t.inspect;if(!e||!n)return null;const r=e.getPanelById(parseInt(n,10));return r||null}render(){const{dashboard:e,initError:t,queryParams:n,theme:r}=this.props,{editPanel:o,viewPanel:a,updateScrollTop:s}=this.state,d=(0,g.U6)(),u=oi(r,d);if(!e)return(0,M.jsx)(C,{initPhase:this.props.initPhase});const p=this.getInspectPanel(),h=i()(u.dashboardContainer,{"panel-in-fullscreen":a}),f=!o&&d===m.UX.Off&&!this.props.queryParams.editview;return(0,M.jsxs)("div",{className:h,children:[d!==m.UX.Full&&(0,M.jsx)("header",{"data-testid":l.wl.pages.Dashboard.DashNav.navV2,children:(0,M.jsx)(S.t,{dashboard:e,title:e.title,folderTitle:e.meta.folderTitle,isFullscreen:!!a,onAddPanel:this.onAddPanel,kioskMode:d,hideTimePicker:e.timepicker.hidden})}),(0,M.jsx)(J,{dashboard:e}),(0,M.jsx)("div",{className:u.dashboardScroll,children:(0,M.jsx)(c.CustomScrollbar,{autoHeightMin:"100%",scrollRefCallback:this.setScrollRef,scrollTop:s,hideHorizontalTrack:!0,updateAfterMountMs:500,children:(0,M.jsxs)("div",{className:u.dashboardContent,children:[t&&(Zo||(Zo=(0,M.jsx)(k,{}))),f&&(0,M.jsx)("section",{"aria-label":l.wl.pages.Dashboard.SubMenu.submenu,children:(0,M.jsx)(bo,{dashboard:e,annotations:e.annotations.list,links:e.links})}),(0,M.jsx)(Qo,{dashboard:e,viewPanel:a,editPanel:o})]})})}),p&&(0,M.jsx)(ve,{dashboard:e,panel:p}),o&&(0,M.jsx)(Kr,{dashboard:e,sourcePanel:o,tab:this.props.queryParams.tab}),n.editview&&(0,M.jsx)(re.D,{dashboard:e,editview:n.editview})]})}}const oi=(0,c.stylesFactory)(((e,t)=>{const n=t!==m.UX.Full?e.spacing(0,2,2):e.spacing(2);return{dashboardContainer:r.css`
      width: 100%;
      height: 100%;
      display: flex;
      flex: 1 1 0;
      flex-direction: column;
      min-height: 0;
    `,dashboardScroll:r.css`
      width: 100%;
      flex-grow: 1;
      min-height: 0;
      display: flex;
    `,dashboardContent:r.css`
      padding: ${n};
      flex-basis: 100%;
      flex-grow: 1;
    `}})),ii=(0,c.withTheme2)(ri);ii.displayName="DashboardPage";const ai=ni(ii)},75966:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=p(n(68404)),i=p(n(89449)),a=n(61678),s=n(87638),l=n(22922),d=n(48635),c=n(29634),u=p(n(46376));function p(e){return e&&e.__esModule?e:{default:e}}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=x(e);if(t){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return S(e)}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(c,e);var t,n,r,i=y(c);function c(){var e;f(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return M(S(e=i.call.apply(i,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),M(S(e),"elementRef",o.default.createRef()),M(S(e),"onDragStart",(function(t,n){var r=n.node,o=e.props,i=o.onDragStart,a=o.transformScale;if(i){var s={top:0,left:0},l=r.offsetParent;if(l){var c=l.getBoundingClientRect(),u=r.getBoundingClientRect(),p=u.left/a,h=c.left/a,g=u.top/a,f=c.top/a;s.left=p-h+l.scrollLeft,s.top=g-f+l.scrollTop,e.setState({dragging:s});var m=(0,d.calcXY)(e.getPositionParams(),s.top,s.left,e.props.w,e.props.h),b=m.x,y=m.y;return i.call(S(e),e.props.i,b,y,{e:t,node:r,newPosition:s})}}})),M(S(e),"onDrag",(function(t,n){var r=n.node,o=n.deltaX,i=n.deltaY,a=e.props.onDrag;if(a){if(!e.state.dragging)throw new Error("onDrag called before onDragStart.");var s=e.state.dragging.top+i,l=e.state.dragging.left+o,c=e.props,u=c.isBounded,p=c.i,h=c.w,g=c.h,f=c.containerWidth,m=e.getPositionParams();if(u){var b=r.offsetParent;if(b){var y=e.props,v=y.margin,x=y.rowHeight,M=b.clientHeight-(0,d.calcGridItemWHPx)(g,x,v[1]);s=(0,d.clamp)(s,0,M);var k=(0,d.calcGridColWidth)(m),w=f-(0,d.calcGridItemWHPx)(h,k,v[0]);l=(0,d.clamp)(l,0,w)}}var O={top:s,left:l};e.setState({dragging:O});var C=(0,d.calcXY)(m,s,l,h,g),j=C.x,z=C.y;return a.call(S(e),p,j,z,{e:t,node:r,newPosition:O})}})),M(S(e),"onDragStop",(function(t,n){var r=n.node,o=e.props.onDragStop;if(o){if(!e.state.dragging)throw new Error("onDragEnd called before onDragStart.");var i=e.props,a=i.w,s=i.h,l=i.i,c=e.state.dragging,u=c.left,p=c.top,h={top:p,left:u};e.setState({dragging:null});var g=(0,d.calcXY)(e.getPositionParams(),p,u,a,s),f=g.x,m=g.y;return o.call(S(e),l,f,m,{e:t,node:r,newPosition:h})}})),M(S(e),"onResizeStop",(function(t,n){e.onResizeHandler(t,n,"onResizeStop")})),M(S(e),"onResizeStart",(function(t,n){e.onResizeHandler(t,n,"onResizeStart")})),M(S(e),"onResize",(function(t,n){e.onResizeHandler(t,n,"onResize")})),e}return t=c,n=[{key:"shouldComponentUpdate",value:function(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;var n=(0,d.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,d.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,l.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(e){this.moveDroppingItem(e)}},{key:"moveDroppingItem",value:function(e){var t=this.props.droppingPosition;if(t){var n=this.elementRef.current;if(n){var r=e.droppingPosition||{left:0,top:0},o=this.state.dragging,i=o&&t.left!==r.left||t.top!==r.top;if(o){if(i){var a=t.left-o.left,s=t.top-o.top;this.onDrag(t.e,{node:n,deltaX:a,deltaY:s})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}}}},{key:"getPositionParams",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,n=this.props,r=n.usePercentages,o=n.containerWidth;return n.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),r&&(t.left=(0,l.perc)(e.left/o),t.width=(0,l.perc)(e.width/o))),t}},{key:"mixinDraggable",value:function(e,t){return o.default.createElement(a.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}},{key:"mixinResizable",value:function(e,t,n){var r=this.props,i=r.cols,a=r.x,l=r.minW,c=r.minH,u=r.maxW,p=r.maxH,h=r.transformScale,g=r.resizeHandles,f=r.resizeHandle,m=this.getPositionParams(),b=(0,d.calcGridItemPosition)(m,0,0,i-a,0).width,y=(0,d.calcGridItemPosition)(m,0,0,l,c),v=(0,d.calcGridItemPosition)(m,0,0,u,p),S=[y.width,y.height],x=[Math.min(v.width,b),Math.min(v.height,1/0)];return o.default.createElement(s.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:S,maxConstraints:x,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:h,resizeHandles:g,handle:f},e)}},{key:"onResizeHandler",value:function(e,t,n){var r=t.node,o=t.size,i=this.props[n];if(i){var a=this.props,s=a.cols,l=a.x,c=a.y,u=a.i,p=a.maxH,h=a.minH,g=this.props,f=g.minW,m=g.maxW,b=(0,d.calcWH)(this.getPositionParams(),o.width,o.height,l,c),y=b.w,v=b.h;f=Math.max(f,1),m=Math.min(m,s-l),y=(0,d.clamp)(y,f,m),v=(0,d.clamp)(v,h,p),this.setState({resizing:"onResizeStop"===n?null:o}),i.call(this,u,y,v,{e,node:r,size:o})}}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.w,i=e.h,a=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,p=(0,d.calcGridItemPosition)(this.getPositionParams(),t,n,r,i,this.state),h=o.default.Children.only(this.props.children),f=o.default.cloneElement(h,{ref:this.elementRef,className:(0,u.default)("react-grid-item",h.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:g(g(g({},this.props.style),h.props.style),this.createStyle(p))});return f=this.mixinResizable(f,p,s),f=this.mixinDraggable(f,a)}}],n&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.default.Component);t.default=k,M(k,"propTypes",{children:i.default.element,cols:i.default.number.isRequired,containerWidth:i.default.number.isRequired,rowHeight:i.default.number.isRequired,margin:i.default.array.isRequired,maxRows:i.default.number.isRequired,containerPadding:i.default.array.isRequired,x:i.default.number.isRequired,y:i.default.number.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired,minW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:i.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,isDraggable:i.default.bool.isRequired,isResizable:i.default.bool.isRequired,isBounded:i.default.bool.isRequired,static:i.default.bool,useCSSTransforms:i.default.bool.isRequired,transformScale:i.default.number,className:i.default.string,handle:i.default.string,cancel:i.default.string,droppingPosition:i.default.shape({e:i.default.object.isRequired,left:i.default.number.isRequired,top:i.default.number.isRequired})}),M(k,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},55400:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(68404)),i=u(n(66571)),a=u(n(46376)),s=n(22922),l=n(48635),d=u(n(75966)),c=u(n(29634));function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){return x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},x(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var j="react-grid-layout",z=!1;try{z=/firefox/i.test(navigator.userAgent)}catch(e){}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(u,e);var t,n,r,c=M(u);function u(){var e;v(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return C(w(e=c.call.apply(c,[this].concat(n))),"state",{activeDrag:null,layout:(0,s.synchronizeLayoutWithChildren)(e.props.layout,e.props.children,e.props.cols,(0,s.compactType)(e.props),e.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),C(w(e),"dragEnterCounter",0),C(w(e),"onDragStart",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state.layout,d=(0,s.getLayoutItem)(l,t);if(d)return e.setState({oldDragItem:(0,s.cloneLayoutItem)(d),oldLayout:l}),e.props.onDragStart(l,d,d,null,i,a)})),C(w(e),"onDrag",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state.oldDragItem,d=e.state.layout,c=e.props,u=c.cols,p=c.allowOverlap,h=c.preventCollision,g=(0,s.getLayoutItem)(d,t);if(g){var f={w:g.w,h:g.h,x:g.x,y:g.y,placeholder:!0,i:t};d=(0,s.moveElement)(d,g,n,r,!0,h,(0,s.compactType)(e.props),u,p),e.props.onDrag(d,l,g,f,i,a),e.setState({layout:p?d:(0,s.compact)(d,(0,s.compactType)(e.props),u),activeDrag:f})}})),C(w(e),"onDragStop",(function(t,n,r,o){var i=o.e,a=o.node;if(e.state.activeDrag){var l=e.state.oldDragItem,d=e.state.layout,c=e.props,u=c.cols,p=c.preventCollision,h=c.allowOverlap,g=(0,s.getLayoutItem)(d,t);if(g){d=(0,s.moveElement)(d,g,n,r,!0,p,(0,s.compactType)(e.props),u,h),e.props.onDragStop(d,l,g,null,i,a);var f=h?d:(0,s.compact)(d,(0,s.compactType)(e.props),u),m=e.state.oldLayout;e.setState({activeDrag:null,layout:f,oldDragItem:null,oldLayout:null}),e.onLayoutMaybeChanged(f,m)}}})),C(w(e),"onResizeStart",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state.layout,d=(0,s.getLayoutItem)(l,t);d&&(e.setState({oldResizeItem:(0,s.cloneLayoutItem)(d),oldLayout:e.state.layout}),e.props.onResizeStart(l,d,d,null,i,a))})),C(w(e),"onResize",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state,d=l.layout,c=l.oldResizeItem,u=e.props,p=u.cols,h=u.preventCollision,g=u.allowOverlap,b=(0,s.withLayoutItem)(d,t,(function(e){var t;if(h&&!g){var o=(0,s.getAllCollisions)(d,f(f({},e),{},{w:n,h:r})).filter((function(t){return t.i!==e.i}));if(t=o.length>0){var i=1/0,a=1/0;o.forEach((function(t){t.x>e.x&&(i=Math.min(i,t.x)),t.y>e.y&&(a=Math.min(a,t.y))})),Number.isFinite(i)&&(e.w=i-e.x),Number.isFinite(a)&&(e.h=a-e.y)}}return t||(e.w=n,e.h=r),e})),y=m(b,2),v=y[0],S=y[1];if(S){var x={w:S.w,h:S.h,x:S.x,y:S.y,static:!0,i:t};e.props.onResize(v,c,S,x,i,a),e.setState({layout:g?v:(0,s.compact)(v,(0,s.compactType)(e.props),p),activeDrag:x})}})),C(w(e),"onResizeStop",(function(t,n,r,o){var i=o.e,a=o.node,l=e.state,d=l.layout,c=l.oldResizeItem,u=e.props,p=u.cols,h=u.allowOverlap,g=(0,s.getLayoutItem)(d,t);e.props.onResizeStop(d,c,g,null,i,a);var f=h?d:(0,s.compact)(d,(0,s.compactType)(e.props),p),m=e.state.oldLayout;e.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null}),e.onLayoutMaybeChanged(f,m)})),C(w(e),"onDragOver",(function(t){var n;if(t.preventDefault(),t.stopPropagation(),z&&(null===(n=t.nativeEvent.target)||void 0===n||!n.classList.contains(j)))return!1;var r=e.props,i=r.droppingItem,a=r.onDropDragOver,s=r.margin,d=r.cols,c=r.rowHeight,u=r.maxRows,p=r.width,g=r.containerPadding,m=r.transformScale,b=null==a?void 0:a(t);if(!1===b)return e.state.droppingDOMNode&&e.removeDroppingPlaceholder(),!1;var y=f(f({},i),b),v=e.state.layout,S=t.nativeEvent,x=S.layerX,M=S.layerY,k={left:x/m,top:M/m,e:t};if(e.state.droppingDOMNode){if(e.state.droppingPosition){var w=e.state.droppingPosition,O=w.left,C=w.top;(O!=x||C!=M)&&e.setState({droppingPosition:k})}}else{var P={cols:d,margin:s,maxRows:u,rowHeight:c,containerWidth:p,containerPadding:g||s},B=(0,l.calcXY)(P,M,x,y.w,y.h);e.setState({droppingDOMNode:o.createElement("div",{key:y.i}),droppingPosition:k,layout:[].concat(h(v),[f(f({},y),{},{x:B.x,y:B.y,static:!1,isDraggable:!0})])})}})),C(w(e),"removeDroppingPlaceholder",(function(){var t=e.props,n=t.droppingItem,r=t.cols,o=e.state.layout,i=(0,s.compact)(o.filter((function(e){return e.i!==n.i})),(0,s.compactType)(e.props),r);e.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),C(w(e),"onDragLeave",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter--,0===e.dragEnterCounter&&e.removeDroppingPlaceholder()})),C(w(e),"onDragEnter",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter++})),C(w(e),"onDrop",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props.droppingItem,r=e.state.layout,o=r.find((function(e){return e.i===n.i}));e.dragEnterCounter=0,e.removeDroppingPlaceholder(),e.props.onDrop(r,o,t)})),e}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return t.activeDrag?null:((0,i.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,s.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n?{layout:(0,s.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,s.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(n=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,s.fastRGLPropsEqual)(this.props,e,i.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var n=this.state.layout,r=t.layout;this.onLayoutMaybeChanged(n,r)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,s.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,i.default)(t,e)||this.props.onLayoutChange(e)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,r=t.cols,i=t.margin,a=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,u=t.transformScale;return o.createElement(d.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:i,containerPadding:a||i,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:u},o.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var n=(0,s.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;var r=this.props,i=r.width,a=r.cols,l=r.margin,c=r.containerPadding,u=r.rowHeight,p=r.maxRows,h=r.isDraggable,g=r.isResizable,f=r.isBounded,m=r.useCSSTransforms,b=r.transformScale,y=r.draggableCancel,v=r.draggableHandle,S=r.resizeHandles,x=r.resizeHandle,M=this.state,k=M.mounted,w=M.droppingPosition,O="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&h,C="boolean"==typeof n.isResizable?n.isResizable:!n.static&&g,j=n.resizeHandles||S,z=O&&f&&!1!==n.isBounded;return o.createElement(d.default,{containerWidth:i,cols:a,margin:l,containerPadding:c||l,maxRows:p,rowHeight:u,cancel:y,handle:v,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:O,isResizable:C,isBounded:z,useCSSTransforms:m&&k,usePercentages:!k,transformScale:b,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?w:void 0,resizeHandles:j,resizeHandle:x},e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.style,i=t.isDroppable,l=t.innerRef,d=(0,a.default)(j,n),c=f({height:this.containerHeight()},r);return o.createElement("div",{ref:l,className:d,style:c,onDrop:i?this.onDrop:s.noop,onDragLeave:i?this.onDragLeave:s.noop,onDragEnter:i?this.onDragEnter:s.noop,onDragOver:i?this.onDragOver:s.noop},o.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),i&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&S(t.prototype,n),r&&S(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component);t.default=P,C(P,"displayName","ReactGridLayout"),C(P,"propTypes",c.default),C(P,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop,onDropDragOver:s.noop})},29634:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resizeHandleType=t.resizeHandleAxesType=t.default=void 0;var r=i(n(89449)),o=i(n(68404));function i(e){return e&&e.__esModule?e:{default:e}}var a=r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=a;var s=r.default.oneOfType([r.default.node,r.default.func]);t.resizeHandleType=s;var l={className:r.default.string,style:r.default.object,width:r.default.number,autoSize:r.default.bool,cols:r.default.number,draggableCancel:r.default.string,draggableHandle:r.default.string,verticalCompact:function(e){e.verticalCompact,0},compactType:r.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&n(22922).validateLayout(t,"layout")},margin:r.default.arrayOf(r.default.number),containerPadding:r.default.arrayOf(r.default.number),rowHeight:r.default.number,maxRows:r.default.number,isBounded:r.default.bool,isDraggable:r.default.bool,isResizable:r.default.bool,allowOverlap:r.default.bool,preventCollision:r.default.bool,useCSSTransforms:r.default.bool,transformScale:r.default.number,isDroppable:r.default.bool,resizeHandles:a,resizeHandle:s,onLayoutChange:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onDragStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,onResizeStop:r.default.func,onDrop:r.default.func,droppingItem:r.default.shape({i:r.default.string.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired}),children:function(e,t){var n=e[t],r={};o.default.Children.forEach(n,(function(e){if(null!=(null==e?void 0:e.key)){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}}))},innerRef:r.default.any};t.default=l},42223:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(68404)),i=u(n(89449)),a=u(n(66571)),s=n(22922),l=n(90711),d=u(n(55400)),c=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function u(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(){return h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}function g(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O=function(e){return Object.prototype.toString.call(e)};function C(e,t){return null==e?null:Array.isArray(e)?e:e[t]}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(u,e);var t,n,r,i=S(u);function u(){var e;b(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(M(e=i.call.apply(i,[this].concat(n))),"state",e.generateInitialState()),w(M(e),"onLayoutChange",(function(t){e.props.onLayoutChange(t,m(m({},e.props.layouts),{},w({},e.state.breakpoint,t)))})),e}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){if(!(0,a.default)(e.layouts,t.layouts)){var n=t.breakpoint,r=t.cols;return{layout:(0,l.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}}],(n=[{key:"generateInitialState",value:function(){var e=this.props,t=e.width,n=e.breakpoints,r=e.layouts,o=e.cols,i=(0,l.getBreakpointFromWidth)(n,t),a=(0,l.getColsFromBreakpoint)(i,o),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,l.findOrGenerateResponsiveLayout)(r,n,i,i,a,s),breakpoint:i,cols:a}}},{key:"componentDidUpdate",value:function(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,a.default)(this.props.breakpoints,e.breakpoints)&&(0,a.default)(this.props.cols,e.cols)||this.onWidthChange(e)}},{key:"onWidthChange",value:function(e){var t=this.props,n=t.breakpoints,r=t.cols,o=t.layouts,i=t.compactType,a=this.props.breakpoint||(0,l.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),d=this.state.breakpoint,c=(0,l.getColsFromBreakpoint)(a,r),u=m({},o);if(d!==a||e.breakpoints!==n||e.cols!==r){d in u||(u[d]=(0,s.cloneLayout)(this.state.layout));var p=(0,l.findOrGenerateResponsiveLayout)(u,n,a,d,c,i);p=(0,s.synchronizeLayoutWithChildren)(p,this.props.children,c,i,this.props.allowOverlap),u[a]=p,this.props.onLayoutChange(p,u),this.props.onBreakpointChange(a,c),this.setState({breakpoint:a,layout:p,cols:c})}var h=C(this.props.margin,a),g=C(this.props.containerPadding,a);this.props.onWidthChange(this.props.width,h,c,g)}},{key:"render",value:function(){var e=this.props,t=(e.breakpoint,e.breakpoints,e.cols,e.layouts,e.margin),n=e.containerPadding,r=(e.onBreakpointChange,e.onLayoutChange,e.onWidthChange,g(e,c));return o.createElement(d.default,h({},r,{margin:C(t,this.state.breakpoint),containerPadding:C(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Component);t.default=j,w(j,"propTypes",{breakpoint:i.default.string,breakpoints:i.default.object,allowOverlap:i.default.bool,cols:i.default.object,margin:i.default.oneOfType([i.default.array,i.default.object]),containerPadding:i.default.oneOfType([i.default.array,i.default.object]),layouts:function(e,t){if("[object Object]"!==O(e[t]))throw new Error("Layout property must be an object. Received: "+O(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(e.layouts[t],"layouts."+t)}))},width:i.default.number.isRequired,onBreakpointChange:i.default.func,onLayoutChange:i.default.func,onWidthChange:i.default.func}),w(j,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},48635:(e,t)=>{"use strict";function n(e){var t=e.margin,n=e.containerPadding,r=e.containerWidth,o=e.cols;return(r-t[0]*(o-1)-2*n[0])/o}function r(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function o(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=n,t.calcGridItemPosition=function(e,t,o,i,a,s){var l=e.margin,d=e.containerPadding,c=e.rowHeight,u=n(e),p={};s&&s.resizing?(p.width=Math.round(s.resizing.width),p.height=Math.round(s.resizing.height)):(p.width=r(i,u,l[0]),p.height=r(a,c,l[1]));s&&s.dragging?(p.top=Math.round(s.dragging.top),p.left=Math.round(s.dragging.left)):(p.top=Math.round((c+l[1])*o+d[1]),p.left=Math.round((u+l[0])*t+d[0]));return p},t.calcGridItemWHPx=r,t.calcWH=function(e,t,r,i,a){var s=e.margin,l=e.maxRows,d=e.cols,c=e.rowHeight,u=n(e),p=Math.round((t+s[0])/(u+s[0])),h=Math.round((r+s[1])/(c+s[1]));return p=o(p,0,d-i),h=o(h,0,l-a),{w:p,h}},t.calcXY=function(e,t,r,i,a){var s=e.margin,l=e.cols,d=e.rowHeight,c=e.maxRows,u=n(e),p=Math.round((r-s[0])/(u+s[0])),h=Math.round((t-s[1])/(d+s[1]));return p=o(p,0,l-i),h=o(h,0,c-a),{x:p,y:h}},t.clamp=o},33963:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.default=function(e){var t;return t=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(l,t);var n,r,i=(n=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(n);if(r){var o=m(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return g(this,e)});function l(){var e;u(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return b(f(e=i.call.apply(i,[this].concat(n))),"state",{width:1280}),b(f(e),"elementRef",o.createRef()),b(f(e),"mounted",!1),b(f(e),"onWindowResize",(function(){if(e.mounted){var t=e.elementRef.current;t instanceof HTMLElement&&t.offsetWidth&&e.setState({width:t.offsetWidth})}})),e}return function(e,t,n){t&&p(e.prototype,t);n&&p(e,n);Object.defineProperty(e,"prototype",{writable:!1})}(l,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var t=this.props,n=t.measureBeforeMount,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,s);return n&&!this.mounted?o.createElement("div",{className:(0,a.default)(this.props.className,"react-grid-layout"),style:this.props.style,ref:this.elementRef}):o.createElement(e,c({innerRef:this.elementRef},r,this.state))}}]),l}(o.Component),b(t,"defaultProps",{measureBeforeMount:!1}),b(t,"propTypes",{measureBeforeMount:i.default.bool}),t};var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(o,a,s):o[a]=e[a]}o.default=e,n&&n.set(e,o);return o}(n(68404)),i=l(n(89449)),a=l(n(46376)),s=["measureBeforeMount"];function l(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function g(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},43820:e=>{e.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}},90711:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findOrGenerateResponsiveLayout=function(e,t,n,i,a,s){if(e[n])return(0,r.cloneLayout)(e[n]);for(var l=e[i],d=o(t),c=d.slice(d.indexOf(n)),u=0,p=c.length;u<p;u++){var h=c[u];if(e[h]){l=e[h];break}}return l=(0,r.cloneLayout)(l||[]),(0,r.compact)((0,r.correctBounds)(l,{cols:a}),s,a)},t.getBreakpointFromWidth=function(e,t){for(var n=o(e),r=n[0],i=1,a=n.length;i<a;i++){var s=n[i];t>e[s]&&(r=s)}return r},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.sortBreakpoints=o;var r=n(22922);function o(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}},22922:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=d,t.childrenEqual=function(e,t){return(0,r.default)(o.default.Children.map(e,(function(e){return null==e?void 0:e.key})),o.default.Children.map(t,(function(e){return null==e?void 0:e.key})))},t.cloneLayout=c,t.cloneLayoutItem=p,t.collides=g,t.compact=f,t.compactItem=y,t.compactType=function(e){var t=e||{},n=t.verticalCompact,r=t.compactType;return!1===n?null:r},t.correctBounds=v,t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.fastRGLPropsEqual=void 0,t.getAllCollisions=M,t.getFirstCollision=x,t.getLayoutItem=S,t.getStatics=k,t.modifyLayout=u,t.moveElement=w,t.moveElementAwayFromCollision=O,t.noop=void 0,t.perc=function(e){return 100*e+"%"},t.setTopLeft=function(e){var t=e.top,n=e.left,r=e.width,o=e.height;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}},t.setTransform=function(e){var t=e.top,n=e.left,r=e.width,o=e.height,i="translate(".concat(n,"px,").concat(t,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(r,"px"),height:"".concat(o,"px"),position:"absolute"}},t.sortLayoutItems=C,t.sortLayoutItemsByColRow=z,t.sortLayoutItemsByRowCol=j,t.synchronizeLayoutWithChildren=function(e,t,n,r,i){e=e||[];var a=[];o.default.Children.forEach(t,(function(t){if(null!=(null==t?void 0:t.key)){var n=S(e,String(t.key));if(n)a.push(p(n));else{0;var r=t.props["data-grid"]||t.props._grid;r?a.push(p(s(s({},r),{},{i:t.key}))):a.push(p({w:1,h:1,x:0,y:d(a),i:String(t.key)}))}}}));var l=v(a,{cols:n});return i?l:f(l,r,n)},t.validateLayout=P,t.withLayoutItem=function(e,t,n){var r=S(e,t);return r?(r=n(p(r)),[e=u(e,r),r]):[e,null]};var r=i(n(66571)),o=i(n(68404));function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){for(var t,n=0,r=0,o=e.length;r<o;r++)(t=e[r].y+e[r].h)>n&&(n=t);return n}function c(e){for(var t=Array(e.length),n=0,r=e.length;n<r;n++)t[n]=p(e[n]);return t}function u(e,t){for(var n=Array(e.length),r=0,o=e.length;r<o;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function p(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}var h=n(43820);function g(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function f(e,t,n){for(var r=k(e),o=C(e,t),i=Array(e.length),a=0,s=o.length;a<s;a++){var l=p(o[a]);l.static||(l=y(r,l,t,n,o),r.push(l)),i[e.indexOf(o[a])]=l,l.moved=!1}return i}t.fastRGLPropsEqual=h;var m={x:"w",y:"h"};function b(e,t,n,r){var o=m[r];t[r]+=1;for(var i=e.map((function(e){return e.i})).indexOf(t.i)+1;i<e.length;i++){var a=e[i];if(!a.static){if(a.y>t.y+t.h)break;g(t,a)&&b(e,a,n+t[o],r)}}t[r]=n}function y(e,t,n,r,o){var i,a="horizontal"===n;if("vertical"===n)for(t.y=Math.min(d(e),t.y);t.y>0&&!x(e,t);)t.y--;else if(a)for(;t.x>0&&!x(e,t);)t.x--;for(;i=x(e,t);)a?b(o,t,i.x+i.w,"x"):b(o,t,i.y+i.h,"y"),a&&t.x+t.w>r&&(t.x=r-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function v(e,t){for(var n=k(e),r=0,o=e.length;r<o;r++){var i=e[r];if(i.x+i.w>t.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.static)for(;x(n,i);)i.y++;else n.push(i)}return e}function S(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function x(e,t){for(var n=0,r=e.length;n<r;n++)if(g(e[n],t))return e[n]}function M(e,t){return e.filter((function(e){return g(e,t)}))}function k(e){return e.filter((function(e){return e.static}))}function w(e,t,n,r,o,i,a,s,l){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;B("Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(t.y,"]"));var d=t.x,u=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var p=C(e,a);("vertical"===a&&"number"==typeof r?u>=r:"horizontal"===a&&"number"==typeof n&&d>=n)&&(p=p.reverse());var h=M(p,t),g=h.length>0;if(g&&l)return c(e);if(g&&i)return B("Collision prevented on ".concat(t.i,", reverting.")),t.x=d,t.y=u,t.moved=!1,e;for(var f=0,m=h.length;f<m;f++){var b=h[f];B("Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(b.i," at [").concat(b.x,",").concat(b.y,"]")),b.moved||(e=b.static?O(e,b,t,o,a,s):O(e,t,b,o,a,s))}return e}function O(e,t,n,r,o,i){var a="horizontal"===o,s="horizontal"!==o,l=t.static;if(r){r=!1;var d={x:a?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"};if(!x(e,d))return B("Doing reverse collision on ".concat(n.i," up to [").concat(d.x,",").concat(d.y,"].")),w(e,n,a?d.x:void 0,s?d.y:void 0,r,l,o,i)}return w(e,n,a?n.x+1:void 0,s?n.y+1:void 0,r,l,o,i)}function C(e,t){return"horizontal"===t?z(e):"vertical"===t?j(e):e}function j(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function z(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,o=e.length;r<o;r++)for(var i=e[r],a=0;a<n.length;a++)if("number"!=typeof i[n[a]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[a]+" must be a number!")}function B(){}t.noop=function(){}},97717:(e,t,n)=>{e.exports=n(55400).default,e.exports.utils=n(22922),e.exports.Responsive=n(42223).default,e.exports.Responsive.utils=n(90711),e.exports.WidthProvider=n(33963).default},66571:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",d="[object Error]",c="[object Function]",u="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",f="[object RegExp]",m="[object Set]",b="[object String]",y="[object Symbol]",v="[object WeakMap]",S="[object ArrayBuffer]",x="[object DataView]",M=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[i]=w[a]=w[S]=w[s]=w[x]=w[l]=w[d]=w[c]=w[u]=w[p]=w[h]=w[f]=w[m]=w[b]=w[v]=!1;var O="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,C="object"==typeof self&&self&&self.Object===Object&&self,j=O||C||Function("return this")(),z=t&&!t.nodeType&&t,P=z&&e&&!e.nodeType&&e,B=P&&P.exports===z,T=B&&O.process,W=function(){try{return T&&T.binding&&T.binding("util")}catch(e){}}(),R=W&&W.isTypedArray;function D(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function E(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var A,F,L,N=Array.prototype,_=Function.prototype,$=Object.prototype,H=j["__core-js_shared__"],G=_.toString,V=$.hasOwnProperty,U=(A=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",q=$.toString,Q=RegExp("^"+G.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=B?j.Buffer:void 0,K=j.Symbol,Y=j.Uint8Array,J=$.propertyIsEnumerable,X=N.splice,ee=K?K.toStringTag:void 0,te=Object.getOwnPropertySymbols,ne=Z?Z.isBuffer:void 0,re=(F=Object.keys,L=Object,function(e){return F(L(e))}),oe=We(j,"DataView"),ie=We(j,"Map"),ae=We(j,"Promise"),se=We(j,"Set"),le=We(j,"WeakMap"),de=We(Object,"create"),ce=Ee(oe),ue=Ee(ie),pe=Ee(ae),he=Ee(se),ge=Ee(le),fe=K?K.prototype:void 0,me=fe?fe.valueOf:void 0;function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ve;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new ye(e);this.size=t.size}function Me(e,t){var n=Le(e),r=!n&&Fe(e),o=!n&&!r&&Ne(e),i=!n&&!r&&!o&&Ve(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var d in e)!t&&!V.call(e,d)||a&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||Ie(d,l))||s.push(d);return s}function ke(e,t){for(var n=e.length;n--;)if(Ae(e[n][0],t))return n;return-1}function we(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ee&&ee in Object(e)?function(e){var t=V.call(e,ee),n=e[ee];try{e[ee]=void 0;var r=!0}catch(e){}var o=q.call(e);r&&(t?e[ee]=n:delete e[ee]);return o}(e):function(e){return q.call(e)}(e)}function Oe(e){return Ge(e)&&we(e)==i}function Ce(e,t,n,r,o){return e===t||(null==e||null==t||!Ge(e)&&!Ge(t)?e!=e&&t!=t:function(e,t,n,r,o,c){var g=Le(e),v=Le(t),M=g?a:De(e),k=v?a:De(t),w=(M=M==i?h:M)==h,O=(k=k==i?h:k)==h,C=M==k;if(C&&Ne(e)){if(!Ne(t))return!1;g=!0,w=!1}if(C&&!w)return c||(c=new xe),g||Ve(e)?Pe(e,t,n,r,o,c):function(e,t,n,r,o,i,a){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!i(new Y(e),new Y(t)));case s:case l:case p:return Ae(+e,+t);case d:return e.name==t.name&&e.message==t.message;case f:case b:return e==t+"";case u:var c=I;case m:var h=1&r;if(c||(c=E),e.size!=t.size&&!h)return!1;var g=a.get(e);if(g)return g==t;r|=2,a.set(e,t);var v=Pe(c(e),c(t),r,o,i,a);return a.delete(e),v;case y:if(me)return me.call(e)==me.call(t)}return!1}(e,t,M,n,r,o,c);if(!(1&n)){var j=w&&V.call(e,"__wrapped__"),z=O&&V.call(t,"__wrapped__");if(j||z){var P=j?e.value():e,B=z?t.value():t;return c||(c=new xe),o(P,B,n,r,c)}}if(!C)return!1;return c||(c=new xe),function(e,t,n,r,o,i){var a=1&n,s=Be(e),l=s.length,d=Be(t).length;if(l!=d&&!a)return!1;var c=l;for(;c--;){var u=s[c];if(!(a?u in t:V.call(t,u)))return!1}var p=i.get(e);if(p&&i.get(t))return p==t;var h=!0;i.set(e,t),i.set(t,e);var g=a;for(;++c<l;){var f=e[u=s[c]],m=t[u];if(r)var b=a?r(m,f,u,t,e,i):r(f,m,u,e,t,i);if(!(void 0===b?f===m||o(f,m,n,r,i):b)){h=!1;break}g||(g="constructor"==u)}if(h&&!g){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,c)}(e,t,n,r,Ce,o))}function je(e){return!(!He(e)||function(e){return!!U&&U in e}(e))&&(_e(e)?Q:M).test(Ee(e))}function ze(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||$,t!==r)return re(e);var t,n,r,o=[];for(var i in Object(e))V.call(e,i)&&"constructor"!=i&&o.push(i);return o}function Pe(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var c=-1,u=!0,p=2&n?new Se:void 0;for(i.set(e,t),i.set(t,e);++c<s;){var h=e[c],g=t[c];if(r)var f=a?r(g,h,c,t,e,i):r(h,g,c,e,t,i);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!D(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||o(h,e,n,r,i)))return p.push(t);var a}))){u=!1;break}}else if(h!==g&&!o(h,g,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u}function Be(e){return function(e,t,n){var r=t(e);return Le(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ue,Re)}function Te(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function We(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return je(n)?n:void 0}be.prototype.clear=function(){this.__data__=de?de(null):{},this.size=0},be.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be.prototype.get=function(e){var t=this.__data__;if(de){var n=t[e];return n===r?void 0:n}return V.call(t,e)?t[e]:void 0},be.prototype.has=function(e){var t=this.__data__;return de?void 0!==t[e]:V.call(t,e)},be.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=de&&void 0===t?r:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0)&&(n==t.length-1?t.pop():X.call(t,n,1),--this.size,!0)},ye.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},ye.prototype.has=function(e){return ke(this.__data__,e)>-1},ye.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ve.prototype.clear=function(){this.size=0,this.__data__={hash:new be,map:new(ie||ye),string:new be}},ve.prototype.delete=function(e){var t=Te(this,e).delete(e);return this.size-=t?1:0,t},ve.prototype.get=function(e){return Te(this,e).get(e)},ve.prototype.has=function(e){return Te(this,e).has(e)},ve.prototype.set=function(e,t){var n=Te(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Se.prototype.add=Se.prototype.push=function(e){return this.__data__.set(e,r),this},Se.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ye,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!ie||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ve(r)}return n.set(e,t),this.size=n.size,this};var Re=te?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(te(e),(function(t){return J.call(e,t)})))}:function(){return[]},De=we;function Ie(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||k.test(e))&&e>-1&&e%1==0&&e<t}function Ee(e){if(null!=e){try{return G.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ae(e,t){return e===t||e!=e&&t!=t}(oe&&De(new oe(new ArrayBuffer(1)))!=x||ie&&De(new ie)!=u||ae&&De(ae.resolve())!=g||se&&De(new se)!=m||le&&De(new le)!=v)&&(De=function(e){var t=we(e),n=t==h?e.constructor:void 0,r=n?Ee(n):"";if(r)switch(r){case ce:return x;case ue:return u;case pe:return g;case he:return m;case ge:return v}return t});var Fe=Oe(function(){return arguments}())?Oe:function(e){return Ge(e)&&V.call(e,"callee")&&!J.call(e,"callee")},Le=Array.isArray;var Ne=ne||function(){return!1};function _e(e){if(!He(e))return!1;var t=we(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $e(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function He(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ge(e){return null!=e&&"object"==typeof e}var Ve=R?function(e){return function(t){return e(t)}}(R):function(e){return Ge(e)&&$e(e.length)&&!!w[we(e)]};function Ue(e){return null!=(t=e)&&$e(t.length)&&!_e(t)?Me(e):ze(e);var t}e.exports=function(e,t){return Ce(e,t)}},67866:e=>{e.exports=["alignContent","MozAlignContent","WebkitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebkitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebkitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebkitAll","MSAll","OAll","animation","MozAnimation","WebkitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebkitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebkitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebkitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebkitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebkitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebkitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebkitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebkitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebkitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebkitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebkitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebkitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebkitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebkitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebkitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebkitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebkitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebkitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebkitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebkitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebkitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebkitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebkitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebkitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebkitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebkitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebkitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebkitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebkitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebkitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebkitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebkitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebkitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebkitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebkitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebkitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebkitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebkitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebkitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebkitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebkitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebkitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebkitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebkitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebkitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebkitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebkitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebkitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebkitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebkitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebkitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebkitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebkitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebkitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebkitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebkitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebkitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebkitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebkitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebkitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebkitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebkitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebkitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebkitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebkitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebkitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebkitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebkitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebkitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebkitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebkitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebkitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebkitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebkitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebkitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebkitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebkitCaptionSide","MSCaptionSide","OCaptionSide","caretColor","MozCaretColor","WebkitCaretColor","MSCaretColor","OCaretColor","ch","MozCh","WebkitCh","MSCh","OCh","clear","MozClear","WebkitClear","MSClear","OClear","clip","MozClip","WebkitClip","MSClip","OClip","clipPath","MozClipPath","WebkitClipPath","MSClipPath","OClipPath","cm","MozCm","WebkitCm","MSCm","OCm","color","MozColor","WebkitColor","MSColor","OColor","columnCount","MozColumnCount","WebkitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebkitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebkitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebkitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebkitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebkitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebkitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebkitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebkitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebkitColumns","MSColumns","OColumns","content","MozContent","WebkitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebkitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebkitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebkitCursor","MSCursor","OCursor","deg","MozDeg","WebkitDeg","MSDeg","ODeg","direction","MozDirection","WebkitDirection","MSDirection","ODirection","display","MozDisplay","WebkitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebkitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebkitDpi","MSDpi","ODpi","dppx","MozDppx","WebkitDppx","MSDppx","ODppx","em","MozEm","WebkitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebkitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebkitEx","MSEx","OEx","filter","MozFilter","WebkitFilter","MSFilter","OFilter","flexBasis","MozFlexBasis","WebkitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebkitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebkitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebkitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebkitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebkitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebkitFloat","MSFloat","OFloat","font","MozFont","WebkitFont","MSFont","OFont","fontFamily","MozFontFamily","WebkitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebkitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebkitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebkitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebkitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebkitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebkitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebkitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebkitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebkitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebkitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebkitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebkitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebkitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebkitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebkitFontWeight","MSFontWeight","OFontWeight","fr","MozFr","WebkitFr","MSFr","OFr","grad","MozGrad","WebkitGrad","MSGrad","OGrad","grid","MozGrid","WebkitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebkitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebkitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebkitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebkitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebkitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebkitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebkitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebkitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebkitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebkitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebkitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebkitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebkitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebkitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebkitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebkitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebkitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebkitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebkitHyphens","MSHyphens","OHyphens","hz","MozHz","WebkitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebkitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebkitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebkitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebkitImeMode","MSImeMode","OImeMode","in","MozIn","WebkitIn","MSIn","OIn","inherit","MozInherit","WebkitInherit","MSInherit","OInherit","initial","MozInitial","WebkitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebkitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebkitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebkitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebkitKhz","MSKhz","OKhz","left","MozLeft","WebkitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebkitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebkitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebkitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebkitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebkitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebkitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebkitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebkitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebkitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebkitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebkitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebkitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebkitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebkitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebkitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebkitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebkitMask","MSMask","OMask","maskClip","MozMaskClip","WebkitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebkitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebkitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebkitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebkitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebkitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebkitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebkitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebkitMaskType","MSMaskType","OMaskType","maxHeight","MozMaxHeight","WebkitMaxHeight","MSMaxHeight","OMaxHeight","maxWidth","MozMaxWidth","WebkitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebkitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebkitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebkitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebkitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebkitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebkitMm","MSMm","OMm","ms","MozMs","WebkitMs","MSMs","OMs","objectFit","MozObjectFit","WebkitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebkitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebkitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebkitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebkitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebkitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebkitOpacity","MSOpacity","OOpacity","order","MozOrder","WebkitOrder","MSOrder","OOrder","orphans","MozOrphans","WebkitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebkitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebkitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebkitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebkitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebkitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebkitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebkitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebkitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebkitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebkitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebkitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebkitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebkitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebkitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebkitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebkitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebkitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebkitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebkitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebkitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebkitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebkitPc","MSPc","OPc","perspective","MozPerspective","WebkitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebkitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebkitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebkitPosition","MSPosition","OPosition","pt","MozPt","WebkitPt","MSPt","OPt","px","MozPx","WebkitPx","MSPx","OPx","q","MozQ","WebkitQ","MSQ","OQ","quotes","MozQuotes","WebkitQuotes","MSQuotes","OQuotes","rad","MozRad","WebkitRad","MSRad","ORad","rem","MozRem","WebkitRem","MSRem","ORem","resize","MozResize","WebkitResize","MSResize","OResize","revert","MozRevert","WebkitRevert","MSRevert","ORevert","right","MozRight","WebkitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebkitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebkitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebkitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebkitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebkitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebkitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebkitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebkitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebkitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebkitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebkitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebkitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebkitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebkitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebkitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebkitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebkitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebkitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebkitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebkitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebkitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebkitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebkitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebkitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebkitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebkitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebkitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebkitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebkitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebkitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebkitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebkitTop","MSTop","OTop","touchAction","MozTouchAction","WebkitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebkitTransform","msTransform","OTransform","transformBox","MozTransformBox","WebkitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebkitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebkitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebkitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebkitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebkitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebkitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebkitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebkitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebkitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebkitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebkitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebkitVh","MSVh","OVh","visibility","MozVisibility","WebkitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebkitVmax","MSVmax","OVmax","vmin","MozVmin","WebkitVmin","MSVmin","OVmin","vw","MozVw","WebkitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebkitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebkitWidows","MSWidows","OWidows","width","MozWidth","WebkitWidth","MSWidth","OWidth","willChange","MozWillChange","WebkitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebkitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebkitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebkitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebkitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebkitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebkitFontSize","MSFontSize","OFontSize","flex","MozFlex","WebkitFlex","MSFlex","OFlex","fr","MozFr","WebkitFr","MSFr","OFr","overflowScrolling","MozOverflowScrolling","WebkitOverflowScrolling","MSOverflowScrolling","OOverflowScrolling","userSelect","MozUserSelect","WebkitUserSelect","MSUserSelect","OUserSelect"]},6157:(e,t,n)=>{var r=n(67866),o=n(59160);e.exports=function(e,t,n){var o=e[t];if(o){var i=[];if(Object.keys(o).forEach((function(e){-1===r.indexOf(e)&&i.push(e)})),i.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+i.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=o.oneOfType([o.arrayOf(e.exports),e.exports])}}]);
//# sourceMappingURL=DashboardPage.5fe513153a4d8283f7cf.js.map