import e from"@babel/runtime/helpers/defineProperty";function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function r(r){for(var l=1;l<arguments.length;l++){var o=null!=arguments[l]?arguments[l]:{};l%2?t(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var l=function(e){for(var t=e.chart,l=t.xAxis[0].userOptions.plotLines,o=t.userOptions.chart.inverted?"y":"x",i=[],n=t.axes[0].plotLinesAndBands,a=0;a<l.length;){for(var p,s,u,c=null===(p=n[a])||void 0===p||null===(s=p.label)||void 0===s||null===(u=s.alignAttr)||void 0===u?void 0:u[o],v=[],b=a,d=a+1;d<n.length;d+=1){var f,y,O,h=null===(f=n[d])||void 0===f||null===(y=f.label)||void 0===y||null===(O=y.alignAttr)||void 0===O?void 0:O[o];if(!(Math.abs(c-h)<12))break;v.push(d),b=d}if(v.length){i.push(l[a]);for(var g=0;g<v.length;g+=1){var j=v[g];if(0===g){var P,x,m,w=r(r({},l[j]),{},{color:"rgba(255, 255, 255, 0.3)",opacity:.3,label:r(r({},null===(P=l[j])||void 0===P?void 0:P.label),{},{style:r(r({},null===(x=l[j])||void 0===x||null===(m=x.label)||void 0===m?void 0:m.style),{},{opacity:.3})})});i.push(w)}if(g>=1){var A,D,L,k=r(r({},l[j]),{},{color:"rgba(255, 255, 255, 0.15)",opacity:.15,label:r(r({},null===(A=l[j])||void 0===A?void 0:A.label),{},{style:r(r({},null===(D=l[j])||void 0===D||null===(L=D.label)||void 0===L?void 0:L.style),{},{opacity:.15})})});i.push(k)}}a=b+1}else i.push(l[a]),a+=1}t.update({xAxis:{plotLines:i}})};export{l as updateAxisStyles};
