!/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/indicators/tema
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Rafał Sebestjański
 *
 * 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/tema",["highcharts/highcharts"],function(e){return t(e,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/tema"]=t(e._Highcharts,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(e,t){return function(){"use strict";var r,o={512:function(e){e.exports=t},944:function(t){t.exports=e}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var l={};i.d(l,{default:function(){return _}});var c=i(944),a=i.n(c),u=i(512),s=i.n(u),p=function(e,t,r){if(r||2==arguments.length)for(var o,n=0,i=t.length;n<i;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))};function f(e){return v(e)&&"number"==typeof e.nodeType}function h(e){var t=Object.prototype.toString.call(e);return"[object Array]"===t||"[object Array Iterator]"===t}function v(e,t){return!!e&&"object"==typeof e&&(!t||!h(e))}a().doc,a().win,Array.prototype.find;var y=(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),d=s().seriesTypes.ema,g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t.prototype.getEMA=function(t,r,o,n,i,l){return e.prototype.calculateEma.call(this,l||[],t,void 0===i?1:i,this.EMApercent,r,void 0===n?-1:n,o)},t.prototype.getTemaPoint=function(e,t,r,o){var n;return[e[o-3],(n=3*r.level1-3*r.level2+r.level3)>1e14?n:parseFloat(n.toPrecision(14))]},t.prototype.getValues=function(t,r){var o,n,i,l,c=r.period,a=2*c,u=3*c,s=t.xData,p=t.yData,f=p?p.length:0,v=[],y=[],d=[],g=[],_=[],b={},m=-1,j=0,x=0;if(this.EMApercent=2/(c+1),!(f<3*c-2)){for(h(p[0])&&(m=r.index?r.index:0),x=(j=e.prototype.accumulatePeriodPoints.call(this,c,m,p))/c,j=0,i=c;i<f+3;i++)i<f+1&&(b.level1=this.getEMA(p,o,x,m,i)[1],g.push(b.level1)),o=b.level1,i<a?j+=b.level1:(i===a&&(x=j/c,j=0),b.level1=g[i-c-1],b.level2=this.getEMA([b.level1],n,x)[1],_.push(b.level2),n=b.level2,i<u?j+=b.level2:(i===u&&(x=j/c),i===f+1&&(b.level1=g[i-c-1],b.level2=this.getEMA([b.level1],n,x)[1],_.push(b.level2)),b.level1=g[i-c-2],b.level2=_[i-2*c-1],b.level3=this.getEMA([b.level2],b.prevLevel3,x)[1],(l=this.getTemaPoint(s,u,b,i))&&(v.push(l),y.push(l[0]),d.push(l[1])),b.prevLevel3=b.level3));return{values:v,xData:y,yData:d}}},t.defaultOptions=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var o,n=p([e],t,!0),i={},l=function(e,t){return"object"!=typeof e&&(e={}),function(e,t,r){for(var o in e)Object.hasOwnProperty.call(e,o)&&t.call((0,e[o]),e[o],o,e)}(t,function(r,o){if("__proto__"!==o&&"constructor"!==o){var n;!v(r,!0)||(n=null==r?void 0:r.constructor,v(r,!0)&&!f(r)&&(null==n?void 0:n.name)&&"Object"!==n.name)||f(r)?e[o]=t[o]:e[o]=l(e[o]||{},r)}}),e};!0===e&&(i=n[1],n=Array.prototype.slice.call(n,2));var c=n.length;for(o=0;o<c;o++)i=l(i,n[o]);return i}(d.defaultOptions),t}(d);s().registerSeriesType("tema",g);var _=a();return l.default}()});