!function(e){var t={};function r(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)r.d(n,s,function(t){return e[t]}.bind(null,s));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=23)}([function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return l}));var n=r(7),s=r.n(n),a=r(2),i=r.n(a),o=r(10),p=r(9),u=r(1);function h(e){switch(e){case p.a.circle:return i.a.forwardRef(((e,t)=>Object(u.jsx)("circle",s()({},e,{ref:t}))));case p.a.rect:return i.a.forwardRef(((e,t)=>Object(u.jsx)("rect",s()({},e,{ref:t}))));case p.a.path:return i.a.forwardRef(((e,t)=>Object(u.jsx)("path",s()({},e,{ref:t}))));default:return i.a.forwardRef(((e,t)=>Object(u.jsx)("polygon",s()({},e,{ref:t}))))}}const l=e=>{return{Component:(t=e,function({shapeAttributes:e,shapeContentAttributes:r,children:n,textAttributes:a}){const{viewBox:p,shapeProps:l,textAttributes:c,shapeType:d}=t,f=null!=e&&e.viewBox?Object(o.d)(null==e?void 0:e.viewBox):Object(o.d)(p),g=h(d),b=a?i.a.forwardRef(((e,t)=>Object(u.jsx)("text",s()({},e,{ref:t})))):null;return Object(u.jsx)("svg",s()({xmlns:"http://www.w3.org/2000/svg"},e||{},{viewBox:f}),Object(u.jsx)(g,s()({},l,r||{})),n,b&&Object(u.jsx)(b,s()({},c||{},a||{}),null==a?void 0:a.textContent))}),data:e};var t}},function(e,t){e.exports=__kbnSharedDeps__.EmotionReact},function(e,t){e.exports=__kbnSharedDeps__.React},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return p.a}));var n=r(2),s=r(1);function a(e,t){const{shapeType:r,getShape:a}=e,i=a(r);if(!i)throw new Error("Shape doesn't exist.");return Object(n.useImperativeHandle)(t,(()=>({getData:()=>i.data})),[i]),Object(s.jsx)(i.Component,e)}const i=Object(n.forwardRef)(a),o=()=>({viewBox:{minX:0,minY:0,width:0,height:0},shapeProps:{}});var p=r(9)},function(e,t){e.exports=__kbnSharedDeps__.KbnI18n},function(e,t,r){"use strict";r.r(t);var n=r(6);r.d(t,"PLUGIN_ID",(function(){return n.f})),r.d(t,"PLUGIN_NAME",(function(){return n.g})),r.d(t,"SVG",(function(){return n.h})),r.d(t,"CSS",(function(){return n.c})),r.d(t,"FONT_FAMILY",(function(){return n.d})),r.d(t,"FONT_WEIGHT",(function(){return n.e})),r.d(t,"BOOLEAN_TRUE",(function(){return n.b})),r.d(t,"BOOLEAN_FALSE",(function(){return n.a}));var s=r(8);r.d(t,"Progress",(function(){return s.a})),r.d(t,"Shape",(function(){return s.b}));var a=r(13);r.d(t,"getAvailableShapes",(function(){return a.b})),r.d(t,"getAvailableProgressShapes",(function(){return a.a}))},function(e,t,r){"use strict";r.d(t,"f",(function(){return n})),r.d(t,"g",(function(){return s})),r.d(t,"h",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"e",(function(){return p})),r.d(t,"b",(function(){return u})),r.d(t,"a",(function(){return h}));const n="expressionShape",s="expressionShape",a="SVG",i="CSS",o="`font-family`",p="`font-weight`",u="`true`",h="`false`"},function(e,t,r){e.exports=r(25)(1466)},function(e,t,r){"use strict";let n,s;r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return n})),function(e){e.ARROW="arrow",e.ARROW_MULTI="arrowMulti",e.BOOKMARK="bookmark",e.CIRCLE="circle",e.CROSS="cross",e.HEXAGON="hexagon",e.KITE="kite",e.PENTAGON="pentagon",e.RHOMBUS="rhombus",e.SEMICIRCLE="semicircle",e.SPEECH_BUBBLE="speechBubble",e.SQUARE="square",e.STAR="star",e.TAG="tag",e.TRIANGLE="triangle",e.TRIANGLE_RIGHT="triangleRight"}(n||(n={})),function(e){e.GAUGE="gauge",e.HORIZONTAL_BAR="horizontalBar",e.HORIZONTAL_PILL="horizontalPill",e.SEMICIRCLE="semicircle",e.UNICORN="unicorn",e.VERTICAL_BAR="verticalBar",e.VERTICAL_PILL="verticalPill",e.WHEEL="wheel"}(s||(s={}))},function(e,t,r){"use strict";let n;r.d(t,"a",(function(){return n})),function(e){e[e.polygon=0]="polygon",e[e.circle=1]="circle",e[e.rect=2]="rect",e[e.path=3]="path"}(n||(n={}))},function(e,t,r){"use strict";function n(e){if(e)return`${null==e?void 0:e.minX} ${null==e?void 0:e.minY} ${null==e?void 0:e.width} ${null==e?void 0:e.height}`}function s(e,t){const[r,n]=function(e,{borderOffset:t,width:r}){let{minX:n,width:s}=e;if(r){const e=s/r*t;n-=e,s+=2*e}else s=0;return[n,s]}(e,t),[s,a]=function(e,{borderOffset:t,height:r}){let{minY:n,height:s}=e;if(r){const e=s/r*t;n-=e,s+=2*e}else s=0;return[n,s]}(e,t);return{minX:r,minY:s,width:n,height:a}}r.d(t,"d",(function(){return n})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return a.b})),r.d(t,"b",(function(){return o}));var a=r(13),i=r(20);function o(e){return`${e}-${Object(i.v4)()}`}},function(e,t){e.exports=__kbnSharedDeps__.ElasticEui},function(e,t){e.exports=__kbnSharedDeps__.ReactDom},function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(8);const s=()=>Object.values(n.b),a=()=>Object.values(n.a)},function(e,t){e.exports=__kbnSharedDeps__.KbnI18nReact},function(e,t,r){r.r(t);var n=__kbnBundles__.get("plugin/kibanaReact/public");Object.defineProperties(t,Object.getOwnPropertyDescriptors(n))},function(e,t,r){r.r(t);var n=__kbnBundles__.get("plugin/presentationUtil/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(n))},function(e,t,r){"use strict";r.r(t),r.d(t,"plugin",(function(){return y})),r.d(t,"getShapeRenderer",(function(){return c})),r.d(t,"shapeRendererFactory",(function(){return d})),r.d(t,"getProgressRenderer",(function(){return f})),r.d(t,"progressRendererFactory",(function(){return g})),r.d(t,"ShapeDrawerComponent",(function(){return A.ShapeDrawerComponent})),r.d(t,"ProgressDrawerComponent",(function(){return P.ProgressDrawerComponent})),r.d(t,"getDefaultShapeData",(function(){return L.c})),r.d(t,"SvgElementTypes",(function(){return T.a})),r.d(t,"Progress",(function(){return b.a})),r.d(t,"Shape",(function(){return b.b}));var n=r(7),s=r.n(n),a=(r(2),r(12)),i=r(11),o=r(14),p=r(4),u=r(15),h=r(16),l=r(1);const c=(e=h.defaultTheme$)=>()=>({name:"shape",displayName:p.i18n.translate("expressionShape.renderer.shape.displayName",{defaultMessage:"Shape"}),help:p.i18n.translate("expressionShape.renderer.shape.helpDescription",{defaultMessage:"Render a basic shape"}),reuseDomNode:!0,render:async(t,n,p)=>{const{ShapeComponent:h}=await Promise.resolve().then(r.bind(null,18));p.onDestroy((()=>{Object(a.unmountComponentAtNode)(t)})),Object(a.render)(Object(l.jsx)(i.EuiErrorBoundary,null,Object(l.jsx)(u.KibanaThemeProvider,{theme$:e},Object(l.jsx)(o.I18nProvider,null,Object(l.jsx)(h,s()({onLoaded:p.done},n,{parentNode:t}))))),t)}}),d=e=>c(e.theme.theme$),f=(e=h.defaultTheme$)=>()=>({name:"progress",displayName:p.i18n.translate("expressionShape.renderer.progress.displayName",{defaultMessage:"Progress"}),help:p.i18n.translate("expressionShape.renderer.progress.helpDescription",{defaultMessage:"Render a basic progress"}),reuseDomNode:!0,render:async(t,n,p)=>{const{ProgressComponent:h}=await Promise.resolve().then(r.bind(null,19));p.onDestroy((()=>{Object(a.unmountComponentAtNode)(t)})),Object(a.render)(Object(l.jsx)(i.EuiErrorBoundary,null,Object(l.jsx)(u.KibanaThemeProvider,{theme$:e},Object(l.jsx)(o.I18nProvider,null,Object(l.jsx)(h,s()({},n,{parentNode:t,onLoaded:p.done}))))),t)}}),g=e=>f(e.theme.theme$);var b=r(8),x=r(6),m=r(10);const O={help:p.i18n.translate("expressionShape.functions.shapeHelpText",{defaultMessage:"Creates a shape."}),args:{shape:p.i18n.translate("expressionShape.functions.shape.args.shapeHelpText",{defaultMessage:"Pick a shape."}),border:p.i18n.translate("expressionShape.functions.shape.args.borderHelpText",{defaultMessage:"An {SVG} color for the border outlining the shape.",values:{SVG:x.h}}),borderWidth:p.i18n.translate("expressionShape.functions.shape.args.borderWidthHelpText",{defaultMessage:"The thickness of the border."}),fill:p.i18n.translate("expressionShape.functions.shape.args.fillHelpText",{defaultMessage:"An {SVG} color to fill the shape.",values:{SVG:x.h}}),maintainAspect:p.i18n.translate("expressionShape.functions.shape.args.maintainAspectHelpText",{defaultMessage:"Maintain the shape's original aspect ratio?"})}},v=()=>{const{help:e,args:t}=O;return{name:"shape",aliases:[],inputTypes:["null"],help:e,args:{shape:{types:["string"],help:t.shape,aliases:["_"],default:"square",options:Object.values(b.b)},border:{types:["string"],aliases:["stroke"],help:t.border},borderWidth:{types:["number"],aliases:["strokeWidth"],help:t.borderWidth,default:0},fill:{types:["string"],help:t.fill,default:"black"},maintainAspect:{types:["boolean"],help:t.maintainAspect,default:!1,options:[!0,!1]}},fn:(e,t)=>{if(!Object(m.a)().includes(t.shape))throw r=t.shape,new Error(p.i18n.translate("expressionShape.functions.shape.invalidShapeErrorMessage",{defaultMessage:"Invalid value: '{shape}'. Such a shape doesn't exist.",values:{shape:r}}));var r;return{type:"shape",...t}}}};var j=r(21),w=r(22);const _={help:p.i18n.translate("expressionShape.functions.progressHelpText",{defaultMessage:"Configures a progress element."}),args:{barColor:p.i18n.translate("expressionShape.functions.progress.args.barColorHelpText",{defaultMessage:"The color of the background bar."}),barWeight:p.i18n.translate("expressionShape.functions.progress.args.barWeightHelpText",{defaultMessage:"The thickness of the background bar."}),font:p.i18n.translate("expressionShape.functions.progress.args.fontHelpText",{defaultMessage:"The {CSS} font properties for the label. For example, {FONT_FAMILY} or {FONT_WEIGHT}.",values:{CSS:x.c,FONT_FAMILY:x.d,FONT_WEIGHT:x.e}}),label:p.i18n.translate("expressionShape.functions.progress.args.labelHelpText",{defaultMessage:"To show or hide the label, use {BOOLEAN_TRUE} or {BOOLEAN_FALSE}. Alternatively, provide a string to display as a label.",values:{BOOLEAN_TRUE:x.b,BOOLEAN_FALSE:x.a}}),max:p.i18n.translate("expressionShape.functions.progress.args.maxHelpText",{defaultMessage:"The maximum value of the progress element."}),shape:p.i18n.translate("expressionShape.functions.progress.args.shapeHelpText",{defaultMessage:"Select {list}, or {end}.",values:{list:Object.values(b.a).slice(0,-1).map((e=>`\`"${e}"\``)).join(", "),end:`\`"${Object.values(b.a).slice(-1)[0]}"\``}}),valueColor:p.i18n.translate("expressionShape.functions.progress.args.valueColorHelpText",{defaultMessage:"The color of the progress bar."}),valueWeight:p.i18n.translate("expressionShape.functions.progress.args.valueWeightHelpText",{defaultMessage:"The thickness of the progress bar."})}},S=()=>{const{help:e,args:t}=_;return{name:"progress",aliases:[],type:"render",inputTypes:["number"],help:e,args:{shape:{aliases:["_"],types:["string"],help:t.shape,options:Object.values(b.a),default:"gauge"},barColor:{types:["string"],help:t.barColor,default:"#f0f0f0"},barWeight:{types:["number"],help:t.barWeight,default:20},font:{types:["style"],help:t.font,default:`{font size=24 family="${w.openSans.value}" color="#000000" align=center}`},label:{types:["boolean","string"],help:t.label,default:!0},max:{types:["number"],help:t.max,default:1},valueColor:{types:["string"],help:t.valueColor,default:"#1785b0"},valueWeight:{types:["number"],help:t.valueWeight,default:20}},fn:(e,t)=>{if(t.max<=0)throw r=t.max,new Error(p.i18n.translate("expressionShape.functions.progress.invalidMaxValueErrorMessage",{defaultMessage:"Invalid {arg} value: '{max, number}'. '{arg}' must be greater than 0",values:{arg:"max",max:r}}));var r;if(e>t.max||e<0)throw((e,t=1)=>new Error(p.i18n.translate("expressionShape.functions.progress.invalidValueErrorMessage",{defaultMessage:"Invalid value: '{value, number}'. Value must be between 0 and {max, number}",values:{value:e,max:t}})))(e,t.max);let n="";t.label&&(n="string"==typeof t.label?t.label:`${e}`);let s={};return Object(j.get)(t,"font.spec")&&(s={...t.font},s.spec.fill=t.font.spec.color),{type:"render",as:"progress",value:{value:e,...t,label:n,font:s}}}}};class plugin_ExpressionShapePlugin{setup(e,{expressions:t}){t.registerFunction(v),t.registerFunction(S),t.registerRenderer(d(e)),t.registerRenderer(g(e))}start(e){}stop(){}}var A=r(18),P=r(19),L=r(3),T=r(9);function y(){return new plugin_ExpressionShapePlugin}},function(e,t,r){"use strict";r.r(t),r.d(t,"ShapeComponent",(function(){return h})),r.d(t,"ShapeDrawerComponent",(function(){return j}));var n=r(2),s=r.n(n),a=r(11),i=r(3),o=r(10),p=r(17),u=r(1);function h({onLoaded:e,parentNode:t,shape:r,fill:s,border:h,borderWidth:l,maintainAspect:c}){const d=Object(a.useResizeObserver)(t),[f,g]=Object(n.useState)({width:t.offsetWidth,height:t.offsetHeight}),[b,x]=Object(n.useState)(Object(i.c)());Object(n.useEffect)((()=>{g({width:t.offsetWidth,height:t.offsetHeight}),e()}),[t,d,e]);const m=Object(n.useCallback)((e=>{null!==e&&x(e.getData())}),[]),O=Math.max(l,0),v={strokeWidth:String(O),vectorEffect:"non-scaling-stroke",strokeMiterlimit:"999"};s&&(v.fill=s),h&&(v.stroke=h);const{width:j,height:w}=f,_={width:j,height:w,overflow:"visible",preserveAspectRatio:c?"xMidYMid meet":"none",viewBox:Object(o.c)(b.viewBox,{borderOffset:O,width:j,height:w})};return t.style.lineHeight="0",Object(u.jsx)("div",{className:"shapeAligner"},Object(u.jsx)(p.ShapeDrawerComponent,{shapeType:r,shapeContentAttributes:v,shapeAttributes:_,ref:m}))}var l=r(7),c=r.n(l),d=r(0);const f=Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"0,40 60,40 60,20 95,50 60,80 60,60 0,60"}}),g=Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:60},shapeProps:{points:"5,30 25,10 25,20 75,20 75,10 95,30 75,50 75,40 25,40 25,50"}}),b=Object(d.a)({viewBox:{minX:0,minY:0,width:60,height:100},shapeProps:{points:"0,0 60,0 60,95 30,75 0,95 0,0"}}),x=Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"30,0 70,0 70,30 100,30 100,70 70,70 70,100 30,100 30,70 0,70 0,30 30,30"}});var m=r(9);const O={arrow:f,arrowMulti:g,bookmark:b,cross:x,circle:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{r:"45",cx:"50",cy:"50"},shapeType:m.a.circle}),hexagon:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"70.000, 15.359 30.000, 15.359 10.000, 50.000 30.000, 84.641 70.000, 84.641 90.000, 50.000"}}),kite:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:150},shapeProps:{points:"50,10 10,50 50,140 90,50"}}),pentagon:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"50.0000, 14.0000 11.9577, 41.6393 26.4886, 86.3607 73.5114, 86.3607 88.0423, 41.6393"}}),rhombus:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"50,10 10,50 50,90 90,50"}}),semicircle:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{d:"M 5,50 h 90 A 45 45 180 1 0 5,50 Z"},shapeType:m.a.path}),speechBubble:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"0,0 100,0 100,70 40,70 20,85 25,70 0,70",strokeLinejoin:"round"}}),square:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{x:"0",y:"0",width:"100",height:"100"},shapeType:m.a.rect}),star:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"41.183, 37.865 12.652, 37.865 35.734, 54.635 26.917, 81.771 50.000, 65.000 73.265, 81.904 64.266, 54.635 87.348, 37.865 58.817, 37.865 50.07, 10.515"}}),tag:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:60},shapeProps:{points:"0,0 75,0 90,30 75,60 0,60"}}),triangle:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"50.000, 20.000 15.359, 80.000 84.641, 80.000"}}),triangleRight:Object(d.a)({viewBox:{minX:0,minY:0,width:100,height:100},shapeProps:{points:"0, 10 0, 100 90, 100"}})},v=e=>O[e],j=s.a.forwardRef(((e,t)=>Object(u.jsx)(i.a,c()({},e,{ref:t,getShape:v}))))},function(e,t,r){"use strict";r.r(t),r.d(t,"ProgressComponent",(function(){return x})),r.d(t,"ProgressDrawerComponent",(function(){return b}));var n=r(2),s=r.n(n),a=r(11),i=r(0),o=r(5);const p=function(e,t,r=0,n=0,s=0){const a=[e,t,r,n,s],i=((e,t,r=0)=>{let{minX:n}=t;return e!==o.Progress.HORIZONTAL_BAR&&(n-=r/2),n})(...a),p=((e,t,r=0,n,s=0)=>{let{minY:a}=t;return e===o.Progress.SEMICIRCLE&&(a-=r/2),e!==o.Progress.SEMICIRCLE&&e!==o.Progress.VERTICAL_BAR&&(a-=r/2),e!==o.Progress.VERTICAL_BAR&&e!==o.Progress.VERTICAL_PILL||(a-=s),a})(...a),u=((e,t,r=0,n=0)=>{let{width:s}=t;return e!==o.Progress.HORIZONTAL_BAR&&(s+=r),e!==o.Progress.HORIZONTAL_BAR&&e!==o.Progress.HORIZONTAL_PILL||(s+=n),s})(...a),h=((e,t,r=0,n=0,s=0)=>{let{height:a}=t;return e===o.Progress.SEMICIRCLE&&(a+=r/2),e!==o.Progress.SEMICIRCLE&&e!==o.Progress.VERTICAL_BAR&&(a+=r),e!==o.Progress.VERTICAL_BAR&&e!==o.Progress.VERTICAL_PILL||(a+=s),a})(...a),[l,c]=((e,t,r,n)=>((e===o.Progress.VERTICAL_BAR||e===o.Progress.VERTICAL_PILL)&&t>n&&(r=-t/2,n=t),[r,n]))(e,n,i,u);return{minX:l,minY:p,width:c,height:h}};var u=r(10),h=r(3),l=r(7),c=r.n(l);const d={gauge:Object(i.a)({viewBox:{minX:0,minY:0,width:120,height:120},shapeProps:{d:"M 15 100 A 60 60 0 1 1 105 100"},shapeType:h.b.path,textAttributes:{x:"60",y:"60",textAnchor:"middle",dominantBaseline:"central"}}),horizontalBar:Object(i.a)({viewBox:{minX:0,minY:0,width:208,height:1},shapeType:h.b.path,shapeProps:{d:"M 0 1 L 200 1"},textAttributes:{x:208,y:0,textAnchor:"start",dominantBaseline:"central"}}),horizontalPill:Object(i.a)({viewBox:{minX:0,minY:0,width:208,height:1},shapeType:h.b.path,shapeProps:{d:"M 0 1 L 200 1",strokeLinecap:"round"},textAttributes:{x:208,y:0,textAnchor:"start",dominantBaseline:"central"}}),semicircle:Object(i.a)({viewBox:{minX:0,minY:0,width:120,height:60},shapeType:h.b.path,shapeProps:{d:"M 0 60 A 60 60 0 1 1 120 60"},textAttributes:{x:60,y:60,textAnchor:"middle",dy:"-1"}}),unicorn:Object(i.a)({viewBox:{minX:0,minY:0,width:200,height:200},shapeType:h.b.path,shapeProps:{d:"M 123 189 C 93 141 129 126 102 96 L 78 102 L 48 117 L 42 129 Q 30 132 21 126 L 18 114 L 27 90 L 42 72 L 48 57 L 3 6 L 57 42 L 63 33 L 60 15 L 69 27 L 69 15 L 84 27 Q 162 36 195 108 Q 174 159 123 189 Z"},textAttributes:{x:"0",y:"200",textAnchor:"start",dominantBaseline:"text-after-edge"}}),verticalBar:Object(i.a)({viewBox:{minX:0,minY:-8,width:1,height:208},shapeType:h.b.path,shapeProps:{d:"M 1 200 L 1 0"},textAttributes:{x:"0",y:"-8",textAnchor:"middle"}}),verticalPill:Object(i.a)({viewBox:{minX:0,minY:-8,width:1,height:208},shapeType:h.b.path,shapeProps:{d:"M 1 200 L 1 0",strokeLinecap:"round"},textAttributes:{x:"0",y:"-8",textAnchor:"middle"}}),wheel:Object(i.a)({viewBox:{minX:0,minY:0,width:120,height:120},shapeType:h.b.path,shapeProps:{d:"M 60 0 A 60 60 0 1 1 60 120 A 60 60 0 1 1 60 0 Z"},textAttributes:{x:"60",y:"60",textAnchor:"middle",dominantBaseline:"central"}})},f=e=>d[e];var g=r(1);const b=s.a.forwardRef(((e,t)=>Object(g.jsx)(h.a,c()({},e,{ref:t,getShape:f}))));function x({onLoaded:e,parentNode:t,shape:r,value:s,max:l,valueColor:c,barColor:d,valueWeight:f,barWeight:x,label:m,font:O}){const v=Object(a.useResizeObserver)(t),[j,w]=Object(n.useState)({width:t.offsetWidth,height:t.offsetHeight}),[_,S]=Object(n.useState)(Object(h.c)()),A=Object(n.useCallback)((e=>{null!==e&&S(e.getData())}),[]),[P,L]=Object(n.useState)(0);Object(n.useEffect)((()=>{w({width:t.offsetWidth,height:t.offsetHeight}),e()}),[e,t,v]);const T=Object(n.useRef)(null),y=Object(n.useRef)(null);Object(n.useEffect)((()=>{L(T.current?T.current.getTotalLength():0)}),[r,_,T]);const R=_.shapeType?Object(i.b)(_.shapeType):null,B={fill:"none",stroke:d,strokeWidth:`${x}px`},E=P*(1-s/l),C={..._.shapeProps,fill:"none",stroke:c,strokeWidth:`${f}px`,strokeDasharray:P,strokeDashoffset:Math.max(0,E)},{width:I,height:M}=y.current?y.current.getBBox():{width:0,height:0},k=Math.max(f,x),N=_.textAttributes?function(e,t,r=0,n=""){if(!n)return t;let{x:s,y:a,textContent:i}=t;return i=n?n.toString():"",e===o.Progress.HORIZONTAL_PILL&&(s=parseInt(String(s),10)+r/2),e===o.Progress.VERTICAL_PILL&&(a=parseInt(String(a),10)-r/2),e!==o.Progress.HORIZONTAL_BAR&&e!==o.Progress.HORIZONTAL_PILL||(s=parseInt(String(s),10)),{x:s,y:a,textContent:i}}(r,_.textAttributes,k,m):{},H={style:O.spec,...N},D=p(r,_.viewBox,k,I,M),Y={id:Object(u.b)("svg"),...j||{},viewBox:D};return Object(g.jsx)("div",{className:"shapeAligner"},Object(g.jsx)(b,{shapeType:r,shapeContentAttributes:{...B,ref:T},shapeAttributes:Y,textAttributes:{...H,ref:y},ref:A},R&&Object(g.jsx)(R,C)))}},function(e,t){e.exports=__kbnSharedDeps__.Uuid},function(e,t){e.exports=__kbnSharedDeps__.Lodash},function(e,t,r){r.r(t);var n=__kbnBundles__.get("plugin/expressions/common");Object.defineProperties(t,Object.getOwnPropertyDescriptors(n))},function(e,t,r){r(24),__kbnBundles__.define("plugin/expressionShape/public",r,17),__kbnBundles__.define("plugin/expressionShape/common",r,5)},function(e,t,r){r.p=window.__kbnPublicPath__.expressionShape},function(e,t){e.exports=__kbnSharedDeps_npm__}]);