!/**
 * Highstock JS v12.5.0 (2026-01-12)
 * @module highcharts/indicators/chaikin
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Wojciech Chmiel
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/chaikin",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/chaikin"]=t(e._Highcharts,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t)=>(()=>{"use strict";var r={512:e=>{e.exports=t},944:t=>{t.exports=e}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return r[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};i.d(a,{default:()=>S});var o=i(944),n=i.n(o),u=i(512),p=i.n(u);let{sma:l}=p().seriesTypes,{error:h,extend:d,merge:c}=n();class g extends l{static populateAverage(e,t,r,s,i){let a=t[s][1],o=t[s][2],n=t[s][3],u=r[s],p=n===a&&n===o||a===o?0:(2*n-o-a)/(a-o)*u;return[e[s],p]}getValues(e,t){let r,s,i,a=t.period,o=e.xData,n=e.yData,u=t.volumeSeriesID,p=e.chart.get(u),l=p?.getColumn("y"),d=n?n.length:0,c=[],f=[],y=[];if(!(o.length<=a)||!d||4===n[0].length){if(!p)return void h("Series "+u+" not found! Check `volumeSeriesID`.",!0,e.chart);for(s=a;s<d;s++)r=c.length,i=g.populateAverage(o,n,l,s,a),r>0&&(i[1]+=c[r-1][1]),c.push(i),f.push(i[0]),y.push(i[1]);return{values:c,xData:f,yData:y}}}}g.defaultOptions=c(l.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),d(g.prototype,{nameComponents:!1,nameBase:"Accumulation/Distribution"}),p().registerSeriesType("ad",g);let{ema:f}=p().seriesTypes,{correctFloat:y,extend:m,merge:v,error:x}=n();class D extends f{getValues(e,t){let r,s,i=t.periods,a=t.period,o=[],n=[],u=[];if(2!==i.length||i[1]<=i[0])return void x('Error: "Chaikin requires two periods. Notice, first period should be lower than the second one."');let p=g.prototype.getValues.call(this,e,{volumeSeriesID:t.volumeSeriesID,period:a});if(!p)return;let l=super.getValues.call(this,p,{period:i[0]}),h=super.getValues.call(this,p,{period:i[1]});if(!l||!h)return;let d=i[1]-i[0];for(s=0;s<h.yData.length;s++)r=y(l.yData[s+d]-h.yData[s]),o.push([h.xData[s],r]),n.push(h.xData[s]),u.push(r);return{values:o,xData:n,yData:u}}}D.defaultOptions=v(f.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume",period:9,periods:[3,10]}}),m(D.prototype,{nameBase:"Chaikin Osc",nameComponents:["periods"]}),p().registerSeriesType("chaikin",D);let S=n();return a.default})());