(window.expressionXY_bundle_jsonpfunction=window.expressionXY_bundle_jsonpfunction||[]).push([[3],{30:function(e,r,o){"use strict";o.d(r,"a",(function(){return n})),o.d(r,"c",(function(){return l})),o.d(r,"b",(function(){return c})),o.d(r,"d",(function(){return a})),o.d(r,"e",(function(){return u})),o.d(r,"f",(function(){return v}));var s=o(24),t=o(2);const i=(e,r)=>`${e}-${r}`;function n(e,r){return e.filter((e=>void 0!==e)).map(((e,o)=>{return{...e,layerId:(s=e,s.layerId?e.layerId:i(r,o))};var s}))}const a=e=>{var r;return null!==(r=e.showLines)&&void 0!==r?r:e.seriesType===t.v.LINE||e.seriesType!==t.v.AREA};function l(e){return e.filter((e=>e.layerType===t.q.DATA||!e.layerType))}function c(e,r){var o;let t=e.splitAccessors,i=e.xAccessor,n=null!==(o=e.accessors)&&void 0!==o?o:[],a=e.markSizeAccessor;if(!(t&&t.length||i||n&&n.length||a)){var l,c,d,u;const e=null===(l=r.columns.find((e=>e.id===s.PointSeriesColumnNames.Y)))||void 0===l?void 0:l.id,o=null===(c=r.columns.find((e=>e.id===s.PointSeriesColumnNames.COLOR)))||void 0===c?void 0:c.id;i=null===(d=r.columns.find((e=>e.id===s.PointSeriesColumnNames.X)))||void 0===d?void 0:d.id,t=o?[o]:[],n=e?[e]:[],a=null===(u=r.columns.find((e=>e.id===s.PointSeriesColumnNames.SIZE)))||void 0===u?void 0:u.id}return{splitAccessors:t,xAccessor:i,accessors:n,markSizeAccessor:a}}var d=o(6);function u(e){return e.every((e=>{var r;return!(!e.xAccessor||"date"!==(null===(r=Object(d.getColumnByAccessor)(e.xAccessor,e.table.columns))||void 0===r?void 0:r.meta.type)||e.xScaleType&&e.xScaleType!==t.x.TIME)}))}var p=o(10),f=o.n(p);function v(e,r){const o=r&&Object(d.getColumnByAccessor)(r,e.columns);if(o&&"date"===(null==o?void 0:o.meta.type)){const r=o.id;if(!e.rows.some((e=>"string"==typeof e[r]&&"__other__"!==e[r])))return e;const s=e.rows.map((e=>"string"!=typeof e[r]?e:{...e,[r]:f()(e[r]).valueOf()}));return{...e,rows:s}}return e}},34:function(e,r,o){"use strict";o.d(r,"a",(function(){return a})),o.d(r,"c",(function(){return l})),o.d(r,"b",(function(){return c})),o.d(r,"f",(function(){return d})),o.d(r,"e",(function(){return u})),o.d(r,"g",(function(){return p})),o.d(r,"p",(function(){return f})),o.d(r,"d",(function(){return b})),o.d(r,"j",(function(){return m})),o.d(r,"k",(function(){return h})),o.d(r,"h",(function(){return y})),o.d(r,"o",(function(){return x})),o.d(r,"n",(function(){return A})),o.d(r,"i",(function(){return E})),o.d(r,"l",(function(){return w})),o.d(r,"m",(function(){return g}));var s=o(0),t=o(25),i=o(2),n=o(30);const a={markSizeAccessorForNonLineOrAreaChartsError:()=>s.i18n.translate("expressionXY.reusable.function.dataLayer.errors.markSizeAccessorForNonLineOrAreaChartsError",{defaultMessage:"`markSizeAccessor` can't be used. Dots are applied only for line or area charts"}),markSizeRatioLimitsError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.markSizeLimitsError",{defaultMessage:"Mark size ratio must be greater or equal to 1 and less or equal to 100"}),lineWidthForNonLineOrAreaChartError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.lineWidthForNonLineOrAreaChartError",{defaultMessage:"`lineWidth` can be applied only for line or area charts"}),showPointsForNonLineOrAreaChartError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.showPointsForNonLineOrAreaChartError",{defaultMessage:"`showPoints` can be applied only for line or area charts"}),pointsRadiusForNonLineOrAreaChartError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.pointsRadiusForNonLineOrAreaChartError",{defaultMessage:"`pointsRadius` can be applied only for line or area charts"}),linesVisibilityForNonLineChartError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.linesVisibilityForNonLineChartError",{defaultMessage:"Lines visibility can be controlled only at line charts"}),markSizeRatioWithoutAccessor:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.markSizeRatioWithoutAccessor",{defaultMessage:"Mark size ratio can be applied only with `markSizeAccessor`"}),extendBoundsAreInvalidError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.extendBoundsAreInvalidError",{defaultMessage:"For area and bar modes, and custom extent mode, the lower bound should be less or greater than 0 and the upper bound - be greater or equal than 0"}),notUsedFillOpacityError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.notUsedFillOpacityError",{defaultMessage:"`fillOpacity` argument is applicable only for area charts."}),valueLabelsForNotBarsChartsError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.valueLabelsForNotBarChartsError",{defaultMessage:"`valueLabels` argument is applicable only for bar charts."}),dataBoundsForNotLineChartError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.dataBoundsForNotLineChartError",{defaultMessage:"Only line charts can be fit to the data bounds"}),extentFullModeIsInvalidError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.extentFullModeIsInvalid",{defaultMessage:"For x axis extent, the full mode is not supported."}),extentModeNotSupportedError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.extentModeNotSupportedError",{defaultMessage:"X axis extent is only supported for numeric histograms."}),timeMarkerForNotTimeChartsError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.timeMarkerForNotTimeChartsError",{defaultMessage:"Only time charts can have current time marker"}),isInvalidIntervalError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.isInvalidIntervalError",{defaultMessage:"Provided x-axis interval is invalid. The interval should include quantity and unit names. Examples: 1d, 24h, 1w."}),minTimeBarIntervalNotForTimeBarChartError:()=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.minTimeBarIntervalNotForTimeBarChartError",{defaultMessage:"`minTimeBarInterval` argument is applicable only for time bar charts."}),axisIsNotAssignedError:e=>s.i18n.translate("expressionXY.reusable.function.xyVis.errors.axisIsNotAssignedError",{defaultMessage:'Axis with id: "{axisId}" is not assigned to any accessor. Please assign axis using the following construction: `decorations=\\{dataDecorationConfig forAccessor="your-accessor" axisId="{axisId}"\\}`',values:{axisId:e}})},l=e=>e.some((({seriesType:e})=>e===i.v.BAR)),c=e=>e.some((({seriesType:e})=>e===i.v.AREA)),d=(e,r,o,s)=>{null==o||o.forEach((o=>{var s;if(o.extent&&!o.extent.enforce){if(r&&(null===(s=o.extent)||void 0===s?void 0:s.mode)===i.d.CUSTOM&&!(e=>{const r=void 0===e.lowerBound||void 0!==e.lowerBound&&e.lowerBound<=0,o=void 0===e.upperBound||void 0!==e.upperBound&&e.upperBound>=0;return r&&o})(o.extent))throw new Error(a.extendBoundsAreInvalidError());((e,r)=>{if(!r.some((({seriesType:e})=>e===i.v.LINE))&&e.mode===i.d.DATA_BOUNDS)throw new Error(a.dataBoundsForNotLineChartError())})(o.extent,e)}})),((e,r)=>{if(e){if(e.mode===i.d.FULL)throw new Error(a.extentFullModeIsInvalidError());if(Object(n.e)(r)||r.every((({isHistogram:e})=>!e)))throw new Error(a.extentModeNotSupportedError())}})(null==s?void 0:s.extent,e)},u=(e,r)=>{null==r||r.forEach((r=>{if(r.id&&e.every((e=>{var o;return!e.decorations||(null===(o=e.decorations)||void 0===o?void 0:o.every((e=>e.axisId!==r.id)))})))throw new Error(a.axisIsNotAssignedError(r.id))}))},p=(e,r)=>{if(void 0!==e&&!r)throw new Error(a.notUsedFillOpacityError())},f=(e,r)=>{if(!r&&e!==i.w.HIDE)throw new Error(a.valueLabelsForNotBarsChartsError())},v=e=>e===i.v.LINE||e===i.v.AREA,b=(e,r)=>{if(r&&!Object(n.e)(e))throw new Error(a.timeMarkerForNotTimeChartsError())},m=(e,r)=>{if(e&&!v(r))throw new Error(a.markSizeAccessorForNonLineOrAreaChartsError())},h=e=>{if(void 0!==e&&(e<1||e>100))throw new Error(a.markSizeRatioLimitsError())},y=(e,r)=>{if(void 0!==e&&!v(r))throw new Error(a.lineWidthForNonLineOrAreaChartError())},x=(e,r)=>{if(void 0!==e&&!v(r))throw new Error(a.showPointsForNonLineOrAreaChartError())},A=(e,r)=>{if(void 0!==e&&!v(r))throw new Error(a.pointsRadiusForNonLineOrAreaChartError())},E=(e,r)=>{if(e&&!v(r))throw new Error(a.linesVisibilityForNonLineChartError())},w=(e,r)=>{if(void 0!==e&&!r)throw new Error(a.markSizeRatioWithoutAccessor())},g=(e,r,o)=>{if(o){if(!Object(t.isValidInterval)(o))throw new Error(a.isInvalidIntervalError());if(!r||!Object(n.e)(e))throw new Error(a.minTimeBarIntervalNotForTimeBarChartError())}}},39:function(e,r,o){"use strict";o.d(r,"b",(function(){return n})),o.d(r,"a",(function(){return l}));var s=o(6),t=o(2),i=o(1);const n=(e,r,o,n,l)=>{var d;null!=r&&null!==(d=r.inspectorAdapters)&&void 0!==d&&d.tables&&(r.inspectorAdapters.tables.reset(),r.inspectorAdapters.tables.allowCsvExport=!0,e.forEach((e=>{if(e.layerType===t.q.ANNOTATIONS||e.type===t.s)return;const a=c(e);a.push([o?[o]:void 0,i.a.getSplitColumnHelp()]),a.push([n?[n]:void 0,i.a.getSplitRowHelp()]);const l=Object(s.prepareLogTable)(e.table,a,!0);r.inspectorAdapters.tables.logDatatable(e.layerId,l)})),l&&l.layers.forEach((e=>{const o=a(l.datatable,e);r.inspectorAdapters.tables.logDatatable(e.layerId,o)})))},a=(e,r)=>{const o=[[["label"],i.a.getLabelLabel()],[["time"],i.a.getTimeLabel()]],t=new Set(r.annotations.map((e=>e.id)));return r.annotations.filter((e=>"query_point_event_annotation"===e.type)).forEach((e=>{const r=[...e.extraFields?e.extraFields:[],...e.textField?[e.textField]:[]].map((e=>[[`field:${e}`],e]));o.push(...r)})),Object(s.prepareLogTable)({...e,rows:e.rows.filter((e=>t.has(e.id)))},o,!0)},l=(e,r,o,n,a)=>{if(o.inspectorAdapters.tables){o.inspectorAdapters.tables.reset(),o.inspectorAdapters.tables.allowCsvExport=!0;const l=r.reduce(((e,r)=>r.layerType===t.q.ANNOTATIONS||r.type===t.s?e:[...e,...c(r)]),[]);l.push([n?[n]:void 0,i.a.getSplitColumnHelp()]),l.push([a?[a]:void 0,i.a.getSplitRowHelp()]);const d=Object(s.prepareLogTable)(e,l,!0);o.inspectorAdapters.tables.logDatatable("default",d)}},c=e=>{let r,o,s;e.layerType===t.q.DATA&&(r=e.xAccessor,o=e.splitAccessors,s=e.markSizeAccessor);const{accessors:n,layerType:a}=e;return[[n||void 0,a===t.q.DATA?i.a.getMetricHelp():i.a.getReferenceLineHelp()],[r?[r]:void 0,i.a.getXAxisHelp()],[o||void 0,i.a.getBreakdownHelp()],[s?[s]:void 0,i.a.getMarkSizeHelp()]]}},76:function(e,r,o){"use strict";o.r(r),o.d(r,"xyVisFn",(function(){return c}));var s=o(6),t=o(2),i=o(30),n=o(34),a=o(39);const l=(e,r)=>{const o=Object(i.b)(e,r),s=Object(i.f)(r,o.xAccessor);return{type:t.g,seriesType:e.seriesType,simpleView:e.simpleView,columnToLabel:e.columnToLabel,xScaleType:e.xScaleType,isHistogram:e.isHistogram,isPercentage:e.isPercentage,isHorizontal:e.isHorizontal,isStacked:e.isStacked,palette:e.palette,decorations:e.decorations,showPoints:e.showPoints,pointsRadius:e.pointsRadius,lineWidth:e.lineWidth,layerType:t.q.DATA,table:s,showLines:e.showLines,...o}},c=async(e,r,o)=>{var c,d,u,p,f,v,b,m,h,y,x,A,E;Object(s.validateAccessor)(r.splitRowAccessor,e.columns),Object(s.validateAccessor)(r.splitColumnAccessor,e.columns);const{referenceLines:w=[],seriesType:g,accessors:O,xAccessor:T,simpleView:L,splitAccessors:S,columnToLabel:C,xScaleType:N,isHistogram:I,isHorizontal:F,isPercentage:j,isStacked:k,decorations:M,palette:z,markSizeAccessor:B,showPoints:R,pointsRadius:V,lineWidth:X,showLines:Y,...H}=r;Object(n.i)(r.showLines,r.seriesType);const P=Object(i.d)(r),D=[l({...r,showLines:P},e)];Object(s.validateAccessor)(D[0].xAccessor,e.columns),null===(c=D[0].splitAccessors)||void 0===c||c.forEach((r=>Object(s.validateAccessor)(r,e.columns))),D[0].accessors.forEach((r=>Object(s.validateAccessor)(r,e.columns))),Object(n.j)(D[0].markSizeAccessor,r.seriesType),Object(s.validateAccessor)(D[0].markSizeAccessor,e.columns);const _=[...Object(i.a)(D,"dataLayers"),...Object(i.a)(w,"referenceLines")];Object(a.a)(e,_,o,r.splitColumnAccessor,r.splitRowAccessor);const q=Object(n.c)(D),W=Object(n.b)(D);return Object(n.f)(D,q||W,r.yAxisConfigs,r.xAxisConfig),Object(n.g)(r.fillOpacity,W),Object(n.d)(D,r.addTimeMarker),Object(n.m)(D,q,r.minTimeBarInterval),Object(n.p)(r.valueLabels,q),Object(n.l)(r.markSizeRatio,D[0].markSizeAccessor),Object(n.k)(r.markSizeRatio),Object(n.h)(X,r.seriesType),Object(n.o)(R,r.seriesType),Object(n.n)(V,r.seriesType),Object(n.e)(D,r.yAxisConfigs),{type:"render",as:t.A,value:{args:{...H,layers:_,markSizeRatio:D[0].markSizeAccessor&&!r.markSizeRatio?10:r.markSizeRatio,ariaLabel:null!==(d=null!==(u=r.ariaLabel)&&void 0!==u?u:null===(p=o.variables)||void 0===p?void 0:p.embeddableTitle)&&void 0!==d?d:null===(f=o.getExecutionContext)||void 0===f||null===(v=f.call(o))||void 0===v?void 0:v.description},canNavigateToLens:Boolean(o.variables.canNavigateToLens),syncColors:null!==(b=null==o||null===(m=o.isSyncColorsEnabled)||void 0===m?void 0:m.call(o))&&void 0!==b&&b,syncTooltips:null!==(h=null==o||null===(y=o.isSyncTooltipsEnabled)||void 0===y?void 0:y.call(o))&&void 0!==h&&h,syncCursor:null===(x=null==o||null===(A=o.isSyncCursorEnabled)||void 0===A?void 0:A.call(o))||void 0===x||x,overrides:null===(E=o.variables)||void 0===E?void 0:E.overrides}}}}}]);