!/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/indicators/cmf
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Sebastian Domas
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/cmf",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/cmf"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e){return function(){"use strict";var r,n={512:function(t){t.exports=e},944:function(e){e.exports=t}},o={};function i(t){var e=o[t];if(void 0!==e)return e.exports;var r=o[t]={exports:{}};return n[t](r,r.exports,i),r.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var u={};i.d(u,{default:function(){return d}});var s=i(944),a=i.n(s),c=i(512),p=i.n(c),f=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=p().seriesTypes.sma,h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.nameBase="Chaikin Money Flow",e}return f(e,t),e.prototype.isValid=function(){var t,e=this.chart,r=this.options,n=this.linkedParent,o=this.volumeSeries||(this.volumeSeries=e.get(r.params.volumeSeriesID)),i=(null==(t=null==n?void 0:n.pointArrayMap)?void 0:t.length)===4;function u(t){return t.dataTable.rowCount>=r.params.period}return!!(n&&o&&u(n)&&u(o)&&i)},e.prototype.getValues=function(t,e){if(this.isValid())return this.getMoneyFlow(t.xData,t.yData,this.volumeSeries.getColumn("y"),e.period)},e.prototype.getMoneyFlow=function(t,e,r,n){var o,i,u=e.length,s=[],a=[],c=[],p=[],f=-1,l=0,h=0;function d(t,e){var r=t[1],n=t[2],i=t[3];return null!==e&&null!==r&&null!==n&&null!==i&&r!==n?(i-n-(r-i))/(r-n)*e:(f=o,null)}if(n>0&&n<=u){for(o=0;o<n;o++)s[o]=d(e[o],r[o]),l+=r[o],h+=s[o];for(a.push(t[o-1]),c.push(o-f>=n&&0!==l?h/l:null),p.push([a[0],c[0]]);o<u;o++)s[o]=d(e[o],r[o]),l-=r[o-n],l+=r[o],h-=s[o-n],h+=s[o],i=[t[o],o-f>=n?h/l:null],a.push(i[0]),c.push(i[1]),p.push([i[0],i[1]])}return{values:p,xData:a,yData:c}},e.defaultOptions=(0,s.merge)(l.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),e}(l);p().registerSeriesType("cmf",h);var d=a();return u.default}()});